Ask Your Question
0

cmake options for opencv, what happen if I uncheck

asked 2019-01-06 13:49:14 -0600

blaisexen gravatar image

I cmake opencv source file, I only used it for vs12 c++ / c++builder and Delphi

cmake options for opencv, what happen if I uncheck "BUILD_opencv_java_bindings_generator" or "BUILD_opencv_python_bindings_operator"

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2019-01-06 14:05:50 -0600

flakes gravatar image

At its core, OpenCV is a C/C++ library where the main interface is written in C++, and C for older API's.

All other implementations of OpenCV are wrappers, or bindings, around the C++ API. When you use the Java or Python bindings you are actually calling into C++ code to perform your work. This is how OpenCV is able to continue being performant in these languages. If you don't require access to OpenCV from those languages, then there is no reason to enable the bindings as it will add extra steps/time to your build process.

edit flag offensive delete link more

Comments

If you don't require access to OpenCV from those languages you mean Java and Python, if I don't use this language(because I only use opencv for Vs12_.Net/C++Builder and Delphi) then the opencv_worldXXX.dll won't be use from Python or Java?

blaisexen gravatar imageblaisexen ( 2019-01-06 14:19:14 -0600 )edit
1

@blaisexen The Java and Python wrappers do not use opencv_worldXXX.dll directly; they require extra components. If you disable the build option for the Java and Python bindings then the Java and Python build directories will not be generated. Meaning you will not create the linking libraries specialized for these languages. For example, in Windows, Java bindings will create opencv-xxx.jar which uses the shared library opencv_javaXXX.dll in order to access the C++ API's. For Python it will create a new python module which uses shared library cv2.cpXX-win_amd64.pyd in order to access the C++ API's. The C++ code itself has no dependencies on these shared libraries, so if your application is not written in either Java or Python then there is no reason to generate them.

flakes gravatar imageflakes ( 2019-01-06 15:15:31 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-01-06 13:49:14 -0600

Seen: 424 times

Last updated: Jan 06 '19