CN108632614B - Motion detection method based on format-compatible encrypted video - Google Patents
Motion detection method based on format-compatible encrypted video Download PDFInfo
- Publication number
- CN108632614B CN108632614B CN201710170569.6A CN201710170569A CN108632614B CN 108632614 B CN108632614 B CN 108632614B CN 201710170569 A CN201710170569 A CN 201710170569A CN 108632614 B CN108632614 B CN 108632614B
- Authority
- CN
- China
- Prior art keywords
- motion
- video
- series
- motion vector
- frame
- 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.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 40
- 238000000034 method Methods 0.000 claims abstract description 36
- 230000007812 deficiency Effects 0.000 claims abstract description 4
- 239000013589 supplement Substances 0.000 claims abstract description 4
- 239000013598 vector Substances 0.000 claims description 41
- 230000002159 abnormal effect Effects 0.000 claims description 3
- 238000012544 monitoring process Methods 0.000 abstract description 4
- 238000012545 processing Methods 0.000 abstract description 4
- 230000002950 deficient Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000047 product Substances 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
- H04N19/137—Motion inside a coding unit, e.g. average field, frame or block difference
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/46—Embedding additional information in the video signal during the compression process
- H04N19/467—Embedding additional information in the video signal during the compression process characterised by the embedded information being invisible, e.g. watermarking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/14—Picture signal circuitry for video frequency region
- H04N5/144—Movement detection
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention provides a motion detection method based on a format compatible encrypted video, which comprises the steps of firstly carrying out format compatible encryption on the video, then extracting motion residual error information according to a code stream structure of the encrypted video, and then generating a preliminary detection result according to the motion residual error information; and finally, updating the preliminary result, and reducing the offset supplement deficiency. The method adopts a method of directly processing on the compressed code stream, so that the algorithm efficiency is higher, the method is more suitable for practical application scenes, meanwhile, the detection result is adaptively updated by utilizing the characteristics of physical world object motion, the detection accuracy is further improved, the problem that the motion information which can be processed by the encrypted video is deficient is solved, and the method can provide help for the application of a cloud monitoring system, a cloud storage system and the like.
Description
Technical Field
The invention relates to the field of multimedia information security, in particular to a motion detection method based on a format-compatible encrypted video.
Background
In recent years, with the rapid development of information technology, cloud technology is increasingly used in our daily life. When storing video in the cloud, we usually choose to encrypt the video to protect private information. These encrypted videos are difficult to process with existing plaintext field methods. In this case, the encrypted video processing has an extremely important meaning. For example, when a user logs in to a cloud account using a remote client, encrypted video processing may provide great convenience. The user does not need to download the video first and then decrypt the video to extract the desired information, or decrypt the video at the cloud at the risk of revealing privacy.
Encrypted video motion detection may be used for cloud segmentation or classification of encrypted video. The user can directly obtain the required video clip with the motion tag without worrying about the problem of privacy disclosure. Encrypted video motion detection may also be used in remote monitoring systems. In the prior art, video content stored in a cloud is visible to a service provider, so that the possibility of privacy disclosure exists. In the remote monitoring system based on the encrypted video motion detection, the uploaded images are encrypted, so that the privacy of a user can be better protected. Meanwhile, the detection capability is reserved, and the practicability and the safety are both considered. The encrypted video motion detection can also be used for a third-party evidence obtaining system, and under the condition that the privacy and the safety of a content provider are guaranteed, the third party can conveniently carry out video evidence obtaining work.
Disclosure of Invention
The invention provides a motion detection method based on a format-compatible encrypted video, which can efficiently realize the detection and positioning of moving objects on the encrypted video.
In order to achieve the technical effects, the technical scheme of the invention is as follows:
a motion detection method based on a format-compatible encrypted video comprises the following steps:
s1: carrying out format compatible encryption on the video;
s2: extracting motion residual error information according to a code stream structure of the encrypted video;
s3: generating a preliminary detection result according to the motion residual error information;
s4: and updating the preliminary result, and reducing the offset supplement deficiency.
Further, the specific process of step S1 is:
s11: selecting bits of partial parameters for encryption in a video code stream, wherein the bits comprise residual coefficients, intra-frame prediction modes and motion vector residuals;
s12: encrypting the selected bits by using a stream cipher encryption algorithm;
s13: and replacing the encrypted bits to the original bit positions to obtain the encrypted video.
Further, the specific process of step S2 is:
s21: positioning a macro block position with a motion vector residual error according to format information remained after the video is encrypted;
s22: estimating the size of the motion vector residual according to the length of the code word, wherein the formula is as follows:
s23: and generating a motion vector residual error map with the motion vector residual error size carried by the macro block for each frame.
Further, the specific process of step S3 is:
s31: removing insignificant parts in the motion vector residual image, wherein the conditions satisfied by the removed parts are as follows:
wherein,to estimate the resulting x-direction motion vector residual component,to estimate the resulting y-direction motion vector residual component,for the length of the motion vector, TlThe length of the significant motion vector is the lower bound, and the adjustment is carried out according to the resolution;
s32: removing the part which appears infrequently in the motion vector residual image sequence, wherein the condition met by the removed part is as follows:
wherein r is the frame rate of video coding;
s33: for the area N with motion vector residual error and larger than a plurality of macro blocks in the motion vector residual error mapcon>TcMarked with a smallest rectangular box. T iscIs the lower bound on the number of connected macroblocks.
Further, the specific process of step S4 is:
s41: marking the generated preliminary detection result, marking the motion area continued by the previous frame and the next frame as the same motion area series, wherein the specific method comprises the following steps:
scanning the preliminary detection results in time sequence: firstly, the motion areas which appear for the first time in the preliminary detection result, i.e. the areas which do not overlap or are adjacent in the previous 100 frames, are respectively the new series Oi,j=1,2,···,Oi,jA series number representing the jth motion region in the ith frame; secondly, in the subsequent frame, if the region which is overlapped or adjacent to the previous frame exists, the subsequent frame is marked as the same series, and finally the regions which belong to a plurality of series are temporarily marked as undetermined series;
s42: for each motion region series, while marking the series number, recording the average size of the motion region series to the current frame position
S43: the area with abnormal size or shape in the motion series is updated by the recorded average value, and the formula isWhere δ { B }i,jDenotes a motion region Bi,jThe size of (d);
s44: updating the motion areas in the series to be determined, merging the two series with the same motion trend, and dividing the area of the series to be determined with different motion trends into two areas;
s45: and updating the motion area which is lacked between the previous frame and the next frame.
Furthermore, the method does not need to decrypt the encrypted video in the whole detection process of the video, is completed in the encrypted video code stream, and updates the detection result in real time according to the received video code stream, namely, a part is received and a part is updated until the video is finished.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that:
the method comprises the steps of firstly carrying out format compatible encryption on a video, then extracting motion residual error information according to a code stream structure of the encrypted video, and then generating a preliminary detection result according to the motion residual error information; and finally, updating the preliminary result, and reducing the offset supplement deficiency. The method adopts a method of directly processing on the compressed code stream, so that the algorithm efficiency is higher, the method is more suitable for practical application scenes, meanwhile, the detection result is adaptively updated by utilizing the characteristics of physical world object motion, the detection accuracy is further improved, the problem that the motion information which can be processed by the encrypted video is deficient is solved, and the method can provide help for the application of a cloud monitoring system, a cloud storage system and the like.
Drawings
FIG. 1 is a flow chart of encrypted domain motion detection using the method of the present invention;
FIG. 2 is a schematic diagram of the generation of preliminary test results using the method of the present invention;
FIG. 3 is a schematic diagram of a region update using the method of the present invention;
fig. 4 is a schematic diagram of a specific method for performing area update by using previous and subsequent frames by using the method of the present invention.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
for the purpose of better illustrating the embodiments, certain features of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product;
it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The technical solution of the present invention is further described below with reference to the accompanying drawings and examples.
Example 1
Fig. 1 is a flowchart of an encryption domain motion detection method based on format compatible encryption in the method of the present invention, which includes the following specific steps:
(1) the format compatible encryption is carried out on the video, the existing video format compatible encryption method can be adopted, and the following methods can also be used:
selecting bits of partial parameters (without destroying video formats) for encryption in a video code stream, such as residual coefficients, intra-frame prediction modes, motion and the like;
secondly, encrypting the selected bits by using a stream cipher encryption algorithm;
and thirdly, replacing the encrypted bits to the original bit positions to obtain the encrypted video.
(2) Extracting motion residual error information according to a code stream structure of the encrypted video:
firstly, positioning a macro block position with a motion vector residual error according to format information remained after video encryption;
estimating the residual error of the motion vector according to the length of the code word, wherein the formula is as follows:
and thirdly, generating a motion vector residual image with the residual error of the motion vector carried by the macro block for each frame.
(3) According to the motion residual information, a preliminary detection result is generated, as shown in fig. 2:
removing insignificant parts in the motion vector residual map, which is expressed as follows:
wherein, the residual components of the motion vectors in the x and y directions obtained by estimation are respectivelyAndis the length of the vector, TlThe value of (c) is adjusted according to the resolution. Assuming a resolution of w × h, Tl=0.06w。
Secondly, removing the part which appears infrequently in the motion vector residual error image sequence, and the formula isWherein r is the frame rate of the video coding;
third, in the motion vector residual error image, the area N with motion vector residual error and larger than a plurality of macro blockscon>TcMarked with a smallest rectangular box. Assuming p is wh, then Tc=0.08p。
(4) The preliminary results are updated to reduce bias fill-in misses, as shown in FIG. 3
Marking the generated preliminary detection result, and marking the motion areas continued from the previous frame and the next frame as the same motion area series, wherein the specific method comprises the following steps:
scanning the preliminary detection results in time sequence: firstly, the motion areas which appear for the first time in the preliminary detection result, i.e. the areas which do not overlap or are adjacent in the previous 100 frames, are respectively the new series O i,j1,2, ·; secondly, in the subsequent frame, if the region which is overlapped or adjacent to the previous frame exists, the subsequent frame is marked as the same series, and finally the regions which belong to a plurality of series are temporarily marked as undetermined series;
secondly, for each motion area series, while marking the series number, recording the average size of the motion area series to the position of the current frame IncludedAndtwo parts. Suppose a motion region of sizeAnd O ═ Oi,jThen
Thirdly, updating the abnormal area in the motion series by using the recorded average value, wherein the formula isδ{Bi,jDenotes a motion region Bi,jThe size of (c). As shown by the outer dashed boxes of the two dashed boxes in fig. 3, the motion area becomes suddenly larger in a frame where we update it to the motion area of the blue box, which may be due to encoding itself or encryption. The specific updating method is as shown in fig. 4, the central position of the motion area of the current frame is calculated by using the motion areas of the previous and subsequent frames, and the area with the normal size is recovered by using the recorded series average size;
updating the motion areas in the to-be-determined series, merging the two series with the same motion trend, and dividing the to-be-determined series with different motion trends into two areas;
fifthly, updating the missing motion area between the previous frame and the next frame. The specific method is shown in 4, Bi-1,j'And Bi+1,j”Is the motion region of the previous and the next frames of the current frame, and the motion region B of the current framei,jIt cannot be detected in the preliminary detection due to encoding (no motion vector residual in I-frame) or encryption. The motion of an object is temporally and spatially continuous, according to the nature of the physical world object motion. We can be according to Bi-1,j'And Bi+1,j”Recover Bi,j。Bi,jIs centered at Bi-1,j'Point of direction Bi+1,j”Vector of (2)At the midpoint of (d), the size is the recorded series average size
(5) The whole detection process is completed in the encrypted video code stream without decrypting the encrypted video. The detection result can be updated in real time according to the received video code stream, namely, a part is received and is updated until the video is finished.
The same or similar reference numerals correspond to the same or similar parts;
the positional relationships depicted in the drawings are for illustrative purposes only and are not to be construed as limiting the present patent;
it should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.
Claims (2)
1. A motion detection method based on a format-compatible encrypted video is characterized by comprising the following steps:
s1: carrying out format compatible encryption on the video;
s2: extracting motion residual error information according to a code stream structure of the encrypted video;
s3: generating a preliminary detection result according to the motion residual error information;
s4: updating the preliminary result to reduce the offset supplement deficiency;
the specific process of step S1 is:
s11: selecting bits of partial parameters for encryption in a video code stream, wherein the bits comprise residual coefficients, intra-frame prediction modes and motion vector residuals;
s12: encrypting the selected bits by using a stream cipher encryption algorithm;
s13: replacing the encrypted bits to the original bit positions to obtain encrypted videos;
the specific process of step S2 is:
s21: positioning a macro block position with a motion vector residual error according to format information remained after the video is encrypted;
s22: estimating the size of the motion vector residual according to the length of the code word, wherein the formula is as follows:
s23: generating a motion vector residual error image with the motion vector residual error size carried by the macro block for each frame;
the specific process of step S3 is:
s31: removing insignificant parts in the motion vector residual image, wherein the conditions satisfied by the removed parts are as follows:
wherein,to estimate the resulting x-direction motion vector residual component,for estimating the motion in the y-directionThe residual components of the vector are then combined,for the length of the motion vector, TlThe length of the significant motion vector is the lower bound, and the adjustment is carried out according to the resolution;
s32: removing the part which appears infrequently in the motion vector residual image sequence, wherein the condition met by the removed part is as follows:
wherein r is the frame rate of video coding;
s33: for the area N with motion vector residual error and larger than a plurality of macro blocks in the motion vector residual error mapcon>Tc,TcIs the lower bound of the number of connected macroblocks, marked by a minimum rectangular frame;
the specific process of step S4 is:
s41: marking the generated preliminary detection result, marking the motion area continued by the previous frame and the next frame as the same motion area series, wherein the specific method comprises the following steps:
scanning the preliminary detection results in time sequence: firstly, the motion areas which appear for the first time in the preliminary detection result, i.e. the areas which do not overlap or are adjacent in the previous 100 frames, are respectively the new series Oi,j=1,2,…,Oi,jA series number representing the jth motion region in the ith frame; secondly, in the subsequent frame, if the region which is overlapped or adjacent to the previous frame exists, the subsequent frame is marked as the same series, and finally the regions which belong to a plurality of series are temporarily marked as undetermined series;
s42: for each motion region series, while marking the series number, recording the average size of the motion region series to the current frame position
S43: will move seriesIn the area with abnormal size or shape, the area is updated by the recorded average value, and the formula isWhere δ { B }i,jDenotes a motion region Bi,jThe size of (d);
s44: updating the motion areas in the series to be determined, merging the two series with the same motion trend, and dividing the area of the series to be determined with different motion trends into two areas;
s45: and updating the motion area which is lacked between the previous frame and the next frame.
2. The method of claim 1, wherein the entire detection of the video without decrypting the encrypted video is performed in the encrypted video stream, and the detection result is updated in real time, i.e., a portion is received and a portion is updated, according to the received video stream, until the video is finished.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710170569.6A CN108632614B (en) | 2017-03-21 | 2017-03-21 | Motion detection method based on format-compatible encrypted video |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710170569.6A CN108632614B (en) | 2017-03-21 | 2017-03-21 | Motion detection method based on format-compatible encrypted video |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108632614A CN108632614A (en) | 2018-10-09 |
CN108632614B true CN108632614B (en) | 2021-11-05 |
Family
ID=63687281
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710170569.6A Active CN108632614B (en) | 2017-03-21 | 2017-03-21 | Motion detection method based on format-compatible encrypted video |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108632614B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101064822A (en) * | 2006-12-28 | 2007-10-31 | 武汉大学 | Method for encrypting/deciphering residual quotiety amplitude value in H.264 standard video information |
CN103442253A (en) * | 2013-07-17 | 2013-12-11 | 宁波工程学院 | Method for hiding H. 264/AVC video data of encrypted domain |
CN103826128A (en) * | 2014-02-25 | 2014-05-28 | 宁波工程学院 | Encryption domain H.264/AVC video reversible data hiding method |
CN104349166A (en) * | 2013-08-08 | 2015-02-11 | 霍尼韦尔国际公司 | System and method of motion detection on encrypted or scrambled video data streams |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9442904B2 (en) * | 2012-12-21 | 2016-09-13 | Vmware, Inc. | Systems and methods for applying a residual error image |
-
2017
- 2017-03-21 CN CN201710170569.6A patent/CN108632614B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101064822A (en) * | 2006-12-28 | 2007-10-31 | 武汉大学 | Method for encrypting/deciphering residual quotiety amplitude value in H.264 standard video information |
CN103442253A (en) * | 2013-07-17 | 2013-12-11 | 宁波工程学院 | Method for hiding H. 264/AVC video data of encrypted domain |
CN104349166A (en) * | 2013-08-08 | 2015-02-11 | 霍尼韦尔国际公司 | System and method of motion detection on encrypted or scrambled video data streams |
CN103826128A (en) * | 2014-02-25 | 2014-05-28 | 宁波工程学院 | Encryption domain H.264/AVC video reversible data hiding method |
Also Published As
Publication number | Publication date |
---|---|
CN108632614A (en) | 2018-10-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Yu et al. | Reversible data hiding with hierarchical embedding for encrypted images | |
Yin et al. | Reversible data hiding in encrypted images based on multi-MSB prediction and Huffman coding | |
Khan et al. | A recent survey of reversible watermarking techniques | |
Ouaret et al. | Fusion-based multiview distributed video coding | |
US8447034B2 (en) | Method and system making it possible to protect after compression the confidentiality of the data of a video stream during its transmission | |
CN109348228A (en) | A kind of hiding System and method for of the image encryption domain reversible information based on image segmentation and image space correlation | |
Dalal et al. | A survey on information hiding using video steganography | |
CN109391846B (en) | Video scrambling method and device for self-adaptive mode selection | |
Guo et al. | An efficient motion detection and tracking scheme for encrypted surveillance videos | |
CN112911290B (en) | Ciphertext image reversible data hiding method based on predictive difference compression coding | |
CN107911715B (en) | H.264/AVC video format compatible encryption method based on CAVLC coding | |
CN101527850B (en) | Video self-recovery watermark method based on motion estimation | |
Ma et al. | Lossless ROI privacy protection of H. 264/AVC compressed surveillance videos | |
Rakhmawati | Image fragile watermarking with two authentication components for tamper detection and recovery | |
CN107948655B (en) | H.264/AVC encrypted video steganography method based on CABAC | |
CN112132736A (en) | Encryption image reversible information hiding method based on interpolation technology | |
Wang et al. | Digital video steganalysis by subtractive prediction error adjacency matrix | |
CN101489123B (en) | Digital video content fast protection and deprotection method | |
CN108632614B (en) | Motion detection method based on format-compatible encrypted video | |
AU689046B2 (en) | Method and system for improved motion compensation | |
CN111915474A (en) | Reversible encryption domain information hiding method based on integer transformation | |
CN107948675B (en) | H.264/AVC video format compatible encryption method based on CABAC coding | |
CN108111875B (en) | H.264/AVC encrypted video motion detection method based on CABAC | |
Shiu et al. | Reversible data hiding in permutation-based encrypted images with strong privacy | |
Seo et al. | Motion vector refinement for video downsampling in the DCT domain |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |