Statistics for connected components

Statistics for connected components

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

4 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

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

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

Hi Marcus,
Just let you know, i have escalated your request to IPP developer team for reveiw. The reference ID: DPD200299602

Thanks
Ying

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui