How to set coordinates of bounding box?

조회 수: 11 (최근 30일)
Matlab Newbie
Matlab Newbie 2020년 8월 26일
답변: Jalaj Gambhir 2020년 9월 29일
Hi, How to read and create coordinates of bounding box?
For example, let's say i have an image of a face. How do i create bounding box at cheek region?
i have a partial code:
% if assume the eye distance to mouth is in multpiles of 3. meaning 30% distance
x_delta = bboxeye(1,3)
y_delta = (bboxmouth(1,2)- bboxeye(1,2)+ bboxeye(1,4))
y_cord = bboxeye(1,2)+ bboxeye(1,4)
x_cord = bboxeye(1,1)
new_crop = [x_cord, y_cord, x_delta, y_delta]
what is the meaning of these values? bboxeye(1,3) what is this indicating? How the values are being decided?

답변 (1개)

Jalaj Gambhir
Jalaj Gambhir 2020년 9월 29일
Hi,
A bounding box in MATLAB consists of a 1x4 row vector with the following notation [xmin, ymin, width, height]. In the code snippet that you have mentioned, bboxeye(1,3) ie, x_delta seems to be the width of the bounding box representing the eye. Similarly, bboxmouth(1,3) seems to be the width of the bounding box representing the mouth. In the notation, I mentioned above, xmin, ymin represents the coordinates of the lower left corner of a bounding box.
For more details visit here.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by