PDA

View Full Version : QCamera images flipped on Windows platform



jas67
21st March 2013, 13:48
I am trying to make a desktop application that uses a USB web camera. I used the example camera program from /examples/multimediawidgets/camera as an example of how to do my application.

I have it working fine and all, until I build an run on Windows, then the image is flipped (mirrored). The example camera application behaves the same.

It works properly on Mac OS X, and Linux. It is only flipped on windows?

Any ideas how to remedy this? I can't find any settings in QCamera, or QCameraViewFinder for flipping the image.

Thanks in advance!
Jay

d_stranz
21st March 2013, 16:19
Mirrored? You mean if you held up a sign with lettering on it and took a photo, the text would be backward in a mirror image? Or do you mean the image is upside down? This might be a "feature" of your camera driver. What happens if you use some other program (other than Qt-based) to capture a camera image, like maybe GIMP?

jas67
21st March 2013, 17:46
Yes, mirrored as in as if I'm looking at it through a mirror.

I've used VLC to capture video from the camera and it displays a proper non-mirrored image. VLC is also using directshow, as is Qt5 (I think).

d_stranz
21st March 2013, 21:54
Weird. Well, if this consistently happens, you can put in a conditionally compiled block for Windows that creates a mirrored QImage from the captured one (QImage::mirrored()), but obviously this is a less than optimal solution.

jas67
22nd March 2013, 12:21
Weird. Well, if this consistently happens, you can put in a conditionally compiled block for Windows that creates a mirrored QImage from the captured one (QImage::mirrored()), but obviously this is a less than optimal solution.

That would only work for captured images, but not for using the view finder to set up the shot.