02 mathematical preliminaries 基础数学知识

mathematical preliminaries 基础数学知识

摘要:

  1. 图像处理第一步是sampling采样,目的:将模拟图像转化为数字图像 Analog to Digital
  2. 采样用到的方法是傅里叶级数、傅里叶变换:从空域或时域到频域转化
  3. 采样定理(Nyquist):采样频率要大于等于信号最高频率分量的2倍
  4. (不是这章主要篇幅)卷积的应用:filter map在图上扫(算卷积),用于找边缘,去噪等

02 mathematical preliminaries 基础数学知识

1. Analog image 模拟图像

Definitions: a 2D image 𝑓(𝑥,𝑦) which has infinite precision in spatial parameters 𝑥 and 𝑦 and infinite precision in intensity at each spatial point (𝑥,𝑦). 无限精度

  • 直接通过感光设备记录成像目标所反射的光强,通常以胶片形式保存

2. Digital image 数字图像:

Definitions:

a 2D image 𝐼(𝑟,𝑐) represented by a discrete 2D array of intensity samples, each of which is represented using a limited precision. 有限精度

  • 用一个m×n的像素矩阵来表达一幅图像,m与n称为图像的分辨率
  • 把图像按行与列分割成m*n个网格,每个网格的图像用该网格内颜色的平均值表示(空间量化)
  • 灰度(颜色)值量化(8位 256)

Types

  1. A gray scale image 灰度图像: a monochrome digital image 𝐼(𝑟,𝑐) with one intensity value per pixel.
  2. A multispectral image 多光谱图像/RGB image: a 2D image 𝑀(𝑥,𝑦) which has a vector of values at each spatial point or pixel.
    Example: a color image has a vector of 3 values at each pixel, Red, Green, and Blue components.
  3. A binary image 二值图像 : is a digital image where all pixel values are 0 or 1.
    Example: an image obtained by a process of foreground/background segmentation, 1: foreground, 0: background.
  4. A labeled image 标注图像 : is a digital image 𝐿(𝑟,𝑐) whose pixel values are symbols from a finite alphabet (e.g., class labels).
    Example: the result of identifying connected regions and assigning an ID to each region.

3. A picture (image) function 图像的数字化

Definitions:

a mathematical representation 𝑓(𝑥,𝑦) of a picture as a function of two spatial variables 𝑥 and 𝑦.

  • 图像数字化即将图像转化为数字图像,就是把图像分割成称为像素的小区域,每个图像的亮度或灰度值用一个整数来表示。

Image Function

A mathematical abstraction of an image.
In general, a vector valued function (e.g., color, or multi-spectral satellite images) of a small number of arguments: 𝐟(𝐱): 𝐟 is vector valued and 𝐱 is a vector

Digital image function

Usually integer coordinates (pixel coordinates; row and column) and integer value (quantized).

  1. Values could be 8 bits (0-255), or 16 bits, etc.
  2. Color images would have 3 channels (R,G,B) of 8 bits each.

Signal processing 信号处理知识

Linear systems and Signal Processing concepts
线性系统和信号处理概念

Signals 信号

Definitions:

Signals for us are real or complex functions of some independent variables. 信号是一些自变量的实值函数或复合函数。

Signals can be

  1. 1-dimensional (almost always the independent variable is time) or multi-dimensional (e.g., images of spatial dimensions x and y). 一维或多维
  2. Continuous time (CT) or discrete time (DT) 连续时间或离散时间
  3. Deterministic or stochastic (i.e., random or probabilistic) 确定的或随机的

##Dirac delta function 𝛿(𝑥) 狄拉克函数 ppt 1-17 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Frequency domain representation and Fourier transform 频域表示和傅里叶变换

  1. Typically 1D signals are in the time domain (a function of time, as in e.g., audio) and 2D signals are in the spatial domain (a function of (x,y) as in images).
    通常一维信号在时域(时间的函数,如音频),二维信号在空间域(x,y的函数,如图像)。
  2. Signals (images being an example in which we are interested) can be converted (without losing any information) to other representations.
    信号(比如图像)可以转换成其他表示形式(不丢失任何信息)。
  3. So called, frequency domain representation is one such example.
    比如频域的表示方法

Fourier series is defined for periodic functions.
傅里叶级数:将周期函数信号表示成复正选信号的叠加 For aperiodic functions, we have the Fourier transform.
傅里叶变换:将非周期函数信号表示成复正选信号的叠加

Fourier transform 傅里叶变换

Consider a 1D signal, e.g., a complicated sound such as the noise of a car horn: 考虑一维信号,例如复杂的声音,例如汽车喇叭的声音: We can describe this sound in two related ways: 我们可以用两种相关的方式来描述这种声音: sample the amplitude of the sound many times a second, which gives an approximation to the sound as a function of time. (time domain representation) 每秒多次采样声音的振幅,就可以得到声音随时间变化的近似值。(时间域表示) analyze the sound in terms of the pitches of the frequencies, which make up the sound, recording the amplitude (i.e., contribution) of each frequency. (frequency domain representation) 根据组成声音的频率的音高分析声音,记录振幅(比如contribution)。(频域表示) Each of these frequency values is referred to as a frequency component. 这些频率值中的每一个都被称为频率分量。 The mathematical tool used to analyze signals and convert representations from time (in 1D) or spatial domain (in 2D) to frequency domain is the Fourier transform. 傅里叶变换是用来分析信号并将信号从时间(一维)或空间域(二维)转换为频域的数学工具


公式:ppt18-19


Frequencies in images

What do frequencies mean in an image?
频谱反应的是不同频率分量的幅度

  • If an image has large values at high frequency components then the data is changing rapidly on a short distance scale. e.g. a page of text.
    高频信息代表的是变化快的信息,也就是图像里的细节和纹理
  • If the image has large low frequency components, then the large scale features (i.e., slowly varying values) of the picture are more important. e.g. a single fairly simple object which occupies most of the image. 低频信息代表的是平缓的区域,也就是图像里比较平滑的灰度信息,沿不同方向的频率成分代表该方向变化的情况

公式 20!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


时域(时间域) & 频域(频率域) & 空域(空间域)

  1. 空间域(spatial domain)也叫空域,即所说的像素域,在空域的处理就是在像素级的处理,如在像素级的图像叠加。通过傅立叶变换后,得到的是图像的频谱。表示图像的能量梯度。
  2. 频率域(frequency domain。)任何一个波形都可以分解成多个正弦波之和。每个正弦波都有自己的频率和振幅。所以任意一个波形信号有自己的频率和振幅的集合。频率域就是空间域经过傅立叶变换的信号
  3. 时域(时间域)——自变量是时间,即横轴是时间,纵轴是信号的变化。其动态信号x(t)是描述信号在不同时刻取值的函数。
  4. 频域(频率域)——自变量是频率,即横轴是频率,纵轴是该频率信号的幅度,也就是通常说的频谱图。频谱图描述了信号的频率结构及频率与该频率信号幅度的关系。

最后:傅里叶变换是实现从空域或时域到频域的转换工具。

convolution theorem 卷积定理

𝐹[𝑓∗𝑔]=𝐹[𝑓]𝐹[𝑔]
F[𝑓⋅𝑔]=𝐹[𝑓]∗𝐹[𝑔]

  • That is, the convolution in the time/spatial domain is the same as pointwise multiplication in the frequency domain, and vice versa.
    时域和空域的卷积和频域的点乘是一样的
  • If we want to filter a signal, we can convolve it with the filter in the spatial domain, or
    如果我们想对一个信号进行滤波,我们可以在空间域中将它与滤波器进行卷积
    Take their FTs, multiply them pointwise, and take the inverse FT of the result.
    取它们的傅里叶变换,逐点相乘,然后取结果的傅里叶变换倒数

2D Fourier transform 傅里叶变换

幅度谱 & 相位谱

幅度谱:反应了能量信息
相位谱:反应了位置信息


公式 21!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Example 图像去噪:
网纹噪声(有规律的噪声) 噪声会集中在某一频域点
做法:傅里叶变换后去除该频域的噪声,然后再反变换回来,就可以去除

Sampling theorem 采样定理

采样频率要大于等于信号最高频率分量的2倍 如果达不到,拍出来的照片就会有频率混叠(aliasing),生成网纹似的图像片段: If the sampling is done at intervals larger than Nyquist frequency interval, the signal cannot be recovered completely from the samples, and aliasing occurs. 频率混叠:频率低于两倍奈奎斯特频率间隔后发生的现象

Geometric preliminaries 几何学知识

  • 1D Transformations Similarity (Metric): 平移(translation) and 缩放(scaling )
  • 2D Transformations 旋转(Rotation) 仿射变换(Affine Transformation) 后面实验1是摄像机标定实验,就是这个部分的应用
  • Coordinates (Euclidean and Homogeneous) 欧几里得齐次坐标

Statistics 统计学知识

Probability basics
贝叶斯公式
相关性:不相关矩阵(爱因斯坦的眼睛)