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
-
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.
-
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.
-
Region-Based Segmentation (
segmentCoins)- Generates a mask using detected contours.
- Isolates the coin regions from the original image.
-
Extracting Individual Coins (
extractEachCoin)- Determines the minimum enclosing circle for each detected coin.
- Uses bitwise operations to isolate and crop each coin.
-
Counting Coins (
countCoins)- Computes the total number of detected coins from the segmented results.
How to Run
-
Install dependencies:
pip install -r requirements.txt
-
Navigate to the
part1directory:cd part1
-
Run the detection script:
python coinDetection.py <input_image_path> <output_dir>
-
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
-
Feature Detection & Extraction (
siftDetectDescriptor)- Detects key points and extracts feature descriptors using the SIFT algorithm.
-
Keypoint Matching (
interestPointMacher)- Matches keypoints between image pairs using BFMatcher and Lowe’s ratio test.
-
Homography Estimation (
interestPointMacher)- Computes the transformation matrix (homography) for image alignment.
- Utilizes RANSAC to filter outliers and refine accuracy.
-
Image Warping & Blending (
stichImages)- Aligns images using the computed transformation.
- Blends overlapping regions to create a seamless transition.
-
Cropping Unwanted Regions (
cropBlackRegion)- Removes black borders caused by perspective transformation.
- Extracts only the meaningful content of the stitched image.
How to Run
-
Install dependencies:
pip install -r requirements.txt
-
Navigate to the
part2directory:cd part2
-
Run the panorama stitching script:
python panorama.py <input_directory> <output_directory>
-
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vr_assignment_rutul-0.1.6.tar.gz.
File metadata
- Download URL: vr_assignment_rutul-0.1.6.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce3b11c0d1e443d1b10c279c23c20a963a0e2d4ebaac6a8257edd50e6a4b22ca
|
|
| MD5 |
d7d656d18448de5e389a533e6ffd9468
|
|
| BLAKE2b-256 |
b819ae700a5e885e82b0a902bd270211071f009e6b78eb6275b66c3a5045ba4d
|
File details
Details for the file vr_assignment_rutul-0.1.6-py3-none-any.whl.
File metadata
- Download URL: vr_assignment_rutul-0.1.6-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e68146930fd63407ab2b96ae4c9443a622659586b6f06840ddc7480be063e025
|
|
| MD5 |
5f251e703d033a09c26afcd8d620e2ea
|
|
| BLAKE2b-256 |
003d32829885ae07893f5e4945b064915ce5d08b99595c4606bfa2b2dffafad7
|