multiplying images with diffent dimension

1 回表示 (過去 30 日間)
ramya raj
ramya raj 2011 年 8 月 8 日
[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)));
  1 件のコメント
ramya raj
ramya raj 2011 年 8 月 9 日
very very thanks sir

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOptics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by