Log in

View Full Version : Camera Image on Driver Station/Dashboard


helenajoy
22-02-2010, 18:23
So, our build team decided to mount the camera upside-down. And are leaving it up the programmers to fix this problem. Our driver station is (obviously) returning to us an upside-down camera image. Is there any way to flip/invert the camera image in our code?

Thanks!

EHaskins
22-02-2010, 19:32
In Java, C++ should be very similar:


AxisCamera camera = AxisCamera.getInstance();
camera.writeRotation(AxisCamera.RotationT.k180); //or k0.

helenajoy
22-02-2010, 21:49
Hm, would you by any chance know how to code that in LabView? That is what we are working in.

reversed_rocker
22-02-2010, 22:05
for some reason changing camera settings in the code never seems to work right. my suggestion is to connect the camera to a computer with a crossover cable, go into a web browser, type in its IP address (ours is 192.168.0.90, i believe yours is supposed to be the same) password should be root and then admin (if this is your programming laptop, make sure to change your ip address so that it starts with 192.168.0.x instead of 10.x.x.x) through the web browser you can access the video settings and flip the image 180 degrees

Greg McKaskle
23-02-2010, 07:53
If you open Begin.vi, it already sets about six camera parameters. I don't actually see a Set Property VI for setting the camera rotation, though. It would be pretty easy to build.

Do you want this for processing on the robot, or for display on the dashboard. I'd suggest leaving it alone on the robot and simply flipping the resulting X,Y. Then rotate it on the dashboard. This will consume less cRIO CPU.

Greg McKaskle

helenajoy
24-02-2010, 03:12
We woulkd like to have it for the dashboard.

Where can I chane the x and y, and how do I flip this image?

Greg McKaskle
24-02-2010, 08:18
To rotate or modify it for the dashboard, use the IMAQ functions in Vision>>Vision Utilities>>Image Manipulation, and either the IMAQ Symmetry to mirror and flip, or the IMAQ Rotate to spin.

Greg McKaskle

KyleWishnok
24-02-2010, 09:45
if you loosen the screw on the post of the camera you can just put it right side up with the mount on the top opposed to reprograming it

helenajoy
15-04-2010, 08:05
I found those VIs. Where in my code would it be best to place it?

kamocat
15-04-2010, 10:21
You want to place it in your Dashboard, after the "get image on PC" vi.