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

Go サンプル

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

1. エンジンファイルのコピー

【参考】 この例では、他のサンプルとエンジンファイルを共有するために examples/bin/ ディレクトリに展開しますが、実際の配布時には通常、アプリケーションの実行ファイルがあるディレクトリにエンジンファイルをコピーします。

2. ビルドと実行

2.1 Windows (MinGW)

  1. モジュールの初期化

    go mod tidy
    
  2. 依存関係のインストール

    • GoCV 公式インストールガイドを参照してください。(https://gocv.io/getting-started/windows/)
  3. ビルド方法

    go build -o anpr.exe main.go
    
  4. 実行方法

    .\anpr.exe
    

2.2. Linux

  1. モジュールの初期化

    go mod tidy
    
  2. 依存関係のインストール
    • Debian / Ubuntu Linux
      sudo apt install -y build-essential g++ libopencv-dev
      
    • Oracle Linux / RedHat (RHEL) / CentOS
      sudo dnf install -y epel-release gcc gcc-c++ opencv opencv-devel
      
  3. ビルド方法

    go build -o anpr main.go
    
  4. 実行方法

    ./anpr