Following the directions provided, I replaced the standard Vision Processing VI in the 2012 Robot Project with the Rectangular Target Processing code. Everything is working well, except for the “color” filter. The two intensity filters work, but when I select the color filter, I get only a white box in the processed image window. In addition, the error “-1074396080” appears every few seconds, coinciding with massive lag. The setup I am running is a laptop (running updated Labview), classmate, crio, and axis 206 camera all plugged into a bridge. The only thing I can find out about the error code is that it is an IMAQ error. Please help, I have no idea what to do. The only clue I have is a post similar to minefrom 2009, but there is only one response and I cannot understand the instructions.
If you want to look up an error code, you can go to the help menu>>Explain Error and type it in.
The error simply says that the image is of the wrong type. IMAQ uses type to describe things like color, monochrome, or black and white.
I haven’t seen this error, so I can’t do much more than speculate what is going on. My guess is that when you flip to the color processing, your camera is not being changed to color – the enable color property gets swapped. Or it gets flipped back and forth due to a logic change. Or perhaps it gets flipped, but the camera still has a few frames in the queue.
If this stabilizes and only happens when you first flip the tab, I guess you can go with the 3rd explanation and possibly rip out the stuff you aren’t using. Otherwise, can you probe to see what type of image is coming out of the Camera Get function, and see if that explains it?
Greg McKaskle
I will get rid of the extra code for the other 2 filtering modes tonight and see if that works. Thanks for your help!
I tried removing the vestigial code, but to no avail. Image coming in is black and white (not sure if it’s supposed to be like that?), and there is also a “mask” going into the targeting VI as well. The image comes out blank. I can’t tell where it goes wrong.
I’ve attached a picture of the vision processing VI. The VI with the red box around it is where something is going wrong.
In the attached code, it looks like the Color Enable is being set to FALSE each loop iteration. That requests that the camera return a monochrome image, and the JPEG decoder will return a monochrome 8 bit image. That starts the error chain because the color threshold requires a color image.
Change the enable constant to True and see if that helps.
Greg McKaskle
It worked! Now I just have to work on the tracking part. In other news, our code appears to be “disconnecting” every few seconds. I wouldn’t have noticed this at all, but I saw that the “Robot Code” light on the dashboard flashes red every few seconds. Is this because the vision VI is taking up to much CPU power? There are no unusual error codes.
The charts tab on the DS will give you the CPU usage. It is very easy for vision to use up whatever CPU you have, so it is certainly possible. You can try to change the frame rate of the camera in Begin.
Greg McKaskle
Thank you again, your help turned a painful night into a productive one.