Change two color tracking vi from tracking pink AND green to orange OR grape balls

How do I change the tracking program given out on the first website from tracking the two colors together to just being able to track one color or the other color? We are trying to use the camera to track for balls, I’ve already changed the colors required, but I need to know how to make it track either color so it will fire the solenoid like I’ve wired it to. Basically I want to turn the camera into an all purpose ball detector. I chose purple and orange because all the balls contain at least one of these colors. I am doing this in labview, but I put it out here for all to see.

Look at the VisionDemo example in Wind River. It calls FindColor() instead of FindTwoColors().

There is also a LV example for finding a single color object. To update it to find a second color, you have two choices – prioritize one and do the second only if you don’t find the first, or search for them in parallel and take the biggest/best one you find. The first version will duplicate some of the code, put it in a case, and only execute it if you don’t find a good first target. The second approach will search for both, compare the results, and then decide on the outcome.

Greg McKaskle

Another thought is that you really don’t want to start from the two color tracker as it doesn’t search for one or two, it searches for one and two touching each other in a vertical orientation. Those aren’t a all the same thing.

Greg McKaskle

Where is that example? I couldn’t find it.

I think it is called Single Color Tracking for the one that does the servo, there is another single color.

The disk location for both is LV8.5/examples/FRC/vision/…

Greg McKaskle