Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Vision Thread error (http://www.chiefdelphi.com/forums/showthread.php?t=154910)

ST-MTP 07-02-2017 18:40

Vision Thread error
 
visionThread = new VisionThread(server,new Pipeline(), pipeline -> {
if (!pipeline.filterContoursOutput().isEmpty()) {
Rect r = Imgproc.boundingRect(pipeline.filterContoursOutput ().get(0));
synchronized (imgLock) {
centerX = r.x + (r.width / 2);
}
}
});

We met an error: The constructor VisionThread(CameraServer, Pipeline, (<no type> pipeline) -> {}) is undefined.
Can you help us with that ? And can you explain the code ?

AustinShalit 07-02-2017 19:01

Re: Vision Thread error
 
Make sure your pipeline extends VisionPipeline.

SamCarlberg 07-02-2017 19:06

Re: Vision Thread error
 
1. VisionThread needs a VideoSource (like a UsbCamera), not a CameraServer, for the first argument.
2. Pipeline has to implement VisionPipeline
3. Don't copy-paste code you don't understand and expect it to work. If you have questions about what a piece of code is doing, all you have to do is ask.


All times are GMT -5. The time now is 00:09.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi