CN112669367A - Stamping position detection method and device, computer equipment and storage medium - Google Patents

Stamping position detection method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112669367A
CN112669367A CN202011561857.2A CN202011561857A CN112669367A CN 112669367 A CN112669367 A CN 112669367A CN 202011561857 A CN202011561857 A CN 202011561857A CN 112669367 A CN112669367 A CN 112669367A
Authority
CN
China
Prior art keywords
area
seal
text image
text
rectangular frame
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
CN202011561857.2A
Other languages
Chinese (zh)
Other versions
CN112669367B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202011561857.2A priority Critical patent/CN112669367B/en
Publication of CN112669367A publication Critical patent/CN112669367A/en
Application granted granted Critical
Publication of CN112669367B publication Critical patent/CN112669367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a stamping position detection method and device, computer equipment and a storage medium. The method comprises the following steps: carrying out color filtering processing on the text image covered with the seal according to the color of the seal to obtain image information of the region where the seal is located; carrying out corrosion expansion processing on the image information, determining a minimum external rectangular frame of the stamp on the text image, and determining area information and position information of the minimum external rectangular frame; cutting and separating the minimum circumscribed rectangle frame, performing color filtering processing on the minimum circumscribed rectangle frame to obtain an overlapping region of the minimum circumscribed rectangle frame and a text region in the text image, and calculating the area of the overlapping region; and calculating the ratio of the area of the overlapping area to the area of the minimum circumscribed rectangle frame, and judging whether the text image stamping is standard or not according to the ratio. The method ensures the accuracy of the seal position specification and improves the efficiency of seal position detection.

Description

Stamping position detection method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of image detection, and in particular, to a method and an apparatus for detecting a stamping position, a computer device, and a storage medium.
Background
The seal is a symbol of company's right, especially official seal, it has the highest legal effectiveness in all seals, represents legal person's right, in the current legislation and judicial practice, the examination whether covers with legal person official seal becomes the important standard for judging whether the civil activity is established and effective. Except for special provisions of law (such as sealing of invoices), the official seal can represent the will of a legal person, and contracts and other legal documents are signed externally, so that the legal effect is extremely high. Thus, a business or organization that manages specifications places strict requirements on the place of use:
1) the stamp of the company should be added to the official document of the company.
2) The stamped document is placed over the name of the company and is required to cover the year, month and day.
3) The contract document must be provided with a seal.
4) The stamped stamp must be right side up and flush with the document.
5) The seal must be added on the characters, and the seal can not be made on the blank paper.
6) And stamping at the document requirement according to the property of the stamp.
If the seal is not stamped as required, a risk of seal may occur. For example, a printed document without a seal, possibly replaced with a page; the seal placed on the blank paper may be printed by a second printing process, overprinting a content inconsistent with the original contract, or the like.
In order to prevent the above risks, it is a conventional practice to manually control the risk of using a stamp by managing the stamp by a special person, executing a stamping operation. However, the designated person is responsible for stamping or supervising the stamping process, and the stamping correctness in the process cannot be guaranteed 100%, because the manual operation has the possibility of misoperation in a certain proportion. Therefore, a special post is required to perform recheck after the seal of the contract is finished. While the labor cost of a company is increased, the overall working efficiency of contract signing is difficult to improve, and the customer satisfaction is also influenced.
Disclosure of Invention
The embodiment of the invention provides a stamping position detection method and device, computer equipment and a storage medium, and aims to solve the problem that in the prior art, manual stamping detection accuracy is low in efficiency.
In a first aspect, an embodiment of the present invention provides a seal position detection method, which includes:
carrying out color filtering processing on the text image covered with the seal according to the color of the seal to obtain image information of the region where the seal is located;
carrying out corrosion expansion processing on the image information, determining a minimum external rectangular frame of the stamp on the text image, and determining area information and position information of the minimum external rectangular frame;
cutting and separating the minimum circumscribed rectangular frame according to the area information and the position information of the minimum circumscribed rectangular frame, and performing color filtering processing on the minimum circumscribed rectangular frame to obtain an overlapping region of the minimum circumscribed rectangular frame and a text region in the text image and calculate the area of the overlapping region;
and calculating the ratio of the area of the overlapping area to the area of the minimum circumscribed rectangle frame, and judging whether the text image stamping is standard or not according to the ratio.
In a second aspect, an embodiment of the present invention provides a seal position detection apparatus, including:
the first color filtering module is used for carrying out color filtering processing on the text image stamped with the stamp according to the color of the stamp to obtain image information of the region where the stamp is located;
the determining module is used for carrying out corrosion expansion processing on the image information, determining a minimum circumscribed rectangular frame of the seal on the text image, and determining area information and position information of the minimum circumscribed rectangular frame;
the calculation module is used for cutting and separating the minimum circumscribed rectangular frame according to the area information and the position information of the minimum circumscribed rectangular frame, carrying out color filtering processing on the minimum circumscribed rectangular frame, obtaining an overlapping region of the minimum circumscribed rectangular frame and a text region in the text image and calculating the area of the overlapping region;
and the judging module is used for calculating the ratio of the area of the overlapping region to the area of the minimum circumscribed rectangular frame and judging whether the text image stamping is standard or not according to the ratio.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the seal position detection method according to the first aspect is implemented.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the seal position detection method according to the first aspect.
The embodiment of the invention provides a stamping position detection method and device, computer equipment and a storage medium. The method comprises the steps of carrying out color filtering processing on a text image covered with a seal according to the color of the seal to obtain image information of an area where the seal is located; carrying out corrosion expansion processing on the image information, determining a minimum external rectangular frame of the stamp on the text image, and determining area information and position information of the minimum external rectangular frame; cutting and separating the minimum circumscribed rectangular frame according to the area information and the position information of the minimum circumscribed rectangular frame, and performing color filtering processing on the minimum circumscribed rectangular frame to obtain an overlapping region of the minimum circumscribed rectangular frame and a text region in the text image and calculate the area of the overlapping region; and calculating the ratio of the area of the overlapping area to the area of the minimum circumscribed rectangle frame, and judging whether the text image stamping is standard or not according to the ratio. According to the scheme, whether the overlapping area of the area where the seal is located and the text area is in the preset range or not is detected, so that whether the seal is standard or not is judged, the standard accuracy of the seal position is ensured, and the detection efficiency of the seal position is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a stamping position detection method according to an embodiment of the present invention;
FIG. 2 is a schematic view of a sub-process of a stamping position detection method according to an embodiment of the present invention;
FIG. 3 is a schematic view of another sub-process of the stamping position detection method according to the embodiment of the present invention;
FIG. 4 is a schematic view of another sub-process of the stamping position detection method according to the embodiment of the present invention;
FIG. 5 is a schematic view of another sub-process of the stamping position detection method according to the embodiment of the present invention;
fig. 6 is a schematic block diagram of a seal position detection apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a schematic flow chart of a stamping position detection method according to an embodiment of the present invention, where the stamping position detection method is applied to a server and is executed by application software installed in the server.
As shown in FIG. 1, the method includes steps S10-S40.
And step S10, performing color filtering processing on the text image covered with the stamp according to the stamp color to obtain the image information of the region where the stamp is located.
In this embodiment, a general stamp has two colors, namely red and blue, and color filtering processing of corresponding colors is performed on a text image stamped with the stamp according to the color of the stamp to obtain image information of an area where the stamp is located. It should be noted that at least one character in the region of the stamp belongs to the text image. The color pigment of the color filtering process provides a plurality of color pigment choices according to actual conditions.
For example, a text image stamped with a red stamp is subjected to red color filtering processing to filter out image information of a region where the red stamp is located.
In one embodiment, as shown in fig. 2, step S10 includes:
step S11, identifying and obtaining the color pigment of the seal in the text image;
and step S12, performing color filtering processing of corresponding pigments on the text image according to the color pigments to obtain the image information of the region where the stamp is located.
In this embodiment, the text image is recognized, the color pigments of the stamp in the text image are obtained, and color filtering processing corresponding to the color pigments is performed on the text image according to the color pigments of the stamp, so as to obtain image information of the region where the stamp is located in the text image.
For example, after identifying a stamp color pigment of a text image stamped with a stamp, determining that the stamp color in the text image is red, color filtering processing of the red pigment is performed on the text image, and image information of an area where the stamp is located is obtained.
And step S20, carrying out corrosion expansion processing on the image information, determining a minimum circumscribed rectangular frame of the stamp on the text image, and determining area information and position information of the minimum circumscribed rectangular frame.
In this embodiment, the image information of the region where the stamp is located is subjected to erosion expansion processing to obtain the minimum circumscribed rectangular frame of the stamp, and the area and the position information of the minimum circumscribed rectangular frame are determined. The position information comprises the pixel width of the minimum circumscribed rectangle, the pixel height of the minimum circumscribed rectangle and the distance between the pixel point of the top left corner vertex of the minimum circumscribed rectangle frame and the left frame of the text image. Specifically, the area Y of the minimum bounding rectangle is calculated according to the following formula:
Y=wh,
wherein w represents a pixel width of the minimum bounding rectangle, and h represents a pixel height of the minimum bounding rectangle.
For example, after determining the image of the region where the stamp is located in the text image stamped with the stamp, performing corrosion expansion processing on the image of the region where the stamp is located, eliminating fine objects between the stamp and the text, and separating out the area and the position of the minimum circumscribed rectangular frame of the stamp formed by the image of the region where the stamp is located.
And step S30, cutting and separating the minimum circumscribed rectangle frame according to the area information and the position information of the minimum circumscribed rectangle frame, carrying out color filtering processing on the minimum circumscribed rectangle frame to obtain the overlapping region of the minimum circumscribed rectangle frame and the text region in the text image, and calculating the area of the overlapping region.
In this embodiment, the minimum circumscribed rectangular frame is cut and separated from the text image with the stamp from the cover according to the area and the position information of the minimum circumscribed rectangular frame. And according to the color of the text in the text image, performing color filtering processing of corresponding color on the minimum circumscribed rectangular frame, determining a text region belonging to the text image in the minimum circumscribed rectangular frame, namely an overlapping region of the minimum circumscribed rectangular frame and the text region in the text image, and calculating the total area of the overlapping region. It is noted that the text is typically black in color, but the possibility of other colors of text being present is not excluded.
For example, the minimum circumscribed rectangle frame of the stamp is cut from the text image with the stamp, then the color of the text in the text image is determined, the color filtering processing of the corresponding color is carried out on the minimum circumscribed rectangle frame, a region belonging to the text in the minimum circumscribed rectangle frame is obtained, the region is an overlapping region of the minimum circumscribed rectangle frame and the text region in the text image, and the total area of the region is calculated to obtain the area of the overlapping region.
In one embodiment, as shown in fig. 3, step S30 includes:
step S31, color filtering processing is carried out on the minimum circumscribed rectangle frame according to the color pigment of the text in the text image, and all text areas of characters in the text image in the minimum circumscribed rectangle frame are determined and used as overlapping areas;
and step S32, calculating the area of the overlapping area according to a preset rule.
In this embodiment, color pigments of a text in a text image are identified, a color filtering process is performed on the minimum circumscribed rectangular frame according to the color pigments of the text, text regions of all characters belonging to the text image in the minimum circumscribed rectangular frame are obtained, the text regions are used as overlapping regions, and finally, the area of the overlapping regions is calculated according to a preset rule. It should be noted that the area calculation rule of the overlapping area may be set differently according to different practical situations.
For example, the text image is subjected to text color pigment recognition, and the text color is black. And performing black pigment filtering processing on the minimum circumscribed rectangle frame, determining a text region of black characters in the minimum circumscribed rectangle frame, wherein the text region is an overlapped region of the minimum circumscribed rectangle frame and the text region in the text image, and finally calculating the area of the region according to a preset rule.
In one embodiment, as shown in fig. 4, step S32 includes:
step S321, segmenting all characters in the overlapping area and performing frame selection by using a character rectangular frame to obtain coordinates of the character rectangular frame;
s322, summarizing the corresponding coordinates of the character rectangular frame of a single character to obtain a rectangular coordinate group, and summarizing the rectangular coordinate groups of all characters to obtain a rectangular array;
and S323, calculating the total area of all the characters according to a preset area formula based on the rectangular array to obtain the area of the overlapped area.
In the embodiment, all characters in the overlapping area are segmented to obtain a single character area, and then a single character area frame is selected by using a character rectangular frame to determine coordinates of 4 vertexes of the character rectangular frame; summarizing the coordinates of 4 vertexes of a single character rectangular frame to obtain a rectangular coordinate group of the character; and summarizing the rectangular coordinate groups of all characters in the overlapping area to obtain a rectangular array of coordinates corresponding to all character rectangular frames in the set. And calculating the total area of all the characters according to a preset area formula based on the rectangular data to obtain the area of the overlapped area. Wherein the total area S of all characters is calculated as follows:
Figure BDA0002860923500000061
wherein (x)i,yi) And (xx)i,yyi) N represents the number of rectangles for two opposite vertex coordinates in the character rectangle box.
For example, it is determined that there are three characters, within the overlap regionRespectively is [ (x)1,y1,xx1,yy1),(x2,y2,xx2,yy2)]、[(x3,y3,xx3,yy3),(x4,y4,xx4,yy4)]And [ (x)5,y5,xx5,yy5),(x6,y6,xx6,yy6)]. The resulting rectangular array is: [ [ (x)1,y1,xx1,yy1),(x2,y2,xx2,yy2),(x3,y3,xx3,yy3),(x4,y4,xx4,yy4),(x5,y5,xx5,yy5),(x6,y6,xx6,yy6)]Finally according to a calculation formula
Figure BDA0002860923500000071
The area of the overlap region is calculated.
And step S40, calculating the ratio of the area of the overlapping area to the area of the minimum circumscribed rectangle frame, and judging whether the text image seal is standard or not according to the ratio.
In this embodiment, based on the area of the overlap region and the area of the minimum bounding rectangle, the area ratio of the overlap region to the minimum bounding rectangle is calculated, and whether the text image seal meets the specification is determined according to the ratio. And if the ratio is within the preset range, judging that the stamping position of the text image meets the specification.
In one embodiment, as shown in fig. 5, step S40 includes:
step S41, judging whether the ratio is in a preset range;
step S421, if yes, judging that the position of the seal of the text image is in accordance with the standard;
and step S422, if not, judging that the stamping position of the text image does not accord with the standard, and sending an alarm.
In this embodiment, whether the ratio of the area of the overlap region to the area of the minimum circumscribed rectangular frame is within a preset range is determined, and if the ratio is within the preset range, it is determined that the position of the seal of the text image meets the specification; if the ratio is not within the preset range, judging that the position covered by the seal of the text image is not in accordance with the standard, and sending an alarm.
For example, the ratio threshold range of the area of the preset overlapping region and the area of the minimum circumscribed rectangular frame is 50% -90%, and if the ratio of the area of the overlapping region and the area of the minimum circumscribed rectangular frame is calculated to be 50% -90%, the text image stamping specification is determined; and if the ratio of the area of the overlapping area to the area of the minimum circumscribed rectangular frame is calculated to be lower than 50% or higher than 90%, judging that the text image seal is not standard and sending an alarm.
In one embodiment, the stamping position detection system may be disposed in a blockchain for ease of management and operation. Wherein, the device can be arranged in a private chain or a public chain. When the electronic seal is placed in a private chain, only a user with the authority of controlling the seal position detection system can use the electronic seal; if the seal position detection system is arranged on the public chain, all users on the public chain can control the seal position detection system to carry out seal position detection.
The method ensures the standard of the stamping position and greatly improves the efficiency of the stamping position detection.
The embodiment of the invention also provides a stamping position detection device, which is used for executing any embodiment of the stamping position detection method. Specifically, please refer to fig. 5, wherein fig. 5 is a schematic block diagram of a seal position detection apparatus according to an embodiment of the present invention. The stamp affixing position detecting apparatus 100 may be disposed in a server.
As shown in fig. 6, the stamping position detection apparatus 100 includes a first color filter module 110, a determination module 120, a calculation module 130, and a determination module 140.
The first color filter module 110 is configured to perform color filter processing on the text image stamped with the stamp according to the stamp color to obtain image information of an area where the stamp is located;
a determining module 120, configured to perform erosion and expansion processing on the image information, determine a minimum circumscribed rectangular frame of the stamp on the text image, and determine area information and position information of the minimum circumscribed rectangular frame;
a calculating module 130, configured to cut and separate the minimum circumscribed rectangular frame according to the area information and the position information of the minimum circumscribed rectangular frame, perform color filtering processing on the minimum circumscribed rectangular frame, obtain an overlapping region between the minimum circumscribed rectangular frame and a text region in the text image, and calculate an area of the overlapping region;
the judging module 140 is configured to calculate a ratio of the area of the overlapping region to the area of the minimum bounding rectangle, and judge whether the text image seal is standard according to the ratio.
In one embodiment, the first color filter module 110 includes:
the identification unit is used for identifying and acquiring the color pigment of the seal in the text image;
and the first color filtering unit is used for carrying out color filtering processing on the corresponding pigment on the text image according to the color pigment of the stamp to obtain the image information of the region where the stamp is located.
In one embodiment, the calculation module 130 includes:
the second color filtering unit is used for performing color filtering processing on the minimum circumscribed rectangular frame according to color pigments of texts in the text images, determining text regions of all characters in the text images in the minimum circumscribed rectangular frame, and using the text regions as overlapping regions;
and the calculating unit is used for calculating the area of the overlapping area according to a preset rule.
In one embodiment, the computing unit includes:
the segmentation subunit is used for segmenting all the characters in the overlapping area and performing frame selection by using a character rectangular frame to obtain the coordinates of the character rectangular frame;
the collecting subunit is used for collecting the corresponding coordinates of the character rectangular frame of a single character to obtain a rectangular coordinate group, and collecting the rectangular coordinate groups of all the characters to obtain a rectangular array;
and the calculating subunit is used for calculating the total area of all the characters according to a preset area formula based on the rectangular array to obtain the area of the overlapping area.
In one embodiment, the determining module 140 includes:
and the judging subunit is used for judging whether the ratio is within a preset range, judging that the position covered by the seal of the text image meets the standard if the ratio is within the preset range, and judging that the position covered by the seal of the text image does not meet the standard if the ratio is not within the preset range, and sending an alarm.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the seal position detection method as described above when executing the computer program.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a non-volatile computer readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to execute the stamp position detection method as described above.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A stamp position detection method is characterized by comprising:
carrying out color filtering processing on the text image covered with the seal according to the color of the seal to obtain image information of the region where the seal is located;
carrying out corrosion expansion processing on the image information, determining a minimum external rectangular frame of the stamp on the text image, and determining area information and position information of the minimum external rectangular frame;
cutting and separating the minimum circumscribed rectangular frame according to the area information and the position information of the minimum circumscribed rectangular frame, and performing color filtering processing on the minimum circumscribed rectangular frame to obtain an overlapping region of the minimum circumscribed rectangular frame and a text region in the text image and calculate the area of the overlapping region;
and calculating the ratio of the area of the overlapping area to the area of the minimum circumscribed rectangle frame, and judging whether the text image stamping is standard or not according to the ratio.
2. The stamp affixing position detecting method according to claim 1, wherein said color-filtering the text image stamped with the stamp based on the stamp color to obtain the image information of the region where the stamp is located, comprises:
identifying and obtaining the color pigment of the seal in the text image;
and performing color filtering processing of corresponding pigments on the text image according to the color pigments to obtain image information of the region where the stamp is located.
3. The seal position detection method according to claim 1, wherein the performing color filter processing on the minimum bounding rectangle frame to obtain an overlap region of the minimum bounding rectangle frame and a text region in the text image and calculating an area of the overlap region includes:
performing color filtering processing on the minimum circumscribed rectangle frame according to color pigments of texts in the text images, and determining text regions of all characters in the minimum circumscribed rectangle frame, wherein the text regions belong to the texts in the text images and are used as overlapping regions;
and calculating the area of the overlapping area according to a preset rule.
4. The seal position detection method according to claim 3, wherein the calculating the area of the overlap region according to a preset rule includes:
segmenting all characters in the overlapping area and performing frame selection by using a character rectangular frame to obtain coordinates of the character rectangular frame;
summarizing corresponding coordinates of a character rectangular frame of a single character to obtain a rectangular coordinate group, and summarizing the rectangular coordinate groups of all characters to obtain a rectangular array;
and calculating the total area of all characters according to a preset area formula based on the rectangular array to obtain the area of the overlapping area.
5. The seal position detection method according to claim 1, wherein the determining area information and position information of the minimum bounding rectangle frame includes:
calculating the area Y of the minimum bounding rectangle frame according to the following formula:
Y=wh,
wherein w represents the pixel width of the minimum bounding rectangle, and h represents the pixel height of the minimum bounding rectangle;
and respectively obtaining the distance between the pixel point of the top left corner vertex of the minimum circumscribed rectangle frame and the upper frame of the text image and the distance between the pixel point and the upper frame of the text image.
6. The seal position detection method according to claim 1, wherein said judging whether the text image seal is normal according to the ratio comprises:
judging whether the ratio is within a preset range;
if so, judging that the position of the seal of the text image is in accordance with the standard;
if not, judging that the position covered by the seal of the text image does not accord with the standard, and sending an alarm.
7. The seal position detection method according to claim 4, wherein the calculating a total area of all characters according to a preset area formula based on the rectangular array to obtain the area of the overlap region includes:
the total area S of all characters is calculated as follows:
Figure FDA0002860923490000021
wherein (x)i,yi) And (xx)i,yyi) N represents the number of rectangles for two opposite vertex coordinates in the character rectangle box.
8. A stamp position detecting device, comprising:
the first color filtering module is used for carrying out color filtering processing on the text image stamped with the stamp according to the color of the stamp to obtain image information of the region where the stamp is located;
the determining module is used for carrying out corrosion expansion processing on the image information, determining a minimum circumscribed rectangular frame of the seal on the text image, and determining area information and position information of the minimum circumscribed rectangular frame;
the calculation module is used for cutting and separating the minimum circumscribed rectangular frame according to the area information and the position information of the minimum circumscribed rectangular frame, carrying out color filtering processing on the minimum circumscribed rectangular frame, obtaining an overlapping region of the minimum circumscribed rectangular frame and a text region in the text image and calculating the area of the overlapping region;
and the judging module is used for calculating the ratio of the area of the overlapping region to the area of the minimum circumscribed rectangular frame and judging whether the text image stamping is standard or not according to the ratio.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the stamping position detection method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to execute the seal position detection method according to any one of claims 1 to 7.
CN202011561857.2A 2020-12-25 2020-12-25 Stamping position detection method and device, computer equipment and storage medium Active CN112669367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011561857.2A CN112669367B (en) 2020-12-25 2020-12-25 Stamping position detection method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011561857.2A CN112669367B (en) 2020-12-25 2020-12-25 Stamping position detection method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112669367A true CN112669367A (en) 2021-04-16
CN112669367B CN112669367B (en) 2024-05-14

Family

ID=75409055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011561857.2A Active CN112669367B (en) 2020-12-25 2020-12-25 Stamping position detection method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112669367B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113724327A (en) * 2021-08-27 2021-11-30 中国银行股份有限公司 Seal control method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006041802A (en) * 2004-07-26 2006-02-09 Fuji Xerox Co Ltd Stamp controller, controlling method and program
CN110728277A (en) * 2019-09-27 2020-01-24 达而观信息科技(上海)有限公司 Seal intelligent detection and identification method
CN111291757A (en) * 2020-02-17 2020-06-16 江苏诚印科技有限公司 Method for identifying uniqueness of seal
CN111353485A (en) * 2018-12-20 2020-06-30 中国移动通信集团辽宁有限公司 Seal identification method, device, equipment and medium
CN112037077A (en) * 2020-09-03 2020-12-04 平安健康保险股份有限公司 Seal identification method, device, equipment and storage medium based on artificial intelligence

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006041802A (en) * 2004-07-26 2006-02-09 Fuji Xerox Co Ltd Stamp controller, controlling method and program
CN111353485A (en) * 2018-12-20 2020-06-30 中国移动通信集团辽宁有限公司 Seal identification method, device, equipment and medium
CN110728277A (en) * 2019-09-27 2020-01-24 达而观信息科技(上海)有限公司 Seal intelligent detection and identification method
CN111291757A (en) * 2020-02-17 2020-06-16 江苏诚印科技有限公司 Method for identifying uniqueness of seal
CN112037077A (en) * 2020-09-03 2020-12-04 平安健康保险股份有限公司 Seal identification method, device, equipment and storage medium based on artificial intelligence

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
蒋冲宇等: "基于神经网络的发票文字检测与识别方法", 《武汉工程大学学报》, no. 06, 15 December 2019 (2019-12-15), pages 82 - 86 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113724327A (en) * 2021-08-27 2021-11-30 中国银行股份有限公司 Seal control method and device

Also Published As

Publication number Publication date
CN112669367B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
CN107944452B (en) Character recognition method for circular seal
CN109886974B (en) Seal removing method
USRE44139E1 (en) Method and apparatus for decoding mixed code
EP1807796B1 (en) Mixed code, and method and apparatus for generating the same, and method and appratus for decoding the same
CN108146093B (en) Method for removing bill seal
JP4443576B2 (en) Pattern separation / extraction program, pattern separation / extraction apparatus, and pattern separation / extraction method
CN101599125A (en) The binarization method that the complex background hypograph is handled
US20100259558A1 (en) Underline removal apparatus
CN103034848A (en) Identification method of form type
CN108830275B (en) Method and device for identifying dot matrix characters and dot matrix numbers
CN112669367A (en) Stamping position detection method and device, computer equipment and storage medium
CN114639173A (en) OCR technology-based intelligent auditing method and device for checking and certifying materials
CN112307824A (en) Method, device, system and readable medium for identifying tampering of bill number area
CN112651953A (en) Image similarity calculation method and device, computer equipment and storage medium
JP7433887B2 (en) Devices, programs, and image processing methods for processing images
CN103886319A (en) Intelligent held board recognizing method based on machine vision
CN107358718A (en) A kind of crown word number identification method, device, equipment and storage medium
US20100272359A1 (en) Method for resolving contradicting output data from an optical character recognition (ocr) system, wherein the output data comprises more than one recognition alternative for an image of a character
EP2166741A1 (en) Image processing apparatus, image forming apparatus and program
CN103295238A (en) ROI (region of interest) motion detection based real-time video positioning method for Android platform
CN115331013B (en) Data extraction method and processing equipment for line graph
JP2004287682A (en) Retouched image extracting device, program, storage medium and retouched image extracting method
CN110475018A (en) A kind of mobile phone screenshotss method and system based on map location label
CN113569864B (en) Method and system for identifying signature and seal
CN116580410A (en) Bill number identification method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40042414

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant