How are bounding boxes defined in MATLAB?

I extracted bounding box positions from MATLAB's video labeller app. However, I can't seem to understand how the position is formatted. The initial bounding box position shows four numbers, while the rest show 8 numbers.
Clipboard01.jpg

댓글 수: 4

Walter Roberson
Walter Roberson 2019년 12월 16일
In each case, the second row looks to be the same as the first row of the group and so can be removed / ignored.
Thanks. I also wanted to know the format of the bounding box numbers. As per the documentation, the numbers are [x y width height] in pixels, what is x and y?
Walter Roberson
Walter Roberson 2019년 12월 31일
x and y are used in Cartesian coordinate sense. x is distance along the horizontal axes (left/right) starting from the lower left corner, and y is distance along the vertical (up/down) axes starting from the lower left corner. x corresponds to columns (not rows) and y corresponds to rows (not columns) so you need to reverse x and y if you want to index into an array.
Walter Roberson
Walter Roberson 2019년 12월 31일
Side note: imcrop has an off-by-one in what it crops. If for example you give it the bounding box 1 1 5 5 then instead including only YourMatrix(1:5,1:5,:) it extracts YourMatrix(1:6,1:6,:)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기

제품

릴리스

R2019b

질문:

2019년 12월 15일

댓글:

2019년 12월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by