0

An android project that can read different markers(multiple) and provide different output(video) for each tracked marker.

What have we achieved so far: 1) We have used the example project provided in ARToolkit(ARMultiProj) for tracking of multiple marker, it tracks one marker only.

What we are left to achieve:

1) we are trying to implement the multiple marker tracking concept for playing different video on tracking of different markers using NFT.

2) I have used the ARMultiProj right out of the box from android studio example projects provided with ARToolkit 5.3.2 and thats where the ARMultiProj failed to detect multiple trackers, instead it tracked just one all the time.

In this case, its the cubes for 6 markers in the following;

Marker.dat

the number of patterns to be recognized

6

marker 1

a.patt

40.0

1.0000 0.0000 0.0000 0.0000

0.0000 1.0000 0.0000 0.0000

0.0000 0.0000 1.0000 0.0000

marker 2

b.patt

40.0

1.0000 0.0000 0.0000 100.0000

0.0000 1.0000 0.0000 0.0000

0.0000 0.0000 1.0000 0.0000

marker 3

c.patt

40.0

1.0000 0.0000 0.0000 200.0000

0.0000 1.0000 0.0000 0.0000

0.0000 0.0000 1.0000 0.0000

marker 4

d.patt

40.0

1.0000 0.0000 0.0000 0.0000

0.0000 1.0000 0.0000 -100.0000

0.0000 0.0000 1.0000 0.0000

marker 5

f.patt

40.0

1.0000 0.0000 0.0000 100.0000

0.0000 1.0000 0.0000 -100.0000

0.0000 0.0000 1.0000 0.0000

marker 6

g.patt

40.0

1.0000 0.0000 0.0000 200.0000

0.0000 1.0000 0.0000 -100.0000

0.0000 0.0000 1.0000 0.0000

For understanding and convenience, i have put below the specific log from the project.

Logs:

E/ARToolKit: marker config():multi;Data/multi/marker.dat

E/libARWrapper: ARController (native): [info]Added marker (UID=0), total markers loaded: 1.

E/libARWrapper: ARController (native): [info]Marker 0 now visible

E/libARWrapper: ARController (native): [info]Marker 0 no longer visible

As you can see above, the project is able to track and create the assets from assets/data/multi folder of the different patt files along with the camera_para.dat and marker.dat yet it doesnt track other markers.

Kindly provide me with some guidelines on what would be the possible implementation for achieving the above scenario with code snippets and exact changes in ARToolkit files(if required). Thanks in advance!

Regards & Thanks,

Ganeshan P

  • Can you please provide the marker.dat file so that we can see how you configured multi marker tracking? Also, I do not understand part 2) and the SimpleRenderer. What does not load? What are you trying to achieve? – Thor_Bux Nov 01 '16 at 21:53
  • @Thor_Bux Thanks for trying to help me out. I have updated my question based on your comment. Kindly check it out and provide your input. Thank you. – Ganeshan palanichamy Nov 02 '16 at 05:27
  • Just for my final understanding, you are running ARMultiProj with the above marker.dat. No other changes? Did you try ARMultiProj without any changes? Does that work for you? Thanks – Thor_Bux Nov 03 '16 at 08:11
  • @Thor_Bux Yes.. I tried to run the project as is from android example.. but all that happened was, it just tracked one patt file and drew cube over a.patt alone.. As you can see above in the logs of question, the total markers loaded: 1. Can you kindly provide some insights in this? – Ganeshan palanichamy Nov 04 '16 at 13:42
  • Also, out of curiousity is it possible to change rendering element of cube to a image or video.. ? If yes, can you throw some light on it. – Ganeshan palanichamy Nov 04 '16 at 14:15
  • For video rendering see: https://github.com/artoolkit/artoolkit5/tree/master/AndroidStudioProjects/ARMovieProj – Thor_Bux Nov 07 '16 at 01:24

1 Answers1

0

From what I gathered you have a slight misconception of that example Project. It demonstrate the use of "Multimarkers". See this site for a short explanation on markers.

Look here for a overview of AR-Markers

Multimarker only display 1 object but only one of the markers need to be completly visible.

In your case you might be better off to grab ARNativeOSG or nftBookProj as base. Both examples have at least two example markers.

ARNativeOSG ist for the display of OSG Models on framemarkers but it is really easy to modify. Just look under assets/Data/marker.dat and assets/Data/objects.dat. These are both textfiles. Just put your markers in marker.dat and connect them in objects.dat.

If you insist on using NFT take a look at nftBookProj. It has almost the same makeup. Look under src/main/assets/Data for those files. They each contain examples how to use them. Be aware. Although ARToolkit supports NFT I don't find it as robust as the framemarkers.

Example NFT markers.dat

# Number of markers
1  // <--- Amount of markers. Important to change if you add more

# Entries for each marker. Format is:
#
# Name of pattern file (relative to this file)
# Marker type (SINGLE)
# Marker width in millimetres (floating point number)
# Optional tokens:
#     FILTER [x]   Enable pose estimate filtering for the preceding marker
#                  x (optional) specifies the cutoff frequency. Default
#                  value is AR_FILTER_TRANS_MAT_CUTOFF_FREQ_DEFAULT, which
#                  at time of writing, equals 5.0.
# A blank line

../DataNFT/pinball // <-- Position of marker relativ to this file
NFT                // <-- Type
FILTER 15.0        // <-- Extra option. I think it reduce jittering

Example objects.dat:

2 // <-- amount of objects. Important to change

../OSG/axes.osg  //position relativ to file
0.0 0.0 0.0      //Translation in regards to the marker
0.0 1.0 0.0 0.0  //Rotation in regards to the marker
40.0 40.0 40.0   //Zoom
MARKER 1         //This refers to the Position in marker.dat
LIGHTING 0       //Some added options. Actually no idea what this does

../OSG/p51d-jw-animated.osg
4.5 118.25 30.0
90.0 1.0 0.0 0.0
25.0 25.0 25.0
MARKER 1         //This object appears together with the first on on the same marker

I hope this is helpful.

Senador
  • 5,580
  • 2
  • 15
  • 12
  • Suppose I have 3 markers and my animated osg position and everything needs to be same as Marker 1, so do I have to duplicate these factors again and again for every single marker? – Vikrant_Dev Nov 21 '17 at 12:03