//scanning/com.pixelnetica.scanning/FrameObserver

FrameObserver

[androidJvm]
class FrameObserver : ScanningSdkLibrary.Instance

Analyze camera frame(s) and compute characteristics All methods of this class can be called from different threads

Used internally for Camera

Constructors

   
FrameObserver [androidJvm]
constructor()

Types

Name Summary
Average [androidJvm]
data class Average(val cutout: ScanCutout, val fullness: Float)
Get cutout average with fullness
Observation [androidJvm]
data class Observation(val flags: Int, val delay: Float, val fullness: Float, val distortion: Float, val image: Bitmap?)
Current frame observation result

Functions

Name Summary
average [androidJvm]
external fun average(width: Int, height: Int, transform: Matrix): FrameObserver.Average
Get current average result and scale it to
duplicate [androidJvm]
external fun duplicate()
Add last detection result to average Used to smooth cutout
observe [androidJvm]
@JvmOverloads
external fun observe(buffer: ByteArray, width: Int, height: Int, format: Int, rotation: Int = 0, viewfinder: Rect? = null): FrameObserver.Observation
Performs frame observation
reset [androidJvm]
external fun reset(pause: Boolean)
Perform reset to start new detection and average session
Top