GithubHelp home page GithubHelp logo

krishgaur1354 / ml-image-alignment Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 9.9 MB

It aligns the scanned form to the reference form using SIFT (Scale-Invariant Feature Transform) feature matching.

Home Page: https://ml-image-alignment.onrender.com/

License: The Unlicense

Jupyter Notebook 53.52% Python 34.01% HTML 12.32% Procfile 0.16%
hacktoberfest machine-learning-algorithms opencv

ml-image-alignment's Introduction

Image Alignment and Processing

The script allows users to upload a reference form and a scanned form, and it aligns the scanned form to the reference form using ORB (Oriented FAST and Rotated BRIEF) SIFT (Scale-Invariant Feature Transform) feature matching.


Table of Contents

Prerequisites

Before you begin, ensure you have the following requirements installed:

  • Python 3.x
  • OpenCV (cv2)
  • Flask
  • Jupyter Notebook (for the script)
  • ipywidgets and other required libraries (see script)
  • SIFT (Scale-Invariant Feature Transform)

You can install the required Python libraries using pip. For example:

pip install opencv-python-headless flask jupyter ipywidgets

Usage

  1. Clone the repository to your local machine:

    git clone https://github.com/KrishGaur1354/ML-Image-Alignment.git
  2. Navigate to the repository folder:

    cd image-alignment
  3. Run the Jupyter Notebook script to align and process images. This will open a Jupyter Notebook interface in your web browser. Follow the instructions in the notebook to upload and process images.

  4. To run the Flask web application, execute the following command in your terminal:

    python app.py
  5. Access the web application in your web browser at http://localhost:5000. You can upload reference and scanned images, and the application will align and display the results.

Installation

No additional installation is required for the Jupyter Notebook script. For the Flask application, ensure you have the required Python libraries installed (see Prerequisites), and then follow the usage instructions.

How It Works

The script and web application use OpenCV to align images based on SIFT (Scale-Invariant Feature Transform) feature matching. Here's how it works:

  1. Users upload a reference form and a scanned form in the web application.

  2. The script reads and processes the uploaded images using OpenCV:

    • Converts images to grayscale.
    • Detects SIFT features and computes descriptors.
    • Matches features and filters out good matches.
    • Calculates a homography matrix for alignment.
    • Warps the scanned form to align with the reference form.
  3. The aligned scanned form is displayed in the web application, and users can download it.

Contributing

Contributions are welcome! If you have any improvements, bug fixes, or feature suggestions, please open an issue or create a pull request.

Feel free to customize the README to include more details, such as screenshots, specific usage examples, or additional sections as needed.

ml-image-alignment's People

Contributors

krishgaur1354 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.