# Trying to contribute to opencv. Not sure where to begin

**URL:** <https://forum.opencv.org/t/trying-to-contribute-to-opencv-not-sure-where-to-begin/9790>\
**Category:** C++\
**Created:** [August 9, 2022, 10:57pm UTC](https://forum.opencv.org/t/trying-to-contribute-to-opencv-not-sure-where-to-begin/9790 "2022-08-09T22:57:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![soaring\_colors](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@soaring\_colors](https://forum.opencv.org/u/soaring_colors)\
**Post date:** [August 9, 2022, 10:57pm UTC](https://forum.opencv.org/t/trying-to-contribute-to-opencv-not-sure-where-to-begin/9790/1 "2022-08-09T22:57:16Z")

</div>

Hi!  
Super excited to contribute to opencv. Not entirely sure where to begin.  
So far I’ve forked the repo and built the binaries using cmake.

Question 1: Does building the binaries run the tests? It looks like it does but not sure.

Question 2: I’m really eager to do C++ work. Should I start by adding new code or by addressing bug fixes? What’s the easiest way to start? If I start with bug fixes, I know where to see new bugs but how can I get context on the bugs? If I’m making new code/features, how can I get context on that as well?

Any other additional information would be great! I’m really excited but also a bit confused. Please link any resources I should read that could help me get up and running!

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [August 9, 2022, 11:33pm UTC](https://forum.opencv.org/t/trying-to-contribute-to-opencv-not-sure-where-to-begin/9790/2 "2022-08-09T23:33:46Z")

</div>

you surely have read [How\_to\_contribute · opencv/opencv Wiki · GitHub](https://github.com/opencv/opencv/wiki/How_to_contribute) already

> [@soaring\_colors](#):
>
> Question 1: Does building the binaries run the tests? It looks like it does but not sure.

as far as I know, building is not supposed to run any of the actual tests. what you see at the beginning of cmake’s “configure” step is some probing of the toolchain/system.

if you want tests, you have to make sure they’re being built, and then you need to run them. I’ve never run the tests but it’s probably documented somewhere. if not, there is some CI in OpenCV’s github that you could steal incantations from.

> [@soaring\_colors](#):
>
> Question 2:

both new code and fixes (and documentation!) improve the world but new code also introduces bugs, so the priority of everyone should always be _reducing bugs_ (and documenting, and fixing documentation)… or at least add code that is _good_. even if you write code that’ll land in contrib first, strive to make it clean, reasonably documented… all the good things.

the github has a ton of open issues. some are bugs, some are features/suggestions. for many of the issues, you can collaborate, i.e. you can get guidance. you don’t need to know everything or have all the skills. you don’t need to have “own ideas” but you may.

a more “formal” arrangement is Google Summer of Code.

any kind of contribution (that isn’t reasonably trivial) ought to be discussed in the corresponding issue. the core developers (Intel employees and whatnot) will weigh in.

some ideas, off the top of my head:

- github always creates a “good first issue” tag. perhaps browse that, or just browse and see what’ll catch your eye
- lots of functions check inputs using “assertions”. those _expressions_ are frequently complex and cryptic (conjunctions, so you have to guess which failed) and the messages aren’t much better either. browse Stack Overflow, look for patterns among issues with `(-215:Assertion failed)`, … some of these regularly trip noobs up, and _could be_ a lot more helpful in debugging if broken down into pieces
- documentation, in a bunch of places, seems _not explicit enough_, or misleading, or any number of things that trip noobs up. if the docs for a single function are more than half a screen worth of text, they deserve an extra article or tutorial, and an example, and the api doc itself slashed down and linking to those separate materials.
- various platform/device-specific stuff. if you know any specific OS’s APIs well, say macos and its GUI, or you know anything about the GigE/USB3 Vision standards/APIs…
- OpenCV.js, it tastes like what the python API used to be in the 1.x/2.x days. terrible. IMHO, and I shouldn’t have much weight in this, `numjs` (numpy equivalent) ought to be the basis for all the “Mat” stuff.

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [August 10, 2022, 6:16am UTC](https://forum.opencv.org/t/trying-to-contribute-to-opencv-not-sure-where-to-begin/9790/3 "2022-08-10T06:16:45Z")

</div>

> Question 1: Does building the binaries run the tests?

assuming, you had BUILD\_TESTS=ON, this script:

> <https://github.com/opencv/opencv/blob/4.x/modules/ts/misc/run.py>

will run them.  
you’ll also need data from the [GitHub - opencv/opencv\_extra: OpenCV extra data](https://github.com/opencv/opencv_extra) repo
