Wednesday, 3 April 2013

Using JavaCV in MarvinFramework

Before you start with  you should first setup the JavaCV in windows. If you haven't , read here.

MarvinFramework is dependent on JMF only in one file,  that is

Gabriel helped me to implement it and hence i have been able to use Marvin Framework with JavaCV.

Pre-requisite : - Marvin Framework Setup 'ed in Eclipse , JavaCV Setup 'ed in Windows wit OpenCV.

1) Create a Project in Eclipse .

Give the project name as JavaCVExample .

Click on Configure Build path as shown in figure

Click on Project tab and click add

Add MarvinFramework and MarvinPlugin workspace into the Project by selecting it.

2) Add javacpp.jar , javacv.jar , jna-3.0.4.jar into build path.

Click on Library tab aside of project tab in Build path window and click on add external lib.

Add javacpp.jar , javacv.jar

Add jna-3.0.4

3) Download these files and then add to the JavaCVExample Project under src , package - test.

Tutorial files 

now paste in test package

4) Now run , your Webcam will start capturing and with plugin EdgeDetector.

5) You can test if JavaCV is setup correctly by running this demo , remember to add img1.png in your project.

We will soon update the Marvin Project with these modifications.

We get lot of advantage in this method, the interface is just need to be implemented by Adapter class , which allows users to choose any video capture API of java , not only JavaCV , but xuggler , FMJ , any API can be used to connect to the camera. Just you need to connect the camera using API and get frames.

No comments:

Post a Comment