Integration of overlay (bounding boxes) in milestone

We are trying to place bounding boxes to plate reading events from a Hikvision camera and the camera and manufacturer’s forums give me the following information.

6656

47361

12544

7424

https://tpp.hikvision.com/wiki/isapi/anpr/GUID-328FC5AD-38EA-4409-9E75-996279BF2A46.html

 <!--dependent, the normalized value is the current image size in percentage multiplying 1000 and it is accurate to three decimal places. This node is valid only when <type> is "detectionPicture"-->

 <X>

  <!--required, xs:integer, X-coordinate of the upper-left corner of the boundary frame-->

 </X>

 <Y>

  <!--required, xs:integer, Y-coordinate of the upper-left corner of the boundary frame-->

 </Y>

 <width>

  <!--required, xs:integer, width of the boundary frame-->

 </width>

 <height>

  <!--required, xs:integer, height of the boundary frame-->

 </height>

</plateRect>

but, passing this data to milestone does not place the bounding box in the correct position, so I need help interpreting this data and how to pass it to milestone.

If you have to do a 0 to 1 or other conversions, since the ones we have tried are not accurate.

There is a sample that submits bounding box data, I suspect it will give you the best answer on how this works.

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/boundingboxmetadataprovider/readme.html&tree=tree_2.html

https://github.com/milestonesys

For inspiration, I did a similar conversion based on bounding box metadata returned from Amazon Rekognition:

private static Rectangle NewBoundingBox(BoundingBox bb, DisplayColor lineColor)
{
    float top, left;
 
    return new Rectangle()
    {
        // Define the ONVIF rectangle (with 0,0 in the center and 1 to each edge)
        // using the AWS bounding box values that are percentages so scale them accordingly
        // with 0,0 in the upper-left corner of the rectangle to draw
        Top = top = 1 - 2 * bb.Top,
        Bottom = top - 2 * bb.Height,
        Left = left = -1 + 2 * bb.Left,
        Right = left + 2 * bb.Width,
        LineColor = lineColor,
        LineDisplayPixelThickness = 3
    };
}

The BoundingBox is a https://docs.aws.amazon.com/rekognition/latest/APIReference/API_BoundingBox.html

The Rectangle is a https://doc.developer.milestonesys.com/html/index.html?search=videoos.platform.metadata.rectangle