Artificial Intelligence (Computer Vision) : by Dr. Sehat Ullah Department of Computer Science & IT University of Malakand

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 35

Artificial Intelligence

(Computer Vision)

By
Dr. Sehat Ullah
Department of Computer Science & IT
University of Malakand
Computer Vision
• Enabling the computer to see
Computer Vision
• A Computer mimics human sight in four basic
steps
1. Image Acquisition
2. Image Processing
3. Image Analysis
4. Image understanding
Computer Vision
• Image Acquisition: In image acquisition the
visual scene is translated into a form that can
be stored and manipulated by a computer
• For this purpose a camera is used that
translates the scene or image into electrical
signals
• These signals are then converted into binary
form on which a computer performs further
work
Computer Vision
• In order to understand how the scene is
captured and translated into computer
understandable form, we discuss the working
mechanism of Vidicon and CCD types cameras
Computer Vision
Computer Vision
Computer Vision
• Charged Coupled Devices (CCD): A CCD is a
light sensitive integrated circuit designed to
convert a rectangular visual image into a video
electrical signal.
• A lens system focuses the scene onto a
photoconductive substrate such as silicon
• This device absorbs the light and stores it as a
charge on thousands of tiny square or
rectangular capacitors.
Computer Vision
Computer Vision
• The silicon forms a single common plate for all of
these capacitors
• The other plates are individual tiny metal
electrodes separated from the silicon
photoconductor by a thin layer of silicon dioxide
insulator
• Light falling on the substrate causes the
capacitors to charge and discharge to a level
depending on the intensity of light striking the
substrate directly below the tiny capacitive plates
Computer Vision
• To read the scene, voltages are applied to the
capacitor electrodes in sequence from right to
left
• As the control voltage is applied, the capacitor is
discharged and an analog signal is transferred to
the common silicon substrate
• The tiny capacitive cells in the CCD are arranged
in a rectangular or square array
• The larger the number of capacitive cells, the
greater the resolution
Computer Vision
Computer Vision
• CCD cameras are preferred for computer
vision
• They are small light sensitive and reliable
• The light weight and low power consumption
makes them extremely small and portable
Computer Vision
• Pixels: Each time the video signal is sampled
by the ADC, we say that a pixel has been
created
• A pixel is the value of the light intensity at one
particular point on a scan line
• A pixel therefore, is a small element into
which each scan line is broken
• Each scan line will contain approximately 200
to 500 pixels
Computer Vision
• The entire scene is thus represented by a matrix of pixels
Computer Vision
• The number of output bits in the ADC
determines the total number of gray levels to
be represented
• For a 4-bit output, 16 different gray levels are
possible where 0000 and 1111 will represent
the black and white respectively
• Similarly, 8-bit output provides 256 gray levels
Computer Vision
• 3D to 2D : Video camera do not see in 3D
• What we get is a two-dimensional representation
of anything the camera looks at
• We see the accurate height and width of our
subjects, but missing depth detail
• Without depth information it is difficult to
determine the distance between camera and
objects being viewed and the distances between
different objects in the scene
Computer Vision
• How the Human see the world in 3D?
• Human beings have two eyes due to which the
brain gets two similar but slightly different
images of the same scene because of the spacing
between our two eyes
• These difference in the scene allow the brain to
perform a type of “triangularization” that gives us
the ability to sense depth and mentally measure
distances from ourselves to objects and distance
between objects
Computer Vision
• To sense depth in a computer vision system, the
answer is to use two cameras
Computer Vision
• Image Processing : It is also known as image
enhancement, is the process of improving the
quality of the image
• Any thing that can be done to make the image
clearer will simplify analysis and lead to
improved understanding
Computer Vision
• Some steps of image processing:
– Noise Reduction, Gray Scale Modification and
Histogram Flattening
– Noise Reduction:Image averaging helps to
eliminate noise and distortion
– In this process sequential views of the scene are
taken and then averaged
Computer Vision
• Gray Scale Modification: An image processing
technique used to lighten or darken the
scene/image
• Suppose the brightness level of a pixel is
represented by an 8-bit binary number where
0(00000000) represents black and
1(11111111) represents white
All numerical values in between represent some
intermediate shade of gray
Computer Vision
• If the scene is very dark, all of the pixels will have
very low values
• One way to process the image is to lighten it up
by adding a fixed value with each pixel
• This will not change the relationship between
adjacent pixels but the whole scene will be
lightened
• Reverse of the above operation (subtracting fixed
value from each pixel) will darken the image
Computer Vision
• Depending on the kind of enhancement
needed, modification is done by adding,
subtracting, multiplying or dividing all or a
range of pixels values by a constant
Computer Vision
• Histogram Flattening: It is another technique of image
improvement, it is actually a vertical bar chart used to
plot statistical information about an image
• It shows the number of times that each gray level
occurs in an image
• When a histogram is constructed then it can be
determined if there are excessive high or low values
• For example, one analysis may discover an unusually
high number of very bright or very dark levels
Computer Vision
Computer Vision
• Image Analysis: Image analysis begins the
process of locating and defining the various
objects in the scene
• The AI process then attempts to determine
the various objects in the scene
• Image analysis is accomplished by identifying
regions and boundaries or edges
• Edges represent boundaries where two
surfaces come together
Computer Vision
• Edges also identify interface between two
different surfaces or b/w an object and a
background
• An edge is also formed b/w two objects when
one is in front or back of another
• The line b/w an object and its shadow and the
outline of the shadow itself form edges
Computer Vision
• Edges and regions completely define the
scene
• Regions are large flat areas of an object or
scene that have the same intensity value and
occur b/w the various edges and boundary
lines
Computer Vision

Examples of Edges and boundaries


Computer Vision
• Surface smoothing: surfaces are easy to
identify because they are relatively in light
intensity
• Adjacent pixels are within the surface will
have equal values or values very close to one
another
• The values may change gradually over the
surface due to shadow or shading caused by
the positioning of the light source
Computer Vision
• Surfaces are often smoothed out to remove
irregularities or shading before edge detection
• The surface smoothing is usually done by
replacing each pixel value with a new value
• The new value is the average of the values of the
original pixels
• The averaging process causes the shading of the
surfaces to become more uniform
• It blurs an image to remove small variations and
make the surface more consistant
Computer Vision
• Edge Detection: For edge detection a
computer program scans all the pixels in the
image and compares the intensity values of
adjacent pixels
• If the difference b/w the values of two
adjacent pixels is greater than a pre-defined
threshold then there exist a boundary or edge
otherwise not
Computer Vision
• The edge detector normally looks at a small
group of adjacent pixels in both the horizontal
and vertical directions
• In other words it looks through a window at a
small square of pixels
• The size of this window may be any thing from
approximately 2x2 to 15x15 pixels in size
Computer Vision
• Image Comprehension:

You might also like