How to contribute

Version 7 (Daniil Osokin, 2014-07-14 06:01 pm)

1 1
h1. How to contribute
2 1
3 1
You can:
4 1
# Say "thanks":http://sourceforge.net/projects/opencvlibrary/reviews/.
5 7 Daniil Osokin
# Help others on "forum":http://answers.opencv.org.
6 1
# Provide feedback: report bugs, request features.
7 1
# Submit a code: create a ticket with the _Patch_ tracker (issue type).
8 2 Daniil Osokin
# -Donate- You should wait for the OpenCV Foundation.
9 3 Daniil Osokin
10 3 Daniil Osokin
*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.*
11 3 Daniil Osokin
12 1
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:
13 1
14 4 Daniil Osokin
# A prerequisite: is the algorithm patented? If yes, then we may not be that interested in putting it in.
15 4 Daniil Osokin
# License - the current license is fine, it's compatible with OpenCV.
16 4 Daniil Osokin
# Interface. Here some work is needed to make this code a seamless part of OpenCV.
17 4 Daniil Osokin
** @M_PI -> CV_PI@
18 4 Daniil Osokin
** You should remove all the static constants from the header. it's not portable and generally a bad practice. Use defines and enumerations.
19 4 Daniil Osokin
** 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.
20 4 Daniil Osokin
** "m_" in member names should be dropped, we do not this convention in OpenCV.
21 4 Daniil Osokin
# Implementation.
22 4 Daniil Osokin
** 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".
23 4 Daniil Osokin
** Avoiding duplication of existing OpenCV functionality. 
24 4 Daniil Osokin
** Writing to cerr should be replaced with CV_Error() calls.
25 4 Daniil Osokin
# Documentation.
26 4 Daniil Osokin
** 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.
27 4 Daniil Osokin
# You should provide sample code.
28 4 Daniil Osokin
** help() function should be added, check opencv/samples/cpp.
29 4 Daniil Osokin
# Regression tests - the code should include some regression tests.
30 4 Daniil Osokin
** Please, take a look at opencv/modules/features2d/test/test_features2d.cpp. You will need to add a similar test for your code.
31 4 Daniil Osokin
# Integration
32 4 Daniil Osokin
** Take the latest snapshot of the SVN trunk
33 4 Daniil Osokin
** Add your code to the snaphot
34 4 Daniil Osokin
** Insert documentation and add the test to the corresponding module
35 4 Daniil Osokin
** 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.
36 4 Daniil Osokin
** Create patch file and either send it to me by e-mail or submit it as patch at code.opencv.org.