30
Image processing #2 고급건설재료학 서울대 건설환경공학부 문주혁 교수

Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image processing #2

고급건설재료학

서울대 건설환경공학부 문주혁 교수

Page 2: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Contexts

• #1. Introduction and Examples

• #2. Basics of Matlab, Image Processing Toolbox

• #3. Segmentation, Edge detection, Transformation

• Matlab code (Image processing toolbox)

• Project introduction

Page 3: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Basics of Matlab

• Numeric types

• Signed integer:

• int8, int16, int32, int64

• Unsigned integer:

• uint8, uint16, uint32, uint64

• Floating point:

• single, double

• Other types

• Logical:

• True, false (1,0)

• Character:

• s = ‘this is a string’

• Variables can be cast to different types:

Page 4: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Basics of Matlab

• Arrays • Order (allocating memory)

Page 5: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Basics of Matlab

• Arrays• Data Structures in Matlab

Page 6: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Basics of Matlab

• Data Structures in Matlab

Page 7: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Basics of Matlab

• Pre-Allocation

Page 8: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Image read and show

Page 9: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Image transformation to black-white (binary) image

Page 10: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Image processing

Page 11: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Image processing

Page 12: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Image processing

Page 13: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Image processing

Page 14: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Image processing

Page 15: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Image processing

Page 16: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Image processing

Page 17: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Region Properties!!!

• Start it over

Page 18: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Region Properties!!!

Page 19: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Region Properties!!! (Use Help! Regionprops)

Page 20: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Image types

• True color (RGB, CMYK etc)

• Grayscale (or gray level, intensity)

• Binary (black & white, bi-level)

Page 21: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Image types

• True color (RGB, CMYK etc)

• Grayscale (or gray level, intensity)

• Binary (black & white, bi-level)

Page 22: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Image types

• True color (RGB, CMYK etc)

• Grayscale (or gray level, intensity)

• Binary (black & white, bi-level)

Page 23: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Image Processing Toolbox

• Ok. Then what is the principle for im2bw? (RGB to Gray to Black & White)

Threshold value를 k라하자.

[1, 2, … , 𝑘]를가지는픽셀들의집합 𝐶0

𝑘 + 1, 2, … , 𝐿 을가지는픽셀들의집합 𝐶1

𝐶0에속할확률 𝑤0 = 𝑤(𝑘)

𝐶1에속할확률 𝑤1 = 1 − 𝑤(𝑘)

𝐶0의평균값 𝜇0 = 𝜇(𝑘)/𝑤(𝑘)

𝐶1의평균값 𝜇1 =𝜇𝑇−𝜇(𝑘)

1−𝑤(𝑘)

𝜎𝐵2 = 𝑤0(𝜇0 − 𝜇𝑇)

2+𝑤1(𝜇1 − 𝜇𝑇)2가최대가되는 𝑘를 1부터 𝐿중에결정

Original 1 threshold

3 thresholds2 thresholds

Page 24: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Project

#1 Particle size analysis of 2D SEM image of superabsorbent polymers

Page 25: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Project

#2 Particle size analysis of 2D SEM image of silica fume

Page 26: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Project

#3 3D pore characteristics analysis of pores in concrete

Page 27: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Project

#4 3D volumetric characteristics analysis of steel fibers in

Ultra-High Performance Fiber-Reinforced Concrete (UHPRFC)

Page 28: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Project

#5 Noise cancellation in video

Page 29: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Project

#6 2D or 3D fiber separation in UHPFRC

Page 30: Image processing #2ocw.snu.ac.kr/sites/default/files/NOTE/Lecture 11 Image... · 2019. 9. 3. · Contexts •#1. Introduction and Examples •#2.Basics of Matlab, Image Processing

Project

#7 Fourier Transformation of TEM image

Lattice images of nanocrystalline regions in C-S-H in OPC specimen 28 d old

C-S-H particle