Kofax Mobile SDK API Reference
Instance Methods | List of all members
<kfxKUIImageCaptureControlDelegate> Protocol Reference

This protocol must be implemented by classes whose objects are used as kfxKUIImageCaptureControl delegates. More...

#import <kfxKUIImageCaptureControl.h>

Inheritance diagram for <kfxKUIImageCaptureControlDelegate>:
kfxKUICaptureExperience KFXQuickExtractorAgent kfxKUIDocumentBaseCaptureExperience KFXFixedAspectRatioCaptureExperience kfxKUICheckCaptureExperience kfxKUIDocumentCaptureExperience KFXPassportCaptureExperience

Instance Methods

(void) - imageCaptureControl:stabilityDelay:
 A message that indicates the current stability of the device. More...
 
(void) - imageCaptureControl:imageCaptured:
 A message that indicates that an image was captured. More...
 
(void) - imageCaptureControl:imageCapturedEvent:
 A message that indicates that an image was captured. More...
 
(void) - imageCaptureControl:pitchChangedTo:rollChangedTo:
 A message that indicates the current pitch and roll. More...
 
(void) - imageCaptureControl:focusStateChanged:
 A message that indicates the camera has begun or finished focusing. More...
 
(void) - imageIsAboutToCaptureForControl:
 A message that indicates that an image is about to capture. More...
 
(void) - imageCaptureControl:imageJustCaptured:
 A message that indicates that an image is just captured. More...
 
(void) - imageCaptureControl:videoSampleAvailable:
 A message that is dispatched whenever a new video sample is available from the camera. More...
 
(void) - imageCaptureControl:pageDetected:
 A message that indicates page detection has located a document in the camera preview. More...
 

Detailed Description

This protocol must be implemented by classes whose objects are used as kfxKUIImageCaptureControl delegates.

This defines protocol messages that will be sent to kfxKUIImageCaptureControl delegate objects.

Method Documentation

- (void) imageCaptureControl: (kfxKUIImageCaptureControl *)  imageCaptureControl
focusStateChanged: (BOOL)  isFocused 
optional

A message that indicates the camera has begun or finished focusing.

A message that indicates the camera has begun or finished focusing, where the boolean value NO indicates the camera is focusing, or YES, that focusing is complete

- (void) imageCaptureControl: (kfxKUIImageCaptureControl *)  imageCaptureControl
imageCaptured: (kfxKEDImage *)  DEPRECATED_ATTRIBUTE 
optional

A message that indicates that an image was captured.

A message that indicates that an image was captured. The control will wait until the desired stability, levelness, and camera adjustments are met and then capture an image and send it with this message.

Deprecated:
Deprecated in 3.5.
- (void) imageCaptureControl: (kfxKUIImageCaptureControl *)  imageCaptureControl
imageCapturedEvent: (kfxKEDImageCapturedEvent *)  imageCapturedEvent 
optional

A message that indicates that an image was captured.

A message that indicates that an image was captured. The control will wait until the desired stability, levelness, and camera adjustments are met and then capture an image and send it with this message.

If glareDetection is enabled and glare is detected the user would have glareFreeImage in the imageCapturedEvent. Otherwise, it would be nil. User will be always thrown this message, if doesn't implement this, then it would fallback to the deprecated message.

- (void) imageCaptureControl: (kfxKUIImageCaptureControl *)  imageCaptureControl
imageJustCaptured: (kfxKEDImage *)  image 
optional

A message that indicates that an image is just captured.

A message that indicates that an image is just captured.

- (void) imageCaptureControl: (kfxKUIImageCaptureControl *)  imageCaptureControl
pageDetected: (kfxKUIPageDetectionEvent *)  event 
optional

A message that indicates page detection has located a document in the camera preview.

When page detection locates a document, it dispatches this message with the kfxKUIPageDetectionEvent. The event includes the preview image that was processed by page detection, and the bounding coordinates of the detected page.

The handler is being invoked only when ImageCaptureControl is using in conjuction with CaptureExperience.

While the handler is being run, the rest of the pipeline will block. Any new video frames that would have been available from the camera during this time will be discarded. When the handler finishes, the rest of the capture logic will be processed normally.

The handler is being invoked from internal SDK thread, and its highly recommended to make implementation lightweight with no blocking. Consider to access kfxKUIPageDetectionEvent properties within sender thread.

Example code.

- (void)imageCaptureControl:(kfxKUIImageCaptureControl*)imageCaptureControl pageDetected:(kfxKUIPageDetectionEvent*)event
{
UIImage* image = [event getImage];
kfxKEDBoundingTetragon* bounds = [event getPageBounds];
dispatch_async(dispatch_get_main_queue(), ^
{
// Update UI with using image and bounds
});
}
Parameters
imageCaptureControlThe capture control dispatching the message.
eventThe event with the preview image and bounding coordinates of the detected page.
See also
kfxKUIPageDetectionEvent
- (void) imageCaptureControl: (kfxKUIImageCaptureControl *)  imageCaptureControl
pitchChangedTo: (int)  pitch
rollChangedTo: (int)  roll 
optional

A message that indicates the current pitch and roll.

A message that indicates the current angles of pitch and roll of the device. Both pitch and roll are angles in degrees.

- (void) imageCaptureControl: (kfxKUIImageCaptureControl *)  imageCaptureControl
stabilityDelay: (int)  stabilityDelay 
optional

A message that indicates the current stability of the device.

A message that indicates the current stability, which is a number from 0-100, where 100 means that the device is completely stable and 0 is the maximum instability.

- (void) imageCaptureControl: (kfxKUIImageCaptureControl *)  imageCaptureControl
videoSampleAvailable: (CMSampleBufferRef)  videoSample 
optional

A message that is dispatched whenever a new video sample is available from the camera.

As the control processes video frames from the camera preview, the handler for this message will be called before any other processing takes place.

While the handler is being run, the rest of the pipeline will block. Any new video frames that would have been available from the camera during this time will be discarded. When the handler finishes, the rest of the capture logic will be processed normally. If built-in features such as page detection or stability would create redundant work or undesirable behavior, then they should be disabled.

The handler is being invoked from internal SDK thread, and its highly recommended to make implementation lightweight with no blocking and avoiding sample buffer retain.

Parameters
imageCaptureControlThe capture control dispatching the message.
videoSampleThe camera preview sample buffer in kCVPixelFormatType_32BGRA format.
- (void) imageIsAboutToCaptureForControl: (kfxKUIImageCaptureControl *)  imageCaptureControl
optional

A message that indicates that an image is about to capture.

A message that indicates that an image is about to capture. This message will be called just before the image is captured.


The documentation for this protocol was generated from the following file:
Untitled Document © 2018 Kofax, Inc. All rights reserved. Use is subject to license terms.