storing values and comparing images

조회 수: 2 (최근 30일)
Smruti Khobragade
Smruti Khobragade 2020년 1월 29일
댓글: Smruti Khobragade 2020년 2월 6일
hello,
i found the max . min intensities values of image and also the glcm features and how i want to store these values to compare with other images.
how do i storeand compare those.

채택된 답변

Subhadeep Koley
Subhadeep Koley 2020년 2월 1일
Hi Smruti, Refer the code below.
% Read your image here
I = imread('cameraman.tif');
% Properties of gray-level co-occurrence matrix
statsVal = graycoprops(I); % GCLM values are stored in statsVal
% Max value
maxVal = max(I(:)); % max value are stored in maxVal
% Min value
minVal = min(I(:)); % min value are stored in minVal
% Display values
disp(['Contrast value: ', num2str(statsVal.Contrast)]);
disp(['Correlation value: ', num2str(statsVal.Correlation)]);
disp(['Energy value: ', num2str(statsVal.Energy)]);
disp(['Homogeneity value: ', num2str(statsVal.Homogeneity)]);
disp(['Max value: ', num2str(maxVal)]);
disp(['Min value: ', num2str(minVal)]);
  댓글 수: 11
Subhadeep Koley
Subhadeep Koley 2020년 2월 5일
There are many user-defined functions in your code (e.g., binaryconvert, convert, etc.). Therefore, I could not run the code in my end.
However, I can see in line 20 of your code, in every loop iteration the variable baseFileName is being overwritten with the character 'croppedImage'.
baseFileName = 'croppedImage';
Commenting / removing the above line might solve the issue.
Smruti Khobragade
Smruti Khobragade 2020년 2월 6일
yes i did the modification and it worked

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by