Kofax Mobile SDK API Reference
Enumerations | Variables
kfxKEDBasicSettingsProfile.h File Reference
#import <Foundation/Foundation.h>
#import "kfxKEDBoundingTetragon.h"

Go to the source code of this file.

Enumerations

enum  KEDRotationOptions {
  KED_ROTATE_NONE, KED_ROTATE_90, KED_ROTATE_180, KED_ROTATE_270,
  KED_AUTOMATIC
}
 
enum  KEDOutputColor { KED_BITDEPTH_BITONAL = 1, KED_BITDEPTH_GRAYSCALE = 8, KED_BITDEPTH_COLOR = 24 }
 
enum  KEDCroppingOptions {
  KED_CROP_NONE, KED_CROP_AUTO, KED_CROP_TETRAGON, KED_CROP_WITH_QUICK_ANALYSIS_RESULTS,
  KED_CROP_LAST
}
 Cropping Options enumeration. More...
 

Variables

__deprecated_msg("This class was deprecated in SDK 3.3. Please use KFXImageProcessorConfiguration instead.")@interface kfxKEDBasicSettingsProfile KEDCroppingOptions doCrop
 Basic Settings Profile Specifies Image Processing options. More...
 
bool doDeskew
 Deskew an output image. More...
 
float inputDocShortEdge
 Length of the shortest edge of the original. More...
 
float inputDocLongEdge
 Length of the longest edge of the original. More...
 
kfxKEDBoundingTetragoncroppingTetragon
 Tetragon corner points defining the image cropping limits. More...
 
int outputDPI
 Desired Output image DPI. More...
 
KEDOutputColor outputBitDepth
 Desired Output Bitdepth. More...
 
int specifyOutputBitDepth
 Desired Output Bitdepth. More...
 
int specifyOutputDPI
 Desired Output DPI. More...
 
instancetype init
 Init defaults for a basic settings profile. More...
 
instancetype initForStandardBitonalWithDPI
 Init defaults for a bitonal image. More...
 
instancetype initForStandardGrayscaleWithDPI
 Init defaults for a grayscale image. More...
 
instancetype initForStandardColorWithDPI
 Init defaults for a color image. More...
 
NSString * decodeCroppingOption
 Generate a string from cropping option given. More...
 
NSString * decodeBitDepth
 Generate a string from the bitDepth option given. More...
 
NSString * decodeRotateOpt
 Generate a string from rotations option given. More...
 

Enumeration Type Documentation

Cropping Options enumeration.

Use this enumeration to specify the type of cropping you want to perform on the image. The KED_CROPPING_LAST item can be used to make sure you only give your users options less than this value. The following options can be specified:
KED_CROP_AUTO to automatically crop to the edges of the page found in the image, assuming the image has page edges.
KED_CROP_TETRAGON to indicate you want the image cropped to a user supplied tetragon, as provided in the croppingTetragon property.
KED_CROP_WITH_QUICK_ANALYSIS_RESULTS when you have previously performed a quick analysis of an input image, and the cropping results are returned in the input image object. Use this option to use these page boundaries, which will reduce image processing time. The Image Processor uses the image meta data stored in the image object after the quick analysis is performed.
You can use the class method decodeCroppingOption to get a string representation of the cropping option.

Enumerator
KED_CROP_NONE 
KED_CROP_AUTO 
KED_CROP_TETRAGON 
KED_CROP_WITH_QUICK_ANALYSIS_RESULTS 
KED_CROP_LAST 
Enumerator
KED_BITDEPTH_BITONAL 
KED_BITDEPTH_GRAYSCALE 
KED_BITDEPTH_COLOR 
Enumerator
KED_ROTATE_NONE 
KED_ROTATE_90 
KED_ROTATE_180 
KED_ROTATE_270 
KED_AUTOMATIC 

Variable Documentation

kfxKEDBoundingTetragon* croppingTetragon
readwritenonatomicstrong

Tetragon corner points defining the image cropping limits.

Use this object to specify the corner points of a tetragon (or rectangle) for cropping an image. If this object contains any point coordinates that are non-zero, the image processing (IP) engine will not perform automatic page detection, but will use these coordinate points instead. It may represent a rectangle, in which case the image will not be stretched to make it into a rectangle. If the corners represent a tetragon, the cropped image will be cropped to these coordinages and stretched to adjust an image of a document that was skewed in three orientations. If the bounding rectangle coordinates are all 0, then no manual cropping is performed by the image processing engine. Instead the image processor will perform normal page detection using internal algorithms to find page edges, crop (if enabled) and stretch using these page edges.

NSString* decodeBitDepth

Generate a string from the bitDepth option given.

Use this method to generate a string that represents the meaning of the outputcolor option given to this class method. This is useful for debugging when you want to display the contents of the basic settings profile object.

See also
KEDOutputColor
Returns
NSString* defining the current definition of the option.
NSString* decodeCroppingOption

Generate a string from cropping option given.

Use this method to generate a string that represents the meaning of the cropping option given to this class method. This is useful for debugging when you want to display the contents of the basic settings profile object.

See also
KEDCroppingOptions
Returns
NSString* defining the current definition of the option.
NSString* decodeRotateOpt

Generate a string from rotations option given.

Use this method to generate a string that represents the meaning of the rotation option given to this class method. This is useful for debugging when you want to display the contents of the basic settings profile object.

See also
KEDRotationOptions
Returns
NSString* defining the current definition of the option.
__deprecated_msg ("This class was deprecated in SDK 3.3. Please use KFXImageProcessorConfiguration instead.") @interface kfxKEDBasicSettingsProfile KEDCroppingOptions doCrop
readwritenonatomicassign

Basic Settings Profile Specifies Image Processing options.

Framework: libKfxEngines
Import suggestion: #import <kfxLibEngines/kfxEngines.h>
An instance of this class contains the simple image processing options that you want to perform on an image. These define the standard crop, deskew and rotation options. You can also use this object to specify the output image DPI and the desired color. You specify the output color by setting outputBitDepth to 1 for bitonal images, 8 for grayscale, or 24 for color. The image processor outputs a new image with the bitmap in one of these colors. The cropping Tetragon defines bounding corner points of an area of an image that you want to crop, and override automatic page detection.
If the outputDPI is >= 300 DPI, and the outputBitDepth is 1, then the image processing includes enhanced binarization, otherwise it uses standard binarization.

Serialization**

This class adopts the NSCoding protocol so that this object may be archived and unarchived using the iOS standard [NSKeyedArchiver archiveRootObject:<object> toFile: archiveFileName]; approach. Using keyed archive files, you can save this object for later use. The library supports backward compatibility, such that as a new version of an app that uses the API in this SDK, includes a newer versions of the SDK libraries that have data model changes, the older archive can still be read by the newer version. However, it is not a design goal to archive and dearchive with forward compatibility, such as decoding an archive on a newer version of the class, using an older library.

Refer to the kfxKEDImage class description, by expanding the class description, that describes how to archive and unarchive objects in this framework that adopt the NSCoding protocol.
You can create keyed archives using NSKeyedArchiver objects and decoded by NSKeyedUnarchiver objects. The framework design uses keyed archives, which differ from sequential archives, in that every value encoded in a keyed archive is given a Kofax unique key name. When you decode an archive, the underlying implementation can use values by name, allowing the unarchive delegate to request values in any order or not at all.
Please refer to the Apple documentation for more information: https://developer.apple.com/library/ios/documentation/cocoa/reference/foundation/Classes/NSCoder_Class/Reference/NSCoder.html

Keyed Archiving* https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSKeyedArchiver_Class/Reference/Reference.html#//apple_ref/occ/cl/NSKeyedArchiver

Keyed Unarchiving* https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSKeyedUnarchiver_Class/Reference/Reference.html#//apple_ref/occ/instm/NSKeyedUnarchiver Provides a simple way to enable rotation using the enum options in KEDRotationOptions. Default: KED_ROTATE_NONECrop image to a user specified option Provides a simple way to crop an image. Choose from three options specified in the KEDCroppingOptions enum.
KED_CROP_NONE: Set this option to perform no image cropping.
KED_CROP_AUTO: The library automatically finds the bounding tetragon around the document of interest, and crops to this boundary. Automatic cropping entails finding page boundaries, stretching the image into a rectangle if necessary, and cropping the image to the found sheet boundaries. This means that, in order to crop, the input image should have some sheet borders.
KED_CROP_TETRAGON: Use this option when you want to supply the tetragon around the page edges. This boundary is defined externally by the Review and Edit UI control, or automatically by image processing.
Default: KED_CROP_NONE

bool doDeskew
readwritenonatomicassign

Deskew an output image.

Provides a simple way to deskew an image when set to true. The image processor deskews the image after it is properly cropped to sheet boundaries. Default: false

instancetype init

Init defaults for a basic settings profile.

Use this method to create a basic settings profile object for use in your app.
The method sets up the object with the defaults. You may modify them of course after you get your object reference.
doRotate = KED_ROTATE_NONE;
doCrop = KED_CROP_NONE;
doDeskew = false;
outputDPI = 0;
outputBitDepth = KED_BITDEPTH_COLOR;
inputDocShortEdge = 0.0;
inputDocLongEdge = 0.0;
croppingTetragon = [[kfxKEDBoundingTetragon alloc] init];

1 kfxKEDBasicSettingsProfile * myBasic;
2 myBasic = [[kfxKEDBasicSettingsProfile alloc] init];
Returns
A kfxKEDBasicSettingsProfile object
instancetype initForStandardBitonalWithDPI

Init defaults for a bitonal image.

Use this method to create a basic settings profile object for use in your app.
The method sets the following parameters automatically for you. You may modify them of course after you get your object reference... doRotate = KED_AUTOMATIC;
doCrop = KED_CROP_AUTO;
doDeskew = true;
outputDPI = <the dpi="" you="" specified>="">;
outputBitDepth = KED_BITDEPTH_BITONAL;
inputDocShortEdge = 0.0;
inputDocLongEdge = 0.0;
croppingTetragon = [[kfxKEDBoundingTetragon alloc] init]; // Ready for adding

1 kfxKEDBasicSettingsProfile * myBasic;
2 myBasic = [[kfxKEDBasicSettingsProfile alloc] initForStandardBitonalWithDPI:300];
Returns
A kfxKEDBasicSettingsProfile object
instancetype initForStandardColorWithDPI

Init defaults for a color image.

Use this method to create a basic settings profile object for use in your app.
The method sets the following parameters automatically for you. You may modify them of course after you get your object reference... doRotate = KED_AUTOMATIC;
doCrop = KED_CROP_AUTO;
doDeskew = true;
outputDPI = <the dpi="" you="" specified>="">;
outputBitDepth = KED_BITDEPTH_COLOR;
inputDocShortEdge = 0.0;
inputDocLongEdge = 0.0;
croppingTetragon = [[kfxKEDBoundingTetragon alloc] init]; // Ready for adding

1 kfxKEDBasicSettingsProfile * myBasic;
2 myBasic = [[kfxKEDBasicSettingsProfile alloc] initForStandardColorWithDPI:240];
Returns
A kfxKEDBasicSettingsProfile object
instancetype initForStandardGrayscaleWithDPI

Init defaults for a grayscale image.

Use this method to create a basic settings profile object for use in your app.
The method sets the following parameters automatically for you. You may modify them of course after you get your object reference... doRotate = KED_AUTOMATIC;
doCrop = KED_CROP_AUTO;
doDeskew = true;
outputDPI = <the dpi="" you="" specified>="">;
outputBitDepth = KED_BITDEPTH_GRAYSCALE;
inputDocShortEdge = 0.0;
inputDocLongEdge = 0.0;
croppingTetragon = [[kfxKEDBoundingTetragon alloc] init]; // Ready for adding

1 kfxKEDBasicSettingsProfile * myBasic;
2 myBasic = [[kfxKEDBasicSettingsProfile alloc] initForStandardGrayscaleWithDPI:200];
Returns
A kfxKEDBasicSettingsProfile object
float inputDocLongEdge
readwritenonatomicassign

Length of the longest edge of the original.

Use this property to set the length of the longest edge of the original document in inches. The library uses this parameter to correctly estimate the output image DPI and also helps algorithms better estimate document corners, especially when one is outside the boundary of the image. You need not set both short and long edges, the algorithm uses one if it is present. If you set it to 0.0, then the library will not use this parameter. Default: 0.0

float inputDocShortEdge
readwritenonatomicassign

Length of the shortest edge of the original.

Use this property to set the length of the shortest edge of the original document in inches. The library uses this parameter to correctly estimate the output image DPI and also helps algorithms better estimate document corners, especially when one is outside the boundary of the image. You need not set both short and long edges, the algorithm uses one if it is present. If you set it to 0.0, then the library will not use this parameter. Default: 0.0

KEDOutputColor outputBitDepth
readwritenonatomicassign

Desired Output Bitdepth.

Use this property to set the desired output bitdepth (bitonal, greyscale, or color). This should be set to one of the available values in the KEDOutputColor enum.

int outputDPI
readwritenonatomicassign

Desired Output image DPI.

Use this property to set the desired output image DPI (Dots Per Inch). If you set it to 0, then the library will automatically detect the output image DPI and indicate it in the output object. Default: 0

int specifyOutputBitDepth

Desired Output Bitdepth.

Use this method to set the desired output bitdepth (bitonal, greyscale, or color). This should be set to one of the available values in the KEDOutputColor enum.

Returns
KMC_ED_INVALID_COLOR if the outputBitDepth is invalid, and not one of the enum values.
int specifyOutputDPI

Desired Output DPI.

Use this method to set the desired output image DPI setting. If you set it to 0, then the library will automatically detect the output image DPI and indicate it in the output object.

Returns
KMC_ED_INVALID_DPI when the DPI is invalid.
Untitled Document © 2018 Kofax, Inc. All rights reserved. Use is subject to license terms.