Photo by Alireza Khatami on Unsplash

The whole is greater than the sum of its parts.

This is often the quote that is mentioned to encourage teamwork and collaboration between team members. It highlights that through unity, the group can achieve much greater things than when done individually. Interestingly, we can also observe this very same principle across nature and our society.

Notice in nature, how a single cell can seem minute and insignificant, but it can bring life to an organism when combined with other cells. Or even ourselves, as a consumer in our economy, our spending patterns might seem insignificant, but collectively, our actions…


How can image processing techniques be used to prepare data for a machine learning algorithm?

Photo by Marius Masalar on Unsplash

In this post, we will learn the step-by-step procedures on how to preprocess and prepare image datasets to extract quantifiable features that can be used for a machine learning algorithm. Techniques such as binarization, template matching, morphological operations, and blob detection will be used. This serves as a supplement to the image processing techniques used in my previous article.

Let’s begin.

As usual, we import libraries such as numpy, pandas, and matplotlib. Additionally, we import specific functions from the skimage, sklearn, and imblearn library.

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
from skimage.io import imread…


Why image sharpening is not suitable for image differencing?

(Original Image by GMA News TV)

In this post, we will learn how we can properly preprocess images for image differencing applications. Specifically, we will explore how sharpening an image using convolutional filters and correcting colors using histogram manipulation can affect image differencing. This article serves as an extension to my previous post about image differencing on video feeds.

Let’s begin.

As usual, we import libraries such as numpy and matplotlib. We also import specific functions from the skimage and scipy library.

import numpy as np
import matplotlib.pyplot as plt
from skimage.io import imread, imshow
from skimage.color import rgb2gray
from scipy.signal import convolve2d
from skimage import transform
from skimage import img_as_ubyte
from skimage.exposure…


How to detect the changes and movement in video frames?

(Original Image by GMA News TV)

In this post, we will learn how we can apply the image differencing to detect changes and movement in each frame of a video.

Let’s begin.

As usual, we import libraries such as numpy and matplotlib. We also import specific functions from the skimage library. Lastly, we will introduce the cv2 library to convert video files to images.

import numpy as np
import matplotlib.pyplot as plt
from skimage.io import imread, imshow
from skimage.color import rgb2gray
from skimage.feature import match_template, peak_local_max
from skimage import transform
import cv2

But first, let us define what image differencing is. Basically, it is an image…


How can we detect and recognize objects in an image?

Detecting open windows in the building (Image by Author)

In this post, we will learn how we can find an object in an input image using template matching. This technique is particularly useful in image detection and recognition, as well as to object tracking.

Let’s begin.

As usual, we import libraries such as numpyand matplotlib. Additionally, we import specific functions from the skimage library.

import numpy as np
import matplotlib.pyplot as plt
from skimage.io import imread, imshow
from skimage.color import rgb2gray
from skimage.feature import match_template, peak_local_max
from skimage import transform

Let us define what template matching is. It is a technique for finding a reference image (or a template…


How can we get a different perspective on images?

(Image by Author)

In this post, we will learn how we can apply the homography matrix to adjust the camera perspective in images.

Let’s begin.

As usual, we import libraries such as numpyand matplotlib. Additionally, we import specific functions from the skimage library.

import numpy as np
import matplotlib.pyplot as plt
from skimage.io import imread, imshow
from skimage import transform

Let’s first define what a homography is. In computer vision, homography is a transformation matrix in a homogenous coordinates space that is mapped between two planar projections of an image. These transformations can be a combination of rotation, translation, scaling, or skew operations.


How can image processing techniques be used to prepare data for a machine learning algorithm?

Photo by Avinash Kumar on Unsplash

In this post, we will learn the step-by-step procedures on how to preprocess and prepare image datasets to extract quantifiable features that can be used for a machine learning algorithm.

Let’s begin.

As usual, we import libraries such as numpy, pandas, and matplotlib. Additionally, we import specific functions from the skimage and sklearn library.

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from glob import glob
from skimage.io import imread, imshow
from skimage.color import rgb2gray
from skimage.measure import label, regionprops, regionprops_table
from skimage.filters import threshold_otsu
from skimage.morphology import area_closing, area_opening
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier…


How to pinpoint and segment objects based on their color chromaticity?

(Image by Author)

In this post, we will explore how to conduct image segmentation using the RG Chromaticity Space. This post serves as an extension of the image segmentation methods from my previous post.

Let’s begin.

As usual, we import libraries such as numpy and matplotlib. Additionally, we import specific functions from the skimage library.

import numpy as np
import matplotlib.pyplot as plt
from skimage.io import imread, imshow
from matplotlib.patches import Rectangle
from skimage.morphology import (erosion, dilation, closing, opening,
area_closing, area_opening)

But first, what is chromaticity? Well, it is the objective specification of the quality of a color regardless of its illumination or…


How to pinpoint and segment objects based on their color channels?

(Image by Author)

In this post, we will explore how to conduct image segmentation using trial and error thresholding and Otsu’s method. Moreover, we will explore how the RGB and HSV color spaces can be useful in segmenting images.

Let’s begin.

As usual, we import libraries such as numpy and matplotlib. Additionally, we import specific functions from the skimage library.

import numpy as np
import matplotlib.pyplot as plt
from skimage.io import imread, imshow
from skimage.color import rgb2gray, rgb2hsv
from skimage.morphology import area_opening
from skimage.exposure import histogram
from skimage.filters import threshold_otsu

Let’s use this image of a Chico tree with some of its fruits.


How can we extract and quantify region properties in an image?

(Image by Author)

In this post, we will explore how to automatically detect, label, and measure objects in images using connected components. This method addresses the shortcomings of blob detection methods by grouping pixels based on their connectivity.

Let’s begin.

As usual, we import libraries such as numpy and matplotlib. Additionally, we import specific functions from the skimage library.

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from skimage.io import imread, imshow
from skimage.color import rgb2gray
from skimage.morphology import (erosion, dilation, closing, opening,
area_closing, area_opening)
from skimage.measure import label, regionprops, regionprops_table

What are connected components? Basically, it allows us…

Jephraim Manansala

A Data Scientist and Electrical Engineer trying to share his ideas.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store