how can i calculate Contrast,Corelation,Homogeneity value from an image using Matlab?Please help me sharing the source code?

 채택된 답변

Manish M
Manish M 2019년 6월 23일

1 개 추천

Hi
  • Image contrast: image_contrast = max(grayImage(:)) - min(grayImage(:));
  • Correlation Coefficient: It is calculated b/w two images not with a single image. correlation = corr2(a, b) where a and b are two images.
  • Homogenity: homogeneity = graycoprops(graycomatrix(img), 'Homogeneity')

댓글 수: 4

Syed Zenith Rhyhan
Syed Zenith Rhyhan 2019년 6월 23일
Thanks,SIr. But I can't implement this to my work.Please give me the source code format if possible.
Image Analyst
Image Analyst 2019년 6월 23일
There is code in his answer, and, since you've accepted the answer, we assume that you figured out how to incorporate it into your code.
Syed Zenith Rhyhan
Syed Zenith Rhyhan 2019년 6월 23일
Hi
I want to calculate the homogenity of images. This can be done directly in Matlab with
homogeneity = graycoprops(graycomatrix(img), 'Homogeneity')
Is that right?
Unfortunately I'm not allowed to use the image processing toolbox. Is there some formula for calculating the homogenity so that I can implement it myself?
Or is the sourcecode of graycomatrix and graycoprops available, so that I just can take it?
Manish M
Manish M 2019년 6월 27일
If you have the Image processing toolbox in MATLAB, then in the command window type 'edit graycoprops' & 'edit graycomatrix'. You'll get the source code.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

질문:

2019년 6월 23일

댓글:

2019년 6월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by