[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

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

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

Info

Publication number
CN111696154B
CN111696154B CN202010548918.5A CN202010548918A CN111696154B CN 111696154 B CN111696154 B CN 111696154B CN 202010548918 A CN202010548918 A CN 202010548918A CN 111696154 B CN111696154 B CN 111696154B
Authority
CN
China
Prior art keywords
seal
seals
target black
seal image
image
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.)
Active
Application number
CN202010548918.5A
Other languages
Chinese (zh)
Other versions
CN111696154A (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 seals which are partially overlapped; preprocessing the original seal image to obtain a binarized seal image; and carrying out horizontal projection and vertical projection on the binarized seal image to obtain the center point coordinates of each seal in the original seal image. According to the technical scheme provided by the embodiment of the invention, the efficiency and accuracy of acquiring the coordinates of the stamp center point 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, a coordinate positioning equipment and a storage medium.
Background
At present, when institutions such as banks transact business for users, a large number of seals are usually required to be covered on files, and in order to save human resources and improve the working efficiency, a seal operation can be performed by using a printer.
In the prior art, when a stamping is performed by using a printing control instrument, 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 the stamping needs to be measured. At present, the coordinates of the central point of the seal are mainly obtained in a manual measurement mode, for example, a ruler and other measuring tools are used for measuring the coordinates of the central point of the seal, but the measuring efficiency of the method is low, and the accuracy is poor.
Disclosure of Invention
The embodiment of the invention provides a coordinate positioning method, a device, equipment and a storage medium, which are used for improving the efficiency and accuracy of acquiring the coordinates of a seal center point.
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 seals which are partially overlapped;
preprocessing an original seal image to obtain a binarized seal image;
and carrying out horizontal projection and vertical projection on the binarized seal image to obtain the center point coordinates of each seal in the original seal image.
Optionally, preprocessing the original seal image to obtain a binarized seal image, including:
and carrying out gray processing and binarization processing on the original seal image to obtain a binarized seal image with black seal.
Optionally, performing horizontal projection and vertical projection on the binarized seal image to obtain center point coordinates of each seal in the original seal image, including:
performing horizontal projection on each row of pixels of the binarized seal image according to the sequence from top to bottom, and acquiring the ordinate value of each target black pixel;
wherein, the previous pixel of the target black pixel is a white pixel;
performing vertical projection on each row of pixels of the binarized seal image according to the left-to-right sequence, and acquiring the abscissa value of each target black pixel;
and determining the center point coordinates of each seal in the original seal image according to the horizontal coordinate value and the vertical coordinate value 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 includes:
respectively determining target black pixel sets corresponding to all groups of seals;
acquiring a target black pixel with the smallest ordinate value from a current target black pixel set as a first reference pixel, acquiring a target black pixel with the smallest abscissa value as a second reference pixel, and acquiring a target black pixel with the largest abscissa value as a third reference pixel;
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 to obtain a center point coordinate of a first seal in the seal 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 the ordinate of the third reference pixel as a second ordinate to obtain the center point coordinate of the second seal in the seal group corresponding to the current target black pixel set.
Optionally, at least one group of seals included in the original seal image is covered by the seal controller according to the seal command;
the stamping instruction comprises at least one coordinate of a standard stamping point;
each standard stamping point corresponds to a group of stamps in the original stamp image;
the standard center point coordinates of the two seals included in each set of seals are calculated according to the coordinates of the corresponding standard seal points.
Optionally, after performing horizontal projection and vertical projection on the binarized seal image to obtain coordinates of a central point of each seal in the original seal image, the method further includes:
calculating the coordinates of the actual stamping points 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 deviation values;
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 seals which are partially overlapped;
the preprocessing module is used for preprocessing the original seal image to obtain a binarized seal image;
and the projection module is used for carrying out horizontal projection and vertical projection on the binarized seal image to obtain the center point coordinates of each seal in the original seal image.
Optionally, the projection module is specifically configured to:
performing horizontal projection on each row of pixels of the binarized seal image according to the sequence from top to bottom, and acquiring the ordinate value of each target black pixel;
wherein, the previous pixel of the target black pixel is a white pixel;
performing vertical projection on each row of pixels of the binarized seal image according to the left-to-right sequence, and acquiring the abscissa value of each target black pixel;
and determining the center point coordinates of each seal in the original seal image according to the horizontal coordinate value and the vertical coordinate value of each target black pixel.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the 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 having stored thereon a computer program, which when executed by a processor, implements the coordinate positioning method provided by any embodiment of the present invention.
According to the technical scheme, an original seal image is obtained; the original seal image comprises at least one group of seals, and each group of seals comprises two seals which are partially overlapped; preprocessing an original seal image to obtain a binarized seal image; the binarized seal image is subjected to horizontal projection and vertical projection to obtain the coordinates of the central points of the seals in the original seal image, so that the problem that the efficiency and accuracy of manually measuring the coordinates of the central points of the seals in the prior art are low is solved, and the efficiency and accuracy of automatically acquiring the coordinates of the central points of the seals 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 view of an original stamp image according to a first embodiment of the present invention;
FIG. 1c is a schematic view of a binarized stamp image according to a first embodiment of the present invention;
FIG. 1d is a schematic view of a projected stamp image according to a first embodiment of the present invention;
FIG. 2 is a schematic 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 according to a third embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1a is a flowchart of a coordinate positioning method according to a first embodiment of the present invention, which is applicable to determining coordinates of a center point of two partially overlapped stamps, and which may be performed by a coordinate positioning apparatus, which may be implemented in hardware and/or software, and which may be generally integrated in an electronic device providing a coordinate positioning service. As shown in fig. 1a, the method comprises:
step 110, obtaining an original seal image.
The original seal image comprises at least one group of seals, and each group of seals comprises two seals which are partially overlapped.
In this embodiment, the original seal image refers to a seal image to be measured that has not been subjected to image processing, and as shown in fig. 1b, the original seal image includes three sets of seals corresponding to different seal positions, each set of seals includes two seals, and only part of the two seals in the same set overlap.
Optionally, at least one group of seals included in the original seal image is covered by the seal controller according to the seal command; the stamping instruction comprises at least one coordinate of a standard stamping point; each standard stamping point corresponds to a group of stamps in the original stamp image; the standard center point coordinates of the two seals included in each set of seals are calculated according to the coordinates of the corresponding standard seal points.
In this embodiment, the seal controller is configured to seal at least one designated position according to the coordinates of at least one standard seal point carried in the seal instruction. The stamp control apparatus shown in fig. 1b has a triangular stamping function, that is, the stamp control apparatus can stamp at the positions of three vertexes 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 the standard stamping points can be calculated according to the coordinates of the three standard stamping points carried in the stamping instruction, then stamping is performed at the positions of the first standard center points at the same time, and stamping is performed at the positions of the second standard center points at the same time, so that an original stamp image including three sets of stamps as shown in fig. 1b is obtained. For example, assuming that the standard seal 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 stamps, two partially overlapped stamps are stamped for one standard stamping point, and the coordinates of the actual stamping points are accurately calculated through the coordinates of the central points of the two stamps.
Step 120, preprocessing the original seal image to obtain a binarized seal image.
Optionally, preprocessing the original seal image to obtain a binarized seal image may include: and carrying out gray processing and binarization processing on the original seal image to obtain a binarized seal image with black seal.
In this embodiment, after the original seal image is obtained, the original seal image is first aligned, and the original seal image is subjected to black edge removal, then to gray processing and binarization processing, and the original seal image is processed until all other parts except the seal area are white, and the seal is black, as shown in fig. 1 c.
The gray level processing is to convert each pixel value in the original seal image into a gray level value between 0 and 255, and the binary processing is to set the gray level value of each pixel in the original seal image to 0 or 255, so that the whole seal image presents obvious visual effects of only black and white.
And 130, performing horizontal projection and vertical projection on the binarized seal image to obtain the center point coordinates of each seal in the original seal image.
In this embodiment, after the binarized stamp image is obtained, horizontal projection is performed on the stamp image to find an image area with black pixels in the horizontal direction, that is, to determine the upper and lower frames of each group of stamps, then vertical projection is performed on the found image area to determine the left and right frames of each group of stamps, so as to determine 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 seal image to obtain coordinates of a central point of each seal in the original seal image, which may include: performing horizontal projection on each row of pixels of the binarized seal image according to the sequence from top to bottom, and acquiring the ordinate value of each target black pixel; wherein, the previous pixel of the target black pixel is a white pixel; performing vertical projection on each row of pixels of the binarized seal image according to the left-to-right sequence, and acquiring the abscissa value of each target black pixel; and determining the center point coordinates of each seal in the original seal image according to the horizontal coordinate value and the vertical coordinate value of each target black pixel.
In this embodiment, when the binarized seal image is projected, horizontal projection is performed on each line of pixels of the binarized seal image in the order from top to bottom, and when the conversion from white pixels to black pixels occurs in the pixels of the same line, the black pixels after the white pixels are used as target black pixels, and the ordinate values of the target black pixels are obtained. At this time, boundary pixels of each stamp are included in all target black pixels, and upper and lower rims of each set of stamps can be determined. And then vertically projecting each row of pixels of the binarized seal images in the upper frame and the lower frame according to the left-right sequence, and acquiring the abscissa value of each target black pixel to obtain the complete coordinates of each target black pixel, so that the left frame and the right frame of each seal can be determined. And then determining the coordinates of the central point of each seal in the original seal image according to the coordinates of the black pixels of each target.
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 target black pixel sets corresponding to all groups of seals; acquiring a target black pixel with the smallest ordinate value from a current target black pixel set as a first reference pixel, acquiring a target black pixel with the smallest abscissa value as a second reference pixel, and acquiring a target black pixel with the largest abscissa value as a third reference pixel; 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 to obtain a center point coordinate of a first seal in the seal 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 the ordinate of the third reference pixel as a second ordinate to obtain the center point coordinate of the second seal in the seal 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 a set of stamps. For each set of target black pixels, taking the set of target black pixels corresponding to the first stamp in fig. 1d as an example, two target black pixels with the smallest ordinate values, that is, the target black pixels with the ordinate values of y1 and y2, just correspond to the upper vertices of two stamps in the set respectively, so that the two target black pixels with the smallest ordinate values can be used as the first reference pixel to obtain the ordinate of the center points of the first stamp and the second stamp in the set. Then, considering the target black pixel with the smallest abscissa value, namely the target black pixel with the abscissa value of x3, corresponding to the left vertex of the first seal in the group of seals, the target black pixel with the largest abscissa value, namely the target black pixel with the abscissa value of x4, corresponding to the right vertex of the second seal in the group of seals, the target black pixel with the smallest abscissa value is used as the second reference pixel for acquiring the abscissa value of the center point of the first seal in the group, and the target black pixel with the largest abscissa value is used as the third reference pixel for acquiring the abscissa value of the center point of the second seal in the group. And finally, determining the coordinates of the center points of the two seals in the group according to the coordinate values of the reference pixels.
In this embodiment, in order to facilitate the acquisition of the pixel coordinates, the upper left vertex of the binarized stamp image is taken as the origin of the coordinate axes, 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, in this embodiment, the coordinate axis is not only one establishment mode, but also other establishment modes may be selected, and only the coordinates of each pixel need to be correspondingly adjusted.
Optionally, after performing horizontal projection and vertical projection on the binarized seal image to obtain the center point coordinates of each seal in the original seal image, the method further includes: calculating the coordinates of the actual stamping points 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 deviation values; and calibrating the control parameters of the printing control instrument according to the at least one deviation value.
In this embodiment, according to the coordinates of the center points of the two partially overlapped seals in each set of seals, the coordinates of the actual sealing points corresponding to the set of seals can be calculated, and by comparing the coordinates of the actual sealing points with the ideal coordinates of the standard sealing points, the position deviation existing when the seal is performed by the seal control instrument can be obtained, and then the control parameters for controlling the positions of the seals in the seal control instrument can be adjusted according to the deviation values, so that the effect that the coordinates of the actual sealing points are consistent with the coordinates of the standard sealing points is achieved.
According to the technical scheme, an original seal image is obtained; the original seal image comprises at least one group of seals, and each group of seals comprises two seals which are partially overlapped; preprocessing an original seal image to obtain a binarized seal image; the binarized seal image is subjected to horizontal projection and vertical projection to obtain the coordinates of the central points of the seals in the original seal image, so that the problem that the efficiency and accuracy of manually measuring the coordinates of the central points of the seals in the prior art are low is solved, and the efficiency and accuracy of automatically acquiring the coordinates of the central points of the seals are improved.
Example two
Fig. 2 is a schematic structural diagram of a coordinate positioning apparatus according to a second embodiment of the present invention, where the present embodiment is applicable to determining coordinates of center points of two partially overlapped stamps, and the apparatus may be implemented in hardware and/or software, and may be generally integrated in an electronic device that provides a coordinate positioning service. As shown in fig. 2, the apparatus may include:
an acquisition module 210, configured to acquire an original stamp image; the original seal image comprises at least one group of seals, and each group of seals comprises two seals which are partially overlapped;
a preprocessing module 220, configured to preprocess an original seal image to obtain a binarized seal image;
the projection module 230 is configured to perform horizontal projection and vertical projection on the binarized stamp image, so as to obtain coordinates of a center point of each stamp in the original stamp image.
According to the technical scheme, an original seal image is obtained; the original seal image comprises at least one group of seals, and each group of seals comprises two seals which are partially overlapped; preprocessing an original seal image to obtain a binarized seal image; the binarized seal image is subjected to horizontal projection and vertical projection to obtain the coordinates of the central points of the seals in the original seal image, so that the problem that the efficiency and accuracy of manually measuring the coordinates of the central points of the seals in the prior art are low is solved, and the efficiency and accuracy of automatically acquiring the coordinates of the central points of the seals are improved.
Optionally, the preprocessing module 220 is specifically configured to: and carrying out gray processing and binarization processing on the original seal image to obtain a binarized seal image with black seal.
Optionally, the projection module 230 is specifically configured to: performing horizontal projection on each row of pixels of the binarized seal image according to the sequence from top to bottom, and acquiring the ordinate value of each target black pixel; wherein, the previous pixel of the target black pixel is a white pixel; performing vertical projection on each row of pixels of the binarized seal image according to the left-to-right sequence, and acquiring the abscissa value of each target black pixel; and determining the center point coordinates of each seal in the original seal image according to the horizontal coordinate value and the vertical coordinate value of each target black pixel.
Optionally, the projection module 230 is specifically configured to: respectively determining target black pixel sets corresponding to all groups of seals; acquiring a target black pixel with the smallest ordinate value from a current target black pixel set as a first reference pixel, acquiring a target black pixel with the smallest abscissa value as a second reference pixel, and acquiring a target black pixel with the largest abscissa value as a third reference pixel; 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 to obtain a center point coordinate of a first seal in the seal 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 the ordinate of the third reference pixel as a second ordinate to obtain the center point coordinate of the second seal in the seal group corresponding to the current target black pixel set.
Optionally, at least one group of seals included in the original seal image is covered by the seal controller according to the seal command; the stamping instruction comprises at least one coordinate of a standard stamping point; each standard stamping point corresponds to a group of stamps in the original stamp image; the standard center point coordinates of the two seals included in each set of seals are calculated according to the coordinates of the corresponding standard seal points.
Optionally, the method further comprises: the calibration module is used for carrying out horizontal projection and vertical projection on the binarized seal image to obtain the center point coordinates of each seal in the original seal image, and then calculating the coordinates of the actual seal points corresponding to the current seal according to the center point coordinates of the two seals included in the current seal; 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 deviation values; 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 the corresponding functional modules and beneficial effects of the execution method.
Example III
Fig. 3 is a schematic structural diagram of an electronic device according to 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 merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 3, device 12 is in the form of a general purpose computing device. Components of device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include 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 can 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 or write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, commonly referred to as a "hard disk drive"). Although not shown in fig. 3, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules 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 in, for example, 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 or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
Device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with device 12, and/or any devices (e.g., network card, modem, etc.) that enable device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, via network adapter 20. As shown, network adapter 20 communicates with other modules of device 12 over bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, to implement the coordinate positioning method provided by the embodiment of the present invention.
Namely: a coordinate positioning method is realized, which 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 seals which are partially overlapped;
preprocessing an original seal image to obtain a binarized seal image;
and carrying out horizontal projection and vertical projection on the binarized seal image to obtain the center point coordinates of each seal in the original seal image.
Example IV
The fourth embodiment of the present invention also discloses a computer storage medium having stored thereon a computer program which when executed by a processor implements 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 seals which are partially overlapped; preprocessing an original seal image to obtain a binarized seal image; and carrying out horizontal projection and vertical projection on the binarized seal image to obtain the center point coordinates of each seal in the original seal image.
The computer storage media of embodiments of the invention may take the form of 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. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 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.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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 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 ++ and 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described 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, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (7)

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 seals which are partially overlapped;
preprocessing the original seal image to obtain a binarized seal image;
performing horizontal projection and vertical projection on the binarized seal image to obtain the center point coordinates of each seal in the original seal image;
performing horizontal projection and vertical projection on the binarized seal image to obtain center point coordinates of each seal in the original seal image, wherein the method comprises the following steps:
performing horizontal projection on each row of pixels of the binarized seal image according to the sequence from top to bottom, and obtaining the ordinate value of each target black pixel;
wherein a previous pixel of the target black pixel is a white pixel;
performing vertical projection on each row of pixels of the binarized seal image according to the left-to-right sequence, and obtaining the abscissa value of each target black pixel;
according to the horizontal coordinate value and the vertical coordinate value of each target black pixel, determining the center point coordinate of each seal in the original seal image;
the determining the coordinates of the center point of each seal in the original seal image according to the horizontal coordinate value and the vertical coordinate value of each target black pixel comprises the following steps:
respectively determining target black pixel sets corresponding to all groups of seals;
acquiring a target black pixel with the smallest ordinate value from a current target black pixel set as a first reference pixel, acquiring a target black pixel with the smallest abscissa value as a second reference pixel, and acquiring a target black pixel with the largest abscissa value as a third reference pixel;
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 to obtain a center point coordinate of a first seal in the seal 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 the ordinate of the third reference pixel as a second ordinate to obtain the center point coordinate of the second seal in the seal group corresponding to the current target black pixel set.
2. The method of claim 1, wherein preprocessing the original stamp image to obtain a binarized stamp image comprises:
and carrying out gray processing and binarization processing on the original seal image to obtain a binarized seal image with black seal.
3. The method of claim 1, wherein the step of determining the position of the substrate comprises,
at least one group of seals included in the original seal image are covered by a seal controller according to a seal instruction;
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 center point coordinates of the two seals included in each set of seals are calculated according to the coordinates of the corresponding standard seal points.
4. A method according to claim 3, further comprising, after horizontally and vertically projecting the binarized stamp image to obtain center point coordinates of each stamp in the original stamp image:
calculating the coordinates of the actual stamping points 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 value 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 deviation values;
and calibrating control parameters of the printing control instrument according to at least one deviation value.
5. 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 seals which are partially overlapped;
the preprocessing module is used for preprocessing the original seal image to obtain a binarized seal image;
the projection module is used for carrying out horizontal projection and vertical projection on the binarized seal image to obtain the center point coordinates of each seal in the original seal image;
the projection module is specifically configured to:
performing horizontal projection on each row of pixels of the binarized seal image according to the sequence from top to bottom, and obtaining the ordinate value of each target black pixel;
wherein a previous pixel of the target black pixel is a white pixel;
performing vertical projection on each row of pixels of the binarized seal image according to the left-to-right sequence, and obtaining the abscissa value of each target black pixel;
according to the horizontal coordinate value and the vertical coordinate value of each target black pixel, determining the center point coordinate of each seal in the original seal image;
respectively determining target black pixel sets corresponding to all groups of seals;
acquiring a target black pixel with the smallest ordinate value from a current target black pixel set as a first reference pixel, acquiring a target black pixel with the smallest abscissa value as a second reference pixel, and acquiring a target black pixel with the largest abscissa value as a third reference pixel;
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 to obtain a center point coordinate of a first seal in the seal 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 the ordinate of the third reference pixel as a second ordinate to obtain the center point coordinate of the second seal in the seal group corresponding to the current target black pixel set.
6. An electronic device, the electronic device comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the coordinate positioning method according to any of claims 1-4.
7. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the coordinate positioning method according to any of claims 1-4.
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 CN111696154A (en) 2020-09-22
CN111696154B true 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)

Families Citing this family (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 (1)

* Cited by examiner, † Cited by third party
Title
刘志慧.印章定位与配准系统的设计与实现.《中国优秀硕士学位论文全文数据库 信息科技辑》,印章定位与配准系统的设计与实现.2016,正文第1-70页. *

Also Published As

Publication number Publication date
CN111696154A (en) 2020-09-22

Similar Documents

Publication Publication Date Title
US12073542B2 (en) Image processing method, image processing apparatus, and non-transitory storage medium
CN108229485B (en) Method and apparatus for testing user interface
CN110189336B (en) Image generation method, system, server and storage medium
US20180260648A1 (en) Area of interest boundary extracting method and apparatus, device and computer storage medium
CN111986159B (en) Electrode defect detection method and device for solar cell and storage medium
CN110390295B (en) Image information identification method and device and storage medium
US20230045715A1 (en) Text detection method, text recognition method and apparatus
CN111724396A (en) Image segmentation method and device, computer-readable storage medium and electronic device
CN111723799B (en) Coordinate positioning method, device, equipment and storage medium
CN111696154B (en) Coordinate positioning method, device, equipment and storage medium
CN111241974B (en) Bill information acquisition method, device, computer equipment and storage medium
CN103837135B (en) Workpiece inspection method and system thereof
CN114140612A (en) Method, device, equipment and storage medium for detecting hidden danger of power equipment
CN111054072B (en) Method, device, equipment and storage medium for role model tailing
CN113469086A (en) Method, device, equipment and medium for dividing areas in building plan
CN112509135A (en) Element labeling method, device, equipment, storage medium and computer program product
CN117788444A (en) SMT patch offset detection method, SMT patch offset detection device and SMT patch offset detection system
CN112528707A (en) Image processing method, device, equipment and storage medium
CN113538649B (en) Super-resolution three-dimensional texture reconstruction method, device and equipment
CN114708239A (en) Glue width detection method and device, electronic equipment and storage medium
CN113626120A (en) Method and device for determining display page, electronic equipment and storage medium
CN112966671A (en) Contract detection method and device, electronic equipment and storage medium
CN111124862A (en) Intelligent equipment performance testing method and device and intelligent equipment
CN113781428B (en) Image processing method and device, electronic equipment and storage medium
CN111798420B (en) Point screen position positioning method, device, equipment and storage medium

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