CN113469297A - Image tampering detection method, device, equipment and computer readable storage medium - Google Patents

Image tampering detection method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN113469297A
CN113469297A CN202111029149.9A CN202111029149A CN113469297A CN 113469297 A CN113469297 A CN 113469297A CN 202111029149 A CN202111029149 A CN 202111029149A CN 113469297 A CN113469297 A CN 113469297A
Authority
CN
China
Prior art keywords
image
detected
pixel
tampering detection
metadata
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111029149.9A
Other languages
Chinese (zh)
Other versions
CN113469297B (en
Inventor
钟木灶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Hylink Information Technology Co ltd
Original Assignee
Shenzhen Hylink Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Hylink Information Technology Co ltd filed Critical Shenzhen Hylink Information Technology Co ltd
Priority to CN202111029149.9A priority Critical patent/CN113469297B/en
Publication of CN113469297A publication Critical patent/CN113469297A/en
Application granted granted Critical
Publication of CN113469297B publication Critical patent/CN113469297B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses an image tampering detection method, an image tampering detection device, an image tampering detection equipment and a computer readable storage medium, wherein the method comprises the following steps: receiving an image to be detected, and outputting stream data corresponding to the image to be detected in a preset coding and decoding mode to obtain metadata of the image to be detected; scanning an image to be detected, and judging whether the image to be detected contains noise points or not; if the image to be detected contains noise points, judging whether the distribution of the noise points is regular or not to obtain a judgment result; and analyzing the target pixels forming the image to be detected to obtain pixel association degree, and determining the tampering detection result of the image to be detected according to the metadata, the judgment result and the pixel association degree. According to the method, the metadata containing the specific information of the image to be detected is obtained, whether the image to be detected contains noise points or not is determined, and the relevance of the pixels in the image to be detected is determined, so that the problem that the conventional image is time-consuming and time-consuming in identification is solved, and the accuracy is improved compared with the conventional manual identification.

Description

Image tampering detection method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of image detection, and in particular, to an image tampering detection method, apparatus, device, and computer-readable storage medium.
Background
With the rapid development of computer technology, the counterfeit identification of images becomes more and more difficult, and with the help of computer technology, some synthetic images or modified images are difficult to distinguish by naked eyes, and in some special application scenarios, whether the images are modified or not is an important issue, for example, the identification of image evidences and image tracing, etc., the existing identification method for whether the images are tampered or not is mainly distinguished by naked eyes of professional personnel in the field of camera shooting, and the accuracy of tamper identification is not low, but the method needs professional personnel assistance, is time-consuming and low, and has low accuracy for high-technology content image modification tamper identification.
Disclosure of Invention
The invention mainly aims to provide an image tampering detection method, an image tampering detection device, image tampering detection equipment and a computer readable storage medium, and aims to solve the technical problems that the existing method for identifying whether an image is tampered consumes time and is low in accuracy.
In addition, in order to achieve the above object, the present invention further provides an image tampering detection method, including the steps of:
receiving an image to be detected, and outputting stream data corresponding to the image to be detected in a preset coding and decoding mode to obtain metadata of the image to be detected;
scanning the image to be detected, and judging whether the image to be detected contains noise points or not;
if the to-be-detected image contains the noise points, judging whether the distribution of the noise points has regularity or not to obtain a judgment result;
analyzing the target pixels forming the image to be detected to obtain pixel relevance, and determining the tampering detection result of the image to be detected according to the metadata, the judgment result and the pixel relevance.
Optionally, if the to-be-detected image includes the noise point, the step of determining whether the distribution of the noise point has regularity includes:
if the to-be-detected image contains the noise point, judging whether the metadata is modified or not based on a preset label in the metadata;
if the metadata is not modified, judging the image type of the image to be detected based on shooting parameters in the metadata;
and if the image type of the image to be detected is a camera image, judging whether the distribution of the noise points has regularity.
Optionally, the step of determining whether the distribution of the noise points is regular if the image to be detected includes the noise points further includes:
if the image to be detected contains the noise point, acquiring a target position of the noise point in the image to be detected, and acquiring the gradient degree of the noise point in the preset direction;
and judging whether the distribution of the noise points has regularity or not according to the target position and the gradient degree.
Optionally, the step of analyzing the target pixels forming the image to be detected to obtain the pixel correlation degree includes:
acquiring RGB values of target pixels forming the image to be detected, and screening abnormal pixels from the target pixels based on the RGB values of the target pixels and a preset functional relation;
and calculating the pixel association degree according to the quantity proportion of the abnormal pixels to the target pixels and the size of the abnormal pixel gathering area.
Optionally, the step of screening the abnormal pixel from the target pixel based on the RGB value of the target pixel and a preset functional relationship includes:
randomly selecting pixels from the target pixels as first pixels, and taking pixels around the first pixels as second pixels;
and if the RGB value of the first pixel and the RGB value of the second pixel do not have a preset functional relationship, determining that the first pixel is an abnormal pixel.
Optionally, the pixel relevance is inversely related to the quantity ratio and the size of the abnormal pixel aggregation area.
Optionally, the step of determining a tampering detection result of the image to be detected according to the metadata, the determination result, and the pixel relevance includes:
if the metadata is not modified, the distribution of the noise points is regular, and the pixel association degree belongs to a first preset interval, determining a first confidence value as a tampering detection result of the image to be detected;
and if the metadata is not modified, the judgment result indicates that the distribution of the noise points is not regular, and the pixel association degree belongs to a first preset interval, determining a second confidence value as a tampering detection result of the image to be detected, wherein the first confidence value is smaller than the second confidence value.
Further, in order to achieve the above object, the present invention provides an image tampering detection apparatus comprising:
the metadata acquisition module is used for receiving an image to be detected and outputting stream data corresponding to the image to be detected in a preset coding and decoding mode to obtain metadata of the image to be detected;
the noise point detection module is used for scanning the image to be detected and judging whether the image to be detected contains noise points;
the judging module is used for judging whether the distribution of the noise points has regularity or not if the to-be-detected image contains the noise points, and obtaining a judging result;
and the tampering detection module is used for analyzing the target pixels forming the image to be detected to obtain the pixel relevance and determining the tampering detection result of the image to be detected according to the metadata, the judgment result and the pixel relevance.
Further, to achieve the above object, the present invention also provides an image tampering detection apparatus, including: the image tamper detection system comprises a memory, a processor and an image tamper detection program stored on the memory and capable of running on the processor, wherein the image tamper detection program realizes the steps of the image tamper detection method when being executed by the processor.
Further, to achieve the above object, the present invention also provides a computer readable storage medium having stored thereon an image tampering detection program, which when executed by a processor, implements the steps of the image tampering detection method as described above.
Furthermore, to achieve the above object, the present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the image tampering detection method as described above.
The embodiment of the invention provides an image tampering detection method, device and equipment and a computer readable storage medium. In the embodiment provided by the invention, an image to be detected is received, stream data corresponding to the image to be detected is output in a preset coding and decoding mode, metadata containing specific information of the image to be detected can be obtained, then the image to be detected is scanned to determine whether the image to be detected contains noise points, if the image to be detected contains the noise points, whether the distribution of the noise points is regular or not is determined, a determination result is obtained, then a target pixel forming the image to be detected is analyzed to obtain pixel relevance, and finally, a tampering detection result of the image to be detected is determined based on the metadata, the determination result and the pixel relevance. And the accuracy is improved compared with the existing manual identification.
Drawings
Fig. 1 is a schematic hardware structure diagram of an embodiment of an image tampering detection apparatus according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for detecting image tampering according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of an image tampering detection method according to the present invention;
fig. 4 is a schematic diagram of functional modules of an image tampering detection apparatus according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The image tampering detection terminal (also called terminal, equipment or terminal equipment) in the embodiment of the invention can be a PC (personal computer), and can also be a mobile terminal equipment with a display function, such as a smart phone, a tablet personal computer and a portable computer.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU (Central Processing Unit), a communication bus 1002, and a memory 1003. Wherein a communication bus 1002 is used to enable connective communication between these components. The memory 1003 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). The memory 1003 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, the memory 1003, which is a kind of computer storage medium, may include therein an image tampering detection program.
In the terminal shown in fig. 1, the processor 1001 may be configured to call an image tampering detection program stored in the memory 1003, and perform the following operations:
receiving an image to be detected, and outputting stream data corresponding to the image to be detected in a preset coding and decoding mode to obtain metadata of the image to be detected;
scanning the image to be detected, and judging whether the image to be detected contains noise points or not;
if the to-be-detected image contains the noise points, judging whether the distribution of the noise points has regularity or not to obtain a judgment result;
analyzing the target pixels forming the image to be detected to obtain pixel relevance, and determining the tampering detection result of the image to be detected according to the metadata, the judgment result and the pixel relevance.
Further, the processor 1001 may be configured to call the image tampering detection program stored in the memory 1003, and further perform the following operations:
if the to-be-detected image contains the noise point, judging whether the metadata is modified or not based on a preset label in the metadata;
if the metadata is not modified, judging the image type of the image to be detected based on shooting parameters in the metadata;
and if the image type of the image to be detected is a camera image, judging whether the distribution of the noise points has regularity.
Further, the processor 1001 may be configured to call the image tampering detection program stored in the memory 1003, and further perform the following operations:
if the image to be detected contains the noise point, acquiring a target position of the noise point in the image to be detected, and acquiring the gradient degree of the noise point in the preset direction;
and judging whether the distribution of the noise points has regularity or not according to the target position and the gradient degree.
Further, the processor 1001 may be configured to call the image tampering detection program stored in the memory 1003, and further perform the following operations:
acquiring RGB values of target pixels forming the image to be detected, and screening abnormal pixels from the target pixels based on the RGB values of the target pixels and a preset functional relation;
and calculating the pixel association degree according to the quantity proportion of the abnormal pixels to the target pixels and the size of the abnormal pixel gathering area.
Further, the processor 1001 may be configured to call the image tampering detection program stored in the memory 1003, and further perform the following operations:
randomly selecting pixels from the target pixels as first pixels, and taking pixels around the first pixels as second pixels;
and if the RGB value of the first pixel and the RGB value of the second pixel do not have a preset functional relationship, determining that the first pixel is an abnormal pixel.
Further, the pixel relevance is inversely related to the quantity ratio and the size of the abnormal pixel aggregation area.
Further, the processor 1001 may be configured to call the image tampering detection program stored in the memory 1003, and further perform the following operations:
if the metadata is not modified, the distribution of the noise points is regular, and the pixel association degree belongs to a first preset interval, determining a first confidence value as a tampering detection result of the image to be detected;
and if the metadata is not modified, the judgment result indicates that the distribution of the noise points is not regular, and the pixel association degree belongs to a first preset interval, determining a second confidence value as a tampering detection result of the image to be detected, wherein the first confidence value is smaller than the second confidence value.
Based on the hardware structure of the device, the embodiment of the image tampering detection method is provided.
It should be noted that the present invention aims to detect whether an image is tampered, wherein an image to be detected, which may be applicable to the present invention, includes a picture taken by an image pickup device (a mobile phone, a camera, etc.), or an image intercepted based on a display interface, but does not include an image synthesized by using a special technology.
Referring to fig. 2, in a first embodiment of the image tampering detection method of the present invention, the image tampering detection method includes:
step S10, receiving an image to be detected, and outputting stream data corresponding to the image to be detected in a preset coding and decoding mode to obtain metadata of the image to be detected;
receiving an image to be detected, namely, an image to be detected in this embodiment, and outputting stream data corresponding to the image to be detected in a preset encoding and decoding manner, so as to obtain metadata of the image to be detected, where the metadata can be understood as data describing data, namely, data describing the image to be detected, and as can be known, the image is binary and exists in a form of a binary file stream in a terminal.
Step S20, scanning the image to be detected, and judging whether the image to be detected contains noise points;
it should be noted that noise refers to a random variation of luminance or color information in an image, but is not present in the object itself, and is usually an electronic noise representation, which is generally generated by the sensor and circuit of the image pickup device, and may be generated by the influence of film grain or shot noise inevitable in an ideal photodetector, when the intensity of noise in the image is large, useful information in the image is covered by a large amount of noise, thereby blurring the image, and the noise is generated by the inevitable factors of the camera device, therefore, the scanning of the image to be detected is carried out to judge whether the image to be detected contains noise points or not, which is beneficial to removing complex composite images, and when the image is generated by a camera device, the noise points are inevitably generated, that is, if the image to be detected contains noise, it can be basically determined that the image to be detected is a captured image.
Step S30, if the image to be detected contains the noise points, judging whether the distribution of the noise points has regularity to obtain a judgment result;
it should be noted that, because of the inevitable reason of the camera device, more or less of the image captured by the camera device contains noise, the noise in the image captured by the camera device has a certain rule without being processed, and the rule of the noise in the image captured by the camera device can be represented by the relationship between the brightness and the color value of the noise, for example, a certain noise and its surrounding noise have a corresponding relationship on the brightness or the color value, and when the noise in the image has a corresponding relationship on the brightness or the color value, it can be determined that the distribution of the noise in the image has regularity. When the image is modified, the brightness or color value of the noise point is modified, and the distribution regularity is also damaged, so that the judgment of whether the distribution of the noise point in the image to be detected is regular is also one of the bases for judging whether the image to be detected is tampered.
And step S40, analyzing the target pixels forming the image to be detected to obtain pixel relevance, and determining the tampering detection result of the image to be detected according to the metadata, the judgment result and the pixel relevance.
It should be noted that, similar to the noise, pixels (i.e. target pixels in this embodiment) forming the image to be detected also have a certain association relationship, and this association relationship can be embodied in RGB values, in an unmodified original image, the RGB value of a certain pixel and the RGB values of its surrounding pixels have a certain mathematical relationship, for example, pixel b and pixel c are respectively located at two sides of pixel a, and the RGB value of pixel a can be equal to the average value of the RGB values of pixel b and pixel c, when the target pixels all conform to this mathematical relationship, the pixel association of the image to be detected is determined to be the highest, the possibility of tampering the image to be detected is the smallest, conversely, when the proportion of pixels conforming to this mathematical relationship among the target pixels is smaller, the pixel association of the image to be detected is lower, and the possibility of tampering the image to be detected is larger, i.e. the degree of pixel relevance is inversely related to the possibility of tampering with the image to be detected.
Further, in a possible embodiment, in step S30, if the image to be detected includes the noise, it is determined whether the distribution of the noise has regularity, and the step of refining includes:
step S31, if the to-be-detected image contains the noise point, judging whether the metadata is modified or not based on a preset label in the metadata;
step S32, if the metadata is not modified, judging the image type of the image to be detected based on the shooting parameters in the metadata;
and step S33, if the image type of the image to be detected is a camera image, judging whether the distribution of the noise points has regularity.
It is known that existing image capturing apparatuses follow a certain protocol, which specifies that metadata of an image captured by the image capturing apparatus must include a modification check tag, i.e. a preset tag in the present embodiment, and when other data in the metadata is modified, the preset tag records a condition that the metadata is modified by a certain change, and the preset tag is added to the metadata by a manufacturer that produces the image capturing apparatus when the image capturing apparatus leaves the factory, for example, when an image capturing parameter in the metadata of the image is modified, the preset tag records a condition that the image capturing parameter is modified by a certain change, it is required to say that whether the metadata is modified or not is not necessarily related to whether the image is tampered or not, because the content of the image can be modified without modifying the metadata, and if the metadata is not modified, based on the image capturing parameter in the metadata, the method comprises the steps of judging the image type of an image to be detected, wherein the image type comprises a camera image, a display image and the like, judging whether the distribution of noise points in the image to be detected is regular or not if metadata is not modified and the image type of the image to be detected is the camera image, so that the purpose of execution is that when the image to be detected (the display image) contains artificially generated noise points, whether the noise points are regular or not can be judged, and the display image contains the artificially generated noise points, so that the situation that the image to be detected is modified can be determined, and the subsequent step of judging whether the noise points are regular or not is not executed.
Further, in a possible embodiment, in step S30, if the image to be detected includes the noise, it is determined whether the distribution of the noise is regular, and the step of refining further includes:
step S34, if the image to be detected contains the noise point, acquiring the target position of the noise point in the image to be detected, and acquiring the gradient degree of the noise point in the preset direction;
and step S35, judging whether the distribution of the noise points has regularity or not according to the target position and the gradient degree.
It should be noted that whether the distribution of the noise in the image to be detected is regular or not may also be determined by the position of the noise in the image to be detected and the gradient degree of the noise on a certain line (i.e. the preset direction in this embodiment) in the image to be detected on the line, specifically, if the position distribution of the noise in the image to be detected does not conform to any distribution function, it may be determined that the distribution of the noise is not regular, and if the brightness or the color value of the noise on the certain line in the image to be detected has gradient on the line, i.e. the change of the brightness or the color value has regularity, the gradient degree of the noise in the preset direction is higher, and vice versa is smaller. Whether the distribution of the noise points is regular or not is judged according to the target position of the noise points in the image to be detected and the gradual change degree of the noise points in the preset direction, for example, the position distribution of the noise points in the image to be detected accords with a certain distribution function, and the gradual change degree of the noise points in the preset direction is higher, so that the distribution of the noise points can be determined to be regular.
In the embodiment, an image to be detected is received, stream data corresponding to the image to be detected is output in a preset encoding and decoding mode, metadata containing specific information of the image to be detected can be obtained, then the image to be detected is scanned to determine whether the image to be detected contains noise points, if the image to be detected contains the noise points, whether the distribution of the noise points is regular or not is determined, a determination result is obtained, then a target pixel forming the image to be detected is analyzed to obtain a pixel association degree, and finally, a tampering detection result of the image to be detected is determined based on the metadata, the determination result and the pixel association degree. And the accuracy is improved compared with the existing manual identification.
Further, referring to fig. 3, a second embodiment of the image tampering detection method of the present invention is proposed on the basis of the above-described embodiment of the present invention.
This embodiment is a step of the first embodiment, which is a refinement of step S40, and the difference between this embodiment and the above-described embodiment of the present invention is:
step S41, acquiring RGB values of target pixels forming the image to be detected, and screening abnormal pixels from the target pixels based on the RGB values of the target pixels and a preset functional relation;
step S42, calculating a pixel relevance according to the quantity ratio of the abnormal pixels to the target pixels and the size of the abnormal pixel aggregation area, wherein the pixel relevance is negatively correlated with the quantity ratio and the size of the abnormal pixel aggregation area.
It should be noted that, in an unmodified image, almost all pixels have a certain mathematical relationship (i.e. a preset functional relationship in this embodiment) with their surrounding pixels in RGB values, and when a certain target pixel constituting the image to be detected and its surrounding target pixel do not have a preset functional relationship in RGB values, this target pixel is determined to be an abnormal pixel. Calculating a pixel relevance degree based on the number proportion of the abnormal pixels to the target pixels and the size of the abnormal pixel aggregation area, wherein the pixel relevance degree is in negative correlation with the number proportion of the abnormal pixels to the target pixels and the size of the abnormal pixel aggregation area, namely, the larger the number proportion of the abnormal pixels to the target pixels is, the smaller the pixel relevance degree is; the larger the abnormal pixel aggregation area is, the smaller the pixel relevance is.
Further, in a possible embodiment, in the step S41, based on the RGB value of the target pixel and a preset functional relationship, an abnormal pixel is screened from the target pixel, and the step of refining further includes:
a1, using the randomly selected pixel from the target pixels as a first pixel, and using the pixels around the first pixel as a second pixel;
step a2, if the RGB values of the first pixel and the RGB values of the second pixel do not have a predetermined functional relationship, determining that the first pixel is an abnormal pixel.
Therefore, one pixel is randomly selected from the target pixels to serve as a first pixel, pixels around the first pixel are taken as a second pixel, if the RGB value of the first pixel and the RGB value of the second pixel do not have a preset functional relationship, the first pixel is determined to be an abnormal pixel, and all abnormal pixels are screened from the target pixels forming the image to be detected based on the method.
Further, in a possible embodiment, in the step S40, the tampering detection result of the image to be detected is determined according to the metadata, the determination result, and the pixel relevance, and the refining step includes:
step S43, if the metadata is not modified, the judgment result is that the distribution of the noise points is regular, and the pixel association degree belongs to a first preset interval, determining a first confidence value as the tampering detection result of the image to be detected;
step S44, if the metadata is not modified, the determination result is that the distribution of the noise points has no regularity, and the pixel association degree belongs to a first preset interval, determining that a second confidence value is a tampering detection result of the image to be detected, where the first confidence value is smaller than the second confidence value.
It should be noted that, in this embodiment, based on the metadata, the determination result of whether the noise distribution in the image to be detected has regularity, and the pixel association degree, a confidence value is obtained, that is, a probability value of whether the image to be detected is tampered, where a larger confidence value indicates a larger probability that the image to be detected is tampered, and a certain correlation exists between the confidence value and the metadata, the determination result of whether the noise distribution in the image to be detected has regularity, and the pixel association degree, where when the determination result of whether the noise distribution in the image to be detected has regularity is certain, and the metadata is not modified, the pixel association degree is smaller, and the confidence value is smaller; when the pixel relevance degree belongs to the first preset interval and the metadata is not modified, the distribution of the noise has a confidence value obtained regularly (i.e. the first confidence value in the embodiment), which is smaller than the confidence value obtained when the pixel relevance degree belongs to the first preset interval and the metadata is not modified (i.e. the second confidence value in the embodiment).
If the metadata is not modified, the distribution of the noise points is regular, the pixel association degree belongs to a second preset interval, wherein the minimum value of the second preset interval is greater than the maximum value of the first preset interval, a third confidence value is determined to be the tampering detection result of the image to be detected, and the third confidence value is smaller than the first confidence value.
In the embodiment, the tampering detection result is determined by obtaining the metadata containing the specific information of the image to be detected, whether the image to be detected contains noise points or not and the relevance of the pixels in the image to be detected, so that the problem that the conventional image is time-consuming and time-consuming in identification is solved, and the accuracy is improved compared with the conventional manual identification.
In addition, referring to fig. 4, an embodiment of the present invention further provides an image tampering detection apparatus, where the image tampering detection apparatus includes:
the metadata acquisition module 10 is configured to receive an image to be detected, and output stream data corresponding to the image to be detected in a preset encoding and decoding manner to obtain metadata of the image to be detected;
the noise detection module 20 is configured to scan the image to be detected and determine whether the image to be detected contains noise;
the judging module 30 is configured to, if the to-be-detected image includes the noise point, judge whether distribution of the noise point is regular, and obtain a judgment result;
and the tampering detection module 40 is configured to analyze a target pixel forming the image to be detected to obtain a pixel relevance, and determine a tampering detection result of the image to be detected according to the metadata, the determination result, and the pixel relevance.
Optionally, the determining module 30 includes:
the first judging unit is used for judging whether the metadata is modified or not based on a preset label in the metadata if the noise point is contained in the image to be detected;
a second judging unit, configured to judge, if the metadata is not modified, an image type of the image to be detected based on a shooting parameter in the metadata;
and the third judging unit is used for judging whether the distribution of the noise points has regularity or not if the image type of the image to be detected is a camera image.
Optionally, the determining module 30 further includes:
the gradient degree obtaining unit is used for obtaining a target position of the noise point in the image to be detected and obtaining the gradient degree of the noise point in the preset direction if the image to be detected contains the noise point;
and the regularity judging unit is used for judging whether the distribution of the noise points has regularity or not according to the target position and the gradient degree.
Optionally, the tamper detection module 40 includes:
the abnormal pixel screening unit is used for acquiring RGB values of target pixels forming the image to be detected and screening abnormal pixels from the target pixels on the basis of the RGB values of the target pixels and a preset functional relation;
and the pixel relevance calculating unit is used for calculating the pixel relevance according to the quantity proportion of the abnormal pixels and the target pixels and the size of the abnormal pixel gathering area.
Optionally, the abnormal pixel screening unit includes:
a pixel selection unit, configured to select a pixel randomly from the target pixels as a first pixel, and to select a pixel around the first pixel as a second pixel;
and the abnormal pixel determining unit is used for determining the first pixel as an abnormal pixel if the RGB value of the first pixel and the RGB value of the second pixel do not have a preset functional relationship.
Optionally, the tamper detection module 40 includes:
a first confidence value determining unit, configured to determine, if the metadata is not modified, that the distribution of the noise points is regular, and that the pixel association degree belongs to a first preset interval, a first confidence value as a tampering detection result of the to-be-detected image;
and the second confidence value determining unit is used for determining a second confidence value as a tampering detection result of the image to be detected if the metadata is not modified, the judging result is that the distribution of the noise points has no regularity, and the pixel association degree belongs to a first preset interval, wherein the first confidence value is smaller than the second confidence value.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where an image tampering detection program is stored on the computer-readable storage medium, and when the image tampering detection program is executed by a processor, the image tampering detection program implements operations in the image tampering detection method provided in the foregoing embodiment.
The method executed by each program module can refer to each embodiment of the method of the present invention, and is not described herein again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity/action/object from another entity/action/object without necessarily requiring or implying any actual such relationship or order between such entities/actions/objects; the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
For the apparatus embodiment, since it is substantially similar to the method embodiment, it is described relatively simply, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described apparatus embodiments are merely illustrative, in that elements described as separate components may or may not be physically separate. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be substantially or partially embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above, and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the image tampering detection method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An image tampering detection method, characterized by comprising the steps of:
receiving an image to be detected, and outputting stream data corresponding to the image to be detected in a preset coding and decoding mode to obtain metadata of the image to be detected;
scanning the image to be detected, and judging whether the image to be detected contains noise points or not;
if the to-be-detected image contains the noise points, judging whether the distribution of the noise points has regularity or not to obtain a judgment result;
analyzing the target pixels forming the image to be detected to obtain pixel relevance, and determining the tampering detection result of the image to be detected according to the metadata, the judgment result and the pixel relevance.
2. The image tampering detection method according to claim 1, wherein the step of determining whether the distribution of the noise points is regular if the image to be detected contains the noise points comprises:
if the to-be-detected image contains the noise point, judging whether the metadata is modified or not based on a preset label in the metadata;
if the metadata is not modified, judging the image type of the image to be detected based on shooting parameters in the metadata;
and if the image type of the image to be detected is a camera image, judging whether the distribution of the noise points has regularity.
3. The image tampering detection method according to claim 1, wherein if the image to be detected contains the noise, the step of determining whether the distribution of the noise has regularity further comprises:
if the image to be detected contains the noise point, acquiring a target position of the noise point in the image to be detected, and acquiring the gradient degree of the noise point in the preset direction;
and judging whether the distribution of the noise points has regularity or not according to the target position and the gradient degree.
4. The image tampering detection method of claim 1, wherein said step of analyzing the target pixels constituting said image to be detected to obtain the degree of pixel correlation comprises:
acquiring RGB values of target pixels forming the image to be detected, and screening abnormal pixels from the target pixels based on the RGB values of the target pixels and a preset functional relation;
and calculating the pixel association degree according to the quantity proportion of the abnormal pixels to the target pixels and the size of the abnormal pixel gathering area.
5. The image tampering detection method of claim 4, wherein the step of screening the target pixel for abnormal pixels based on the RGB value of the target pixel and a predetermined functional relationship comprises:
randomly selecting pixels from the target pixels as first pixels, and taking pixels around the first pixels as second pixels;
and if the RGB value of the first pixel and the RGB value of the second pixel do not have a preset functional relationship, determining that the first pixel is an abnormal pixel.
6. The image tampering detection method of claim 4, wherein the pixel relevance is inversely related to the quantity ratio and the size of the abnormal pixel concentration area.
7. The image tampering detection method of claim 1, wherein said determining a tampering detection result of said image to be detected based on said metadata, said determination result and said pixel relevance comprises:
if the metadata is not modified, the distribution of the noise points is regular, and the pixel association degree belongs to a first preset interval, determining a first confidence value as a tampering detection result of the image to be detected;
and if the metadata is not modified, the judgment result indicates that the distribution of the noise points is not regular, and the pixel association degree belongs to a first preset interval, determining a second confidence value as a tampering detection result of the image to be detected, wherein the first confidence value is smaller than the second confidence value.
8. An image tampering detection apparatus, characterized in that the image tampering detection apparatus comprises:
the metadata acquisition module is used for receiving an image to be detected and outputting stream data corresponding to the image to be detected in a preset coding and decoding mode to obtain metadata of the image to be detected;
the noise point detection module is used for scanning the image to be detected and judging whether the image to be detected contains noise points;
the judging module is used for judging whether the distribution of the noise points has regularity or not if the to-be-detected image contains the noise points, and obtaining a judging result;
and the tampering detection module is used for analyzing the target pixels forming the image to be detected to obtain the pixel relevance and determining the tampering detection result of the image to be detected according to the metadata, the judgment result and the pixel relevance.
9. An image tampering detection device, characterized in that it comprises: a memory, a processor and an image tamper detection program stored on the memory and executable on the processor, the image tamper detection program when executed by the processor implementing the steps of the image tamper detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that an image tampering detection program is stored thereon, which when executed by a processor implements the steps of the image tampering detection method according to any one of claims 1 to 7.
CN202111029149.9A 2021-09-03 2021-09-03 Image tampering detection method, device, equipment and computer readable storage medium Active CN113469297B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111029149.9A CN113469297B (en) 2021-09-03 2021-09-03 Image tampering detection method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111029149.9A CN113469297B (en) 2021-09-03 2021-09-03 Image tampering detection method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113469297A true CN113469297A (en) 2021-10-01
CN113469297B CN113469297B (en) 2021-12-14

Family

ID=77867239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111029149.9A Active CN113469297B (en) 2021-09-03 2021-09-03 Image tampering detection method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113469297B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493938A (en) * 2009-02-27 2009-07-29 西北工业大学 Method for detecting cooked image based on noise distribution discipline
US20110216223A1 (en) * 2008-12-24 2011-09-08 Hitachi Kokusai Electric Inc. Image pickup method and image pickup apparatus
CN104184958A (en) * 2014-09-17 2014-12-03 中国科学院光电技术研究所 Automatic exposure control method and device based on FPGA (field programmable Gate array) and suitable for space detection imaging
WO2016156827A1 (en) * 2015-03-27 2016-10-06 Coller Ip Management Limited Image processing method and device
CN108765405A (en) * 2018-05-31 2018-11-06 北京瑞源智通科技有限公司 A kind of image authenticating method and system
CN109903302A (en) * 2015-06-25 2019-06-18 北京影谱科技股份有限公司 A kind of altering detecting method for stitching image
CN111080529A (en) * 2019-12-23 2020-04-28 大连理工大学 Unmanned aerial vehicle aerial image splicing method for enhancing robustness
CN111709408A (en) * 2020-08-18 2020-09-25 腾讯科技(深圳)有限公司 Image authenticity detection method and device
CN111738244A (en) * 2020-08-26 2020-10-02 腾讯科技(深圳)有限公司 Image detection method, image detection device, computer equipment and storage medium
CN113286142A (en) * 2021-05-20 2021-08-20 河南中全科技有限公司 Artificial intelligence-based image imaging sensitivity prediction method and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110216223A1 (en) * 2008-12-24 2011-09-08 Hitachi Kokusai Electric Inc. Image pickup method and image pickup apparatus
CN101493938A (en) * 2009-02-27 2009-07-29 西北工业大学 Method for detecting cooked image based on noise distribution discipline
CN104184958A (en) * 2014-09-17 2014-12-03 中国科学院光电技术研究所 Automatic exposure control method and device based on FPGA (field programmable Gate array) and suitable for space detection imaging
WO2016156827A1 (en) * 2015-03-27 2016-10-06 Coller Ip Management Limited Image processing method and device
CN109903302A (en) * 2015-06-25 2019-06-18 北京影谱科技股份有限公司 A kind of altering detecting method for stitching image
CN108765405A (en) * 2018-05-31 2018-11-06 北京瑞源智通科技有限公司 A kind of image authenticating method and system
CN111080529A (en) * 2019-12-23 2020-04-28 大连理工大学 Unmanned aerial vehicle aerial image splicing method for enhancing robustness
CN111709408A (en) * 2020-08-18 2020-09-25 腾讯科技(深圳)有限公司 Image authenticity detection method and device
CN111738244A (en) * 2020-08-26 2020-10-02 腾讯科技(深圳)有限公司 Image detection method, image detection device, computer equipment and storage medium
CN113286142A (en) * 2021-05-20 2021-08-20 河南中全科技有限公司 Artificial intelligence-based image imaging sensitivity prediction method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
VINCENT ITIER ET AL.: "Color noise correlation-based splicing detection for image forensics", 《MULTIMEDIA TOOLS AND APPLICATIONS》 *
白珊山: "数字视频修复篡改的取证算法研究", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *
魏金巧 等: "基于后验概率和滤色阵列特性的图像篡改检测算法", 《计算机科学与应用》 *

Also Published As

Publication number Publication date
CN113469297B (en) 2021-12-14

Similar Documents

Publication Publication Date Title
CN109116129B (en) Terminal detection method, detection device, system and storage medium
CN110766679A (en) Lens contamination detection method and device and terminal equipment
Qiao et al. Individual camera device identification from JPEG images
CN110399842B (en) Video processing method and device, electronic equipment and computer readable storage medium
CN108615030B (en) Title consistency detection method and device and electronic equipment
CN108648189B (en) Image blur detection method and device, computing equipment and readable storage medium
CN112270309A (en) Vehicle access point equipment snapshot quality evaluation method and device and readable medium
CN113781396A (en) Screen defect detection method, device, equipment and storage medium
CN111080665A (en) Image frame identification method, device and equipment and computer storage medium
CN113902740A (en) Construction method of image blurring degree evaluation model
Joshi et al. First steps toward CNN based source classification of document images shared over messaging app
CN113469297B (en) Image tampering detection method, device, equipment and computer readable storage medium
CN111416974A (en) Camera-based television screen acquisition method and system and intelligent terminal
CN116993654B (en) Camera module defect detection method, device, equipment, storage medium and product
CN108805883B (en) Image segmentation method, image segmentation device and electronic equipment
CN116468914A (en) Page comparison method and device, storage medium and electronic equipment
CN111400534B (en) Cover determination method and device for image data and computer storage medium
CN113391779A (en) Parameter adjusting method, device and equipment for paper-like screen
CN114550102A (en) Cargo accumulation detection method, device, equipment and system
CN114463242A (en) Image detection method, device, storage medium and device
CN111340677A (en) Video watermark detection method and device, electronic equipment and computer readable medium
CN116600105B (en) Color label extraction method, device, equipment and medium for video material
CN111579211B (en) Display screen detection method, detection device and computer storage medium
CN115601606B (en) Store state detection method, device, equipment and storage medium
CN113077422B (en) Foggy image detection method, model training method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Image tampering detection method, device, device, and computer-readable storage medium

Granted publication date: 20211214

Pledgee: Bank of Communications Limited Shenzhen Branch

Pledgor: SHENZHEN HYLINK INFORMATION TECHNOLOGY CO.,LTD.

Registration number: Y2024980019602

PE01 Entry into force of the registration of the contract for pledge of patent right