Image Stitching And Basics Of OpenCV


Written this blog with the collaboration of Yagnik Poshiya 



Blog Outcomes


OpenCV is originally developed by Intel

What is OpenCV?


OpenCV is a huge open-source library. In OpenCV, the CV is an abbreviation form of a Computer Vision, that helps computers to understand the content of digital images such as photographs and videos. OpenCV is mainly focused on computer vision applications such as image processing, artificial intelligence, video capture, and analysis of object detection.

Basic Functions Of OpenCV

  1. imread(): used to load an image from a specified file and returns it. if the image cannot be read by the imread() function then it will return an empty matrix. And it supports bmpdib, jpegjpgjpejp2srraspngpic, and many other file formats.
  2. imshow(): used to display an image in the specified window.
  3. waitKey(): used to hold image window for a particular time duration. waitKey(0) will hold the image window until you press any key. waitKey(12) will hold the image window for 12 ms.
  4. destroyAllWindows(): used to destroy all opened high GUI windows.
  5. cvtColor(): used to convert an image from one color space to another color space. The default color format in OpenCV is often referred to as RGB but it is actually BGR. The first byte in a standard (24-bit) color image will be an 8-bit Blue component, the second 8-bit will be a Green component, and the third 8-bit will be a Red component.
  6. split(): used to split multi-channel images into single-channel images. The conversion process of colored images to single-colored images is very time-consuming.
  7. merge(): used to merge single-channel images into multi-channel image.
  8. resize(): used to scale dimensions of an image in terms of height, width, and both. resize() function preserves the aspect ratio after a process of image resizing.
  9. imwrite(): used to save an image to the specified location. The format of the image is chosen based on the given filename extension.
  10. shape: used to get dimensions, height, width, and a number of channels of an image based on the indexing method. img.shape is used to get only dimensions of an image, img.shape[0] for height, img.shape[1] for width, and img.shape[2] for number of channels of image.
  11. Canny(): used to detect edges of ROI (Region Of Interest) based on minVal (Minimum Intensity Gradient) and maxVal (Maximum Intensity Gradient).
  12. GaussianBlur(): used for image smoothing. image smoothing is a process used to remove noise and sharpness from an image.


Applications Of OpenCV

  1. acial Recognition System
  2. Human-Computer Interaction
  3. Motion Understanding
  4. Motion Tracking
  5. Augmented Reality
  6. Mobile Robotics
  7. 2D and 3D Feature Toolkits
  8. Image Panorama Stitching


Image Panorama Stitching

Applications Of Image Stitching

  1. Video Stitching
  2. Document Mosaicing
  3. Medical Imaging
  4. Panorama Creation

Process Flow

Code Explanation

Input Colored Images
In the image (a) and (b), key points are highlighted in green color
See carefully, there are colorful lines to show matches
Generated panorama before applying resizing process
Final panorama view

References

  1. Basic Functions Of OpenCV: opencv.org
  2. Applications Of OpenCV: wikipedia.org
  3. Image Stitching Definition: wikipedia.org
  4. Applications Of Image Stitching: wikipedia.org

Thank You… Keep Learning✌!!!

 

Comments