Skip to the content.
English 한국어 日本語 Tiếng Việt

D example

https://github.com/bobhyun/TS-ANPR/tree/main/examples/D/anpr

1. Copying the Engine Files

[Note] In this example, the engine file is extracted to the examples/bin/ directory to share it with other examples. However, for actual deployment, the engine file is typically copied to the directory where the application’s executable file is located.

2. Prerequisites

  1. Install D compiler (DMD, LDC, or GDC)

    Windows:

    # Download and install DMD from https://dlang.org/download.html
    # Or use chocolatey
    choco install dmd
    

    Ubuntu / Debian:

    # Install using snap
    sudo snap install dmd --classic
    sudo snap install dub --classic
    
    # Or install using apt
    sudo wget https://netcologne.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list
    sudo apt-get update && sudo apt-get -y --allow-unauthenticated install --reinstall d-apt-keyring
    sudo apt-get update && sudo apt-get install dmd-compiler dub
    

    Oracle Linux / RedHat (RHEL) / CentOS:

    # Download and install manually from https://dlang.org/download.html
    curl -fsS https://dlang.org/install.sh | bash -s dmd
    source ~/dlang/dmd-*/activate
    
  2. Verify installation

    dmd --version
    

3. How to Run

  1. Navigate to the D example directory

    cd D/anpr
    
  2. Compile and run the example

    Using DUB (recommended):

    # Build and run
    dub run
    
    # Build only
    dub build
    
    # Build release version
    dub build --build=release
    
    # Run
    ./bin/anpr
    

4. Notes

5. Features

6. API Reference

TSAnpr Class

The TSAnpr class provides the following methods:

Constructor:

Core Methods:

Recognition Options

Output Formats

7. Troubleshooting

Library Loading Issues:

Compilation Issues:

Platform-Specific Issues: