0% found this document useful (0 votes)
26 views36 pages

Computer Vision - Session 1

Uploaded by

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

Computer Vision - Session 1

Uploaded by

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

Computer vision

Agenda:
1- Definition of Image processing.
2- Definition of computer vision.
3- Image and it’s type .
4- color-spaces models.
5- Image Digitization.
6- Coordinate Transformation.
7- Histogram && Histogram
Equalization.
9- Noise && Filters.
What is the image processing ?

Image processing is a method to perform some operations on an image, in


order to get an enhanced image or to extract some useful information from it

Example of operations :

• Rescaling Image
• Correcting Illumination.
What is the effect of image processing ?
What is the effect of image processing ?
What is the effect of image processing ?
What is the computer vision?

is a subject that enables the computer to understand the image and video collected
by the acquisition device. Specifically, the computer is equipped with eyes (camera)
and brain (algorithm) so that the computer can sense the environment.
Example of operations :
• Self-driving cars.
• X-Ray analysis.
• Cancer detection.
Self-driving cars
X-Ray analysis
Camera Detection
How to benefit from computer vision in Traffic ?
Could you tell me the difference between Image processing and Computer Vision?
What is the difference between Image Processing and Computer Vision?
What is the definition of image ?

• An Image is formed as the result of projection of 3D scene into 2D .

• A rectangular grid of pixels and it has definite width and height counted in pixel.

• Each pixel (picture element) demonstrates the “intensity” of light or “color”.

What is the types of images ?



• Binary image.

• Grey image.

• Color image(RGB).
(1) Binary Image
A binary image is a black and white image where each pixel value is
either 0 or 1. The
value 0 represents background or black and the value 1 represents
foreground or white.

(2) Grayscale Image


A grayscale image is a black and white image with various shades of
gray. The pixel value of
a grayscale image is represented as an 8-bit integer. i.e., values between
0 and 255.
The pixel value of the grayscale image represents the brightness of the
pixel. The value 0 is
black, the value 255 is white, and the values in between makeup
different shades of gray.
(3) Color image:

• is a mixed of three main colors: Red, Green, and Blue.


• used on a digital display screen.

Types of images :


Binary ●
Grey ●
Colored
image image image

Numbers of ●
1 bit ●
8 bits ●
24 bits
bits

Ranges ●
0 or 1 ●
0 to 255 ●
0 to 255 for
each channel
color-spaces models:
The color spaces in image processing aim to facilitate the
specifications of colors in
some standard way.

Types of color-spaces models:


• RGB model
• HSV
• CMYK
RGB:
is the most common color model used in Digital image processing and
OpenCV. The color image consists of 3 channels. One channel each for one
color. Red, Green and Blue are the main color components of this model.
HSV:
The image consists of three channels. Hue,
Saturation and Value are three channels. This color
model does not use primary colors directly. It uses
color in the way humans perceive them. Used in
graphics such as photoshop.

• H(hue) is measured in degrees. (color Type )

• S(saturation) indicates the ratio of the purity of the selected


color to the maximum purity of the color.

• V(value) indicates the brightness of the color.


CMYK:

• color model is widely used in printers. It


stands for Cyan, Magenta, Yellow and
Black (key). It is a subtractive color
model.

• 1-RGB = CMY

• Cyan is negative of Red.

• Magenta is negative of Green.

• Yellow is negative of Blue.


color-spaces models

RGB

HSV

CMYK ●


COMP ●
Red, Green, ●
Hue, Saturation, ●
Cyan, magenta,
ONENT Blue Value yellow, key

USED ●
In Digital ●
In graphics such as ●
In printers
processing photoshop.
IN

NAME ● an additive color an additive color model ● subtractive color
model model
● Collect all ●
White Color ●
proportional Black Color
Image Digitization

The output of most sensors is a continuous voltage waveform, and image digitization is to
convert continuous images into discrete points that can be processed by computers.

Image digitization involves two processes: sampling and quantization.

Image sampling: is to convert a spatially continuous image into discrete points.

Quantization: is the process of converting the pixel grayscale into discrete integer values
Coordinate Transformation:

The process of converting the coordinates in a map or image from one


coordinate system to another.

Examples:

• Translation.

• Rotation.

• Scaling.

• mirroring.
Translation:

The point whose coordinates are in an image is moved to a new position by a translation vector .
The coordinates after transformation are . The transformation matrix of

translation is .
Example:
Rotation:

Image rotation can be considered as rotation of pixels around an axis perpendicular to the image

The point whose coordinates are in an image is rotated 𝜃º clockwise around the axis that is located
screen.

at the origin of coordinates. The coordinates after transformation are .

The rotation matrix is .


Scaling:

The resolution of the original image is , and the image size is after zooming. The zooming
coefficient is in the horizontal direction and in the vertical direction.

The transformation matrix of zooming is .


Example:
Mirroring
The point whose coordinates are in a 𝑤*ℎ image is mirrored with respect to the central axis
of the image. The coordinates after transformation are .

The transformation matrix of horizontal mirroring is .

The transformation matrix of vertical mirroring is .


Histogram:

• Capture the distribution of gray levels in


the image.
• How frequently each gray level occurs in
the image.
Histogram Equalization:

is a computer image processing technique used to improve contrast in images . It


accomplishes this by effectively spreading out the most frequent intensity values,
i.e., stretching out the intensity range of the image.
Noise:

Noise in an image is the presence of artifacts that do


not originate from the original scene content.

How to Remove Noise :

Filtering image data is a standard process used in


almost every image processing system. Filters are
used for this purpose. They remove noise from
images by preserving the details of the same.
Mean Filtering :

The mean filter refers to the filter in which all template weights are 1. The average value of the
neighborhoods of the pixel is used as the output result. Mean filtering can be used to smooth the
image and eliminate the noise. However, as the size of the template increases, the image becomes
more blurred. It is often used to blur images.
Gaussian Filtering:

The Gaussian filter can be used to reduce the image blurring caused by increased template
sizes.
Median Filtering

The median filter replaces the original pixel value with the median output of the pixel values sorted
in the neighborhood. Median filtering implements noise reduction and retains the sharpness of the
original image, without changing the intensity value of the original image.

Median filtering is commonly used and can effectively suppress salt-and-pepper noise and protect
the edge from blurring while suppressing random noise.
Assignment

1- Read any image but using OpenCV Not scikit


learning and apply coordinates
Transformation(Translation- Rotation - Scaling).

2- search about perspective Transformation and


apply it using OpenCv
Thank you

You might also like