36 auto frame_coordinates = frame->getCoordinateSystem();
38 auto detection_frame_coordinates = group.
begin()->getProperty<
DetectionFrame>().getFrame()->getCoordinateSystem();
40 double x = detection_group_stamp.getTopLeft().m_x + detection_group_stamp.getStamp().getWidth() / 2.0;
41 double y = detection_group_stamp.getTopLeft().m_y + detection_group_stamp.getStamp().getHeight() / 2.0;
43 auto frame_origin = frame_coordinates->worldToImage(detection_frame_coordinates->imageToWorld(
ImageCoordinate(
x,
y)));
44 auto frame_dx = frame_coordinates->worldToImage(
46 auto frame_dy = frame_coordinates->worldToImage(
50 frame_dx.m_x - frame_origin.m_x, frame_dx.m_y - frame_origin.m_y,
51 frame_dy.m_x - frame_origin.m_x, frame_dy.m_y - frame_origin.m_y);
56 auto frame_coordinates = frame->getCoordinateSystem();
60 double x = detection_boundaries.getMin().m_x + detection_boundaries.getWidth() / 2.0;
61 double y = detection_boundaries.getMin().m_y + detection_boundaries.getHeight() / 2.0;
63 auto frame_origin = frame_coordinates->worldToImage(detection_frame_coordinates->imageToWorld(
ImageCoordinate(
x,
y)));
64 auto frame_dx = frame_coordinates->worldToImage(
66 auto frame_dy = frame_coordinates->worldToImage(
70 frame_dx.m_x - frame_origin.m_x, frame_dx.m_y - frame_origin.m_y,
71 frame_dy.m_x - frame_origin.m_x, frame_dy.m_y - frame_origin.m_y);