|
Re: Webcam RGB Calibration VI
That is a very useful VI. Just a few observations though.
When using a loop going through an array in LV, you don't really need to wire the size. If you remove the 320 and 240 it will still work, and now it will work for other image sizes.
The bottom logic for pinning between 0 and 255 can also be done with a few In Range and Coerce nodes. They are used in the loop on top to tell if the color is in range, and they have another terminal of the coerced value.
Finally, now that you have this working, you may want to try using HSL color space. For your app, it would just be converting the image before you extract the array, and renaming the comparison inputs and outputs.
The examples for vision all use HSL color math because it will give you much better results, especially when the lights cause shadows or glare.
Greg McKaskle
|