Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
morphological operation

Subject: morphological operation

From: CRIS

Date: 23 Jul, 2012 13:16:25

Message: 1 of 4

Hi ! what type of morphological operation can i used (if exists) to join all the pixels along a line in a image? I explain better: i have some pixel along a line (like a semicircle) but inside this line there are holes, so i want to eliminate these holes all in the way that the line becomes 'joined'
thanks.

Subject: morphological operation

From: Luca

Date: 23 Jul, 2012 14:00:28

Message: 2 of 4

"CRIS" wrote in message <jujir9$qc3$1@newscl01ah.mathworks.com>...
> Hi ! what type of morphological operation can i used (if exists) to join all the pixels along a line in a image? I explain better: i have some pixel along a line (like a semicircle) but inside this line there are holes, so i want to eliminate these holes all in the way that the line becomes 'joined'
> thanks.

You can use "closure". A dilation followed by an erosion.
matlab has them built in.
Probably it's not the best for a line, it's better for solids, but it should work, provided your holes are not too big.

Try doing:
doc imdilate
doc imerode
(and also "doc imclose", which is only an imdilate followed by an imerode in a single line of command)

Subject: morphological operation

From: ImageAnalyst

Date: 24 Jul, 2012 00:23:20

Message: 3 of 4

CRIS:
Like Luca said, you're probably looking for imclose. There is another type of thing called edge linking that doesn't round out the shapes like closing will do. See this if you're interested. http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/#edgelink
ImageAnalyst

Subject: morphological operation

From: CRIS

Date: 25 Jul, 2012 14:42:05

Message: 4 of 4

Thanks a lot!

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us