A method for improving the compression rate of static background video based on background modeling technology
By using background modeling technology in video encoding, the background model is established and updated, the code rate control factor is adjusted according to the background probability of pixel points, and differentiated encoding is performed, the problem of video compression rate bottleneck in the existing technology is solved, and higher compression rate and better visual quality are achieved.
Patent Information
- Application Number
- CN202110609798.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-01
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2041-06-01
AI Technical Summary
In the prior art, in application scenarios such as home cameras, video compression rate has reached a bottleneck, and it is difficult to further improve the compression rate without affecting the subjective visual quality of the picture.
Using a method based on background modeling technology, a background model is established through a foreground extraction algorithm, the background model is updated and the foreground or background estimation is performed on each pixel point. The dynamic code rate control factor is adjusted according to the probability that the pixel point is judged as a background, and differentiated coding is performed.
It improves the compression rate of video, dynamically adjusts the compression efficiency, improves the subjective visual quality of the picture, avoids visual image quality differences, and is suitable for application scenarios with static backgrounds.
Smart Images

Figure CN113850879B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to video coding, and in particular to a method for improving the compression rate of static background video based on background modeling technology. Background Art
[0002] The amount of information that humans obtain through vision accounts for about 70% of the total amount of information, and video information has a series of advantages such as intuitiveness and credibility. However, with the continuous expansion of the application scope of video technology, such as the widespread use of cameras in home scenes, the amount of data transmitted is also increasing. However, simply relying on expanding memory capacity and increasing the transmission rate of communication trunks is expensive and difficult to achieve. Therefore, video coding compression technology is an effective solution.
[0003] At present, mainstream video encoders are mainly divided into three series: VPx (VP8, VP9), H.26x (H.264, H.265, H.266), AVS (AVS1.0, AVS2.0), but they only put forward standards and specifications, and do not distinguish between application scenarios. Therefore, in practical applications, in order to further improve the efficiency of video compression, it is necessary to combine the characteristics of the scene for improvement and in-depth optimization. For application scenarios such as home cameras and road cameras where the background is relatively static and changes little, if only mainstream video encoding technology is used, the compression rate has basically reached a bottleneck. Only by adopting a more adaptive optimization solution based on the characteristics of the video can the compression efficiency be improved.
[0004] The patent "ROI-based video encoding method and system and video transmission and encoding system" (CN202010249206.3A) discloses a ROI-based video encoding method, including: obtaining a video frame of the video to be encoded, the video frame including multiple encoding blocks; dividing the video frame into an ROI area and a non-ROI area; generating a mask for the video frame, the mask can distinguish the ROI area and the non-ROI area; obtaining the difference in quantization parameters of at least one channel of the color space of the video frame; for each encoding block of the video frame, selecting a prediction mode of the at least one channel according to the mask; for each encoding block of the video frame, according to the difference in quantization parameters of the at least one channel, according to whether the encoding block includes an ROI area and / or a non-ROI area, adjusting the quantization parameter of the at least one channel; and encoding the video frame according to the prediction mode and the quantization parameter of the at least one channel.
[0005] The patent "ROI-based video coding method and video coding system" (CN202010366816.1A) discloses a ROI-based video coding method, including: S101: obtaining a video frame of the video to be encoded; S102: extracting the ROI area of the video frame through a neural network model; S103: encoding the ROI area of the video frame using a first encoding method; encoding the non-ROI area of the video frame using a second encoding method, wherein the encoding image quality level of the first encoding method is higher than the encoding image quality level of the second encoding method.
[0006] However, the above two solutions only divide the picture into two types of areas, namely ROI (region of interest) and non-ROI area. Differential encoding of the two areas based on piecewise functions will result in obvious difference in image quality between the two areas in the same picture, thereby reducing the user's visual experience.
[0007] Therefore, how to improve the compression rate of videos with small background changes, such as those captured by home cameras, without affecting the subjective visual quality of the picture is a problem that deserves further optimization and resolution. Summary of the invention
[0008] This Summary is provided to introduce some concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
[0009] According to one embodiment of the present invention, a method for improving the compression rate of static background video based on background modeling technology is provided, comprising: using a foreground extraction algorithm to establish a background model, the background model is used to characterize the characteristics of each pixel in an image frame; initializing the established background model; based on an acquired new image frame, updating the background model; performing foreground or background estimation on each pixel in the new image frame; adjusting a dynamic bit rate control factor for each coding block based on the probability that a pixel in each coding block in the new image frame is determined to be the background; and differentially encoding each coding block based on the dynamic bit rate control factor for each coding block.
[0010] According to another embodiment of the present invention, a system for improving the compression rate of static background video based on background modeling technology is provided, including a background modeling module and a dynamic encoding module. The background modeling module is configured to: use a foreground extraction algorithm to establish a background model, and the background model is used to characterize the characteristics of each pixel in the image frame; initialize the established background model; based on the acquired new image frame, update the background model; and perform foreground or background estimation on each pixel in the new image frame. The dynamic encoding module is configured to: adjust the dynamic bit rate control factor for each coding block according to the probability that the pixel in each coding block in the new image frame is determined to be the background; and perform differential encoding on each coding block based on the dynamic bit rate control factor for each coding block.
[0011] According to another embodiment of the present invention, there is provided a computing device for image super-resolution reconstruction, comprising: a processor; a memory, wherein the memory stores instructions, and the instructions, when executed by the processor, can execute the method described above.
[0012] These and other features and advantages will become apparent by reading the following detailed description and by reference to the associated drawings.It is to be understood that the foregoing general description and the following detailed description are illustrative only and are not restrictive of the aspects of what is claimed. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to understand the manner in which the above features of the present invention are used in detail, the above briefly summarized contents can be described in more detail with reference to various embodiments, some of which are shown in the accompanying drawings. However, it should be noted that the accompanying drawings only show some typical aspects of the present invention and should not be considered to limit its scope, because the description may allow for other equally effective aspects.
[0014] Figure 1 A block diagram of a video encoding system 100 based on background modeling technology according to an embodiment of the present invention is shown;
[0015] Figure 2 A flowchart of a video encoding method 200 based on background modeling technology according to an embodiment of the present invention is shown;
[0016] Figure 3 A block diagram of a computing device 300 is shown that illustrates a hardware device applicable to various aspects of the present invention according to an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The present invention will be described in detail below in conjunction with the accompanying drawings, and the features of the present invention will be further revealed in the following specific description.
[0018] The purpose of the present invention is to combine background modeling technology to obtain a higher compression rate than mainstream coding (such as H.264, H.265, etc.), and to improve the subjective visual quality of the picture. In the present invention, background modeling is performed on the video picture, and continuous differential coding is performed according to the probability of each pixel being judged as the background, so that the part with a high probability of being the background tends to obtain fewer bits of coding in the bit rate control, thereby improving the compression rate. Since the probability function is continuous, the coding strategy can be continuously adjusted accordingly, thereby eliminating the visual difference in picture quality and improving user perception on the basis of ensuring compression performance.
[0019] Figure 1 FIG. 1 is a block diagram of a video encoding system 100 based on background modeling technology according to an embodiment of the present invention. Figure 1 As shown in FIG. 1 , the system 100 is divided into modules, and each module communicates and exchanges data in a manner known in the art. In the present invention, each module can be implemented by software or hardware or a combination thereof. The system 100 may include a background modeling module 101 and a dynamic encoding module 102.
[0020] In general, reference Figure 1 The background modeling module 101 is configured to obtain the probability that a pixel belongs to the background by background subtraction / foreground extraction based on the background modeling method. According to an embodiment of the present invention, the background subtraction / foreground extraction based on the background modeling method mainly includes: modeling the background environment of the video screen, extracting the screen foreground by background subtraction, and calculating the probability value of each pixel being identified as the background in the model.
[0021] The dynamic encoding module 102 is configured for differential encoding based on dynamic rate control. According to an embodiment of the present invention, the differential encoding based on dynamic rate control mainly includes: based on the probability of the pixel points output by the background modeling module 101 being identified as the background, a dynamic rate control strategy is adopted for the pixel points, so that the pixel points with a high probability of being the background tend to obtain fewer bits of encoding in the rate control, thereby ensuring the visual quality while improving the video compression rate.
[0022] The present invention is particularly suitable for application scenarios with static backgrounds, such as application scenarios using monitoring devices such as home cameras, conference video equipment, road cameras, etc. Such monitoring equipment can take photos and videos of the scene, store the acquired image data locally for processing (e.g., encoding), and send the processed data to a remote device (e.g., a smart home control platform, a central control platform, other computing devices, etc.) for subsequent processing (e.g., playback, editing, etc.) when necessary. According to one embodiment of the present invention, the background modeling module 101 and the dynamic encoding module 102 can be implemented in the above-mentioned monitoring device or such Figure 3Other computing devices 300 are described.
[0023] Figure 2 FIG. 2 is a flow chart of a video encoding method 200 based on background modeling technology according to an embodiment of the present invention. The method 200 mainly includes two stages, a background modeling stage 201 and a dynamic encoding stage 202. According to an embodiment of the present invention, the background modeling stage 201 can be Figure 1 The background modeling module 101 shown in FIG. 1 is implemented, and the dynamic encoding stage 202 can be implemented by Figure 1 The dynamic encoding module 102 shown in FIG.
[0024] In the present invention, different rate control factors λ are used for subsequent conventional encoding (such as H.264, H.265, etc.) for pixels determined as background and pixels determined as foreground in the image frame, so that pixels with a high probability of being background tend to obtain fewer bits of encoding in the rate control, thereby improving the overall compression rate of the image frame and reducing the storage pressure of the device and the transmission pressure of the communication trunk line. Figure 2 for further detailed description.
[0025] The background modeling stage 201 adopts a method of obtaining the probability of a pixel belonging to the background using a background modeling method. This stage 201 uses the background modeling method, and after identifying the foreground, uses the relevant parameters of the background model to obtain the parameters that can represent the probability of the pixel belonging to the background, so that the adjustment function of the bit rate control factor is continuous when conventional encoding (such as H.264, H.265, etc.) is used later. As known to those skilled in the art, conventional encoding often uses a rate-distortion optimization strategy to weigh the bit rate and image quality, that is, the cost function J=D+λ·R is obtained by using the Lagrangian method, where D represents image distortion, R represents bit rate, and the Lagrangian factor λ is also called the bit rate control factor, which is used to control the ratio between distortion and bit rate. The larger the λ, the greater the ratio of bit rate, and the more inclined to sacrifice more video quality to obtain a smaller bit rate during encoding.
[0026] First, the background modeling stage 201 starts at step 201-1. In step 201-1, a foreground extraction algorithm is used to establish a background model, which is used to characterize the characteristics of each pixel in the image frame. Based on the general assumption that a background image without an intrusive target can be described by a statistical model, background modeling is performed on each pixel in the image. The modeling method can refer to but is not limited to the current mainstream foreground extraction algorithms, such as GMM, ViBe, SACON, PBAS and other algorithms. Of course, other types of foreground extraction algorithms are also within the scope of the present invention.
[0027] According to an embodiment of the present invention, a Gaussian mixture model (GMM) is used as an example to illustrate step 201-1. As shown in equation (1), K mixed Gaussian distribution models with weights w are used to characterize the features of each pixel in the image frame:
[0028]
[0029] Where X is the historical value of any pixel, ω, μ, Σ are the weight, mean and covariance of each Gaussian distribution respectively.
[0030] In step 201-2, the background model established in step 201-1 is initialized. Theoretically, if there is an image with only background but no foreground, the foreground object can be obtained by subtracting the background from the new image. However, in many cases, there is no such background image, so according to different algorithms, the first frame or the first N frames of images are usually used to initialize the selected / established background model.
[0031] According to one embodiment of the present invention, continuing the above example of using the GMM model, in step 201-2, the background model is initialized using the first frame image, each Gaussian distribution uses the pixel value of the first frame as the expectation, the weights are all 1 / K, and the standard deviations are all large. Those skilled in the art can understand that the standard deviation represents the degree of dispersion of the data. When initialized, there is only one value and the degree of dispersion cannot be calculated, so it is assumed to be large first, and it is updated accordingly when there is new data in the next frame.
[0032] In step 201-3, the background model is updated based on the acquired new image frame. According to one embodiment of the present invention, when a new image frame is acquired, the model parameters are updated according to the update strategy of each model algorithm and the pixel value in the new image frame. It can be understood by those skilled in the art that the parameters used in different models are different (such as the threshold used in the matching condition, etc.), and there is no specific restriction on which parameters are updated.
[0033] According to an embodiment of the present invention, continuing the above example of using the GMM model, in step 201-3, when a new image frame is acquired, the model parameters are updated according to the following update strategy:
[0034] ω i,t =(1-α)ω i,t-1 +αM i,t (2)
[0035] μ i,t =(1-ρ)μ i,t-1 +ρX t (3)
[0036]
[0037] in,
[0038]
[0039] ρ=αη(X t |μ i,t ,σ i,t ) (6)
[0040] And α is the learning rate.
[0041] In step 201-4, foreground / background estimation is performed for each pixel in the new image frame obtained in step 201-3. According to one embodiment of the present invention, the current pixel value of each pixel in the new image frame is matched with its corresponding background model (e.g., each pixel's own GMM background model), and the pixel that fails to match is classified as the foreground; for the pixel that successfully matches, the probability (p) of the pixel belonging to the background is calculated based on the updated algorithm model parameters in step 201-3. According to one embodiment of the present invention, a matching threshold can be used in the above matching.
[0042] According to one embodiment of the present invention, the above example of using the GMM model is continued. In step 201-4, K Gaussian distributions are divided into Sort and take the first B Gaussian distributions as the current background model:
[0043]
[0044] Where T is the minimum proportion of the background in the picture. Equation (7) is to obtain the parameter B. As mentioned above, after the GMM model is updated in step 201-3, the model composed of the first B Gaussian distributions is taken as the current background model. The current pixel value of each pixel is matched with the current background model. If the match fails, the pixel is judged as the foreground; otherwise, the B a values are normalized to obtain a', and the parameter p that can represent the probability of the pixel belonging to the background is calculated:
[0045] p=a'(X t -μ) (8)
[0046] After calculating the probability that the pixel is identified as the background, the dynamic coding stage 202 is entered. The dynamic coding stage 202 adopts a method of adjusting the coding strategy using the probability that the pixel belongs to the background. According to one embodiment of the present invention, the dynamic coding stage 202 is performed on a coding block by coding block basis. Repeat the following steps 202-1 to 202-2 for each coding block in the current image frame until all coding blocks are encoded. It is fully understood by those skilled in the art that the division of the coding blocks of the image frame and the order in which the coding blocks are encoded can be configured based on the specific coding method adopted (such as H.264, H.265, etc.), and its specific division method and / or coding order are not within the scope of protection of the present invention.
[0047] This stage 202 explores the mapping relationship between the trade-off value between attenuation and bit rate in the rate-distortion optimization strategy and the probability that a pixel point is a background point based on the background picture quality acceptable to the user, so as to obtain an adjustment strategy that is more in line with the human eye attention mechanism.
[0048] In step 202-1, the dynamic rate control factor of the current coding block is adjusted based on the probability that the pixel points in the current coding block are determined to be the background. According to one embodiment of the present invention, if all the pixels in the current coding block are background points, the average value p_avg of the p values of all the pixels in the coding block is taken, and the rate control factor λ=f(p_avg) in the rate-distortion optimization strategy is obtained by exploring the mapping relationship between the probability that the pixel points belong to the background and the background picture quality acceptable to the user, where f(·) represents the corresponding relationship between the trade-off between attenuation and bit rate in the rate-distortion optimization strategy and the probability that the pixel points belong to the background, and the corresponding relationship is a continuous function rather than a discrete piecewise function in the prior art. For example, in a conventional x264 encoder, λ has a corresponding relationship with a quantization parameter QP value, and the QP value is one of the inputs of the encoder and is an integer, and λ is obtained by looking up the QP value table. Therefore, the corresponding relationship between λ and the QP value in conventional encoding is not a continuous function. In addition, in the present invention, based on the trade-off between attenuation and bit rate in the rate-distortion optimization strategy and the corresponding relationship between the probability that the pixel belongs to the background, the greater the probability that the pixel belongs to the background, the larger λ is, and the more inclined to sacrifice more video quality to obtain a smaller bit rate during encoding.
[0049] In step 202-2, the current coding block is differentially coded using a dynamic bit rate control factor. According to one embodiment of the present invention, if the pixels in the current coding block contain or are all foreground, the coding is performed normally according to the original conventional coding method (such as H.264, H.265, etc.); if the pixels in the current coding block are all background points, the coding is performed according to the λ obtained in step 202-1. Since pixels with large p values can be encoded using larger λ, the background part of the video screen will be further compressed.
[0050] In step 202 - 3 , it is determined whether there are coding blocks that need to be encoded in the current image frame. If yes, the process returns to step 202 - 1 ; if no, the process proceeds to step 203 .
[0051] In step 203, it is determined whether there is a new image frame. If so, the process returns to step 201-3 to continue acquiring the next new image frame. If not, the process ends. According to one embodiment of the present invention, it can be set to acquire image frames within a predetermined time period for encoding. According to another embodiment of the present invention, if the background changes significantly (such as the difference between the background of the new image frame and the background of the previous image frame reaches a certain threshold), the process ends.
[0052] Compared with the prior art, the present invention has the following advantages:
[0053] (1) Improve video compression rate. Under the premise of ensuring the quality of the foreground image, by further compressing the images in the video that are more likely to belong to the background, more bit rate can be saved, thereby improving the video compression rate.
[0054] (2) Compression efficiency can be adjusted dynamically. Compression efficiency can be adjusted dynamically by modifying the parameters in the formula for calculating the bit rate control factor in accordance with the requirements of specific scenarios.
[0055] (3) Improve the subjective visual quality of the picture. Based on the human eye attention mechanism, a more reasonable encoding strategy is adopted to encode and compress the part of the picture identified as the background according to the probability that it is indeed a background point, so that the adjustment formula of the bit rate control factor is a continuous function rather than a discrete piecewise function, avoiding the visual stratification of the foreground and background areas.
[0056] (4) High practicality and ease of implementation in static backgrounds. For scenes where the background is mostly static or changes little, such as home cameras, conference recordings, road cameras, etc., it has outstanding compression performance improvements and visual effects enhancements.
[0057] Figure 3 A block diagram 300 of an exemplary computing device according to one embodiment of the present invention is shown, which is one example of a hardware device applicable to aspects of the present invention.
[0058] refer to Figure 3, a computing device 300 will now be described, which is an example of a hardware device applicable to various aspects of the present invention. The computing device 300 can be any machine that can be configured to perform processing and / or computing, and can be but is not limited to a workstation, a server, a desktop computer, a laptop computer, a tablet computer, a personal digital assistant, a smart phone, a car computer, a home camera, a conference recording device, a road camera, or any combination thereof. The various methods / apparatus / server / client devices described above can be implemented in whole or in part by the computing device 300 or a similar device or system.
[0059] The computing device 300 may include components that may be connected or communicated via one or more interfaces and a bus 302. For example, the computing device 300 may include a bus 302, one or more processors 304, one or more input devices 306, and one or more output devices 308. The one or more processors 304 may be any type of processor and may include, but are not limited to, one or more general-purpose processors and / or one or more special-purpose processors (e.g., a dedicated processing chip). The input device 306 may be any type of device capable of inputting information to the computing device and may include, but are not limited to, a mouse, a keyboard, a touch screen, a microphone, and / or a remote controller. The output device 308 may be any type of device capable of presenting information and may include, but are not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The computing device 300 may also include or be connected to a non-transient storage device 310, which may be any storage device that is non-transient and capable of data storage, and may include, but is not limited to, a disk drive, an optical storage device, a solid-state memory, a floppy disk, a floppy disk, a hard disk, a tape or any other magnetic medium, an optical disk or any other optical medium, a ROM (read-only memory), a RAM (random access memory), a cache memory, and / or any memory chip or cassette, and / or any other medium from which a computer can read data, instructions, and / or code. The non-transient storage device 310 may be detachable from the interface. The non-transient storage device 310 may have data / instructions / code for implementing the above methods and steps. The computing device 300 may also include a communication device 312. The communication device 312 can be any type of device or system that can communicate with internal devices and / or with a network and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication device and / or a chipset, such as a Bluetooth device, an IEEE 1302.11 device, a WiFi device, a WiMax device, a cellular communication device and / or the like.
[0060] The bus 302 may include, but is not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0061] The computing device 300 may also include a working memory 314 , which may be any type of working memory capable of storing instructions and / or data that facilitate the operation of the processor 304 and may include, but is not limited to, a random access memory and / or a read-only storage device.
[0062] Software components may be located in the working memory 314, including but not limited to an operating system 316, one or more application programs 318, drivers and / or other data and codes. Instructions for implementing the above methods and steps of the present invention may be included in the one or more application programs 318, and the instructions of the one or more application programs 318 may be read and executed by the processor 304 to implement the above method 200 of the present invention.
[0063] It should also be recognized that changes may be made according to specific needs. For example, custom hardware may also be used, and / or specific components may be implemented in hardware, software, firmware, middleware, microcode, hardware description language, or any combination thereof. In addition, connections to other computing devices, such as network input / output devices, etc. may be employed. For example, programming hardware (e.g., programmable logic circuits including field programmable gate arrays (FPGAs) and / or programmable logic arrays (PLAs)) with assembly language or hardware programming languages (e.g., VERILOG, VHDL, C++) may be used to implement part or all of the disclosed methods and devices using logic and algorithms according to the present invention.
[0064] Although various aspects of the present invention have been described so far with reference to the accompanying drawings, the above-described methods, systems and devices are merely examples, and the scope of the present invention is not limited to these aspects, but is limited only by the appended claims and their equivalents. Various components may be omitted or replaced by equivalent components. In addition, the steps may be implemented in an order different from the order described in the present invention. In addition, various components may be combined in various ways. It is also important that, as technology develops, many of the components described may be replaced by equivalent components that appear later.
Claims
1. A method for improving the compression rate of static background video based on background modeling technology, comprising: A foreground extraction algorithm is used to establish a background model, wherein the background model is used to characterize the features of each pixel in the image frame; Initialize the established background model; Based on the acquired new image frame, updating the background model; Performing foreground or background estimation on each pixel in the new image frame; According to the probability that a pixel point in each coding block in the new image frame is determined as the background, adjusting the dynamic rate control factor for each coding block; as well as Differentiately encode each coding block based on a dynamic rate control factor for each coding block; Among them, the dynamic bit rate control factor is proportional to the probability that the pixel point in the coding block is determined as the background. The dynamic bit rate control factor is used to control the ratio between distortion and bit rate. The larger the dynamic bit rate control factor, the greater the ratio of bit rate.
2. The method according to claim 1, characterized in that The foreground extraction algorithm includes one of GMM, ViBe, SACON or PBAS.
3. The method according to claim 1, characterized in that Initializing the established background model further includes: The background model is initialized using the first frame image or the first N frames of images.
4. The method according to claim 1, characterized in that Estimating the foreground or background of each pixel in the new image frame further includes: Matching the current pixel value of each pixel in the new image frame with the corresponding updated background model; If the match fails, the pixel is determined to be the foreground; If the match is successful, the probability p that the pixel belongs to the background is calculated based on the updated background model.
5. The method according to claim 4, characterized in that According to the probability that a pixel point in each coding block in the new image frame is determined as a background, adjusting the dynamic bit rate control factor for each coding block further includes: If all pixels in the current coding block are determined to be background, the average value p_avg of the p values of all pixels in the current coding block is taken to obtain the rate control factor λ=f(p_avg) in the rate-distortion optimization strategy.
6. The method according to claim 5, characterized in that Based on the dynamic rate control factor for each coding block, differentially encoding each coding block further includes: If all pixels in the current coding block are determined to be background, the coding is performed using the rate control factor λ.
7. A system for improving the compression rate of static background video based on background modeling technology, comprising: A background modeling module, wherein the background modeling module is configured to: A foreground extraction algorithm is used to establish a background model, wherein the background model is used to characterize the features of each pixel in the image frame; Initialize the established background model; Based on the acquired new image frame, updating the background model; Performing foreground or background estimation on each pixel in the new image frame; as well as A dynamic encoding module, wherein the dynamic encoding module is configured to: According to the probability that a pixel point in each coding block in the new image frame is determined as the background, adjusting the dynamic rate control factor for each coding block; and Differentiately encode each coding block based on a dynamic rate control factor for each coding block; Among them, the dynamic bit rate control factor is proportional to the probability that the pixel point in the coding block is determined as the background. The dynamic bit rate control factor is used to control the ratio between distortion and bit rate. The larger the dynamic bit rate control factor, the greater the ratio of bit rate.
8. The system according to claim 7, characterized in that Estimating the foreground or background of each pixel in the new image frame further includes: Matching the current pixel value of each pixel in the new image frame with the corresponding updated background model; If the match fails, the pixel is determined to be the foreground; If the match is successful, the probability p that the pixel belongs to the background is calculated based on the updated background model.
9. The system according to claim 8, characterized in that Wherein, according to the probability that a pixel point in each coding block in the new image frame is determined as the background, adjusting the dynamic rate control factor for each coding block further includes: if all the pixels in the current coding block are determined as the background, taking the average value p_avg of the p values of all the pixels in the current coding block, and obtaining the rate control factor λ=f(p_avg) in the rate-distortion optimization strategy; Based on the dynamic rate control factor for each coding block, differentially encoding each coding block further includes: if all pixels in the current coding block are determined to be background, encoding is performed using the rate control factor λ.
10. A computing device for image super-resolution reconstruction, comprising: processor; A memory storing instructions, wherein the instructions, when executed by the processor, can execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Video constant quality coding device for monitoring application and coding method thereof
CN103002289A
Video encoding optimization method and apparatus, and computer storage medium
CN112655212A