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) using 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 information depth and can be of arbitrary size. 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 and on GitHub. Its functionality is currently being extended to 16-bit unsigned TIF/TIFF images. 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.
翻译:计算机程序"Histropy"是一款交互式Python程序,用于对二维(2D)图像/图案(支持JPG/JPEG、PNG、GIF、BMP或基线TIF/TIFF格式)的选定特征进行量化分析。该程序基于像素强度数据、其直方图以及用户选定的直方图区间进行计算。图像直方图以(二维笛卡尔坐标图的)x轴显示像素强度值,y轴表示图像中每个强度值的出现频率。图像需为8位信息深度,尺寸任意。Histropy通过图形用户界面生成图像直方图,用户可通过鼠标或数值输入选择任意像素强度等级范围(即沿直方图x轴的区间)。程序随后计算选定区间的(即"猴模型")香农熵与均方根对比度,并将其显示于我们称之为"直方图工作区图"的界面中。为辅助识别直方图中的小峰值,用户可在线性显示与以10为底的对数显示之间切换直方图的y轴标度。不同图像的像素强度数据可叠加至同一直方图工作区图中进行可视化比较。程序的可视化输出结果可以PNG格式保存为直方图工作区图,供后续使用。程序源代码及简要用户手册发布在辅助材料及GitHub上。当前程序功能正扩展至16位无符号TIF/TIFF图像。此外,仅需修改数行代码,程序即可从仅处理2D图像拓展至其他潜在应用场景,例如处理CSV格式的一维或二维数据表。