An image tampering detection and self-recovery method, device, equipment and storage medium

By preprocessing and detecting the image, parsing the tampering information, and recovering the image using the coding plane and key data, the problem of inaccurate detection and recovery of tampered images in existing technologies is solved, and accurate detection and recovery of image tampering is achieved.

CN117830071BActive Publication Date: 2025-12-26MACAO POLYTECHNIC INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410040248.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-11
Publication Date
2025-12-26
Estimated Expiration
2044-01-11

AI Technical Summary

Technical Problem

Existing technologies are unable to accurately detect the location of image tampering and effectively recover the tampered image; they can only identify the tampered area but cannot restore the content.

Method used

By acquiring the image information to be detected, preprocessing and detection are performed, tampering information is parsed, and image recovery is performed using coded plane information and key data to generate an anti-tampering image.

Benefits of technology

It achieves accurate detection and recovery of image tampering, and can restore tampered images to their untampered state, providing an effective means to restore tampered content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117830071B_ABST
    Figure CN117830071B_ABST
Patent Text Reader

Abstract

The application discloses a kind of image tampering detection and self-recovery method, device, equipment and storage medium, belong to image detection technical field.The present application obtains image to be detected, and image to be detected is detected and preprocessed, and image to be detected information is obtained;Image to be detected information is detected, and image detection result is obtained;If image detection result is abnormal, image detection result is analyzed, and image tampering information is obtained;According to image tampering information, data processing is carried out, corresponding image restoration data is obtained, and image recovery is automatically carried out according to image restoration data, and tamper-proof image is obtained.The present application detects tampering by image to be detected, to obtain image tampering information, then according to image tampering information and corresponding data processing operation, image restoration data is obtained, and finally restored to not be tampered with image, realizes accurate detection to image tampering, and makes tampered image can be restored to not be tampered with state.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image detection, in particular to an image tampering detection and self-recovery method, device, equipment and storage medium. BACKGROUND

[0002] With the rapid development of image processing technology and the wide application of Photoshop and other image editing software, the threshold of image tampering has been greatly reduced. Today, without professional technical knowledge, ordinary people can easily tamper with images. The popularity of social media has made the spread of images more convenient than ever, but at the same time it has provided a broad platform for image tampering. In order to attract attention, some people may tamper with pictures. Further, some participants in commercial competition and political struggle may mislead the public by tampering with images to achieve their own interests. For example, they may tamper with product pictures to increase sales, or tamper with news pictures to shape or change public opinion.

[0003] And the limitation of the mainstream passive tampering detection technology is that only the tampered area in the image is found, but no effective means are provided to restore the tampered content. In view of this, there is an urgent need for a method that can accurately detect the tampering position of the image and restore it, for detecting whether the image has been tampered with and restoring the tampered image.

[0004] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0005] The main purpose of the present application is to provide an image tampering detection and self-recovery method, device, equipment and storage medium, which aims to solve the technical problems of detecting whether the image has been tampered with and how to restore the tampered image.

[0006] To achieve the above purpose, the present application provides an image tampering detection and self-recovery method, which comprises the following steps:

[0007] Obtain the image to be detected and perform detection preprocessing on the image to be detected to obtain image information to be detected;

[0008] Detect the image information to be detected to obtain an image detection result;

[0009] If the image detection result is abnormal, analyze the image detection result to obtain image tampering information;

[0010] According to the image tampering information, data processing is performed to obtain corresponding image restoration data, and image recovery is automatically performed according to the image restoration data to obtain an anti-tampered image.

[0011] Optionally, before the acquiring the to-be-detected image and performing detection preprocessing on the to-be-detected image to obtain to-be-detected image information, the method further comprises:

[0012] performing image information extraction on the original image to obtain first significant bit plane information of the original image;

[0013] acquiring encoding plane information and combining the first significant bit plane information to obtain check information of the original image;

[0014] acquiring recovery information of the original image according to preset key data and integrating the recovery information with the check information of the original image to obtain functional plane information of the original image;

[0015] integrating the first significant bit plane information, the functional plane information and the encoding plane information into the original image in sequence to obtain a tamper-proof image.

[0016] Optionally, the acquiring the encoding plane information and combining the first significant bit plane information to obtain the check information of the original image comprises:

[0017] obtaining the encoding plane information according to a preset image encoding algorithm;

[0018] generating the check information of the original image according to the first significant bit plane information and the encoding plane information.

[0019] Optionally, the acquiring the to-be-detected image and performing detection preprocessing on the to-be-detected image to obtain to-be-detected image information comprises:

[0020] acquiring the to-be-detected image and performing image splitting on the to-be-detected image according to a preset specification to obtain a to-be-detected sub-image set;

[0021] performing initial check bit extraction on each to-be-detected sub-image in the to-be-detected sub-image set to obtain check information of the to-be-detected image;

[0022] integrating the check information of the to-be-detected image with recovery information of the to-be-detected image to obtain the to-be-detected image information.

[0023] Optionally, the performing detection on the to-be-detected image information to obtain an image detection result comprises:

[0024] obtaining comparison information of the to-be-detected image according to the to-be-detected image;

[0025] performing traversal comparison between the check information of the to-be-detected image and the comparison information of the to-be-detected image to obtain an initial image detection result;

[0026] The initial image detection result is subjected to a morphological operation to obtain the image detection result.

[0027] Optionally, the image tampering information is subjected to data processing to obtain corresponding image restoration data, and the image is automatically restored according to the image restoration data to obtain an anti-tampered image, and the specific steps include:

[0028] The image tampering position information is determined according to the image tampering information.

[0029] The image encoding coefficient is restored based on the image tampering position information to obtain corresponding image restoration data.

[0030] The image tampering position is repaired by the image restoration data to obtain the anti-tampered image.

[0031] Optionally, the image encoding coefficient is restored based on the image tampering position information to obtain corresponding image restoration data, and the specific steps include:

[0032] The image encoding data is cleaned according to the image tampering position information to obtain the image encoding coefficient to be repaired.

[0033] The image encoding coefficient to be repaired is restored based on an encoding restoration algorithm to obtain corresponding image restoration data.

[0034] In addition, in order to achieve the above object, the application further provides an image tampering detection and self-recovery device, which comprises:

[0035] An information extraction module is configured to acquire a to-be-detected image, and perform detection preprocessing on the to-be-detected image to obtain to-be-detected image information.

[0036] A detection comparison module is configured to detect the to-be-detected image information to obtain an image detection result.

[0037] A comparison exception module is configured to, if the image detection result is abnormal, analyze the image detection result to obtain image tampering information.

[0038] An image repair module is configured to subject the image tampering information to data processing to obtain corresponding image restoration data, and automatically restore the image according to the image restoration data to obtain an anti-tampered image.

[0039] In addition, to achieve the above object, the present application also provides an image tampering detection and self-recovery device, which comprises a memory, a processor and an image tampering detection and self-recovery program stored in the memory and executable on the processor, and the image tampering detection and self-recovery program is configured to implement the steps of the image tampering detection and self-recovery method as described above.

[0040] In addition, to achieve the above object, the present application also provides a computer readable storage medium storing a computer program, and the storage medium stores an image tampering detection and self-recovery program, and the image tampering detection and self-recovery program implements the steps of the image tampering detection and self-recovery method as described above when executed by a processor.

[0041] The present application obtains the image to be detected, and performs detection preprocessing on the image to be detected to obtain image to be detected information; performs detection on the image to be detected information to obtain an image detection result; if the image detection result is abnormal, analyzes the image detection result to obtain image tampering information; performs data processing according to the image tampering information to obtain corresponding image restoration data, and automatically performs image recovery according to the image restoration data to obtain an anti-tampering image. The present application detects the image to be detected to obtain image tampering information, and then obtains image restoration data according to the image tampering information and corresponding data processing operation, and finally restores the image to be detected to obtain an image that has not been tampered with, thereby realizing accurate detection of image tampering and restoring the tampered image to the state of not being tampered with. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 is a structural schematic diagram of an image tampering detection and self-recovery device of a hardware running environment related to an embodiment scheme of the present application;

[0043] Figure 2 is a flowchart of a first embodiment of an image tampering detection and self-recovery method of the present application;

[0044] Figure 3 is a flowchart of a second embodiment of an image tampering detection and self-recovery method of the present application;

[0045] Figure 4 is a flowchart of a third embodiment of an image tampering detection and self-recovery method of the present application;

[0046] Figure 5 is a flowchart of a fourth embodiment of an image tampering detection and self-recovery method of the present application;

[0047] Figure 6 is a structural block diagram of a first embodiment of an image tampering detection and self-recovery device of the present application.

[0048] The objectives, functional characteristics and advantages of the present application will be further illustrated in combination with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0049] It should be understood that the specific embodiments described herein are merely illustrative of the present application and do not limit the present application in any manner.

[0050] Reference Figure 1 , Figure 1 The figure shows a schematic structure of an image tampering detection and self-recovery device related to the hardware running environment of the embodiment of the present application.

[0051] As Figure 1 shown, the image tampering detection and self-recovery device can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 can include a display screen, an input unit such as a keyboard, and can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 can be a high-speed random access memory (RAM), and can also be a stable non-volatile memory (NVM), such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.

[0052] Those skilled in the art can understand Figure 1 that the structure shown in the figure does not constitute a limitation on the image tampering detection and self-recovery device, and can include more or fewer components than the figure, or combine certain components, or different component arrangements.

[0053] As Figure 1 shown, the memory 1005 as a storage medium can include an operating system, a network communication module, a user interface module, and an image tampering detection and self-recovery program.

[0054] In Figure 1The network interface 1004 in the image tampering detection and self-recovery device is mainly used for data communication with a network server, and the user interface 1003 is mainly used for data interaction with a user. The processor 1001 and the memory 1005 in the image tampering detection and self-recovery device can be arranged in the image tampering detection and self-recovery device. The image tampering detection and self-recovery device calls the image tampering detection and self-recovery program stored in the memory 1005 through the processor 1001, and executes the image tampering detection and self-recovery method provided in the embodiments of the present application.

[0055] The embodiments of the present application provide an image tampering detection and self-recovery method. Figure 2 , Figure 2 FIG. 1 is a flowchart of an image tampering detection and self-recovery method according to a first embodiment of the present application.

[0056] In this embodiment, the image tampering detection and self-recovery method comprises the following steps:

[0057] Step S10: obtaining a to-be-detected image, and performing detection preprocessing on the to-be-detected image to obtain to-be-detected image information;

[0058] It should be noted that, in the specific implementation, the to-be-detected image actually refers to a tamper-proof image that may be tampered with.

[0059] Step S20: detecting the to-be-detected image information to obtain an image detection result;

[0060] It should be noted that the detection specifically serves to judge whether the to-be-detected image has been tampered with according to the to-be-detected image information. When the to-be-detected image is determined to be tampered with, the obtained image detection result will include specific tampering information of the tampered image.

[0061] Step S30: if the image detection result is abnormal, analyzing the image detection result to obtain image tampering information;

[0062] It can be understood that the image detection result being abnormal indicates that the image has been tampered with. At this time, analyzing the image detection result can obtain specific position information of the tampered image. Moreover, the image detection result being normal indicates that the image has not been tampered with.

[0063] It should be further noted that, in the specific implementation, the image detection result can also be normal, i.e., the image has not been tampered with. At this time, only the normal image detection result needs to be output without image tampering recovery.

[0064] Step S40: performing data processing according to the image tampering information to obtain corresponding image restoration data, and automatically performing image recovery according to the image restoration data to obtain a tamper-proof image.

[0065] It should be noted that in the specific implementation, the image restoration data specifically refers to the encoding coefficients corresponding to the image when the image is not tampered with, and the specific generation process is: first, the corresponding encoding plane of the image is generated by using the multi-level tree set splitting encoding algorithm, and then the obtained encoding plane is multiplied with the preset key matrix to construct the corresponding linear equation set, wherein the result of the matrix multiplication of the linear equation set is the encoding coefficient.

[0066] The embodiment obtains the to-be-detected image, performs detection preprocessing on the to-be-detected image to obtain to-be-detected image information, detects the to-be-detected image information to obtain an image detection result, analyzes the image detection result to obtain image tampering information if the image detection result is abnormal, performs data processing according to the image tampering information to obtain corresponding image restoration data, and automatically performs image recovery according to the image restoration data to obtain an anti-tampered image. The embodiment detects tampering of the to-be-detected image to obtain image tampering information, and then obtains image restoration data according to the image tampering information and corresponding data processing operations, and finally restores the image to the state before being tampered with, thereby achieving accurate detection of image tampering and restoring the tampered image to the state before being tampered with.

[0067] Reference Figure 3 , Figure 3 FIG. 2 is a flowchart of a second embodiment of the image tampering detection and self-recovery method of the present application.

[0068] Based on the above first embodiment, in the present embodiment, the step S10 further includes the following steps before the step S10:

[0069] Step S00: image information extraction is performed on an original image to obtain first significant bit plane information of the original image;

[0070] It should be noted that in the specific implementation, the first significant bit plane information of the original image is the most significant bit plane information of the original image, which is specifically obtained by extracting the most significant bit of each pixel in the original image to form the most significant bit plane. The most significant bit refers to the bit with the highest value in a binary number.

[0071] Step S01: obtain encoding plane information and combine the first significant bit plane information to obtain the check information of the original image;

[0072] It should be noted that the encoding plane information is obtained by generating the corresponding encoding plane of the original image by using the multi-level tree set splitting encoding algorithm.

[0073] It should be noted that in the specific implementation, the check information generation process of the original image is to first divide the encoding plane of the original image and the most significant bit plane of the original image into image blocks of the same size, and then generate corresponding check bits for each image block using a hash algorithm, and all the check bits form the check information of the original image. The hash algorithm refers to mapping an arbitrary length binary value string to a fixed length binary value string, and the mapping rule is the hash algorithm, and the binary value string obtained by mapping the original data is the hash value.

[0074] Step S02: Obtain the recovery information of the original image according to the preset key data, and integrate the check information of the original image to obtain the functional plane information of the original image;

[0075] It should be noted that the preset key data refers to a key matrix set by the user; the recovery information of the original image is specifically obtained by matrix multiplication of the key matrix and the encoding plane, which can also be regarded as a construction process of a linear equation set; wherein the tampered encoding information is regarded as an unknown number, which can be obtained by solving the linear equation set.

[0076] Step S03: Integrating the first significant bit plane information, the functional plane information and the encoding plane information into the original image in sequence to obtain the tamper-proof image.

[0077] It can be understood that integrating the first significant bit plane information, the functional plane information and the encoding plane information into the original image in sequence is essentially embedding a watermark into the original image, thereby obtaining a tamper-proof image, which ensures that the original image is embedded with a secret watermark while having an effective detection and recovery mechanism.

[0078] The embodiment obtains the first significant bit plane information, the functional plane information and the encoding plane information of the original image by multiple information processing of the original image, and then integrates these information into the original image in sequence, thereby realizing the embedding operation of the encrypted watermark of the original image, and improving the operation basis for subsequent tamper detection and tamper recovery of the image.

[0079] Further, the encoding plane information is obtained and combined with the first significant bit plane information to obtain the check information of the original image, and the specific steps include: obtaining the encoding plane information according to a preset image encoding algorithm; generating the check information of the original image according to the first significant bit plane information and the encoding plane information.

[0080] It can be understood that the preset image encoding algorithm specifically refers to a spatial image compression algorithm, and in the specific implementation, it can specifically refer to a multi-level tree set splitting encoding algorithm.

[0081] Reference Figure 4 ,Figure 4 A flowchart of a third embodiment of the image tampering detection and self-recovery method of the present application is shown in FIG. 3.

[0082] Based on the first embodiment, in the present embodiment, the step S10 specifically includes:

[0083] Step S11: Obtain the image to be detected, and split the image to be detected according to a preset specification to obtain a set of sub-images to be detected.

[0084] It should be noted that the preset specification is specifically the size of the image block divided by the user in advance. When detecting the image to be detected, the image to be detected needs to be split into image blocks of the preset specification, and these image blocks are the set of sub-images to be detected.

[0085] Step S12: Extract the initial check bits of each sub-image to be detected in the set of sub-images to be detected to obtain the check information of the image to be detected.

[0086] It can be understood that in specific implementation, the check information of the image to be detected is specifically integrated from the check bit data corresponding to each image block in the set of sub-images to be detected. When detecting the image, the check bit data corresponding to each image block is compared one by one to determine whether the image has been tampered with and, if the image has been tampered with, the tampered position of the image.

[0087] Step S13: Integrate the check information of the image to be detected with the recovery information of the image to be detected to obtain the image information to be detected.

[0088] It should be noted that the recovery information of the image to be detected is specifically used to recover the lost encoding information due to tampering, that is, the encoding information of the tampered part of the image can be restored through the recovery information of the image to be detected.

[0089] In the present embodiment, the image to be detected is first split into a plurality of sub-images to be detected, and then the check bit data corresponding to each sub-image to be detected is extracted and integrated with the recovery information of the image to be detected to obtain the image information to be detected, which provides a comparison reference for subsequent image tampering detection.

[0090] Further, the image information to be detected is detected to obtain an image detection result, and the specific steps include: obtaining comparison information of the image to be detected according to the image to be detected; traversing and comparing the check information of the image to be detected with the comparison information of the image to be detected to obtain an initial image detection result; and performing morphological operation processing on the initial image detection result to obtain the image detection result.

[0091] It can be understood that the comparison information of the to-be-detected image is generated by using a hash algorithm to generate corresponding comparison bit data for each image block divided, and the comparison bit data is the comparison information of the to-be-detected image.

[0092] It should be further pointed out that the image detection result is further refined and enhanced on the initial image detection result, that is, the image detection result is more sensitive and accurate; the morphological operation processing is a simple operation according to the image shape, which is generally an operation on a binary image, for example, dilation, erosion, etc.

[0093] Reference Figure 5 , Figure 5 Fig. 4 is a flowchart of a fourth embodiment of the image tamper detection and self-recovery method.

[0094] Based on the first embodiment, in the present embodiment, the step S40 specifically comprises:

[0095] Step S41: determining image tamper position information according to the image tamper information;

[0096] It can be understood that in the specific implementation, the image tamper position information can be determined according to the image tamper information, that is, which pixel blocks of the image are tampered with.

[0097] Step S42: recovering image encoding coefficients based on the image tamper position information to obtain image restoration data;

[0098] It should be noted that the image encoding coefficient recovery is specifically implemented by the Gaussian elimination method, and in the specific implementation, the tampered image encoding coefficients are first regarded as unknown numbers to be solved, then the key coefficients corresponding to the unknown numbers to be solved are determined and are taken as the coefficients of the linear equation group; then the difference value is calculated according to the difference calculation formula as the constant term of the linear equation group; finally, the tampered encoding coefficients are recovered by accurately solving the linear equation group.

[0099] Step S43: repairing the image tamper position by using the image restoration data to obtain an anti-tamper image.

[0100] It should be noted that in the specific implementation, after all the encoding coefficients are recovered to obtain the image restoration data, the image can be accurately decoded by using a multi-level tree set splitting decoding algorithm to restore the image to the state before tampering.

[0101] It should be further pointed out that in the specific implementation, in order to improve the quality of image restoration, the image is accurately reconstructed, that is, only the tampered area is replaced, and the remaining part retains the original data.

[0102] The embodiment first determines the specific position of the tampered image, then restores the image coding coefficients at the tampered position of the image to obtain image restoration data, and further realizes image repair of the tampered position of the image to obtain an anti-tampered image.

[0103] Further, the image coding coefficients are restored based on the image tampering position information to obtain corresponding image restoration data, and the specific steps include: cleaning the image coding data according to the image tampering position information to obtain image coding coefficients to be repaired; and restoring the image coding coefficients to be repaired based on an encoding restoration algorithm to obtain the image restoration data.

[0104] It should be noted that in the specific implementation, the image coding coefficient restoration process can be specifically that, first, for each column of the coding coefficients, the tampered part needs to be accurately removed, and only the un-tampered coefficients are retained; then, the corresponding number of rows in the preset key is deleted accordingly, and difference calculation is performed; finally, the unknown number, i.e., the image coding coefficients to be restored, is accurately calculated by means of the theory of Gaussian elimination. The specific formula of the difference calculation is:

[0105]

[0106] In the formula, C_R_column is the restoration data of a single column after the tampered part is deleted, C_K S is the key matrix after the tampered data rows are deleted, and C_E_column is the part of the single column coding coefficients that is not tampered.

[0107] In addition, the embodiment of the present application also proposes a computer readable storage medium storing a computer program, the storage medium stores an image tampering detection and self-recovery program, and the image tampering detection and self-recovery program realizes the steps of the image tampering detection and self-recovery method as described above when executed by a processor.

[0108] Since the storage medium adopts all the technical solutions of the above-mentioned embodiments, it at least has all the beneficial effects brought by the technical solutions of the above-mentioned embodiments, which will not be repeated here.

[0109] Referring to Figure 6 , Figure 6 is a structural block diagram of the first embodiment of the image tampering detection and self-recovery device of the present application.

[0110] As Figure 6 shown, the image tampering detection and self-recovery device proposed by the embodiment of the present application includes:

[0111] The information extraction module 10 acquires the image to be detected and performs detection preprocessing on the image to be detected to obtain image information to be detected.

[0112] The detection comparison module 20 detects the image information to be detected to obtain an image detection result.

[0113] The comparison exception module 30 analyzes the image detection result if the image detection result is abnormal to obtain image tampering information.

[0114] The image restoration module 40 performs data processing according to the image tampering information to obtain image restoration data, and performs image recovery according to the image restoration data to obtain an anti-tampered image.

[0115] The embodiment obtains an image to be detected, performs detection preprocessing on the image to be detected to obtain image information to be detected, detects the image information to be detected to obtain an image detection result, analyzes the image detection result if the image detection result is abnormal to obtain image tampering information, performs data processing according to the image tampering information to obtain corresponding image restoration data, and automatically performs image recovery according to the image restoration data to obtain an anti-tampered image. The embodiment detects tampering of the image to be detected to obtain image tampering information, and then obtains image restoration data according to the image tampering information and corresponding data processing operations, and finally restores the image to be detected to obtain an image that has not been tampered with, thereby achieving accurate detection of image tampering and restoring the tampered image to the state of not being tampered with.

[0116] It should be understood that the above is only an example, and does not constitute any limitation on the technical solutions of the present application. In specific applications, those skilled in the art can set up according to the needs, and the present application does not limit this.

[0117] It should be noted that the above-described workflow is only illustrative and does not limit the scope of protection of the present application. In actual applications, those skilled in the art can select part or all of them to achieve the purpose of the embodiment, and this is not limited here.

[0118] In addition, technical details not described in detail in the embodiment can be referred to the image tampering detection and self-recovery method provided by any embodiment of the present application, which will not be described here.

[0119] In addition, it should be noted that in this document, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or system. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of another identical element in the process, method, article or system that includes the element.

[0120] The above-mentioned embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0121] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and the necessary general hardware platform, of course, they can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk), and includes a plurality of instructions for making a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in various embodiments of the present application.

[0122] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent flow transformation made by using the content of the specification and drawings, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. An image tamper detection and self-recovery method, characterized in that, The method comprises the following steps: acquiring a to-be-detected image, and performing detection preprocessing on the to-be-detected image to obtain to-be-detected image information; detecting the to-be-detected image information to obtain an image detection result; if the image detection result is abnormal, analyzing the image detection result to obtain image tampering information; performing data processing according to the image tampering information to obtain corresponding image restoration data, wherein the image restoration data specifically refers to the encoding coefficients corresponding to the image when the image is not tampered with, and automatically performing image recovery according to the image restoration data to obtain an anti-tampered image; before acquiring a to-be-detected image and performing detection preprocessing on the to-be-detected image to obtain to-be-detected image information, the method further comprises the following steps: extracting image information from an original image to obtain first significant bit plane information of the original image; acquiring encoding plane information and combining the first significant bit plane information to obtain check information of the original image; the encoding plane information is acquired by generating the encoding plane corresponding to the original image through a multi-level tree set splitting encoding algorithm; obtaining restoration information of the original image according to preset key data, and integrating the restoration information with the check information of the original image to obtain functional plane information of the original image; the preset key data refers to a key matrix set by a user; the restoration information of the original image is obtained by matrix multiplication of the key matrix and the encoding plane, that is, a construction process of a linear equation set, and the result of the matrix multiplication of the linear equation set is the encoding coefficients; wherein the tampered encoding information is taken as an unknown number, and the encoding coefficients are obtained by solving the linear equation set; integrating the first significant bit plane information, the functional plane information and the encoding plane information into the original image in sequence to obtain an anti-tampered image; the to-be-detected image actually refers to an anti-tampered image that may be tampered with.

2. The image tamper detection and self-recovery method of claim 1, wherein, The method comprises the following steps: acquiring a to-be-detected image, and performing detection preprocessing on the to-be-detected image to obtain to-be-detected image information, specifically comprising: acquiring a to-be-detected image, and performing image splitting on the to-be-detected image according to a preset specification to obtain a to-be-detected sub-image set; extracting an initial check bit from each to-be-detected sub-image in the to-be-detected sub-image set to obtain check information of the to-be-detected image; 3. The image tamper detection and self-recovery method of claim 1, wherein, integrating the check information of the to-be-detected image with restoration information of the to-be-detected image to obtain the to-be-detected image information. The method comprises the following steps: obtaining comparison information of the to-be-detected image according to the to-be-detected image; performing traversal comparison between the check information of the to-be-detected image and the comparison information of the to-be-detected image to obtain an initial image detection result; 4. The image tamper detection and self-recovery method of claim 3, wherein, performing morphological operation processing on the initial image detection result to obtain the image detection result. The method comprises the following steps: determining image tampering position information according to the image tampering information; performing image encoding coefficient restoration based on the image tampering position information to obtain corresponding image restoration data; The image tampering position is repaired by the image restoration data to obtain the anti-tampering image.

5. The image tamper detection and self-recovery method of claim 4, wherein, The image encoding coefficient is recovered based on the image tampering position information to obtain corresponding image restoration data, and the specific steps include: The image encoding data is cleaned based on the image tampering position information to obtain the image encoding coefficient to be repaired. The image encoding coefficient to be repaired is recovered based on the encoding recovery algorithm to obtain corresponding image restoration data.

6. An image tamper detection and self-recovery apparatus, characterized by comprising: The image tampering detection and self-recovery device includes: An information extraction module: obtaining an image to be detected and performing detection preprocessing on the image to be detected to obtain image information to be detected; A detection comparison module: detecting the image information to be detected to obtain an image detection result; A comparison exception module: if the image detection result is abnormal, analyzing the image detection result to obtain image tampering information; An image repair module: performing data processing based on the image tampering information to obtain corresponding image restoration data, and automatically performing image recovery based on the image restoration data to obtain an anti-tampering image.

7. An image tamper detection and self-recovery device, characterized by, The image tampering detection and self-recovery device includes a memory, a processor, and an image tampering detection and self-recovery program stored on the memory and executable on the processor, and the image tampering detection and self-recovery program is configured to implement the image tampering detection and self-recovery method according to any one of claims 1 to 5.

8. A computer readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the image tampering detection and self-recovery method according to any one of claims 1 to 5.