WO2017088462A1 - 图像处理方法和装置 - Google Patents

图像处理方法和装置 Download PDF

Info

Publication number
WO2017088462A1
WO2017088462A1 PCT/CN2016/086594 CN2016086594W WO2017088462A1 WO 2017088462 A1 WO2017088462 A1 WO 2017088462A1 CN 2016086594 W CN2016086594 W CN 2016086594W WO 2017088462 A1 WO2017088462 A1 WO 2017088462A1
Authority
WO
WIPO (PCT)
Prior art keywords
edge
connected domain
image
point
pixel
Prior art date
Application number
PCT/CN2016/086594
Other languages
English (en)
French (fr)
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 乐视控股(北京)有限公司
Publication of WO2017088462A1 publication Critical patent/WO2017088462A1/zh

Links

Images

Classifications

    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components

Definitions

  • the embodiments of the present invention relate to the field of video technologies, and in particular, to an image processing method and apparatus.
  • the edge feature of the image is a basic feature of the image, which is often applied to image processing and analysis techniques such as higher-level feature description, image recognition, image segmentation, image enhancement and image compression.
  • image processing and analysis techniques such as higher-level feature description, image recognition, image segmentation, image enhancement and image compression.
  • image processing and analysis techniques such as higher-level feature description, image recognition, image segmentation, image enhancement and image compression.
  • Embodiments of the present invention provide an image processing method and apparatus to improve the accuracy of an edge of an acquired image.
  • an embodiment of the present invention provides an image processing method, including:
  • an embodiment of the present invention provides an image processing apparatus, including:
  • An obtaining module configured to acquire an edge feature image of the target image
  • a marking module configured to perform connectivity domain marking on the edge feature image
  • a correction module configured to determine, according to each connected domain in the plurality of connected domains in the edge feature image, whether the number of edge points that the connected domain has is greater than a first preset value; if not, the connected domain Each edge point has a background point.
  • an embodiment of the present invention provides an image processing apparatus, including:
  • the processor, the memory, and the communication interface complete communication with each other through the bus;
  • the communication interface is used for information transmission between the image processing device and a communication device of the image storage device or the image transmission device;
  • the processor is configured to invoke logic instructions in the memory to perform the following method
  • an embodiment of the present invention provides a computer program, including program code, where the program code is used to perform the following operations:
  • an embodiment of the present invention provides a storage medium for storing the computer program according to the above claims.
  • the extracted edge feature image is corrected by using the method of the connected domain, and the point noise or the line noise can be effectively removed, thereby obtaining a more accurate image edge.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention.
  • Figure 4 shows a possible edge feature image
  • FIG. 5 is a schematic flow chart of a possible implementation manner of step S13 in FIG. 1;
  • FIG. 6 is a schematic flowchart diagram of a possible implementation manner of an image processing method according to an embodiment of the present disclosure
  • Figure 7 shows four initial edge feature images of the logo area
  • FIG. 8 shows an edge feature image obtained after step S62
  • FIG. 9 shows an edge feature image obtained after step S65
  • FIG. 10 is a structural block diagram of an image processing apparatus according to an embodiment of the present invention.
  • FIG. 11 is a structural block diagram of still another image processing apparatus according to an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention, including:
  • Step S11 acquiring an edge feature image of the target image
  • Step S12 performing connectivity domain marking on the edge feature image
  • Step S13 determining, for each connected domain in the plurality of connected domains, whether the number of edge points that the connected domain has is greater than a first preset value; if not, each edge point of the connected domain Set as the background point.
  • the edge feature image is marked with the connected domain, and the edge point having the number of edge points smaller than the preset value is set as the background point. This can well filter out connected domains with fewer edge points, such as point noise and linear noise.
  • the target image in the above step S11 may refer to any form of image, such as an image of a logo area in a television picture, an image of a person or other object, or the like.
  • step S11 herein may be implemented in various manners, such as extracting edge feature images of a target image by using a Canny algorithm or a LoG algorithm in the prior art.
  • the edge feature image obtained after step S11 is generally a binarization matrix, wherein a gray value of a part of the pixel points is 255, and a gray value of the other part of the pixel points is 0; A pixel with a value of 255 and a background point can be a pixel with a gray value of 0.
  • step S11 may include: not shown in the figure:
  • Step S111 acquiring a preset number of initial edge feature images corresponding to the target image
  • Step S112 determining, for each edge point of the plurality of edge points included in each initial edge feature image, whether the number of occurrences of the same coordinate position in each initial edge feature image of the edge point is greater than a second preset value. If not, set the edge point as a background point;
  • Step S113 combining the remaining edge points in each initial edge feature image to obtain an edge feature image of the target image.
  • the edge point can be basically determined. It is a noise point.
  • steps S111 to S113 such noise points in the initial edge feature image are greatly reduced.
  • step S12 and step S13 can be reduced. The resources needed.
  • step S111 can also be implemented by an edge extraction algorithm in the prior art.
  • the position of the target image should be fixed.
  • the target image here may be the image of the above-mentioned logo area. In each picture, the images of the logo area are stably displayed in the upper left corner of each picture.
  • the number of initial edge feature images that need to be acquired may be arbitrarily set, and the corresponding second preset value may be determined according to the obtained number of initial edge feature images. For example, if the number of initial edge feature images is 4, the second preset value may be 2. If an edge point appears no more than 2 times at the same coordinate of each picture, the edge point is set as the background point.
  • step S12 can be performed as follows:
  • the second connected domain mark is performed on each pixel after the connected domain mark; the first direction is one of left or right, and the second direction is the other of left or right; the third direction is up or down One of the second directions is the other of the upper or lower.
  • the advantage of this is that it makes the marking of connected domains more accurate. Avoid the case where a single tag is marked with two different connected domain identifiers by the same connected domain.
  • each process of connecting domain tags can be:
  • the connected domain of the pixel is marked as the connected end of the marked edge point.
  • Domain identifier when a pixel is an edge point and there is no marked edge point in each pixel adjacent to the pixel, the pixel is marked as a new connected domain identifier.
  • each pixel point adjacent to a pixel point herein may refer to 8 pixel points adjacent to the pixel point.
  • Each pixel is P4(x-1, y-1), P3(x-1, y), P2(x-1, y+1), P5(x, y-1), P1(x, y +1), P6(x+1, y-1), P7(x+1, y), P8(x+1, y+1); or, may also refer to 4 adjacent to the pixel Pixels, see Fig. 3, for a pixel P(x, y), the adjacent pixels are P2(x-1, y), P3(x-1, y+1), P(x , y-1), P1(x, y+1), P4(x+1, y).
  • the connected domain tag When the connected domain tag is marked, the connected domain tag may be firstly performed from left to right and from top to bottom.
  • the initial value of the connected domain identifier is 1, and each time a new connected domain is scanned according to the above manner, the communication is connected.
  • the domain identifier is incremented by 1 as the connected domain identifier of the new connected domain until all connected domains are marked.
  • After the first connected domain labeling there may be a problem that the two regions that should be the same connected domain are respectively marked with a connected domain identifier, for example, for the edge feature image in FIG.
  • the first and second strokes of the word should be the same connected domain, but according to the connected domain marking method described above, for the edge of the second pen in the second pen of the "text", the left, upper, upper left
  • the pixels of the square are background points, so these pixels will not have the connected domain identifier, and the pixels at the bottom left, right, bottom, bottom right, and top right have not been scanned and there is no connected domain identifier. This will result in a new connected domain identifier being marked for the top left edge point, which is different from the connected field of the first stroke of the "text" word.
  • the first preset value in the step S3 may be set according to the number of pixels of the edge feature image. For example, when the edge feature image includes 450*180 pixels, the first The preset value is set to 5, and the connected domain of less than 5 edge points is removed.
  • step S13 if a connected domain has a number of edge points greater than a first preset value, each edge point in the connected domain is retained.
  • step S13 may be specifically implemented by using the method in FIG. 5:
  • Step S131 counting the number N of connected domain identifiers, and the number of edge points in the connected domain corresponding to each connected domain identifier (assuming that the i-th representation is ni);
  • Step S132 setting the initial value of the serial number i to 1;
  • Step S133 it is determined whether i is less than N+1, and if so, then proceeds to step S134; if not, then proceeds to step S138;
  • step S134 it is determined whether the number of edge points ni of the connected domain corresponding to the sequence number i is smaller than the first preset value T. If yes, go to step S135; otherwise, go to step S136;
  • Step S135 deleting all the edge points of the connected domain corresponding to the serial number i (that is, setting these edge points as background points), and then moving to step S136;
  • Step S136 retaining the sequence number i corresponding to all edge points of the connected domain
  • Step S138 outputting an edge feature image.
  • the image processing method provided by the embodiment of the present invention is specifically described below with reference to a specific scenario, and the target image to be processed is assumed to be a logo area image; and the preset number is 4 and the second preset value is 3; The default value is 5;
  • an optional implementation manner of the image processing method provided by the embodiment of the present invention may include the following processes:
  • Step S61 performing edge feature extraction on each of the four logo area images to obtain four initial edge feature images corresponding to the logo area image. It is assumed that the four initial edge feature images obtained after step S61 are the respective images shown in FIG.
  • Step S62 synthesizing the four initial edge feature images to obtain an edge feature image of the logo area image.
  • the edge feature image of the target image obtained after step S62 can be referred to FIG.
  • step S63 the edge feature image obtained in step S62 is marked with a connected domain.
  • Step S64 Determine, for each marked connected domain, whether the number of edge points in the connected domain is less than 5; and when the determination is yes, delete each edge point in the connected domain.
  • step S65 the edge feature image obtained after step S64 is output.
  • the edge feature image obtained by the edge feature image in FIG. 8 after being processed in step S65 can be referred to FIG. 9. It can be seen that the edge feature image in FIG. 9 is clearer than the edge feature images in FIG. And most of the noise points are removed.
  • the embodiment of the present invention further provides an image processing apparatus, which may be used to perform the image processing method according to any one of the above items.
  • the apparatus may include:
  • the obtaining module 1011 is configured to acquire an edge feature image of the target image
  • a marking module 1012 configured to perform connectivity domain marking on the edge feature image
  • the correction module 1013 is configured to determine, according to each connected domain in the multiple connected domains in the edge feature image, whether the number of edge points that the connected domain has is greater than a first preset value; if not, the connected domain Each edge point has a background point.
  • the obtaining module 1011 may be specifically configured to acquire a preset number of initial edge feature images corresponding to the target image, and determine, for each edge point of each of the plurality of edge points included in each initial edge feature image. Whether the number of occurrences at the same coordinate position in each initial edge feature image of the edge point is greater than a second preset value, and when the determination is negative, the edge point is set as a background point; and the target image is obtained according to the remaining edge points Edge feature image.
  • the target image is an image of a logo area.
  • the marking module 1012 herein may include a first marking module 10121 and a second marking module 10122 not shown in the drawing;
  • the first marking sub-module 10121 is configured to perform a first connected domain marking on each pixel point from the first direction to the second direction from the third direction to the fourth direction;
  • the second marking sub-module 10122 is configured to perform a second connected domain labeling on each pixel point after the first connected domain mark from the second direction to the first direction from the fourth direction to the third direction.
  • each of the marking sub-modules is used to mark an end point of the pixel point as the edge point when a pixel point is an edge point, and each pixel point adjacent to the pixel point has an edge point that has been marked.
  • the connected domain identifier of the marked edge point is marked; when a pixel point is an edge point, and there is no marked edge point among each pixel point adjacent to the pixel point, the pixel point is marked with a new connection Domain ID.
  • the embodiment of the invention further provides a structural block diagram of an image processing apparatus.
  • the image processing apparatus includes: a processor 1101, a memory 1102, a communication interface 1103, and a bus 1104.
  • the processor 1101, the memory 1102, and the communication interface 1103 complete communication with each other through the bus 1104;
  • the communication interface 1103 is used for information transmission between the image processing device and a communication device of the image storage device or the image transmission device;
  • the processor 1101 is configured to invoke logic instructions in the memory 1102 to perform the following methods;
  • the embodiment further discloses a computer program, including program code, where the program code is used to perform the following operations:
  • This embodiment discloses a storage medium for storing a computer program as described in the foregoing embodiments.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

Abstract

一种图像处理方法和装置,该方法包括:获取目标图像的边缘特征图像(S11);对所述边缘特征图像进行连通域标记(S12);针对所标记的多个连通域中的每一个连通域,判断该连通域具有的边缘点的数量是否大于第一预设值;并在判断为否时,将该连通域所具有的各个边缘点均置为背景点(S13)。该图像处理方法将提取到的边缘特征图像采用连通域的方法进行修正,可以有效的去除其中的点状噪声或者线状噪声,从而得到更为准确的图像边缘。

Description

图像处理方法和装置
交叉引用
本申请引用于2015年11月24日提交的专利名称为“图像处理方法和装置”的第2015108244719号中国专利申请,其通过引用被全部并入本申请。
技术领域
本发明实施例涉及视频技术领域,尤其涉及一种图像处理方法和装置。
背景技术
在实际的图像处理问题中,图像的边缘特征作为图像的一种基本特征,被经常应用到较高层次的特征描述、图像识别、图像分割、图像增强以及图像压缩等的图像处理和分析技术中,从而可对图像作进一步的分析和理解。
通常在图像获取、传输和处理过程中,总会不可避免地存在各种噪声,且噪声与图像边缘的频带混合在一起,这使得提取到的边缘特征图像不够准确。
发明内容
本发明实施例提供了一种图像处理方法和装置,以提高获取到的图像边缘的准确性。
第一方面,本发明实施例提供了一种图像处理方法,包括:
获取目标图像的边缘特征图像;
对所述边缘特征图像进行连通域标记;
针对所标记的多个连通域中的每一个连通域,判断该连通域具有的边缘点的数量是否大于第一预设值;若否,将该连通域所具有的各个边缘点均置为背景点。
第二方面,本发明实施例提供了一种图像处理装置,包括:
获取模块,用于获取目标图像的边缘特征图像;
标记模块,用于对所述边缘特征图像进行连通域标记;
修正模块,用于针对所述边缘特征图像中的多个连通域中的每一个连通域,判断该连通域具有的边缘点的数量是否大于第一预设值;若否,将该连通域所具有的各个边缘点均置为背景点。
第三方面,本发明实施例提供了一种图像处理装置,包括:
处理器、存储器、通信接口和总线;其中,
所述处理器、存储器、通信接口通过所述总线完成相互间的通信;
所述通信接口用于该图像处理装置与图像储存装置或图像传输装置的通信设备之间的信息传输;
所述处理器用于调用所述存储器中的逻辑指令,以执行如下方法;
获取目标图像的边缘特征图像;
对所述边缘特征图像进行连通域标记;
针对所标记的多个连通域中的每一个连通域,判断该连通域具有的边缘点的数量是否大于第一预设值;并在判断为否时,将该连通域所具有的各个边缘点均置为背景点。
第四方面,本发明实施例提供了一种计算机程序,包括程序代码,所述程序代码用于执行如下操作:
获取目标图像的边缘特征图像;
对所述边缘特征图像进行连通域标记;
针对所标记的多个连通域中的每一个连通域,判断该连通域具有的边缘点的数量是否大于第一预设值;并在判断为否时,将该连通域所具有的各个边缘点均置为背景点。
第五方面,本发明实施例提供了一种存储介质,用于存储如权利要求上述所述的计算机程序。
本发明实施例提供的图像处理方法和装置中,对提取到的边缘特征图像采用联通域的方法进行修正,可以有效的去除其中的点状噪声或者线状噪声,从而得到更为准确的图像边缘。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种图像处理方法的流程示意图;
图2和图3示出了边缘特征图像中的像素结构图;
图4示出了一幅可能的边缘特征图像;
图5为图1中的步骤S13的一种可能实施方式的流程示意图;
图6为本发明实施例提供的图像处理方法的一种可能的实施方式的流程示意图;
图7示出了台标区域的4副初始边缘特征图像;
图8示出了经步骤S62之后得到的边缘特征图像;
图9示出了经步骤S65之后得到的边缘特征图像;
图10为本发明实施例提供的一种图像处理装置的结构框图;
图11为本发明实施例提供的又一种图像处理装置的结构框图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
参见图1,为本发明实施例提供的一种图像处理方法的流程示意图,包括:
步骤S11,获取目标图像的边缘特征图像;
步骤S12,对所述边缘特征图像进行连通域标记;
步骤S13,针对所标记的多个连通域中的每一个连通域,判断该连通域具有的边缘点的数量是否大于第一预设值;若否,将该连通域所具有的各个边缘点均置为背景点。
本发明实施例提供的图像处理方法中,对边缘特征图像进行连通域标记,并将具有的边缘点的数量小于预设值的边缘点均置为背景点。这样能够很好的滤除具有边缘点较少的连通域,比如点状噪声和线状噪声。
在具体实施时,上述的步骤S11中的目标图像可以是指任何形式的图像,比如电视画面中台标区域的图像、人或者其他物体的图像等。
在具体实施时,这里的步骤S11可以通过多种方式实现,比如采用现有技术中的Canny算法或者LoG算法提取目标图像的边缘特征图像。
不难理解的是,经步骤S11之后得到的边缘特征图像一般为二值化矩阵,其中一部分像素点的灰度值为255,另一部分像素点的灰度值为0;边缘点可以为灰度值为255的像素点,而背景点可以为灰度值为0的像素点。
作为一种可选的方式,本发明实施例中,上述的步骤S11可以包括图中未示出的:
步骤S111,获取所述目标图像对应的预设数量幅初始边缘特征图像;
步骤S112,针对各幅初始边缘特征图像所包含的多个边缘点中的每一个边缘点,确定在该边缘点各幅初始边缘特征图像中的同一坐标位置出现的次数是否大于第二预设值,若否,将该边缘点置为背景点;
步骤S113,将各幅初始边缘特征图像中剩余的边缘点进行合并得到目标图像的边缘特征图像。
在实际应用中,如果在多幅画面(比如连续的多帧画面中),一个边缘点出现的次数较少,比如仅在其中一幅画面或者两幅画面中出现,则基本可以确定该边缘点为噪声点。这样通过上述的步骤S111-步骤S113后,初始边缘特征图像中这样的噪声点会大幅的减少。这样一方面能够提高最终获取到的图像边缘的准确性,另一方面由于连通域的数量减少(一些噪点对应的连通域在步骤S111-步骤S113中被删除),能够减少执行步骤S12和步骤S13所需要的资源。
在具体实施时,上述的步骤S111中,也可以通过现有技术中的边缘提取算法实现。另外不难理解的是,在步骤S111中,所获取的目标图像对应的各幅初始边缘特征图像中,目标图像的位置应是固定的,比如这里的目标图像可以为上述的台标区域的图像,在各幅画面中,台标区域的图像均稳定的出现在各幅画面的左上角。
在具体实施时,上述的步骤S112中,所需获取的初始边缘特征图像的数量可以任意设定,相应的第二预设值可以根据所获取的初始边缘特征图像的数量确定。比如初始边缘特征图像的数量为4,则上述的第二预设值可以为2。如果一个边缘点在各幅画面的同一坐标处出现的次数不超过2次,则将该边缘点置为背景点。
在具体实施时,上述的步骤S12可以按照如下方式执行:
从第一方向向第二方向,从第三方向向第四方向对各个像素点进行第一次连通域标记;从第二方向向第一方向,从第四方向向第三方向对第一次连通域标记之后的各个像素点进行第二次连通域标记;所述第一方向为左或右中的一个,第二方向为左或右中的另一个;所述第三方向为上或下中的一个,第二方向为上或下中的另一个。
这样做的好处是,能够使得对连通域的标记更为准确。避免单次标记所造成的将同一个连通域标记两个不同的连通域标识的情况。
具体来说,每一次连通域标记的过程可以为:
在一个像素点为边缘点,且与该像素点相邻的各个像素点中有已经被标记的边缘点时,将该像素点的连通域标记为该已经被标记的边缘点所被标记的连通域标识;在一个像素点为边缘点,且与该像素点相邻的各个像素点中没有被标记的边缘点时,将该像素点标记为一个新的连通域标识。
不难理解的是,当一个像素点为边缘点,且与该像素点相邻的各个像素点中存在边缘点,且相邻的各个像素点中的各个边缘点均没有被标记,则可以将该像素点以及与该像素点相邻的各个边缘点标记一个新的连通域标识。而如果与该像素点相邻的各个像素点中不存在边缘点,仅将该像素点标记一个新的连通域标识。
在具体实施时,这里与一个像素点相邻的各个像素点可以是指与该像素点相邻的8个像素点,参见图2,对于一个像素点P(x,y),其相邻的各个像素点分别为P4(x-1,y-1),P3(x-1,y),P2(x-1,y+1),P5(x,y-1),P1(x,y+1),P6(x+1,y-1),P7(x+1,y),P8(x+1,y+1);或者,也可以是指与该像素点相邻的4个像素点,参见图3,对于一个像素点P(x,y),其相邻的各个像素点分别为P2(x-1,y),P3(x-1,y+1),P(x,y-1),P1(x,y+1),P4(x+1,y)。
在进行连通域标记时,可以首先从左向右,从上向下进行连通域标记,连通域标识的初始值为1,按照上述的方式每一次扫描到一个新的连通域,则将该连通域标识加1,作为该新的连通域的连通域标识,直至所有的连通域被标记。进行第一次连通域标记之后,可能存在的一个问题是,将本应为同一个连通域的两个区域分别标记了一个连通域标识,比如对于图4中的边缘特征图像,其中的“文”字的第一笔和第二笔本应为同一连通域,但是按照上述的连通域标记方法,对于“文”字第二笔中处于最左上方的边缘点,其左方、上方、左上方的像素点均为背景点,因此这些像素点均不会有连通域标识,而左下方、右方,下方,右下方、右上方的各个像素点尚未被扫描也不会有连通域标识,这样会导致对该最左上方的边缘点被标记一个新的连通域标识,该连通域标识与“文”字的第一笔的连通域不同。这样就将实际上为属于一个连通域的两个区域标记了两个连通域标识,每一个连通域标识所对应的连通域中边缘点的数量大幅减小,这样可能会导致该连通域中的边缘点被置为背景点。为了避免这种现象,可以按照上述的方式进行一次反向的连通域标记过程,该过程中,文字第二笔最左上方处的像素点的连通域标识会被修改为与“文”字的第一笔所被标记的连通域标识。
在具体实施时,上述的步骤S3中的第一预设值可以根据边缘特征图像的像素个数设定,比如当上述的边缘特征图像包含450*180个像素点时,可以将上述的第一预设值设置为5,将小于5个边缘点的连通域去除。
在具体实施时,在步骤S13中,如果一个连通域具有的边缘点的数量大于第一预设值,则保留该连通域内的各个边缘点。
在具体实施时,上述的步骤S13可以具体通过如图5中的方式实现:
步骤S131,统计连通域标识的数量N,以及每一个连通域标识所对应的连通域中的边缘点的数量(假设第i个表示为ni);
步骤S132,设定序号i的初始值为1;
步骤S133,判断i是否小于N+1,若是,则转向步骤S134;若否,则转向步骤S138;
步骤S134,判断序号i对应的连通域的边缘点数量ni是否小于第一预设值T。如果是,则转向步骤S135;否则转向步骤S136;
步骤S135,删除序号i对应连通域的所有边缘点(即将这些边缘点置为背景点),之后转向步骤S136;
步骤S136,保留序号i对应连通域的所有边缘点;
步骤S137,令i=i+1,之后转向步骤S133;
步骤S138,输出边缘特征图像。
下面结合具体的场景对本发明实施例提供的图像处理方法进行具体说明,假设所要处理的目标图像为台标区域图像;并假设上述的预设数量为4,第二预设值为3;第一预设值为5;
此时,参见图6,本发明实施例提供的图像处理方法的一种可选实施方式可以包括如下流程:
步骤S61,对4副该台标区域图像分别进行边缘特征提取得到该台标区域图像对应的4副初始边缘特征图像。假设经步骤S61之后得到的4副初始边缘特征图像为图7所示的各幅图像。
步骤S62,对4副初始边缘特征图像进行合成得到台标区域图像的边缘特征图像。经步骤S62之后得到的目标图像的边缘特征图像可以参考图8。
步骤S63,对步骤S62得到的边缘特征图像进行连通域标记。
步骤S64,针对每一个被标记的连通域,确定该连通域内的边缘点的数量是否小于5;并在判断为是时,删除该连通域内的各个边缘点。
步骤S65,输出步骤S64之后得到的边缘特征图像。
图8中的边缘特征图像经步骤S65处理之后得到的边缘特征图像可以参考图9,可以看出,与图7中的各幅边缘特征图像相比,图9中的边缘特征图像更为清晰,且其中的大部分噪声点被去除。
基于相同的构思,本发明实施例还提供了一种图像处理装置,可以用于执行上述任一项所述的图像处理方法,参见图10,该装置可以包括:
获取模块1011,用于获取目标图像的边缘特征图像;
标记模块1012,用于对所述边缘特征图像进行连通域标记;
修正模块1013,用于针对所述边缘特征图像中的多个连通域中的每一个连通域,判断该连通域具有的边缘点的数量是否大于第一预设值;若否,将该连通域所具有的各个边缘点均置为背景点。
进一步的,这里的获取模块1011可以具体用于获取所述目标图像对应的预设数量幅初始边缘特征图像;针对各幅初始边缘特征图像所包含的多个边缘点中的每一个边缘点,判断在该边缘点各幅初始边缘特征图像中的同一坐标位置处出现的次数是否大于第二预设值,并在判断为否时将该边缘点置为背景点;根据剩余的边缘点得到目标图像的边缘特征图像。
进一步的,所述目标图像为台标区域的图像。
进一步的,这里的标记模块1012可以包括图中未示出的第一标记模块10121和第二标记模块10122;
第一标记子模块10121用于从第一方向向第二方向,从第三方向向第四方向对各个像素点进行第一次连通域标记;
第二标记子模块10122用于从第二方向向第一方向,从第四方向向第三方向对第一次连通域标记之后的各个像素点进行第二次连通域标记。
进一步的,每一个标记子模块用于在一个像素点为边缘点,且与该像素点相邻的各个像素点中有已经被标记的边缘点时,将该像素点的连通域标记为该已经被标记的边缘点所被标记的连通域标识;在一个像素点为边缘点,且与该像素点相邻的各个像素点中没有被标记的边缘点时,将该像素点标记一个新的连通域标识。
本发明实施例还提供了一种图像处理装置的结构框图。参照图11,所述图像处理装置,包括:处理器(processor)1101、存储器(memory)1102、通信接口(Communications Interface)1103和总线1104;
其中,
所述处理器1101、存储器1102、通信接口1103通过所述总线1104完成相互间的通信;
所述通信接口1103用于该图像处理装置与图像储存装置或图像传输装置的通信设备之间的信息传输;;
所述处理器1101用于调用所述存储器1102中的逻辑指令,以执行如下方法;
获取目标图像的边缘特征图像;
对所述边缘特征图像进行连通域标记;
针对所标记的多个连通域中的每一个连通域,判断该连通域具有的边缘点的数量是否大于第一预设值;并在判断为否时,将该连通域所具有的各个边缘点均置为背景点。
参加图1,本实施例还公开一种计算机程序,包括程序代码,所述程序代码用于执行如下操作:
获取目标图像的边缘特征图像;
对所述边缘特征图像进行连通域标记;
针对所标记的多个连通域中的每一个连通域,判断该连通域具有的边缘点的数量是否大于第一预设值;并在判断为否时,将该连通域所具有的各个边缘点均置为背景点。
本实施例公开一种存储介质,用于存储如前述实施例所述的计算机程序。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (13)

  1. 一种图像处理方法,其特征在于,包括:
    获取目标图像的边缘特征图像;
    对所述边缘特征图像进行连通域标记;
    针对所标记的多个连通域中的每一个连通域,判断该连通域具有的边缘点的数量是否大于第一预设值;并在判断为否时,将该连通域所具有的各个边缘点均置为背景点。
  2. 如权利要求1所述的方法,其特征在于,所述目标图像为台标区域的图像。
  3. 如权利要求1所述的方法,其特征在于,所述获取目标图像的边缘特征图像,包括:
    获取所述目标图像对应的预设数量幅初始边缘特征图像;
    针对各幅初始边缘特征图像所包含的多个边缘点中的每一个边缘点,确定该边缘点在各幅初始边缘特征图像中的同一坐标位置出现的次数是否大于第二预设值,并在判断为否时,将该边缘点置为背景点;
    将各幅初始边缘特征图像中剩余的边缘点合并得到目标图像的边缘特征图像。
  4. 如权利要求1所述的方法,其特征在于,所述对所述边缘特征图像进行连通域标记,包括:
    从第一方向向第二方向,从第三方向向第四方向对各个像素点进行第一次连通域标记;从第二方向向第一方向,从第四方向向第三方向对第一次连通域标记之后的各个像素点进行第二次连通域标记;所述第一方向为左或右中的一个,第二方向为左或右中的另一个;所述第三方向为上或下中的一个,第二方向为上或下中的另一个。
  5. 如权利要求4所述的方法,其特征在于,每一次连通域标记包括:
    在一个像素点为边缘点,且与该像素点相邻的各个像素点中有已经被标记的边缘点时,将该像素点的连通域标记为该已经被标记的边缘点所被标记的连通域标识;在一个像素点为边缘点,且与该像素点相邻的各个像素点中没有被标记的边缘点时,将该像素点标记一个新的连通域标识。
  6. 一种图像处理装置,其特征在于,包括:
    获取模块,用于获取目标图像的边缘特征图像;
    标记模块,用于对所述边缘特征图像进行连通域标记;
    修正模块,用于针对所述边缘特征图像中的多个连通域中的每一个连通域,判断该连通域具有的边缘点的数量是否大于第一预设值;并在判断为否时,将该连通域所具有的各个边缘点均置为背景点。
  7. 如权利要求6所述的装置,其特征在于,所述获取模块具体用于获取所述目标图像对应的预设数量幅初始边缘特征图像;针对各幅初始边缘特征图像所包含的多个边缘点中的每一个边缘点,判断在该边缘点各幅初始边缘特征图像中的同一坐标位置处出现的次数是否大于第二预设值,并在判断为否时将该边缘点置为背景点;根据剩余的边缘点得到目标图像的边缘特征图像。
  8. 如权利要求6所述的装置,其特征在于,所述目标图像为台标区域的图像。
  9. 如权利要求6所述的装置,其特征在于,所述标记模块包括第一标记模块和第二标记模块;
    所述第一标记子模块用于从第一方向向第二方向,从第三方向向第四方向对各个像素点进行第一次连通域标记;
    所述第二标记子模块用于从第二方向向第一方向,从第四方向向第三方向对第一次连通域标记之后的各个像素点进行第二次连通域标记。
  10. 如权利要求9所述的装置,其特征在于,每一个标记子模块用于在一个像素点为边缘点,且与该像素点相邻的各个像素点中有已经被标记的边缘点时,将该像素点的连通域标记为该已经被标记的边缘点所被标记的连通域标识;在一个像素点为边缘点,且与该像素点相邻的各个像素点中没有被标记的边缘点时,将该像素点标记为一个新的连通域标识。
  11. 一种图像处理装置,其特征在于,包括:
    处理器、存储器、通信接口和总线;其中,
    所述处理器、存储器、通信接口通过所述总线完成相互间的通信;
    所述通信接口用于该图像处理装置与图像储存装置或图像传输装置的通信设备之间的信息传输;
    所述处理器用于调用所述存储器中的逻辑指令,以执行如下方法;
    获取目标图像的边缘特征图像;
    对所述边缘特征图像进行连通域标记;
    针对所标记的多个连通域中的每一个连通域,判断该连通域具有的边缘点的数量是否大于第一预设值;并在判断为否时,将该连通域所具有的各个边缘点均置为背景点。
  12. 一种计算机程序,其特征在于,包括程序代码,所述程序代码用于执行如下操作:
    获取目标图像的边缘特征图像;
    对所述边缘特征图像进行连通域标记;
    针对所标记的多个连通域中的每一个连通域,判断该连通域具有的边缘点的数量是否大于第一预设值;并在判断为否时,将该连通域所具有的各个边缘点均置为背景点。
  13. 一种存储介质,用于存储如权利要求12所述的计算机程序。
PCT/CN2016/086594 2015-11-24 2016-06-21 图像处理方法和装置 WO2017088462A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510824471.9A CN105869122A (zh) 2015-11-24 2015-11-24 图像处理方法和装置
CN201510824471.9 2015-11-24

Publications (1)

Publication Number Publication Date
WO2017088462A1 true WO2017088462A1 (zh) 2017-06-01

Family

ID=56623754

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/086594 WO2017088462A1 (zh) 2015-11-24 2016-06-21 图像处理方法和装置

Country Status (2)

Country Link
CN (1) CN105869122A (zh)
WO (1) WO2017088462A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111833398A (zh) * 2019-04-16 2020-10-27 杭州海康威视数字技术股份有限公司 一种图像中的像素点标记方法及装置
CN111986208A (zh) * 2019-10-25 2020-11-24 深圳市安达自动化软件有限公司 一种目标标记定位圆的捕捉定位方法、装置、计算机设备

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108629887B (zh) * 2017-03-17 2021-02-02 深圳怡化电脑股份有限公司 纸币识别方法和装置
CN110188786B (zh) * 2019-04-11 2022-12-06 广西电网有限责任公司电力科学研究院 一种用于罐式避雷器泄漏电流的机器人图像识别算法
CN112001406B (zh) * 2019-05-27 2023-09-08 杭州海康威视数字技术股份有限公司 一种文本区域检测方法及装置
CN110223257B (zh) * 2019-06-11 2021-07-09 北京迈格威科技有限公司 获取视差图的方法、装置、计算机设备和存储介质
CN114387292B (zh) * 2022-03-25 2022-07-01 北京市农林科学院信息技术研究中心 图像边缘像素点优化方法、装置及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101546424A (zh) * 2008-03-24 2009-09-30 富士通株式会社 图像处理方法和装置及水印检测系统
CN101877055A (zh) * 2009-12-07 2010-11-03 北京中星微电子有限公司 一种关键特征点定位的方法和装置
CN102426647A (zh) * 2011-10-28 2012-04-25 Tcl集团股份有限公司 一种台标识别的方法、装置
CN104504717A (zh) * 2014-12-31 2015-04-08 北京奇艺世纪科技有限公司 一种图像信息检测方法及装置
CN104636706A (zh) * 2015-03-04 2015-05-20 深圳市金准生物医学工程有限公司 一种基于梯度方向一致性复杂背景条码图像自动分割方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060045346A1 (en) * 2004-08-26 2006-03-02 Hui Zhou Method and apparatus for locating and extracting captions in a digital image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101546424A (zh) * 2008-03-24 2009-09-30 富士通株式会社 图像处理方法和装置及水印检测系统
CN101877055A (zh) * 2009-12-07 2010-11-03 北京中星微电子有限公司 一种关键特征点定位的方法和装置
CN102426647A (zh) * 2011-10-28 2012-04-25 Tcl集团股份有限公司 一种台标识别的方法、装置
CN104504717A (zh) * 2014-12-31 2015-04-08 北京奇艺世纪科技有限公司 一种图像信息检测方法及装置
CN104636706A (zh) * 2015-03-04 2015-05-20 深圳市金准生物医学工程有限公司 一种基于梯度方向一致性复杂背景条码图像自动分割方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111833398A (zh) * 2019-04-16 2020-10-27 杭州海康威视数字技术股份有限公司 一种图像中的像素点标记方法及装置
CN111833398B (zh) * 2019-04-16 2023-09-08 杭州海康威视数字技术股份有限公司 一种图像中的像素点标记方法及装置
CN111986208A (zh) * 2019-10-25 2020-11-24 深圳市安达自动化软件有限公司 一种目标标记定位圆的捕捉定位方法、装置、计算机设备

Also Published As

Publication number Publication date
CN105869122A (zh) 2016-08-17

Similar Documents

Publication Publication Date Title
WO2017088462A1 (zh) 图像处理方法和装置
US10643336B2 (en) Image processing apparatus and method for object boundary stabilization in an image of a sequence of images
US8958643B2 (en) Recognition of numerical characters in digital images
CN110399842B (zh) 视频处理方法、装置、电子设备及计算机可读存储介质
CN104966092B (zh) 一种图像处理方法和装置
CN110335216B (zh) 图像处理方法、图像处理装置、终端设备及可读存储介质
US10762345B2 (en) Method and device for acquiring text data from trademark image, computer device and storage medium
CN109377508B (zh) 图像处理方法和装置
JP2016110647A (ja) 画像処理装置及び画像処理方法
EP2863362A1 (en) Method and apparatus for scene segmentation from focal stack images
CN111598076B (zh) 一种标签图像中日期检测处理方法及装置
CN104951440B (zh) 一种图像处理方法及电子设备
CN110969046A (zh) 人脸识别方法、设备及计算机可读存储介质
CN110909743A (zh) 图书盘点方法及图书盘点系统
CN111080723B (zh) 基于Unet网络的图像元素分割方法
CN109272526B (zh) 图像处理方法、系统及电子设备
CN110827301A (zh) 用于处理图像的方法和装置
CN112070792B (zh) 一种用于图像分割的边缘生长连接方法及装置
CN108804652B (zh) 封面图片的生成方法、装置、存储介质和电子装置
CN109145879B (zh) 一种打印字体识别的方法、设备及存储介质
US8423552B2 (en) Method of calculating connectivity of N-dimensional space
US9292763B2 (en) System, method, and medium for image object and contour feature extraction
KR20110009761A (ko) 지능 영상 감시를 위한 이동 객체 실시간 검출 방법
WO2017088463A1 (zh) 图像处理方法和装置
WO2017088478A1 (zh) 数字分离方法及装置

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: 16867689

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: 16867689

Country of ref document: EP

Kind code of ref document: A1