Flip VideoOutput left to right or upside down
-
Hello,
I am using my webcam in my project.
Camera { id: camera deviceId: //insert device id here captureMode: Camera.CaptureViewfinder } VideoOutput { id: viewfinder anchors.centerIn: parent height: root.height fillMode: VideoOutput.PreserveAspectFit source: camera }
I would like the video output to show the camera flow flipped horizontally, like seeing in a mirror. Is this possible? On another note, is it possible to flip vertically to show the camera flow upside down?
Thanks in advance.
-
Hello,
I am using my webcam in my project.
Camera { id: camera deviceId: //insert device id here captureMode: Camera.CaptureViewfinder } VideoOutput { id: viewfinder anchors.centerIn: parent height: root.height fillMode: VideoOutput.PreserveAspectFit source: camera }
I would like the video output to show the camera flow flipped horizontally, like seeing in a mirror. Is this possible? On another note, is it possible to flip vertically to show the camera flow upside down?
Thanks in advance.
The answer I came up with was this : put the
VideoOutput
object in anItem
and use thetransform
property to rotate it around the Y axis, which gives it the mirror effect I was looking for.Item { transform: Rotation { origin.x: width / 2 axis { x: 0; y: 1; z: 0 } angle: 180 } VideoOutput { id: viewfinder anchors.centerIn: parent height: parent.height fillMode: VideoOutput.PreserveAspectFit source: camera } }
-
-
The answer I came up with was this : put the
VideoOutput
object in anItem
and use thetransform
property to rotate it around the Y axis, which gives it the mirror effect I was looking for.Item { transform: Rotation { origin.x: width / 2 axis { x: 0; y: 1; z: 0 } angle: 180 } VideoOutput { id: viewfinder anchors.centerIn: parent height: parent.height fillMode: VideoOutput.PreserveAspectFit source: camera } }