图像分割 - 分割和合并(四叉树) [英] Image segmentation - Split and Merge (Quadtrees)

查看:1096
本文介绍了图像分割 - 分割和合并(四叉树)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有分割的实现和合并图像分割方法?
任何意见,将不胜感激。

Is there an implementation for the split and merge method of image segmentation? any advice would be much appreciated.

推荐答案

什么分割是什么?

分割意味着你的图像分割成若干连接区域。基本上,你可以做分割与区域的两个定义:可以定义一个区域为一组连接的相似像素或一组由不连续(边)连接包围像素。 。拆分和合并使用第一种方法

Segmentation means division of your image into several connected regions. Basically, you could do segmentation with two definitions of region: you could define a region as a group of connected similar pixels, or a set of connected pixels surrounded by discontinuities (edges). Split and merge uses the first approach.

从数学上说:如果你的整个图像是由一组像素(称为R)为代表的,比你想得子集等为

Mathematically speaking: if your whole image is represented by the set of pixels (called R), than you would like to get subsets such as


  1. 分割完成,因此所有的次区域总结整个R.联盟各地区为R 1 UR 2 U.。UR <子> N = R。

  2. 研究<子> I 连接。

  3. 地区是不同的。 - [R I 及泳帽; R Ĵ =空;因为我和NE;Ĵ

  4. 地区也有类似的性质。这可能是由一个称为均一标准(P)的函数来表示。它应该给TRUE对于给定区域的成员,FALSE为所有其他地区。

  5. 邻居区域不能被合并。对于所有区域P(R I UR <子>Ĵ)= FALSE鉴于我与NE J。

  1. Segmentation is complete, so all subregions sum up to the whole R. Union of all regions is R1 U R2 U ... U Rn = R.
  2. Ri is connected.
  3. Regions are distinct. Ri∩Rj=∅ given that i≠j
  4. Regions have similar properties. This could be expressed by a function called the homogenity criterion (P). It should give TRUE for the members of the given region, and FALSE for all the other regions.
  5. Neighbor regions cannot been merged. For all regions P(Ri U Rj)=FALSE given that i≠j.

什么分割和合并算法是什么?

因此,首先我们要选择一个均一的标准。一个均匀性标准可以是全球性的(取决于整个地区)或本地(取决于该地区的一个小窗口,如果这是真的所有窗口,比它的真正的区域)。一个简单的例子可以是从平均的偏差应小于阈值。 &FORALL; P I &ISIN; R I :| P I -μ|&乐; F *σ

So first, we have to choose a homogenity criterion. A homogenity criterion could be global (depending on the whole region) or local (depending on a small window of the region, and if it's true for all windows, than it's true for the region). A simple example could be the deviation from average should be smaller than a threshold. ∀pi∈Ri: |pi-μ|≤f*σ.

分割和合并算法有两个阶段:分割和合并阶段。
在分割阶段,我们递归分割区域并入四个次区域(从整个图像为一体的区域),直到我们的均匀性标准在所有次区域得到满足。很容易看出,分割的1-4条件得到满足。我们继续以满足5 状态合并的一步。

The split and merge algorithm have two phases: the split, and the merge phase. In the split phase we recursively split regions into four subregions (starting with the whole image as one region) until our homogenity criterion is met in all subregions. It's easy to see that the 1-4 conditions of segmentation are met. We proceed to merge step in order to satisfy the 5th condition.

在合并步骤,我们检查使P(R UR <子>Ĵ)= TRUE对于每两个相邻地区,这两个地区合并。我们重复这个步骤,直到没有更多的改变是必要的。现在,我们符合所有条件,我们有我们的图像分割成子区域。

In the merge step we check that P(Ri U Rj)=TRUE for each two neighbor regions, and merge the two regions. We repeat this step until no more changes are necessary. Now we met all the conditions, we had our image segmented into subregions.

伪代码

下面是拆分和合并算法的伪代码:

Here is a pseudocode to split and merge algorithm:


  1. 初始化:我们只有一个大的区域(整个图像)

  2. 分割:若P(R I )= TRUE进行下一步。否则细分 - [R I 到四个次区域并对其进行第2步

  3. 合并:如果R I 和R Ĵ 是邻居和P(R I UR <子>Ĵ)= TRUE,合并两个区域,不是重复步骤3。如果没有这样的地区,我们已完成

  1. Init: we have only one big region (the whole image).
  2. Split: If P(Ri)=TRUE proceed to next step. Otherwise subdivide Ri to four subregions and perform step 2 on them.
  3. Merge: If Ri and Rj are neighbors and P(Ri U Rj) = TRUE, merge the two regions, than repeat step 3. If there are no such regions we are finished.

这篇关于图像分割 - 分割和合并(四叉树)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆