If we want to modify (resize, change file format, etc.) a single image. It is an easy job, just open a favorite image editor and do the modification. But what if you want to modify hundreds and hundreds of such images? It not only becomes time-consuming and boring also.
Python Kit will be shipped to you and you can learn and build using tutorials. You can start for free today!
2. Machine Learning (Career Building Course)
4. Fraud Detection using Machine Learning
5. Machine Learning using Python
6. Movie Recommendation using ML
7. 3 Computer Vision Projects (Combo Course)
8. Computer Vision - Text Scanner
9. Computer Vision Based Mouse
10. Handwritten Digits Recognition using ML
11. Computer Vision Based Smart Selfie
This is the place where Python and the Python Imaging Library (PIL) comes into play. By making use of python script you can process images in bulk.
In this project, we are going to create a small Python script that will allow us to resize, crop, blur or convert images into greyscale on a large scale.
Project Description
The objective of this project is to modify the images on a large scale at a time without manual intervention. So, by using the python script and PIL library we will build the project.
In this project, we have to specify the path of the directory where all images are stored, at the time of compilation as a command-line argument. Suppose project name is project_name.py, then at execution time write command like python3 project_name.py path/to_directory/where/images_are_stored/*.png
Then a prompt will ask which operation to perform, like 1 for resizing, 2 for cropping, 3 for blurring and so on. Give a proper input then you will get the modified image.
Python Modules used for projects:
sys: sys-module is used to provide access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter. We are going to use sys.argv to list out the command line arguments passed to Python script. The argument that we passed in the command line is the path of the directory where all images reside.
Want to develop practical skills on Python? Checkout our latest projects and start learning for free
Python Imaging Library (PIL): PIL offers many standard procedures for image manipulation such as pre-pixel manipulation, image filtering, blurring, contouring, smoothing or edge detection, adding text to images and much more. It is also used to load images from the hard drives and display the image.
OS – Module: os–module provides all the functionalities of interacting with the operating system. OS-module provides an easy way of interacting with os dependent functionalities. It is distributed under Python standard utility library.
Project Implementation
Follow the below steps to complete the project:
Software requirements: Text editor and Python3.
Programming Languages and module: Python, PIL-module, os module, sys-module.
Skyfi Labs helps students learn practical skills by building real-world projects.
You can enrol with friends and receive kits at your doorstep
You can learn from experts, build working projects, showcase skills to the world and grab the best jobs.
Get started today!
Join 250,000+ students from 36+ countries & develop practical skills by building projects
Get kits shipped in 24 hours. Build using online tutorials.
Stay up-to-date and build projects on latest technologies