티스토리 뷰
1. What is an image?
A grid (matrix) of intensity values
(common to use one byte per value: 0 = black, 255 = white)
Can think of a (grayscale) image as a function f from R2 to R
- f(x,y) gives the intensity at position (x,y)
- A digital image is a discrete (sampled, quantized) version of this function
Image transformations
- As with any function, we can apply perators to an image
- Today we'll talk about a special kind of operator, convolution (linear filtering)
2. Filters
- Filtering
- Form a new image whose pixel values are a combination of the original pixel values
- Why?
- To get useful information from images
- E.g., extract edges or contours (to understand shape)
- To enhance the image
- E.g., to remove noise
- E.g., to sharpen and 'enhance image' a la CSI
- A key operator in Convolutional Neural Networks
- To get useful information from images
Canonical Image Processing problems

- Image Restoration
- denoising
- deblurring
- Image Compression
- JPEG, HEIF, MPEG, …
- Computiong Field Properties
- optical flow
- disparity
- Locating Structural Features
- corners
- edges
Question: Noise reduction
- Given a camera and a still scene, how can you reduce noise?
Image filtering
- Modify the pixels in an image based on some function of a local neighborhood of each pixel
Linear filtering
- One simple version of filtering: linear filtering (cross-correlation, convolution)
- Replace each pixel by a lnear combination (a weighted sum) of its neighbors
- The prescription for the linear combination is called the 'kernel' (or 'mask', 'filter')
Cross-corrleation
Let F be the image, H be the kernel (of size 2k+1 x 2k+1), and G be the output image
G[i,j]=Σku=−kΣkv=−kH[u,v]F[i+u,j+v]
This is called a **cross-correlation** operation:
G=H⨂F
Can think of as a 'dot product' between local neighborhood and kernel for each pixel
Convolution
Same as cross-correlation, except that the kernel is 'flipped' (horizontally and vertically)
G[i,j]=Σku=−kΣkv=−kH[u,v]F[i−u,j−v]
This is called a convolution operation:
G=H⋆F
Convolution is commutative and asscociative
Mean filtering

Mean filtering/Moving average


Linear filters: examples




Sharpening

Smoothing with box filter revisited

Gaussian kernel
Gσ=12πσ2ex2+y22σ2
Gaussian filters

Mean vs. Gaussian filtering

Gaussian filter
- Removes 'high-frequency' components from the image (low-pass filter)
- Convolution with self is another Gaussian

- Convolving twice with Gaussian kernel of width σ
= convolving once with kernel of width σ√2
Shapening revisited
- What does blurring take away?
Sharpen filter
F+α(F−F⋆H)=

- F: image
- F⋆H: blurred image
unit impulse (identity kernel with single 1 in center, zeros elsewhere)

'Optical' convolution
Camera shake

Bokeh : Blur in out-of-focus regions of an image

Filters: Thresholding

g(m,n)={255,f(m,n)>A0,otherwise
Linear filters
Can thresholding be implemented with a linear filter?
Reference: Lecture 1: Images and image filtering
'AI > Computer Vision' 카테고리의 다른 글
Aliasing(엘리어싱) - 발생 이유, 결과, 방지 방법 (0) | 2022.06.01 |
---|---|
[CS5670] Lecture 4: Local features & Harris corner detection (0) | 2022.05.23 |
[CS5670] Lecture 3: Image Resampling & Interpolation (0) | 2022.05.23 |
[CS5670] Lecture 2: Edge detection (0) | 2022.05.19 |
[CS5670] Lecture 0: Intro to Computer Vision (0) | 2022.05.19 |
- Total
- Today
- Yesterday
- 도커 컨테이너
- cs231n
- style transfer
- 데이터셋다운로드
- 파이썬
- prompt learning
- 구글드라이브연동
- 파이썬 딕셔너리
- 구글드라이브서버연동
- 구글드라이브다운
- 구글드라이브서버다운
- clip
- NLP
- 파이썬 클래스 다형성
- Unsupervised learning
- stylegan
- 파이썬 클래스 계층 구조
- 퓨샷러닝
- docker
- few-shot learning
- 딥러닝
- CNN
- vscode 자동 저장
- Prompt
- 서버에다운
- 프롬프트
- python
- 도커
- support set
- 서버구글드라이브연동
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |