Recently i have been working on a project using ARToolkit5 on android studio. Since i'm completely new to development using NDK, at first i thought of looking at the sample projects included with the artoolkit. The java based examples are working fine (ARSimpleProj & ARSimpleInteractionProj). But when i try to run the projects using native library (ARSimpleNativeProj & ARSimpleNativeCarsProj)the project is not working.
All I am getting is some error message in the logcat as shown below :
E/libARWrapper: ARController (native): [error]Loading single AR marker from >file 'Data/patt.hiro', width 80.000000. E/libARWrapper: ARController (native): [error]Error: unable to load single >AR marker from file 'Data/patt.hiro'. E/libARWrapper: ARController (native): [error]Error: Failed to load marker.
E/libARWrapper: ARController (native): [error]Loading single AR marker from >file 'Data/patt.kanji', width 80.000000. E/libar: Error opening pattern file 'Data/patt.kanji' for reading. E/libARWrapper: ARController (native): [error]Error: unable to load single >AR marker from file 'Data/patt.kanji'. E/libARWrapper: ARController (native): [error]Error: Failed to load marker.
And a continuous message in the logcat :
E/libARWrapper: ARController (native): [error]arwQueryMarkerTransformation(): Couldn't locate marker with UID -1.
I have tried a lot to find out what the problem is. I couldn't find a solution. Any help is appreciated.
I'm adding some more details of the logcat output hoping that it could provide some additional information
E/libARWrapper: ARController (native): VideoSource::configure(): video >Source video configuration: "-format=NV21" E/libARWrapper: ARController (native): VideoSource::configure(): video >Source camera parameters: "Data/camera_para.dat" E/libARWrapper: ARController (native): [error]Opening Android Video Source.
and
E/libARWrapper: ARController (native): ARController::startRunning(): called, >start running E/libARWrapper: ARController (native): [error]ARController::startRunning(): >Error: not initialized, exiting, returning false E/ARToolKit: Error starting video E/ARActivity: Error initialising camera. Cannot continue.
I'm encountering this message at the top of the logcat. I could'nt identify what is the cause for such an error
E/Zygote: Zygote: error closing descriptor
libcore.io.ErrnoException: close failed: EBADF (Bad file number)
at libcore.io.Posix.close(Native Method)
at libcore.io.BlockGuardOs.close(BlockGuardOs.java:75)
at com.android.internal.os.ZygoteInit.closeServerSocket(ZygoteInit.java:221)
at com.android.internal.os.ZygoteConnection.handleChildProc(ZygoteConnection.java:879)
at com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:242)
at com.android.internal.os.ZygoteInit.runSelectLoop(ZygoteInit.java:713)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:649)
at dalvik.system.NativeStart.main(Native Method)