help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: imdilate in octave shows error


From: Carnë Draug
Subject: Re: imdilate in octave shows error
Date: Thu, 29 Nov 2012 09:31:57 +0100

On 29 November 2012 09:25, preethi k <address@hidden> wrote:
> 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 error means that the image and the structuring element need to be
of the same class.

> 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);

Run the following in your "class (a)" and "class(b)" and you will see
that they are different.

Carnë


reply via email to

[Prev in Thread] Current Thread [Next in Thread]