FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Camera Rotation?

Solved!
Go to solution

On the FRC Dashboard, is it possible to rotate the camera image? I want to have the image rotated 90° counter clockwise because of the camera's sideways positioning, but without going to the Axis Camera Communications settings, but instead by doing it on the Dashboard Project itself. How would I do this via program on Labview, or is there an easier way?

0 Kudos
Message 1 of 5
(6,672 Views)
Solution
Accepted by topic author ElectroMancer

Doing this programatically in LabVIEW should be easy enough.  You should be able to use the IMAQ Rotate VI to accomplish this task.  The following link shows the help file for the VI explaining how it is used.

http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_rotate/

Use this VI in your Vision Processing loop.  The easiest way to find this VI in LabVIEW is to open LabVIEW and go to your block diagram, then press Ctrl+Space Bar to open the quick drop menu.  Once it opens, type IMAQ Rotate.  You can then either press Enter, or select your block diagram with your mouse to place this VI on the diagram.

Regards,

Shane C

Applications Engineer

National Instruments

0 Kudos
Message 2 of 5
(5,193 Views)

Another problem: The image on the dashboard flickers occasionally. The image reverts to the original rotation for a fraction of a second. Any way to fix this?

0 Kudos
Message 3 of 5
(5,193 Views)

HI ElectroMancer,

Where are you putting your IMAQ Rotate VI? Could you upload a screenshot so I can see what your code looks like?

Considering the default value is not rotated, if it is flickering, it is probably just switching back and forth between the default value and when it is set. We may just need to change when we are setting it.

Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(5,193 Views)

This is old, but I was seeing similar issues in the FRC dashboard when using IMAQ Rotate, where the image flickers between the original and rotated camera image.  Here is a image of the code (attached).  The custom subVI is only setting a few text and shape color overlays, so it shouldn't be causing the issue.  I'm not sure what the clear overlays does, but the name suggests it wouldn't be clearing the image rotation.  I am using a camera over NetworkTables. rotate-camera.PNG

0 Kudos
Message 5 of 5
(3,858 Views)