I have a very simple desktop application that streams image from a camera to a widget using QCamera + QCameraViewfinder. Not I need to mirror the image from the camera, and I can find no way of doing it. Any ideas are welcome.
I have a very simple desktop application that streams image from a camera to a widget using QCamera + QCameraViewfinder. Not I need to mirror the image from the camera, and I can find no way of doing it. Any ideas are welcome.
Do you get a QImage during this process? You can apply a QTransform to it that; QImage has in fact a QImage::mirrored() method to do exactly that.
I would look at the source code for QVideoWidget::paintEvent() to see what happens there. You may be able to derive a widget from QCameraViewFinder and rewrite the paintEvent() code to get the image and mirror it before passing it to the base class for painting.
After I replied, I did look into the source, and as you say, it is never as simple as you would hope it would be. The private bits often do prevent you from doing what should be easy.
Bookmarks