Best practice to modify source code

asked 2013-04-23 13:10:23 -0500

Alexandre Bizeau gravatar image

This is not really a normal question here, but I would like to know :

What the best way to modify source code ? And can I have advices on how to do it ?

1 - Is it better to change code in source and build OpenCV as write in this tutorial.

2- Or it easier to create a new class and just rename function to don't have conflict.

The problem is if I use the (1) when I'll use the next OpenCV version, I'll need to re-build it again so maybe it not the best way.

And for (2), the problem is more about the include that can be a really hard thing to deal with.

And I want to maybe use this modification soon, so that why I don't want to ask as a new feature for next OpenCV version.

I would like to implement the "probabilities estimates" into SVM.

As explain here.

edit retag flag offensive close merge delete

Comments

1

I would say that the first approach would satisfy your meaning the most. Add the probabilities estimate to the source code and then add a pull request on github. If so, they will merge your code into a next release, if it is usefull to others :) contributions can be done here

StevenPuttemans gravatar imageStevenPuttemans ( 2013-04-23 14:22:38 -0500 )edit
2

I was thinking about that too. I still on the point to get in the code and try to understand it before doing something.

Alexandre Bizeau gravatar imageAlexandre Bizeau ( 2013-04-23 14:44:44 -0500 )edit