1

I am using python and have used anaconda to install opencv.

I am attempting to stitch three images and need to modify the stitching module for stitch function to tailor it to my need. How would I modify the opencv source code, specifically the stitching module, since it is in C++ and I only have the hpp files on my computer?

Stitching source code

1 Answer 1

1

You should be able do it as follows: 1) Download the opencv C++ sources from here: https://opencv.org/releases.html Be careful to download the exact version that is present in your python installation. 2) Make your changes to the source. 3) Build as usual. 4) Copy the .dll or .so files to you python packages directory, where your environment copied the original opencv files. Overwrite the old opencv .so/.dll files. It would be a good idea to backup the old .dll/.so files just in case!

Sign up to request clarification or add additional context in comments.

5 Comments

See docs.opencv.org/3.4.2/da/df6/… for instructions on how to build opencv on your platform
@mahesh thanks for the instruction. But, could you clarify what "build as usual" means and how to do so?
For build instructions, follow the link pointed to by @MartinBeckett. In the relevant page (corresponding to your platform), look for "Building OpenCV from source" section and follow the instructions. Please take care to download the exact opencv version installed in your python, also during build make sure you build for the correct platform (i.e., 32-bit build for 32 bit python, 64-bit build for 64-bit python etc.).
@mahesh Thank you for the response. Are the Fedora instructions for macos as I do not see linux?
I see there is no explicit MacOS guideline there. Though MacOS build steps are very similar to the Linux ones, you might some find specific guidelines here: gist.github.com/jruizvar/0535fb8612afb105e0eef64051dc0d00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.