CN114245145A - A video compression method for monitoring equipment based on background frames - Google Patents

A video compression method for monitoring equipment based on background frames Download PDF

Info

Publication number
CN114245145A
CN114245145A CN202111551634.2A CN202111551634A CN114245145A CN 114245145 A CN114245145 A CN 114245145A CN 202111551634 A CN202111551634 A CN 202111551634A CN 114245145 A CN114245145 A CN 114245145A
Authority
CN
China
Prior art keywords
frame
background
background frame
reference frame
monitoring equipment
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
Application number
CN202111551634.2A
Other languages
Chinese (zh)
Inventor
金骏
张彪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Shidong Technology Co ltd
Original Assignee
Hangzhou Shidong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Shidong Technology Co ltd filed Critical Hangzhou Shidong Technology Co ltd
Priority to CN202111551634.2A priority Critical patent/CN114245145A/en
Publication of CN114245145A publication Critical patent/CN114245145A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/58Motion compensation with long-term prediction, i.e. the reference frame for a current frame not being the temporally closest one

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a monitoring equipment video compression method based on background frames, which is characterized by comprising the following steps: comprises the following steps; s1, judging a background frame through a motion detection mechanism of the monitoring equipment, and when the result of converting the detected motion picture into continuous N-second motion detection is smaller than a set threshold value, taking a reference frame generated by an H264/H265 encoder as a next alternative background frame; s2, comparing the alternative background frame with the background frame in use to decide whether to update the background frame in use, when the difference between the alternative background frame and the background frame exceeds the threshold value, updating, and storing the new background frame in the place where the monitoring system can read, and all the adopted background frames need to be stored; and S3, when the background frame is successfully stored, removing the background information of each reference frame by taking the current background frame as a reference. The invention can further reduce the video data volume and relieve the pressure on the network and cloud resources while ensuring the image quality.

Description

Monitoring equipment video compression method based on background frame
Technical Field
The invention relates to the technical field of intelligent security and protection, in particular to a monitoring equipment video compression method based on background frames.
Background
With the popularization of high-speed networks, smart phones and cloud technologies, intelligent monitoring devices are also increasingly used by individual users. The user can bind the intelligent monitoring equipment to the account of the user through the intelligent mobile phone, and the intelligent monitoring equipment can be monitored at any time and any place by using the mobile phone and the mobile network; and historical monitoring video data is uploaded and stored in the cloud storage, so that a user can review the monitoring historical data conveniently.
With more and more intelligent monitoring devices being networked, the real-time monitoring and historical monitoring video data of the intelligent monitoring devices are stored in the cloud, and the network resources and the cloud resources are occupied more and more. If the video stream data volume collected by the monitoring equipment is large, the monitoring equipment can not occupy large network bandwidth of an individual user, and network congestion can be caused; for manufacturers who provide cloud computing and storage services, the processing difficulty is increased, and the cloud resource consumption is increased.
Most manufacturers have introduced popular video compression algorithms into the monitoring equipment, such as H264/H265, to achieve good results. Even some vendors optimize these algorithms to achieve better compression performance. However, if the compression ratio is further increased based on these compression algorithms, the image quality deteriorates. When the compression algorithm reaches the bottleneck, how to further compress the video data on the basis of not influencing the image quality so as to relieve the network and cloud pressure becomes a problem to be solved urgently.
Disclosure of Invention
The invention aims to provide a monitoring equipment video compression method based on background frames, and a video compression scheme which can be used for monitoring equipment, particularly intelligent monitoring equipment is realized from the scene characteristics of the monitoring equipment.
In order to achieve the purpose, the invention provides the following technical scheme: a monitoring equipment video compression method based on background frames comprises the following steps;
s1, judging a background frame through a motion detection mechanism of the monitoring equipment, and when the result of converting the detected motion picture into continuous N-second motion detection is smaller than a set threshold value, taking a reference frame generated by an H264/H265 encoder as a next alternative background frame;
s2, comparing the alternative background frame with the background frame in use to decide whether to update the background frame in use, when the difference between the alternative background frame and the background frame exceeds the threshold value, updating, and storing the new background frame in the place where the monitoring system can read, and all the adopted background frames need to be stored;
and S3, when the background frame is successfully stored, removing the background information of each reference frame by taking the current background frame as a reference.
Preferably, the background reference frame removing encoding process includes the following steps:
1. obtaining a frame through an H264/H265 encoder, and directly processing the frame if the frame is a non-reference frame;
2. if the reference frame is the background frame, judging whether the background frame can be removed or not, or judging according to the comparison between the motion detection result of the monitoring equipment and a set threshold value, comparing the image data of the reference frame and the image data of the background frame to obtain a difference value of the reference frame and the background frame when the motion detection result is smaller than the threshold value and the background frame exists currently, and coding the obtained difference value again to compress data, wherein the obtained frame data is called as the background removal reference frame;
3. for background-removed reference frames, the same process can be performed as for normal encoded frames, if not decoded.
Preferably, the background reference frame removing encoding process includes the following steps:
1. reading a frame of video data, and if the frame is a common coding frame, directly carrying out H264/H265 decoding;
2. if the background reference frame is removed, the background frame is read according to the stored background frame reading information, then the background frame is decoded into the reference frame by taking the background frame as a reference, and then H264/H265 decoding can be carried out.
The monitoring equipment video compression method based on the background frame has the beneficial effects that:
the method fully excavates the scene characteristics of the monitoring equipment, further compresses the reference frame based on the background frame, and obviously reduces the video data volume of the monitoring equipment because the data volume contained in the reference frame is generally the highest in the proportion of the whole video, especially for most monitoring equipment, the scene is not changed for most time, the compression effect is more obvious, the video data volume can be further reduced while the image quality is ensured, and the pressure on the network and cloud resources is relieved.
Drawings
FIG. 1 is a flow chart of frame acquisition according to the present invention;
FIG. 2 is a first flowchart of reference frame encoding according to the present invention;
FIG. 3 is a flowchart of reference frame encoding according to the present invention;
fig. 4 is a schematic block diagram of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In an embodiment, referring to fig. 1-4, the present invention provides a technical solution: a monitoring equipment video compression method based on background frames comprises the following steps;
s1, judging a background frame through a motion detection mechanism of the monitoring equipment, and when the result of converting the detected motion picture into continuous N-second motion detection is smaller than a set threshold value, taking a reference frame generated by an H264/H265 encoder as a next alternative background frame;
s2, comparing the alternative background frame with the background frame in use to decide whether to update the background frame in use, when the difference between the alternative background frame and the background frame exceeds the threshold value, updating, and storing the new background frame in the place where the monitoring system can read, and all the adopted background frames need to be stored;
and S3, when the background frame is successfully stored, removing the background information of each reference frame by taking the current background frame as a reference.
More specifically, as shown in fig. 2, a background reference frame removing encoding process is shown, which includes the following specific steps:
1. obtaining a frame through an H264/H265 encoder, and directly processing the frame if the frame is a non-reference frame; for example, uploading the preview to a cloud terminal through a monitoring system, or sending the preview to a user for decoding;
2. if the reference frame is the reference frame, judging whether the background frame can be removed or not, or judging according to the comparison between the motion detection result of the monitoring equipment and a set threshold value, and comparing the image data of the reference frame and the image data of the background frame to obtain the difference value of the reference frame and the background frame when the motion detection result is smaller than the threshold value and the background frame exists currently; the background removing process of the reference frame is carried out, the obtained difference value is coded again to compress data, and a frame of data obtained by the coding is called a background removing reference frame; the data volume is much smaller than that of the corresponding reference frame due to the removal of the background information, and the flow of background information removal and re-encoding is similar to the flow of P frame and B frame obtained by H264/H265 encoding;
3. for background reference frame removal, if not decoded, the same processing can be carried out with the common coding frame; for example, uploading to the cloud for saving, the reading information of the corresponding background frame needs to be saved when the background reference frame is removed.
More specifically, as shown in fig. 3, a background reference frame decoding process is shown, which includes the following specific steps:
1. reading a frame of video data, and if the frame is a common coding frame, directly carrying out H264/H265 decoding;
2. if the background reference frame is removed, the background frame is read according to the stored background frame reading information, then the background frame is decoded into the reference frame by taking the background frame as a reference, and then H264/H265 decoding can be carried out.
Because the monitoring data is often private data and only the monitoring system decodes and previews, the customized decoder is adopted in the monitoring system to realize data decoding, and a third-party system cannot decode the data; if the monitoring data needs to be shared to a third party, the monitoring data is restored to normal H264/H265 data through a decoder of the monitoring system and then is shared to the third party, and the third party can decode the monitoring data through a universal decoder.
According to the scheme, firstly, a background frame is found out and stored to a place where a monitoring system can read, then a reference frame obtained by the subsequent H264/H265 coding is used as a reference, and after background information is removed, the reference frame is coded again to obtain a background-removed reference frame, so that the aim of further reducing the video data volume is fulfilled; the background reference frame is removed, the reading information of the corresponding background frame is stored, when decoding, the background frame is pre-read according to the reading information, then the reference frame is obtained based on the background frame decoding, and then the reference frame and the non-reference frame can be decoded according to the normal H264/H265 decoding flow.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (3)

1.一种基于背景帧的监控设备视频压缩方法,其特征在于:包括以下步骤;1. a monitoring equipment video compression method based on background frame, is characterized in that: comprise the following steps; S1、通过监控设备的运动检测机制来判断背景帧,当从检测到运动画面转为连续N秒运动检测的结果小于设定的阈值,即可将H264/H265编码器产生的一个参考帧作为接下来备选的背景帧;S1. The background frame is judged by the motion detection mechanism of the monitoring device. When the result of moving from the detected motion picture to the continuous N-second motion detection is less than the set threshold, a reference frame generated by the H264/H265 encoder can be used as the connection frame. down the alternative background frame; S2、将备选背景帧和正在使用的背景帧进行比较,以决定是否要更新当前使用的背景帧,当两者的差别超过阈值,则更新,同时将新的背景帧保存在监控系统可读取的地方,且所有被采用过的背景帧都需要保存;S2. Compare the candidate background frame with the background frame in use to decide whether to update the currently used background frame. When the difference between the two exceeds the threshold, update it, and save the new background frame in the monitoring system to read The place where it is taken, and all the background frames that have been used need to be saved; S3、当背景帧保存成功后,就可以当前背景帧为参考,去除接下来每一个参考帧的背景信息。S3. After the background frame is successfully saved, the background information of each next reference frame can be removed by taking the current background frame as a reference. 2.根据权利要求1所述的一种基于背景帧的监控设备视频压缩方法,其特征在于:去背景参考帧编码流程,包括以下步骤:2. a kind of video compression method of monitoring equipment based on background frame according to claim 1, is characterized in that: removing background reference frame coding process, comprises the following steps: 1、通过H264/H265编码器得到一帧如果是非参考帧,则直接处理该帧;1. If a frame is obtained through the H264/H265 encoder, if it is a non-reference frame, the frame is processed directly; 2、如果是参考帧,则判断是否可以去背景帧,或根据监控设备的运动检测结果和设定的阈值比较来判断,当运动检测结果小于阈值,且当前有背景帧时,就将此参考帧和背景帧的图像数据相比较,而得到两者的差值,对得到的差值进行再次编码以压缩数据,以此得到的一帧数据称为去背景参考帧;2. If it is a reference frame, judge whether the background frame can be removed, or judge according to the comparison between the motion detection result of the monitoring device and the set threshold value. When the motion detection result is less than the threshold value and there is currently a background frame, this reference frame is used. The image data of the frame and the background frame are compared, and the difference between the two is obtained, and the obtained difference is re-encoded to compress the data, and a frame of data obtained by this is called a background-removed reference frame; 3、对于去背景参考帧,如果不解码,可以和普通的编码帧进行同样的处理;3. For the background reference frame, if it is not decoded, it can be processed in the same way as the ordinary encoded frame; 3.根据权利要求1所述的一种基于背景帧的监控设备视频压缩方法,其特征在于:去背景参考帧编码流程,包括以下步骤:3. a kind of video compression method of monitoring equipment based on background frame according to claim 1, is characterized in that: removing background reference frame coding process, comprises the following steps: 1、读取视频数据的一帧,如果是普通的编码帧,则直接进行H264/H265解码;1. Read a frame of video data, if it is an ordinary encoded frame, directly perform H264/H265 decoding; 2、如果是去背景参考帧,则根据其保存的背景帧读取信息先读取背景帧,再以背景帧为参考解码成参考帧,接下来就可以进行H264/H265解码,对于智能监控系统,背景帧和视频数据往往一起保存在云端,为了减少云端访问,可以将之前读取到的背景帧保存在解码端,当一组连续的参考帧有相同的背景帧时,不用频繁访问网络。2. If it is to remove the background reference frame, read the background frame according to the background frame reading information saved, and then decode it into a reference frame with the background frame as a reference, and then perform H264/H265 decoding. For intelligent monitoring systems , Background frames and video data are often stored in the cloud together. In order to reduce cloud access, the previously read background frames can be stored at the decoding end. When a group of consecutive reference frames have the same background frame, there is no need to frequently access the network.
CN202111551634.2A 2021-12-18 2021-12-18 A video compression method for monitoring equipment based on background frames Pending CN114245145A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111551634.2A CN114245145A (en) 2021-12-18 2021-12-18 A video compression method for monitoring equipment based on background frames

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111551634.2A CN114245145A (en) 2021-12-18 2021-12-18 A video compression method for monitoring equipment based on background frames

Publications (1)

Publication Number Publication Date
CN114245145A true CN114245145A (en) 2022-03-25

Family

ID=80757920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111551634.2A Pending CN114245145A (en) 2021-12-18 2021-12-18 A video compression method for monitoring equipment based on background frames

Country Status (1)

Country Link
CN (1) CN114245145A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847793A (en) * 2015-01-16 2016-08-10 杭州海康威视数字技术股份有限公司 Video coding method and device and video decoding method and device
CN106034237A (en) * 2015-03-10 2016-10-19 杭州海康威视数字技术股份有限公司 Mixed coding method and system based on coding switching
CN106162194A (en) * 2015-04-08 2016-11-23 杭州海康威视数字技术股份有限公司 A kind of Video coding and the method for decoding, device and processing system
CN111669600A (en) * 2020-06-05 2020-09-15 浙江大华技术股份有限公司 Video coding method, video coding device, video coder and storage device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847793A (en) * 2015-01-16 2016-08-10 杭州海康威视数字技术股份有限公司 Video coding method and device and video decoding method and device
CN106034237A (en) * 2015-03-10 2016-10-19 杭州海康威视数字技术股份有限公司 Mixed coding method and system based on coding switching
CN106162194A (en) * 2015-04-08 2016-11-23 杭州海康威视数字技术股份有限公司 A kind of Video coding and the method for decoding, device and processing system
CN111669600A (en) * 2020-06-05 2020-09-15 浙江大华技术股份有限公司 Video coding method, video coding device, video coder and storage device

Similar Documents

Publication Publication Date Title
US20230247228A1 (en) Filtering video data using a plurality of filters
US9414086B2 (en) Partial frame utilization in video codecs
US9521411B2 (en) Method and apparatus for encoder assisted-frame rate up conversion (EA-FRUC) for video compression
CN101345871B (en) Method and device for video encoding and decoding
US9420282B2 (en) Video coding redundancy reduction
US6853752B2 (en) Method and apparatus for dynamic loop and post filtering
US9584832B2 (en) High quality seamless playback for video decoder clients
US20120195356A1 (en) Resource usage control for real time video encoding
US9635374B2 (en) Systems and methods for coding video data using switchable encoders and decoders
KR20130054396A (en) Optimized deblocking filters
US20220239911A1 (en) Video Encoding and Decoding Methods and Apparatuses, Electronic Device, and Storage Medium
CN117480778A (en) Residual coding and video coding methods, devices, equipment and systems
KR20240163760A (en) Loop filtering method and device
US20120195364A1 (en) Dynamic mode search order control for a video encoder
CN110769255B (en) A kind of image coding method and device
CN101998117B (en) Video transcoding method and device
US20220150515A1 (en) Adaptive temporal filter for an unavailable reference picture
CN116827921A (en) Audio and video processing method, device and equipment for streaming media
WO2024082971A1 (en) Video processing method and related device
CN114245145A (en) A video compression method for monitoring equipment based on background frames
CN117478881A (en) Video information processing methods, systems, equipment and storage media
CN111212288A (en) Video data encoding and decoding method and device, computer equipment and storage medium
CN115442589B (en) Video source compression quality analysis method and device based on video frame information
US11825075B2 (en) Online and offline selection of extended long term reference picture retention
US20240297998A1 (en) Encoding video with extended long term reference picture retention

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220325

RJ01 Rejection of invention patent application after publication