The process to enhance or to extract useful data from the image is known as Image Processing. We can also say that it converts image into digital aspects to perform certain functions. Image processing is one of the technologies among many that is growing rapidly.
There are three main steps in image processing:
- Importing the image
- Analyze and manipulate the image
- Results, results can be changed to image or report based on image analysis.
What is an Image?
Image can be defined as a 2-D function or 2-D array specifically arranged in rows and columns which also be represented in 2-D matrix.
Types of images
- Binary: As the word itself defines, the image will be in binary form where 0 represent black and 1 represent white. These types of images are called Monochrome.
- Black and Whites: Same as above as the name suggests the image will be in black and white format.
- 8-bit Format: It is one of the famous formats. It has 256 colors where 0 represent black and 255 represent white and the middle part that is 127 stands for grayscale.
- 16-bit Format: It has 65,536 colors in it, and it is also known as High Color Format, further it is divided in to 3 three-segment Red, Green, and Blue (RGB).
Phases of Image Processing
- Acquisition – Scaling and color conversion (RGB to Grayscale or vice0-versa)
- Image Enhancement – Extracting the hidden details
- Image Restoration – Restoration based on a mathematical or probabilistic model
- Color Image Processing – Deals with pseudo-color
- Wavelets and Multi-Resolution Processing – Foundation of representing Image
- Image Compression – Deals with image size and resolutions
- Morphological Processing – extract image components
- Segmentation Procedure – Partition of the image into objects
- Representation and Description – Transformation raw data into processed data
- Object Detection and Recognition – Assigning labels to object based on its information
Why do we need Image Processing?
- Image improvement for human perception – to improve subjective image quality.
- Image improvement for machine perception – simplifying analysis and recognition.
- Image transformation for technical purpose – changing image size and resolution as per users’ perspective.
- Entertainment – to create VFX and many other cool visual effects.
Libraries that can be used for Image Processing (Python)
- Scikit-image – It is an open-source Python library. Easy to use even for newbies. Member of NumPy family.
- OpenCV – Most widely used library. It is coded in C/C++ so it can be used through API. Makes computer vision program more robust.
- Mahotas – Type of graphic editor. Contains morphological functions with modern computational computation functions. The algorithm is designed in C++.
- SimpleITK – Type of toolkit. Provide comprehensive set of image analysis software tool. Written in C++.
- SciPy – Basic science module like NumPy. Works on n-dimensional array. Current package includes functionality like direct and offline filtering, binary morphology, B-spline translation and many other functionalities.
- Pillow – Fork of Python Image Library. Offers several standard procedures for image manipulation. Supports many types of files like PNG, JPEG, PPM, GIF, TIFF, AND BMP.
Installation Libraries (Python)
To use any of the mentioned libraries first we need to install these packages.
For Windows OS:
- pip install opencv-python
- pip install scikit-image
- pip install mahotas
- pip install scipy
- pip install Pillow
- pip install matplotlib
For Linux OS
- sudo apt-get install libopencv-dev python-opencv
- sudo apt-get install python-skimage
- sudo apt-get install python-mahotas
- sudo apt-get install python-scipy
- sudo apt-get install python-Pillow
- sudo apt-get install python-matplotlib