View Single Post
  #23   Spotlight this post!  
Unread 30-01-2012, 20:44
loafdog loafdog is offline
Registered User
AKA: Maciej
FRC #2876 (DevilBotz)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2009
Location: Burlington, MA
Posts: 35
loafdog is an unknown quantity at this point
Re: New Vision sample program

Turns out someone had changed the low R param of the RGB filter (from 25 to 40) while switching between our green light filter and sample's red light filter. I changed it back to 25 and was able to run the sample code in our robot project and find targets. Once that worked we are guessing that the criteria lines add a filter that looks for particles that are in the size range 30,40 to 400,400.
Code:
cc.addCriteria(MeasurementType.IMAQ_MT_BOUNDING_RECT_WIDTH, 30, 400, false);
        cc.addCriteria(MeasurementType.IMAQ_MT_BOUNDING_RECT_HEIGHT, 40, 400, false);
These criteria do not crop an image. If that explanation of the bounding rect width/height is incorrect please let me know.
Reply With Quote