Unplanned
Last Updated: 16 Nov 2023 15:13 by ADMIN
n/a
Created on: 14 May 2020 08:36
Category: WebCam
Type: Feature Request
5
RadWebCam: add preview orientation on win 10 tablet pc

Hello,

 

I am using the WebCam Control in WinForms (latest Version) and placed it on an empty form. Then I tested this "program" on a Test device (CAT T20 Win10 Tablet). The preview picture in the control does not match the orientation of the device. (depending on which side of the device is at top the visible picture is rotated 90/180 degrees).

For testing purposes I installed the WinForms Example application on the same tablet device with the same results.

How to sync the captured picture to the orientation of the device? In the WPF documentation of the WebCamControl I found a Videoflip method, which is not available in WinForms.

Best regards,

Stefan

 

 

3 comments
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 16 Nov 2023 15:13

Hi, Damien,

I am glad that you have found a suitable solution for your case.

Thank you for sharing the code snippet that achieves the desired result. Make sure that you cast your vote for the item in order to increase its priority.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Damien
Posted on: 09 Nov 2023 22:51

Hey Stefan,

Have you had a play with the roll settings of the camera? I recently received a prototype kiosk and the image from the front-facing camera was upside down, setting roll to 0 was the correct orientation (both up the right way and the right to left so that text was readable if I held something up to it), by default I think it was/is set to 3 for my camera.

I added the following code (thanks to the support team) after initialization and before I called Start...

 

            FieldInfo fi = typeof(RadWebCam).GetField("player", BindingFlags.Instance | BindingFlags.NonPublic);
            var player = fi.GetValue(this.radWebCam1);
            var mediaSettingsViewModel = player.GetType().GetMethod("GetCameraSettingsViewModel", BindingFlags.Instance | BindingFlags.Public).Invoke(player, new object[] { true });

            var camSettingsViewModel = (IEnumerable<object>)mediaSettingsViewModel.GetType().GetProperty("CameraViewModel", BindingFlags.Instance | BindingFlags.Public).GetValue(mediaSettingsViewModel, null);
            var rollSetting = (camSettingsViewModel.ToList()[6]); // Rool option 
            PropertyInfo pi = rollSetting.GetType().GetProperty("Value", BindingFlags.Instance | BindingFlags.Public);
            var val = pi.GetValue(rollSetting);
            pi.SetValue(rollSetting, 0); // from 0 to 3
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 14 May 2020 11:19

Hello, Stefan,

Currently, RadWebCam doesn't support video rotation. However, it seems to be a reasonable request: https://docs.microsoft.com/en-us/windows/win32/medfound/mf-mt-video-rotation 

I have logged it in our feedback portal by making this thread public on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

I have also updated your Telerik points.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.