1. Trang chủ
  2. » Luận Văn - Báo Cáo

Xử lý ảnh trong cơ điện tử: Machine Vision. Chapter 3. Intensity Transformations and Spatial Filtering91

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

Tiêu đề Intensity Transformations and Spatial Filtering
Tác giả Rafael C. Gonzalez, Richard E. Woods
Người hướng dẫn TS. Nguyễn Thành Hùn
Trường học Trường Đại Học Bách Khoa
Chuyên ngành Cơ Điện Tử
Thể loại thesis
Năm xuất bản 2021
Thành phố Hà Nội
Định dạng
Số trang 70
Dung lượng 23,94 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Some Basic Intensity Transformatio❖ Power-Law Gamma Transformations ➢ Contrast enhancement using power-law intensity transform a Magnetic resonance image MRI of a fractured human spine t

Trang 1

XỬ LÝ ẢNH TRONG CƠ ĐIỆN

Machine Vision

TRƯỜNG ĐẠI HỌC BÁCH KHOA

Giảng viên: TS Nguyễn Thành Hùn

Đơn vị : Bộ môn Cơ điện tử , Viện Cơ

Trang 2

Chapter 3 Intensity Transformations and

❖ Two principal categories of spatial processing are intens spatial filtering.

Intensity transformations operate on single pixels of an

as contrast manipulation and image thresholding.

Spatial filtering performs operations on the neighborhoo

image.

Examples of spatial filtering include image smoothing an

Trang 3

Chapter 3 Intensity Transformations and

1 Background

2 Some Basic Intensity Transformation Functions

3 Histogram Processing

4 Fundamentals of Spatial Filtering

5 Smoothing (Lowpass) Spatial Filters

6 Sharpening (Highpass) Spatial Filters

7 Highpass, Bandreject, and Bandpass Filters from

8 Combining Spatial Enhancement Methods

Trang 4

1 Background

The Basics of Intensity Transformations and Spatial F

➢ The spatial domain processes are based on the expressio

where ( f x , y ) is an input image, ( g x , y ) is th e

output image, and is an operator on de T f fined

over a neighborhood of point (x, y).

A 3x3 neighborhood about a poin

is moved from pixel to pixel in the

Trang 5

1 Background

The Basics of Intensity Transformations and Spatial F

➢ intensity (also called a gray-level , or mapping ) transformatio

Inte (a) (b)

Trang 6

Chapter 3 Intensity Transformations and

1 Background

2 Some Basic Intensity Transformation Functions

3 Histogram Processing

4 Fundamentals of Spatial Filtering

5 Smoothing (Lowpass) Spatial Filters

6 Sharpening (Highpass) Spatial Filters

7 Highpass, Bandreject, and Bandpass Filters from

8 Combining Spatial Enhancement Methods

Trang 7

❖ Three basic types of functions

➢ linear (negative and identity transformations)

➢ logarithmic (log and inverse-log transformations)

➢ power-law ( th power and nth root n

transformations)

2 Some Basic Intensity Transformatio

Trang 8

Image Negatives

(a) A digital mammogram (b) Negative image obtained using (Image (a) Courtesy of General Electric Medical Systems.)

Trang 9

2 Some Basic Intensity Transformatio

Log Transformations

where is a co c

Trang 10

2 Some Basic Intensity Transformatio

Power-Law (Gamma) Transformations

w

Plots of the gamma e

of ( = 1 in all case c

Trang 11

2 Some Basic Intensity Transformatio

Power-Law (Gamma) Transformations

(a) Image

as it appe setting of Gammac image, a (compare (a) courte NIH)

Trang 12

2 Some Basic Intensity Transformatio

Power-Law (Gamma) Transformations

➢ Contrast enhancement using power-law intensity transform

a) Magnetic resonance image (MRI) of a fractured human spine (the region of the fracture is e Results of applying the transformation in Eq (3-5) with and and 0.3, respectively (Original ima Department of Radiology and Radiological Sciences, Vanderbilt University Medical Center.)

Trang 13

2 Some Basic Intensity Transformatio

Power-Law (Gamma) Transformations

➢ Another illustration of power-law transformations.

Trang 14

2 Some Basic Intensity Transformatio

Piecewise Linear Transformation Functions

➢ Contrast Stretching

where rmin and rmax denote

the minimum and maximum

intensity levels in the input

image, respectively

Trang 15

2 Some Basic Intensity Transformatio

Piecewise Linear Transformation Functions

➢ Intensity-Level Slicing

Figure 2: (a) Aortic angiogram

Trang 16

2 Some Basic Intensity Transformatio

Piecewise Linear Transformation Functions

➢ Bit-Plane Slicing

Bit-planes of an 8-bit image.

Trang 17

2 Some Basic Intensity Transformatio

Piecewise Linear Transformation Functions

➢ Bit-Plane Slicing

Trang 18

2 Some Basic Intensity Transformatio

Piecewise Linear Transformation Functions

➢ Bit-Plane Slicing

Image reconstructed from bit planes: (a) 8 and 7; (b) 8, 7, and 6; (

Trang 19

Chapter 3 Intensity Transformations and

1 Background

2 Some Basic Intensity Transformation Functions

3 Histogram Processing

4 Fundamentals of Spatial Filtering

5 Smoothing (Lowpass) Spatial Filters

6 Sharpening (Highpass) Spatial Filters

7 Highpass, Bandreject, and Bandpass Filters from

8 Combining Spatial Enhancement Methods

Trang 20

3 Histogram Processing

Histogram

➢ The unnormalized histogram:

where rk is the - intensity level of an -level k th L

digital image ( f x , y n ); k is the number of pixels

in with intensity f rk and the subdivisions of the

intensity scale are called histogram bins.

Trang 21

3 Histogram Processing

Histogram

➢ The normalized histogram:

where M and N are the number of image rows and columns, respectively.

Trang 22

3 Histogram Processing

Histogram

Four image types and their corresponding histograms (a) dark; (b) light; The horizontal axis of the histograms are values of rk and the vertical ax

Trang 24

3 Histogram Processing

Histogram Equalization

➢ Example: Illustration of the mechanics of histogram equali

in Table

Trang 25

3 Histogram Processing

Histogram Equalization

➢ Example: Illustration of the mechanics of histogram equali

We round them to their nearest integer values in the range

Trang 26

3 Histogram Processing

Histogram Equalization

➢ Example: Illustration of the mechanics of histogram equali

Histogram equalization (a) Original histogram (b) Transformation function

Trang 27

3 Histogram Processing

Histogram Equalization

➢ Algorithm for Histogram Equalization

Trang 28

3 Histogram Processing

Histogram Equalization

equalized images

eq Source images

Trang 29

3 Histogram Processing

Histogram Equalization

(a) Image fro histogram eq (a) (d) Histog courtesy of N

Trang 30

Chapter 3 Intensity Transformations and

1 Background

2 Some Basic Intensity Transformation Functions

3 Histogram Processing

4 Fundamentals of Spatial Filtering

5 Smoothing (Lowpass) Spatial Filters

6 Sharpening (Highpass) Spatial Filters

7 Highpass, Bandreject, and Bandpass Filters from

8 Combining Spatial Enhancement Methods

Trang 31

4 Fundamentals of Spatial Filt

The Mechanics of Linear Spatial Filtering

➢ Spatial filter kernel: filter kernel, kernel, mask,

template , and window

➢ Linear spatial filtering

Trang 32

4 Fundamentals of Spatial Filt

Spatial Correlation

and Convolution

➢ 1-D illustration

Trang 33

4 Fundamentals of Spatial Filt

Spatial Correlation and Convolution

➢ 2-D illustration

➢ Correlation

➢ Convolution

Trang 34

4 Fundamentals of Spatial Filt

Spatial Correlation and Convolution

Trang 35

Chapter 3 Intensity Transformations and

1 Background

2 Some Basic Intensity Transformation Functions

3 Histogram Processing

4 Fundamentals of Spatial Filtering

5 Smoothing (Lowpass) Spatial Filters

6 Sharpening (Highpass) Spatial Filters

7 Highpass, Bandreject, and Bandpass Filters from

8 Combining Spatial Enhancement Methods

Trang 36

5 Smoothing (Lowpass) Spatial

➢ Smoothing (also called averaging ) spatial filters are used to transitions in intensity.

➢ Application: noise reduction, reduce aliasing, reduce irrele smoothing the false contours, …

➢ Linear spatial filtering

➢ Nonlinear smoothing filters

Trang 37

5 Smoothing (Lowpass) Spatial

Box Filter Kernels

Trang 38

5 Smoothing (Lowpass) Spatial

Box Filter Kernels

➢ Example: Lowpass filtering with a box

kernel

(a) Test pattern of size 1024x1024 pixels (b)-(d)

Results of lowpass filtering with box kernels of

sizes 3x3, 11x11, and 21x21 respectively.

Trang 39

5 Smoothing (Lowpass) Spatial

Lowpass Gaussian Filter Kernels

➢ Gaussian kernels of the form

Trang 40

5 Smoothing (Lowpass) Spatial

Lowpass Gaussian Filter Kernels

(a) Sampling a Gaussian function to obtain a discrete Gauss The values shown are for = 1 and = 1 (b) Resulting ker K

Trang 41

5 Smoothing (Lowpass) Spatial

Lowpass Gaussian Filter Kernels

➢ Example: Lowpass filtering with a Gaussian kernel

Trang 42

5 Smoothing (Lowpass) Spatial

Lowpass Gaussian Filter Kernels

➢ Example: Lowpass filtering with a Gaussian kernel

(a) Result of filtering using a Gaussian kernels of size43x43, with = 7.

a kernel of 85x85, with the same value of (c) Difference image

Trang 43

5 Smoothing (Lowpass) Spatial

➢ Example: Comparison of Gaussian and box filter smoothi

Trang 44

5 Smoothing (Lowpass) Spatial

➢ Example: Using lowpass filtering and thresholding for reg

Trang 45

5 Smoothing (Lowpass) Spatial

Order-Statistic (Nonlinear) Filters

➢ Median filter : replaces the value of the center pixel by the values in the neighborhood of that pixel

→ Effective in the presence of impulse noise salt- - ( and pepper n

→ The 50th percentile of a ranked set of numbers

➢ Max filter :

→ Finding the brightest points in an image or for eroding dar regions

Trang 46

5 Smoothing (Lowpass) Spatial

Order-Statistic (Nonlinear) Filters

➢ Min filter:

→ used for the opposite purpose

→ The 0th percentile filter

Trang 47

5 Smoothing (Lowpass) Spatial

Order-Statistic (Nonlinear) Filters

➢ Example: Median filtering

Trang 48

Chapter 3 Intensity Transformations and

1 Background

2 Some Basic Intensity Transformation Functions

3 Histogram Processing

4 Fundamentals of Spatial Filtering

5 Smoothing (Lowpass) Spatial Filters

6 Sharpening (Highpass) Spatial Filters

7 Highpass, Bandreject, and Bandpass Filters from

8 Combining Spatial Enhancement Methods

Trang 49

6 Sharpening (Highpass) Spatia

Foundation

➢ First-order derivative

➢ Second-order derivative

Trang 50

6 Sharpening (Highpass) Spatia

Image Sharpening the Laplacian

➢ Laplacian

Trang 51

6 Sharpening (Highpass) Spatia

Image Sharpening the Laplacian

➢ Laplacian kernel

Trang 52

6 Sharpening (Highpass) Spatia

Image Sharpening the Laplacian

➢ The basic way in which the Laplacian is used for image sh

▪ c = 1 if the center element of the Laplacian kernel is posit

▪ c = -1 if the center element of the Laplacian kernel is nega

Trang 53

6 Sharpening (Highpass) Spatia

Image Sharpening the Laplacian

➢ Example: Image sharpening using the Laplacian

Trang 54

6 Sharpening (Highpass) Spatia

Unsharp Masking and Highboost Filtering

➢ Unsharp masking

Trang 55

6 Sharpening (Highpass) Spatia

Unsharp Masking and Highboost Filtering

Trang 56

6 Sharpening (Highpass) Spatia

Unsharp Masking and Highboost Filtering

(a) Unretouched “soft tone” digital image of size 469x600 pixels (b) Image blurred using a 3 filter with = 5 (c) Mask (d) Result of unsharp masking using Eq (3-65) with k = 1 filtering with k = 2 and k = 3 respectively.

Trang 57

-6 Sharpening (Highpass) Spatia

Image Sharpening the Gradient

➢ The gradient of an image f at coordinates (x, y)

➢ The magnitude length ( ) of vector f

Trang 58

6 Sharpening (Highpass) Spatia

Image Sharpening the Gradient

➢ Roberts cross-gradient operators

Trang 59

6 Sharpening (Highpass) Spatia

Image Sharpening the Gradient

➢ Sobel operators

Trang 60

6 Sharpening (Highpass) Spatia

Image Sharpening the Gradient

➢ Filter masks

(a) A 3x3 region of an image, where the zs are intensity values (b) (c) Rob – (d) (e) Sobel operators All the kernel coefficients sum to zero, as expected –

Trang 61

6 Sharpening (Highpass) Spatia

Image Sharpening the Gradient

➢ Example: Using the gradient for edge enhancement.

Trang 62

Chapter 3 Intensity Transformations and

1 Background

2 Some Basic Intensity Transformation Functions

3 Histogram Processing

4 Fundamentals of Spatial Filtering

5 Smoothing (Lowpass) Spatial Filters

6 Sharpening (Highpass) Spatial Filters

7 Highpass, Bandreject, and Bandpass Filters from

8 Combining Spatial Enhancement Methods

Trang 63

7 Highpass, Bandreject, and Bandpass Filters f

Transfer functions of ideal 1-D filters

Trang 64

7 Highpass, Bandreject, and Bandpass Filters f

Transfer functions of ideal 1-D filters

Trang 65

7 Highpass, Bandreject, and Bandpass Filters f

Transfer functions of ideal 1-D filters

(a) A 1-D spatial lowpass

Trang 66

7 Highpass, Bandreject, and Bandpass Filters f

Transfer functions of ideal 1-D filters

(a) Zone plate image filtered with a separable lowpass kernel (b filtered with the isotropic lowpass kernel in Fig 3.60(b).

Trang 67

7 Highpass, Bandreject, and Bandpass Filters f

Transfer functions of ideal 1-D filters

Trang 68

Chapter 3 Intensity Transformations and

1 Background

2 Some Basic Intensity Transformation Functions

3 Histogram Processing

4 Fundamentals of Spatial Filtering

5 Smoothing (Lowpass) Spatial Filters

6 Sharpening (Highpass) Spatial Filters

7 Highpass, Bandreject, and Bandpass Filters from

8 Combining Spatial Enhancement Methods

Trang 69

8 Combining Spatial Enhancemen

Trang 70

8 Combining Spatial Enhancemen

(e) Sobel image smoothed with a 3x3 box filter (f) Mask image formed by the product of obtained by the adding images (a) and (f) (h) Final result obtained by applying a power- images (g) and (h) with (a) (Original image courtesy of G.E Medical Systems.)

Ngày đăng: 11/03/2022, 15:24

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

TÀI LIỆU LIÊN QUAN

w