# 脊检测

## 二維相片中單一尺度的脊與谷的微分幾何定義

${\displaystyle f(x,y)}$為一個二維函數，而${\displaystyle L}$${\displaystyle f(x,y)}$尺度空間表示，此種表示可以透過${\displaystyle f(x,y)}$與高斯函數的摺積獲得。

${\displaystyle g(x,y,t)={\frac {1}{2\pi t}}e^{-(x^{2}+y^{2})/2t}}$.

${\displaystyle \partial _{p}=\sin \beta \partial _{x}-\cos \beta \partial _{y},\partial _{q}=\cos \beta \partial _{x}+\sin \beta \partial _{y}}$

${\displaystyle H={\begin{bmatrix}L_{xx}&L_{xy}\\L_{xy}&L_{yy}\end{bmatrix}}={\begin{bmatrix}\sin \beta &-\cos \beta \\\cos \beta &\sin \beta \end{bmatrix}}{\begin{bmatrix}L_{pp}&L_{pq}\\L_{pq}&L_{qq}\end{bmatrix}}{\begin{bmatrix}\sin \beta &\cos \beta \\-\cos \beta &\sin \beta \end{bmatrix}}}$

${\displaystyle \cos \beta ={\sqrt {{\frac {1}{2}}\left(1+{\frac {L_{xx}-L_{yy}}{\sqrt {(L_{xx}-L_{yy})^{2}+4L_{xy}^{2}}}}\right)}}}$,${\displaystyle \sin \beta =\operatorname {sgn}(L_{xy}){\sqrt {{\frac {1}{2}}\left(1-{\frac {L_{xx}-L_{yy}}{\sqrt {(L_{xx}-L_{yy})^{2}+4L_{xy}^{2}}}}\right)}}}$.

${\displaystyle L_{p}=0,L_{pp}\leq 0,|L_{pp}|\geq |L_{qq}|.}$

${\displaystyle L_{q}=0,L_{qq}\geq 0,|L_{qq}|\geq |L_{pp}|.}$

${\displaystyle \partial _{u}=\sin \alpha \partial _{x}-\cos \alpha \partial _{y},\partial _{v}=\cos \alpha \partial _{x}+\sin \alpha \partial _{y}}$

${\displaystyle \cos \alpha ={\frac {L_{x}}{\sqrt {L_{x}^{2}+L_{y}^{2}}}},\sin \alpha ={\frac {L_{y}}{\sqrt {L_{x}^{2}+L_{y}^{2}}}}}$

${\displaystyle L_{uv}=0,L_{uu}^{2}-L_{vv}^{2}\geq 0}$

${\displaystyle L_{v}^{2}L_{uu}=L_{x}^{2}L_{yy}-2L_{x}L_{y}L_{xy}+L_{y}^{2}L_{xx},}$
${\displaystyle L_{v}^{2}L_{uv}=L_{x}L_{y}(L_{xx}-L_{yy})-(L_{x}^{2}-L_{y}^{2})L_{xy},}$
${\displaystyle L_{v}^{2}L_{vv}=L_{x}^{2}L_{xx}+2L_{x}L_{y}L_{xy}+L_{y}^{2}L_{yy}}$

${\displaystyle L_{uu}}$的正負號決定一個點是脊或是谷，${\displaystyle L_{uu}<0}$是脊而${\displaystyle L_{uu}>0}$是谷.

## 計算二維相片在變化尺度下的脊

${\displaystyle R(x,y,t)}$為一個描述脊強度的函數（底下有詳細定義）。則對於一個二維相片，尺度空間脊包含所有符合以下條件的點，

${\displaystyle L_{p}=0,L_{pp}\leq 0,\partial _{t}(R)=0,\partial _{tt}(R)\leq 0,}$

${\displaystyle L_{q}=0,L_{qq}\geq 0,\partial _{t}(R)=0,\partial _{tt}(R)\leq 0.}$

• 主曲率
${\displaystyle L_{pp,\gamma -norm}={\frac {t^{\gamma }}{2}}\left(L_{xx}+L_{yy}-{\sqrt {(L_{xx}-L_{yy})^{2}+4L_{xy}^{2}}}\right)}$
• 特徵值差的平方經${\displaystyle \gamma }$-標準化後的平方
${\displaystyle N_{\gamma -norm}=\left(L_{pp,\gamma -norm}^{2}-L_{qq,\gamma -norm}^{2}\right)^{2}=t^{4\gamma }(L_{xx}+L_{yy})^{2}\left((L_{xx}-L_{yy})^{2}+4L_{xy}^{2}\right).}$
• 特徵值差經${\displaystyle \gamma }$-標準化後的平方
${\displaystyle A_{\gamma -norm}=\left(L_{pp,\gamma -norm}-L_{qq,\gamma -norm}\right)^{2}=t^{2\gamma }\left((L_{xx}-L_{yy})^{2}+4L_{xy}^{2}\right).}$

${\displaystyle L_{pp,\gamma -norm}}$是一個通用性的描述函數，常被用在血管偵測及道路提取等應用中，而${\displaystyle A_{\gamma -norm}}$則被用在指紋的增強[4]，即時手部追蹤及手勢辨識[5]，以及利用局部影像統計偵測追蹤影像或影片中的人。[6]

## N維空間中脊與谷的定義

${\displaystyle \mathbf {x} _{0}}$在一維的脊上若:

1. ${\displaystyle \lambda _{n-1}<0}$
2. ${\displaystyle \nabla _{\mathbf {x} _{0}}f\cdot \mathbf {e} _{i}=0}$ for ${\displaystyle i=1,2,\ldots ,n-1}$.

1. ${\displaystyle \lambda _{n-k}<0}$
2. ${\displaystyle \nabla _{\mathbf {x} _{0}}f\cdot \mathbf {e} _{i}=0}$ for ${\displaystyle i=1,2,\ldots ,n-k}$.

## 最大尺度脊

1. ${\displaystyle {\frac {\partial f}{\partial \sigma }}=0}$ and ${\displaystyle {\frac {\partial ^{2}f}{\partial \sigma ^{2}}}<0}$, and
2. ${\displaystyle \nabla f\cdot \mathbf {e} _{1}=0}$ and ${\displaystyle \mathbf {e} _{1}^{t}H(f)\mathbf {e} _{1}<0}$.

## 參考資料

1. ^ T. Lindeberg. Scale-space. Encyclopedia of Computer Science and Engineering (Benjamin Wah, ed), John Wiley and Sons. 2008/2009, IV: 2495–2504. doi:10.1002/9780470050118.ecse609.
2. ^ Lindeberg, T. Scale-space theory: A basic tool for analysing structures at different scales. J. of Applied Statistics. 1994, 21 (2): 224–270. doi:10.1080/757582976.
3. ^ Lindeberg, T. Edge detection and ridge detection with automatic scale selection. International Journal of Computer Vision. 1998, 30 (2): 117–154. doi:10.1023/A:1008097225773. Earlier version presented at IEEE Conference on Pattern Recognition and Computer Vision, CVPR'96, San Francisco, California, pages 465–470, june 1996
4. ^ Almansa, A., Lindeberg, T. Fingerprint Enhancement by Shape Adaptation of Scale-Space Operators with Automatic Scale-Selection. IEEE Transactions on Image Processing. 2000, 9 (12): 2027–42. PMID 18262941. doi:10.1109/83.887971.
5. ^ L. Bretzner, I. Laptev and T. Lindeberg: Hand Gesture Recognition using Multi-Scale Colour Features, Hierarchical Models and Particle Filtering, Proc. IEEE Conference on Face and Gesture 2002, Washington DC, 423–428.
6. ^ Sidenbladh, H., Black, M. Learning the statistics of people in images and video (PDF). International Journal of Computer Vision. 2003, 54 (1–2): 183–209.
7. ^ Haralick, R. Ridges and Valleys on Digital Images. Computer Vision, Graphics, and Image Processing. April 1983, 22 (10): 28–38. doi:10.1016/0734-189X(83)90094-4.
8. ^ Crowley, J.L., Parker, A.C. A Representation for Shape Based on Peaks and Ridges in the Difference of Low Pass Transform (PDF). IEEE Trans Pattern Anal Mach Intell. March 1984, 6 (2): 156–170. PMID 21869180. doi:10.1109/TPAMI.1984.4767500.
9. ^ Crowley, J.L., Sanderson, A. Multiple Resolution Representation and Probabilistic Matching of 2-D Gray-Scale Shape (PDF). IEEE Trans Pattern Anal Mach Intell. January 1987, 9 (1): 113–121. doi:10.1109/TPAMI.1987.4767876.
10. ^ Gauch, J.M., Pizer, S.M. Multiresolution Analysis of Ridges and Valleys in Grey-Scale Images. IEEE Trans Pattern Anal Mach Intell. June 1993, 15 (6): 635–646. doi:10.1109/34.216734.
11. ^ Eberly D., Gardner R., Morse B., Pizer S., Scharlach C. Ridges for image analysis. Journal of Mathematical Imaging and Vision. December 1994, 4 (4): 353–373. doi:10.1007/BF01262402.
12. ^ Pizer, Stephen M., Eberly, David, Fritsch, Daniel S. Zoom-invariant vision of figural shape: the mathematics of cores. Computer Vision and Image Understanding. January 1998, 69 (1): 55–71. doi:10.1006/cviu.1997.0563.
13. ^ S. Pizer, S. Joshi, T. Fletcher, M. Styner, G. Tracton, J. Chen (2001) "Segmentation of Single-Figure Objects by Deformable M-reps", Proceedings of the 4th International Conference on Medical Image Computing and Computer-Assisted Intervention, Springer Lecture Notes In Computer Science; Vol. 2208, pp. 862–871
14. ^ Steger C. An unbiased detector of curvilinear structures. IEEE Trans Pattern Anal Mach Intell. 1998, 20 (2): 113–125. doi:10.1109/34.659930.
15. ^ Laptev I., Mayer H., Lindeberg T., Eckstein W., Steger C., Baumgartner A. Automatic extraction of roads from aerial images based on scale-space and snakes (PDF). Machine Vision and Applications. 2000, 12 (1): 23. doi:10.1007/s001380050121.
16. ^ Frangi AF, Niessen WJ, Hoogeveen RM, van Walsum T, Viergever MA. Model-based quantitation of 3-D magnetic resonance angiographic images. IEEE Trans Med Imaging. October 1999, 18 (10): 946–56. PMID 10628954. doi:10.1109/42.811279.
17. ^ Sato Y, Nakajima S, Shiraga N, Atsumi H, Yoshida S; 等. Three-dimensional multi-scale line filter for segmentation and visualization of curvilinear structures in medical images (PDF). Medical Image Analysis. 1998, 2 (2): 143–168. doi:10.1016/s1361-8415(98)80009-1.
18. ^ Krissian K., Malandain G., Ayache N., Vaillan R., Trousset Y. Model-based detection of tubular structures in 3D images. Computer Vision and Image Understanding. 2000, 80 (2): 130–171. doi:10.1006/cviu.2000.0866.
19. ^ Eberly, D. Ridges in Image and Data Analysis. Kluwer. 1996. ISBN 0-7923-4268-2.
20. ^ Fritsch, DS, Eberly,D., Pizer, SM, and McAuliffe, MJ. "Stimulated cores and their applications in medical imaging." Information Processing in Medical Imaging, Y. Bizais, C Barillot, R DiPaola, eds., Kluwer Series in Computational Imaging and Vision, pp. 365–368.