OpenCV- An awesome tool for computer vision in python

Aditya Chaudhary👨‍💻 · 3 mins read ·
python machinelearning open-cv

To those who don’t know what OpenCV is, it is a library for image/video processing, machine learning and computer vision. This tool also supports C++ and Java, but I am a little biased towards python and you all know the reason why.

Also, this is my first post on this platform since I am new here and in this post, we are going to take a look at what this library is capable to do. Let’s get started!

Image Processing

OpenCV is widely used for image processing and manipulations. The image is represented as a NumPy array (3D array if RGB image is being read or 2D array if Grayscale image is being read). Face-recognition is the best example of things that OpenCV can do.

Alt Text From many useful tools to QR code reader, you can create literally tons of awesome projects with it.

Below is the video demonstration of a simple QR code reader program that I made using OpenCV.

By using various NumPy methods you can experiment around the image properties like the specific color at any pixel/region. Below is a video demonstration of a simple color picker kind of program that opens an image and on left click, shows the hex color code of the area which is clicked and also copies the hex code to the clipboard!

Video-Processing

A video is nothing but tons of frames of the image. So basically things which you can do with the image can also be done with video files.

OpenCV provides you to read videos from two streams. You can either pass your webcam as a video source and experiment around your camera properties or pass a valid file path of the compatible video file.

One of the best projects which I saw on video-processing was Raghav Khanna’s invisible cloak project. Here is the video demonstration of his project

Apart from these things OpenCV is widely used in game-automation, self-driving cars, smart CCTV cameras etc.

Now imagine if you have thousands of QR code images on your PC and you are given to draw the histogram graph of sites to which the different QR code belongs to. As a human being, you can’t scan each and every image to get the information about the QR code.

That’s where programming and OpenCV play key role.

Just crawl through that folder using os module, read and scan the image using OpenCV and by some algorithms plot a graph using matplotlib.

Thanks for reading!

About Author

Aditya Chaudhary
17 year old | Programmer👨‍💻 | Game Developer 🎮 | Blogger 📝 Loves CSS 🌈| Python Enthusiast 🐍 Discord : https://discord.gg/ggvtTje I might be slow here to reply so connect with me on twitter (DMs open)

Please share your Feedback:

Did you enjoy reading or think it can be improved? Don’t forget to leave your thoughts in the comments section below! If you liked this article, please share it with your friends, and read a few more!