Image processing #2
고급건설재료학
서울대 건설환경공학부 문주혁 교수
Contexts
• #1. Introduction and Examples
• #2. Basics of Matlab, Image Processing Toolbox
• #3. Segmentation, Edge detection, Transformation
• Matlab code (Image processing toolbox)
• Project introduction
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:
Basics of Matlab
Arrays Order (allocating memory)
Basics of Matlab
• Arrays
Data Structures in Matlab
Basics of Matlab
Data Structures in Matlab
Basics of Matlab
Pre-Allocation
Image Processing Toolbox
Image read and show
Image Processing Toolbox
Image transformation to black-white (binary) image
Image Processing Toolbox
Image processing
Image Processing Toolbox
Image processing
Image Processing Toolbox
Image processing
Image Processing Toolbox
Image processing
Image Processing Toolbox
Image processing
Image Processing Toolbox
Image processing
Image Processing Toolbox
Image processing
Image Processing Toolbox
• Region Properties!!!
Start it over
Image Processing Toolbox
Region Properties!!!
Image Processing Toolbox
Region Properties!!! (Use Help! Regionprops)
Image Processing Toolbox
• Image types
• True color (RGB, CMYK etc)
• Grayscale (or gray level, intensity) Binary (black & white, bi-level)
Image Processing Toolbox
• Image types
• True color (RGB, CMYK etc)
• Grayscale (or gray level, intensity) Binary (black & white, bi-level)
Image Processing Toolbox
• Image types
• True color (RGB, CMYK etc)
• Grayscale (or gray level, intensity) Binary (black & white, bi-level)
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−𝑤(𝑘)
Original 1 threshold
3 thresholds 2 thresholds
Project
#1 Particle size analysis of 2D SEM image of superabsorbent polymers
Project
#2 Particle size analysis of 2D SEM image of silica fume
Project
#3 3D pore characteristics analysis of pores in concrete
Project
#4 3D volumetric characteristics analysis of steel fibers in Ultra-High Performance Fiber-Reinforced Concrete (UHPRFC)
Project
#5 Noise cancellation in video
Project
#6 2D or 3D fiber separation in UHPFRC
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