[go: up one dir, main page]

CN102708563B - Bubble image segmentation method based on pyramid and valley point boundary tracking - Google Patents

Bubble image segmentation method based on pyramid and valley point boundary tracking Download PDF

Info

Publication number
CN102708563B
CN102708563B CN201210109006.3A CN201210109006A CN102708563B CN 102708563 B CN102708563 B CN 102708563B CN 201210109006 A CN201210109006 A CN 201210109006A CN 102708563 B CN102708563 B CN 102708563B
Authority
CN
China
Prior art keywords
image
point
valley
boundary
bubble
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201210109006.3A
Other languages
Chinese (zh)
Other versions
CN102708563A (en
Inventor
王卫星
周洲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changan University
Original Assignee
Changan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changan University filed Critical Changan University
Priority to CN201210109006.3A priority Critical patent/CN102708563B/en
Publication of CN102708563A publication Critical patent/CN102708563A/en
Application granted granted Critical
Publication of CN102708563B publication Critical patent/CN102708563B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a bubble image segmentation method based on pyramid and valley point boundary tracking. The bubble image segmentation method based on pyramid and valley point boundary tracking includes the steps of image preprocessing, image reduction, valley point boundary scanning, endpoint detection and connection, area merging, segmentation result mapping and the like. By the method, all valley points (namely the bubble boundaries) can be detected once, an algorithm is insusceptible to white light spots in bubbles, and binary images on the valley point boundary can be directly obtained without image threshold processing.

Description

基于金字塔和谷点边界跟踪的气泡图像分割方法Bubble Image Segmentation Method Based on Pyramid and Valley Boundary Tracking

技术领域 technical field

本发明涉及图像处理,具体地说,是一种基于金字塔和谷点边界跟踪的气泡图像分割算法。The invention relates to image processing, in particular to a bubble image segmentation algorithm based on pyramid and valley point boundary tracking.

背景技术 Background technique

选矿浮选表面的气泡图像有着这样的特性:①没有背景,完全是有小大气泡组成;②由于光反射及折射的原因,一些气泡内有白色的光点,光点的大小不等;③气泡之间的边界较弱;④不规则的运动使图像模糊;⑤气泡的大小比例过大,可高达几十倍;⑥每个气泡都一个生长期,当气泡开始破灭时,气泡内开始出现黑洞,黑洞由小到大,直到使整个气泡破灭;⑦由于光照的原因或气泡厚度的急剧变化,使整个图像光照不均。类似的图像还可以在造纸厂,洗煤厂,啤酒厂及有关化工厂中获得。The bubble image on the surface of mineral processing flotation has the following characteristics: ①There is no background, it is completely composed of small and large bubbles; ②Due to light reflection and refraction, there are white light spots in some bubbles, and the size of the light spots varies; ③ The boundary between the bubbles is weak; ④ Irregular motion blurs the image; ⑤ The size ratio of the bubbles is too large, which can be as high as dozens of times; ⑥ Each bubble has a growth period. When the bubbles start to burst, the bubbles begin to appear Black holes, black holes from small to large, until the entire bubble is burst; ⑦Because of the illumination or the sharp change of the thickness of the bubble, the entire image is unevenly illuminated. Similar images can also be obtained in paper mills, coal washing plants, breweries and related chemical plants.

目前,大都采用数学型态学的方法来对图像进行分割,大概过程是:用阀值的方法找到气泡的种子点或种子面,然后进行膨胀处理来分割气泡图像。导致这种算法不成功的主要原因有:用整体阀值的算法,很难找到所有的种子点或面,因为气泡之间的白色光点的灰度差异较大;②有些气泡内并不含白色光点,也就没有种子点;③有些气泡内含有二个以上的白色光点,所以额外的种子点会将一个气泡分裂成若干个小气泡;④用彭胀的方法很容易跨过气泡间的弱边界,从而导致不准确的分割;⑤由于一幅512×152点阵的图像可包括上千个气泡,数学型态的算法使分割速度太慢,达不到实时处理的要求。At present, most of them use the method of mathematical morphology to segment the image. The general process is: use the threshold method to find the seed point or seed surface of the bubble, and then perform expansion processing to segment the bubble image. The main reasons for the failure of this algorithm are: it is difficult to find all the seed points or surfaces with the algorithm of the overall threshold value, because the gray level difference of the white light points between the bubbles is large; ② some bubbles do not contain There are no seed points; ③Some bubbles contain more than two white light points, so the extra seed points will split a bubble into several small bubbles; ④It is easy to cross the bubble by expanding the method ⑤Because a 512×152 dot matrix image may contain thousands of bubbles, the mathematical algorithm makes the segmentation speed too slow to meet the requirements of real-time processing.

发明内容 Contents of the invention

为解决无背景的气泡图像分割问题,本发明的目的在于,提供一种基于金字塔和谷点边界跟踪的气泡图像分割算法。In order to solve the problem of bubble image segmentation without background, the object of the present invention is to provide a bubble image segmentation algorithm based on pyramid and valley point boundary tracking.

为了实现上述任务,本发明采取如下的技术解决方案:In order to realize above-mentioned task, the present invention takes following technical solution:

一种基于金字塔和谷点边界跟踪的气泡图像分割方法,其特征在于,对一次性获得二值边界图像,通过以下算法获得所有气泡的闭合轮廓,具体按下列步骤进行:A bubble image segmentation method based on pyramid and valley point boundary tracking, characterized in that, for obtaining a binary boundary image at one time, the closed contours of all bubbles are obtained by the following algorithm, specifically according to the following steps:

1)输入气泡图像,进行高斯平滑,去除图像中的噪声;采用高斯滤波器直接从离散高斯分布中计算模板权值;1) Input the bubble image, perform Gaussian smoothing, and remove the noise in the image; use the Gaussian filter to directly calculate the template weight from the discrete Gaussian distribution;

2)然后去除噪声谷点,先将邻近谷点,方向较为一致的各点连起来,去掉了一些噪声或孤立的谷点;将这些短曲线找出并标号后,进行线的端点检测,在端点被检测出后,对每一端点可能的前进方向进行估算,估算的方法是将临近二点或二点以上的点进行直线拟合,同时指出其方向;2) Then remove the noise valley points, first connect the adjacent valley points and the points with relatively consistent directions, and remove some noise or isolated valley points; find out and label these short curves, and then detect the endpoints of the lines. After the endpoints are detected, estimate the possible direction of each endpoint. The estimation method is to fit the points adjacent to two or more points with a straight line, and point out its direction at the same time;

3)根据图像中的平均气泡大小确定缩小倍数,尽量保证谷点的存在;3) Determine the reduction factor according to the average bubble size in the image, and try to ensure the existence of valley points;

4)进行边界跟踪,边界的跟踪是结合谷点边界图和原始气泡图来进行的;即在边界跟踪中,首先去掉少于3个光点的线,然后进行线的端点检测;因为每个气泡是闭合区域,所以要进行端点与端点的连接,连接的原则是基于距离和方向,对于没有可能连接的端点将去掉此线;4) Carry out boundary tracking, the tracking of the boundary is carried out in combination with the valley point boundary map and the original bubble map; that is, in the boundary tracking, at first remove the line with less than 3 light points, and then perform the end point detection of the line; because each Bubbles are closed areas, so it is necessary to connect endpoints. The principle of connection is based on distance and direction. For endpoints that are not possible to connect, this line will be removed;

5)将图像中目标合并,对于多个相邻的目标物体,首先合并两个最容易合并的目标,然后按难易程度合并余下的目标;5) Merge the targets in the image. For multiple adjacent target objects, first merge the two targets that are easiest to merge, and then merge the remaining targets according to the degree of difficulty;

6)完成上述分割后,如果前面进行了图像缩小,要把图像分割结果映射到原尺寸,然后对每个边界点,检测放大邻域内是否有可以代替此点的边界点,检测的原则是使边界光滑,就可直接得到谷点边界的二值图像。6) After the above segmentation is completed, if the image has been reduced before, the image segmentation result should be mapped to the original size, and then for each boundary point, detect whether there is a boundary point that can replace this point in the enlarged neighborhood. The principle of detection is to use If the boundary is smooth, the binary image of the valley point boundary can be obtained directly.

本发明的基于金字塔和谷点边界跟踪的气泡图像分割方法,是建立在金字塔和边界跟踪的混合理论的基础之上的,是一种新的谷点边界扫描方法,该方法可以一次性检测出所有谷点(也就是气泡边界),算法不受气泡中白色光点的影响,而不用作图像阈值处理,就可以直接得到谷点边界的二值图像。主要用于金属和非金属选矿,造纸厂,洗煤厂,啤酒厂及有关化工厂基于可视化信息处理的生产自动控制中,也可以用于相关的实验室分析软件系统中。The bubble image segmentation method based on pyramid and valley point boundary tracking of the present invention is based on the hybrid theory of pyramid and boundary tracking, and is a new valley point boundary scanning method, which can detect For all valley points (that is, bubble boundaries), the algorithm is not affected by the white light points in the bubbles, and instead of being used for image threshold processing, the binary image of the valley point boundaries can be directly obtained. It is mainly used in metal and non-metal beneficiation, paper mills, coal washing plants, breweries and related chemical plants for automatic production control based on visual information processing, and can also be used in related laboratory analysis software systems.

附图说明 Description of drawings

图1是本发明的气泡图像分割算法流程图;Fig. 1 is a bubble image segmentation algorithm flow chart of the present invention;

图2是典型的浮选气泡图像的一剖面图;Fig. 2 is a sectional view of a typical flotation bubble image;

图3是图像中目标物体的合并过程;图(a)是两相邻区域合并,图(b)是多个相邻区域合并;Figure 3 is the merging process of the target object in the image; Figure (a) is the merging of two adjacent areas, and Figure (b) is the merging of multiple adjacent areas;

图4是三种不同气泡图像的分割结果,其中,图(a)是小尺寸气泡原始图像,图(b)是小尺寸气泡图像分割结果,图(c)是中等尺寸气泡原始图像,图(d)是中等尺寸气泡图像分割结果;图(e)是大尺寸气泡原始图像,(f)是大尺寸气泡图像分割结果。Figure 4 is the segmentation results of three different bubble images, in which, picture (a) is the original image of small-sized bubbles, picture (b) is the segmentation result of small-sized bubble images, picture (c) is the original image of medium-sized bubbles, and picture ( d) is the image segmentation result of medium-sized bubbles; Figure (e) is the original image of large-sized bubbles, and (f) is the segmentation result of large-sized bubbles.

以下结合附图和具体的实例对本发明作进一步的详细说明。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific examples.

具体实施方式 Detailed ways

参见图1,按照本发明的技术方案,本实施例给出一种基于金字塔和谷点边界跟踪的气泡图像分割方法,该方法对一次性获得二值边界图像,通过以下子算法准确获得所有气泡的闭合轮廓,具体按下列步骤进行:Referring to Fig. 1, according to the technical solution of the present invention, this embodiment provides a bubble image segmentation method based on pyramid and valley point boundary tracking, the method obtains binary boundary images at one time, and accurately obtains all bubbles through the following sub-algorithms The closed contour of , according to the following steps:

1)输入气泡图像,进行高斯平滑,去除图像中的噪声;1) Input the bubble image, perform Gaussian smoothing, and remove the noise in the image;

高斯平滑的原理如下:The principle of Gaussian smoothing is as follows:

二值边界图像可写成:g(x,y)=f(x,y)*h(x,y),其中h是平滑滤波器。The binary boundary image can be written as: g(x,y)=f(x,y)*h(x,y), where h is a smoothing filter.

本申请采用高斯滤波器,其函数为:This application adopts Gaussian filter, its function is:

hh == (( xx ,, ythe y ;; σσ gaussgauss )) == expexp (( -- xx 22 ++ ythe y 22 22 σσ gaussgauss 22 ))

设计高斯滤波器的一途径是直接从离散高斯分布中计算模板权值。One way to design Gaussian filters is to directly compute template weights from discrete Gaussian distributions.

为了计算方便,一般希望滤波器权值是整数。在模板的一个角点处取一个值,并选择一个K使该角点处值为1。通过这个系数可以使高斯滤波器整数化,由于整数化后的模板权值之和不等于1,为了保证图像的均匀灰度区域不受影响,必须对高斯滤波模板进行权值规范化。For the convenience of calculation, it is generally hoped that the filter weights are integers. Take a value at a corner of the template, and choose a K to make the value 1 at that corner. Through this coefficient, the Gaussian filter can be integerized. Since the sum of the template weights after integerization is not equal to 1, in order to ensure that the uniform gray area of the image is not affected, the weight of the Gaussian filter template must be normalized.

具体模板如下:The specific template is as follows:

3×3模板: 1 16 1 2 1 2 4 2 1 2 1 ; 5×5模板: 1 273 1 4 7 4 1 4 16 26 16 4 7 26 41 26 7 4 16 26 16 4 1 4 7 4 1 ; 3×3 template: 1 16 1 2 1 2 4 2 1 2 1 ; 5×5 template: 1 273 1 4 7 4 1 4 16 26 16 4 7 26 41 26 7 4 16 26 16 4 1 4 7 4 1 ;

检测出强度较弱的气泡边界,对于每一个检测点,可以检测其四个方向,看其在哪个方向上是最有可能的谷点,选择的范围大小可以是3×3邻域或5×5邻域,各点的权重与距离成反比;Detect the bubble boundary with weak strength. For each detection point, you can detect its four directions to see which direction it is the most likely valley point. The selected range size can be 3×3 neighborhood or 5× 5 neighborhood, the weight of each point is inversely proportional to the distance;

2)然后去除噪声谷点,先将邻近谷点方向较为一致的各点连起来,去掉一些噪声或孤立的谷点;将这些短曲线找出并标号后,进行线的端点检测,在端点被检测出后,对每一端点可能的前进方向进行估算,估算的方法是将邻近二点或二点以上的点进行直线拟合,同时指出其方向;2) Then remove the noise valley points, firstly connect the points adjacent to the valley points with relatively consistent directions, and remove some noise or isolated valley points; find out and label these short curves, and then perform line endpoint detection. After detection, estimate the possible forward direction of each end point. The estimation method is to fit the points adjacent to two or more points with a straight line, and point out its direction at the same time;

3)根据图像中的平均气泡大小确定缩小倍数,尽量保证谷点的存在;3) Determine the reduction factor according to the average bubble size in the image, and try to ensure the existence of valley points;

4)进行边界跟踪,边界的跟踪是结合谷点边界图和原始气泡图来进行的。在边界跟踪中,首先去掉少于3个光点的线,然后进行线的端点检测。因为每个气泡是闭合区域,所以要进行端点与端点的连接,连接的原则主要是基于距离大小和方向近似程度,对于没有可能连接的端点,将去掉此线;4) Carry out boundary tracking, the boundary tracking is carried out in combination with the valley point boundary map and the original bubble map. In boundary tracking, the lines with less than 3 light points are removed first, and then the end point detection of the lines is performed. Because each bubble is a closed area, it is necessary to connect the endpoints. The principle of connection is mainly based on the distance and direction approximation. For endpoints that are not possible to connect, this line will be removed;

5)将图像中目标合并,对于多个相邻的目标物体,首先合并两个最容易合并的目标,然后按难易程度合并余下的目标;5) Merge the targets in the image. For multiple adjacent target objects, first merge the two targets that are easiest to merge, and then merge the remaining targets according to the degree of difficulty;

6)完成上述分割后,如果前面进行了图像缩小,要把图像分割结果映射到原尺寸图像中,然后对每个边界点,检测其邻域内是否有可以代替此点的边界点,检测的原则是使边界光滑。6) After the above segmentation is completed, if the image has been reduced before, the image segmentation result should be mapped to the original size image, and then for each boundary point, detect whether there is a boundary point in its neighborhood that can replace this point. The principle of detection is to smooth the border.

按上述步骤操作,就可直接得到谷点边界的二值图像。According to the above steps, the binary image of the valley point boundary can be obtained directly.

为说明气泡图像的特性,如图2所示,图中有三个相联的气泡,三个波峰面是三个白色光点在相应的三个气泡中,而气泡之间的边界位置分别为线1,4和7。在这种情况下,经典的边界扫描算法很难被用于这种图像中,其主要原因为:①白色光点的边界强度会远远高于真正的气泡边界的强度,相比之下,气泡边界强度太弱,在通常情况下,很不明显。To illustrate the characteristics of the bubble image, as shown in Figure 2, there are three connected bubbles in the figure, the three peak surfaces are three white light spots in the corresponding three bubbles, and the boundary positions between the bubbles are lines 1, 4 and 7. In this case, the classic boundary scan algorithm is difficult to be used in this kind of image, the main reasons are: ① The boundary intensity of the white light point will be much higher than the intensity of the real bubble boundary. The strength of the bubble boundary is too weak, and under normal circumstances, it is not obvious.

为去除噪声边界,检测出强度较弱的气泡边界,本实施例子给出一种提取山谷(脊)的边界扫描算法,该算法不同于一般山谷线抽取方法,因山谷线是复杂的弯曲线,每一个气泡都有一个封闭的山谷线,而检测结果可能是多个气泡连接的复杂弯曲的山谷线。In order to remove the noise boundary and detect the weak bubble boundary, this implementation example provides a boundary scan algorithm for extracting valleys (ridges). This algorithm is different from the general valley line extraction method, because the valley line is a complex curved line, Each bubble has a closed valley line, and the detection result may be a complex curved valley line connected by multiple bubbles.

对于每一个检测点,可以检测其四个方向,看其在哪个方向上是最有可能的谷点,选择的范围大小可以是3×3邻域或5×5邻域,各点的权重与距离成反比,下面是一个3×3邻域的例子:For each detection point, its four directions can be detected to see which direction it is the most likely valley point. The size of the selected range can be 3×3 neighborhood or 5×5 neighborhood, and the weight of each point is related to The distance is inversely proportional, here is an example of a 3×3 neighborhood:

0°方向:0° direction:

ff (( ii ,, jj )) << ff (( ii -- 11 ,, jj )) &DoubleRightArrow;&DoubleRightArrow; Ff 11 ff (( ii ,, jj )) << ff (( ii ++ 11 ,, jj )) &DoubleRightArrow;&DoubleRightArrow; Ff 22 ff (( ii -- 11 ,, jj )) << [[ ff (( ii -- 22 ,, jj -- 11 )) ++ ff (( ii -- 22 ,, jj )) ++ ff (( ii -- 22 ,, jj ++ 11 )) ]] // 33 &DoubleRightArrow;&DoubleRightArrow; Ff 33 ff (( ii -- 11 ,, jj )) << [[ ff (( ii ++ 22 ,, jj -- 11 )) ++ ff (( ii ++ 22 ,, jj )) ++ ff (( ii ++ 22 ,, jj ++ 11 )) ]] // 33 &DoubleRightArrow;&DoubleRightArrow; Ff 44

45°方向:45° direction:

ff (( ii ,, jj )) << ff (( ii -- 11 ,, jj ++ 11 )) &DoubleRightArrow;&DoubleRightArrow; Ff 11 ff (( ii ,, jj )) << ff (( ii ++ 11 ,, jj -- 11 )) &DoubleRightArrow;&DoubleRightArrow; Ff 22 ff (( ii -- 11 ,, jj ++ 11 )) << [[ ff (( ii -- 22 ,, jj ++ 11 )) ++ ff (( ii -- 22 ,, jj ++ 11 )) ++ ff (( ii -- 11 ,, jj ++ 22 )) ]] // 33 &DoubleRightArrow;&DoubleRightArrow; Ff 33 ff (( ii -- 11 ,, jj -- 11 )) << [[ ff (( ii ++ 11 ,, jj -- 22 )) ++ ff (( ii ++ 22 ,, jj -- 22 )) ++ ff (( ii ++ 22 ,, jj -- 11 )) ]] // 33 &DoubleRightArrow;&DoubleRightArrow; Ff 44

90°方向:90° direction:

ff (( ii ,, jj )) << ff (( ii ,, jj -- 11 )) &DoubleRightArrow;&DoubleRightArrow; Ff 11 ff (( ii ,, jj )) << ff (( ii ,, jj ++ 11 )) &DoubleRightArrow;&DoubleRightArrow; Ff 22 ff (( ii ,, jj -- 11 )) << [[ ff (( ii -- 11 ,, jj -- 22 )) ++ ff (( ii ,, jj -- 22 )) ++ ff (( ii ++ 11 ,, jj -- 22 )) ]] // 33 &DoubleRightArrow;&DoubleRightArrow; Ff 33 ff (( ii ,, jj ++ 11 )) << [[ ff (( ii -- 11 ,, jj ++ 22 )) ++ ff (( ii ,, jj ++ 22 )) ++ ff (( ii ++ 11 ,, jj ++ 22 )) ]] // 33 &DoubleRightArrow;&DoubleRightArrow; Ff 44

135°方向:135°direction:

ff (( ii ,, jj )) << ff (( ii -- 11 ,, jj -- 11 )) &DoubleRightArrow;&DoubleRightArrow; Ff 11 ff (( ii ,, jj )) << ff (( ii ++ 11 ,, jj ++ 11 )) &DoubleRightArrow;&DoubleRightArrow; Ff 22 ff (( ii -- 11 ,, jj -- 11 )) << [[ ff (( ii -- 22 ,, jj -- 22 )) ++ ff (( ii -- 22 ,, jj -- 11 )) ++ ff (( ii -- 11 ,, jj -- 22 )) ]] // 33 &DoubleRightArrow;&DoubleRightArrow; Ff 33 ff (( ii ++ 11 ,, jj ++ 11 )) << [[ ff (( ii ++ 22 ,, jj ++ 22 )) ++ ff (( ii ++ 22 ,, jj ++ 11 )) ++ ff (( ii ++ 11 ,, jj ++ 22 )) // &DoubleRightArrow;&DoubleRightArrow; Ff 44

以135°方向为例,可以计算得到该方向上的一阀值:这里:wi(i=1,2,3,4)是权重变量,例如:可置w1=w2=12,w3=w4=0.8.Taking the direction of 135° as an example, a threshold value in this direction can be calculated: Here: w i (i=1, 2, 3, 4) is a weight variable, for example: w 1 =w 2 =12, w 3 =w 4 =0.8.

同理得到:T0,T45,T90.比较四个阀值,选出最大的一个,记录其方向。当这些谷点被记录后,从图片中看到,结果图像中存在着许多噪声谷点,为去掉这些噪声谷点,采取了如下措施:In the same way: T 0 , T 45 , T 90 . Compare the four thresholds, select the largest one, and record its direction. After these valley points are recorded, we can see from the picture that there are many noise valley points in the resulting image. In order to remove these noise valley points, the following measures are taken:

先将邻近谷点,方向较为一致的各点连起来,这样就去掉了一些噪声或孤立的谷点。将这些短曲线找出并标号后,进行线的端点检测,在端点被检测出后,对每一端点可能的前进方向进行估算,估算的方法是将邻近二点或二点以上的点进行直线拟合,同时指出其方向。First connect the adjacent valley points with relatively consistent directions, so as to remove some noise or isolated valley points. After these short curves are found and labeled, the end point detection of the line is carried out. After the end point is detected, the possible direction of progress of each end point is estimated. fit and point out its direction.

为减少边界检测的工作量,去除非边界点的干扰,将图像缩小2n倍(n=1,2,3),当图像中平均气泡面积大于80个光点和小于200光点时,缩小图像一倍,当图像中平均气泡面积大于200个光点时,缩小图二倍。缩小图像的目的是尽量保证谷点的存在,所以由原图缩小一倍时,在相邻四个点中,选择最小灰度点作为新的图像点。In order to reduce the workload of boundary detection and remove the interference of non-boundary points, the image is reduced by 2 n times (n=1, 2, 3). When the average bubble area in the image is greater than 80 light points and less than 200 light points, the reduction The image is doubled, and when the average bubble area in the image is greater than 200 light spots, the image is reduced twice. The purpose of shrinking the image is to ensure the existence of valley points as much as possible, so when the original image is doubled, among the four adjacent points, select the minimum gray point as the new image point.

剩下的工作是进行边界跟踪,边界的跟踪是结合谷点边界图像和原始气泡图像来进行的。在边界跟踪中,首先去掉少于3个光点的线,然后进行线的端点检测。因为每个气泡是闭合区域,所以要进行端点与端点的连接,连接的原则主要是基于距离和方向,对于没有可能连接的端点将去掉此线(注意图像中没有背景这一条件)。The remaining work is to track the boundary, which is carried out by combining the valley point boundary image and the original bubble image. In boundary tracking, the lines with less than 3 light points are removed first, and then the end point detection of the lines is performed. Because each bubble is a closed area, it is necessary to connect endpoints. The principle of connection is mainly based on distance and direction. For endpoints that are not possible to connect, this line will be removed (note the condition that there is no background in the image).

由于气泡中的黑洞常常使图像过份分割,所以要有图像中目标合并的过程如图3所示,两个相邻的目标有一个较长的公共边界d,而两目标物体的玄长分别为l1和l2。如果R=d/min(l1,l2)大于阈值T4,则两目标物体合并。这里T4是根据气泡形状确定,一般为T4=0.6左右。对于多个相邻的目标物体,首先合并两个最容易合并的目标,然后按难易程度合并余下的目标。Because the black holes in the bubbles often make the image over-segmented, there must be a process of merging objects in the image, as shown in Figure 3. Two adjacent objects have a long common boundary d, and the lengths of the two objects are respectively for l 1 and l 2 . If R=d/min(l 1 , l 2 ) is greater than the threshold T 4 , the two target objects are merged. Here T4 is determined according to the shape of the bubbles, and is generally about T 4 =0.6. For multiple adjacent target objects, first combine the two targets that are easiest to combine, and then combine the remaining targets according to the degree of difficulty.

完成上述分割后,如果前面进行了图像缩小,还要把图像分割结果映射到原尺寸图像中。映射不是直接放大,而是首先将分割图像放大到原始图像的尺寸,然后对每个边界点,检测其3(放大一倍)或5(放大2倍)邻域内是否有可以代替此点的边界点,检测的原则要使边界光滑。After the above segmentation is completed, if the image has been reduced before, the image segmentation result must be mapped to the original size image. The mapping is not directly enlarged, but firstly enlarges the segmented image to the size of the original image, and then for each boundary point, detects whether there is a boundary that can replace this point in its 3 (enlarged) or 5 (enlarged by 2) neighborhood Point, the principle of detection is to make the boundary smooth.

图4中列举了三种不同尺度气泡的图像及其分割结果,图4(a)是平均气泡尺寸较小的气泡原始图像,图像中包含几个中等尺寸的气泡。图像分割中,直接作用在原灰度图像上,没有进行图像缩小,分割结果如图4(b)所示。图4(c)是中等尺度的气泡,图像被缩小了一倍后,然后进行图像分割,分割结果如图4(d)所示。图4(e)中几乎全是大尺度的气泡,所以图像被缩小二倍后才进行图像分割,最后进行分割结果映射,得到最终分割结果如图4(f)所示。Figure 4 lists the images of bubbles of three different scales and their segmentation results. Figure 4(a) is the original image of bubbles with a small average bubble size, and the image contains several medium-sized bubbles. In image segmentation, it directly acts on the original grayscale image without image reduction, and the segmentation result is shown in Figure 4(b). Figure 4(c) is a medium-scale bubble. After the image is doubled, the image is segmented, and the segmentation result is shown in Figure 4(d). Figure 4(e) is almost full of large-scale bubbles, so the image is segmented after the image is doubled, and finally the segmentation result is mapped, and the final segmentation result is shown in Figure 4(f).

Claims (1)

1.一种基于金字塔和谷点边界跟踪的气泡图像分割方法,其特征在于,对一次性获得二值边界图像,通过以下算法获得所有气泡的闭合轮廓,具体按下列步骤进行:1. A bubble image segmentation method based on pyramid and valley point boundary tracking, it is characterized in that, obtain binary boundary image once, obtain the closed outline of all bubbles by following algorithm, specifically carry out as follows: 1)输入气泡图像,进行高斯平滑,去除图像中的噪声;采用高斯滤波器直接从离散高斯分布中计算模板权值;1) Input the bubble image, perform Gaussian smoothing, and remove the noise in the image; use the Gaussian filter to directly calculate the template weight from the discrete Gaussian distribution; 具体模板如下:The specific template is as follows: 3×3模板: 1 16 1 2 1 2 4 2 1 2 1 ; 5×5模板: 1 273 1 4 7 4 1 4 16 26 16 4 7 26 41 26 7 4 16 26 16 4 1 4 7 4 1 ; 3×3 template: 1 16 1 2 1 2 4 2 1 2 1 ; 5×5 template: 1 273 1 4 7 4 1 4 16 26 16 4 7 26 41 26 7 4 16 26 16 4 1 4 7 4 1 ; 2)然后去除噪声谷点:对于每一个检测点,可以检测其四个方向,看其在哪个方向上是最有可能的谷点,选择的范围大小可以是3×3邻域或5×5邻域,各点的权重与距离成反比,可以计算得到每一个方向上的阈值,比较四个阈值,选出最大的一个,记录其方向;当这些谷点被记录后,气泡图像中存在着许多噪声谷点,为去掉这些噪声谷点,先将临近谷点方向较为一致的各点连接起来,这样就去掉了一些噪声或孤立的谷点;将这些短曲线找出并标号后,进行线的端点检测,在端点被检测出后,对每一端点可能的前进方向进行估算,估算的方法是将邻近二点或二点以上的点进行直线拟合,同时指出其方向;2) Then remove the noise valley point: For each detection point, you can detect its four directions to see which direction it is the most likely valley point. The selected range size can be 3×3 neighborhood or 5×5 Neighborhood, the weight of each point is inversely proportional to the distance, you can calculate the threshold in each direction, compare the four thresholds, select the largest one, and record its direction; when these valley points are recorded, there are bubbles in the bubble image There are many noise valley points. In order to remove these noise valley points, first connect the points that are close to the valley points in the same direction, so as to remove some noise or isolated valley points; after finding and labeling these short curves, line After the endpoint is detected, the possible direction of each endpoint is estimated. The estimation method is to fit a straight line to the points adjacent to two or more points, and point out its direction at the same time; 3)根据图像中的平均气泡大小确定缩小倍数,尽量保证谷点的存在;3) Determine the reduction factor according to the average bubble size in the image, and try to ensure the existence of valley points; 4)进行边界跟踪,边界的跟踪是结合谷点边界图和原始气泡图来进行的,即在边界跟踪中,首先去掉少于3个光点的线,然后进行线的端点检测,因为每个气泡是闭合区域,所以要进行端点与端点的连接,连接的原则是基于距离长度和方向近似程度,对于没有可能连接的端点,将去掉此线;4) Carry out boundary tracking, the boundary tracking is carried out in combination with the valley point boundary map and the original bubble map, that is, in the boundary tracking, first remove the line with less than 3 light points, and then perform the end point detection of the line, because each The bubble is a closed area, so it is necessary to connect the endpoints. The principle of the connection is based on the distance length and the approximate degree of the direction. For the endpoints that cannot be connected, this line will be removed; 5)将图像中目标合并,对于多个相邻的目标物体,首先合并两个最容易合并的目标,然后按难易程度合并余下的目标;5) Merge the targets in the image. For multiple adjacent target objects, first merge the two targets that are easiest to merge, and then merge the remaining targets according to the degree of difficulty; 6)完成上述分割后,如果前面进行了图像缩小,要把图像分割结果映射到原尺寸的图像中,然后在原始图像中,对每个边界点检测其邻域内是否有可以代替此点的边界点,检测的原则是使边界光滑,即直接得到谷点边界的二值图像。6) After the above segmentation is completed, if the image is reduced before, the image segmentation result should be mapped to the original image, and then in the original image, check whether there is a boundary that can replace this point in the neighborhood of each boundary point point, the principle of detection is to make the boundary smooth, that is, to directly obtain the binary image of the valley point boundary.
CN201210109006.3A 2012-04-13 2012-04-13 Bubble image segmentation method based on pyramid and valley point boundary tracking Expired - Fee Related CN102708563B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210109006.3A CN102708563B (en) 2012-04-13 2012-04-13 Bubble image segmentation method based on pyramid and valley point boundary tracking

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210109006.3A CN102708563B (en) 2012-04-13 2012-04-13 Bubble image segmentation method based on pyramid and valley point boundary tracking

Publications (2)

Publication Number Publication Date
CN102708563A CN102708563A (en) 2012-10-03
CN102708563B true CN102708563B (en) 2015-05-20

Family

ID=46901283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210109006.3A Expired - Fee Related CN102708563B (en) 2012-04-13 2012-04-13 Bubble image segmentation method based on pyramid and valley point boundary tracking

Country Status (1)

Country Link
CN (1) CN102708563B (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101276411B (en) * 2008-05-12 2010-06-02 北京理工大学 Fingerprint identification method
CN101742052A (en) * 2009-12-02 2010-06-16 北京中星微电子有限公司 Method and device for suppressing pseudo color based on edge detection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《A Robust Bubble Delineation Algorithm for Froth Image》》;Weixing Wang et al;《Proceedings of the Second International Conference》;19990731;第1卷;第471-476页 *
《Froth delineation based on image classification》;W.Wang et al;《Minerals Engineering》;20031130;第16卷(第11期);第 1183-1192页 *

Also Published As

Publication number Publication date
CN102708563A (en) 2012-10-03

Similar Documents

Publication Publication Date Title
CN103048329B (en) A kind of road surface crack detection method based on active contour model
CN101901477B (en) Method and system for extracting field image edges of plant leaves
CN103839268B (en) Method for detecting fissure on surface of subway tunnel
CN102324099B (en) Step edge detection method oriented to humanoid robot
CN103364410B (en) A method for detecting underwater surface cracks of hydraulic concrete structures based on template search
CN106093066A (en) A kind of magnetic tile surface defect detection method based on the machine vision attention mechanism improved
CN101256157A (en) Surface defect detection method and device
CN103198479B (en) SAR image segmentation method based on semantic information classification
CN105740829A (en) Scanning line processing based automatic reading method for pointer instrument
Ni et al. Automatic detection and counting of circular shaped overlapped objects using circular hough transform and contour detection
CN105488492A (en) Color image preprocessing method, road identification method and related device
CN108460780A (en) A kind of adhesion grain of rice image partition method based on background framework characteristic
CN103761743A (en) Solid wood floor surface defect detecting method based on image fusion and division
CN106709524A (en) Component symbol detection and identification method in electrical engineering drawing
CN101995412B (en) Robust glass scratch defect detection method and device thereof
CN106097368A (en) A kind of recognition methods in veneer crack
CN107516315B (en) A method for monitoring slag discharge of roadheader based on machine vision
Mahmoud et al. Segmentation of skin cancer images based on gradient vector flow (GVF) snake
CN105335688A (en) Identification method of airplane model on the basis of visual image
CN103914829A (en) Method for detecting edge of noisy image
CN106372593B (en) Optic disk area positioning method based on vascular convergence
CN102313740B (en) Solar panel crack detection method
CN105354823A (en) Tree-ring image edge extraction and segmentation system
CN102708563B (en) Bubble image segmentation method based on pyramid and valley point boundary tracking
Liu et al. Automated rivet detection in the EOL image for aircraft lap joints inspection

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Wang Weixing

Inventor after: Zhou Zhou

Inventor after: Yang Nan

Inventor after: Wang Shanshan

Inventor after: Zhang Yuanfang

Inventor after: Zhao Weisen

Inventor after: Huang Xiaojun

Inventor after: Huang Lingxiao

Inventor after: Zhang Tingting

Inventor before: Wang Weixing

Inventor before: Zhou Zhou

COR Change of bibliographic data
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150520

Termination date: 20170413

CF01 Termination of patent right due to non-payment of annual fee