Change opencv source code hough.cpp with openmp and recompile opencv source code

123 Views Asked by At

I wish to make OpenMP changes in hough.cpp HoughLinesP/HoughLines function and recompile opencv source code to test the changes. How can I do this? I want to see performance improvements with openmp

1

There are 1 best solutions below

3
On

I have answered a similar question here: OpenCV: How to calculate essential matrix from feature matches between two images from different cameras using 5-point algorithm?
I assume you are using Windows. You have to open your opencv library folder e.g.:
downloads → opencv-4.0.0 → modules → imgproc → src → hough.cpp

Now you can change something in your .cpp file (e.g. add a function or change function arguments). Remember to modify the according header file (found in imgproc → include) after your changes.

After this go into your build directory, start the OpenCV.sln, run ALL_BUILD and INSTALL and only the changed files are modified in your build directory.