GLCM-master (2)
GLCM C++ 

所属分类:OpenCV
开发工具:C/C++
文件大小:7477KB
下载次数:2
上传日期:2021-02-06 08:59:34
上 传 者哎呀没人
说明:  GLCM算法的实现,纹理特征值矩阵,灰度共生矩阵
(The realization of GLCM algorithm, texture eigenvalue matrix, gray level co-occurrence matrix)

文件列表:
BadQuality1.png (32972, 2020-10-26)
CMakeLists.txt (1382, 2020-10-26)
GetHaralickFeatures.sh (234, 2020-10-26)
ImagenesFDM.xlsx (9992, 2020-10-26)
Images (0, 2020-10-26)
Images\BadQuality1.png (32972, 2020-10-26)
Images\GoodQuality1.png (93534, 2020-10-26)
Images\GoodQuality2.png (85072, 2020-10-26)
Images\GoodQuality3.png (72775, 2020-10-26)
Images\HighQuality1.png (342134, 2020-10-26)
Images\HighQuality10.png (56818, 2020-10-26)
Images\HighQuality11.png (82140, 2020-10-26)
Images\HighQuality12.png (120608, 2020-10-26)
Images\HighQuality13.png (116611, 2020-10-26)
Images\HighQuality14.png (117961, 2020-10-26)
Images\HighQuality15.png (106274, 2020-10-26)
Images\HighQuality2.png (46118, 2020-10-26)
Images\HighQuality3.png (308129, 2020-10-26)
Images\HighQuality4.png (230097, 2020-10-26)
Images\HighQuality5.png (287832, 2020-10-26)
Images\HighQuality6.png (210251, 2020-10-26)
Images\HighQuality7.png (180186, 2020-10-26)
Images\HighQuality8.png (248567, 2020-10-26)
Images\HighQuality9.png (66702, 2020-10-26)
Images\HighQualityWithCracks1.png (118307, 2020-10-26)
Images\LowQuality1.png (169786, 2020-10-26)
Images\LowQuality10.png (111386, 2020-10-26)
Images\LowQuality11.png (121093, 2020-10-26)
Images\LowQuality12.png (129543, 2020-10-26)
Images\LowQuality13.png (119803, 2020-10-26)
Images\LowQuality2.png (60644, 2020-10-26)
Images\LowQuality3.png (313402, 2020-10-26)
Images\LowQuality4.png (233167, 2020-10-26)
Images\LowQuality5.png (299349, 2020-10-26)
Images\LowQuality6.png (265668, 2020-10-26)
Images\LowQuality7.png (226232, 2020-10-26)
Images\LowQuality8.png (240629, 2020-10-26)
Images\LowQuality9.png (137922, 2020-10-26)
... ...

Gray-Level Co-Occurence Matrix (GLCM)

This is an efficient implementation of Gray-Level Co-Occurence Matrix (GLCM) in C/C++ (OpenCV).
This software is a total reworked version of the work found here https://github.com/luizbuschetto/GLCM This work is an hybrid combination of using only static memory allocation and the use of linked lists[4] to avoid processing points with zero probabilities. It calculates 20 features1 are: Autocorrelation: [2] (autoc)
Contrast: [1,2] (contr)
Correlation: [1,2] (corr)
Cluster Prominence: [2] (cprom)
Cluster Shade: [2] (cshad)
Dissimilarity: [2] (dissi)
Energy: MATLAB / [1,2] (energ)
Entropy: [2] (entro)
Maximum probability: [2] (maxpr)
Sum average [1] (savgh)
Sum variance [1] (svarh)
Sum entropy [1] (senth)
Difference variance [1] (dvarh)
Difference entropy [1] (denth)
Information measure of correlation1 [1] (inf1h)
Informaiton measure of correlation2 [1] (inf2h)
Inverse difference normalized (INN) [3] (indnc)
Inverse difference moment normalized [3] (idmnc)
Variance of X (varX)
Variance of Y (varY)
The last 2 features are reworked versions of the sum of squares proposed in [1]. 1 The number inside the brackets shows where the formula can be found (in the papers below).

References:

[1] R. M. Haralick, K. Shanmugam, and I. Dinstein, Textural Features of Image Classification, IEEE Transactions on Systems, Man and Cybernetics, vol. SMC-3, no. 6, Nov. 1973;
[2] L. Soh and C. Tsatsoulis, Texture Analysis of SAR Sea Ice Imagery Using Gray Level Co-Occurrence Matrices, IEEE Transactions on Geoscience and Remote Sensing, vol. 37, no. 2, March 1999;
[3] D A. Clausi, An analysis of co-occurrence texture statistics as a function of grey level quantization, Can. J. Remote Sensing, vol. 28, no.1, pp. 45-62, 2002;
[4] D. A. Clausi and M. E. Jernigan, "A fast method to determine co-occurrence texture features," in IEEE Transactions on Geoscience and Remote Sensing, vol. 36, no. 1, pp. 2***-300, Jan. 19***;

How to use:

./glcm image_path number_of_levels Example: ./glcm BadQuality1.png 8 The algorithm will move through the entire image extracting windows of size 10 x 10 and it will calculate the features for each window with numLevels = 8 and with a vertical distance of 1 pixel. The second parameter (number of levels) is optional. If you don't want to specify this number, the image will be processed with the default value: 256 levels.

Installation:

This software needs a minimum cmake of 3.17 and a working version of C++ 14. It has been tested using opencv 4.5.0. It also needs MATLAB to run the test.m to check the Haralick features, but if it is not necessary, the MATLAB part can be erased in the CMakeLists.txt file. To correctly use this software the following lines should be added to the .bash_profile or .bash_rc in the HOME directory. Take in account that the paths that are shown below should be changed with the correspondent ones in your system. export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH:/Users/alejandro/Downloads/TesisMaestria/Software/SoftwareTerceros/opencv/install" The following two lines are only need to save the texture images in mat file format to compare them with the Test.m script. export PATH="/Applications/MATLAB_R2019b.app/bin:$PATH" export DYLD_LIBRARY_PATH="/Applications/MATLAB_R2019b.app/bin/maci***:/Applications/MATLAB_R2019b.app/sys/os/maci***:$DYLD_LIBRARY_PATH" NOTE: You should also change the absolute paths in the CMakeLists.txt file to the correct ones in your system. Finally, if you has choose to not compare the Haralick features to the ones provided by MATLAB you should comment the line 3 and 55 of the file main.cpp. Once you has finished the installation, you can process the cmake file using the command cmake . when you are in the folder where this project is. You don't need to do this more than one time. Later you can compile the source files with the command make, again this works only if you are in the folder where this project is. With this configuration and compilation now you can use the software to process your images.

近期下载者

相关文件


收藏者