SDK main API class.
More...
#import <PxSDK.h>
◆ correctDocument:corners:()
Corrects document perspective distortions in the image, warping corners to corrected image rectangle.
- Parameters
-
image | source image containig the document |
corners | 4 corners in the source image coordinate space with the following sequence: (top;left), (top;right), (bottom;left), (bottom:right). Origin point (0,0) is top-left corner of source image. All 4 corners are within the source image. |
- Returns
- image containing the document without perpective distortions.
◆ detectDocumentCorners:docCorners:()
Detects document in the page image and saves document detection quality into the page.
- Parameters
-
image | source image containig the document |
docCorners | detection parameters on input and receives detection result on output |
- Returns
- YES on success, otherwise NO.
◆ imageBWBinarization:()
- Parameters
-
- Returns
- black/white binarized image.
◆ imageColorBinarization:()
- Parameters
-
- Returns
- color binarized image.
◆ imageGrayBinarization:()
- Parameters
-
- Returns
- gray (monochrome) binarized image.
◆ imageOriginal:()
Returns new image with orientation reset to normal.
- Parameters
-
- Returns
- thr resulting image.
◆ imageWithoutRotation:()
Creates a new UIImage as a copy of source image with applying UIImageOrientation flag to it.
- Parameters
-
- Returns
- rotated image.
◆ regulateDocumentCorners:()
+ (BOOL) regulateDocumentCorners: |
|
(PxPoint) |
corners[_Nonnull 4] |
|
Try to regulate document corners compliance to order UL-UR-BL-BR.
- Parameters
-
corners | document corners to validate |
- Returns
- true if corners are valid and regulation was successful.
◆ supportedImageSize:()
+ (CGSize) supportedImageSize: |
|
(CGSize) |
imageSize |
|
Returns max supported image size. This function is not thread safe.
- Parameters
-
imageSize | input image size |
- Returns
- maximal supported image size. Special case: for input (-1, -1) returns maximal image dimensions.
◆ validateDocumentCorners:width:height:()
+ (BOOL) validateDocumentCorners: |
|
(const PxPoint) |
corners[_Nonnull 4] |
width: |
|
(uint) |
width |
height: |
|
(uint) |
height |
|
|
| |
Check document corners validity.
- Parameters
-
corners | document corners to validate |
width | rotated image width |
height | rotated image height |
- Returns
- true if corners are valid.