# Pre-processing

Pre-processing (or image processing) prepares the captured screen image before it's sent to the OCR engine for text recognition.

**Important:** Pre-processing is primarily useful for **traditional OCR engines** (Tesseract OCR and Windows OCR). If you're using **modern OCR engines** like Fast OCR or **AI-based engines** (Google Cloud Vision, Azure Cloud Vision, LLM-based engines), you can skip pre-processing as these engines handle various image conditions automatically.

<div data-full-width="false"><figure><img src="/files/m2CBTbrWAsgg1Xk7vJsp" alt=""><figcaption></figcaption></figure></div>

#### **When to Use Pre-processing**

Use pre-processing when:

* You're using **Tesseract OCR** or **Windows OCR**
* Game text has colored or complex backgrounds
* There's low contrast between text and background
* OCR accuracy is poor without adjustments

Skip pre-processing when:

* You're using **Fast OCR**, **EasyOCR**, or other modern engines
* You're using **AI-based engines** (Qwen 2.5 VL, GPT-4 Vision, Claude Vision)
* You're using **cloud-based engines** (Google Cloud Vision, Azure Cloud Vision)

***

### Pre-processing Options

#### **Image Upscaler** (OCR Master)

Increases the resolution or size of the captured image. Higher resolution can help the OCR engine recognize small or blurry text more accurately.

#### **Image Filter** (OCR Master)

Removes background colors and enhances text visibility. There are three filter options:

* **Black Text Filter**
  * Converts the image to show black text on a white background
* **White Text Filter**
  * Converts the image to show white text on a black background
* **Color Text Filter**
  * Preserves text colors while removing background

<figure><img src="/files/AoZvFSpwMjMIeQ1YeVVZ" alt=""><figcaption></figcaption></figure>

<div data-full-width="false"><figure><img src="/files/PbKDypKdfp8gsLSDmoLg" alt=""><figcaption></figcaption></figure> <figure><img src="/files/CXNzKLFK1kndRsvXmNE4" alt=""><figcaption></figcaption></figure></div>

#### Image Adjustments

Fine-tune the captured image for better text recognition:

* **Greyscale**&#x20;
  * Converts the image to black and white (removes all colors)
* **Normalize**
  * Automatically adjusts image brightness and contrast
  * Adjust the threshold value to make text stand out more clearly
* **Invert**
  * Swaps black and white colors in the image
* **Threshold**
  * Controls the contrast between text and background
  * Adjust the threshold value to make text stand out more clearly
* **Lightness**
  * Adjusts the overall lightness of the image
* **Brightness**
  * Adjusts how bright or dark the image appears
* **Sharpen**
  * Makes text edges more defined and clear


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vntranslator.com/user-guide/ocr/pre-processing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
