# OCR

**This guide helps you resolve common issues when using OCR (Optical Character Recognition) in VNTranslator.**

## Display and Monitor Issues

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

**Supported Monitor Configurations**

VNTranslator OCR supports various monitor setups:

* **OCR version 1.x:** Single monitor only
* **OCR version 2.x:** Multi-monitor support (horizontal arrangement / X-axis)
* **OCR version 3.x:** ~~Multi-monitor support (horizontal and vertical arrangement / X & Y-axis)~~

***

## Display Scaling Issue

**Problem:** The OCR Capture Area doesn't align with the actual text position on screen, or captured images appear cropped or misaligned.

**Cause:** Windows display scaling affects what you see on screen, but OCR captures the actual pixel coordinates without scaling.

#### Solution:

VNTranslator Pro supports display scaling. Configure it in the app settings:

* Open VNTranslator **Settings**.
* Go to **App Settings** -> **Display** -> **Scale**.
* Select the appropriate scale setting that matches your Windows display scaling.
* Relaunch VNTranslator.

#### **Alternative solution:**

If issues persist, you can change Windows display scaling to 100%:

* Open Windows **Settings**
* Go to **System** -> **Display**
* Set **Scale** to **100%** for the monitor where you're running your game
* Relaunch VNTranslator

> **Note:** VNTranslator Pro now supports display scaling through app settings, but using 100% Windows scaling can still provide the most consistent results.

***

## **G**raphics Card Issue

{% hint style="info" %}
List of Error Messages:

* Error Code 11x
* Screen capture failed
* Display source not detected!
  {% endhint %}

#### **1.** Update Graphics Drivers

Windows Update doesn't always provide the latest drivers. Download directly from your graphics card manufacturer:

* NVIDIA drivers: <http://www.nvidia.com/content/drivers/>
* AMD drivers: <http://support.amd.com/en-us/download>
* Intel drivers: <https://downloadcenter.intel.com/>

#### 2. Switch Between GPUs (Multi-GPU Systems)

If your computer has more than one graphics card, then Try to switch between Dedicated GPU & Integrated GPU.

* **NVIDIA Optimus**: Go to NVIDIA Control Panel -> Manage 3D settings -> Program Settings&#x20;
* **AMD Switchable**: Go to AMD Radeon Settings -> Switchable Graphics

#### 3. Disa**ble capture/recording in GeForce Experience / AMD Radeon**

Graphics card recording features can interfere with OCR screen capture.

* **GeForce Experience**: Disable In-Game Overlay, Disable Dekstop Capture (Privacy control), Disable Instant Replay&#x20;
* **AMD Radeon**: Disable In-Game Overlay, Disable Record Dekstop, Disable Instant Replay, Disable In-Game Replay

#### **4. Disable hardware acceleration**

If other solutions don't work, try disabling hardware acceleration in VNTranslator.

* Method 1: Via VNTranslator Settings:\
  Go to Settings -> App Settings -> Advanced -> Hardware acceleration
* Method 1: Via Command Line\
  `C:\Program Files\VNTranslator\VNTranslator.exe --disable-gpu` \
  `C:\Program Files\VNTranslator\VNTranslator.exe --disable-gpu --force-cpu-draw`

***

## Screen Capture Error Occurs

{% hint style="info" %}
List of Error Messages:

* Error Code 10x
* Image processing error
* Undefined image
* Screen capture failed
* Application crashes when the Capture button is pressed
* INVALID\_ARGUMENT - Request must specify image and features
  {% endhint %}

#### Solution 1: Run as Administrator

* Right-click **VNTranslator.exe**
* Select **Run as administrator**

#### Solution 2: Reinstall for All Users

* Uninstall VNTranslator
* Reinstall and choose **Install for all users**
* Install to: `C:\Program Files\VNTranslator`

#### Solution 3: Install/Update Visual C++ Redistributable

* Download both x86 and x64 versions from Microsoft: [Visual C++ Redistributable Latest](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist)
* Install both versions
* Restart your computer

#### Solution 4: Change Display Source

* Open VNTranslator **Settings**
* Go to **App Settings** -> **Display**
* Change **Display Source** to either **Native** or **Windows**
* Relaunch VNTranslator

#### Solution 5: Run Display Test for Debugging

If the issue persists, use the built-in **Display Test** feature to help diagnose the problem

* In the **Launcher, Menubar** -> **Quick Actions** -> **Display Test**
* Wait a few seconds, the test will run automatically
* Once completed, a folder named **`VNT_DISPLAY_TEST`** will be created on your Desktop

The **`VNT_DISPLAY_TEST`** folder contains the following:

* A fullscreen capture image
* A cropped capture image
* A log file with diagnostic information

***

## OCR Server Connection Issues

**Problem:** "Unable to connect to OCR Server" or the OCR process hangs for 15-60 seconds without responding.

**Possible causes:**

* Insufficient RAM
* Firewall blocking the connection
* Tesseract OCR or Window OCR Server not responding

#### Solution 1: Run as Administrator

* Right-click **VNTranslator.exe**
* Select **Run as administrator**

#### Solution 2: Configure Windows Firewall

* Open **Windows Security** -> **Firewall & network protection**
* Click **Allow an app through firewall**
* Click **Change settings** -> **Allow another app**
* Browse to `C:\Program Files\VNTranslator\VNTranslator.exe`
* Add VNTranslator and allow it on both **Private** and **Public** networks

> **Note:** If you're using third-party firewall software (BitDefender, Norton, McAfee), add VNTranslator as an exception in that software.

#### Solution 3: Disable Tesseract Server

* Open VNTranslator **Settings**
* Go to **OCR Settings**
* Disable **Tesseract Server** (this will use Tesseract Wrapper instead)

***

## Tesseract is not installed

**Solution:**

* Download Tesseract OCR from the official source
* Install to: `C:\Program Files\Tesseract-OCR`
* Make sure the installation path is exactly as shown above
* Relaunch VNTranslator

***

## **Tesseract process exited with code 1 - Command failed: ???**

**Solutions 1: Reinstall Tesseract:**

* Uninstall Tesseract completely
* Restart your computer
* Download and reinstall Tesseract
* Install to: `C:\Program Files\Tesseract-OCR`

**Solution 2: Try a different Tesseract version**

* Download alternative versions from the Tesseract releases

**Search for specific error**

* Search on **Google** or **Stack Overflow** for solutions specific to that error 🙃

***

## **TESSDATA\_PREFIX is not set to your tessdata directory**

**Solution:**

* Open **Command Prompt as administrator**
* type `setx TESSDATA_PREFIX "C:\Program Files\Tesseract-OCR\tessdata"`, and then press Enter
* Restart your computer

***

## Err: Failed to init API, possibly an invalid tessdata path: ./&#x20;

**Solution:**

* Open **Command Prompt as administrator**
* type `setx TESSDATA_PREFIX "C:\Program Files\Tesseract-OCR\tessdata"`, and then press Enter
* Restart your computer

***

## Google Lens - Request failed with status code 303

**Solution:**

* Restart your modem/router
* Use a VPN
* Or use a more stable offline OCR engine such as **Fast OCR** and **Tesseract** :smile:


---

# 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/help/troubleshooting/ocr.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.
