From: snehal d on
I need code for dilation and erosion , i don't want to use function imdilate() and imerode() so plz send me both the codes...
From: ImageAnalyst on
On Apr 1, 2:05 pm, "snehal d" <shruti8...(a)gmail.com> wrote:
> I need code for dilation and erosion , i don't want to use function imdilate() and imerode() so plz send me both the codes...

---------------------------------------------------------------------------------------------------
Dilation is simply the local maximum, and erosion is simply the local
minimum. You can program this up yourself with the blockproc(),
min(), and max() functions.
Good luck.
From: snehal d on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <997a18e1-9083-48f8-b44a-72fb38fb6ff6(a)v20g2000yqv.googlegroups.com>...
> On Apr 1, 2:05 pm, "snehal d" <shruti8...(a)gmail.com> wrote:
> > I need code for dilation and erosion , i don't want to use function imdilate() and imerode() so plz send me both the codes...
>
> ---------------------------------------------------------------------------------------------------
> Dilation is simply the local maximum, and erosion is simply the local
> minimum. You can program this up yourself with the blockproc(),
> min(), and max() functions.
> Good luck.


What is this blockproc() function?
From: ImageAnalyst on
On Apr 4, 2:36 pm, "snehal d" <shruti8...(a)gmail.com> wrote:
> What is this blockproc() function?
---------------------------------------------------------
Did you look it up in the help? It might have a different name in old
versions, like blkproc or something like that. Basically it slides a
window along and processes what is inside the window. It's like
nlfilter() (which those of us who have the Image Processing Toolbox
can use), except that it's in base MATLAB so that unfortunate chaps
who don't have nlfilter can use it instead of nlfilter.

From: ImageAnalyst on
Anyway, if you don't have nlfilter or blockproc, just write it
yourself. The dumb, brute force method is just 4 nested for loops -
very trivial.