Explore Courses
Liverpool Business SchoolLiverpool Business SchoolMBA by Liverpool Business School
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA (Master of Business Administration)
  • 15 Months
Popular
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Business Administration (MBA)
  • 12 Months
New
Birla Institute of Management Technology Birla Institute of Management Technology Post Graduate Diploma in Management (BIMTECH)
  • 24 Months
Liverpool John Moores UniversityLiverpool John Moores UniversityMS in Data Science
  • 18 Months
Popular
IIIT BangaloreIIIT BangalorePost Graduate Programme in Data Science & AI (Executive)
  • 12 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
upGradupGradData Science Bootcamp with AI
  • 6 Months
New
University of MarylandIIIT BangalorePost Graduate Certificate in Data Science & AI (Executive)
  • 8-8.5 Months
upGradupGradData Science Bootcamp with AI
  • 6 months
Popular
upGrad KnowledgeHutupGrad KnowledgeHutData Engineer Bootcamp
  • Self-Paced
upGradupGradCertificate Course in Business Analytics & Consulting in association with PwC India
  • 06 Months
OP Jindal Global UniversityOP Jindal Global UniversityMaster of Design in User Experience Design
  • 12 Months
Popular
WoolfWoolfMaster of Science in Computer Science
  • 18 Months
New
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Rushford, GenevaRushford Business SchoolDBA Doctorate in Technology (Computer Science)
  • 36 Months
IIIT BangaloreIIIT BangaloreCloud Computing and DevOps Program (Executive)
  • 8 Months
New
upGrad KnowledgeHutupGrad KnowledgeHutAWS Solutions Architect Certification
  • 32 Hours
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Popular
upGradupGradUI/UX Bootcamp
  • 3 Months
upGradupGradCloud Computing Bootcamp
  • 7.5 Months
Golden Gate University Golden Gate University Doctor of Business Administration in Digital Leadership
  • 36 Months
New
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Golden Gate University Golden Gate University Doctor of Business Administration (DBA)
  • 36 Months
Bestseller
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDoctorate of Business Administration (DBA)
  • 36 Months
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (DBA)
  • 36 Months
KnowledgeHut upGradKnowledgeHut upGradSAFe® 6.0 Certified ScrumMaster (SSM) Training
  • Self-Paced
KnowledgeHut upGradKnowledgeHut upGradPMP® certification
  • Self-Paced
IIM KozhikodeIIM KozhikodeProfessional Certification in HR Management and Analytics
  • 6 Months
Bestseller
Duke CEDuke CEPost Graduate Certificate in Product Management
  • 4-8 Months
Bestseller
upGrad KnowledgeHutupGrad KnowledgeHutLeading SAFe® 6.0 Certification
  • 16 Hours
Popular
upGrad KnowledgeHutupGrad KnowledgeHutCertified ScrumMaster®(CSM) Training
  • 16 Hours
Bestseller
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 4 Months
upGrad KnowledgeHutupGrad KnowledgeHutSAFe® 6.0 POPM Certification
  • 16 Hours
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Science in Artificial Intelligence and Data Science
  • 12 Months
Bestseller
Liverpool John Moores University Liverpool John Moores University MS in Machine Learning & AI
  • 18 Months
Popular
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
IIIT BangaloreIIIT BangaloreExecutive Post Graduate Programme in Machine Learning & AI
  • 13 Months
Bestseller
IIITBIIITBExecutive Program in Generative AI for Leaders
  • 4 Months
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
IIIT BangaloreIIIT BangalorePost Graduate Certificate in Machine Learning & Deep Learning (Executive)
  • 8 Months
Bestseller
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Liverpool Business SchoolLiverpool Business SchoolMBA with Marketing Concentration
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA with Marketing Concentration
  • 15 Months
Popular
MICAMICAAdvanced Certificate in Digital Marketing and Communication
  • 6 Months
Bestseller
MICAMICAAdvanced Certificate in Brand Communication Management
  • 5 Months
Popular
upGradupGradDigital Marketing Accelerator Program
  • 05 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Corporate & Financial Law
  • 12 Months
Bestseller
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in AI and Emerging Technologies (Blended Learning Program)
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Intellectual Property & Technology Law
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Dispute Resolution
  • 12 Months
upGradupGradContract Law Certificate Program
  • Self paced
New
ESGCI, ParisESGCI, ParisDoctorate of Business Administration (DBA) from ESGCI, Paris
  • 36 Months
Golden Gate University Golden Gate University Doctor of Business Administration From Golden Gate University, San Francisco
  • 36 Months
Rushford Business SchoolRushford Business SchoolDoctor of Business Administration from Rushford Business School, Switzerland)
  • 36 Months
Edgewood CollegeEdgewood CollegeDoctorate of Business Administration from Edgewood College
  • 24 Months
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with Concentration in Generative AI
  • 36 Months
Golden Gate University Golden Gate University DBA in Digital Leadership from Golden Gate University, San Francisco
  • 36 Months
Liverpool Business SchoolLiverpool Business SchoolMBA by Liverpool Business School
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA (Master of Business Administration)
  • 15 Months
Popular
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Business Administration (MBA)
  • 12 Months
New
Deakin Business School and Institute of Management Technology, GhaziabadDeakin Business School and IMT, GhaziabadMBA (Master of Business Administration)
  • 12 Months
Liverpool John Moores UniversityLiverpool John Moores UniversityMS in Data Science
  • 18 Months
Bestseller
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Science in Artificial Intelligence and Data Science
  • 12 Months
Bestseller
IIIT BangaloreIIIT BangalorePost Graduate Programme in Data Science (Executive)
  • 12 Months
Bestseller
O.P.Jindal Global UniversityO.P.Jindal Global UniversityO.P.Jindal Global University
  • 12 Months
WoolfWoolfMaster of Science in Computer Science
  • 18 Months
New
Liverpool John Moores University Liverpool John Moores University MS in Machine Learning & AI
  • 18 Months
Popular
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (AI/ML)
  • 36 Months
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDBA Specialisation in AI & ML
  • 36 Months
Golden Gate University Golden Gate University Doctor of Business Administration (DBA)
  • 36 Months
Bestseller
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDoctorate of Business Administration (DBA)
  • 36 Months
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (DBA)
  • 36 Months
Liverpool Business SchoolLiverpool Business SchoolMBA with Marketing Concentration
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA with Marketing Concentration
  • 15 Months
Popular
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Corporate & Financial Law
  • 12 Months
Bestseller
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Intellectual Property & Technology Law
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Dispute Resolution
  • 12 Months
IIITBIIITBExecutive Program in Generative AI for Leaders
  • 4 Months
New
IIIT BangaloreIIIT BangaloreExecutive Post Graduate Programme in Machine Learning & AI
  • 13 Months
Bestseller
upGradupGradData Science Bootcamp with AI
  • 6 Months
New
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
KnowledgeHut upGradKnowledgeHut upGradSAFe® 6.0 Certified ScrumMaster (SSM) Training
  • Self-Paced
upGrad KnowledgeHutupGrad KnowledgeHutCertified ScrumMaster®(CSM) Training
  • 16 Hours
upGrad KnowledgeHutupGrad KnowledgeHutLeading SAFe® 6.0 Certification
  • 16 Hours
KnowledgeHut upGradKnowledgeHut upGradPMP® certification
  • Self-Paced
upGrad KnowledgeHutupGrad KnowledgeHutAWS Solutions Architect Certification
  • 32 Hours
upGrad KnowledgeHutupGrad KnowledgeHutAzure Administrator Certification (AZ-104)
  • 24 Hours
KnowledgeHut upGradKnowledgeHut upGradAWS Cloud Practioner Essentials Certification
  • 1 Week
KnowledgeHut upGradKnowledgeHut upGradAzure Data Engineering Training (DP-203)
  • 1 Week
MICAMICAAdvanced Certificate in Digital Marketing and Communication
  • 6 Months
Bestseller
MICAMICAAdvanced Certificate in Brand Communication Management
  • 5 Months
Popular
IIM KozhikodeIIM KozhikodeProfessional Certification in HR Management and Analytics
  • 6 Months
Bestseller
Duke CEDuke CEPost Graduate Certificate in Product Management
  • 4-8 Months
Bestseller
Loyola Institute of Business Administration (LIBA)Loyola Institute of Business Administration (LIBA)Executive PG Programme in Human Resource Management
  • 11 Months
Popular
Goa Institute of ManagementGoa Institute of ManagementExecutive PG Program in Healthcare Management
  • 11 Months
IMT GhaziabadIMT GhaziabadAdvanced General Management Program
  • 11 Months
Golden Gate UniversityGolden Gate UniversityProfessional Certificate in Global Business Management
  • 6-8 Months
upGradupGradContract Law Certificate Program
  • Self paced
New
IU, GermanyIU, GermanyMaster of Business Administration (90 ECTS)
  • 18 Months
Bestseller
IU, GermanyIU, GermanyMaster in International Management (120 ECTS)
  • 24 Months
Popular
IU, GermanyIU, GermanyB.Sc. Computer Science (180 ECTS)
  • 36 Months
Clark UniversityClark UniversityMaster of Business Administration
  • 23 Months
New
Golden Gate UniversityGolden Gate UniversityMaster of Business Administration
  • 20 Months
Clark University, USClark University, USMS in Project Management
  • 20 Months
New
Edgewood CollegeEdgewood CollegeMaster of Business Administration
  • 23 Months
The American Business SchoolThe American Business SchoolMBA with specialization
  • 23 Months
New
Aivancity ParisAivancity ParisMSc Artificial Intelligence Engineering
  • 24 Months
Aivancity ParisAivancity ParisMSc Data Engineering
  • 24 Months
The American Business SchoolThe American Business SchoolMBA with specialization
  • 23 Months
New
Aivancity ParisAivancity ParisMSc Artificial Intelligence Engineering
  • 24 Months
Aivancity ParisAivancity ParisMSc Data Engineering
  • 24 Months
upGradupGradData Science Bootcamp with AI
  • 6 Months
Popular
upGrad KnowledgeHutupGrad KnowledgeHutData Engineer Bootcamp
  • Self-Paced
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Bestseller
KnowledgeHut upGradKnowledgeHut upGradBackend Development Bootcamp
  • Self-Paced
upGradupGradUI/UX Bootcamp
  • 3 Months
upGradupGradCloud Computing Bootcamp
  • 7.5 Months
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 5 Months
upGrad KnowledgeHutupGrad KnowledgeHutSAFe® 6.0 POPM Certification
  • 16 Hours
upGradupGradDigital Marketing Accelerator Program
  • 05 Months
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
upGradupGradData Science Bootcamp with AI
  • 6 Months
Popular
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Bestseller
upGradupGradUI/UX Bootcamp
  • 3 Months
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 4 Months
upGradupGradCertificate Course in Business Analytics & Consulting in association with PwC India
  • 06 Months
upGradupGradDigital Marketing Accelerator Program
  • 05 Months

Computer Vision Algorithms: Everything You Wanted To Know [2024]

Updated on 03 July, 2023

8.07K+ views
11 min read

Introduction

The word computer vision means the ability of a computer to see and perceive the surrounding. A lot of application holds for computer vision to cover — Object detection and recognition, self driving cars, facial recognition, ball tracking, photo tagging, and many more. Before diving in the technical jargons, first let’s discuss the entire computer vision pipeline. 

The entire pipeline is divided into 5 basic steps, each with a specific function. Firstly, the input is needed for the algorithm to process that can be in the form of an image or stream of image (image frames). The next step is pre-processing. In this step, functions are applied to the incoming image(s) so that the algorithm can better understand the image.

Some of the functions involve noise reduction, image scaling, dilation, and erosion, removing color spots, etc. The next step is selecting the area of interest or the region of interest. Under this lies the object detection and image segmentation algorithms. Further, we have feature extraction that means retrieving relevant information/features from the images that are necessary for accomplishing the end goal.

Get Machine Learning Certification from the World’s top Universities. Earn Masters, Executive PGP, or Advanced Certificate Programs to fast-track your career.

The final step is recognition or prediction, where we recognize objects in a given frame of images or predict the probability of the object in a given image frame.

Example

Let’s look at a real world application of the computer vision pipeline. Facial expression recognition is an application of computer vision that is used by a lot of research labs to get an idea of what effect a particular product has on its users. Again, we have input data to which we apply the pre-processing algorithms.

The next step involves detecting faces in a particular frame and cropping that part of the frame. Once this is achieved, facial landmarks are identified like mouth, eyes, nose, etc. — key features for emotion recognition.

In the end, a prediction model( trained model) classifies the images based on the features extracted in the intermediary steps.

Algorithms

Before I start mentioning the algorithms in computer vision, I want to stress the term ‘Frequency’. The frequency of an image is the rate of change of intensity. High-frequency images have large changes in intensity. A low-frequency image is relatively uniform in brightness or the intensity changes slowly.

On applying Fourier transform to an image we get a magnitude spectrum that yields the information of the image frequency. Concentrated point in the center of the frequency domain image means a lot of low frequency components are present in the image. High frequency components include — edges, corners, stripes, etc. We know that an image is a function of x and y f(x,y). To measure the intensity change, we just take the derivative of the function f(x,y). 

Object Detection Algorithms: From R-CNN to YOLO

Object detection is a fundamental task in computer vision algorithms that involves locating and classifying objects within an image or a video. Over the years, several object detection algorithms have been developed, each with its own strengths and limitations. In this article, we will explore two popular object detection algorithms: R-CNN and YOLO.

R-CNN (Region-based Convolutional Neural Network) was one of the pioneering algorithms in object detection. It introduced the concept of region proposals, which involves generating a set of potential object-bounding box regions within an image. R-CNN then applies a pre-trained CNN to each proposed region, extracting features and performing classification to determine the presence of objects. While R-CNN achieved good accuracy, its drawback was its slow inference speed due to its sequential processing of region proposals.

To address the speed issue, subsequent improvements were made, leading to the development of Fast R-CNN and Faster R-CNN. These algorithms introduced region of interest (ROI) pooling and shared convolutional layers, which significantly sped up the detection process. By sharing convolutional computation across regions, these algorithms achieved faster inference times while maintaining high accuracy.

Another breakthrough in object detection came with the introduction of You Only Look Once (YOLO). YOLO revolutionized the field by introducing a single-stage detection approach that achieved real-time object detection. YOLO divides the input image into a grid and predicts bounding boxes and class probabilities directly from each grid cell. This approach eliminates the need for region proposals and allows for simultaneous detection across the entire image. YOLO’s architecture, coupled with its efficient implementation, enables it to achieve impressive speed while maintaining competitive accuracy.

Image Classification Using Convolutional Neural Networks (CNNs)

Image classification is a crucial task in computer vision algorithms and applications that involves assigning labels or categories to input images. Convolutional Neural Networks (CNNs) have emerged as the go-to architecture for image classification, delivering state-of-the-art performance on various datasets.

CNNs excel at capturing hierarchical representations of images, learning both low-level and high-level features. The architecture comprises multiple layers, including convolutional, pooling, and fully connected layers. Convolutional layers use filters to detect local patterns and spatial relationships within the input image. Pooling layers downsample feature maps, reducing computational complexity while retaining important information. Fully connected layers enable the network to make predictions by learning complex relationships between extracted features and their corresponding classes.

Pre-training and fine-tuning CNNs using large-scale datasets, such as ImageNet, have become common practices. Pre-trained models, such as VGGNet, ResNet, and Inception, serve as powerful feature extractors, allowing for transfer learning. By leveraging pre-trained models, even with limited labeled data, one can achieve remarkable accuracy in image classification tasks.

CNNs have also benefited from advancements in regularization techniques, such as dropout and batch normalization, which mitigate overfitting and improve generalization. These techniques, along with data augmentation strategies like rotation, scaling, and flipping, help the network generalize well to unseen images.

Sober Filter 

The Sobel operator is used in image processing and computer vision for edge detection algorithms. The filter creates an image of emphasizing edges. It computes an approximation of the slope/gradient of the image intensity function. At each pixel in the image, the output of the Sobel operator is both the corresponding gradient vector and the norm of this vector.

The Sobel Operator convolves the image with a small integer-valued filter in the horizontal and vertical directions. This makes the operator inexpensive in terms of computation complexity. The Sx filter detects edges in the horizontal direction and Sy filter detects edges in the vertical direction. It is a high pass filter.

Applying Sx to the image

Applying Sy to the image

Read: Machine Learning Salary in India

Averaging Filter

Average filter is a normalized filter which is used to determine the brightness or darkness of an image. The average filter moves across the image pixel by pixel replacing each value in the pixel with the average value of the neighboring pixels, including itself.

The Average (or mean) filtering smoothens the images by reducing the amount of variation in the intensity between the neighboring pixels. 

Average filter, Image source

Gaussian Blur Filter

Gaussian blur filter is a low pass filter and it has the following functions:

  1. Smooths an image
  2. Blocks high frequency parts of an image
  3. Preserves edges

Mathematically, by applying a Gaussian blur to an image we are basically convolving the image with a Gaussian function. 

In the above formula, x is the horizontal distance from the point of origin, y is the vertical distance from the origin point, and σ is the standard deviation of the Gaussian distribution. In two dimension, the formula represents a surface whose profiles are concentric circles with a Gaussian distribution from the point of origin. 

Gaussian Blur Filter, Image source

One thing to note here is the importance of choosing a right kernel size. It is important because if the kernel dimension is too large, small features present in the image may disappear and the image will look blurred. If it is too small, the noise in the image will not be eliminated.

Also Read: Types of AI Algorithm You Should Know

Canny Edge Detector

It is an algorithm that makes use of four filters to detect horizontal, vertical and diagonal edges in the blurred image. The algorithm performs the following functions.

  1. It is a widely used an accurate edge detection algorithm
  2. Filters out noise using Gaussian Blur
  3. Finds the strength and direction of edges using Sobel filter
  4. Applies non-max suppression to isolate the strongest edges and thin them to one pixel line
  5. Uses hysteresis(double thresholding method) to isolate the best edges

Canny Edge detector on a steam engine photo, Image by Wikipedia

Haar Cascade

This is a machine learning based approach where a cascade function is trained to solve binary classification problems. The function is trained from a plethora of positive and negative images and is further used to detect objects in other images. It detects the following:

  1. Edges
  2. Lines
  3. Rectangular patterns

To detect the above patterns, following features are used:

Convolutional layers

In this approach, the neural network learns the features of a group of images belonging to the same category. The learning takes place by updating the weights of the neurons using back propagation technique and gradient descent as an optimizer.

It is an iterative process that aims to decrease the error between the actual output and the ground truth. The convolution layers/blocks so obtained in the process act as feature layers that are used to distinguish a positive image from a negative one. Example of a convolution layer is given below.

Convolutional Neural Network, Image Source

Must Read: Types of Classification Algorithm in ML

The fully connected layers along with a SoftMax function at the end categorizes the incoming image into one of the categories it is trained on. The output score is a probabilistic score with a range between 0 to 1.

Conclusion

An overview of the most common algorithms used in Computer Vision has been covered in this blog along with a general pipeline. These algorithms form the basis of more complicated algorithms like SIFT, SURF, ORB, and many more.

If you’re interested to learn more about machine learning, check out IIIT-B & upGrad’s PG Diploma in Machine Learning & AI which is designed for working professionals and offers 450+ hours of rigorous training, 30+ case studies & assignments, IIIT-B Alumni status, 5+ practical hands-on capstone projects & job assistance with top firms.

Frequently Asked Questions (FAQs)

1. What is the difference between Image Processing and Computer Vision?

Image Processing enhances the raw form of images to produce a better version. It is used for extracting some features of the primary image as well. Image Processing is hence a distinct section in the Computer Vision field itself. However, Computer Vision focuses on recognising stimuli objects for accurate classification. Both also use similar technologies in their procedure. Hence, Image Processing can be the primary process in Computer Vision. It remains to be a prominent field in Artificial Intelligence. Image Processing focuses on enhancing images; Computer Vision technology focuses on detailed, accurate analytics to create better systems.

2. Why is Deep Learning used to build Computer Vision algorithms?

Computer Vision has made Artificial Intelligence(AI) more robust due to rigorous data-driven research and consistent visual data analysis. Deep Learning is a continuous process of data input through neural networks. The information is derived from human brain processes to perfect the algorithm for efficient learning, processing, and output. Deep Learning enhances accurate data classification, ensures a reliable AI model. Computer Vision uses this method to align AI to the human brain’s neural network. Deep Learning has enabled dependable systems to assist humans and improve their quality of life.

3. What is a Low Pass filter and High Pass filter?

In Computer Vision Algorithms, multiple filters produce desired outcomes from a raw image. These filters perform numerous functions to smoothen, sharpen and accentuate the appearance as desired. The filters differ in their frequency and propose different effects. For e.g., The Gaussian Blur filter essentially works on smoothing the image by altering the high-frequency parts of the image and preserving the edges. It is called a Low Pass filter because it diminishes the high-frequency locations and maintains the low-frequency locations giving it a smoother visual. In High Pass filters, the low-frequency locations are decreased, and the former preserved, which results in a sharper visual.