Camera Vision and Dashboard at the same time

We are having some issues with our webcam on the robot. It works properly on the dashboard and shows everything, but when we try to use the camera image to use some vision detecting at the same time the dashboard is black, sometimes we see a flickering of a frame when we put our mouse over it.

We had the suspicion that we have too much processing going on behind the scenes, so we tried to lower the frame rate, but this does not seem to be the issue.

Is it in general possible to split the camera image and send it to the Vision VI AND to the Dashboard to see whats going on?

Here is an image of the combination of both.

Untitled.png


Untitled.png

The best indication that your processing is expensive would be to look at the CPU usage of the roboRIO on the DS chart. It is the center button on the right side, red plot.

The image you attached shows the same image being sent to what I assume is a processing function and to an image display. If the processing functions do not wire in a destination image, the input is reused, and this can affect the display. It often shows up as a flicker of good images and images that have been thresholded with at mostly black color palette.

Note that this is only the case with the Image datatype in LabVIEW. All other types that are displayed are treated as by-value types. The control would happen before or would copy the data. But because images are so large, and the vision API was developed in the early 90’s, it is a by-reference type.

One easy thing you can try is to right-click on the image display control and set it to Snapshot. This will store the data when written instead of reading it while the processing is underway.

Greg McKaskle

Ok, after changing it to snapshot the dashboard camera works fine. We just found out that there is another error with our vision VI. Somehow it returns this error





If you get an error, you can generally right click on it and choose the command “Explain Error …”. If it isn’t there, the Help menu at the top of the window always has it, but you will then need to type in the error number.

Doing it for the IMAQ error you posted, I get

IMAQ Vision: The image is not large enough for the operation.

The error is being produced by the function named IMAQ User Lookup.

So my suggestion would be to look more closely at this function call and the inputs to it. It expects the input and destination to be grayscale images.

Greg McKaskle

Thanks, everything works now. Turned out to be an error in my vision script. The the path of reference file for shape match was not up to date. Fixed now.