![]() |
Problem using the camera.
I've been trying out the camera in the vision assistant and it works great. Now I wanna put ellipse detection into our robot. The code below is the code straight from the documentation but it isn't working though because it doesn't know where any of the mentioned classes are (mono image, color image). I've been looking around in WPI LIB and stuff trying to find where the classes are so I can reference them properly, but to know avail. Anyone got any working code that they'd be happy to show me? Or at least tell me where the classes are?
Code:
ColorImage *image; |
Re: Problem using the camera.
The header files are under WPILib/Vision
You should be able to import them without adding an include directory. If not, right-click your project, select properties, and then one of the build options will have a tab about includes (I'm at home and lack the dev tools) add the path: Code:
-I$(WIND_BASE)/target/h/WPIlib/Vision |
Re: Problem using the camera.
I don't follow. My WPI LIB must be a different version or something because it isn't set up like that. It doesn't have a WPILib/Vision folder. Could you send me a link to the latest version?
|
Re: Problem using the camera.
Quote:
|
Re: Problem using the camera.
Great! I had the wrong version. Now I'm just wondering how in WindRiver it knows which folder to go to to import WPI LIB when you write #include <WPIlib> or whatever that is.
EDIT: The script to update the WPI lib that wind river uses is broken. It does everything in a folder called WorkbenchUpdate which doesn't exist YET my WPI LIB is working fine. EDIT: After manually updating EVERYTHING (I took a while) I'm pretty sure to access vision classes I need to include a different .h file. Anyone know what it is? |
Re: Problem using the camera.
The update tool is only slightly "broken" if you install Windriver somewhere other than c:/windriver. Cut and paste fixes this.
Your c:/windriver/vxworks-6.3/target/h/WPIlib should have a "Vision" directory as well as a "Vision2009" directory (and some other miscellaneous directories). You must tell the project to use the "Vision" directory as an addition source of includes. Code:
Right-Click Your Project's Name ->Take a look at the manual: http://first.wpi.edu/Images/CMS/Firs...sers_Guide.pdf |
Re: Problem using the camera.
Yeah I did all that stuff before you posted it. What I'm asking is do I have to include all the .h files myself or can I just include one which would include them all. All this stuff would be soooooooooooooooooooooooooooooooooooo much easier if we could use C#.
|
Re: Problem using the camera.
Quote:
Also AxisCamera2010.h would be what you want. You have to explicitly import image types ColorImage, HSLImage, etc. |
Re: Problem using the camera.
Quote:
|
Re: Problem using the camera.
Ok everything is awesome cool BUT the documentation tells me that I need give it "curve options".
Code:
luminancePlane->DetectEllipses(&ellipseDescriptor, &curveOptions, NULL, NULL); |
Re: Problem using the camera.
Perhaps you can look at the sample code, the code in WPILib, or the documentation to fill in that struct.
Greg McKaskle |
Re: Problem using the camera.
What sample code where?!?! I have the documentation but it doesn't have what's in the struct written down.
|
Re: Problem using the camera.
All languages come with 2010 specific sample code. I'm sure a search of CD would give you the exact path. The documentation could include things like the NI Vision header file, or perhaps the NI Vision manuals. The Start menu>>National Instruments>>Vision>>Manuals, or a similar menu will contain in depth documentation for each language and even some conceptual stuff.
Greg McKaskle |
Re: Problem using the camera.
from 2010ImageDemo:
Quote:
|
Re: Problem using the camera.
Oh thanks, I'll try this when I meet up with my team later today.
|
| All times are GMT -5. The time now is 02:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi