CN114245145A - Monitoring equipment video compression method based on background frame - Google Patents

Monitoring equipment video compression method based on background frame 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. A monitoring equipment video compression method based on background frames is characterized in that: 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.
2. The method of claim 1, wherein the monitoring device video compression method based on the background frame is characterized in that: the background reference frame removing coding process comprises 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 reference frame removal, if not decoded, the same processing can be carried out with the common coding frame;
3. the method of claim 1, wherein the monitoring device video compression method based on the background frame is characterized in that: the background reference frame removing coding process comprises 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.
CN202111551634.2A 2021-12-18 2021-12-18 Monitoring equipment video compression method based on background frame Pending CN114245145A (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

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 Monitoring equipment video compression method based on background frame

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
US20230254515A1 (en) Filtering video data using a plurality of filters
US9414086B2 (en) Partial frame utilization in video codecs
US6853752B2 (en) Method and apparatus for dynamic loop and post filtering
US20120082235A1 (en) Coding and decoding utilizing context model selection with adaptive scan pattern
CN111327950B (en) Video transcoding method and device
KR20140110008A (en) Object detection informed encoding
CN113038128B (en) Data transmission method and device, electronic equipment and storage medium
US12022070B2 (en) Video encoding and decoding methods and apparatuses, electronic device, and storage medium
CN109803146B (en) Method, apparatus, medium, and device for secondary compression of video
CN113597757A (en) Shape adaptive discrete cosine transform with region number adaptive geometric partitioning
CN114222127A (en) Video coding method, video decoding method and device
US20120195364A1 (en) Dynamic mode search order control for a video encoder
CN115514960A (en) Video coding method and device, electronic equipment and storage medium
CN103929682B (en) Method and device for setting key frames in video live broadcast system
CN111586418A (en) Video compression method and device
WO2024078066A1 (en) Video decoding method and apparatus, video encoding method and apparatus, storage medium, and device
CN110582022B (en) Video encoding and decoding method and device and storage medium
CN111447451A (en) Image coding and decoding method and device
CN114245145A (en) Monitoring equipment video compression method based on background frame
CN101841704B (en) Method and device for compressing and decompressing video bit stream
KR20060043050A (en) Method for encoding and decoding video signal
Usman et al. Exploiting the spatio-temporal attributes of HD videos: A bandwidth efficient approach
CN115442615A (en) Video coding method and device, electronic equipment and storage medium
WO2024082971A1 (en) Video processing method and related device
CN111212288A (en) Video data encoding and decoding method and device, computer equipment and storage medium

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