Effacer les filtres
Effacer les filtres

creating bounding box for pair of objects which are separated by a distance?

4 vues (au cours des 30 derniers jours)
srikanth
srikanth le 11 Sep 2012
Hi, I am doing a project on nighttime vehicle detection. I have extracted vehicle light components by performing segmentation. I have created bounding boxes for individual light components of vehicles. I have extracted the probable pair of lights for pairing vehicle light components which may belong to same vehicle. But, i couldn't able to create bounding boxes for these pairs i have extracted. Please, can you help me?
Thank you.

Réponses (1)

Image Analyst
Image Analyst le 11 Sep 2012
You can use any(binaryImage, 1 or 2) to find which rows and columns contain "set" pixels - the "true" pixels in your segmented binary image. Then use find(vec, 1, 'first' or 'last') on the vector that any() returns to find out the actual first and last row and column (i.e. the bounding box). Then use imcrop() to crop it out into a separate image.

Catégories

En savoir plus sur Tracking and Motion Estimation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by