ni vision assistant help!

hi, this is my first time programming the camera and i’m having some trouble using the ni vision assistant.
I’m trying to locate the rectangle in the basket by converting the image to grayscale and then to binary but i wasn’t able to make the program locate the rectangle. i’ve already read the white paper and other tutorials but i couldn’t find anything that helped me.

thanks from team #1156

If you use the example vision code, everything is taken care of, and is much more accurate than any code that our team has ever drafted up…

thank you, the example is realy useful i’ve already adapted it to our robot code and it’s working as it should. But i’ve been trying to use the distance and coordinates that it gives me and i couldnt find a way to separate the informations from the array.
also, is there any way to use select the color i want without opening the code and using the pointing tool?

Use the Index Array function from the Array function palette. You can choose which of the elements of the array to pull out as a single cluster of values. Then to get the individual values from the cluster you use a function from the Cluster, Class, & Variant palette: Unbundle by Name.

thank you!
i managed to aquire the coordinates and distances, but i still couldn’t make the program find the color of the tapes without selecting it, is there a way to place it on the dashboard or something like that?

Run the code so you can see the vi’s front panel. Select the color you want to seek. Then you can stop the code and use the right-click menu on each of the six numeric color range values and choose Data Operations>Make Current Value Default (I’m typing this from memory and might not have gotten the names quite right). That makes the change stick for the next time you run or build the code.