Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » OpenCV
Re: OpenCV [message #32746 is a reply to message #32734] Sun, 05 June 2011 22:36 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1784
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

GaroRobe wrote on Sun, 05 June 2011 02:26

3. Why not have an additional functionality for packages in form of Assist++ hinting dictionaries?
Make it so that package maintainers might make such dictionaries (say, "func prototype"/"header"[-"string#"][/"src"[-"string#"]][/ "descr"]) and assist would attach 'em to its list once when package is attached and the rest of A++ would work dynamically like it does now.

That is actually quite good idea Smile It should be even relatively easy to implement. There is already one "backdoor" to feed information to Assist++ or to hide it, the parser directives //$, //$- and //$+. If we can get the description of the entire OpenCV API in C++ syntax, dumped in one file and prefixed with //$, it should make the Assist work. Of your course better (faster) solution would be to store the pre-parsed data, but the parser is quite fast, maybe it wouldn't even be necessary...

Honza
Re: OpenCV [message #32748 is a reply to message #32746] Mon, 06 June 2011 01:41 Go to previous messageGo to next message
GaroRobe is currently offline  GaroRobe
Messages: 30
Registered: May 2011
Location: Khabarovsk, Russia
Member

I'll look into it immidiately.

Okay, what I managed to dig so far is that A++ fails to parse prototypes with macroes in function arguments, e.g.:
//$ void foo( MY_DEFINE int bar )

fails, while
//$ void foo( int bar )

works.
OpenCV is tangled with CV_[SOMETHING] inside out, so it's quite a headache and calls for some intensive sed and awk usage Smile.

Moreover, that's not the only one case:
//$ CV_EXPORTS void RQDecomp3x3 ( const Mat& M, Mat& R, Mat& Q );

Works.
//$ CV_EXPORTS_W Vec3d RQDecomp3x3 ( const Mat& M, Mat& R, Mat& Q, Mat& Qx, Mat& Qy, Mat& Qz );

Fails.

Don't get the reason.

[Updated on: Mon, 06 June 2011 02:43]

Report message to a moderator

Re: OpenCV [message #32754 is a reply to message #32748] Mon, 06 June 2011 09:06 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1784
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Well, the parser is not perfect... This might be a good reason to make it work better Wink

Extensive playing with sed/awk might not be necessary. There is plenty of tools that work with C++ code/binaries, we can reuse them. One possible way that comes to my mind: Compiling a binary using OpenCV in debug mode and listing the files in gdb, using its 'info functions', 'info variables' and 'info types' commands. It lists the declarations sorted by file, so filtering out the OpenCV part would be easy. One thing I'm not sure how to get is the information about classes...

Honza

EDIT: Found how to get the classes/struct/union info Smile There is a 'ptype' command for this in gdb Smile So it is in theory possible to get all the information with relatively simple script...

[Updated on: Mon, 06 June 2011 09:18]

Report message to a moderator

Re: OpenCV [message #32757 is a reply to message #32754] Mon, 06 June 2011 13:38 Go to previous messageGo to next message
GaroRobe is currently offline  GaroRobe
Messages: 30
Registered: May 2011
Location: Khabarovsk, Russia
Member

To my shame never used gdb beyond step-to-step debugging in eclipse. So much to do, so much to learn...
Re: OpenCV [message #33036 is a reply to message #32614] Mon, 04 July 2011 02:12 Go to previous message
GaroRobe is currently offline  GaroRobe
Messages: 30
Registered: May 2011
Location: Khabarovsk, Russia
Member

Okay, enough of being full of myself - I will find neither time nor bravery to start solving this problem so I do what might solve it - just ask for your help. Anyone who can comprehend solution completely, please, post here everything related - this feature would be really useful when start working with completely foreign API.
Previous Topic: Printing without dialog
Next Topic: How to resize an image without the default filter
Goto Forum:
  


Current Time: Sun Dec 03 08:01:47 CET 2023

Total time taken to generate the page: 0.02516 seconds