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?
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:
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?
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?
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.
Right-Click Your Project's Name ->
Properties ->
On the Left, Click "Build Properties" ->
Select the tab "Build Paths" ->
Click "Add" use the path: "-I$(WIND_BASE)/target/h/WPIlib/vision"
Click "OK"
“AxisCamera2010.h” or “PCVideoServer.h” will get you started.
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#.
The Vision Assistant helped me choose what I should set the values to in the EllipseDescriptor struct because it shows what settings it uses but it doesn’t tell me what settings it use for CurveOptions and as a result, I can’t make a CurveOptions struct and therefore I can’t use ellipse detection.
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.