Vous êtes sur la page 1sur 12

Machine Visi n

Lecture # 10: Fundamentals of DIP

Muhammad Rzi Abbas Department of Mechatronics and Control Engineering


muhammadrziabbas@uet.edu.pk
Lecturer, Mechatronics Dept.
University of Engineering and Technology, Lahore
Point Operations
• Contrast Stretching
Point Operations
• Contrast Stretching
Point Operations
• Contrast Stretching
• Other approaches like Histogram Equalization may be used for
contrast enhancement
Point Operations
• Thresholding
• Some scenes, e.g. those of bare PCBs, can be very simple, from a
visual point of view, in that they comprise of just one or two types
of objects
• In this case the solder tracks and the circuit board
• Using extremely high contrast we can easily distinguish solder
tracks from the circuit board
• If we allow only two gray levels, black and white, to be used then
the said contrast may be achieved
Point Operations
• Thresholding
• Consider the following histogram
Point Operations
• Thresholding
• Gray levels from 0-160 may correspond to circuit board while from
160-255 to solder tracks
• If we assign all gray levels from 0-160 gray level 0, while gray level
255 is assigned to range of 160-255, then we’ll have only two gray
levels in our image
• In addition we also have labelled our image in a sense that all black
pixels are representing circuit board while white pixels belong to
solder tracks
Point Operations
• Thresholding
• We just did Thresholding using a Thresholding value of 160.
Point Operations
• Thresholding
Point Operations
• Image Negative
• Taking inverse of an image is to simply swap the higher gray level
value with the corresponding lower values
• s = (L-1)-r
Point Operations
References
• Machine Vision by David Vernon, Published in 1991
• Chapter 4 (Sections up to 4.1)
• Digital Image Processing by Rafael C. Gonzalez and Richard E. Woods,
3rd Edition.
• Chapter 3 (Section 3.2.3 and 3.2.4)
• Image Processing, Analysis and Machine Vision by Milan Sonka,
Vaclav Hlavac and Roger Boyle, 3rd Edition, 2008.
• Chapter 5 (Section 5.1)