Search

CN-115527101-B - Image tamper detection method and processor

CN115527101BCN 115527101 BCN115527101 BCN 115527101BCN-115527101-B

Abstract

The invention discloses a tamper detection method and a processor for an image. The method comprises the steps of obtaining an original image to be detected, wherein the original image comprises image content to be protected, determining an original hash value of the image content on a first image channel of the original image, generating verification information based on the original hash value, embedding the verification information into a second image channel except the first image channel in the original image, and generating a target image based on the first image channel and the embedded second image channel, wherein the verification information is used for verifying the target image to obtain a detection result, and the detection result comprises a result that the target image does not execute tampering operation and a result that the target image executes tampering operation. The invention solves the technical problem of low accuracy of tamper detection of the image.

Inventors

  • ZENG JINGHUA
  • FAN HANGYU
  • YANG RUI

Assignees

  • 阿里巴巴(中国)有限公司

Dates

Publication Date
20260512
Application Date
20220923

Claims (15)

  1. 1. A tamper detection method of an image, comprising: Acquiring an original image to be detected, wherein the original image comprises image content to be protected; determining an original hash value of the image content on a first image channel of the original image, wherein the first image channel is a brightness channel or a chromaticity channel; Generating verification information based on the original hash value, and embedding the verification information into a second image channel except the first image channel in the original image; and generating a target image based on the first image channel and the embedded second image channel, wherein the verification information is used for verifying the target image to obtain a detection result, and the detection result comprises a result that the target image does not execute the tampering operation and a result that the target image executes the tampering operation.
  2. 2. The method of claim 1, wherein determining the original hash value of the image content on the first image channel of the original image comprises: determining a target image block set corresponding to the image content in the image block set of the original image, wherein the sizes of a plurality of image blocks in the image block set are the same; And generating one or more hash values in the original hash value based on pixel values of any target image block in the target image block set on the first image channel and pixel values of adjacent target image blocks of the target image block on the first image channel, wherein the adjacent target image blocks are image blocks adjacent to the target image block in the image block set.
  3. 3. The method of claim 2, wherein generating one or more hash values in the original hash value based on pixel values of any target image block in the set of target image blocks on the first image channel and pixel values of adjacent target image blocks of the target image block on the first image channel comprises: determining a first target value of one or more bits as the hash value of one or more bits in response to an average pixel value of the target image block on the first image channel being greater than an average pixel value of the adjacent target image block on the first image channel; One or more second target values, different from the one or more first target values, are determined as the one or more hash values in response to an average pixel value of the target image block over the first image channel being no greater than an average pixel value of the adjacent target image block over the first image channel.
  4. 4. The method according to claim 1, wherein the method further comprises: Adjusting the first image channel based on the image content, wherein the original hash value of the image content interfered by the interference information on the adjusted first image channel is unchanged; And generating the target image based on the embedded second image channel and the adjusted first image channel.
  5. 5. The method of claim 4, wherein adjusting the first image channel based on the image content comprises: and adjusting the first image channel in response to the average pixel value of the target image block of the image content in the original image on the first image channel, wherein the difference information between the average pixel value of the target image block on the first image channel and the average pixel value of the adjacent target image block on the first image channel is smaller than a threshold value, and the difference information between the average pixel value of the target image block on the first image channel and the average pixel value of the adjacent target image block on the first image channel is not smaller than the threshold value, and the adjacent target image block is the image block adjacent to the target image block in the image block set of the original image.
  6. 6. The method of claim 4, wherein generating the target image based on the embedded second image channel and the adjusted first image channel comprises: And merging the embedded second image channel and the adjusted first image channel to obtain the target image.
  7. 7. The method of claim 1, wherein embedding the verification information into a second image channel of the original image other than the first image channel comprises: determining the verification information as watermark information based on a key; Embedding the watermark information into the second image channel.
  8. 8. The method of claim 7, wherein the method further comprises: carrying out attack operation on the embedded second image channel; and in response to successful extraction of the watermark information from the attacked second image channel, determining successful embedding of the verification information into the second image channel.
  9. 9. The method according to any one of claims 1 to 8, wherein generating verification information based on the original hash value comprises: Determining the original hash value as the verification information, or The original hash value is converted into the verification information based on an error correction code.
  10. 10. A tamper detection method of an image, comprising: Obtaining a target image to be detected, wherein the target image is generated based on a first image channel of an original image and a second image channel embedded with verification information in the original image, the verification information is generated based on an original hash value of image content to be protected in the original image on the first image channel, and the first image channel is a brightness channel or a chromaticity channel; Extracting the verification information from the target image; and verifying the target image based on the verification information to obtain a detection result, wherein the detection result comprises a result that the target image does not execute the tampering operation and a result that the target image executes the tampering operation.
  11. 11. The method of claim 10, wherein the step of determining the position of the first electrode is performed, The method further includes determining a target hash value for the image content on a first image channel of the target image; And verifying the target image based on the verification information to obtain a detection result, wherein the detection result comprises that the detection result is determined to be a result that the target image does not execute the tampering operation in response to the fact that the target hash value is matched with the verification information, and the detection result is determined to be a result that the target image executes the tampering operation in response to the fact that the target hash value is not matched with the verification information.
  12. 12. The method of claim 10, wherein extracting the verification information from the target image comprises: watermark information is extracted from a second image channel of the target image based on a key, and the watermark information is determined to be the verification information.
  13. 13. A tamper detection method of an image, comprising: Displaying an original image to be detected on a presentation picture of a Virtual Reality (VR) device or an Augmented Reality (AR) device, wherein the original image comprises image content to be protected; The VR device or the AR device determines an original hash value of the image content on a first image channel of the original image, wherein the first image channel is a luminance channel or a chrominance channel; After generating verification information based on the original hash value and embedding the verification information into a second image channel except the first image channel in the original image, driving the VR device or the AR device to render and display a target image generated based on the first image channel and the embedded second image channel, wherein the verification information is used for verifying the target image to obtain a detection result, and the detection result comprises a result that the target image does not execute tampering operation and a result that the target image executes tampering operation.
  14. 14. A tamper detection method of an image, comprising: Acquiring an original image to be detected by calling a first interface, wherein the original image comprises image content to be protected, the first interface comprises a first parameter, and the parameter value of the first parameter is the original image; determining an original hash value of the image content on a first image channel of the original image, wherein the first image channel is a brightness channel or a chromaticity channel; Generating verification information based on the original hash value, and embedding the verification information into a second image channel except the first image channel in the original image; generating a target image based on the first image channel and the embedded second image channel, wherein the verification information is used for verifying the target image to obtain a detection result, and the detection result comprises a result that the target image does not execute tampering operation and a result that the target image executes tampering operation; And outputting the target image by calling a second interface, wherein the second interface comprises a second parameter, and the value of the second parameter is the target image.
  15. 15. A processor for running a program, wherein the program when run performs the method of any one of claims 1 to 14.

Description

Image tamper detection method and processor Technical Field The present invention relates to the field of image processing, and in particular, to a tamper detection method and a processor for an image. Background At present, more and more image editing software enables people to easily edit image content, the image is taken as a carrier of information, the authenticity of the image is seriously threatened, once the maliciously tampered image is transmitted in a network and other platforms, the image can cause a certain loss in various aspects of personal life, social order and the like, for example, actions of tampering after the transfer page screenshot by fraud molecules, tampering chat content for chat record screenshot and the like exist. After the image is tampered, common attacks such as compression, scaling and the like are often experienced in the transmission process, and the tamper trace becomes weaker along with the enhancement of the attack. However, regarding image editing, the related art is only a passive tamper detection technology, and the passive tamper detection technology has difficulty in recognizing an image after an attack operation such as compression and scaling, so that it is difficult to satisfy the requirement for tamper detection robustness, and there is a technical problem that the accuracy of tamper detection on an image is low. In view of the above problems, no effective solution has been proposed at present. Disclosure of Invention The embodiment of the invention provides a tamper detection method and a processor for an image, which are used for at least solving the technical problem of low tamper detection precision for the image. According to one aspect of the embodiment of the invention, an image tampering detection method is provided, and the method comprises the steps of obtaining an original image to be detected, wherein the original image comprises image content to be protected, determining an original hash value of the image content on a first image channel of the original image, generating verification information based on the original hash value, embedding the verification information into a second image channel except the first image channel in the original image, and generating a target image based on the first image channel and the embedded second image channel, wherein the verification information is used for verifying the target image to obtain a detection result, and the detection result comprises a result that the target image does not execute tampering operation and a result that the target image executes tampering operation. According to one aspect of the embodiment of the invention, another image tampering detection method is provided, which comprises the steps of obtaining a target image to be detected, wherein the target image is generated based on a first image channel of an original image and a second image channel embedded with verification information in the original image, the verification information is generated based on an original hash value of image content to be protected in the original image on the first image channel, the verification information is extracted from the target image, the target image is verified based on the verification information, a detection result is obtained, and the detection result comprises a result that the target image does not execute tampering operation and a result that the target image executes tampering operation. According to one aspect of the embodiment of the invention, another image tamper detection method is provided, which comprises the steps of displaying an original image to be detected on a display picture of a virtual reality VR device or an augmented reality AR device, wherein the original image comprises image content to be protected, determining an original hash value of the image content on a first image channel of the original image by the VR device or the AR device, generating verification information based on the original hash value, embedding the verification information into a second image channel except the first image channel in the original image, and then driving the VR device or the AR device to render and display a target image generated based on the first image channel and the embedded second image channel, wherein the verification information is used for verifying the target image to obtain a detection result, and the detection result comprises a result that the target image does not execute tamper operation and a result that the target image executes tamper operation. According to one aspect of the embodiment of the invention, another image tampering detection method is provided, which comprises the steps of obtaining an original image to be detected by calling a first interface, wherein the original image comprises image content to be protected, the first interface comprises a first parameter, the parameter value of the first parameter is the original image, determining an origina