First of all, welcome to the club of people that want to upgrade and adapt the code to the needs of others computer vision software developers. Some of the following steps might give you a good insight in what to do:
- The complete developing community is focussed around the development issues forum, the pull request overview and the actual source code base of OpenCV.
- Start by reading through the contribution process, right here. It explains the basic process of getting extra into the repository.
- The code style guide gives you an insight in how your add-ons should be formatted in order to get merged faster.
- A complete sample for OpenCV contribution on Windows can be found here and for Linux right here - which will be put on the same dev forum in the near future -
Then it is basically up to you where you want to start. I always suggest trying something easy to get used to the system, like some small bug fixes or some adaptation to the documentation. Once you done that, you can indeed dig deeper into the sourcecode and add usefull stuff where needed.