大家好,我对AR技术有疑问!
正好与我有问题的ARToolKit框架。 我做了教程中的所有内容,但是应用程序无法识别我所投入的符号。
教程页面:link
我创造了什么: - 关于symbol(filename.patt)的模式文件,并将其添加到\ Data \下的项目中 - 使用mk_patt.exe识别图像我想要作为源。 - 修改了来源:
markerID = ARToolKit.getInstance()。addMarker(" single; Data / patt.eslogo; 80");
但我不知道自己还需要做些什么。 顺便说一下,这是一个例子,使用原始源程序,程序在符号上工作并绘制立方体。并且新的模式文件是相同的样式,所以这不是问题。
有什么想法吗?我没有找到有用的视频,其中包括确切的方法
更详细:
首先,在我使用mk_patt.exe之后,我给了' camera_para.dat'该项目的创建和添加' patt.slogo'模式文件,我将此行修改为:
markerID = ARToolKit.getInstance().addMarker("single;Data/patt.slogo;80");
这是绘图方法的要点:
public void draw(GL10 gl){
...
if(ARToolKit.getInstance()。queryMarkerVisible(markerID)){
cube.draw(GL10 gl);
顺便说一句,这是公众' kosiara'例如来自git:link
logcat的意思是:
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
答案 0 :(得分:0)
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.