How identify coordinates of more bounding boxes

2 views (last 30 days)
I used the autoBound function to draw bounding box with the below code (the result is in the attached image). How I can identify the (x, y) coordinates, height and width, for each yellow rectangle shown in the attached picture?
togglefig('Image', true)
Masca_Componente_El = imshow(createMaskBottom_PCB7(pcb));
%Label the components on the Bottom with help of Mask
Componente_El = imshow(pcb);
BBs = autoBound(Componente_El, @createMaskBottom_PCB7);
drawBoundingBoxes(BBs, 'BOTTOM', '7');
  3 Comments
DGM
DGM on 2 Jul 2021
To clarify, autoBound() doesn't appear to be part of any Matlab toolbox or FEX submission. If nobody knows what it is, nobody can tell you how to use it.
That said, I wouldn't be surprised if the object created by autoBound() had some sort of position property.
Brett Shoelson
Brett Shoelson on 3 Oct 2023
Edited: Brett Shoelson on 3 Oct 2023
Hi all,
I wrote the functionality you're referring to: togglefig, autoBound, drawBoundingBoxes, .... They're part of a large collection of utilities that I am working on sharing in the public domain. If you want to contact me directly, I will be happy to share them with you forthwith.
Best regards,
Brett @:
char(cumsum([98 17 -11 7 -10 7 7 -4 -47 45 -12 19 -12 15 -8 3 -7 8 -69 53 12 -2]))

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 2 Jul 2021
I imagine the (x,y) coordinates are contained in the BBs variable. What do you see in the command window if you take off the semicolon from this line?
BBs = autoBound(Componente_El, @createMaskBottom_PCB7)
It will report the value of BBs to the command window. What do you see immediately after executing that line?

Categories

Find more on Just for fun in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!