How can I get the fringe visibility of a difference Image
2 views (last 30 days)
Show older comments
To measure the fringe visibility I need to know the maximal and minamale intensities of the Image and my problem is that I cannot calculte the intensities they are always Imax = 1 and Imin = 0.
Have any anyone an Idea ? thank u for help.
Here is my Matlab code :
A=im2double(rgb2gray(imread('Diffbild_sw.tif')));
maxA=max(max(A))
minA=min(min(A))
V = (maxA-minA)/(maxA+minA);
0 Comments
Answers (1)
Image Analyst
on 10 Jul 2015
If you want the original values, don't call im2double():
rgbImage = imread('Diffbild_sw.tif');
grayImage = rgb2gray(rgbImage);
maxGrayLevel = max(grayImage(:))
minGrayLevel = min(grayImage(:))
6 Comments
Image Analyst
on 12 Jul 2015
The min gray level is what it is. If you don't like it being that, you can always change it. What would you change it to? That formula will always be 1 if minGrayLevel = 0 of course. But I don't think you want to just arbitrarily change your min gray level to 42 or whatever. Besides, what would you do with the other gray levels? Like gray levels 1-41 or whatever? Or the brighter gray levels? Basically if you want to fudge your data, you can make the V be whatever you want -- just plug in the desired V, the actual max gray level, and solve for the min gray level.
See Also
Categories
Find more on Read, Write, and Modify Image in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!