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
  1. apply a threshold of 35 to the red component of the image
  2. perform a opening on the thresholded image with a 3 X 3 square kernel.
  3. then perform a closing with the same kernl
  4. 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

采纳的回答

Image Analyst
Image Analyst 2011-8-8
% Mask the image.
maskedRgbImage = bsxfun(@times, fundus, cast(eror,class(fundus)));

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Agriculture 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by