Quote:
|
I'm not thrilled with the program's ability to track the colors, particularly the green color, but ...
|
First off, great job getting it integrated. It looks awesome. You probably know this already, but if you disconnect or make the update of the image display optional, your code and camera will run quite a bit faster. That was what the example was doing.
The green color of that fabric is indeed less predictable than the pink, which is why the pink is the primary color by default. For debugging, you may find it useful to switch the first color to green to see the entire green mask. Then tilt the target towards and away of the camera to see if the issue is with the green getting to bright, too dark, or something else. Usually it is either a bright streak or a dark streak.
Once you know how to make it fail, and while it is still running, open up the Find VI, click on the HSL debug switch, and now you can hover the mouse over the green portion of the image to see what the pixel values are in HSL. This will give you an idea of how the different orientations differ, and how much you'll need to lower the saturation or brightness on green to get it covered. You may also decide that you don't want to change it if it is due to tilt which you don't expect in a game.
The debug HSL button is not something I'd leave on for real usage, by the way. It works identically, but slower because of the display, and because of the explicit HSL conversion of every pixel. For normal operation turn the switch off, the threshold will still be done in HSL, but only enough math to perform the threshold.
Greg McKaskle