Stamping detection method and system for book name page
Through the book title page seal detection method, image processing technology is used to automatically detect the integrity and clarity of the seal, which solves the problem of incomplete seal detection in the library that consumes a lot of human resources, realizes automated detection, and saves human resources.
Patent Information
- Application Number
- CN202410873467.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-10-29
AI Technical Summary
In libraries, the proper position is not recognized when stamping, resulting in incomplete seals that require manual inspection, which consumes a lot of human resources.
The book title page seal detection method is used to obtain images by taking pictures, perform image filtering and edge extraction, calculate the distance between the edges of the seal to judge the integrity, and calculate the clarity of the seal based on the preset clarity to achieve automatic detection.
The completeness and clarity of the stamp can be automatically detected without manual intervention, greatly saving human resources.
Smart Images

Figure CN118865418A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of book collection and editing, and in particular to a hydrogen storage cylinder monitoring method based on digital twins. Background Art
[0002] In order to manage the books in the library conveniently and efficiently, the collection robot is usually used to print the collection code, RFID tag and other labels on the pages or covers of the books, and stamp the book collection with the library stamp. However, when stamping, if the appropriate stamping position is not identified, it is easy for the stamp to be stamped out of the page, that is, the stamp on the page is not complete, thus losing the fairness of the stamp.
[0003] In the related art, after stamping is completed, manual inspection is usually carried out in the book discharge bin, which requires a lot of human resources. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a method for detecting the seal of a book title page. After the seal is stamped, the completeness of the seal can be automatically detected without manual intervention, thereby greatly saving human resources.
[0005] The technical solution adopted by the present invention is as follows:
[0006] A method for detecting a seal on a title page of a book comprises the following steps: after the seal on the title page of the book is completed, photographing the title page to obtain a first detection image containing the seal; performing image filtering processing on the first detection image to obtain a target detection image, and extracting an edge to be detected of the seal from the target detection image; calculating a first distance from the edge to be detected to a standard seal edge, and calculating a second distance from the standard seal edge to the edge to be detected, and judging whether the seal is complete according to the first distance and the second distance.
[0007] In one embodiment of the present invention, calculating the first distance from the edge to be detected to the standard seal edge, calculating the second distance from the standard seal edge to the edge to be detected, and judging whether the seal is complete according to the first distance and the second distance comprises: placing the standard seal edge in the target detection image without intersecting with the edge to be detected; establishing a plane rectangular coordinate system with any point in the target detection image as the origin; calculating the first minimum distance from each edge point on the standard seal edge to the edge to be detected, and selecting the maximum distance value from each first minimum distance as the first distance from the edge to be detected to the standard seal edge; calculating the second minimum distance from each edge point on the edge to be detected to the standard seal edge, and selecting the maximum distance value from each second minimum distance as the second distance from the standard seal edge to the edge to be detected; comparing the first distance with the second distance; if the second distance is greater than the first distance, judging that the seal is incomplete; otherwise, judging that the seal is complete.
[0008] In one embodiment of the present invention, the seal detection method also includes: if the seal is complete, obtaining the first pixel area of the enclosing box of each seal feature in the target detection image and the second pixel area of the target detection image, and calculating the clarity of the seal based on the first pixel area and the second pixel area; judging whether the clarity of the seal is greater than or equal to a preset clarity; if so, judging that the seal on the title page is qualified.
[0009] In one embodiment of the present invention, the clarity of the seal is calculated by the following formula:
[0010]
[0011] Wherein, Q is the clarity of the seal, X a is the first pixel area, X b is the second pixel area.
[0012] A system for detecting the seal of a book title page, characterized in that it comprises: a first acquisition module, which is used to take a photo of the title page after the book title page is stamped to obtain a first detection image containing the seal; a second acquisition module, which is used to perform image filtering processing on the first detection image to obtain a target detection image, and extract the edge to be detected of the seal from the target detection image; a judgment module, which is used to calculate a first distance from the edge to be detected to a standard seal edge, calculate a second distance from the standard seal edge to the edge to be detected, and judge whether the seal is complete based on the first distance and the second distance.
[0013] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned method for detecting a seal on a book title page is implemented.
[0014] A non-temporary computer-readable storage medium stores a computer program, which implements the above-mentioned method for detecting seals on a book title page when executed by a processor.
[0015] Beneficial effects of the present invention:
[0016] After stamping is completed, the present invention can automatically detect the completeness of the stamped seal without manual intervention, thereby greatly saving human resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of a method for detecting a seal on a book title page according to an embodiment of the present invention;
[0018] Figure 2 The figure is a block diagram of a system for detecting a seal on a book title page according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] like Figure 1 As shown, the method for detecting a seal on a book title page according to an embodiment of the present invention may include the following steps:
[0021] S1, after stamping the title page of the book, taking a photo of the title page to obtain a first detection image containing the stamp.
[0022] S2, performing image filtering processing on the first detection image to obtain a target detection image, and extracting the edge of the seal to be detected from the target detection image.
[0023] Specifically, a video device (for example, a camera, etc.) can be used to take a picture of the title page to obtain a first detection image containing the seal, and then the first detection image can be subjected to image filtering processing to obtain a target detection image. The image filtering processing can be performed using traditional technology, which will not be described in detail here, and then the edge of the seal to be detected is extracted from the target detection image.
[0024] S3, calculating a first distance between the edge to be detected and the standard seal edge, and calculating a second distance between the standard seal edge and the edge to be detected, and judging whether the seal is complete according to the first distance and the second distance.
[0025] In one embodiment of the present invention, step S3 includes the following steps:
[0026] S31, placing the standard seal edge in the target detection image without intersecting with the edge to be detected.
[0027] S32, establishing a plane rectangular coordinate system with any point in the target detection image as the origin.
[0028] S33, calculating the first minimum distance between each edge point on the standard seal edge and the edge to be detected, and selecting the maximum distance value from each first minimum distance as the first distance between the edge to be detected and the standard seal edge.
[0029] The first minimum spacing is the minimum spacing value between each edge point on the edge of the standard seal and the edge to be detected.
[0030] S34, calculating the second minimum distance between each edge point on the edge to be detected and the standard seal edge, and selecting the maximum distance value from each second minimum distance as the second distance between the standard seal edge and the edge to be detected.
[0031] The second minimum spacing is the minimum spacing value between each edge point on the edge to be detected and the standard seal edge.
[0032] S35, comparing the first spacing with the second spacing. If the second spacing is greater than the first spacing, the seal is judged to be incomplete; otherwise, the seal is judged to be complete. It should be noted that if the second spacing is not greater than the first spacing, the second spacing is equal to the first spacing.
[0033] In another embodiment of the present invention, the seal detection method also includes: if the seal is complete, obtaining the first pixel area of the enclosing box of each seal feature in the target detection image and the second pixel area of the target detection image, and calculating the clarity of the seal based on the first pixel area and the second pixel area; judging whether the clarity of the seal is greater than or equal to the preset clarity; if so, judging that the seal on the title page is qualified.
[0034] Specifically, if the seal is complete, then each seal feature is extracted from the target detection image, where the seal feature may include: seal edge features, seal text features, etc. (some seals also include graphic features such as five-pointed stars), and the pixel area sum of each seal feature, that is, the first pixel area, is calculated, and then the second pixel area of the target detection image is obtained.
[0035] The clarity of the stamp is calculated based on the first pixel area and the second pixel area using the following formula:
[0036]
[0037] Among them, Q is the clarity of the seal, X is a is the first pixel area, X b is the second pixel area.
[0038] Finally, the calculated clarity of the seal is compared with the preset clarity. If the clarity of the seal is greater than or equal to the preset clarity, the seal on the title page is judged to be qualified; if the clarity of the seal is less than the preset clarity, the seal on the title page is judged to be unclear.
[0039] Therefore, the present invention can not only automatically detect the completeness of the stamp, but also detect the clarity of the stamp without manual intervention, thereby greatly saving human resources.
[0040] In summary, according to the method for detecting the seal of the title page of a book according to an embodiment of the present invention, after the seal of the title page of the book is completed, the title page is photographed to obtain a first detection image containing the seal, and the first detection image is subjected to image filtering processing to obtain a target detection image, and the edge to be detected of the seal is extracted from the target detection image, and the first spacing from the edge to be detected to the standard seal edge is calculated, and the second spacing from the standard seal edge to the edge to be detected is calculated, and whether the seal is complete is determined based on the first spacing and the second spacing. Therefore, after the seal is completed, the completeness of the seal can be automatically detected without manual participation, thereby greatly saving human resources.
[0041] Corresponding to the method for detecting seals on the title page of a book in the above-mentioned embodiment, the present invention further proposes a system for detecting seals on the title page of a book.
[0042] like Figure 2 As shown, the book title page seal detection system according to the embodiment of the present invention comprises: a first acquisition module 100 , a second acquisition module 200 and a determination module 300 .
[0043] Among them, the first acquisition module 100 is used to take a photo of the title page of the book after the title page is stamped to obtain a first detection image containing the seal; the second acquisition module 200 is used to perform image filtering processing on the first detection image to obtain a target detection image, and extract the edge to be detected of the seal from the target detection image; the judgment module 300 is used to calculate a first distance from the edge to be detected to the edge of the standard seal, and calculate a second distance from the edge of the standard seal to the edge to be detected, and judge whether the seal is complete based on the first distance and the second distance.
[0044] In one embodiment of the present invention, the judgment module 300 is specifically used to: place the edge of the standard seal in the target detection image without intersecting with the edge to be detected; establish a plane rectangular coordinate system with any point in the target detection image as the origin; calculate the first minimum distance between each edge point on the edge of the standard seal and the edge to be detected, and select the maximum distance value from each first minimum distance as the first distance from the edge to be detected to the standard seal edge; calculate the second minimum distance between each edge point on the edge to be detected and the standard seal edge, and select the maximum distance value from each second minimum distance as the second distance from the standard seal edge to the edge to be detected; compare the first distance with the second distance; if the second distance is greater than the first distance, the seal is judged to be incomplete; otherwise, the seal is judged to be complete.
[0045] In one embodiment of the present invention, the seal detection system for the title page of a book also includes a calculation module (not specifically shown in the figure), which is used to obtain the first pixel area of the enclosing box of each seal feature in the target detection image and the second pixel area of the target detection image when the seal is complete, and calculate the clarity of the seal based on the first pixel area and the second pixel area, wherein the judgment module 300 is specifically used to: judge whether the clarity of the seal is greater than or equal to the preset clarity; if so, judge that the seal on the title page is qualified.
[0046] In one embodiment of the present invention, the calculation module calculates the clarity of the seal by the following formula:
[0047]
[0048] Among them, Q is the clarity of the seal, X is a is the first pixel area, X b is the second pixel area.
[0049] It should be noted that for details not disclosed in the seal detection system for the title page of a book in an embodiment of the present invention, please refer to the details disclosed in the seal detection method for the title page of a book in an embodiment of the present invention, and the details will not be described in detail here.
[0050] According to the seal detection system for the title page of a book of an embodiment of the present invention, after the title page of the book is stamped by the first acquisition module, the title page is photographed to obtain a first detection image containing the seal, and the first detection image is subjected to image filtering processing by the second acquisition module to obtain a target detection image, and the edge to be detected of the seal is extracted from the target detection image, and the first spacing from the edge to be detected to the standard seal edge is calculated by the judgment module, and the second spacing from the standard seal edge to the edge to be detected is calculated, and whether the seal is complete is judged according to the first spacing and the second spacing. Therefore, after the stamping is completed, the completeness of the stamped seal can be automatically detected without manual participation, thereby greatly saving human resources.
[0051] Corresponding to the above embodiment, the present invention also provides a computer device.
[0052] The computer device of the embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the seal detection method for the title page of a book of the above embodiment is implemented.
[0053] The computer device according to the embodiment of the present invention can automatically detect the completeness of the stamp after the stamping is completed without manual intervention, thereby greatly saving human resources.
[0054] Corresponding to the above embodiment, the present invention also proposes a non-transitory computer-readable storage medium.
[0055] The non-transitory computer-readable storage medium of the embodiment of the present invention stores a computer program, and when the program is executed by a processor, the above-mentioned method for detecting a seal on a title page of a book is implemented.
[0056] According to the non-transitory computer-readable storage medium of the embodiment of the present invention, after stamping is completed, the completeness of the stamp can be automatically detected without manual intervention, thereby greatly saving human resources.
[0057] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. "Multiple" means two or more, unless otherwise clearly and specifically defined.
[0058] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0059] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0060] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0061] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0062] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for detecting a seal on a book title page, characterized in that: The following steps are involved: After stamping the title page of the book, photographing the title page to obtain a first detection image containing the stamp; Performing image filtering processing on the first detection image to obtain a target detection image, and extracting the edge to be detected of the seal from the target detection image; A first distance between the edge to be detected and the standard seal edge is calculated, and a second distance between the standard seal edge and the edge to be detected is calculated, and whether the seal is complete is determined according to the first distance and the second distance.
2. The method for detecting seals on the title page of a book according to claim 1, characterized in that: Calculating a first distance between the edge to be detected and the edge of the standard seal, calculating a second distance between the edge of the standard seal and the edge to be detected, and judging whether the seal is complete according to the first distance and the second distance comprises: Placing the standard seal edge in the target detection image without intersecting with the edge to be detected; Establishing a plane rectangular coordinate system with any point in the target detection image as the origin; Calculating the first minimum distance between each edge point on the edge of the standard seal and the edge to be detected, and selecting the maximum distance value from each first minimum distance as the first distance between the edge to be detected and the edge of the standard seal; Calculating the second minimum distance between each edge point on the edge to be detected and the edge of the standard seal, and selecting the maximum distance value from each second minimum distance as the second distance between the edge of the standard seal and the edge to be detected; comparing the first spacing with the second spacing; If the second spacing is greater than the first spacing, it is determined that the seal is incomplete; Otherwise, the seal is judged to be complete.
3. The method for detecting seals on the title page of a book according to claim 1 or 2, characterized in that: The seal detection method also includes: If the seal is complete, obtaining a first pixel area of a bounding box of each seal feature in the target detection image and a second pixel area of the target detection image, and calculating the clarity of the seal according to the first pixel area and the second pixel area; Determining whether the clarity of the seal is greater than or equal to a preset clarity; If so, the stamping on the title page is determined to be qualified.
4. The method for detecting seals on the title page of a book according to claim 3, characterized in that: The clarity of the seal is calculated by the following formula: Wherein, Q is the clarity of the seal, X a is the first pixel area, X b is the second pixel area.
5. A book title page stamp detection system, characterized in that: include: A first acquisition module, the first acquisition module is used to take a photo of the title page of the book to obtain a first detection image containing the seal after the title page of the book is stamped; A second acquisition module, the second acquisition module is used to perform image filtering processing on the first detection image to obtain a target detection image, and extract the edge to be detected of the seal from the target detection image; A judgment module is used to calculate a first distance between the edge to be detected and the edge of a standard seal, and to calculate a second distance between the edge of the standard seal and the edge to be detected, and to judge whether the seal is complete according to the first distance and the second distance.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for detecting a seal on a title page of a book according to any one of claims 1 to 4 is implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for detecting a seal on a title page of a book according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Method and system for visual measurement of profile of machine part
CN105509653A
Stamp identification method, medium, equipment and device
CN110765992A
Signature and seal integrity verification method and computer equipment
CN112580108A
Image shooting integrity judgment method and device
CN115019152A
Method and system for comparing similarity of seals in image document
CN116994269A
