Is there a way to get the function signatures of every function in the OpenCV.js API?

asked 2020-02-10 18:47:18 -0500

fdem gravatar image

updated 2020-02-12 13:17:25 -0500

I need a way to get the function signatures of every top-level(?) function in the OpenCV.js API (top level: meaning every function that the end-user can use), so I can store them in a structured way, perhaps in an xml. Is there a way to get that information?

Thank you.

edit retag flag offensive close merge delete

Comments

2

just curious, what do you need this for ? and which language are you talking about ?

berak gravatar imageberak ( 2020-02-11 01:27:48 -0500 )edit

@berak I'm trying to create a web based visual programming tool for OpenCV that allows flow based programming. I don't want to manually create or update my components with every update to OpenCV API, so I need a way to fetch API function signatures. (I've also edited my question into saying "every function in the API")

fdem gravatar imagefdem ( 2020-02-11 14:20:45 -0500 )edit
1

maybe the python wrapper which is generating the java code would be a good starting point. But if its for java - i would use reflection.

holger gravatar imageholger ( 2020-02-11 14:23:44 -0500 )edit

you could also use a html parser and parse then generated documentation.

holger gravatar imageholger ( 2020-02-11 15:20:34 -0500 )edit

python as well as java bindings are auto-generated from the c++ headers, you could try something similar

web based visual programming tool

hehe, guilty, too... (but i gave up on the idea, ~2500 functions were just too much to manage ....)

berak gravatar imageberak ( 2020-02-12 02:37:30 -0500 )edit
1

Just curious are we talking about some kind of bpm software? It usually works with building blocks of functionalities - you don't need to expose every api function, this is too fine grained.

holger gravatar imageholger ( 2020-02-12 03:00:53 -0500 )edit
1

nm -C opencv_core.so (and a lot of filtering)

http://www.dependencywalker.com/

berak gravatar imageberak ( 2020-02-12 04:44:55 -0500 )edit
1

@holger Yes it's sort of similar to block programming, except it's flow-based. It is practically the same thing. I just need the return type and parameter types of every API function. (Maybe not every API function as you have said: I'm not sure on that. I just mean to say "every end-user-usable, or 'top-level?' function in the API." (Sorry I'm not being clear enough)

fdem gravatar imagefdem ( 2020-02-12 05:45:05 -0500 )edit

I'm considering the options you guys are putting forward, thank you a lot. I'll keep the question open because we don't yet have a definitive solution that doesn't require further processing, if such solution even exists.

fdem gravatar imagefdem ( 2020-02-12 06:37:24 -0500 )edit
1

oh, now finally we know, it's about js ? xD

so you need js signatures ? look here and here

berak gravatar imageberak ( 2020-02-12 10:49:30 -0500 )edit