Using bwlabel() with a structuring element

Hello I would like to try and use bwlabel() with a specific structuring element, is this possible?
se = strel('arbitrary',[1 1 1 1; 1 1 1 1; 1 1 1 1]);
Something like this one?
I'm making a detection algorithm and I am encountering a lot of false detection's, hopefully something like this se will reduce the number of false detections due to the fact that bwlabel() standard connectivity is of 8.
Can anyone suggest any other ideas.
Ive already used bwareaopen() imdialte() imerode()
I would also like to set bwlabel() to avoid labeling any connectivity of and anything below this matrix of 3x3 ones.
[1 1 1; 1 1 1; 1 1 1]
Is this possible?

1 Kommentar

Sean de Wolski
Sean de Wolski am 10 Dez. 2014
Can you show an image? It sounds like you might want to do some morphological operations on it first, before the labeling.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Image Analyst
Image Analyst am 10 Dez. 2014
Bearbeitet: Image Analyst am 10 Dez. 2014

0 Stimmen

That doesn't make sense. Labeling doesn't use a structuring element. The only choice you have is on the connectivity. You can choose 4 or 8. Perhaps you were thinking of changing the structuring element on some morphological operation instead of on the labeling operation.
You will get more blobs with 4 connectivity than with 8 since with 4 blobs that touch on a corner will be separate blobs with 4 connectivity but the same blob with 8 connectivity. It's best if you show an image if you want image processing advice.

4 Kommentare

Mauricio Ramirez
Mauricio Ramirez am 10 Dez. 2014
I want fewer blobs, so I guess my question is now. Can I have a connectivity that is higher than 8?
Can I set bwlabel to disregard any areas that are 3x3 or smaller?
Thanks for your reply.
Sean de Wolski
Sean de Wolski am 10 Dez. 2014
You can remove them first with bwareaopen or imopen. This is what I was hinting at, do the analysis first and THEN label the image rather than using labeling to do the analysis which it is not meant for.
Mauricio Ramirez
Mauricio Ramirez am 10 Dez. 2014
Please see the file attached, the lorry (truck) has been detected multiple times, this is what I am looking to fix.
Image Analyst
Image Analyst am 10 Dez. 2014
The computer vision toolbox has a car tracking capability. Try that. Otherwise it's such a major job that I can't really build an app for you, or even give advice since tracking / surveillance is not my specialty. Sorry.

Melden Sie sich an, um zu kommentieren.

Sean de Wolski
Sean de Wolski am 11 Dez. 2014

0 Stimmen

There are three or four different car tracking examples in there.

5 Kommentare

Image Analyst
Image Analyst am 11 Dez. 2014
Can they handle this challenging video? https://www.youtube.com/embed/UEIn8GJIg0E?rel=0
OMG, Wow - look out for the pedestrians.
Sean de Wolski
Sean de Wolski am 12 Dez. 2014
If I could save the youtube video, I'd give it a whirl (it's Friday in December after all!)
Image Analyst
Image Analyst am 12 Dez. 2014
Maybe try this file saving/conversion site: http://www.zamzar.com/
Sean de Wolski
Sean de Wolski am 12 Dez. 2014
Bearbeitet: Sean de Wolski am 12 Dez. 2014
It require a conversation with a group here who I do my best to not have to interact with.
:(
Mohammad Abouali
Mohammad Abouali am 12 Dez. 2014
Cool video.

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 10 Dez. 2014

Kommentiert:

am 12 Dez. 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by