doubt on how to divide by using the intensity of an image
1 回表示 (過去 30 日間)
古いコメントを表示
hai
i am studying about optic disc localization my work is to convert a two dimensional retinal image into two one dimensional signals the input i have used is a retinal image from drive database for that i am using an algorithm
step 1 calculate the vertical and horizontal edge maps (ev,eh)using the mask[1 0 -1] and its transpose on the green component of the image step2 calculate the edgediff and edgesum which is ev-eh and ev+eh step3 next divide the edgediff by the image intensity fmap1=edgediff(x,y)/I(x,y) my doubt is how to obtain the intensity value
please help me my code is this
g=maskedRgbImage(:,:,2);
imv=conv2(double(g),[1 0 -1],'same');
figure,image((imv));
title ('Vertical Image');
imh=conv2(double(g),[1;0;-1],'same');
figure,image((imh));
title ('Horizontal Image');
ev=abs(imv);
eh=abs(imh);
edgediff=imsubtract(ev,eh);
next step is calculating the image intensity and
fmap1=imdivide(edgediff,original image)
i have divided by using the original image is it correct how to calculate the image intensity and divide thanks in advance please help me
0 件のコメント
回答 (1 件)
David Young
2011 年 9 月 7 日
You could try using rgb2gray on the initial image. Looking at your code, this would be:
I = rgb2gray(maskedRgbImage);
then
fmap1 = imdivide(edgediff, I);
I am not certain that this is what is intended, however. The instructions do not seem to correspond to a standard algorithm: it seems a little strange to compute the differences based on the green channel alone, but then to divide by the total intensity. Another possibility is that you are simply meant to divide by g. (The purpose of subtracting the horizontal differences from the vertical differences is also hard to understand.)
If at all possible, go back to your instructor (or whoever gave you the instructions) and request clarification.
2 件のコメント
David Young
2011 年 9 月 7 日
Without implementing the system myself from the journal paper, I don't think I can offer more advice. My suggestion above about how to do the division still stands.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!