我对matlab非常陌生。我正在研究视网膜图像分析。我想找到图像的最大响应。我有12张图像。现在我必须比较所有这些图像并找到每个点的最大像素并写将其转换为新图像,以便我的新图像由最大像素形成。我为此使用 matlab
eg if my pixel value in 1 image is
[9 8 6 3 2]
and my 2 image is
[5 6 7 9 0].
Now my 3rd new image should be
[9 8 7 9 2] %here i compare these two images on pixel by pixel conversion
ie i compare 9 with 5 and write maximum value 9 to my new
image .next with 8 and 6 i take 8 since it is maximum.
这只是我自己的想法..这可以做到吗..我该怎么做。到目前为止,我必须将 10 张图像全部合并并创建 11 张图像,我已经尝试过
A = getimage();
I=A(:,:,2);
lambda = 8;
theta = 0;
psi = [0,pi/2];
gamma = 0.5;
bw = 1;
N = 12;
angle = 0;
theMaxValues = zeros(1, N);
img_in = I;
img_out = zeros(size(img_in,1), size(img_in,2), N);
for n=1:N
gb = gabor_fn(bw,gamma,psi(1),lambda,theta);
%theMaxValues(n) = max(gb(:));
I TRIED THIS WAY
matrix(:,:,1) = gb;
it gives me error..
theta = angle+pi/180;
angle= angle + 15;
end
[overallMax, index] = max(theMaxValues);
thetaOfMax = theta(index);
final_gb = gabor_fn(bw,gamma,psi(1),lambda,thetaOfMax);
figure;
imshow(final_gb);
title('final image');