View Single Post
  #3   Spotlight this post!  
Unread 12-02-2016, 19:52
gruffen gruffen is offline
Registered User
FRC #1648
 
Join Date: Jan 2016
Location: Atlanta
Posts: 3
gruffen is an unknown quantity at this point
Re: Axis camera not retrieving images

Quote:
Originally Posted by Justin Buist View Post
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);
			
    	}
    }
Reply With Quote