0% found this document useful (0 votes)
66 views21 pages

Grade 10 Unit 5 - Computer Vision

Uploaded by

shlokk2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views21 pages

Grade 10 Unit 5 - Computer Vision

Uploaded by

shlokk2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Unit 5: Computer Vision

▪ Introduction to Computer Vision


▪ Applications of Computer Vision
▪ Computer Vision Tasks
▪ Basics of Images
▪ Basics of Pixels
▪ Grayscale Images
▪ RGB Images
Introduction to Computer Vision
Artificial intelligence is a technique that enables computers to mimic human
intelligence. As humans we can see things, analyse it and then do the required action
on the basis of what we see.
Machines also have the eyes that humans have via the Computer Vision domain of
Artificial Intelligence. CV 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.

What is Computer Vision?


Computer vision is a field of artificial intelligence
that trains computers to interpret and understand
the visual world.
Difference between Computer Vision and Human Vision
Human Vision Computer Vision
Human vision is the visual system of the Computer vision is a subfield of artificial
human eye and brain. intelligence (AI) that involves developing
algorithms to understand visual information.
It's a biological and natural process that Its artificial process of enabling machines,
involves the eyes capturing light, the brain such as cameras and computers, to interpret
processing the visual information, and the and understand visual information.
mind interpreting it.
Human vision is often integrated with other Computer vision operates as a standalone
senses, such as hearing, touch, and smell, to system and typically does not integrate with
create a holistic perception of the world. other senses in the same way humans do.
Applications of Computer Vision
The concept of computer vision was first introduced in the 1970s. Computer vision
technology advanced enough to make these applications available to everyone at ease
today. However, with significant leap in technology that has put computer vision on the
priority list of many industries . Some of the applications of the computer vision are:
1. Facial Recognition
2. Face Filters
3. Google’s Search by Image
4. Computer Vision in Retail
5. Self-Driving Cars
6. Medical Imaging
7. Google Translate App
8. Sports Analytics
9. Agriculture
Facial filters
Modern days social media apps like Snapchat and Instagram use such kinds of
technology that extract facial dynamics and process them using AI it applies the
facial filter selectedto get the best result.
Medical Imaging :
For the last decades, computer vision medical imaging application has
been a trustworthy help for physicians and doctors. It creates and
analyzes images and helps doctors with their interpretation.
The application is used to read and convert 2D scan images into
interactive 3D models.
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.
Self-Driving Cars:
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.
For eg: Companies like Tesla are now interested in developing self-
driving cars
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.
Google Translate App

We can translate text in images instantly in any required languages simply by pointing our camera.
▪ All we need to do to read signs in a foreign language is to point our phone’s camera at the words
and let the Google Translate app tell us what it means in our 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
▪ The translation accuracy depends on the clarity of the text. Translation of small, unclear, or
stylized text may not be accurate.

Google’s Search by Image or Google lens:


To search data, Google uses Computer vision for capturing and
analyzing different features of the input image to the database of
images and then gives us the search result.
Sports Analytics
Sports analytics is an area where computer vision is becoming
increasingly important. Computer vision technology can be
used to track player movements and analyze their
performance. This technology is used in sports such as
basketball, soccer, and football.
Agriculture
In agriculture, computer vision is being used to improve
crop yields and reduce waste. One application of computer
vision in agriculture is the use of drones equipped with
computer vision technology to monitor crops and identify
potential issues, such as pest infestations and nutrient
deficiencies. Computer vision is also being used to develop
new agricultural technologies, such as autonomous tractors
and robotic harvesters
Computer Vision Tasks
The various applications of Computer Vision are based on a certain number of tasks
which are performed to get certain information from the input image which can be
directly used for prediction or forms the base for further analysis.
The tasks used in a computer vision application are :
Single object
Classification
Image Classification is the task of identifying an object in the input image and label from a
predefined category. This is one of the core problems in CV that, despite its simplicity, has a
large variety of practical applications.
Classification + Localization
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 object
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. Object detection is an
extension of image classification. It is commonly used in applications such as image retrieval
and automated vehicle parking systems.
Object Detection provides not only class
Object detection example
labels but also precise object locations
through bounding boxes.
Examples:
The detection of objects enables
intelligent healthcare monitoring,
autonomous driving, smart video
surveillance, anomaly detection, robot
vision, and much more.

What is segmentation in computer vision?


Another important subject within computer vision is image segmentation. It is the process of dividing an
image into different regions based on the characteristics of pixels to identify objects or boundaries to simplify
an image and more efficiently analyze it.
One way to view segmentation is clustering, where pixels sharing
certain features such as color, intensity, or texture are grouped
together and represented as a single entity.
Instance Segmentation
Instance Segmentation is the process of identifying and separating individual objects within an image,
including detecting the boundaries of each object and assigning a unique label to each object. A
segmentation algorithm takes an image as input and outputs a collection of regions (or segments).
It is used for tasks such as counting the number of objects like such as counting cars, detecting ships for
maritime security, and sea pollution monitoring.

Semantic Segmentation Instance Segmentation


Semantic segmentation cannot distinguish Instance segmentation can distinguish between
between different instances in the same different instances of the same categories, i.e. different
category, i.e. all chairs are marked blue. chairs are distinguished by different colours. It dives
deeper than semantic segmentation and differentiates
two objects with the same labels.
What is the difference between object detection and instance segmentation?
Object detection finds bounding boxes around objects and classifies them. Instance
segmentation adds, for every detected object, a pixel mask that gives the shape of the
object.
What is Pixel Mask
A "pixel mask" typically refers to a mask used in image processing, computer vision, and
related fields.

Computer vision is a rapidly growing field that has many real-world applications. From
facial recognition to autonomous vehicles, computer vision is making a big impact in a
wide range of industries. As technology continues to develop, we can expect to see even
more exciting applications of computer vision in the future.
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.
▪ Pixels are the basic element of a photograph.
▪ They are the smallest unit of information that make up a picture.
▪ pixel are usually round or square and are typically arranged in a
2-dimensional grid.
▪ In general term, The more pixels you have, the more closely the
image resembles the original.
▪ Pixel value represent the brightness of the pixel.
▪ The range of a pixel value in 0-255,where 0 is taken as Black or no colour and 255 is taken
as white
Why do we have a value of 255 ?
In the computer systems, computer data is in the form of ones and zeros, which we call
the binary system. Each bit in a computer system can have either a zero or a one.
Since each pixel uses 1 byte of an image, which is equivalent to 8 bits of data. Since
each bit can have two possible values which tells us that the 8 bit can have 256
possibilities of values which starts from 0 and ends at 255.
How does the computer see an image?
A computer sees an image as 0s and 1s. Pixel is the smallest
unit in an image. When we take a digital image, it is stored
as a combination of pixels. Each pixel contains a different
number of channels.
Resolution
▪Resolution indicates the number of pixels that are displayed per inch for an image (or pixels per centimeter).
▪Term for area covered by the pixels in conventionally known as resolution.
▪ Most computer monitors display at resolutions of 72 pixels per inch or 96 pixels per inch.
▪1 megapixel is a million pixels. [width pixel multiplied by height pixel will be equal to 1,00,000 pixels]
▪Example :Resolution of 1280 x 720 means that the screen will have a width of 1280 pixels while the height
of the screen will be 720 pixels. Width represent number of columns and height represents no of rows.

Video Resolution Chart Difference between Standard Definition and


Pixel Size High Definition Resolution image
Resolution Name
(Width X height)
SD (Standard Definition) 480p 640 x480
HD (High Definition) 720p 1280 x 720
Full HD (FHD) 1080p 1920 x 1080
2K video (Quad HD) 2k or 1440 2560 x 1440
4K video or Ultra HD (UHD) 4K or 2160p 3840 x 2160
8K video or Full Ultra HD 8K or 4320p 7680 x4320
Grayscale Images
▪Grayscale images are images which have a range of shades of gray without apparent colour.
▪The darkest possible shade is black, which is the total absence of colour or 0 value of pixel.
▪The lightest possible shade is white, which is the total presence of colour or 255 value of a pixel .
▪A grayscale has each pixel of size 1 byte having a single plane of 2d array of pixels. The size of a grayscale
image is defined as the Height XWidth of that image.
RBG Images
•All the coloured images are made up of three primary colours Red, Green and Blue.
•All the other colour are formed by using these primary colours at different
proportions.
•Computer stores RGB Images in three different channels called the R channel, G
channel and the B channel.
Why is grayscale needed for image processing?
It helps in simplifying algorithms and as well eliminates the complexities related to
computational requirements. It makes room for easier learning for those who are
new to image processing. This is because grayscale compressors an image to its
barest minimum pixel.
Difference between RGB and Gray scale Images
RGB Image Gray scale Image
An RGB image has three color channels: Red channel, A grayscale image has just one channel
Green channel and Blue channel

Try the Activity


RGB Calculator : https://www.w3schools.com/colors/colors_rgb.asp.

1. What is the output colour when you put R=G=B=255 ?


2. What is the output colour when you put R=G=B=0 ?
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
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.
For example:
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.

Were you able to find the exact location of all the


patches?
________________________________
Which one was the most difficult to find?
_________________________________
Which one was the easiest to find?
__________________________________
Introduction to OpenCV
OpenCV or Open Source Computer Vision Library is that tool
• It helps a computer extract these features from the images.
• It is used for all kinds of images and video processing and analysis.
• It is capable of processing images and videos to identify objects, faces, or
even handwriting.
Working with Images in Python using CV2
The image module in CV2 library is used for working with images in Python. The
image module also includes useful methods which are :
1. imread ( ) which is used to read images and
2. imshow ( ) which is used to display the image.
3. imwrite() which is used to store the image.
4. cv2. cvtColor() method is used to convert an image from one color space to another
The computer processes images in the form of a matrix for which NumPy is used and
it is used in the background.
1. What is computer vision, and how does it differ from human vision?
2. What are some common applications of computer vision in real life?.
3. Define Pixel and Resolution.
4. Explain the tasks used in Computer Vision applications for single object.
5. Explain the tasks used in Computer Vision applications for multiple objects.
6. What do you mean by Grayscale image and Colour image?
7. What is object detection in computer vision, and why is it important?

You might also like