WO2018053710A1 - Morphological processing method of digital image and digital image processing device - Google Patents

Morphological processing method of digital image and digital image processing device Download PDF

Info

Publication number
WO2018053710A1
WO2018053710A1 PCT/CN2016/099580 CN2016099580W WO2018053710A1 WO 2018053710 A1 WO2018053710 A1 WO 2018053710A1 CN 2016099580 W CN2016099580 W CN 2016099580W WO 2018053710 A1 WO2018053710 A1 WO 2018053710A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
detected
point
digital image
matrix
Prior art date
Application number
PCT/CN2016/099580
Other languages
French (fr)
Chinese (zh)
Inventor
方春
王兵
Original Assignee
深圳市汇顶科技股份有限公司
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 深圳市汇顶科技股份有限公司 filed Critical 深圳市汇顶科技股份有限公司
Priority to PCT/CN2016/099580 priority Critical patent/WO2018053710A1/en
Priority to CN201680000942.7A priority patent/CN106663317B/en
Publication of WO2018053710A1 publication Critical patent/WO2018053710A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20036Morphological image processing

Definitions

  • the matrix of relative positions of all the pixels in the first pixel set and the pixel to be detected is a first direction expansion matrix.
  • the first direction expansion matrix may be a position matrix of the pixel points included in the first structure diagram and not included in the second structure diagram with respect to the origin of the first structure diagram, and the second structure diagram is for expanding the digital image.
  • the pixel to be detected is a pixel of the third row and the third column in (a) of FIG. 1 , although the pixel is a boundary point, since there is no pixel point that has been detected around the pixel, the pixel is not a direction.
  • the expansion point is thus subjected to a conventional expansion operation on the pixel to obtain a pixel value as shown in (a) of FIG.
  • the pixel to be detected is a directional expansion point
  • the pixel value of the pixel in the digital image and the position of the pixel to be detected that satisfies the direction expansion matrix is directly set to the pixel to be detected according to the direction expansion matrix.
  • the pixel values are the same, without the need for traditional expansion operations, which can reduce the amount of computation and save computation time.
  • the processing module is further configured to: when the pixel to be detected is not the direction expansion point, use the structural element matrix to perform an expansion operation on the pixel to be detected.
  • FIG. 6 is a schematic structural diagram of a digital image processing apparatus according to another embodiment of the present invention.
  • Digital image processing device 600 includes a memory 610 and a processor 620.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

Provided are a morphological processing method of a digital image and a digital image processing device. The morphological processing method of the digital image comprises: determining whether a to-be-detected pixel point in the digital image is a boundary point; if the to-be-detected pixel point is a boundary point, determining whether the to-be-detected pixel point is a directional dilation point; and if the to-be-detected pixel point is the directional dilation point, assigning pixel values of the pixel points in a first pixel point set in the digital image as a first pixel value, according to a position of the to-be-detected pixel point and a first directional dilation matrix. With the method, the digital image can be morphologically processed easily and quickly.

Description

数字图像的形态学处理方法和数字图像处理装置Morphological processing method of digital image and digital image processing device 技术领域Technical field
本发明涉及图像处理领域,尤其涉及数字图像的形态学处理方法和数字图像处理装置。The present invention relates to the field of image processing, and more particularly to a morphological processing method for digital images and a digital image processing apparatus.
背景技术Background technique
在图像处理过程中,如指纹识别过程中,需要将有效区域从无效区域中识别出来。无效区域主要包括图像中的非按压区域、湿手区域、坏点区域等。为了使得识别出来的有效区域能够更好地覆盖图像中有用的图像信息,如指纹中有用的指纹信息,需要对这些有效区域对应的数字图像进行一定的形态学处理。In the image processing process, such as fingerprint recognition, the effective area needs to be identified from the invalid area. The invalid area mainly includes a non-pressed area, a wet hand area, a bad point area, and the like in the image. In order to enable the identified effective area to better cover useful image information in the image, such as useful fingerprint information in the fingerprint, it is necessary to perform certain morphological processing on the digital image corresponding to the effective area.
数字图像形态学处理的基本思想是:用具有一定形态的结构元素去度量和提取数字图像中的对应形状,达到图像分析和识别的目的。The basic idea of digital image morphology processing is to use a structural element with a certain shape to measure and extract the corresponding shape in the digital image to achieve the purpose of image analysis and recognition.
数字图像形态学处理中包括了腐蚀运算、膨胀运算、开运算和闭运算等运算。而数字图像形态学处理中的各个运算都是以腐蚀运算和膨胀运算为基础的。腐蚀运算和膨胀运算中都需要使用结构元素。结构元素在形态变换中的作用相当于信号处理中的“滤波窗口”。Digital image morphology processing includes operations such as corrosion calculation, expansion calculation, open operation, and closed operation. Each of the operations in digital image morphology processing is based on corrosion and expansion operations. Structural elements are required for both corrosion and expansion operations. The role of structural elements in morphological transformation is equivalent to the "filtering window" in signal processing.
不过,传统的数字图像进行形态学处理,实质上是对数字图像和结构元素的一种二维卷积运算。因此当数字图像的维数比较大时,运算速度会很慢。However, traditional digital images are morphologically processed, essentially a two-dimensional convolution operation on digital images and structural elements. Therefore, when the dimensionality of the digital image is relatively large, the operation speed will be slow.
发明内容Summary of the invention
本发明提供了数字图像的形态学处理方法和数字图像处理装置,可以简单、快速地对数字图像进行形态学处理。The invention provides a morphological processing method for a digital image and a digital image processing device, which can perform morphological processing on a digital image simply and quickly.
第一方面,本发明提供了一种数字图像的形态学处理方法,包括:判断数字图像中的待检测像素点是否为边界点,待检测像素点的像素值为第一像素值;若待检测像素点为边界点,判断待检测像素点是否为方向膨胀点,方向膨胀点为数字图像的边界点,方向膨胀点的第一方向上相邻的像素点为已经进行过检测的边界点,且方向膨胀点的第一方向上相邻的像素点的像素值为第一像素值;若待检测像素点为方向膨胀点,则根据待检测像素点的位置和第一方向膨胀矩阵,将数字图像中的第一像素点集合中的像素点的像素值 赋值为第一像素值;其中,第一像素点集合中所有像素点与待检测像素点的相对位置矩阵为第一方向膨胀矩阵。In a first aspect, the present invention provides a morphological processing method for a digital image, including: determining whether a pixel to be detected in a digital image is a boundary point, and a pixel value of the pixel to be detected is a first pixel value; The pixel point is a boundary point, and it is determined whether the pixel to be detected is a direction expansion point, the direction expansion point is a boundary point of the digital image, and the adjacent pixel point in the first direction of the direction expansion point is a boundary point that has been detected, and The pixel value of the adjacent pixel in the first direction of the direction expansion point is the first pixel value; if the pixel to be detected is the direction expansion point, the digital image is obtained according to the position of the pixel to be detected and the first direction expansion matrix Pixel value of a pixel in the first set of pixel points in The first pixel value is assigned; wherein the relative position matrix of all the pixel points in the first pixel point set and the pixel to be detected is a first direction expansion matrix.
本发明实施例中,当待检测像素点为方向膨胀点时,只需根据方向膨胀矩阵将数字图像中与待检测像素点的位置满足方向膨胀矩阵的像素点的像素值直接置为与待检测像素点的像素值相同即可,而不需要进行传统的膨胀运算,从而可以降低运算量,节省运算时间。In the embodiment of the present invention, when the pixel to be detected is a direction expansion point, the pixel value of the pixel in the digital image and the position of the pixel to be detected that satisfies the direction expansion matrix is directly set to be detected according to the direction expansion matrix. The pixel values of the pixels are the same, and the conventional expansion operation is not required, thereby reducing the amount of calculation and saving the operation time.
可选地,第一方向膨胀矩阵为第一结构图中包含、而第二结构图中不包含的像素点相对于第一结构图的原点的位置矩阵,第二结构图为用于对数字图像进行膨胀运算的结构元素矩阵对应的图像,第一结构图为第一结构图在第二方向上平移后所得的图像,第二方向与第一方向相反。Optionally, the first direction expansion matrix is a position matrix included in the first structure diagram, and the pixel points not included in the second structure diagram are relative to the origin of the first structure diagram, and the second structure diagram is used for the digital image. An image corresponding to the matrix of structural elements performing the expansion operation. The first structural image is an image obtained by translating the first structural image in the second direction, and the second direction is opposite to the first direction.
在一种可能的实现方式中,所述形态学处理方法还包括:若待检测像素点不是方向膨胀点,则使用结构元素矩阵对待检测像素点进行膨胀运算。In a possible implementation manner, the morphological processing method further includes: if the pixel to be detected is not a direction expansion point, performing a dilation operation on the pixel to be detected using the matrix of structural elements.
在一种可能的实现方式中,所述形态学处理方法还包括:若待检测像素点不是边界点,则不对待检测像素点做膨胀运算。In a possible implementation manner, the morphological processing method further includes: if the pixel to be detected is not a boundary point, do not perform an expansion operation on the detected pixel point.
本发明实施例中,不是边界点的像素点不作膨胀运算,可以进一步减少运算量和节省运算时间。In the embodiment of the present invention, the pixel points that are not boundary points are not subjected to the expansion operation, and the calculation amount and the operation time can be further reduced.
在一种可能的实现方式中,判断所述待检测像素点是否为边界点,包括:确定待检测像素点满足以下任意一种条件时,判断待检测像素点为边界点:待检测像素点的位置中的横坐标为横坐标最小值或横坐标最大值,待检测点的位置中的纵坐标为纵坐标最小值或纵坐标最大值,待检测像素点与待检测像素点的至少一个相邻像素点的像素值不相等。In a possible implementation manner, determining whether the pixel to be detected is a boundary point comprises: determining that the pixel to be detected satisfies any one of the following conditions, and determining that the pixel to be detected is a boundary point: a pixel to be detected The abscissa in the position is the minimum value of the abscissa or the maximum value of the abscissa, and the ordinate in the position of the point to be detected is the ordinate minimum or the ordinate maximum, and the pixel to be detected is adjacent to at least one of the pixels to be detected. The pixel values of the pixels are not equal.
第二方面,本发明提供了一种数字图像处理装置,所述数字图像处理装置包括用于执行第一方面或第一方面中任意一种可能的实现方式中的形态学处理方法的模块。In a second aspect, the present invention provides a digital image processing apparatus comprising means for performing the morphological processing method of the first aspect or any of the possible implementations of the first aspect.
第三方面,本发明提供了一种数字图像处理装置,包括处理器和存储器,所述存储器用于存储代码,所述处理器用于执行所述存储器中的代码。当所述代码被执行时,所述处理器实现第一方面或第一方面中任意一种可能的实现方式中的形态学处理方法。In a third aspect, the present invention provides a digital image processing apparatus including a processor and a memory for storing code, the processor for executing code in the memory. When the code is executed, the processor implements a morphological processing method in any one of the possible implementations of the first aspect or the first aspect.
第四方面,本发明提供了一种计算机可读介质,所述计算机可读介质存储用于数字图像处理装置执行的程序代码,所述程序代码包括用于执行第一方面中或第一方面中任意一种可能的实现方式中的形态学处理方法的指令。 In a fourth aspect, the present invention provides a computer readable medium storing program code for execution by a digital image processing apparatus, the program code comprising for performing in the first aspect or in the first aspect An instruction of a morphological processing method in any of the possible implementations.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings to be used in the embodiments of the present invention will be briefly described below. It is obvious that the drawings described below are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without paying any creative work.
图1是本发明实施例的待处理数字图像和结构图的示意图。1 is a schematic diagram of a digital image and a structure diagram to be processed in accordance with an embodiment of the present invention.
图2是本发明实施例的数字图像的形态学处理方法的示意性流程图。2 is a schematic flow chart of a morphological processing method of a digital image according to an embodiment of the present invention.
图3是本发明实施例的方向膨胀矩阵的示意图。3 is a schematic diagram of a directional expansion matrix of an embodiment of the present invention.
图4是本发明实施例的数字图像的形态学处理方法的示意图。4 is a schematic diagram of a morphological processing method of a digital image according to an embodiment of the present invention.
图5是本发明实施例的数字图像处理装置的示意性结构图。Fig. 5 is a schematic structural diagram of a digital image processing apparatus according to an embodiment of the present invention.
图6是本发明实施例的数字图像处理装置的示意性结构图。Fig. 6 is a schematic structural diagram of a digital image processing apparatus according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
通常来说,对二值图像进行腐蚀运算和膨胀运算的操作过程一般采用以下方式。假设用B代表结构元素矩阵,用E代表二值图像的像素矩阵,则用结构元素矩阵B对像素矩阵E进行腐蚀运算就是:扫描二值图像的每一个像素,用结构元素矩阵与其覆盖的二值图像做“与”操作,如果都为1,则该二值图像中该像素点的值1,否则为0。而用结构元素矩阵B对像素矩阵E进行膨胀就是:扫描二值图像的每一个像素,用结构元素矩阵与其覆盖的二值图像做“与”操作,如果都为0,结果图像的该像素为0,否则为1。Generally speaking, the operation of performing the etching operation and the expansion operation on the binary image generally adopts the following manner. Assuming that B represents a matrix of structural elements, and E represents a pixel matrix of a binary image, the etching operation of the pixel matrix E with the structural element matrix B is: scanning each pixel of the binary image, using the matrix of structural elements and the two The value image is ORed. If both are 1, the value of the pixel in the binary image is 1, otherwise it is 0. The expansion of the pixel matrix E by the structural element matrix B is: scanning each pixel of the binary image, and performing an AND operation with the binary image covered by the structural element matrix. If both are 0, the pixel of the resulting image is 0, otherwise 1.
图1是本发明实施例的待处理数字图像和结构图的示意图。1 is a schematic diagram of a digital image and a structure diagram to be processed in accordance with an embodiment of the present invention.
如图1中的(a)所示,待处理数字图像为二值图像,其中的像素点的像素值分别为1和0。像素值为1的点为有效区域,像素值为0的点为无线区域。结构元素矩阵对应的结构图如图1中的(b)所示。As shown in (a) of FIG. 1, the digital image to be processed is a binary image in which the pixel values of the pixel points are 1 and 0, respectively. A point with a pixel value of 1 is a valid area, and a point with a pixel value of 0 is a wireless area. The structure diagram corresponding to the matrix of structural elements is shown in (b) of FIG.
一般而言,使用图1的(b)中的结构元素矩阵对图1的(a)中的二值 图像进行膨胀运算时,通常是使用图1的(b)中的结构元素矩阵从左到右、从上到下,依次对图1的(a)中的二值图像中像素值为1的待检测像素点进行膨胀运算。这种数字图像处理方法运算量较大,时间较大。In general, the binary values in (a) of Fig. 1 are used using the matrix of structural elements in (b) of Fig. 1. When the image is subjected to the expansion operation, the matrix of the structural elements in (b) of FIG. 1 is used to sequentially perform the pixel value of 1 in the binary image in (a) of FIG. 1 from left to right and from top to bottom. The pixel is detected for expansion operation. This digital image processing method has a large amount of computation and a large time.
因此本发明实施例提出了一种数字图像的形态学处理方法,具体内容为:当待检测像素点为数字图像中的边界点时,根据该边界点相邻的像素点是否满足预设条件来对该边界点进行传统的膨胀运算还是本发明实施例中提出的特定的膨胀运算,以减少运算量,节省运算时间。Therefore, the embodiment of the present invention provides a morphological processing method for a digital image, where the specific content is: when the pixel to be detected is a boundary point in the digital image, according to whether the pixel adjacent to the boundary point satisfies a preset condition. The conventional expansion operation on the boundary point is also a specific expansion operation proposed in the embodiment of the present invention to reduce the amount of calculation and save computation time.
图2为本发明实施例的数字图像的形态学处理方法的示意性流程图。应理解,图2示出了形态学处理方法的步骤或操作,但这些步骤或操作仅是示例,本发明实施例还可以执行其他操作或者图2中的各个操作的变形。此外,图2中的各个步骤可以按照与图2呈现的不同的顺序来执行,并且有可能并非要执行图2中的全部操作。图2中的数字图像的形态学处理方法可以由数字图像处理装置执行。FIG. 2 is a schematic flowchart of a morphological processing method of a digital image according to an embodiment of the present invention. It should be understood that FIG. 2 illustrates steps or operations of the morphological processing method, but these steps or operations are merely examples, and embodiments of the present invention may perform other operations or variations of the various operations in FIG. 2. Moreover, the various steps in FIG. 2 may be performed in a different order than that presented in FIG. 2, and it is possible that not all operations in FIG. 2 are to be performed. The morphological processing method of the digital image in Fig. 2 can be performed by a digital image processing apparatus.
S210,判断数字图像中的待检测像素点是否为边界点。其中,该待检测像素点的像素值为第一像素值。S210. Determine whether a pixel to be detected in the digital image is a boundary point. The pixel value of the pixel to be detected is a first pixel value.
该数字图像可以是二值图像,如像素点的像素值为1或0。待检测像素点的第一像素值可以为二值图像中的两种像素值中的任一项一种,如可以为1,也可以为0,即第一像素值可以为1,也可以为0。The digital image may be a binary image, such as a pixel having a pixel value of 1 or 0. The first pixel value of the pixel to be detected may be any one of two pixel values in the binary image, and may be 1 or 0, that is, the first pixel value may be 1, or may be 0.
S220,若待检测像素点为边界点,判断待检测像素点是否为方向膨胀点。其中,方向膨胀点为数字图像的边界点,且方向膨胀点在第一方向上相邻的像素点为已经进行过检测的边界点,并且方向膨胀点在第一方向上相邻的像素点的像素值也为第一像素值。S220: If the pixel to be detected is a boundary point, determine whether the pixel to be detected is a direction expansion point. Wherein, the direction expansion point is a boundary point of the digital image, and the pixel point adjacent to the direction expansion point in the first direction is a boundary point that has been detected, and the direction expansion point is adjacent to the pixel point in the first direction The pixel value is also the first pixel value.
在S210中判断待检测像素点为边界点后,进一步判断该待检测点是否为方向膨胀点。方向膨胀点的定义为:若某个边界点在某个方向上相邻的边界点在此之前已经检测过或进行过膨胀运算,且该边界点与其相邻的这个边界点都同为第一像素值,则该边界点为方向膨胀点。此处所说的检测包括判断过是否需要进行膨胀运算的像素点,此处的膨胀运算包括传统的膨胀运算和本发明实施例特殊的方向膨胀运算。After determining that the pixel to be detected is a boundary point in S210, it is further determined whether the point to be detected is a direction expansion point. The direction expansion point is defined as: if a boundary point in a certain direction has been detected or expanded before, and the boundary point is the same as the adjacent boundary point. For the pixel value, the boundary point is the direction expansion point. The detection referred to herein includes determining whether or not a pixel point for performing the expansion operation is required, and the expansion operation herein includes a conventional expansion operation and a special direction expansion operation of the embodiment of the present invention.
S230,若待检测像素点为所述方向膨胀点,则根据待检测像素点的位置和第一方向膨胀矩阵,将所述数字图像中的第一像素点集合中的像素点的像素值赋值为所述第一像素值。 S230, if the pixel to be detected is the direction expansion point, assigning a pixel value of a pixel point in the first pixel point set in the digital image according to a position of the pixel to be detected and a first direction expansion matrix. The first pixel value.
其中,第一像素点集合中所有像素点与待检测像素点的相对位置矩阵为第一方向膨胀矩阵。第一方向膨胀矩阵可以为包含在第一结构图中而不包含在第二结构图中的像素点相对于第一结构图的原点的位置矩阵,第二结构图为用于对数字图像进行膨胀运算的结构元素矩阵对应的图像,第一结构图为第一结构图在第二方向上平移后所得的图像,其中,第二方向与第一方向相反。The matrix of relative positions of all the pixels in the first pixel set and the pixel to be detected is a first direction expansion matrix. The first direction expansion matrix may be a position matrix of the pixel points included in the first structure diagram and not included in the second structure diagram with respect to the origin of the first structure diagram, and the second structure diagram is for expanding the digital image. An image corresponding to the matrix of the structural elements of the operation, wherein the first structural image is an image obtained by translating the first structural image in the second direction, wherein the second direction is opposite to the first direction.
可选地,该形态学处理方法中的第一方向可以是上方、下方、左方、右方、右上方、右下方、左上方或左下方中的任一方向,相对应地,第二方向可以是下方、上方、右方、左方、左下方、左上方、右下方或走上方中的任一方向。Optionally, the first direction in the morphological processing method may be any one of upper, lower, left, right, upper right, lower right, upper left, or lower left, correspondingly, the second direction It can be any of the lower, upper, right, left, lower left, upper left, lower right, or upper.
若在S220中判断待检测像素点为方向膨胀点时,对待检测像素点做特殊的方向膨胀运算,而不是传统的膨胀运算。下面具体介绍本发明实施例中的特殊的膨胀运算。If it is determined in S220 that the pixel to be detected is a direction expansion point, a special direction expansion operation is performed on the pixel to be detected instead of the conventional expansion operation. The specific expansion operation in the embodiment of the present invention will be specifically described below.
对数字图像进行形态学处理时,都会有一个用于进行膨胀运算的结构元素矩阵,该结构元素矩阵对应一个第二结构图,第二结构图有预定义的原点。将第二结构图向上、下、左、右、右上、右下、左上或左下等方向移动一个单位后分别得到对应的第一结构图,第一结构图也有预定义的原点。When morphologically processing a digital image, there is a matrix of structural elements for performing an expansion operation, the structural element matrix corresponding to a second structural diagram, and the second structural diagram having a predefined origin. Moving the second structure diagram upwards, downwards, left, right, upper right, lower right, upper left, or lower left to obtain a corresponding first structural diagram, and the first structural diagram also has a predefined origin.
第二结构图中包含了一部分并未包含在第一结构图中的像素点,这些像素点与第二结构图的原点的相对位置即组成了方向膨胀矩阵。第一结构图在不同方向上平移后分别得到的不同方向的第二结构图均有对应的方向膨胀矩阵。The second structure diagram includes a part of the pixel points not included in the first structure diagram, and the relative positions of the pixel points and the origin of the second structure diagram constitute a directional expansion matrix. The second structural diagrams in different directions obtained by the first structural diagram being translated in different directions respectively have corresponding directional expansion matrices.
如图3所示,其中(a)、(b)、(c)和(d)中带斜线的格子分别为图1的(b)中的结构图向右、向下、向右下和向左下平移一个单位后包含而移动前的结构图不包含的像素点,则对应的方向膨胀矩阵中存储了各自对应的带斜线的格子相对应原点的坐标。As shown in FIG. 3, the slanted grids in (a), (b), (c), and (d) are the structure diagrams in (b) of FIG. 1 to the right, the downward, the lower right, and After shifting one unit to the lower left and including pixels that are not included in the structure diagram before the movement, the corresponding direction expansion matrix stores the coordinates of the corresponding grid corresponding to the diagonal line.
当判断待检测像素点为方向膨胀点,且确定该待检测像素点在第一方向上的且同像素值的相邻边界点已经检测过时,可以取出在结构元素矩阵对应的多个方向膨胀矩阵中将第一结构图向与第一方向相反的方向移动后得到对应的方向膨胀矩阵,为了后续描述方便,将该方向膨胀矩阵称为第一方向膨胀矩阵。为了后续描述方便,将与第一方向相反的方向称为第二方向。When it is determined that the pixel to be detected is a direction expansion point, and it is determined that the pixel to be detected is in the first direction and the adjacent boundary point of the same pixel value has been detected, the multiple direction expansion matrix corresponding to the matrix of the structural element may be extracted. The first structural diagram is moved in a direction opposite to the first direction to obtain a corresponding directional expansion matrix. For convenience of subsequent description, the directional expansion matrix is referred to as a first directional expansion matrix. For convenience of subsequent description, a direction opposite to the first direction is referred to as a second direction.
接下来,根据该第一方向膨胀矩阵对待检测像素点进行特殊的膨胀运 算,具体步骤可以为:将数字图像中与待检测像素点的相对位置包含于第一方向膨胀矩阵中的所有像素点的像素值置为第一像素值,即置为与待检测像素点的像素值相同。Next, according to the first direction expansion matrix, a special expansion operation is performed on the pixel to be detected. The specific step may be: setting the pixel value of all the pixels in the digital image including the relative position of the pixel to be detected in the first direction expansion matrix to the first pixel value, that is, setting the pixel point to be detected. The pixel values are the same.
如图4所示,使用图1的(b)所示的结构运算矩阵对图1的(a)所示的数字图像中像素值为1的像素点做形态学膨胀运算。As shown in FIG. 4, a morphological expansion operation is performed on a pixel point having a pixel value of 1 in the digital image shown in (a) of FIG. 1 using the structural operation matrix shown in (b) of FIG.
若待检测像素点为图1中(a)的第三行第三列的像素点时,虽然该像素点为边界点,由于其周围并没有已经检测过的像素点,所以该像素点不是方向膨胀点,因此对该像素点做传统的膨胀运算,得到具有如图4中的(a)所示的像素值。If the pixel to be detected is a pixel of the third row and the third column in (a) of FIG. 1 , although the pixel is a boundary point, since there is no pixel point that has been detected around the pixel, the pixel is not a direction. The expansion point is thus subjected to a conventional expansion operation on the pixel to obtain a pixel value as shown in (a) of FIG.
若待检测像素点为图1的(a)中的第三行第四列的像素点,则因为该像素点的左方的相邻像素点为边界点,且已经检测过,并且像素值也同为1,因此该像素点为方向膨胀点,然后可以根据图3的(a)中所示的向右方向膨胀矩阵将图4的(a)中的第一像素点集合中的像素点的像素值置为1,得到如图4的(b)所示的像素值。其中,第一像素集合点中的像素点与待检测像素点的相对位置组成的矩阵为向右方向膨胀矩阵,第一像素集合点中的像素点即为带斜线的格子表示的像素点。If the pixel to be detected is the pixel of the third row and the fourth column in (a) of FIG. 1 , since the adjacent pixel on the left side of the pixel is a boundary point and has been detected, and the pixel value is also Same as 1, so the pixel is a directional expansion point, and then the pixel in the first pixel point set in (a) of FIG. 4 can be expanded according to the rightward expansion matrix shown in (a) of FIG. The pixel value is set to 1, and a pixel value as shown in (b) of FIG. 4 is obtained. The matrix formed by the relative positions of the pixels in the first pixel collection point and the pixel to be detected is a rightward expansion matrix, and the pixel in the first pixel collection point is a pixel represented by a diagonally-lined lattice.
由此可知,当待检测像素点为方向膨胀点时,只需根据方向膨胀矩阵将数字图像中与待检测像素点的位置满足方向膨胀矩阵的像素点的像素值直接置为与待检测像素点的像素值相同即可,而不需要进行传统的膨胀运算,从而可以降低运算量,节省运算时间。Therefore, when the pixel to be detected is a directional expansion point, the pixel value of the pixel in the digital image and the position of the pixel to be detected that satisfies the direction expansion matrix is directly set to the pixel to be detected according to the direction expansion matrix. The pixel values are the same, without the need for traditional expansion operations, which can reduce the amount of computation and save computation time.
在本发明实施例中,当判断待检测像素点不是方向膨胀点时,如待检测像素点是边界点但不是方向膨胀点,或待检测像素点为非边界点时,可以使用结构元素矩阵对待检测像素点进行膨胀运算,即可以使用结构元素矩阵对非方向膨胀点进行传统的膨胀运算。In the embodiment of the present invention, when it is determined that the pixel to be detected is not a direction expansion point, if the pixel to be detected is a boundary point but not a direction expansion point, or the pixel to be detected is a non-boundary point, the structural element matrix may be used. The pixel is detected for expansion operation, that is, the structural element matrix can be used to perform a conventional expansion operation on the non-directional expansion point.
本发明实施例中,进一步地,若判断待检测像素点不是边界点,且其它像素点做膨胀运算时,需要改变该待检测像素点的像素值,则该待检测像素点的像素值为上述改变后的像素值。当然,也可以不对待检测像素点做传统的或本发明实施例特殊的膨胀运算。而是可以保留将该待检测像素点的原像素值,然后对下一个待检测像素点进行检测。这样可以进一步减小运算量和节省运算时间。In the embodiment of the present invention, if it is determined that the pixel to be detected is not a boundary point and the other pixel points are subjected to the expansion operation, and the pixel value of the pixel to be detected needs to be changed, the pixel value of the pixel to be detected is the above. The changed pixel value. Of course, it is also possible to perform the expansion operation of the conventional or the embodiment of the present invention without treating the pixel. Instead, the original pixel value of the pixel to be detected can be retained, and then the next pixel to be detected is detected. This can further reduce the amount of calculation and save computing time.
本发明实施例中,判断待检测像素点是否为边界点时,具体可以在确定 待检测像素点满足以下任意一种条件时,判断待检测像素点为边界点:待检测像素点的位置中的横坐标为横坐标最小值或横坐标最大值,待检测点的位置中的纵坐标为纵坐标最大值或纵坐标最大值,待检测像素点与待检测像素点的至少一个相邻像素点的像素值不相等。In the embodiment of the present invention, when determining whether the pixel to be detected is a boundary point, specifically determining When the pixel to be detected satisfies any of the following conditions, it is determined that the pixel to be detected is a boundary point: the abscissa in the position of the pixel to be detected is the minimum value of the abscissa or the maximum value of the abscissa, and the position in the position of the point to be detected The coordinates are the maximum value of the ordinate or the maximum value of the ordinate, and the pixel values of the pixel to be detected and at least one adjacent pixel of the pixel to be detected are not equal.
如当所有待检测像素点的横坐标中的最小值为0时,若某个待检测像素点的像素值为0,则该待检测像素点为边界点;再如当所有待检测像素点的纵坐标中的最小值为1时,所某个待检测像素点的像素值为1,则该待检测像素点为边界点。For example, when the minimum value in the abscissa of all the pixels to be detected is 0, if the pixel value of a pixel to be detected is 0, the pixel to be detected is a boundary point; and when all the pixels to be detected are When the minimum value in the ordinate is 1, when the pixel value of a pixel to be detected is 1, the pixel to be detected is a boundary point.
另外,当需要对数字图像对第一像素值的像素点做腐蚀运算时,可以将用于腐蚀运算的结构元素矩阵作为膨胀运算的结构元素矩阵,然后使用上述形态学处理方法对数字图像中像素值为第二像素值的所有像素点做处理。In addition, when it is required to perform an etching operation on the pixel points of the first pixel value of the digital image, the matrix of the structural elements used for the etching operation may be used as a matrix of structural elements of the expansion operation, and then the pixels in the digital image are processed using the above morphological processing method. All pixels that have a value of the second pixel value are processed.
图5为本发明实施例的数字图像处理装置的示意性结构图。应理解,图5示出的数字图像处理装置500仅是示例,本发明实施例的数字图像处理装置还可包括其他模块或单元,或者包括与图5中的各个模块的功能相似的模块,或者并非要包括图5中的所有模块。FIG. 5 is a schematic structural diagram of a digital image processing apparatus according to an embodiment of the present invention. It should be understood that the digital image processing apparatus 500 illustrated in FIG. 5 is merely an example, and the digital image processing apparatus of the embodiment of the present invention may further include other modules or units, or include modules similar in function to the respective modules in FIG. 5, or It is not necessary to include all the modules in Figure 5.
510,判断模块,用于判断所述数字图像中的待检测像素点是否为边界点,所述待检测像素点的像素值为第一像素值。510. The determining module is configured to determine whether a pixel to be detected in the digital image is a boundary point, and a pixel value of the pixel to be detected is a first pixel value.
判断模块510还用于在所述待检测像素点为边界点时,判断所述待检测像素点是否为方向膨胀点,所述方向膨胀点在第一方向上相邻的像素点为已经进行过检测的边界点,且所述方向膨胀点在第一方向上相邻的像素点的像素值同为第一像素值。The determining module 510 is further configured to: when the pixel to be detected is a boundary point, determine whether the pixel to be detected is a direction expansion point, and the pixel point adjacent to the direction expansion point in the first direction is already performed. The detected boundary points, and the pixel values of the pixel points adjacent to the direction expansion point in the first direction are the same as the first pixel value.
处理模块520,用于在所述待检测像素点为所述方向膨胀点时,根据所述待检测像素点的位置和第一方向膨胀矩阵,将所述数字图像中的第一像素点集合中的像素点的像素值赋值为所述第一像素值。The processing module 520 is configured to: when the pixel to be detected is the direction expansion point, set the first pixel point in the digital image according to the position of the pixel to be detected and the first direction expansion matrix The pixel value of the pixel is assigned to the first pixel value.
其中,所述第一像素点集合中所有像素点与所述待检测像素点的相对位置矩阵为所述第一方向膨胀矩阵,所述第一方向膨胀矩阵为包含在第一结构图中而不包含在第二结构图中的像素点相对于所述第一结构图的原点的位置矩阵,所述第二结构图为用于对所述数字图像进行膨胀运算的结构元素矩阵对应的图像,所述第一结构图为所述第一结构图在第二方向上平移后所得的图像,其中,所述第二方向与所述第一方向相反。The matrix of relative positions of all the pixels in the first set of pixel points and the pixel to be detected is the first direction expansion matrix, and the first direction expansion matrix is included in the first structure diagram. a position matrix of a pixel point included in the second structure diagram with respect to an origin of the first structure diagram, the second structure diagram being an image corresponding to a matrix of structural elements for performing expansion operation on the digital image, The first structural diagram is an image obtained by translating the first structural image in a second direction, wherein the second direction is opposite to the first direction.
本发明实施例中,当待检测像素点为方向膨胀点时,只需根据方向膨胀 矩阵将数字图像中与待检测像素点的位置满足方向膨胀矩阵的像素点的像素值直接置为与待检测像素点的像素值相同即可,而不需要进行传统的膨胀运算,从而可以降低运算量,节省运算时间。In the embodiment of the present invention, when the pixel to be detected is a direction expansion point, it only needs to expand according to the direction. The matrix directly sets the pixel value of the pixel in the digital image that satisfies the position of the pixel to be detected to the pixel of the direction expansion matrix to be the same as the pixel value of the pixel to be detected, without performing a conventional expansion operation, thereby reducing the operation Quantity, saving computing time.
可选地,作为一个实施例,所述处理模块还用于:在所述待检测像素点不是所述方向膨胀点时,使用所述结构元素矩阵对所述待检测像素点进行膨胀运算。Optionally, as an embodiment, the processing module is further configured to: when the pixel to be detected is not the direction expansion point, use the structural element matrix to perform an expansion operation on the pixel to be detected.
可选地,作为一个实施例,所述处理模块还用于:在所述待检测像素点不是边界点时,不对所述待检测像素点做膨胀运算。Optionally, as an embodiment, the processing module is further configured to: when the pixel to be detected is not a boundary point, do not perform an expansion operation on the pixel to be detected.
可选地,作为一个实施例,所述处理模块具体用于:确定所述待检测像素点满足以下任意一种条件时,判断所述待检测像素点为边界点:所述待检测像素点的位置中的横坐标为横坐标最小值或横坐标最大值,所述待检测点的位置中的纵坐标为纵坐标最小值或纵坐标最大值,所述待检测像素点与所述待检测像素点的至少一个相邻像素点的像素值不相等。Optionally, as an embodiment, the processing module is specifically configured to: determine that the pixel to be detected is a boundary point when the pixel to be detected meets any one of the following conditions: the pixel to be detected The abscissa in the position is the minimum value of the abscissa or the maximum value of the abscissa, and the ordinate in the position of the point to be detected is the minimum value of the ordinate or the maximum value of the ordinate, and the pixel to be detected and the pixel to be detected The pixel values of at least one adjacent pixel of the point are not equal.
应理解,图5所示本发明实施例的数字图像处理装置的各个模块的上述和其它操作和/或功能分别为了实现图2中的数字图像的形态学处理方法的相应流程,为了简洁,在此不再赘述。It should be understood that the above and other operations and/or functions of the respective modules of the digital image processing apparatus of the embodiment of the present invention shown in FIG. 5 are respectively for the purpose of implementing the corresponding flow of the morphological processing method of the digital image in FIG. This will not be repeated here.
图6为本发明另一个实施例的数字图像处理装置的示意性结构图。数字图像处理装置600包括存储器610和处理器620。FIG. 6 is a schematic structural diagram of a digital image processing apparatus according to another embodiment of the present invention. Digital image processing device 600 includes a memory 610 and a processor 620.
存储器610,用于存储程序。The memory 610 is configured to store a program.
处理器620,用于执行所述存储器610存储的程序。当所述处理器620执行所述存储器610存储的程序时,具体用于判断所述数字图像中的待检测像素点是否为边界点,所述待检测像素点的像素值为第一像素值。The processor 620 is configured to execute a program stored by the memory 610. When the processor 620 executes the program stored in the memory 610, it is specifically used to determine whether a pixel to be detected in the digital image is a boundary point, and a pixel value of the pixel to be detected is a first pixel value.
处理器620还用于在所述待检测像素点为边界点时,判断所述待检测像素点是否为方向膨胀点,所述方向膨胀点在第一方向上相邻的像素点为已经进行过检测的边界点,且所述方向膨胀点在第一方向上相邻的像素点的像素值同为第一像素值。The processor 620 is further configured to: when the pixel to be detected is a boundary point, determine whether the pixel to be detected is a direction expansion point, and the pixel point adjacent to the direction expansion point in the first direction is already performed. The detected boundary points, and the pixel values of the pixel points adjacent to the direction expansion point in the first direction are the same as the first pixel value.
处理器620还用于在所述待检测像素点为所述方向膨胀点时,根据所述待检测像素点的位置和第一方向膨胀矩阵,将所述数字图像中的第一像素点集合中的像素点的像素值赋值为所述第一像素值。The processor 620 is further configured to: when the pixel to be detected is the direction expansion point, set the first pixel point in the digital image according to the position of the pixel to be detected and the first direction expansion matrix The pixel value of the pixel is assigned to the first pixel value.
其中,所述第一像素点集合中所有像素点与所述待检测像素点的相对位置矩阵为所述第一方向膨胀矩阵。 The matrix of relative positions of all the pixels in the first set of pixel points and the pixel to be detected is the first direction expansion matrix.
可选地,所述第一方向膨胀矩阵为包含在第一结构图中而不包含在第二结构图中的像素点相对于所述第一结构图的原点的位置矩阵,所述第二结构图为用于对所述数字图像进行膨胀运算的结构元素矩阵对应的图像,所述第一结构图为所述第一结构图在第二方向上平移后所得的图像,所述第二方向与所述第一方向相反。Optionally, the first direction expansion matrix is a position matrix of a pixel point included in the first structure diagram and not included in the second structure diagram with respect to an origin of the first structure diagram, the second structure The figure is an image corresponding to a structural element matrix for performing an expansion operation on the digital image, and the first structural image is an image obtained by translating the first structural image in a second direction, the second direction and The first direction is opposite.
本发明实施例中,当待检测像素点为方向膨胀点时,只需根据方向膨胀矩阵将数字图像中与待检测像素点的位置满足方向膨胀矩阵的像素点的像素值直接置为与待检测像素点的像素值相同即可,而不需要进行传统的膨胀运算,从而可以降低运算量,节省运算时间。In the embodiment of the present invention, when the pixel to be detected is a direction expansion point, the pixel value of the pixel in the digital image and the position of the pixel to be detected that satisfies the direction expansion matrix is directly set to be detected according to the direction expansion matrix. The pixel values of the pixels are the same, and the conventional expansion operation is not required, thereby reducing the amount of calculation and saving the operation time.
可选地,作为一个实施例,所述处理器620还用于:在所述待检测像素点不是所述方向膨胀点时,使用所述结构元素矩阵对所述待检测像素点进行膨胀运算。Optionally, as an embodiment, the processor 620 is further configured to: when the pixel to be detected is not the direction expansion point, use the structural element matrix to perform an expansion operation on the pixel to be detected.
可选地,作为一个实施例,所述处理器620还用于:在所述待检测像素点不是边界点时,不对所述待检测像素点做膨胀运算。Optionally, as an embodiment, the processor 620 is further configured to: when the pixel to be detected is not a boundary point, do not perform an expansion operation on the pixel to be detected.
可选地,作为一个实施例,所述处理器620具体用于:确定所述待检测像素点满足以下任意一种条件时,判断所述待检测像素点为边界点:所述待检测像素点的位置中的横坐标为横坐标最小值或横坐标最大值,所述待检测点的位置中的纵坐标为纵坐标最小值或纵坐标最大值,所述待检测像素点与所述待检测像素点的至少一个相邻像素点的像素值不相等。Optionally, as an embodiment, the processor 620 is specifically configured to: determine that the pixel to be detected is a boundary point when the pixel to be detected meets any one of the following conditions: the pixel to be detected The abscissa in the position is the minimum value of the abscissa or the maximum value of the abscissa, and the ordinate in the position of the point to be detected is the ordinate minimum or the ordinate maximum, the pixel to be detected and the to-be-detected The pixel values of at least one adjacent pixel of the pixel are not equal.
应理解,图6所示本发明实施例的数字图像处理装置可对应于图5所示的数字图像处理装置,并且各个模块的上述和其它操作和/或功能分别为了实现图2中的数字图像的形态学处理方法的相应流程,为了简洁,在此不再赘述。It should be understood that the digital image processing apparatus of the embodiment of the present invention shown in FIG. 6 may correspond to the digital image processing apparatus shown in FIG. 5, and the above and other operations and/or functions of the respective modules are respectively for implementing the digital image in FIG. The corresponding flow of the morphological processing method will not be repeated here for brevity.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。 A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including The instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。 The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims (10)

  1. 一种数字图像的形态学处理方法,其特征在于,包括:A morphological processing method for digital images, comprising:
    判断所述数字图像中的待检测像素点是否为边界点,所述待检测像素点的像素值为第一像素值;Determining whether a pixel to be detected in the digital image is a boundary point, and a pixel value of the pixel to be detected is a first pixel value;
    若所述待检测像素点为边界点,判断所述待检测像素点是否为方向膨胀点,所述方向膨胀点在第一方向上相邻的像素点为已经进行过检测的边界点,且所述方向膨胀点在第一方向上相邻的像素点的像素值同为第一像素值;If the pixel to be detected is a boundary point, it is determined whether the pixel to be detected is a direction expansion point, and the pixel point adjacent to the direction expansion point in the first direction is a boundary point that has been detected, and The pixel values of the pixel points adjacent to the direction expansion point in the first direction are the same as the first pixel value;
    若所述待检测像素点为所述方向膨胀点,则根据所述待检测像素点的位置和第一方向膨胀矩阵,将所述数字图像中的第一像素点集合中的像素点的像素值赋值为所述第一像素值;If the pixel to be detected is the direction expansion point, the pixel value of the pixel in the first pixel point set in the digital image is determined according to the position of the pixel to be detected and the first direction expansion matrix. Assigned to the first pixel value;
    其中,所述第一像素点集合中所有像素点与所述待检测像素点的相对位置矩阵为所述第一方向膨胀矩阵。The matrix of relative positions of all the pixels in the first set of pixel points and the pixel to be detected is the first direction expansion matrix.
  2. 根据权利要求1所述的形态学处理方法,其特征在于,所述第一方向膨胀矩阵为包含在第一结构图中而不包含在第二结构图中的像素点相对于所述第一结构图的原点的位置矩阵,所述第二结构图为用于对所述数字图像进行膨胀运算的结构元素矩阵对应的图像,所述第一结构图为所述第一结构图在第二方向上平移后所得的图像,所述第二方向与所述第一方向相反。The morphological processing method according to claim 1, wherein the first direction expansion matrix is a pixel point included in the first structure diagram and not included in the second structure diagram with respect to the first structure a position matrix of an origin of the map, the second structure diagram is an image corresponding to a matrix of structural elements for performing an expansion operation on the digital image, the first structure diagram being the first structure diagram in a second direction The resulting image after translation, the second direction being opposite the first direction.
  3. 根据权利要求2所述的形态学处理方法,其特征在于,所述形态学处理方法还包括:The morphological processing method according to claim 2, wherein the morphological processing method further comprises:
    若所述待检测像素点不是所述方向膨胀点,则使用所述结构元素矩阵对所述待检测像素点进行膨胀运算。If the pixel to be detected is not the direction expansion point, the pixel to be detected is expanded by using the matrix of structural elements.
  4. 根据权利要求2或3所述的形态学处理方法,其特征在于,所述形态学处理方法还包括:The morphological processing method according to claim 2 or 3, wherein the morphological processing method further comprises:
    若所述待检测像素点不是边界点,则不对所述待检测像素点做膨胀运算。If the pixel to be detected is not a boundary point, the expansion operation is not performed on the pixel to be detected.
  5. 根据权利要求1至4中任一项所述的形态学处理方法,其特征在于,所述判断所述待检测像素点是否为边界点,包括:The morphological processing method according to any one of claims 1 to 4, wherein the determining whether the pixel to be detected is a boundary point comprises:
    确定所述待检测像素点满足以下任意一种条件时,判断所述待检测像素点为边界点:所述待检测像素点的位置中的横坐标为横坐标最小值或横坐标最大值,所述待检测点的位置中的纵坐标为纵坐标最小值或纵坐标最大值, 所述待检测像素点与所述待检测像素点的至少一个相邻像素点的像素值不相等。Determining that the pixel to be detected is a boundary point when the pixel to be detected satisfies any one of the following conditions: the abscissa in the position of the pixel to be detected is the minimum value of the abscissa or the maximum value of the abscissa. The ordinate in the position of the detected point is the ordinate minimum or the ordinate maximum, The pixel value of the pixel to be detected and the at least one adjacent pixel of the pixel to be detected are not equal.
  6. 一种数字图像处理装置,其特征在于,包括:A digital image processing apparatus, comprising:
    判断模块,用于判断所述数字图像中的待检测像素点是否为边界点,所述待检测像素点的像素值为第一像素值;a determining module, configured to determine whether a pixel to be detected in the digital image is a boundary point, and a pixel value of the pixel to be detected is a first pixel value;
    所述判断模块还用于在所述待检测像素点为边界点时,判断所述待检测像素点是否为方向膨胀点,所述方向膨胀点在第一方向上相邻的像素点为已经进行过检测的边界点,且所述方向膨胀点在第一方向上相邻的像素点的像素值同为第一像素值;The determining module is further configured to: when the pixel to be detected is a boundary point, determine whether the pixel to be detected is a direction expansion point, and the pixel point adjacent to the direction expansion point in the first direction is already performed. a boundary point of the detection, and the pixel value of the pixel adjacent to the direction expansion point in the first direction is the same as the first pixel value;
    处理模块,用于在所述待检测像素点为所述方向膨胀点时,根据所述待检测像素点的位置和第一方向膨胀矩阵,将所述数字图像中的第一像素点集合中的像素点的像素值赋值为所述第一像素值;a processing module, configured to: when the pixel to be detected is the direction expansion point, according to the position of the pixel to be detected and the first direction expansion matrix, the first pixel point set in the digital image Pixel value of the pixel is assigned to the first pixel value;
    其中,所述第一像素点集合中所有像素点与所述待检测像素点的相对位置矩阵为所述第一方向膨胀矩阵。The matrix of relative positions of all the pixels in the first set of pixel points and the pixel to be detected is the first direction expansion matrix.
  7. 根据权利要求6所述的数字图像处理装置,其特征在于,所述第一方向膨胀矩阵为包含在第一结构图中而不包含在第二结构图中的像素点相对于所述第一结构图的原点的位置矩阵,所述第二结构图为用于对所述数字图像进行膨胀运算的结构元素矩阵对应的图像,所述第一结构图为所述第一结构图在第二方向上平移后所得的图像,所述第二方向与所述第一方向相反。The digital image processing apparatus according to claim 6, wherein the first direction expansion matrix is a pixel point included in the first structure diagram and not included in the second structure diagram with respect to the first structure a position matrix of an origin of the map, the second structure diagram is an image corresponding to a matrix of structural elements for performing an expansion operation on the digital image, the first structure diagram being the first structure diagram in a second direction The resulting image after translation, the second direction being opposite the first direction.
  8. 根据权利要求7所述的数字图像处理装置,其特征在于,所述处理模块还用于:The digital image processing apparatus according to claim 7, wherein the processing module is further configured to:
    在所述待检测像素点不是所述方向膨胀点时,使用所述结构元素矩阵对所述待检测像素点进行膨胀运算。When the pixel to be detected is not the direction expansion point, the pixel to be detected is expanded by using the matrix of structural elements.
  9. 根据权利要求7或8所述的数字图像处理装置,其特征在于,所述处理模块还用于:在所述待检测像素点不是边界点时,不对所述待检测像素点做膨胀运算。The digital image processing apparatus according to claim 7 or 8, wherein the processing module is further configured to: when the pixel to be detected is not a boundary point, do not perform an expansion operation on the pixel to be detected.
  10. 根据权利要求5至9中任一项所述的数字图像处理装置,其特征在于,所述处理模块具体用于:The digital image processing apparatus according to any one of claims 5 to 9, wherein the processing module is specifically configured to:
    确定所述待检测像素点满足以下任意一种条件时,判断所述待检测像素点为边界点:所述待检测像素点的位置中的横坐标为横坐标最小值或横坐标最大值,所述待检测点的位置中的纵坐标为纵坐标最小值或纵坐标最大值, 所述待检测像素点与所述待检测像素点的至少一个相邻像素点的像素值不相等。 Determining that the pixel to be detected is a boundary point when the pixel to be detected satisfies any one of the following conditions: the abscissa in the position of the pixel to be detected is the minimum value of the abscissa or the maximum value of the abscissa. The ordinate in the position of the detected point is the ordinate minimum or the ordinate maximum, The pixel value of the pixel to be detected and the at least one adjacent pixel of the pixel to be detected are not equal.
PCT/CN2016/099580 2016-09-21 2016-09-21 Morphological processing method of digital image and digital image processing device WO2018053710A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2016/099580 WO2018053710A1 (en) 2016-09-21 2016-09-21 Morphological processing method of digital image and digital image processing device
CN201680000942.7A CN106663317B (en) 2016-09-21 2016-09-21 Morphological processing method and digital image processing device for digital image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/099580 WO2018053710A1 (en) 2016-09-21 2016-09-21 Morphological processing method of digital image and digital image processing device

Publications (1)

Publication Number Publication Date
WO2018053710A1 true WO2018053710A1 (en) 2018-03-29

Family

ID=58837913

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/099580 WO2018053710A1 (en) 2016-09-21 2016-09-21 Morphological processing method of digital image and digital image processing device

Country Status (2)

Country Link
CN (1) CN106663317B (en)
WO (1) WO2018053710A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE202022100786U1 (en) 2022-02-11 2022-03-03 Gaurav Kumar Arora Intelligent processed image recognition system with artificial intelligence and machine learning
CN117315182A (en) * 2023-11-30 2023-12-29 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) Method for determining radar detection range under influence of terrain

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113192098B (en) * 2020-01-14 2024-03-08 京东方科技集团股份有限公司 Data processing method, device, terminal and readable medium for biochip

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6404934B1 (en) * 2000-10-20 2002-06-11 Shih-Jong J. Lee High speed image processing apparatus using a cascade of elongated filters programmed in a computer
US6650788B1 (en) * 1999-09-28 2003-11-18 Lucent Technologies Inc. Expandable binary morphological erosion operator
CN1556503A (en) * 2004-01-09 2004-12-22 清华大学 Fast morphology corrusion expansion method in image treatment
CN105894461A (en) * 2015-12-25 2016-08-24 乐视云计算有限公司 Gray morphological image processing method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3540855B2 (en) * 1995-03-08 2004-07-07 シャープ株式会社 Block distortion corrector
CN101718870B (en) * 2009-11-13 2012-07-04 西安电子科技大学 High-speed weak target flight path detection method of image field
CN104778710B (en) * 2015-04-24 2018-01-09 大连理工大学 A kind of morphological images edge detection method based on quantum theory
CN106250831A (en) * 2016-07-22 2016-12-21 北京小米移动软件有限公司 Image detecting method, device and the device for image detection

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6650788B1 (en) * 1999-09-28 2003-11-18 Lucent Technologies Inc. Expandable binary morphological erosion operator
US6404934B1 (en) * 2000-10-20 2002-06-11 Shih-Jong J. Lee High speed image processing apparatus using a cascade of elongated filters programmed in a computer
CN1556503A (en) * 2004-01-09 2004-12-22 清华大学 Fast morphology corrusion expansion method in image treatment
CN105894461A (en) * 2015-12-25 2016-08-24 乐视云计算有限公司 Gray morphological image processing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LU , ZONGQI ET AL.: "Fast Algorithm of Mathematical Morphology Erosion and Dilation Operation", THE 13TH NATIONAL CONFERENCE ON IMAGE AND GRAPHICS, 31 December 2015 (2015-12-31) *
MOREAUD, M. ET AL.: "Fast Algorithm for Dilation and Erosion Using Arbitrary Flat Structuring Element: Improvement of Urbach and Wilkinson's Algorithm to GPU Computing", 2014 INTERNATIONAL CONFERENCE ON MULTIMEDIA COMPUTING AND SYSTEM (ICMCS), 14 April 2014 (2014-04-14) - 16 April 2014 (2014-04-16), pages 289 - 294, XP032651787, Retrieved from the Internet <URL:DOI:10.1109/ICMCS.2014.6911245> *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE202022100786U1 (en) 2022-02-11 2022-03-03 Gaurav Kumar Arora Intelligent processed image recognition system with artificial intelligence and machine learning
CN117315182A (en) * 2023-11-30 2023-12-29 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) Method for determining radar detection range under influence of terrain
CN117315182B (en) * 2023-11-30 2024-03-22 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) Method for determining radar detection range under influence of terrain

Also Published As

Publication number Publication date
CN106663317B (en) 2020-06-26
CN106663317A (en) 2017-05-10

Similar Documents

Publication Publication Date Title
US10453204B2 (en) Image alignment for burst mode images
WO2018103608A1 (en) Text detection method, device and storage medium
WO2020199478A1 (en) Method for training image generation model, image generation method, device and apparatus, and storage medium
CN108875723B (en) Object detection method, device and system and storage medium
US10885660B2 (en) Object detection method, device, system and storage medium
WO2021008019A1 (en) Posture tracking method and apparatus, and computer-readable storage medium
WO2018082308A1 (en) Image processing method and terminal
CN110334762B (en) Feature matching method based on quad tree combined with ORB and SIFT
CN110852349A (en) Image processing method, detection method, related equipment and storage medium
US9240038B2 (en) Method and apparatus for acquiring weight coefficient of digital filter
CN107316022B (en) Dynamic gesture recognition method and device
CN108022244B (en) Hypergraph optimization method for significant target detection based on foreground and background seeds
WO2022252642A1 (en) Behavior posture detection method and apparatus based on video image, and device and medium
US11354883B2 (en) Image processing method and apparatus, and electronic device
CN111160288A (en) Gesture key point detection method and device, computer equipment and storage medium
WO2018053710A1 (en) Morphological processing method of digital image and digital image processing device
EP3846122B1 (en) Method and apparatus for generating background-free image, device, and medium
CN112509003B (en) Method and system for solving target tracking frame drift
CN111814905A (en) Target detection method, target detection device, computer equipment and storage medium
US20190332858A1 (en) Method and device for identifying wrist, method for identifying gesture, electronic equipment and computer-readable storage medium
WO2022194079A1 (en) Sky region segmentation method and apparatus, computer device, and storage medium
CN112150371A (en) Image noise reduction method, device, equipment and storage medium
CN114155365A (en) Model training method, image processing method and related device
CN109410246B (en) Visual tracking method and device based on correlation filtering
CA3136990A1 (en) A human body key point detection method, apparatus, computer device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16916450

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16916450

Country of ref document: EP

Kind code of ref document: A1