Coding method and device and electronic equipment

By identifying the target object in the video frame and adjusting the encoding parameters according to its movement data, the problem of difficulty in adaptively identifying and tracking the target object in the existing technology is solved, and high-quality video encoding under limited encoding resources is achieved, which is suitable for multiple applications. HD video scenes.

CN118764630APending Publication Date: 2024-10-11LENOVO (BEIJING) LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410704449.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing ROI encoding technology is difficult to adaptively identify and track changes in video content or movement of target objects, resulting in insufficient encoding quality to meet the needs of high-quality video experience.

Method used

By determining the target object in the video frame, adjusting the encoding parameters based on its movement data, giving priority to improving the image quality of the area where the target object is located, and dynamically adjusting the bit rate allocation to ensure that the image quality of the target object area is higher than that of other areas.

Benefits of technology

While the total bit rate remains unchanged, the bit rate allocation in the target area is improved, and the display quality of the user's target is improved. It is suitable for high-definition video scenarios such as video conferencing, live broadcast, and surveillance video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764630A_ABST
    Figure CN118764630A_ABST
Patent Text Reader

Abstract

The invention provides a coding method. The method comprises the following steps: determining a target object in a current video frame; and based on the movement data of the target object, coding parameter adjustment is carried out on the region where the target object is located, and a coded target video frame is obtained. Wherein in the target video frame, the image quality of the region where the target object is located is higher than that of other regions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of video encoding technology, and in particular to an encoding method, device and electronic device. Background Art

[0002] With the rapid development of video technology and the strengthening of the high-definition trend, traditional video encoding methods are difficult to meet users' needs for high-quality video experience under bit rate restrictions. ROI (Region of Interest) encoding technology came into being. It focuses on improving the encoding quality of specific areas in the video by intelligently adjusting the bit rate allocation, thereby optimizing the overall viewing experience.

[0003] However, current ROI encoding technology mainly relies on manually set rules or simple machine learning algorithms. When the video content changes or objects in the ROI area move, the system often cannot adaptively and accurately identify and track new regions of interest. Summary of the invention

[0004] One aspect of the present disclosure provides a coding method, comprising: determining a target object in a current video frame. Based on the movement data of the target object, adjusting the coding parameters of the region where the target object is located to obtain a coded target video frame. In the target video frame, the image quality of the region where the target object is located is higher than that of other regions.

[0005] Optionally, the coding parameters of the area where the target object is located are adjusted to obtain the encoded target video frame, including at least one of the following: when the target object is unique, the coding parameters of the area where the target object is located are adjusted based on the coding parameters corresponding to the unique target object to obtain the encoded target video frame. When the target object is not unique, the coding parameters of the areas where each target object is located are adjusted based on the coding parameters corresponding to the priorities of each target object to obtain the target video frame, wherein different priorities correspond to different coding parameters, and the image quality of the areas where target objects with different priorities are located in the target video frame is different.

[0006] Optionally, based on the movement data of the target object, the encoding parameters of the area where the target object is located are adjusted to obtain an encoded target video frame, including: after determining that the target object moves from a first area to a second area based on the movement data of the target object, adjusting the encoding parameters of the second area to obtain the target video frame.

[0007] Optionally, the encoding method further includes at least one of the following: after the target object moves from the first area to the second area, adjusting the encoding parameters of the first area, wherein the image quality of the second area in the target video frame is better than the image quality of the first area. When the movement data indicates that the moving distance of the target object from the first area to the second area is greater than the first distance, adjusting the encoding parameters of the second area to obtain the target video frame. After the target object moves from the first area to the second area, adjusting the encoding parameters of the third area, wherein the third area is a partial area of ​​the first area that does not contain the target object.

[0008] Optionally, based on the movement data of the target object, adjusting the encoding parameters of the area where the target object is located to obtain the encoded target video frame includes: when it is determined based on the movement data that the target object has a first relative position relationship with the first object after moving the second distance, taking the area where the first object and the target object are located as the area to be adjusted. Adjusting the encoding parameters of the area to be adjusted to obtain the target video frame.

[0009] Optionally, based on the movement data of the target object, adjusting the encoding parameters of the area where the target object is located includes: determining the movement data of the target object based on the current video frame and at least one first video frame, the first video frame being an image frame earlier than the current video frame. Based on the movement data and the spatial environment data where the target object is located, adjusting the encoding parameters of the contour area of ​​the target object, the contour area being determined based on the spatial environment data.

[0010] Optionally, the encoding method further includes: updating the target video frame in response to an adjustment instruction for the target object sent by an output terminal device, wherein the output terminal device is a device that receives and displays the target video frame through a network or a data cable, and the adjustment instruction at least includes an instruction to adjust the region where the target object is located and / or the encoding parameters of the target object.

[0011] Optionally, the encoding method further includes: monitoring object change information and / or environment change information within the viewing range, and updating encoding parameters of the target object based on the object change information and / or environment change information to obtain a target video frame.

[0012] Another aspect of the present disclosure provides an encoding device, including: a determination module, configured to determine a target object in a current video frame; an adjustment module, configured to adjust encoding parameters of an area where the target object is located based on movement data of the target object, to obtain an encoded target video frame. In the target video frame, the image quality of the area where the target object is located is higher than that of other areas.

[0013] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute any one of the above-mentioned encoding methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0015] Figure 1 The application scenario diagram of the encoding method according to the embodiment of the present disclosure is schematically shown;

[0016] Figure 2 The flowchart of the encoding method according to the embodiment of the present disclosure is schematically shown;

[0017] Figure 3 A flowchart of a method for adjusting encoding parameters according to an embodiment of the present disclosure is schematically shown;

[0018] Figure 4 A flowchart of a method for adjusting encoding parameters according to another embodiment of the present disclosure is schematically shown;

[0019] Figure 5 A flowchart of an encoding method according to another embodiment of the present disclosure is schematically shown;

[0020] Figure 6 A flowchart of a method for adjusting encoding parameters according to another embodiment of the present disclosure is schematically shown;

[0021] Figure 7 A flowchart of a method for adjusting encoding parameters according to another embodiment of the present disclosure is schematically shown;

[0022] Figure 8 A flowchart of an encoding method according to another embodiment of the present disclosure is schematically shown;

[0023] Fig. 9 A flowchart of an encoding method according to another embodiment of the present disclosure is schematically shown;

[0024] Fig.10 The structure block diagram of the encoding device according to the embodiment of the present disclosure is schematically shown;

[0025] Fig.11 A block diagram of an electronic device suitable for implementing the encoding method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0026] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0027] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0028] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0029] Some block diagrams and / or flow charts are shown in the accompanying drawings. It should be understood that some blocks or combinations thereof in the block diagrams and / or flow charts may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that these instructions, when executed by the processor, may create a device for implementing the functions / operations described in these block diagrams and / or flow charts.

[0030] Therefore, the technology of the present disclosure can be implemented in the form of hardware and / or software (including firmware, microcode, etc.). In addition, the technology of the present disclosure can take the form of a computer program product on a computer-readable medium storing instructions, which can be used by an instruction execution system or in combination with an instruction execution system. In the context of the present disclosure, a computer-readable medium can be any medium that can contain, store, transmit, propagate, or transmit instructions. For example, a computer-readable medium can include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, device, or propagation medium. Specific examples of computer-readable media include: magnetic storage devices, such as magnetic tape or hard disk (HDD); optical storage devices, such as compact disk (CD-ROM); memory, such as random access memory (RAM) or flash memory; and / or wired / wireless communication links.

[0031] The embodiments of the present disclosure provide a coding method for improving the video coding effect. The method includes: determining a target object in a current video frame. Based on the movement data of the target object, adjusting the coding parameters of the area where the target object is located to obtain an encoded target video frame. Among them, in the target video frame, the image quality of the area where the target object is located is higher than that of other areas. By identifying the dynamic target in the video frame, the target area where the target is located can be dynamically determined, and the bit rate of the target area can be enhanced in real time, so that when the total bit rate remains unchanged, the bit rate of the target area is allocated preferentially, thereby improving the display quality of the target that the user is concerned about.

[0032] Figure 1 The application scenario diagram of the encoding method according to the embodiment of the present disclosure is schematically shown.

[0033] like Figure 1 As shown, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0034] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as security applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0035] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0036] Any one or more of the terminal devices 101, 102, and 103 can be used as an output terminal device or a collection terminal device. The collection terminal device is used to collect video frames containing the target object. The output terminal device is used to send adjustment instructions for the target object to update the target video frame. In addition, the collection terminal device can also be a device for video recording, such as a network camera and a monitor.

[0037] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed or applications logged in by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device to optimize the encoding of the video obtained by the user.

[0038] It should be noted that the encoding method provided in the embodiment of the present disclosure can generally be executed by the server 105 or by the terminal device. Accordingly, the encoding device provided in the embodiment of the present disclosure can generally be arranged in the server 105. The encoding method provided in the embodiment of the present disclosure can also be executed by a server or a server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the encoding device provided in the embodiment of the present disclosure can also be arranged in a server or a server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0039] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0040] The following will be based on Figure 1 The scene described by Figure 2~Figure 9 The encoding method of the disclosed embodiment is described in detail.

[0041] Figure 2 The flowchart of the encoding method according to the embodiment of the present disclosure is schematically shown.

[0042] According to the embodiments of the present disclosure, Figure 2 As shown, the encoding method of this embodiment includes, for example, operations S210 to S220.

[0043] In operation S210, a target object within a current video frame is determined.

[0044] In operation S220, based on the movement data of the target object, the encoding parameters of the area where the target object is located are adjusted to obtain an encoded target video frame, wherein in the target video frame, the image quality of the area where the target object is located is higher than that of other areas.

[0045] In some embodiments, first, a pre-trained convolutional neural network (CNN) model, such as YOLO (You Only Look Once) or SSD (Single Shot MultiBox Detector), is used to perform target detection on the current video frame. Suppose a moving car is detected as the target object in the video frame. Or a person who is speaking is detected as the target object in a meeting scene.

[0046] In some cases, manual annotation may be required to determine the target object. For example, in a specific sports game video, athletes in motion can be manually selected as target objects.

[0047] In some complex scenarios, neural networks and manual annotation can also be combined to determine the target object. First, the neural network performs preliminary detection, and then the human confirms and adjusts it.

[0048] If the video frame contains descriptive information (such as subtitles, tags, etc.), this information can also be used to identify the target object. For example, in a news video or a conference video, the subtitle "main speaker" can be used to identify the person who is speaking.

[0049] Then, by analyzing the position change of the target object in several consecutive frames, the encoding parameters of the target object area in the current video frame are adjusted. Assuming that the quantization parameter (QP) is selected as the adjustment indicator, a lower QP value (such as 22) can be assigned to the area where the target object moves to improve the encoding quality of the area. At the same time, other non-target areas can maintain a higher QP value (such as 28) to save encoding bit rate.

[0050] Specifically, during the video encoding process, a video frame can be divided into multiple macroblocks or coding tree units (CTUs). For the macroblock or CTU containing the target object, a lower QP value is used for encoding. For other macroblocks or CTUs, a higher QP value is used for encoding.

[0051] After the above encoding parameters are adjusted, the entire video frame is encoded to obtain an encoded target video frame. In this frame, the image quality of the area where the target object (such as a car, display item, speaker, etc.) is located will be higher than that of other areas.

[0052] This embodiment demonstrates a video encoding method based on target object motion data. By using neural networks, manual annotation, description information recognition, etc. to determine the target object in the video frame, and adjusting the encoding parameters of the target object area according to its motion data, it is possible to prioritize the image quality of the target object area under limited encoding resources. This method has important application value in scenarios such as video conferencing, live video, surveillance video, sports live broadcast, and news broadcast.

[0053] Figure 3 A flow chart of a method for adjusting encoding parameters according to an embodiment of the present disclosure is schematically shown.

[0054] According to the embodiments of the present disclosure, Figure 3 In addition to the above references Figure 2 In addition to the operations S210-S220 described above, the method of this embodiment further adjusts the encoding parameters of the area where the target object is located through at least one of operations S321-S322 to obtain the encoded target video frame. For the sake of brevity, the description of operations S210-S220 is omitted here, and the subsequent related method embodiments are similar and will not be repeated.

[0055] In operation S321, when the target object is unique, the encoding parameters of the region where the target object is located are adjusted based on the encoding parameters corresponding to the unique target object to obtain an encoded target video frame.

[0056] In operation S322, when the target object is not unique, the coding parameters of the area where each target object is located are adjusted based on the coding parameters corresponding to the priority of each target object to obtain a target video frame, wherein different priorities correspond to different coding parameters, and the image quality of the area where the target objects at different priorities in the target video frame are located is different.

[0057] In some embodiments, before adjusting the encoding parameters, it is necessary to first collect the movement data of the target object in the video frame. Such data may include the position, speed, acceleration, and movement trajectory of the target object. Such data may be extracted from the video stream by a video analysis algorithm (such as a target detection and tracking algorithm).

[0058] Then, the collected motion data is analyzed to determine the uniqueness or quantity of target objects in the current video frame.

[0059] If there is only one target object, its importance, size, moving speed and other characteristics in the video frame are analyzed based on the movement data of the target object.

[0060] Then, based on the characteristics of the target object, such as type, size, importance, color, skin color, ambient brightness, material, etc., select appropriate encoding parameters, such as bit rate, quantization parameter (QP), resolution, etc. For example, for important, fast-moving or large-sized target objects, a higher bit rate and a lower quantization parameter can be selected to ensure its image quality.

[0061] Finally, the determined encoding parameters are applied to the area where the target object is located, and the area is encoded to obtain an encoded target video frame.

[0062] If there are multiple target objects, a priority is assigned to each target object based on its characteristics (e.g., size, movement speed, importance in the video, etc.). For example, a fast-moving or large-sized target object can be set to a high priority, while a stationary or small-sized target object can be set to a low priority. Alternatively, the priority of each target object can be determined based on a pre-specified priority order.

[0063] Different encoding parameters are set for each priority. High-priority target objects use higher bit rates and lower quantization parameters to ensure their image quality. Low-priority target objects use lower bit rates and higher quantization parameters to save encoding resources.

[0064] Finally, according to the priority of each target object and the corresponding encoding parameter, the encoding parameters of the regions where each target object is located are adjusted respectively, and these regions are encoded, and finally the encoded target video frame is obtained.

[0065] The above method steps describe in detail how to adjust the encoding parameters of the area where the target object is located based on the movement data of the target object. When the target object is unique, the appropriate encoding parameters are selected according to the characteristics of the target object. When the target object is not unique, different encoding parameters are set for target objects of different priorities according to the priority and characteristics of each target object. This method can ensure that important or critical target objects maintain high image quality in the encoded video frame, while saving encoding resources and improving encoding efficiency.

[0066] According to the embodiments of the present disclosure, in the case of multiple target objects, the target objects can be grouped according to their categories, and different priorities can be set for the target objects in different groups. Then, the coding parameters of the regions where the target objects are located in the same group are adjusted to obtain the target video frame, or the coding parameters of the regions where the target objects are located selected from different groups are adjusted to obtain the target video frame.

[0067] In some embodiments, for example, in a video conference or live video broadcast, multiple participants (target objects) may appear in the screen at the same time. In order to improve the quality and transmission efficiency of the video, the target objects can be grouped according to their categories (such as host, guest speaker, ordinary participant, etc.), and different priorities can be set for the target objects in different groups. Then, according to the priority and grouping situation, the encoding parameters of the area where the target object is located are adjusted to obtain the target video frame.

[0068] Before a video conference or live video broadcast begins, the system groups participants. For example, the host or speaker can be grouped into a high-priority group, while ordinary participants can be grouped into a low-priority group. The target objects in each group have the same priority.

[0069] For target objects in the same group, the system will adjust the encoding parameters according to the priority of the group. Target objects in high-priority groups, such as hosts or keynote speakers, will get higher video quality and smoother transmission effects. Therefore, the system may reduce the quantization parameter (QP) of the area where these target objects are located, increase the bit rate, and improve the resolution and frame rate. For target objects in low-priority groups, such as ordinary participants, the system may use lower encoding parameter settings to ensure overall video transmission efficiency and stability.

[0070] In addition to adjusting encoding parameters for target objects in the same group, the system can also select target objects from different groups for encoding parameter adjustment as needed. For example, in a video conference, although the host or guest speaker is the main focus, sometimes you also need to pay attention to the speech or actions of a common participant. At this time, the system can temporarily increase the encoding parameter settings of the area where the common participant is located to improve its video quality.

[0071] During a video conference or live video broadcast, the system will dynamically adjust the encoding parameters based on real-time conditions. For example, when a target object's movements become frequent or their expressions change, the system may automatically increase the encoding parameter settings for the target object's area. At the same time, the system will also provide real-time feedback and adjustments based on conditions such as network bandwidth and device performance to ensure the stability and quality of video transmission.

[0072] After the above steps, the system will encode the video stream according to the adjusted encoding parameters and output the target video frames. These target video frames will be optimized according to the category, priority and grouping of the target objects to meet the needs and expectations of different viewers.

[0073] The coding parameter adjustment method in this embodiment shows how to optimize the processing in a video conference or video live broadcast scenario with multiple target objects. By grouping the target objects according to their categories and setting different priorities, the system can more flexibly adjust the coding parameters to adapt to different needs and scenarios. At the same time, through real-time adjustment and feedback mechanisms, the system can ensure the stability and quality of video transmission and improve the viewing experience of the audience. This coding parameter adjustment method is not only applicable to video conferencing and video live broadcast scenarios, but can also be applied to other video application scenarios that require processing multiple target objects.

[0074] In some embodiments, such as in an intelligent security monitoring system, the area monitored by the camera may contain multiple target objects, such as pedestrians, vehicles, animals, etc. These target objects can be grouped according to their categories and set different priorities so that the system can adjust the encoding parameters according to the priorities to optimize the video quality and transmission efficiency.

[0075] The system first detects the target objects in the camera monitoring area through image recognition technology and classifies them into different categories, such as pedestrians, vehicles, animals, etc. Each category can be regarded as a group.

[0076] According to actual needs, the system can set different priorities for target objects in different groups. For example, in traffic monitoring, vehicles may have a higher priority than pedestrians because the movement trajectory and speed of vehicles are crucial to traffic safety.

[0077] For target objects in the same group, the system can adjust encoding parameters according to their priority and importance. For example, in the pedestrian group, if a pedestrian is identified by the system as having abnormal behavior (such as running, falling, etc.), the system can improve the encoding parameters of the area where the pedestrian is located, such as reducing the quantization parameter (QP) and increasing the bit rate, to obtain higher quality video frames for subsequent analysis and processing.

[0078] In addition to adjusting encoding parameters within the same group, the system can also select target objects from different groups as needed and adjust their encoding parameters. For example, when monitoring a park, the system may focus on pedestrians and wild animals at the same time. If a wild animal (such as a rare bird) enters the monitoring area, the system can select the target object from the animal group and improve the encoding parameters of the area where it is located to capture more details and dynamics.

[0079] Based on the adjusted encoding parameters, the system encodes the video stream and outputs target video frames. These video frames will be optimized according to the priority and importance of different target objects to ensure that key information is presented clearly.

[0080] The encoding parameter adjustment method in this example shows how to group target objects by category and set priorities when there are multiple target objects, and then adjust the encoding parameters according to the target objects selected in different groups or across groups. This method can optimize video quality and transmission efficiency according to actual needs and ensure that key information is presented clearly. It has broad application prospects in the fields of intelligent security monitoring, intelligent traffic management, etc.

[0081] According to an embodiment of the present disclosure, for example, the target object includes a first sub-object and a second sub-object. Different sub-objects have different importance or priority, and the encoding parameters of the area where the target object is located can be adjusted to obtain a target video frame so that the image quality of the first sub-object is higher than the image quality of the second sub-object.

[0082] In some embodiments, for example, in a live broadcast of a sports game, the target object captured by the camera may be the entire stadium or a specific athlete. These target objects may contain multiple sub-objects, such as the main athlete (first sub-object) and other athletes or background (second sub-object). In this case, it is particularly important to adjust the encoding parameters to optimize the image quality of different sub-objects.

[0083] In live sports games, the system first uses image recognition technology to identify the entire stadium or specific athletes as the target object. Then, the system further identifies different sub-objects in the target object, such as the main athlete (such as the ball holder, shooter, etc.) and other athletes or background.

[0084] The system determines the importance and priority of different sub-objects based on preset rules or algorithms. For example, in a football game, the ball holder (first sub-object) may have a higher priority than other players (second sub-objects) because the ball holder's movements and positions have an important impact on the progress and outcome of the game.

[0085] Based on the importance and priority of the sub-objects, the system adjusts the encoding parameters of the target object area. Specifically, the system can increase the encoding parameters of the area where the first sub-object (such as the ball holder) is located, such as reducing the quantization parameter (QP) and increasing the bit rate, to obtain higher-quality video frames and ensure that the main athlete's movements and expressions are clearly presented. At the same time, for the second sub-object (such as other athletes or background), the system can appropriately reduce the encoding parameters to balance video quality and transmission efficiency.

[0086] After encoding parameters are adjusted, the system outputs target video frames, which are optimized based on the importance and priority of different sub-objects, ensuring that the image quality of the main athlete is higher than that of other athletes or background.

[0087] The coding parameter adjustment method in this example shows how to adjust the coding parameters by determining the importance and priority of different sub-objects when the target object contains multiple sub-objects, thereby optimizing the image quality of different sub-objects. In scenes such as live sports games, this method can ensure that the movements and expressions of the main athletes are clearly presented, improving the audience's viewing experience. At the same time, by appropriately reducing the coding parameters of secondary sub-objects, it is possible to balance video quality and transmission efficiency while ensuring the presentation of key information.

[0088] It is understandable that the first sub-object and the second sub-object can be different individuals in a class of target objects, or different local areas in the same individual. For example, in a video conference, the encoding quality of a person's face is higher than that of the torso. Alternatively, the sub-object can also be a local area within a viewing range, such as manually selected objects (such as hardware circuit boards) and objects such as whiteboards, to ensure that these key information is optimized during the encoding process.

[0089] Figure 4 A flow chart of a method for adjusting encoding parameters according to another embodiment of the present disclosure is schematically shown.

[0090] According to the embodiments of the present disclosure, Figure 4 As shown, for example, by operation S421, encoding parameters of the area where the target object is located are adjusted based on the movement data of the target object to obtain an encoded target video frame.

[0091] In operation S421, after it is determined based on the movement data of the target object that the target object moves from the first area to the second area, encoding parameters are adjusted for the second area to obtain a target video frame.

[0092] In some embodiments, for example, in a video surveillance system, by analyzing multiple frames of continuous video data, the movement trajectory of a target object (such as a pedestrian, a vehicle, etc.) can be accurately tracked and determined. Assume that a pedestrian is detected moving from the left side (first area) to the right side (second area) of the screen.

[0093] When the target object completely enters the second area (i.e., its body or main part enters the area), the adjustment mechanism of the encoding parameters is triggered. This is usually achieved by comparing the position of the target object with the boundary of the second area.

[0094] Since the target object is now located in the second region, the encoding quality of this region can be improved to ensure the clarity of the target object. This can be achieved by reducing the quantization parameter (QP) of this region, for example, reducing the QP from the default 28 to 22.

[0095] To support higher encoding quality, it may be necessary to increase the bitrate allocated to the second region. This can be achieved by adjusting the encoder's bitrate control strategy, such as using constant bitrate (CBR) or variable bitrate (VBR) mode, and allocating more bits to the second region.

[0096] According to specific needs, other encoding parameters such as resolution, frame rate, etc. can also be adjusted to further improve the image quality of the area where the target object is located.

[0097] The second region is encoded using the adjusted encoding parameters, and the entire video frame is output to a display device or a storage device. Since the encoding quality of the second region is improved, the image of the target object will be clearer and more detailed.

[0098] For example, in a video conference, the movement of participants can be tracked by cameras and image processing algorithms. Suppose a participant is detected moving from one side of the screen (first area) to the other side (second area).

[0099] When the participant completely enters the second area, the encoding parameter adjustment mechanism is triggered. This can be achieved by detecting the intersection of the participant's face or body with the boundary of the second area.

[0100] In a video conference, you usually want to ensure that the faces of the participants are clearly visible. Therefore, you can assign a higher encoding priority to the second area (where the participant is now). This can be achieved by adjusting the priority setting of the encoder.

[0101] Similar to video surveillance, the quantization parameter (QP) of the second region can be reduced to improve image quality. In addition, the bitrate allocation for this region can be increased to support higher image quality.

[0102] In video conferencing, maintaining a stable frame rate is essential for smooth communication. Therefore, when adjusting encoding parameters, you need to ensure that the frame rate does not drop due to excessive encoding quality.

[0103] The second area is encoded using the adjusted encoding parameters and the entire video frame is transmitted to the devices of other participants. Since the encoding quality of the second area is improved, the faces of the participants will be clearer and easier to recognize.

[0104] By combining the movement data of the target object, the encoding parameters of the second area can be adjusted after the target object moves from the first area to the second area. This method can ensure that in scenarios such as video surveillance or video conferencing, when the target object moves to a new area, the image quality of the area can be improved in a timely manner. By adjusting encoding parameters such as quantization parameters and bit rate, the image quality of the area where the target object is located can be optimized according to specific needs, while maintaining the stability and smoothness of the entire video stream.

[0105] It is understandable that the second area may be pre-set, ie determined before the target object moves, or may be determined in real time based on the movement data of the target object, so as to perform real-time coding optimization on the area where the target object is located.

[0106] According to an embodiment of the present disclosure, for example, each video frame may be divided into a plurality of segmented blocks. Then, a target block corresponding to a target object in the plurality of segmented blocks is determined, and encoding parameters are adjusted for the target block to obtain a target video frame.

[0107] In some embodiments, in video encoding, dividing a video frame into blocks and adjusting encoding parameters based on the location of a target object is an optimization strategy, which can improve the visual quality of the target object while controlling the overall encoding bit rate to a certain extent.

[0108] For example, there is a video frame containing a main target object (such as a face, a car, etc.). First, the video frame is divided into multiple segments, such as using a fixed-size grid or content-based adaptive segmentation.

[0109] The video frame can be divided into 8x8, 16x16 or smaller blocks, depending on the size of the target object and the coding efficiency requirements. For blocks containing target objects, the division can be further refined to adjust the coding parameters more accurately.

[0110] Then, target detection technology (such as deep learning model) is used to locate the target object in multiple segmented blocks. The block where the target object is located is determined as the target block.

[0111] For the target block, the quantization parameter (QP) value can be reduced to improve the encoding quality of the area. A lower QP value will result in less compression and higher bitrate, but will retain more details and higher visual quality. For blocks that do not contain the target object, a higher QP value can be used for encoding to save bitrate.

[0112] Then assign a QP value to each block and form a QP mapping matrix on the entire video frame. This matrix can be dynamically updated as needed to adapt to the movement or change of the target object in the video frame. For example, determine whether the object has moved across regions relative to the previous frame. If no movement has occurred, the QP mapping matrix of the previous frame is used. If movement has occurred, the QP mapping matrix is ​​updated according to the new object position.

[0113] Finally, each block is encoded using the QP value in the QP mapping matrix. The encoded video frame will contain high-quality areas of the target object and lower-quality areas of other areas. For example, the AV1 standard based on One VPL is used for video hardware encoding. The encoder uses the video frame area division information and the QP mapping matrix to prioritize encoding of the area of ​​interest, ensuring higher encoding quality under the same bit rate limit.

[0114] Targeted video quality optimization can be achieved by dividing the video frame into multiple blocks and adjusting the encoding parameters according to the location of the target object. This method can improve the visual quality of the target object without increasing the bit rate too much, thereby improving the overall viewing experience. At the same time, by dynamically updating the QP mapping matrix, it can adapt to the changes of the target object in the video frame, achieving more flexible and efficient video encoding.

[0115] It should be noted that in practical applications, the adjustment of encoding parameters needs to be optimized according to the specific video content and encoding requirements. For example, for video streams that require high compression, it may be necessary to more finely control the QP value and other encoding parameters to reduce the bit rate while maintaining a certain visual quality.

[0116] Figure 5 The flowchart of the encoding method according to another embodiment of the present disclosure is schematically shown.

[0117] According to the embodiments of the present disclosure, Figure 5 As shown, the encoding method of this embodiment, for example, also includes at least one of operations S510 to S530.

[0118] In operation S510, after a target object moves from a first area to a second area, encoding parameters of the first area are adjusted, wherein image quality of the second area in a target video frame is better than image quality of the first area.

[0119] In operation S520, when the movement data indicates that the moving distance of the target object from the first area to the second area is greater than the first distance, the encoding parameters of the second area are adjusted to obtain a target video frame.

[0120] In operation S530, after the target object moves from the first area to the second area, the encoding parameters of the third area are adjusted, wherein the third area is a partial area of ​​the first area that does not include the target object.

[0121] In some embodiments, taking a video conference or live video broadcast scenario as an example, the specific application of the above encoding method can be further explained.

[0122] In a video conference, suppose participant A (target subject) moves from the left side (first area) to the right side (second area) of the camera's image. To ensure that participant A's facial details and movements are clearly captured during the movement, the encoder performs the following operations:

[0123] When A moves to the right, the encoding parameters of the left area (the first area) may be reduced, such as reducing the bit rate or reducing the resolution, to save bandwidth resources.

[0124] As A enters the right area (the second area), the encoder immediately increases the encoding parameters of this area, such as increasing the bit rate, increasing the resolution, and sharpening the details, to ensure that A's face and movements are clearly visible in the video.

[0125] In live video broadcasts, if the host (target object) moves quickly on the stage, the encoder will analyze the host's movement data.

[0126] If the host's moving distance exceeds the preset threshold (first distance), the encoder will determine it as "fast movement" or "important action". At this time, the encoder will adjust the encoding parameters for the host's current area (second area), such as increasing the frame rate, to capture the host's fast movements.

[0127] If there are other unimportant background areas (third areas) besides the target object in the video conference or live broadcast, the encoder will perform the following operations:

[0128] In order to save bandwidth and storage resources, the encoder will reduce the encoding parameters of the third area, such as reducing the bit rate or resolution. In this way, even when the target object is moving, the overall video quality can be guaranteed, while not wasting too much resources on unimportant backgrounds.

[0129] The core of the above encoding method is to dynamically adjust the encoding parameters of different areas according to the movement and movement distance of the target object. In video conferencing or live video broadcasting scenarios, this encoding method can ensure that the image quality of the target object is always maintained at a high level while saving bandwidth and storage resources. By intelligently allocating encoding resources, this method not only improves the efficiency of video transmission, but also enhances the user's viewing experience.

[0130] In some embodiments, for example, in an intelligent video surveillance system, a camera captures the movement of a target object (such as a pedestrian, a vehicle, etc.) in the picture. Assume that a camera monitors a busy intersection, and the target object (pedestrian) crosses the road from the crosswalk (first area) to the sidewalk on the opposite side (second area).

[0131] Through image processing algorithms, the system can continuously track the movement trajectory of the target object in the picture. In this example, the system detects that the pedestrian starts from the first area (crosswalk), crosses the road, and moves to the second area (opposite sidewalk).

[0132] When the target object leaves the first area, the system adjusts the encoding parameters of the first area. Since the target object is no longer in the first area, the encoding quality of the area can be reduced to save bandwidth and storage resources. For example, the quantization parameter (QP) of the first area can be increased to reduce the image quality.

[0133] When the target object enters the second area, the system will adjust the encoding parameters of the second area to improve the image quality of the area. This is because the second area now contains the important target object. The QP of the second area can be reduced, and the bit rate allocated to the area may be increased to ensure the clarity of the target object.

[0134] If the system detects that the target object moves from the first area to the second area by a distance greater than the preset first distance (for example, more than a certain length of road width), the system will make more significant encoding parameter adjustments to the second area. This is because a longer moving distance may mean that the size or clarity of the target object in the picture has changed significantly, requiring more bandwidth and computing resources to maintain clear image quality.

[0135] After the target object moves from the first area to the second area, the system will also adjust the encoding parameters of the part of the first area that does not contain the target object (the third area). These areas may contain background or other unimportant objects. In order to save resources, the encoding quality of these areas can be reduced, such as increasing QP or reducing bit rate.

[0136] The entire video frame is encoded using the adjusted encoding parameters and output to a display device or storage device. In this way, the image quality of the second area in the target video frame will be better than that of the first area and the third area, thereby ensuring clear tracking and monitoring of the target object.

[0137] The above encoding method shows how to dynamically adjust the encoding parameters of different areas in the video surveillance system based on the movement data of the target object. By tracking the movement trajectory of the target object, the system can identify important target areas (such as the second area) and improve the image quality of these areas accordingly. At the same time, for areas that do not contain the target object (such as the third area in the first area), the system will reduce its encoding quality to save resources. In addition, considering the movement distance of the target object is also an important factor, which can help the system determine whether more significant encoding parameter adjustments are needed. This dynamic encoding method can ensure clear monitoring and tracking of the target object under limited bandwidth and storage resources.

[0138] Figure 6 A flow chart of a method for adjusting encoding parameters according to yet another embodiment of the present disclosure is schematically shown.

[0139] According to the embodiments of the present disclosure, Figure 6 As shown, for example, by performing operations S621 to S622, based on the movement data of the target object, the encoding parameters of the area where the target object is located are adjusted to obtain an encoded target video frame.

[0140] In operation S621, when it is determined based on the movement data that the target object has a first relative position relationship with the first object after moving a second distance, the area where the first object and the target object are located is used as the area to be adjusted.

[0141] In operation S622, encoding parameters of the area to be adjusted are adjusted to obtain a target video frame.

[0142] In some embodiments, for example, in a live broadcast of a smart sports event, the camera captures the movement of an athlete (target object) on the field, and the camera also needs to focus on the interaction between the athlete and other athletes (first objects). Assume that a live broadcast of a football game is being conducted, and the camera mainly focuses on a player who controls the ball (target object) and pays attention to the relative position relationship between him and another defensive player (first object).

[0143] Using image processing algorithms, the system is able to continuously track the movement of the target object and the first object (defensive player) in the picture.

[0144] When the target object (the ball-controlling player) moves the second distance (for example, he successfully breaks through the defense and moves forward several meters), the system detects the first relative position relationship between him and the first object (the defensive player). In this example, it is assumed that the first relative position relationship is that the defensive player is left behind and the distance is far.

[0145] Based on the above relative position relationship, the system identifies the area where the target object and the first object are located as the area to be adjusted. This is because these two areas now contain important interactions and game dynamics.

[0146] For the areas to be adjusted, the system will adjust the encoding parameters. Since these two areas contain important game dynamics, the system will reduce the quantization parameter (QP) of these two areas and increase the bit rate to improve the clarity and details of the image. In addition, the frame rate can be increased or a more efficient encoding algorithm can be used to ensure that the audience can clearly see the athletes' movements and the game situation.

[0147] The entire video frame is encoded using the adjusted encoding parameters and output to a display device or storage device. In this way, the image quality of the area to be adjusted in the target video frame will be significantly improved, ensuring that the audience can clearly see the interaction between the players and the dynamics of the game.

[0148] The above encoding parameter adjustment method shows how to adjust the encoding parameters of key areas in the video based on the target object's movement data and its relative position to other objects. By identifying the areas to be adjusted that contain important interactions and game dynamics, and improving the encoding quality of these areas accordingly, the system can ensure that viewers can be provided with a clear and smooth live sports event experience under limited bandwidth and storage resources. This dynamic encoding parameter adjustment method is not only applicable to live sports events, but can also be applied to other video application scenarios that require attention to the clarity of specific objects or areas.

[0149] Figure 7 A flow chart of a method for adjusting encoding parameters according to yet another embodiment of the present disclosure is schematically shown.

[0150] According to the embodiments of the present disclosure, Figure 7 As shown, for example, by performing operations S721 to S722, encoding parameters of the area where the target object is located are adjusted based on the movement data of the target object.

[0151] In operation S721, movement data of a target object is determined based on a current video frame and at least one first video frame, the first video frame being an image frame earlier than the current video frame.

[0152] In operation S722, encoding parameters of a contour region of the target object are adjusted based on the movement data and the spatial environment data where the target object is located, and the contour region is determined based on the spatial environment data.

[0153] In some embodiments, such as in a monitoring system of an intelligent self-driving car, it is necessary to adjust the encoding parameters of the area around the vehicle based on the movement data of the vehicle (target object) and the spatial environment data in which it is located to ensure the video quality of key areas.

[0154] The system first determines the vehicle's movement data through continuously captured video frames. Specifically, the system analyzes the vehicle's position changes in the current video frame (recorded as the Nth frame) and at least one first video frame (such as the N-1th frame, N-2th frame, etc.), thereby calculating the vehicle's movement data such as movement speed and movement direction.

[0155] In addition to mobility data, the system also needs to obtain data about the spatial environment in which the vehicle is located. This data may include road width, curvature, traffic signs, the locations of other vehicles and pedestrians, etc. This data can be obtained through on-board sensors (such as radar, camera, lidar, etc.) and map information.

[0156] It should be noted that the spatial environment data refers to the environmental data within the framing range, and may include, for example, the framing background, brightness, color, the degree of distinction between the target object and the spatial environment, the positional relationship with other objects in the spatial environment, and so on.

[0157] Based on the spatial environment data, the system can further determine the contour area of ​​the vehicle. This contour area may be a spatial area that includes the vehicle itself and a certain range around it. The size and shape of this range can be adjusted according to actual needs. For example, if the system needs to focus on the interaction between the vehicle and the surrounding vehicles, the contour area may include part of the surrounding vehicles.

[0158] It is understandable that the contour area can change dynamically with the environmental data. For example, when the distinction from the spatial environment is more obvious, the contour area range can be set to be smaller, but when the distinction is not obvious, the contour area range can be set to be larger, and so on.

[0159] Once the contour area is determined, the system can adjust the encoding parameters for the area. Since the contour area contains important traffic information, the system needs to ensure that the video quality in this area is high enough. Therefore, the system can reduce the quantization parameter (QP) in this area and increase the bit rate to improve the clarity and details of the image. At the same time, you can also consider increasing the frame rate or using a more efficient encoding algorithm to ensure the smoothness of the video stream.

[0160] Using the adjusted encoding parameters, the system encodes the current video frame and outputs it to a display device or storage device. In this way, the image quality of the contour area in the target video frame will be significantly improved, ensuring that the autonomous driving system can clearly identify the traffic environment around the vehicle.

[0161] The above coding parameter adjustment method shows how to adjust the coding parameters of the contour area of ​​the target object by combining the target object's movement data and spatial environment data. By determining the movement data of the target object through continuously captured video frames and obtaining spatial environment data using on-board sensors and map information, the system can accurately identify the contour area containing important traffic information. Adjusting the coding parameters of these areas can ensure that clear and smooth monitoring video streams are provided to the autonomous driving system under limited bandwidth and storage resources. This dynamic coding parameter adjustment method is not only applicable to autonomous driving monitoring systems, but can also be applied to other video application scenarios where the clarity of specific objects or areas needs to be focused.

[0162] Figure 8 The flowchart of an encoding method according to another embodiment of the present disclosure is schematically shown.

[0163] According to the embodiments of the present disclosure, Figure 8 As shown, the encoding method of this embodiment, for example, further includes operation S810.

[0164] In operation S810, in response to an adjustment instruction for a target object sent by an output terminal device, a target video frame is updated, wherein the output terminal device is a device that receives and displays the target video frame through a network or a data cable, and the adjustment instruction at least includes an instruction to adjust the region where the target object is located and / or the encoding parameters of the target object.

[0165] In some embodiments, for example, in a video conference or live video broadcast, participants or viewers may adjust the display effect of a target object (such as a speaker, a specific participant, etc.) in the video according to their viewing experience or needs. At this time, the output device (such as a participant's computer, mobile phone or a viewer's TV, computer, etc.) can send adjustment instructions for the target object to the server through a network or data cable, and the server updates the target video frame according to these instructions to provide a more personalized viewing experience.

[0166] During a video conference or live video broadcast, the server transmits the continuously captured video frames (i.e., target video frames) to each output device through the network. After receiving the video frames, the output device will immediately decode them and display them to the user.

[0167] If the participants or viewers are not satisfied with the display effect of the target object in the video, they can send adjustment instructions through the operation interface on the output device. These instructions may include adjusting the clarity, brightness, contrast, saturation and other parameters of the area where the target object is located, or adjusting the magnification and position of the target object.

[0168] After receiving the adjustment instructions, the server will first parse them to determine the specific parameters and areas that need to be adjusted. Then, the server will update the encoding parameters of the target video frame according to these instructions. For example, if the instruction is to increase the clarity of the area where the target object is located, the server will adjust the clarity parameters of the area accordingly (such as reducing the quantization parameter (QP)).

[0169] After updating the encoding parameters, the server will re-encode the target video frame and transmit the encoded video stream to each output device through the network. After receiving the new video frame, the output device will immediately decode it and display it to the user.

[0170] After watching the adjusted video, participants or viewers can continue to send adjustment instructions as needed to further optimize the video display effect. The server will continue to receive and respond to these instructions to ensure the quality and viewing experience of the live video or conference.

[0171] The above encoding method shows how to update the target video frame according to the adjustment instructions sent by the output device in a video conference or video live broadcast scenario. By receiving and parsing the adjustment instructions of the participants or viewers, the server can flexibly adjust the display effect of the target object in the video to meet the needs and viewing experience of different users. This encoding method not only improves the flexibility and personalization of video live broadcasts or conferences, but also enhances user participation and interactive experience. In practical applications, this method can be widely used in online education, corporate meetings, online live broadcasts and other fields.

[0172] In some embodiments, for example in a remote medical monitoring system, a doctor (or medical expert) views the real-time monitoring video of a patient (target object) through a remote output device (such as a computer, tablet, or mobile phone) and makes adjustments as needed.

[0173] The patient's ward or examination room is equipped with a camera, which captures the patient's video data in real time and transmits it to the encoding server through the network or data cable. The encoding server encodes the video data, generates target video frames, and sends these video frames to the doctor's output device.

[0174] The doctor receives the video data through the remote output device and checks the patient's condition in real time. If the doctor finds that the clarity of certain areas or objects in the video is not enough, or needs to pay attention to a specific detail, he can send adjustment instructions through the output device.

[0175] After receiving the adjustment instruction sent by the doctor, the encoding server parses the instruction and obtains the encoding parameters of the area or object that needs to be adjusted.

[0176] According to the adjustment instructions obtained through parsing, the encoding server updates the target video frame. If the instruction requires improving the clarity of a certain area, the encoding server will reduce the quantization parameter (QP) of the area and increase the bit rate. If the instruction requires focusing on a specific object, the encoding server will re-determine the contour area of ​​the object and adjust the encoding parameters of the area.

[0177] The encoding server resends the updated target video frame to the doctor's output device. The doctor can view the updated video in real time on the output device and continue to send adjustment instructions as needed.

[0178] The above encoding method shows how to update the target video frame by responding to the adjustment instructions sent by the output device. In the remote medical monitoring system, doctors can send adjustment instructions as needed to adjust the encoding parameters of specific areas or objects in the video to improve the clarity and focus of the video. This encoding method can not only improve the efficiency of video transmission, but also meet the personalized needs of doctors for video quality, providing a more flexible and efficient solution for remote medical monitoring. In addition, this method is also applicable to other scenarios that require remote monitoring and control, such as smart security, distance education, etc.

[0179] Fig. 9 The flowchart of an encoding method according to another embodiment of the present disclosure is schematically shown.

[0180] According to the embodiments of the present disclosure, Fig. 9 As shown, the encoding method of this embodiment, for example, further includes operation S910.

[0181] In operation S910, object change information and / or environment change information within a viewing range is monitored, and encoding parameters of a target object are updated based on the object change information and / or environment change information to obtain a target video frame.

[0182] In some embodiments, it may be given priority to determine whether the target object is the target object based on whether the object speaks when the target object does not move, and the encoding parameters may be adjusted accordingly after the environment changes.

[0183] For example, in a video conferencing system, participants (target objects) communicate in real time through cameras and microphones. In this scenario, the encoding method can be used to monitor whether the participants are speaking (object change information) and the light changes in the conference environment (environment change information), and adjust the encoding parameters accordingly to obtain clearer and smoother target video frames.

[0184] When a video conference starts, the system will perform initial encoding settings for the video streams of all participants, including encoding parameters such as resolution, frame rate, bit rate, etc. These parameters are set based on current network conditions and device performance to ensure the stability and quality of video transmission.

[0185] During a video conference, the system monitors the voice activity of the participants in real time. When the system detects that a participant starts to speak, that participant becomes the current primary target. The system can determine whether a participant is speaking through microphone signals or voice recognition technology.

[0186] Once a participant is identified as the primary target, the system will immediately update the encoding parameters of the participant's video stream. In order to more clearly display the speaker's face and expressions, the system may increase the resolution of the video stream, reduce the quantization parameter (QP) to increase the bit rate, and may increase the frame rate to improve the smoothness of the video.

[0187] In addition to monitoring object changes, the system also monitors the light changes in the conference environment in real time. Light changes may affect the brightness and contrast of the video, and thus affect the quality of the video. The system can determine the current light conditions of the environment through the image information captured by the camera.

[0188] When the system detects changes in ambient light, it adjusts the encoding parameters of the video stream according to the light conditions. For example, in a dark environment, the system may increase the brightness of the video and adjust the contrast to enhance the clarity of the image. These adjustments can be achieved by adjusting the brightness, contrast, gamma and other parameters in the encoding parameters.

[0189] After the above steps, the system will re-encode the video stream according to the updated encoding parameters and output the target video frames. These target video frames will be displayed more clearly and smoothly on the participants' screens, improving the communication effect of the video conference.

[0190] The encoding method in this example shows how to update the encoding parameters of the target object by monitoring the object change information and the environment change information to obtain a clearer and smoother target video frame. In a video conferencing system, when a participant speaks, the system can regard it as the main target object and adjust the encoding parameters of its video stream to improve the video quality. At the same time, the system can also adjust the encoding parameters of the video stream according to the changes in ambient light to adapt to different environmental conditions. This encoding method can flexibly adjust the video quality according to the actual situation and improve the communication effect of the video conference.

[0191] In some embodiments, the object change information may also include movement data of the object, such as predicting the encoding area of ​​the next frame according to the movement speed or movement trajectory.

[0192] For example, in an intelligent security monitoring system, the camera captures video data in the monitoring area. The system automatically adjusts the encoding parameters of the target object based on the change information of the object and the environment in the monitoring area to optimize the video quality and storage efficiency.

[0193] The camera continuously captures video data within the monitoring area, including real-time images of various objects (such as pedestrians, vehicles, etc.) and background environment (such as weather, lighting, etc.).

[0194] The system analyzes the captured video data, identifies objects in the monitoring area, and tracks the changes of these objects in consecutive video frames. These changes may include the object's position movement, speed change, shape change, etc.

[0195] In addition to object change information, the system can also analyze environmental change information within the monitoring area. These changes may include changes in light intensity, changes in weather conditions (such as rain, snow, fog, etc.), changes in background noise, etc.

[0196] Based on the object change information and / or environment change information obtained by analysis, the system updates the encoding parameters of the target object. For example, if the object activity in a certain area is frequent, the system may increase the bit rate and frame rate in that area to ensure the smoothness and clarity of the video. If the ambient light becomes darker, the system may lower the brightness threshold to better capture the dark details.

[0197] Using the updated encoding parameters, the system encodes the video data to generate target video frames, which maintain clarity while taking into account storage and transmission efficiency.

[0198] The generated target video frames are stored in the local server or transmitted to the remote monitoring center through the network. During the storage and transmission process, the system can further adjust the quality and compression ratio of the video according to the limitations of storage space and transmission bandwidth.

[0199] The above encoding method automatically updates the encoding parameters of the target object by monitoring the object change information and / or environmental change information within the viewing range to optimize the video quality and storage efficiency. In the intelligent security monitoring system, this method can ensure that the video data can be effectively managed and utilized in a complex and changeable monitoring environment. At the same time, by automatically adjusting the encoding parameters, the system can adapt to different monitoring needs, improve the clarity and real-time performance of the video, and provide a more efficient and reliable solution for security monitoring. This method is also applicable to other scenarios that require real-time capture and analysis of video data, such as intelligent transportation, intelligent industry, etc.

[0200] Based on the above encoding method, the present disclosure also provides an encoding device. Fig.10The encoding device is described in detail.

[0201] Fig.10 The structural block diagram of the encoding device according to the embodiment of the present disclosure is schematically shown.

[0202] like Fig.10 As shown, the encoding device 1000 of this embodiment includes, for example, a determination module 1010 and an adjustment module 1020. The encoding device 1000 can execute the above reference Figure 2~Figure 9 The encoding method described is used to achieve efficient encoding of video frames.

[0203] Specifically, the determination module 1010 is used to determine the target object in the current video frame. In one embodiment, the determination module 1010 can be used to perform the operation S210 described above, which will not be described in detail here.

[0204] The adjustment module 1020 is used to adjust the encoding parameters of the area where the target object is located based on the movement data of the target object, and obtain the encoded target video frame. In the target video frame, the image quality of the area where the target object is located is higher than that of other areas. In one embodiment, the adjustment module 1020 can be used to perform the operation S220 described above, which will not be repeated here.

[0205] It is understandable that the determination module 1010 and the adjustment module 1020 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the determination module 1010 and the adjustment module 1020 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented in hardware or firmware in any other reasonable way of integrating or packaging the circuit, or in a proper combination of software, hardware and firmware. Alternatively, at least one of the determination module 1010 and the adjustment module 1020 can be at least partially implemented as a computer program module, and when the program is run by a computer, the function of the corresponding module can be executed.

[0206] Fig.11 A block diagram of an electronic device suitable for implementing the encoding method according to an embodiment of the present disclosure is schematically shown.

[0207] like Fig.11As shown, the electronic device 1100 according to an embodiment of the present disclosure includes a processor 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage part 1108 to a random access memory (RAM) 1103. The processor 1101 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 1101 may also include an onboard memory for caching purposes. The processor 1101 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0208] In RAM 1103, various programs and data required for the operation of electronic device 1100 are stored. Processor 1101, ROM 1102 and RAM 1103 are connected to each other through bus 1104. Processor 1101 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 1102 and / or RAM 1103. It should be noted that the program can also be stored in one or more memories other than ROM 1102 and RAM 1103. Processor 1101 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0209] According to an embodiment of the present disclosure, the electronic device 1100 may further include an input / output (I / O) interface 1105, which is also connected to the bus 1104. The electronic device 1100 may further include one or more of the following components connected to the I / O interface 1105: an input portion 1106 including a keyboard, a mouse, etc.; an output portion 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 1108 including a hard disk, etc.; and a communication portion 1109 including a network interface card such as a LAN card, a modem, etc. The communication portion 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed, so that a computer program read therefrom is installed into the storage portion 1108 as needed.

[0210] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the encoding method according to the embodiment of the present disclosure is implemented.

[0211] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus, or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 1102 and / or RAM 1103 described above and / or one or more memories other than ROM 1102 and RAM 1103.

[0212] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the encoding method provided by the embodiment of the present disclosure.

[0213] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 1101. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0214] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 1109, and / or installed from a removable medium 1111. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0215] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the removable medium 1111. When the computer program is executed by the processor 1101, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0216] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0217] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0218] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0219] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A coding method, comprising: Determine the target object in the current video frame; Based on the movement data of the target object, adjusting the encoding parameters of the area where the target object is located to obtain an encoded target video frame; Wherein, in the target video frame, the image quality of the area where the target object is located is higher than that of other areas.

2. The method according to claim 1, wherein: Adjusting the encoding parameters of the area where the target object is located to obtain an encoded target video frame includes at least one of the following: In the case where the target object is unique, adjusting the encoding parameters of the area where the target object is located based on the encoding parameters corresponding to the unique target object to obtain an encoded target video frame; In the case that the target object is not unique, the coding parameters of the area where each target object is located are adjusted based on the coding parameters corresponding to the priority of each target object to obtain the target video frame, wherein different priorities correspond to different coding parameters, and the image quality of the area where the target objects at different priorities are located in the target video frame is different.

3. The method according to claim 1, wherein adjusting the encoding parameters of the area where the target object is located based on the movement data of the target object to obtain the encoded target video frame comprises: After determining that the target object moves from the first area to the second area based on the movement data of the target object, the encoding parameters of the second area are adjusted to obtain the target video frame.

4. The method according to claim 3, wherein: Also includes at least one of the following: After the target object moves from the first area to the second area, adjusting encoding parameters of the first area, wherein image quality of the second area in the target video frame is better than image quality of the first area; When the movement data indicates that the moving distance of the target object from the first area to the second area is greater than a first distance, adjusting the encoding parameters of the second area to obtain the target video frame; After the target object moves from the first area to the second area, the encoding parameters of the third area are adjusted, wherein the third area is a partial area of ​​the first area that does not include the target object.

5. The method according to claim 1, wherein adjusting the encoding parameters of the area where the target object is located based on the movement data of the target object to obtain the encoded target video frame comprises: In a case where it is determined based on the movement data that the target object has a first relative position relationship with the first object after moving a second distance, taking the area where the first object and the target object are located as the area to be adjusted; The encoding parameters of the area to be adjusted are adjusted to obtain the target video frame.

6. The method according to claim 1, wherein: Adjusting encoding parameters of an area where the target object is located based on the movement data of the target object includes: Determine the movement data of the target object based on the current video frame and at least one first video frame, wherein the first video frame is an image frame earlier than the current video frame; Based on the movement data and the spatial environment data where the target object is located, encoding parameters of the contour area of ​​the target object are adjusted, and the contour area is determined based on the spatial environment data.

7. The method according to claim 1, further comprising: In response to an adjustment instruction for the target object sent by an output terminal device, updating the target video frame; The output device is a device that receives and displays the target video frame through a network or a data cable, and the adjustment instruction at least includes an instruction to adjust the area where the target object is located and / or the encoding parameters of the target object.

8. The method according to claim 1, further comprising: Object change information and / or environment change information within the viewing range is monitored, and encoding parameters of the target object are updated based on the object change information and / or the environment change information to obtain the target video frame.

9. An encoding device, comprising: A determination module, used to determine a target object in a current video frame; An adjustment module, configured to adjust encoding parameters of the area where the target object is located based on the movement data of the target object, so as to obtain an encoded target video frame; Wherein, in the target video frame, the image quality of the area where the target object is located is higher than that of other areas.

10. An electronic device, comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Video processing method and device and electronic equipment

    CN120499395A