Go to Post IT'S LIKE FIRSTmas CAME EARLY THIS YEAR!!! THANKS VEXPro! - akoscielski3 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-02-2017, 18:40
ST-MTP ST-MTP is offline
Registered User
FRC #4913
 
Join Date: Feb 2017
Location: Anaheim
Posts: 1
ST-MTP is an unknown quantity at this point
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 ?
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2017, 19:01
AustinShalit's Avatar
AustinShalit AustinShalit is offline
Registered User
AKA: אוסטין
no team (WPILib Suite Developer)
 
Join Date: Dec 2013
Rookie Year: 2008
Location: Los Angeles/Worcester/Israel
Posts: 154
AustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of light
Re: Vision Thread error

Make sure your pipeline extends VisionPipeline.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2017, 19:06
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP, WPILib. 2084 alum
FRC #2084
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2009
Location: MA
Posts: 164
SamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to behold
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.
__________________
WPILib
GRIP, RobotBuilder

Last edited by SamCarlberg : 07-02-2017 at 19:09.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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