Image detection method, system and storage medium
By segmenting the image stream data into multiple data blocks and extracting header information, the problem of low efficiency in image originality detection is solved, and efficient detection of images of different formats is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-12
- Publication Date
- 2026-03-27
AI Technical Summary
Current technologies for detecting image originality are inefficient, rely on manual parsing of streaming data, have high technical requirements, and cannot fully parse header information of images in different formats.
By acquiring the streaming data of an image, dividing it into multiple image data blocks, extracting header information, and determining whether to perform image retouching operations, image retouching detection can be achieved.
It improves the efficiency of image originality detection, can comprehensively analyze the header information of JPEG and PNG format images, expands the scope of application, and reduces the technical requirements for inspection personnel.
Smart Images

Figure CN115272200B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computer, in particular to an image detection method, system and storage medium. BACKGROUND
[0002] At present, with the development of network information service industry, digital images become common evidence for submitting supporting materials in the network, and false images bring difficulties to information audit and threaten personal information security, therefore, it is of great significance to perform originality identification on images.
[0003] In the related art, the flow data of the to-be-detected image can only be parsed by a detection personnel to complete the detection of the to-be-detected image, but this method has a high technical requirement for the detection personnel, thereby there is a technical problem of low efficiency of originality detection on images.
[0004] In view of the above problems, no effective solution has been proposed at present. SUMMARY
[0005] The embodiments of the present application provide an image detection method, system and storage medium to at least solve the technical problem of low efficiency of originality detection on images.
[0006] According to an aspect of the embodiments of the present application, an image detection method is provided, comprising: acquiring flow data of a to-be-detected image, wherein the flow data is used to represent parsed data of the to-be-detected image; extracting a plurality of image data blocks contained in header file information in the flow data, wherein the plurality of image data blocks are used to at least represent image structure of the to-be-detected image; determining the header file information based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result comprises: the to-be-detected image is an original image which has not performed the retouching operation, and the to-be-detected image is a retouched image which has performed the retouching operation on the original image.
[0007] According to another aspect of the embodiments of the present application, another image detection method is provided, comprising: obtaining a to-be-detected image from an image auditing platform; extracting a plurality of image data blocks contained in header file information in stream data of the to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image, and the plurality of image data blocks are used to at least represent an image structure of the to-be-detected image; determining the header file information based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result comprises: the to-be-detected image being an original image which has not performed the retouching operation, and the to-be-detected image being a retouched image which has performed the retouching operation on the original image; and returning the detection result to the image auditing platform, wherein the detection result is used to audit the to-be-detected image on the image auditing platform.
[0008] According to another aspect of the embodiments of the present application, another image detection method is provided, comprising: obtaining a to-be-detected image of a virtual reality (VR) scene or an augmented reality (AR) scene; extracting a plurality of image data blocks contained in header file information in stream data of the to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image, and the plurality of image data blocks are used to at least represent an image structure of the to-be-detected image displayed on a VR device or an AR device; determining the header file information based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result comprises: the to-be-detected image being an original image which has not performed the retouching operation, and the to-be-detected image being a retouched image which has performed the retouching operation on the original image; and driving the VR device or the AR device to display the detection result.
[0009] According to an aspect of the embodiments of the present application, an image detection apparatus is provided, comprising: a first obtaining unit configured to obtain stream data of a to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image; a first extracting unit configured to extract a plurality of image data blocks contained in header file information in the stream data, wherein the plurality of image data blocks are used to at least represent an image structure of the to-be-detected image; a first determining unit configured to determine the header file information based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; and a first processing unit configured to perform retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result comprises: the to-be-detected image being an original image which has not performed the retouching operation, and the to-be-detected image being a retouched image which has performed the retouching operation on the original image.
[0010] According to another aspect of the embodiments of the present application, there is also provided another image detection apparatus, comprising: a second obtaining unit configured to obtain a to-be-detected image from an image auditing platform; a second extracting unit configured to extract a plurality of image data blocks contained in header file information in stream data of the to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image, and the plurality of image data blocks are used to represent at least an image structure of the to-be-detected image; a second determining unit configured to determine the header file information based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; a second processing unit configured to perform retouching detection on the to-be-detected image based on the header file information, to obtain a detection result, wherein the detection result comprises: the to-be-detected image being an original image which has not performed the retouching operation, and the to-be-detected image being a retouched image which has performed the retouching operation on the original image; and a returning unit configured to return the detection result to the image auditing platform, wherein the detection result is used to audit the to-be-detected image on the image auditing platform.
[0011] According to another aspect of the embodiments of the present application, there is also provided another image detection apparatus, comprising: a third obtaining unit configured to obtain a to-be-detected image of a virtual reality (VR) scene or an augmented reality (AR) scene; a third extracting unit configured to extract a plurality of image data blocks contained in header file information in stream data of the to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image, and the plurality of image data blocks are used to represent at least an image structure of the to-be-detected image displayed on a VR device or an AR device; a third determining unit configured to determine the header file information based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; a third processing unit configured to perform retouching detection on the to-be-detected image based on the header file information, to obtain a detection result, wherein the detection result comprises: the to-be-detected image being an original image which has not performed the retouching operation, and the to-be-detected image being a retouched image which has performed the retouching operation on the original image; and a driving unit configured to drive the VR device or the AR device to display the detection result.
[0012] According to another aspect of the embodiments of the present application, there is also provided another image detection system, comprising: a server and a virtual reality (VR) device or an augmented reality (AR) device, wherein the server is configured to acquire stream data of a to-be-detected image from the VR device or the AR device, wherein the stream data is used to represent analysis data of the to-be-detected image; extract a plurality of image data blocks contained in header file information in the stream data, wherein the plurality of image data blocks are used to at least represent image structure of the to-be-detected image; determine the header file information based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; perform retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result comprises: the to-be-detected image being an original image which has not performed the retouching operation, and the to-be-detected image being a retouched image which has performed the retouching operation on the original image; and the VR device or the AR device is configured to receive the detection result issued by the server.
[0013] According to another aspect of the embodiments of the present application, there is also provided a computer readable storage medium comprising a stored program, wherein the program, when executed, controls a device on which the storage medium is located to perform any of the image detection methods described above.
[0014] According to another aspect of the embodiments of the present application, there is also provided a processor configured to execute a program, wherein the program, when executed, performs any of the image detection methods described above.
[0015] In the embodiments of the present application, the stream data of a to-be-detected image is acquired, wherein the stream data is used to represent analysis data of the to-be-detected image; a plurality of image data blocks contained in header file information in the stream data are extracted, wherein the plurality of image data blocks are used to at least represent image structure of the to-be-detected image; the header file information is determined based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; and retouching detection is performed on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result comprises: the to-be-detected image being an original image which has not performed the retouching operation, and the to-be-detected image being a retouched image which has performed the retouching operation on the original image. That is, the embodiments of the present application split the to-be-detected image into a plurality of image data blocks based on the stream data of the to-be-detected image, output complete header file information of the to-be-detected image, and then perform detection on the to-be-detected image based on the obtained header file information, thereby achieving the technical effect of improving the efficiency of originality detection on the image and solving the technical problem of low efficiency of originality detection on the image. BRIEF DESCRIPTION OF DRAWINGS
[0016] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and serve to explain the principles of the application. In the drawings:
[0017] Figure 1 is a schematic diagram of a hardware environment of a virtual reality device according to an embodiment of the image detection method of the present application;
[0018] Figure 2 is a flowchart of an image detection method according to an embodiment of the present application;
[0019] Figure 3 is a flowchart of another image detection method according to an embodiment of the present application;
[0020] Figure 4 is a flowchart of another image detection method according to an embodiment of the present application;
[0021] Figure 5 is a schematic diagram of an image detection result according to an embodiment of the present application;
[0022] Figure 6 is a flowchart of an image header file information parsing process according to an embodiment of the present application
[0023] Figure 7 is a schematic diagram of a header file parser integrity comparison result according to an embodiment of the present application;
[0024] Figure 8 is a flowchart of a process of judging whether the image itself information is contradictory according to an embodiment of the present application;
[0025] Figure 9 is a flowchart of a process of judging whether the image meets the original image characteristics according to an embodiment of the present application;
[0026] Figure 10 is a flowchart of a process of judging whether each data segment is subject to the corresponding standard according to an embodiment of the present application;
[0027] Figure 11 is a flowchart of a process of judging the attributes of the image according to strong features according to an embodiment of the present application;
[0028] Figure 12 is a flowchart of a process of judging the attributes of the image according to non-strong features according to an embodiment of the present application;
[0029] Figure 13 is a flowchart of a process of detecting the traces of photo editing software according to an embodiment of the present application;
[0030] Figure 14 is a flowchart of a process of detecting the traces of social media channel transmission according to an embodiment of the present application;
[0031] Figure 15 is a schematic diagram of an image detection device according to an embodiment of the present application;
[0032] Figure 16 is a schematic diagram of another image detection device according to an embodiment of the present application;
[0033] Figure 17 is a schematic diagram of another image detection device according to an embodiment of the present application;
[0034] Figure 18 is a structural block diagram of a computer terminal according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work should belong to the scope of protection of the present application.
[0036] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] First, some of the nouns or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:
[0038] Image header file, the image header file carries metadata information, image metadata (Metadata) can be some labels embedded in the image file, carrying image information content, image metadata is various, and has different storage methods for different formats of images;
[0039] Joint Photographic Experts Group (JPEG) can be a standard for continuous tone static image compression, and the file suffix of Joint Photographic Experts Group can be.jpg or.jpeg, which is the most commonly used image file format. It mainly uses the joint coding mode of prediction coding (DPCM), discrete cosine transform (DCT) and entropy coding to remove redundant image and color data, belongs to lossy compression format, can compress the image in a small storage space, but will cause damage to the image data;
[0040] Portable Network Graphic Format (PNG) can be an image file storage format, which is a bitmap file storage format. PNG uses lossless data compression algorithm, has high compression ratio, and generates small file capacity;
[0041] Exchangeable image file format (Exif) can be the setting of digital camera photos, which is used to record the attribute information and shooting data of digital photos;
[0042] Image originality: the state of saving immediately after generating the image or being transmitted to the PC end through the data line only, without transmission through other channels, and without secondary operation of editing software, tools including the generating device.
[0043] Embodiment 1
[0044] According to the embodiment of the present application, an image detection method embodiment is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0045] Figure 1 It is a schematic diagram of the hardware environment of a virtual reality device according to the image detection method of the embodiment of the present application. As shown in Figure 1 The virtual reality device 104 is connected with the terminal 106, and the terminal 106 is connected with the server 102 through the network. The virtual reality device 104 is not limited to virtual reality headgear, virtual reality glasses, virtual reality all-in-one machine, etc., and the terminal 106 is not limited to PC, mobile phone, tablet computer, etc. The server 102 can be a server corresponding to a media file operator, and the network includes but is not limited to wide area network, metropolitan area network or local area network.
[0046] Optionally, the virtual reality device 104 of the embodiment comprises a memory, a processor and a transmission device. The memory is configured to store an application program, and the application program is configured to perform the following steps: obtaining stream data of a to-be-detected image, wherein the stream data is used to represent analysis data of the to-be-detected image; extracting a plurality of image data blocks contained in header file information in the stream data, wherein the plurality of image data blocks are used to at least represent an image structure of the to-be-detected image; determining the header file information based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result comprises: the to-be-detected image is an original image which has not performed the retouching operation, and the to-be-detected image is a retouched image which has performed the retouching operation on the original image. The technical problem of low efficiency of originality detection of the image is solved, and the purpose of improving the efficiency of originality detection of the image is achieved.
[0047] The terminal of the embodiment can be configured to perform the following steps: displaying, on a presentation screen of a virtual reality (VR) device or an augmented reality (AR) device, a detection result obtained by performing retouching detection on a to-be-detected image.
[0048] Optionally, a to-be-detected image of a virtual reality (VR) scene or an augmented reality (AR) scene is obtained; a plurality of image data blocks contained in header file information in stream data of the to-be-detected image are extracted based on the stream data, wherein the stream data is used to represent analysis data of the to-be-detected image, and the plurality of image data blocks are used to at least represent an image structure of the to-be-detected image displayed on the VR device or the AR device; the header file information is determined based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; the to-be-detected image is detected based on the header file information to obtain a detection result, wherein the detection result comprises: the to-be-detected image is an original image which has not performed the retouching operation, and the to-be-detected image is a retouched image which has performed the retouching operation on the original image; the VR device or the AR device is driven based on traffic flow to display the detection result; and the virtual reality device 104 displays the detection result at a target delivery position after receiving the detection result.
[0049] Optionally, the virtual reality device 104 of this embodiment has an eye tracking head-mounted display (HMD) with eye tracking function, which has the same function as the eye tracking module in the above-mentioned embodiments, that is, the screen in the HMD head-mounted display is used to display real-time images, and the eye tracking module in the HMD is used to obtain the real-time movement path of the user's eyeballs. The terminal of this embodiment obtains the position information and movement information of the user in the real three-dimensional space through the tracking system, and calculates the three-dimensional coordinates of the user's head in the virtual three-dimensional space and the direction of the user's field of view in the virtual three-dimensional space.
[0050] Figure 1 The hardware structure diagram shown not only can be used as an exemplary block diagram of the AR / VR device (or mobile device) described above, but also can be used as an exemplary block diagram of the server described above. Under the running environment shown above, the present application provides an image detection method as shown in Figure 2 It should be noted that the image detection method of this embodiment can be executed by the mobile terminal of the embodiment shown in Figure 1
[0051] Figure 2 A flow chart of an image detection method according to an embodiment of the present application, as shown in Figure 2 The method can include the following steps:
[0052] In step S202, the stream data of the image to be detected is obtained, wherein the stream data is used to represent the analysis data of the image to be detected.
[0053] In the technical solution provided in step S202 of the present application, the stream data of the image to be detected can be obtained, wherein the stream data can be used to represent the analysis data of the image to be detected, for example, it can be binary stream data, it can be header file information of the image, it can include header file information segment composition, header file specific information content, etc. The image to be detected can be an image obtained from any scene, can be an image header file, for example, can be a screenshot image obtained, or can be a photographic image taken by a camera, etc. The image to be detected can be a Joint Photographic Experts Group (JPEG) format image, or a Portable Network Graphics (PNG) format image. Here, the source and type of the image to be detected are not limited.
[0054] Optionally, the image to be detected can be obtained from merchant screenshot image review and identification, and the parser can be used to parse the image to be detected to obtain the stream data of the image to be detected, wherein the purpose of the parser of the present embodiment is to obtain the stream data, and the type of the parser is not limited here.
[0055] In the process of header file analysis, most of the parsers can only analyze part of the header file information, and the details of the file are ignored. For example, for a Joint Photographic Experts Group (JPEG) format image, the header file parser only analyzes the content of the Exchangeable image file format (EXIF) information segment, and cannot detect tampering and the impact of the transmission process on the stream data. There is a problem that only part of the common information is focused on, resulting in incomplete analysis of the content. Although binary analysis software can view the complete header file information, viewing the stream data requires secondary analysis of the stream data, which requires the tester to understand the header file structure of the image, and the technical requirements for the tester are high. There is a problem of low file analysis efficiency. At the same time, most of the analysis software can only analyze JPEG images, and there is little research on Portable Network Graphics (PNG) format images. For example, EXIF information reading software, EXIF information editing software, and image decoding software can only analyze JPEG format images, and there is a problem that the header file cannot be comprehensively analyzed. Further, the header file information of the image is stored in a data segment structure, and the division and display of the image data segment are helpful to understand the image structure and analyze the image data information change. The current header file parser cannot divide and display the image data segment, and can only extract part of the data segment information for analysis, which has the problem of not being comprehensive enough for header file analysis.
[0056] The embodiment of the present application can obtain stream data from binary information, and can analyze the header file information of PNG format images. The header file information of JPEG and PNG format images is analyzed, so that the stream data of JPEG and PNG format images can be obtained, and the application range of the embodiment of the present application is improved.
[0057] In step S204, a plurality of image data blocks contained in the header file information in the stream data are extracted, wherein the plurality of image data blocks are used to represent the image structure of the image to be detected.
[0058] In the technical solution provided in step S204 of the present application, the stream data is cut based on the analyzed stream data, and a plurality of image data blocks contained in the header file information in the stream data are extracted, wherein the plurality of data blocks are used to represent the image structure of the image to be detected. For example, it can be an image data segment, also known as an image data block, an image information segment, which can include a key data block, an auxiliary database and a basic database; the image data segment can be used to determine the image structure.
[0059] Optionally, the header file information can be cut from the binary information, and a plurality of image data blocks contained in the header file information of the stream data can be extracted to obtain a header file information segment structure of the image, thereby solving the problem that the current common header file parser cannot cut and display the image data segment; by adding the analysis of the PNG format image header file, the header file information of the JPEG and PNG format images can be analyzed, thereby expanding the image range applied by the header file parser.
[0060] Optionally, the image header file is composed of data segments, when the image format to be detected is a PNG format image, the image data block can include a key data block and an auxiliary data block, and the header file information segment structure of the image can be determined based on the cutting of the key data block and the auxiliary data block.
[0061] For example, when the image format to be detected is a PNG format image, the PNG format standard can be referred to, the contents of each data block in the stream information are extracted, the stream information is cut into data blocks, and then it can be determined which data blocks constitute the image, and the header file information segment structure of the image is determined; when the image format to be detected is a JPEG format image, the JPEG standard can be referred to, the stream information is cut into data blocks, the basic data block is cut, and the header file information segment structure of the image is determined based on the cutting of the basic data block.
[0062] In step S206, the header file information is determined based on the plurality of image data blocks, wherein the header file information includes identification information used to determine whether the image to be detected has performed a retouching operation.
[0063] In the technical solution provided in the above step S206 of the application, the header file information can be determined based on the plurality of image data blocks, wherein the header file information can be a header file information segment structure and specific information content of the header file, for example, the identification information of the retouching operation performed.
[0064] Optionally, since the image to be detected is often tampered with, a subtle trace is left in the binary stream, and therefore, whether the image to be detected is modified can be determined by judging whether the identification information of the retouching operation performed is contained in the header file information.
[0065] Optionally, the information content of each data segment is analyzed by the embodiment of the application, and the problem of incomplete analysis of the current header file parser is improved.
[0066] In step S208, the image to be detected is retouched and detected based on the header file information to obtain a detection result, wherein the detection result includes: the image to be detected is an original image without performing a retouching operation, and the image to be detected is a retouched image after performing a retouching operation on the original image.
[0067] In the technical solution provided in the above step S208 of the present application, the image to be detected is detected based on the header file information to obtain a detection result, wherein the detection result can be used to represent that the image to be detected is an original image without performing the retouching operation, and that the image to be detected is a retouched image after performing the retouching operation on the original image; the retouching detection can be used to detect whether the image to be detected is modified, such as image self-specification test, retouching software trace test, and social media channel transmission detection, and the detection manner is not limited here.
[0068] Through the above steps S202 to S208 of the present application, the stream data of the image to be detected is obtained, wherein the stream data is used to represent the analysis data of the image to be detected; a plurality of image data blocks contained in the header file information in the stream data are extracted, wherein the plurality of image data blocks are used to at least represent the image structure of the image to be detected; the header file information is determined based on the plurality of image data blocks, wherein the header file information includes identification information used to determine whether the image to be detected has performed the retouching operation; the image to be detected is detected based on the header file information to obtain a detection result, wherein the detection result includes that the image to be detected is an original image without performing the retouching operation, and that the image to be detected is a retouched image after performing the retouching operation on the original image. That is, the image to be detected is divided into a plurality of image data blocks based on the stream data of the image to be detected in the embodiment of the present application, and the complete header file information of the image to be detected is output, so that the image to be detected is detected based on the obtained header file information, thereby realizing the technical effect of improving the efficiency of the originality detection of the image, and further solving the technical problem of low efficiency of the originality detection of the image.
[0069] The above method of the embodiment will be further introduced below.
[0070] As an optional implementation, the stream data is binary stream data, and in step S204, the plurality of image data blocks contained in the header file information in the stream data are extracted, including: the binary stream data is divided to obtain the plurality of image data blocks.
[0071] In the embodiment, the stream data can be binary stream data, and the binary stream data can be divided to extract the plurality of image data blocks contained in the header file information in the stream data, so as to achieve the purpose of converting the image to be detected into a plurality of image data blocks, wherein the binary stream data can be binary stream, binary information, and binary stream information.
[0072] In the related art, only part of the header file information can be parsed, while in the embodiment of the present application, the binary stream data is divided into a plurality of binary data blocks (data segments) for display based on the binary information, so as to achieve the purpose of parsing a large amount of header file information.
[0073] As an optional implementation, the binary stream data is divided to obtain a plurality of image data blocks, including: determining division information corresponding to an image format of the image to be detected, wherein the image format includes a portable network graphics (PNG) format and a joint photographic experts group (JPEG), and the division information is used to determine the image data blocks; and dividing the binary stream data based on the division information to obtain the plurality of image data blocks.
[0074] In this embodiment, the image format of the image to be detected can be determined, the division information corresponding to the image format of the image to be detected can be determined, and the binary stream data can be divided based on the determined division information to obtain a plurality of image data blocks, wherein the image format can include a portable network graphics (PNG) format and a joint photographic experts group (JPEG); and the division information can include PNG division information and JPEG division information.
[0075] For example, when it is judged that the image format is a PNG format, the PNG division information can be referred to to determine the division standard of the PNG format image, and the image header file can be divided into a key data block and an auxiliary data block based on the division standard to obtain a plurality of image data blocks; when it is judged that the image format is a JPEG format image, the JPEG division information can be referred to to determine the division standard of the JPEG format image, and the image header file can be divided into a basic data block to obtain a plurality of image data blocks.
[0076] Optionally, the image header file is composed of data segments, in a PNG format image, the image header file can be divided into a key data block and an auxiliary data block by referring to the PNG format standard, for example, the binary stream information can be divided into a plurality of data blocks, and the contents of the data blocks are extracted from the image binary stream, so that the data block (information segment) composition of the image to be detected can be determined; in a JPEG format image, the file can be divided into a basic data block by referring to the JPEG standard.
[0077] Optionally, the JPEG format image can use a Huffman coding table (DHT) for data compression in the compression process, and the DQT represents a quantization table used in the JPEG compression process of the image.
[0078] In the related art, the research on the PNG format image is mainly in the aspects of PNG format acquisition, compression, identification and the like, and is not a primary research, and the embodiment of the present application improves the accuracy of data analysis by increasing the analysis of the PNG format image header file and performing header file information analysis for the JPEG and PNG format images.
[0079] As an optional implementation, the header file information comprises a header file information segment and header file information content, and determining the header file information based on the plurality of image data blocks comprises: constructing the plurality of image data blocks into the header file information segment; and parsing the content of the plurality of image data blocks to obtain the header file information content.
[0080] In this embodiment, the plurality of image data blocks are constructed into the header file information segment of the header file information, and the content of the plurality of image data blocks is parsed to achieve the purpose of determining the header file information content of the header file information.
[0081] In the related art, the binary stream information can be divided into data blocks, but the division into data blocks is only to store a series of binary data according to segments, and the problem of dividing and displaying the image data segment is lacking, and in the embodiment of the application, the data analysis is performed on each binary data segment to obtain the specific meaning, the problem of dividing and displaying the image data segment is solved, and the problem of incomplete analysis in the related art is improved.
[0082] Optionally, each data segment can be analyzed according to corresponding division information (image standard) to parse specific information, for example, the data segment (APP1) of the JPEG format image can be parsed based on the JEPG standard, the EXchangeable Image File (EXIF) standard, and the Internet call center (ICC) standard to obtain image EXIF information, which can include positioning (GPS) information, thumbnail information, and the like; the information content of the image header file is different for different images to be detected; for another example, the data analysis can be performed on each data block based on the PNG standard to parse specific information to obtain the header file information content.
[0083] As an optional implementation, the image to be detected is detected based on the header file information to obtain a detection result, comprising: determining a type attribute of the image to be detected based on the header file information, wherein the type attribute is used to represent the type of the image to be detected; and detecting the image to be detected based on the type attribute to obtain the detection result.
[0084] In this embodiment, the type attribute of the image to be detected is determined based on the header file information, and the image to be detected is detected based on the type attribute to obtain a detection result, wherein the type attribute can include a screenshot or a photographic image attribute, and the type of the image to be detected can be used to represent that the image to be detected is a screenshot or a photographic image.
[0085] Optionally, based on the image attribute, the self-standardization test can be performed on the two types of images, i.e., the photographic image and the screenshot image, according to the different type attributes of the images, so as to determine whether the image to be detected is an original image. The self-standardization test is to find out whether the image to be detected has some non-original features according to the image information. For example, if the various time information carried by the image is inconsistent, it can be considered that the image has been compressed and saved again.
[0086] Optionally, in the self-standardization test of the image, the originality detection can be performed on the two types of images, i.e., the photographic image and the screenshot image, according to the extracted originality features. The originality detection can include analyzing the self-information of the image to be detected and matching the attribute of the image to be detected.
[0087] For example, the analysis of the self-information of the image can include judging whether the self-information of the image to be detected is contradictory according to the parsed header file information content, and judging whether the image to be detected meets the original image features according to the parsed header file information segment, so as to determine whether the image to be detected is an original file or a non-original file.
[0088] As an optional implementation, the retouching detection of the image to be detected based on the type attribute includes: in response to the successful matching of the image to be detected and the original image features corresponding to the type attribute, determining that the image to be detected is an original image; and in response to the failed matching of the image to be detected and the original image features, determining that the image to be detected is a retouched image.
[0089] In this embodiment, the retouching detection of the image to be detected based on the type attribute includes matching the image to be detected and the original image features corresponding to the type attribute. In response to the successful matching of the image to be detected and the original image features corresponding to the type attribute, it can be determined that the image to be detected is an original image. In response to the failed matching of the image to be detected and the original image features, it is determined that the image to be detected is a retouched image (non-original image). The originality features can include screenshot original features and photographic image original features, such as time information, size information, and suffix name, which can be obtained by summarizing a large amount of data in a database in advance. The acquisition method of the original image features is not limited here. When the image to be detected has features that do not meet its attribute, it is considered that the image to be detected is a non-original image.
[0090] Optionally, the type attribute of the to-be-detected image can be judged, when it is judged that the attribute of the to-be-detected image is a screenshot, the header file information is matched with the original screenshot feature, if the matching is successful, the next step of judgment can be performed, if the matching fails, it is determined that the image is a non-original image; the type attribute of the to-be-detected image can be judged, when it is judged that the attribute of the to-be-detected image is a photographic image, the header file information is matched with the original photographic image feature, if the matching is successful, the next step of judgment can be performed, if the matching fails, it is determined that the image is a non-original image.
[0091] Optionally, starting from the image attribute, the photographic image and the screenshot image can be subjected to self-specification inspection according to the different image type attributes; the corresponding feature table of the screenshot image and the photographic image can also be extracted by analyzing the original screenshot image and the original photographic image header file data, wherein the features in the original photographic image header file data can be obtained by manually collecting image data, analyzing and summarizing each type of image data in advance.
[0092] For example, since the Huffman coding table (DHT) in the original image feature of the photographic image is fixed, the Huffman coding table of the screenshot is inconsistent, therefore, whether the Huffman coding table is special can be judged to determine whether the to-be-detected image is an original image, optionally, when it is determined that the to-be-detected image is a screenshot, whether the Huffman coding table (DHT) is special is judged, because the Huffman coding table of the screenshot is inconsistent, therefore, if the Huffman coding table (DHT) is special, it can be judged that the to-be-detected image is a non-original image, if it is not special, whether the quantization table (DQT) is all 1 is judged, since the quantization table of the screenshot is commonly all 1, therefore, if the quantization table (DHT) is all 1, it can be judged that the to-be-detected image is an original image, if it is not all 1, it can be judged that the to-be-detected image is a non-original image.
[0093] As an optional implementation, the type attribute of the to-be-detected image is determined based on the header file information, including: determining an attribute parameter of the to-be-detected image in the header file information, wherein the attribute parameter is used to determine the type attribute; in response to the attribute parameter being a screenshot image parameter, determining that the type attribute is a screenshot type attribute, wherein the screenshot type attribute is used to represent that the to-be-detected image is a screenshot image; in response to the attribute parameter being a photographic image parameter, determining that the type attribute is a photographic type attribute, wherein the photographic type attribute is used to represent that the to-be-detected image is a photographic image.
[0094] In the embodiment, the attribute parameter of the image to be detected is determined in the header file information, it can be judged whether the attribute parameter is a screenshot image parameter, in response to the attribute parameter being a screenshot image parameter, the type attribute is determined as a screenshot type attribute; or it can be judged whether the attribute parameter is a photographic image parameter, in response to the attribute parameter being a photographic image parameter, the type attribute is determined as a photographic type attribute, wherein the attribute parameter can be used to determine the type attribute, which can be a screenshot flag (xmp), a digital camera parameter, positioning information, a thumbnail, information communication center (ICC) information, etc.; the screenshot type attribute can be used to represent that the image to be detected is a screenshot image; the photographic type attribute can be used to represent that the image to be detected is a photographic image.
[0095] Optionally, the attribute can be judged by the header file information segment and the header file information content, wherein the attribute can be a screenshot or a photographic image attribute, the screenshot and the photographic image are constituted in the header file information segment, and there is a difference in the header file information content, so that the attribute can be judged.
[0096] For example, it can be judged whether the image to be detected contains a screenshot flag (xmp) to judge whether the image to be detected is an original image, the screenshot flag often appears in some images, and there is a clear screenshot mark in the screenshot, so that the image attribute can be judged by judging whether the image to be detected contains a screenshot flag, it can be judged whether the image to be detected contains a screenshot flag, if it contains, it is judged that the image to be detected is a screenshot image, if it does not contain, other attribute parameters of the image to be detected can be judged.
[0097] For another example, since the digital camera parameter setting (EXIF) will be stored in the photographic image, it can be judged whether the image to be detected is a photographic image by judging whether the attribute parameter contains the digital camera parameter, it can be judged whether the camera contains the digital camera parameter, if it contains, it can be judged that the image to be detected is a photographic image, if it does not contain, other attribute parameters of the image to be detected can be judged.
[0098] As an optional implementation, the image to be detected is detected based on the header file information to obtain a detection result, including: extracting a first image feature of the image to be detected from the header file information, wherein the first image feature is used to determine whether a target retouching client has performed a retouching operation on an original image; performing retouching detection on the image to be detected based on the first image feature and an image feature in a first database to obtain a detection result, wherein the first database includes a change image feature between an image sample before adjustment and an image sample after adjustment, and the image sample is adjusted by at least one retouching client, and the at least one retouching client includes the target retouching client.
[0099] In this embodiment, the first image feature of the to-be-detected image can be extracted from the header file information, the to-be-detected image is detected based on the first image feature and the image feature in the first database, and a detection result is obtained, wherein the first image feature can be used to determine whether the target retouching client performs a retouching operation on the original image; the first database can include the change image feature between the image sample before adjustment and the image sample after adjustment, can be a retouching software trace database, and can be obtained by summarizing a large amount of data in advance, and the acquisition manner of the first database is not limited herein; the retouching client can be a retouching software of each terminal, for example, a retouching software of a webpage version or a retouching software of a client.
[0100] In the embodiment of the application, the first database is used to improve the situation that the software range researched in the retouching software trace detection research work is narrow; whether the to-be-detected image is an original image can be determined by detecting whether the to-be-detected image has a retouching software tampering trace.
[0101] In the embodiment of the application, the image data change feature before and after the retouching software tampering can be obtained in advance from the image generation, and the first database (retouching software trace tampering database) is obtained, the first database can be used for retouching software trace detection of the to-be-detected image, the first image feature (image data) is matched with the first database obtained in advance, and whether the to-be-detected image has a retouching software tampering trace is verified.
[0102] As an optional implementation, the to-be-detected image is detected based on the first image feature and the image feature in the database, and a detection result is obtained, including: in response to a failure of the first image feature to match the image feature in the first database, determining that the to-be-detected image is an original image; and in response to a success of the first image feature to match the image feature in the first database, determining that the target retouching client performs a retouching operation on the original image to obtain a retouched image.
[0103] In this embodiment, the first database can be used for retouching software trace detection of the to-be-detected image, the first image feature is matched with the image feature in the first database, in response to a failure of the first image feature to match the image feature in the first database, it is determined that the to-be-detected image is an original image, that is, the to-be-detected image does not have a software modification trace; and in response to a success of the first image feature to match the image feature in the first database, it is determined that the target retouching client performs a retouching operation on the original image to obtain a retouched image, that is, the to-be-detected image is a non-original image.
[0104] Optionally, the first database can be used to detect the retouching software traces of the to-be-detected image, and the first image features of the to-be-detected image are matched with the internal data in the first database in advance, so as to verify whether the to-be-detected image has retouching software tampering traces. If there is a retouching software trace, it can be judged that the to-be-detected image is a non-original image; if there is no retouching software trace, it is judged that the to-be-detected image is an original image, wherein the header file information parsed can be detected for retouching software traces.
[0105] In this embodiment, the image features of the to-be-detected image after being tampered by each software can be obtained in advance from the first database (software tampering database), and the image features are used to detect the traces of the to-be-detected image.
[0106] For example, the software one web version of the JPEG format image data segment can be SOI+APP0+APP2+DQT+SOF+DHT+SOS+EOI, that is, there is no EXIF information segment in the software one web version, and the JFIF and ICC information are fixed. Therefore, whether the JPEG format image is modified by the retouching software can be determined by judging whether the APP0+APP2+DHT+SOS, JFIF and ICC information in the data segment information are consistent with the software one web version. If they are inconsistent, it means that the to-be-detected image has no modification traces and is an original image. If they are consistent, it means that the to-be-detected image has modification traces and is a non-original image.
[0107] As an optional implementation, the retouching detection of the to-be-detected image based on the header file information obtains a detection result, including: extracting second image features of the to-be-detected image from the header file information, wherein the second image features are used to determine whether a retouching operation is performed in the process that an original image is transmitted from a target sending end to a target receiving end through a target media channel; and performing retouching detection on the to-be-detected image based on the second image features and image features in a second database to obtain a detection result, wherein the second database includes changed image features between an image sample before sending and an image sample after sending, the image sample is sent from a sending end to a receiving end through a media channel, the sending end includes the target sending end, the media channel includes the target media channel, and the receiving end includes the target receiving end.
[0108] In this embodiment, the second image feature of the to-be-detected image is extracted from the header file information, and the to-be-detected image is detected based on the second image feature and the image feature in the second database to obtain a detection result, wherein the second image feature can be an image feature in a social media channel transmission process, and can be used to determine whether a retouching operation is performed in the process of transmitting the original image from the target sending end to the target receiving end through the target media channel; the second database can include the change image feature between the image sample before sending and the image sample after sending, the image sample can be sent from the sending end to the receiving end through the media channel, the sending end can include the target sending end, such as a mobile terminal, etc., and the media channel can include the target media channel, such as a media channel transmitted from a computer to a mobile phone, and the receiving end can include the target receiving end.
[0109] Optionally, in this embodiment, whether the to-be-detected image is an original image can be determined by detecting the social media channel transmission trace. The to-be-detected image can be detected by a social media channel transmission detection, the second image feature (image data block) is matched with the internal data in the second database (pre-obtained database), so as to verify whether the to-be-detected image has a social media channel transmission trace. For example, the to-be-detected image can be detected by a social media information transmission channel according to a social media channel transmission feature database, the image data is matched with the internal data in the pre-obtained database, so as to verify whether the to-be-detected image has a transmission trace.
[0110] As an optional implementation, the to-be-detected image is detected based on the second image feature and the image feature in the second database to obtain a detection result, including: in response to the second image feature failing to match the image feature in the second database, determining that the to-be-detected image is an original image; and in response to the second image feature successfully matching the image feature in the second database, determining that a retouching operation is performed in the process of transmitting the original image from the target sending end to the target receiving end through the target media channel to obtain a retouched image.
[0111] In this embodiment, the to-be-detected image is detected based on the second image feature and the image feature in the second database, in response to the second image feature failing to match the image feature in the second database, it can be determined that the to-be-detected image is an original image; and in response to the second image feature successfully matching the image feature in the second database, it is determined that a retouching operation is performed in the process of transmitting the original image from the target sending end to the target receiving end through the target media channel to obtain a retouched image, that is, it can be determined that the to-be-detected image is a non-original image.
[0112] Optionally, the parsed header file information can be subjected to social media channel transmission trace detection in originality identification to determine whether there is compression trace of the first communication software, if yes, the image to be detected is determined as a non-original image; if no, the image to be detected is determined as an original image.
[0113] For example, when the sending end is a Windows system and the receiving end is an Android system, if the image data segment in the second feature to be detected does not change, but the thumbnail resolution unit information of the JPEG image is deleted, it can be determined that the image to be detected has been compressed by the communication software, and then the image to be detected is a non-original image; if the image data segment changes and / or the thumbnail resolution unit information of the JPEG image is not deleted, it can be determined that the image to be detected has not been compressed by the first communication software, and then the image to be detected can be an original image.
[0114] It should be noted that the above cases are only for illustration, and the modification of the transmission trace of various communication software should be within the protection scope of the embodiments of the present application. In the embodiments of the present application, the compression trace of multiple communication software can be used to detect the image to be detected, and the detection can be processed in parallel or in series, and the processing mode and the number of detections are not limited here. The image to be detected can be detected by at least one of the following methods: self-standardization verification, retouching software trace detection, and social media channel transmission detection. The order among the three detection methods can be replaced, and the three detections can be processed in parallel or in series, or the originality of the image to be detected can be verified by combining the three methods. The selection mode is not limited here, and the detection by at least one of the self-standardization verification, the retouching software trace detection, and the social media channel transmission detection should be within the protection scope of the embodiments of the present application.
[0115] In the embodiments of the present application, the image is divided into multiple image data blocks based on the stream data of the image to be detected, the complete header file information of the image to be detected is output, and then the image to be detected is detected based on the obtained header file information, thereby achieving the technical effect of improving the efficiency of originality detection of the image, and further solving the technical problem of low efficiency of originality detection of the image.
[0116] The embodiments of the present application also provide another image detection method which can be applied to the platform merchant qualification audit scene.
[0117] Figure 3 is a flowchart of another image detection method according to the embodiments of the present application, as shown in Figure 3 The method can include the following steps.
[0118] In step S302, an image to be detected from an image audit platform is obtained.
[0119] In the technical solution provided in the step S302 of the present application, the image to be detected in the image review platform can be obtained, wherein the image review platform can be a platform merchant qualification review, or a merchant screenshot image review and identification, and the like.
[0120] In step S304, a plurality of image data blocks contained in the header file information of the flow data of the image to be detected are extracted, wherein the flow data is used to represent the parsed data of the image to be detected, and the plurality of image data blocks are used to represent at least the image structure of the image to be detected.
[0121] In step S306, the header file information is determined based on the plurality of image data blocks, wherein the header file information includes identification information used to determine whether the image to be detected has performed a retouching operation.
[0122] In step S308, the image to be detected is detected based on the header file information to obtain a detection result, wherein the detection result includes: the image to be detected is an original image without performing a retouching operation, and the image to be detected is a retouched image after performing a retouching operation on the original image.
[0123] In step S310, the detection result is returned to the image review platform, wherein the detection result is used to review the image to be detected on the image review platform.
[0124] In the technical solution provided in the step S310 of the present application, the detection result can be returned to the image review platform, wherein the detection result can be used to review the image on the image review platform, and can be represented in the form of "passing the review" or "not passing the review", or in the form of "original image" or "non-original image". The form of the detection result is not limited here, and the review of the image to be detected can be determined based on the detection result.
[0125] Through the steps S302 to S310 of the present application, the image to be detected is divided into a plurality of image data blocks based on the flow data of the image to be detected, and the complete header file information of the image to be detected is output, so that the image to be detected is detected based on the file information of the image header, thereby realizing the technical effect of improving the efficiency of the originality detection of the image, and solving the technical problem of low efficiency of the originality detection of the image.
[0126] The embodiment of the present application also provides an image detection method which can be applied to a virtual reality scene such as an end-cloud cooperative VR device and an AR device.
[0127] Figure 4 is a flow chart of an image detection method according to an embodiment of the present application. As shown in Figure 4 the method can include the following steps.
[0128] In step S402, an image to be detected of a virtual reality (VR) scene or an augmented reality (AR) scene is acquired.
[0129] In the technical solution provided in step S402, the image to be detected captured by the VR scene or the AR scene is acquired, and the image to be detected is displayed on a presentation screen of a VR device or an AR device.
[0130] In step S404, a plurality of image data blocks contained in header file information in stream data of the image to be detected are extracted, wherein the stream data is used to represent parsed data of the image to be detected, and the plurality of image data blocks are used to represent at least an image structure of the image to be detected displayed on the VR device or the AR device.
[0131] In step S406, the header file information is determined based on the plurality of image data blocks, and the header file information can be header file information of the image to be detected, wherein the header file information includes identification information used to determine whether the image to be detected has performed a retouching operation.
[0132] In step S408, the image to be detected is detected based on the header file information to obtain a detection result, wherein the detection result includes: the image to be detected is an original image without performing the retouching operation, and the image to be detected is a retouched image after performing the retouching operation on the original image.
[0133] In step S410, the VR device or the AR device is driven to display the detection result.
[0134] In the technical solution provided in step S410, the image to be detected is detected based on the header file information to obtain the detection result, and the VR device or the AR device is driven to display the detection result, wherein the detection result can include the image to be detected as the original image without performing the retouching operation, and the image to be detected as the retouched image after performing the retouching operation on the original image, for example, can be represented in the form of “original image” or “non-original image”, and the form of the detection result is not limited herein.
[0135] Optionally, in the embodiment, the image detection method can be applied to a hardware environment composed of a server and a virtual reality device. A video is displayed on a presentation screen of the virtual reality device or the augmented reality device, the server can be a server corresponding to a media file operator, the network includes but is not limited to a wide area network, a metropolitan area network or a local area network, and the virtual reality device is not limited to a virtual reality helmet, virtual reality glasses, a virtual reality all-in-one machine, and the like.
[0136] Optionally, the virtual reality device comprises a memory, a processor and a transmission device. The memory is configured to store an application program, and the application program is configured to perform the following steps: obtaining a to-be-detected image of a virtual reality (VR) scene or an augmented reality (AR) scene; extracting a plurality of image data blocks contained in header information of stream data of the to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image, and the plurality of image data blocks are used to represent at least an image structure of the to-be-detected image displayed on a VR device or an AR device; determining the header information based on the plurality of image data blocks, wherein the header information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; performing retouching detection on the to-be-detected image based on the header information to obtain a detection result, wherein the detection result comprises: the to-be-detected image being an original image without performing the retouching operation, and the to-be-detected image being a retouched image obtained by performing the retouching operation on the original image; and driving the VR device or the AR device to display the detection result.
[0137] It should be noted that the above-mentioned image detection method of the application in the VR device or the AR device in the embodiment can comprise Figure 2 The method of the embodiment shown is used to achieve the purpose of driving the VR device or the AR device to display the detection result.
[0138] Optionally, the processor of the embodiment can call the application program stored in the memory through the transmission device to perform the above-mentioned steps. The transmission device can receive a media file sent by a server through a network, and can also be used for data transmission between the processor and the memory.
[0139] Optionally, in the virtual reality device, a head-mounted display with eye tracking is provided, a screen in the HMD is used to display the displayed video picture, an eye tracking module in the HMD is used to obtain a real-time motion path of the user's eyes, a tracking system is used to track position information and motion information of the user in a real three-dimensional space, a calculation processing unit is used to obtain real-time position and motion information of the user from the tracking system, and calculate three-dimensional coordinates of the user's head in a virtual three-dimensional space and a visual field direction of the user in the virtual three-dimensional space.
[0140] In the embodiment of the application, the virtual reality device can be connected with a terminal, the terminal is connected with a server through a network, the virtual reality device is not limited to a virtual reality helmet, virtual reality glasses, a virtual reality all-in-one machine and the like, the terminal is not limited to a PC, a mobile phone, a tablet computer and the like, and the server can be a server corresponding to a media file operator. The network includes but is not limited to a wide area network, a metropolitan area network or a local area network.
[0141] Figure 5 is a schematic diagram of an image detection result according to the embodiment of the application, as Figure 5As shown, the display detection result of the virtual reality (VR) device or the augmented reality (AR) device, and the detection result can be used to represent whether the to-be-detected image is modified or whether the to-be-detected image is an original image.
[0142] The application cuts the to-be-detected image into a plurality of image data blocks based on the flow data of the to-be-detected image, outputs the complete header file information of the to-be-detected image, and then detects the to-be-detected image based on the header file information, thereby achieving the technical effect of improving the efficiency of the originality detection of the image and solving the technical problem of low efficiency of the originality detection of the image.
[0143] Embodiment 2
[0144] The preferred embodiments of the above method of this embodiment are further described below, and are specifically described by taking an image header file parser and an image originality identification method as an example.
[0145] The image header file parsing and originality identification have important significance in tampering detection, picture theft detection, image integrity judgment, and other scenarios of the to-be-detected image. The image header file parsing and originality identification can be applied to platform merchant qualification review, merchant screenshot image review and identification, and other scenarios. However, in the process of image processing, there are a large number of false images due to image tampering. At the same time, the Internet has also promoted the rapid spread of false images.
[0146] With the development of network information service industry, digital images have become common evidence for submitting supporting materials on the network. However, false images are difficult to verify in the process of review, and threaten personal information security. Strict image originality detection can provide an important reference for judicial evidence, and therefore, it is of great significance to improve the reliability of image originality identification.
[0147] In the related art, for the analysis of the header file, the header file can be analyzed by an analyzer. The analyzer can be mainly divided into six types, including binary viewing type software, such as data recovery software (WinHex), text editor software (UltraEdit), and the like; image management and processing type software, such as image management and editing tool software (ACDSee), image editing software (Photoshop), image management tool (Picasa), and image browsing and processing tool (iSee), and the like; EXIF information reading type software, such as image information modification tool (EXIFer), EXIF information viewer and editing software (EXIFViewer), and digital photo viewer (Opanda IEXIF), and the like; EXIF information editing type software, such as metadata editor (MagicEXIF); computer property software in the operating system (Windows) software; and header file analysis type software, such as image decoding software (JPEGSnoop), metadata software (Metedata).
[0148] However, in the process of analyzing the header file, most of the analyzers can only analyze part of the header file information, and the details of the file are ignored. For example, for a JPEG format image, the header file analyzer only analyzes the EXIF information segment content, but cannot detect the influence of tampering and transmission process on the data in the binary stream, and only focuses on part of the common information, resulting in the problem of incomplete analysis content. Although binary analysis software can view complete header file information, it needs to analyze the binary information twice, and therefore, viewing binary stream data requires the tester to understand the image header file structure, which has a high technical requirement for the tester, and the efficiency of analyzing the file is low. At the same time, most of the analysis software can only analyze JPEG images, and there is little research on PNG format images. For example, EXIF information reading software, EXIF information editing software, and JPEGSnoop can only analyze JPEG format images, and there is a problem that the header file cannot be analyzed comprehensively. Further, the image header file information is stored in a data segment structure, and the image data segment cutting display is helpful to understand the image structure and analyze the image data information change. However, the current header file analyzer cannot cut and display the image data segment, and can only extract part of the data segment information for analysis, and there is a problem of insufficient comprehensiveness of the header file analysis.
[0149] In the related art, for the discrimination of image originality, the discrimination of image originality is mainly completed by an originality discriminator, current research is mainly for image header file originality forensics, from the image format, it is mainly concentrated on JPEG format image; from the image type, it is mainly concentrated on photography; from the image generation, it is mainly concentrated on the detection of common Photoshop computer professional software tampering traces; from the image transmission, it is mainly concentrated on the research of a specific social media channel. For the image originality discriminator on the market, image decoding software (JPEGsnoop) is one of the most commonly used tools.
[0150] However, in the process of discrimination, the originality discriminator does not consider the influence of the tampering operation of the tampered image suffix on the header file originality in the actual application scene, ignores that modifying the image suffix is also one of the common tampering methods in the actual scene, and there is a problem that the detection is not comprehensive enough; and the detection of the traces of the retouching software is mainly concentrated on the computer retouching software, ignoring the detection of the retouching software in the mobile terminal, and there is a problem that the detection range is small; in terms of image propagation, current research on image transmission through social media channels is mainly for research on a specific social channel, without tracing research on the image type, i.e. photography or original image, and the transmission device, i.e. the device used by the sending end and the receiving end, and there is a problem that the research on the transmission of the social media channel cannot be accurate to the transmission image type and the transmission device; in terms of image type, it is mainly concentrated on the research of photography image, but the imaging principle of screenshot image is different from that of photography image, and there is a big difference in the header file, therefore, there is a problem that the screenshot image cannot be accurately detected; and current research on image originality is mainly concentrated on JPEG format image, and there is less research on PNG format image originality, and therefore, there is a problem that PNG image cannot be accurately detected.
[0151] To solve the above problems, the embodiment of the present application constructs a complete image header file parser and an image originality discriminator, which can parse the header file information segment composition and the specific header file information content, and improves the accuracy and completeness of the header file parser and the originality discriminator.
[0152] The header file parser designed in the embodiment of the present application starts from binary information, cuts the header file information of the image to be detected, outputs the header file information segment composition of the image to be detected, solves the problem that current common header file parsers lack image data segment cutting display, and improves the problem that current header file parsers are not complete enough by parsing the information content of each data segment; by adding the analysis of PNG format image header file, the header file information of JPEG and PNG format images is analyzed, and the range of images applied by the header file parser is expanded.
[0153] The originality discriminator designed in the embodiment of the application is based on the parsed header file information segment and the parsed header file specific information content of the header file parser; starting from the image type, the self-standardization test scheme is proposed for the two types of images, i.e., the screenshot image and the photographic image, the research on the electronic screenshot image in the current originality identification work is improved; starting from the image generation, the operation of the tampered image suffix name is researched, the research on the tampering generation mode is expanded; the research of the embodiment of the application covers more than ten kinds of retouching software on the computer side and the mobile phone side, a retouching software trace database is constructed, and the software range researched in the retouching software trace detection research work is improved; starting from the image transmission, the common social transmission is researched, and starting from the actual situation, the different transmission scenarios are researched, the transmission equipment and the transmission type are considered, and the comprehensiveness of the research on the social media channel transmission is increased.
[0154] The above method of the embodiment will be further introduced below.
[0155] As an optional embodiment, the header file information of the to-be-detected image is parsed using the designed image header file parser, and the header file information segment and the header file specific information content of the to-be-detected image are acquired.
[0156] Optionally, the header file information of the image can include two formats of JPEG and PNG, can be composed of a header file information segment and a header file specific information content, and can be parsed based on a data structure (Python) to data, Figure 6 is a flowchart of an image header file information parsing process according to the embodiment of the application, as Figure 6 shown, the file is parsed by the header file parser, which can include the following steps:
[0157] Step S601, judging the image format according to the file header.
[0158] In this embodiment, the image format can be determined by the file header, and the image format can be a JPEG format image or a PNG format image.
[0159] Step S602, the image header file is divided to obtain an image header file information segment.
[0160] In this embodiment, when it is judged that the image format of the to-be-detected image is a PNG format, the image header file can be divided into a key data block and an auxiliary data block according to the PNG standard; when it is judged that the image format of the to-be-detected image is a JPEG format image, the image header file can be divided into a basic data block according to the JPEG standard.
[0161] Optionally, the image header file is composed of data segments. In a PNG format image, according to the PNG format standard, the image header file can be divided into key data blocks and auxiliary data blocks. For example, the binary stream information can be divided into data blocks, and the content of each data block is extracted from the image binary stream, so that the data block (information segment) of the image to be detected can be determined. In a JPEG format image, according to the JPEG standard, the binary stream information can be divided into basic data blocks.
[0162] Optionally, the information segment of the PNG format image can include four key data blocks: a file header data block (IHDR) for storing image basic information, a palette data block (PLTE) for storing color related information, an image data block (IDAT) for storing image data content, and an image end data block (IEND) for marking the end of the image data. It should be noted that, in addition to the PLTE which can not exist for some non-color images, the remaining three key data blocks are carried by the PNG format image. It should be noted that the information segment can also include other data blocks, which are referred to as auxiliary data blocks. There are many such data blocks, and they can support extensions.
[0163] Optionally, the information segment of the JPEG format image can include an image start data block (Start of Image, SOI for short) for starting the image, a scan start data block (Start Of Scan, SOS for short), a storage application data block (APPn), an image basic information block (SOF), such as image sampling rate (YcrCb), and an image data end flag (Etart of Image, EOI for short) for indicating the end of the image data.
[0164] Optionally, the JPEG format image can use a Huffman coding table (DHT) for data compression during compression. DQT represents the quantization table used in the JPEG compression process of the image.
[0165] Step S603: Determine the information content of the image header file.
[0166] In this embodiment, the binary stream information of the image to be detected can be divided into data segments. However, the division into data segments is only a series of binary data stored in segments. Each binary data segment needs to be analyzed to obtain its specific meaning.
[0167] Optionally, each data segment can be analyzed according to a corresponding image standard to parse specific information, for example, the APP1 data segment of a JPEG format image can be parsed based on a JEPG standard, an EXIF standard, and an ICC standard to obtain image EXIF information, which can include GPS information, thumbnail information, etc., and the information content of the image header file is different for different images; for another example, each data block can be analyzed based on a PNG standard to parse specific information to obtain the information content of the image header file.
[0168] For example, a JPEG format image can include image basic information (such as width, height, image format, etc.), JEPG File Interchange Format (JFIF) information, EXIF information (such as positioning (GPS) information, thumbnail information, digital camera parameter information, time information, etc.), Internet call center (ICC) information, and Makernote information.
[0169] For example, a PNG format image can include image basic information (width, height, image format, etc.), PLTE color information, and iTxt information.
[0170] The header file parser designed in the embodiment of the application can parse the header file information segment composition and the header file specific information content, Figure 7 is a schematic diagram of a header file parser integrity comparison result according to the embodiment of the application, as Figure 7 Compared with commonly used software, such as an image editor (Exif pilot), image editing software (Photoshop), computer attribute software in operating system software (Windows), an EXIF information viewer, image decoding software (JPEGSnoop), and metadata software (Metedata++), the header file parser of the embodiment of the application has more comprehensive parsed data, and the accuracy and completeness of the parsed results are higher.
[0171] As Figure 7 indicated, the performance of the parser can be evaluated by 12 indexes including EXIF information, GPS information, ICC information, Makernote information, thumbnail information, xmp information, iptc information, a DQT table, a QF value, a DHT table, data segment analysis, and the ability to parse a PNG format image.
[0172] Optionally, for the EXIF information, GPS information, ICC information, makernote information, thumbnail information, xmp information, iptc information, the seven indicators can be compared with the number of information that can be parsed by other parsers, for example, the number of information contained in the EXIF information that can be parsed is used as a comparison.
[0173] Optionally, for the DQT table, QF value, DHT table (Huffman coding table), data segment parsing, and whether the PNG format image can be parsed, the comparison can be made by determining whether the parser can parse the information in this part, wherein the DQT table, QF, and record the compression degree of the JPEG image.
[0174] Optionally, the data segment parsing refers to that the parser can divide the binary stream data into each binary data segment for display.
[0175] Table 1 is a comparison result of the integrity of a header file parser according to an embodiment of the present application
[0176]
[0177] Optionally, Table 1 is a comparison result of the integrity of a header file parser according to an embodiment of the present application, as shown in Table 1, the header file parser of the embodiment of the present application is compared with commonly used software, such as image editor (Exif pilot), image editing software (Photoshop), computer property software in operating system software (Windows), EXIF information viewer, image decoding software (JPEGSnoop), and metadata software (Metedata++), the parsed data is more comprehensive, and the accuracy and completeness of the parsed results of the files are higher.
[0178] Optionally, the header file parser designed in the embodiment of the present application manually parses the ICC information according to the ICC format standard, and the ICC information is parsed more comprehensively and specifically.
[0179] As an optional embodiment, the originality of the parsed header file information can be identified; wherein the originality of the header file information can be identified from three aspects: the image properties can be started from, the photographic image and the screenshot image are specifically subjected to self-specification test according to the type properties of the to-be-detected image; the image generation can be started from, the to-be-detected image is subjected to retouching software trace detection; and the image transmission can be considered, the to-be-detected image is subjected to social media channel transmission detection, and the social media channel transmission trace of the to-be-detected image can be monitored.
[0180] It should be noted that in the originality discriminator design, the order of self-specification verification, retouching software trace detection, and social media channel transmission detection can be replaced, the three detections can be processed in parallel, or can be processed in series, wherein the self-specification verification is to find out whether the to-be-detected image has some non-original features according to the image information of the to-be-detected image, for example, the various time information carried by the image is inconsistent, considering the operation of re-compression and saving; the retouching software trace detection can be considered from the image generation to determine whether there is a mark written by the retouching software in the to-be-detected image; the social media channel transmission detection can be considered from the image transmission, and focuses on whether there is a trace left after the to-be-detected image is transmitted through a certain social media, the contents of the above three detections are different, and as long as one of the detections is abnormal, it can be judged that the to-be-detected image is a non-original image.
[0181] The image originality identification process from the three aspects of self-specification verification, retouching software trace detection, and social media channel transmission detection will be further introduced below.
[0182] As an optional embodiment, in the image self-specification verification, originality features can be extracted from the two types of images of photographic images and screenshot images, so as to use the extracted originality features to perform originality detection on the two types of images of photographic images and screenshot images, wherein the originality detection can include: analyzing the image self-information and matching the attributes of the image.
[0183] In this embodiment, analyzing the image self-information can include: judging whether the image self-information is contradictory according to the parsed header file information content, and judging whether the image satisfies the original image features according to the parsed header file information segment.
[0184] Figure 8 is a flowchart for judging whether the image self-information is contradictory according to an embodiment of the present application, as shown in Figure 8 The judgment of whether the image self-information is contradictory can include the following steps:
[0185] Step S801, judging whether the time information in the image self-information of the to-be-detected image is matched.
[0186] In this embodiment, all the time information carried in the image header file is extracted, and all the time information carried by the original image is consistent, while the time information of the tampered image is inconsistent after re-saving.
[0187] Optionally, whether the time information in the image self-information is matched is judged, if matched, step S801 is implemented, and if not matched, the to-be-detected image can be judged as a non-original image.
[0188] Step S802, judging whether the size information in the image self information of the image to be detected is consistent.
[0189] In this embodiment, the actual size in the extracted image header file is compared with the real size of the image. The non-original image will have inconsistent actual size and size recorded in the header file. Some re-compression will change the actual width and height of the image, while the width and height recorded in the header file are not modified sometimes, resulting in the existence of size information contradiction.
[0190] Optionally, whether the size information in the image self information is consistent is judged. If yes, step S803 is implemented. If no, the image to be detected is judged as a non-original image.
[0191] Step S803, judging whether the suffix name in the image self information of the image to be detected is matched.
[0192] In this embodiment, the image type of the image to be detected is identified, the real image type is extracted, and the suffix name of the image is matched. The tampered image suffix name will leave traces, and there will be a case of mismatched suffix name.
[0193] Optionally, whether the size information in the image self information of the image to be detected is consistent is judged. If yes, the image to be detected is judged as an original image. If no, the image to be detected is judged as a non-original image.
[0194] It should be noted that in the embodiment of the present application, the detection of the time information, the size information and the suffix name can be processed in parallel or in series. The time information can be judged first or last. The order of judging whether the image self information is contradictory is not limited here.
[0195] Figure 9 is a flowchart of judging whether the image to be detected satisfies the original image characteristics according to an embodiment of the present application, as shown in Figure 9 judging whether the image to be detected satisfies the original image characteristics can include the following steps:
[0196] Step S901, judging the header file structure integrity.
[0197] In this embodiment, the image data segment constitution can be detected according to the common original image data segment constitution feature, the image data segment constitution is detected, the image data segment is damaged due to tampering or transmission operation, and then the non-original image is detected. The JPEG original image data segment can be (SOI, APP, DQT, SOF, DHT, SOS, EOI); the PNG original image key data block can be (IHDR, IPTE, IDAT, IEND), and other auxiliary data blocks, and the IPTE data segment can be selected according to the color type of the image to be detected.
[0198] Optionally, the image data segment constitution can be detected according to the common original image data segment constitution feature, if the image structure is complete, step S902 is implemented, if it is detected that the image data segment is damaged due to tampering or transmission operation, or there is a problem that the image data segment structure is not complete, it can be determined that the image to be detected is a non-original image.
[0199] Step S902, judging the image data segment constitution.
[0200] In this embodiment, the image data segment of the image to be detected can be analyzed by experiment, and the image data segment of the image to be detected is extracted, and the originality matching analysis of the image to be detected is performed, wherein the JPEG original image data segment constitution can be ('SOI', 'APP0', 'APP1', 'APP2', 'SOS', 'DHT', 'DQT', 'SOF0', 'SOF2', 'EOI'). The image data segment can be analyzed by experiment, and the image data segment is extracted, when the image to be detected is a JPEG format image, the image data segment obtained by analysis can be matched with the JPEG original image data segment, if the matching is successful, step S903 is implemented, if the matching fails, it can be judged that the image to be detected is a non-original image.
[0201] Step S903, judging the GPS information feature of the image to be detected.
[0202] In this embodiment, the GPS information carried in the header file information of the image to be detected can be extracted and analyzed; for the photographic image, most of the photographic images have GPS information, but part of the social transmission and the retouching software will empty this data segment, but will not delete this data segment, therefore, if the GPS information segment is detected to be all zero, it can be considered that the image to be detected has been modified, and then it can be judged that the image to be detected does not have originality and is a non-original image, but since the screenshot image does not carry GPS information, the GPS information feature of the image can not be judged for the screenshot image.
[0203] Optionally, the GPS information feature of the image to be detected is acquired, and the GPS information feature is judged. If the GPS information feature can be detected, step S904 is implemented. If the GPS information feature cannot be detected, it can be judged that the image to be detected is a non-original image.
[0204] In step S904, whether each data segment conforms to the corresponding standard is judged.
[0205] In this embodiment, since the JPEG image and the PNG image both have corresponding requirements for the internal storage structure of the data segment, some tampering operations will affect the internal data of the data segment, so that the data segment has an abnormality. Therefore, according to the requirements of the JPEG and PNG formats, the image data segment can be analyzed and detected, Figure 10 is a flowchart for judging whether each data segment conforms to the corresponding standard according to an embodiment of the present application, as shown in FIG. 10. Figure 10 As shown in FIG. 10, judging the data segment can include the following steps:
[0206] In step S1001, whether the image format is a JPEG format image is judged.
[0207] In this embodiment, the analysis methods for the data structure correctness of the data segments of different types of patterns are also different.
[0208] Optionally, whether the image format is a JPEG format image is judged. If yes, step S1002 is implemented. If no, it is indicated that the image format is a PNG format type, and step S1008 is implemented.
[0209] In step S1002, whether the SOI segment in the data segment is equal to ffd8 is judged.
[0210] In this embodiment, whether the SOI segment in the data segment is equal to ffd8 is judged. If no, it is indicated that the data segment fails to pass the detection, and it can be judged that the image to be detected is a non-original image. If yes, step S1003 is implemented.
[0211] In step S1003, whether the APP0 length is greater than 18 is judged.
[0212] In this embodiment, whether the APP0 length is greater than 18 is judged. If yes, step S1004 is implemented. If no, it is indicated that the data segment fails to pass the detection, and it can be judged that the image to be detected is a non-original image.
[0213] In step S1004, whether the SOS length is greater than 10 is judged.
[0214] In this embodiment, whether the SOS length is greater than 10 is judged. If yes, step S1005 is implemented. If no, it is indicated that the data segment fails to pass the detection, and it can be judged that the image to be detected is a non-original image.
[0215] Step S1005, judging whether the length of S0F is greater than 19.
[0216] In this embodiment, if the length of S0F is greater than 19, step S1006 is implemented, otherwise, it is indicated that the data segment detection fails, and it can be judged that the image to be detected is a non-original image.
[0217] Step S1006, judging whether the length of EO1 is ffd9.
[0218] In this embodiment, if the length of EO1 is ffd9, step S1007 is implemented, otherwise, it is indicated that the data segment detection fails, and it can be judged that the image to be detected is a non-original image.
[0219] Step S1007, the data segment detection passes.
[0220] In this embodiment, the above judgments are performed on the data segment, and when the above conditions are all satisfied, the data segment detection of the image passes.
[0221] Step S1008, judging whether each data block passes the CRC check.
[0222] In this embodiment, if the image format is the PNG format type, it is judged whether each data block passes the CRC check, if yes, step S1009 is implemented, otherwise, it is indicated that the data segment detection fails, and it can be judged that the image to be detected is a non-original image.
[0223] Step S1009, performing the IHDR data block detection on each data block.
[0224] In this embodiment, the IHDR data block detection is performed on each data block, if the image passes the IHDR data block detection, step S1010 is implemented, otherwise, it is indicated that the data segment detection fails, and it can be judged that the image to be detected is a non-original image.
[0225] Optionally, the IHDR data block detection can include judging whether the IHDR is located at the first block and whether the length of IHDR is 13.
[0226] For example, it is judged whether the IHDR is located at the first block, if yes, it is judged whether the length of IHDR is 13, if the length of IHDR is 13, step S1010 is implemented, otherwise, it is indicated that the data segment detection fails, and it can be judged that the image to be detected is a non-original image.
[0227] For another example, it is judged whether the IHDR is located at the first block, if no, it is indicated that the data segment detection fails, and it can be judged that the image to be detected is a non-original image.
[0228] Step S1010, IPTE data block detection is performed on the data block.
[0229] In this embodiment, IPTE data block detection is performed on the data block, if the image to be detected passes the IPTE data block detection, step S1011 is implemented, if not, it is indicated that the data segment detection of the image to be detected fails, and it can be judged that the image to be detected is a non-original image.
[0230] Optionally, the IPTE data block detection on the data block can include judging whether the IPTE data block is contained, judging whether the IPTE block length can be divided by 3, judging whether only one PLTE data block is contained, and judging whether it is a non-gray scale image.
[0231] For example, it is judged whether the IPTE data block is contained in the data block of the image to be detected, if not, it is indicated that the data segment detection of the image to be detected fails, and it can be judged that the image to be detected is a non-original image, if yes, it is judged whether the IPTE block length can be divided by 3, if not, it is indicated that the data segment detection fails, if yes, it is judged whether only one PLTE data block is contained, if not, it is indicated that the data segment detection fails, and it can be judged that the image to be detected is a non-original image, if yes, it is judged whether the image to be detected is a non-gray scale image, if not, it is indicated that the data segment detection of the image to be detected fails, and it can be judged that the image to be detected is a non-original image, if yes, step S1011 is implemented.
[0232] Step S1011, it is judged whether the IDAT data block is continuous.
[0233] In this embodiment, it is judged whether the IDAT data block is continuous, if not, it is indicated that the data segment detection fails, and it can be judged that the image to be detected is a non-original image, if yes, step S1012 is implemented.
[0234] Step S1012, it is judged whether IEND is consistent with the standard.
[0235] In this embodiment, it is judged whether the IDAT data block is continuous, if not, it is indicated that the data segment detection fails, and it can be judged that the image to be detected is a non-original image, if yes, it is indicated that the data segment detection passes, and the following detection is continued.
[0236] It should be noted that the order of steps S1010 to S1012 is not specifically limited here, and steps S1010 to S1012 can be performed in series or in parallel.
[0237] As an optional embodiment, the image to be detected can also be subjected to self-specification inspection according to the image attribute.
[0238] Optionally, the self-standardization inspection of the two types of images, i.e., the photographic image and the screenshot image, can be performed according to the image type.
[0239] Optionally, the type attribute of the to-be-detected image can be judged. When it is judged that the attribute of the to-be-detected image is a screenshot, the header file information of the to-be-detected image can be matched with the original screenshot feature. If the matching is successful, the next step of judgment can be performed. If the matching fails, it can be determined that the to-be-detected image is a non-original image. The type attribute of the to-be-detected image can be judged. When it is judged that the attribute of the to-be-detected image is a photographic image, the header file information can be matched with the original photographic image feature. If the matching is successful, the next step of judgment can be performed. If the matching fails, it can be determined that the to-be-detected image is a non-original image.
[0240] Optionally, the corresponding feature table of the screenshot image and the photographic image can be extracted by analyzing the original screenshot image and the original photographic image header file data. The features in the original photographic image header file data can be extracted by manually collecting image data and analyzing and summarizing each type of image data in advance.
[0241] As an optional embodiment, the self-standardization inspection of the image according to the image attribute can include attribute judgment of the image according to the strong feature and further inspection of the image according to the non-strong feature.
[0242] Optionally, the attribute judgment can be performed by using the header file information segment and the header file information content. The attribute can be a screenshot or a photographic image attribute. The screenshot and the photographic image are different in the header file information segment and the header file information content, so as to perform the attribute judgment.
[0243] Figure 11 is a flowchart of attribute judgment of an image according to a strong feature according to an embodiment of the present application, as shown in Figure 11 The attribute judgment of the image according to the strong feature can include the following steps:
[0244] In step S1101, it is judged whether the to-be-detected image contains a screenshot mark (xmp).
[0245] Table 2 is a corresponding feature table of a screenshot image and a photographic image according to an embodiment of the present application
[0246]
[0247]
[0248] Table 2 is a corresponding feature table of a screenshot image and a photography image according to an embodiment of the present application. As shown in Table 2, for some device images, the screenshot mark often appears in some device images, and there is a clear screenshot mark in the screenshot. Therefore, the image attribute can be determined by judging whether the screenshot mark is contained in the image to be detected.
[0249] In this embodiment, it is judged whether the xmp screenshot mark is contained in the image to be detected. If the xmp screenshot mark is contained, it is determined that the image to be detected is a screenshot image. If the xmp screenshot mark is not contained, step S1102 is implemented.
[0250] In step S1102, it is judged whether the digital camera parameter (EXIF) is contained in the image to be detected.
[0251] As shown in Table 2, the digital camera parameter setting is certainly stored in the photography image. Therefore, it can be determined whether the image to be detected is a photography image by judging whether the digital camera parameter is contained in the image to be detected.
[0252] Optionally, it is judged whether the digital camera parameter is contained in the image. If the digital camera parameter is contained, it is determined that the image to be detected is a photography image. If the digital camera parameter is not contained, step S1103 is implemented.
[0253] In step S1103, it is judged whether the positioning (GPS) information is contained in the image to be detected.
[0254] As shown in Table 2, the screenshot image certainly does not contain the positioning information, and the photography image can contain the positioning information. Therefore, the GPS information is recorded when the photography image is taken, and the screenshot image is irrelevant to the location and does not have the information. That is, the image attribute of the image to be detected can be determined by judging whether the positioning information is contained in the image to be detected.
[0255] Optionally, it is judged whether the positioning information is contained in the image to be detected. If the positioning information is contained in the image to be detected, it is determined that the image to be detected is a photography image. If the positioning information is not contained, step S1104 is implemented.
[0256] In step S1104, it is judged whether the thumbnail is contained in the image to be detected.
[0257] As shown in Table 2, the screenshot image certainly does not contain the thumbnail, and the photography image certainly contains the thumbnail. Therefore, the image attribute can be determined by judging whether the thumbnail is contained in the data block (information segment) of the image to be detected.
[0258] Optionally, it is judged whether the thumbnail is contained in the data block of the image. If the thumbnail is contained, it is determined that the image is a photography image. If the thumbnail is not contained, step S1105 is implemented.
[0259] In step S1105, it is judged whether the color display (ICC) information is contained in the image to be detected.
[0260] As shown in Table 2, the screenshot will definitely carry the color display setting information, which is not common in the photographic image, thus, the image attribute can be judged by judging whether the color display information is contained in the data block (information segment) of the image to be detected.
[0261] Optionally, it is judged whether the color display information is contained in the data block of the image to be detected, if yes, it is judged that the image to be detected is a screenshot, if not, it is judged that the image to be detected is an abnormal image.
[0262] As an optional embodiment, further verification can be performed according to the non-strong feature, so as to determine whether the image to be detected is an original image or a non-original image.
[0263] Figure 12 is a flowchart of judging the attribute of an image according to a non-strong feature according to an embodiment of the present application, as shown in Figure 12 judging the attribute of an image according to a non-strong feature can include the following steps:
[0264] Step S1201, judging the Huffman coding table (DHT).
[0265] As shown in Table 2, the Huffman coding table of the photographic image is fixed, thus, it can be judged whether the image to be detected is an original image by judging whether the Huffman coding table (DHT) is special.
[0266] Optionally, after the strong feature is judged, it is determined that the image to be detected is a screenshot, and it is judged whether the Huffman coding table (DHT) is special, because the Huffman coding table of the screenshot is inconsistent, thus, if the Huffman coding table (DHT) is special, it can be judged that the image to be detected is a non-original image, if not, step S1202 is implemented.
[0267] Optionally, after the strong feature is judged, it is determined that the image to be detected is a photographic image, and it is judged whether the Huffman coding table (DHT) is special, because the Huffman coding table of the photographic image is fixed, thus, if the Huffman coding table (DHT) is not special, it can be judged that the image to be detected is a non-original image, if special, step S1203 is implemented.
[0268] Step S1202, judging whether the quantization table (DQT) is all 1.
[0269] As shown in Table 2, the screenshot imaging acquires the screen pixel points, which can be the screen pixel points without quantization, and the common quantization table is 1, thus, it can be judged whether the image to be detected is an original image by judging whether the quantization table (DHT) is all 1.
[0270] Optionally, it is judged whether the quantization table (DHT) is all 1. Since the quantization table of the screenshot is usually all 1, if the quantization table (DHT) is all 1, it can be judged that the image to be detected is an original image; if it is not all 1, it can be judged that the image to be detected is a non-original image.
[0271] In step S1203, it is judged whether the quantization table (DQT) is not all 1.
[0272] As shown in Table 2, the quantization table of the photographed image is not fixed and is related to the compression degree, so the quantization table (DQT) can be judged whether it is not all 1 to determine whether the image to be detected is an original image.
[0273] Optionally, it is judged whether the quantization table (DQT) is not all 1. Since the quantization table of the photographed image is not fixed and is related to the compression degree, if the quantization table (DHT) is not all 1, it can be judged that the image to be detected is an original image; if it is all 1, it can be judged that the image to be detected is a non-original image.
[0274] As an optional embodiment, whether the image to be detected is an original image can be determined by detecting whether there is a trace of tampering by the retouching software.
[0275] In this embodiment, starting from the image generation, the image data change characteristics before and after the tampering by the retouching software can be obtained in advance to obtain a retouching software trace tampering database. Table 3 is a characteristic table of a JPEG format image according to an embodiment of the present application, and Table 4 is a characteristic table of a PNG format image according to an embodiment of the present application. The image data can be matched with the internal data obtained in advance to detect the retouching software trace of the image to be detected, so as to verify whether there is a trace of tampering by the retouching software in the image to be detected.
[0276] Optionally, the retouching software trace of the image to be detected is detected. If there is a trace of the retouching software, it can be judged that the image to be detected is a non-original image; if there is no trace of the retouching software, it can be judged that the image to be detected is an original image.
[0277] Figure 13 is a flowchart of the retouching software trace detection according to an embodiment of the present application, as shown in Figure 13 The retouching software trace detection can include the following steps:
[0278] In step S1301, the header file specific information content and the header file data segment obtained by the header file parser are acquired.
[0279] In this embodiment, the input image can be parsed by the header file parser to obtain the header file specific information content and the header file data segment, and the parsed header file information can be detected for the retouching software trace in the originality identification.
[0280] In step S1302, the parsed file is subjected to trace detection.
[0281] In this embodiment, the image features of the images after being tampered with by various software can be obtained in advance from a software tampering database, and the image features are used to perform trace detection on the image to be detected.
[0282] For example, Table 3 is a feature table of a JPEG format image according to an embodiment of the present application. As shown in Table 3, the data segment structure of the JPEG format image of software version one can be SOI+APP0+APP2+DQT+SOF+DHT+SOS+EOI, that is, there is no EXIF information segment in the software version one, and the JFIF and ICC information are fixed. Therefore, whether the JPEG format image is modified by the photo editing software can be determined by judging whether the APP0+APP2+DHT+SOS, JFIF and ICC information in the data segment information are consistent with those of the software version one. If not consistent, it is indicated that the image to be detected has no modification trace and is an original image. If consistent, it is indicated that the image to be detected has a modification trace and is a non-original image.
[0283] Table 3 is a feature table of a JPEG format image according to an embodiment of the present application.
[0284]
[0285]
[0286] For example, the data segment structure of the PNG format image can include key data segments for representing the data segment structure and auxiliary data segments for representing the length of the IDAT block. Table 4 is a feature table of a PNG format image according to an embodiment of the present application. As shown in Table 4, the data segment structure of the PNG format image of software version one can be IHDR+sRGB+IDAT+IEND, and the length of the IDAT block can be 8204. That is, the sRGB information is fixed in the software version one, and the information in the IHDR part is fixed. Therefore, whether the PNG format image is modified by the photo editing software can be determined by judging whether the data segment structure matches, the length of the IDAT block is 8204 and the sRGB information matches. If not consistent, it is indicated that the image to be detected has no modification trace and is an original image. If consistent, it is indicated that the image to be detected has a modification trace and is a non-original image.
[0287] Table 4 is a feature table of a PNG format image according to an embodiment of the present application.
[0288]
[0289]
[0290] It should be noted that the other software in Table 3 and Table 4 is not exemplified one by one, the features in Table 3 and Table 4 can be obtained from the software tampering database, and only part of the modification features of the software are listed in Table 3 and Table 4. The embodiments of the present application are not limited to the software exemplified in Table 3 and Table 4. Various image editing related software of mobile terminals and web versions should be within the protection scope of the embodiments of the present application.
[0291] As an optional embodiment, it can also be determined whether the to-be-detected image is an original image by detecting the social media channel transmission trace.
[0292] In this embodiment, the to-be-detected image can be detected by social media channel transmission from the image transmission consideration, and the image data block is matched with the pre-obtained database internal data, so as to verify whether the to-be-detected image has a social media channel transmission trace.
[0293] In the image originality discriminator construction from the image generation, the social media channel transmission feature database can be obtained in advance, the to-be-detected image can be detected by the social media information transmission channel according to the social media channel transmission feature database, and the image data is matched with the pre-obtained database internal data, so as to verify whether the to-be-detected image has a transmission trace.
[0294] Figure 14 is a flowchart of a social media channel transmission trace detection according to an embodiment of the present application, as shown in Figure 14 The social media transmission trace detection can include the following steps:
[0295] Step S1401, obtaining the header file specific information content and the header file data segment obtained by the header file parser.
[0296] In this embodiment, the input to-be-detected image can be parsed by the header file parser to obtain the header file specific information content and the header file data segment, and the parsed header file information can be detected by the social media channel transmission trace in the originality identification.
[0297] Step S1402, judging whether there is a compression trace of the first communication software.
[0298] In this embodiment, the parsed header file information is obtained, and it is judged whether the header file information contains a compression trace of the first communication software. If yes, it can be judged that the to-be-detected image is a non-original image; if no, step S1403 is implemented.
[0299] For example, Table 5 is a social media channel transmission trace database according to an embodiment of the present application. As shown in Table 5, when the sending end is a Windows system and the receiving end is an Android system, if the image data segment does not change but the thumbnail resolution unit information of the JPEG image is deleted, it can be determined that the to-be-detected image has undergone compression by the first communication software, and the to-be-detected image is a non-original image; if the image data segment changes and / or the thumbnail resolution unit information of the JPEG image is not deleted, it can be determined that the to-be-detected image has not undergone compression by the first communication software, and the to-be-detected image can be an original image.
[0300] Table 5 is a social media channel transmission trace database according to an embodiment of the present application
[0301]
[0302]
[0303] It should be noted that the transmission traces of other communication software are not exemplified one by one here, and the features in Table 5 can be obtained from a software tampering database. The embodiment of the present application is not limited to the features in Table 5, and the transmission traces of other communication software should be within the protection scope of the embodiment of the present application.
[0304] Step S1403: determining whether there is a compression trace of the second communication software.
[0305] In this embodiment, it is determined whether the header file information contains a compression trace of the second communication software. If yes, it is determined that the to-be-detected image is a non-original image; if no, step S1404 is implemented.
[0306] Step S1404: determining whether there is a compression trace of the third communication software.
[0307] In this embodiment, it is determined whether the header file information contains a compression trace of the third communication software. If yes, it is determined that the to-be-detected image is a non-original image; if no, it is determined that the to-be-detected image is an original image.
[0308] It should be noted that in the embodiment of the present application, the first communication software detection, the second communication software detection and the third communication software detection can be processed in parallel or in series. The processing manner is not specifically limited here. Only the first communication software detection can be performed, only the second communication software detection can be performed, or fourth communication software detection and fifth communication software detection can be added according to actual conditions. The number of communication software is not specifically limited here.
[0309] The embodiment of the present application constructs a header file parser, and utilizes the header file parser to split and display header file information according to a corresponding image storage format standard from binary information.
[0310] In the embodiment of the present application, the parsing of specific information content of the header file is improved, and each information segment is parsed according to the data storage structure of each information segment, so that more complete header file information can be parsed.
[0311] The originality discriminator designed in the embodiment of the present application can detect two types of images, i.e., screenshot images and photographic images.
[0312] Embodiment 3
[0313] According to the embodiment of the present application, an image detection device for implementing the image detection method is also provided. Figure 2 As shown in the image detection device 1500, the image detection device 1500 can include a first acquisition unit 1502, a first extraction unit 1504, a first determination unit 1506, and a first processing unit 1508.
[0314] Figure 15 is a schematic diagram of an image detection device according to the embodiment of the present application. Figure 15 As shown in the image detection device 1500, the image detection device 1500 can include a first acquisition unit 1502, a first extraction unit 1504, a first determination unit 1506, and a first processing unit 1508.
[0315] The first acquisition unit 1502 is configured to acquire stream data of a to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image.
[0316] The first extraction unit 1504 is configured to extract a plurality of image data blocks contained in the header file information in the stream data of the to-be-detected image, wherein the plurality of image data blocks are used to at least represent an image structure of the to-be-detected image.
[0317] The first determination unit 1506 is configured to determine the header file information based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has been subjected to the retouching operation.
[0318] The first processing unit 1508 is configured to perform retouching detection on the to-be-detected image based on the header file information, to obtain a detection result, wherein the detection result comprises: the to-be-detected image being an original image which has not been subjected to the retouching operation, and the to-be-detected image being a retouched image which has been subjected to the retouching operation on the original image.
[0319] It should be noted that the first acquisition unit 1502, the first extraction unit 1504, the first determination unit 1506, and the first processing unit 1508 correspond to steps S202 to S208 in Embodiment 1, and the four units have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above units can run in the computer terminal 10 provided in Embodiment 1 as a part of the device.
[0320] According to the embodiments of the present application, an image detection device for implementing the image detection method is also provided. Figure 3
[0321] Figure 16 is a schematic diagram of another image detection device according to an embodiment of the present application, which can be applied to the image detection method in the platform merchant qualification review scenario. As shown in Figure 16 The image detection device 1600 can include a second acquisition unit 1602, a second extraction unit 1604, a second determination unit 1606, a second processing unit 1608, and a return unit 1610.
[0322] The second acquisition unit 1602 is configured to acquire a to-be-detected image from an image review platform.
[0323] The second extraction unit 1604 is configured to extract a plurality of image data blocks contained in the header file information in the stream data of the to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image, and the plurality of image data blocks are used to at least represent an image structure of the to-be-detected image.
[0324] The second determination unit 1606 is configured to determine the header file information based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has been subjected to the retouching operation.
[0325] The second processing unit 1608 is configured to perform retouching detection on the to-be-detected image based on the header file information to obtain a detection result, where the detection result includes that the to-be-detected image is an original image without performing a retouching operation, or that the to-be-detected image is a retouched image after performing a retouching operation on the original image.
[0326] The returning unit 1610 is configured to return the detection result to an image auditing platform, where the detection result is used for auditing the to-be-detected image on the image auditing platform.
[0327] It should be noted that the first obtaining unit 1602, the second extracting unit 1604, the second determining unit 1606, the second processing unit 1608, and the returning unit 1610 correspond to steps S302 to S310 in Embodiment 1, and the five units have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above units can run in the computer terminal 10 provided in Embodiment 1 as a part of the device.
[0328] According to the embodiments of the present application, an image detection method and an image detection device are also provided. Figure 4 The image detection method is shown in FIG. 1.
[0329] Figure 17 FIG. 2 is a schematic diagram of another image detection device according to the embodiments of the present application. As shown in FIG. 2, the image detection device 2000 can include a fourth obtaining unit 2002, a fourth extracting unit 2004, a fourth determining unit 2006, a fourth processing unit 2008, and a driving unit 2010. Figure 17
[0330] The fourth obtaining unit 2002 is configured to obtain a to-be-detected image of a virtual reality (VR) scene or an augmented reality (AR) scene.
[0331] The fourth extracting unit 2004 is configured to extract a plurality of image data blocks contained in header file information in stream data of the to-be-detected image, where the stream data is used to represent parsed data of the to-be-detected image, and the plurality of image data blocks are used to represent at least an image structure of the to-be-detected image displayed on a VR device or an AR device.
[0332] The fourth determining unit 2006 is configured to determine the header file information of the to-be-detected image based on the plurality of image data blocks, where the header file information includes identification information used to determine whether the to-be-detected image has performed a retouching operation.
[0333] The third processing unit 1708 is configured to perform retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result includes: the to-be-detected image is an original image without performing a retouching operation, and the to-be-detected image is a retouched image after performing a retouching operation on the original image.
[0334] The driving unit 1710 is configured to drive the VR device or the AR device to display the detection result.
[0335] It should be noted that the third obtaining unit 1702, the third extraction unit 1704, the third determination unit 1706, the third processing unit 1708 and the driving unit 1710 correspond to steps S402 to S410 in Embodiment 1, and the two units have the same instances and application scenarios as the corresponding steps, but are not limited to the disclosure of Embodiment 1. It should be noted that the above units as part of the device can run in the computer terminal 10 provided in Embodiment 1.
[0336] In the image detection device of this embodiment, the image is divided into a plurality of image data blocks based on the stream data of the to-be-detected image, the complete header file information of the to-be-detected image is output, and then the to-be-detected image is detected based on the obtained header file information, thereby achieving the technical effect of improving the efficiency of original image detection, and solving the technical problem of low efficiency of original image detection.
[0337] Embodiment 4
[0338] The embodiments of the present application can provide an image detection system, which can include a server, a client, and the AR / VR device can be any AR / VR device in the AR / VR device group. Optionally, the image detection system includes: a server and a VR device or an AR device, wherein the server is configured to obtain stream data of a to-be-detected image from the VR device or the AR device, wherein the stream data is used to represent analysis data of the to-be-detected image; extract a plurality of image data blocks contained in the header file information in the stream data, wherein the plurality of image data blocks are used to at least represent the image structure of the to-be-detected image; determine the header file information of the to-be-detected image based on the plurality of image data blocks, wherein the header file information includes identification information used to determine whether the to-be-detected image has performed a retouching operation; perform retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result includes: the to-be-detected image is an original image without performing a retouching operation, and the to-be-detected image is a retouched image after performing a retouching operation on the original image; and the VR device or the AR device is configured to receive the detection result issued by the server.
[0339] In the embodiment of the present application, the image is divided into a plurality of image data blocks based on the flow data of the image to be detected, the header file information of the complete image to be detected is output, and the image to be detected is detected based on the obtained header file information, thereby realizing the technical effect of improving the efficiency of the original detection of the image and solving the technical problem of low efficiency of the original detection of the image.
[0340] Embodiment 5
[0341] The embodiment of the present application can provide an image detection processor, which can include a computer terminal, which can be any one of the computer terminal devices in the computer terminal group. Alternatively, in the embodiment, the computer terminal can be replaced by a mobile terminal or other terminal device.
[0342] Alternatively, in the embodiment, the computer terminal can be located in at least one of the network devices in the computer network.
[0343] In the embodiment, the computer terminal can execute the program code of the following steps in the image detection method of the application program: obtaining the flow data of the image to be detected, wherein the flow data is used to represent the analysis data of the image to be detected; extracting a plurality of image data blocks contained in the header file information in the flow data, wherein the plurality of image data blocks are used to represent at least the image structure of the image to be detected; determining the header file information based on the plurality of image data blocks, wherein the header file information includes identification information used to determine whether the image to be detected has performed a retouching operation; performing retouching detection on the image to be detected based on the header file information to obtain a detection result, wherein the detection result includes: the image to be detected is an original image without performing a retouching operation, and the image to be detected is a retouched image after performing a retouching operation on the original image.
[0344] Alternatively, Figure 18 is a structural block diagram of a computer terminal according to an embodiment of the present application. As shown in Figure 18 , the computer terminal A can include one or more (only one is shown in the figure) processors 1802, a memory 1804, and a transmission device 1806.
[0345] The memory can be configured to store software programs and modules, such as program instructions / modules corresponding to the image detection method and device in the embodiments of the present application. The processor executes various functions and predictions by running the software programs and modules stored in the memory, that is, implements the image detection method described above. The memory can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory can further include a memory remotely arranged with respect to the processor, which can be connected to the terminal A through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0346] The processor can call information and applications stored in the memory through the transmission device to perform the following steps: obtaining stream data of a to-be-detected image, wherein the stream data is used to represent analysis data of the to-be-detected image; extracting a plurality of image data blocks contained in header file information in the stream data, wherein the plurality of image data blocks are used to at least represent an image structure of the to-be-detected image; determining the header file information based on the plurality of image data blocks, wherein the header file information includes identification information used to determine whether the to-be-detected image has performed a retouching operation; performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result includes: the to-be-detected image is an original image without performing the retouching operation, and the to-be-detected image is a retouched image after performing the retouching operation on the original image.
[0347] Optionally, the processor can further execute program codes of the following steps: segmenting the binary stream data to obtain the plurality of image data blocks.
[0348] Optionally, the processor can further execute program codes of the following steps: determining segmentation information corresponding to an image format of the to-be-detected image, wherein the image format includes a portable network graphics (PNG) format and a joint photographic experts group (JPEG) format, and the segmentation information is used to determine the image data blocks.
[0349] Optionally, the processor can further execute program codes of the following steps: constructing the plurality of image data blocks into a header file information segment; and analyzing contents of the plurality of image data blocks to obtain header file information contents.
[0350] Optionally, the processor can further execute program codes of the following steps: determining a type attribute of the to-be-detected image based on the header file information, wherein the type attribute is used to represent a type of the to-be-detected image; and performing retouching detection on the to-be-detected image based on the type attribute to obtain a detection result.
[0351] Optionally, the processor can further execute program codes of the following steps: determining the to-be-detected image as the original image in response to a successful matching of the to-be-detected image and the original image feature corresponding to the type attribute; and determining the to-be-detected image as the retouched image in response to a failed matching of the to-be-detected image and the original image feature.
[0352] Optionally, the processor can further execute program codes of the following steps: determining an attribute parameter of the to-be-detected image in the header file information, wherein the attribute parameter is used to determine the type attribute; determining the type attribute as a screenshot type attribute in response to the attribute parameter being a screenshot image parameter, wherein the screenshot type attribute is used to represent that the to-be-detected image is a screenshot image; and determining the type attribute as a photography type attribute in response to the attribute parameter being a photography image parameter, wherein the photography type attribute is used to represent that the to-be-detected image is a photography image.
[0353] Optionally, the processor can further execute program codes of the following steps: extracting a first image feature of the to-be-detected image from the header file information, wherein the first image feature is used to determine whether the original image is retouched by the target retouching client; and performing retouching detection on the to-be-detected image based on the first image feature and image features in a first database to obtain a detection result, wherein the first database includes changed image features between image samples before adjustment and image samples after adjustment, and the image samples are adjusted by at least one retouching client, and the at least one retouching client includes the target retouching client.
[0354] Optionally, the processor can further execute program codes of the following steps: determining the to-be-detected image as the original image in response to a failed matching of the first image feature and the image features in the first database; and determining that the original image is retouched by the target retouching client to obtain the retouched image in response to a successful matching of the first image feature and the image features in the first database.
[0355] Optionally, the processor can further execute program codes of the following steps: extracting a second image feature of the to-be-detected image from the header file information, wherein the second image feature is used to determine whether a retouching operation is performed in a process in which the original image is transmitted by a target sending end to a target receiving end through a target media channel; and performing retouching detection on the to-be-detected image based on the second image feature and image features in a second database to obtain a detection result, wherein the second database includes changed image features between image samples before sending and image samples after sending, and the image samples are sent by a sending end to a receiving end through a media channel, the sending end includes the target sending end, the media channel includes the target media channel, and the receiving end includes the target receiving end.
[0356] Optionally, the processor can further execute program codes of the following steps: in response to the second image feature failing to match the image feature in the second database, determining that the to-be-detected image is an original image; and in response to the second image feature successfully matching the image feature in the second database, determining that a retouching operation is performed on the original image in a process in which the original image is transmitted by the target sending end to the target receiving end through the target media channel to obtain a retouched image.
[0357] As an optional example, the processor can call information and application programs stored in the memory through the transmission device to execute the following steps: obtaining a to-be-detected image from an image review platform; extracting a plurality of image data blocks contained in header file information of stream data of the to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image, and the plurality of image data blocks are used to represent at least an image structure of the to-be-detected image; determining header file information of the to-be-detected image based on the plurality of image data blocks, wherein the header file information includes identification information used to determine whether the to-be-detected image has performed a retouching operation; performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result includes: the to-be-detected image being an original image that has not performed a retouching operation, and the to-be-detected image being a retouched image that has performed a retouching operation on the original image; and returning the detection result to the image review platform, wherein the detection result is used to review the to-be-detected image on the image review platform.
[0358] As an optional example, the processor can call information and application programs stored in the memory through the transmission device to execute the following steps: obtaining a to-be-detected image of a virtual reality (VR) scene or an augmented reality (AR) scene; extracting a plurality of image data blocks contained in header file information of stream data of the to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image, and the plurality of image data blocks are used to represent at least an image structure of the to-be-detected image displayed on a VR device or an AR device; determining header file information of the to-be-detected image based on the plurality of image data blocks, wherein the header file information includes identification information used to determine whether the to-be-detected image has performed a retouching operation; performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result includes: the to-be-detected image being an original image that has not performed a retouching operation, and the to-be-detected image being a retouched image that has performed a retouching operation on the original image; and driving the VR device or the AR device to display the detection result.
[0359] The embodiment of the present application provides an image detection method, which cuts an image into a plurality of image data blocks based on stream data of the to-be-detected image, outputs complete header file information of the to-be-detected image, and then detects the to-be-detected image based on the obtained header file information, thereby achieving the technical effect of improving the efficiency of originality detection of the image and solving the technical problem of low efficiency of originality detection of the image.
[0360] Those skilled in the art can understand that, Figure 18 The structure shown is only schematic, and the computer terminal A can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, or the like. Figure 18 The structure of the computer terminal A is not limited above. For example, the computer terminal A can further include more or less components (such as a network interface, a display device, etc.), or have a different configuration from that shown. Figure 18 The structure of the computer terminal A is not limited above. For example, the computer terminal A can further include more or less components (such as a network interface, a display device, etc.), or have a different configuration from that shown. Figure 18 The structure of the computer terminal A is not limited above. For example, the computer terminal A can further include more or less components (such as a network interface, a display device, etc.), or have a different configuration from that shown.
[0361] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device by a program, which can be stored in a computer readable storage medium, and the storage medium can include a flash disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, etc.
[0362] Embodiment 6
[0363] The embodiments of the present application also provide a computer readable storage medium. Optionally, in the present embodiment, the computer readable storage medium can be used to save the program code executed by the image detection method provided in Embodiment 1.
[0364] Optionally, in the present embodiment, the computer readable storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
[0365] Optionally, in the present embodiment, the computer readable storage medium is configured to store program code for performing the following steps: obtaining stream data of a to-be-detected image, wherein the stream data is used to represent analysis data of the to-be-detected image; extracting a plurality of image data blocks contained in header file information in the stream data, wherein the plurality of image data blocks are used to at least represent an image structure of the to-be-detected image; determining the header file information based on the plurality of image data blocks, wherein the header file information includes identification information used to determine whether the to-be-detected image has performed a retouching operation; and performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result includes: the to-be-detected image being an original image which has not performed the retouching operation, and the to-be-detected image being a retouched image which has performed the retouching operation on the original image.
[0366] Optionally, the computer readable storage medium can further execute program codes of the following steps: splitting the binary stream data to obtain a plurality of image data blocks.
[0367] Optionally, the computer readable storage medium can further execute program codes of the following steps: determining splitting information corresponding to an image format of the image to be detected, wherein the image format comprises a Portable Network Graphics (PNG) format and a Joint Photographic Experts Group (JPEG) format, and the splitting information is used to determine the image data blocks.
[0368] Optionally, the computer readable storage medium can further execute program codes of the following steps: constructing the plurality of image data blocks into a header file information segment; and parsing contents of the plurality of image data blocks to obtain header file information contents.
[0369] Optionally, the computer readable storage medium can further execute program codes of the following steps: determining a type attribute of the image to be detected based on the header file information, wherein the type attribute is used to represent a type of the image to be detected; and performing retouching detection on the image to be detected based on the type attribute to obtain a detection result.
[0370] Optionally, the computer readable storage medium can further execute program codes of the following steps: determining that the image to be detected is an original image in response to a successful matching of a feature of the original image corresponding to the type attribute; and determining that the image to be detected is a retouched image in response to a failed matching of the feature of the original image.
[0371] Optionally, the computer readable storage medium can further execute program codes of the following steps: determining an attribute parameter of the image to be detected in the header file information, wherein the attribute parameter is used to determine the type attribute; determining that the type attribute is a screenshot type attribute in response to the attribute parameter being a screenshot image parameter, wherein the screenshot type attribute is used to represent that the image to be detected is a screenshot image; and determining that the type attribute is a photography type attribute in response to the attribute parameter being a photography image parameter, wherein the photography type attribute is used to represent that the image to be detected is a photography image.
[0372] Optionally, the computer readable storage medium can further execute program codes of the following steps: extracting a first image feature of the image to be detected from the header file information, wherein the first image feature is used to determine whether a target retouching client has performed a retouching operation on an original image; and performing retouching detection on the image to be detected based on the first image feature and an image feature in a first database to obtain a detection result, wherein the first database comprises a change image feature between an image sample before adjustment and an image sample after adjustment, and the image sample is adjusted by at least one retouching client, and the at least one retouching client comprises the target retouching client.
[0373] Optionally, the computer readable storage medium further stores program codes to perform the following steps: in response to the first image feature failing to match the image feature in the first database, determining that the to-be-detected image is an original image; and in response to the first image feature successfully matching the image feature in the first database, determining that the target retouching client performs a retouching operation on the original image to obtain a retouched image.
[0374] Optionally, the computer readable storage medium further stores program codes to perform the following steps: extracting a second image feature of the to-be-detected image from the header file information, wherein the second image feature is used to determine whether the retouching operation is performed in the process of transmitting the original image from the target sending end to the target receiving end through the target media channel; and performing retouching detection on the to-be-detected image based on the second image feature and the image feature in the second database to obtain a detection result, wherein the second database includes a change image feature between a pre-sending image sample and a post-sending image sample, the image sample is sent from the sending end to the receiving end through the media channel, the sending end includes the target sending end, the media channel includes the target media channel, and the receiving end includes the target receiving end.
[0375] Optionally, the computer readable storage medium further stores program codes to perform the following steps: in response to the second image feature failing to match the image feature in the second database, determining that the to-be-detected image is an original image; and in response to the second image feature successfully matching the image feature in the second database, determining that the retouching operation is performed in the process of transmitting the original image from the target sending end to the target receiving end through the target media channel to obtain a retouched image.
[0376] As an optional example, the computer readable storage medium is configured to store program codes for performing the following steps: obtaining a to-be-detected image from an image auditing platform; extracting a plurality of image data blocks contained in header file information of the to-be-detected image from stream data of the to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image, and the plurality of image data blocks are used to represent at least an image structure of the to-be-detected image; determining the header file information of the to-be-detected image based on the plurality of image data blocks, wherein the header file information includes identification information used to determine whether the to-be-detected image has performed a retouching operation; performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result includes: the to-be-detected image being an original image without performing the retouching operation, and the to-be-detected image being a retouched image obtained by performing the retouching operation on the original image; and returning the detection result to the image auditing platform, wherein the detection result is used to audit the to-be-detected image on the image auditing platform.
[0377] As an optional example, the computer readable storage medium is configured to store program code for performing the following steps: obtaining a to-be-detected image of a virtual reality (VR) scene or an augmented reality (AR) scene; extracting a plurality of image data blocks contained in header file information in stream data of the to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image, and the plurality of image data blocks are used to represent at least an image structure of the to-be-detected image displayed on a VR device or an AR device; determining header file information of the to-be-detected image based on the plurality of image data blocks, wherein the header file information includes identification information used to determine whether the to-be-detected image has performed a retouching operation; performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result includes: the to-be-detected image being an original image that has not performed the retouching operation, and the to-be-detected image being a retouched image that has performed the retouching operation on the original image; and driving the VR device or the AR device to display the detection result.
[0378] The above-mentioned sequence numbers of the embodiments of the application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0379] In the above-mentioned embodiments of the application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0380] In several embodiments provided in the present application, it should be understood that the disclosed technical contents can be implemented by other manners. Among them, the above-mentioned device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or modules shown or discussed can be indirect coupling or communication connection through some interfaces, units or modules, which can be electrical or other forms.
[0381] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0382] In addition, each functional unit in each embodiment of the application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or in the form of software functional unit.
[0383] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to make a computer device (which can be a personal computer, a server or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0384] The above is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.
Claims
1. An image detection method characterized by, The method comprises: acquiring stream data of a to-be-detected image, wherein the stream data is used to represent analysis data of the to-be-detected image, and the to-be-detected image is composed of data segments; extracting a plurality of image data blocks contained in header file information in the stream data, wherein the plurality of image data blocks are used to represent at least an image structure of the to-be-detected image; determining the header file information based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result comprises that the to-be-detected image is an original image which has not performed the retouching operation, and the to-be-detected image is a retouched image which has performed the retouching operation on the original image; wherein the header file information comprises a header file information segment, and the determining of the header file information based on the plurality of image data blocks comprises: in response to an image format of the to-be-detected image being a portable network graphics (PNG) format, constructing a plurality of key data blocks and a plurality of auxiliary data blocks in the plurality of image data blocks into the header file information segment in the header file information; and in response to the image format of the to-be-detected image being a joint photographic experts group (JPEG) format, constructing a plurality of basic data blocks in the plurality of image data blocks into the header file information segment in the header file information.
2. The method of claim 1, wherein, The stream data is binary stream data, and the extracting of the plurality of image data blocks contained in the header file information in the stream data comprises: segmenting the binary stream data to obtain the plurality of image data blocks.
3. The method of claim 2, wherein, The segmenting of the binary stream data to obtain the plurality of image data blocks comprises: determining segmentation information corresponding to the image format of the to-be-detected image, wherein the image format comprises the PNG format and the JPEG format, and the segmentation information is used to determine the image data blocks; segmenting the binary stream data based on the segmentation information to obtain the plurality of image data blocks.
4. The method according to any one of claims 1 to 3, characterized in that, The header file information further comprises header file information content, and the determining of the header file information of the image based on the plurality of image data blocks comprises: parsing content of the plurality of image data blocks to obtain the header file information content in the header file information.
5. The method according to any one of claims 1 to 3, characterized in that, The performing of the retouching detection on the to-be-detected image based on the header file information to obtain the detection result comprises: determining a type attribute of the to-be-detected image based on the header file information, wherein the type attribute is used to represent a type of the to-be-detected image; performing the retouching detection on the to-be-detected image based on the type attribute to obtain the detection result.
6. The method of claim 5, wherein, The performing of the retouching detection on the to-be-detected image based on the type attribute to obtain the detection result comprises: in response to a successful matching of the to-be-detected image and original image features corresponding to the type attribute, determining that the to-be-detected image is the original image; in response to a failed matching of the to-be-detected image and the original image features, determining that the to-be-detected image is the retouched image.
7. The method of claim 5, wherein, determining a type attribute of the to-be-detected image based on the header file information, including: determining an attribute parameter of the to-be-detected image in the header file information, wherein the attribute parameter is used to determine the type attribute; in response to the attribute parameter being a screenshot image parameter, determining that the type attribute is a screenshot type attribute, wherein the screenshot type attribute is used to represent that the to-be-detected image is a screenshot image; in response to the attribute parameter being a photography image parameter, determining that the type attribute is a photography type attribute, wherein the photography type attribute is used to represent that the to-be-detected image is a photography image.
8. The method according to any one of claims 1 to 3, characterized in that, performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, including: extracting a first image feature of the to-be-detected image from the header file information, wherein the first image feature is used to determine whether the target retouching client has performed the retouching operation on the original image; performing retouching detection on the to-be-detected image based on the first image feature and an image feature in a first database to obtain the detection result, wherein the first database includes a change image feature between an image sample before adjustment and an image sample after adjustment, and the image sample is adjusted by at least one retouching client, and the at least one retouching client includes the target retouching client.
9. The method of claim 8, wherein, performing retouching detection on the to-be-detected image based on the first image feature and an image feature in a database to obtain the detection result, including: in response to the first image feature failing to match the image feature in the first database, determining that the to-be-detected image is the original image; in response to the first image feature successfully matching the image feature in the first database, determining that the target retouching client has performed the retouching operation on the original image to obtain the retouched image.
10. The method according to any one of claims 1 to 3, characterized in that, performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, including: extracting a second image feature of the to-be-detected image from the header file information, wherein the second image feature is used to determine whether the retouching operation is performed in a process in which the original image is transmitted from a target sending end to a target receiving end through a target media channel; performing retouching detection on the to-be-detected image based on the second image feature and an image feature in a second database to obtain the detection result, wherein the second database includes a change image feature between an image sample before sending and an image sample after sending, and the image sample is sent from a sending end to a receiving end through a media channel, the sending end includes the target sending end, the media channel includes the target media channel, and the receiving end includes the target receiving end.
11. The method of claim 10, wherein, performing retouching detection on the to-be-detected image based on the second image feature and an image feature in a second database to obtain the detection result, including: in response to the second image feature failing to match the image feature in the second database, determining that the to-be-detected image is the original image; In response to the second image feature matching successfully with the image feature in the second database, it is determined that the retouching operation is performed in the process that the original image is transmitted by the target sending end to the target receiving end through the target media channel, to obtain the retouched image.
12. An image detection method characterized by, The method comprises the steps of: obtaining a to-be-detected image from an image review platform, the to-be-detected image being composed of data segments; extracting a plurality of image data blocks contained in header file information in stream data of the to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image, and the plurality of image data blocks are used to at least represent an image structure of the to-be-detected image; determining the header file information based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result comprises: the to-be-detected image being an original image that has not performed the retouching operation, and the to-be-detected image being a retouched image that has performed the retouching operation on the original image; returning the detection result to the image review platform, wherein the detection result is used to review the to-be-detected image on the image review platform; wherein the header file information comprises a header file information segment, and the determining of the header file information based on the plurality of image data blocks comprises: in response to the image format of the to-be-detected image being a portable network graphics (PNG) format, constructing a plurality of key data blocks and a plurality of auxiliary data blocks in the plurality of image data blocks into the header file information segment in the header file information; and in response to the image format of the to-be-detected image being a joint photographic experts group (JPEG) format, constructing a plurality of basic data blocks in the plurality of image data blocks into the header file information segment in the header file information.
13. An image detection method characterized by, The method comprises the steps of: obtaining a to-be-detected image of a virtual reality (VR) scene or an augmented reality (AR) scene; extracting a plurality of image data blocks contained in header file information in stream data of the to-be-detected image, wherein the stream data is used to represent parsed data of the to-be-detected image, and the plurality of image data blocks are used to at least represent an image structure of the to-be-detected image displayed on a VR device or an AR device, the to-be-detected image being composed of data segments; determining the header file information based on the plurality of image data blocks, wherein the header file information comprises identification information used to determine whether the to-be-detected image has performed a retouching operation; performing retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result comprises: the to-be-detected image being an original image that has not performed the retouching operation, and the to-be-detected image being a retouched image that has performed the retouching operation on the original image; driving the VR device or the AR device to display the detection result; The header file information includes a header file information segment, and the determining of the header file information based on the plurality of image data blocks comprises: in response to the image format of the to-be-detected image being a portable network graphics (PNG) format, constructing a plurality of key data blocks and a plurality of auxiliary data blocks in the plurality of image data blocks as the header file information segment in the header file information; and in response to the image format of the to-be-detected image being a joint photographic experts group (JPEG) format, constructing a plurality of basic data blocks in the plurality of image data blocks as the header file information segment in the header file information.
14. An image detection system, characterized by The method comprises: a server and a virtual reality (VR) device or an augmented reality (AR) device, the server is configured to: acquire streaming data of a to-be-detected image from the VR device or the AR device, wherein the streaming data is used to represent parsing data of the to-be-detected image, and the to-be-detected image is composed of data segments; extract a plurality of image data blocks contained in header file information in the streaming data, wherein the plurality of image data blocks are used to at least represent an image structure of the to-be-detected image; determine header file information of the image based on the plurality of image data blocks, wherein the header file information includes identification information used to determine whether the to-be-detected image has performed a retouching operation; and perform retouching detection on the to-be-detected image based on the header file information to obtain a detection result, wherein the detection result includes: the to-be-detected image being an original image that has not performed the retouching operation, and the to-be-detected image being a retouched image that has performed the retouching operation on the original image; the VR device or the AR device is configured to receive the detection result issued by the server. The header file information includes a header file information segment, and the determining of the header file information based on the plurality of image data blocks comprises: in response to the image format of the to-be-detected image being a portable network graphics (PNG) format, constructing a plurality of key data blocks and a plurality of auxiliary data blocks in the plurality of image data blocks as the header file information segment in the header file information; and in response to the image format of the to-be-detected image being a joint photographic experts group (JPEG) format, constructing a plurality of basic data blocks in the plurality of image data blocks as the header file information segment in the header file information.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed by a processor, controls a device in which the computer-readable storage medium is located to perform the method of any one of claims 1 to 13.