How to find bouding boxes of objects ?
1 view (last 30 days)
Show older comments
I'm working on a video synopsis project and i have trouble finding the bouding boxes of detected objects. I want to find which bouding boxes correspond to which object
Let's say i have three objects detected in the current frame so i have a bouding box matrix with three lines, which line corresponds to which object ?
0 Comments
Answers (1)
Image Analyst
on 9 Jul 2020
Not sure why a bounding box has 3 lines instead of 4, but anyway...
The boxes are assigned in a top down, left-to-right manner. So whatever blob has the left-most pixel will be box #1. From the remaining blobs, whichever one has the next left-most pixel will be box #2, and so on across the image. If you want to do tracking you will have to keep track of which blob has which box because if the blobs change location, the box number for that blob will also change index number. If you don't want that, you'll have to figure out what the right (original) box number for that blob was and then renumber the boxes.
3 Comments
Image Analyst
on 10 Jul 2020
A box has 4 lines - one on each side (top, left, bottom, right). If there are 3 objects, then each object will have it's own 4-sided bounding box, so you'll have 3 4-sided boxes.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!