Flipping USB cam?


Is there a way to flip usb cam stream through code? I did some research and couldn’t find how to do that. Read what some other people wrote a while ago. Are there any solutions right now?


You may find Switch between two cameras using joystick button (java) to be useful.


Thank you for your response. This’ll be a second way for me. But aren’t there any solutions that you know of with just one cam?


If you’re referring to flipping the orientation of the camera image, you might find this method useful: flip(Mat,Mat,int)
I don’t know exactly what the int is for, but I suspect it defines the direction of the flip. I’m sure you can figure it out by testing.


Sorry but couldn’t get how to convert usb cam to opencv core. I also don’t do anything with opencv. How can I do that conversion?


See the advanced camera server example. This example does a cvtColor, but you can make it do any OpenCV operation you want, including flip.


Sorry about that, I read this as flipping between streams. Peter’s example is pretty decent.


SMH, just flip the usb cord upside down and plug it in…
Jk, I wish I actually had the abilities to help. Best of Luck!


I did it by combining the example and command. Thanks for helping out!