Image processing methods, apparatus, devices and storage media
By acquiring and analyzing the hidden mark images of printed documents, the distance and offset distance of the unit hidden mark images are determined, which solves the problem of low accuracy of printer identification in the existing technology and achieves higher accuracy in document authenticity identification.
Patent Information
- Application Number
- CN202210339230.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-01
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-04-01
AI Technical Summary
In existing technologies, the accuracy of identifying the authenticity of a document by the printing marks left on its surface is low, and it is difficult to effectively distinguish documents from those printed by different printers.
By acquiring the hidden image of the file, determining the unit distance and offset distance between the hidden points, extracting the unit hidden image, and using the unit hidden image for identification, the accuracy of identification is improved.
It improves the accuracy of document authenticity verification and can effectively identify whether documents come from the same printer.
Smart Images

Figure CN114723968B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of document inspection technology, specifically relating to an image processing method, apparatus, device, and storage medium. Background Technology
[0002] The authenticity of a document can be determined by verifying whether different documents were printed by the same printer.
[0003] In related technologies, the printing marks left on the surface of printed documents during use, such as the printing characteristics of the photosensitive drum, are generally used to identify whether a document was printed by the same printer. However, due to the wide variety and complex composition of printers, the printing marks left by different printers on different documents may be identical, leading to low accuracy in document authenticity verification. Summary of the Invention
[0004] This application relates to an image processing method, apparatus, device, and storage medium that uses unit-marked images to identify documents, thereby improving the accuracy of document authenticity verification.
[0005] In a first aspect, embodiments of this application provide an image processing method, including:
[0006] Obtain the cryptic image of the first file, wherein the cryptic image includes multiple unit cryptic images, and each unit cryptic image includes multiple cryptic points;
[0007] Determine the unit distance between the marked points in the unit marked image, wherein in a row or column of the unit marked image, the distance between any two marked points is an integer multiple of the unit distance;
[0008] In the cryptic image, a first horizontal offset distance between two horizontally adjacent cryptic image units and a first vertical offset distance between two vertically adjacent cryptic image units are determined;
[0009] The unit mark image is extracted from the mark image based on the unit distance, the first horizontal offset distance, and the first vertical offset distance.
[0010] In one possible implementation, determining the unit distance between the marker points in the unit marker image includes:
[0011] Determine the line segment information of multiple line segments in the hidden mark image. The multiple line segments are line segments obtained by connecting any two hidden mark points in the hidden mark image. The line segment information includes the line segment length and the line segment angle. The line segment angle is the angle between the line segment and a preset horizontal line.
[0012] Based on the line segment information of the multiple line segments, the unit distance between the hidden marks in the unit hidden mark image is determined.
[0013] In one possible implementation, determining the unit distance between the marker points in the unit marker image based on the line segment information of the plurality of line segments includes:
[0014] Based on the segment angles of the plurality of line segments, a plurality of first line segments are determined among the plurality of line segments, wherein the segment angles of the first line segments are within a preset range;
[0015] Based on the length of the multiple first line segments, the multiple first line segments are divided into multiple line segment sets;
[0016] Based on the lengths of the line segments in the set of line segments, determine the average length of the line segments corresponding to the set of line segments;
[0017] The minimum value among the average lengths of the line segments corresponding to the multiple line segment sets is determined as the unit distance.
[0018] In one possible implementation, in the occult image, determining a first horizontal offset distance between two horizontally adjacent unit occult images and a first vertical offset distance between two vertically adjacent unit occult images includes:
[0019] Multiple sub-images are identified within the cryptic image;
[0020] Determine the second horizontal offset distance and the second vertical offset distance between any two sub-images to obtain multiple second horizontal offset distances and multiple second vertical offset distances;
[0021] The first horizontal offset distance is determined based on a plurality of second horizontal offset distances, and the first vertical offset distance is determined based on a plurality of second vertical offset distances.
[0022] In one possible implementation, the first horizontal offset distance is determined based on a plurality of second horizontal offset distances, and the first vertical offset distance is determined based on a plurality of second vertical offset distances; including:
[0023] Determine the matching degree between any two sub-images;
[0024] Based on the matching degree, multiple third horizontal offset distances are determined from multiple second horizontal offset distances, and multiple third vertical offset distances are determined from multiple second vertical offset distances. The matching degree between the two sub-images corresponding to the third horizontal offset distance and the third vertical offset distance is greater than or equal to a preset threshold.
[0025] The first horizontal offset distance is determined based on a plurality of the third horizontal offset distances, and the first vertical offset distance is determined based on a plurality of the third vertical offset distances.
[0026] In one possible implementation, extracting the unit marker image from the marker image based on the unit distance, the first horizontal offset distance, and the first vertical offset distance includes:
[0027] Based on the unit distance, the first horizontal offset distance, and the first vertical offset distance, a plurality of candidate unit mark images are determined in the mark image;
[0028] The boundaries of the multiple candidate unit cryptic images are determined based on the coordinates of the cryptic points in the multiple candidate unit cryptic images.
[0029] Based on the unit distance and the boundaries of the plurality of candidate unit cryptic images, determine the frequency of cryptic points appearing at each cryptic point location in the plurality of candidate unit cryptic images.
[0030] Based on the frequency of occurrence of the hidden mark at each location, the unit hidden mark image is extracted from the hidden mark image.
[0031] In one possible implementation, the unit marker image is extracted from the marker image based on the frequency of the marker points appearing at each marker point location; including:
[0032] Based on the frequency of the occurrence of the hidden mark at each hidden mark location, multiple target hidden mark locations are determined from the multiple hidden mark locations, wherein the frequency of the occurrence of the hidden mark at the target hidden mark location is greater than or equal to a preset threshold.
[0033] The unit mark image is generated based on the location of the target mark point.
[0034] Secondly, embodiments of this application provide an image processing apparatus, including an acquisition module, a first determination module, a second determination module, and an extraction module, wherein,
[0035] The acquisition module is used to acquire the hidden mark image of the first file, wherein the hidden mark image includes multiple unit hidden mark images, and each unit hidden mark image includes multiple hidden mark points;
[0036] The first determining module is used to determine the unit distance between the hidden marks in the unit hidden mark image, wherein the distance between any two hidden marks in a row or column of the unit hidden mark image is an integer multiple of the unit distance;
[0037] The second determining module is used to determine, in the cryptic image, a first horizontal offset distance between two horizontally adjacent unit cryptic images and a first vertical offset distance between two vertically adjacent unit cryptic images;
[0038] The extraction module is used to extract the unit mark image from the mark image based on the unit distance, the first horizontal offset distance, and the first vertical offset distance.
[0039] In one possible implementation, the first determining module is specifically used for:
[0040] Determine the line segment information of multiple line segments in the hidden mark image. The multiple line segments are line segments obtained by connecting any two hidden mark points in the hidden mark image. The line segment information includes the line segment length and the line segment angle. The line segment angle is the angle between the line segment and a preset horizontal line.
[0041] Based on the line segment information of the multiple line segments, the unit distance between the hidden marks in the unit hidden mark image is determined.
[0042] In one possible implementation, the first determining module is specifically used for:
[0043] Based on the segment angles of the plurality of line segments, a plurality of first line segments are determined among the plurality of line segments, wherein the segment angles of the first line segments are within a preset range;
[0044] Based on the length of the multiple first line segments, the multiple first line segments are divided into multiple line segment sets;
[0045] Based on the lengths of the line segments in the set of line segments, determine the average length of the line segments corresponding to the set of line segments;
[0046] The minimum value among the average lengths of the line segments corresponding to the multiple line segment sets is determined as the unit distance.
[0047] In one possible implementation, the second determining module is specifically used for:
[0048] Multiple sub-images are identified within the cryptic image;
[0049] Determine the second horizontal offset distance and the second vertical offset distance between any two sub-images to obtain multiple second horizontal offset distances and multiple second vertical offset distances;
[0050] The first horizontal offset distance is determined based on a plurality of second horizontal offset distances, and the first vertical offset distance is determined based on a plurality of second vertical offset distances.
[0051] In one possible implementation, the second determining module is specifically used for:
[0052] Determine the matching degree between any two sub-images;
[0053] Based on the matching degree, multiple third horizontal offset distances are determined from multiple second horizontal offset distances, and multiple third vertical offset distances are determined from multiple second vertical offset distances. The matching degree between the two sub-images corresponding to the third horizontal offset distance and the third vertical offset distance is greater than or equal to a preset threshold.
[0054] The first horizontal offset distance is determined based on a plurality of the third horizontal offset distances, and the first vertical offset distance is determined based on a plurality of the third vertical offset distances.
[0055] In one possible implementation, the extraction module is specifically used for:
[0056] Based on the unit distance, the first horizontal offset distance, and the first vertical offset distance, a plurality of candidate unit mark images are determined in the mark image;
[0057] The boundaries of the multiple candidate unit cryptic images are determined based on the coordinates of the cryptic points in the multiple candidate unit cryptic images.
[0058] Based on the unit distance and the boundaries of the plurality of candidate unit cryptic images, determine the frequency of cryptic points appearing at each cryptic point location in the plurality of candidate unit cryptic images.
[0059] Based on the frequency of occurrence of the hidden mark at each location, the unit hidden mark image is extracted from the hidden mark image.
[0060] In one possible implementation, the extraction module is specifically used for:
[0061] Based on the frequency of the occurrence of the hidden mark at each hidden mark location, multiple target hidden mark locations are determined from the multiple hidden mark locations, wherein the frequency of the occurrence of the hidden mark at the target hidden mark location is greater than or equal to a preset threshold.
[0062] The unit mark image is generated based on the location of the target mark point.
[0063] Thirdly, embodiments of this application provide an image processing device, including: a processor and a memory;
[0064] The memory stores computer-executed instructions;
[0065] The processor executes computer execution instructions stored in the memory, causing the processor to perform the image processing method as described in the first aspect.
[0066] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the image processing method described in the first aspect.
[0067] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the image processing method described in the first aspect.
[0068] This application provides an image processing method, apparatus, device, and storage medium. The method involves acquiring a hidden mark image of a first document. The hidden mark image includes multiple unit hidden mark images, and each unit hidden mark image includes multiple hidden mark points. The method determines the unit distance between hidden mark points in each unit hidden mark image, where the distance between any two hidden mark points in a row or column of a unit hidden mark image is an integer multiple of the unit distance. The method also determines a first horizontal offset distance between two horizontally adjacent unit hidden mark images and a first vertical offset distance between two vertically adjacent unit hidden mark images. Based on the unit distance, the first horizontal offset distance, and the first vertical offset distance, the method extracts unit hidden mark images from the hidden mark image. By extracting the unit hidden mark images, it is possible to effectively identify whether documents originate from the same printer, thus improving the accuracy of document authenticity verification. Attached Figure Description
[0069] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application;
[0070] Figure 2 A schematic flowchart of an image processing method provided in an embodiment of this application;
[0071] Figure 3 A schematic diagram of the cryptic image provided in the embodiments of this application. Figure 1 ;
[0072] Figure 4 A schematic diagram of a unit coded image provided in an embodiment of this application;
[0073] Figure 5 A schematic diagram of the cryptic image provided in the embodiments of this application. Figure 2 ;
[0074] Figure 6 A flowchart illustrating the process of determining the unit distance between marker points in a unit marker image, as provided in an embodiment of this application.
[0075] Figure 7 A schematic diagram illustrating the process of determining the first horizontal offset distance and the first vertical offset distance provided in the embodiments of this application;
[0076] Figure 8 A schematic flowchart illustrating the extraction of unit occult images provided in an embodiment of this application;
[0077] Figure 9 This is a schematic diagram of the structure of the image processing apparatus provided in the embodiments of this application;
[0078] Figure 10 This is a schematic diagram of the structure of an image processing device provided in an embodiment of this application. Detailed Implementation
[0079] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0080] To explain this application more clearly, the relevant terms used in this application will be introduced below.
[0081] Hidden features
[0082] A secret mark is a unit secret mark image composed of secret mark dots arranged in a dot matrix. It is a special identifier left in a document by a printer when printing.
[0083] The hidden features in the document will not be visible under normal light; they will only appear when illuminated with blue light in the 425nm to 455nm range.
[0084] Each printer corresponds to a unique identifier.
[0085] To ensure consistency in the textual description, this application uses unit image descriptions to depict the characteristics of the hidden marks.
[0086] To facilitate understanding, the following will be combined with... Figure 1 The application scenarios applicable to the embodiments of this application will be described.
[0087] Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of this application. Please refer to [link / reference]. Figure 1 The document includes printer A and two documents, namely document 1 and document 2. Document 1 is printed by printer A, and document 2 is printed by an unknown printer.
[0088] To identify whether document 2 was printed by printer A, the unit mark images can be extracted from document 1 and document 2 respectively. Then, the two extracted unit mark images are compared. If the two unit mark images are the same, it can be determined that document 2 was printed by printer A.
[0089] For example, both document 1 and document 2 can be degree certificates. It can be determined that document 1 is genuine and was printed by school printer A. To verify the authenticity of document 2, it can be determined by comparing whether the unit coded images in document 1 and document 2 are the same.
[0090] In related technologies, the printing marks left on the surface of printed documents during use, such as the printing characteristics of the photosensitive drum and surrounding components, are generally used to identify whether a document was printed by the same printer. However, due to the wide variety and complex composition of printers, the printing marks left by different printers on different documents may be identical, leading to low accuracy in document authenticity verification.
[0091] To address the aforementioned technical issues, this application provides a method for accurately extracting unit mark images from documents. By extracting the unit mark images, it is possible to effectively identify whether documents come from the same printer, thereby improving the accuracy of document authenticity verification.
[0092] The technical solutions shown in this application will now be described in detail through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; identical or identical content will not be repeated in different embodiments.
[0093] Figure 2 This is a schematic flowchart illustrating an image processing method provided in an embodiment of this application. Please refer to [link / reference]. Figure 2 The method includes:
[0094] S201. Obtain the cryptic image of the first file. The cryptic image includes multiple unit cryptic images, and each unit cryptic image includes multiple cryptic points.
[0095] The executing entity of this application may be a terminal device capable of image analysis and processing, such as a computer or mobile phone, or an image processing device installed in the aforementioned terminal device. The image processing device may be implemented by software or by a combination of software and hardware.
[0096] The first document can be a color laser printout, a photocopier printout, or a photocopier copy.
[0097] A dark image refers to an image displayed when the first document is exposed to blue light at a wavelength of 425nm to 455nm.
[0098] The marker points in the unit's hidden image are arranged in a preset order.
[0099] The marking point can be circular or elliptical, and its size is on the order of millimeters. For example, if the marking point is circular, its diameter can be 0.1 mm or 0.2 mm; if the marking point is elliptical, its size can be 0.2 mm × 0.1 mm.
[0100] To facilitate understanding, the following will be combined with... Figure 3 The relationship between the occult image, the unit occult image, and the occult point is explained.
[0101] Figure 3 A schematic diagram of the cryptic image provided in the embodiments of this application. Figure 1 Please see. Figure 3 A coded image consists of 7 regularly arranged unit coded images, and each unit coded image is composed of 47 regularly arranged coded dots.
[0102] S202. Determine the unit distance between the marker points in the unit marker image.
[0103] Unit distance refers to the minimum distance between adjacent cryptic points in a row or column of a unit cryptic image.
[0104] A single unit of occult image typically represents only one unit of distance.
[0105] In a row or column of a unit cryptic image, the distance between any two cryptic points is an integer multiple of the unit distance.
[0106] To facilitate understanding, the following will be combined with... Figure 4 Provide a description of the unit distance.
[0107] Figure 4 This is a schematic diagram of a unit coded image provided in an embodiment of this application. Please refer to... Figure 4 Taking a circle as an example, the distance between horizontally adjacent dark points B and C in the dark image is a unit distance d1, and the distance between vertically adjacent dark points A and B is also a unit distance d1.
[0108] S203. In the cryptic image, determine the first horizontal offset distance between two horizontally adjacent unit cryptic images and the first vertical offset distance between two vertically adjacent unit cryptic images.
[0109] The first horizontal offset distance between two horizontally adjacent unit cryptic images refers to the horizontal distance between the center points of the two horizontally adjacent unit cryptic images.
[0110] The first vertical offset distance between two vertically adjacent unit cryptic images refers to the vertical distance between the center points of the two vertically adjacent unit cryptic images.
[0111] To facilitate understanding, the following will be combined with... Figure 5 The first horizontal offset distance and the first vertical offset distance are explained.
[0112] Figure 5 A schematic diagram of the cryptic image provided in the embodiments of this application. Figure 2 Please see. Figure 5 It includes four unit obfuscation images, named Unit Obfuscation Image 1, Unit Obfuscation Image 2, Unit Obfuscation Image 3, and Unit Obfuscation Image 4. Unit Obfuscation Image 1 and Unit Obfuscation Image 2 are horizontally adjacent, and the distance d3 between them is the first horizontal offset distance. Unit Obfuscation Image 1 and Unit Obfuscation Image 3 are vertically adjacent, and the distance d4 between them is the first vertical offset distance.
[0113] S204. Extract the unit mark image from the mark image based on the unit distance, the first horizontal offset distance, and the first vertical offset distance.
[0114] Based on the unit distance, the first horizontal offset distance, and the first vertical offset distance, the boundaries of multiple unit obfuscation images can be determined in the obfuscation image, and then the unit obfuscation image can be extracted based on the boundaries of the unit obfuscation images.
[0115] exist Figure 2 In the illustrated embodiment, a hidden mark image of the first document is first acquired. This hidden mark image includes multiple unit hidden mark images, each containing multiple hidden mark points. Then, the unit distance between the hidden mark points in each unit hidden mark image is determined. Furthermore, within the hidden mark image, a first horizontal offset distance between two horizontally adjacent unit hidden mark images and a first vertical offset distance between two vertically adjacent unit hidden mark images are determined. Finally, based on the unit distance, the first horizontal offset distance, and the first vertical offset distance, the unit hidden mark image is extracted from the hidden mark image. The method provided in this application embodiment can accurately extract unit hidden mark images from the hidden mark image of the first document. The extracted unit hidden mark images can effectively identify whether documents originate from the same printer, thus improving the accuracy of document authenticity verification.
[0116] Based on any of the above embodiments, the following, in conjunction with Figures 6-9 The embodiments shown provide a detailed explanation of each step of the above image processing method.
[0117] Figure 6This is a flowchart illustrating the process of determining the unit distance between marker points in a unit marker image, as provided in an embodiment of this application. Please refer to... Figure 6 ,include:
[0118] S601. Determine the line segment information of multiple line segments in the cryptic image. The multiple line segments are line segments obtained by connecting any two cryptic points in the cryptic image. The line segment information includes the line segment length and the line segment angle.
[0119] The length of a line segment can be calculated using the coordinates of two hidden points.
[0120] For example, the hidden point P i =(x i ,y i ) and hidden mark point P j =(x j ,y j ) forms line segment len ij len ij The calculation formula is:
[0121] The line segment angle can be the angle between the line segment and a preset horizontal line.
[0122] The angle of a line segment can be determined in the following ways:
[0123] First, calculate the tangent of the height and width between the two points. Then, use the arctangent function to calculate the radian value (using the arctan function). Finally, convert the radians to degrees (using the rad2deg function). The calculation formula is as follows:
[0124]
[0125] Finally, the calculated angle is processed into an acute angle:
[0126]
[0127] S602. Based on the segment angles of multiple line segments, determine multiple first line segments among the multiple line segments.
[0128] The angle of the first line segment is within a preset range, which can be [0°, 3°] ∪ [87°, 90°].
[0129] The angles of the line segments in the multiple line segments are [0°, 90°]. Then, horizontal and vertical line segments are selected from the multiple line segments to form the first line segment. The angle range of the horizontal line segment is [0°, 3°], and the angle range of the vertical line segment is [87°, 90°].
[0130] S603. Divide the multiple first line segments into multiple line segment sets based on the line segment lengths of the multiple first line segments.
[0131] The K-means clustering algorithm can be used to cluster line segment lengths to obtain multiple sets of line segments. Then, the mean squared error of the line segment lengths in each set can be calculated, and the correct set of line segments can be determined based on the mean squared error.
[0132] S604. Determine the average length of the line segments corresponding to the line segment set based on the lengths of the line segments in the line segment set.
[0133] You can first sort the line segment set according to the number of line segments in the set, select the top few line segment sets, and calculate the average length of the line segments in the set.
[0134] S605. Determine the minimum value among the average lengths of line segments corresponding to multiple line segment sets as the unit distance.
[0135] For example, if three sets of line segments are selected, namely set A, set B, and set C, where the average length of line segments in set A is 6 pixels, the average length of line segments in set B is 3 pixels, and the average length of line segments in set C is 9 pixels, then the unit distance can be determined to be 3 pixels.
[0136] exist Figure 6 In the illustrated embodiment, line segment information of multiple line segments in the coded image is determined. These multiple line segments are formed by connecting any two coded points in the coded image, and the line segment information includes line segment length and angle. Based on the line segment angles, multiple first line segments are determined from among the multiple line segments. Based on the line segment lengths of the multiple first line segments, the multiple first line segments are divided into multiple line segment sets. Based on the line segment lengths of the line segments in the line segment sets, the average line segment length corresponding to each line segment set is determined. Finally, the minimum value among the average line segment lengths corresponding to the multiple line segment sets is determined as the unit distance. Using the above method, the unit distance between unit coded points can be accurately determined.
[0137] Figure 7 This is a schematic diagram illustrating the process of determining the first horizontal offset distance and the first vertical offset distance, as provided in an embodiment of this application. Please refer to... Figure 7 ,include:
[0138] S701. Identify multiple sub-images in the cryptic image.
[0139] A sub-image can be constructed with any one of the marked points in the marked image as the center and r as the radius.
[0140] r can generally be set to 100 pixels.
[0141] The number of sub-images can be generated based on the number of hidden dots in a hidden image. For example, if a hidden image has 255 hidden dots, then 255 sub-images can be generated.
[0142] S702. Determine the second horizontal offset distance and the second vertical offset distance between any two sub-images to obtain multiple second horizontal offset distances and multiple second vertical offset distances.
[0143] The second horizontal offset distance between any two sub-images refers to the horizontal offset distance between the centers of any two sub-images, and the second vertical offset distance refers to the vertical offset distance between the centers of any two sub-images.
[0144] S703. Determine the matching degree between any two sub-images.
[0145] For any two nodes P A and P B Generate their subgraphs G i If i∈{A, B}, then the matching degree of the two subgraphs is:
[0146]
[0147] Where, m vAiBj In Figure A, point V is used as an example. Ai Using point B as the reference point and V as the reference point in Figure B Bj The matching degree between two subgraphs with the reference point as the reference point can be expressed as:
[0148]
[0149] Among them, V AiBj This indicates that the two subgraphs are respectively represented by V. Ai and V Bj Using the reference point, the set of matched node pairs, |V x | represents the number of elements in the set, V AiBj It can be represented as:
[0150]
[0151] Here, α and β are the thresholds for determining whether the x and y coordinates of two nodes match, and are generally set to 5 pixels.
[0152] S704. Based on the matching degree, determine multiple third horizontal offset distances among multiple second horizontal offset distances, and determine multiple third vertical offset distances among multiple second vertical offset distances.
[0153] The matching degree between the two sub-images corresponding to the third horizontal offset distance and the third vertical offset distance is greater than or equal to the preset threshold.
[0154] The third horizontal offset distance and the third vertical offset distance can be determined in the following ways:
[0155] Arrange all matching scores in descending order, then determine the second horizontal offset distance corresponding to the top 10% of matching scores as multiple third horizontal offset distances, and determine the second vertical offset distance corresponding to the top 10% of matching scores as multiple third vertical offset distances.
[0156] For any two sub-images, a matching degree, a horizontal offset distance, and a first vertical offset distance can be determined. The horizontal offset distance corresponding to the matching degree refers to the matching degree and the horizontal offset distance calculated using the same two sub-images.
[0157] S705. Determine the first horizontal offset distance based on multiple third horizontal offset distances, and determine the first vertical offset distance based on multiple third vertical offset distances.
[0158] The first horizontal offset distance can be determined in the following way:
[0159] Based on multiple third-level offset distances, a histogram of the third-level offset distances is generated, and the distance between the characteristic peaks of the histogram is equal to the distance between the first-level offset distances.
[0160] The method for determining the first vertical offset distance can be found in the method for determining the first horizontal offset distance.
[0161] exist Figure 7 In the illustrated embodiment, multiple sub-images are determined within the occult image; a second horizontal offset distance and a second vertical offset distance are determined between any two sub-images, resulting in multiple second horizontal offset distances and multiple second vertical offset distances; the matching degree between any two sub-images is determined; based on the matching degree, multiple third horizontal offset distances are determined from the multiple second horizontal offset distances, and multiple third vertical offset distances are determined from the multiple second vertical offset distances; a first horizontal offset distance is determined based on the multiple third horizontal offset distances, and a first vertical offset distance is determined based on the multiple third vertical offset distances. Using the above method, the first horizontal offset distance and the first vertical offset distance between unit occult images can be accurately and quickly determined.
[0162] Figure 8 This is a schematic flowchart illustrating the extraction of unit occult images provided in an embodiment of this application. Please refer to [link / reference]. Figure 8 ,include:
[0163] S801. Based on the unit distance, the first horizontal offset distance, and the first vertical offset distance, determine multiple candidate unit dark images in the dark image.
[0164] In the cryptic image, all points are first numbered. In the initial state, each cryptic point belongs to a different category.
[0165] For two hidden points in the horizontal direction, if the distance between the two hidden points does not exceed the first horizontal offset distance and is more than twice the unit distance, the two hidden points can be connected and updated to the same category. For two hidden points in the vertical direction, if the distance between the two hidden points does not exceed the first vertical offset distance and is more than twice the unit distance, the two hidden points can be connected and updated to the same category.
[0166] The principle of updating is: determine the number of hidden points in the categories to which the two hidden points belong, and update the category with the fewer hidden points to the category of the other hidden point.
[0167] After numerous classifications, multiple candidate unit hidden images can be identified from the hidden imagery. All hidden points in the candidate unit hidden images belong to the same category.
[0168] S802. Determine the boundary of the multiple candidate unit occultation images based on the coordinates of the occultation points in the multiple candidate unit occultation images.
[0169] For any given unit coded image, the four boundaries of the unit coded image can be determined based on the coordinates of all coded points in the unit coded image. Based on these four boundaries, the height and width of the unit coded image can be determined.
[0170] The height of all unit coded images in the coded image is counted, outliers are removed, and the average of the remaining heights is calculated to obtain the average height. The width of all unit coded images in the coded image is counted, outliers are removed, and the average of the remaining widths is calculated to obtain the average width.
[0171] The average height and average width constitute the boundary of the unit occult image.
[0172] S803. Based on the unit distance and the boundaries of multiple candidate unit cryptic images, determine the frequency of cryptic points appearing at each cryptic point location in the multiple candidate unit cryptic images.
[0173] The frequency of a cryptic point is the ratio of the number of times a cryptic point appears at a given location to the number of cryptic images in the candidate unit.
[0174] In a cryptic image, the cryptic points that appear can be real cryptic points or noise points. By statistically analyzing the frequency of cryptic points appearing at each cryptic point location in all candidate unit cryptic images, it can be determined whether a cryptic point is a real cryptic point (target cryptic point).
[0175] S804. Based on the frequency of the occurrence of the hidden mark at each hidden mark location, determine multiple target hidden mark locations among the multiple hidden mark locations, wherein the frequency of the occurrence of the hidden mark at the target hidden mark location is greater than or equal to a preset threshold.
[0176] Based on the frequency of occurrence of each cryptic point in the cryptic image of all candidate units, it can be determined whether each cryptic point is a target cryptic point or a noise point.
[0177] After identifying the target and noise points, the positions of each point in the image of all candidate units can be supplemented or deleted.
[0178] S805. Generate a unit mark image based on the location of the target mark point.
[0179] The boundaries of the unit coded image and the candidate unit coded image are the same, but the number and location of coded points in the unit coded image may differ from those in the candidate unit coded image.
[0180] exist Figure 8 In the illustrated embodiment, multiple candidate unit hidden mark images are determined in the hidden mark image based on unit distance, a first horizontal offset distance, and a first vertical offset distance; the boundaries of the multiple candidate unit hidden mark images are determined based on the coordinates of the hidden mark points in the multiple candidate unit hidden mark images; the frequency of hidden mark points appearing at each hidden mark point position in the multiple candidate unit hidden mark images is determined based on the unit distance and the boundaries of the multiple candidate unit hidden mark images; multiple target hidden mark point positions are determined among the multiple hidden mark point positions based on the frequency of hidden mark points appearing at each hidden mark point position, and the frequency of hidden mark points appearing at the target hidden mark point positions is greater than or equal to a preset threshold; a unit hidden mark image is generated based on the target hidden mark point positions. Using the above method, unit hidden mark images can be extracted accurately and quickly from the hidden mark image.
[0181] Based on any of the above embodiments, the process of the image processing method will be described in detail below through specific examples.
[0182] Step 1: Number all the points on the occult image.
[0183] Each point in the cryptographic image is pre-labeled with a different label, and the number of points is denoted as N. Initially, it is assumed that each point belongs to a different category, and a point in the cryptographic image can be represented as {P}. i =(x i ,y i}|i=0,1,…,N}.
[0184] Step 2: Number all line segments on the coded image.
[0185] Each point is obtained sequentially according to its number, and the distance and angle between this point and every point thereafter are calculated. The set of all these line segments is represented as Line. all ={(P i ,P j ,len ij ,ang ij )|i≠j and i,j=0,1,…,N}, where P i and P j Let len be any two points on the cryptic image. ij For P i and P j The length between, ang ij For P i and P j The angle between two points P (the angle is acute). i =(x i ,y i ) and P j =(x j ,y j The distance and angle between them are calculated as follows:
[0186] Step 2-1, calculate the distance between the two points:
[0187] The Euclidean distance is used to calculate the distance between two points, and the formula is as follows:
[0188]
[0189] Step 2-2, calculate the angle between the two points:
[0190] To calculate the angle between two points, first calculate the tangent of the height and width between the two points. Then, use the arctangent function to calculate the radian value (using the arctan function). Finally, convert the radians to degrees (using the rad²deg function). The calculation formula is as follows:
[0191]
[0192] Finally, the angle can be converted to an acute angle and expressed as:
[0193]
[0194] Step 3: Calculate the unit distance of the cryptic image.
[0195] Step 3-1: Filter out horizontal and vertical line segments by angle.
[0196] Line segment set is obtained by angle filtering. all Line is a set of horizontal and vertical line segments.h-v The angle threshold used to filter vertical line segments is [87, 90], and the angle threshold used to filter horizontal line segments is [0, 3]. h-v It can be represented as:
[0197] Line h-v ={(P i ,P j ,len ij ,ang ij )|i≠j and i,j=0,1,…,N and ang ij ∈{[0, 3]∪[87, 90]}}
[0198] Step 3-2: Analyze the lengths of horizontal and vertical line segments using the K-means clustering algorithm.
[0199] The input to the K-means clustering algorithm is the data to be analyzed. Given a pre-set number of categories C, the output is the category corresponding to each data point, with the number of clusters ranging from 1 to the number of line segments in the line segment set | Line h-v |(|Line h-v (where | is the number of elements in the set) can be analyzed sequentially and expressed as:
[0200]
[0201] Where K is the K-means function, ind i Each data point is clustered into a corresponding category number. For Line h-v The set of line segments is the set of the lengths of each line segment.
[0202] Step 3-3: Calculate the mean squared error after clustering for each number of categories C.
[0203] The mean squared error of clustering for each number of categories C can be expressed as:
[0204]
[0205] Where dev is the value used to calculate the variance.
[0206] Steps 3-4 involve identifying the inflection point to find the case where the clustering is exactly correct.
[0207] By analyzing the increase in the number of cluster categories C from 1 to |Line h-v The change in the mean squared error of the clusters represents the case where the clustering is exactly correct at the inflection point, assuming the number of clusters at the inflection point is C. B The mean squared error is The number of categories at the point before the inflection point is C A The mean squared error is The number of categories at the point after the inflection point is C. C The mean squared error is The following formula can be used to determine whether an inflection point has been reached:
[0208]
[0209] The threshold for the experimental ratio was set to 5. As the number of categories C increased from 1 to |Line h-v Calculate the value of the above formula sequentially. When the value is less than or equal to 5 for the first time, it is considered to be an inflection point.
[0210] Steps 3-5 involve analyzing the cases where clustering is correct to obtain the unit distance of the occult images.
[0211] Since line segments representing unit distances constitute the majority, we can sort each category by the number of line segments, then take the line segments from the top few categories. The category with the smallest average length is the category containing the unit distance. This yields the line segments representing unit distances in the cryptic image. The average length of these line segments is taken as the unit distance d of the cryptic image. std .
[0212] Step 4: Calculate the first horizontal offset distance d of the unit occultation image in the occultation image. HPS Distance d from the first vertical offset VPS
[0213] The first horizontal offset distance d of the cryptic image is calculated using a graph-based matching repeatability metric algorithm. HPS Distance d from the first vertical offset VPS The repeatability measurement algorithm based on graph matching is shown below:
[0214] Step 4-1: Construct a sub-image for each node.
[0215] For any point P on the dark map i =(x i ,y i Generate a sub-image G for that point. i ={P j ,len ij ≤r},P i The sub-image is all the images on the cryptic image that are related to P. i The sub-images are formed by points within a pre-set radius r (r is set to 100 pixels). The number of sub-images generated corresponds to the number of points in a single occultation image. After obtaining all sub-images, the matching degree between each pair of sub-images is calculated. Each matching pair returns a set of matching parameters, including a horizontal translation value t. x and a vertical translation value t yAnd the matching degree q of the two subgraphs, which is used to select the best match for generating statistics, because a higher matching degree will bring a higher degree of robustness.
[0216] Step 4-2, Calculation of matching degree
[0217] For any two nodes P A and P B Generate their subgraphs G i If i∈{A,B}, then the matching degree of the two subgraphs is:
[0218]
[0219] in, In graph A, point v Ai Using v as the reference point and point B in Figure 2 Bi The matching degree between two subgraphs with the reference point as the reference point can be expressed as:
[0220]
[0221] Among them, V AiBj This indicates that the two subgraphs are respectively represented by v Ai and v Bj V is the set of matched node pairs, where |·| is the number of elements in the set. AiBj It can be represented as:
[0222]
[0223] Here, α and β are the thresholds for determining whether the x and y coordinates of two nodes match, and are generally set to 5 pixels.
[0224] Step 4-3: Sort the matching degree of all subgraphs.
[0225] By calculating the matching degree of all subgraphs, sorting all the matching degrees, and then calculating the t-value of the top 10% of the matches, we can determine the t-value. x and t y To calculate d HPS and d VPS If the unit occultation image has a certain horizontal pattern separation distance, then the obtained horizontal translation value is likely to be d. HPS A multiple of d. Using several iterations of the search, a histogram of the shifted values is generated, the distance between the characteristic peaks of which is approximately equal to d. HPS . d VPS and d HPS The calculation process is the same.
[0226] Step 5, classify the hidden marks
[0227] The first horizontal offset distance d was obtained using a graph-based matching repeatability measurement algorithm. HPS Distance d from the first vertical offset VPS Combined with the unit distance d of the cryptic image std This allows us to identify those distances not exceeding d. HPS and d VPS Connect any two vertices whose distance is more than twice the unit distance and whose directions are perpendicular or horizontal, and update their categories to the same category. The update rule is: for any two vertices that do not belong to the same category, if the perpendicular distance between the two points does not exceed d of the cryptic image... VPS And the line segment is perpendicular or the horizontal distance between the two points does not exceed d. HPS Furthermore, since the line segment is horizontal, the point category is updated based on the number of points in each category, changing the category of the point with fewer points to the category of the other point. When the cryptic points belonging to a unit cryptic image are grouped into one category and some noise points are grouped separately, the cryptic points in the categories whose state information is noise points are extracted separately by using a cryptic point count threshold. These categories of cryptic points correspond to the unit cryptic image.
[0228] Step 6: Completion and optimization of unit occultation image
[0229] By statistically analyzing frequencies, points with frequencies below a threshold are treated as noise and deleted. This can also fill in missing points in some unit occultation images.
[0230] Step 6-1, obtain the vertices at both ends of the four boundaries of the unit occultation image.
[0231] For all the classified unit cryptic image point sets in the cryptic image, select any unit cryptic image point set, count the coordinates of all points in this unit cryptic image point set, and obtain the coordinates of the points at both ends on the four boundaries. If each of the four edges has at least two points, there are a total of 8 points. If some edges have only one point, there are fewer than 8 points. For those edges with only one point, construct a new coordinate according to the offset of the two points on their opposite edge (if the number of points on the opposite edge is 1, then use the offset of the two points on the adjacent edge). Following this step, finally obtain 8 coordinates, which are the two vertices at both ends in the four directions of up, down, left, and right.
[0232] Step 6-2, locate the modal frame of the unit's occultation image.
[0233] For each boundary, two vertices can form an edge, and four boundaries can form four edges. The area contained by the intersection of these four edges is the bounding box of the current unit occultation image.
[0234] Step 6-3, obtain the width and height of the basic pattern frame.
[0235] The coordinates of the top-left vertex of the current unit cryptic image frame are obtained by using two points on the left boundary and two points on the top boundary. The coordinates of the bottom-right vertex of the current unit cryptic image frame are obtained by using two points on the right boundary and two points on the bottom boundary. The width of the current unit cryptic image frame can be obtained by using the coordinates of the bottom-right vertex and the coordinates of the two points on the left boundary. The height of the current unit cryptic image frame can be obtained by using the coordinates of the bottom-right vertex and the coordinates of the two boundary points. After calculating the size of all unit cryptic images, outliers in the width and height of these unit cryptic image frames are removed, and then the average is taken to obtain the width and height of the basic pattern frame corresponding to this cryptic image.
[0236] Step 6-4: Construct a frequency array based on the basic pattern box.
[0237] With the standard unit width and height of the occult image frame and the unit distance d of the occult image... st d can be used to calculate the number of rows (Row) and columns (Col) of the basic pattern's secret point distribution, thereby initializing a two-dimensional array Frequency[Row][Col] to record the frequency of secret point occurrences, with all elements initialized to 0.
[0238] Step 6-5: Analyze the update frequency array of all unit cryptic images.
[0239] The next step is to analyze all unit occultation images to update the Frequency array. For a unit occultation image, the coordinates of all occultation points are used to obtain an occultation point P. i coordinates (x) i ,y i ), calculate the hidden point P i The ratio of the displacement of the top-left vertex of the current unit cryptic image to the unit distance is calculated, and then the corresponding element in the frequency array is incremented by 1. After generating the basic pattern by statistically analyzing the frequencies, the frequency array of cryptic points corresponding to the basic pattern of the current cryptic image is obtained. If the frequency is less than the preset threshold, the point is considered a noise point, and the element at that position is set to 0; otherwise, the element at that position is set to 1. Finally, an array consisting of 0s and 1s is obtained, where the position of 1 is a cryptic point. This is the 0-1 matrix corresponding to the basic pattern of this cryptic image.
[0240] One type of coded image corresponds to one type of unit coded image, and one type of unit coded image corresponds to one 0-1 matrix. Since different printer models correspond to different unit coded images, the 0-1 matrix can also uniquely correspond to one printer model. Finally, all extracted 0-1 matrices are used as a database for comparison and analysis of subsequent new printouts to be tested, in order to determine the corresponding printer model.
[0241] The method provided in this application can accurately and quickly extract unit secret mark images from secret mark images. The extracted unit secret mark images can effectively identify whether documents come from the same printer, improving the accuracy of document authenticity verification.
[0242] Figure 9 This is a schematic diagram of the image processing apparatus provided in an embodiment of this application. Please refer to... Figure 9 The image processing device 10 may include: an acquisition module 11, a first determination module 12, a second determination module 13, and an extraction module 14, wherein,
[0243] The acquisition module 11 is used to acquire a hidden mark image of a first file, wherein the hidden mark image includes multiple unit hidden mark images, and each unit hidden mark image includes multiple hidden mark points;
[0244] The first determining module 12 is used to determine the unit distance between the hidden marks in the unit hidden mark image, wherein the distance between any two hidden marks in a row or column of the unit hidden mark image is an integer multiple of the unit distance;
[0245] The second determining module 13 is used to determine, in the cryptic image, a first horizontal offset distance between two horizontally adjacent unit cryptic images and a first vertical offset distance between two vertically adjacent unit cryptic images;
[0246] The extraction module 14 is used to extract the unit mark image from the mark image based on the unit distance, the first horizontal offset distance, and the first vertical offset distance.
[0247] In one possible implementation, the first determining module 12 is specifically used for:
[0248] Determine the line segment information of multiple line segments in the hidden mark image. The multiple line segments are line segments obtained by connecting any two hidden mark points in the hidden mark image. The line segment information includes the line segment length and the line segment angle. The line segment angle is the angle between the line segment and a preset horizontal line.
[0249] Based on the line segment information of the multiple line segments, the unit distance between the hidden marks in the unit hidden mark image is determined.
[0250] In one possible implementation, the first determining module 12 is specifically used for:
[0251] Based on the segment angles of the plurality of line segments, a plurality of first line segments are determined among the plurality of line segments, wherein the segment angles of the first line segments are within a preset range;
[0252] Based on the length of the multiple first line segments, the multiple first line segments are divided into multiple line segment sets;
[0253] Based on the lengths of the line segments in the set of line segments, determine the average length of the line segments corresponding to the set of line segments;
[0254] The minimum value among the average lengths of the line segments corresponding to the multiple line segment sets is determined as the unit distance.
[0255] In one possible implementation, the second determining module 13 is specifically used for:
[0256] Multiple sub-images are identified within the cryptic image;
[0257] Determine the second horizontal offset distance and the second vertical offset distance between any two sub-images to obtain multiple second horizontal offset distances and multiple second vertical offset distances;
[0258] The first horizontal offset distance is determined based on a plurality of second horizontal offset distances, and the first vertical offset distance is determined based on a plurality of second vertical offset distances.
[0259] In one possible implementation, the second determining module 13 is specifically used for:
[0260] Determine the matching degree between any two sub-images;
[0261] Based on the matching degree, multiple third horizontal offset distances are determined from multiple second horizontal offset distances, and multiple third vertical offset distances are determined from multiple second vertical offset distances. The matching degree between the two sub-images corresponding to the third horizontal offset distance and the third vertical offset distance is greater than or equal to a preset threshold.
[0262] The first horizontal offset distance is determined based on a plurality of the third horizontal offset distances, and the first vertical offset distance is determined based on a plurality of the third vertical offset distances.
[0263] In one possible implementation, the extraction module 14 is specifically used for:
[0264] Based on the unit distance, the first horizontal offset distance, and the first vertical offset distance, a plurality of candidate unit mark images are determined in the mark image;
[0265] The boundaries of the multiple candidate unit cryptic images are determined based on the coordinates of the cryptic points in the multiple candidate unit cryptic images.
[0266] Based on the unit distance and the boundaries of the plurality of candidate unit cryptic images, determine the frequency of cryptic points appearing at each cryptic point location in the plurality of candidate unit cryptic images.
[0267] Based on the frequency of occurrence of the hidden mark at each location, the unit hidden mark image is extracted from the hidden mark image.
[0268] In one possible implementation, the extraction module 14 is specifically used for:
[0269] Based on the frequency of the occurrence of the hidden mark at each hidden mark location, multiple target hidden mark locations are determined from the multiple hidden mark locations, wherein the frequency of the occurrence of the hidden mark at the target hidden mark location is greater than or equal to a preset threshold.
[0270] The unit mark image is generated based on the location of the target mark point.
[0271] The image processing apparatus 10 provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0272] Figure 10 This is a schematic diagram of the structure of an image processing device provided in an embodiment of this application. Please refer to... Figure 10 The image processing device 20 may include a memory 21 and a processor 22. Exemplarily, the memory 21 and the processor 22 are interconnected via a bus 23.
[0273] Memory 21 is used to store program instructions;
[0274] The processor 22 is used to execute the program instructions stored in the memory, so that the image processing device 20 performs the image processing method described above.
[0275] Figure 10 The image processing device shown in the embodiments can execute the technical solutions shown in the above method embodiments. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0276] This application provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above-described image processing method when executed by a processor.
[0277] This application embodiment may also provide a computer program product, including a computer program that, when executed by a processor, can implement the above-described image processing method.
[0278] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
[0279] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. Multitasking and parallel processing may be advantageous in certain environments. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this application. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0280] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. An image processing method, characterized in that, include: Obtain the cryptic image of the first file, wherein the cryptic image includes multiple unit cryptic images, and each unit cryptic image includes multiple cryptic points; Determine the unit distance between the cryptic points in the unit cryptic image, where the unit distance refers to the minimum distance between adjacent cryptic points in a row or column of the unit cryptic image; In a row or column of the unit cryptic image, the distance between any two cryptic points is an integer multiple of the unit distance; In the cryptic image, a first horizontal offset distance between two horizontally adjacent cryptic images and a first vertical offset distance between two vertically adjacent cryptic images are determined; the first horizontal offset distance between two horizontally adjacent cryptic images refers to the horizontal distance between the center points of the two horizontally adjacent cryptic images; the first vertical offset distance between two vertically adjacent cryptic images refers to the vertical distance between the center points of the two vertically adjacent cryptic images. Based on the unit distance, the first horizontal offset distance, and the first vertical offset distance, a plurality of candidate unit marker images are determined in the marker image, including: In the occultation image, all points are first numbered. Initially, each occultation point belongs to a different category. For two occultation points in the horizontal direction, if the distance between the two occultation points does not exceed the first horizontal offset distance and the distance is more than twice the unit distance, the two occultation points are connected and updated to the same category. For two occultation points in the vertical direction, if the distance between the two occultation points does not exceed the first vertical offset distance and the distance is more than twice the unit distance, the two occultation points are connected and updated to the same category. The update principle is: determine the number of occultation points in the category to which the two occultation points belong, and update the category with the fewer occultation points to the category of the other occultation point. After numerous classifications, multiple candidate unit occultation images are determined in the occultation image, and all occultation points in the candidate unit occultation images belong to the same category. The boundaries of the multiple candidate unit coded images are determined based on the coordinates of the coded points in the multiple candidate unit coded images. This includes: for any given unit coded image, determining four boundaries of the unit coded image based on the coordinates of all coded points in the unit coded image; determining the height and width of the unit coded image based on the four boundaries; calculating the height of all unit coded images in the coded image, removing outliers, and then averaging the remaining heights to obtain the average height; calculating the width of all unit coded images in the coded image, removing outliers, and then averaging the remaining widths to obtain the average width; the average height and average width constitute the boundaries of the unit coded image. Based on the unit distance and the boundaries of the plurality of candidate unit coded images, the frequency of coded points appearing at each coded point position in the plurality of candidate unit coded images is determined. The frequency of coded points refers to the ratio of the number of times coded points appear at a coded point position to the number of candidate unit coded images. Based on the frequency of coded points appearing at each coded point position, the unit coded image is extracted from the coded images.
2. The method according to claim 1, characterized in that, Determining the unit distance between the marker points in the unit marker image includes: Determine the line segment information of multiple line segments in the hidden mark image. The multiple line segments are line segments obtained by connecting any two hidden mark points in the hidden mark image. The line segment information includes the line segment length and the line segment angle. The line segment angle is the angle between the line segment and a preset horizontal line. Based on the line segment information of the multiple line segments, the unit distance between the hidden marks in the unit hidden mark image is determined.
3. The method according to claim 2, characterized in that, Determining the unit distance between the hidden marks in the unit hidden mark image based on the line segment information of the plurality of line segments includes: Based on the segment angles of the multiple line segments, multiple first line segments are determined from the multiple line segments. The segment angles of the first line segments are within a preset range, which is [0°, 3°] ∪ [87°, 90°]. The segment angles of the multiple line segments are [0°, 90°]. Then, horizontal and vertical line segments are selected from the multiple line segments to form the first line segments. The angle range of the horizontal line segments is [0°, 3°], and the angle range of the vertical line segments is [87°, 90°]. Based on the length of the multiple first line segments, the multiple first line segments are divided into multiple line segment sets, including: clustering the line segment lengths using a clustering algorithm to obtain multiple line segment sets; Based on the lengths of the line segments in the set of line segments, determine the average length of the line segments corresponding to the set of line segments; The minimum value among the average lengths of the line segments corresponding to the multiple line segment sets is determined as the unit distance.
4. The method according to any one of claims 1-3, characterized in that, Determining the first horizontal offset distance between two horizontally adjacent unit black mark images and the first vertical offset distance between two vertically adjacent unit black mark images in the black mark image includes: Determine multiple sub-images in the marked image, including: forming a sub-image with any marked point in the marked image as the center and r as the radius; Determine the second horizontal offset distance and the second vertical offset distance between any two sub-images to obtain multiple second horizontal offset distances and multiple second vertical offset distances. The second horizontal offset distance between any two sub-images refers to the horizontal offset distance between the centers of any two sub-images, and the second vertical offset distance refers to the vertical offset distance between the centers of any two sub-images. The first horizontal offset distance is determined based on a plurality of second horizontal offset distances, and the first vertical offset distance is determined based on a plurality of second vertical offset distances.
5. The method according to claim 4, characterized in that, The step of determining the first horizontal offset distance based on a plurality of second horizontal offset distances, and determining the first vertical offset distance based on a plurality of second vertical offset distances, includes: Determine the matching degree between any two sub-images; Based on the matching degree, multiple third horizontal offset distances are determined from multiple second horizontal offset distances, and multiple third vertical offset distances are determined from multiple second vertical offset distances. The matching degree between the two sub-images corresponding to the third horizontal offset distance and the third vertical offset distance is greater than or equal to a preset threshold. The first horizontal offset distance is determined based on a plurality of the third horizontal offset distances, and the first vertical offset distance is determined based on a plurality of the third vertical offset distances.
6. The method according to claim 1, characterized in that, Extracting the unit marker image from the marker image based on the frequency of marker occurrences at each marker location includes: Based on the frequency of the occurrence of the hidden mark at each hidden mark location, multiple target hidden mark locations are determined from the multiple hidden mark locations, wherein the frequency of the occurrence of the hidden mark at the target hidden mark location is greater than or equal to a preset threshold. The unit mark image is generated based on the location of the target mark point.
7. An image processing apparatus, characterized in that, It includes an acquisition module, a first determination module, a second determination module, and an extraction module, wherein, The acquisition module is used to acquire the hidden mark image of the first file, wherein the hidden mark image includes multiple unit hidden mark images, and each unit hidden mark image includes multiple hidden mark points; The first determining module is used to determine the unit distance between the cryptic points in the unit cryptic image, wherein the unit distance refers to the minimum distance between adjacent cryptic points in a row or column of the unit cryptic image; and the distance between any two cryptic points in a row or column of the unit cryptic image is an integer multiple of the unit distance. The second determining module is used to determine, in the cryptic image, a first horizontal offset distance between two horizontally adjacent unit cryptic images and a first vertical offset distance between two vertically adjacent unit cryptic images; the first horizontal offset distance between two horizontally adjacent unit cryptic images refers to the horizontal distance between the center points of the two horizontally adjacent unit cryptic images; the first vertical offset distance between two vertically adjacent unit cryptic images refers to the vertical distance between the center points of the two vertically adjacent unit cryptic images. The extraction module is used to determine multiple candidate unit obfuscation images in the obfuscation image based on the unit distance, the first horizontal offset distance, and the first vertical offset distance; the step of determining multiple candidate unit obfuscation images in the obfuscation image based on the unit distance, the first horizontal offset distance, and the first vertical offset distance includes: In the occultation image, all points are first numbered. Initially, each occultation point belongs to a different category. For two occultation points in the horizontal direction, if the distance between the two occultation points does not exceed the first horizontal offset distance and the distance is more than twice the unit distance, the two occultation points are connected and updated to the same category. For two occultation points in the vertical direction, if the distance between the two occultation points does not exceed the first vertical offset distance and the distance is more than twice the unit distance, the two occultation points are connected and updated to the same category. The update principle is: determine the number of occultation points in the category to which the two occultation points belong, and update the category with the fewer occultation points to the category of the other occultation point. After numerous classifications, multiple candidate unit occultation images are determined in the occultation image, and all occultation points in the candidate unit occultation images belong to the same category. The boundaries of the multiple candidate unit coded images are determined based on the coordinates of the coded points in the multiple candidate unit coded images. This includes: for any given unit coded image, determining four boundaries of the unit coded image based on the coordinates of all coded points in the unit coded image; determining the height and width of the unit coded image based on the four boundaries; calculating the height of all unit coded images in the coded image, removing outliers, and then averaging the remaining heights to obtain the average height; calculating the width of all unit coded images in the coded image, removing outliers, and then averaging the remaining widths to obtain the average width; the average height and average width constitute the boundaries of the unit coded image. Based on the unit distance and the boundaries of the plurality of candidate unit coded images, the frequency of coded points appearing at each coded point position in the plurality of candidate unit coded images is determined. The frequency of coded points refers to the ratio of the number of times coded points appear at a coded point position to the number of candidate unit coded images. Based on the frequency of coded points appearing at each coded point position, the unit coded image is extracted from the coded images.
8. An image processing device, characterized in that, include: Processor, memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the image processing method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the image processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
A method for identifying types of color laser printed copied documents
CN109241821A
Color laser printing file secret mark recognition method and system
CN110991318A