Coordinate positioning method, device, equipment and storage medium

文档序号:1113577 发布日期:2020-09-29 浏览:6次 中文

阅读说明:本技术 坐标定位方法、装置、设备及存储介质 (Coordinate positioning method, device, equipment and storage medium ) 是由 李雪 于 2020-06-17 设计创作,主要内容包括:本发明实施例公开了一种坐标定位方法、装置、设备及存储介质。该方法包括:获取原始印章图像,并对所述原始印章图像进行预处理,得到二值化的印章图像;其中,所述原始印章图像中包括至少一组印章,各组印章中包括两个部分重叠的印章;获取与所述二值化的印章图像匹配的目标印章模板;根据所述目标印章模板,对所述二值化的印章图像进行模板匹配操作,得到原始印章图像中的各印章的中心点坐标。本发明实施例的技术方案,提高了获取印章中心点的坐标的效率和准确度。(The embodiment of the invention discloses a coordinate positioning method, a coordinate positioning device, coordinate positioning equipment and a storage medium. The method comprises the following steps: acquiring an original seal image, and preprocessing the original seal image to obtain a binary seal image; the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals; acquiring a target seal template matched with the binarized seal image; and according to the target seal template, performing template matching operation on the binarized seal image to obtain the central point coordinates of each seal in the original seal image. According to the technical scheme of the embodiment of the invention, the efficiency and the accuracy of obtaining the coordinates of the center point of the seal are improved.)

1. A coordinate positioning method, comprising:

acquiring an original seal image, and preprocessing the original seal image to obtain a binary seal image;

the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals;

acquiring a target seal template matched with the binarized seal image;

and according to the target seal template, performing template matching operation on the binarized seal image to obtain the central point coordinates of each seal in the original seal image.

2. The method according to claim 1, wherein preprocessing said original stamp image to obtain a binarized stamp image comprises:

and carrying out graying processing and binarization processing on the original seal image to obtain a black binarized seal image.

3. The method according to claim 1, wherein obtaining a target stamp template that matches the binarized stamp image comprises:

respectively traversing the two template sets, and calculating the similarity between the binarized stamp image and each template;

and respectively selecting a template with the maximum similarity from each template set as a target stamp template matched with the binarized stamp image.

4. The method according to claim 3, wherein performing template matching operation on the binarized stamp image according to the target stamp template to obtain coordinates of a center point of each stamp in the original stamp image comprises:

calculating the diameter of the seal according to the target seal template;

performing template matching on the binarized stamp image by using a target stamp template, and determining at least one target image area superposed with the target stamp template;

determining boundary pixels included by a target seal in the current target image area according to the relationship between the distance between every two pixels in the current target image area and the diameter of the seal;

and determining the coordinates of the central point of the target seal in the original seal image according to the boundary pixels included by the target seal.

5. The method according to claim 4, wherein determining coordinates of a center point of the target stamp in the original stamp image based on the boundary pixels included in the target stamp comprises:

determining a minimum circumscribed rectangular frame of the target seal according to the boundary pixels included by the target seal;

and calculating to obtain the coordinate of the central point of the target seal according to the coordinate of the upper left vertex angle and the coordinate of the lower right vertex angle of the minimum circumscribed rectangular frame.

6. The method of claim 1,

at least one group of seals included in the original seal image are stamped by the seal control instrument according to stamping instructions;

the stamping instruction comprises coordinates of at least one standard stamping point;

each standard stamping point corresponds to a group of stamps in the original stamp image;

the standard central point coordinates of the two seals included in each group of seals are obtained by calculation according to the coordinates of the corresponding standard stamping points.

7. The method according to claim 6, wherein after performing template matching operation on the binarized stamp image according to the target stamp template to obtain coordinates of a center point of each stamp in an original stamp image, further comprising:

calculating the coordinate of an actual stamping point corresponding to the current group of seals according to the coordinates of the central points of the two seals included in the current group of seals;

performing difference operation on the coordinates of the actual stamping points and the coordinates of the standard stamping points corresponding to the current group of stamps to obtain a deviation value;

and calibrating the control parameters of the printing control instrument according to at least one deviation value.

8. A coordinate positioning apparatus, comprising:

the device comprises a preprocessing module, a storage module and a display module, wherein the preprocessing module is used for acquiring an original seal image and preprocessing the original seal image to obtain a binary seal image;

the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals;

the template acquisition module is used for acquiring a target seal template matched with the binarized seal image;

and the template matching module is used for performing template matching operation on the binarized stamp image according to the target stamp template to obtain the central point coordinates of each stamp in the original stamp image.

9. An electronic device, characterized in that the electronic device comprises:

one or more processors;

a storage device for storing one or more programs,

when executed by the one or more processors, cause the one or more processors to implement the coordinate positioning method of any of claims 1-7.

10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the coordinate positioning method according to any one of claims 1-7.

Technical Field

The embodiment of the invention relates to the technical field of image processing, in particular to a coordinate positioning method, a coordinate positioning device, coordinate positioning equipment and a storage medium.

Background

At present, when organizations such as banks handle business for users, a large number of seals are generally needed to be stamped on files, and in order to save manpower resources and improve operation efficiency, a seal control instrument can be used for stamping.

Disclosure of Invention

The embodiment of the invention provides a coordinate positioning method, a coordinate positioning device, coordinate positioning equipment and a storage medium, which are used for improving the efficiency and accuracy of obtaining a coordinate of a center point of a seal.

In a first aspect, an embodiment of the present invention provides a coordinate positioning method, including:

acquiring an original seal image, and preprocessing the original seal image to obtain a binary seal image;

the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals;

acquiring a target seal template matched with the binarized seal image;

and performing template matching operation on the binarized stamp image according to the target stamp template to obtain the coordinates of the central point of each stamp in the original stamp image.

Optionally, preprocessing the original stamp image to obtain a binarized stamp image, including:

carrying out gray processing and binarization processing on the original seal image to obtain a black binarized seal image.

Optionally, obtaining a target stamp template matched with the binarized stamp image includes:

respectively traversing the two template sets, and calculating the similarity between the binarized stamp image and each template;

and respectively selecting a template with the maximum similarity from each template set as a target stamp template matched with the binarized stamp image.

Optionally, according to the target stamp template, performing template matching operation on the binarized stamp image to obtain the coordinates of the central point of each stamp in the original stamp image, including:

calculating the diameter of the seal according to the target seal template;

performing template matching on the binarized stamp image by using a target stamp template, and determining at least one target image area superposed with the target stamp template;

determining boundary pixels included by a target seal in the current target image area according to the relationship between the distance between every two pixels in the current target image area and the diameter of the seal;

and determining the coordinates of the central point of the target seal in the original seal image according to the boundary pixels included by the target seal.

Optionally, determining coordinates of a central point of the target stamp in the original stamp image according to the boundary pixels included in the target stamp includes:

determining a minimum circumscribed rectangular frame of the target seal according to boundary pixels included by the target seal;

and calculating to obtain the coordinate of the central point of the target seal according to the coordinate of the upper left vertex angle and the coordinate of the lower right vertex angle of the minimum circumscribed rectangular frame.

Optionally, at least one group of seals included in the original seal image are stamped by the seal control instrument according to the stamping instruction;

the stamping instruction comprises the coordinates of at least one standard stamping point;

each standard stamping point corresponds to a group of stamps in the original stamp image;

the standard central point coordinates of the two seals included in each group of seals are obtained by calculation according to the coordinates of the corresponding standard stamping points.

Optionally, after performing template matching operation on the binarized stamp image according to the target stamp template to obtain the coordinates of the central point of each stamp in the original stamp image, the method further includes:

calculating the coordinate of an actual stamping point corresponding to the current group of seals according to the coordinates of the central points of the two seals included in the current group of seals;

performing difference operation on the coordinates of the actual stamping points and the coordinates of the standard stamping points corresponding to the current group of stamps to obtain a deviation value;

and calibrating the control parameters of the printing control instrument according to the at least one deviation value.

In a second aspect, an embodiment of the present invention further provides a coordinate positioning apparatus, including:

the preprocessing module is used for acquiring an original seal image and preprocessing the original seal image to obtain a binary seal image;

the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals;

the template acquisition module is used for acquiring a target seal template matched with the binarized seal image;

and the template matching module is used for performing template matching operation on the binarized stamp image according to the target stamp template to obtain the central point coordinates of each stamp in the original stamp image.

In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:

one or more processors;

a storage device for storing one or more programs,

when executed by one or more processors, cause the one or more processors to implement the coordinate locating method provided by any of the embodiments of the present invention.

In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the coordinate positioning method provided in any embodiment of the present invention.

According to the technical scheme of the embodiment of the invention, the binaryzation seal image is obtained by acquiring the original seal image and preprocessing the original seal image; the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals; acquiring a target seal template matched with the binarized seal image; according to the target seal template, template matching operation is carried out on the binarized seal image to obtain the coordinates of the central point of each seal in the original seal image, the problem that the efficiency and accuracy of manual measurement of the coordinates of the central point of the seal are low in the prior art is solved, and the efficiency and accuracy of automatically obtaining the coordinates of the central point of the seal are improved.

Drawings

FIG. 1a is a flowchart of a coordinate positioning method according to a first embodiment of the present invention;

FIG. 1b is a schematic diagram of an original stamp image according to one embodiment of the present invention;

FIG. 1c is a schematic diagram of a binarized stamp image according to a first embodiment of the present invention;

FIG. 1d is a schematic view of a stamp template according to one embodiment of the present invention;

FIG. 1e is a schematic diagram of a stamp image after template matching according to a first embodiment of the present invention;

FIG. 2 is a schematic structural diagram of a coordinate positioning apparatus according to a second embodiment of the present invention;

fig. 3 is a schematic structural diagram of an electronic device in a third embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于卷积神经网络的车牌校准识别方法、系统及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!