The process of separating the foreground pixels from the background is called thresholding. There are many ways of achieving optimal thresholding and one of the ways is called the Otsu’s method, proposed by Nobuyuki Otsu. Otsu’s method[1] is a variance-based technique to find the threshold value where the weighted variance between the foreground and background […]
Tag: Mathematics
Fast nth Fibonacci number algorithm
Definition: The Fibonacci sequence is defined by the equation, where \(F(0) = 0 \), \(F(1) = 1 \) and \(F(n) = F(n-1) + F(n-2) \text{for } n \geq 2 \). This gives us the sequence 0,1,1,2,3,5,8,13 … called the Fibonacci Sequence. This post is about how fast we can find the nth number in the […]
Understanding Graham scan algorithm for finding the Convex hull of a set of Points
Convex Hull is one of the fundamental algorithms in Computational geometry used in many computer vision applications like Collision avoidance in Self Driving Cars, Shape analysis and Hand Gesture-recognition, etc. By Definition, A Convex Hull is the smallest convex set that encloses a given set of points. For Example, Given a set of points P […]
Find clusters of collinear points from a given set of data points
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 the […]
Deriving the famous Euler’s formula through Taylor Series
Euler’s formula is widely regarded as the most remarkable formula in mathematics. It elegantly combines the seemingly unrelated worlds of exponential functions, imaginary numbers, and trigonometry into a single, aesthetically pleasing equation. We readily recognize five familiar numbers (e, i, ฯ, 0, and 1) and three simple operations (exponentiation, multiplication, and addition) that we frequently […]
Function to get the preceding odd number (y) for any given number (x)
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 […]
Using the law of cosines and vector dot product formula to find the angle between three points
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 […]
Why isn’t n/0 allowed in mathematics.
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 […]
Some Greek mathematical symbols with their pronunciations
Harris Corner Detector implementation in python
The Harris corner detection algorithm also called the Harris & Stephens corner detector is one of the simplest corner detectors available. The idea is to locate interest points where the surrounding neighbourhood shows edges in more than one direction. The basic idea of algorithm is to find the difference in intensity for a displacement of […]