In SmartClient version 2023, if you set Overlay using Shape, the position is wrong.
This code worked fine before SmartClient2022 version.
- ShapesOverlayAdd(…)
- ShapesOverlayUpdate(…)
After debugging, I found that the value of ImageSize, an internal member of ImageViewerAddon, was incorrect.
Originally, this value should be the same as the resolution of the camera, but in SmartClient2023, a completely different value was stored.
Perhaps this problem is causing the Overlay display coordinates to be wrong.
Please check. thank you
I tested by using a small modification to the AnalyticsOverlay plugin sample so that I could log the value.
In my test there no difference between the 2022 versions and the 2023 version of Smart Client, and I get the resolution of the images from the camera as expected.
Please double-check how you get the value and compare it to the value setup for the camera stream in the Management Client, be careful if you have multiple streams.
If you still get the same: Do you get a wrong value for every camera? What do you get?
Might be useful: I modified the sample in this way ( BackgroundOverlayPlugin.cs , line 393 )
string txt = "ImageSize " + addOn.ImageSize.ToString();
shapes.Add(CreateTextShape(addOn.PaintSize, txt, s * 50 / _sampleRateOfOverlay, s * 50 / _sampleRateOfOverlay, 30, Colors.Red));
https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/analyticsoverlay/readme.html&tree=tree_1.html
https://github.com/milestonesys