multiplying images with diffent dimension
1 次查看(过去 30 天)
显示 更早的评论
[EIDT: 20110808 10:38 CDT - reformat - WDR]
hai
i am new to matlab now i am doing a project for locating the optic disc in retina i have problem in applying the threshold
it is given like this
- apply a threshold of 35 to the red component of the image
- perform a opening on the thresholded image with a 3 X 3 square kernel.
- then perform a closing with the same kernl
- finally perform a erosion and multiply with the original image
my problem with this is i don't know how to apply a threshold of 35 by using graythresh function and i can't understand what is a 3 X 3 square kernel and how to multiply the final output with the original iamge
here is my code
clc;
clear all;
close all;
fundus=imread('D:\10mcs010\DRIVE\test\images\15_test.tif');
grayImage=fundus(:,:,1);
% Display the original gray scale image.
subplot(3, 3, 1);
imshow(grayImage, []);
title('Original Grayscale Image');
binaryImage = grayImage > 35;
% Display the binary image.
subplot(3, 3, 2);
imshow(binaryImage, []);
title('Binary Image');
A=[0 0 0;1 1 1;0 0 0];
op=imopen(binaryImage,A);
subplot(3,3,3);
imshow(op);
title('open image');
clos=imopen(op,A);
subplot(3,3,4);
imshow(clos);
title('closeimage');
eror=imopen(clos,A);
subplot(3,3,5);
imshow(eror);
title('erodedimage');
please help me
0 个评论
采纳的回答
Image Analyst
2011-8-8
% Mask the image.
maskedRgbImage = bsxfun(@times, fundus, cast(eror,class(fundus)));
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Optics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!