Python

Delete this widget in your dashboard. This is just an example.

Ipsum

Delete this widget in your dashboard. This is just an example.

OpenCV

Delete this widget in your dashboard. This is just an example.
 

Image Processing - Intro

Friday, 17 December 2021

 

1. Introduction

Image analysis, also known as “computer vision” or image recognition, is the ability of computers to recognize attributes within an image.

Most computer vision techniques are inspired by human vision perception models. The techniques of processing and analysing images using computers, which have improved over the years, however still remain challenging.

The success of most of these techniques is dependent on the quality of the input images. Normally, there is a need to pre-process the input images in order to improve the quality.

Pre-processing can include noise removal, geometric correction, edges, and contrast enhancement. This is the equivalent of data cleansing/cleaning in data science. Image processing and analysis tasks include basic manipulations such as cropping, flipping, and rotating, and more complex operations such as image segmentation, classification, feature extraction, and image recognition.

Computers “see” images as arrays of pixels. Each pixel is represented by a 1 by 3 array containing numbers that indicate the RBG profile of that pixel.

2. Types of Image Processing and Uses

a. Image Segmentation

These are processing techniques that involve partitioning an image into multiple segments. That way, we can keep only the important segments for processing and analysis. It is very useful in identifying the boundaries and contours of objects of interest in the images.

One use of image segmentation includes determination of the severity of cancer, this is based on the shape of the cancerous cells.

Fig 1 illustrates how image segmentation is used to identify cancerous cells by highlighting their boundaries and revealing their shape.

image segmentation in medical field
Fig 1: Using image segmentation to identify cancerous cells | Source: Analyticsvidhya

Other uses of segmentation include aerial and satellite image interpretations, self-driving vehicles, and fingerprint/face/iris recognition.

b. Image Recognition

These are image processing techniques that involve the identification of objects or features in an image.

Image recognition is often used in conjunction with object detection. Image recognition identifies which object is in an image, whereas object recognition identifies the location of these objects in an image.

Image recognition is widely used for quality control in the production industry, as it can be used to inspect high volumes of products in a production line.

Fig 2 below illustrates how it can be used to check the quality of products on the production line at high speeds and with high accuracy.

Fig 2: Image recognition for quality control | Source: Matlab

Other uses of image recognition include medical or biological image processing (e.g. interpretation of X-ray images, blood/cellular microscope images) and security surveillance.

It has become so important that researchers estimate that the global market of image recognition is around $38.92 billion.

c. Feature Extractions

Feature extraction describes the process of extracting relevant shape information contained in the image so that the classification of the image is made easier.

In image processing, a feature extraction is a special form of dimension reduction where the primary objective is to obtain only the most relevant information from the original image and represent that information in a lower dimensionality space.

A good set of features will contain relevant information from the input data in order to perform the desired image classification. This is applied in several fields such as character recognition, document verification, extracting information from cheques, postal address reading, and script recognition.

d. Image Classification

Image classification refers to the labeling of images into one of a number of predefined classes.

The applications include automated image organization. For example, Google Photos uses this technique to recognize faces and categorize them so that you can view all your photos of a particular person.

Image classification has become so advanced that it can be used to identify faces within photos to determine sentiment, gender, age, and more. It can recognize multiple elements within a photo at the same time, including logos, faces, activities, objects, and scenes. Captions can be automatically generated to describe the image.

Image classification highly depends on other image processing techniques in order to work. Firstly, image pre-processing needs to be done to improve image quality, and secondly, image segmentation and object detection needs to occur to identify the object and its position. This is followed by feature extraction as the features provide the classification rules. Finally, image classification can be done. This can be supervised or unsupervised and requires the use of machine learning algorithms.

Tutorial or book on image processing using Python?

 I would advise you to start with the following ressource: Python Programming Tutorials

I really like the website Pythonprogramming, because it also gives insights to machine learning, the basics etc.

Next I would advise you to visit this website and read the amazingly written blog posts: PyImageSearch - Be awesome at learning OpenCV, Python, and computer vision

The author also offers a ebook for sale, I only heard good things about it, dont have it myself though.

Then you should have enough background for the fun stuff.

If you dont want to work with opencv, you can use scikit-image (skimage short), where you can best learn about in the official example section: General examples


There are a lot of tutorials available for learning to use python for Image Processing.

To learn the basics of Image Processing refer -> Digital Image Processing (3rd Edition): Rafael C. Gonzalez, Richard E. Woods: 9780131687288: Amazon.com: Books

Below are the resources for Image Processing using Python:

  1. Image Processing in OpenCV : OpenCV is a library mainly focused on real-time computer vision. You can learn to use it with python.

OpenCV's application areas include:

2. Image manipulation and processing using Numpy and Scipy : This tutorial covers basic image manipulation and processing using Numpy and Scipy.

3. Image Processing Using Python: A short tutorial on using sckikit for image processing with python.

4. http://www.python-course.eu/python_image_processing.php : A tutorial on basic image manipulation.

You can also go for the following books if you want to learn more about image processing using python.

Link -> Ravishankar Chityala, Sridevi Pudipeddi: Amazon.in: Kindle Store

Link -> https://www.amazon.in/OpenCV-Computer-Vision-Projects-Python-ebook/dp/B01M4NJD8A/ref=sr_1_2?s=digital-text&ie=UTF8&qid=1501133787&sr=1-2&keywords=image+processing+python

Link -> https://www.amazon.in/Programming-Computer-Vision-Python-algorithms-ebook/dp/B008GCNGVE/ref=sr_1_1?s=digital-text&ie=UTF8&qid=1501133787&sr=1-1&keywords=image+processing+python

Books

Extremely useful, filled with practical information:

1. Burge and Burger, Principles of digital image processing

2. Sonka ,et al. Image processing, analysis and machine vision

3. Soille, Morphological image analysis

4. Nixon, Feature extraction & image processing for computer vision

5. Parker, Algorithms f or image processing and computer graphics

…then verging off into computer vision, but still very practical:

6. Prince, Computer Vision Models

7. Radke, Computer vision for visual effects

8. Digital Image Processing, Sridhar S, Oxford University Press - Edition 1 and 2

What is the best image processing library to use in Python?

 1. NumPy

Python NumPy (among other things) provides support for large,multi-dimensional arrays. Using NumPy, we can express images as multi-dimensional arrays.

2. PIL Now is PILLOW

The Python Imaging Library or PIL allowed you to do image processing in Python.

3. OpenCV (Open Source Computer Vision Library)

The library has more than 2500 optimized algorithms, which includes a comprehensive set of both classic and state-of-the-art computer vision and machine learning algorithms. These algorithms can be used to detect and recognize faces, identify objects, classify human actions in videos, track camera movements, track moving objects, extract 3D models of objects and many more.

For me best library for image processing.

4. SimpleCV

The goal of SimpleCV is to get you involved in image processing and computer vision as soon as possible.And they do a great job at it. The learning curve is substantially smaller than that of OpenCV, and as their tagline says, “it’s computer vision made easy”.

5.scikit-image

scikit-image is a collection of algorithms for image processing.

It includes algorithms for segmentation, geometric transformations, color space manipulation, analysis, filtering, morphology, feature detection, and more.

It is designed to interoperate with the Python numerical and scientific libraries NumPy and SciPy.

Mana yang lebih baik untuk image processing, Python atau MATLAB?

Sesuai dengan perkembangan saat ini dalam IP, saya sangat merekomendasikan Python daripada MATLAB. Mengapa? karena bebas digunakan dengan pustaka CV yang terdefinisi dengan baik (OpenCV, scikit-image, Pillow, SimpleCV).


Keduanya didasarkan pada pemrograman dinamis (pengkodean cepat dan pemrosesan lambat). Jika Anda membutuhkan komputasi cepat, maka C++ dengan OpenCV lebih direkomendasikan.


MATLAB membutuhkan lisensi untuk penggunaan akademis atau komersial. Versi terbaru memiliki toolbox computer vision yang terdokumentasi dengan baik dan mudah digunakan. Jika Anda tidak ingin membayar, Anda dapat menggunakan versi gratis (sintaksnya hampir sama) yang disebut Oktave (GNU Oktave). Octave memiliki fungsionalitas terbatas untuk IP tetapi dengan library berikut (VLFeat - Home, Peter's Functions for Computer Vision), bisa dimungkinkan.

Di sisi lain, Python berkembang pesat dalam beberapa tahun terakhir karena dukungan Google dan maraknya Deep Learning.


Membandingkan IP dalam MATLAB  dengan Python menggunakan OpenCV.

  • Kecepatan

Menggunakan library OpenCV di Python memiliki fungsi pemrosesan gambar lebih cepat jika dibandingkan dengan MATLAB. Terutama karena pustaka OpenCV ditulis dalam C/C++.

MATLAB dibangun di atas banyak wrapper, yang menghabiskan lebih banyak waktu ketika kode dijalankan.

  • Fungsionalitas

MATLAB memiliki lebih banyak fungsi jika dibandingkan dengan OpenCV.

MATLAB memiliki antarmuka interaktif yang membuat banyak hal menjadi lebih mudah.

  • Biaya

Sementara OpenCV library gratis, MATLAB adalah perangkat lunak berlisensi yang cukup mahal.

  • Keterbacaan Kode

MATLAB memiliki format kode yang lebih mudah dibaca jika dibandingkan dengan OpenCV. S

Lorem

Please note: Delete this widget in your dashboard. This is just a widget example.

scikit-image

Please note: Delete this widget in your dashboard. This is just a widget example.

Dolor

Please note: Delete this widget in your dashboard. This is just a widget example.