Package com.microblink.photopay.image
Class ImageFrame
java.lang.Object
com.microblink.photopay.image.ImageFrame
- All Implemented Interfaces:
com.microblink.photopay.hardware.camera.frame.ICameraFrame,com.microblink.photopay.util.pool.PoolObject
public class ImageFrame
extends Object
implements com.microblink.photopay.hardware.camera.frame.ICameraFrame
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidFinalization method.com.microblink.photopay.hardware.camera.CameraDataFormatreturns the format of the framefinal longReturns the unique frame identifierfinal doubleReturns the quality of the current frame.final intreturns the height of the framefinal longAccessed from native code to obtain pointer to implementation of native camera framefinal OrientationReturns the orientation of the current frame.final android.graphics.RectFreturns the region that defines the visible part of framefinal intgetWidth()returns the width of the framebooleaninitializeNativePart(long frameAnalyzersPtr) Initializes native part of camera frame implementation.final voidInitialization method.final booleanreturns true if device was moving while frame was createdfinal booleanreturns true if camera thinks this frame is focusedfinal booleanisPhoto()Returns true if frame is photographvoidrecycle()Used for recycling frame buffer back into camera so its buffer can be reused for new camera frame.final voidsetOrientation(Orientation orientation) Sets the orientation of the current frame.final voidsetVisiblePart(android.graphics.RectF visiblePart) sets the region that defines the visible part of frame
-
Field Details
-
mImage
-
-
Constructor Details
-
ImageFrame
-
-
Method Details
-
getWidth
public final int getWidth()returns the width of the frame- Specified by:
getWidthin interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame
-
getHeight
public final int getHeight()returns the height of the frame- Specified by:
getHeightin interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame
-
setVisiblePart
public final void setVisiblePart(@NonNull android.graphics.RectF visiblePart) sets the region that defines the visible part of frame- Specified by:
setVisiblePartin interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame- Parameters:
visiblePart-
-
getFormat
@NonNull public com.microblink.photopay.hardware.camera.CameraDataFormat getFormat()Description copied from interface:com.microblink.photopay.hardware.camera.frame.ICameraFramereturns the format of the frame- Specified by:
getFormatin interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame
-
isFocused
public final boolean isFocused()returns true if camera thinks this frame is focused- Specified by:
isFocusedin interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame
-
isDeviceMoving
public final boolean isDeviceMoving()returns true if device was moving while frame was created- Specified by:
isDeviceMovingin interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame
-
getVisiblePart
@NonNull public final android.graphics.RectF getVisiblePart()returns the region that defines the visible part of frame- Specified by:
getVisiblePartin interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame
-
isPhoto
public final boolean isPhoto()Returns true if frame is photograph- Specified by:
isPhotoin interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame
-
initializeNativePart
public boolean initializeNativePart(long frameAnalyzersPtr) Description copied from interface:com.microblink.photopay.hardware.camera.frame.ICameraFrameInitializes native part of camera frame implementation. This makes getNativeCameraFrame available.- Specified by:
initializeNativePartin interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame- Parameters:
frameAnalyzersPtr- Native pointer to class containing all native elements frame needs (frame quality estimator, white balance analyzer etc.)- Returns:
- true on success, false on failure.
-
recycle
public void recycle()Description copied from interface:com.microblink.photopay.hardware.camera.frame.ICameraFrameUsed for recycling frame buffer back into camera so its buffer can be reused for new camera frame. Also, releases all native part if required.- Specified by:
recyclein interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame
-
getNativeCameraFrame
public final long getNativeCameraFrame()Accessed from native code to obtain pointer to implementation of native camera frame- Specified by:
getNativeCameraFramein interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame
-
getFrameQuality
public final double getFrameQuality()Returns the quality of the current frame. Negative quality indicates that quality is not and cannot be calculated.- Specified by:
getFrameQualityin interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame
-
setOrientation
Sets the orientation of the current frame.- Specified by:
setOrientationin interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame- Parameters:
orientation-
-
getOrientation
Returns the orientation of the current frame.- Specified by:
getOrientationin interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame
-
getFrameID
public final long getFrameID()Returns the unique frame identifier- Specified by:
getFrameIDin interfacecom.microblink.photopay.hardware.camera.frame.ICameraFrame
-
initializePoolObject
public final void initializePoolObject()Initialization method. Called when an object is retrieved from the object pool or has just been created.- Specified by:
initializePoolObjectin interfacecom.microblink.photopay.util.pool.PoolObject
-
finalizePoolObject
public final void finalizePoolObject()Finalization method. Called when an object is stored in the object pool to mark it as free.- Specified by:
finalizePoolObjectin interfacecom.microblink.photopay.util.pool.PoolObject
-