400 likes | 866 Views
Image processing Fundamentals . Introduction. Modern digital technology has made it possible to manipulate multi-dimensional signals with systems that range from simple digital circuits to advanced parallel computers. An image defined in the "real world" is considered to be a function of two
E N D
1. Image processing and Texture analysisDr. S. SelingerDennis Gabor CollegeBudapest - Hungary
2. Image processing Fundamentals
3. Introduction Modern digital technology has made it possible to manipulate multi-dimensional signals with systems that range from simple digital circuits to advanced parallel computers.
An image defined in the "real world" is considered to be a function of two real variables, for example, a(x,y) with a as the amplitude (e.g. brightness) of the image at the real coordinate position (x,y).
An image may be considered to contain sub-images sometimes referred to as regions-of-interest, ROIs, or simply regions.
4. Introduction (2)
An image is digitized to convert it to a form which can be stored in a computer's memory or on some form of storage media such as a hard disk or CD-ROM.
This digitization procedure can be done by a scanner, or by a video camera connected to a frame grabber board in a computer.
Once the image has been digitized, it can be operated upon by various image processing operations.
5. Introduction (3)
We will restrict ourselves to two-dimensional (2D) image processing although most of the concepts and techniques that are to be described can be extended easily to three or more dimensions.
An image defined in the "real world" is considered to be a function of two real variables, for example, a(x,y) with a as the amplitude (e.g. brightness) of the image at the real coordinate position (x,y).
An image may be considered to contain sub-images sometimes referred to as regions-of-interest, ROI’s, or simply regions.
6. Introduction (4)
Image processing operations can be roughly divided into three major categories:
Image Compression,
Image Enhancement
Restoration and
Measurement Extraction.
7. Introduction (5)
Image Compression involves reducing the amount of memory needed to store a digital image.
Image defects which could be caused by the digitization process or by faults in the imaging set-up (for example, bad lighting) can be corrected using Image Enhancement techniques.
Once the image is in good condition, the Measurement Extraction operations can be used to obtain useful information from the image.
8.
Modern digital technology has made it possible to manipulate multi-dimensional signals with systems that range from simple digital circuits to advanced parallel computers.
The goal of this manipulation can be divided into three categories.
We will focus on the fundamental concepts of image processing. Time does not permit us to make more than a few introductory remarks about image analysis.
Image understanding requires an approach that differs fundamentally from the theme of this course. Modern digital technology has made it possible to manipulate multi-dimensional signals with systems that range from simple digital circuits to advanced parallel computers.
The goal of this manipulation can be divided into three categories.
We will focus on the fundamental concepts of image processing. Time does not permit us to make more than a few introductory remarks about image analysis.
Image understanding requires an approach that differs fundamentally from the theme of this course.
9. Digital Image Definitions A digital image a[m,n] described in a 2D discrete space is derived from an analog image a(x,y) in a 2D continuous space through a sampling process that is frequently referred to as digitization.
The 2D continuous image a(x,y) is divided into N rows and M columns.
The intersection of a row and a column is termed a pixel.
The value assigned to the integer coordinates [m,n] with {m = 0,1,2,...,M-1} and {n = 0,1,2,...,N-1} is a[m,n] .
10. Digital Image Definitions(Common Values) There are standard values for the various parameters encountered in digital image processing.
Parameter Symbol Typical values
Rows N 256,512,525,625,1024,1035
Columns M 256,512,768,1024,1320
Gray Levels L 2,64,256,1024,4096,16384
M = N = 2K where {K = 8,9,10}.
The number of distinct gray levels is usually a power of 2, that is, L = 2B where B is the number of bits in the binary representation of the brightness levels.
11. Digitization of a continuous image
The image has been divided into N = 16 rows and
M = 16 columns. The value assigned to every pixel is the average brightness in the pixel rounded to the nearest integer value.
The process of representing the amplitude of the 2D signal at a given coordinate as an integer value with L different gray levels is usually referred to as amplitude quantization or simply quantization.
12. Noise Real world signals usually contain departures from the ideal signal. Such departures are referred to as noise.
Noise arises as a result of unmodelled or unmodellable processes going on in the production and capture of the real signal.
Noise can generally be grouped into two classes:
- independent noise.
- noise which is dependent on the image data. One kind of noise which occurs in all recorded images to a certain extent is detector noise. This kind of noise is due to the discrete nature of radiation, i.e. the fact that each imaging system is recording an image by counting photons.
An common form of noise is data drop-out noise (commonly referred to as intensity spikes, speckle or salt and pepper noise). Here, the noise is caused by errors in the data transmission.
The corrupted pixels are either set to the maximum value (which looks like snow in the image) or have single bits flipped over. In some cases, single pixels are set alternatively to zero or to the maximum value, giving the image a `salt and pepper' like appearance.
The noise is usually quantified by the percentage of pixels which are corrupted.
One kind of noise which occurs in all recorded images to a certain extent is detector noise. This kind of noise is due to the discrete nature of radiation, i.e. the fact that each imaging system is recording an image by counting photons.
An common form of noise is data drop-out noise (commonly referred to as intensity spikes, speckle or salt and pepper noise). Here, the noise is caused by errors in the data transmission.
The corrupted pixels are either set to the maximum value (which looks like snow in the image) or have single bits flipped over. In some cases, single pixels are set alternatively to zero or to the maximum value, giving the image a `salt and pepper' like appearance.
The noise is usually quantified by the percentage of pixels which are corrupted.
13. Characteristics of Image Operations Types of operations
The types of operations to transform an input image a[m,n] into an output image b[m,n] can be classified into three categories:
point: the output value at a specific coordinate is dependent only on the input value at that same coordinate,
local: the output value is dependent on the input values in the neighborhood of that same coordinate,
global: the output value is dependent on all the values in the input image.
There is a variety of ways to classify and characterize image operations. The reason for doing so is to understand what type of results we might expect to achieve with a given type of operation or what might be the computational burden associated with a given operation. There is a variety of ways to classify and characterize image operations. The reason for doing so is to understand what type of results we might expect to achieve with a given type of operation or what might be the computational burden associated with a given operation.
14. Characteristics of Image Operations Types of neighborhoods
The images can be sampled to the various neighborhoods
Rectangular sampling: images are sampled by laying a rectangular grid over an image
Hexagonal sampling:
rectangular sampling
hexagonal sampling 4-connected 8-connected 6-connected Neighborhood operations play a key role in modern digital image processing. It is therefore important to understand how images can be sampled and how that relates to the various neighborhoods that can be used to process an image.
Local operations produce an output pixel value b[m=mo,n=no] based upon the pixel values in the neighborhood of a[m=mo ,n=no]. Some of the most common neighborhoods are the 4-connected neighborhood and the 8-connected neighborhood in the case of rectangular sampling and the 6-connected neighborhood in the case of hexagonal sampling illustrated in FigureNeighborhood operations play a key role in modern digital image processing. It is therefore important to understand how images can be sampled and how that relates to the various neighborhoods that can be used to process an image.
Local operations produce an output pixel value b[m=mo,n=no] based upon the pixel values in the neighborhood of a[m=mo ,n=no]. Some of the most common neighborhoods are the 4-connected neighborhood and the 8-connected neighborhood in the case of rectangular sampling and the 6-connected neighborhood in the case of hexagonal sampling illustrated in Figure
15. Algorithms Operations that are fundamental to digital image processing can be divided into four categories:
operations based on the image histogram,
on simple mathematics,
on convolution,
on mathematical morphology.
16. Tools Certain tools are central to the processing of digital images. These include mathematical tools such as:
convolution,
Fourier analysis,
statistical descriptions and
manipulative tools such as:
chain codes and run codes.
17. Histogram-based Operations The histogram of an image represents the relative frequency of occurrence of the various gray levels in the image.
A black and white image is represented by a two-dimensional array of numbers (or matrix), x(m,n), with values ranging from 0 to 255.
A black pixel assumes the value x(m,n)=0 while a white pixel assumes the value x(m,n)=255. All other levels in between are assigned linearly to contrasts between the black and white extremes.
The vertical lines in the histogram indicate how many pixels in an image assume a particular gray level. Histogram modeling techniques (e.g. histogram equalization) provide a sophisticated method for modifying the dynamic range and contrast of an image by altering that image such that its intensity histogram has a desired shape. Unlike contrast stretching, histogram modeling operators may employ non-linear and non-monotonic transfer functions to map between pixel intensity values in the input and output images. Histogram equalization employs a monotonic, non-linear mapping which re-assigns the intensity values of pixels in the input image such that the output image contains a uniform distribution of intensities (i.e. a flat histogram).
This technique is used in image comparison processes (because it is effective in detail enhancement) and in the correction of non-linear effects introduced by, say, a digitizer or display system. Histogram modeling techniques (e.g. histogram equalization) provide a sophisticated method for modifying the dynamic range and contrast of an image by altering that image such that its intensity histogram has a desired shape. Unlike contrast stretching, histogram modeling operators may employ non-linear and non-monotonic transfer functions to map between pixel intensity values in the input and output images. Histogram equalization employs a monotonic, non-linear mapping which re-assigns the intensity values of pixels in the input image such that the output image contains a uniform distribution of intensities (i.e. a flat histogram).
This technique is used in image comparison processes (because it is effective in detail enhancement) and in the correction of non-linear effects introduced by, say, a digitizer or display system.
18. Histogram-based Operations (2) In the histogram of the white and black image we see that its pixels assume gray levels that are concentrated in a interval
The histogram displays the overall range of the image, allowing you to determine the distribution of light and dark tones.
19. Histogram-based Operations (3) From left to right the histogram displays the darkest to lightest pixel values. The vertical lines each represent one of 256 possible tones. The higher the line, the more of that particular tone exists in the image.
Mean: the average brightness level for all image pixels.
Std Dev: (Short for Standard Deviation) this value represents the difference in brightness of the average pixel from the Mean.
Median: the value found in the exact center of the existing tonal range.
Pixels: the total number of image pixels.
Level: the brightness value of an individual point on the Histogram, position the cursor over it and click.
Percentile: the percentage of existing image pixels possessing a value darker than the selected value.
20. Convolution Convolution is a simple mathematical operation which is fundamental to many common image processing operators.
Convolution provides a way of `multiplying together' two arrays of numbers (generally of different sizes, but of the same dimensionality), to produce a third array of numbers of the same dimensionality.
This can be used in image processing to implement operators whose output pixel values are simple linear combinations of certain input pixel values.
21. Convolution (2) In an image processing context, one of the input arrays is normally just a gray level image. The second array is usually much smaller, and is also two dimensional (although it may be just a single pixel thick), and is known as the kernel.
The convolution is performed by sliding the kernel over the image, generally starting at the top left corner, so as to move the kernel through all the positions where the kernel fits entirely within the boundaries of the image.
22. Convolution (3) An example image and kernel that we will use to illustrate convolution:
the value of the bottom right pixel in the output image will be given by:
The convolution is performed by sliding the kernel over the image, generally starting at the top left corner, so as to move the kernel through all the positions where the kernel fits entirely within the boundaries of the image. (Note that implementations differ in what they do at the edges of images as explained below.) Each kernel position corresponds to a single output pixel, the value of which is calculated by multiplying together the kernel value and the underlying image pixel value for each of the cells in the kernel, and then adding all these numbers together. The convolution is performed by sliding the kernel over the image, generally starting at the top left corner, so as to move the kernel through all the positions where the kernel fits entirely within the boundaries of the image. (Note that implementations differ in what they do at the edges of images as explained below.) Each kernel position corresponds to a single output pixel, the value of which is calculated by multiplying together the kernel value and the underlying image pixel value for each of the cells in the kernel, and then adding all these numbers together.
23. Convolution (4) If the image has M rows and N columns, and the kernel has m rows and n columns, then the size of the output image will have M-m+1 rows, and N-n+1 columns.
Mathematically we can write the convolution as:
(where i runs from 1 to M-m+1 and j runs from 1 to N-n+1)
Note that many implementations of convolution produce a larger output image than this because they relax the constraint that the kernel can only be moved to positions where it fits entirely within the image. Instead, these implementations typically slide the kernel to all positions where just the top left corner of the kernel is within the image. Therefore the kernel `overlaps' the image on the bottom and right edges. One advantage of this approach is that the output image is the same size as the input image. Unfortunately, in order to calculate the output pixel values for the bottom and right edges of the image, it is necessary to invent input pixel values for places where the kernel extends off the end of the image. Typically pixel values of zero are chosen for regions outside the true image, but this can often distort the output image at these places. Therefore in general if you are using a convolution implementation that does this, it is better to clip the image to remove these spurious regions. Removing n-1 pixels from the right hand side and m-1 pixels from the bottom will fix things.
Note that many implementations of convolution produce a larger output image than this because they relax the constraint that the kernel can only be moved to positions where it fits entirely within the image. Instead, these implementations typically slide the kernel to all positions where just the top left corner of the kernel is within the image. Therefore the kernel `overlaps' the image on the bottom and right edges. One advantage of this approach is that the output image is the same size as the input image. Unfortunately, in order to calculate the output pixel values for the bottom and right edges of the image, it is necessary to invent input pixel values for places where the kernel extends off the end of the image. Typically pixel values of zero are chosen for regions outside the true image, but this can often distort the output image at these places. Therefore in general if you are using a convolution implementation that does this, it is better to clip the image to remove these spurious regions. Removing n-1 pixels from the right hand side and m-1 pixels from the bottom will fix things.
24. Fourier Transforms The Fourier Transform to decompose an image into its sine and cosine components.
The Fourier transform produces another representation of a signal, specifically a representation as a weighted sum of complex exponential.
Euler's formula:
The output of the transformation represents the image in the Fourier or frequency domain, while the input image is the spatial domain equivalent.
The Fourier Transform is used:
image analysis,
image filtering,
image reconstruction and
image compression.
The Fourier Transform is an important image processing tool which is used to decompose an image into its sine and cosine components. The output of the transformation represents the image in the Fourier or frequency domain, while the input image is the spatial domain equivalent. In the Fourier domain image, each point represents a particular frequency contained in the spatial domain image.
The image I being considered is formed by projection from scene S. The frequency domain is a space in which each image value at image position F represents the amount that the intensity values in image I vary over a specific distance related to F.
In the frequency domain, changes in image position correspond to changes in the spatial frequency, (or the rate at which image intensity values) are changing in the spatial domain image I. The spatial domain is the normal image space, in which a change in position in I directly projects to a change in position in S. Distances in I (in pixels) correspond to real distances (e.g. in meters) in S. The Fourier Transform is an important image processing tool which is used to decompose an image into its sine and cosine components. The output of the transformation represents the image in the Fourier or frequency domain, while the input image is the spatial domain equivalent. In the Fourier domain image, each point represents a particular frequency contained in the spatial domain image.
The image I being considered is formed by projection from scene S. The frequency domain is a space in which each image value at image position F represents the amount that the intensity values in image I vary over a specific distance related to F.
In the frequency domain, changes in image position correspond to changes in the spatial frequency, (or the rate at which image intensity values) are changing in the spatial domain image I. The spatial domain is the normal image space, in which a change in position in I directly projects to a change in position in S. Distances in I (in pixels) correspond to real distances (e.g. in meters) in S.
25. Fourier Transforms (2)
Given an image a and its Fourier transform A, then the forward transform goes from the spatial domain (either continuous or discrete) to the frequency domain which is always continuous.
Forward -
The inverse Fourier transform goes from the frequency domain back to the spatial domain.
Inverse -
26. Digital Filters In image processing filters are mainly used to suppress:
- high frequencies in the image
(i.e. smoothing the image)
- low frequencies
(i.e. enhancing or detecting edges in the image)
An image can be filtered either in the frequency or in the spatial domain. Low pass filtering, otherwise known as "smoothing", is employed to remove high spatial frequency noise from a digital image. Noise is often introduced during the analog-to-digital conversion process as a side-effect of the physical conversion of patterns of light energy into electrical patterns .
There are several common approaches to removing this noise:
If several copies of an image have been obtained from the source, some static image, then it may be possible to sum the values for each pixel from each image and compute an average. This is not possible, however, if the image is from a moving source or there are other time or size restrictions. If such averaging is not possible, or if it is insufficient, some form of low pass spatial filtering may be required.
There are two main types:
reconstruction filtering, where an image is restored based on some knowledge of the type of degradation it has undergone.
enhancement filtering, which attempts to improve the (subjectively measured) quality of an image for human or machine interpretability. Low pass filtering, otherwise known as "smoothing", is employed to remove high spatial frequency noise from a digital image. Noise is often introduced during the analog-to-digital conversion process as a side-effect of the physical conversion of patterns of light energy into electrical patterns .
There are several common approaches to removing this noise:
If several copies of an image have been obtained from the source, some static image, then it may be possible to sum the values for each pixel from each image and compute an average. This is not possible, however, if the image is from a moving source or there are other time or size restrictions. If such averaging is not possible, or if it is insufficient, some form of low pass spatial filtering may be required.
There are two main types:
reconstruction filtering, where an image is restored based on some knowledge of the type of degradation it has undergone.
enhancement filtering, which attempts to improve the (subjectively measured) quality of an image for human or machine interpretability.
27. Linear Filtering Low Pass Filters ("smoothing”):
- remove high spatial frequency noise from a digital image.
Reconstruction filtering
Enhancement filtering
Moving Window Operations
- affects one pixel of the image at a time, changing its value by some function of a "local" region of pixels ("covered" by the window).
Neighborhood-averaging filters
Median filters
Mode filters Low pass filtering, otherwise known as "smoothing", is employed to remove high spatial frequency noise from a digital image. Noise is often introduced during the analog-to-digital conversion process as a side-effect of the physical conversion of patterns of light energy into electrical patterns .
There are several common approaches to removing this noise:
If several copies of an image have been obtained from the source, some static image, then it may be possible to sum the values for each pixel from each image and compute an average. This is not possible, however, if the image is from a moving source or there are other time or size restrictions. If such averaging is not possible, or if it is insufficient, some form of low pass spatial filtering may be required.
There are two main types:
reconstruction filtering, where an image is restored based on some knowledge of the type of degradation it has undergone.
enhancement filtering, which attempts to improve the (subjectively measured) quality of an image for human or machine interpretability. Low pass filtering, otherwise known as "smoothing", is employed to remove high spatial frequency noise from a digital image. Noise is often introduced during the analog-to-digital conversion process as a side-effect of the physical conversion of patterns of light energy into electrical patterns .
There are several common approaches to removing this noise:
If several copies of an image have been obtained from the source, some static image, then it may be possible to sum the values for each pixel from each image and compute an average. This is not possible, however, if the image is from a moving source or there are other time or size restrictions. If such averaging is not possible, or if it is insufficient, some form of low pass spatial filtering may be required.
There are two main types:
reconstruction filtering, where an image is restored based on some knowledge of the type of degradation it has undergone.
enhancement filtering, which attempts to improve the (subjectively measured) quality of an image for human or machine interpretability.
28. Linear Filtering (2) Neighborhood-averaging filters :
- replace the value of each pixel, a[i,j] say, by a weighted-average of the pixels in some neighborhood around it.
(i.e.: a weighted sum of a[i+p,j+q], with p = -k to k, q = -k to k for some positive k; the weights are non-negative with the highest weight on the p = q = 0 term. If all the weights are equal then this is a mean filter is "linear”)
Median filters:
- replaces each pixel value by the median of its neighbors.
(i.e. the value such that 50% of the values in the neighborhood are above, and 50% are below. )
Mode filters:
- each pixel value is replaced by its most common neighbor. This is a particularly useful filter for classification procedures where each pixel corresponds to an object which must be placed into a class The above filters are all space invariant in that the same operation is applied to each pixel location. A non-space invariant filtering, using the above filters, can be obtained by changing the type of filter or the weightings used for the pixels for different parts of the image.
Non-linear filters also exist which are not space invariant; these attempt to locate edges in the noisy image before applying smoothing, a difficult task at best, in order to reduce the blurring of edges due to smoothing.
The median filter is a simple edge-preserving smoothing filter. It may be applied prior to segmentation in order to reduce the amount of noise in a stack of 2D images. The filter works by sorting pixels covered by a N x N mask according to their gray value. The center pixel is then replaced by the median of these pixels, i.e., the middle entry of the sorted list
The above filters are all space invariant in that the same operation is applied to each pixel location. A non-space invariant filtering, using the above filters, can be obtained by changing the type of filter or the weightings used for the pixels for different parts of the image.
Non-linear filters also exist which are not space invariant; these attempt to locate edges in the noisy image before applying smoothing, a difficult task at best, in order to reduce the blurring of edges due to smoothing.
The median filter is a simple edge-preserving smoothing filter. It may be applied prior to segmentation in order to reduce the amount of noise in a stack of 2D images. The filter works by sorting pixels covered by a N x N mask according to their gray value. The center pixel is then replaced by the median of these pixels, i.e., the middle entry of the sorted list
29. Smoothing Operations Linear Filters:
- Uniform filter
- Triangular filter
- Gaussian filter
Non-Linear Filters:
- Median filter
- Kuwahara filter These algorithms are applied in order to reduce noise and/or to prepare images for further processing such as segmentation.
We distinguish between linear and non- linear algorithms.
Uniform filter - The output image is based on a local averaging of the input filter where all of the values within the filter support have the same weight.
Triangular filter - The output image is based on a local averaging of the input filter where the values within the filter support have differing weights. In general, the filter can be seen as the convolution of two (identical) uniform filters either rectangular or circular and this has direct consequences for the computational complexity.
Gaussian filter - smoothes or blurs an image by performing a convolution operation with a Gaussian filter kernel. The text fields labeled kernel size allow you to change the size of the convolution kernel in each dimension. A value of 3 denotes a 3x3 kernel. Odd values are required. These algorithms are applied in order to reduce noise and/or to prepare images for further processing such as segmentation.
We distinguish between linear and non- linear algorithms.
Uniform filter - The output image is based on a local averaging of the input filter where all of the values within the filter support have the same weight.
Triangular filter - The output image is based on a local averaging of the input filter where the values within the filter support have differing weights. In general, the filter can be seen as the convolution of two (identical) uniform filters either rectangular or circular and this has direct consequences for the computational complexity.
Gaussian filter - smoothes or blurs an image by performing a convolution operation with a Gaussian filter kernel. The text fields labeled kernel size allow you to change the size of the convolution kernel in each dimension. A value of 3 denotes a 3x3 kernel. Odd values are required.
30. Thresholding In many vision applications, it is useful to be able to separate out the regions of the image corresponding to objects in which we are interested (ROI), from the regions of the image that correspond to background.
Thresholding often provides an easy and convenient way to perform this segmentation on the basis of the different intensities or colors in the foreground and background regions of an image.
In many vision applications, it is useful to be able to separate out the regions of the image corresponding to objects in which we are interested, from the regions of the image that correspond to background.
Thresholding often provides an easy and convenient way to perform this segmentation on the basis of the different intensities or colors in the foreground and background regions of an image. In addition, it is often useful to be able to see what areas of an image consist of pixels whose values lie within a specified range, or band of intensities (or colors).
The input to a thresholding operation is typically a grayscale or color image. In the simplest implementation, the output is a binary image representing the segmentation. Black pixels correspond to background and white pixels correspond to foreground (or vice versa). In simple implementations, the segmentation is determined by a single parameter known as the intensity threshold. In a single pass, each pixel in the image is compared with this threshold. If the pixel's intensity is higher than the threshold, the pixel is set to, say, white in the output. If it is less than the threshold, it is set to black. In many vision applications, it is useful to be able to separate out the regions of the image corresponding to objects in which we are interested, from the regions of the image that correspond to background.
Thresholding often provides an easy and convenient way to perform this segmentation on the basis of the different intensities or colors in the foreground and background regions of an image. In addition, it is often useful to be able to see what areas of an image consist of pixels whose values lie within a specified range, or band of intensities (or colors).
The input to a thresholding operation is typically a grayscale or color image. In the simplest implementation, the output is a binary image representing the segmentation. Black pixels correspond to background and white pixels correspond to foreground (or vice versa). In simple implementations, the segmentation is determined by a single parameter known as the intensity threshold. In a single pass, each pixel in the image is compared with this threshold. If the pixel's intensity is higher than the threshold, the pixel is set to, say, white in the output. If it is less than the threshold, it is set to black.
31. Thresholding (2)
The segmentation is determined by a single parameter known as the intensity threshold.
In a single pass, each pixel in the image is compared with this threshold. If the pixel's intensity is higher than the threshold, the pixel is set to, say, white, in the output. If it is less than the threshold, it is set to black. Thresholding produces a segmentation that yields all the pixels that, in principle, belong to the object or objects of interest in an image. An alternative to this is to find those pixels that belong to the borders of the objects. Techniques that are directed to this goal are termed edge finding techniques.Thresholding produces a segmentation that yields all the pixels that, in principle, belong to the object or objects of interest in an image. An alternative to this is to find those pixels that belong to the borders of the objects. Techniques that are directed to this goal are termed edge finding techniques.
32. Edge Detectors Edges are places in the image with strong intensity contrast.
Edges often occur at image locations representing object boundaries.
Edge detection is extensively used in image segmentation when we want to divide the image into areas corresponding to different objects.
Edges consist of mainly high frequencies.
For the edge detection we can applying a highpass frequency filter in the Fourier domain or convoluting the image with an appropriate kernel in the spatial domain. Representing an image by its edges has the further advantage that the amount of data is reduced significantly while retaining most of the image information.
In practice, edge detection is performed in the spatial domain, because it is computationally less expensive and often yields better results.
Since edges correspond to strong illumination gradients, we can highlight them by calculating the derivatives of the image.
Representing an image by its edges has the further advantage that the amount of data is reduced significantly while retaining most of the image information.
In practice, edge detection is performed in the spatial domain, because it is computationally less expensive and often yields better results.
Since edges correspond to strong illumination gradients, we can highlight them by calculating the derivatives of the image.
33. Laplacian Edge Detection Build of morphing algorithm which operates on features automatically extracted from target images:
View the following signal, with an edge as highlighted below :
the gradient of this signal :
The gradient has a large peak centered around the edge, the edge has become "thick" due to the thresholding.
The edge occurs at the peak, we can localize it by computing the laplacian (in one dimension, the second derivative with respect to t) and finding the zero crossings.
The gradient has a large peak centered around the edge, the edge has become "thick" due to the thresholding.
The edge occurs at the peak, we can localize it by computing the laplacian (in one dimension, the second derivative with respect to t) and finding the zero crossings.
34. Tutorial Images This is a demo showing different image processing techniques
ORIGINAL image
(photo "Robin Jeffers at Ton House" (1927) by Edward Weston)
35. Tutorial Images SAMPLING RATE
Here is the image with every 3rd pixel sampled, and the intermediate pixels filled in with the sampled values. Note the blocky appearance of the new image.
36. Tutorial Images QUANTIZATION
Here is the image with only 5 grayscale shades; the original has 184 shades.
Note how much detail is retained with only 5 shades!
37. Tutorial Images LOW PASS FILTERING
Here is the image filtered with the following kernel:
1/9 1/9 1/9
1/9 1/9 1/9
1/9 1/9 1/9
this filter is a 3-by-3 mean filter
(notice how it smooths the texture
of the image while blurring out the edges)
38. Tutorial Images LOW PASS FILTERING II
Here is the image filtered with the following 5-by-5 mean kernel:
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
Notice:
the difference between the images
from the two filters
39. Tutorial Images EDGE DETECTION
Here is the image filtered with the following kernel:
0 -1 0
-1 4 -1
0 -1 0
This filter is a 2-dimensional Laplacian
(actually the negative of the Laplacian)
Notice:
how it brings out the edges in the image.
40. Tutorial Images EDGE DETECTION II
Top right:
Here is the image filtered with the following kernel:
0 -1 0 0 0 0 0 -1 0
-1 4 -1 + 0 1 0 = -1 5 -1
0 -1 0 0 0 0 0 -1 0
This is the Laplacian filter
with the original image added back in
Notice:
how it brings out the edges in the image
while maintaining the underlying grayscale
information.