How to set coordinates of bounding box?

15 次查看(过去 30 天)
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