The instruction is also applicable to the 2.4+ version of OpenCV and JavaCV
I was looking for a library for image processing in Java. I was recommended JavaCV.
JavaCV provides a shell for OpenCV, so you can directly use OpenCV functions in Java.
Let's define a couple of steps to follow to install JavaCV in Windows 7.

Step 1
Install the Java Development Kit (JDK) from here .
Pay attention to the processor width (x32 / x64).')
Step 2
Install the Microsoft Visual C ++ Redistributable Package :
Microsoft Visual C ++ 2010 Redistributable Package (x86)Microsoft Visual C ++ 2010 Redistributable Package (x64)Step 3
We follow the
link , select the version of OpenCV and
download * -super-pack.exe . Here we download the self-extracting archive after the finish, unpack it wherever it pleases.
Step 4
Now we have an important
step to add OpenCV .dll to the path so that JavaCV knows where to find them.
Go to Control Panel (Control Panel)> System (System)> Advanced System Settings (Advanced System Settings)> Environment Variables (I have English in Windows, so my translation may slightly differ, but the meaning remains the same. In System variable (System variables), select the path and click Edit. Now add to the end of the line after the ";" location address of opencv.dll. I unpacked the downloaded archive at: D: \ opencv and show by example. If you unpacked otherwise, then insert your location:
For OpenCV 2.4.2 and earlier:
x32:
D: \ opencv \ build \ x86 \ vc10 \ bin; D: \ opencv \ build \ common \ tbb \ ia32 \ vc10 \
x64:
D: \ opencv \ build \ x64 \ vc10 \ bin; D: \ opencv \ build \ common \ tbb \ intel64 \ vc10 \
For OpenCV 2.4.3 and later:
x32:
D: \ opencv \ build \ x86 \ vc10 \ bin
x64:
D: \ opencv \ build \ x64 \ vc10 \ bin
And after this operation we reboot the computer!Step 5
Download JavaCV-bin
from here and unpack.
ATTENTION: JavaCV and OpenCV versions must be compatible! Valid version of OpenCV and other requirements can be found in the Readme file in the folder with JavaCV!

Step 6
Now we can create a
Java 'demo' project in Eclipse .
Next, let's go to Project> Properties> Java Build Path> Libraries> Add External JARs, then go to your JavaCV folder and add all jar files.

Step 7
Now
create demo.java in the src folder of our project.
Insert the following code:
import static com.googlecode.javacv.cpp.opencv_highgui.cvLoadImage; import java.io.File; import javax.swing.JFileChooser; import com.googlecode.javacv.CanvasFrame; import com.googlecode.javacv.cpp.opencv_core.IplImage; public class demo { public static void main(String[] args) { String path = null;
Step 8
Watching the result ...
Thanks for attention.