Method and apparatus for determining code rate, computer readable storage medium and processor

By performing connected domain detection and motion analysis on the moving and non-moving areas of the image sequence in the intelligent monitoring system, the bit rate value of each area is determined, and the encoding compression rate is improved while maintaining the video quality, thus resolving the contradiction between storage space and video quality.

CN114332455BActive Publication Date: 2025-10-21TP-LINK INT SHENZHEN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111649560.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-10-21
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

In order to reduce storage costs, existing intelligent monitoring systems sacrifice video quality, resulting in poor video quality.

Method used

By acquiring the moving areas and non-moving areas in the image sequence, connected domain detection and motion analysis are performed, and the bit rate value of each area is determined based on the preset relationship, differential encoding of the moving areas and non-moving areas is achieved.

Benefits of technology

It improves the video encoding compression rate, maintains the video quality, and solves the contradiction between storage space and image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332455B_ABST
    Figure CN114332455B_ABST
Patent Text Reader

Abstract

The application discloses a code rate determination method and device, a computer readable storage medium and a processor. The method comprises the following steps: acquiring a motion region and a non-motion region in a to-be-processed image sequence; performing connected domain detection on the motion region and the non-motion region respectively to obtain position information of the motion region; performing motion analysis on the position information to obtain an instantaneous speed of a target object; determining a code rate value of the non-motion region based on a first preset relationship, and determining a code rate value of the motion region based on a second preset relationship and the instantaneous speed. The application solves the technical problem that, in the related art, in order to save storage space of a monitoring video, the quality of the monitoring video has to be sacrificed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent monitoring, and in particular to a bit rate determination method and device, a computer-readable storage medium, and a processor. Background Art

[0002] Currently, intelligent surveillance systems are widely used in shopping malls, banks, hospitals, hotels, residential areas, and other places, enabling real-time intelligent monitoring of video footage. However, storing large amounts of surveillance video requires significant storage costs. To reduce storage costs, existing technologies often sacrifice video quality, resulting in lower video quality, blurry images, and poor monitoring effectiveness.

[0003] With respect to the problem that in the intelligent monitoring process in the above-mentioned related technologies, in order to reduce storage costs, video quality is reduced, resulting in poor video quality, no effective solution has been proposed so far. Summary of the Invention

[0004] The embodiments of the present invention provide a bit rate determination method and apparatus, a computer-readable storage medium, and a processor, to at least solve the technical problem in related technologies that the image quality of surveillance videos has to be sacrificed in order to save storage space of surveillance videos.

[0005] According to one aspect of an embodiment of the present invention, a method for determining a bit rate is provided, comprising: obtaining a moving area and a non-moving area in an image sequence to be processed; performing connected domain detection on the moving area and the non-moving area respectively to obtain position information of the moving area; performing motion analysis on the position information to obtain an instantaneous speed of a target object; determining a bit rate value of the non-moving area based on a first preset relationship, and determining a bit rate value of the moving area based on a second preset relationship and the instantaneous speed.

[0006] Optionally, obtaining the motion area and the non-motion area in the image sequence to be processed includes: performing motion detection on the image sequence to be processed to obtain a motion detection result; and obtaining the motion area and the non-motion area in the image sequence to be processed based on the motion detection result.

[0007] Optionally, before determining the bitrate value of the non-motion area based on the first preset relationship and determining the bitrate value of the motion area based on the second preset relationship and the instantaneous speed, the method further includes: generating the first preset relationship and the second preset relationship.

[0008] Optionally, generating the first preset relationship and the second preset relationship includes: acquiring a historical image sequence; analyzing the historical image sequence to obtain historical non-motion areas and historical motion areas in the historical image sequence; generating a first preset relationship between the gradient value and the bit rate value in the historical non-motion area, and simultaneously generating a second preset relationship between the instantaneous speed, gradient value and bit rate value in the historical motion area.

[0009] Optionally, determining the bit rate value of the non-motion area based on a first preset relationship includes: performing region segmentation on the non-motion area to obtain multiple non-motion sub-areas; obtaining an average gradient value of the gradient images corresponding to the multiple non-motion sub-areas; and determining the bit rate value in the non-motion area based on the average gradient value and the first preset relationship.

[0010] Optionally, there are multiple motion areas, and the bit rate value of the motion area is determined based on the second preset relationship and the instantaneous speed, including: performing region segmentation on each motion area to obtain multiple motion sub-areas of each motion area; obtaining an average gradient value of the multiple motion sub-areas of each motion area; and determining the bit rate value under the motion area based on the instantaneous speed, the average gradient value and the second preset relationship.

[0011] According to another aspect of an embodiment of the present invention, a bit rate determination device is also provided, including: an acquisition module for acquiring a motion area and a non-motion area in an image sequence to be processed; a connected domain detection module for performing connected domain detection on the motion area and the non-motion area respectively to obtain position information of the motion area; a motion analysis module for performing motion analysis on the position information to obtain an instantaneous speed of the target object; and a determination module for determining a bit rate value of the non-motion area based on a first preset relationship, and determining a bit rate value of the motion area based on a second preset relationship and the instantaneous speed.

[0012] Optionally, the acquisition module includes: a motion detection unit, used to perform motion detection on the image sequence to be processed to obtain a motion detection result; and a first acquisition unit, used to obtain the motion area and the non-motion area in the image sequence to be processed based on the motion detection result.

[0013] Optionally, the device further includes: a generation module for generating the first preset relationship and the second preset relationship before determining the bit rate value of the non-motion area based on the first preset relationship and determining the bit rate value of the motion area based on the second preset relationship and the instantaneous speed.

[0014] Optionally, the generation module includes: an acquisition unit for acquiring a historical image sequence; an analysis unit for analyzing the historical image sequence to obtain historical non-motion areas and historical motion areas in the historical image sequence; a generation unit for generating a first preset relationship between the gradient value and the bit rate value in the historical non-motion area, and simultaneously generating a second preset relationship between the instantaneous speed, gradient value and bit rate value in the historical motion area.

[0015] Optionally, the determination module includes: a first segmentation unit, used to perform region segmentation on the non-motion area to obtain multiple non-motion sub-areas; a second acquisition unit, used to obtain the average gradient value of the gradient image corresponding to the multiple non-motion sub-areas; and a first determination unit, used to determine the bit rate value in the non-motion area based on the average gradient value and the first preset relationship.

[0016] Optionally, there are multiple motion areas, and the determination module includes: a second segmentation unit, used to perform region segmentation on each motion area to obtain multiple motion sub-areas of each motion area; a third acquisition unit, used to obtain the average gradient values ​​of the multiple motion sub-areas of each motion area; and a second determination unit, used to determine the bit rate value under the motion area based on the instantaneous speed, the average gradient value and the second preset relationship.

[0017] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed by a processor, the device where the computer-readable storage medium is located is controlled to perform any of the above-mentioned bit rate determination methods.

[0018] According to another aspect of an embodiment of the present invention, a processor is further provided, wherein the processor is configured to run a computer program, wherein the computer program executes any one of the above-mentioned bit rate determination methods when running.

[0019] In an embodiment of the present invention, a moving region and a non-moving region are obtained from a sequence of images to be processed; connected domain detection is performed on each of the moving and non-moving regions to obtain position information of the moving region; motion analysis is performed on the position information to obtain the instantaneous speed of the target object; a bit rate value of the non-moving region is determined based on a first preset relationship, and a bit rate value of the moving region is determined based on a second preset relationship and the instantaneous speed. The bit rate determination method provided by an embodiment of the present invention achieves the purpose of performing connected domain detection on the moving and non-moving regions in a sequence of images to be processed to determine the bit rate value of the moving region, thereby achieving the technical effect of improving the video encoding compression rate, and further solving the technical problem in related technologies of sacrificing the image quality of surveillance videos in order to save storage space for surveillance videos. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0021] Figure 1 is a flow chart of a method for determining a bit rate according to an embodiment of the present invention;

[0022] Figure 2 is a flow chart of a video surveillance intelligent encoding control method according to an embodiment of the present invention;

[0023] Figure 3 is a schematic diagram of a bit rate determination device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] Example 1

[0027] According to an embodiment of the present invention, a method embodiment of a bit rate determination method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0028] Figure 1 is a flow chart of a method for determining a bit rate according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0029] Step S102, obtaining the motion area and the non-motion area in the image sequence to be processed;

[0030] Optionally, in the above steps, a static area (ie, a non-moving area) and a moving area in the image sequence to be processed are acquired.

[0031] Step S104, performing connected domain detection on the motion area and the non-motion area respectively to obtain position information of the motion area;

[0032] Optionally, in the above steps, a connected domain refers to an image region composed of foreground pixels having the same pixel value and adjacent positions in the image. Connected domain detection is also called connected domain analysis, which refers to finding and marking each connected domain in the image.

[0033] Step S106, performing motion analysis on the position information to obtain the instantaneous speed of the target object;

[0034] Optionally, in the above steps, the position information refers to the position information of the motion area, and the position information is subjected to motion analysis to obtain the speed (ie, instantaneous speed) of the target object when it passes a certain moment or a certain position.

[0035] Step S108 : determining a bit rate value of the non-motion region based on the first preset relationship, and determining a bit rate value of the motion region based on the second preset relationship and the instantaneous speed.

[0036] As can be seen from the above, in the embodiment of the present invention, the moving area and the non-moving area in the image sequence to be processed can be first obtained; then, the moving area and the non-moving area can be respectively detected for connected domains to obtain the position information of the moving area; then, the position information can be subjected to motion analysis to obtain the instantaneous speed of the target object; finally, the bit rate value of the non-moving area can be determined based on the first preset relationship, and the bit rate value of the moving area can be determined based on the second preset relationship and the instantaneous speed. The bit rate determination method provided by the embodiment of the present invention achieves the purpose of performing connected domain detection on the moving area and the non-moving area in the image sequence to be processed to determine the bit rate value of the moving area, thereby achieving the technical effect of improving the video encoding compression rate, and further solving the technical problem in the related art of sacrificing the image quality of the surveillance video in order to save the storage space of the surveillance video.

[0037] As an optional embodiment, obtaining the motion area and non-motion area in the image sequence to be processed includes: performing motion detection on the image sequence to be processed to obtain a motion detection result; and obtaining the motion area and non-motion area in the image sequence to be processed based on the motion detection result.

[0038] In the above optional embodiment, firstly, motion detection may be performed on the image sequence to be processed and a result may be obtained, and then based on the result, the motion area and the static area in the image to be processed may be obtained.

[0039] As an optional embodiment, before determining the bit rate value of the non-motion area based on the first preset relationship and determining the bit rate value of the motion area based on the second preset relationship and the instantaneous speed, the bit rate determination method further includes: generating the first preset relationship and the second preset relationship.

[0040] In the above optional embodiment, the first preset relationship is to calculate the bit rate value in the corresponding area based on the gradient average value of the sub-block and the preset corresponding relationship; the second predetermined relationship is to calculate the bit rate value matching the corresponding area based on the corresponding relationship according to the estimated instantaneous speed and the sub-area gradient value.

[0041] In the above optional embodiment, the bit rate value in the corresponding area is calculated based on the gradient average value of the sub-block and the preset correspondence relationship to represent the first preset relationship; the second predetermined relationship is based on the estimated instantaneous speed and the sub-area gradient value, and then the bit rate value matching the corresponding area is calculated based on the correspondence relationship.

[0042] As an optional embodiment, generating a first preset relationship and a second preset relationship includes: collecting a historical image sequence; analyzing the historical image sequence to obtain historical non-motion areas and historical motion areas in the historical image sequence; generating a first preset relationship between gradient values ​​and bit rate values ​​in the historical non-motion areas, and simultaneously generating a second preset relationship between instantaneous speed, gradient values, and bit rate values ​​in the historical motion areas.

[0043] In the above optional embodiment, a historical image sequence is first collected, and then analyzed to obtain the moving area and the static area in the historical image sequence, and the relationship between the gradient value and the bit rate value in the static area (i.e., the first preset relationship) and the relationship between the instantaneous speed, gradient value and bit rate value in the moving area (i.e., the second preset relationship) are generated respectively.

[0044] As an optional embodiment, determining the bit rate value of the non-motion area based on the first preset relationship includes: performing region segmentation on the non-motion area to obtain multiple non-motion sub-areas; obtaining the average gradient value of the gradient image corresponding to the multiple non-motion sub-areas; and determining the bit rate value in the non-motion area based on the average gradient value and the first preset relationship.

[0045] In the above optional embodiment, the static area is segmented to obtain multiple static sub-areas (i.e., non-motion sub-areas), and the average gradient value of the corresponding gradient image is obtained, and then the bit rate value in the static area is determined based on the average gradient value and the first preset relationship.

[0046] As an optional embodiment, there are multiple motion areas, and the bit rate value of the motion area is determined based on the second preset relationship and the instantaneous speed, including: performing regional segmentation on each motion area to obtain multiple motion sub-areas; obtaining the average gradient value of the multiple sub-motion areas of each motion area; and determining the bit rate value under the motion area based on the instantaneous speed, the average gradient value and the second preset relationship.

[0047] In an embodiment of the present invention, there are multiple motion areas, for example, motion area 1, motion area 2...motion area n, and each of the multiple motion areas is segmented to obtain multiple sub-motion areas corresponding to each motion area. Each sub-motion area is then segmented to obtain n*n sub-motion areas of each sub-motion area, and the average gradient value of each sub-motion area is calculated; and the bit rate value of the sub-motion area corresponding to each motion area is determined according to the instantaneous speed and the second preset relationship.

[0048] Figure 2 FIG. 1 is a flow chart of a video surveillance intelligent encoding control method according to an embodiment of the present invention. Figure 2As shown, the video surveillance intelligent encoding control steps provided by this method embodiment are described in detail below.

[0049] Step 1) Collect a large number of time-series image sequences (i.e., image sequences to be processed), establish a corresponding relationship between gradient and bit rate in static areas, and establish a corresponding relationship between instantaneous speed, gradient value, and bit rate in moving areas;

[0050] Step 2) Capture a time-series image sequence: An electronic device acquires the image sequence to be processed in real time. For example, a webcam, a smartphone, a tablet computer, or other electronic device with the function of capturing video or images is not particularly limited here.

[0051] Step 3) Perform motion detection on the time-series image sequence to obtain motion areas and non-motion areas;

[0052] Step 4) Perform a connected domain check on the motion area and the non-motion area to obtain the ROI coordinates of each motion area, denoted as Fbi (i is 0, 1, 2, ..., n) and the ROI coordinates of the non-motion area, denoted as Obj (j is 0, 1, 2, 3, ..., n);

[0053] Step 5) Estimate the instantaneous speed of the moving target using motion analysis methods;

[0054] Step 6), divide each motion area and static area into n*n sub-blocks;

[0055] Step 7) Count the gradients of the sub-blocks in the motion area and the non-motion area respectively. For the non-motion area, calculate the bit rate value in the corresponding area based on the average gradient value of the sub-block and the preset correspondence relationship. For the motion area, calculate the bit rate value matching the corresponding area based on the estimated instantaneous speed and the sub-area gradient value according to the correspondence relationship.

[0056] Therefore, the bit rate determination method provided by the embodiment of the present invention can adaptively control the bit rate according to the gradient value of the sub-region. For static scenes in flat areas, a lower bit rate is used to obtain high-quality encoding effects. For moving areas with rich textures, the bit rate value is appropriately increased to ensure clear video quality.

[0057] Example 2

[0058] According to another aspect of the embodiment of the present invention, a bit rate determination device is provided. Figure 3 is a schematic diagram of a bit rate determination device according to an embodiment of the present invention. Figure 3 As shown, it includes: an acquisition module 31, a connected domain detection module 33, a motion analysis module 35 and a determination module 37. The bit rate determination device is described below.

[0059] An acquisition module 31 is used to acquire a motion region and a non-motion region in an image sequence to be processed;

[0060] A connected domain detection module 33 is used to perform connected domain detection on the motion area and the non-motion area respectively to obtain position information of the motion area;

[0061] A motion analysis module 35 is used to perform motion analysis on the position information to obtain the instantaneous speed of the target object;

[0062] The determination module 37 is configured to determine the bit rate value of the non-motion area based on the first preset relationship, and determine the bit rate value of the motion area based on the second preset relationship and the instantaneous speed.

[0063] It should be noted that the acquisition module 31, connected domain detection module 33, motion analysis module 35, and determination module 37 correspond to steps S102 to S108 in Example 1. The examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in Example 1. It should be noted that the above modules, as part of the apparatus, can be executed in a computer system, such as a set of computer-executable instructions.

[0064] As can be seen from the above, in the embodiment of the present invention, the acquisition module 31 can first be used to obtain the motion area and non-motion area in the image sequence to be processed; then the connected domain detection module 33 can be used to perform connected domain detection on the motion area and the non-motion area respectively to obtain the position information of the motion area; then the motion analysis module 35 can be used to perform motion analysis on the position information to obtain the instantaneous speed of the target object; finally, the determination module 37 can be used to determine the bit rate value of the non-motion area based on the first preset relationship, and determine the bit rate value of the motion area based on the second preset relationship and the instantaneous speed. The bit rate determination device provided by the embodiment of the present invention achieves the purpose of performing connected domain detection on the motion area and the non-motion area in the image sequence to be processed to determine the bit rate value of the motion area, thereby achieving the technical effect of improving the video encoding compression rate, and further solving the technical problem in the related art that the quality of the surveillance video has to be sacrificed in order to save the storage space of the surveillance video.

[0065] Optionally, the acquisition module includes: a motion detection unit, configured to perform motion detection on the image sequence to be processed to obtain a motion detection result; and a first acquisition unit, configured to obtain a motion region and a non-motion region in the image sequence to be processed based on the motion detection result.

[0066] Optionally, the bit rate determination device further includes: a generation module, configured to generate a first preset relationship and a second preset relationship before determining the bit rate value of the non-motion area based on the first preset relationship and determining the bit rate value of the motion area based on the second preset relationship and the instantaneous speed.

[0067] Optionally, the generation module includes: an acquisition unit for acquiring a historical image sequence; an analysis unit for analyzing the historical image sequence to obtain historical non-motion areas and historical motion areas in the historical image sequence; a generation unit for generating a first preset relationship between the gradient value and the bit rate value in the historical non-motion area, and simultaneously generating a second preset relationship between the instantaneous speed, gradient value and bit rate value in the historical motion area.

[0068] Optionally, the determination module includes: a first segmentation unit, used to perform region segmentation on the non-motion area to obtain multiple non-motion sub-areas; a second acquisition unit, used to obtain the average gradient value of the gradient image corresponding to the multiple non-motion sub-areas; and a first determination unit, used to determine the bit rate value in the non-motion area based on the average gradient value and a first preset relationship.

[0069] Optionally, there are multiple motion areas, and the determination module includes: a second segmentation unit, used to perform regional segmentation on each motion area in the motion area to obtain multiple motion sub-areas of each motion area; a third acquisition unit, used to obtain the average gradient value of the multiple motion sub-areas of each motion area; and a second determination unit, used to determine the bit rate value under the motion area based on the instantaneous speed, the average gradient value and the second preset relationship.

[0070] Example 3

[0071] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed by a processor, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned bit rate determination methods.

[0072] Example 4

[0073] According to another aspect of an embodiment of the present invention, a processor is further provided, which is configured to run a computer program, wherein the computer program executes any of the above-mentioned bit rate determination methods when running.

[0074] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0075] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0076] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0077] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0078] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0079] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.

[0080] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A method for determining a code rate, characterized in that: include: Acquire the motion region and the non-motion region in the image sequence to be processed; Performing connected domain detection on the motion area and the non-motion area respectively to obtain position information of the motion area; Performing motion analysis on the position information to obtain the instantaneous speed of the target object; determining a bit rate value of the non-motion area based on a first preset relationship, and determining a bit rate value of the motion area based on a second preset relationship and the instantaneous speed; There are multiple motion areas, and the bit rate values ​​of the motion areas are determined based on the second preset relationship and the instantaneous speed, including: performing region segmentation on each motion area to obtain multiple motion sub-areas of each motion area; obtaining an average gradient value of the multiple motion sub-areas of each motion area; and determining the bit rate value under the motion area based on the instantaneous speed, the average gradient value, and the second preset relationship.

2. The method according to claim 1, characterized in that Obtain the motion area and non-motion area in the image sequence to be processed, including: Performing motion detection on the image sequence to be processed to obtain a motion detection result; The motion region and the non-motion region in the to-be-processed image sequence are obtained based on the motion detection result.

3. The method according to claim 1, characterized in that Before determining the bitrate value of the non-motion region based on the first preset relationship and determining the bitrate value of the motion region based on the second preset relationship and the instantaneous speed, the method further includes: generating the first preset relationship and the second preset relationship.

4. The method according to claim 3, characterized in that Generating the first preset relationship and the second preset relationship includes: Collect historical image sequences; Analyzing the historical image sequence to obtain historical non-motion areas and historical motion areas in the historical image sequence; A first preset relationship between the gradient value and the bit rate value in the historical non-motion region is generated, and a second preset relationship between the instantaneous speed, the gradient value and the bit rate value in the historical motion region is generated.

5. The method according to any one of claims 1 to 4, characterized in that Determining the bit rate value of the non-motion area based on the first preset relationship includes: performing region segmentation on the non-motion region to obtain a plurality of non-motion sub-regions; Obtaining an average gradient value of the gradient images corresponding to the plurality of non-motion sub-regions; A bit rate value in the non-motion area is determined based on the average gradient value and the first preset relationship.

6. A bit rate determination device, characterized in that: include: An acquisition module, used for acquiring a motion region and a non-motion region in an image sequence to be processed; a connected domain detection module, configured to perform connected domain detection on the motion area and the non-motion area respectively, to obtain position information of the motion area; A motion analysis module, configured to perform motion analysis on the position information to obtain the instantaneous speed of the target object; a determining module, configured to determine a bit rate value of the non-motion area based on a first preset relationship, and determine a bit rate value of the motion area based on a second preset relationship and the instantaneous speed; Among them, there are multiple motion areas, and the determination module includes: a second segmentation unit, used to perform region segmentation on each motion area in the motion area to obtain multiple motion sub-areas of each motion area; a third acquisition unit, used to obtain the average gradient values ​​of the multiple motion sub-areas of each motion area; and a second determination unit, used to determine the bit rate value under the motion area based on the instantaneous speed, the average gradient value and the second preset relationship.

7. The device according to claim 6, characterized in that The acquisition module includes: A motion detection unit, configured to perform motion detection on the image sequence to be processed to obtain a motion detection result; A first acquisition unit is configured to obtain the motion region and the non-motion region in the to-be-processed image sequence based on the motion detection result.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed by a processor, the device where the computer-readable storage medium is located is controlled to execute the bit rate determination method according to any one of claims 1 to 5.

9. A processor, characterized in that: The processor is configured to run a computer program, wherein the computer program executes the bit rate determination method according to any one of claims 1 to 5 when running.

Citation Information

Patent Citations

  • Video coding method, video decoding method, video coding device, and video decoding device

    CN106454348A

  • Dynamic control method and device for video quality, storage medium and electronic equipment

    CN113438468A