A set of 3 or more points are said to be collinear if they all lie on a straight line as shown in the image below. One common way of checking if three points are collinear is by finding the area of the triangle formed by the points. The area will be zero if …

Euler’s formula is often coined the most remarkable formula in mathematics. It combines the seemingly unrelated exponential functions, imaginary numbers, and trigonometric functions into a single aesthetically pleasing and beautiful equation. We see five numbers (e, i, π, 0, and 1) that we are familiar with as well as three simple operations (exponentiation, multiplication, and …

For any function, We want, for every value of x, return the corresponding odd number. If x is odd then return it as it is, else return the next number. This can easily be done using a computer program by checking if the number is odd or even. But if you had to find a …

For any 3 points A, B and C on a cartesian plane. If we have to find the angle between these points, there are many ways we can do that. In this article I will talk about the two frequently used methods: The Law of Cosines formula Vector Dot product formula Law of Cosines For …

Abstract This article presents a method for automatic detection and extraction of number plates from the images of cars. There are usually three steps in an Automatic Number Plate Recognition (ANPR) system. The first one is to binarize the image and separate the background from the foreground. The Foreground contains the numbers of the number …

This article presents a method for reducing the number of colors in an image using K-means clustering. This is a continuation of my previously posted color quantization using Uniform Quantization and Median Cut Quantization. K-Means is one of the simplest unsupervised clustering algorithm used to cluster data into K clusters. The algorithm iteratively assigns the …

In my previous post, I talked about the Uniform Quantization algorithm, which was a simple way of reducing the colors in the image. Though it’s easy to implement, it doesn’t always yield good results when there are many colors belonging to the same region. Also, a lot of color regions will not have any colors …

Reducing the number of colors in an image is also called Color quantization. It’s commonly used for generating GIF images which currently supports only 256 colors. The general idea is, group similar colors in an image into regions, replace them with the color which closely resembles or represents the region. This color is also called …

If you divide 4 by 2 you would get 2 as the quotient, which means there are exactly two 2’s in 4. And similarly, If you divide 5 by 2, you would get 2 as the quotient and 1as the remainder, which means there are two 2’s in 5 and a 1 which if you …

Convolution is a process used for applying general-purpose filter effects like blurring, sharpening, embossing, edge detection, and more. To understand convolutions we must first understand what a convolution matrix is, also referred to as kernel. Take for example the blurring filter. In blur filter, we set each pixel to the mean of its neighbouring pixels. …