Flipping USB cam?


#1

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?


#2

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


#3

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?


#4

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.


#5

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?


#6

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


#7

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


#8

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!


#9

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