From: saurabh pandey on
"kinor " <kinor.removethiswithdot(a)gmx.de> wrote in message <hgb63f$20c$1(a)fred.mathworks.com>...
> "Ironic Prata" <lixodoironic(a)hotmail.com> wrote in message <hg99es$1ou$1(a)fred.mathworks.com>...
> >
> > Is there a function that removes objects binary image based only on their pixel area?
> >
> > I want to maintain lines, so erode or close is out of the question. Planning on using region props and check each area region, but that seems slow and inefficient...
> >
> > Tks
>
> Hi,
>
> help bwmorph
> the option 'clean' is interesting if you want to remove single dots
>
> if you want to remove larger i.e. 2 pixels and smaller objects you could convolute with a box mask i.e. ones(3) and delete everything below 2 in the result.
>
> hth
> kinor

HOW CAN WE DO THIS?