com.supermap.ar.areffect.scanner

类 ImageScanner.DeviceInfo

  • java.lang.Object
    • com.supermap.ar.areffect.scanner.ImageScanner.DeviceInfo
  • 封闭类:
    ImageScanner


    public class ImageScanner.DeviceInfo
    extends java.lang.Object
    设备信息

    包含相机启动时的参数

         通过图片识别,反向校正场景启动位置、方位角的示例。
             ImageScanner instance = ImageScanner.getInstance(arEffectView);
             instance.addImageListener(images -> {
                 for (ARAugmentedImage e : images) {
                     if (e.getTrackingState() != TrackingState.TRACKING){
                         //需确保图片在Tracking状态
                         continue;
                     }
                     //通过marker的地理坐标,去校正场景的启动坐标和启动时方位角
                     ImageScanner.DeviceInfo info = ImageScanner.getInstance(arEffectView)
                             .calculateDeviceInfo(e,value.getLocation());
    
                      arEffectView.setDeviceLocation(info.getDeviceLocation());
                      arEffectView.setAzimuth(info.getAzimuth());
                      break J;
                 }
             });