CN105427307B - A kind of image partition method of cube Granule Computing - Google Patents
A kind of image partition method of cube Granule Computing Download PDFInfo
- Publication number
- CN105427307B CN105427307B CN201510807832.9A CN201510807832A CN105427307B CN 105427307 B CN105427307 B CN 105427307B CN 201510807832 A CN201510807832 A CN 201510807832A CN 105427307 B CN105427307 B CN 105427307B
- Authority
- CN
- China
- Prior art keywords
- cube
- grain
- cube grain
- rgb
- template
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 239000008187 granular material Substances 0.000 title claims abstract description 11
- 238000005192 partition Methods 0.000 title claims 3
- 230000011218 segmentation Effects 0.000 claims abstract description 27
- 238000003709 image segmentation Methods 0.000 claims abstract description 20
- 238000000605 extraction Methods 0.000 claims 5
- 238000004364 calculation method Methods 0.000 abstract description 6
- 239000002245 particle Substances 0.000 description 16
- 235000019580 granularity Nutrition 0.000 description 13
- 238000002474 experimental method Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20112—Image segmentation details
Landscapes
- Color Image Communication Systems (AREA)
- Image Analysis (AREA)
Abstract
本发明涉及立方体粒计算的图像分割方法,可有效解决图像分割速度慢,效果差的问题,其解决的技术方案是,首先提取彩色待分割图像的像素点RGB值,再根据待分割彩色图像的RGB值,构造原子立方体粒集,构建立方体粒之间的合并算子和立方体粒模板,将待分割图像每个像素点的RGB值表示为立方体粒,并将其与立方体粒模板进行匹配,并确定分割后图像每个像素点的RGB值,最后保存分割彩色图像,从而实现立方体粒计算的图像分割。本发明方法分割速度快,效果好,使分割结果更符合人的视觉,是彩色图像分割方法上的创新,具有很强的实际应用价值。
The invention relates to an image segmentation method for cube grain calculation, which can effectively solve the problems of slow image segmentation speed and poor effect. The technical solution is to first extract the RGB values of the pixels of the color image to be segmented, and then according to the color image to be segmented RGB value, construct the atomic cube grain set, construct the merge operator and the cube grain template between the cube grains, express the RGB value of each pixel of the image to be segmented as a cube grain, and match it with the cube grain template, and Determine the RGB value of each pixel of the segmented image, and finally save the segmented color image, so as to realize the image segmentation of cube granule calculation. The method of the invention has fast segmentation speed and good effect, makes the segmentation result more in line with human vision, is an innovation in the color image segmentation method, and has strong practical application value.
Description
技术领域technical field
本发明涉及图像处理,特别是一种立方体粒计算的图像分割方法。The invention relates to image processing, in particular to an image segmentation method for cube granule calculation.
背景技术Background technique
图像分割是数字图像处理和计算机视觉领域中的一个核心问题,也是图像理解与分析的重要研究方向,它的目的是将图像中人们比较感兴趣的区域与其他区域分离开来,这些区域是相互不相交的,每个区域都满足特定区域的一致性。研究人员针对图像分割进行了大量的研究,提出了许多方法,阈值分割技术、微分算子边缘检测、区域增长技术和聚类分割技术等许多方法,但由于技术上存在的问题,分割速度慢,效果差,不能满足图像处理中的实际需要,因此,其改进和创新势在必行。Image segmentation is a core issue in the field of digital image processing and computer vision, and it is also an important research direction of image understanding and analysis. Its purpose is to separate the areas that people are more interested in in the image from other areas. Disjoint, each region satisfies the region-specific consistency. Researchers have done a lot of research on image segmentation and proposed many methods, such as threshold segmentation technology, differential operator edge detection, region growth technology and clustering segmentation technology. However, due to technical problems, the segmentation speed is slow, The effect is poor and cannot meet the actual needs in image processing, so its improvement and innovation are imperative.
发明内容Contents of the invention
针对上述情况,为克服现有技术之缺陷,本发明之目的就是提供一种立方体粒计算的图像分割方法,可有效解决图像分割速度慢,效果差的问题。In view of the above situation, in order to overcome the defects of the prior art, the object of the present invention is to provide an image segmentation method based on cube granule calculation, which can effectively solve the problems of slow image segmentation speed and poor effect.
本发明解决的技术方案是,首先提取彩色待分割图像的像素点RGB值,再根据待分割彩色图像的RGB值,构造原子立方体粒集,构建立方体粒之间的合并算子和立方体粒模板,将待分割图像每个像素点的RGB值表示为立方体粒,并将其与立方体粒模板进行匹配,并确定分割后图像每个像素点的RGB值,最后保存分割彩色图像,从而实现立方体粒计算的图像分割。The technical scheme solved by the present invention is to first extract the pixel point RGB value of the color image to be segmented, and then according to the RGB value of the color image to be segmented, construct an atomic cube grain set, construct a merge operator and a cube grain template between cube grains, The RGB value of each pixel of the image to be segmented is expressed as a cube grain, and it is matched with the cube grain template, and the RGB value of each pixel of the segmented image is determined, and finally the segmented color image is saved to realize the cube grain calculation image segmentation.
本发明方法分割速度快,效果好,使分割结果更符合人的视觉,是彩色图像分割方法上的创新,具有很强的实际应用价值。The method of the invention has fast segmentation speed and good effect, makes the segmentation result more in line with human vision, is an innovation in the color image segmentation method, and has strong practical application value.
附图说明Description of drawings
图1为本发明的流程框示图。Fig. 1 is a flowchart block diagram of the present invention.
图2为本发明两立方体粒之间的合并结果图。Fig. 2 is a diagram of the result of merging between two cube grains of the present invention.
图3为本发明的分割后的图像。Fig. 3 is a segmented image of the present invention.
具体实施方式Detailed ways
以下结合附图和具体情况对本发明的具体实施方式做详细说明。The specific implementation manners of the present invention will be described in detail below in conjunction with the accompanying drawings and specific conditions.
由图1所示,本发明在具体实施时包括以下步骤:Shown in Figure 1, the present invention comprises the following steps when concrete implementation:
(1)、提取彩色待分割图像的像素点RGB值:(1), extract the pixel RGB value of the color image to be segmented:
提取彩色待分割图像的像素点RGB值,R为红色值,G为绿色值,B为蓝色值,(i,j)为像素点的坐标,色彩是由R、G、B组成,R、G、B的取值范围为[0,255];Extract the pixel RGB value of the color image to be segmented, R is the red value, G is the green value, B is the blue value, (i, j) is the coordinate of the pixel point, the color is composed of R, G, B, R, The value range of G and B is [0,255];
(2)、根据待分割彩色图像的RGB值,构造原子立方体粒集:(2), according to the RGB value of the color image to be segmented, construct the atomic cube particle set:
将待分割彩色图像每个像素点的RGB值表示为立方体粒,立方体粒具有g=(C,r)的形式,其中C=(R,G,B)为立方体粒的中心,r为立方体粒的边长,表示立方体粒的大小,称为立方体粒的粒度;当r=0时,立方体粒最小且不能再分割,称为原子立方体粒,对高为N1、宽为N2的图像,其像素数为N=N1×N2,构造由N个立方体粒构成的粒集GS,像素点的坐标(i,j)对应的粒集为第N1×(j-1)+1个立方体粒;The RGB value of each pixel of the color image to be segmented is expressed as a cube grain, and the cube grain has the form of g=(C, r), where C=(R, G, B) is the center of the cube grain, and r is the cube grain The side length of the cube represents the size of the cube, which is called the granularity of the cube; when r=0, the cube is the smallest and cannot be divided, which is called an atomic cube. For an image with a height of N1 and a width of N2, its pixel The number is N=N1×N2, and the grain set GS composed of N cubic grains is constructed, and the grain set corresponding to the coordinates (i, j) of the pixel point is N 1 ×(j-1)+1 cubic grains;
(3)、构建立方体粒之间的合并算子和立方体粒模板,方法是:(3), construct the merging operator and the cube-grain template between the cube-grains, the method is:
两立方体粒g1=(C1,r1),其中C1=(R1,G1,B1)为g1的中心,r1为g1的粒度,g2=(C2,r2),其中C2=(R2,G2,B2)为g2的中心,r2为g2的粒度,合并立方体粒的中心和粒度,由g1和g2的中心,根据式1、式2、式3,计算立方体粒的中心(Ru,Gu,Bu):Two cubic particles g 1 =(C1,r1), where C1=(R 1 ,G 1 ,B 1 ) is the center of g1, r1 is the particle size of g1, g 2 =(C2,r2), where C2=(R 2 , G 2 , B 2 ) is the center of g2, r2 is the granularity of g2, and the center and granularity of the cubic grain are combined, and the center of the cubic grain is calculated from the centers of g1 and g2 according to formula 1, formula 2 and formula 3 ( Ru,Gu,Bu):
Ru=0.5(max{R1+0.5r1,R2+0.5r2}+min{R1-0.5r1,R2-0.5r2}) 式1Ru=0.5(max{R1+0.5r1, R2+0.5r2}+min{R1-0.5r1, R2-0.5r2}) Formula 1
Gu=0.5(max{G1+0.5r1,G2+0.5r2}+min{G1-0.5r1,G2-0.5r2}) 式2Gu=0.5(max{G1+0.5r1, G2+0.5r2}+min{G1-0.5r1, G2-0.5r2}) Formula 2
Bu=0.5(max{B1+0.5r1,B2+0.5r2}+min{B1-0.5r1,B2-0.5r2}) 式3Bu=0.5(max{B1+0.5r1, B2+0.5r2}+min{B1-0.5r1, B2-0.5r2}) Formula 3
由g1和g2的中心和粒度,根据式4,合并立方体粒的中心,ru为合并立方体粒的粒度:From the center and particle size of g1 and g2, according to formula 4, the center of the combined cube grain, ru is the granularity of the combined cube grain:
gu=g1∨g2=(Cu,ru) 式4;gu=g 1 ∨ g 2 =(Cu,ru) Formula 4;
其中Cu=(Ru,Gu,Bu)为合并立方体粒的中心;Wherein Cu=(Ru, Gu, Bu) is the center of the merged cube grain;
根据下式:According to the following formula:
ru=max{max{R1+0.5r1,R2+0.5r2}-min{R1-0.5r1,R2-0.5r2},max{G1+0.5r1,G2+0.5r2}-min{G1-0.5r1,G2-0.5r2},max{B1+0.5r1,B2+0.5r2}-min{B1-0.5r1,B2-0.5r2}} 式5ru=max{max{R1+0.5r1, R2+0.5r2}-min{R1-0.5r1, R2-0.5r2}, max{G1+0.5r1, G2+0.5r2}-min{G1-0.5r1, G2-0.5r2}, max{B1+0.5r1, B2+0.5r2}-min{B1-0.5r1, B2-0.5r2}} Formula 5
得到合并立方体粒;Get the merged cube grain;
设置粒度阈值ρ,构建立方体粒模板,该模板是一个集合,用GB表示,立方体粒模板中的立方体粒用gb=(Cb,rb)表示,其中Cb=(Rb,Gb,Bb)为模板立方体粒的中心,rb为模板立方体粒的粒度;将立方体粒集GS第一个立方体粒加入立方体粒模板中,并在立方体粒集GS删去第一个立方体粒,同样用式1至式5计算立方体粒集GS中的所有立方体粒与立方体粒模板GB中所有立方体粒之间的合并立方体粒gu;当立方体粒gu的粒度小于或等于粒度阈值ρ时,gb=gu,并且在立方体粒集GS中删去参与合并的立方体粒,当立方体粒gu的粒度大于粒度阈值ρ时,选取立方体粒集GS的第一个立方体粒加入立方体粒模板GB,并且在立方体粒集GS中删去第一个立方体粒,直到立方体粒集GS中所有的立方体粒全部被删去,这样立方体粒模板GB中的元素不断增加,而立方体粒集GS中的元素不断减少直至为空集,即构造了含有n个立方体粒的立方体粒模板GB={gb1,gb2,...,gbn);Set the particle size threshold ρ to build a cube-grain template, which is a set, represented by GB, and the cube-grain template in the cube-grain template is represented by gb=(Cb,rb), where Cb=(Rb,Gb,Bb) is the template cube is the center of the cube grain, and rb is the grain size of the template cube grain; add the first cube grain of the cube grain set GS to the cube grain template, and delete the first cube grain in the cube grain set GS, and use formula 1 to formula 5 to calculate The merged cube grain gu between all the cube grains in the cube grain set GS and all the cube grains in the cube grain template GB; when the grain size of the cube grain gu is less than or equal to the grain size threshold ρ, gb=gu, and in the cube grain set GS delete the cube grains participating in the merger, when the grain size of the cube grain gu is greater than the grain size threshold ρ, select the first cube grain in the cube grain set GS to join the cube grain template GB, and delete the first cube grain in the cube grain set GS Cube grains, until all the cube grains in the cube grain set GS are deleted, so that the elements in the cube grain template GB continue to increase, while the elements in the cube grain set GS continue to decrease until it is an empty set, that is, a structure containing n The cube-grain template GB of the cube-grain={gb1,gb2,...,gbn);
(4)、将待分割图像每个像素点的RGB值表示为立方体粒集GS,并将其与立方体粒模板进行匹配,匹配公式为:(4) Express the RGB value of each pixel of the image to be segmented as a cube grain set GS, and match it with the cube grain template. The matching formula is:
D(i,j)=max{|Rj-Rbi|,|Gj-Gbi|,|Bj-Bbi|} 式6D(i,j)=max{|Rj-Rbi|,|Gj-Gbi|,|Bj-Bbi|} Formula 6
其中(Rbi,Gbi,Bbi)立方体粒模板中第i个立方体粒的中心,(Rj,Gj,Bj)为立方体粒集GS第j个立方体粒的中心;Wherein (Rbi, Gbi, Bbi) is the center of the ith cube grain in the cube grain template, (Rj, Gj, Bj) is the center of the jth cube grain in the cube grain set GS;
根据式6计算立方体粒集GS第j个立方体粒与立方体粒模板GB第i个立方体粒之间的距离;Calculate the distance between the jth cube grain of the cube grain set GS and the ith cube grain of the cube grain template GB according to formula 6;
(5)、确定待分割彩色图像像素点分割后的RGB值:(5), determine the RGB value after the pixel point of the color image to be divided is divided:
根据待分割图像像素点的RGB值对应的立方体粒gj与立方体粒模板GB立方体粒gbi之间的距离D(i,j),找出最小的距离所对应的立方体粒模板中的立方体粒的编号id=argminD(i,j),其中1<i<n,立方体粒模板中第id个立方体粒的中心即为该像素点分割后的RGB值;According to the distance D(i, j) between the cube grain gj corresponding to the RGB value of the image pixel to be segmented and the cube grain template GB cube grain gbi, find the number of the cube grain in the cube grain template corresponding to the minimum distance id=argminD(i, j), wherein 1<i<n, the center of the id cube grain in the cube grain template is the RGB value after the pixel point division;
(6)、保存分割彩色图像,将分割后的彩色图像以JPG格式保存到计算机相应的文件夹中,从而实现立方体粒计算的图像分割。(6) Save the segmented color image, save the segmented color image in the corresponding folder of the computer in JPG format, so as to realize the image segmentation of cube grain calculation.
本发明在具体实施中,还可由以下实施例给出。The present invention can also be provided by the following examples in the specific implementation.
第一步、提取待分割彩色图像像素点的RGB值,3×4的彩色图像,其像素点(2,1)的RGB值为(10,13,34);The first step is to extract the RGB value of the pixel point of the color image to be segmented, for a 3×4 color image, the RGB value of the pixel point (2,1) is (10,13,34);
第二步、根据待分割彩色图像的RGB值,构造立方体粒集,将RGB值表示为原子立方体粒,其立方体粒集为GS={g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12},其中The second step is to construct a cube grain set according to the RGB values of the color image to be segmented, express the RGB value as an atomic cube grain, and its cube grain set is GS={g 1 ,g 2 ,g 3 ,g 4 ,g 5 , g 6 , g 7 , g 8 , g 9 , g 10 , g 11 , g 12 }, where
g1=(0,0,0,0), g2=(10,13,34,0), g3=(35,20,15,0), g4=(21,38,12,0),g 1 =(0,0,0,0), g 2 =(10,13,34,0), g 3 =(35,20,15,0), g 4 =(21,38,12,0 ),
g5=(151,151,155,0) g6=(101,155,98,0) g7=(155,100,95,0) g8=(102,99,155,0)g 5 =(151,151,155,0) g 6 =(101,155,98,0) g 7 =(155,100,95,0) g 8 =(102,99,155,0)
g9=(255,198,197,0) g10=(195,199,255,0) g11=(199,255,200,0) g12=(255,255,255,0)g 9 =(255,198,197,0) g 10 =(195,199,255,0) g 11 =(199,255,200,0) g 12 =(255,255,255,0)
第三步、合并立方体粒,构造立方体粒模板,两立方体粒g1=(0,0,0,0)和g2=(10,13,34,0),通过式1、式2、式3、式4和式5,计算合并立方体粒为gu=g1∨g2=(5,6.5,17,34),合并结果见图2;The third step is to combine the cube grains to construct the cube grain template. The two cube grains g 1 =(0,0,0,0) and g 2 =(10,13,34,0), through formula 1, formula 2, formula 3. For formula 4 and formula 5, the combined cube grains are calculated as gu=g 1 ∨ g 2 =(5,6.5,17,34), and the combined results are shown in Figure 2;
设置粒度阈值ρ,构造立方体粒模板,将立方体粒集GS第一个立方体粒加入立方体粒模板GB中,删去粒集GS的第一个立方体粒,第二个立方体粒成为第一个立方体粒,将第一个立方体粒分别于立方体粒模板GB中的立方体粒合并,当合并立方体粒的粒度小于或等于ρ时,合并立方体粒代替立方体粒模板GB的立方体粒。重复这一过程,直至GS不含任何立方体粒,设粒度阈值为ρ=200,以3×4彩色图像说明立方体粒模板的生成过程:Set the granularity threshold ρ, construct a cube-grain template, add the first cube-grain of the cube-grain set GS to the cube-grain template GB, delete the first cube-grain of the granule-set GS, and the second cube-grain becomes the first cube-grain , merge the first cube grain with the cube grains in the cube grain template GB respectively, when the size of the combined cube grain is less than or equal to ρ, the merged cube grain replaces the cube grain of the cube grain template GB. Repeat this process until GS does not contain any cube grains, set the grain size threshold as ρ = 200, and use a 3×4 color image to illustrate the generation process of the cube grain template:
RGB形成的立方体粒集为GS={g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12},首先将g1加入立方体粒模板GB中,从GS中删去g1,立方体粒模板GB有1个立方体粒GB={gb1},且gb1=g1,对于GS的第一个立方体粒g2,根据式2和式3,g2与gb1合并后的立方体粒为gu=g2∨gb1=(5,6.5,17,34),由于其粒度为34小于ρ,gb1=gu,即gb1=(5,6.5,17,34),此时立方体粒模板有1个立方体粒,即GB={gb1};The cube grain set formed by RGB is GS={g 1 ,g 2 ,g 3 ,g 4 ,g 5 ,g 6 ,g 7 ,g 8 ,g 9 ,g 10 ,g 11 ,g 12 }, firstly, the g 1 is added to the cubic grain template GB, delete g 1 from GS, the cubic grain template GB has 1 cubic grain GB={gb 1 }, and gb 1 =g 1 , for the first cubic grain g 2 of GS, According to formula 2 and formula 3, the cubic grain after g 2 and gb 1 are merged is gu=g 2 ∨ gb 1 =(5,6.5,17,34), because its particle size is 34 less than ρ, gb1=gu, namely gb1 =(5,6.5,17,34), at this time, the cube-grain template has 1 cube-grain, namely GB={gb 1 };
gu=g3∨gb1=(11.5,9.425,16.5667,47),由于其粒度为47小于ρ,gb1=gu,gu=g 3 ∨ gb 1 =(11.5,9.425,16.5667,47), because its particle size is 47 less than ρ, gb1=gu,
gu=g4∨gb1=(12.3436,11.9625,16.1611,52.075),由于其粒度小于ρ,gb1=gu,gu=g 4 ∨ gb 1 =(12.3436, 11.9625, 16.1611, 52.075), because its granularity is smaller than ρ, gb1=gu,
gu=g5∨gb1=(68.6887,68.4625,72.5804,165.075),由于其粒度小于ρ,gb1=gu,gu=g 5 ∨ gb 1 =(68.6887,68.4625,72.5804,165.075), because its particle size is smaller than ρ, gb1=gu,
gu=g6∨gb1=(69.4355,70.4625,73.1679,169.075),由于其粒度小于ρ,gb1=gu,gu=g6∨gb 1 =(69.4355,70.4625,73.1679,169.075), because its granularity is smaller than ρ, gb1=gu,
gu=g7∨gb1=(69.9490,70.6398,73.2989,170.102),由于其粒度小于ρ,gb1=gu,gu=g 7 ∨ gb 1 =(69.9490, 70.6398, 73.2989, 170.102), because its granularity is smaller than ρ, gb1=gu,
gu=g8∨gb1=(69.9490,70.6398,73.2989,170.102),由于其粒度小于ρ,gb1=gu,gu=g 8 ∨ gb 1 =(69.9490, 70.6398, 73.2989, 170.102), because its particle size is smaller than ρ, gb1=gu,
gu=g9∨gb1=(119.9490,105.0520,106.7224,270.102),由于其粒度大于ρ,gb2=g9,gu=g 9 ∨ gb 1 =(119.9490, 105.0520, 106.7224, 270.102), because its particle size is larger than ρ, gb2=g9,
gu=g10∨gb1=(123.2963,109.2421,113.3357,283.3286),由于其粒度大于ρ,但是gu=g10∨gb2=(225,198.5,226,60),由于其粒度小于ρ,gb2=gu,gu=g 10 ∨ gb 1 =(123.2963,109.2421,113.3357,283.3286), because its particle size is larger than ρ, but gu=g 10 ∨ gb 2 =(225,198.5,226,60), because its particle size is smaller than ρ, gb2=gu ,
gu=g11∨gb1=(123.8758,112.5005,111.3559,285),由于其粒度大于ρ,但是gu=g11∨gb2=(218.9027,211.75,219.9027,86.5),由于其粒度小于ρ,gb2=gu,gu=g 11 ∨ gb 1 =(123.8758,112.5005,111.3559,285), because its particle size is larger than ρ, but gu=g 11 ∨ gb 2 =(218.9027,211.75,219.9027,86.5), because its particle size is smaller than ρ, gb2 =gu,
gu=g12∨gb1=(126.6575,112.5005,114.0880 285),由于其粒度为255大于ρ,但是gu=g12∨gb2=(218.9027,211.75,219.9027,86.5),由于其粒度小于ρ,gb2=gu,gu=g 12 ∨ gb 1 =(126.6575,112.5005,114.0880 285), because its particle size is 255 greater than ρ, but gu=g 12 ∨ gb 2 =(218.9027,211.75,219.9027,86.5), because its particle size is smaller than ρ, gb2=gu,
得到的立方体粒模板为GB={gb1,gb2};The obtained cubic grain template is GB={gb 1 , gb 2 };
第四步、提取待分割彩色图像像素点的RGB值,,3×4待分割彩色图像其RGB值依次为The fourth step is to extract the RGB values of the pixels of the color image to be segmented, and the RGB values of the 3×4 color image to be segmented are
RGB(1,1)=(0,0,0) RGB(2,1)=(10,13,34) RGB(3,1)=(35,20,15)RGB(1,1)=(0,0,0) RGB(2,1)=(10,13,34) RGB(3,1)=(35,20,15)
RGB(1,2)=(21,38,12) RGB(2,2)=(151,151,155) RGB(3,2)=(101,155,98)RGB(1,2)=(21,38,12) RGB(2,2)=(151,151,155) RGB(3,2)=(101,155,98)
RGB(1,3)=(155,100,95) RGB(2,3)=(102,99,155) RGB(3,3)=(255,198,197)RGB(1,3)=(155,100,95) RGB(2,3)=(102,99,155) RGB(3,3)=(255,198,197)
RGB(1,4)=(195,199,255) RGB(2,4)=(199,255,200) RGB(3,4)=(255,255,255)RGB(1,4)=(195,199,255) RGB(2,4)=(199,255,200) RGB(3,4)=(255,255,255)
其对应的粒集为GS,其与立方体粒模板GB之间的匹配距离为The corresponding granule set is GS, and the matching distance between it and the cubic granule template GB is
D(1,1)=73.2989,D(1,2)=59.9490,D(1,3)=58.2989,D(1,4)=61.2989,D(1,5)=81.7011,D(1,6)=84.3602,D(1,7)=85.0510,D(1,8)=81.7011,D(1,9)=185.0510,D(1,10)=181.7011,D(1,11)=184.3602,D(1,12)=185.0510D(1,1)=73.2989, D(1,2)=59.9490, D(1,3)=58.2989, D(1,4)=61.2989, D(1,5)=81.7011, D(1,6 )=84.3602, D(1,7)=85.0510, D(1,8)=81.7011, D(1,9)=185.0510, D(1,10)=181.7011, D(1,11)=184.3602, D (1,12)=185.0510
D(2,1)=219.9027 D(2,2)=208.9027 D(2,3)=204.9027 D(2,4)=207.9027 D(2,5)=67.9027D(2,6)=121.9027 D(2,7)=124.9027 D(2,8)=116.9027 D(2,9)=36.0973 D(2,10)=35.0973D(2,11)=43.2500 D(2,12)=43.2500D(2,1)=219.9027 D(2,2)=208.9027 D(2,3)=204.9027 D(2,4)=207.9027 D(2,5)=67.9027D(2,6)=121.9027 D( 2,7)=124.9027 D(2,8)=116.9027 D(2,9)=36.0973 D(2,10)=35.0973 D(2,11)=43.2500 D(2,12)=43.2500
第五步、确定距GS中每个立方体粒最近的立方体粒模板GB中立方体粒的编号,距12立方体粒最近的立方体粒模板GB的立方体粒的编号为1,1,1,1,2,1,1,1,2,2,2,2,分割后的像素点的RGB值为:The fifth step, determine the numbering of the cube grains in the cube grain template GB closest to each cube grain in the GS, and the cube grains of the nearest cube grain template GB to the 12 cube grains are 1, 1, 1, 1, 2, 1,1,1,2,2,2,2, the RGB values of the divided pixels are:
RGB(1,1)=(70,71,73) RGB(2,1)=(70,71,73) RGB(3,1)=(70,71,73)RGB(1,1)=(70,71,73) RGB(2,1)=(70,71,73) RGB(3,1)=(70,71,73)
RGB(1,2)=(70,71,73) RGB(2,2)=(219,222,220) RGB(3,2)=(70,71,73)RGB(1,2)=(70,71,73) RGB(2,2)=(219,222,220) RGB(3,2)=(70,71,73)
RGB(1,3)=(70,71,73) RGB(2,3)=(70,71,73) RGB(3,3)=(219,222,220)RGB(1,3)=(70,71,73) RGB(2,3)=(70,71,73) RGB(3,3)=(219,222,220)
RGB(1,4)=(219,222,220) RGB(2,4)=(219,222,220) RGB(3,4)=(219,222,220);RGB(1,4)=(219,222,220) RGB(2,4)=(219,222,220) RGB(3,4)=(219,222,220);
第六步、保存分割后的图像,将分割后的彩色图像以JPG格式保存到计算机相应的文件夹中。The sixth step is to save the segmented image, and save the segmented color image in the corresponding folder of the computer in JPG format.
并经实验取得了非常好的技术效果,具体情况如下:And the experiment has achieved a very good technical effect, the specific situation is as follows:
实验一:用于比较本发明与FCM聚类的图像分割和Kmeans聚类的图像分割的速度,实验二用于比较本发明与FCM和Kmeans分割的GCE、VI和RI。Experiment 1: It is used to compare the speed of the image segmentation of the present invention with FCM clustering and the image segmentation of Kmeans clustering, and Experiment 2 is used to compare the GCE, VI and RI of the present invention with FCM and Kmeans segmentation.
为了验证本发明具有较快的速度,选取BSD300中文件名为3096的154401(321×481)像素图像进行分割。粒度阈值ρ以步长2从200下降到100,表1列出了运行51次的分割时间。利用本发明得到的立方体粒模板中立方体粒的数量作为FCM和Kmeans方法的聚类数。本发明的平均分割时间为0.0272,FCM方法的平均分割时间为3.1595,Kmeans的平均分割时间为0.3515,本发明分割速度是FCM方法的116.1581倍(3.1595/0.0272=116.1581)Kmeans方法的11.5846倍(0.3151/0.0272=11.5846)。In order to verify that the present invention has a faster speed, the 154401 (321*481) pixel image with the file name of 3096 in BSD300 is selected for segmentation. The granularity threshold ρ drops from 200 to 100 with a step size of 2, and Table 1 lists the split times for 51 runs. The number of cube grains in the cube grain template obtained by the present invention is used as the clustering number of the FCM and Kmeans methods. The average segmentation time of the present invention is 0.0272, and the average segmentation time of FCM method is 3.1595, and the average segmentation time of Kmeans is 0.3515, and the segmentation speed of the present invention is 116.1581 times of FCM method (3.1595/0.0272=116.1581) 11.5846 times (0.3151) of Kmeans method /0.0272=11.5846).
实验二,根据GCE、VI越小越好和RI越大越好的度量标准,选取BSDS300大小为154401(321×481)像素文件名为3096的图像,验证本发明相对于FCM和Kmeans方法的优越性。粒度阈值ρ以步长2从200下降到100,表2列出了运行51次的分割GCE、VI和RI。ρ=152时,GCE和VI达到最小,分别为0.0094和0.1154,RI达到最大为0.9909,分割后的图像如图3。图3(a)为人工分割的图像,图3(b)为最小GCE对应的分割图像,图3(c)为最小VI对应的分割图像,图3(d)为最大RI对应的分割图像。FCM方法,最小GCE为0.02,最小VI为0.9641,最大RI为0.6124。Kmeans方法,最小GCE为0.02,最小VI为0.9004,最大RI为0.6515。Experiment two, according to GCE, VI the smaller the better and the RI the bigger the better metric standard, choose the image that BSDS300 size is 154401 (321 * 481) pixel file name is 3096, verify the superiority of the present invention relative to FCM and Kmeans method . The granularity threshold ρ drops from 200 to 100 with a step size of 2, and Table 2 lists the split GCE, VI, and RI for 51 runs. When ρ=152, GCE and VI reach the minimum, which are 0.0094 and 0.1154 respectively, and RI reaches the maximum, which is 0.9909. The segmented image is shown in Figure 3. Figure 3(a) is the artificially segmented image, Figure 3(b) is the segmented image corresponding to the minimum GCE, Figure 3(c) is the segmented image corresponding to the minimum VI, and Figure 3(d) is the segmented image corresponding to the maximum RI. For the FCM method, the minimum GCE is 0.02, the minimum VI is 0.9641, and the maximum RI is 0.6124. Kmeans method, the minimum GCE is 0.02, the minimum VI is 0.9004, and the maximum RI is 0.6515.
表1本发明与Kmeans和FCM的分割时间对比Table 1 The segmentation time comparison between the present invention and Kmeans and FCM
表2本发明与FCM和Kmeans分割的GCE、VI和RI对比Table 2 The present invention compares with GCE, VI and RI of FCM and Kmeans segmentation
由上述可以看出,本发明是粒计算的一种集合划分方法,即将集合划分为其子集组成的集合,它将粒表示为一种规范的形式,由于彩色图像是将红色(R)、绿色(G)和蓝色(B)三种颜色信息进行融合而生成的图像RGB值,可以将粒表示为三维空间的立方体形式,即立方体粒。将待分割图像的RGB值表示为立方体粒,利用立方体粒之间的合并算子,将粒度较小的立方体粒合并为粒度较大的立方体粒,使每个像素点的RGB在一个唯一的立方体粒中。粒计算是实现不同粒度空间转换的有效方法,这种方法与人们认识图像的粗细程度是一致的。所以,用粒计算对图像实施分割反映了人们认识图像的客观规律。与现有技术相比,具有以下突出的优点:It can be seen from the above that the present invention is a set division method for granular computing, that is, the set is divided into a set composed of subsets, and the grain is expressed in a standardized form. Since a color image is a combination of red (R), The RGB value of the image generated by fusing the three color information of green (G) and blue (B) can represent the grain as a cube in three-dimensional space, that is, cube grain. The RGB value of the image to be segmented is expressed as a cube grain, and the cube grain with a smaller granularity is merged into a cube grain with a larger granularity by using the merge operator between the cube grains, so that the RGB value of each pixel is in a unique cube in the grain. Granular computing is an effective method to achieve space conversion with different granularities, which is consistent with the degree of people's recognition of the image's thickness. Therefore, the use of granular computing to segment images reflects the objective laws of people's understanding of images. Compared with the prior art, it has the following outstanding advantages:
1、分割速度快,由于本发明的方法通过一次扫描已知图像的像素值即能完成图像的分割,其计算复杂度为O(N),其中N为图像的大小;1, segmentation speed is fast, because the method of the present invention can finish the segmentation of image by once scanning the pixel value of known image, its computational complexity is O (N), and wherein N is the size of image;
2、分割效果好,利用D.Martin提出的GCE(Global Consistency Error)、M.Meilǎ提出的VI(Variant Information)和W.M.Rand提出的RI(Rand Index)三种方法评价本发明的图像分割的性能,并选取国际上常用的图像分割数据集BSDS300中的图像评价依据,该数据集包括原始图像和人工分割后的图像,是图像分割方法上的创新,具有很强的实用性。2, segmentation effect is good, utilizes GCE (Global Consistency Error) that D.Martin proposes, VI (Variant Information) that M.Meilǎ proposes and RI (Rand Index) three methods that W.M.Rand proposes evaluate the performance of the image segmentation of the present invention , and select the image evaluation basis in BSDS300, an image segmentation data set commonly used in the world. This data set includes original images and artificially segmented images. It is an innovation in image segmentation methods and has strong practicability.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510807832.9A CN105427307B (en) | 2015-11-20 | 2015-11-20 | A kind of image partition method of cube Granule Computing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510807832.9A CN105427307B (en) | 2015-11-20 | 2015-11-20 | A kind of image partition method of cube Granule Computing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105427307A CN105427307A (en) | 2016-03-23 |
CN105427307B true CN105427307B (en) | 2018-10-30 |
Family
ID=55505488
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510807832.9A Expired - Fee Related CN105427307B (en) | 2015-11-20 | 2015-11-20 | A kind of image partition method of cube Granule Computing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105427307B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103413301A (en) * | 2013-07-27 | 2013-11-27 | 信阳师范学院 | Color image cutting method based on spherical particle calculation |
CN103456013A (en) * | 2013-09-04 | 2013-12-18 | 天津大学 | Method for expressing ultrapixels and measuring similarity between ultrapixels |
CN104933707A (en) * | 2015-07-13 | 2015-09-23 | 福建师范大学 | Multi-photon confocal microscopic cell image based ultra-pixel refactoring segmentation and reconstruction method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7428338B2 (en) * | 2002-01-10 | 2008-09-23 | Ricoh Co., Ltd. | Header-based processing of images compressed using multi-scale transforms |
-
2015
- 2015-11-20 CN CN201510807832.9A patent/CN105427307B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103413301A (en) * | 2013-07-27 | 2013-11-27 | 信阳师范学院 | Color image cutting method based on spherical particle calculation |
CN103456013A (en) * | 2013-09-04 | 2013-12-18 | 天津大学 | Method for expressing ultrapixels and measuring similarity between ultrapixels |
CN104933707A (en) * | 2015-07-13 | 2015-09-23 | 福建师范大学 | Multi-photon confocal microscopic cell image based ultra-pixel refactoring segmentation and reconstruction method |
Non-Patent Citations (1)
Title |
---|
Fuzzy Cube Granule Structure for Image Segmentation;Hongbing Liu等;《International Journal of Multimedia and Ubiquitous Engineering》;20150630;第10卷(第6期);第141-145页 * |
Also Published As
Publication number | Publication date |
---|---|
CN105427307A (en) | 2016-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107123088B (en) | A method for automatically changing the background color of a certificate photo | |
CN105894502B (en) | RGBD image saliency detection method based on hypergraph model | |
CN109767464B (en) | Point cloud registration method with low overlapping rate | |
CN107563381A (en) | The object detection method of multiple features fusion based on full convolutional network | |
WO2018023734A1 (en) | Significance testing method for 3d image | |
CN107358260B (en) | A Multispectral Image Classification Method Based on Surface Wave CNN | |
CN104216974B (en) | The method of unmanned plane images match based on words tree Block Cluster | |
CN110047139B (en) | A method and system for three-dimensional reconstruction of a specified target | |
CN114926699B (en) | Method, device, medium and terminal for semantic classification of indoor 3D point cloud | |
CN107657226A (en) | A kind of Population size estimation method based on deep learning | |
CN105046689B (en) | A kind of interactive stereo-picture fast partition method based on multi-level graph structure | |
CN107563349A (en) | A kind of Population size estimation method based on VGGNet | |
CN104167013B (en) | Volume rendering method for highlighting target area in volume data | |
CN104123417B (en) | A Method of Image Segmentation Based on Cluster Fusion | |
CN113032613B (en) | A 3D model retrieval method based on interactive attention convolutional neural network | |
CN107833224B (en) | An Image Segmentation Method Based on Multi-level Region Synthesis | |
CN107977660A (en) | Region of interest area detecting method based on background priori and foreground node | |
CN104835196B (en) | A kind of vehicle mounted infrared image colorization three-dimensional rebuilding method | |
CN110889387A (en) | A real-time dynamic gesture recognition method based on multi-track matching | |
CN108615229B (en) | Collision detection optimization method based on curvature point clustering and decision tree | |
CN106204615A (en) | Salient target detection method based on central rectangular composition prior | |
CN109636809B (en) | Image segmentation level selection method based on scale perception | |
CN105303546A (en) | Affinity propagation clustering image segmentation method based on fuzzy connectedness | |
CN107944437A (en) | A kind of Face detection method based on neutral net and integral image | |
CN113392244A (en) | Three-dimensional model retrieval method and system based on depth measurement learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20181030 Termination date: 20191120 |
|
CF01 | Termination of patent right due to non-payment of annual fee |