Preprint Article Version 1 This version is not peer-reviewed

Histropy: A Computer Program for Quantifications of Histograms of 2D Gray-Scale Images

Version 1 : Received: 8 August 2024 / Approved: 9 August 2024 / Online: 12 August 2024 (03:42:37 CEST)

How to cite: Menon, S.; Moeck, P. Histropy: A Computer Program for Quantifications of Histograms of 2D Gray-Scale Images. Preprints 2024, 2024080729. https://doi.org/10.20944/preprints202408.0729.v1 Menon, S.; Moeck, P. Histropy: A Computer Program for Quantifications of Histograms of 2D Gray-Scale Images. Preprints 2024, 2024080729. https://doi.org/10.20944/preprints202408.0729.v1

Abstract

The computer program "Histropy" is an interactive Python program for the quantification of selected features of two-dimensional (2D) images/patterns (in either JPG/JPEG, PNG, GIF, BMP, or baseline TIF/TIFF formats) by means of calculations based on the pixel intensities in this data, their histograms, and user-selected sections of those histograms. The histograms of these images display pixel-intensity values along the x-axis (of a 2D Cartesian plot), with the frequency of each intensity value within the image represented along the y-axis. The images need to be of 8-bit or 16-bit information depth and can be of arbitrary size. (Up to 1024 pixels maximum on both sides is recommended as larger images tend to significantly slow the program’s performance). Histropy generates an image’s histogram surrounded by a graphical user interface that allows one to select any range of image-pixel intensity levels, i.e. sections along the histograms’ x-axis, using either the computer mouse or numerical text entries. The program subsequently calculates the (so-called Monkey Model) Shannon entropy and root-mean-square contrast for the selected section and displays them as part of what we call a "histogram-workspace-plot." To support the visual identification of small peaks in the histograms, the user can switch between a linear and log-base-10 display scale for the y-axis of the histograms. Pixel intensity data from different images can be overlaid onto the same histogram-workspace-plot for visual comparisons. The visual outputs of the program can be saved as histogram-workspace-plots in the PNG format for future usage. The source code of the program and a brief user manual are published in the supporting materials as well as on GitHub . Instead of taking only 2D images as inputs, the program’s functionality could be extended by a few lines of code to other potential uses employing data tables with one or two dimensions in the CSV format.

Keywords

image entropy; histograms; calculations; computer program

Subject

Computer Science and Mathematics, Computer Vision and Graphics

Comments (0)

We encourage comments and feedback from a broad range of readers. See criteria for comments and our Diversity statement.

Leave a public comment
Send a private comment to the author(s)
* All users must log in before leaving a comment
Views 0
Downloads 0
Comments 0


×
Alerts
Notify me about updates to this article or when a peer-reviewed version is published.
We use cookies on our website to ensure you get the best experience.
Read more about our cookies here.