CN104331883B - A kind of image boundary extraction method based on asymmetric inversed placement model - Google Patents
A kind of image boundary extraction method based on asymmetric inversed placement model Download PDFInfo
- Publication number
- CN104331883B CN104331883B CN201410588458.3A CN201410588458A CN104331883B CN 104331883 B CN104331883 B CN 104331883B CN 201410588458 A CN201410588458 A CN 201410588458A CN 104331883 B CN104331883 B CN 104331883B
- Authority
- CN
- China
- Prior art keywords
- image
- boundary
- sub
- pixel
- region
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
- G06T9/40—Tree coding, e.g. quadtree, octree
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种计算机图像处理技术,特别涉及一种基于非对称逆布局模型(NAM)的图像边界提取方法。The invention relates to a computer image processing technology, in particular to an image boundary extraction method based on an asymmetric inverse layout model (NAM).
背景技术Background technique
图像边界提取技术与图像表示方法密切相关,这里主要就图像的分层数据结构和图像的边界提取技术来介绍相关的研究现状和国内外的最新发展趋势。The image boundary extraction technology is closely related to the image representation method. Here we mainly introduce the related research status and the latest development trend at home and abroad on the layered data structure of the image and the image boundary extraction technology.
(1)图像的分层数据结构;(1) Hierarchical data structure of images;
图像表示是目前最为活跃的研究领域之一,它在图像压缩、特征提取、图像检索、图像去噪和图像复原、图像边界提取等应用中起着非常关键的作用。有效的图像表示算法不仅能节省存储空间,而且还有利于提高图像处理的速度。目前已有许多基于空间数据结构的二值图像表示算法,如:字符串表示算法、树结构的表示算法和码字集表示算法。就二值图像的压缩算法来说,尽管压缩标准JBIG的压缩性能总是优于目前任何基于空间数据结构的二值图像表示算法,但是由于JBIG表示算法涉及到熵编码过程,对于许多应用来说是不可能操作压缩的JBIG格式的。分层数据结构在计算机视觉、机器人、计算机图形学、图像处理、模式识别等领域里是非常重要的区域表示方法。四元树(QT,Quad Tree)是图像分层表示的一种形式,它是研究得最早的、也是研究得最多的一种分层表示形式。早期的四元树表示都是基于指针的四元树结构,为了显著减少存储空间,Gargantini等人消除了指针方案,提出了称之为线性四元树(LQT,Linear Quad Tree)的表示方法。Subramanian等人研究了基于空间二元树分割(BSP,Binary Space Partitioning)的图像表示方法。图像经过BSP树表示后,其表示结果可直接支持图像的压缩与分割等算法。基于混合的二元树和四元树表示,Kassim等人提出了一种基于分层分割的图像表示方法。基于B-树三角形编码方法,Distasi等人提出了基于空间数据结构的灰度图像表示算法。基于S-树数据结构和Gouraud阴影法,Chung等人提出了一种基于S-树的空间数据结构的灰度图像表示(STC,S-TreeCoding)方法(K.L.Chung,J.G.Wu.Improved image compression using S-tree andshading approach.IEEE Transactions on Communications,2000,48(5):748-751.)。随后,Chung等人提出了一种基于DCT域和空域的混合灰度图像表示(SDCT,Spatial-and DCT-based)方法(K.L.Chung,Y.W.Liu,W.M.Yan.A hybrid gray image representation usingspatial-and DCT-based approach with application to moment computation.Journalof Visual Communication and Image Representation,2006,17(6):1209-1226)。Image representation is one of the most active research fields at present, and it plays a key role in applications such as image compression, feature extraction, image retrieval, image denoising and image restoration, and image boundary extraction. An effective image representation algorithm can not only save storage space, but also help to improve the speed of image processing. At present, there are many binary image representation algorithms based on spatial data structure, such as: string representation algorithm, tree structure representation algorithm and code word set representation algorithm. As far as the binary image compression algorithm is concerned, although the compression performance of the compression standard JBIG is always better than any binary image representation algorithm based on the spatial data structure, but because the JBIG representation algorithm involves the entropy coding process, for many applications It is not possible to manipulate the compressed JBIG format. Hierarchical data structure is a very important region representation method in the fields of computer vision, robotics, computer graphics, image processing, pattern recognition, etc. Quad Tree (QT, Quad Tree) is a form of image layered representation, which is the earliest and most researched layered representation. The early quadtree representations were pointer-based quadtree structures. In order to significantly reduce storage space, Gargantini et al. eliminated the pointer scheme and proposed a representation method called Linear Quad Tree (LQT, Linear Quad Tree). Subramanian et al. studied the image representation method based on binary space partitioning (BSP, Binary Space Partitioning). After the image is represented by the BSP tree, the representation result can directly support algorithms such as image compression and segmentation. Based on a hybrid binary tree and quadtree representation, Kassim et al. proposed a hierarchical segmentation based image representation. Based on the B-tree triangle encoding method, Distasi et al. proposed a grayscale image representation algorithm based on spatial data structure. Based on the S-tree data structure and the Gouraud shadow method, Chung et al. proposed a grayscale image representation (STC, S-TreeCoding) method based on the S-tree spatial data structure (K.L.Chung, J.G.Wu.Improved image compression using S-tree and shading approach. IEEE Transactions on Communications, 2000, 48(5):748-751.). Subsequently, Chung et al. proposed a hybrid gray image representation (SDCT, Spatial-and DCT-based) method based on DCT domain and spatial domain (K.L.Chung, Y.W.Liu, W.M.Yan.A hybrid gray image representation usingspatial-and DCT -based approach with application to moment computation. Journal of Visual Communication and Image Representation, 2006, 17(6):1209-1226).
虽然上述的分层数据表示有许多优点,但是它们过于强调分割的对称性,因此不是最优的表示方法。借助于Packing问题的思想,以寻找分割最大化的非对称分割方法为目标,Chen等人提出了图像模式的NAM表示方法。郑运平等人提出了一种基于扩展的Gouraud阴影法和非重叠矩形子模式的NAM灰度图像表示方法,简称为RNAMC表示方法(郑运平,陈传波.一种新的灰度图像表示算法研究.计算机学报,2010,33(12):2397-2406.)。由于可重叠NAM表示方法一般会比非重叠NAM表示方法效率高,郑运平等人又提出了一种基于扩展的Gouraud阴影法和重叠矩形子模式的NAM灰度图像表示方法,简称为ORNAM表示方法(Yunping Zheng,Zhiwen Yu,Jane You,Mudar Sarem.A novel gray imagerepresentation using overlapping rectangular NAM and extended shadingapproach.Journal of Visual Communication and Image Representation,2012,23(7):972-983.)。实验结果表明:与STC、SDCT和RNAMC表示方法相比,在保持图像质量的前提下,ORNAM表示方法具有更高的压缩比和更少的块数,因而能够更有效地减少数据存储空间,是灰度图像表示的一种良好方法。最近,郑运平等又提出了一种新的二值图像的NAM表示方法并将其应用到面积计算中,取得了较好的结果(Yunping Zheng,Mudar Sarem.A novelbinary image representation algorithm by using NAM and coordinate encodingprocedure and its application to area calculation.Frontiers of ComputerScience,2014,8(5):763-772.)。从现状来看,LQT表示主要集中在降低图像处理运算的复杂性和向更宽的范围扩展,理论上的成果很多,运用于实际的也不少,并越来越多,仍是当今图像处理领域里一种非常流行的图像表示方法。Although the above-mentioned hierarchical data representations have many advantages, they place too much emphasis on the symmetry of the segmentation and thus are not optimal representations. With the help of the idea of the Packing problem, with the goal of finding an asymmetric segmentation method that maximizes the segmentation, Chen et al. proposed a NAM representation method for image patterns. Zheng Yunping and others proposed a NAM grayscale image representation method based on the extended Gouraud shading method and non-overlapping rectangular subpatterns, referred to as the RNAMC representation method (Zheng Yunping, Chen Chuanbo. A new grayscale image representation algorithm research. Computer Journal of the Chinese Academy of Sciences, 2010, 33(12):2397-2406.). Since the overlapping NAM representation method is generally more efficient than the non-overlapping NAM representation method, Zheng Yunping and others proposed a NAM grayscale image representation method based on the extended Gouraud shading method and overlapping rectangular sub-patterns, referred to as the ORNAM representation method (Yunping Zheng, Zhiwen Yu, Jane You, Mudar Sarem. A novel gray image representation using overlapping rectangular NAM and extended shading approach. Journal of Visual Communication and Image Representation, 2012, 23(7): 972-983.). The experimental results show that: compared with STC, SDCT and RNAMC representation methods, under the premise of maintaining image quality, ORNAM representation method has a higher compression ratio and fewer blocks, so it can reduce data storage space more effectively. A good way to represent grayscale images. Recently, Yunping Zheng proposed a new NAM representation method for binary images and applied it to area calculation, and achieved good results (Yunping Zheng, Mudar Sarem. A novel binary image representation algorithm by using NAM and coordinate encoding procedure and its application to area calculation. Frontiers of Computer Science, 2014, 8(5):763-772.). Judging from the current situation, LQT mainly focuses on reducing the complexity of image processing operations and expanding to a wider range. There are many theoretical achievements, and there are many practical applications, and more and more. It is still the current image processing technology. A very popular image representation method in the field.
图像表示方法有两个目的:第一,提高图像的表示效率。第二,提高图像操作的处理速度。The image representation method has two purposes: first, to improve the representation efficiency of the image. Second, improve the processing speed of image operations.
(2)图像的边界提取技术;(2) Image boundary extraction technology;
边界通常是物体的轮廓,可为人们描述或识别目标以及解释图像提供至关重要的特征。因此,对图像中的边界进行识别和提取,在计算机视觉及数字图像分析与应用中起着重要的作用,也具有重要的实用价值。多年来,图像边界检测与提取一直是数字图像处理、分析与应用领域的重要研究主题。传统的边界检测方法有导数法、梯度法、拉普拉斯法及各种改进方法等。近些年,多尺度边缘检测、基于数学形态学的边缘检测和用模糊逻辑对图像边界进行检测的技术也得到了应用。本质上,传统的边界检测方法是基于像素灰度变化的方法。一般是先检测每个像素和其相邻像素的状态,以决定该像素是否处于物体的边界上,然后以图像中像素的灰度值或用二值灰度图像来表示边界检测图像。传统边界检测与提取方法的关键在于边界像素点的检出性能和边界点连接算法性能。在复杂图像的边界检测应用中,效果往往不理想。近年来,面向对象图像分析方法应用逐渐受到关注。与传统的基于像素灰度处理方法的不同之处为,通过把图像分割为若干个互不交叠的区域(图像对象),随后将图像对象作为基本分析处理单元;这种方式,相对于把像素作为基本处理单元,更适于结合人类关于现实世界的认知知识,从而能更有效地从图像中提取出在形状和分类上与真实世界目标(地物)相符合的图像区域。这种基于对象的图像分析是近些年出现的一种新理论。通过使用分层结构的BSP方法,Wang,C.C.L.等人提出了一种基于剪切操作的高效的BSP固体边界提取方法。他们的多边形算法重复执行对应的空间凸划分的体细胞上的裁剪操作,通过遍历细胞连接计算边界。他们使用基于点的表示随着有限精度运算来提高效率和生成BSP固体边界近似(Wang,C.C.L.;Manocha,D.,Efficient Boundary Extraction ofBSP Solids Based on Clipping Operations.IEEE Transactions on Visualizationand Computer Graphics,2013,19(1):16-29)。Boundaries are usually the outlines of objects and provide crucial features for humans to describe or recognize objects and interpret images. Therefore, identifying and extracting the boundary in the image plays an important role in computer vision and digital image analysis and application, and also has important practical value. For many years, image boundary detection and extraction has been an important research topic in the field of digital image processing, analysis and application. Traditional boundary detection methods include derivative method, gradient method, Laplacian method and various improved methods. In recent years, multi-scale edge detection, edge detection based on mathematical morphology and image boundary detection technology using fuzzy logic have also been applied. In essence, the traditional boundary detection method is based on the method of pixel gray level change. Generally, the state of each pixel and its adjacent pixels is detected first to determine whether the pixel is on the boundary of the object, and then the boundary detection image is represented by the gray value of the pixel in the image or a binary gray image. The key of traditional boundary detection and extraction methods lies in the detection performance of boundary pixels and the performance of boundary point connection algorithm. In the boundary detection application of complex images, the effect is often not ideal. In recent years, the application of object-oriented image analysis methods has gradually attracted attention. The difference from the traditional pixel-based grayscale processing method is that the image is divided into several non-overlapping regions (image objects), and then the image object is used as the basic analysis and processing unit; this method, compared to the As a basic processing unit, pixels are more suitable for combining human cognitive knowledge about the real world, so that image regions that conform to real-world objects (ground objects) in shape and classification can be extracted more effectively from images. This object-based image analysis is a new theory emerging in recent years. By using the BSP method with hierarchical structure, Wang, C.C.L. et al. proposed an efficient BSP solid boundary extraction method based on the shear operation. Their polygonal algorithm iteratively performs the clipping operation on the soma corresponding to the convex partition of the space, computing boundaries by traversing the cell connections. They use point-based representation along with finite-precision operations to improve efficiency and generate BSP solid boundary approximations (Wang, C.C.L.; Manocha, D., Efficient Boundary Extraction of BSP Solids Based on Clipping Operations. IEEE Transactions on Visualization and Computer Graphics, 2013, 19 (1):16-29).
综上所述,近年来虽然有很多研究人员致力于图像边界提取的研究,提出了很多新的边界提取技术,但由于问题本身的困难性,目前的方法多是针对某个具体任务而言的,还没有一个通用的解决办法。图像边界提取困难的一个重要的原因是图像的复杂性和多样性。由于图像的复杂性,现有的任何一种单独的图像边界提取算法都难以对一般图像取得令人满意的分割结果,因而在继续致力于将新的概念、新的理论、新的方法引入图像边界提取领域的同时,更加重视多种边界提取算法的有效结合,近几年来提出的方法大多数是结合了多种算法的,与单一的边界提取算法相比,边界提取集成技术更加有效,而且鲁棒性、稳定性、准确性和自适应性等更好。To sum up, although many researchers have devoted themselves to the research of image boundary extraction in recent years and proposed many new boundary extraction techniques, due to the difficulty of the problem itself, most of the current methods are aimed at a specific task. , there is not yet a general solution. An important reason for the difficulty of image boundary extraction is the complexity and diversity of images. Due to the complexity of the image, it is difficult for any existing single image boundary extraction algorithm to achieve satisfactory segmentation results for general images, so we continue to work on introducing new concepts, new theories, and new methods into images. In the field of boundary extraction, more attention is paid to the effective combination of multiple boundary extraction algorithms. Most of the methods proposed in recent years combine multiple algorithms. Compared with a single boundary extraction algorithm, the boundary extraction integration technology is more effective, and Robustness, stability, accuracy and adaptability are better.
有效的图像表示方法不仅能节省存储空间,而且还能提高图像处理的速度。图像模式的NAM表示方法是对图像模式的一种逆布局表达方式,本质上是将图像模式表示为预先定义的子模式集合,可以将子模式进行存储,因此该方法也直接支持图像的边界提取等处理算法。An effective image representation method can not only save storage space, but also improve the speed of image processing. The NAM representation method of the image pattern is an inverse layout expression of the image pattern. In essence, the image pattern is represented as a set of predefined sub-patterns, and the sub-patterns can be stored. Therefore, this method also directly supports image boundary extraction. and other processing algorithms.
发明內容Contents of the invention
本发明目的在于针对现有图像边界提取技术中存在的问题,提供一种基于非对称逆布局模型(NAM)的图像边界提取方法,该图像边界提取方法可以显著提高图像边界提取的表示和提取效率。基于NAM的边界提取算法首先要对图像进行编码,得到编码后的总子模式数n,坐标表W。然后从左上角第一个子模式开始,依次按光栅扫描的顺序扫描子模式,每扫描到一个子模式就从坐标表中获取此子模式四个角落的坐标值,接着扫描这个子模式的西边界和北边界处的所有邻居像素,如果邻居像素所属的区域和当前子模式不属于同一个区域且可以合并,则执行带按秩合并和路径压缩策略的并查集算法合并区域,否则继续扫描下一个邻居像素。当这个子模式的左边界和上边界的邻居像素全部扫描完毕,此子模式处理完毕,更新边界信息,按以上步骤处理下一个子模式,直到所有子模式处理完成即可提取出二值图像的边界信息。The purpose of the present invention is to address the problems existing in the existing image boundary extraction technology, and to provide an image boundary extraction method based on an asymmetric inverse layout model (NAM), which can significantly improve the representation and extraction efficiency of image boundary extraction . The boundary extraction algorithm based on NAM first needs to encode the image, and obtain the total sub-pattern number n and the coordinate table W after encoding. Then start from the first sub-pattern in the upper left corner, scan the sub-patterns in the order of raster scanning, and obtain the coordinate values of the four corners of this sub-pattern from the coordinate table every time a sub-pattern is scanned, and then scan the west of this sub-pattern All neighbor pixels at the border and the north border, if the region to which the neighbor pixel belongs and the current sub-pattern do not belong to the same region and can be merged, execute the union-find algorithm with a rank-based merge and path compression strategy to merge the regions, otherwise continue scanning next neighbor pixel. When the neighbor pixels of the left boundary and the upper boundary of this sub-mode are all scanned, the processing of this sub-mode is completed, the boundary information is updated, and the next sub-mode is processed according to the above steps, and the binary image can be extracted until all sub-modes are processed. boundary information.
本发明的目的通过以下技术方案实现:一种基于非对称逆布局模型的图像边界提取方法,包括以下步骤:The object of the present invention is achieved through the following technical solutions: an image boundary extraction method based on an asymmetric inverse layout model, comprising the following steps:
步骤S1、使用基于非对称逆布局模型的二值图像表示法将大小为G×H的图像b进行编码,得到编码后的总子模式数n,坐标表W。Step S1: Encode the image b with a size of G×H by using the binary image representation method based on the asymmetric inverse layout model, and obtain the encoded total number of sub-patterns n and the coordinate table W.
具体表示方法如下:The specific expression method is as follows:
步骤S1.1、将矩阵变量M的所有元素赋值为0,M的大小与待处理的二值图像b相等,均为G×H,同时令子模式的计数变量n=0;其中,G和H均为自然数;Step S1.1, assign all elements of the matrix variable M to 0, the size of M is equal to the binary image b to be processed, both are G×H, and the count variable n of the sub-pattern is set to be 0; among them, G and H are natural numbers;
步骤S1.2、按光栅扫描的顺序确定二值图像b中的一个未被标识的矩形子模式的起始点(x1,y1),根据该起始点确定一个面积最大的子模式,并将子模式在二值图像b中作标识;Step S1.2. Determine the starting point (x 1 , y 1 ) of an unmarked rectangular sub-pattern in the binary image b in the order of raster scanning, determine a sub-pattern with the largest area according to the starting point, and set The sub-pattern is identified in the binary image b;
步骤S1.3、记录子模式的参数,即:左上角的坐标(x1,y1)、右下角的坐标(x2,y2);令n=n+1;Step S1.3, recording the parameters of the sub-mode, namely: the coordinates of the upper left corner (x 1 , y 1 ), the coordinates of the lower right corner (x 2 , y 2 ); let n=n+1;
步骤S1.4、循环执行步骤(S1.2)到(S1.3),直到二值图像b中的子模式均被标识完毕;Step S1.4, cyclically execute steps (S1.2) to (S1.3), until all the sub-patterns in the binary image b are marked;
步骤S1.5、根据下述坐标数据压缩算法,对矩阵变量M中所有非零元素的坐标进行编码,并将编码结果存储到一个坐标表W中;Step S1.5, according to the following coordinate data compression algorithm, encode the coordinates of all non-zero elements in the matrix variable M, and store the encoding result in a coordinate table W;
①逐行扫描大小为G×H的矩阵变量M,如果该行所有元素均为零,那么就不用编码该行,在这种情况下,使用一个二进制位“0”来表示本行从头到尾都不存在非零元素,并将该二进制位“0”存储到该行的编码表W中;否则,如果该行存在非零元素,那么就在每一个非零元素前加一个前缀符“1”,然后在前缀符后加上用以标识非零元素1、2和-1的码字,最后将该前缀符“1”和其后的码字存储到该行的编码表W中;①Scan the matrix variable M whose size is G×H line by line. If all the elements of this line are zero, then there is no need to encode this line. In this case, use a binary bit "0" to indicate that the line is from the beginning to the end There are no non-zero elements, and the binary bit "0" is stored in the coding table W of the row; otherwise, if there are non-zero elements in the row, a prefix "1" is added before each non-zero element ", then add codewords for identifying non-zero elements 1, 2 and -1 after the prefix, and finally store the prefix "1" and subsequent codewords in the coding table W of the row;
②用x个比特来表示这个非零元素所在列的位置,并将这x个比特存储到该行的编码表W中,其中x的值按如下二种情况进行计算;② Use x bits to indicate the position of the column where the non-zero element is located, and store these x bits in the coding table W of the row, where the value of x is calculated according to the following two situations;
对于在某一行遇到的第一个非零元素,x=[log2H];这里的x个比特用来指明第一个非零元素关于本行首端的位置;For the first non-zero element encountered in a row, x=[log 2 H]; the x bits here are used to indicate the position of the first non-zero element with respect to the head end of the row;
对于在某一行遇到的除了第一个非零元素以外的其他非零元素,x=[log2(H-c)],其中c是前一次遇到的非零元素的列的位置;这里的x个比特用来表示这个非零元素关于前一次编码的非零元素的右端的位置;For non-zero elements encountered in a row other than the first non-zero element, x = [log 2 (Hc)], where c is the column position of the previously encountered non-zero element; here x Bits are used to indicate the position of the non-zero element on the right side of the non-zero element of the previous encoding;
③在某一行的最后一个非零元素编码完后,使用一个二进制位“0”来表示本行剩余的元素均为零,并将这个二进制位“0”存储到该行的编码表W中,否则,如果该行的最后一个非零元素的位置在本行的末尾,那么就不必使用“0”来表示本行剩余的元素均为零;③ After the last non-zero element of a row is encoded, use a binary bit "0" to indicate that the remaining elements of the row are all zero, and store this binary bit "0" in the coding table W of the row, Otherwise, if the position of the last non-zero element of the row is at the end of the row, then there is no need to use "0" to indicate that the remaining elements of the row are all zero;
步骤S1.6、输出坐标表W,其中W是由矩阵变量M的所有行的行编码表顺序连接而得到的。Step S1.6, output the coordinate table W, wherein W is obtained by sequentially connecting the row coding tables of all rows of the matrix variable M.
步骤S2、置一个当前扫描子模式的序号j,并令j=0,同时设置一个指针矩阵B,大小为G×H,用于表示每个像素指向的区域。Step S2, setting a serial number j of the current scanning sub-mode, and setting j=0, and setting a pointer matrix B with a size of G×H, which is used to indicate the area pointed to by each pixel.
步骤S3、在坐标表中得到W[j]。Step S3, get W[j] in the coordinate table.
步骤S4、根据W[j],算出当前子模式的大小size和左边界、上边界坐标信息。Step S4, according to W[j], calculate the size of the current sub-mode and the coordinate information of the left boundary and the upper boundary.
步骤S5、从左边界最下方开始,往上扫描,对每个左边界像素L找出它左边的一个像素LL(即LL在X方向比L小1),并利用矩阵B找出像素L和像素LL所属的区域,再用带按秩合并和路径压缩策略的并查集算法找出这两个区域的祖先区域,若两个区域是同一区域,则跳到下一个像素,否则,如果两个区域不属于同一区域,则根据均值和方差判断这两个祖先是否可合并。Step S5, start from the bottom of the left boundary, scan upwards, find a pixel LL on the left of each left boundary pixel L (that is, LL is 1 smaller than L in the X direction), and use matrix B to find pixels L and The area to which the pixel LL belongs, and then use the union search algorithm with rank-based merging and path compression strategies to find out the ancestor areas of these two areas. If the two areas are the same area, skip to the next pixel. Otherwise, if both If two regions do not belong to the same region, it is judged whether the two ancestors can be merged according to the mean and variance.
本步骤和下一步骤中所用的2个数据结构如下:The 2 data structures used in this step and the next step are as follows:
①Region数据结构域:①Region data structure domain:
{Mean,Var,Size,Father,Count,EdgeLink}{Mean, Var, Size, Father, Count, EdgeLink}
其中Mean表示此区域的灰度均值,Var表示此区域的灰度方差,Size表示此区域的大小,即像素数,这三个域用来支持区域的合并操作。域Father是一个指针,用来指向此区域的父节点,Count用来这个区域的后代区域的数量,以上两个域用来支持并查集算法。域EdgeLink指向这个区域的边界,可以用来追踪此区域的边界信息。Among them, Mean indicates the gray level mean value of this area, Var indicates the gray level variance of this area, and Size indicates the size of this area, that is, the number of pixels. These three fields are used to support the merging operation of the area. The field Father is a pointer to point to the parent node of this area, Count is used for the number of descendant areas of this area, and the above two fields are used to support the union search algorithm. Field EdgeLink points to the boundary of this area, which can be used to track the boundary information of this area.
②Edge数据结构域:②Edge data structure domain:
{PreLink,First,Last,SucLink}{PreLink, First, Last, SucLink}
PreLink和SucLink用来支持双向链表,First和Last指向角落顶点的起点和终点。PreLink and SucLink are used to support doubly linked lists, and First and Last point to the start and end points of corner vertices.
步骤S6、左边界扫描完毕后,从上边界最左方开始,往右扫描,对每个上边界像素T找出它上边一个像素TT(即TT在Y方向比T小1),并利用矩阵B找出像素T和像素TT所属的区域,再用带按秩合并和路径压缩策略的并查集算法找出这两个区域的祖先区域,若两个区域是同一区域,则跳到下一个像素;否则,如果两个区域不属于同一区域,则根据均值和方差判断这两个祖先是否可合并。Step S6, after scanning the left boundary, start from the leftmost side of the upper boundary, scan to the right, and find a pixel TT above it for each upper boundary pixel T (that is, TT is 1 smaller than T in the Y direction), and use the matrix B Find out the area to which pixel T and pixel TT belong, and then use the union search algorithm with rank-based merge and path compression strategy to find the ancestor area of these two areas. If the two areas are the same area, skip to the next one pixels; otherwise, if the two regions do not belong to the same region, judge whether the two ancestors can be merged according to the mean and variance.
步骤S7、更新边界信息,j++,跳转至步骤S3,直到所有子模式处理完毕。Step S7, update boundary information, j++, jump to step S3, until all sub-patterns are processed.
步骤S8、输出二值图像b的边界信息。Step S8, outputting the boundary information of the binary image b.
本发明的原理:本发明借助于布局问题和二值图像的四元树区域表示方法的思想,通过二值图像的NAM表示为基础,提供了一种基于非对称逆布局模型的图像边界提取方法,该方法可以显著提高图像边界提取的表示和操作效率。基于非对称逆布局模型的图像边界提取方法首先要对二值图像进行NAM表示,得到总子模式数n和坐标表W。然后从左上角第一个子模式开始,依次按光栅扫描的顺序扫描,每扫描到一个子模式就获取相关参数值,如果邻居像素所属的区域和当前子模式不属于同一个区域且可以合并,则执行带按秩合并和路径压缩策略的并查集算法合并区域,否则继续扫描下一个邻居像素。当这个块的左边界和上边界的邻居像素全部扫描完毕,此块处理完毕,更新边界信息,按以上步骤处理下一个子模式,直到所有子模式处理完成,最后输出二值图像的边界信息。本发明方法的时间复杂度为O(nLα(n)),其中n表示同类块的块数,L表示每块的边长大小,α(n)是ackerman函数的逆函数。The principle of the present invention: the present invention provides an image boundary extraction method based on an asymmetric inverse layout model based on the layout problem and the idea of the quadtree region representation method of the binary image, based on the NAM representation of the binary image , the method can significantly improve the representation and operation efficiency of image boundary extraction. The image boundary extraction method based on the asymmetric inverse layout model first needs to perform NAM representation on the binary image to obtain the total number of sub-patterns n and the coordinate table W. Then start from the first sub-pattern in the upper left corner, scan in the order of raster scanning, and get the relevant parameter value every time a sub-pattern is scanned. If the area to which the neighbor pixel belongs and the current sub-pattern do not belong to the same area and can be merged, Then execute the merge-find algorithm with rank-based merge and path compression strategy to merge regions, otherwise continue to scan the next neighbor pixel. When the neighbor pixels of the left boundary and the upper boundary of this block are all scanned, the processing of this block is completed, the boundary information is updated, and the next sub-mode is processed according to the above steps until all sub-modes are processed, and finally the boundary information of the binary image is output. The time complexity of the method of the present invention is O(nLα(n)), wherein n represents the number of blocks of the same type, L represents the side length of each block, and α(n) is the inverse function of the ackerman function.
本发明相比现有技术具有如下优点:Compared with the prior art, the present invention has the following advantages:
1、在图像边界提取的表示方面,对于给定的4幅图像,NAM(LQT)的子模式数平均为11585(36633),NAM(LQT)的压缩比CR平均为1.3801(0.2862),也即RNAM的压缩比是LQT的压缩比的4.8222倍。同时NAM表示算法在子模式的数目方面也比LQT表示算法减少了68.38%,显然,NAM在子模式的数目(减少了68.38%)和压缩比提高率(提高了382.22%)方面是优于LQT的。1. In terms of the representation of image boundary extraction, for a given 4 images, the average number of sub-modes of NAM (LQT) is 11585 (36633), and the average compression ratio CR of NAM (LQT) is 1.3801 (0.2862), that is The compression ratio of RNAM is 4.8222 times that of LQT. At the same time, the NAM representation algorithm is also 68.38% less than the LQT representation algorithm in terms of the number of sub-patterns. Obviously, NAM is better than LQT in terms of the number of sub-patterns (68.38% reduction) and compression ratio improvement (382.22% increase). of.
2、在图像边界提取的速度方面,基于NAM表示的边界提取的执行速度比基于LQT表示的边界提取的执行速度平均提高了92.39%,因而是一种更有效的边界提取算法,具有占用存储空间小,图像边界提取速度快。2. In terms of the speed of image boundary extraction, the execution speed of boundary extraction based on NAM representation is 92.39% higher than the execution speed of boundary extraction based on LQT representation, so it is a more effective boundary extraction algorithm that occupies storage space Small, the image boundary extraction speed is fast.
因此,本发明提供的NAM边界提取方法是优于LQT边界提取方法的。本发明既可应用于传统的图像边界提取市场,又可应用于新兴领域,如网路传输、无线通讯、医疗图像等。Therefore, the NAM boundary extraction method provided by the present invention is superior to the LQT boundary extraction method. The present invention can be applied not only to the traditional image boundary extraction market, but also to emerging fields, such as network transmission, wireless communication, medical images and the like.
3、本发明与现有的基于LQT的边界提取方法相比,基于NAM的边界提取方法具有更低的比特率和更少的子模式数,从而能够更有效地减少数据存储空间和提高图像边界提取的速度,因而是二值图像的一种更好的边界提取方法,这种边界提取方法可以应用于图像处理的各个方面,在降低存储空间、加快传输速度、提高模式匹配效率等方面具有良好的理论参考意义和实际应用价值。3. Compared with the existing LQT-based boundary extraction method, the NAM-based boundary extraction method of the present invention has a lower bit rate and less sub-mode numbers, thereby reducing data storage space and improving image boundary more effectively The speed of extraction is therefore a better boundary extraction method for binary images. This boundary extraction method can be applied to various aspects of image processing, and has good advantages in reducing storage space, speeding up transmission speed, and improving pattern matching efficiency. Theoretical reference significance and practical application value.
附图说明Description of drawings
图1是本发明基于NAM的边界提取方法的完整流程图。FIG. 1 is a complete flowchart of the NAM-based boundary extraction method of the present invention.
图2是基于NAM的二值图像的表示方法流程图。Fig. 2 is a flowchart of a representation method of a binary image based on NAM.
图3a是本发明所用的512×512大小的标准二值图像F16。Fig. 3a is a standard binary image F16 with a size of 512×512 used in the present invention.
图3b是本发明所用的512×512大小的标准二值图像Goldhill。Fig. 3b is a standard binary image Goldhill with a size of 512×512 used in the present invention.
图3c是本发明所用的512×512大小的标准二值图像Lena。Fig. 3c is a standard binary image Lena with a size of 512×512 used in the present invention.
图3d是本发明所用的512×512大小的标准二值图像Peppers。Fig. 3d is a standard binary image Peppers with a size of 512×512 used in the present invention.
图4a给出了图3c的LQT方法的分割效果。Figure 4a shows the segmentation effect of the LQT method in Figure 3c.
图4b给出了LQT方法的区域合并的效果。Figure 4b presents the effect of region merging for the LQT method.
图4c给出了用LQT方法提取到的二值图像的边界。Figure 4c shows the boundary of the binary image extracted by the LQT method.
图5a给出了图3c的LQT方法的分割效果。Figure 5a shows the segmentation effect of the LQT method in Figure 3c.
图5b给出了NAM方法的区域合并的效果。Figure 5b presents the effect of region merging for the NAM method.
图5c给出了用NAM方法提取到的二值图像的边界。Figure 5c shows the boundary of the binary image extracted by the NAM method.
具体实施方式detailed description
实施例Example
本发明目的在于针对现有图像边界提取技术中存在的问题,提供一种基于非对称逆布局模型(NAM)的图像边界提取方法,其总体流程如图1所示,可以显著提高图像的边界提取速度且同时能有效降低存储空间。基于非对称逆布局模型的图像边界提取方法首先要对二值图像进行NAM表示,得到总子模式数n和坐标表W。然后从左上角第一个子模式开始,依次按光栅扫描的顺序扫描,每扫描到一个子模式就获取相关参数值,如果邻居像素所属的区域和当前子模式不属于同一个区域且可以合并,则执行带按秩合并和路径压缩策略的并查集算法合并区域,否则继续扫描下一个邻居像素。当这个块的左边界和上边界的邻居像素全部扫描完毕,此块处理完毕,更新边界信息,按以上步骤处理下一个子模式,直到所有子模式处理完成,最后输出二值图像的边界信息。本发明方法的时间复杂度为O(nLα(n)),其中n表示同类块的块数,L表示每块的边长大小,α(n)是ackerman函数的逆函数。实验结果表明:与当前的流行的基于LQT的边界提取方法相比,本发明提出的基于NAM的边界提取方法具有更低的比特率和更少的子模式数,从而能够更有效地减少数据存储空间和提高图像边界提取的速度,因而是二值图像的一种更好的边界提取方法。这种方法可以应用于图像处理的各个方面,在降低存储空间、加快传输速度、提高模式匹配效率等方面具有良好的理论参考意义和实际应用价值。The purpose of the present invention is to solve the problems existing in the existing image boundary extraction technology, and to provide an image boundary extraction method based on the asymmetric inverse layout model (NAM). The overall process is shown in Figure 1, which can significantly improve the image boundary extraction. Speed and at the same time can effectively reduce storage space. The image boundary extraction method based on the asymmetric inverse layout model first needs to perform NAM representation on the binary image to obtain the total number of sub-patterns n and the coordinate table W. Then start from the first sub-pattern in the upper left corner, scan in the order of raster scanning, and get the relevant parameter value every time a sub-pattern is scanned. If the area to which the neighbor pixel belongs and the current sub-pattern do not belong to the same area and can be merged, Then execute the merge-find algorithm with rank-based merge and path compression strategy to merge regions, otherwise continue to scan the next neighbor pixel. When the neighbor pixels of the left boundary and the upper boundary of this block are all scanned, the processing of this block is completed, the boundary information is updated, and the next sub-mode is processed according to the above steps until all sub-modes are processed, and finally the boundary information of the binary image is output. The time complexity of the method of the present invention is O(nLα(n)), wherein n represents the number of blocks of the same type, L represents the side length of each block, and α(n) is the inverse function of the ackerman function. The experimental results show that: compared with the current popular LQT-based boundary extraction method, the NAM-based boundary extraction method proposed by the present invention has a lower bit rate and fewer sub-patterns, thereby reducing data storage more effectively Space and improve the speed of image boundary extraction, so it is a better boundary extraction method for binary images. This method can be applied to various aspects of image processing, and has good theoretical reference significance and practical application value in reducing storage space, speeding up transmission speed, and improving pattern matching efficiency.
如图2所示,本发明提供的图像表示方法通过对给定的一幅大小为G×H的二值图像b用矩形NAM进行表示,得到互不相同的子模式的集合和一个坐标表W,然后基于这些子模式,提出了一种基于非对称逆布局模型的图像边界提取方法。具体包括以下步骤:As shown in Figure 2, the image representation method provided by the present invention obtains a set of different sub-patterns and a coordinate table W by representing a given binary image b with a size of G×H with a rectangle NAM , and then based on these sub-patterns, an image boundary extraction method based on an asymmetric inverse layout model is proposed. Specifically include the following steps:
(S1)使用基于非对称逆布局模型的二值图像表示法将大小为G×H的图像b进行编码,得到编码后的总子模式数n,坐标表W。(S1) Use the binary image representation method based on the asymmetric inverse layout model to encode the image b of size G×H, and obtain the total sub-pattern number n after encoding and the coordinate table W.
具体表示方法如下:The specific expression method is as follows:
(S1.1)将矩阵变量M的所有元素赋值为0,M的大小与待处理的二值图像b相等,均为G×H,同时令子模式的计数变量n=0;其中,G和H均为自然数;(S1.1) Assign all elements of the matrix variable M to 0, the size of M is equal to the binary image b to be processed, both are G×H, and the count variable n=0 of the sub-pattern is made at the same time; wherein, G and H are natural numbers;
(S1.2)按光栅扫描的顺序确定二值图像b中的一个未被标识的矩形子模式的起始点(x1,y1),根据该起始点确定一个面积最大的子模式,并将子模式在二值图像b中作标识;(S1.2) Determine the starting point (x 1 , y 1 ) of an unmarked rectangular sub-pattern in the binary image b in the order of raster scanning, determine a sub-pattern with the largest area according to the starting point, and set The sub-pattern is identified in the binary image b;
(S1.3)记录子模式的参数,即:左上角的坐标(x1,y1)、右下角的坐标(x2,y2);令n=n+1;(S1.3) Record the parameters of the sub-mode, namely: the coordinates (x 1 , y 1 ) of the upper left corner and the coordinates (x 2 , y 2 ) of the lower right corner; let n=n+1;
(S1.4)循环执行步(S1.2)到(S1.3),直到二值图像b中的子模式均被标识完毕;(S1.4) cyclically execute steps (S1.2) to (S1.3), until the sub-patterns in the binary image b are marked;
(S1.5)根据下述坐标数据压缩算法,对矩阵变量M中所有非零元素的坐标进行编码,并将编码结果存储到一个坐标表W中;(S1.5) According to the following coordinate data compression algorithm, the coordinates of all non-zero elements in the matrix variable M are encoded, and the encoding result is stored in a coordinate table W;
①逐行扫描大小为G×H的矩阵变量M,如果该行所有元素均为零,那么就不用编码该行,在这种情况下,使用一个二进制位“0”来表示本行从头到尾都不存在非零元素,并将该二进制位“0”存储到该行的编码表W中;否则,如果该行存在非零元素,那么就在每一个非零元素前加一个前缀符“1”,然后在前缀符后加上用以标识非零元素1、2和-1的码字,最后将该前缀符“1”和其后的码字存储到该行的编码表W中;①Scan the matrix variable M whose size is G×H line by line. If all the elements of this line are zero, then there is no need to encode this line. In this case, use a binary bit "0" to indicate that the line is from the beginning to the end There are no non-zero elements, and the binary bit "0" is stored in the coding table W of the row; otherwise, if there are non-zero elements in the row, a prefix "1" is added before each non-zero element ", then add codewords for identifying non-zero elements 1, 2 and -1 after the prefix, and finally store the prefix "1" and subsequent codewords in the coding table W of the row;
②用x个比特来表示这个非零元素所在列的位置,并将这x个比特存储到该行的编码表W中,其中x的值按如下二种情况进行计算;② Use x bits to indicate the position of the column where the non-zero element is located, and store these x bits in the coding table W of the row, where the value of x is calculated according to the following two situations;
对于在某一行遇到的第一个非零元素,x=[log2H];这里的x个比特用来指明第一个非零元素关于本行首端的位置;For the first non-zero element encountered in a row, x=[log 2 H]; the x bits here are used to indicate the position of the first non-zero element with respect to the head end of the row;
对于在某一行遇到的除了第一个非零元素以外的其他非零元素,x=[log2(H-c)],其中c是前一次遇到的非零元素的列的位置;这里的x个比特用来表示这个非零元素关于前一次编码的非零元素的右端的位置;For non-zero elements encountered in a row other than the first non-zero element, x = [log 2 (Hc)], where c is the column position of the previously encountered non-zero element; here x Bits are used to indicate the position of the non-zero element on the right side of the non-zero element of the previous encoding;
③在某一行的最后一个非零元素编码完后,使用一个二进制位“0”来表示本行剩余的元素均为零,并将这个二进制位“0”存储到该行的编码表W中,否则,如果该行的最后一个非零元素的位置在本行的末尾,那么就不必使用“0”来表示本行剩余的元素均为零;③ After the last non-zero element of a row is encoded, use a binary bit "0" to indicate that the remaining elements of the row are all zero, and store this binary bit "0" in the coding table W of the row, Otherwise, if the position of the last non-zero element of the row is at the end of the row, then there is no need to use "0" to indicate that the remaining elements of the row are all zero;
(S1.6)输出坐标表W,其中W是由矩阵变量M的所有行的行编码表顺序连接而得到的。(S1.6) Output the coordinate table W, wherein W is obtained by sequentially connecting the row coding tables of all rows of the matrix variable M.
(S2)置一个当前扫描子模式的序号j,并令j=0,同时设置一个指针矩阵B,大小为G×H,用于表示每个像素指向的区域。(S2) Set a serial number j of the current scanning sub-mode, and make j=0, and set a pointer matrix B at the same time, the size is G×H, which is used to indicate the area pointed to by each pixel.
(S3)在坐标表中得到W[j]。(S3) Obtain W[j] in the coordinate table.
(S4)根据W[j],算出当前子模式的大小size和左边界、上边界坐标信息。(S4) According to W[j], calculate the size, left boundary and upper boundary coordinate information of the current sub-mode.
(S5)从左边界最下方开始,往上扫描,对每个左边界像素L找出它左边的一个像素LL(即LL在X方向比L小1),并利用矩阵B找出像素L和像素LL所属的区域,再用带按秩合并和路径压缩策略的并查集算法找出这两个区域的祖先区域,若两个区域是同一区域,则跳到下一个像素,否则,如果两个区域不属于同一区域,则根据均值和方差判断这两个祖先是否可合并。(S5) Start from the bottom of the left boundary, scan upwards, find a pixel LL on the left of each left boundary pixel L (that is, LL is 1 smaller than L in the X direction), and use matrix B to find the pixel L and The area to which the pixel LL belongs, and then use the union search algorithm with rank-based merging and path compression strategies to find out the ancestor areas of these two areas. If the two areas are the same area, skip to the next pixel. Otherwise, if both If two regions do not belong to the same region, it is judged whether the two ancestors can be merged according to the mean and variance.
本步骤和下一步骤中所用的2个数据结构如下:The 2 data structures used in this step and the next step are as follows:
①Region数据结构域:①Region data structure domain:
{Mean,Var,Size,Father,Count,EdgeLink}{Mean, Var, Size, Father, Count, EdgeLink}
其中Mean表示此区域的灰度均值,Var表示此区域的灰度方差,Size表示此区域的大小,即像素数,这三个域用来支持区域的合并操作。域Father是一个指针,用来指向此区域的父节点,Count用来这个区域的后代区域的数量,以上两个域用来支持并查集算法。域EdgeLink指向这个区域的边界,可以用来追踪此区域的边界信息。Among them, Mean indicates the gray level mean value of this area, Var indicates the gray level variance of this area, and Size indicates the size of this area, that is, the number of pixels. These three fields are used to support the merging operation of the area. The field Father is a pointer to point to the parent node of this area, Count is used for the number of descendant areas of this area, and the above two fields are used to support the union search algorithm. Field EdgeLink points to the boundary of this area, which can be used to track the boundary information of this area.
②Edge数据结构域:②Edge data structure domain:
{PreLink,First,Last,SucLink}{PreLink, First, Last, SucLink}
PreLink和SucLink用来支持双向链表,First和Last指向角落顶点的起点和终点。PreLink and SucLink are used to support doubly linked lists, and First and Last point to the start and end points of corner vertices.
(S6)左边界扫描完毕后,从上边界最左方开始,往右扫描,对每个上边界像素T找出它上边一个像素TT(即TT在Y方向比T小1),并利用矩阵B找出像素T和像素TT所属的区域,再用带按秩合并和路径压缩策略的并查集算法找出这两个区域的祖先区域,若两个区域是同一区域,则跳到下一个像素;否则,如果两个区域不属于同一区域,则根据均值和方差判断这两个祖先是否可合并。(S6) After the left boundary scanning is completed, start from the leftmost of the upper boundary, scan to the right, and find a pixel TT above it for each upper boundary pixel T (that is, TT is 1 smaller than T in the Y direction), and use the matrix B Find out the area to which pixel T and pixel TT belong, and then use the union search algorithm with rank-based merge and path compression strategy to find the ancestor area of these two areas. If the two areas are the same area, skip to the next one pixels; otherwise, if the two regions do not belong to the same region, judge whether the two ancestors can be merged according to the mean and variance.
(S7)更新边界信息,j++,跳转至(S3),直到所有子模式处理完毕。(S7) Update boundary information, j++, jump to (S3), until all sub-patterns are processed.
(S8)输出二值图像b的边界信息。(S8) Output the boundary information of the binary image b.
本实例对LQT和NAM这两种表示算法进行了比较。所采用的测试图像的大小、名称分别为512×512大小的‘F16’、‘Goldhill’、‘Lena’和‘Peppers’等4幅灰度图像,如图3a、图3b、图3c和图3d所示。This example compares the two representation algorithms LQT and NAM. The size and name of the test images used are 4 grayscale images of 'F16', 'Goldhill', 'Lena' and 'Peppers' with a size of 512×512, as shown in Figure 3a, Figure 3b, Figure 3c and Figure 3d shown.
本实例先给出了NAM和LQT表示方法的实验结果的比较,这2种方法的表示效率可以用以下2个参数进行度量,即:子模式的数目和压缩比。表1(表1为压缩性能的比较表)给出了NAM表示算法和LQT表示算法在压缩性能上的比较。表2(表2为子模式数和块数的比较表)给出了NAM和LQT表示算法在子模式数和块数的数目上的比较。This example first gives a comparison of the experimental results of the NAM and LQT representation methods. The representation efficiency of these two methods can be measured by the following two parameters, namely: the number of sub-patterns and the compression ratio. Table 1 (Table 1 is a comparison table of compression performance) shows the comparison of the compression performance of the NAM representation algorithm and the LQT representation algorithm. Table 2 (Table 2 is a comparison table between the number of sub-patterns and the number of blocks) shows the comparison of the number of sub-patterns and blocks between NAM and LQT representation algorithms.
表1Table 1
表2Table 2
从表1和2可以看出,对于给定的4幅图像,NAM(LQT)的CR平均为1.3801(0.2862),NAM(LQT)的子模式平均为11585(36633),也即NAM的压缩比是LQT的压缩比的4.8222倍,从而更有利于节省存储空间;而且NAM表示在子模式的数目方面也比LQT表示平均减少了68.38%,从而更有利于提高图像表示的效率和图像处理的速度。As can be seen from Tables 1 and 2, for the given 4 images, the average CR of NAM (LQT) is 1.3801 (0.2862), and the average sub-mode of NAM (LQT) is 11585 (36633), which is the compression ratio of NAM It is 4.8222 times the compression ratio of LQT, which is more conducive to saving storage space; and the number of sub-modes in NAM representation is also reduced by 68.38% on average compared with LQT representation, which is more conducive to improving the efficiency of image representation and the speed of image processing .
综上所述,与LQT表示算法相比,NAM表示算法具有更高的压缩比和更少的块数,从而能够更有效地减少数据存储空间,因而是二值图像的一种更好的表示方法。In summary, compared with the LQT representation algorithm, the NAM representation algorithm has a higher compression ratio and fewer blocks, which can more effectively reduce the data storage space, and thus is a better representation of binary images. method.
如图4a、图4b和图4c所示,为‘Lena’的LQT的分割、合并和边界提取结果;如图5a、图5b和图5c所示,为‘Lena’的NAM的分割、合并和边界提取结果。图4为LQT方法的一个实例,其中,图4a给出了图3c的LQT方法的分割效果,图4b给出了LQT方法的区域合并的效果,图4c给出了用LQT方法提取到的二值图像的边界。图5为NAM方法的一个实例,其中,图5a给出了图3c的LQT方法的分割效果,图5b给出了NAM方法的区域合并的效果,图5c给出了用NAM方法提取到的二值图像的边界。As shown in Figure 4a, Figure 4b and Figure 4c, it is the segmentation, merging and boundary extraction results of the LQT of 'Lena'; as shown in Figure 5a, Figure 5b and Figure 5c, it is the segmentation, merging and Boundary extraction results. Figure 4 is an example of the LQT method, in which, Figure 4a shows the segmentation effect of the LQT method in Figure 3c, Figure 4b shows the effect of the region merging of the LQT method, and Figure 4c shows the two extracted by the LQT method The bounds of the value image. Figure 5 is an example of the NAM method, in which, Figure 5a shows the segmentation effect of the LQT method in Figure 3c, Figure 5b shows the effect of the region merging of the NAM method, and Figure 5c shows the two extracted by the NAM method The bounds of the value image.
下表3(表3为NAM表示与LQT表示的分割性能比较表)所示,为NAM表示与LQT表示的分割效率的比较。The following table 3 (table 3 is the segmentation performance comparison table expressed by NAM and LQT) shows the comparison of the segmentation efficiency expressed by NAM and LQT.
表3table 3
表3中NP表示测试图像的像素总数,单位为个;NBLQT和NBNAM分别表示图像用LQT表示和NAM表示时的子模式的数量,单位为个;NregLQT和NregNAM分别表示图像用LQT表示和NAM表示时分割后的区域的数量,单位为个;TNAM和TLQT分别表示基于LQT表示和基于NAM表示的分割算法的执行时间,单位为毫秒。In Table 3, NP represents the total number of pixels in the test image, and the unit is one; NB LQT and NB NAM represent the number of sub-patterns when the image is represented by LQT and NAM, respectively, and the unit is one; Nreg LQT and Nreg NAM represent the image by LQT T NAM and T LQT represent the execution time of segmentation algorithms based on LQT representation and NAM representation respectively, in milliseconds.
对于给定的4幅图像,NAM(LQT)的CR平均为1.3801(0.2862),NAM(LQT)的子模式平均为11585(36633),也即NAM的压缩比是LQT的压缩比的4.8222倍,从而更有利于节省存储空间;而且NAM表示在子模式的数目方面也比LQT表示平均减少了68.38%,从而更有利于提高图像表示的效率和图像处理的速度.For the given 4 images, the average CR of NAM (LQT) is 1.3801 (0.2862), and the average sub-mode of NAM (LQT) is 11585 (36633), that is, the compression ratio of NAM is 4.8222 times that of LQT. This is more conducive to saving storage space; and the number of sub-patterns in NAM representation is also reduced by 68.38% on average compared with LQT representation, which is more conducive to improving the efficiency of image representation and the speed of image processing.
另外,从表3中不难看出,基于NAM表示的分割算法的执行速度比基于LQT表示的分割算法的执行速度平均提高了92.39%,因而是一种更有效的分割算法。In addition, it is not difficult to see from Table 3 that the execution speed of the segmentation algorithm based on NAM representation is 92.39% higher than that of the segmentation algorithm based on LQT representation, so it is a more effective segmentation algorithm.
综上所述,本实施例的结果证实了分析的正确性。In summary, the results of this example confirm the correctness of the analysis.
上述实施例为本发明较佳的实施方式,但本发明的实施方式并不受上述实施例的限制,其他的任何未背离本发明的精神实质与原理下所作的改变、修饰、替代、组合、简化,均应为等效的置换方式,都包含在本发明的保护范围之内。The above-mentioned embodiment is a preferred embodiment of the present invention, but the embodiment of the present invention is not limited by the above-mentioned embodiment, and any other changes, modifications, substitutions, combinations, Simplifications should be equivalent replacement methods, and all are included in the protection scope of the present invention.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410588458.3A CN104331883B (en) | 2014-10-28 | 2014-10-28 | A kind of image boundary extraction method based on asymmetric inversed placement model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410588458.3A CN104331883B (en) | 2014-10-28 | 2014-10-28 | A kind of image boundary extraction method based on asymmetric inversed placement model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104331883A CN104331883A (en) | 2015-02-04 |
CN104331883B true CN104331883B (en) | 2017-06-06 |
Family
ID=52406603
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410588458.3A Expired - Fee Related CN104331883B (en) | 2014-10-28 | 2014-10-28 | A kind of image boundary extraction method based on asymmetric inversed placement model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104331883B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110798332B (en) | 2018-08-03 | 2022-09-06 | Emc Ip控股有限公司 | Method and system for searching directory access groups |
CN109993762B (en) * | 2019-02-21 | 2022-12-16 | 华南理工大学 | Rapid edge detection method based on asymmetric inverse layout mode |
CN111060116B (en) * | 2019-12-04 | 2023-07-18 | 江西洪都航空工业集团有限责任公司 | Independent grassland map building system based on vision |
CN113706639B (en) * | 2021-07-21 | 2024-02-23 | 国网江苏省电力有限公司电力科学研究院 | Image compression method and device based on rectangular NAM, storage medium and computing equipment |
CN117119119B (en) * | 2023-08-24 | 2024-06-11 | 深圳市丕微科技企业有限公司 | Compression transmission method, device and system for image data |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102572431A (en) * | 2011-12-29 | 2012-07-11 | 华南理工大学 | Overlapping rectangular subpattern-based non-symmetry and anti-packing model (NAM) image representation method |
CN102629387A (en) * | 2012-02-29 | 2012-08-08 | 华南理工大学 | Image geometry moment processing method based on non-symmetry and anti-packing pattern representation model |
-
2014
- 2014-10-28 CN CN201410588458.3A patent/CN104331883B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102572431A (en) * | 2011-12-29 | 2012-07-11 | 华南理工大学 | Overlapping rectangular subpattern-based non-symmetry and anti-packing model (NAM) image representation method |
CN102629387A (en) * | 2012-02-29 | 2012-08-08 | 华南理工大学 | Image geometry moment processing method based on non-symmetry and anti-packing pattern representation model |
Non-Patent Citations (5)
Title |
---|
《A New Fast Edge Detection Algorithm》;Wu xueli等;《Geo-spatial Information Science》;20091231;第12卷(第4期);281-288 * |
《一种快速彩色图像颜色分割算法》;费峥峰等;《微计算机信息》;20071031;第23卷(第29期);185-187 * |
《一种快速边缘检测算法》;吴雪丽等;《小型微型计算机系统》;20120630;第33卷(第6期);1300-1305 * |
《基于图的NAM表示及其上的显著性区域检测》;彭俊杰;《中国优秀硕士学位论文全文数据库 信息科技辑》;20130715;第2013年卷(第07期);I138-952 * |
《基于斜面分解的非对称逆布局图像表示方法与处理算法研究》;吴雪丽;《中国博士学位论文全文数据库 信息科技辑》;20091115;第2009年卷(第11期);I138-55 * |
Also Published As
Publication number | Publication date |
---|---|
CN104331883A (en) | 2015-02-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104331883B (en) | A kind of image boundary extraction method based on asymmetric inversed placement model | |
CN111915487B (en) | Face super-resolution method and device based on hierarchical multi-scale residual fusion network | |
CN101706950B (en) | High-performance implementation method for multi-scale segmentation of remote sensing images | |
CN104318560B (en) | A kind of image partition method based on asymmetric inversed placement model | |
CN102800094A (en) | Fast color image segmentation method | |
CN105701759A (en) | Map vector line element corner reasonability drafting method based on graphics processing unit (GPU) | |
CN104637066B (en) | The quick framework extraction method of bianry image based on sequential refinement | |
CN105574887A (en) | Quick high-resolution remote sensing image segmentation method | |
CN100375124C (en) | A Skeleton Object Reconstruction Method | |
CN111695293A (en) | Full-automatic intelligent color matching method and monitoring method for textile oversized design drawing based on color palette | |
CN105046632B (en) | The efficient bianry image dyadic logical operation method of space-time | |
CN101114379A (en) | A method to determine whether a point is inside a polygon | |
CN105608713B (en) | A kind of bi-level image coding based on quaternary tree and efficient logical operation method | |
CN101826213A (en) | Method for filling area based on chain code description | |
CN103914825A (en) | Three-dimensional model texture coloring method based on image segmentation | |
CN101533525A (en) | Method for analyzing the overlay of point and face | |
CN1584932A (en) | Optimizing method for image transfigure border side tracking | |
CN118429480B (en) | A method for converting non-vector PDF drawings to CAD vector drawings | |
CN103514612A (en) | Color image processing method | |
CN108062758A (en) | A kind of crowd based on image segmentation algorithm generates emulation mode and system | |
CN106097350A (en) | The image curve extracting method that a kind of chain code combines with graph-theory techniques | |
Kropatsch | Equivalent contraction kernels and the domain of dual irregular pyramids | |
CN102129664A (en) | Method for compressing, storing and restoring pixel information of RGB (Red, Green and Blue) space image region | |
CN113256645B (en) | Color image segmentation method based on improved density clustering | |
CN102841926A (en) | Scale-adaptive bitmap embedded coding method of element of vector data set |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170606 Termination date: 20211028 |