PxFrameObserver Class

@interface PxFrameObserver : NSObject

Detects when a document’s corners are stable across camera frames, so the app knows when it is safe to capture a still.

Instance Properties

NameSummary
checkedDistortionThe distortion (perspective skew) measured by the most recent observe:.
checkedFullnessThe fullness measured by the most recent observe: — how much of the frame the document fills.

Instance Methods

NameSummary
average:transform:width:height:Writes the accumulated average cutout, scaled to the given dimensions and transformed by the given matrix, into cutout.
average:width:height:Writes the accumulated average cutout, scaled to the given dimensions, into cutout.
duplicateRe-adds the last detection result to the accumulated average, smoothing the cutout across frames. Does nothing if there is no prior detection result.
observe:Detects the document corners in a frame and accumulates them into the current state.
observe:roi:Detects the document corners within a region of a frame and accumulates them into the current state.
reset:Starts a new detection session.

Relationships

Inherits From

  • NSObject
Top