File: tutorial-java-mbt-generic.dox

package info (click to toggle)
visp 3.7.0-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 166,332 kB
  • sloc: cpp: 392,705; ansic: 224,448; xml: 23,444; python: 13,701; java: 4,792; sh: 206; objc: 145; makefile: 60
file content (96 lines) | stat: -rw-r--r-- 3,982 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/**

\page tutorial-java-mbt-generic Tutorial: Generic model-based tracking in java with ViSP
\tableofcontents

\section java_mbt_gen_intro 1. Introduction

We assume that you have already followed the previous tutorial \ref tutorial-java-started. It could be also useful to follow \ref tutorial-tracking-mb-generic to get an overview on model-based tracking in ViSP.

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.

\section java_mbt_gen_create_project 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.

\image html img-tutorial-java-eclipse-create-new-project.jpeg

- 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.
\image html img-java-mbt-generic-project.jpg

- In the left panel, open the "Package Explorer" and expand the "src" folder
\image html img-java-mbt-generic-project-started-explorer.jpg

- Remove `module-info.java` file from your project.
\image html img-java-mbt-generic-project-started-empty.jpg

\section java_mbt_gen_user_lib 3. Add a user library

If you followed \ref tutorial-install-java, you should already have ViSP library set in your workspace’s user libraries; if not please check out \ref tutorial-install-java. Now you should be ready to add ViSP library to your project.

- Inside Eclipse’s Package Explorer just right-click on your project’s folder and go to `"Build Path > Add Libraries..."`.

\image html img-java-mbt-generic-import-user-library.jpg

- Select `"User Library"` and click on `"Next"`:

\image html img-tutorial-java-eclipse-add-libraries2.jpeg

- Check the checkbox of the ViSP library and press `"Finish"` button.

\image html img-tutorial-java-eclipse-add-libraries3.jpeg

- In the "Package Explorer" panel, you should see "visp" library
\image html img-java-mbt-generic-eclipse-add-libraries4.jpg

\section java_mbt_gen_app 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.

\image html img-java-mbt-generic-import.jpg

- Select `"General > File System"` and press `Next` button.

\image html img-java-apriltag-import-file.jpg

- Browse to `$VISP_WS/visp/tutorial/java/mbt-generic` folder, enable `mbt-generic` check box and press `Finish` button.

\image html img-java-mbt-generic-import-mbt-generic.jpg

- Now expanding what's behind `src` you should see something similar to:

\image html img-java-mbt-generic-project-complete.jpg

\section java_mbt_gen_run 5. Run tracking application

We can now run this application entering`"Run > Run"` menu.

- Here you should see the application appearing:

\image html img-java-mbt-generic-app-empty.png

\ref install_ubuntu_dataset, 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.

\image html img-java-mbt-generic-app-open-data-set.png

- Now press `"Track"` button to run the tracker on a sequence that is part of ViSP dataset.

\htmlonly
<br>
<p align="center">
<iframe width="560" height="315" src="https://www.youtube.com/embed/q6k4O1ZgL-c" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</p>
\endhtmlonly

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...

\section java_mbt_issues 6. Known issues

- \ref java_started_issue_jre
- \ref java_started_issue_vsp_version
- \ref java_started_issue_mkl

*/