|
From: | Sivahari Nandakumar |
Subject: | Re: imdilate in octave shows error |
Date: | Thu, 29 Nov 2012 23:46:47 +0530 |
b=logical([1 1 1;1 1 1;1 1 1]);
--Sivahari
On 29 November 2012 08:25, preethi k <address@hidden> wrote:
hi all,
I am new to octave. Using imdilate function shows the following error.
error: imdilate: image and structuring element must have the same class
error: called from:
error: /usr/share/octave/packages/3.2/image-1.0.15/imdilate.m at line 36, col
umn 5
The program i executed is given below.
a=imread('/home/preethi/diplab/Images/morph1.bmp');
%c=gray2ind(a);
%d=gray2ind(a);
b=[1 1 1;1 1 1;1 1 1];
a1=imdilate(a,b);
a2=imerode(a,b);
imshow(a),title('original image');
figure,imshow(a1),title('Dilated image');
figure,imshow(a2),title('erode omage');
The class of a will depend on the file. You can find out by adding
whos a
after imread. It will be uint8 or something. When you know you can adjust b to match. Something like this
b=uint8([1 1 1 ; 1 1 1; 1 1 1]);
Please help me.
Begging makes no difference. I find the help given depends on the quality of the request. Clarity, amount of info given etc.
--
/* andy buckle */
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
[Prev in Thread] | Current Thread | [Next in Thread] |