我正在使用ARToolkitPlusBenchmark来扫描AR Tag Marker。我可以轻松检测到所有4096 BCH 标记。但我的问题是我不知道如何检测每个BCH 标记 ID?
我从这里找到了代码 ARToolkitPlusBenchmark
我试图在Markerinfo.java中检测标记
class DetectMarkerWorker extends Thread {
private byte[] curFrame;
public DetectMarkerWorker() {
setPriority(MAX_PRIORITY);
start();
}
@Override
public synchronized void run() {
try {
wait();
} catch (InterruptedException e) {
}
while (true) {
if(!CurrentConfig.ONLY_CAMERA_PREVIEW){
long tick = System.currentTimeMillis();
if (CurrentConfig.USE_ARTOOLKITPLUS) {
timeNativeMarkerDetection = artoolkitPlus_detectmarkers(curFrame, transMatMonitor);
nativeMarkerDetectionHistory.add(timeNativeMarkerDetection);
if(nativeMarkerDetectionHistory.size()>20){
nativeMarkerDetectionHistory.remove(0);
}
for(int i = 0;i<nativeMarkerDetectionHistory.size();i++){
sumNativeMarkerDetection += nativeMarkerDetectionHistory.elementAt(i);
}
avgNativeMarkerDetection = sumNativeMarkerDetection/nativeMarkerDetectionHistory.size();
sumNativeMarkerDetection = 0;
} else {
artoolkit_detectmarkers(curFrame, transMatMonitor);
}
timeJavaMarkerDetection = System.currentTimeMillis() - tick;
javaMarkerDetectionHistory.add(timeJavaMarkerDetection);
if(javaMarkerDetectionHistory.size()>20){
javaMarkerDetectionHistory.remove(0);
}
for(int i = 0;i<javaMarkerDetectionHistory.size();i++){
sumJavaMarkerDetection += javaMarkerDetectionHistory.elementAt(i);
}
avgJavaMarkerDetection = sumJavaMarkerDetection/javaMarkerDetectionHistory.size();
sumJavaMarkerDetection = 0;
}
DebugFps.updateFPS();
try {
wait();
} catch (InterruptedException e) {
}
}
}
iOS 在 iOS 中,我使用VRToolkit来查找每个 Marker 的 id。这个应用程序使用 ARToolKit plus 来检测视频帧上的标记。
在将相应属性设置为 YES 并获取每个标记 ID 后,我可以扫描所有4096 BCH 标记以及基于薄的标记。
在Android中我面临问题。
如果需要更多信息来理解这个问题,请告诉我。我将非常感谢任何缺乏帮助或指导。