C10 - Ai - Computer Vision
C10 - Ai - Computer Vision
CLASSX
ARTIFICIAL INTELLIGENCE
UNIT4
COMPUTERVISION (CV)
OBJECTIVES
• Introduction to Computer Vision
• Applications of CV
• Concepts of Computer Vision
• Understand the basic concepts of image representation,
• feature extraction,
• object detection, and segmentation.
• Understanding CV Concepts
• Computer Vision Tasks
• Basics of Images-Pixel, Resolution, Pixel value , Grayscale and RGB
images
Computer Vision
As humans we can see things, analyse it and then do the required
action on the basis of what we see.
But can machines do the same? Can machines have the eyes that
humans have? If you answered Yes, then you are absolutely right.
The Computer Vision domain of Artificial Intelligence, enables
machines to see through images or visual data, process and
analyse them on the basis of algorithms and methods in order to
analyse actual phenomena with images.
The concept of computer vision was first introduced in the 1970s.
Applications of Computer Vision
Facial Recognition: With the advent of smart cities and
smart homes, Computer Vision plays a vital role in making
the home smarter. Security being the most important
application involves use of Computer Vision for facial
recognition. It can be either guest recognition or log
maintenance of the visitors.
It also finds its application in schools for an attendance
system based on facial recognition of students.
Applications of Computer Vision
Face Filters: The modern-day apps like Instagram and
snapchat have a lot of features based on the usage of
computer vision. The application of face filters is one
among them. Through the camera the machine or the
algorithm is able to identify the facial dynamics of the
person and applies the facial filter selected.
Applications of Computer Vision
Google’s Search by Image: The maximum amount of
searching for data on Google’s search engine comes from
textual data, but at the same time it has an interesting
feature of getting search results through an image. This
uses Computer Vision as it compares different features of
the input image to the database of images and give us the
search result while at the same time analysing various
features of the image.
Applications of Computer Vision
Computer Vision in Retail: The retail field has been one
of the fastest growing field and at the same time is using
Computer Vision for making the user experience more
fruitful. Retailers can use Computer Vision techniques to
track customers’ movements through stores, analyse
navigational routes and detect walking patterns.
Inventory Management is another such application.
Through security camera image analysis, a Computer
Vision algorithm can generate a very accurate estimate of
the items available in the store. Also, it can analyse the use
of shelf space to identify suboptimal configurations and
suggest better item placement.
Applications of Computer Vision
Self-Driving Cars: Computer Vision is the fundamental
technology behind developing autonomous vehicles. Most
leading car manufacturers in the world are reaping the
benefits of investing in artificial intelligence for developing
on-road versions of hands-free technology.
This involves the process of identifying the objects, getting
navigational routes and also at the same time environment
monitoring.
Applications of Computer Vision
Medical Imaging: For the last decades, computer-
supported medical imaging application has been a
trustworthy help for physicians. It doesn’t only create and
analyse images, but also becomes an assistant and helps
doctors with their interpretation. The application is used
to read and convert 2D scan images into interactive 3D
models that enable medical professionals to gain a
detailed understanding of a patient’s health condition.
Applications of Computer Vision
Google Translate App: All you need to do to read signs in
a foreign language is to point your phone’s camera at the
words and let the Google Translate app tell you what it
means in your preferred language almost instantly. By
using optical character recognition to see the image and
augmented reality to overlay an accurate translation, this
is a convenient tool that uses Computer Vision.
How Computer Vision works ?
classification +
Instance
Localisation
Segementation
Single objects
Classification
Image Classification problem is the task of assigning an input image one
label from a fixed set of categories. This is one of the core problems inCV
that, despite its simplicity, has a large variety of practical applications.
Classification + Localisation
This is the task which involves both processes of identifying what object is
present in the image and at the same time identifying at what location
that object is present in that image. It is used only for single objects.
Multiple objects
Object Detection
Object detection is the process of finding instances of real-world objects such as faces,
bicycles, and buildings in images or videos. Object detection algorithms typically use
extracted features and learning algorithms to recognize instances of an object category.
It is commonly used in applications such as image retrieval and automated vehicle
parking systems.
Instance Segmentation
Instance Segmentation is the process of detecting instances of the objects, giving them a
category and then giving each pixel a label on the basis of that. A segmentation
algorithm takes an image as input and outputs a collection of regions (or segments).
Basics of Images
We all see a lot of images around us and use them daily either
through our mobile phones or computer system. But do we ask some
basic questions to ourselves while we use them on such a regular
basis.
Basics of Pixels
The word “pixel” means a picture element. Every photograph,
in digital form, is made up of pixels.
They are the smallest unit of information that make up a
picture.
Usually round or square, they are typically arranged in a 2-
dimensional grid.
Pixels
In the image below, one portion has been magnified many times over so that you can
see its individual composition in pixels. As you can see, the pixels approximate the
actual image.
The more pixels you have, the more closely the image resembles the original.
Resolution
Here is an example of a grayscale image. as you check, the value of pixels are within the range of 0-255.The
computers store the images we see in the form of these numbers.
RGB Images
All the images that we see around are coloured images. These
images are made up of three primary colours Red, Green and Blue.
All the colours that are present can be made by combining different
intensities of red, green and blue.
How do computers store RGB images?
Every RGB image is stored in the form of three different channels
called the R channel, G channel and the B channel.
Each plane separately has a number of pixels with each pixel value
varying from 0 to 255. All the three planes when combined
together form a colour image. This means that in a RGB image,
each pixel has a set of three different values which together give
colour to that particular pixel.
How do computers store RGB images?
As you can see, each colour
image is stored in the form of
three different channels, each
having different intensity. All
three channels combine
together to form a colour we
see.
How do computers store RGB images?
In the above given image, if we split the image into three
different channels, namely Red (R), Green (G) and Blue (B), the
individual layers will have the following intensity of colours of
the individual pixels.
These individual layers when stored in the memory looks like the
image on the extreme right.
How do computers store RGB images?
The images look in the grayscale image because each pixel has a
value intensity of 0 to 255 and as studied earlier, 0 is considered
as black or no presence of colour and 255 means white or full
presence of colour. These three individual RGB values when
combined together form the colour of each pixel.
Therefore, each pixel in the RGB image has three values to form
the complete colour.
Image Features
In computer vision and image processing, a feature is a piece of
information which is relevant for solving the computational
task related to a certain application. Features may be specific
structures in the image such as points, edges or objects.
Good Features
3) How does the colour vary when you put either of the three as 0 and then keep on varying the other two?
4) How does the output colour change when all the three colours are varied in same proportion ?
5) What is the RGB value of your favourite colour from the colour palette?
Image Features Activity-2
Imagine that your security camera is capturing an image.
At the top of the image we are given six small patches of
images. Our task is to find the exact location of those
image patches in the image.
Take a pencil and mark the exact location of those
patches in the image.
Image Features
Were you able to find the exact location of all the patches?