com.supermap.ar.areffect.scanner
Class ImageScanner
- java.lang.Object
-
- com.supermap.ar.areffect.scanner.ImageScanner
-
public class ImageScanner extends java.lang.Object
Image scanning create by tanyunxiu 2020/12/22
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description class
ImageScanner.DeviceInfo
Equipment information Contains parameters for camera startup Through the picture recognition, reverse correction scene startup position, azimuth example.static interface
ImageScanner.ImageListener
Image Listener
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description void
addImage(java.lang.String resourceName)
Add an image in assetsvoid
addImage(java.lang.String name, android.graphics.Bitmap img)
Add Imagevoid
addImageListener(ImageScanner.ImageListener listener)
add ImageListenerImageScanner.DeviceInfo
calculateDeviceInfo(ARAugmentedImage e, Location imageLocation)
Calculate the azimuth when the camera startsvoid
disposeImageListener()
Destroy the listener Remove the listener and empty itfloat
getAzimuth()
Gets the azimuth of the camera when it startsEffectView.setAzimuth(float)
Location
getDeviceLocation()
Gets the position of the camera at startupEffectView.setDeviceLocation(Location)
static ImageScanner
getInstance(AREffectView arEffectView)
void
init()
Deprecated.void
removeImageListener()
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:
-
-