Tutorial
Utilize the Python Libraries to Extract information from Images
The work of a Data Analyst is not limited to work only on readily available data, rather sometimes the data need to be mined from the images also.
This story is all about different types of image feature extraction using Python. Additionally, here you will find a classic comparison of the speed of two image processing libraries — OpenCV and PIL
____ OpenCV is 1.4 Times faster than PIL ____
📌 Want to follow along? here is my Jupyter-Notebook.
📌 More resources are always mentioned with 💡
In my recent project, I need to process 10000+ images per day and extract the data from them. And only Python can help me with this batch processing. I usually do the below processes on image:
1. Extract the aspect ratio of the image.
2. Crop the image.
3. Change the image to grayscaled one.
4. Image Rotation.
However, my work doesn’t stop here. I do much more ad-hoc analysis.
In my project, a lot of information is also hidden in the image name. And the string manipulation methods discussed here are quite handy in such tasks.
Image is simply a matrix of pixels and each pixel is the single, square-shaped point of colored light. This can be explained quickly with a grayscaled image. grayscaled image is the image where each pixel represents different shades of a gray color.
In the picture above, the original image on the left side is actually the distribution of different shades of a gray color. On the…