com.supermap.ar.areffect.scanner
Class ImageScanner
- java.lang.Object
-
- com.supermap.ar.areffect.scanner.ImageScanner
-
public class ImageScanner extends java.lang.ObjectImage scanning create by tanyunxiu 2020/12/22
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description classImageScanner.DeviceInfoEquipment information Contains parameters for camera startup Through the picture recognition, reverse correction scene startup position, azimuth example.static interfaceImageScanner.ImageListenerImage Listener
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description voidaddImage(java.lang.String resourceName)Add an image in assetsvoidaddImage(java.lang.String name, android.graphics.Bitmap img)Add ImagevoidaddImageListener(ImageScanner.ImageListener listener)add ImageListenerImageScanner.DeviceInfocalculateDeviceInfo(ARAugmentedImage e, Location imageLocation)Calculate the azimuth when the camera startsvoiddisposeImageListener()Destroy the listener Remove the listener and empty itfloatgetAzimuth()Gets the azimuth of the camera when it startsEffectView.setAzimuth(float)LocationgetDeviceLocation()Gets the position of the camera at startupEffectView.setDeviceLocation(Location)static ImageScannergetInstance(AREffectView arEffectView)voidinit()Deprecated.voidremoveImageListener()Remove listening from AR scenarios Note: Not null
-
-
-
Method Detail
-
getInstance
public static ImageScanner getInstance(AREffectView arEffectView)
- Parameters:
arEffectView-- Returns:
-
addImage
public void addImage(java.lang.String resourceName)
Add an image in assets- Parameters:
resourceName-
-
addImage
public void addImage(java.lang.String name, android.graphics.Bitmap img)Add Image- Parameters:
name-img-
-
addImageListener
public void addImageListener(ImageScanner.ImageListener listener)
add ImageListener- Parameters:
listener-
-
init
@Deprecated public void init()
Deprecated.Initialize
-
removeImageListener
public void removeImageListener()
Remove listening from AR scenarios Note: Not null
-
disposeImageListener
public void disposeImageListener()
Destroy the listener Remove the listener and empty it
-
calculateDeviceInfo
public ImageScanner.DeviceInfo calculateDeviceInfo(ARAugmentedImage e, Location imageLocation)
Calculate the azimuth when the camera starts- Parameters:
e- AR enhanced imagesimageLocation- AR Specifies the geographic coordinates of an enhanced image- Returns:
-
getDeviceLocation
public Location getDeviceLocation()
Gets the position of the camera at startupEffectView.setDeviceLocation(Location)- Returns:
-
getAzimuth
public float getAzimuth()
Gets the azimuth of the camera when it startsEffectView.setAzimuth(float)- Returns:
-
-