Vector image steganography method, authentication method, device and equipment
By segmenting and searching the vector image, modifying the stroke coordinates to generate a steganalysis image, and using the skeleton line ratio for authentication, the problem of insufficient robustness of vector image anti-counterfeiting in existing technologies is solved, and a reliable authentication effect is achieved.
Patent Information
- Application Number
- CN202511431063.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-09
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-10-09
AI Technical Summary
In the field of paper label anti-counterfeiting, existing technologies such as vector image steganography are prone to losing features and lack robustness, failing to achieve reliable authentication while preserving design freedom.
By segmenting and extracting the vector image, a set of sub-graphic vector points is obtained. Stroke search and stroke coordinate modification are performed to generate a stegated vector image, which is then verified by the skeleton line ratio.
It enables covert modification of the graphic structure without disrupting the label design, thereby improving the robustness of anti-counterfeiting and the reliability of authentication.
Smart Images

Figure CN120935311B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data encryption, in particular to a vector image steganography method, a verification method, a device and equipment. BACKGROUND
[0002] Current paper label anti-counterfeiting mainly relies on physical means such as holographic patterns, special inks, or digital markers such as two-dimensional codes and digital watermarks. Among them, the steganography technology based on vector files realizes anti-counterfeiting by embedding invisible information in vector images, such as modifying metadata, fine-tuning path nodes, or adding redundant layers. Some schemes try to slightly deform the text or graphic structure (such as adjusting the stroke thickness), but most of them are concentrated in the field of raster image processing, and have limited adaptability to vector graphics.
[0003] The existing problems include: first, the traditional vector steganography relies on metadata or redundant paths, which is easy to lose in the printing-photographing process; second, the scheme of fine-tuning stroke thickness and the like fails to extract features due to image distortion and uneven illumination after the vector image is photographed by a mobile phone, and the robustness is insufficient; finally, the existing method does not design special detection logic for the stroke structure of text or graphics, and cannot realize reliable verification in the printing-photographing scene while preserving the freedom of vector design, lacking targeted algorithms. SUMMARY
[0004] The present application provides a vector image steganography method, a verification method, a device and equipment, which solves the problem of easy counterfeiting of paper labels.
[0005] To solve the above technical problems, the technical solutions of the present application are as follows:
[0006] The present application provides a vector image steganography method, which comprises:
[0007] Obtaining a vector image;
[0008] Segmenting and extracting the vector image to obtain a sub-graph vector point set;
[0009] Searching for strokes in the sub-graph vector point set to obtain a stroke point set;
[0010] Modifying the stroke coordinates of the stroke point set to obtain a steganographed vector image.
[0011] Optionally, the segmenting and extracting of the vector image to obtain a sub-graph vector point set comprises:
[0012] Segmenting the vector image to obtain a plurality of closed curve point sets;
[0013] Calculating the coordinate extreme values of the plurality of closed curve point sets in sequence to determine a plurality of circumscribed rectangles;
[0014] The plurality of circumscribed rectangles are intersected and merged to obtain a merged rectangle set;
[0015] According to the merged rectangle set, a sub-graph height is determined;
[0016] According to the sub-graph height, the merged rectangle set is merged to obtain a sub-graph vector point set.
[0017] Optionally, the sub-graph vector point set is stroke search processed to obtain a stroke point set, comprising:
[0018] The sub-graph vector point set is iterated according to a first preset condition to obtain a stroke starting point, the stroke starting point at least includes two points, the two points have the same horizontal coordinate or vertical coordinate and are connected by a straight line;
[0019] According to the stroke starting point, the sub-graph vector point set is recursively searched for horizontal strokes and vertical strokes to obtain a stroke point set, the stroke point set includes a horizontal stroke point set and a vertical stroke point set.
[0020] Optionally, the stroke point set is modified stroke coordinate processed to obtain a steganographic vector image, comprising:
[0021] According to the stroke point set, a stroke width is determined;
[0022] According to the stroke width, the stroke point set is translated to obtain a translated stroke point set;
[0023] According to the translated stroke point set, the sub-graph vector point set is updated to obtain a steganographic vector image.
[0024] The embodiment of the application further provides a vector image authentication method, comprising:
[0025] Obtaining a steganographic vector image;
[0026] The steganographic vector image is preprocessed to obtain a skeleton line image;
[0027] The skeleton line image is stroke searched and position calculated to obtain a skeleton line ratio;
[0028] The skeleton line ratio is compared with a preset threshold to obtain a label authentication result.
[0029] Optionally, the steganographic vector image is preprocessed to obtain a skeleton line image, comprising:
[0030] The steganographic vector image is character recognized to obtain a character frame set;
[0031] cutting the stego vector image according to the character frame set to obtain a sub-graph set;
[0032] graying the sub-graph set to obtain a grayed sub-graph set;
[0033] binarizing the grayed sub-graph set to obtain a binarized sub-graph set;
[0034] skeletonizing the binarized sub-graph set to obtain a skeleton line image, the skeleton line image comprising first type points and second type points.
[0035] Optionally, stroke searching and position calculation are performed on the skeleton line image to obtain a skeleton line ratio, comprising:
[0036] randomly selecting a first type point in the skeleton line image as a reference point;
[0037] starting from the reference point, performing search processing on the skeleton line image according to a second preset condition to obtain a first searched point set;
[0038] starting from the reference point, performing search processing on the skeleton line image according to a third preset condition to obtain a second searched point set;
[0039] merging and verifying the first searched point set and the second searched point set to obtain an effective stroke point set, the effective stroke point set comprising multiple horizontal coordinate data and vertical coordinate data;
[0040] counting the multiple horizontal coordinate data and vertical coordinate data in the effective stroke point set to obtain position data of a target stroke;
[0041] determining a skeleton line ratio according to the position data of the target stroke.
[0042] Embodiments of the present application also provide a vector image steganography device, comprising:
[0043] a first acquisition module configured to acquire a vector image;
[0044] a first processing module configured to perform segmentation and extraction processing on the vector image to obtain a sub-graph vector point set, and perform stroke searching processing on the sub-graph vector point set to obtain a stroke point set;
[0045] a first determination module configured to perform modified stroke coordinate processing on the stroke point set to obtain a stego vector image.
[0046] The embodiment of the present application further provides a vector image authentication device, comprising:
[0047] The second acquisition module is used for acquiring the steganographic vector image.
[0048] The second processing module is used for pre-processing the steganographic vector image to obtain a skeleton line image, performing stroke search and position calculation on the skeleton line image to obtain a skeleton line ratio.
[0049] The second determination module is used for comparing the skeleton line ratio with a preset threshold to obtain a label authentication result.
[0050] The embodiment of the present application further provides a computing device, comprising a processor and a memory storing a computer program, wherein the computer program is run by the processor to execute the above method.
[0051] The technical scheme of the present application at least has the following effects:
[0052] The above scheme of the present application acquires a vector image, performs segmentation and extraction processing on the vector image to obtain a sub-graph vector point set, performs stroke search processing on the sub-graph vector point set to obtain a stroke point set, and performs modification stroke coordinate processing on the stroke point set to obtain a steganographic vector image, thereby realizing concealed modification of a graph vector structure without damaging a label design. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 is a flowchart of a vector image steganographic method provided by the embodiment of the present application;
[0054] Figure 2 is a flowchart of a vector image authentication method provided by the embodiment of the present application;
[0055] Figure 3 is a vector structure diagram of a stroke horizontal provided by the embodiment of the present application;
[0056] Figure 4 is a vector structure diagram of a complete stroke provided by the embodiment of the present application;
[0057] Figure 5 is a change schematic diagram of a "Ben" word from an original structure to a steganographic structure provided by the embodiment of the present application;
[0058] Figure 6 is a change schematic diagram of a "Yu" word from an original structure to a steganographic structure provided by the embodiment of the present application;
[0059] Figure 7 is an un-steganographic image to be detected provided by the embodiment of the present application;
[0060] Figure 8is a stego image to be detected provided by an embodiment of the present application;
[0061] Figure 9 is a non-stego standard image provided by an embodiment of the present application;
[0062] Figure 10 is a vector stego standard image provided by an embodiment of the present application;
[0063] Figure 11 is a structural diagram of a vector image steganography device provided by an embodiment of the present application;
[0064] Figure 12 is a structural diagram of a vector image authentication device provided by an embodiment of the present application;
[0065] Figure 13 is a structural diagram of a computing device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0066] Exemplary embodiments of the present application will be described herein below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it is understood that the present application can be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
[0067] As shown in Figure 1 , an embodiment of the present application proposes a vector image steganography method, comprising:
[0068] Step 11, obtaining a vector image;
[0069] Step 12, performing segmentation and extraction processing on the vector image to obtain a sub-graph vector point set;
[0070] Step 13, performing stroke search processing on the sub-graph vector point set to obtain a stroke point set;
[0071] Step 14, performing modified stroke coordinate processing on the stroke point set to obtain a vector image after steganography.
[0072] In step 11 of this embodiment, first, read in the vector data of the text or graphics to be stegoed in the vector graphics file (such as AI format file used by Adobe illustrator software); in the AI file, all elements are saved in the form of vector graphics, and these vector data describe the shape and structure of the text or graphics.
[0073] In step 12, taking the processing of vector literal as an example, the read-in vector image is subjected to character segmentation to obtain each individual glyph data. The glyph data can be expressed as a vector curve on a two-dimensional coordinate, which is composed of a series of points, each point being expressed by a typedef struct_TPPoint structure and containing an abscissa , an ordinate and a point attribute m_Type. By identifying the m_Type flag of each point, a plurality of closed curves can be obtained. The minimum circumscribed rectangular frame of each closed curve is calculated, the rectangular frames having intersections are combined, and the average height of all frames is obtained to approximate the height of the literal. The adjacent rectangular frames having abnormal height or width (for example, the frame having a height greater than twice the width is combined as a "Chuan" frame, and the frame having a width greater than the height is combined as a "San" frame) are combined, and finally the text frame of each literal is obtained, and the inside is the vector data of the individual literal.
[0074] In step 13, complete strokes in horizontal or vertical directions are searched. In a glyph, a complete horizontal stroke or a complete vertical stroke is found. Taking the search of horizontal strokes as an example, two points having the same abscissa and being connected by a straight line are found as the initial points of the stroke; then two new points connected by a straight line with the known two points and having the same ordinate are found, different treatments are performed according to the different abscissa relationships, and the search is continued until the complete stroke is found. The search method of vertical strokes is similar to that of horizontal strokes, and the difference lies in the opposite relationship between the abscissa and the ordinate.
[0075] In step 14, after the horizontal or vertical strokes are searched, the coordinates of all points on the strokes are modified according to the type (horizontal or vertical) of the strokes. If the searched stroke is horizontal, the ordinate of all searched points is modified by half the width of the stroke (i.e. half the distance between the initial points of the stroke). If the searched stroke is vertical, the abscissa of all searched points is modified by half the width of the stroke. By modifying the coordinates of the strokes, the steganography of the literal is realized. For example, the horizontal direction of the "Ben" literal is moved downward by half the width of the stroke, and the vertical direction of the "You" literal is moved leftward by half the width of the stroke. The glyph data before and after the modification is converted into a dot matrix image data and stored in a database for subsequent use in the label authentication.
[0076] The technical scheme described in the embodiment realizes the steganography of the vector literal data, and ensures that the literal after the steganography has little difference from the original literal in vision, but has a slight difference in structure, so as to be used for anti-counterfeiting authentication.
[0077] In an optional embodiment of the present application, step 12 can include:
[0078] Step 121, the vector image is subjected to segmentation processing to obtain a plurality of closed curve point sets;
[0079] Step 122, calculate the coordinate extreme values of the multiple closed curve point sets in sequence, and determine multiple circumscribed rectangles;
[0080] Step 123, perform intersection and merging processing on the multiple circumscribed rectangles to obtain a merged rectangle set;
[0081] Step 124, determine the subgraph height according to the merged rectangle set;
[0082] Step 125, perform merging processing on the merged rectangle set according to the subgraph height to obtain a subgraph vector point set.
[0083] In step 121 of this embodiment, taking the processing of vector text as an example, first, the vector data of the bold text that needs to be stegoed in the AI file is read in. The vector data can be represented by a vector curve composed of a series of points, and each point is represented by typedef struct_TPPoint structure, including the horizontal coordinate , the vertical coordinate and the attribute m_Type of the point. By identifying the m_Type flag of each point, multiple closed curves in the vector graph can be identified, and each closed curve represents a part of the text or a part of the structure of the entire text, thereby obtaining multiple closed curve point sets.
[0084] In step 122, for each closed curve point set, the minimum and maximum values of its horizontal coordinate and vertical coordinate are calculated, and these extreme points define the minimum circumscribed rectangle of the closed curve. This circumscribed rectangle frames the range of the closed curve in the two-dimensional plane.
[0085] In step 123, it is checked whether there is an intersection between all the circumscribed rectangles. If two or more circumscribed rectangles intersect, they are merged into a larger rectangle, and this merged rectangle can cover all the original rectangles. Through this step, a merged rectangle set can be obtained, and each rectangle in the set represents a relatively independent part of the text or the range of the entire text.
[0086] In step 124, the average height of all rectangles in the merged rectangle set is calculated. This average height can be used as an approximate value of the text height for subsequent rectangle merging and text segmentation processing.
[0087] In step 125, further merging processing is performed on the merged set of rectangles according to the text height. For example, rectangles that are adjacent and have a height greater than twice the width are merged (such as when processing the character "川"), or rectangles that are adjacent and have a width greater than the height are merged (such as when processing the character "三"). By merging adjacent rectangles, the complete range of each character, that is, the text box of each character, is finally obtained. The vector data of a single character, that is, the set of sub-graphic vector points, is contained inside this text box.
[0088] In an optional embodiment of the present invention, step 13 may include:
[0089] Step 131, traversing the set of sub-graphic vector points according to a first preset condition to obtain stroke starting points, where the stroke starting points include at least two points, the abscissas or ordinates of the two points are the same, and they are connected by a straight line;
[0090] Step 132, performing recursive search processing on the set of sub-graphic vector points according to the stroke starting points to obtain a set of stroke points, where the set of stroke points includes a set of horizontal stroke points and a set of vertical stroke points.
[0091] In step 131 of this embodiment, each point in the set of sub-graphic vector points is first traversed. During the traversal, pairs of points that meet the first preset condition are found as the starting points of the strokes. The first preset condition is that the abscissas or ordinates of two points are the same, and the two points are connected by a straight line. For example, when searching for a horizontal stroke, two points with the same abscissa and connected by a straight line are found, and these two points can be used as the initial points of the horizontal stroke.
[0092] In step 132, when performing recursive search for a horizontal stroke, first use the horizontal stroke starting point obtained in step 131 as the initial point; starting from the initial point, recursively find subsequent points that are connected to the current point by a straight line and have the same ordinate. The specific process is as follows: Assume the current point is a, and find a point b that is connected to a by a straight line and has the same ordinate as a. If point b is found, then continue to start from point b and find the next point that is connected to b by a straight line and has the same ordinate until no point that meets the condition can be found. During the search process, all points that meet the condition are recorded to form a set of horizontal stroke points.
[0093] When performing recursive search for a vertical stroke, the determination method of the initial point of the vertical stroke is similar to that of the horizontal stroke, but two points with the same ordinate and connected by a straight line are searched for. Starting from the initial point, recursively find subsequent points that are connected to the current point by a straight line and have the same abscissa. The specific process is similar to the recursive search for a horizontal stroke, but the judgment of the coordinate relationship is reversed. During the search process, all points that meet the condition are recorded to form a set of vertical stroke points.
[0094] After the recursive search processing of the horizontal stroke and the vertical stroke, the horizontal stroke point set and the vertical stroke point set jointly constitute the stroke point set of the single character.
[0095] In an optional embodiment of the present application, step 14 can include:
[0096] Step 141, determining the stroke width according to the stroke point set;
[0097] Step 142, performing translation processing on the stroke point set according to the stroke width, to obtain a translated stroke point set;
[0098] Step 143, performing update processing on the sub-graph vector point set according to the translated stroke point set, to obtain a stego vector image.
[0099] In step 141 of this embodiment, first, the starting points of the strokes in the stroke point set need to be found; the starting points are usually the two end points of the strokes, for example, the starting points of the horizontal stroke can be two points (points a and b) with the same horizontal coordinate and connected by a straight line. The width of the stroke is determined by calculating the Euclidean distance between the two starting points. Specifically, if the starting points are a and b, the stroke width w is: ; but in the actual horizontal (or vertical) stroke translation scenario, since the horizontal (or vertical) stroke starting points have the same vertical (or horizontal) coordinate, the distance can be simplified as (horizontal stroke) or (vertical stroke).
[0100] In step 142, if the current stroke is a horizontal stroke, the vertical coordinates of all points constituting the stroke are modified by half the stroke width (i.e. ), to realize the vertical translation of the stroke. For example, if the stroke is translated upwards, the vertical coordinates of all points are reduced by half the stroke width, and the expression is:
[0101] ;
[0102] wherein is the modified vertical coordinate; is the original vertical coordinate;
[0103] If the current stroke is a vertical stroke, the horizontal coordinates of all points constituting the stroke are modified by half the stroke width (i.e. ), to realize the horizontal translation of the stroke. For example, if the stroke is translated leftwards, the horizontal coordinates of all points are reduced by half the stroke width, and the expression is:
[0104] ;
[0105] wherein, is the modified horizontal coordinate; is the original horizontal coordinate;
[0106] After the translation processing, a new stroke point set is obtained, in which the coordinates of each point have been adjusted according to the translation direction and distance.
[0107] In step 143, the stroke point set after translation replaces the corresponding stroke part in the original sub-graph vector point set, and an updated sub-graph vector point set is obtained. The updated sub-graph vector point set represents the text glyph after steganography, which contains the stroke after translation and has a slight difference in structure from the original glyph.
[0108] The glyph before and after steganography is converted into dot matrix image data and stored in the database for subsequent use in label authentication. In the authentication process, by comparing the text image obtained by photographing the paper label with the standard image before and after steganography stored in the database, it can be identified whether the text or image in the label has been steganographically processed.
[0109] As shown in Figure 2 , an embodiment of the present application proposes a vector image authentication method, comprising:
[0110] Step 21, obtaining a vector image after steganography;
[0111] Step 22, preprocessing the vector image after steganography to obtain a skeleton line image;
[0112] Step 23, performing stroke search and position calculation on the skeleton line image to obtain a skeleton line ratio;
[0113] Step 24, comparing the skeleton line ratio with a preset threshold to obtain a label authentication result.
[0114] In step 21 of this embodiment, taking processing of text vector data as an example, first, a paper label that needs to be authenticated is photographed by a photographing device (such as a mobile phone camera) to obtain image data containing steganographic text or images. The image data obtained by photographing is transmitted to a processing terminal (such as a computer or a mobile device) as input for subsequent authentication processing.
[0115] In step 22, using optical character recognition (OCR) technology, the text area is identified from the photographed image, and the text area is cut out from the original image. The cut-out text image is subjected to thinning processing, i.e. removing the width information of the text stroke and only retaining the center line of the stroke, to obtain a line width of 1 font skeleton line structure image. The purpose of this step is to simplify the image structure to facilitate subsequent stroke search and position calculation.
[0116] In step 23, in the skeleton line image, according to the stroke features (such as the translation of horizontal strokes or vertical strokes) modified during steganography, search for strokes that may have undergone steganography. The specific search method can determine the direction and position of the strokes by identifying the starting point, ending point and control point of the strokes. For the searched strokes, calculate their positional relationship with adjacent strokes or other reference points, such as horizontal distance, vertical distance, etc. In particular, for strokes that have undergone translation during steganography, the positional change before and after translation needs to be calculated. According to the calculated positional relationship, determine the skeleton line ratio. For example, the ratio of the horizontal position of the modified stroke to the horizontal position of the adjacent stroke or reference point can be calculated, or the ratio of the translation amount to the original stroke width, etc. This ratio will be used as the basis for subsequent authenticity judgment.
[0117] In step 24, according to the actual application scenario and requirements, set one or more preset thresholds. These thresholds are determined based on the glyphs before and after steganography, and are used to distinguish steganographic text and non-steganographic text. Compare the skeleton line ratio calculated in step 23 with the preset threshold. If the skeleton line ratio falls within the range of the preset threshold, it is considered that the text to be detected may be steganographic text; otherwise, it is considered that the text to be detected is non-steganographic text.
[0118] According to the result of the ratio comparison, output the label authenticity result. If steganographic text is detected, output "authenticity fails" or similar prompt; if no steganographic text is detected, output "authenticity passes" or similar prompt. At the same time, the authenticity result can be recorded in the log for subsequent analysis and tracing.
[0119] The technical solution described in this embodiment effectively solves the problem of traditional anti-counterfeiting technology relying on naked eye observation or complex calculation by structuring processing and quantitative analysis, and converts the small structural differences of steganographic text into detectable numerical features.
[0120] In an optional embodiment of the present application, step 22 can include:
[0121] Step 221, performing character recognition processing on the steganographic vector image to obtain a character frame set;
[0122] Step 222, performing cutting processing on the steganographic vector image according to the character frame set to obtain a sub-graph set;
[0123] Step 223, performing grayscale processing on the sub-graph set to obtain a grayscale-processed sub-graph set;
[0124] Step 224, performing binaryzation processing on the grayscale-processed sub-graph set to obtain a binaryzation-processed sub-graph set;
[0125] Step 225, skeletonize the sub-graph set after the binarization processing to obtain a skeleton line image, the skeleton line image includes a first type point and a second type point.
[0126] In step 221 of this embodiment, using the OCR (Optical Character Recognition) technology, the vector text image after steganography is recognized as a whole, and the text features (such as stroke density and connected region) in the image are analyzed to generate a character box set containing the position and range of each text (each box corresponds to an independent text), which is used for subsequent cutting.
[0127] In step 222, the original image is cut according to the character box set to separate each individual text image. Specifically, each character box is traversed, and the region in the box is extracted as a single-character image, that is, a single-character image set, wherein each image contains only one text. If the character boxes overlap or have errors, morphological operations (such as dilation and erosion) can be used to optimize the boundary.
[0128] In step 223, the single-character image in color or RGB format is converted into a grayscale image to reduce color interference. Specifically, the weighted average method (such as Gray = 0.299R + 0.587G + 0.114B) is used to calculate the grayscale value of each pixel to generate a grayscale single-character image set, and each image is an 8-bit grayscale image.
[0129] In step 224, the grayscale image is converted into a black-and-white binary image to highlight the contrast between the text strokes and the background. Specifically, the global threshold method (such as the Otsu algorithm) is used to automatically calculate the best threshold value to divide the pixels into foreground (text, value 255) and background (value 0). If the light is uneven, a block threshold processing can be used. Finally, a binary single-character image set is output, each image containing only two pixel values, 0 and 255.
[0130] In step 225, the binary image is subjected to thinning processing to extract the center line (skeleton line) of the text strokes, retaining the structural features while removing the width information. Specifically, starting from the edge of the image, the outer layer of pixels is peeled off layer by layer until the center line of the connected region is retained. Finally, the skeleton line image of each single-character image is output, including the first type point and the second type point, which is used for subsequent stroke search and position calculation; wherein the first type point is a black point (value 255), and the second type point is a white point (value 0).
[0131] In an optional embodiment of the present application, step 23 can include:
[0132] Step 231, randomly selecting a first type point in the skeleton line image as a reference point;
[0133] Step 232, search the skeleton line image according to the second preset condition starting from the reference point to obtain a first searched point set;
[0134] Step 233, search the skeleton line image according to the third preset condition starting from the reference point to obtain a second searched point set;
[0135] Step 234, merge and verify the first searched point set and the second searched point set to obtain an effective stroke point set, the effective stroke point set including a plurality of horizontal coordinate data and vertical coordinate data;
[0136] Step 235, count the plurality of horizontal coordinate data and vertical coordinate data in the effective stroke point set to obtain position data of a target stroke;
[0137] Step 236, determine a skeleton line ratio according to the position data of the target stroke.
[0138] In step 231 of the embodiment, a first type point (black point, value 255) is randomly selected from the skeleton line image as a starting point of search. All pixel points of the skeleton line image are traversed to identify an endpoint (first type point) as a reference point, and the coordinates of the reference point are output.
[0139] In step 232, starting from the reference point, continuous pixel points on the skeleton line are searched in the vertical direction downward (i.e., the second preset condition) to form a first searched point set. Specifically, starting from the reference point, adjacent points in the direction directly below (y coordinate decreases) are checked pixel by pixel to see whether they belong to the skeleton line. If an adjacent point is found, it is added to the first searched point set, and the search continues downward until the skeleton line terminates (such as encountering a branch point or an endpoint).
[0140] In step 233, starting from the same reference point, continuous pixel points on the skeleton line are searched in the vertical direction upward (i.e., the third preset condition) to form a second searched point set. Specifically, starting from the reference point, adjacent points in the direction directly above (y coordinate increases) are checked pixel by pixel to see whether they belong to the skeleton line. If an adjacent point is found, it is added to the second searched point set, and the search continues upward until the skeleton line terminates.
[0141] In step 234, the first searched point set and the second searched point set are merged, and it is verified whether the merged point set constitutes a complete stroke. Specifically, the verification of completeness includes checking whether the merged point set is continuous (without a breakpoint); if not, abnormal points are removed or the reference point is reselected.
[0142] In step 235, the horizontal coordinates and the vertical coordinates in the effective stroke point set are statistically analyzed to determine the position characteristics of the target stroke.
[0143] Specifically, the average of the horizontal coordinates of all points and the range of the vertical coordinates of all points are calculated; for horizontal strokes, their horizontal positions (e.g. the horizontal coordinate of the center of the horizontal stroke) are recorded; for vertical strokes, their vertical positions (e.g. the horizontal coordinate of the center of the vertical stroke) are recorded. Finally, the position data of the target strokes (e.g. the horizontal positions of the vertical strokes) are output.
[0144] In step 236, according to the position data of the target strokes, the skeleton line ratio is calculated and compared with a preset threshold to determine whether the text is steganography. If the ratio is close to the preset value (e.g. 0.5), it is determined that the text is not steganography. If the ratio deviates significantly from the preset value (e.g. 0.465), it is determined that the text is steganography. Finally, the skeleton line ratio (e.g. R = 0.475) and the authenticity result (true / false) are output.
[0145] One specific embodiment of the vector image steganography method and authenticity method provided by the embodiment of the present application is:
[0146] Step 1, read the vector text data of the text to be authenticated in the ai file, and then perform segmentation on the characters to obtain the data of each individual glyph.
[0147] A vector curve is composed of a series of points, and in the ai file, a point is represented by the following information:
[0148] typedef struct_TPPoint {
[0149] double fx;
[0150] double fy;
[0151] CPLTYPE m_Type;
[0152] }TPPoint, *pTPPoint;
[0153] Wherein, fx and fy represent the horizontal coordinate and vertical coordinate of a point respectively, and m_Type is an enum structure representing the attribute of the point:
[0154] PL_MOVETO: indicates that the point is the starting point of a curve;
[0155] PL_LINETO: indicates that the point is connected with the previous point by a straight line;
[0156] PL_BEZIERTO: indicates that the point is a control point on a Bezier curve
[0157] PL_CLOSEFIGURE: indicates that the point is the end point of a closed curve.
[0158] Several closed curves can be obtained by identifying the m_Type flag at each point. The process of finding the minimum bounding rectangle of each closed curve can be expressed as follows:
[0159] (1) Let the point set of a single closed curve be... for: ;
[0160] in, Let i be the x-coordinate of point i. Let be the ordinate of point i;
[0161] (2) Find the extreme values of the coordinates of all points: , , , ,
[0162] in, The minimum x-coordinate of all points. The maximum x-coordinate of all points. The minimum value of the ordinate of all points. The maximum value of the y-coordinate of all points is given by the function min(), which returns the minimum value, and the function max() returns the maximum value.
[0163] (3) Generate a rectangle: ;
[0164] in, The bounding rectangle for each curve;
[0165] The text height is approximated by finding the union of the overlapping rectangles and then using the average height of all the rectangles. This process can be represented as follows:
[0166] (1) If two rectangles and If there is an intersection in the XY plane (i.e., overlap in the x or y direction), then merge them into a new rectangle. Iterate until no rectangles can be merged.
[0167] ;
[0168] in, The new rectangle after merging; Let x be the minimum x-coordinate of rectangle a; Let x be the minimum x-coordinate of rectangle b; Let x be the maximum x-coordinate of rectangle a; Let x be the maximum x-coordinate of rectangle b; Let be the minimum value of the ordinate of rectangle a; Let be the minimum value of the ordinate of rectangle b; Let be the maximum value of the ordinate of rectangle a; is the maximum value of the vertical coordinate of rectangle b;
[0169] (2)Find the arithmetic mean of the heights of all rectangles and calculate the text height:
[0170] ;
[0171] where H is the approximate value of the text height, N is the number of rectangles after merging, is the maximum value of the vertical coordinate of the k-th rectangle, is the minimum value of the vertical coordinate of the k-th rectangle;
[0172] Finally, adjust the rectangle frames of some texts: Merge adjacent frames with a height greater than twice the width, such as "川"; at the same time, merge adjacent frames with a width greater than the height, such as "三". Finally, obtain the text frames for each character, and the internal part is the vector data of a single character.
[0173] Step 2: Perform segmentation and extraction processing on the vector text data to obtain a single-character vector point set; perform stroke search processing on the single-character vector point set to obtain a stroke point set; <>
[0174] In a glyph, find a complete horizontal or complete vertical stroke and translate the stroke to achieve the purpose of steganography. When searching for a horizontal stroke, as Figure 3 shown, first find two points with the same abscissa and connected by a straight line as the starting points of the stroke, such as points a and b;
[0175] Find two new points p_1 and p_2 that are connected by a straight line to the two known points and have the same ordinate respectively. Assume that the ordinate of p_1 is the same as that of a, and the ordinate of p_2 is the same as that of b. Different treatments are performed according to the different abscissa relationships between p_1 and p_2:
[0176] If the abscissa of p_2 is greater than that of p_1, that is, points c and f in Figure 3 , then find the point d that is closest to p_1 and has the same ordinate, and then continue to search for the point p_3 that is connected by a straight line to d and has the same ordinate. If p_3 is the same as point f, then the target point is found, such as point e in Figure 3 , otherwise continue the above operation until the target point e is found;
[0177] If the abscissa of p_1 is equal to that of p_2, but p_1 and p_2 are not connected by a straight line, that is, points e and f in Figure 3 , then find the point g that is closest to e and has the same abscissa respectively, and the point h that is closest to f and has the same abscissa. If two points that meet the conditions cannot be found, it means that a complete stroke has been found, such as Figure 4As shown; otherwise, take points g and h as the starting points and continue the above search until two points with the same abscissa and connected by a straight line are found, such as Figure 3 points i and j in
[0178] The search method for the vertical stroke is similar to that for the horizontal stroke, except that the relationship between the abscissa and ordinate is reversed.
[0179] Step 3, modify the searched stroke.
[0180] When the horizontal (or vertical) stroke is searched, the width of the stroke is the distance between the starting points of the stroke (i.e., points a and b). If the searched stroke is horizontal, modify the ordinate of all the searched points by half of the width of the stroke, i.e.:
[0181] ;
[0182] where the point set is all the points on the searched stroke; is the width of the stroke; indicates that the stroke can be offset either upward or downward;
[0183] Similarly, if the searched stroke is vertical, modify the abscissa of all the searched points by half of the width of the stroke to achieve the steganography of the text, i.e.;
[0184] ;
[0185] where indicates that the stroke can be offset either to the left or to the right.
[0186] Figure 5 The left side is the original structure of the character "本", Figure 5 and the right side is the structure of the character "本" after steganography; Figure 6 The left side is the original structure of the character "由", Figure 6 and the right side is the structure of the character "由" after steganography.
[0187] Through Figures 3 to 6 it can be seen that compared with the original glyph, the horizontal stroke of the character "本" has moved downward by half of the width of the stroke, and the vertical stroke of the character "由" has moved to the left by half of the width of the stroke. Convert the glyphs before and after modification into dot matrix image data and store them in the database for use during label authentication.
[0188] Step 4, obtain the steganographed electronic image data and the image data after converting the standard vector text stored in the database into dot matrix, and perform preprocessing;
[0189] Specifically, the paper label to be identified is photographed to obtain an electronic image, and the text in the image is recognized by OCR and cut out from the original image. The character image to be detected and the vector text before and after steganography stored in the database are converted into standard dot matrix images, and then fine line processing is performed to obtain a line width of 1 font skeleton line structure graph. The strokes modified during steganography are searched in the skeleton line structure graph, and then the position relationship between the searched strokes and the remaining strokes is determined to determine whether the character to be detected is a steganographic character.
[0190] Step 5: Stroke search is performed on the preprocessed image to determine the relative position of the modified stroke in the character;
[0191] The detailed detection process is described below by taking the character "by" as an example. Since the "by" character modifies the middle vertical, first search for the stroke vertical in the symmetry axis region of the character image, and let Q be the set of all point sets on the searched stroke, and the initial value is empty; k_1 is the number of successful direct searches in the vertical direction, and k_2 is the number of successful direct searches in the vertical direction, and the initial values are both 0. The search steps are as follows:
[0192] S1: First find a black point as a reference point, and the coordinates of the point are ;
[0193] S2: Search downward from the current point as a reference point. Let the reference point that has been searched be :
[0194] If is a black point, then is taken as the reference point for the next search and stored in the set Q, and is incremented by 1;
[0195] If is not a black point, if the following conditions are met: , is a black point, then is taken as the reference point for the next search and stored in the set Q, and is incremented by 1;
[0196] If neither of the above steps can find a black point, the search is exited;
[0197] S3: Search upward from as a reference, and the search method is similar to step S2 above.
[0198] After the search is completed, if is met, it means that the stroke horizontal is successfully found, and the horizontal coordinate with the highest frequency in the set Q is taken as the horizontal position of the searched vertical ; otherwise, the stroke search fails.
[0199] The stroke horizontal search mode is similar to the vertical, except that the search mode of the horizontal and vertical coordinates is opposite.
[0200] In step 6, the skeleton line ratio is calculated according to the stroke position of the skeleton line image; the skeleton line ratio is compared with a preset threshold value to obtain a label authentication result;
[0201] Specifically, for “by”, the horizontal position of the middle vertical is , the horizontal position of the left vertical is (if there is no vertical on the left side of the modified stroke, the left boundary of the character image bounding box can be set as ), the horizontal position of the right vertical is (if there is no vertical on the right side of the modified stroke, the right boundary of the character image bounding box can be set as ), and for each character image, the ratio R is calculated:
[0202]
[0203] Wherein, R is the ratio, is the horizontal position of the middle vertical, is the horizontal position of the left vertical, is the horizontal position of the right vertical.
[0204] Through the above method, the ratios of the four images in Figures 7 to 10 are 0.5, 0.465, 0.51, and 0.475 respectively. It is judged that Figure 7 is similar to Figure 9 structure, Figure 8 is similar to Figure 10 structure. The same detection is performed for each word in the label, and the mode is taken to determine the final authenticity of the label.
[0205] The vector image steganography method and authentication method provided by the application realize the following technical effects by modifying the horizontal / vertical stroke coordinates of the characters or graphics in the vector file and comparing the position ratio of the skeleton line with the standard graphic database:
[0206] (1) Concealment of anti-counterfeiting: the human eye cannot detect the slight movement of strokes (such as the downward movement of the horizontal stroke of the “Ben” character and the leftward movement of the vertical stroke of the “Yu” character), and the visual consistency of the label is maintained;
[0207] (2) Accurate authentication: by taking a picture of the label with a mobile phone, extracting the skeleton line, calculating the relative position ratio of the strokes, and comparing with the steganography / standard character database without steganography, the authenticity can be automatically identified;
[0208] (3) Strong anti-interference: based on the relative position relationship (non-absolute coordinates) and the mode decision mechanism, effectively reducing the influence of shooting deformation and light noise;
[0209] (4) Design compatibility: directly embedding information in the vector file without damaging the original layout and aesthetics of the label.
[0210] As Figure 11 shown, the embodiment of the application also provides a vector image steganography device 110, comprising:
[0211] The first acquisition module 111 is configured to acquire a vector image.
[0212] The first processing module 112 is configured to perform segmentation and extraction processing on the vector image to obtain a sub-graph vector point set, and perform stroke search processing on the sub-graph vector point set to obtain a stroke point set.
[0213] The first determination module 113 is configured to perform modified stroke coordinate processing on the stroke point set to obtain a steganography vector image.
[0214] Optionally, the first processing module 112 is specifically configured to:
[0215] perform segmentation processing on the vector image to obtain a plurality of closed curve point sets;
[0216] calculate coordinate extreme values of the plurality of closed curve point sets in sequence to determine a plurality of circumscribed rectangles;
[0217] perform intersection and merging processing on the plurality of circumscribed rectangles to obtain a merged rectangle set;
[0218] determine a sub-graph height according to the merged rectangle set;
[0219] perform merging processing on the merged rectangle set according to the sub-graph height to obtain a sub-graph vector point set.
[0220] Optionally, the first processing module 112 is specifically configured to:
[0221] perform traversal processing on the sub-graph vector point set according to a first preset condition to obtain a stroke starting point, the stroke starting point comprising at least two points, the two points having the same horizontal coordinate or vertical coordinate and being connected by a straight line;
[0222] perform recursive search processing on the sub-graph vector point set according to the stroke starting point to obtain a stroke point set, the stroke point set comprising a horizontal stroke point set and a vertical stroke point set.
[0223] Optionally, the first determination module 113 is specifically configured to:
[0224] determine a stroke width according to the stroke point set;
[0225] perform a translation process on the stroke point set according to the stroke width to obtain a translated stroke point set;
[0226] perform an update process on the sub-graph vector point set according to the translated stroke point set to obtain a stego vector image.
[0227] It should be noted that the device corresponds to the above method, and all implementation manners in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0228] As shown in Figure 12 The present embodiment further provides a vector image authentication device 120, which comprises:
[0229] A second acquisition module 121 is configured to acquire a stego vector image.
[0230] A second processing module 122 is configured to perform a preprocessing process on the stego vector image to obtain a skeleton line image, perform stroke search and position calculation on the skeleton line image to obtain a skeleton line ratio, and perform a character recognition process on the stego vector image to obtain a character box set.
[0231] A second determination module 123 is configured to compare the skeleton line ratio with a preset threshold to obtain a label authentication result.
[0232] Optionally, the second processing module 122 is specifically configured to:
[0233] perform a character recognition process on the stego vector image to obtain a character box set;
[0234] perform a cutting process on the stego vector image according to the character box set to obtain a sub-graph set;
[0235] perform a grayscale process on the sub-graph set to obtain a grayscale-processed sub-graph set;
[0236] perform a binarization process on the grayscale-processed sub-graph set to obtain a binarization-processed sub-graph set;
[0237] perform a skeletonization process on the binarization-processed sub-graph set to obtain a skeleton line image, wherein the skeleton line image comprises a first type point and a second type point.
[0238] Optionally, the second processing module 122 is further specifically configured to:
[0239] randomly select a first type point in the skeleton line image as a reference point;
[0240] Taking the reference point as a starting point, the skeleton line image is searched according to a second preset condition to obtain a first searched point set;
[0241] Taking the reference point as a starting point, the skeleton line image is searched according to a third preset condition to obtain a second searched point set;
[0242] The first searched point set and the second searched point set are merged and verified to obtain an effective stroke point set, the effective stroke point set including a plurality of abscissa data and ordinate data;
[0243] The plurality of abscissa data and ordinate data in the effective stroke point set are counted to obtain position data of a target stroke;
[0244] A skeleton line ratio is determined according to the position data of the target stroke.
[0245] It should be noted that the device corresponds to the above method, and all implementation manners in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0246] As shown in Figure 13 The embodiment of the present application also provides a computing device 130, which includes a processor 131, a memory 132, a program or instruction stored in the memory 132 and executable on the processor 131. The program or instruction is executed by the processor 131 to implement various processes of the above method embodiments and can achieve the same technical effects. To avoid repetition, details are not described here. It should be noted that the computing device in the embodiment of the present application includes the above mobile electronic device and non-mobile electronic device.
[0247] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0248] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0249] In the embodiments of the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the embodiments of the apparatus described above are merely schematic; for example, the division of the units is only a logical function division; there can be another division manner in actual implementation; for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, or the among different units, can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electric, mechanical or other forms.
[0250] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units; that is, they can be located in one place, or can be distributed on a plurality of network units. In actual implementation, some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments of the present application.
[0251] In addition, each functional unit in the various embodiments of the present application can be integrated in one processing unit, or each unit can exist physically as a separate unit, or two or more units can be integrated in one unit.
[0252] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such an understanding, the technical solutions of the present application essentially or partly, or part of the technical solutions, can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods in the various embodiments of the present application. The foregoing storage medium includes: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, and various other media that can store program codes.
[0253] Moreover, it is pointed out that in the device and method of the present application, obviously, the components or steps can be decomposed and / or recombined. These decompositions and / or recombination should be considered as equivalent solutions of the present application. Also, the steps of performing the above series of processes can naturally be executed in time sequence according to the order of description, but do not need to be necessarily executed in time sequence. Some steps can be executed in parallel or independently of each other. It can be understood by those skilled in the art that all or any steps or components of the method and device of the present application can be realized in hardware, firmware, software or a combination thereof in any computing device (including processors, storage media, etc.) or network of computing devices, using the basic programming skills of those skilled in the art upon reading the description of the present application.
[0254] Therefore, the object of the present application can also be realized by running a program or a set of programs on any computing device. The computing device can be a commonly known general-purpose device. Therefore, the object of the present application can also be realized only by providing a program product containing program code for realizing the method or device. That is, such a program product also constitutes the present application, and a storage medium storing such a program product also constitutes the present application. Obviously, the storage medium can be any commonly known storage medium or any storage medium developed in the future. It is also pointed out that in the device and method of the present application, obviously, the components or steps can be decomposed and / or recombined. These decompositions and / or recombination should be considered as equivalent solutions of the present application. Also, the steps of performing the above series of processes can naturally be executed in time sequence according to the order of description, but do not need to be necessarily executed in time sequence. Some steps can be executed in parallel or independently of each other.
[0255] The above is the preferred embodiment of the present application. It should be pointed out that for those skilled in the art, several improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should also be considered as the protection scope of the present application.
Claims
1. A method for steganography of a vector image, characterized in that, The method comprises the following steps: obtaining a vector image; performing segmentation and extraction processing on the vector image to obtain a sub-graph vector point set; performing stroke search processing on the sub-graph vector point set to obtain a stroke point set; performing modified stroke coordinate processing on the stroke point set to obtain a steganographic vector image; wherein the stroke search processing on the sub-graph vector point set to obtain the stroke point set comprises: performing traversal processing on the sub-graph vector point set according to a first preset condition to obtain a stroke starting point, the stroke starting point comprising at least two points, the two points having the same horizontal coordinate or vertical coordinate and being connected by a straight line; performing recursive search processing on the sub-graph vector point set according to the stroke starting point to obtain horizontal stroke points and vertical stroke points, the stroke point set comprising the horizontal stroke points and the vertical stroke points; wherein the modified stroke coordinate processing on the stroke point set to obtain the steganographic vector image comprises: determining a stroke width according to the stroke point set; performing translation processing on the stroke point set according to the stroke width to obtain a translated stroke point set; performing update processing on the sub-graph vector point set according to the translated stroke point set to obtain the steganographic vector image.
2. The vector image steganography method of claim 1, wherein, The segmentation and extraction processing on the vector image to obtain the sub-graph vector point set comprises: performing segmentation processing on the vector image to obtain a plurality of closed curve point sets; sequentially calculating coordinate extreme values of the plurality of closed curve point sets to determine a plurality of circumscribed rectangles; performing intersection and merging processing on the plurality of circumscribed rectangles to obtain a merged rectangle set; determining a sub-graph height according to the merged rectangle set; performing merging processing on the merged rectangle set according to the sub-graph height to obtain the sub-graph vector point set.
3. A method of authenticating a vector image, characterized by, The method comprises the following steps: obtaining a steganographic vector image; performing preprocessing on the steganographic vector image to obtain a skeleton line image; performing stroke search and position calculation on the skeleton line image to obtain a skeleton line ratio; comparing the skeleton line ratio with a preset threshold to obtain a label authentication result; wherein the steganographic vector image is obtained through the following process: obtaining a vector image; performing segmentation and extraction processing on the vector image to obtain a sub-graph vector point set; performing traversal processing on the sub-graph vector point set according to a first preset condition to obtain a stroke starting point, the stroke starting point comprising at least two points, the two points having the same horizontal coordinate or vertical coordinate and being connected by a straight line; performing recursive search processing on the sub-graph vector point set according to the stroke starting point to obtain horizontal stroke points and vertical stroke points, the stroke point set comprising the horizontal stroke points and the vertical stroke points; determining a stroke width according to the stroke point set; performing translation processing on the stroke point set according to the stroke width to obtain a translated stroke point set; performing update processing on the sub-graph vector point set according to the translated stroke point set to obtain the steganographic vector image.
4. The vector image authentication method according to claim 3, characterized by, The preprocessing on the steganographic vector image to obtain the skeleton line image comprises: performing character recognition processing on the steganographic vector image to obtain a character box set; According to the character frame set, the steganographic vector image is cropped to obtain a subgraph set; The subgraph set is subjected to grayscale processing to obtain a grayscale-processed subgraph set; The grayscale-processed subgraph set is subjected to binarization processing to obtain a binarization-processed subgraph set; The binarization-processed subgraph set is subjected to skeletonization processing to obtain a skeleton line image, and the skeleton line image includes first type points and second type points.
5. The method of claim 4, wherein, Stroke searching and position calculation are performed on the skeleton line image to obtain a skeleton line ratio, including: A first type point in the skeleton line image is randomly selected as a reference point; The skeleton line image is searched according to a second preset condition with the reference point as a starting point to obtain a first searched point set; The skeleton line image is searched according to a third preset condition with the reference point as a starting point to obtain a second searched point set; The first searched point set and the second searched point set are subjected to merging and verification processing to obtain an effective stroke point set, and the effective stroke point set includes multiple horizontal coordinate data and vertical coordinate data; The multiple horizontal coordinate data and vertical coordinate data in the effective stroke point set are counted to obtain position data of a target stroke; The position data of the target stroke is used to determine a skeleton line ratio.
6. A vector image steganography apparatus, characterized by comprising: including: A first acquisition module is configured to acquire a vector image; A first processing module is configured to perform segmentation and extraction processing on the vector image to obtain a subgraph vector point set; Stroke searching processing is performed on the subgraph vector point set to obtain a stroke point set; A first determination module is configured to perform modified stroke coordinate processing on the stroke point set to obtain a steganographic vector image; The stroke searching processing on the subgraph vector point set to obtain the stroke point set includes: The subgraph vector point set is subjected to traversal processing according to a first preset condition to obtain a stroke starting point, and the stroke starting point includes at least two points with the same horizontal coordinate or vertical coordinate and connected by a straight line; The subgraph vector point set is subjected to recursive searching processing of horizontal strokes and vertical strokes according to the stroke starting point to obtain a stroke point set, and the stroke point set includes a horizontal stroke point set and a vertical stroke point set; The modified stroke coordinate processing on the stroke point set to obtain the steganographic vector image includes: The stroke width is determined according to the stroke point set; The stroke point set is subjected to translation processing according to the stroke width to obtain a translated stroke point set; The subgraph vector point set is updated according to the translated stroke point set to obtain the steganographic vector image.
7. A vector image authentication apparatus characterized by comprising: including: A second acquisition module is configured to acquire a steganographic vector image; A second processing module is configured to perform preprocessing on the steganographic vector image to obtain a skeleton line image; Stroke searching and position calculation are performed on the skeleton line image to obtain a skeleton line ratio; A second determination module is configured to compare the skeleton line ratio with a preset threshold to obtain a label authentication result; A vector image is acquired; Segmenting and extracting the vector image to obtain a sub-graph vector point set; performing traversal processing on the sub-graph vector point set according to a first preset condition to obtain a stroke starting point, the stroke starting point including at least two points, the two points having the same horizontal coordinate or vertical coordinate and being connected by a straight line; Performing recursive search processing on the sub-graph vector point set according to the stroke starting point to obtain a stroke point set, the stroke point set including a horizontal stroke point set and a vertical stroke point set; determining a stroke width according to the stroke point set; performing translation processing on the stroke point set according to the stroke width to obtain a translated stroke point set; and performing update processing on the sub-graph vector point set according to the translated stroke point set to obtain a steganographic vector image.
8. A computing device, comprising: Comprise: A processor and a memory storing a computer program, when the computer program is run by the processor, the method according to any one of claims 1 to 2 or the method according to any one of claims 3 to 5 is executed.
Citation Information
Patent Citations
Image steganography method and device, electronic device and medium
CN111131658A
Layout file steganography printing method and system
CN117648906A