Package com.microblink.blinkid.image
Class ImageFrame
java.lang.Object
com.microblink.blinkid.image.ImageFrame
- All Implemented Interfaces:
com.microblink.blinkid.hardware.camera.frame.ICameraFrame
,com.microblink.blinkid.util.pool.PoolObject
public class ImageFrame
extends Object
implements com.microblink.blinkid.hardware.camera.frame.ICameraFrame
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
Finalization method.com.microblink.blinkid.hardware.camera.CameraDataFormat
returns the format of the framefinal long
Returns the unique frame identifierfinal double
Returns the quality of the current frame.final int
returns the height of the framefinal long
Accessed from native code to obtain pointer to implementation of native camera framefinal Orientation
Returns the orientation of the current frame.final android.graphics.RectF
returns the region that defines the visible part of framefinal int
getWidth()
returns the width of the frameboolean
initializeNativePart
(long frameAnalyzersPtr) Initializes native part of camera frame implementation.final void
Initialization method.final boolean
returns true if device was moving while frame was createdfinal boolean
returns true if camera thinks this frame is focusedfinal boolean
isPhoto()
Returns true if frame is photographvoid
recycle()
Used for recycling frame buffer back into camera so its buffer can be reused for new camera frame.final void
setOrientation
(Orientation orientation) Sets the orientation of the current frame.final void
setVisiblePart
(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:
getWidth
in interfacecom.microblink.blinkid.hardware.camera.frame.ICameraFrame
-
getHeight
public final int getHeight()returns the height of the frame- Specified by:
getHeight
in interfacecom.microblink.blinkid.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:
setVisiblePart
in interfacecom.microblink.blinkid.hardware.camera.frame.ICameraFrame
- Parameters:
visiblePart
-
-
getFormat
@NonNull public com.microblink.blinkid.hardware.camera.CameraDataFormat getFormat()Description copied from interface:com.microblink.blinkid.hardware.camera.frame.ICameraFrame
returns the format of the frame- Specified by:
getFormat
in interfacecom.microblink.blinkid.hardware.camera.frame.ICameraFrame
-
isFocused
public final boolean isFocused()returns true if camera thinks this frame is focused- Specified by:
isFocused
in interfacecom.microblink.blinkid.hardware.camera.frame.ICameraFrame
-
isDeviceMoving
public final boolean isDeviceMoving()returns true if device was moving while frame was created- Specified by:
isDeviceMoving
in interfacecom.microblink.blinkid.hardware.camera.frame.ICameraFrame
-
getVisiblePart
@NonNull public final android.graphics.RectF getVisiblePart()returns the region that defines the visible part of frame- Specified by:
getVisiblePart
in interfacecom.microblink.blinkid.hardware.camera.frame.ICameraFrame
-
isPhoto
public final boolean isPhoto()Returns true if frame is photograph- Specified by:
isPhoto
in interfacecom.microblink.blinkid.hardware.camera.frame.ICameraFrame
-
initializeNativePart
public boolean initializeNativePart(long frameAnalyzersPtr) Description copied from interface:com.microblink.blinkid.hardware.camera.frame.ICameraFrame
Initializes native part of camera frame implementation. This makes getNativeCameraFrame available.- Specified by:
initializeNativePart
in interfacecom.microblink.blinkid.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.blinkid.hardware.camera.frame.ICameraFrame
Used 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:
recycle
in interfacecom.microblink.blinkid.hardware.camera.frame.ICameraFrame
-
getNativeCameraFrame
public final long getNativeCameraFrame()Accessed from native code to obtain pointer to implementation of native camera frame- Specified by:
getNativeCameraFrame
in interfacecom.microblink.blinkid.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:
getFrameQuality
in interfacecom.microblink.blinkid.hardware.camera.frame.ICameraFrame
-
setOrientation
Sets the orientation of the current frame.- Specified by:
setOrientation
in interfacecom.microblink.blinkid.hardware.camera.frame.ICameraFrame
- Parameters:
orientation
-
-
getOrientation
Returns the orientation of the current frame.- Specified by:
getOrientation
in interfacecom.microblink.blinkid.hardware.camera.frame.ICameraFrame
-
getFrameID
public final long getFrameID()Returns the unique frame identifier- Specified by:
getFrameID
in interfacecom.microblink.blinkid.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:
initializePoolObject
in interfacecom.microblink.blinkid.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:
finalizePoolObject
in interfacecom.microblink.blinkid.util.pool.PoolObject
-