A logistics return single image tampering automatic detection method and system
Patent Information
- Application Number
- CN202611148057.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-02
- Publication Date
- 2026-10-27
AI Technical Summary
[0007]针对现有技术存在的上述问题,本发明提供一种物流回单图像篡改自动检测方法及系统,以解决拍摄质量变化容易干扰局部篡改识别,以及不同图像特征之间缺少空间验证关系的问题
[0024]与现有技术相比,本发明具有以下有益效果。
Smart Images

Figure CN122990736A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing and logistics information verification technology, and in particular to an automatic detection method and system for tampering with logistics receipt images. Background Technology
[0002] Logistics receipts are typically uploaded after being photographed or scanned by mobile devices. These images contain various elements with different structures, including table lines, printed labels, product names, quantities, delivery dates, handwritten signatures, and stamps. Due to factors such as shooting angle, lighting distribution, out-of-focus areas, motion blur, image noise, and compression, multiple areas within the same logistics receipt image may exhibit correlated edge attenuation, texture changes, and character shape variations. Local overlay, replacement, splicing, or erasure operations primarily create local inconsistencies in the modified area and its boundaries.
[0003] Indian patent IN421433B discloses a method and system for detecting tampering in document images. The method determines a preprocessing approach by analyzing the image quality of the document image, divides the document into regions of interest according to a predefined document ontology, and performs tampering detection on each region of interest. This technical solution can also assign weights to the regions of interest and determine whether the document image has been tampered with based on the weighted results.
[0004] Chinese patent publication number CN116935200A, entitled "Image Tampering Detection Method, System, Device, and Storage Medium for Auditing," discloses a technical solution that utilizes local binary mode to extract texture features, uses edge detection operators to extract edge intensity, and performs image screening using a classification model. The document "A Multi-Modal Architecture for Document Forgery Detection" discloses a technical solution that analyzes font replacement using optical character recognition results. The paper "Tampering Location of Reproduced Images Based on Text Edge Distortion Features" discloses a technical solution for tampering location based on text edge distortion.
[0005] Existing solutions typically extract image features from the regions of interest separately, or directly input different image features into classification or scoring models. Under mobile shooting conditions, changes in shooting quality can simultaneously alter the edge, texture, and character morphology features of multiple regions. Furthermore, printed characters, table lines, signatures, and stamps on logistics receipts respond differently to the same image features. Without distinguishing between shooting disturbances and local editing disturbances, and lacking spatial verification relationships between different detection evidence, changes in shooting quality may lead to score manipulation, and isolated feature anomalies may be directly used as evidence of tampering.
[0006] Therefore, the technical problem that needs to be solved is: how to distinguish between shooting disturbances and local tampering disturbances when there are changes in shooting quality in logistics return images and different business fields have different image structures, and to form a tampering detection basis with spatial correlation and verification relationship. Summary of the Invention
[0007] To address the aforementioned problems in existing technologies, this invention provides an automatic detection method and system for tampering of logistics return receipt images, thereby solving the problems that changes in image quality can easily interfere with the identification of local tampering, and the lack of spatial verification relationships between different image features.
[0008] To achieve the above objectives, the present invention adopts the following technical solution.
[0009] In a first aspect, the present invention provides an automatic detection method for tampering with logistics return receipt images, comprising: The system acquires and preprocesses the logistics receipt image to be inspected, then registers the preprocessed image to the standard coordinate space of the receipt template. The receipt template includes business field areas, stable reference areas, field detection rules, and shooting disturbance calibration relationships. The field detection rules record the applicable feature types, spatial association conditions, and region feature weights for each business field area.
[0010] The shooting quality features are extracted from the stable reference region, and the shooting disturbance state of the logistics receipt image to be detected is generated based on the shooting quality features.
[0011] For each business field region, two types of actual feature responses are extracted from edge structure feature response, character shape feature response and local texture feature response according to the field detection rules; expected feature responses of the two types of actual feature responses are generated according to the shooting disturbance calibration relationship and the shooting disturbance state; the actual feature responses are compared with the expected feature responses to obtain two types of local residual abnormal maps.
[0012] The two types of local residual abnormal maps are mapped to the standard coordinate space, and candidate tampering regions are formed according to the spatial association conditions.
[0013] A peripheral reference band is determined around the candidate tampered region. Under the same shooting disturbance conditions, the residual difference constants of the candidate tampered region and the peripheral reference band are compared. When the residual difference constant of the candidate tampered region exceeds a candidate threshold while the residual difference constant of the peripheral reference band does not exceed a reference threshold, the verified candidate tampered region is retained.
[0014] Based on the regional feature weights and the verified candidate tampering regions, a tampering suspicion score is generated, and the tampering determination result, regional location, and abnormal evidence type are output.
[0015] Furthermore, the construction of the return receipt template includes: acquiring sample images of logistics return receipts that have been confirmed to be tamper-proof and are under different lighting, clarity, compression, and shooting angle conditions; registering the sample images of logistics return receipts to the same standard coordinate space; labeling the business field area and the stable reference area; extracting the shooting disturbance state and the actual feature response of the business field area of each sample image; establishing the shooting disturbance calibration relationship between the shooting disturbance state, the position of the business field area, and the expected feature response; and determining the applicable feature type, spatial association conditions, and regional feature weights based on the image structure of the business field.
[0016] Furthermore, the preprocessing and registration include: performing grayscale correction, noise suppression, and rotation correction on the logistics receipt image; extracting table intersections, outer frame corners, and fixed printed label outlines as registration anchor points; calculating spatial transformation relationships based on the registration anchor points; and generating registration residuals based on the positional differences between the spatially transformed registration anchor points and template anchor points. When the registration residual exceeds a registration threshold, mismatched anchor points are excluded, and the spatial transformation relationship is recalculated; if the recalculated registration residual still exceeds the registration threshold, an image quality anomaly result is output, and tamper detection is terminated.
[0017] Furthermore, the image quality features include brightness distribution features, edge extension features, high-frequency noise features, and compression block boundary features. Based on the position of each stable reference region in the standard coordinate space, outlier elimination and spatial interpolation are performed on the image quality features of each stable reference region to generate brightness perturbation distribution, blur perturbation distribution, noise perturbation distribution, and compression perturbation distribution, which constitute the image perturbation state.
[0018] Furthermore, the field detection rules include: selecting edge structure feature response and character morphology feature response for the goods name area, goods quantity area, and receipt date area; selecting edge structure feature response and local texture feature response for the signature area and seal area; and recording spatial association conditions and regional feature weights for the two types of features selected, respectively.
[0019] Furthermore, the edge structure feature response characterizes the break position, direction deviation, and position deviation of the actual edge based on the expected edge path and expected edge direction recorded in the template; the character morphology feature response characterizes the stroke width, character height, character width, and aspect ratio of the character based on the character position obtained by optical character recognition; and the local texture feature response characterizes the business field region by dividing it into blocks and comparing the texture feature vectors of adjacent blocks.
[0020] Furthermore, the spatial association conditions include: segmenting the two types of local residual abnormal maps into abnormal regions; calculating the overlap area ratio and boundary distance of the two types of abnormal regions; when the overlap area ratio is not lower than the overlap threshold and the boundary distance does not exceed the distance threshold, determining the common coverage area of the two types of abnormal regions and the abnormal boundary area continuous with the common coverage area as candidate tampering regions.
[0021] Furthermore, the outer reference band is formed by extending outward along the boundary of the candidate tampering region, excluding the candidate tampering region and image portions that do not belong to the current service field region. The outer reference band is treated with the same shooting perturbation state and feature processing method as the candidate tampering region. When the residual difference constant of the candidate tampering region exceeds the candidate threshold and the residual difference constant of the outer reference band does not exceed the reference threshold, the candidate tampering region is retained; when the residual difference constants of both the candidate tampering region and the outer reference band exceed their respective thresholds, the candidate tampering region is recorded as an abnormal shooting quality region and excluded from the tampering candidate results.
[0022] Furthermore, based on the residual difference constants, area, overlap ratio of the two types of abnormal areas, and area feature weights of the verified candidate tampered areas, a region suspicion score is generated; the region suspicion scores of each business field area are aggregated to obtain the tampering suspicion score of the logistics receipt image; the tampering judgment result, the position of the candidate tampered area in the standard coordinate space, the business field to which it belongs, and the abnormal evidence type involved in the judgment are output.
[0023] Secondly, the present invention provides an automatic detection system for tampering of logistics return receipt images, comprising: The image acquisition and preprocessing module is used to acquire and preprocess the logistics receipt images to be inspected. The template storage and registration module is used to store the return receipt template, register the preprocessed logistics return receipt image to the standard coordinate space of the return receipt template, and output the business field area and stable reference area. The shooting disturbance estimation module is used to extract shooting quality features from a stable reference area and generate shooting disturbance state; The residual anomaly generation module is used to extract the actual feature response of the business field area according to the field detection rules, generate the expected feature response based on the shooting disturbance calibration relationship and the shooting disturbance state, and generate a local residual anomaly map. The spatial correlation module is used to map the local residual abnormality maps of different detection mechanisms to the standard coordinate space and form candidate tampering regions according to the spatial correlation conditions; The verification and output module is used to determine the outer reference zone of the candidate tampered area, verify the candidate tampered area based on the residual difference constant of the candidate tampered area and the outer reference zone, generate the tampering suspicion score, and output the tampering judgment result, area location and abnormal evidence type.
[0024] Compared with the prior art, the present invention has the following beneficial effects.
[0025] This invention obtains the shooting disturbance state of the current logistics receipt image through a stable reference region, and generates the expected feature response of the business field region based on the shooting disturbance state. This enables the local residual abnormal map used in subsequent detection to represent the difference between the actual feature response and the expected response under the current shooting conditions, thereby reducing the feature changes caused by illumination, blur, noise and compression changes from directly entering the tampering detection results.
[0026] This invention uses field detection rules to enable different feature combinations for business fields with different image structures, thus avoiding the inclusion of features unrelated to the current business field structure in the scoring.
[0027] This invention maps local residual anomaly maps obtained by different detection mechanisms to the same standard coordinate space, and forms candidate tampering regions through the overlapping and boundary relationships of the anomaly regions, thereby creating spatial constraint relationships between multiple types of detection evidence.
[0028] This invention utilizes a reference band surrounding the candidate tampered area for verification. When both the candidate tampered area and its surrounding area are affected by changes in image quality, the corresponding area is excluded from the tampered candidate results; when anomalies are concentrated in the candidate tampered area, the candidate tampered area is retained, thereby forming a locatable and verifiable detection result. Attached Figure Description
[0029] Figure 1 This is a flowchart illustrating the overall steps of the method of the present invention. Detailed Implementation
[0030] The technical solution of the present invention will be further described below. It should be understood that the described embodiments are for illustrating the present invention, and not for limiting the scope of protection of the present invention.
[0031] Regarding the process of "acquiring the logistics receipt image to be detected and preprocessing it, registering the preprocessed logistics receipt image to the standard coordinate space of the receipt template, sequentially generating the shooting disturbance state, local residual abnormal image, candidate tampering area and verified candidate tampering area, and outputting the tampering judgment result, area location and abnormal evidence type", in one embodiment, this method is executed by a logistics information management platform server, an image review terminal or other devices with image processing capabilities.
[0032] First, the logistics receipt image to be detected is acquired. This image can be captured and uploaded by a mobile terminal or acquired and input by a scanning device. After acquiring the logistics receipt image, grayscale correction, noise suppression, and orientation correction are performed to obtain a preprocessed logistics receipt image. This preprocessing is used to reduce the impact of overall grayscale differences, random noise, and image tilt on subsequent layout registration, and does not directly generate a tampering judgment result during the preprocessing stage.
[0033] The system reads the return receipt template that matches the logistics return receipt to be inspected, and registers the preprocessed logistics return receipt image to the standard coordinate space of the return receipt template. The standard coordinate space is a unified image coordinate space established by the outer frame, table lines, and fixed printed content of the return receipt template, used to ensure that logistics return receipts of the same template with different shooting angles and image sizes have a unified regional position and scale representation.
[0034] The receipt template includes a business field area, a stable reference area, field detection rules, and a shooting disturbance calibration relationship. The business field area refers to the image area that needs to be tampered with, including the goods name area, goods quantity area, receipt date area, recipient's signature area, and seal area. The stable reference area refers to the area that does not carry variable business content and is used to characterize the current image shooting quality, including the outer frame, table intersections, fixed printed labels, and unfilled paper areas. The field detection rules are used to record the applicable feature types, spatial association conditions, and regional feature weights for each business field area. The shooting disturbance calibration relationship is used to represent the expected feature response that the tamper-free business field area should present under different shooting disturbance states.
[0035] After layout registration is completed, image quality features are extracted from each stable reference region. Based on the image quality features of each stable reference region and its position in standard coordinate space, the image perturbation state of the logistics return image to be inspected is generated. The image perturbation state is used to describe the brightness changes, blur changes, noise changes, and compression changes generated during the image acquisition process that can affect multiple image regions.
[0036] For each business field region, the field detection rules for that business field region are read, and two types of actual feature responses are selected from edge structure feature response, character morphology feature response, and local texture feature response according to the field detection rules. Based on the shooting disturbance state of the current logistics receipt image, the position of the business field region in the standard coordinate space, and the shooting disturbance calibration relationship, the expected feature responses for each of the two types of actual feature responses are generated.
[0037] The actual feature response of the business field region is compared with the expected feature response under the current shooting disturbance state to obtain two types of local residual anomaly maps. The local residual anomaly map is used to represent local differences in the actual feature response that cannot be explained by the current shooting disturbance state, so that common changes caused by shooting and abnormal changes caused by local editing can be distinguished in subsequent processing.
[0038] The two types of local residual anomaly maps are mapped to a standard coordinate space, and abnormal regions are extracted from each type of local residual anomaly map. Based on the spatial association conditions recorded in the field detection rules, the overlap and boundary relationships of the two types of abnormal regions are judged to form candidate tampering regions. Therefore, abnormal regions that appear alone and are not spatially associated with another detection mechanism are not directly used as evidence of tampering.
[0039] For each candidate tampered region, a peripheral reference band is determined within the current service field area surrounding the candidate tampered region. Using the same shooting perturbation state, shooting perturbation calibration relationship, and feature processing method as the candidate tampered region, the residual constants of the candidate tampered region and the peripheral reference band are calculated respectively.
[0040] When the residual differential constant of the candidate tampered region exceeds the candidate threshold, while the residual differential constant of the outer reference band does not exceed the reference threshold, it indicates that the anomaly is mainly concentrated in the candidate tampered region, and the candidate tampered region is retained. When the residual differential constants of both the candidate tampered region and the outer reference band exceed their respective thresholds, and the direction of change of both is consistent with the direction of change represented by the shooting disturbance state, the candidate tampered region is recorded as a shooting quality abnormality region and is excluded from the tampering candidate results.
[0041] Based on the residual constants, area, spatial correlation between the two types of abnormal regions, and the region feature weights recorded in the field detection rules for the reviewed candidate tampered regions, a region suspicion score is generated. The region suspicion scores for each business field region are aggregated to obtain the tampering suspicion score for the logistics receipt image, and the tampering determination result is output based on the tampering suspicion score. The output also includes the location of the reviewed candidate tampered regions in standard coordinate space, the business field to which the candidate tampered regions belong, and the type of abnormal evidence involved in the determination.
[0042] Furthermore, regarding the "construction of the receipt template," in one embodiment, sample images of logistics receipts, confirmed to be tamper-proof and taken under different lighting, clarity, compression, and shooting angle conditions, are collected. Each sample image undergoes the same preprocessing and registration as the logistics receipt image to be detected, transforming each sample image to the same standard coordinate space.
[0043] In standard coordinate space, the areas for goods name, quantity, receipt date, signature, and seal are marked to form the business field area. The outer frame, table intersections, fixed printed labels, and unfilled paper areas are marked to form stable reference areas. These stable reference areas are distributed throughout the logistics receipt layout to reflect changes in image quality due to photographic disturbances at different locations.
[0044] For each logistics receipt sample image, shooting quality features are extracted from a stable reference region to generate the shooting perturbation state of that logistics receipt sample image; edge structure feature response, character morphology feature response, and local texture feature response are extracted from each business field region. The shooting perturbation state, business field region location, and feature response of each logistics receipt sample image are combined to form calibration data.
[0045] Based on the calibration data, a shooting disturbance calibration relationship is established between the shooting disturbance state, the location of the service field region, and the expected feature response. In one embodiment, the shooting disturbance calibration relationship is implemented using a calibration data table, which divides the shooting disturbance state into multiple state intervals and records the feature response distribution of each service field region under each state interval. In another embodiment, the shooting disturbance calibration relationship is implemented using a regression mapping relationship, with the shooting disturbance state and the location of the service field region as inputs, and the expected feature response in the unaltered state as the output.
[0046] Based on the image structure of each business field, the applicable feature types are determined, and the spatial correlation conditions and regional feature weights between the two types of features are recorded, thereby forming field detection rules. The completed return receipt template serves as the common data foundation for registration, shooting disturbance estimation, and local residual anomaly calculation of the logistics return receipt images to be detected.
[0047] Furthermore, regarding "the preprocessing and registration includes grayscale correction, noise suppression, and rotation correction of the logistics receipt image, and re-registration or termination of detection based on the registration residual," in one embodiment, the color logistics receipt image is converted into a grayscale image, and the grayscale image is filtered to reduce the impact of random noise on the fixed printing edge and registration anchor point extraction.
[0048] Extract table lines or document outlines from the filtered image, determine the image's main orientation, and perform rotation correction based on this orientation. The rotated and corrected table line orientation is then aligned with the table line orientation in the order template, providing an initial orientation for subsequent spatial transformations.
[0049] The table intersections, outer frame corners, and fixed printed label outlines are extracted from the rotated and corrected logistics receipt image as registration anchor points to be detected, and the corresponding template anchor points are read from the receipt template. Based on the matching relationship between the registration anchor points to be detected and the template anchor points, the spatial transformation relationship is calculated, and the logistics receipt image is mapped to a standard coordinate space.
[0050] After completing the spatial transformation, the positional differences between the registration anchor points to be detected and the template anchor points are calculated, and registration residuals are generated based on these differences. If the registration residuals do not exceed the registration threshold, the registered logistics receipt image and the coordinates of the business field areas are output. If the registration residuals exceed the registration threshold, mismatched anchor points with positional differences exceeding the anchor point error threshold are excluded, and the spatial transformation relationship is recalculated using the retained registration anchor points.
[0051] If the recalculated registration residual still exceeds the registration threshold, it indicates that the current image has occlusion, cropping, or geometric distortion that affects region-level comparison. An abnormal image quality result is output, and the tamper detection of the current logistics receipt image is terminated. Controlling the detection process through registration residuals can prevent edge anomalies generated by registration position deviations from being used as evidence of tampering.
[0052] Furthermore, regarding the "image quality features including brightness distribution features, edge extension features, high-frequency noise features, and compressed block boundary features," in one embodiment, the average brightness, brightness gradient, and local contrast are extracted from each stable reference region to form brightness distribution features; the edge extension width and gradient attenuation are extracted from the fixed printing edge to form edge extension features; low-frequency brightness components are removed from the unfilled paper area and high-frequency residuals are extracted to form high-frequency noise features; and the response at the boundary of the regular block is extracted from the area with gentle grayscale changes to form compressed block boundary features.
[0053] The image quality features of each stable reference region are arranged according to their position in the standard coordinate space. The image quality features of the same type in each stable reference region are compared. If the feature value of a certain stable reference region exceeds the reference anomaly range determined by the untampered samples, and its direction of change is inconsistent with other stable reference regions, that stable reference region is excluded from the calculation process of the current image disturbance state.
[0054] Spatial interpolation is performed based on the location of the preserved stable reference area and the shooting quality characteristics to generate brightness perturbation distribution, blur perturbation distribution, noise perturbation distribution, and compression perturbation distribution. These four perturbation distributions together constitute the shooting perturbation state and are used to determine the expected feature response of each service field region under the current shooting conditions.
[0055] Furthermore, regarding "the field detection rule selects two different types of features for different business field areas", in one embodiment, the goods name area, goods quantity area, and receipt date area contain printed characters or rule-filled characters, and their tampering traces are mainly manifested as changes in character boundaries and changes in character shape. Therefore, the field detection rule selects edge structure feature response and character shape feature response for the above-mentioned business field areas.
[0056] The recipient's signature area contains continuous handwritten strokes and the paper texture around the strokes, while the stamp area contains a closed outline, internal text lines, and ink texture. Local overlays, splicing, or erasure marks can simultaneously cause changes in edges and textures. Therefore, the field detection rule selects edge structure feature responses and local texture feature responses for the recipient's signature area and stamp area.
[0057] Each field detection rule also records the abnormal region segmentation threshold, overlap threshold, distance threshold, and region feature weights for the two selected feature types. Features not selected by the field detection rule do not participate in the generation of candidate tampered regions or the calculation of region suspicion scores for the current business field region, thereby preventing features unrelated to the image structure of the current business field from entering the detection results.
[0058] Furthermore, regarding "the edge structure feature response, character shape feature response, and local texture feature response", in one embodiment, the edge structure feature response is generated based on the expected edge path and expected edge direction recorded in the order template.
[0059] Edge extraction is performed on the business field region, and the actual edges are mapped to a standard coordinate space. The break location, break length, direction deviation, and positional deviation of the actual edges are statistically analyzed along the expected edge path. Based on the fuzzy perturbation distribution in the shooting disturbance state, the expected expansion width and expected gradient attenuation degree of the fixed edge under the current shooting conditions are determined. The actual edge response is compared with the expected edge response to obtain a local residual anomaly map of the edge.
[0060] The character morphological feature response obtains the position of each character within the business field area through optical character recognition. For each character, the stroke width, character height, character width, and aspect ratio are extracted. Based on the fuzzy perturbation distribution, registration scale, and shooting perturbation calibration relationship in the shooting perturbation state, the expected character morphological feature response under the current shooting conditions is generated. The actual character morphological feature response is compared with the expected character morphological feature response, and the comparison result is mapped to the character's location to obtain a local residual anomaly map of the character.
[0061] The local texture feature response is obtained by dividing the business field region into multiple local blocks and extracting the texture feature vector of each local block. In one embodiment, a local binary mode histogram is used to represent the texture feature vector of the local block, and the distance between the texture feature vectors of adjacent local blocks is calculated. Based on the noise disturbance distribution, compression disturbance distribution, and shooting disturbance calibration relationship in the shooting disturbance state, the expected texture feature response under the current shooting conditions is generated. The actual texture feature response is compared with the expected texture feature response to obtain a local texture residual anomaly map.
[0062] For the k-th feature of the i-th business field region, the actual feature response is denoted as Fi,k, and the expected feature response under the current shooting conditions is denoted as... i,k. The desired feature response is generated by the shooting disturbance calibration relationship based on the shooting disturbance state G and the service field region location pi, that is: i,k = Φi,k (G, pi).
[0063] Where Φi,k represents the shooting perturbation calibration relationship of the k-th type of feature in the i-th business field region. The local residual anomaly map Ri,k between the actual feature response and the expected feature response is represented as: Ri,k(x,y)=|Fi,k(x,y)- i,k(x,y)|.
[0064] Where x and y represent positions in standard coordinate space. The local residual anomaly map serves as input for subsequent anomaly region segmentation and spatial correlation.
[0065] Furthermore, regarding "the spatial association conditions include calculating the overlap area ratio and boundary distance of the two types of abnormal regions", in one embodiment, the two types of local residual abnormal maps are segmented according to the abnormal region segmentation threshold recorded in the field detection rules to obtain the first abnormal region and the second abnormal region.
[0066] For a combination of edge local residual anomaly maps and character local residual anomaly maps, the character local residual anomaly region is mapped to the image range of the corresponding character, and it is determined whether the edge local residual anomaly region is located within the character range or near the boundary of the character range. For a combination of edge local residual anomaly maps and texture local residual anomaly maps, it is determined whether the edge local residual anomaly region overlaps with the texture local residual anomaly region, or whether it is continuously distributed along the boundary of the texture local residual anomaly region.
[0067] Calculate the overlap ratio of the first and second anomalous regions, and calculate the distance between the boundaries of the two types of anomalous regions. When the overlap ratio is not lower than the overlap threshold recorded in the field detection rules, and the boundary distance does not exceed the distance threshold recorded in the field detection rules, merge the common coverage area of the two types of anomalous regions and the anomalous boundary area continuous with the common coverage area to form a candidate tampered region.
[0068] When the two types of anomalous regions do not meet the spatial correlation conditions, isolated anomalous regions are not directly identified as candidate tampering regions. This ensures that the anomalous results obtained by different detection mechanisms form positional constraints in the same standard coordinate space, rather than simply being numerically weighted.
[0069] Furthermore, regarding "the outer reference band is formed by extending outward along the boundary of the candidate tampering area", in one embodiment, the outer reference band is formed by extending outward according to the boundary of the candidate tampering area, and the candidate tampering area, the image portion that does not belong to the current business field area, and the image portion that overlaps with other candidate tampering areas are excluded from the extension result.
[0070] The outer reference band is used to characterize the local image state around the candidate tampered region under the same shooting conditions. For both the candidate tampered region and the outer reference band, the same shooting perturbation state, shooting perturbation calibration relationship, and field detection rules are used to calculate the residual constants of the two types of features respectively.
[0071] When the residual constant of the candidate tampered region exceeds the candidate threshold, while the residual constant of the outer reference zone does not exceed the reference threshold, it indicates that the anomaly is mainly concentrated in the candidate tampered region. The candidate tampered region is retained and used as the input for calculating the region suspicion score.
[0072] When the residual constants of both the candidate tampered region and the outer reference band exceed their respective thresholds, and the direction of change of both is consistent with the direction of change of brightness, blur, noise, or compression characterized by the shooting disturbance state, the candidate tampered region is recorded as an abnormal shooting quality region and excluded from the tampered candidate results. By using the verification result of the outer reference band as the input condition for subsequent scoring steps, large-scale shooting quality changes are avoided from being identified as local tampering.
[0073] Furthermore, regarding "generating a region suspicion score and a tampering suspicion score based on the reviewed candidate tampering regions", in one embodiment, for each reviewed candidate tampering region, the residual difference constants of the two types of local residual anomaly maps within the candidate tampering region are calculated, the proportion of the area of the candidate tampering region to the area of the corresponding business field region is calculated, and the overlap area ratio of the two types of abnormal regions is calculated.
[0074] The residual constants, regional area ratios, and overlapping area ratios are normalized. Based on the regional feature weights recorded in the field detection rules, the normalized results are weighted and combined to obtain the region suspicion score for the verified candidate tampered regions.
[0075] The suspected scores of each verified candidate tampering area within the same business field area are aggregated to obtain the business field suspected score; then, the business field suspected scores are aggregated according to the regional feature weights of each business field area to obtain the tampering suspected score of the logistics receipt image.
[0076] The suspected tampering score is compared with a judgment threshold determined from confirmed samples to generate a tampering judgment result for the logistics receipt image. The output includes the tampering judgment result, the coordinates of the verified candidate tampered areas in standard coordinate space, the business field to which the candidate tampered areas belong, the type of abnormal evidence involved in the judgment, and the corresponding area suspected score. The aforementioned area location and abnormal evidence type serve as input for subsequent verification processes.
[0077] Regarding the "Automatic Detection System for Tampering of Logistics Receipt Images", in one embodiment, the system includes an image acquisition and preprocessing module, a template storage and registration module, a shooting disturbance estimation module, a residual anomaly generation module, a spatial correlation module, and a verification and output module.
[0078] The image acquisition and preprocessing module is used to receive logistics receipt images, perform grayscale correction, noise suppression and rotation correction on the logistics receipt images, and send the preprocessed logistics receipt images to the template storage and registration module.
[0079] The template storage and registration module stores return receipt templates, receives preprocessed logistics return receipt images, registers the logistics return receipt images to a standard coordinate space, and outputs the registered logistics return receipt image, business field area, and stable reference area. The template storage and registration module also calculates registration residuals and controls re-registration or termination of detection based on the registration residuals.
[0080] The shooting disturbance estimation module is used to receive a stable reference area, extract shooting quality features from the stable reference area, generate brightness disturbance distribution, blur disturbance distribution, noise disturbance distribution and compression disturbance distribution, and send the shooting disturbance state composed of the above disturbance distributions to the residual abnormality generation module.
[0081] The residual anomaly generation module is used to receive the business field region, shooting disturbance status, field detection rules and shooting disturbance calibration relationship, extract two types of actual feature responses of the business field region, generate two types of expected feature responses, compare the actual feature responses with the expected feature responses, and output two types of local residual anomaly maps.
[0082] The spatial association module receives two types of local residual anomaly maps, maps the two types of local residual anomaly maps to the standard coordinate space, calculates the overlapping area ratio and boundary distance of the abnormal region according to the spatial association conditions recorded in the field detection rules, and outputs candidate tampered regions.
[0083] The verification and output module is used to receive candidate tampering areas and shooting disturbance status, determine the outer reference zone of the candidate tampering area, calculate the residual difference constant of the candidate tampering area and the outer reference zone, retain the verified candidate tampering areas or exclude areas with abnormal shooting quality based on the comparison results, generate area suspicion score and tampering suspicion score based on the verified candidate tampering areas, and output the tampering judgment result, area location and abnormal evidence type.
[0084] Each module of the system executes the automatic detection method for tampering of logistics return receipt images according to the aforementioned data transmission relationship. Each module can be implemented by a processor executing program instructions in memory, or by hardware circuits with corresponding image processing functions. The specific implementation does not constitute a limitation on the scope of protection of this invention.
Claims
1. An automatic detection method for tampering of logistics return receipt images, characterized in that, include: The process involves acquiring and preprocessing the logistics receipt image to be inspected, then registering the preprocessed image to the standard coordinate space of a receipt template. This template includes a business field region, a stable reference region, field detection rules, and a shooting disturbance calibration relationship. The field detection rules record the applicable feature types, spatial association conditions, and region feature weights for each business field region. Shooting quality features are extracted from the stable reference region, and a shooting disturbance state of the logistics receipt image to be inspected is generated based on these features. For each business field region, two types of actual feature responses are extracted from edge structure feature responses, character morphology feature responses, and local texture feature responses according to the field detection rules. A shooting disturbance state is then generated based on the shooting disturbance calibration relationship and the shooting disturbance state. The expected feature responses of two types of actual feature responses are described. The actual feature responses are compared with the expected feature responses to obtain two types of local residual abnormality maps. The two types of local residual abnormality maps are mapped to the standard coordinate space, and candidate tampering regions are formed according to the spatial association conditions. An outer reference zone surrounding the candidate tampering regions is determined. Under the same shooting disturbance state, the residual constants of the candidate tampering regions and the outer reference zone are compared. When the residual constant of the candidate tampering regions exceeds the candidate threshold and the residual constant of the outer reference zone does not exceed the reference threshold, the verified candidate tampering regions are retained. A tampering suspicion score is generated based on the region feature weights and the verified candidate tampering regions, and the tampering judgment result, region location, and abnormal evidence type are output.
2. The automatic detection method for tampering of logistics receipt images according to claim 1, characterized in that, The construction of the return receipt template includes: collecting sample images of logistics return receipts that have been confirmed to be tamper-proof and are under different lighting, clarity, compression, and shooting angle conditions; registering the sample images of logistics return receipts to the same standard coordinate space; labeling the business field area and stable reference area; extracting the shooting disturbance state and the actual feature response of the business field area of each logistics return receipt sample image; establishing the shooting disturbance calibration relationship between the shooting disturbance state, the position of the business field area, and the expected feature response; and determining the applicable feature type, spatial association conditions, and regional feature weights based on the image structure of the business field.
3. The automatic detection method for tampering of logistics return receipt images according to claim 1, characterized in that, The preprocessing and registration process includes: performing grayscale correction, noise suppression, and rotation correction on the logistics receipt image; extracting table intersections, outer frame corners, and fixed printed label outlines as registration anchor points; calculating spatial transformation relationships based on the registration anchor points; generating registration residuals based on the positional differences between the registration anchor points after spatial transformation and the template anchor points; when the registration residuals exceed the registration threshold, excluding mismatched anchor points and recalculating the spatial transformation relationships; if the recalculated registration residuals still exceed the registration threshold, outputting an image quality anomaly result and terminating tamper detection.
4. The automatic detection method for tampering of logistics receipt images according to claim 1, characterized in that, The shooting quality features include brightness distribution features, edge expansion features, high-frequency noise features, and compression block boundary features. Based on the position of each stable reference region in the standard coordinate space, outlier elimination and spatial interpolation are performed on the shooting quality features of each stable reference region to generate brightness perturbation distribution, blur perturbation distribution, noise perturbation distribution, and compression perturbation distribution, which constitute the shooting perturbation state.
5. The automatic detection method for tampering of logistics receipt images according to claim 1, characterized in that, The field detection rules include: for the goods name area, goods quantity area, and receipt date area, selecting edge structure feature response and character shape feature response; for the signature area and seal area, selecting edge structure feature response and local texture feature response; and recording spatial association conditions and regional feature weights for the two types of features selected, respectively.
6. The automatic detection method for tampering of logistics receipt images according to claim 1, characterized in that, The edge structure feature response characterizes the break position, direction deviation, and position deviation of the actual edge based on the expected edge path and expected edge direction recorded in the receipt template; the character morphology feature response characterizes the stroke width, character height, character width, and aspect ratio of the character based on the character position obtained by optical character recognition; the local texture feature response characterizes the business field area by dividing it into blocks and comparing the texture feature vectors of adjacent blocks.
7. The automatic detection method for tampering of logistics return receipt images according to claim 1, characterized in that, The spatial association conditions include: segmenting the two types of local residual abnormal maps into abnormal regions; calculating the overlap area ratio and boundary distance of the two types of abnormal regions; when the overlap area ratio is not lower than the overlap threshold and the boundary distance does not exceed the distance threshold, determining the common coverage area of the two types of abnormal regions and the abnormal boundary area continuous with the common coverage area as candidate tampering regions.
8. The automatic detection method for tampering of logistics receipt images according to claim 1, characterized in that, The outer reference band is formed by extending outward along the boundary of the candidate tampering region, excluding the candidate tampering region and image portions that do not belong to the current business field region; the outer reference band adopts the same shooting disturbance state and feature processing method as the candidate tampering region; When the residual difference constant of the candidate tampered region exceeds the candidate threshold and the residual difference constant of the outer reference band does not exceed the reference threshold, the candidate tampered region is retained; when the residual difference constant of both the candidate tampered region and the outer reference band exceeds their respective thresholds, the candidate tampered region is recorded as an area with abnormal shooting quality and is excluded from the tampered candidate results.
9. The automatic detection method for tampering of logistics receipt images according to claim 1, characterized in that, Based on the residual constants, area, overlap ratio of the two types of abnormal areas, and regional feature weights of the reviewed candidate tampered areas, a region suspicion score is generated; the region suspicion scores of each business field area are aggregated to obtain the tampering suspicion score of the logistics receipt image; the tampering judgment result, the position of the candidate tampered area in the standard coordinate space, the business field to which it belongs, and the abnormal evidence type involved in the judgment are output.
10. An automatic detection system for tampering of logistics receipt images, used to execute the automatic detection method for tampering of logistics receipt images as described in any one of claims 1 to 9, characterized in that, include: The image acquisition and preprocessing module is used to acquire and preprocess the logistics receipt images to be inspected. The template storage and registration module is used to store the return receipt template, which includes the business field area, the stable reference area, the field detection rules, and the shooting disturbance calibration relationship. It registers the preprocessed logistics return receipt image to the standard coordinate space of the return receipt template and outputs the business field area and the stable reference area. The shooting disturbance estimation module is used to extract shooting quality features from a stable reference area and generate a shooting disturbance state based on the shooting quality features; the residual anomaly generation module is used to extract the actual feature response of the business field area according to the field detection rules, generate the expected feature response according to the shooting disturbance calibration relationship and the shooting disturbance state, and compare the actual feature response with the expected feature response to generate a local residual anomaly map; the spatial association module is used to map the local residual anomaly maps of different detection mechanisms to a standard coordinate space and form candidate tampering regions according to the spatial association conditions recorded in the field detection rules. The verification and output module is used to determine the outer reference zone of the candidate tampered area, verify the candidate tampered area based on the residual difference constant of the candidate tampered area and the outer reference zone, generate the tampering suspicion score, and output the tampering judgment result, area location and abnormal evidence type.
Citation Information
Patent Citations
Audit-oriented image tampering detection method, system and equipment and storage medium
CN116935200A