0

We're using WebEye.Controls.Wpf as a webcam controller, but since we have changed tablets to Asus transformers, image is upside down.

WPF:

        <wpf:WebCameraControl x:Name="webCameraControl" Margin="150,50,150,100" />

C#

    private void start_Click(object sender, RoutedEventArgs e)
    {
        if (fullOrderId == "")
        {
            MessageBox.Show("You need order id to take pictures", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            Close();
        }
        else
        {
            var cameraId = (WebCameraId)cams.SelectedItem;
            //RotateTransform rotateTransform = new RotateTransform(180);
            //webCameraControl.RenderTransform = rotateTransform;
            webCameraControl.StartCapture(cameraId);
        }
    }

As you can see, I've tried 180 degree rotation, but image was the same.

arti
  • 645
  • 1
  • 8
  • 27

1 Answers1

0

Seems like a problem with the asus driver, so contact asus support(FAQ-site about that problem: https://www.asus.com/us/support/faq/109836/).

Except that, you need to additionally specify a center point for the rotation either by

webCameraControl.RenderTransformOrigin.X = 0.5;
webCameraControl.RenderTransformOrigin.Y = 0.5;

or by creating your RotateTransform via

RotateTransform rotateTransform = new RotateTransform(180, 0.5, 0.5);

See How to do rotation around control's center in XAML

Community
  • 1
  • 1
lhildebrandt
  • 294
  • 1
  • 9
  • doesn't work. still upside down, even if it rotate by 90 degrees it's still upside down and vertical – arti Oct 06 '16 at 08:44
  • Have you tried to apply the rotation after starting your capture? – lhildebrandt Oct 06 '16 at 08:52
  • still the same. I don't really want to switch to different camera control, this one is easy and does what we need. – arti Oct 06 '16 at 09:10
  • I tried the controls demo project and it seems the control will not allow the image to be flipped as it is always fitted into the controls scope. What you can do is check your driver or contact the Asus support since there are endless google hits for wrongfully flipped camera images on Asus notebooks with different programs, even Skype. – lhildebrandt Oct 06 '16 at 09:14