Introducing VIDA Identity Stack: All of VIDA, in one place 🎉
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Document Capture Guidelines

Image Specification

Prior to performing document checks or character recognition, the VIDA Document Verification or OCR system undergoes image pre-processing to ensure optimal text recognition accuracy and document verification. This includes evaluating the image size and resolution to meet specific requirements. The system checks that the Card object within the image has dimensions greater than or equal to 400 x 300 pixels (width x height). Additionally, the file size of the image should not exceed 2 MB.

Image Setting
Requirement

Resolution

200 PPI

Minimum camera pixel

Above 2 MP

Image file size

Minimum size: 100 KB Maximum size: 2 MB

Image compression recommendation

Bicubic, with minimum JPEG quality 80%

Image dimension

Minimum dimension: 300 x 400 px Maximum dimension: 4000 x 3000 px

Coverage

The ID document image should occupy 70–80% of the entire image

Borders

All 4 corners clearly visible, with some background around all edges

documentPositionIndent

5

Angle / tilt

Maximum 15°

Lighting

Even, with no overexposed or very dark areas

Supported image formats

JPG/JPEG/PNG

Extra padding

Extra padding of 30 pixels in each card bounding box

To ensure accurate Document Verification and OCR extraction from ID document images, please refer to the guidelines provided in the below Key Image Quality Recommendations section.


Key Image Quality Recommendations for Document Capture

Horizontal Orientation

OCR data extraction and the Document Verification is specifically designed to recognize text that is horizontally oriented on the ID Document. To ensure accurate extraction of data, it is important that the document image is horizontally aligned and not rotated.

Ideal KTP Image

Device Orientation

In the VIDA OCR system, OCR data extraction is optimized to recognize text on the ID Document. To ensure accurate extraction of data, it is crucial that the document image is horizontally aligned, while the device camera orientation should be portrait.

Proper Document Positioning

For optimal Document Verification and OCR data extraction, it is crucial to have a well-positioned document image where the ID Document object is clear, centered, and easily recognisable. If the ID Document within the image is too distant, too close, or unclear, it can adversely affect the system's ability to accurately detect and extract the text, potentially leading to errors in data extraction.

Angle and Tilt

Keep the document flat and hold the camera parallel to its surface. The tilt angle should not exceed 15°. Strong tilt or perspective distortion reduces text recognition accuracy.

Adequate Lighting

In order to achieve accurate text recognition, it is essential to capture document images under even lighting. Avoid overexposed areas that wash out the text, and avoid very dark areas or shadows that make the text hard to read. Low or uneven lighting conditions can pose challenges for the Document Verification and OCR system to accurately recognize text. Therefore, it is highly recommended to capture document images in good lighting conditions to ensure clear and easily recognizable text.

Avoid Glare

Glare or reflections on the document surface can interfere with text recognition and lead to errors in data extraction. It is important to avoid glare by taking the document image in an environment with minimal light reflection, and by avoiding direct light on the document.

KTP CARD Illustration - Avoid Glare
Passport Illustration - Avoid Glare

Avoid Defects

Defects in the document image, such as folds, creases, or stains, can interfere with Document Verification and OCR text recognition and lead to errors in data extraction. It is recommended to ensure that the document is clean and free of any defects before scanning or taking the image.

KTP CARD Illustration - Avoid Defects
Passport Illustration - Avoid Defects

Avoid Blur

The image must be in focus. A blurry image can disrupt the Document Verification and OCR process and result in errors. Prevent blur by holding your device stable while capturing, using auto-focus, and ensuring the image resolution is high.

Image Too Far

Ensuring the correct distance while capturing the image is important. The ID Document needs to be clearly visible and should occupy 70–80% of the entire image for the Document Verification and OCR system to accurately detect and extract the text.

  • Too far (under 70%): The text becomes too small to be detected and extracted accurately. Capture the image from a closer distance or zoom in.

  • Too close (over 80%): There is little or no background around the document, so corners and edges may be clipped. Move the camera back until all 4 corners and some background are visible.

The ID Document should occupy 70–80% of the entire captured image.

Avoid Cropped Area

A cropped image can disrupt Document Verification and OCR performance and result in the wrong character recognition. The ID Document needs to be clearly visible. If some text areas are cropped, the OCR cannot recognize the whole character.

Illustration - Avoid KTP Card Getting Cropped
Illustration - Avoid Passport Getting Cropped

Avoid ID Card Without Background or Padding

A full-frame image with no padding makes it difficult for the system to detect the ID document properly. Ensure the ID is captured with all 4 corners clearly visible and some background around all edges to improve verification and spoof-detection accuracy. The document should still stay within 70–80% of the image, so it is neither too tight nor too small.

Passport Photo Framing Requirement

To ensure the system classifies your upload correctly as a cropped document, please follow these framing rules:

  • Fill ratio: The passport should occupy approximately 70–80% of the image.

  • Context space: Leave approximately 20–30% of the image as background around the passport, so a visible border remains on all sides.

  • Keep all edges visible: Make sure the entire passport is in frame, including all 4 corners (no cut-offs).

  • Positioning: Place the passport centered and keep it flat (maximum tilt of 15°, no strong perspective).

  • Image quality: Use even lighting, avoid glare and shadows, and keep the passport details readable and in focus.

Common mistakes to avoid

  • Too close: the passport fills more than 80% of the image (tight crop, little or no border).

  • Too far: the passport fills less than 70% of the image (too much background).


Image Condition and Recommendation

Image Condition
Recommendation

Ideal Condition

NA

The image is rotated and should be avoided

Capture the image in a horizontal position

The image is too far (under 70%) and should be avoided

Capture the image from a closer distance or zoom in

The image is too close (over 80%) or has no background and should be avoided

Move back so all 4 corners and some background are visible

The image is tilted more than 15° and should be avoided

Hold the camera parallel to the document

The image has defects and should be avoided

Ensure the ID Document is free of defects before capturing the image

The image is blurry and should be avoided

Hold the device steady and use auto-focus

The image is captured in low, uneven, or overexposed lighting and should be avoided

Ensure even, adequate lighting is present to properly illuminate the ID Document

The image has glare and should be avoided

Position the ID Document and camera to avoid direct light reflection


Landmark Verification (Cropped Card Detection)

The guidelines above describe how to capture a good image. Landmark Verification is the automated check that enforces them for KTP: it confirms the card is well framed and is actually a KTP before the document moves into OCR and identity verification. When the card's content is cut off at the edge of the frame, it returns a clear instruction to recapture.

What it checks

Landmark Verification inspects each KTP image and looks for two problems:

  • Cropped content: the card's text or portrait sits too close to an edge, so detail may be clipped.

  • Incorrect / non-KTP layout: the landmarks aren't arranged the way a KTP's are, which usually means a different document was submitted.

This covers content framing and layout. Objects placed on top of the card (full or partial occlusion) and the missing-landmark case are handled separately.

What your users will see

✅ Pass: card fully visible

The card and all four landmark anchors (Provinsi, NIK, Name, Portrait) sit comfortably inside the frame. No message is shown and the image proceeds to verification.

⚠️ Card content too close to the edge

The card text, portrait, province, or expiry line sits right against an edge of the image, so detail may be clipped.

Message shown to user: "Card contents may not be fully visible. Please re-capture the card with all four edges within the frame."

API component: content_close_to_edge

❌ Layout doesn't match a KTP

The landmarks aren't arranged the way a KTP's are: Provinsi isn't at the top, the portrait isn't on the right, or the field order is off. Typically this means a different document was submitted (for example, a driving license / SIM).

Message shown to user: "Card may not be a KTP."

API component: component_position

How it appears in the API response

Results are returned inside the landmark_verification array. Each entry is a named check with a pass / fail status. Read the individual components to drive your own messaging.

JSON Response

What each component means

Component
Role
Fails When...

content_close_to_edge

Recapture

The card's content sits too close to any side of the image.

component_position

Wrong document

The landmark arrangement isn't consistent with a KTP, surfaced as "Card may not be a KTP."

Tip:

  • content_close_to_edge asks "is the capture framed correctly?"

  • component_position asks "is this actually a KTP?"

Last updated