Search code examples
androiddesign-patternsartoolkit

ARToolKit Android cannot recognize new pattern


Hello everybody i have a question about AR technology!

Exactly with the ARToolKit framework which i have problem. I did everything what is in the tutorial but the application cannot recognize the symbol what i have putted in.

tutorial page: link

what i have create: - pattern file about symbol (filename.patt) and added this to the project under \Data\ - with the mk_patt.exe recognized the image what i would like to be as the source. - modified the source:

markerID = ARToolKit.getInstance().addMarker("single;Data/patt.eslogo;80");

But i don't know what i have to do more. By the way this is an example and with the original source the program working and drawing the cube on the symbol. and the new pattern file is the same style so that is not problem.

Any idea? I did not find useful video what's included the exact method

more detailed:

first of all, after when i used the mk_patt.exe and i given the 'camera_para.dat' of the project, created and added the 'patt.slogo' pattern file, i modified this line, to:

markerID = ARToolKit.getInstance().addMarker("single;Data/patt.slogo;80");

here is the point of the drawing method :

public void draw(GL10 gl) {
...

if (ARToolKit.getInstance().queryMarkerVisible(markerID)) {

cube.draw(GL10 gl);
by the way this is the public 'kosiara' example from git: link

The point of the logcat is this:

06-20 10:46:02.454 32096-32096/org.artoolkit.ar.samples E/libARWrapper: ARController (native): ARController::startRunning(): called, start running
06-20 10:46:02.454 32096-32096/org.artoolkit.ar.samples E/libARWrapper: ARController (native): VideoSource::configure(): video Source video configuration: "-format=NV21"
06-20 10:46:02.454 32096-32096/org.artoolkit.ar.samples E/libARWrapper: ARController (native): VideoSource::configure(): video Source camera parameters: "Data/camera_para.dat"
06-20 10:46:02.454 32096-32096/org.artoolkit.ar.samples E/libARWrapper: ARController (native): [error]Opening Android Video Source.
06-20 10:46:02.454 32096-32096/org.artoolkit.ar.samples I/libar: Using supplied video config "-format=NV21".
06-20 10:46:02.454 32096-32096/org.artoolkit.ar.samples I/libar: Requesting images in NV21 format.
06-20 10:46:02.467 32096-32096/org.artoolkit.ar.samples I/ARActivity: Camera initialised
06-20 10:46:02.787 32096-32167/org.artoolkit.ar.samples V/RenderScript: 0xa0c63000 Launching thread(s), CPUs 4
06-20 10:46:03.264 32096-32096/org.artoolkit.ar.samples E/libARWrapper: ARController (native): [error]Loading single AR marker from file 'Data/patt.slogo', width 80.000000.
06-20 10:46:03.273 32096-32096/org.artoolkit.ar.samples E/libARWrapper: ARController (native): [error]ARController::addMarker(): called
06-20 10:46:03.273 32096-32096/org.artoolkit.ar.samples E/libARWrapper: ARController (native): ARController::addMarker(): Added marker (UID=0), total markers loaded: 1, exiting, returning true
06-20 10:46:03.273 32096-32096/org.artoolkit.ar.samples I/ARActivity: Scene configured successfully
06-20 10:46:03.274 32096-32212/org.artoolkit.ar.samples I/libar: cparamSearch beginning search for LGE/Nexus 5/hammerhead, camera 0, aspect ratio 16:9.
06-20 10:46:03.275 32096-32212/org.artoolkit.ar.samples I/libar: Matched cached camera calibration record (1920x1080, focal length 0.00).
06-20 10:46:03.275 32096-32212/org.artoolkit.ar.samples I/libar: Matched cached camera calibration record (1280x720, focal length 0.00).
06-20 10:46:03.695 32096-32096/org.artoolkit.ar.samples I/CameraPreview: Autofocused....
06-20 10:46:03.930 32096-32212/org.artoolkit.ar.samples E/libARWrapper: ARController (native): [error]Android Video Source running 1280x720.
06-20 10:46:03.961 32096-32096/org.artoolkit.ar.samples E/libARWrapper: ARController (native): ARController::initAR() called

Solution

  • I tried with another pattern file and it's working, but the process when i was created the pattern about a symbol was the same like now, and i don't know why the program can't recognize the symbol what i used with the same logic.

    Conclusion: Eventually the program working with another symbol what i created with wider line than before and that is the point.