Document Scanning SDK for Apple iOS  2.5.2
Document Scanning Demo application Brief guide

To demonstrate most of Document Scanning SDK features and the way how they should be used in real application we prepared demo application available in source codes available by request.

⚠️ Important Note.

Demo application source code provided “as is” without warranties of any kind. It could be freely used in commercial product only in case of commercial DSSDK license purchase.

Importing document from camera.

To assist user in getting best possible document scan a Smart Camera module with live document boundaries detection mode been implemented.

In camera mode application searching for Document boundaries and if been detected draw preview frame around detected document. Also Smart Camera controls Effective Document area (the area the document occupies in the viewfinder) and Document trapezoid distortion.

In case of Auto Shot enabled in Settings (default value) time out counter will start. If during timeout delay (set in Settings with default of 0.7 sec) document boundaries will not change shot will be taken automatically without user intervention.

If Document boundaries were not found or their detection quality is not sufficient than a text message displayed (“Looking for document”).

In case if document been placed too far from camera (Effective Document area too small) Bring camera closer to document message will appear.

When user making shots holding camera with significant angle to document then specific trapezoid distortion will appear. DSSDK will correct this, but quality loss is probable (e.g. some document areas could be out of focus or blured). In such cases Smart Camera will ask user to Hold camera parallel to document.

Main purpose of these measures is to minimize human factor and enforce user to take a shot only when document properly placed and detected in viewfinder.

User could reposition camera over document, place document to more contract background or increase lighting to achieve better results.

Live mode has only assistance purpose since user still has possibility to make a shot at any moment manually by tapping on camera button or anywhere on camera viewfinder.

This could be suitable when he can't change environment conditions or limited in time and ready for further manual correction.

Importing Documents from Album.

Importing from Album relies on SmartCrop setting located in Settings menu.

"Settings" menu

SmartCrop.

If been enabled than document boundaries manual correction will be offered only if border detection quality was not good enough. In case of well detected boundaries document will be cropped, perspective correction and chosen color profile applied. If switched off, then manual correction will always be offered.

Color Processing profiles.

Chosen color profile will be applied to next imported image.

Below brief description of color profiles.

  • Original

Image will be retained as is (cropping and perspective correction will be applied according document borders detected or manually set).

  • Black & White

Image will be processed as black and white. Recommended for document archiving and situations when document size is critical (e.g. weak network connection).

  • Gray

Image will be processed as grayscale. Good for comfortable eye reading or further OCR processing (depends on exact OCR engine image preprocessing).

  • Color

Image will be processed as color. Recommended for situation when document colors retention is critical.

Document borders detectors

Switches ON and OFF document boundary detection in Smart Camera

AutoShot

Activate or disable Smart Camera Autoshot feature. When switched OFF user will have initiate shot manually.

Autoshot delay

Set time interval when all Smart Camera features should be met to initiate automatic shot.

Save Format

Defines document output format.

  • PDF - generate standard PDF file from memory. Recommended method.
  • PDF from PNG - creates PDF from previously saved PNG file. Could be useful in some cases. Also consumes bit less memory.
  • TIFF G4 - creates very small Black&White bitmap image file. Important: despite of input always convert to B&W. Should be used only with image already processed with B&W profile.
  • PNG - creates PNG file.
  • JPG - creates JPG.

Simulate multi-page file

Added to demonstrate how to create multi-page PDF and TIFF files. When enabled write same page in same file three time in row.

Save

Opens standard iOS Sharing dialogue. Saves document in format set in Settings