🎯Some basic relationship between pixels——像素之间的基本关系
Neighbors and Connectivity——领域与联通
Neighbors of a pixel——像素的领域
4-neighbor——4领域,即\(N_{4}(p)\)
Diagonal neighbors——对角领域,即\(N_{D}(p)\)
8-neighbor——8领域,即\(N_{8}(p)\)
Connectivity——连通
相邻仅考虑像素间的空间关系
连通:空间上相邻且像素灰度值相似
两个像素是否连通:
- 是否接触(相邻)
- 灰度值是否满足某个特定的相似准则:灰度值相等或同在一个灰度值集合中
三种连通
假设V为灰度值集合,V ={1}:
- 4-连通: 2个像素 p 和 r 在V 中取值且 r 在\(N_{4}(p)\)中
- 8-连通:2个像素 p 和 r 在V 中取值且 r 在\(N_{8}(p)\)中
- m-连通(混合连通):2个像素 p 和 r 在V 中取值,且满足下列条件之一
① r 在\(N_{4}(p)\)中
② r 在\(N_{D}(p)\)中且集合\(N_{4}(p)\)∩\(N_{4}(r)\)是空集
Path——通路
像素\(p(x, y)\)到像素\(q(s, t)\)的一条通路由一系列具有坐标\((x_0, y_0)\), \((x_1, y_1)\) ,…,\((x_i , y_i)\) ,…,\((x_n , y_n)\)的独立像素组成。这里 \((x, y)\)= \((x_0, y_0)\), \((x_n , y_n)\)= \((s, t)\),且 \((x_i , y_i)\)与 \((x_{i-1}, y_{i-1})\)连通。其中\(1≤i≤n\),\(n\)为通路长度。
通路种类:4-通路(4-path);8-通路(8-path);m-通路(m-path)
例题:
Distance Measures——距离度量
Definition:For pixels \(p, q, z\), with coordinates \((x, y), (s, t), (v, w)\) ,respectively, if
给出三个像素\(p, q, z\),坐标分别为\((x, y), (s, t), (v, w)\),则
- \(D(p, q)≥0\) [\(D(p, q)= 0\), 当且仅当 p=q]
- \(D(p, q)=D(q, p)\)
- \(D(p, z)≤D(p, q) + D(q, z)\)
then D is a distance function or metric.
如过D满足以上三个条件,则称D为距离函数或距离度量
⚠️D距离与像素的点坐标相关
⚠️D距离与像素间的连通性无关
🎯Euclidean distance De——欧式距离(默认使用的距离函数)
Definition:
已知\(p(x,y)\),\(q(s,t)\)
For this distance measure, the pixels having a distance less than or equal to some value \(r\) from \((x,y)\) are the points contained in a disk of radius \(r\) centered at \((x,y)\).
距离点\((x,y)\),\(r\)距离的点组成一个圆
\(D_4\) distance (also called city-block distance)——\(D_4\)距离,即街区距离
The pixels having a \(D_4\) distance from \((x, y)\) less than or equal to some value r form a diamond centered at \((x, y)\) .
The Pixels with \(D_4=1\) are the \(N_4\) of \((x, y)\).
\(D_8\) distance (chessboard distance)——\(D_8\)距离,即棋盘距离
The pixels with \(D_8\) distance from\((x, y)\) less than or equal to some value r form a square centered at \((x, y)\).
The pixels with \(D_8=1\) are the N8 of \((x, y)\).