How to set coordinates of bounding box?
48 ビュー (過去 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 2020 年 9 月 29 日
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!