Borrar filtros
Borrar filtros

How to set coordinates of bounding box?

10 visualizaciones (últimos 30 días)
Matlab Newbie
Matlab Newbie el 26 de Ag. de 2020
Respondida: Jalaj Gambhir el 29 de Sept. de 2020
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?

Respuestas (1)

Jalaj Gambhir
Jalaj Gambhir el 29 de Sept. de 2020
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!

Categorías

Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by