1. Trang chủ
  2. » Giáo án - Bài giảng

Tài liệu Xử lý ảnh Đại học bách khoa HN

96 10 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 96
Dung lượng 9,51 MB

Nội dung

TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI XỬ LÝ ẢNH TRONG CƠ ĐIỆN TỬ Machine Vision Giảng viên: TS Mạc Thị Thoa Đơn vị: Bộ môn Cơ điện tử, Viện Cơ khí Hà Nội, 2020 Chapter Intensity Transformations and Spatial Filtering ❖Two principal categories of spatial processing are intensity transformations and spatial filtering ➢ Intensity transformations operate on single pixels of an image for tasks such as contrast manipulation and image thresholding ➢ Spatial filtering performs operations on the neighborhood of every pixel in an image ➢ Examples of spatial filtering include image smoothing and sharpening Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Chapter Intensity Transformations and Spatial Filtering Background Some Basic Intensity Transformation Functions Histogram Processing (xử lý Histogram-biểu đồ tần suất) Fundamentals of Spatial Filtering (Nguyên lý lọc miền không gian) Smoothing (Lowpass) Spatial Filters (Lọc thông thấp miền không gian) Sharpening (Highpass) Spatial Filters (Lọc thông cao miền không gian) Highpass, Bandreject, and Bandpass Filters from Lowpass Filters Combining Spatial Enhancement Methods (Các phương pháp cải thiện chất lượng ảnh) Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Background ❖The Basics of Intensity Transformations and Spatial Filtering • The term spatial domain refers to the image plane itself, and image processing methods in this category are based on direct manipulation of pixels in an image • Understand the meaning of spatial domain processing, and how it differs from transform domain processing • Be familiar with the principal techniques used for intensity transformations • Understand the physical meaning of image histograms and how they can be manipulated for image enhancement • Understand the mechanics of spatial filtering, and how spatial filters are formed • Understand the principles of spatial convolution (tích chập) and correlation (Tương quan) • Be familiar with the principal types of spatial filters, and how they are applied • Be aware of the relationships between spatial filters, and the fundamental role of lowpass filters Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Background ❖The Basics of Intensity Transformations and Spatial Filtering ➢ The spatial domain processes are based on the expression where f(x, y) is an input image, g(x, y) is the output image, and T is an operator on f defined over a neighborhood of point (x, y) Phép tốn thực điểm ảnh ảnh đơn điểm ảnh ảnh Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) A 3x3 neighborhood about a point (x0, y0) in an image The neighborhood is moved from pixel to pixel in the image to generate an output image Background ❖The Basics of Intensity Transformations and Spatial Filtering ➢ intensity (also called a gray-level, or mapping) transformation function, s and r to denote, respectively, the intensity of g and f at any point (x, y) The result of applying the transformation to every pixel in f to generate the corresponding pixels in g would be to produce an image of higher contrast than the original, by darkening the intensity levels below k and brightening the levels above k In this technique, sometimes called contrast stretching Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Background ❖The Basics of Intensity Transformations and Spatial Filtering ➢ intensity (also called a gray-level, or mapping) transformation function T(r) produces a two-level (binary) image A mapping of this form is called a thresholding function Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Some Basic Intensity Transformation Functions ❖Intensity transformations are among the simplest of all image processing techniques ❖ The values of pixels, before and after processing, by r and s ❖ With digital quantities, values of an intensity transformation function typically are stored in a table, and the mappings from r to s are implemented via table lookups For an 8-bit image, a lookup table containing the values of T will have 256 entries ❖ Three basic types of functions used frequently in image processing: linear (negative and identity transformations), logarithmic (log and inverse-log transformations), and powerlaw (nth power and nth root transformations) ❖ The identity function is the trivial case in which the input and output intensities are identical Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Image Negatives The negative of an image with intensity levels in the range [0, L-1] is obtained by using the negative transformation function Some basic intensity transformation functions Each curve was scaled independently so that all curves would fit in the same graph Our interest here is on the shapes of the curves, not on their relative values Some Basic Intensity Transformation Functions ❖Image Negatives The negative of an image with intensity levels in the range is obtained by using the negative transformation function (a) A digital mammogram (b) Negative image obtained using Eq (3-3) (Image (a) Courtesy of General Electric Medical Systems.) Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 10 Sharpening (Highpass) Spatial Filters ❖Unsharp Masking and Highboost Filtering ➢ Unsharp masking ▪ Blur the original image ▪ Subtract the blurred image from the original (the resulting difference is called the mask) ▪ Add the mask to the original ▪ When k = → unsharp masking ▪ When k > → highboost filtering blurred image ▪ When  k < → reduces the contribution of the unsharp mask Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 82 Sharpening (Highpass) Spatial Filters ❖Unsharp Masking and Highboost Filtering 1-D illustration of the mechanics of unsharp masking (a) Original signal (b) Blurred signal with original shown dashed for reference (c) Unsharp mask (d) Sharpened signal, obtained by adding (c) to (a) Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 83 Sharpening (Highpass) Spatial Filters ❖Unsharp Masking and Highboost Filtering (a) Unretouched “soft-tone” digital image of size 469x600 pixels (b) Image blurred using a 31x31 Gaussian lowpass filter with  = (c) Mask (d) Result of unsharp masking using Eq (3-65) with k = (e) and (f) Results of highboost filtering with k = and k = respectively Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 84 Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Gradient ➢ The gradient of an image f at coordinates (x, y) ➢ The magnitude (length) of vector f Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 85 Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Gradient ➢ Roberts cross-gradient operators Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 86 Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Gradient ➢ Sobel operators Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 87 Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Gradient ➢ Filter masks (a) A 3x3 region of an image, where the zs are intensity values (b)–(c) Roberts cross-gradient operators (d)–(e) Sobel operators All the kernel coefficients sum to zero, as expected of a derivative operator Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 88 Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Gradient ➢ Example: Using the gradient for edge enhancement (a) Image of a contact lens (note defects on the boundary at and o’clock) (b) Sobel gradient (Original image courtesy of Perceptics Corporation.) Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 89 Highpass, Bandreject, and Bandpass Filters from Lowpass Filters ❖Transfer functions of ideal 1-D filters Transfer functions of ideal 1-D filters in the frequency domain (u denotes frequency) (a) Lowpass filter (b) Highpass filter (c) Bandreject filter (d) Bandpass filter (As before, we show only positive frequencies for simplicity.) Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 90 Highpass, Bandreject, and Bandpass Filters from Lowpass Filters ❖Transfer functions of ideal 1-D filters Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 91 Highpass, Bandreject, and Bandpass Filters from Lowpass Filters ❖Transfer functions of ideal 1-D filters (a) A 1-D spatial lowpass filter function (b) 2-D kernel obtained by rotating the 1-D profile about its center A zone plate image of size 597x597 pixels Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 92 Highpass, Bandreject, and Bandpass Filters from Lowpass Filters ❖Transfer functions of ideal 1-D filters (a) Zone plate image filtered with a separable lowpass kernel (b) Image filtered with the isotropic lowpass kernel in Fig 3.60(b) Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 93 Highpass, Bandreject, and Bandpass Filters from Lowpass Filters ❖Transfer functions of ideal 1-D filters Spatial filtering of the zone plate image (a) Lowpass result; this is the same as Fig 3.61(b) (b) Highpass result (c) Image (b) with intensities scaled (d) Bandreject result (e) Bandpass result (f) Image (e) with intensities scaled Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 94 Combining Spatial Enhancement Methods ➢ Laplacian is superior for enhancing fine detail ➢ The gradient has a stronger response in areas of significant intensity transitions (ramps and steps) (a) Image of whole body bone scan (b) Laplacian of (a) (c) Sharpened image obtained by adding (a) and (b) (d) Sobel gradient of image (a) (Original image courtesy of G.E Medical Systems.) Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 95 Combining Spatial Enhancement Methods (e) Sobel image smoothed with a 3x3 box filter (f) Mask image formed by the product of (b) and (e) (g) Sharpened image obtained by the adding images (a) and (f) (h) Final result obtained by applying a power-law transformation to (g) Compare images (g) and (h) with (a) (Original image courtesy of G.E Medical Systems.) Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 96 .. .Chapter Intensity Transformations and Spatial Filtering ❖Two principal categories of spatial processing are intensity transformations and spatial filtering ➢ Intensity transformations. .. Basics of Intensity Transformations and Spatial Filtering ➢ intensity (also called a gray-level, or mapping) transformation function, s and r to denote, respectively, the intensity of g and f at... histograms and how they can be manipulated for image enhancement • Understand the mechanics of spatial filtering, and how spatial filters are formed • Understand the principles of spatial convolution

Ngày đăng: 14/12/2021, 00:04

w