Reading Camera in Labview

I am having trouble getting my USB camera to read though the LabVIEW code when plugging it in to my robot? Are there any solutions to this and any help is appreciated.

This should be one of those things that just works!

Do you have all of the new software? Is this a new project from this year?

Do you see a light on the camera?

Have you deployed any code?

Can you take a screenshot of the diagnostics tab in your driver station with things connected?

Also, a screen shot of vision.vi, there are a few options in there.


At this point I can not connect to my robot because I am away from school, but here is my vision.vi block diagram.

What model camera are you using?

How is your Driver Station connected to the roboRIO?
USB, WiFi or Ethernet through the radio, or direct Ethernet to RIO?

I am using a Microsoft LIfeCam HD-3000 and I am connecting to the roboRIO with an ethernet to the RIO. And if this is helpful to know is I am using the Labview vision example and just importing that into my robot code because I am not knowledgeable about vision coding and this is the first year we are trying to utilize vision.

The default LabVIEW project is already setup to display the camera on your default Dashboard.
I suspect your addition of he example code has caused conflicts.

Try creating a new project without any modifications, then plug in the Lifcam, connect the Driver Station, and see if you get a camera listed under the Dashboard pull down.

I can get it to display on my dashboard without a problem, but the camera fades to a white screen and I do not now how to fix it and when I open the default code in the vision.vi I do not get any visuals, is there a way to fix this problem?

The settings (VI’s) at the beginning for White Balance, Exposure, and or Brightness will affect the image.

There is a setting on Robot Main front panel that is hooked up to the Enable Vision global variable. Set that to true (the button should show a lit green light) to see the image in Vision Processing (or replace that variable with a true const).

1 Like

1 step at a time. Make sure you only have 1 USB camera plugged in. Go back to the unmodified 2019 Vision Example and deploy that using the run arrow from Vision Example Robot Main.vi. If you did modify the example, reinstall the LabVIEW FRC Update first. Once it is deployed, open the Vision Processing subVI and make sure to click the Display Original and Display Mask buttons (I suspect FIRST has these off by default because displaying the images is extra processing that doesn’t need to be done when the code is run as startup on the roboRIO). Do you get a video feed?

If yes, you can go back to your regular robot project and deploy it with the run arrow. Make sure the Enable Vision button is True on Robot Main.vi. In the Vision Processing VI, probe the Enable Vision wire indicated below. If this is False, it is very likely that when you merged the Vision project with your regular robot project you have 2 Robot Global Data VIs that both have Enable Vision variables (or something along those lines).

1 Like

Johnathan_L when i go the unmodified Vision processing. vi and enable the display original and dispaly mask buttons, I do not get any vision code.

Luke, let’s start over. If you plug in your USB plug to the roboRio, then deploy an UNCHANGED robot project to the roborio, you should be able to go to your dashboard and select a camera from the camera dropdown. This assumes you’ve turned on the “Vision” Button on your Robot Main.VI before you ran the code.

Can you confirm that you have done these things and that you see the camera on the dashboard and that you have the video feed working on the dashboard?

I have done things and I do get feed from the camera.

Look at the driver station. Are you getting any error messages? Do some probing in the Vision processing VI. What is the output of the Get Image VI specifically? Do this with the 2019 Vision Processing Example.

I am closing this thread and opening a new one, because I was not very clear in what I was trying to ask.