ConfigurationAPI Resolution is not correct

We are getting resolution properly for most of the cameras, but for Panasonic we observed the resolution provided by configurationAPI call is 320x or 640x or 1920x etc.

How to get proper width and height?

Please find the below code for your reference.

VideoOS.Platform.ConfigurationItems.Camera tmpCam = new VideoOS.Platform.ConfigurationItems.Camera(fqid);

VideoOS.Platform.ConfigurationItems.StreamFolder streamFolder = tmpCam.StreamFolder;

foreach (var stream in streamFolder.Streams)

{

foreach (var streamChild in stream.StreamUsageChildItems)

{

String strStreamSel = streamChild.Name;

VideoOS.Platform.ConfigurationItems.DeviceDriverSettingsFolder ddsf = tmpCam.DeviceDriverSettingsFolder;

foreach (var childSetting in ddsf.DeviceDriverSettings)

{

foreach (var devStreamChild in childSetting.StreamChildItems)

{

if (devStreamChild.DisplayName.ToString() == strStreamSel)

{

for (int ig = 0; ig < devStreamChild.Properties.Keys.Count; ig++)

{

if (devStreamChild.Properties.Keys[ig].ToLower().CompareTo(“resolution”) == 0)

strResolution = devStreamChild.Properties.GetValue(devStreamChild.Properties.Keys[ig]);

}

}

}

}

}

}

The Configuration API is doing setup. Different cameras and camera drivers might be different. What you find with the Configuration API should always be the same as in the Management Client.

What is also important to understand is that even if the resolution was reported in the preferred format then resolution is something that can be changed dynamically using rules and similar.

The only reliable way to know the resolution of an image is to test it. The Camera Stream Resolution sample shows a way to retrieve an image and then see the resolution.