Image tampering detection method and device

By fusing SURF feature points and Haar wavelet features based on the SLIC superpixel segmentation algorithm, the image tamper detection method is improved, and the problems of low detection accuracy and high time complexity in the prior art are solved, thereby achieving more efficient and accurate image tamper detection.

CN119904645APending Publication Date: 2025-04-29CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311406728.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The detection accuracy of existing digital image tamper detection methods is limited and have high time complexity, especially when the image resolution is low or after scaling operations, the detection accuracy is low.

Method used

An improved F-SLIC algorithm is proposed, combining SURF feature points and Haar wavelet features, and pre-segment of the image to be tested, judging no feature blocks, fusing no feature blocks, calculating distance values ​​and merging no feature blocks, and finally image tamper detection is performed based on superpixel blocks.

Benefits of technology

It effectively reduces the time complexity of overall image detection, improves the accuracy of detection results, and ensures the robustness of image tamper detection algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904645A_ABST
    Figure CN119904645A_ABST
Patent Text Reader

Abstract

The invention provides an image tampering detection method and device, and solves the problems of limited detection precision and relatively high time complexity at present. The image tampering detection method comprises the following steps: step 01, extracting feature points of an image to be detected; step 02, carrying out pre-segmentation on the image to be detected so as to obtain super-pixel blocks; 03, judging whether the superpixel blocks are non-feature blocks or not, and fusing all the non-feature blocks; step 04, obtaining a distance value based on other super-pixel blocks except for the non-feature block and the feature information of the super-pixel blocks; step 05, on the basis of the distance value, combining adjacent feature-free blocks into a super-pixel block; step 06, repeating the steps 03 to 05 until the steps 03 to 05 cannot be repeated, and finally obtaining a superpixel block; and 07, carrying out image tampering detection based on the finally obtained super-pixel block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital image forensics, and in particular to an image tampering detection method and device. Background Art

[0002] At present, there are three main types of digital image copy and paste tampering detection methods: image block-based detection methods, feature point-based detection methods, and segmentation-based detection methods. The detection method based on image blocks is to divide the image into blocks and use the image blocks for tampering detection. The accuracy of the tampering detection results obtained by this type of method is limited, especially when the image is scaled and other operations are performed, the detection accuracy is low; the detection method based on feature points mainly uses feature extraction algorithms to extract features such as corner points or extreme points in the image, and then processes and matches the extracted feature vectors to identify the image tampering area. The most classic detection methods of this type are: Scale-invariant feature transform (SIFT) algorithm, and the speeded uprobust feature (SURF) algorithm improved on the basis of the SIFT algorithm. This type of method is not ideal for image detection with low image resolution; the third type of copy and paste tampering detection method based on segmentation is to use a superpixel segmentation algorithm to divide the detection image into irregular and non-overlapping superpixel blocks, and complete the image tampering detection on this basis. At present, the detection algorithm based on segmentation relies on common superpixel segmentation algorithms such as SLIC, SEEDS, LSC, etc., and directly uses the superpixel segmentation method for image detection, which has limited detection accuracy and high time complexity. Summary of the invention

[0003] In view of this, the present invention provides an image tampering detection method and device, which solves the current problems of limited detection accuracy and high time complexity.

[0004] In a first aspect, an embodiment of the present invention provides an image tampering detection method, comprising:

[0005] Step 01: Extract feature points of the image to be tested;

[0006] Step 02: Pre-segment the image to be tested to obtain super pixel blocks;

[0007] Step 03: Determine whether the super pixel block is a featureless block, and merge all featureless blocks;

[0008] Step 04: Based on the feature information of other super pixel blocks and super pixel blocks other than the featureless block, a distance value is obtained;

[0009] Step 05: Based on the distance value, adjacent featureless blocks are merged into a super pixel block;

[0010] Step 06: Repeat steps 03 to 05 until no more repetitions are possible, and finally a superpixel block is obtained;

[0011] Step 07: Perform image tampering detection based on the final superpixel block.

[0012] In one implementation, the extracting of feature points of the image to be tested includes: extracting accelerated robust feature points of the image to be tested, and while extracting the feature points, classifying and calculating related Haar wavelet features according to structural features.

[0013] In one embodiment, the pre-segmenting the image to be tested to obtain superpixel blocks includes: using a SLIC superpixel segmentation algorithm to divide the image to be tested into regular blocks of the same size using N grids, where N>0.

[0014] In one embodiment, it also includes: defining the average number of feature points in every preset number of pixels in a super pixel block as a threshold.

[0015] In one embodiment, determining whether the superpixel block is a featureless block includes determining whether the number of feature points in all the superpixel blocks and surrounding adjacent blocks is greater than the threshold; if so, the superpixel block is a featureless block.

[0016] In one embodiment, obtaining the distance value based on other superpixel blocks other than the featureless block and the feature information of the superpixel block includes: substituting the other superpixel blocks other than the featureless block into the distance formula to which the feature information of the superpixel block is added to obtain the distance value.

[0017] In one implementation, the distance formula is a distance formula having Haar wavelet feature information of the superpixel block.

[0018] In a second aspect, an embodiment of the present invention provides an image tampering detection device, comprising:

[0019] An extraction module, used for extracting feature points of the image to be tested;

[0020] A segmentation module, used for pre-segmenting the image to be tested to obtain super pixel blocks;

[0021] A judging module, used for judging whether the super pixel block is a featureless block;

[0022] Fusion module, used to fuse all featureless blocks;

[0023] A data processing module, used for obtaining a distance value based on other super pixel blocks and feature information of the super pixel blocks other than the featureless block;

[0024] A merging module, used for merging adjacent featureless blocks into a super pixel block based on the distance value;

[0025] The tampering detection module is used to perform image tampering detection based on the final super pixel block.

[0026] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the image tampering detection method as described above.

[0027] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement the image tampering detection method as described above.

[0028] An image tampering detection method and device in the present invention combines SURF feature points to propose an improved F-SLIC algorithm. On the basis of the SLIC superpixel segmentation algorithm, SURF feature points are fused to merge superpixel blocks with sparse feature points, and Haar wavelet features are introduced to calculate the distance of superpixel blocks, thereby effectively reducing the time complexity of overall image detection, improving the accuracy of detection results, and ensuring the robustness of the image tampering detection algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 Shown is a flow chart of an image tampering detection method provided by an embodiment of the present invention.

[0030] Figure 2 FIG. 4 is a schematic diagram of the structure of an image tampering detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] Embodiment 1:

[0033] Figure 1 Shown is a flow chart of an image tampering detection method provided by an embodiment of the present invention.

[0034] This embodiment provides an image tampering detection method, such as Figure 1 As shown in the figure, in order to solve the problem that the SLIC algorithm does not combine feature points, the image tampering detection accuracy is limited and the time complexity is high, an F-SLIC algorithm combined with SURF feature points is proposed. The image tampering detection method includes:

[0035] Step 01: Extract feature points of the image to be tested;

[0036] Step 02: Pre-segment the image to be tested to obtain super pixel blocks;

[0037] Step 03: Determine whether the super pixel block is a featureless block, and merge all featureless blocks;

[0038] Step 04: Based on the feature information of other super pixel blocks and super pixel blocks other than the featureless block, a distance value is obtained;

[0039] Step 05: Based on the distance value, adjacent featureless blocks are merged into a super pixel block;

[0040] Step 06: Repeat steps 03 to 05 until no more repetitions are possible, and finally a superpixel block is obtained;

[0041] Step 07: Perform image tampering detection based on the final superpixel block.

[0042] At present, segmentation-based detection algorithms rely on common superpixel segmentation algorithms such as SLIC, SEEDS, LSC, etc. Directly using superpixel segmentation methods for image detection has limited detection accuracy and high time complexity. The image tampering detection method provided in this embodiment, combined with SURF feature points, proposes an improved F-SLIC algorithm. On the basis of the SLIC superpixel segmentation algorithm, SURF feature points are fused to merge superpixel blocks with sparse feature points, and Haar wavelet features are introduced to calculate the distance of superpixel blocks, thereby effectively reducing the time complexity of overall image detection, improving the accuracy of detection results, and ensuring the robustness of the image tampering detection algorithm.

[0043] Embodiment 2:

[0044] Figure 1 Shown is a flow chart of an image tampering detection method provided by an embodiment of the present invention.

[0045] This embodiment provides an image tampering detection method, such as Figure 1As shown in the figure, in order to solve the problem that the SLIC algorithm does not combine feature points, the image tampering detection accuracy is limited and the time complexity is high, an F-SLIC algorithm combined with SURF feature points is proposed. The image tampering detection method includes:

[0046] Step 01: Extract feature points of the image to be tested.

[0047] Specifically, the extracting of feature points of the image to be tested includes: extracting acceleration robustness feature points of the image to be tested, and while extracting the feature points, classifying and calculating related Haar wavelet features according to structural features.

[0048] Step 02: Pre-segment the image to be tested to obtain super pixel blocks.

[0049] Specifically, the pre-segmenting the image to be tested to obtain super pixel blocks includes: using a SLIC super pixel segmentation algorithm and using N grids to divide the image to be tested into regular blocks of the same size, wherein N>0.

[0050] Step 03: Determine whether the superpixel block is a featureless block, and merge all featureless blocks.

[0051] The average number of feature points in every preset number of pixels in a super pixel block is defined as a threshold. Optionally, the average number of feature points in every 256 pixels in an image block is defined as a threshold d.

[0052] Specifically, the determination of whether the superpixel block is a featureless block includes: determining whether the number of feature points in all the superpixel blocks and the surrounding adjacent blocks is greater than the threshold value, and if so, the superpixel block is a featureless block. A featureless block is defined as: the number of feature points in the superpixel block and the surrounding adjacent blocks is not greater than a threshold value d. The size of the threshold value d is set according to the requirements, traverse and determine whether all superpixel blocks are featureless blocks, and merge all featureless blocks.

[0053] Step 04: Based on the feature information of other superpixel blocks and superpixel blocks other than the featureless block, the distance value is obtained.

[0054] For other superpixel blocks other than the featureless block, they are respectively substituted into the distance calculation formula with the feature information of the superpixel block added to calculate the distance value.

[0055] In order to improve the superpixel segmentation accuracy of the image, the F-SLIC algorithm improves the distance calculation formula of the original SLIC algorithm and adds the Haar wavelet feature information of the superpixel block on the basis of the original superpixel block feature dimension. n represents the nth superpixel block, F An (j) indicates A nThe Haar wavelet feature distribution of the feature points in is shown in formula (1):

[0056]

[0057] Where I(i) represents the structural classification to which Haar wavelet feature i belongs; C j Represents the box of each structural feature in the Haar wavelet feature histogram; Z represents the normalization factor for F An (j) is normalized; δ(·) represents the indicator function, indicating whether the structural feature of feature i is in the bin. If so, the value of δ(·) is 1, otherwise it is 0. The uniformity of the structural features in each pixel block is expressed by formula (2):

[0058]

[0059] The larger the value, the more concentrated the Haar wavelet features in the feature histogram of the superpixel block. When all features are concentrated in the same bin, reaches the maximum, at which point its value is 1. The sum of the Haar wavelet structural features of all superpixel blocks F(s) is shown in formula (3):

[0060]

[0061] Combining the original distance formula D(s) of SLIC, we can get a new distance calculation formula, as shown in formula (4):

[0062] E(s)′=γD(s)+βF(s) (4)

[0063] Among them, γ and β are coefficient constants, representing the proportion of each feature in the distance formula.

[0064] Step 05: Based on the distance value, the adjacent featureless blocks are merged into a superpixel block. According to the distance value, the adjacent featureless blocks are merged into a superpixel block.

[0065] Step 06: Repeat step 03 to step 05 until it cannot be repeated any more, and finally obtain a super pixel block; iterate step 03, step 04 and step 05. Each iteration will merge adjacent featureless blocks into a super pixel block according to the distance value, until the number of iterations is reached and the result is output to finally obtain a super pixel block.

[0066] Step 07: Perform image tampering detection based on the final superpixel block.

[0067] At present, segmentation-based detection algorithms rely on common superpixel segmentation algorithms such as SLIC, SEEDS, LSC, etc. Directly using superpixel segmentation methods for image detection has limited detection accuracy and high time complexity. The image tampering detection method provided in this embodiment, combined with SURF feature points, proposes an improved F-SLIC algorithm. On the basis of the SLIC superpixel segmentation algorithm, SURF feature points are fused to merge superpixel blocks with sparse feature points, and Haar wavelet features are introduced to calculate the distance of superpixel blocks, thereby effectively reducing the time complexity of overall image detection, improving the accuracy of detection results, and ensuring the robustness of the image tampering detection algorithm.

[0068] Embodiment three:

[0069] Figure 2 FIG. 4 is a schematic diagram of the structure of an image tampering detection device provided by an embodiment of the present invention.

[0070] This embodiment provides an image tampering detection device 100, such as Figure 2 As shown, the image tampering detection device includes an extraction module 10, a segmentation module 20, a judgment module 30, a fusion module 40, a data processing module 50, a merging module 60 and a tampering detection module 70. Among them:

[0071] The extraction module 10 is used to extract feature points of the image to be tested;

[0072] The segmentation module 20 is used to pre-segment the image to be tested to obtain super pixel blocks;

[0073] The judging module 30 is used to judge whether the super pixel block is a featureless block;

[0074] The fusion module 40 is used to fuse all featureless blocks;

[0075] The data processing module 50 is used to obtain a distance value based on other super pixel blocks and feature information of the super pixel blocks other than the featureless block;

[0076] The merging module 60 is used to merge adjacent featureless blocks into a super pixel block based on the distance value;

[0077] The tampering detection module 70 is used to perform image tampering detection based on the super pixel block finally obtained.

[0078] Furthermore, after the extraction module 10 extracts the feature points of the image to be tested; the segmentation module 20 pre-segments the image to be tested extracted by the extraction module 10 to obtain superpixel blocks; then, the judgment module 30 judges whether the superpixel block is a featureless block; the fusion module 40 fuses all featureless blocks; the data processing module 50 obtains a distance value based on the feature information of other superpixel blocks and superpixel blocks other than the featureless blocks; the merging module 60 merges adjacent featureless blocks into a superpixel block based on the distance value; and the tampering detection module 70 performs image tampering detection based on the finally obtained superpixel block.

[0079] Specifically, the extraction module 10 is also used to extract acceleration robustness feature points of the image to be tested, and while extracting the feature points, classify and calculate the relevant Haar wavelet features according to the structural features.

[0080] Furthermore, the segmentation module 20 is further configured to adopt a SLIC superpixel segmentation algorithm and use N grids to divide the image to be tested into regular blocks of the same size, wherein N>0.

[0081] Further, the average number of feature points in every preset number of pixels in a superpixel block is defined as a threshold. Optionally, the average number of feature points in every 256 pixels in an image block is defined as a threshold d. The judgment module 30 is also used to judge whether the number of feature points in all the superpixel blocks and the surrounding adjacent blocks is greater than the threshold. If so, the superpixel block is a featureless block. Define a featureless block as: the number of feature points in the superpixel block and the surrounding adjacent blocks is not greater than the threshold d. Set the size of the threshold d according to the requirements, traverse and determine whether all superpixel blocks are featureless blocks.

[0082] Furthermore, the data processing module 50 is also used to substitute other super pixel blocks other than the featureless block into the distance calculation formula to which the feature information of the super pixel block is added, and calculate the distance value.

[0083] In order to improve the superpixel segmentation accuracy of the image, the F-SLIC algorithm improves the distance calculation formula of the original SLIC algorithm and adds the Haar wavelet feature information of the superpixel block on the basis of the original superpixel block feature dimension. n represents the nth superpixel block, F An (j) indicates A n The Haar wavelet feature distribution of the feature points in is shown in formula (1):

[0084]

[0085] Where I(i) represents the structural classification to which Haar wavelet feature i belongs; C jRepresents the box of each structural feature in the Haar wavelet feature histogram; Z represents the normalization factor for F An (j) is normalized; δ(·) represents the indicator function, indicating whether the structural feature of feature i is in the bin. If so, the value of δ(·) is 1, otherwise it is 0. The uniformity of the structural features in each pixel block is expressed by formula (2):

[0086]

[0087] The larger the value, the more concentrated the Haar wavelet features in the feature histogram of the superpixel block. When all features are concentrated in the same bin, reaches the maximum, at which point its value is 1. The sum of the Haar wavelet structural features of all superpixel blocks F(s) is shown in formula (3):

[0088]

[0089] Combining the original distance formula D(s) of SLIC, we can get a new distance calculation formula, as shown in formula (4):

[0090] E(s)′=γD(s)+βF(s) (4)

[0091] Among them, γ and β are coefficient constants, representing the proportion of each feature in the distance formula.

[0092] Further, repeat step 03 to step 05 until it can no longer be repeated, and finally obtain a super pixel block; iterate step 03, step 04 and step 05. Each iteration will merge adjacent featureless blocks into a super pixel block according to the distance value, until the number of iterations is reached and the result is output to finally obtain a super pixel block.

[0093] Furthermore, the merging module 60 is further configured to merge adjacent featureless blocks into a super pixel block according to the distance values.

[0094] At present, segmentation-based detection algorithms rely on common superpixel segmentation algorithms such as SLIC, SEEDS, LSC, etc. Directly using superpixel segmentation methods for image detection has limited detection accuracy and high time complexity. The image tampering detection method provided in this embodiment, combined with SURF feature points, proposes an improved F-SLIC algorithm. On the basis of the SLIC superpixel segmentation algorithm, SURF feature points are fused to merge superpixel blocks with sparse feature points, and Haar wavelet features are introduced to calculate the distance of superpixel blocks, thereby effectively reducing the time complexity of overall image detection, improving the accuracy of detection results, and ensuring the robustness of the image tampering detection algorithm.

[0095] Embodiment 4:

[0096] This embodiment provides an electronic device, which may be a mobile phone, a computer or a tablet computer, etc., including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the image tampering detection method described in Embodiment 1 is implemented. It is understood that the electronic device may also include an input / output (I / O) interface and a communication component.

[0097] The processor is used to execute all or part of the steps in the image tampering detection method in Embodiment 1. The memory is used to store various types of data, which may include instructions of any application or method in the electronic device, and data related to the application.

[0098] The processor may be an application specific integrated circuit (ASIC), a digital signal processor (DSP), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components, and is used to execute the image tampering detection method in the first embodiment. Specifically:

[0099] Step 01: Extract feature points of the image to be tested.

[0100] Specifically, the extracting of feature points of the image to be tested includes: extracting acceleration robustness feature points of the image to be tested, and while extracting the feature points, classifying and calculating related Haar wavelet features according to structural features.

[0101] Step 02: Pre-segment the image to be tested to obtain super pixel blocks.

[0102] Specifically, the pre-segmenting the image to be tested to obtain super pixel blocks includes: using a SLIC super pixel segmentation algorithm and using N grids to divide the image to be tested into regular blocks of the same size, wherein N>0.

[0103] Step 03: Determine whether the superpixel block is a featureless block, and merge all featureless blocks.

[0104] The average number of feature points in every preset number of pixels in a super pixel block is defined as a threshold. Optionally, the average number of feature points in every 256 pixels in an image block is defined as a threshold d.

[0105] Specifically, the determination of whether the superpixel block is a featureless block includes: determining whether the number of feature points in all the superpixel blocks and the surrounding adjacent blocks is greater than the threshold value, and if so, the superpixel block is a featureless block. A featureless block is defined as: the number of feature points in the superpixel block and the surrounding adjacent blocks is not greater than a threshold value d. The size of the threshold value d is set according to the requirements, traverse and determine whether all superpixel blocks are featureless blocks, and merge all featureless blocks.

[0106] Step 04: Based on the feature information of other superpixel blocks and superpixel blocks other than the featureless block, the distance value is obtained.

[0107] For other superpixel blocks other than the featureless block, they are respectively substituted into the distance calculation formula with the feature information of the superpixel block added to calculate the distance value.

[0108] In order to improve the superpixel segmentation accuracy of the image, the F-SLIC algorithm improves the distance calculation formula of the original SLIC algorithm and adds the Haar wavelet feature information of the superpixel block on the basis of the original superpixel block feature dimension. n represents the nth superpixel block, F An (j) indicates A n The Haar wavelet feature distribution of the feature points in is shown in formula (1):

[0109]

[0110] Where I(i) represents the structural classification to which Haar wavelet feature i belongs; C j Represents the box of each structural feature in the Haar wavelet feature histogram; Z represents the normalization factor for F An (j) is normalized; δ(·) represents the indicator function, indicating whether the structural feature of feature i is in the bin. If so, the value of δ(·) is 1, otherwise it is 0. The uniformity of the structural features in each pixel block is expressed by formula (2):

[0111]

[0112] The larger the value, the more concentrated the Haar wavelet features in the feature histogram of the superpixel block. When all features are concentrated in the same bin, reaches the maximum, at which point its value is 1. The sum of the Haar wavelet structural features of all superpixel blocks F(s) is shown in formula (3):

[0113]

[0114] Combining the original distance formula D(s) of SLIC, we can get a new distance calculation formula, as shown in formula (4):

[0115]

[0116] Among them, γ and β are coefficient constants, representing the proportion of each feature in the distance formula.

[0117] Step 05: Based on the distance value, the adjacent featureless blocks are merged into a superpixel block. According to the distance value, the adjacent featureless blocks are merged into a superpixel block.

[0118] Step 06: Repeat step 03 to step 05 until it cannot be repeated any more, and finally obtain a super pixel block; iterate step 03, step 04 and step 05. Each iteration will merge adjacent featureless blocks into a super pixel block according to the distance value, until the number of iterations is reached and the result is output to finally obtain a super pixel block.

[0119] Step 07: Perform image tampering detection based on the final superpixel block.

[0120] At present, segmentation-based detection algorithms rely on common superpixel segmentation algorithms such as SLIC, SEEDS, LSC, etc. Directly using superpixel segmentation methods for image detection has limited detection accuracy and high time complexity. The image tampering detection method provided in this embodiment, combined with SURF feature points, proposes an improved F-SLIC algorithm. On the basis of the SLIC superpixel segmentation algorithm, SURF feature points are fused to merge superpixel blocks with sparse feature points, and Haar wavelet features are introduced to calculate the distance of superpixel blocks, thereby effectively reducing the time complexity of overall image detection, improving the accuracy of detection results, and ensuring the robustness of the image tampering detection algorithm.

[0121] The memory described in this embodiment can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0122] Embodiment five:

[0123] This embodiment also provides a computer-readable storage medium. Each functional unit in each embodiment of the present invention may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.

[0124] Based on such understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0125] The aforementioned storage media include: flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, APP application mall, etc. Various media that can store program check codes, on which a computer program is stored, and when the computer program is executed by a processor, the following method steps can be implemented:

[0126] Step 01: Extract feature points of the image to be tested.

[0127] Specifically, the extracting of feature points of the image to be tested includes: extracting acceleration robustness feature points of the image to be tested, and while extracting the feature points, classifying and calculating related Haar wavelet features according to structural features.

[0128] Step 02: Pre-segment the image to be tested to obtain super pixel blocks.

[0129] Specifically, the pre-segmenting the image to be tested to obtain super pixel blocks includes: using a SLIC super pixel segmentation algorithm and using N grids to divide the image to be tested into regular blocks of the same size, wherein N>0.

[0130] Step 03: Determine whether the superpixel block is a featureless block, and merge all featureless blocks.

[0131] The average number of feature points in every preset number of pixels in a super pixel block is defined as a threshold. Optionally, the average number of feature points in every 256 pixels in an image block is defined as a threshold d.

[0132] Specifically, the determination of whether the superpixel block is a featureless block includes: determining whether the number of feature points in all the superpixel blocks and the surrounding adjacent blocks is greater than the threshold value, and if so, the superpixel block is a featureless block. A featureless block is defined as: the number of feature points in the superpixel block and the surrounding adjacent blocks is not greater than a threshold value d. The size of the threshold value d is set according to the requirements, traverse and determine whether all superpixel blocks are featureless blocks, and merge all featureless blocks.

[0133] Step 04: Based on the feature information of other superpixel blocks and superpixel blocks other than the featureless block, the distance value is obtained.

[0134] For other superpixel blocks other than the featureless block, they are respectively substituted into the distance calculation formula with the feature information of the superpixel block added to calculate the distance value.

[0135] In order to improve the superpixel segmentation accuracy of the image, the F-SLIC algorithm improves the distance calculation formula of the original SLIC algorithm and adds the Haar wavelet feature information of the superpixel block on the basis of the original superpixel block feature dimension. n represents the nth superpixel block, F An (j) indicates A n The Haar wavelet feature distribution of the feature points in is shown in formula (1):

[0136]

[0137] Where I(i) represents the structural classification to which Haar wavelet feature i belongs; C j Represents the box of each structural feature in the Haar wavelet feature histogram; Z represents the normalization factor for F An (j) is normalized; δ(·) represents the indicator function, indicating whether the structural feature of feature i is in the box. If so, the value of δ(·) is 1, otherwise it is 0. The degree of uniformity of the structural features in each pixel block is expressed by formula (2):

[0138]

[0139] The larger the value, the more concentrated the Haar wavelet features in the feature histogram of the superpixel block. When all features are concentrated in the same bin, reaches the maximum, at which point its value is 1. The sum of the Haar wavelet structural features of all superpixel blocks F(s) is shown in formula (3):

[0140]

[0141] Combining the original distance formula D(s) of SLIC, we can get a new distance calculation formula, as shown in formula (4):

[0142] E(s)′=γD(s)+βF(s) (4)

[0143] Among them, γ and β are coefficient constants, representing the proportion of each feature in the distance formula.

[0144] Step 05: Based on the distance value, the adjacent featureless blocks are merged into a superpixel block. According to the distance value, the adjacent featureless blocks are merged into a superpixel block.

[0145] Step 06: Repeat step 03 to step 05 until it cannot be repeated any more, and finally obtain a super pixel block; iterate step 03, step 04 and step 05. Each iteration will merge adjacent featureless blocks into a super pixel block according to the distance value, until the number of iterations is reached and the result is output to finally obtain a super pixel block.

[0146] Step 07: Perform image tampering detection based on the final superpixel block.

[0147] At present, segmentation-based detection algorithms rely on common superpixel segmentation algorithms such as SLIC, SEEDS, LSC, etc. Directly using superpixel segmentation methods for image detection has limited detection accuracy and high time complexity. The image tampering detection method provided in this embodiment, combined with SURF feature points, proposes an improved F-SLIC algorithm. On the basis of the SLIC superpixel segmentation algorithm, SURF feature points are fused to merge superpixel blocks with sparse feature points, and Haar wavelet features are introduced to calculate the distance of superpixel blocks, thereby effectively reducing the time complexity of overall image detection, improving the accuracy of detection results, and ensuring the robustness of the image tampering detection algorithm.

[0148] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0149] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0150] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0151] The block diagrams of devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems may be connected, arranged, or configured in any manner.

[0152] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0153] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0154] In the description of the application, the meaning of "multiple" is at least two, for example, two, three, etc., unless otherwise clearly and specifically limited. In the embodiment of the present application, all directional indications (such as up, down, left, right, front, back, top, bottom ...) are only used to explain the relative position relationship, motion conditions, etc. between the components under a certain specific posture (as shown in the drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their deformations are intended to cover non-exclusive inclusions. For example, the process, method, system, product or equipment comprising a series of steps or units are not limited to the steps or units listed, but optionally also include the steps or units not listed, or optionally also include other steps or units inherent to these processes, methods, products or equipment.

[0155] In addition, the reference to "embodiment" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0156] The above is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims. The above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0157] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting image tampering, characterized in that: include: Step 01: Extract feature points of the image to be tested; Step 02: Pre-segment the image to be tested to obtain super pixel blocks; Step 03: Determine whether the super pixel block is a featureless block, and merge all featureless blocks; Step 04: Based on the feature information of other super pixel blocks and super pixel blocks other than the featureless block, a distance value is obtained; Step 05: Based on the distance value, adjacent featureless blocks are merged into a super pixel block; Step 06: Repeat steps 03 to 05 until no more repetitions are possible, and finally a superpixel block is obtained; Step 07: Perform image tampering detection based on the final superpixel block.

2. The image tampering detection method according to claim 1, characterized in that: The extracting feature points of the image to be tested includes: extracting acceleration robustness feature points of the image to be tested.

3. The image tampering detection method according to claim 1, characterized in that: The pre-segmenting of the image to be tested to obtain super pixel blocks includes: using a SLIC super pixel segmentation algorithm and using N grids to divide the image to be tested into regular blocks of the same size, wherein N>0.

4. The image tampering detection method according to claim 1, characterized in that: Also includes: The average number of feature points in every preset number of pixels in a super pixel block is defined as a threshold.

5. The image tampering detection method according to claim 4, characterized in that: The determining whether the superpixel block is a featureless block includes: determining whether the number of feature points in all the superpixel blocks and surrounding adjacent blocks is greater than the threshold; if so, the superpixel block is a featureless block.

6. The image tampering detection method according to claim 1, characterized in that: The method of obtaining the distance value based on other superpixel blocks other than the featureless block and the feature information of the superpixel blocks includes: substituting the other superpixel blocks other than the featureless block into the distance formula to which the feature information of the superpixel blocks is added to obtain the distance value.

7. The image tampering detection method according to claim 6, characterized in that: The distance formula is a distance formula having Haar wavelet feature information of the superpixel block.

8. An image tampering detection device, characterized in that: include: An extraction module, used for extracting feature points of the image to be tested; A segmentation module, used for pre-segmenting the image to be tested to obtain super pixel blocks; A judging module, used for judging whether the super pixel block is a featureless block; Fusion module, used to fuse all featureless blocks; A data processing module, used for obtaining a distance value based on other super pixel blocks and feature information of the super pixel blocks other than the featureless block; A merging module, used for merging adjacent featureless blocks into a super pixel block based on the distance value; The tampering detection module is used to perform image tampering detection based on the final super pixel block.

9. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the image tampering detection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement the image tampering detection method as described in any one of claims 1 to 7.