|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
VisionThread Listener?
Hello, this year my team and I want to try using vision assistance in our code. We have created an opencv program to find what we're looking for but we don't understand how to use it. When we tried constructing a VisionThread object, the last parameter was a listener of a type that extends VisionPipeline. Where do I find that? Or how do I create one? Thanks in advence. Yair Ziv from team MA 5951.
|
|
#2
|
||||
|
||||
|
Re: VisionThread Listener?
The listener is more or less a function that gets called every time the pipeline runs. You can write it as a lambda:
Code:
VisionThread visionThread = new VisionThread(usbCamera, myPipeline, () -> {
// listener code here
});
|
|
#3
|
||||
|
||||
|
Re: VisionThread Listener?
Quote:
|
|
#4
|
||||
|
||||
|
Re: VisionThread Listener?
NVM, found the problem, the problem was not in the listener, it was that CameraServer does not extend VideoSource
, should have found the solution earlier. Thanks for helping though! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|