Skip to main content

Coin Detection and Panorama Stitching

Project description

Coin Detection & Panorama Stitching

Part 1: Coin Detection

Overview

This module processes an input image to detect and extract individual coins using image processing techniques.

Steps Involved

  1. Preprocessing (preProcessingImage)

    • Converts the image to grayscale for simplified processing.
    • Resizes the image to maintain consistency.
    • Applies Gaussian blur and adaptive thresholding to enhance edge detection.
  2. Edge Detection (edgeDetection)

    • Identifies contours in the thresholded image.
    • Analyzes shape properties such as circularity and area to detect coin-like structures.
    • Draws detected edges on the original image.
  3. Region-Based Segmentation (segmentCoins)

    • Generates a mask using detected contours.
    • Isolates the coin regions from the original image.
  4. Extracting Individual Coins (extractEachCoin)

    • Determines the minimum enclosing circle for each detected coin.
    • Uses bitwise operations to isolate and crop each coin.
  5. Counting Coins (countCoins)

    • Computes the total number of detected coins from the segmented results.

How to Run

  1. Install dependencies:

    pip install -r requirements.txt
    
  2. Navigate to the part1 directory:

    cd part1
    
  3. Run the detection script:

    python coinDetection.py <input_image_path> <output_dir>
    
  4. Example Run:

    python coinDetection.py coins/0.jpg output/
    

Output Files

  • Edges_on_image.jpg – Image with detected coin edges outlined.
  • coin_segmented.jpg – Image with extracted coin regions.
  • coinX.jpg – Individual cropped images of each detected coin.

Part 2: Panorama Stitching

Overview

This module stitches multiple images together to create a seamless panorama using feature detection and homography estimation.

Steps Involved

  1. Feature Detection & Extraction (siftDetectDescriptor)

    • Detects key points and extracts feature descriptors using the SIFT algorithm.
  2. Keypoint Matching (interestPointMacher)

    • Matches keypoints between image pairs using BFMatcher and Lowe’s ratio test.
  3. Homography Estimation (interestPointMacher)

    • Computes the transformation matrix (homography) for image alignment.
    • Utilizes RANSAC to filter outliers and refine accuracy.
  4. Image Warping & Blending (stichImages)

    • Aligns images using the computed transformation.
    • Blends overlapping regions to create a seamless transition.
  5. Cropping Unwanted Regions (cropBlackRegion)

    • Removes black borders caused by perspective transformation.
    • Extracts only the meaningful content of the stitched image.

How to Run

  1. Install dependencies:

    pip install -r requirements.txt
    
  2. Navigate to the part2 directory:

    cd part2
    
  3. Run the panorama stitching script:

    python panorama.py <input_directory> <output_directory>
    
  4. Example Run:

    python panorama.py input1/ output/
    

Output Files

  • stitched_image_X.jpg – Visualization of matched keypoints between consecutive images.
  • panorama.jpg – The final stitched panorama image.

Notes

  • Ensure images for stitching have sufficient overlap for feature matching.
  • The quality of results depends on image alignment and lighting conditions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vr_assignment_rutul-0.1.4.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vr_assignment_rutul-0.1.4-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file vr_assignment_rutul-0.1.4.tar.gz.

File metadata

  • Download URL: vr_assignment_rutul-0.1.4.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for vr_assignment_rutul-0.1.4.tar.gz
Algorithm Hash digest
SHA256 3a499db22950f0c4bf86f9988fb63244296e74d8f2f3a3858cb4837212ff30db
MD5 1d5fb062f5b87a6d9ab9964a5dc15e5a
BLAKE2b-256 cea2a2c1abcf48fa67f71aa81c1439b346b64f1bc8581b659490a2655a86c646

See more details on using hashes here.

File details

Details for the file vr_assignment_rutul-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for vr_assignment_rutul-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1e8442d6d93c28d398212e9a56529a0e4d12971af0724d7b3ee4ffad562a3ac2
MD5 5f3119bafac254d509a766c732827816
BLAKE2b-256 4308c8877d185cdeac1a148d8befb5977c0b11d0c8b303567f59e8f8c00b9a45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page