View Single Post
  #1   Spotlight this post!  
Unread 20-01-2017, 14:14
neilmart neilmart is offline
Registered User
FRC #2130
 
Join Date: Jan 2016
Location: idaho
Posts: 4
neilmart is an unknown quantity at this point
Yet Another GRIP Request

Hello! I have some questions regarding GRIP, and how to implement its pipeline to find the center of rectangles. I've essentially copied the example on screensteps live, and I've had some issues calling parts of the auto -generated GripPipeline class. I'll post the code and the error below, and if anyone has had this problem before and resolved it I would be incredibly appreciative.

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();
drive = new RobotDrive(1, 2);
}

Upon writing this, I get an error that reads "The constructor VisionThread(UsbCamera, Pipeline, (<no type> pipeline) -> {}) is undefined" As far as I can tell, pipeline should be a part of wpilib yet seems to lack any documentation among its library.

Again, any help would be greatly appreciated, thank you for your time.
Reply With Quote