Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Statistics for connected components

Marcus_Hennecke
Beginner
541 Views

Hello,

I continue to be suprised at the speed with which the IPPI library performs. Whenever I do something with my own code it looks so slow in comparison.

This is also the case with connected components. I am using the labelmarkers function to great effect to find connected components after binarization. Now I would like to collect statistics on the connected components: Bounding boxes and the number of pixels belonging to the connected components.

At the moment I am simply allocating a vector of num_labels length and then going over the image once to fill in the statistics. However, this takes about half as long as the connected components analysis itself!

As this is in a very time critical path of the application I am looking for ways to accelerate this. Doesn't the connected components analysis already collect these statistics? Is there a way to use the information the labelmarkers function collects in the buffer I pass to it? Or are there better ways to find min/max coordinates (bounding box) and the number of pixels?

Thanks in advance for your help!

Marcus

0 Kudos
5 Replies
Ying_H_Intel
Employee
541 Views
Hi Marcus, Not sure if the issue is repeated. Sorry, no exact IPP function so far or if you'd like i can submit it as feature request so IPP developer team may consider it in further product plan. The labelmarker function produce marker image, then in most of case, they was fed into segement function as input ( please see pinic sample :segement.cpp) . The IPP computer vision functions was aligned to OpenCV functionality. maybe you may find some from OpenCV implementation? Best Regards, Ying
0 Kudos
Marcus_Hennecke
Beginner
541 Views
Hi Ying, thank you very much for your reply. Yes, you are correct, this post seems to have come up a second time even though I had posted it only once almost a month ago. It would be great to have an IPP native implementation that could make use of the data structures already set up by the labelmarkers function. Of course, one can compute all kinds of statistics on the connected components, but the bounding boxes and the number of pixels are almost certainly useful. Best regards, Marcus
0 Kudos
Ying_H_Intel
Employee
541 Views
Hi Marcus, Just let you know, i have escalated your request to IPP developer team for reveiw. The reference ID: DPD200299602 Thanks Ying
0 Kudos
Ying_H_Intel
Employee
541 Views

Hi Marcus,

Not sure if you are still interested in the feature.  As this is only request we collect since you submit,  IPP  developer decide not to implement the feature.  I'm sorry for the news.  If you really need the feature,  you may take the OpenCV source code, where you may add the statistical information manually.

Best Regards,

Ying

0 Kudos
Marcus_Hennecke
Beginner
541 Views

Hi Ying,

thanks for your reply. I saw the new IPP 9.0 Library and noticed that no such feature was implemented. It is ok though, I have written my own code to do the connected component statistics. It is actually a lot faster than using labelmarker and then computing the statistics on top of that.

Best regards,

Marcus

0 Kudos
Reply