Some Creative Experiments with OpenCV and Python
A brief introduction of OpenCV
OpenCV is an open-source library that includes several hundreds of computer vision algorithms. OpenCV has a modular structure, which means that the package includes several shared or static libraries.
Computer Vision is a field of multiple disciplines that care about how computers can gain a high-level understanding from digital images/videos. This is an attempt to automate tasks that the human visual system is able to perform. This is a process of acquiring, processing, analyzing, and understanding digital images, and extracting high-dimensional data from the real world (to produce numerical/symbolic information.)
Typical tasks involved Python Computer Vision are:
- Recognition
- Motion Analysis
- Scene Reconstruction
- Image Restoration
Fields related to Python Computer Vision:
- Artificial Intelligence
- Solid-state Physics
- Signal Processing
- Statistics, Optimization, Geometry
Here I’m Performing some tasks.
Task 1
- Create image by yourself using python code.
Task 2
- Take 2 images crop some part of both image and swap it.
Task 3
- Take 2 image and combine it to form single image. Like a Collage.
Here I’m creating collage in both vertically and horizontally.
For Horizontal
np.hstack() function is used to stack the sequence of input arrays horizontally (i.e. column wise) to make a single array.
For Vertically
np.vstack() function is used to stack the sequence of input arrays vertically to make a single array.
Thanks for reading. :)