How to find difference in homegenity of pixels in two images
조회 수: 2 (최근 30일)
이전 댓글 표시
I am trying to find difference between a fire image and a fire like image(sunset, sunrays) Using graycoprops i could get the contrast, correlation,energy,homogeneity using homogeneity values i want to classify the fire and non fire images Example Fire image values
Contrast[1.5758e+05 1.7142e+05 1.7656e+05] Correlation: [0.0123 0.0150 0.0153] Energy: [2.5305e-04 2.5943e-04 2.6579e-04] Homogeneity: [0.0109 0.0108 0.0108]
Non fire image(a sunset) Contrast: [6.8207e+05 6.7813e+05 5.1450e+05] Correlation: [-3.6100e-04 -3.8406e-04 0.0034] Energy: [3.8163e-06 3.8412e-06 2.5691e-05] Homogeneity: [0.0068 0.0068 0.0069]
how to set threshold value for homogenity and how to compare and what syntax should be used bcoz graycoprops displays all the four how to take only homegenity or any one
I have downloaded matlab code for texture analysis
in that following code is like] function [out] = GLCMFeatures(glcm) % % Features computed % Autocorrelation: [2] % Cluster Prominence: [2] % Cluster Shade: [2] % Contrast: [1] % Correlation: [1] % Difference entropy [1] % Difference variance [1] % Dissimilarity: [2] % Energy: [1] % Entropy: [2] % Homogeneity: (Inverse Difference Moment) [2,1] % Information measure of correlation1 [1] % Informaiton measure of correlation2 [1] % Inverse difference (Homogeneity in matlab): [3] % Maximum probability: [2] % Sum average [1] % Sum entropy [1] % Sum of sqaures: Variance [1] % Sum variance [1] %
what is that [1], [2] etc in that
Please help to come out of my confusions
댓글 수: 0
채택된 답변
Image Analyst
2018년 6월 11일
Have you tried Machine Learning on your measurements: https://www.mathworks.com/help/stats/machine-learning-in-matlab.html
댓글 수: 0
추가 답변 (1개)
Rik
2018년 6월 11일
The numbers are pointing to the references used, which you can find below in the comment block.
% Features computed
% Autocorrelation: [2]
% Cluster Prominence: [2]
% Cluster Shade: [2]
% Contrast: [1]
% Correlation: [1]
% Difference entropy [1]
% Difference variance [1]
% Dissimilarity: [2]
% Energy: [1]
% Entropy: [2]
% Homogeneity: (Inverse Difference Moment) [2,1]
% Information measure of correlation1 [1]
% Informaiton measure of correlation2 [1]
% Inverse difference (Homogeneity in matlab): [3]
% Maximum probability: [2]
% Sum average [1]
% Sum entropy [1]
% Sum of sqaures: Variance [1]
% Sum variance [1]
%
% 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
%
%
% Started from Avinash Uppupuri's code on Matlab file exchange. It has then
% been vectorized. Three features were not implemented correctly in that
% code, it has since then been changed. The features are:
% * Sum of squares: variance
% * Difference variance
% * Sum Variance
댓글 수: 3
Rik
2018년 6월 11일
It looks like you're calculating these parameters for color images, which would result in 3 values per image. If you want to convert your color image to gray scale you can use rgb2gray, although I can imagine you'll lose some relevant information (even if all 3 color channels look like they return the same values).
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!