|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 ? |
|
#2
|
||||
|
||||
|
Re: Vision Thread error
Make sure your pipeline extends VisionPipeline.
|
|
#3
|
||||
|
||||
|
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. Last edited by SamCarlberg : 07-02-2017 at 19:09. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|