Quote:
Originally Posted by Justin Buist
Are you sure that's all of your code? I don't even see a definition for grabImage() in there. Giving us the whole picture might help.
|
Wow, that was a big mistake there- I didn't even notice it. Thanks for pointing that out. Here's grabImage():
Code:
public void grabImage(){
if (Pilot.getRawButton(A_BUTTON)){
camera.getImage(frame);
CameraServer.getInstance().setImage(frame);
NIVision.imaqColorThreshold(binaryFrame, frame, 255, NIVision.ColorMode.HSL,
HIGHGOAL_HUE_RANGE, HIGHGOAL_SAT_RANGE, HIGHGOAL_LUM_RANGE);
int numParticles = NIVision.imaqCountParticles(binaryFrame, 1);
SmartDashboard.putNumber("masked particles", numParticles);
CameraServer.getInstance().setImage(binaryFrame);
}
}