« Previous -
Version 6/52
(diff) -
Next » -
Current version
Daniil Osokin, 2014-07-14 06:01 pm
How to contribute¶
You can:- Say thanks.
- Help others on "forum":answers.opencv.org.
- Provide feedback: report bugs, request features.
- Submit a code: create a ticket with the Patch tracker (issue type).
DonateYou should wait for the OpenCV Foundation.
Below are recommendations for some contributors. They are raw, but can be used as a starting point for anybody who wants to see his code added to the library.
We would gladly accept such a contribution, but because of little resources available on our side, I would ask you to do all the preparations. Here is the checklist, including both generic items and the specific things related to your code that I found after brief inspection:
- A prerequisite: is the algorithm patented? If yes, then we may not be that interested in putting it in.
- License - the current license is fine, it's compatible with OpenCV.
- Interface. Here some work is needed to make this code a seamless part of OpenCV.
M_PI -> CV_PI
- You should remove all the static constants from the header. it's not portable and generally a bad practice. Use defines and enumerations.
- cv:: and std:: should not be used in the header, since all the stuff is already inside cv namespace and we already have "using std::vector", "using std::string" directives.
- "m_" in member names should be dropped, we do not this convention in OpenCV.
- Implementation.
- The code should be portable, it should compile fine on ARM too, for example. Therefore, you should not use SSE2 intrinsics outside of conditional compilation. Instead of "#ifdef USE_SSE" you should use "#if CV_SSE2".
- Avoiding duplication of existing OpenCV functionality.
- Writing to cerr should be replaced with CV_Error() calls.
- Documentation.
- Documentation in RST format should be provided for the functionality. Check http://docs.opencv.org/modules/features2d/doc/feature_detection_and_description.html#orb as example.
- You should provide sample code.
- help() function should be added, check opencv/samples/cpp.
- Regression tests - the code should include some regression tests.
- Please, take a look at opencv/modules/features2d/test/test_features2d.cpp. You will need to add a similar test for your code.
- Integration
- Take the latest snapshot of the SVN trunk
- Add your code to the snaphot
- Insert documentation and add the test to the corresponding module
- Build OpenCV, run tests. If you have access to both Linux and Windows - great! Sometimes GCC-approved code does not built with MSVC and vice versa.
- Create patch file and either send it to me by e-mail or submit it as patch at code.opencv.org.