Image authenticity verification method and device based on geometric deformation and electronic equipment

By extracting and matching regular graphic feature points of images and calculating the statistical characteristics of the deformation field, the problem of distinguishing between genuine printed paper documents and digitally forged images has been solved, achieving low-cost, non-intrusive image authenticity verification.

CN122199475APending Publication Date: 2026-06-12QIAN JIN NETWORK INFORMATION TECH SHANGHAI LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QIAN JIN NETWORK INFORMATION TECH SHANGHAI LTD
Filing Date
2026-03-13
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing technologies struggle to distinguish between images of genuinely printed and stamped paper documents and digitally forged or altered images on electronic templates without altering user habits, especially when partial content forgery occurs, such as composite stamps.

Method used

By acquiring a preset template image and the image to be detected, feature points of regular graphics are extracted and matched, coordinate mapping relationships are established, statistical characteristics of the deformation field are calculated, the uniformity and amplitude of the deformation field are analyzed, and the authenticity of the image is determined.

Benefits of technology

It achieves highly sensitive identification of local digital forgeries, avoids the cost of physical anti-counterfeiting, and provides low-cost, non-invasive image authenticity verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199475A_ABST
    Figure CN122199475A_ABST
Patent Text Reader

Abstract

The application discloses a kind of geometric deformation-based image authenticity verification method, device and electronic equipment.The method comprises: obtaining preset template image and to be detected image, preset template image includes embedded regular pattern, to be detected image includes all contents of preset template image;The standardization to be detected image is obtained by pre-processing to to be detected image, wherein pre-processing at least includes background cutting and size adjustment;From the regular pattern of the pre-processed preset template image and to be detected image, feature points are extracted and matched, to obtain one or more reliable matching point pairs, and based on matching point pair, the coordinate mapping relationship from preset template image to to be detected image is established;Sample grid is generated on preset template image, and based on coordinate mapping relationship, the ideal position of each sampling point of sample grid on the corresponding point of to be detected image is calculated.Using the embodiment of the application can accurately identify fake image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image detection technology, as well as image anti-counterfeiting detection and image analysis technology, and in particular to an image authenticity verification method, apparatus, equipment, program product and storage medium based on geometric deformation. Background Technology

[0002] In identity verification processes such as human resources, academic qualification verification, and financial account opening, users often rely on stamped paper documents (such as employment certificates, degree certificates, and bank statements) uploaded by them as key evidence. Currently, verification in these scenarios mainly relies on manual inspection or consistency comparison based on image and text content.

[0003] With the widespread adoption of image editing technology, the technical barriers and costs of forging such documents have been significantly reduced. Using image processing software, attackers can easily synthesize fake seals or tamper with key information on genuine electronic templates, generating counterfeit images that are difficult to distinguish with the naked eye. To address this risk, the industry has developed various anti-counterfeiting and detection technologies. For example, physical anti-counterfeiting technologies increase the difficulty of forgery by using special paper, anti-counterfeiting inks, or printing processes; however, these are costly and complex, making them unsuitable for the daily printing needs of most small and medium-sized institutions or individual users. On the other hand, while detection methods based on image feature analysis can identify common tampering traces such as splicing and blurring, they are often difficult to effectively detect operations that forge partial content on genuine templates (such as synthesized seals) due to the small size of the tampered area and the high overall image quality.

[0004] Therefore, how to accurately distinguish between genuine images obtained through a formal process of printing paper documents and affixing physical seals, and then digitizing them by taking photos or scanning them, without changing users' existing operating habits, in a low-cost and non-intrusive manner, has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] In view of this, embodiments of this application provide an image authenticity verification method, apparatus, electronic device, computer-readable storage medium, and computer program product based on geometric deformation, to solve at least one technical problem.

[0006] This application provides an image authenticity verification method based on geometric deformation, comprising: acquiring a preset template image and an image to be detected, wherein the preset template image includes embedded regular graphics, and the image to be detected includes all content of the preset template image; preprocessing the image to be detected to obtain a standardized image to be detected, wherein the preprocessing includes at least background cropping and size adjustment; extracting feature points from the regular graphics of the preprocessed preset template image and the image to be detected and matching them to obtain one or more reliable matching point pairs, and establishing a coordinate mapping relationship from the preset template image to the image to be detected based on the matching point pairs; generating a sampling grid on the preset template image, and calculating the ideal position of each sampling point of the sampling grid on the image to be detected based on the coordinate mapping relationship, and calculating the displacement vector of the sampling point based on the ideal position and the actual position of the sampling point on the image to be detected, wherein the set of all displacement vectors constitutes a deformation field; analyzing the statistical characteristics of the deformation field, and determining whether the image to be detected has geometric deformation features according to preset judgment rules; if it does, the image to be detected is a real image generated from the preset template image through a preset process.

[0007] Optionally, according to the method of this application embodiment, feature points are extracted and matched from the regular patterns of the preprocessed preset template image and the image to be detected to obtain one or more reliable matching point pairs, including: determining the region where the regular pattern is located based on the vertex coordinates or shape parameters of the regular pattern stored in the preset template image information; extracting feature points and their feature descriptors from the image in the region where the regular pattern is located by scale-invariant feature transformation detection; extracting feature points and their feature descriptors from the global range of the image to be detected by scale-invariant feature transformation detection; matching the feature descriptors of the regular image region with the global feature descriptors of the image to be detected to obtain one or more initial matching point pairs; performing distance ratio testing and / or spatial consistency verification based on random sampling consensus algorithm on the preliminary matching results to select the matching point pairs.

[0008] Optionally, according to the method of this application embodiment, the image to be detected is preprocessed to obtain a standardized image to be detected, including: detecting document regions and / or pattern regions in the image to be detected, determining the boundary contours of the document regions and / or pattern regions, and cropping the image background according to the boundary contours to obtain a region image containing only document content and / or pattern regions; converting the region images into grayscale images respectively; scaling the region images to the same size as the preset template image based on the size of the preset template image to obtain the standardized image to be detected.

[0009] Optionally, the method according to the embodiments of this application further includes: performing contrast enhancement and / or edge sharpening processing on the image to be detected and the preset template image to highlight the structural features of the text.

[0010] Optionally, according to the method of this application embodiment, the statistical characteristics of the deformation field include: average deformation amplitude D, high deformation point proportion R, and deformation distribution uniformity U; wherein, average deformation amplitude D is the average value of the displacement vector amplitude of all sampling points; high deformation point proportion R is the proportion of the number of sampling points whose displacement vector amplitude exceeds a preset amplitude threshold T to the total number of sampling points; and deformation distribution uniformity U is used to quantify the dispersion of the displacement vector amplitude in the image space distribution.

[0011] Optionally, according to the method of this application embodiment, the preset judgment rule is: if the average deformation amplitude D is greater than the preset average deformation amplitude threshold and the proportion of high deformation points R is greater than the preset high deformation point proportion threshold, then the image to be detected is determined to have geometric deformation features that conform to the natural deformation law of physical objects, and the verification result is true or suspected to be true; otherwise, the image to be detected is determined to lack the geometric deformation features, and the verification result is false or suspected to be tampered with.

[0012] Optionally, according to the method of the embodiments of this application, the determination rule includes the determination of deformation distribution uniformity U, wherein the deformation distribution uniformity U is characterized by calculating the coefficient of variation or standard deviation of the displacement vector amplitude of all sampling points; after adding the deformation distribution uniformity U, the preset determination rule further includes: if U is greater than a preset uniformity threshold, it is determined that there is a lack of natural deformation characteristics.

[0013] This application provides an image authenticity verification device based on geometric deformation, comprising: an acquisition module for acquiring a preset template image and an image to be detected, wherein the preset template image includes embedded regular graphics, and the image to be detected includes all content of the preset template image; a preprocessing module for preprocessing the image to be detected to obtain a standardized image to be detected, wherein the preprocessing includes at least background cropping and size adjustment; and a matching module for extracting feature points from the regular graphics of the preprocessed preset template image and the image to be detected and matching them to obtain one or more reliable matching point pairs, and establishing a model based on the matching point pairs from the preset template image. The coordinate mapping relationship from the image to the image to be detected; the calculation module is used to generate a sampling grid on the preset template image, and calculate the ideal position of each sampling point of the sampling grid on the corresponding point of the image to be detected based on the coordinate mapping relationship, and calculate the displacement vector of the sampling point based on the ideal position and the actual position of the sampling point on the corresponding point of the image to be detected, and the set of all displacement vectors constitutes the deformation field; the analysis module is used to analyze the statistical characteristics of the deformation field, and determine whether the image to be detected has geometric deformation characteristics according to the preset judgment rules. If it does, the image to be detected is a real image generated by the preset template image through a preset process.

[0014] This application provides an electronic device, which includes a processor and a memory storing computer program instructions; the electronic device executes the computer program instructions to implement the method described above.

[0015] This application provides a computer program product, which includes computer program instructions that, when executed, implement the method described above.

[0016] This application provides a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the method described above.

[0017] This application analyzes the geometric deformation field between the image to be detected and the preset template image, and can accurately identify the natural deformation features introduced by physical processes such as printing and photography. Compared with existing methods that rely on text content comparison or general tamper detection, this application has higher sensitivity to local digital forgery (such as synthetic seals) and does not require increasing physical anti-counterfeiting costs, and can achieve non-invasive and low-cost image authenticity verification. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings of the embodiments of this application will be briefly described below.

[0019] Figure 1This is a schematic diagram of the system architecture of an embodiment of this application.

[0020] Figure 2 This is a flowchart of an image authenticity verification method based on geometric deformation according to an embodiment of this application.

[0021] Figure 3 This is a schematic diagram of the image authenticity verification process based on geometric deformation according to an embodiment of this application.

[0022] Figure 4 This is a schematic diagram of the matching results of matching points in an embodiment of this application.

[0023] Figure 5 This is a schematic structural block diagram of an image authenticity verification device based on geometric deformation according to an embodiment of this application.

[0024] Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0025] The principles and spirit of this application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided to make the principles and spirit of this application clearer and more thorough. The exemplary embodiments provided herein are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.

[0026] Embodiments of this application relate to terminal devices and / or servers. Implementations of this application can be a system, terminal, device, method, computer-readable storage medium, or computer program product, and can be specifically implemented as entirely hardware, entirely software, or a combination of hardware and software. Figure 1 This diagram illustrates a system architecture according to an embodiment of the present application, including a terminal device 102 and a server 104. The terminal device 102 may include at least one of the following: a smartphone, tablet computer, laptop computer, desktop computer, smart TV, various wearable devices, augmented reality (AR) devices, virtual reality (VR) devices, etc. A client application, such as an app, mini-program, or browser-based client, can be installed on the terminal device 102. Users can input commands through the client, and the terminal device 102 can send request information containing the commands to the server 104. Upon receiving the request information, the server 104 performs corresponding processing and returns the processing result information to the terminal device 102. The server 104 may be a local server or a cloud server, and may be a single server or a server cluster, etc.

[0027] In this document, the terms "first," "second," "third," etc., are used only to distinguish one entity (or operation) from another in textual description, and do not require or imply any sequential order between these entities (or operations).

[0028] Figure 2 A flowchart illustrating an image authenticity verification method based on geometric deformation according to an embodiment of this application is shown. The method includes the following steps: S101: Obtain a preset template image and an image to be detected. The preset template image includes embedded regular graphics, and the image to be detected includes all the contents of the preset template image. S102: Preprocess the image to be detected to obtain a standardized image to be detected, wherein the preprocessing includes at least background cropping and size adjustment; S103: Extract feature points from the preprocessed preset template image and the regular pattern of the image to be detected and match them to obtain one or more reliable matching point pairs. Based on the matching point pairs, establish a coordinate mapping relationship from the preset template image to the image to be detected. S104: Generate a sampling grid on the preset template image, and calculate the ideal position of each sampling point of the sampling grid on the corresponding point in the image to be detected based on the coordinate mapping relationship. Based on the ideal position and the actual position of the sampling point on the corresponding point in the image to be detected, calculate the displacement vector of the sampling point. The set of all displacement vectors constitutes the deformation field. S105: Analyze the statistical characteristics of the deformation field and determine whether the image to be detected has geometric deformation features according to the preset judgment rules. If it does, the image to be detected is a real image generated by the preset template image through the preset process.

[0029] In this embodiment, the preset template image contains pre-embedded regular graphics, such as QR codes, company logos, positioning markers, or grid lines. These regular graphics have clear edges and stable geometric structures, providing stable and easily identifiable reference points in the subsequent feature matching process. The image to be detected is a photograph of a paper document uploaded by the user, claiming to be generated based on the template, and its content should completely contain all the information in the template image.

[0030] After obtaining the two images, the image to be detected is preprocessed to crop out the background area introduced during the shooting process and resize it to match the template image. It is important to emphasize that this resizing is only for standardizing the analysis scale and does not perform any geometric distortion correction. The purpose is to fully preserve the original deformation information generated during the physical shooting process.

[0031] After preprocessing, the feature extraction and matching stage begins. Specifically, feature points are extracted from the regular patterns of the two images, such as the corner points of a QR code, the inflection points of a logo, or the intersections of grid lines. Local descriptors for these feature points are calculated using algorithms such as Scale Invariant Feature Transform (SIFT), and similarity matching is performed. Subsequently, a set of reliable matching point pairs is selected through distance ratio testing and spatial consistency verification. Based on these high-quality matching point pairs, a global geometric mapping relationship from the coordinates of the template image to the coordinates of the image to be detected can be calculated. This relationship describes the overall position and pose changes of the image to be detected relative to the template image.

[0032] After clarifying the overall mapping relationship, a dense and regularly distributed sampling grid needs to be generated on the template image. Using the previously calculated mapping relationship, the coordinates of each grid point are projected onto the image to be detected, and its theoretical position on the image to be detected is calculated. Simultaneously, the actual corresponding point of that grid point on the image to be detected has also been determined through feature matching. By comparing the theoretical position with the actual position, the displacement vector of that sampling point can be calculated. The set of displacement vectors of all sampling points constitutes a deformation field that can describe the local geometric differences between the two images.

[0033] Finally, statistical analysis is performed on the deformation field. Specifically, the average deformation amplitude (the average displacement of all sampling points), the proportion of high deformation points (the proportion of sampling points whose displacement exceeds a specific threshold), and the deformation uniformity (the consistency of deformation distribution in the image space) can be calculated. In a real printing and photographing process, due to the combined effects of lens distortion, paper bending, and shooting angle, the deformation field typically exhibits a holistic, continuous, and large-amplitude geometric change. In contrast, images that have been locally altered on a digital template (such as composite stamps) often show localized, discontinuous, or very small alignment errors compared to the template. Therefore, by analyzing the statistical characteristics of the deformation field using preset judgment rules, if the aforementioned holistic geometric deformation characteristics are detected, the image to be detected can be determined to be an image generated by photographing or scanning a preset template image after actual printing, affixing a physical stamp, and then processing; otherwise, it can be determined to be a digitally forged image.

[0034] This application provides a low-cost, non-invasive, and difficult-to-bypass image authenticity verification method by utilizing the unavoidable and difficult-to-simulate overall geometric deformation features in the physical process as a judgment criterion. Furthermore, by embedding regular graphics in the template, the accuracy and robustness of feature point matching are effectively improved, making the analysis of the deformation field more accurate and reliable.

[0035] In some embodiments of this application, optionally, feature points are extracted and matched from the regular patterns of the preprocessed preset template image and the image to be detected to obtain one or more sets of reliable matching point pairs, including: Based on the vertex coordinates or shape parameters of the regular shape stored in the preset template image information, the region where the regular shape is located is determined, and feature points and their feature descriptors are extracted from the image in the region where the regular shape is located by scale-invariant feature transformation. Within the global scope of the image to be detected, feature points and their feature descriptors are extracted by scale-invariant feature transformation. The feature descriptors of regular image regions are matched with the global feature descriptors of the image to be detected to obtain one or more initial matching point pairs; The preliminary matching results are subjected to distance ratio testing and / or spatial consistency verification based on random sampling consensus algorithm to select the matching point pairs.

[0036] In this embodiment, pre-stored regular graphic information in a preset template image, such as the coordinates of the vertices of a QR code or the outline parameters of a company logo, is used to accurately determine the area occupied by the regular graphic in the image. Then, within the area defined by the regular image, a scale-invariant feature transform algorithm is used to detect feature points and calculate feature descriptors. The scale-invariant feature transform algorithm is a widely used local feature detection and description method in computer vision. Its function is to extract key points, i.e., feature points, from an image that remain stable despite scaling, rotation, and even a certain degree of affine transformation, such as corner points, edge points, or points with drastic texture changes in an image. Simultaneously, the algorithm generates a feature descriptor for each feature point, which can be understood as a mathematical vector that uniquely identifies the local texture information of that feature point. This vector has high discriminative power, enabling accurate matching of feature points corresponding to the same physical point in different images through vector distance.

[0037] After feature extraction is completed on one side of the template image, the scale-invariant feature transform algorithm is also used to extract all feature points and their feature descriptors in the global scope of the image to be detected. The reason for extracting in the global scope is that the image to be detected, as a photograph, may contain environmental interference such as shooting background and paper edges in addition to template information. Global extraction can ensure that no candidate feature points that may match the regular graphic area of ​​the template are missed.

[0038] After obtaining the feature point sets from both aspects, the similarity between the feature descriptors of the template regular graphic region and the global feature descriptors of the image to be detected is calculated. This involves determining the most similar matching pairs by calculating the Euclidean distance between the feature descriptors, thus forming one or more initial matching point pairs. However, due to factors such as image noise, background interference, or repetitive textures, the initial matching results often contain a certain number of incorrect matches. Therefore, this application introduces a dual screening mechanism. First, a distance ratio test is performed, comparing the ratio of the nearest neighbor distance to the second nearest neighbor distance. The smaller the ratio, the higher the discriminative power of the match; conversely, a larger ratio indicates ambiguity in the match, which is then discarded, thus filtering out a large number of fuzzy matches. Subsequently, spatial consistency verification is performed based on a random sampling consensus algorithm. This algorithm iteratively selects a small number of matching point pairs to estimate a geometric transformation model and checks the conformity of the remaining matching point pairs to the model. It can effectively identify and retain interior points that globally satisfy the same geometric constraint, while discarding exterior points that do not conform to the constraint. After the above dual screening process, the final retained matching point pairs constitute one or more highly reliable matching point pairs.

[0039] By specifically limiting the feature extraction region and adopting a multi-level filtering strategy, the obtained matching point pairs are ensured to have both the uniqueness of local texture and the consistency of global spatial position, thereby improving the accuracy of the image authenticity verification method of this application in practical applications.

[0040] Optionally, in some embodiments of this application, the images to be detected are preprocessed to obtain standardized images to be detected, including: Document region detection is performed on the image to be detected to determine the boundary contour of the document region, and the image background is cropped according to the boundary contour to obtain a region image containing only the document region. The images of the aforementioned regions are converted into grayscale images respectively; Using the size of the preset template image as a reference, the region image is scaled to the same size as the preset template image to obtain the standardized image to be detected.

[0041] In this embodiment, the document region refers to the image region containing the paper document itself. Specifically, edge detection algorithms can be used to identify significant edges in the image, and then contour analysis techniques can be combined to fit the document's boundary contour. For example, in a photograph of a paper certificate, the paper edges typically form a clear brightness or color gradient with the background. Edge detection can delineate the four boundaries of the paper, thus determining its contour. After boundary detection, the image background is precisely cropped based on the boundary contour, retaining only the clean image region containing the document area. The purpose of this operation is to remove background interference such as desktop objects, fingers, and environmental clutter that are unavoidable during shooting, preventing these irrelevant details from generating misleading feature points in subsequent feature extraction stages.

[0042] After obtaining a clean region image, it is converted to a grayscale image. Converting a color image to grayscale significantly reduces data complexity and improves subsequent processing speed while preserving key texture structure information. This is because subsequent feature extraction algorithms, such as scale-invariant feature transformation, rely primarily on the image's brightness gradient information to detect feature points, rather than color information. The red, green, and blue channels in a color image not only generate a massive amount of data, increasing the computational burden, but the color information itself also contributes limitedly to geometric structure analysis and can sometimes even introduce interference due to changes in lighting color temperature.

[0043] Finally, using the size of the preset template image as a reference, the cropped and grayscaled region image is scaled to the exact same size as the template image, resulting in a standardized image to be detected. It is important to emphasize that this scaling step is a proportional or non-proportional overall size adjustment, aimed at making the two images comparable at the pixel scale, laying the foundation for subsequent pixel-level displacement calculations. This scaling operation does not correct or compensate for any geometric deformation features within the image; therefore, physical deformation information such as paper bending and lens distortion generated during the actual shooting process is fully preserved for subsequent deformation field analysis and judgment.

[0044] By cropping the background, converting the grayscale, and unifying the size of the captured images, subsequent feature point matching can be performed on clean and scale-consistent image data, significantly improving the accuracy and efficiency of matching and providing a reliable front-end guarantee for the stable operation of the entire image authenticity verification method in practical applications.

[0045] Optionally, in some embodiments of this application, it may also include: Perform contrast enhancement and / or edge sharpening processing on the image to be detected and the preset template image to highlight the structural features of the text.

[0046] In real-world business scenarios, user-uploaded images may suffer from low overall contrast and blurred edges of text or graphics due to factors such as insufficient lighting during capture, yellowed paper, or faded ink. These image quality issues directly impact the quantity and stability of feature points detected by algorithms like Scale-Invariant Feature Transform (SIT). For example, the turning points of text strokes that should be identified as corners may fail to be effectively captured by the algorithm due to low contrast, leading to insufficient matching point pairs or decreased matching quality.

[0047] Contrast enhancement stretches the image's grayscale histogram, expanding the pixel value distribution from a narrow grayscale range to a wider interval. This makes the brightness difference between text and background more pronounced, allowing structural information such as text strokes and graphic outlines to be better separated from the background. Edge sharpening, on the other hand, enhances the edges of the image where pixel values ​​change drastically, making the boundaries of text strokes and graphic outlines clearer and sharper. For template images containing regular graphics, sharpening can make the edge features of QR code positioning patterns or logos more prominent.

[0048] It should be noted that this step involves pixel grayscale adjustment without altering the image's geometry, thus not affecting existing geometric deformation information. After enhancement, the image exhibits more pronounced texture features. The feature point detection algorithm can extract more stable feature points at key locations such as text transitions, stroke intersections, and graphic edges. Furthermore, the feature descriptors corresponding to each feature point are more discriminative due to the clearer texture. This helps obtain denser and more reliable matching point pairs in subsequent feature matching stages, enabling the deformation field calculated based on these matching point pairs to more accurately reflect the geometric differences between images, providing more sufficient data support for the final deformation pattern determination.

[0049] In some embodiments of this application, optionally, the statistical characteristics of the deformation field include: average deformation amplitude D, high deformation point proportion R, and deformation distribution uniformity U; Wherein, the average deformation amplitude D is the average value of the displacement vector amplitude of all sampling points; the proportion of high deformation points R is the proportion of the number of sampling points whose displacement vector amplitude exceeds the preset amplitude threshold T to the total number of sampling points; and the deformation distribution uniformity U is used to quantify the degree of dispersion of the displacement vector amplitude in the image space distribution.

[0050] In this embodiment, the average deformation amplitude refers to the arithmetic mean of the displacement vector amplitudes of all sampling points. In the aforementioned steps, the displacement vector of each sampling point reflects the positional offset between the template image and the image to be detected, and its amplitude is the pixel distance of the offset. The average deformation amplitude is obtained by summing the displacement amplitudes of all sampling points and dividing by the total number of sampling points. This indicator quantifies the degree of deformation of the image to be detected relative to the template image. In real printing and photography scenarios, due to factors such as tilted shooting angle and paper bending, the entire image often undergoes significant displacement, so the average deformation amplitude is usually large; while digitally forged images, because they are directly edited on electronic templates, often have a smaller overall displacement amplitude, limited to minor misalignments that may exist in the local tampered areas.

[0051] The high deformation point ratio refers to the proportion of sampling points whose displacement vector amplitude exceeds a preset amplitude threshold out of the total number of sampling points. The preset amplitude threshold can be set according to common parameters of the shooting device and shooting distance in the actual application scenario, for example, set to 50 pixels. This indicator reflects the proportion of areas in the image that have undergone significant deformation. The real physical shooting process will cause continuous and large-amplitude deformation of the entire paper area, so the high deformation point ratio is usually high, possibly exceeding 70%; while in digitally forged images, only the tampered local area may be displaced, and most of the remaining area is strictly aligned with the template image, so the high deformation point ratio is often low.

[0052] Deformation distribution uniformity is used to quantify the dispersion of displacement vector amplitudes in the spatial distribution of an image, i.e., whether the deformation exhibits a consistent pattern of change at different locations in the image. This index can be achieved by calculating the variance or standard deviation of the displacement amplitudes at all sampling points, or by analyzing the directional consistency of the displacement vectors on the image plane. Deformations introduced by the actual physical shooting process, such as perspective distortion or lens distortion, usually follow a continuous and smooth pattern of change, such as gradually increasing from the image center to the edge, or exhibiting a gradient change along a certain direction. Therefore, their deformation distribution has good uniformity and regularity. In contrast, the deformation of digitally forged images is often limited to the vicinity of the tampered area, manifesting as local abrupt changes that contrast sharply with the zero deformation in the surrounding areas. Therefore, their deformation distribution uniformity is low, exhibiting obvious discontinuities.

[0053] By comprehensively analyzing the above three statistical characteristics, the geometric differences between the image to be detected and the template image can be fully characterized from three different dimensions: the magnitude of deformation, the coverage of the large deformation area, and the regularity of deformation distribution. This significantly improves the accuracy of the verification method of this application.

[0054] Optionally, in some embodiments of this application, the preset determination rule is: If the average deformation amplitude D is greater than the preset average deformation amplitude threshold and the proportion of high deformation points R is greater than the preset high deformation point proportion threshold, then the image to be detected is determined to have geometric deformation features that conform to the natural deformation law of physical objects, and the verification result is true or suspected to be true. Otherwise, the image to be detected is determined to lack the geometric deformation features, and the verification result is false or suspected tampering.

[0055] In this embodiment, the judgment rule integrates two key indicators: first, whether the average deformation amplitude is greater than a preset average deformation amplitude threshold, which reflects the minimum requirement for overall deformation intensity; and second, whether the proportion of high deformation points is greater than a preset high deformation point proportion threshold, which reflects the coverage area of ​​the region with significant displacement in the entire image. Only when both conditions are met simultaneously will the system determine that the image to be detected has geometric deformation features that conform to the natural deformation law of physical objects, and thus conclude that the verification result is true or suspected to be true. Conversely, if either condition is not met, i.e., the average deformation amplitude is insufficient or the coverage of high deformation areas is too small, the system determines that the image to be detected lacks true physical deformation features, and the verification result is false or suspected of being tampered with.

[0056] By logically combining two independent statistical features, this judgment rule effectively avoids the risk of misjudgment that may arise from a single indicator. For example, an image that is scaled up but uniformly deformed due to excessive shooting distance may have a large average deformation amplitude, but if it lacks large local deformation caused by paper bending, the proportion of high deformation points may not be high. According to this rule, it will not be misjudged as genuine. Conversely, a forged image with artificially added noise to simulate deformation in only local areas may show large displacement in those areas, but the overall average deformation amplitude is still far below the level of a genuine image, and it also cannot pass the dual judgment. The judgment rule of this application provides a clear, executable, and discriminative final judgment basis for the image authenticity verification of this scheme.

[0057] Optionally, in some embodiments of this application, the determination rule includes a determination of the deformation distribution uniformity U, wherein the deformation distribution uniformity U is characterized by calculating the coefficient of variation or standard deviation of the displacement vector amplitude of all sampling points; After incorporating the deformation distribution uniformity U, the preset judgment rule further includes: If U is greater than the preset uniformity threshold, it is determined that there is a lack of natural deformation characteristics.

[0058] In this embodiment, the method for characterizing the uniformity of deformation distribution is first clarified, namely, by calculating the coefficient of variation or standard deviation of the displacement vector amplitude of all sampling points. The standard deviation reflects the dispersion of the displacement amplitude of each point relative to the average value, while the coefficient of variation is the ratio of the standard deviation to the average value, eliminating the influence of dimensions and making it more suitable for comparing images with different average deformation levels. The core function of this indicator is to characterize the regularity of deformation distribution across the entire image—whether the displacement amplitude presents a smooth, gradual, and continuous distribution across the entire image, or exhibits localized, sharp fluctuations.

[0059] After adding the judgment on the uniformity of deformation distribution, the preset judgment rule is further expanded to: if the calculated uniformity U is greater than the preset uniformity threshold, that is, the displacement amplitude shows an excessively high degree of dispersion or abrupt change characteristics in the entire image range, then the image to be detected is judged to lack natural deformation characteristics, and the verification result is false or suspected tampering.

[0060] By incorporating deformation distribution uniformity into the judgment system, the potential blind spots of relying solely on average deformation amplitude and the proportion of high-deformation points are effectively compensated for. For example, some carefully crafted forged images may use global blurring or slight distortion to barely reach the threshold for average deformation amplitude and the proportion of high-deformation points, but their deformation distribution often lacks the continuity and smoothness of the real physical process, exhibiting irregular local fluctuations. In such cases, the uniformity index can effectively identify such anomalies. Similarly, in real-shot images, local occlusion or reflections may cause local feature point matching failures or abnormal displacements, but the overall deformation distribution still maintains a basic regularity. The uniformity index can also help distinguish such special cases. This multi-dimensional comprehensive judgment rule enables this scheme to make more robust and accurate judgments based on the physical deformation laws when dealing with various complex images.

[0061] The implementation methods and advantages of the embodiments of this application have been described above through multiple examples. The specific processing procedures of the embodiments of this application are described in detail below with reference to specific examples.

[0062] Figure 3 This is a schematic diagram illustrating the processing procedure of the image authenticity verification method based on geometric deformation according to an embodiment of this application. Combined with... Figure 3 As shown, the image authenticity verification method based on geometric deformation in this application includes the following steps: Step 1: Upload comparison images. Input the original template image and the image to be detected for comparative analysis of geometric deformation data.

[0063] Step 2: Image preprocessing, including background cropping, grayscale conversion, and size normalization. Background cropping involves identifying document region boundaries in the image to be detected using edge detection or contour analysis algorithms, cropping away the shooting background, and retaining only the clean document content area. Grayscale conversion and size normalization involve converting both images to single-channel grayscale format, and scaling the image to be detected to the same size as the template image (or uniformly adjusting to a preset standard size such as 800×800 pixels). For document images, contrast enhancement and edge sharpening can be selectively added to highlight text structural features. It should be noted that the purpose of geometric deformation detection is to analyze the natural deformation of physical paper during shooting; therefore, geometric alignment transformation is not required in the preprocessing stage to preserve complete deformation features for analysis.

[0064] Step 3: Feature Point Extraction and Matching. A scale-invariant feature transform algorithm is used to detect stable keypoints in the two images, and a local texture descriptor is calculated for each keypoint. Corresponding point relationships between the two images are established through feature descriptor similarity matching, and reliable matching point pairs are selected using distance ratio tests and spatial consistency verification. Figure 4 This is a schematic diagram of the matching point pair matching results according to an embodiment of this application. For example... Figure 4 As shown, the left side is the template image and the right side is the image to be detected. Multiple matching point pairs are identified between the two images, and the two matching points in the same matching point pair are marked by a straight line with a label.

[0065] Step 4: Generate deformation field data. Calculate the global geometric transformation matrix based on the selected matching point pairs to establish a coordinate mapping relationship from the template image to the image to be detected. Generate a regularly distributed sampling point grid on the template image. Calculate the corresponding position of each sampling point in the image to be detected using the geometric transformation model, obtaining the set of displacement vectors of the sampling points that constitute the deformation field.

[0066] Step 5: Deformation Pattern Analysis and Judgment. Calculate the statistical characteristics of the amplitude distribution of the deformation vector and analyze three characteristics of the deformation field: average deformation amplitude (average pixel value of displacement of all sampling points), proportion of high deformation points (percentage of sampling points with displacement exceeding 50 pixels), and deformation uniformity (consistency of deformation distribution on the image). An empirical threshold is used for comprehensive judgment: when the average deformation amplitude is large (>50 pixels) and the proportion of high deformation is high (>70%), it is determined that geometric deformation features exist; otherwise, it is determined that they do not. Finally, if geometric deformation features are determined to exist, the image to be detected is determined to be a genuine image obtained through a preset process of stamping, printing, and photographing; if geometric deformation features are determined not to exist, the detected image is determined to be a synthesized stamp, a forged image.

[0067] Correspondingly, this application also provides an image authenticity verification device 100 based on geometric deformation, for reference... Figure 5 ,include: The acquisition module 110 is used to acquire a preset template image and an image to be detected. The preset template image includes embedded regular graphics, and the image to be detected includes all the contents of the preset template image. The preprocessing module 120 is used to preprocess the image to be detected to obtain a standardized image to be detected, wherein the preprocessing includes at least background cropping and size adjustment; The matching module 130 is used to extract feature points from the preprocessed preset template image and the regular pattern of the image to be detected and perform matching to obtain one or more reliable matching point pairs, and establish a coordinate mapping relationship from the preset template image to the image to be detected based on the matching point pairs. The calculation module 140 is used to generate a sampling grid on a preset template image, and calculate the ideal position of each sampling point of the sampling grid on the image to be detected based on the coordinate mapping relationship, and calculate the displacement vector of the sampling point based on the ideal position and the actual position of the sampling point on the image to be detected. The set of all displacement vectors constitutes the deformation field. The analysis module 150 is used to analyze the statistical characteristics of the deformation field and determine whether the image to be detected has geometric deformation features according to the preset judgment rules. If it does, the image to be detected is a real image generated by the preset template image through the preset process.

[0068] Based on at least one of the above embodiments, the electronic device in the embodiments of this application may be a user terminal device, a server, other computing devices, or a cloud server. Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. The electronic device may include a processor 601 and a memory 602 storing computer program instructions. The processor 601 reads and executes the computer program instructions stored in the memory 602 to implement the process or function of any of the methods in the above embodiments.

[0069] Specifically, processor 601 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. Memory 602 may include a mass storage device for data or instructions. For example, memory 602 may be at least one of the following: a hard disk drive (HDD), read-only memory (ROM), random access memory (RAM), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, universal serial bus (USB) drive, or other physical / tangible memory storage device. Alternatively, memory 602 may include removable or non-removable (or fixed) media. Furthermore, memory 602 may be internal or external to the integrated gateway disaster recovery device. Memory 602 may be non-volatile solid-state memory. In other words, typically memory 602 includes a tangible (non-transitory) computer-readable storage medium (such as a memory device) encoded with computer-executable instructions, and when the software is executed (e.g., by one or more processors), it can perform the operations described in the methods of the embodiments of this application.

[0070] As an example, Figure 6 The illustrated electronic device may also include a communication interface 603 and a bus 610. The processor 601, memory 602, and communication interface 603 are connected via bus 610 and communicate with each other. Bus 610 may include hardware, software, or both, and may couple components of an online data traffic metering device together. The bus may include at least one of the following: Accelerated Graphics Port (AGP) or other graphics bus, Enhanced Industry Standard Architecture (EISA) bus, Front Side Bus (FSB), HyperTransport (HT) Interconnect, Industry Standard Architecture (ISA) bus, Infinite Bandwidth Interconnect, Low Pin Count (LPC) bus, memory bus, Microchannel Architecture (MCA) bus, Peripheral Component Interconnect (PCI) bus, PCI-Express (PCI-X) bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local (VLB) bus, or other suitable bus. Bus 610 may include one or more buses. Although specific buses are described or shown in the embodiments of this application, any suitable bus or interconnection method is contemplated in the embodiments of this application.

[0071] In conjunction with the methods in the above embodiments, this application also provides a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the process or function of any of the methods in the above embodiments.

[0072] This application also provides a computer program product that stores computer program instructions, which, when executed by a processor, implement the process or function of any of the methods described above.

[0073] The flowcharts and / or block diagrams of methods, terminals, systems, and computer program products according to embodiments of this application have been exemplarily described above, and related aspects have been described. It should be understood that each block or combination thereof in the flowcharts and / or block diagrams may be implemented by computer program instructions, by dedicated hardware performing a specified function or action, or by a combination of dedicated hardware and computer instructions. For example, these computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to form a machine such that these instructions, executed via such processor, enable the implementation of the function / action specified in each block or combination thereof in the flowcharts and / or block diagrams. Such a processor may be a general-purpose processor, a dedicated processor, a special-purpose application processor, or a field-programmable logic circuit.

[0074] The functional blocks shown in the structural block diagrams of this application can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc.; when implemented in software, they are programs or code segments used to perform the required tasks. Programs or code segments can be stored in memory or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. Code segments can be downloaded via computer networks such as the Internet or intranets.

[0075] It should be noted that this application is not limited to the specific configurations and processes described above or shown in the figures. The above descriptions are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the described systems, devices, terminals, modules, or units can be referred to the corresponding processes in the method embodiments, and need not be repeated here. It should be understood that the scope of protection of this application is not limited thereto. Any equivalent modifications or substitutions that can be conceived by those skilled in the art within the scope of the technology disclosed in this application should be covered within the scope of protection of this patent application.

Claims

1. A method for verifying image authenticity based on geometric deformation, characterized in that, include: Obtain a preset template image and an image to be detected. The preset template image includes embedded regular graphics, and the image to be detected includes all the contents of the preset template image. The image to be detected is preprocessed to obtain a standardized image to be detected, wherein the preprocessing includes at least background cropping and size adjustment; Feature points are extracted from the preprocessed template image and the regular pattern of the image to be detected and matched to obtain one or more reliable matching point pairs. Based on the matching point pairs, a coordinate mapping relationship from the template image to the image to be detected is established. A sampling grid is generated on a preset template image. Based on the coordinate mapping relationship, the ideal position of each sampling point of the sampling grid on the corresponding point in the image to be detected is calculated. Based on the ideal position and the actual position of the sampling point on the corresponding point in the image to be detected, the displacement vector of the sampling point is calculated. The set of all displacement vectors constitutes the deformation field. The statistical characteristics of the deformation field are analyzed, and the presence of geometric deformation features in the image to be detected is determined according to the preset judgment rules. If the features are present, the image to be detected is a real image generated by the preset template image through a preset process.

2. The method according to claim 1, characterized in that, Feature points are extracted from the preprocessed template image and the regular shape of the image to be detected, and then matched to obtain one or more reliable matching point pairs, including: Based on the vertex coordinates or shape parameters of the regular shape stored in the preset template image information, the region where the regular shape is located is determined, and feature points and their feature descriptors are extracted from the image in the region where the regular shape is located by scale-invariant feature transformation. Within the global scope of the image to be detected, feature points and their feature descriptors are extracted by scale-invariant feature transformation. The feature descriptors of regular image regions are matched with the global feature descriptors of the image to be detected to obtain one or more initial matching point pairs; The preliminary matching results are subjected to distance ratio testing and / or spatial consistency verification based on random sampling consensus algorithm to select the matching point pairs.

3. The method according to claim 1, characterized in that, The images to be detected are preprocessed to obtain standardized images to be detected, including: The document region and / or pattern region are detected in the image to be detected, the boundary contours of the document region and / or pattern region are determined, and the image background is cropped according to the boundary contours to obtain a region image containing only the document content and / or pattern region. The images of the aforementioned regions are converted into grayscale images respectively; Using the size of the preset template image as a reference, the region image is scaled to the same size as the preset template image to obtain the standardized image to be detected.

4. The method according to claim 1, characterized in that, Also includes: Perform contrast enhancement and / or edge sharpening processing on the image to be detected and the preset template image to highlight the structural features of the text.

5. The method according to claim 1, characterized in that, The statistical characteristics of the deformation field include: average deformation amplitude D, proportion of high deformation points R, and deformation distribution uniformity U; Wherein, the average deformation amplitude D is the average value of the displacement vector amplitude of all sampling points; the proportion of high deformation points R is the proportion of the number of sampling points whose displacement vector amplitude exceeds the preset amplitude threshold T to the total number of sampling points; and the deformation distribution uniformity U is used to quantify the degree of dispersion of the displacement vector amplitude in the image space distribution.

6. The method according to claim 5, characterized in that, The preset determination rule is as follows: If the average deformation amplitude D is greater than the preset average deformation amplitude threshold and the proportion of high deformation points R is greater than the preset high deformation point proportion threshold, then the image to be detected is determined to have geometric deformation features that conform to the natural deformation law of physical objects, and the verification result is true or suspected to be true. Otherwise, the image to be detected is determined to lack the geometric deformation features, and the verification result is false or suspected tampering.

7. The method according to claim 6, characterized in that, The judgment rule incorporates the judgment of deformation distribution uniformity U, wherein the deformation distribution uniformity U is characterized by calculating the coefficient of variation or standard deviation of the displacement vector amplitude of all sampling points; After incorporating the deformation distribution uniformity U, the preset judgment rule further includes: If U is greater than the preset uniformity threshold, it is determined that there is a lack of natural deformation characteristics.

8. An image authenticity verification device based on geometric deformation, characterized in that, include: The acquisition module is used to acquire a preset template image and an image to be detected. The preset template image includes embedded regular graphics, and the image to be detected includes all the contents of the preset template image. The preprocessing module is used to preprocess the image to be detected to obtain a standardized image to be detected, wherein the preprocessing includes at least background cropping and size adjustment; The matching module is used to extract feature points from the preprocessed preset template image and the regular pattern of the image to be detected and perform matching to obtain one or more reliable matching point pairs, and establish a coordinate mapping relationship from the preset template image to the image to be detected based on the matching point pairs. The calculation module is used to generate a sampling grid on a preset template image, and calculate the ideal position of each sampling point of the sampling grid on the image to be detected based on the coordinate mapping relationship, and calculate the displacement vector of the sampling point based on the ideal position and the actual position of the sampling point on the image to be detected. The set of all displacement vectors constitutes the deformation field. The analysis module is used to analyze the statistical characteristics of the deformation field and determine whether the image to be detected has geometric deformation features according to the preset judgment rules. If it does, the image to be detected is a real image generated by the preset template image through the preset process.

9. An electronic device, characterized in that, The electronic device is a terminal device or a server. The electronic device includes a processor and a memory storing computer program instructions. When the electronic device executes the computer program instructions, it implements the method as described in any one of claims 1-7.

10. A computer program product, characterized in that, It includes computer program instructions that, when executed, implement the method as described in any one of claims 1-7.

11. A computer-readable storage medium, characterized in that, It stores computer program instructions that, when executed, implement the method as described in any one of claims 1-7.