Tuesday, December 25, 2012

Calling webcam devices to capture image

Hello.....
This time I want to post about how to create Image capture application in java desktop by calling webcam device on PC. I used Netbeans IDE to made this application, also need to add some additional tools and library such  javacv-01-bin.zip , OpenCV windows SuperPack version 2.4.0 , Microsoft Visual C++ 2010 Redistributable Package

You can download the project here WebcamCapture. You can modify or add any function in that application, but make sure that project loaded in your Netbeans correctly. Below is the step to load the project and add some library in your netbeans :

After you download the project, now prepare some additional tools and library. You can download at the link below :
a)      javacv-01-bin.zip
c)      Microsoft Visual C++ 2010 Redistributable Package
·         Microsoft Visual C++ 2010 Redistributable Package (x86) for windows 32 bit
·         Microsoft Visual C++ 2010 Redistributable Package (x64) for windows 64 bit

Installation step
a)      Install Microsoft Visual C++ 2010 Redistributable Package.
b)      Ekstract OpenCV windows SuperPack version 2.4.0 to directory C:\
c)      Configure system path, buka control panel >> System and Security >> System >> Advance System Settings >> Environment Variables, as picture showed below : 

 d) On System Variables window choose Path and Click edit button, add address below on variable value as shown  at the picture below.
·         For windows 64 bit 
C:\opencv\build\common\tbb\intel64\vc10\;C:\opencv\build\x64\vc10\bin\;
·         For windows 32 bit 
C:\opencv\build\common\tbb\ia32\vc10\;C:\opencv\build\x86\vc10\bin\;
e)   Ekstract javacv-01-bin.zip then choose project in netbeans that need additional library javaCV

f)      On menu bar right click Project >>Properties >> on the left side choose libraries as shown at the picture below.

 g)     Click Add JAR/Folder button then choose the file that have an extension .JAR inside the folder/directory which  javacv-01-bin.zip file extracted. next  click open button

h)      After project fixed (no error), running program as shown at the picture bellow.
i)       That's how the application running as shown at the picture below.
·         Main menu application
·         Camera device detected and take the picture.
 ·        To save the capture click save and choose the directory for the captured image file.
·         The location of captured file.



--Thats All --

 
read more »»