image processing #2ocw.snu.ac.kr/sites/default/files/note/lecture 11 image... · 2019. 9. 3. ·...
TRANSCRIPT
![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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/1.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/2.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/3.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/4.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/5.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/6.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/7.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/8.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/9.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/10.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/11.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/12.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/13.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/14.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/15.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/16.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/17.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/18.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/19.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/20.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/21.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/22.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/23.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/24.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/25.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/26.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/27.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/28.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/29.jpg)
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](https://reader033.vdocuments.pub/reader033/viewer/2022060911/60a5c54a714e7738e645b7f0/html5/thumbnails/30.jpg)
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