Effacer les filtres
Effacer les filtres

multiplying images with diffent dimension

1 vue (au cours des 30 derniers jours)
ramya raj
ramya raj le 8 Août 2011
[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

Réponse acceptée

Image Analyst
Image Analyst le 8 Août 2011
% Mask the image.
maskedRgbImage = bsxfun(@times, fundus, cast(eror,class(fundus)));
  1 commentaire
ramya raj
ramya raj le 9 Août 2011
very very thanks sir

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Agriculture dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by