CN110599486A - Method and system for detecting video plagiarism - Google Patents
Method and system for detecting video plagiarism Download PDFInfo
- Publication number
- CN110599486A CN110599486A CN201910891803.3A CN201910891803A CN110599486A CN 110599486 A CN110599486 A CN 110599486A CN 201910891803 A CN201910891803 A CN 201910891803A CN 110599486 A CN110599486 A CN 110599486A
- Authority
- CN
- China
- Prior art keywords
- video
- image
- key frame
- detected
- difference
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 238000012545 processing Methods 0.000 claims abstract description 74
- 238000001514 detection method Methods 0.000 claims description 39
- 239000011159 matrix material Substances 0.000 claims description 21
- 238000000605 extraction Methods 0.000 claims description 19
- 238000004364 calculation method Methods 0.000 claims description 18
- 230000009467 reduction Effects 0.000 claims description 18
- 230000017105 transposition Effects 0.000 claims description 7
- 230000000877 morphologic effect Effects 0.000 claims description 6
- 230000000694 effects Effects 0.000 abstract description 5
- 230000007547 defect Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformation in the plane of the image
- G06T3/40—Scaling the whole image or part thereof
- G06T3/4007—Interpolation-based scaling, e.g. bilinear interpolation
-
- G06T5/70—
-
- G06T5/92—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/12—Edge-based segmentation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20036—Morphological image processing
Abstract
The invention relates to a method and a system for detecting video plagiarism. The method and the system can accurately extract the key frame of the video to be detected by combining a multi-frame difference method on the basis of a difference Hash image recognition algorithm, and solve the problems of low accuracy, long algorithm running time and the like of a single traditional Hash algorithm in image processing; the multi-frame difference method adopted by the invention is improved on the basis of the traditional inter-frame difference method, and compared with the traditional algorithm for extracting the video key frame, the multi-frame difference method overcomes the defect that only the boundary part can be extracted, but the more complete area cannot be extracted; the invention combines the multi-frame difference method and the difference hash algorithm, and achieves the optimal effect on extracting the video key frame on the frame number, the accuracy rate and the algorithm running time.
Description
Technical Field
The invention is applied to the technical field of video detection, and particularly relates to a method and a system for detecting video plagiarism.
Background
With the development of computer networks and video processing technologies, various video editing software is simple and easy to learn, such as: many novice users can edit and modify the original video in a short time, so that the possibility of video plagiarism is greatly increased, and problems of infringement disputes, business disputes and the like follow. The plagiarism of the video refers to that a plurality of video segments to be tested are given, and are searched in the existing video database, or compared with the known source video which is possible to be plagiarized, whether similar video segment contents exist in the video to be tested and the source video or the video library is detected. If so, the video under test can be considered as a video plagiarism. There are many methods for video editing today, which basically include: zoom, cut, mirror, picture-in-picture, change brightness, add subtitles, add noise, etc.
In recent years, little attention has been paid to video plagiarism detection systems, and researchers are concerned mostly with or with the similarity of video detection algorithms themselves, with the widest algorithms being used rather than perceptual hash algorithm-based video detection methods. While researching video plagiarism detection technology, researchers mostly pay attention to how to accelerate an algorithm, and ignore how to quickly and accurately extract a video key frame and design a video plagiarism detection system. Compared with the traditional video detection method, the traditional method has the advantages that the detection accuracy is low, the algorithm consumes more time, the detection time is longer, the problems that video images cannot be found and the like can be caused, and the requirements of users can not be met finally.
Disclosure of Invention
The invention aims to provide a method and a system for detecting video plagiarism, which have the characteristics of high accuracy, strong universality and quick response.
In order to achieve the purpose, the technical scheme of the invention is as follows: a detection method of video plagiarism comprises the following steps:
step S1, decomposing the video to be tested into each frame image of the video to be tested through a decoding algorithm, and outputting each frame image and the total frame number of the video to be tested;
step S2, extracting video key frames of the video to be detected by adopting a multi-frame difference method;
step S3, performing graying processing and noise reduction processing on the extracted key frame image of the video to be detected;
step S4, calculating the hash value of the key frame image of the video to be detected by adopting a difference hash algorithm;
step S5, calculating the Hamming distance between the hash value of the key frame image of the video to be detected and the hash value of the key frame image of the source video or the hash value of the key frame image of the video library;
and step S6, comparing the calculated Hamming distance with a preset threshold value, and judging and outputting a detection result.
In an embodiment of the present invention, the step S2 is specifically implemented as follows:
step S21, inputting each frame image f of the videok(x, y), subtracting two adjacent frames of images by a subtracter and taking an absolute value, wherein the mathematical expression is as follows:
fk difference(x,y)=|fk(x,y)-fk-1(x,y)|
Step S22, the difference obtained in step S21 is multiplied by a multiplier to obtain an inter-frame difference image Dk(x, y), the mathematical expression is:
Dk(x,y)=|fk(x,y)-fk-1(x,y)|×|fk(x,y)-fk+1(x,y)|
step S23, the inter-frame difference image D thus obtained is usedk(x, y) carrying out binarization processing to obtain a differential image R after the whole differential processingk(x,y);
Step S24, difference image R obtainedk(x, y) morphological processing to eliminate noise and holesInterference;
and step S25, setting a threshold T for extracting the video key frame, calculating the pixel of the current difference image, and if the difference between the pixel of the current difference image and the pixels of the front and rear images is greater than the threshold T, judging that the lens is switched, namely outputting the frame number.
In an embodiment of the present invention, the step S3 is specifically implemented as follows:
the graying processing is to convert the color RGB image of the key frame of the video to be detected into a grayscale image, and convert the R, G, B pixel points of each image into each pixel point and only have one color component;
the noise reduction processing is to reduce noise by using two-dimensional discrete cosine transform, and comprises the following steps:
firstly, inputting a gray two-dimensional data matrix f (x, y) of a video key frame to be detected;
secondly, obtaining a coefficient matrix [ A ] through discrete cosine transform;
thirdly, high-frequency shielding is carried out to filter out image noise;
finally, the final transposition matrix [ A ] is obtained through inverse discrete cosine transform]TAnd outputting the picture.
In an embodiment of the present invention, the step S4 is specifically implemented as follows:
first, the image size is reduced: shrinking the size of the key frame image to be detected into 9 pixels in width and 8 pixels in length by a bilinear interpolation method, so that the image has 72 pixel points in total;
secondly, graying of the image: converting the zoomed picture into a 256-level gray scale image through a gray scale algorithm;
then, pixel difference values are calculated: scanning image pixels line by line, and if the brightness of the former pixel is greater than that of the latter pixel, marking as 1, otherwise, marking as 0; thus, for 9 pixels in each row, 8 disparity values can be obtained, and 64 disparity value strings represented by 0/1 are obtained in the whole image;
finally, the hash value of the image is obtained: converting 64 strings of 0/1-represented difference values into 16-system numbers by grouping 4 0/1 numbers, so that 64 0/1 difference values result in 16-system strings of 16-system numbers, and the 16-system strings of 16-system numbers are hash values of the image.
The invention also provides a video plagiarism detection system, which comprises a video input and decoding module, a video key frame extraction module, a video key frame processing module, a hash value calculation module, a similarity comparison module and a detection result output module;
the video input and decoding module comprises a video input module and a video decoding module, wherein the video input module is used for receiving a video to be detected input by a user, and the video decoding module is used for decomposing the video to be detected into each frame image of the video to be detected through a decoding algorithm and outputting each frame image of the video to be detected and the total frame number of the video to be detected;
the video key frame extraction module adopts a multi-frame difference method to extract a video key frame to be detected;
the video key frame processing module is used for carrying out graying processing and noise reduction processing on the extracted key frame image of the video to be detected;
the hash value calculation module calculates the hash value of the key frame image of the video to be detected by adopting a difference hash algorithm;
the similarity comparison module calculates the Hamming distance between the hash value of the key frame image of the video to be detected and the hash value of the key frame image of the source video or the hash value of the key frame image of the video library;
and the detection result output module compares the Hamming distance calculated by the similarity comparison module with a preset threshold value, judges and outputs a detection result.
In an embodiment of the present invention, the implementation manner of the video key frame extraction module extracting the video key frame to be detected by using a multi-frame difference method is as follows:
first stage, inputting each frame image f of videok(x, y), subtracting two adjacent frames of images by a subtracter and taking an absolute value, wherein the mathematical expression is as follows:
fk difference(x,y)=|fk(x,y)-fk-1(x,y)|
The second stage, the difference obtained in the first stage is processedThe multiplier performs multiplication to obtain an inter-frame difference image Dk(x, y), the mathematical expression is:
Dk(x,y)=|fk(x,y)-fk-1(x,y)|×|fk(x,y)-fk+1(x,y)|
the third stage is to obtain the inter-frame difference image Dk(x, y) carrying out binarization processing to obtain a differential image R after the whole differential processingk(x,y);
The fourth stage, the obtained difference image Rk(x, y) performing morphological processing to eliminate noise and interference of the cavity;
and a fifth stage of setting a threshold value T for extracting the video key frame, calculating the pixel of the current differential image, and judging that the shot is switched if the difference between the pixel of the current differential image and the pixels of the front and rear pictures is greater than the threshold value T, namely outputting the frame number.
In an embodiment of the present invention, the specific implementation manner of the video key frame processing module performing graying processing and noise reduction processing on the extracted video key frame image to be detected is as follows:
the graying processing is to convert the color RGB image of the key frame of the video to be detected into a grayscale image, and convert the R, G, B pixel points of each image into each pixel point and only have one color component;
the noise reduction processing is to reduce noise by using two-dimensional discrete cosine transform, and comprises the following steps:
firstly, inputting a gray two-dimensional data matrix f (x, y) of a video key frame to be detected;
secondly, obtaining a coefficient matrix [ A ] through discrete cosine transform;
thirdly, high-frequency shielding is carried out to filter out image noise;
finally, the final transposition matrix [ A ] is obtained through inverse discrete cosine transform]TAnd outputting the picture.
In an embodiment of the present invention, the specific implementation manner of the hash value calculation module calculating the hash value of the key frame image of the video to be detected by using the difference hash algorithm is as follows:
first, the image size is reduced: shrinking the size of the key frame image to be detected into 9 pixels in width and 8 pixels in length by a bilinear interpolation method, so that the image has 72 pixel points in total;
secondly, graying of the image: converting the zoomed picture into a 256-level gray scale image through a gray scale algorithm;
then, pixel difference values are calculated: scanning image pixels line by line, and if the brightness of the former pixel is greater than that of the latter pixel, marking as 1, otherwise, marking as 0; thus, for 9 pixels in each row, 8 disparity values can be obtained, and 64 disparity value strings represented by 0/1 are obtained in the whole image;
finally, the hash value of the image is obtained: converting 64 strings of 0/1-represented difference values into 16-system numbers by grouping 4 0/1 numbers, so that 64 0/1 difference values result in 16-system strings of 16-system numbers, and the 16-system strings of 16-system numbers are hash values of the image.
Compared with the prior art, the invention has the following beneficial effects: the detection method and the system for video plagiarism provided by the invention have the advantages of high operation speed and high accuracy, and can be applied to various video editing methods, such as: changing brightness, adding subtitles, adding noise, etc. The manual participation is not needed, and the time and the labor are saved. Its main advantages are summarized as follows:
(1) video key frame extraction. Aiming at the problems of low speed and low accuracy of the traditional video key frame extraction algorithm, the invention adopts a multi-frame difference method as the extraction algorithm of the video key frame, optimizes the algorithm on the basis of the traditional inter-frame difference method, and introduces parallel computation in program operation, thereby improving the accuracy and the operation speed of extracting the video key frame.
(2) Video key frame processing aspects. Aiming at the situation that the edited video has complexity and is difficult to identify, the invention performs gray level processing and noise reduction processing on the video key frame, thereby facilitating the subsequent calculation of the hash value.
(3) Hash value calculation. The method adopts a differential hash algorithm (dHash) to obtain the hash value of the video key frame, and the differential hash algorithm has the advantages of high accuracy, high speed and the like compared with the traditional average hash algorithm (aHash) and the perceptual hash algorithm (pHash). Experimental results show that the method is better in effect of detecting whether the video is plagiarism or not by using the key frame after gray level processing and noise reduction processing.
Drawings
FIG. 1 is a block diagram of a video detection system.
Fig. 2 is a block diagram of a multi-frame difference method.
Fig. 3 is a flowchart of extracting key frames of a video by a multi-frame difference method.
Fig. 4 is a flowchart of the differential hash value calculation.
FIG. 5 is a flow chart of the similarity contrast module.
Detailed Description
The technical scheme of the invention is specifically explained below with reference to the accompanying drawings.
The invention provides a method for detecting a video plagiarism, which comprises the following steps:
step S1, decomposing the video to be tested into each frame image of the video to be tested through a decoding algorithm, and outputting each frame image and the total frame number of the video to be tested;
step S2, extracting video key frames of the video to be detected by adopting a multi-frame difference method;
step S21, inputting each frame image f of the videok(x, y), subtracting two adjacent frames of images by a subtracter and taking an absolute value, wherein the mathematical expression is as follows:
fk difference(x,y)=|fk(x,y)-fk-1(x,y)|
Step S22, the difference obtained in step S21 is multiplied by a multiplier to obtain an inter-frame difference image Dk(x, y), the mathematical expression is:
Dk(x,y)=|fk(x,y)-fk-1(x,y)|×|fk(x,y)-fk+1(x,y)|
step S23, the inter-frame difference image D thus obtained is usedk(x, y) carrying out binarization processing to obtain a differential image R after the whole differential processingk(x,y);
Step S24, difference image R obtainedk(x, y) performing morphological processing to eliminate noise and interference of the cavity;
step S25, setting a threshold value T for extracting the video key frame, calculating the pixel of the current difference image, and if the difference between the pixel of the current difference image and the pixels of the front and rear images is greater than the threshold value T, judging that the shot is switched, namely outputting the frame number;
step S3, performing graying processing and noise reduction processing on the extracted key frame image of the video to be detected;
the graying processing is to convert the color RGB image of the key frame of the video to be detected into a grayscale image, and convert the R, G, B pixel points of each image into each pixel point and only have one color component;
the noise reduction processing is to reduce noise by using two-dimensional discrete cosine transform, and comprises the following steps:
firstly, inputting a gray two-dimensional data matrix f (x, y) of a video key frame to be detected;
secondly, obtaining a coefficient matrix [ A ] through discrete cosine transform;
thirdly, high-frequency shielding is carried out to filter out image noise;
finally, the final transposition matrix [ A ] is obtained through inverse discrete cosine transform]TAnd outputting the picture;
step S4, calculating the hash value of the key frame image of the video to be detected by adopting a difference hash algorithm;
first, the image size is reduced: shrinking the size of the key frame image to be detected into 9 pixels in width and 8 pixels in length by a bilinear interpolation method, so that the image has 72 pixel points in total;
secondly, graying of the image: converting the zoomed picture into a 256-level gray scale image through a gray scale algorithm;
then, pixel difference values are calculated: scanning image pixels line by line, and if the brightness of the former pixel is greater than that of the latter pixel, marking as 1, otherwise, marking as 0; thus, for 9 pixels in each row, 8 disparity values can be obtained, and 64 disparity value strings represented by 0/1 are obtained in the whole image;
finally, the hash value of the image is obtained: converting 64 strings of 0/1-represented difference values into 16-system numbers by using 4 0/1 numbers as a group, wherein 64 0/1 difference values obtain 16 strings of 16-system numbers, and the 16-system strings of numbers are hash values of the image;
step S5, calculating the Hamming distance between the hash value of the key frame image of the video to be detected and the hash value of the key frame image of the source video or the hash value of the key frame image of the video library;
and step S6, comparing the calculated Hamming distance with a preset threshold value, and judging and outputting a detection result.
The invention also provides a video plagiarism detection system, which comprises a video input and decoding module, a video key frame extraction module, a video key frame processing module, a hash value calculation module, a similarity comparison module and a detection result output module;
the video input and decoding module comprises a video input module and a video decoding module, wherein the video input module is used for receiving a video to be detected input by a user, and the video decoding module is used for decomposing the video to be detected into each frame image of the video to be detected through a decoding algorithm and outputting each frame image of the video to be detected and the total frame number of the video to be detected;
the video key frame extraction module adopts a multi-frame difference method to extract a video key frame to be detected;
the video key frame processing module is used for carrying out graying processing and noise reduction processing on the extracted key frame image of the video to be detected;
the hash value calculation module calculates the hash value of the key frame image of the video to be detected by adopting a difference hash algorithm;
the similarity comparison module calculates the Hamming distance between the hash value of the key frame image of the video to be detected and the hash value of the key frame image of the source video or the hash value of the key frame image of the video library;
and the detection result output module compares the Hamming distance calculated by the similarity comparison module with a preset threshold value, judges and outputs a detection result.
The video key frame extraction module adopts a multi-frame difference method to extract the key frames of the video to be detected in the following implementation mode:
first stage, inputting each frame image f of videok(x, y), subtracting two adjacent frames of images by a subtracter and taking an absolute value, wherein the mathematical expression is as follows:
fk difference(x,y)=|fk(x,y)-fk-1(x,y)|
In the second stage, the difference obtained in the first stage is multiplied by a multiplier to obtain an inter-frame difference image Dk(x, y), the mathematical expression is:
Dk(x,y)=|fk(x,y)-fk-1(x,y)|×|fk(x,y)-fk+1(x,y)|
the third stage is to obtain the inter-frame difference image Dk(x, y) carrying out binarization processing to obtain a differential image R after the whole differential processingk(x,y);
The fourth stage, the obtained difference image Rk(x, y) performing morphological processing to eliminate noise and interference of the cavity;
and a fifth stage of setting a threshold value T for extracting the video key frame, calculating the pixel of the current differential image, and judging that the shot is switched if the difference between the pixel of the current differential image and the pixels of the front and rear pictures is greater than the threshold value T, namely outputting the frame number.
The video key frame processing module performs graying processing and noise reduction processing on the extracted video key frame image to be detected in the following specific implementation mode:
the graying processing is to convert the color RGB image of the key frame of the video to be detected into a grayscale image, and convert the R, G, B pixel points of each image into each pixel point and only have one color component;
the noise reduction processing is to reduce noise by using two-dimensional discrete cosine transform, and comprises the following steps:
firstly, inputting a gray two-dimensional data matrix f (x, y) of a video key frame to be detected;
secondly, obtaining a coefficient matrix [ A ] through discrete cosine transform;
thirdly, high-frequency shielding is carried out to filter out image noise;
finally, the final transposition matrix [ A ] is obtained through inverse discrete cosine transform]TAnd outputting the picture.
The specific implementation mode of the hash value calculation module for calculating the hash value of the key frame image of the video to be detected by adopting the difference hash algorithm is as follows:
first, the image size is reduced: shrinking the size of the key frame image to be detected into 9 pixels in width and 8 pixels in length by a bilinear interpolation method, so that the image has 72 pixel points in total;
secondly, graying of the image: converting the zoomed picture into a 256-level gray scale image through a gray scale algorithm;
then, pixel difference values are calculated: scanning image pixels line by line, and if the brightness of the former pixel is greater than that of the latter pixel, marking as 1, otherwise, marking as 0; thus, for 9 pixels in each row, 8 disparity values can be obtained, and 64 disparity value strings represented by 0/1 are obtained in the whole image;
finally, the hash value of the image is obtained: converting 64 strings of 0/1-represented difference values into 16-system numbers by grouping 4 0/1 numbers, so that 64 0/1 difference values result in 16-system strings of 16-system numbers, and the 16-system strings of 16-system numbers are hash values of the image.
The following is a specific implementation of the present invention.
The video plagiarism detection system can accurately extract the key frame of the video to be detected by combining a multi-frame difference method on the basis of the difference hash image identification algorithm, and solves the problems of low accuracy in image processing, long algorithm running time and the like of a single traditional hash algorithm. The invention adopts a multi-frame difference method to improve on the basis of the traditional inter-frame difference method, and overcomes the defect that only the boundary part can be extracted but the relatively complete area cannot be extracted compared with the traditional algorithm for extracting the video key frame. The experimental result shows that the effect of extracting the video key frame on the frame number, the accuracy rate and the algorithm running time is optimal by combining the multi-frame difference method and the difference hash algorithm.
The video detection system of the present invention is shown in fig. 1. The detection system mainly comprises a video input and decoding module, a video key frame extraction module, a video key frame processing module, a hash value calculation module, a similarity comparison module and a detection result output module, wherein the functions of all the parts in the video detection system are as follows:
1. video input and decoding module
The video input and decoding module comprises a video input module and a video decoding module. The video input module is used for receiving a video to be tested input by a user. The video decoding module mainly decomposes the input video to be detected into each frame picture of the video through a decoding algorithm, and outputs each frame picture and the total frame number of the video.
2. Video key frame extraction module
The video key frame extraction module uses a multi-frame difference method to extract the video key frame to be detected. The key frame of the video refers to a set consisting of images of the original frame number of the video, and the selection standard of the key frame of the video is determined by different occasions and different requirements. By utilizing the key frame extraction technology, the data volume in the video detection process can be greatly reduced, so that the working efficiency in the video detection process is greatly improved. The basic idea of key frame extraction is to divide original video data into video segments by a shot detection algorithm, and then to find video frames containing main video information from the shot-based video segments by applying a key frame extraction technology.
The invention adopts a multi-frame difference method for extracting the video key frame. The multi-frame difference method is suitable for video editing methods of changing brightness, increasing subtitles, increasing noise and the like, and has the advantages of simple realization of a program algorithm, strong adaptability to video background environment, high stability and the like. The specific algorithm implementation block diagram is shown in fig. 2, and the extraction of a video key frame by using a multi-frame difference method can be roughly divided into five processes:
a first stage of inputting all frame images f of the videok(x, y), subtracting two adjacent frames of images by a subtracter and taking an absolute value, wherein the mathematical expression is as follows: f. ofk difference(x,y)=|fk(x,y)-fk-1(x,y)|;
In the second stage, the difference obtained in the first stage is multiplied by a multiplier to obtain an inter-frame difference image Dk(x, y), the mathematical expression is: dk(x,y)=|fk(x,y)-fk-1(x,y)|×|fk(x,y)-fk+1(x,y)|;
In the third stage, the obtained inter-frame difference image Dk(x, y) binarization treatment to obtain Rk(x, y) is the image after the whole difference processing;
the fourth stage, the obtained image is processed morphologically, and noise and interference of the cavity are simply eliminated;
and a fifth stage, setting a threshold value T for extracting the video key frame, calculating the pixel of the current differential image, and if the difference between the pixel of the image and the pixels of the front and rear images is greater than the threshold value T, judging that the shot is switched, namely outputting the frame number.
In order to ensure a certain calculation speed of the algorithm, parallel calculation is introduced into the program so as to rapidly extract the key frame of the video to be detected.
3. Video key frame processing module
The video key frame processing module mainly carries out graying processing and noise reduction processing on the key frame image. The graying processing is to convert color RGB images of all video key frames into grayscale images, and convert pixel points consisting of red (R), green (G) and blue (B) of each image into each pixel point and only have one color component. The invention relates to a method for reducing noise of an image by utilizing discrete cosine transform, which adopts two-dimensional discrete cosine transform to reduce noise and comprises the following main steps: firstly, inputting a gray two-dimensional data matrix f (x, y) of an unprocessed noise key frame; secondly, obtaining a coefficient matrix [ A ] through discrete cosine transform](ii) a Thirdly, high-frequency shielding is carried out to filter out image noise; finally, the final transposition matrix [ A ] is obtained through inverse discrete cosine transform]TAnd outputting the picture.
4. Hash value calculation module
The hash value calculation module of the invention uses the most widely used difference hash algorithm (Differential hash algorithm) at present as the calculation method of the key frame hash value. The hash algorithm is to generate a 'fingerprint' character string for each video key frame, then compare fingerprints of different pictures, and if the hash value results of the two pictures are closer, the more similar the two pictures are. Compared with the traditional average hash algorithm (aHash) and perceptual hash algorithm (pHash), the differential hash algorithm has the advantages of high accuracy, high speed and the like. Its best use is to find similar images based on thumbnails. The experimental result shows that the effect of detecting the edited similar video by the key frame after the gray processing and the noise reduction processing is excellent.
The difference hash algorithm is realized based on pixel gradual change, and can ensure the fineness of image characteristics and the execution efficiency of the algorithm. The flow chart of the computation of the differential hash value algorithm is shown in fig. 4, and the implementation of the algorithm has the following four steps: first, the image size is reduced: the size of the key frame image is shrunk to 9 pixels in width and 8 pixels in length through a bilinear interpolation method, so that the image has 72 pixel points in total. Secondly, graying of the image: and converting the zoomed picture into a 256-level gray scale image through a gray scale algorithm again. Then, pixel difference values are calculated: and scanning the image pixels line by line, and if the brightness of the former pixel is greater than that of the latter pixel, recording as 1, otherwise, recording as 0. Thus, for 9 pixels in each row, 8 disparity values are obtained, and 64 disparity value strings represented by 0/1 are obtained for the entire image. Finally, the hash value of the image is obtained: converting 64 strings of 0/1-represented difference values into 16-system numbers by grouping 4 0/1 numbers, so that 64 0/1 difference values result in 16-system strings of 16-system numbers, and the 16-system strings of 16-system numbers are hash values of the image.
5. Similarity contrast module
The similarity comparison module is mainly used for comparing the hash value of the key frame of the video to be detected with the two videos. The flow chart is shown in fig. 5, and is mainly divided into two cases: the method comprises the steps of calculating hash values of all video key frames in a video library, calculating the hash values of all video key frames to be detected to obtain Hamming distances between two pictures, and judging the similarity degree of the two pictures according to the Hamming distance. And finding the video with the minimum Hamming distance is the video with the most probable plagiarism. And secondly, calculating a hash value of a video key frame of the source video, calculating the Hamming distance between the two pictures, judging the similarity between the two pictures by setting a threshold value T, and judging that the video to be detected plagiarisms the source video if the Hamming distance is close to the set threshold value T.
6. Detection result output module
The detection result output module mainly outputs the detection result of the video to be detected. And if the video to be detected is compared with the source video, outputting a result that whether the video is copied or not is judged. And comparing the video to be detected with the video in the video library, and outputting the result, namely the video with the minimum Hamming distance.
The above are preferred embodiments of the present invention, and all changes made according to the technical scheme of the present invention that produce functional effects do not exceed the scope of the technical scheme of the present invention belong to the protection scope of the present invention.
Claims (8)
1. A detection method of video plagiarism is characterized by comprising the following steps:
step S1, decomposing the video to be tested into each frame image of the video to be tested through a decoding algorithm, and outputting each frame image and the total frame number of the video to be tested;
step S2, extracting video key frames of the video to be detected by adopting a multi-frame difference method;
step S3, performing graying processing and noise reduction processing on the extracted key frame image of the video to be detected;
step S4, calculating the hash value of the key frame image of the video to be detected by adopting a difference hash algorithm;
step S5, calculating the Hamming distance between the hash value of the key frame image of the video to be detected and the hash value of the key frame image of the source video or the hash value of the key frame image of the video library;
and step S6, comparing the calculated Hamming distance with a preset threshold value, and judging and outputting a detection result.
2. The method for detecting video plagiarism according to claim 1, wherein the step S2 is implemented as follows:
step S21, inputting each frame image f of the videok(x, y), subtracting two adjacent frames of images by a subtracter and taking an absolute value, wherein the mathematical expression is as follows:
fk difference(x,y)=|fk(x,y)-fk-1(x,y)|
Step S22, the difference obtained in step S21 is multiplied by a multiplier to obtain an inter-frame difference image Dk(x, y), the mathematical expression is:
Dk(x,y)=|fk(x,y)-fk-1(x,y)|×|fk(x,y)-fk+1(x,y)|
step S23, the inter-frame difference image D thus obtained is usedk(x, y) carrying out binarization processing to obtain a differential image R after the whole differential processingk(x,y);
Step S24, difference image R obtainedk(x, y) performing morphological processing to eliminate noise and interference of the cavity;
and step S25, setting a threshold T for extracting the video key frame, calculating the pixel of the current difference image, and if the difference between the pixel of the current difference image and the pixels of the front and rear images is greater than the threshold T, judging that the lens is switched, namely outputting the frame number.
3. The method for detecting video plagiarism according to claim 1, wherein the step S3 is implemented as follows:
the graying processing is to convert the color RGB image of the key frame of the video to be detected into a grayscale image, and convert the R, G, B pixel points of each image into each pixel point and only have one color component;
the noise reduction processing is to reduce noise by using two-dimensional discrete cosine transform, and comprises the following steps:
firstly, inputting a gray two-dimensional data matrix f (x, y) of a video key frame to be detected;
secondly, obtaining a coefficient matrix [ A ] through discrete cosine transform;
thirdly, high-frequency shielding is carried out to filter out image noise;
finally, the final transposition matrix [ A ] is obtained through inverse discrete cosine transform]TAnd outputting the picture.
4. The method for detecting video plagiarism according to claim 1, wherein the step S4 is implemented as follows:
first, the image size is reduced: shrinking the size of the key frame image to be detected into 9 pixels in width and 8 pixels in length by a bilinear interpolation method, so that the image has 72 pixel points in total;
secondly, graying of the image: converting the zoomed picture into a 256-level gray scale image through a gray scale algorithm;
then, pixel difference values are calculated: scanning image pixels line by line, and if the brightness of the former pixel is greater than that of the latter pixel, marking as 1, otherwise, marking as 0; thus, for 9 pixels in each row, 8 disparity values can be obtained, and 64 disparity value strings represented by 0/1 are obtained in the whole image;
finally, the hash value of the image is obtained: converting 64 strings of 0/1-represented difference values into 16-system numbers by grouping 4 0/1 numbers, so that 64 0/1 difference values result in 16-system strings of 16-system numbers, and the 16-system strings of 16-system numbers are hash values of the image.
5. A detection system for video plagiarism is characterized by comprising a video input and decoding module, a video key frame extraction module, a video key frame processing module, a hash value calculation module, a similarity comparison module and a detection result output module;
the video input and decoding module comprises a video input module and a video decoding module, wherein the video input module is used for receiving a video to be detected input by a user, and the video decoding module is used for decomposing the video to be detected into each frame image of the video to be detected through a decoding algorithm and outputting each frame image of the video to be detected and the total frame number of the video to be detected;
the video key frame extraction module adopts a multi-frame difference method to extract a video key frame to be detected;
the video key frame processing module is used for carrying out graying processing and noise reduction processing on the extracted key frame image of the video to be detected;
the hash value calculation module calculates the hash value of the key frame image of the video to be detected by adopting a difference hash algorithm;
the similarity comparison module calculates the Hamming distance between the hash value of the key frame image of the video to be detected and the hash value of the key frame image of the source video or the hash value of the key frame image of the video library;
and the detection result output module compares the Hamming distance calculated by the similarity comparison module with a preset threshold value, judges and outputs a detection result.
6. The system for detecting video plagiarism according to claim 5, wherein the video key frame extraction module adopts a multi-frame difference method to extract the video key frame to be detected in the following manner:
first stage, inputting each frame image f of videok(x, y), subtracting two adjacent frames of images by a subtracter and taking an absolute value, wherein the mathematical expression is as follows:
fk difference(x,y)=|fk(x,y)-fk-1(x,y)|
In the second stage, the difference obtained in the first stage is multiplied by a multiplier to obtain an inter-frame difference image Dk(x, y), the mathematical expression is:
Dk(x,y)=|fk(x,y)-fk-1(x,y)|×|fk(x,y)-fk+1(x,y)|
the third stage is to obtain the inter-frame difference image Dk(x, y) carrying out binarization processing to obtain a differential image R after the whole differential processingk(x,y);
The fourth stage, the obtained difference image Rk(x, y) performing morphological processing to eliminate noise and interference of the cavity;
and a fifth stage of setting a threshold value T for extracting the video key frame, calculating the pixel of the current differential image, and judging that the shot is switched if the difference between the pixel of the current differential image and the pixels of the front and rear pictures is greater than the threshold value T, namely outputting the frame number.
7. The method for detecting video plagiarism according to claim 1, wherein the specific implementation manner of the video key frame processing module performing graying processing and denoising processing on the extracted video key frame image to be detected is as follows:
the graying processing is to convert the color RGB image of the key frame of the video to be detected into a grayscale image, and convert the R, G, B pixel points of each image into each pixel point and only have one color component;
the noise reduction processing is to reduce noise by using two-dimensional discrete cosine transform, and comprises the following steps:
firstly, inputting a gray two-dimensional data matrix f (x, y) of a video key frame to be detected;
secondly, obtaining a coefficient matrix [ A ] through discrete cosine transform;
thirdly, high-frequency shielding is carried out to filter out image noise;
finally, the final transposition matrix [ A ] is obtained through inverse discrete cosine transform]TAnd outputting the picture.
8. The method for detecting video plagiarism according to claim 1, wherein the specific implementation manner of the hash value calculation module calculating the hash value of the key frame image of the video to be detected by using a differential hash algorithm is as follows:
first, the image size is reduced: shrinking the size of the key frame image to be detected into 9 pixels in width and 8 pixels in length by a bilinear interpolation method, so that the image has 72 pixel points in total;
secondly, graying of the image: converting the zoomed picture into a 256-level gray scale image through a gray scale algorithm;
then, pixel difference values are calculated: scanning image pixels line by line, and if the brightness of the former pixel is greater than that of the latter pixel, marking as 1, otherwise, marking as 0; thus, for 9 pixels in each row, 8 disparity values can be obtained, and 64 disparity value strings represented by 0/1 are obtained in the whole image;
finally, the hash value of the image is obtained: converting 64 strings of 0/1-represented difference values into 16-system numbers by grouping 4 0/1 numbers, so that 64 0/1 difference values result in 16-system strings of 16-system numbers, and the 16-system strings of 16-system numbers are hash values of the image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910891803.3A CN110599486A (en) | 2019-09-20 | 2019-09-20 | Method and system for detecting video plagiarism |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910891803.3A CN110599486A (en) | 2019-09-20 | 2019-09-20 | Method and system for detecting video plagiarism |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110599486A true CN110599486A (en) | 2019-12-20 |
Family
ID=68861607
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910891803.3A Pending CN110599486A (en) | 2019-09-20 | 2019-09-20 | Method and system for detecting video plagiarism |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110599486A (en) |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111105406A (en) * | 2019-12-24 | 2020-05-05 | 杭州当虹科技股份有限公司 | Method for detecting video stream identity of public electronic screen |
CN111339356A (en) * | 2020-02-21 | 2020-06-26 | 北京字节跳动网络技术有限公司 | Method and device for preventing misjudgment in video retrieval and electronic equipment |
CN111507260A (en) * | 2020-04-17 | 2020-08-07 | 重庆邮电大学 | Video similarity rapid detection method and detection device |
CN111563531A (en) * | 2020-04-03 | 2020-08-21 | 延安市公安局 | Video tampering detection method, system, storage medium, computer program, and terminal |
CN111601115A (en) * | 2020-05-12 | 2020-08-28 | 腾讯科技(深圳)有限公司 | Video detection method, related device, equipment and storage medium |
CN112333467A (en) * | 2020-11-27 | 2021-02-05 | 中国船舶工业系统工程研究院 | Method, system, and medium for detecting keyframes of a video |
CN113111823A (en) * | 2021-04-22 | 2021-07-13 | 广东工业大学 | Abnormal behavior detection method and related device for building construction site |
CN113553469A (en) * | 2020-04-23 | 2021-10-26 | 阿里巴巴集团控股有限公司 | Data processing method and device, electronic equipment and computer storage medium |
CN113569719A (en) * | 2021-07-26 | 2021-10-29 | 上海艾策通讯科技股份有限公司 | Video infringement judgment method and device, storage medium and electronic equipment |
CN113704532A (en) * | 2020-11-25 | 2021-11-26 | 天翼智慧家庭科技有限公司 | Method and system for improving recall rate of picture retrieval |
CN113822361A (en) * | 2021-09-18 | 2021-12-21 | 重庆大学 | SAR image similarity measurement method and system based on Hamming distance |
CN113851091A (en) * | 2021-09-28 | 2021-12-28 | 北京大上科技有限公司 | Electronic ink display screen refreshing method and display system |
CN114913350A (en) * | 2022-04-19 | 2022-08-16 | 深圳市东信时代信息技术有限公司 | Material duplicate checking method, device, equipment and storage medium |
CN115115822A (en) * | 2022-06-30 | 2022-09-27 | 小米汽车科技有限公司 | Vehicle-end image processing method and device, vehicle, storage medium and chip |
CN117113439A (en) * | 2023-10-23 | 2023-11-24 | 深圳市烽航实业有限公司 | Safe anti-tampering storage method and system for data of automobile data recorder |
CN113704532B (en) * | 2020-11-25 | 2024-04-26 | 天翼数字生活科技有限公司 | Method and system for improving picture retrieval recall rate |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105554592A (en) * | 2016-02-02 | 2016-05-04 | 深圳市指点信息科技有限公司 | Method and system for collecting and transmitting high frame rate video image |
CN105787436A (en) * | 2016-02-02 | 2016-07-20 | 深圳市指点信息科技有限公司 | Large data based video image intelligent search method and system |
US20160259494A1 (en) * | 2015-03-02 | 2016-09-08 | InfiniGraph, Inc. | System and method for controlling video thumbnail images |
CN109102523A (en) * | 2018-07-13 | 2018-12-28 | 南京理工大学 | A kind of moving object detection and tracking |
CN109508408A (en) * | 2018-10-25 | 2019-03-22 | 北京陌上花科技有限公司 | A kind of video retrieval method and computer readable storage medium based on frame density |
CN109685112A (en) * | 2018-11-29 | 2019-04-26 | 昆明理工大学 | It is a kind of based on color difference algorithm determination method similar with the image of DHash |
CN109756746A (en) * | 2018-12-28 | 2019-05-14 | 广州华多网络科技有限公司 | Video reviewing method, device, server and storage medium |
CN109902633A (en) * | 2019-03-04 | 2019-06-18 | 南京小网科技有限责任公司 | Accident detection method and device based on the camera supervised video of fixed bit |
-
2019
- 2019-09-20 CN CN201910891803.3A patent/CN110599486A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160259494A1 (en) * | 2015-03-02 | 2016-09-08 | InfiniGraph, Inc. | System and method for controlling video thumbnail images |
CN105554592A (en) * | 2016-02-02 | 2016-05-04 | 深圳市指点信息科技有限公司 | Method and system for collecting and transmitting high frame rate video image |
CN105787436A (en) * | 2016-02-02 | 2016-07-20 | 深圳市指点信息科技有限公司 | Large data based video image intelligent search method and system |
CN109102523A (en) * | 2018-07-13 | 2018-12-28 | 南京理工大学 | A kind of moving object detection and tracking |
CN109508408A (en) * | 2018-10-25 | 2019-03-22 | 北京陌上花科技有限公司 | A kind of video retrieval method and computer readable storage medium based on frame density |
CN109685112A (en) * | 2018-11-29 | 2019-04-26 | 昆明理工大学 | It is a kind of based on color difference algorithm determination method similar with the image of DHash |
CN109756746A (en) * | 2018-12-28 | 2019-05-14 | 广州华多网络科技有限公司 | Video reviewing method, device, server and storage medium |
CN109902633A (en) * | 2019-03-04 | 2019-06-18 | 南京小网科技有限责任公司 | Accident detection method and device based on the camera supervised video of fixed bit |
Non-Patent Citations (1)
Title |
---|
许宏: "基于图像差分的关键帧检测技术", 《计算机工程与设计》 * |
Cited By (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111105406A (en) * | 2019-12-24 | 2020-05-05 | 杭州当虹科技股份有限公司 | Method for detecting video stream identity of public electronic screen |
CN111105406B (en) * | 2019-12-24 | 2023-05-30 | 杭州当虹科技股份有限公司 | Method for detecting identity of video streams of public electronic screen |
CN111339356A (en) * | 2020-02-21 | 2020-06-26 | 北京字节跳动网络技术有限公司 | Method and device for preventing misjudgment in video retrieval and electronic equipment |
CN111563531A (en) * | 2020-04-03 | 2020-08-21 | 延安市公安局 | Video tampering detection method, system, storage medium, computer program, and terminal |
CN111507260B (en) * | 2020-04-17 | 2022-08-05 | 重庆邮电大学 | Video similarity rapid detection method and detection device |
CN111507260A (en) * | 2020-04-17 | 2020-08-07 | 重庆邮电大学 | Video similarity rapid detection method and detection device |
CN113553469A (en) * | 2020-04-23 | 2021-10-26 | 阿里巴巴集团控股有限公司 | Data processing method and device, electronic equipment and computer storage medium |
CN113553469B (en) * | 2020-04-23 | 2023-12-22 | 阿里巴巴集团控股有限公司 | Data processing method, device, electronic equipment and computer storage medium |
CN111601115A (en) * | 2020-05-12 | 2020-08-28 | 腾讯科技(深圳)有限公司 | Video detection method, related device, equipment and storage medium |
CN113704532B (en) * | 2020-11-25 | 2024-04-26 | 天翼数字生活科技有限公司 | Method and system for improving picture retrieval recall rate |
CN113704532A (en) * | 2020-11-25 | 2021-11-26 | 天翼智慧家庭科技有限公司 | Method and system for improving recall rate of picture retrieval |
CN112333467A (en) * | 2020-11-27 | 2021-02-05 | 中国船舶工业系统工程研究院 | Method, system, and medium for detecting keyframes of a video |
CN113111823A (en) * | 2021-04-22 | 2021-07-13 | 广东工业大学 | Abnormal behavior detection method and related device for building construction site |
CN113569719A (en) * | 2021-07-26 | 2021-10-29 | 上海艾策通讯科技股份有限公司 | Video infringement judgment method and device, storage medium and electronic equipment |
CN113569719B (en) * | 2021-07-26 | 2023-12-29 | 上海艾策通讯科技股份有限公司 | Video infringement judging method and device, storage medium and electronic equipment |
CN113822361A (en) * | 2021-09-18 | 2021-12-21 | 重庆大学 | SAR image similarity measurement method and system based on Hamming distance |
CN113822361B (en) * | 2021-09-18 | 2024-02-02 | 重庆大学 | SAR image similarity measurement method and system based on Hamming distance |
CN113851091A (en) * | 2021-09-28 | 2021-12-28 | 北京大上科技有限公司 | Electronic ink display screen refreshing method and display system |
CN114913350A (en) * | 2022-04-19 | 2022-08-16 | 深圳市东信时代信息技术有限公司 | Material duplicate checking method, device, equipment and storage medium |
CN115115822A (en) * | 2022-06-30 | 2022-09-27 | 小米汽车科技有限公司 | Vehicle-end image processing method and device, vehicle, storage medium and chip |
CN115115822B (en) * | 2022-06-30 | 2023-10-31 | 小米汽车科技有限公司 | Vehicle-end image processing method and device, vehicle, storage medium and chip |
CN117113439A (en) * | 2023-10-23 | 2023-11-24 | 深圳市烽航实业有限公司 | Safe anti-tampering storage method and system for data of automobile data recorder |
CN117113439B (en) * | 2023-10-23 | 2024-02-06 | 深圳市烽航实业有限公司 | Safe anti-tampering storage method and system for data of automobile data recorder |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110599486A (en) | Method and system for detecting video plagiarism | |
Kim et al. | Skewed histogram shifting for reversible data hiding using a pair of extreme predictions | |
Fang et al. | Saliency detection in the compressed domain for adaptive image retargeting | |
US8666152B1 (en) | Digital video content fingerprinting using image pixel intensity and color information | |
CN109948307B (en) | Reversible data hiding method based on pixel multi-scale prediction | |
CN112507842A (en) | Video character recognition method and device based on key frame extraction | |
WO2013036086A2 (en) | Apparatus and method for robust low-complexity video fingerprinting | |
US9305603B2 (en) | Method and apparatus for indexing a video stream | |
Zhou et al. | TMFNet: Three-input multilevel fusion network for detecting salient objects in RGB-D images | |
CN111754441B (en) | Image copying, pasting and forging passive detection method | |
CN111259792B (en) | DWT-LBP-DCT feature-based human face living body detection method | |
CN114640881A (en) | Video frame alignment method and device, terminal equipment and computer readable storage medium | |
Li et al. | Coverless Video Steganography Based on Frame Sequence Perceptual Distance Mapping. | |
CN113139544A (en) | Saliency target detection method based on multi-scale feature dynamic fusion | |
CN111163241A (en) | Reversible information embedding method | |
Wu et al. | Color transfer with salient features mapping via attention maps between images | |
CN112085683B (en) | Depth map credibility detection method in saliency detection | |
CN110705568B (en) | Optimization method for image feature point extraction | |
CN115188039A (en) | Depth forgery video technology tracing method based on image frequency domain information | |
CN110570343B (en) | Image watermark embedding method and device based on self-adaptive feature point extraction | |
Zhang et al. | Embedding guided end-to-end framework for robust image watermarking | |
CN108109141B (en) | Homologous local replication detection method based on superpixel multi-feature matching | |
CN107480616B (en) | Skin color detection unit analysis method and system based on image analysis | |
CN112837329A (en) | Tibetan ancient book document image binarization method and system | |
Tigora et al. | Image Color Reduction Using Iterative Refinement |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |