Crio Vision Processing

I am having an issue with my vision programming…

I created an algorithm in the vision assistant which I manually transferred to the vision processing loop. I have in included it below…

I am running into a problem in just the first step (running the original image through an HSL Threshold filter). Displaying just the original image is fine, but when I try and run the filter and display the image, it freaks out. The output indicator will be black for a few seconds and then return an unmodified original image for a moment and then return to black and repeat.

Has anyone seen this before? Is it because the CRIO is running too slow?

Vision (50.8 KB)

Vision (50.8 KB)

Vision data wires work a bit differently from others. The data passed around is an image reference, not the actual pixels. Notice that you have only one image, and the HSL threshold doesn’t have a destination image to put the results into. That means that the source image will be overwritten. The image displays, unlike most other wired displays, will display the value sometime after the data is written to them, but they aren’t very synchronized. You can make this far better by right clicking on the display and choosing the Snapshot option. This will make an image copy when the value is written, allowing for internal copies that are specific to the display. The other approach is to almost always wire up the distention, the way the example code does it. Then you can probe the one you want.

As for the performance, keep in mind that having the panel open and having displays has a pretty big cost for IMAQ. The cRIO has to compress the images and send them to the PC for display. A nice feature, but there is no way to do this without a pretty big hit on the CPU.

Greg McKaksle

I also found that I had to change the front-panel display from Gray-scale to Binary for everything other than the original image

Yes. Anytime you are viewing a binary image, probing panels, you should right click and change the palette to binary. The default value placed into the mask is 0 and 1. On a grayscale, the black and very dark gray doesn’t show up at all. Binary has bright colors for each of the lower mask values.

Greg McKaskle