View Single Post
  #1   Spotlight this post!  
Unread 10-10-2012, 17:04
Stonemotmot Stonemotmot is offline
Registered User
FRC #0486
 
Join Date: Sep 2011
Location: United States, Pa
Posts: 53
Stonemotmot is an unknown quantity at this point
Using thresholds on WPICameraExtension classes

Hello, This year my team is looking into utilizing camera tracking more than last year. We are using java and I understand the process used for on robot tracking already. Now I am looking into laptop based tracking. I already know how to create a WPI camera extension.

Using some code provided by team 237 I have made some progress. The biggest problem right now comes from thresholding. In there code they have

Code:
WPIBinaryImage red = image.getRedChannel().getThreshold(64),

                   green = image.getGreenChannel().getThreshold(64),
                   blue = image.getRedChannel().getThreshold(64);

    
    
    WPIBinaryImage threshold = red.getAnd(green).getAnd(blue);

I was under the impression Thresholds required a range of values. How is each channel only using one value?
A location for some sort of API documentation would also be appreciated.
Reply With Quote