Use Cases

Remote Autocapture

One use case for Knomi Document Analyzer is performing automatic capture of a document once it meets certain criteria. Knomi Document Analyzer’s REST interface allows for this functionality even in cases where native code cannot be used, such as in a web browser.

To implement this use case, the following end points are used:
  • /getCaptureRegion
  • /autocaptureDocument

/getCaptureRegion is used as an aid in building a usable GUI for an application. It is not strictly required for the use case, but it is recommended. This endpoint produces a rectangle describing where in the image the document is expected in order to capture. This will help improve usability and increase successes in using your application.

/autocaptureDocument is the primary endpoint used in this use case. This endpoint provides information on whether one of the provided images meets the criteria for capture. This information is provided in the form of feedback codes, which are detailed below. These feedback codes will either convey that the document has been captured in the image or if the document is incorrectly positioned along with the reason why. By using the feedback codes and displaying appropriate messages to the user, they can be guided into capturing a document.

Feedback

Description

Here is the list of feedback codes that can be received from the /autocaptureDocument endpoint. It is not recommended that the descriptions be used directly in an application. Instead, consider how a user is interacting with the application and write an instruction for the user. For example, for TOO_FAR a proper message to the user could be “Move the document closer to the camera”.

Entries

DOCUMENT_FOUND - The document was found and is in the correct position in the image.

DOCUMENT_NOT_FOUND - There is no document present in the image.

TOO_FAR - The document is too far from the camera. Bring the camera closer to the document.

TOO_CLOSE - The document is too close to the camera. Bring the camera further away from the document.

TOO_BLURRY - The document is blurry or out of focus. Stop moving the camera and focus the lens.

OFF_ANGLE - The document is at an off angle from the camera. The document should be parallel to the camera.

WRONG_DOCUMENT - A document was detected, but it does not meet the criteria of the desired document to be captured.