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

Xử lý ảnh trong cơ điện tử machine vision chapter 3 intensity transformations and spatial filtering

70 6 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

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 Nguyễn Thành Hùng Đơn vị: Bộ môn Cơ điện tử, Viện Cơ khí Hà Nội, 2021 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 Fundamentals of Spatial Filtering Smoothing (Lowpass) Spatial Filters Sharpening (Highpass) Spatial Filters Highpass, Bandreject, and Bandpass Filters from Lowpass Filters Combining Spatial Enhancement Methods 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) 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 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 Intensity transformation functions (a) Contrast stretching function (b) Thresholding function 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 Fundamentals of Spatial Filtering Smoothing (Lowpass) Spatial Filters Sharpening (Highpass) Spatial Filters Highpass, Bandreject, and Bandpass Filters from Lowpass Filters Combining Spatial Enhancement Methods Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Some Basic Intensity Transformation Functions ❖Three basic types of functions ➢ linear (negative and identity transformations) ➢ logarithmic (log and inverse-log transformations) ➢ power-law (nth power and nth root transformations) Some basic intensity transformation functions Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Some Basic Intensity Transformation Functions ❖Image Negatives (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) Some Basic Intensity Transformation Functions ❖Log Transformations where c is a constant and it is assumed that r  (a) Fourier spectrum displayed as a grayscale image (b) Result of applying the log transformation in Eq (3-4) with c = Both images are scaled to the range [0, 255] Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Some Basic Intensity Transformation Functions ❖Power-Law (Gamma) Transformations where c and are positive constants Plots of the gamma equation s = cr for various values of  (c = in all cases) Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 10 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) 65 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) 66 Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Gradient ➢ Roberts cross-gradient operators Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 67 Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Gradient ➢ Sobel operators Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 68 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) 69 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) 70 Chapter Intensity Transformations and Spatial Filtering Background Some Basic Intensity Transformation Functions Histogram Processing Fundamentals of Spatial Filtering Smoothing (Lowpass) Spatial Filters Sharpening (Highpass) Spatial Filters Highpass, Bandreject, and Bandpass Filters from Lowpass Filters Combining Spatial Enhancement Methods Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 71 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) 72 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) 73 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) 74 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) 75 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) 76 Chapter Intensity Transformations and Spatial Filtering Background Some Basic Intensity Transformation Functions Histogram Processing Fundamentals of Spatial Filtering Smoothing (Lowpass) Spatial Filters Sharpening (Highpass) Spatial Filters Highpass, Bandreject, and Bandpass Filters from Lowpass Filters Combining Spatial Enhancement Methods Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 77 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) 78 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) 79 .. .Chapter Intensity Transformations and Spatial Filtering ❖Two principal categories of spatial processing are intensity transformations and spatial filtering ➢ Intensity transformations. .. (2018) Chapter Intensity Transformations and Spatial Filtering Background Some Basic Intensity Transformation Functions Histogram Processing Fundamentals of Spatial Filtering Smoothing (Lowpass) Spatial. .. (2018) Chapter Intensity Transformations and Spatial Filtering Background Some Basic Intensity Transformation Functions Histogram Processing Fundamentals of Spatial Filtering Smoothing (Lowpass) Spatial

Ngày đăng: 15/02/2022, 19:03

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w