add docstrings and named parameters for the generated functions
I know the mapping is pretty straight forward and if you have some familiarity with ocv it might not even that much of a benefit, however I tend to explore new clojure APIs in my editor (emacs w/ spacemacs config) by navigating to a symbol and hitting , h h which in case of a function displays its signature and the docstring in a minibuffer. Would be super handy for me to have this in origami. Is there any work in this direction? I don't know if named parameters make any more sense then type signatures (they might in liaison w/ spec), but docstrings would help a lot already.
I really like the idea. But I can't find anything that could be used from the original opencv to docs at: https://docs.opencv.org/
The generated javadoc and other pages are completely empty. For example: https://docs.opencv.org/java/3.0.0/org/opencv/core/Core.html
AFAIK, the javadoc generated when compiling the java bindings is empty as well.
Any idea of where to find something useful to use as docstring ?
How exactly do you generate the bindings?
I am using some simple java reflection to read the java methods and parameter types. Then output the clojure api methods (as-is or in what I've called bikkuri-mode) as text/clojure code.
Any good idea to provide something useful ?
No, to be honest I don't have any good idea. In my mind the generated docs of OpenCV were better, and they also seem to have been slightly better at one point. The docs for 2.4.11 for example have more info. For OpenCV 3 I don't know really, I can't really find anything.
Not all the doc strings are empty. I think you just had a unlucky example. For instance:
https://github.com/opencv/opencv/blob/master/modules/imgproc/include/opencv2/imgproc.hpp
Has tons of documentation
But a cursory look tells me it's not going to be fun parsing that into a docstring :)
Sometimes it has something convenient like
/** @brief Calculates all of the moments up to the third order of a polygon or rasterized shape.
While other times it's an
/** @overload
So you have to go find the overload somehow?
And then the enums at the top have a different format with
//! mode of the contour retrieval algorithm
I'd ask around and see if anyone has written a converter (I'm seeing javadoc->python-docstring stuff with a quick search) or at least look into some software that reads C++ docstrings and gives you an in-memory mapping
what about this: https://docs.opencv.org/java/2.4.2/org/opencv/core/Core.html but its for opencv 2 unfortunately...
Some useful text in the latest opencv javadoc https://docs.opencv.org/4.1.2/javadoc/index.html
https://docs.opencv.org/4.1.2/javadoc/org/opencv/videoio/VideoCapture.html
New Javadoc for 4.3 ! https://docs.opencv.org/master/javadoc/