Chapter 10 Image Segmentation 图像分割

10.2.7 Edge Linking and Boundary Detection 边缘连接和边界检测

Global processing using the Hough transform 使用霍夫变换的全局处理

  • 一种检测像素集是否位于指定形状的曲线上的方法,一旦检测到,这些曲线就会形成边缘或感兴趣的区域边界。

  • 霍夫变换:考虑 \(xy\) 平面上的一个点 \((x_i,y_i)\) 和形式为 \(y_i = ax_i + b\) 的一条直线。通过点的直线有无数条,且对a和b的不同值都满足方程。将该等式写为,考虑ab平面也称参数空间,将得到固定点的单一直线的方程。此外,第二个点在参数空间中也有一条与之相关联的直线,除非他们是平行的,否则这条直线会和相关联的直线相交于点。

  • However,is that a(the slope of a line) approaches infinity as the line approaches the vertical direction.One way around this difficulty is to use the normal representation of a line:

    \[ x cos\theta + y sin\theta = \rho \]

  • Each sinusoidal curve in Figure 10.32(b) represents the family of lines that pass through a particular point \((x_k,y_k)\) in the xy-plane. The intersection point \((\rho^{\prime},\theta^{\prime})\) corresponds to the line that passes through both \((x_i,y_i)\) and \((x_j,y_j)\)。 \((\rho^{\prime},\theta^{\prime})\) 对应于通过 \((x_i,y_i)\) 和 \((x_j,y_j)\)的直线。

  • The computational attractiveness of Hough transform arise from subdividing the $ \rho\theta $ parameter space into so-called accumulator cells(累加单元), as Fig.10.32(c)illustrates, where \((\rho\_{min},\rho\_{max})\) and \((\theta\_{min},\theta\_{max})\) are the expected ranges of the parameter values: \(-90^\circ \le \theta \le 90^\circ\) and \(-D \le \rho \le D\), where D is the maximum distance between opposite corners(对角线) in an image. The cell at coordinates \((i,j)\), with accumulator value \(A(i,j)\), corresponds to the square associated with parameter-space coordinates \((\rho_i,\theta_j)\). Initially, these cells are set to zero. Then, for every non-background point \((x_k,y_k)\) in the \(xy\)-plane, we let \(\theta\) equal each of the allowed subdivision values on the \(\theta\)-axis(令 \(\theta\) 等于 \(\theta\) 轴上每个允许的细分值) and solve for the corresponding \(\rho\) (解出相对应的 \(\rho\) ) using the equation \(\rho = x_kcos\theta + y_ksin\theta\). The resulting \(\rho\) values are then rounded off to the nearest allowed cell value along the \(\rho\) axis. If a choice of \(\theta_p\) results in solution \(\rho_q\), then we let \(A(p,q)=A(p,q)+1\). At the end of this procedure, a value of P in \(A(i,j)\) means that points in the \(xy\)-plane lie on the line \(xcos\theta_j + y sin\theta_j = \rho_i\). The number of subdivisions in the \(\rho\theta\)-plane determines the accuracy of the colinearity(共线性的精确性) of these points. It can be shown that the number of computations in the method just discussed is linear with respect to \(n\), the number of non-background points in the \(xy\)-plane.

  • Example 图10.33(a)显示了一幅大小为101x101像素具有五个标记点的图像,图10.33(b)显示了将每个点映射到 \(\rho\theta\) 平面上的结果。其中A点和B点显示了霍夫变换的共线检测的性质。点A表示对应于xy图像平面内点1,3,5曲线的交点。点A的位置指出这三个点位于一条过原点且方向为45°的直线上。点B的位置指出点2,3,4位于方向为-45°且与原点的距离为\(\rho=71\)(即从原点到对角的对角线距离的一半)的直线上。最后,点Q、R、S表明霍夫变换展示了在参数空间左边缘和右边缘的一种反射邻接关系,这一性质是 \(\theta\) 和 \(\rho\) 在 \(\pm90°\) 边界改变符号的结果。

  • Although the focus thus far has been on straight lines, the Hough transform

    is applicable to any function of the form \(g(v,c) = 0\) where v is a vector

    of coordinates(坐标向量) and c is a vector of coefficients(系数向量). For example, points lying on the circle

    \[ (x-c_1)^2 + (y-c_2)^2 = c_3^2 \]

can be detected by using the basic approach just discussed. The difference is

the presence of three parameters \((c_1,c_2,c_3)\), which results in a 3-D parameter

space with cube-like cells and accumulators of the form \(A(i,j,k)\). The

procedure is to increment \(c_1\) and \(c_2\) solve for \(c_3\) the that satisfies the equation above and update the accumulator cell associated with the triplet \((c_1,c_2,c_3)\)

10.3 Thresholding 阈值处理

10.3.3 Optimum Global Thresholding Using Otsu's Method 用OStu方法的最佳全局阈值处理

  • The approach discussed in this section, called Otsu’s method(大津阈值分割法) (Otsu [1979]), is an attractive alternative.The method is optimum in the sense that it maximizes

    the between-class variance(最大化类间方差), a well-known measure used in statistical discriminant analysis. In addition to its optimality, Otsu’s method has the important property that it is based entirely on computations performed on the histogram of an image, an easily obtainable 1-D array.

  • 具体算法
  1. 设原始灰度图像灰度级为L,灰度级为i的像素点数为\(n_i\),则图像的全部像素数为

    \[ N = n\_0 + n\_1 +...+ n\_{L-1} \]

  2. 归一化直方图,则

    \[ p\_i = n\_i / N , \sum\_{i=0}^{L-1}p\_i = 1 \]

  3. 按灰度级用阈值t划分为两类:\(C_0 = (0,1,...t)\) 和 \(C_1 = (t+1,t+2,...,L-1)\),因此,\(C_0\)和\(C_1\)类的出现概率及均值分别由下列各式给出

    \[ w_0 = P_r(C_0) = \sum_{i=0}^tp_i = w(t) \quad w_1 = P_r(C_1) = \sum_{i=t+1}^{L-1}p_i = 1-w(t) \] \[ \mu_0 = \sum_{i=0}^{t}ip_i/w_0 = \mu(t)/w(t) \quad \mu_1 = \sum_{i=t+1}^{L-1}ip_i/w_1 = \frac{\mu_T(t) - \mu(t)}{1-w(t)} \] \[ \mu(t) = \sum_{i=0}^{t}ip_i \quad\quad \mu_T = \mu(L-1) = \sum_{i=0}^{L-1}ip_i \]

  4. 可以看出,对任何t值下式都能成立:

    \[ w_0\mu_0 + w_1\mu_1 = \mu_T \quad w_0 + w_1 = 1\]

  5. C_0和C_1类的方差可由下式求得:

    \[ \sigma_0^2 = \sum_{i=0}^{t}(i-\mu_0)^2p_i/w_0 \] \[ \sigma_1^2 = \sum_{i=t+1}^{L-1}(i-mu_1)^2p_i/w_1 \]

  6. 定义类内方差为:

    \[ \sigma_w^2 = w_0\sigma_0^2 + w_1\sigma_1^2 \]
  7. 类间方差为:

    \[ \sigma_B^2 = w_0(\mu_0-\mu_T)^2 + w_1(\mu_1-\mu_T)^2 = w_0w_1(\mu_1-\mu_0)^2 \]
  8. 总体方差为:

    \[ \sigma_T^2 = \sigma_B^2 + \sigma_w^2 \]

10.3.7 Variable Thresholding 可变阈值处理

Using moving averages 使用移动平均

当需要处理的图像有非均匀分布的背景时,可以采用该方法

  • Example


Interacitve Image Segmentation 交互式图像分割

  • Step1-Feature Distribution Estimation

    • Estimate the color distribution on scribbles
    • Each pixel is assigned a probability to belong to F or B
  • Step2-Weighted Distance Transform
    • Weighted Geodesic Distance
    • Computed in linear time
    • Pixels are classified by comparing \(D_F(x)\) and \(D_B(x)\)
  • Step3-Refine
    • Automatically create a narrow band and new scribbles
    • Band boundaries serve as "new scribbles"

Graph Cuts 图形分割技术 -Boykov and Jolly(2001)

  • 详细内容参见该论文

Mumford-Shah Image Segmentation


Active Contours ("Snakes") 主动轮廓技术

  • 可参考ipol.im网站上的算法:Chan-Vese Segmentation

  • Demo - Otsu's Segmentation

    ```matlab

    I = imread('coins.png');

    用大津阈值法计算最佳阈值

    level = graythresh(I);

    用该阈值对图像进行分割

    BW = im2bw(I,level);

    展示图像与直方图

    figure,imshow(I),figure,imshow(BW),figure,imhist(I)

```

【Duke-Image】Week_5 Segmentation的更多相关文章

  1. 【背景建模】PBAS

    Pixel-Based Adaptive Segmenter(PBAS)检测算法,是基于像素的无参数模型,该算法结合了SACON和VIBE两个算法的优势,并在这两个算法的基础上改进而来,SACON和V ...

  2. zz【清华NLP】图神经网络GNN论文分门别类,16大应用200+篇论文最新推荐

    [清华NLP]图神经网络GNN论文分门别类,16大应用200+篇论文最新推荐 图神经网络研究成为当前深度学习领域的热点.最近,清华大学NLP课题组Jie Zhou, Ganqu Cui, Zhengy ...

  3. 图学习【参考资料2】-知识补充与node2vec代码注解

    本项目参考: https://aistudio.baidu.com/aistudio/projectdetail/5012408?contributionType=1 *一.正题篇:DeepWalk. ...

  4. 【AR实验室】mulberryAR : ORBSLAM2+VVSION

    本文转载请注明出处 —— polobymulberry-博客园 0x00 - 前言 mulberryAR是我业余时间弄的一个AR引擎,目前主要支持单目视觉SLAM+3D渲染,并且支持iOS端,但是该引 ...

  5. 【.net 深呼吸】细说CodeDom(1):结构大观

    CodeDom 是啥东东?Html Dom听过吧,XML Dom听过吧.DOM一般可翻译为 文档对象模型,那 Code + DOM呢,自然是指代码文档模型了.如果你从来没接触过 CodeDom,你大概 ...

  6. 【Machine Learning】KNN算法虹膜图片识别

    K-近邻算法虹膜图片识别实战 作者:白宁超 2017年1月3日18:26:33 摘要:随着机器学习和深度学习的热潮,各种图书层出不穷.然而多数是基础理论知识介绍,缺乏实现的深入理解.本系列文章是作者结 ...

  7. 【前端性能】高性能滚动 scroll 及页面渲染优化

    最近在研究页面渲染及web动画的性能问题,以及拜读<CSS SECRET>(CSS揭秘)这本大作. 本文主要想谈谈页面优化之滚动优化. 主要内容包括了为何需要优化滚动事件,滚动与页面渲染的 ...

  8. 【深入浅出jQuery】源码浅析--整体架构

    最近一直在研读 jQuery 源码,初看源码一头雾水毫无头绪,真正静下心来细看写的真是精妙,让你感叹代码之美. 其结构明晰,高内聚.低耦合,兼具优秀的性能与便利的扩展性,在浏览器的兼容性(功能缺陷.渐 ...

  9. 【.net 深呼吸】程序集的热更新

    当一个程序集被加载使用的时候,出于数据的完整性和安全性考虑,程序集文件(在99.9998%的情况下是.dll文件)会被锁定,如果此时你想更新程序集(实际上是替换dll文件),是不可以操作的,这时你得把 ...

随机推荐

  1. 【笔记】css hover 伪类控制其他元素

    最近在模仿一个网站的项目 当中有一个效果需要利用到hover效果因为不太想写jq脚本所以百度了一下css hover的运用发现原来hover也可以控制其他元素的变化的 但是这有一个要求 就是添加hov ...

  2. 【转】PowerShell入门(十二):编写PowerShell管理单元和二进制模块

    转至:http://www.cnblogs.com/ceachy/archive/2013/03/13/PowerShell_SnapIn.html PowerShell一开始就提出利用管理单元来实现 ...

  3. percona server 二进制安装下编译tpcc-mysql的坑

    出于习惯,percona server的部署都是通过二进制包自动化安装,结果遇到一个硕大无比的坑,编译TPCC-MySQL时出现警告 10:49:36 root@DB-Master:~/tpcc-my ...

  4. 诺基亚远去,《惊奇UCD》带你重塑用户体验

    我所说的成功的用户体验,是指我见过或听说过大量的用户非常喜爱我为手机行业做出的那些贡献.我的职业幸福感并不取决于我的经理或CEO说了什么,而是取决于我从实际用户那里听到了什么.             ...

  5. 老电脑如果从windows7升级到windows10不断重启进不了系统,还是想用windows10,怎么办?

    先说一下我的配置:08年的acer aspire 5520g,很老的电脑,除了内存加到4g,其他都不变.官方只支持到windows7,并且官方说明该型号不在官方支持windows10之列. 之前win ...

  6. 最牛B的编码套路 - 呦呦鹿鸣 - 博客频道 - CSDN.NET

    body{ font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI& ...

  7. NOIP2014 day2 T2寻找道路

    #include<iostream> #include<cmath> #include<cstdlib> #include<cstdio> #inclu ...

  8. [TCPIP] DNS Note

    TCPIP DNS  域名系统 DNS 是一个应用于TCP/IP应用程序的分布式数据库,它提供主机名字和IP地址之间的转换及有关电子邮件的选路信息. 对DNS的访问是通过一个地址解析器来完成的,在Un ...

  9. linux中断处理原理分析

    Tasklet作为一种新机制,显然可以承担更多的优点.正好这时候SMP越来越火了,因此又在tasklet中加入了SMP机制,保证同种中断只能在一个cpu上执行.在软中断时代,显然没有这种考虑.因此同一 ...

  10. Android 进程常驻----native保活5.0以下方案推演过程以及代码

    正文: 今天继续昨天,一鼓作气,争取这个礼拜全部写完. 上一篇文章留了一个别人的github链接,他里面的native保活实现方案也是大多数公司采用的方案. 我们先来讲一下他的方案. 他是首先开启一个 ...