-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #319 from mehul-m-prajapati/image_stitch
Added image stitching project (opencv)
- Loading branch information
Showing
2 changed files
with
385 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Image Stitching with OpenCV | ||
|
||
This project demonstrates image stitching using OpenCV, which combines multiple images into a single panoramic image. The code loads a set of images, performs feature detection and matching, and stitches them together to create a seamless panorama. | ||
|
||
## Code Breakdown: | ||
|
||
1. **Library Installation**: | ||
- Installs necessary libraries: OpenCV and Matplotlib. | ||
|
||
2. **Function: `stitch_images`**: | ||
- **Loading Images**: Reads images from the specified file paths. | ||
- **Stitcher Object**: Creates an OpenCV Stitcher object to handle the stitching process. | ||
- **Performing Stitching**: Uses `stitcher.stitch()` to combine images. | ||
- **Error Handling**: Checks the status of the stitching process and returns the stitched image or an error message. | ||
|
||
3. **Function: `display_result`**: | ||
- Displays the stitched image using Matplotlib. | ||
|
||
4. **Example Usage**: | ||
- Upload to images you want to stitch. | ||
- Calls `stitch_images()` to perform the stitching and then displays the result. | ||
|
||
## Possible Enhancements: | ||
- **Input Flexibility**: Allow for dynamic input of image paths through user interface or file upload. | ||
- **Image Preprocessing**: Apply image enhancement techniques before stitching for better results. | ||
- **Advanced Matching**: Implement feature matching techniques (like SIFT or ORB) for improved alignment of images. | ||
|
||
## Example Use Case: | ||
This image stitching method is useful for creating panoramic images from a series of overlapping photographs, often used in photography, mapping, and virtual reality applications. | ||
|
||
## Requirements: | ||
- OpenCV | ||
- Matplotlib | ||
|
||
### How to Run: | ||
1. Install the required libraries. | ||
2. Update the `image_paths` list with paths to your images. | ||
3. Run the cell to perform stitching and view the result. |
Large diffs are not rendered by default.
Oops, something went wrong.