View Single Post
  #1   Spotlight this post!  
Unread 14-01-2017, 12:53
randy_pham randy_pham is offline
Registered User
FRC #0498 (Cobra Commanders)
Team Role: Programmer
 
Join Date: Jan 2017
Rookie Year: 2016
Location: Arizona
Posts: 7
randy_pham is an unknown quantity at this point
GRIP example code compile error

Code:
@Override
	public void robotInit() {
		UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();
	    camera.setResolution(IMG_WIDTH, IMG_HEIGHT);
	    
	    
	    visionThread = new VisionThread(camera, new Pipeline(),  pipeline -> {
	         if (!pipeline.filterContoursOutput().isEmpty()) {
	            Rect r = Imgproc.boundingRect(pipeline.filterContoursOutput().get(0));
	            synchronized (imgLock) {
	                centerX = r.x + (r.width / 2);
	            }
	        }
	    });
	    visionThread.start();
		
	}
We are getting this error: The constructor VisionThread(UsbCamera, Pipeline, (<no type> pipeline) -> {}) is undefined.

We have included Pipeline.java in our package. The errors seems to be withing the listener lambda. We are using java 1.8 in eclipse.
Reply With Quote