<<

Module 4 (Robot Vision) Processing and Analysis with Vision Systems INTRODUCTION In this chapter, we will study and discuss some fundamental techniques for image processing and , with a few examples of routines developed for certain purposes.

IMAGE PROCESSING VERSUS IMAGE ANALYSIS Imaggpe processing : The collection of routines and techniques that improve, simplify, enhance, or otherwise alter an image. Image analysis: The collection of processes in which a captured image that is prepared by image processing is analyzed in order to extract information about the image and to identify objects or facts about the object or its environment.

each

in

light

. of

form

intensity

digital

a the

IMAGE in

or

while , form

same . .

print

the

in

DIMENTIONAL IMAGE are -

navigation

either

pixels

and and THREE , all

,

of

color AND

- size in

to-one mappings of scenes to image. of scenes to-one mappings three dimensional. three relative sensing, remote measurement, detection, depth motion positioning and navigation or in color and either in print form or in a digital form All three-dimensional systems share the problem of coping with many- of coping the problem share systems All three-dimensional All real scenes are three dimensional, can either be two or either be can images dimensional, three are scenes All real deals with that image processing operations require Three-dimensional either scene, of a real An image is a representation in black and white An printed image, television and digital images are divided into small the size of all pixels are the same while the intensity of light in each pixel is varied to create the gray images. the gray to create varied is pixel sections called picture cells, or pixels(volume cells or voxels), where where cells or voxels), cells, or pixels(volume sections called picture • TWO • • IS AN IMAGE? WHAT • Image ProcessingImageAnalysisand with VisionSystems • . image

into

A raster scan depiction of a vidiconA raster camera. transforms an image into an analog an image into transforms time, can versus voltage (or current) on. ti a t reconstructed

or on s , i cameras: analog and digital. cameras: s i ev l e t

IMAGES t

broadcast a , d OF IMAGES ar

are not very common any more, but are still around; they around; still but are more, any very common are not d are much more common and are mostly similar to each other. each other. mostly similar to and are common more much are an t Schematic of a vidicon camera. digitized , e s b Camera o t

dtd b t d d tt l i i t ti stored

Analog Camera Analog Camera electrical signal. The signal, a variable electrical signal. use be stored digitized broadcast or reconstructed into image Digital Camera Digital Camera There are two types of vision of two types are There that analog camera an is camera Vidicon

Image ProcessingImageAnalysisand with VisionSystems ACQUISITION • Vidicon • Image Processing and Analysis with Vision Systems Digital Camera • Digital Camera is based on solid-state technology. The main part of the camera is a solid-state silicon wafer image area that has hundreds of thousands of extremely small photosensitive areas called photosites printed on it .

Image acquisition with a digital camera involves the development, at each pixel location, of a charge proportional to the light at the pixel. The image is then read by moving the charges to optically isolated shift registers and reading them at a known rate.

Image data collection model.

on

s and ’ based

are

analysis

and

. is applied of to the individual pixel each pixel location is called a gray called a gray is location each pixel stored

processing uter storage unit in an image format an image format in unit uter storage a digitizer, yielding strings of 0 of yielding strings a digitizer,

. rough an analog-to-digital converter (A an analog-to-digital rough converter and

image image

in

c. t the

displayed

used

map, e map, are

process

Bit , or that ,

JPG , subsequently

IMAGES

are analyze TIFF

, processes

as that hTIFFJPGBitt h

alter s that are subsequently displayed and stored

’ image. The gray values are digitized by digitized are values gray image. The the image. the frequency domain or the spatial the frequency domain. suc 1 to alter analyze or process the image DC) and then either stored in the comp DC) and then either stored In frequency domain processing, the frequency spectrum of the image the frequency is used domain processing, frequency In An image that has different gray at levels gray An image that has different Sampled voltages are first digitized th digitized first are Sampled voltages In spatial-domain processing, the process the process spatial-domain processing, In Many processes that are used in image processing and analysis are based on • • DIGITAL • DOMAIN SPATIAL FREQUENCY DOMAIN VS. • Image ProcessingImageAnalysisand with VisionSystems •

SIGNAL

A

t

ϖ is spectrum requency f OF n

e h sin n b 1 = ∞ n ∑ omain, t CONTENT

dhf d + to a number of sines and of cosines t

ϖ n e-time d cos itu l n a FREQUENCY

1 = ∞ n ∑ e amp h AND +

0 2 a is in t = l Time-domain and frequency-domain plots of a simple sine Time-domain and frequency-domain function. ) t ( f e signa h TRANSFORM AND FREQUENCY CONTENT OF A SIGNAL

t h oug h t lh h h l h l d different amplitudes and frequencies. amplitudes and frequencies. different Any periodic signal may be decomposed in periodic signal may Any in the amplitude-frequency in the amplitude-frequency domain. Al

Image ProcessingImageAnalysisand with VisionSystems FOURIER • • resulting signal resulting ies increases, the ncy domain for a successive set of Sine functions in the time and freque in the time and Sine functions frequencies. As the number of frequenc frequencies. becomes closer to a square function. square function. a becomes closer to

Image ProcessingImageAnalysisand with VisionSystems EDGES , xels with intensities xels ls can be considered to be be considered to ls can NOISE

lues of the pixels of an lues image of the pixels against ram of an image. The pi ram IMAGE:

ot of varying amplitudes ot of varying showing the AN

e intensities of neighboring pixe OF

CONTENT OF AN IMAGE: NOISE EDGES

edges or noise. that are much different are much different from th that Noise and edge information in an intensity diag in an intensity edge information Noise and he result will be a discrete time pl be a discrete will he result time or pixel location as the image is scanned. time or pixel from the neighboring ones. from intensity of light at each pixel. of light at each pixel. intensity Consider sequentially plotting the gray va Consider sequentially the gray plotting is very different Bothand noises value edges are instances in which one pixel T

Image ProcessingImageAnalysisand with VisionSystems FREQUENCY • • • s in the spectrum. the s in EDGES , the first frequencie NOISE

IMAGE:

AN

OF

(a) Signal. (b) Discrete signal reconstructed from the Fourier transform

of the signal in (a), using only four of four using only in (a), the signal of influence

CONTENT OF AN IMAGE: NOISE EDGES the

reduce

will

FREQUENCY Image ProcessingImageAnalysisand with VisionSystems filter

passed through a low-pass filter, a low-pass passed through higher of effect apparent attenuating by severely frequencies of all high frequencies, of all including high frequencies, and edges. the noises the filter will reduce the influence amplitudes. the low-frequencies If a high-frequency signal is If a high-frequency the A high pass filter will increase • • e h t g in dd eated until p ues, a l MASK va

, which can be can , which l eration is re p epixe h yt b and the o s , ll ixel p p, sce ’ . Each step consists of superimposing the superimposed on an image can change the y k convolution mask convolution ixel b emas p CONVOLUTION h

ues in t l convolution mask A image pixel bycells pixel in theva mask onto thenumbers, corresponding and pixels, normalizing multiplying thepixel the result, in which is the substitutedover center for pixel the of in themoved the area over of centerthe interest. of The the image mask area is of is moved interest. The completely mask processed. is more. more. y OPERATIONS: CONVOLUTION MASK

ixel. ixel. and man and p y, h DOMAIN p - ra g hoto adapted to many different tasks, from filtering to edge finding, to filtering to tasks, from different adapted many to a individual gy y p pgpy, Spatial-domain processes access and operate contained in on the information Spatial-domain and access operate processes inTechnique Spatial-domain is the processes

Image ProcessingImageAnalysisand with VisionSystems SPATIAL • • on. ti )] j ura + t ) 1 + 2 sa n t ( − ou y ( ), ith i + ) 1 j + 2 , n i ( − S mage w x is arbitrary is arbitrary and is used to M i

[( S t I n j es ∑ × b 11 j n == , e i i ∑ th

M t = 1 = n S j o ge t 1 n = i ∑∑ er b = new s num ) y thi x,

I t (

Image ProcessingImageAnalysisand with VisionSystems us dj tthi b t tth b ti ith t t ti a prevent saturation of the image. As a result, The user can always of the image. The user can always As a result, saturation prevent The normalizing of scaling factor The normalizing of scaling factor • ixel data and ixel p e becomes smoother. e becomes smoother. 36 pixels. As the resolution As the resolution pixels. 36 × 72 (d) 27 er number of er number × increases, the imag g 144 (c) 54 × light intensity values at each pixel at each pixel values light intensity 576 (b) 108 . × . rate will create a lar create will rate g accordingly

lin p ay levels, As the quantization resolution As the quantization levels, ay QUANTIZATION

diminishes

Quantization er sam g gpg g p image rates on an image at (a) 432 on an image at rates

AND QUANTIZATION

the

means as the light intensities are sampled are at equallymeans as the light intensities spaced of

clarity

the , also be digitized. Digitization of the Digitization of also be digitized. thus better resolution. resolution. thus better location is called intervals. A lar A intervals. The voltage or charge read at each pixel value is an analog value and must an analog value is value at each pixel read charge or voltage The Sampling • Image ProcessingImageAnalysisand with VisionSystems SAMPLING • Effect of different different sampling of Effect decreases the clarity of the image diminishes accordingly An image 8, and 44 gr quantized at 2, 4, f. . s f e as the e as g (a) Sinusoidal signal with a frequency (a) Sinusoidal signal with a frequency of of Amplitudes (b) sampled at the rate must be at least twice as lar be at least twice must y uenc

q fre g mpled data. More than one signal than More mpled data. lin p pg q y g the same sampled data. the same sampled data. 256. × THEOREM 15, presented at higher resolutions of (a) of higher resolutions at presented 15,

64 (c) 256 × theorem, the sam theorem, largest frequency present in the signal. present largest frequency In order to prevent aliasing, according to what is referred to as the sampling referred what is to aliasing, according prevent to order In 32 (b) 64 ×

Image ProcessingImageAnalysisand with VisionSystems SAMPLING • Reconstruction of signals from sa from of signals Reconstruction be may reconstructed from The image of Figure 8. 32

region

. segmentation,

analysis

detection,

image

for edge

it

TECHNIQUES

masking, prepare

to

and

thresholding,

image PROCESSING

- an

growing, and modeling, among others. growing, alter an image and to prepare it for image analysis analysis, thresholding, masking, , segmentation, region Image processing is divided into many subprocesses, including, histogram including, histogram is divided Image subprocesses, processing into many Image processing techniques are used to enhance, improve, or otherwise are used to enhance, improve, techniques Image processing • Image ProcessingImageAnalysisand with VisionSystems IMAGE • ues. l e. g nary va bi tal number of pixels of an image tal number of pixels at o can help in determining a cutoff point can help in determining a cutoff t an ima n g i

d

orme f rans t e b IMAGES

o ram equalization in improvin ram t g s i OF IMAGES

mage i Effect of histo of Effect en an hiitbtfditbil h each gray level. Histogram information information Histogram level. each gray w A histogram is a representation of the to is a representation A histogram

Image ProcessingImageAnalysisand with VisionSystems HISTOGRAM •

1,

or

each

(on

150 ) c ( threshold comparing

, the

100 and ) b s grayness level is below level s grayness ( ’ above threshold

a or

as

assigning the pixel to the different to the different assigning the pixel an image into different portions (or portions different an image into levels levels of at values level y

ra g belonging)

not

grayness e with 256

or g ggy()()

an ima zero, g

certain

or a

(off hresholdin

T picking

by

threshold

pixel value and with the threshold, then value pixel depending portions or levels, on whether the pixel levels) by picking a certain grayness level as a threshold comparingthe each threshold (off or zero, or not belonging) or above the threshold (on or 1, or belonging). Thresholding is the process of dividing is the process Thresholding

Image ProcessingImageAnalysisand with VisionSystems THRESHOLDING • . ) h , e , c , ect to f , p d , a p( p(,,,,,) with res y only with respect to only with respect the only with respect to only with respect to only with respect to all only with respect zed onl y above and below above above and below p(a, d, f, c, e, and below p(a, d, f, above

y is anal p pyy p immediatel immediately s relationship is analyzed s relationship s relationship is analyzed s relationship s relationship is analyzed s relationship s relationshi ’ ’ ’ ’ s relationship is analyzed s relationship p ’ ixel ixel p two rows two columns across from it diagonally on 4 sides (a, c, f, h). (a, c, f, on 4 sides across from it diagonally above, below, to the left, and to the right of g, d, e). p (b, below, above, a, b, c, d, e, f, g, h). c, d, e, f, a, b, lies when a ixels on the ixels p

pp p p applies when a p pixel applies when a pixel p a applies when pixel g applies when a pixel p a applies when pixel a

applies when a p pixel y hborin g ggp . ) 4-connectivit the four immediately the four pixels the four immediately the four pixels six neighboring pixels on the pixels six neighboring h eight pixels surrounding it surrounding eight ( pixels the six nei Connectivity establishs whether they have the same properties, as being such the same properties, establishs whether they have Connectivity +4-connectivity H6-connectivity V6-connectivity 8-connectivity × of the same region, coming from the same object, having a similar texture, etc. a similar texture, the same object, having from coming same region, the of

Image ProcessingImageAnalysisand with VisionSystems CONNECTIVITY • • • • • • spatial- e. g of an ima g in g Frequency-related Frequency-related hborhood avera g gggg Nei can be used to reduce noise in an image, but it also an image, but it in noise to reduce can be used are are divided into two categories. operate on the image at the pixel level, either locally or level, on the image at the pixel operate Masks operate on the Fourier transform of the signal, whereas of the signal, whereas transform on the Fourier operate

RECUCTION

Neighborhood-averaging mask. Neighborhood-averaging reduces the sharpness of image. reduces techniques domain techniques globally. Filtering techniques Neighborhood Averaging

Image ProcessingImageAnalysisand with VisionSystems NOISE • Convolution • . d e lt a h the image will be exactly the same for the image will be exactly the same for of the exact same scene are averaged averaged of the exact same scene are e b e its focus. or reduce

t g e scene mus th n i ons ti it does not blur the ima ac g, ll ti i th t b h lt d in Averaging g gg, g

avera If the noise is systematic, its effect on If the noise is systematic, its effect scene, a the noise. reduce willnot all averaging images, and as a result, multiple cases spectrum might show a the noise, which in many clear for frequency filtering. eliminated by proper can be selectively together. Since the camera has to acquire multiple images Since the camera of the same together. Although image averaging reduces random noise, unlike neighborhood unlike noise, random reduces image averaging Although Image averaging is more effective with an increased number of images. number of an increased with effective more is Image averaging In this technique, a number of images technique, a number of this In of an image is calculated, the frequency transform When the Fourier • • • • Image ProcessingImageAnalysisand with VisionSystems Image Domain Frequency e th y b

d ace l oved by a 3median filter oved and a image corrupted with a random random a image corrupted with s rep i

l xe i e p th

f ue o l ur edges. A variation of this technique ur edges. A variation a mask around the given pixel, sorted in pixel, the given a mask around 7 median filter (d). × e va (a) Original image. (b) The same Gaussian noise. (c) The image impr 7 th

h c hi n w i er, er, filt an di Filter

o use a me Application of a median filter. Application of a median filter. t s with removing the filter will bl noises, with removing once. median of the values of the pixels in of the pixels median of the values ascending order. i t di filt i hi h th l f th i l i l d b th One of the main problems in using neighborhood averaging is that, along One of the main in using neighborhood averaging problems than applied more especially if image grainy, the make to tend Median filters • • Image ProcessingImageAnalysisand with VisionSystems Median e h ng t i . uc d image

ter, re ter, the

fil d i h Other high-pass filters. Other high-pass of

-pass h g drawing hi nt processes, such as segmentation such nt processes,

e a line

lik a

in

ave h e b result

to d and

gne i es mage. i image d

e e an b th

f on o

DETECTION t

s can k as e res A typical high-pass edge A typical detector mask (Laplacian1) and object recognition. recognition. and object Edge detection is a general Edge and a name detection is a techniques that class of routines for general Edge detection is necessary in subseque M k b d i d b h lik hi h amplitude of the lower frequencies while not affecting the amplitudes of while not affecting amplitude of the lower frequencies and edges from the noises as much, thereby separating higher frequencies operate on an image and result in a line drawing of the image th t f th i EDGE • • Image ProcessingImageAnalysisand with VisionSystems • detectors.

edge 2

/ 1 ⎤ ⎥ ⎥ ⎦ 2 ian1 (b), Laplacian2 (c), Sobel (d), ⎟ ⎟ ⎞ ⎠ Prewitt

y f ∂ ∂ and ⎛ ⎝ ⎜ ⎜

+ . 2 ⎞ ⎟ ⎠ x f Roberts, ∂ ∂

, Roberts, and Prewitt edge detectors. ⎛ ⎜ ⎝ and Roberts and Roberts (e) edge detectors. ⎡ ⎢ ⎢ ⎣ = Sobel

intensities f

∇ The pixel

An image (a) and its edges from Laplac its edges An image (a) and from between

DETECTION

differences between pixel intensities Equation below is equivalent of the to calculating Equation the absolute below is equivalent value

Image ProcessingImageAnalysisand with VisionSystems EDGE • . blob

que for edge detection. edge que for a

like

look

Left-right search search techni Left-right which

objects used that can quickly and efficiently

single

of

images

Laplacian1 (b), Laplacian2 (b), Laplacian1 s (e) edge detectors. s (e) edge binary

in

DETECTION

edges

(c), Sobel (d), and Robert The Sobel, Roberts, and Prewitt edge detectors. and Prewitt The Sobel, Roberts, Dubbed left-right search technique is technique search Dubbed left-right

Image ProcessingImageAnalysisand with VisionSystems EDGE • detect edges in binary images of single objects which look like a blob An image (a) and its edges An image (a) and from . line

vertical , lines

), b ( horizontal

. image

d diagonal mask (d). d diagonal an

emphasize emphasize some characteristic of the emphasize some characteristic

of

with effects mask with effects of vertical to )

a lines of an image ( e g inal ima designed g gg() (),

horizontal mask horizontal (c), an be

An ori Masks emphasizing the vertical, horizontal, and diagonal and horizontal, emphasizing the vertical, Masks may

mask

A DETECTION .

image A mask may be designed to emphasize horizontal lines vertical line Masks may be used to intentionally be used to Masks may

Image ProcessingImageAnalysisand with VisionSystems EDGE • . ) θ line

the

of

slope

the

y + m including x , − line

a =

on c

Hough transform. . pixels

c + different

mx = y between

TRANSFORM

plane(Hough plane) showing these values is the Hough transform. is the Hough these values plane(Hough plane) showing relationship between different pixels on a line including the slope of the line The Hough transform is based on transforming the image space into an (r, the image space into an (r, is based on transforming transform The Hough The Hough transform is a technique used to determine the geometric transform The Hough • Image ProcessingImageAnalysisand with VisionSystems HOUGH •

to

is

ng, i on grow i segmentation

of

on, reg i etect d purpose

ge d r of different techniques that divide techniques different r of The age into smallerthat can be entitiesage into . to, e to, d te i m li constituents

its s not i

of ut

b es, d u l segments nc

i on into i

image

egmentat and texture analysis. and texture the image into segments of its constituents The purpose of segmentation is to separate contained in the im the information separate other purposes. used for Segmentation is a generic name for a numbe a generic name for Segmentation is Siildbiliidddiii S

Image ProcessingImageAnalysisand with VisionSystems SEGMENTATION • •

separate

to

make

SPLITTING is

attempt

REGION

. The image is split into closed an , AND

them with thresholding value or range. or range. them with value thresholding her analysis, as object detection. such thresholding segments or components with similar techniques

GROWING

these

Region growing based on a search based on a search growing technique. Region REGION

Through . BY REGION GROWING AND REGION SPLITTING

aw. aw. l routines

on i ect lill areas of neighboring pixels by comparing of neighboring pixels areas In region growing, first nuclei regions are on the basis are formed growing, of some specific first nuclei regions region In se Region growing and growing image are techniques of segmentation, as are splitting Region edge is splitting One technique of region detection routines Through these techniques an attempt is make to separate the different parts of an image into parts of different the furt that can be used in characteristics

Image ProcessingImageAnalysisand with VisionSystems SEGMENTATION • • may may t a th on ti orma f n i f ti th t resentation. resentation. ” p ra t ex “ e

th s are removed of a s are removed by a triple application ary. ary. d uce d e of a bolt and its stick re bolt e of a oun g b o re t e ima y yg p th

as ll th The threads of the bolt of The threads resulting in smooth edges. operation, thickening he binar OPERATIONS T

o smoo s, as we s, as i t

d ys l e use s ana b it n i

can id MORPHOLOGY OPERATIONS d

o a an t t er ec t iitiltd llt dtd idiitli th bj t d b d t th th b d shape of subjects in an image. This operations is performed shape is performed on an of subjects in an image. image in This operations or o be present in the image. in be present Morphology operations refer to a family of operations that are performed on the on performed that are operations of to a family refer Morphology operations on the boundary of an and the small holes cracks fills operation The thickening Thickening Operation Thickening

Image ProcessingImageAnalysisand with VisionSystems BYNARY • •

ence h

object

d the

ece an i p object,

lid the

. ) b ( around

Here, the objects in (a) were ecome one so b from

pixel e, can

are 8-connected to the foreground(object) are 8-connected to the foreground(object) l o h one

ng ected to four rounds of dilation rounds of four ected to j j() i sub Effect of dilation operations. operations. dilation of Effect removes

sappear di with (b) 3 and (c) 7 repetition. with (b) 3 and (c) 7 repetition. e th erosion

as ll Since

s,as we t ec bj t ll th di i h l b lid i d h cannot be recognized as distinct objects anymore. as distinct cannot be recognized becomes increasingly thinner with each becomes increasingly pass. o eliminated. Since erosion removes one pixel from around the object, the object are changed to foreground pixels. With additional applications are pixels. of dilation, changed the to foreground In dilation, the background pixels that pixels dilation, the background In In erosion, foreground pixels that are that are 8-connected to a pixels are background foreground pixel erosion, In Effect of erosion on objects (a) on objects erosion of Effect

Image ProcessingImageAnalysisand with VisionSystems Dilation • Erosion •

l na i g i

e or th

f o t a th references. ’ in the nut is filled with foreground in the nut is filled with foreground rom f

t eren diff manufacturers

It is a variation Although of erosion. It is a variation ape h an object in which all thicknesses have have all thicknesses which an object in foreground (object). Information of other (object). Information foreground systems n a s

i

lt As a result As a result the of a fillhole operation, I]pixels and is thus eliminated. I]pixels vision

in

so resu l a ill found

be on w

t e l e may k

ng a s ti a been reduced t one pixel at any at location. been any reduced t one pixel dil ti k l t ill l ltoperations i may be found in vision systems manufacturers h diff t f th t f th i i l object, skeletons are useful in object recognition, since they are generally since they a are in object recognition, are generally object, useful skeletons of an object than other representations. representation better A skeleton is a stick representative is a of stick representative A skeleton in the the holes fills The fill operation

Image ProcessingImageAnalysisand with VisionSystems Skeletonization • Fill Operation •

, , mask

hborhood g g, the

3 neighborhood, 3 nei × × match

not ect.

j do

ixel in its 3 ixel p the object. the ob pixels

htest sk is applied to the image by moving image by moving applied the to sk is g the

dilates erodes

of y

values

lue of the darkest pixel in its 3 in its lue of the darkest pixel gray

OPERATIONS and effectively and effectively

and effectivel the value of the li the of value the the y

If . erator p laced b pixel p to max operator min o

pixel

ixel is re ixel MORPHOLOGY OPERATIONS

p ppy gp on i from

that they operate on a gray image. The ma a gray on that they operate it from pixel to pixel If the gray values of the pixels do not match the mask known as a they will be changed according to the selected operation, as described in the as described in the selected operation, to be changed according they will sections that follow. known as a Gray morphology operations are similar to binary morphology operations, except except binary morphology operations, similar to are morphology operations Gray is replaced Each by pixel the va Each ros

Image ProcessingImageAnalysisand with VisionSystems GRAY • Ei E • Dilation •

arts or p enclosed

different different y rectangle

a

area of

diameter = length

the be used to identif used be

. y to

Thinness ject, as well the number of holes it has ions and techniques that are ions and techniques that are used to width

features

levels ma levels y the

2 ra ) of g

ratio

area the

morphological is

(perimeter , = ratio

aspect e, maximum, minimum

histograms s aspect ratio is the ratio of the width to the length of a rectangle enclosed g ggyyyp

Thinness ’ ANALYSIS

level histograms morphological features - object

he avera Thinness The perimeter, area, and area, diameter of an ob The perimeter, T Moments about the object. about the objects in an image. objects in and other morphological characteristics; and An object extract information from images. Moment equations may be used for multiple images. be used for Moment equations may from information extract purposes. gray ) Image analysis is a collectionof operat include may which features, by their recognized be an image may Objects in a IMAGE • OBJECT RECOGNITION BY FEATURES • Object Identification Used for Basic Features ( () (c) (e) (d) Image ProcessingImageAnalysisand with VisionSystems (b) Module 4 Image Processing and Analysis with Vision Systems Moments • The object is represented by pixels that are turned on, and the background is represented by pixels that are turned off. This effect can be achieved either by backlighting or by rendering the image in binary form .

a b • General moment equation M a,b = ∑ x y x, y

y M y = ∑ = 0,1 area M 0,0 • The location of the center of x M x = ∑ = 1,0 the area relative to the each axis area M 0,0

Fig. 8.48 Calculation of the moment of an image. Module 4 Image Processing and Analysis with Vision Systems Moments • With the use of the moment equations, an object, its location, and its orientation can be identified.

M M − M 2 + M M − M 2 0,0 2,0 1,0 0,0 0,2 0,1 • Moment Invariant MI1 = 2 M 0,0

Small differences between objects or a small asymmetry in an object may be detected by means of higher order moments. Module 4 Image Processing and Analysis with Vision Systems DEPTH MEASUREMENT WITH VISION SYSTEMS • Depth information is extracted from a scene by means of two basic techniques, Range Finder and Stereo Vision system. • Stereo Image • The stereo image used for depth measurement is actually considered to be a 2.5- dimensional image. • A determination of the point pairs in the two images that correspond to the same point in the scene. This is called the correspondence or disparity of the point pair. • A determination of the depth or location of the point on the object or in the scene by triangulation or other techniques.

Correspondence problem in stereo .