Hi,
Unfortunately, we are not using wpf.
Our purpose is to use video stream from dome camera to control PTZ camera. For example, parking lot has 5 dome and one PTZ camera, and in camera 2 person is detected. System directs PTZ camera in that direction and applies calculated level of zoom for closeup recording.
Math behind this scenario is following: video analytics over camera 2 video stream will output “person detected on 200x200 pixels”.
If camera 2 is embedded in Smart Client 2x2 view on 1920*1080 screen, we can say that it’s video is displayed on 960x540 pixels. This is not true, but error here is not relevant to this topic. This means that camera 2 field of view is mapped on a 960x540 resolution. When a person is detected in location 200x200 this location is relevant to 960x540 resolution and with this data we are starting our math and rest if working fine.
But, if scaling 125% is applied, screen resolution is changed to 1536x864 pixels. This means that video from camera 2 is now displayed on 768x432 pixels. Camera 2 field of view is displayed on 768x432 pixels resolution. Here is the problem, Smart Client is still saying that resolution is 1920x1080 when 125% scaling is applied, and we can not get the scaling variable from Smart Client.
We have found a solution and that is to ask the user to type in the scaling, but we are not happy about it.
Why the scaling is important?
We are using video camera as visual sensor. Video camera has a field of view that is mapped on some sensor and that is a screen. Person in camera field of view is detected as a person on screen. Its location in camera field of view corresponds with it’s location on a screen. When resolution is changed, field of view to screen resolution is changed also. Changing the resolution by changing the scaling is not a problem, but problem is us not knowing about it. Our math has to be adjusted accordingly.
I think that knowing scaling parameter is important to developer, not just because we are using it, but for a future purpose. Here is one example, Axis Object Analytics sends metadata info that person is detected on 200x200 pixels in 1920x1080 video resolution. If the same video is displayed in Smart Client in single camera view and screen has scaling of 125%, placing a bounding box in location 200x200 is wrong. Bounding box must be placed at location 160x160. Because Smart Client screen resolution is not 1920x1080 it is 1536x864. So, when displaying results from EDGE analytics screen scaling must be taken into account.
Best Regards,
Hrvoje