cmake: install opencv using external libjpeg library - opencv

I have two versions of libjpeg library. One is the system library /usr/lib/x86_64-linux-gnu/libjpeg.so, and the another is the newer one that I have built manually /vol/me/lib/libjpeg.so. I want to install opencv that uses the new library instead of the system one. How can I use cmake/cmake-gui to do that?

Related

mingw : Giving reference to opencv libraries in simpler way

Successfully installed opencv 4.5.4 in windows under mingw evironment. I was able to compile opencv applications. But is there any easy way to give reference to libraries instead of typing long list of opencv libraries (i.e. something like pkg-config in windows)
For a simple opencv program I need to give reference to 4 libraries.
g++ rotate.cpp -lopencv_core454 -lopencv_highgui454 -lopencv_imgproc454 -lopencv_imgcodecs454
instead do we have some option to give list of libraries through some flags in windows environment.
Thanks
You can actually use pkg-config in Windows. If you use MSYS2 shell is is usually available or it can be installed via pacman.

libtiff version of OpenCV 2.3.1

OpenCV 2.3.1 uses libtiff as 3rd party library.
And I want to know which version of libtiff is used for a security reason.
But libtiff source code in opencv dose not show a version.
What is libtiff version of OpenCV 2.3.1?
Or is there any list of 3rd party libraries`s version for opencv ?
I realize how to figure out it.
I do share the information.
check it out from
opencv-2.3.1\3rdparty\tiffvers.h
Version is written in that file.

What do we need to install for developing with JavaCV?

I want to use and learn JavaCV.
• So, I read some articles about how to set up JavaCV development environment in Window 7. At first they download and install OpenCV and adding some directory paths to System Variable, After that ,they extract javacv-0.7-bin.zip and javacv-0.7-cppjars.zip packages to somewhere(probably C:) and add some .jar files to their projects.
My Question : Do I need to install OpenCV for developing in JavaCV? because I wrote some JavaCV programs and my JavaCV programs compile and run properly (without installing OpenCV).
According to a javacv developer, the answer is NO. It comes bundled. Source: javacv issue 406 on GitHub.

OpenCV as a static library (cmake options)

I want to use OpenCV library in an embedded system and I need to compile my project using OpenCV as a static library.
How can I create the library using cmake options ?
To build OpenCV as static library you need to set BUILD_SHARED_LIBS flag to false/off:
cmake -DBUILD_SHARED_LIBS=OFF ..
But I think it is not enough for your task because you actually need to cross-compile library for you architecture. In case of Android or IOS such port already exists and you can simply use it. In case of another platform you need to create your own cmake toolchain file for cross-compiling and probably make a number of fixes in OpenCV build system.
The BUILD_SHARED_LIBS=OFF cmake option will create static libraries.
It should be noted that at the time of writing this, OpenCV does not really support static build, in that the result will not be useable when installed somewhere.
https://github.com/opencv/opencv/issues/21447#issuecomment-1013088996

About installing the open cv library

sir,
I have tried my level best to install open cv library 2.2.0 version.but it has'nt suceeded
it shows that errors in linking the library hughigh,
whether we wanted to insatll the ipp library prior to install the opencv?
please help me ?..............
I can only recommend the install advice on the OpenCV page. If you are using a unix download the source of the library you want to install and then use cmake to install the library. That usually works fine for me.
Try installing the 1.1 version of OpenCV.
The 2.x version is brand new and as of Nov 1 2009 you will have difficulty finding documentation for that. The 1.1 version of OpenCV, on the other hand, is very well documented and you should have no trouble finding online tutorials for your platform that walk you through the installation process step-by-step.
As an aside: "IPP" refers to Intel's Performance Primitives. In the 1.1 version these are entirely optional. OpenCV does not require them. If you have the Performance Primitives installed, however, your OpenCV code may run faster. (For me it cut down my image processing time by a factor of five.) Once you get everything up and running you can purchase the IPP library from intel here: http://software.intel.com/en-us/intel-ipp/

Resources