Clear Filters
Clear Filters

multiplying images with diffent dimension

1 view (last 30 days)
[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

Accepted Answer

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

More Answers (0)

Categories

Find more on Agriculture in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!