In this tutorial, you will see how to develop an application that allows to load a sequence of images and run model-based tracking in java using ViSP library in Eclipse.
2. Create a new project
To create the project corresponding to this tutorial:
Open Eclipse and create a new Java project entering "File > New > Java Project" menu.
In the "New Java Project" dialog write the name of your project (let say visp_java_mbt_generic). In JRE section, select the appropriate execution environment (JavaSE-21 if you install JDK 21). Then press "Finish" button.
In the left panel, open the "Package Explorer" and expand the "src" folder
Inside Eclipse’s Package Explorer just right-click on your project’s folder and go to "Build Path > Add Libraries...".
Select "User Library" and click on "Next":
Check the checkbox of the ViSP library and press "Finish" button.
In the "Package Explorer" panel, you should see "visp" library
4. Import generic tracker java code
Now import GenericTracker.java file in your project, pointing your mouse on src folder and with a right click entering "Import" menu.
Select "General > File System" and press Next button.
Browse to $VISP_WS/visp/tutorial/java/mbt-generic folder, enable mbt-generic check box and press Finish button.
Now expanding what's behind src you should see something similar to:
5. Run tracking application
We can now run this application entering"Run > Run" menu.
Here you should see the application appearing:
5. Install ViSP data set, press "Open ViSP Input Image" button, browse to select $ViSP_WS/visp-images folder that contains ViSP dataset, and press "open" button as shown in the next image.
Now press "Track" button to run the tracker on a sequence that is part of ViSP dataset.
This application allows to select features (edges alone, keypoints alone, or edges and keypoints together in the same scheme) that are used by the tracker. Just try it...