View Single Post
  #6   Spotlight this post!  
Unread 06-02-2014, 18:37
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Vision sample code

Have you done anything to calibrate the thresholds to your lighting and camera? It sounds like you aren't ending up with any blobs after the threshold and size filter.

To find out you can try commenting out the while loop and un-commenting the lines that write the image to a bmp. Then ftp to the cRIO and grab the image from the threshold step to see if your target is there in red.

If not you will need to tweak the values of the threshold. The Calibration section describes one way using NI Vision Assistant: http://wpilib.screenstepslive.com/s/...61-calibration

Another option is to take a snapshot as described at the beginning of that document, then use your favorite image editing program to grab the HSL value of some arbitrary pixels of the target and then just try some ranges around that (+/-10, +/-20, +/-50) and look at the image you get each time.
Reply With Quote