one question about trt-yolo-app source code?

in the trt-yolo-app source code, function “decodeTensor” return binfo as std::vector type, but

std::vector curBInfo = decodeTensor(imageIdx, imageH, imageW, tensor);

there is BBoxInfo type, how it can be transformed from NvDsInferParseObjectInfo to BBoxInfo??

and NvDsInferParseObjectInfo has elements left,top,width,height, but BBoxInfo has element “BBox box”, which it defined as below:
struct BBox
{
float x1, y1, x2, y2;
};

it means two points (x1,y1),(x2,y2), how can be (left,top,width,height) equals to (x1,y1),(x2,y2)??

please help, i can’t understand about it.

Hi,

The bounding box is a rectangular box that can be determined by (x2,y2) coordinates in the upper corner and (x1,y1) coordinates in the lower corner of the rectangle.
Please refer to below link for more info related to bounding box:
https://pythonhosted.org/planar/bbox.html

Thanks