what does this code mean?

1/(mean(mean(I1(xy_index(2)+(-7:7),xy_index(1)+(-7:7),1)))/mean(mean(I2(xy_index(2)+(-7:7),xy_index(1)+(-7:7),1))))

 採用された回答

satish thapaliya
satish thapaliya 2012 年 11 月 20 日

0 投票

Thanks Roberson

その他の回答 (1 件)

Matt Fig
Matt Fig 2012 年 11 月 20 日
編集済み: Matt Fig 2012 年 11 月 20 日

1 投票

It appears to be finding the ratio of the mean values of two 15 element square subarrays, each from a different array.

4 件のコメント

satish thapaliya
satish thapaliya 2012 年 11 月 20 日
actually I was interested in color calibration for the imaging system by using different intensity images. by using this command i got the value between 0 to 1 for different group of images. is it the pixel value for gray scale image transformed from digital image or something else?
satish thapaliya
satish thapaliya 2012 年 11 月 20 日
編集済み: Walter Roberson 2012 年 11 月 20 日
the whole command for the first set of image was as follow
I1 = imread('E:\allergen-data\20120823\folder 3\3.BMP');
subplot(211)
imshow(I1)
I2 = imread('E:\allergen-data\20120823\folder 2\14.BMP');
subplot(212)
imshow(I2)
I1 = rgb2gray(I1);
I2 = rgb2gray(I2);
xy_index = [310 820];
1/(mean(mean(I1(xy_index(2)+(-7:7),xy_index(1)+(-7:7),1)))/mean(mean(I2(xy_index(2)+(-7:7),xy_index(1)+(-7:7),1))))
it displays ans in the value between 0 to 1. could you help what is it actually?
Walter Roberson
Walter Roberson 2012 年 11 月 20 日
It is not a gray scale value. It is "something else".
It does not produce a value between 0 and 1: it can produce infinity in some cases.
The expression is of the form 1 / (A / B) . That could be rewritten as B/A, which makes it clearer that what it produces is a ratio of the grayscale intensities of the mean color of the respective two blocks.
satish thapaliya
satish thapaliya 2012 年 11 月 20 日
Thanks Roberson

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by