https://github.com/wraient/gocr
Lightweight OCR app in Go to extract text from images in GUI using Tesseract.
https://github.com/wraient/gocr
golang image-recognition ocr
Last synced: 8 days ago
JSON representation
Lightweight OCR app in Go to extract text from images in GUI using Tesseract.
- Host: GitHub
- URL: https://github.com/wraient/gocr
- Owner: Wraient
- Created: 2024-12-31T19:39:57.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-01T07:13:02.000Z (about 1 year ago)
- Last Synced: 2025-07-18T00:34:48.662Z (7 months ago)
- Topics: golang, image-recognition, ocr
- Language: NSIS
- Homepage:
- Size: 329 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GOCR
Gocr is a simple yet effective Optical Character Recognition (OCR) application built in Go. With GOCR, you can select an image file, extract text from it, and interact with the extracted text. The app lets you click on text boxes to copy specific pieces or view all the extracted text below the image. While not 100% accurate, it provides a user-friendly OCR experience.
## Demo

## Features
- Open an image file for OCR scanning.
- Extract text using Tesseract OCR.
- Click on specific text boxes to copy text to the clipboard.
- View all extracted text in a scrollable section below the image.
- Requires Tesseract OCR engine for operation.
## Requirements
1. [Tesseract OCR](https://github.com/tesseract-ocr/tesseract)
2. Gocr binary: Download the **latest release** from [Gocr Releases](https://github.com/Wraient/gocr/releases/latest).
## Installing and Setup
> **Note**: Gocr requires Tesseract to work. Installation instructions for Tesseract on various Linux distributions are included below.
### Linux
Arch Linux / Manjaro (AUR-based systems)
```bash
sudo pacman -S tesseract tesseract-data-eng
curl -Lo gocr https://github.com/Wraient/gocr/releases/latest/download/gocr
chmod +x gocr
sudo mv gocr /usr/bin/
```
Debian / Ubuntu (and derivatives)
```bash
sudo apt update
sudo apt install tesseract-ocr
curl -Lo gocr https://github.com/Wraient/gocr/releases/latest/download/gocr
chmod +x gocr
sudo mv gocr /usr/bin/
```
Fedora Installation
```bash
sudo dnf update
sudo dnf install tesseract
curl -Lo gocr https://github.com/Wraient/gocr/releases/latest/download/gocr
chmod +x gocr
sudo mv gocr /usr/bin/
```
openSUSE Installation
```bash
sudo zypper refresh
sudo zypper install tesseract
curl -Lo gocr https://github.com/Wraient/gocr/releases/latest/download/gocr
chmod +x gocr
sudo mv gocr /usr/bin/
```
Generic Linux Installation
```bash
sudo install tesseract
curl -Lo gocr https://github.com/Wraient/gocr/releases/latest/download/gocr
chmod +x gocr
sudo mv gocr /usr/bin/
```
## Usage
### Options
| Flag | Description |
|---------------------------|-------------------------------------------------------------------------|
| `-i [Image path]` | Returns extracted text from image in terminal |
| `-g [Image path]` | Opens gui with specified image |
## Uninstallation
To remove Gocr:
```bash
sudo rm /usr/bin/gocr
```