View Single Post
  #2   Spotlight this post!  
Unread 23-01-2009, 07:04
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote