CN111696154A - Coordinate positioning method, device, equipment and storage medium - Google Patents

Coordinate positioning method, device, equipment and storage medium Download PDF

Info

Publication number
CN111696154A
CN111696154A CN202010548918.5A CN202010548918A CN111696154A CN 111696154 A CN111696154 A CN 111696154A CN 202010548918 A CN202010548918 A CN 202010548918A CN 111696154 A CN111696154 A CN 111696154A
Authority
CN
China
Prior art keywords
stamp
image
coordinates
original
seals
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010548918.5A
Other languages
Chinese (zh)
Other versions
CN111696154B (en
Inventor
李雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Huilang Times Technology Co Ltd
Original Assignee
Beijing Huilang Times Technology Co Ltd
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 Beijing Huilang Times Technology Co Ltd filed Critical Beijing Huilang Times Technology Co Ltd
Priority to CN202010548918.5A priority Critical patent/CN111696154B/en
Publication of CN111696154A publication Critical patent/CN111696154A/en
Application granted granted Critical
Publication of CN111696154B publication Critical patent/CN111696154B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Multimedia (AREA)
  • Collating Specific Patterns (AREA)
  • Image Analysis (AREA)
  • Image Input (AREA)

Abstract

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; the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals; preprocessing the original seal image to obtain a binary seal image; and performing horizontal projection and vertical projection on the binarized stamp image to obtain the coordinates of the central point of each stamp in the original stamp 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.

Description

Coordinate positioning method, device, equipment and storage medium
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.
In the prior art, when a seal control instrument is used for stamping, an actual stamping point often has a certain deviation from a standard stamping point, and in order to determine the deviation, the coordinate of the central point of a seal needs to be measured. At present, the coordinates of the center point of the seal are mainly obtained in a manual measurement mode, for example, the coordinates of the center point of the seal are measured by using measurement tools such as a ruler and the like, but the measurement efficiency and the accuracy of the method are low.
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; the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals;
preprocessing an original seal image to obtain a binary seal image;
and performing horizontal projection and vertical projection on the binarized stamp image 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, performing horizontal projection and vertical projection on the binarized stamp image to obtain coordinates of a central point of each stamp in the original stamp image, including:
horizontally projecting each line of pixels of the binarized stamp image according to the sequence from top to bottom, and acquiring the longitudinal coordinate value of each target black pixel;
wherein, the previous pixel of the target black pixel is a white pixel;
according to the sequence from left to right, vertically projecting each row of pixels of the binarized stamp image, and acquiring the abscissa value of each target black pixel;
and determining the coordinates of the center point of each seal in the original seal image according to the abscissa value and the ordinate value of each target black pixel.
Optionally, determining coordinates of a center point of each stamp in the original stamp image according to the abscissa value and the ordinate value of each target black pixel, including:
respectively determining a target black pixel set corresponding to each group of seals;
acquiring a target black pixel with the minimum vertical coordinate value as a first reference pixel, acquiring a target black pixel with the minimum horizontal coordinate value as a second reference pixel, and acquiring a target black pixel with the maximum horizontal coordinate value as a third reference pixel from a current target black pixel set;
taking a smaller abscissa value corresponding to the first reference pixel as a first abscissa, and taking an ordinate of the second reference pixel as a first ordinate, so as to obtain a central point coordinate of the first stamp in the stamp group corresponding to the current target black pixel set;
and taking a larger abscissa value corresponding to the first reference pixel as a second abscissa, and taking an ordinate of the third reference pixel as a second ordinate, so as to obtain a central point coordinate of the second stamp in the stamp group corresponding to the current target black pixel set.
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 horizontal projection and vertical projection on the binarized stamp image 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 acquisition module is used for acquiring an original seal image; the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals;
the preprocessing module is used for preprocessing the original seal image to obtain a binary seal image;
and the projection module is used for carrying out horizontal projection and vertical projection on the binarized stamp image to obtain the coordinates of the central point of each stamp in the original stamp image.
Optionally, the projection module is specifically configured to:
horizontally projecting each line of pixels of the binarized stamp image according to the sequence from top to bottom, and acquiring the longitudinal coordinate value of each target black pixel;
wherein, the previous pixel of the target black pixel is a white pixel;
according to the sequence from left to right, vertically projecting each row of pixels of the binarized stamp image, and acquiring the abscissa value of each target black pixel;
and determining the coordinates of the center point of each seal in the original seal image according to the abscissa value and the ordinate value of each target black pixel.
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 original seal image is obtained; the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals; preprocessing an original seal image to obtain a binary seal image; the binarized seal image is horizontally projected and vertically projected to obtain the coordinates of the central point of each seal in the original seal image, so that the problem of low efficiency and accuracy in manual measurement of the coordinates of the central point of the seal in the prior art is solved, and the efficiency and accuracy in automatic acquisition of 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 diagram of a projected stamp image 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.
Example one
Fig. 1a is a flowchart of a coordinate positioning method in one embodiment of the present invention, which is applicable to a case of determining coordinates of a center point of two partially overlapped stamps, and the method may be executed by a coordinate positioning apparatus, which may be implemented by hardware and/or software, and may be generally integrated in an electronic device providing a coordinate positioning service. As shown in fig. 1a, the method comprises:
and step 110, acquiring an original seal image.
The original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals.
In this embodiment, the original stamp image refers to a stamp image to be measured that has not been subjected to image processing, and exemplarily, as shown in fig. 1b, the original stamp image includes three groups of stamps respectively corresponding to different stamping positions, each group of stamps includes two stamps, and only a part of the two stamps in the same group overlaps.
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.
In this embodiment, the stamp control unit is configured to stamp at least one designated location simultaneously according to the coordinates of at least one standard stamping point carried in the stamping command. The print control instrument shown in fig. 1b has a triangular stamping function, that is, the print control instrument can stamp three vertices of a triangle at one time. Specifically, the coordinates of the first standard center point and the coordinates of the second standard center point corresponding to the coordinates of each standard stamping point may be calculated respectively according to the coordinates of the three standard stamping points carried in the stamping instruction, then stamping is performed simultaneously at the position of each first standard center point, and stamping is performed simultaneously at the position of each second standard center point, thereby obtaining the original stamp image including the three sets of stamps as shown in fig. 1 b. For example, assuming that the standard stamping point coordinates are (5,5), the coordinates of the first standard center point may be (0,5), and the coordinates of the second standard center point may be (10, 5).
In order to improve the accuracy of acquiring the coordinates of the actual stamping points corresponding to each group of seals, the present embodiment accurately calculates the coordinates of the actual stamping points through the coordinates of the central points of the two seals, for one standard stamping point stamping two partially overlapped seals.
And step 120, preprocessing the original seal image to obtain a binary seal image.
Optionally, preprocessing the original stamp image to obtain a binarized stamp image, which may include: carrying out gray processing and binarization processing on the original seal image to obtain a black binarized seal image.
In this embodiment, after the original stamp image is obtained, the original stamp image is first placed, the original stamp image is subjected to black edge removal processing, and then graying processing and binarization processing are performed, so that the original stamp image is processed until all the parts except the stamp region are white and the stamp is black, as shown in fig. 1 c.
The graying process is to convert each pixel value in the original stamp image into a gray value between 0 and 255, and the binarization process is to set the gray value of each pixel in the original stamp image to 0 or 255, so that the whole stamp image has an obvious visual effect only including black and white.
And step 130, performing horizontal projection and vertical projection on the binarized stamp image to obtain the coordinates of the central point of each stamp in the original stamp image.
In this embodiment, after obtaining the binarized stamp image, the stamp image is horizontally projected to find an image area having black pixels in the horizontal direction, that is, the upper and lower frames of each group of stamps are determined, and then the found image area is vertically projected to determine the left and right frames of each group of stamps, thereby determining the stamp area, as shown in fig. 1d, and the coordinates of the center point of the stamp.
Optionally, performing horizontal projection and vertical projection on the binarized stamp image to obtain the coordinates of the central point of each stamp in the original stamp image, which may include: horizontally projecting each line of pixels of the binarized stamp image according to the sequence from top to bottom, and acquiring the longitudinal coordinate value of each target black pixel; wherein, the previous pixel of the target black pixel is a white pixel; according to the sequence from left to right, vertically projecting each row of pixels of the binarized stamp image, and acquiring the abscissa value of each target black pixel; and determining the coordinates of the center point of each seal in the original seal image according to the abscissa value and the ordinate value of each target black pixel.
In this embodiment, when the binarized stamp image is projected, each line of pixels of the binarized stamp image is horizontally projected in the order from top to bottom, and when the conversion from the white pixel to the black pixel occurs in the pixels in the same line, the black pixel after the white pixel is taken as the target black pixel, and the vertical coordinate value of each target black pixel is obtained. At this time, all the target black pixels include boundary pixels of each stamp, and the upper and lower frames of each set of stamps can be determined. Then, according to the sequence from left to right, each row of pixels of the binarized stamp image in the upper and lower frames are vertically projected, the abscissa value of each target black pixel is obtained, the complete coordinate of each target black pixel is obtained, and the left and right frames of each group of stamps can be determined at the moment. And then determining the coordinates of the central point of each stamp in the original stamp image according to the coordinates of each target black pixel.
Optionally, determining the coordinates of the center point of each stamp in the original stamp image according to the abscissa value and the ordinate value of each target black pixel may include: respectively determining a target black pixel set corresponding to each group of seals; acquiring a target black pixel with the minimum vertical coordinate value as a first reference pixel, acquiring a target black pixel with the minimum horizontal coordinate value as a second reference pixel, and acquiring a target black pixel with the maximum horizontal coordinate value as a third reference pixel from a current target black pixel set; taking a smaller abscissa value corresponding to the first reference pixel as a first abscissa, and taking an ordinate of the second reference pixel as a first ordinate, so as to obtain a central point coordinate of the first stamp in the stamp group corresponding to the current target black pixel set; and taking a larger abscissa value corresponding to the first reference pixel as a second abscissa, and taking an ordinate of the third reference pixel as a second ordinate, so as to obtain a central point coordinate of the second stamp in the stamp group corresponding to the current target black pixel set.
In this embodiment, after the coordinates of each target black pixel are obtained, all the target black pixels are divided into a plurality of target black pixel sets, so that each target black pixel set corresponds to one group of stamps. For each target black pixel set, taking the target black pixel set corresponding to the first stamp group in fig. 1d as an example, two target black pixels with the minimum longitudinal coordinate values, that is, the target black pixels with the longitudinal coordinate values of y1 and y2, just correspond to the top vertices of the two stamps in the group, respectively, so that the two target black pixels with the minimum longitudinal coordinate values may be used as the first reference pixel for obtaining the longitudinal coordinates of the center points of the first stamp and the second stamp in the group. Then, considering that the target black pixel with the smallest abscissa value, i.e., the target black pixel with the abscissa value of x3, corresponds to the left vertex of the first stamp in the set of stamps, the target black pixel with the largest abscissa value, i.e., the target black pixel with the abscissa value of x4, corresponds to the right vertex of the second stamp in the set of stamps, the target black pixel with the smallest abscissa value is used as a second reference pixel for obtaining the abscissa value of the center point of the first stamp in the set, and the target black pixel with the largest abscissa value is used as a third reference pixel for obtaining the abscissa value of the center point of the second stamp in the set. And finally, determining the coordinates of the central points of the two seals in the group according to the coordinate values of the reference pixels.
In this embodiment, in order to obtain the pixel coordinates, the upper left vertex of the binarized stamp image is used as the origin of the coordinate axis, the abscissa axis is established from left to right through the origin, and the ordinate axis is established from top to bottom through the origin. It should be noted that the coordinate axis in this embodiment is not only one establishment method, but also other manners may be selected to establish the coordinate axis, and only the coordinates of each pixel need to be adjusted correspondingly.
Optionally, after performing horizontal projection and vertical projection on the binarized stamp image to obtain the coordinates of the central point of each stamp in the original stamp image, the method may further include: 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 this embodiment, the coordinates of the actual stamping point corresponding to each group of seals can be calculated according to the coordinates of the central point of the two partially overlapped seals in each group of seals, the position deviation existing when the seals of the printing control instrument are printed can be obtained by comparing the coordinates of the actual stamping point with the ideal coordinates of the standard stamping point, and then the control parameter for controlling the positions of the seals in the printing control instrument can be adjusted according to the deviation value, so that the effect that the coordinates of the actual stamping point are consistent with the coordinates of the standard stamping point is achieved.
According to the technical scheme of the embodiment of the invention, the original seal image is obtained; the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals; preprocessing an original seal image to obtain a binary seal image; the binarized seal image is horizontally projected and vertically projected to obtain the coordinates of the central point of each seal in the original seal image, so that the problem of low efficiency and accuracy in manual measurement of the coordinates of the central point of the seal in the prior art is solved, and the efficiency and accuracy in automatic acquisition of the coordinates of the central point of the seal are improved.
Example two
Fig. 2 is a schematic structural diagram of a coordinate positioning apparatus in a second embodiment of the present invention, which is applicable to a case of determining coordinates of center points of two partially overlapped stamps. As shown in fig. 2, the apparatus may include:
an obtaining module 210, configured to obtain an original stamp image; the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals;
the preprocessing module 220 is used for preprocessing the original seal image to obtain a binarized seal image;
and the projection module 230 is configured to perform horizontal projection and vertical projection on the binarized stamp image to obtain coordinates of a center point of each stamp in the original stamp image.
According to the technical scheme of the embodiment of the invention, the original seal image is obtained; the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals; preprocessing an original seal image to obtain a binary seal image; the binarized seal image is horizontally projected and vertically projected to obtain the coordinates of the central point of each seal in the original seal image, so that the problem of low efficiency and accuracy in manual measurement of the coordinates of the central point of the seal in the prior art is solved, and the efficiency and accuracy in automatic acquisition of the coordinates of the central point of the seal are improved.
Optionally, the preprocessing module 220 is specifically configured to: carrying out gray processing and binarization processing on the original seal image to obtain a black binarized seal image.
Optionally, the projection module 230 is specifically configured to: horizontally projecting each line of pixels of the binarized stamp image according to the sequence from top to bottom, and acquiring the longitudinal coordinate value of each target black pixel; wherein, the previous pixel of the target black pixel is a white pixel; according to the sequence from left to right, vertically projecting each row of pixels of the binarized stamp image, and acquiring the abscissa value of each target black pixel; and determining the coordinates of the center point of each seal in the original seal image according to the abscissa value and the ordinate value of each target black pixel.
Optionally, the projection module 230 is specifically configured to: respectively determining a target black pixel set corresponding to each group of seals; acquiring a target black pixel with the minimum vertical coordinate value as a first reference pixel, acquiring a target black pixel with the minimum horizontal coordinate value as a second reference pixel, and acquiring a target black pixel with the maximum horizontal coordinate value as a third reference pixel from a current target black pixel set; taking a smaller abscissa value corresponding to the first reference pixel as a first abscissa, and taking an ordinate of the second reference pixel as a first ordinate, so as to obtain a central point coordinate of the first stamp in the stamp group corresponding to the current target black pixel set; and taking a larger abscissa value corresponding to the first reference pixel as a second abscissa, and taking an ordinate of the third reference pixel as a second ordinate, so as to obtain a central point coordinate of the second stamp in the stamp group corresponding to the current target black pixel set.
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, the method further includes: the calibration module is used for calculating the coordinate of an actual stamping point corresponding to the current group of seals according to the central point coordinates of the two seals in the current group of seals after performing horizontal projection and vertical projection on the binarized seal image to obtain the central point coordinates of each seal in the original seal image; 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.
The coordinate positioning device provided by the embodiment of the invention can execute the coordinate positioning method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an electronic device in a third embodiment of the present invention. Fig. 3 illustrates a block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention. The device 12 shown in fig. 3 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present invention.
As shown in FIG. 3, device 12 is in the form of a general purpose computing device. The components of device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, and commonly referred to as a "hard drive"). Although not shown in FIG. 3, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with device 12, and/or with any devices (e.g., network card, modem, etc.) that enable device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes programs stored in the system memory 28 to execute various functional applications and data processing, such as implementing a coordinate positioning method provided by an embodiment of the present invention.
Namely: a coordinate locating method is implemented, comprising: acquiring an original seal image; the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals;
preprocessing an original seal image to obtain a binary seal image;
and performing horizontal projection and vertical projection on the binarized stamp image to obtain the coordinates of the central point of each stamp in the original stamp image.
Example four
The fourth embodiment of the present invention further discloses a computer storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a coordinate positioning method, including: acquiring an original seal image; the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals; preprocessing an original seal image to obtain a binary seal image; and performing horizontal projection and vertical projection on the binarized stamp image to obtain the coordinates of the central point of each stamp in the original stamp image.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments illustrated herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A coordinate positioning method, comprising:
acquiring an original seal image; the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals;
preprocessing the original seal image to obtain a binary seal image;
and performing horizontal projection and vertical projection on the binarized stamp image to obtain the coordinates of the central point of each stamp in the original stamp 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 2, wherein the horizontally projecting and vertically projecting the binarized stamp image to obtain coordinates of a center point of each stamp in the original stamp image comprises:
horizontally projecting each line of pixels of the binarized stamp image according to the sequence from top to bottom, and acquiring a longitudinal coordinate value of each target black pixel;
wherein a previous pixel of the target black pixel is a white pixel;
according to the sequence from left to right, vertically projecting each row of pixels of the binarized stamp image, and acquiring the abscissa value of each target black pixel;
and determining the coordinates of the center point of each seal in the original seal image according to the abscissa value and the ordinate value of each target black pixel.
4. The method of claim 3, wherein determining coordinates of a center point of each stamp in the original stamp image based on the abscissa and ordinate values of each target black pixel comprises:
respectively determining a target black pixel set corresponding to each group of seals;
acquiring a target black pixel with the minimum vertical coordinate value as a first reference pixel, acquiring a target black pixel with the minimum horizontal coordinate value as a second reference pixel, and acquiring a target black pixel with the maximum horizontal coordinate value as a third reference pixel from a current target black pixel set;
taking a smaller abscissa value corresponding to the first reference pixel as a first abscissa, and taking an ordinate of the second reference pixel as a first ordinate, so as to obtain a central point coordinate of the first stamp in the stamp group corresponding to the current target black pixel set;
and taking a larger abscissa value corresponding to the first reference pixel as a second abscissa, and taking an ordinate of the third reference pixel as a second ordinate, so as to obtain a central point coordinate of the second stamp in the stamp group corresponding to the current target black pixel set.
5. 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.
6. The method according to claim 5, wherein after performing horizontal projection and vertical projection on the binarized stamp image to obtain coordinates of a center point of each stamp in the original stamp image, the method further comprises:
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.
7. A coordinate positioning apparatus, comprising:
the acquisition module is used for acquiring an original seal image; the original seal image comprises at least one group of seals, and each group of seals comprises two partially overlapped seals;
the preprocessing module is used for preprocessing the original seal image to obtain a binary seal image;
and the projection module is used for carrying out horizontal projection and vertical projection on the binarized stamp image to obtain the coordinates of the central point of each stamp in the original stamp image.
8. The apparatus of claim 7, wherein the projection module is specifically configured to:
horizontally projecting each line of pixels of the binarized stamp image according to the sequence from top to bottom, and acquiring a longitudinal coordinate value of each target black pixel;
wherein a previous pixel of the target black pixel is a white pixel;
according to the sequence from left to right, vertically projecting each row of pixels of the binarized stamp image, and acquiring the abscissa value of each target black pixel;
and determining the coordinates of the center point of each seal in the original seal image according to the abscissa value and the ordinate value of each target black pixel.
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-6.
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-6.
CN202010548918.5A 2020-06-16 2020-06-16 Coordinate positioning method, device, equipment and storage medium Active CN111696154B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010548918.5A CN111696154B (en) 2020-06-16 2020-06-16 Coordinate positioning method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010548918.5A CN111696154B (en) 2020-06-16 2020-06-16 Coordinate positioning method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111696154A true CN111696154A (en) 2020-09-22
CN111696154B CN111696154B (en) 2023-06-13

Family

ID=72481231

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010548918.5A Active CN111696154B (en) 2020-06-16 2020-06-16 Coordinate positioning method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111696154B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113781533A (en) * 2021-09-10 2021-12-10 北京方正印捷数码技术有限公司 Image registration method, image registration device, printer and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07282257A (en) * 1994-04-06 1995-10-27 Sanyo Electric Co Ltd Center position calculation device for object body
JPH09305770A (en) * 1996-05-21 1997-11-28 Matsushita Electric Ind Co Ltd Approval managing device using seal impression
CN101008985A (en) * 2007-01-18 2007-08-01 章毅 Seal identification system and controlling method thereof
CN104463931A (en) * 2015-01-07 2015-03-25 昆山百润科技有限公司 Seal overlapping detecting and processing method under situation of multi-person concurrent signatures
CN110472623A (en) * 2019-06-29 2019-11-19 华为技术有限公司 Image detecting method, equipment and system
CN110889374A (en) * 2019-11-28 2020-03-17 中国建设银行股份有限公司 Seal image processing method and device, computer and storage medium
CN111291757A (en) * 2020-02-17 2020-06-16 江苏诚印科技有限公司 Method for identifying uniqueness of seal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07282257A (en) * 1994-04-06 1995-10-27 Sanyo Electric Co Ltd Center position calculation device for object body
JPH09305770A (en) * 1996-05-21 1997-11-28 Matsushita Electric Ind Co Ltd Approval managing device using seal impression
CN101008985A (en) * 2007-01-18 2007-08-01 章毅 Seal identification system and controlling method thereof
CN104463931A (en) * 2015-01-07 2015-03-25 昆山百润科技有限公司 Seal overlapping detecting and processing method under situation of multi-person concurrent signatures
CN110472623A (en) * 2019-06-29 2019-11-19 华为技术有限公司 Image detecting method, equipment and system
CN110889374A (en) * 2019-11-28 2020-03-17 中国建设银行股份有限公司 Seal image processing method and device, computer and storage medium
CN111291757A (en) * 2020-02-17 2020-06-16 江苏诚印科技有限公司 Method for identifying uniqueness of seal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘志慧: "印章定位与配准系统的设计与实现" *
李佳琦,崔洪岩,白金成,吕战,赵伟林,佟喜峰: "一种计算椭圆印章倾斜角度的方法" *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113781533A (en) * 2021-09-10 2021-12-10 北京方正印捷数码技术有限公司 Image registration method, image registration device, printer and storage medium

Also Published As

Publication number Publication date
CN111696154B (en) 2023-06-13

Similar Documents

Publication Publication Date Title
CN108229485B (en) Method and apparatus for testing user interface
US20200167568A1 (en) Image processing method, device, and storage medium
CN111986159B (en) Electrode defect detection method and device for solar cell and storage medium
CN109472852B (en) Point cloud image display method and device, equipment and storage medium
CN111723799B (en) Coordinate positioning method, device, equipment and storage medium
CN111724396A (en) Image segmentation method and device, computer-readable storage medium and electronic device
CN109710264B (en) Gerber file conversion method, system, device and storage medium
CN110162757B (en) Table structure extraction method and system
CN113516697B (en) Image registration method, device, electronic equipment and computer readable storage medium
CN111696154B (en) Coordinate positioning method, device, equipment and storage medium
CN109683834B (en) Gerber file conversion precision processing method, system, equipment and storage medium
CN112509135A (en) Element labeling method, device, equipment, storage medium and computer program product
CN112232315A (en) Text box detection method and device, electronic equipment and computer storage medium
EP3422251A1 (en) Typesetness score for a table
CN113362227B (en) Image processing method, device, electronic equipment and storage medium
CN113592981B (en) Picture labeling method and device, electronic equipment and storage medium
CN114708239A (en) Glue width detection method and device, electronic equipment and storage medium
CN112966671A (en) Contract detection method and device, electronic equipment and storage medium
CN114140612A (en) Method, device, equipment and storage medium for detecting hidden danger of power equipment
CN114445682A (en) Method, device, electronic equipment, storage medium and product for training model
CN113469086A (en) Method, device, equipment and medium for dividing areas in building plan
CN111124862A (en) Intelligent equipment performance testing method and device and intelligent equipment
CN113420581A (en) Correction method and device for written document image, electronic equipment and readable medium
CN112465692A (en) Image processing method, device, equipment and storage medium
CN117372510B (en) Map annotation identification method, terminal and medium based on computer vision model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant