Video stream processing method and apparatus and electronic device
By detecting the degree of occlusion of the target object in the live video stream and dynamically adjusting the special effect processing time, the problem of the target object being blocked or posture changes during the live broadcast process is solved, resulting in a worse effect processing effect, achieving a better user experience.
Patent Information
- Application Number
- PCT/CN2024/115524
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-31
- Filing Date
- 2024-08-29
- Publication Date
- 2025-03-06
AI Technical Summary
During the live broadcast, the specified object may be blocked or posture changes, resulting in the effect of special effects processing, such as the disappearance of the beauty effect.
By detecting the degree of obscuring of the target object in the video stream image frame, the time of next detection is determined, and special effects processing for the target object is performed based on the detection result.
Improve the effect of special effects processing, ensuring that even if the target object is obscured or the posture changes, the special effects can be dynamically adjusted, thereby improving the user experience.
Smart Images

Figure CN2024115524_06032025_PF_FP_ABST
Abstract
Description
Video stream processing method, device and electronic device
[0001] This application claims priority to Chinese Patent Application No. 202311120084.8 filed on August 31, 2023, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field
[0002] The present disclosure relates to a video stream processing method, device and electronic device. Background Art
[0003] With the continuous development of network technology and streaming media technology, live video streams are increasingly used in people's lives, providing more entertainment services and bringing more convenience to people's lives. At present, during live broadcasts, people usually need to perform special effects processing on specified objects in the image frames of the video stream, such as beautification. However, during the live broadcast process, the specified object may be obscured or the posture in the image frame may change, resulting in the occurrence of the specified object being obscured, making the special effects effect on the specified object worse, such as the disappearance of the beauty effect. Therefore, a method for performing special effects processing on live video streams is needed.
[0004] Summary of the Invention
[0005] The present disclosure provides a video stream processing method, device and electronic device.
[0006] According to a first aspect, a video stream processing method is provided, the method comprising:
[0007] Detecting a target object in an image frame of a current video stream to obtain a detection result, wherein the detection result includes first information indicating a degree of obscuration of the target object;
[0008] Determining a detection time for the target object in the next detection image frame of the video stream based on the first information; and
[0009] Based on the detection result, special effects processing is performed on the target object.
[0010] According to a second aspect, a video stream processing device is provided, the device comprising:
[0011] a detection module, configured to detect a target object in an image frame of a current video stream and obtain a detection result; wherein the detection result includes first information indicating a degree of obscuration of the target object;
[0012] a determination module, configured to determine a detection time for the next detection of the target object in the image frame of the video stream based on the first information;
[0013] A processing module is used to perform special effect processing on the target object based on the detection result.
[0014] According to a third aspect, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of the above-mentioned first aspects is implemented.
[0015] According to a fourth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the methods described in the first aspect when executing the program. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments recorded in the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0017] FIG1 is a schematic diagram of an exemplary system architecture for applying an embodiment of the present disclosure;
[0018] FIG2 is a schematic diagram of a video stream processing scenario according to an exemplary embodiment of the present disclosure;
[0019] FIG3 is a flowchart of a method for processing a video stream according to an exemplary embodiment of the present disclosure;
[0020] FIG4 is a flowchart of another video stream processing method according to an exemplary embodiment of the present disclosure;
[0021] FIG5 is a block diagram of a video stream processing apparatus according to an exemplary embodiment of the present disclosure;
[0022] FIG6 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure;
[0023] FIG7 is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure; and
[0024] FIG8 is a schematic diagram of a storage medium provided by some embodiments of the present disclosure. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.
[0026] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0027] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms "a," "the," and "the" used in this disclosure are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0028] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."
[0029] See FIG1 , which is a schematic diagram of an exemplary system architecture applying an embodiment of the present disclosure.
[0030] As shown in FIG1 , system architecture 100 may include terminal device 102, terminal device 105, network 103, and server 104. It should be understood that the number or type of terminal devices, networks, and servers in FIG1 are merely illustrative. Any number or type of terminal devices, networks, and servers may be used as needed.
[0031] The network 103 is used to provide a medium for communication links between terminal devices and servers. The network 103 can include various connection types, such as wired or wireless communication links or optical fiber cables.
[0032] The terminal device 102 and the terminal device 105 can interact with the server through the network 103 to receive or send requests or information, etc. The terminal device 102 and the terminal device 105 can be various electronic devices, including but not limited to smart phones, tablet computers, smart wearable devices, and personal digital assistants, etc.
[0033] The server 104 can store, analyze, and process the received data, and can also send control commands or requests to terminal devices or other servers. The server can provide services in response to user service requests. It is understood that a server can provide one or more services, and the same service can be provided by multiple servers.
[0034] Based on the system architecture shown in FIG1 , in an embodiment of the present disclosure, user 101 can collect image frames of a live video stream through terminal device 102, and detect the target object in at least part of the image frames to obtain a detection result, wherein the detection result includes information indicating the degree to which the target object is obscured. Then, special effects processing can be performed on the target object based on the detection result, and the detection time of the target object in the image frame of the live video stream can be determined based on the degree to which the target object is obscured, so as to perform the next detection based on the detection time. The terminal device 102 can transmit the live video stream after special effects processing to the server 104 via the network 103, and the server 104 can then transmit the above-mentioned live video stream to the terminal device 105 via the network 103, so that the user 106 can watch the live video processed with special effects through the terminal device 105.
[0035] Referring to FIG. 2 , it is a schematic diagram showing a scenario of video stream processing according to an exemplary embodiment.
[0036] As shown in Figure 2, first, image frames of a live video stream S are captured in real time. When time J0 arrives, object X in the current image frame T0 is detected and identified, resulting in a detection result G0. Detection result G0 may include information about the degree of obscuration of object X in image frame T0 and its location within image frame T0. Based on the obscuration of object X in image frame T0, time J1 can be determined for the next detection of object X in the image frame, so that object X can be detected and identified in image frame Tn at time J1. The greater the degree of obscuration of object X in image frame T0, the fewer frames are between image frame Tn and image frame T0, resulting in a higher detection frequency. The less obscured the object X in image frame T0, the more frames are between image frame Tn and image frame T0, resulting in a lower detection frequency. On the other hand, based on the detection result G0, special effects specific to object X can be applied to image frame T0 and subsequent image frames T1, T2, ..., Tn-1, respectively, to obtain processed image frames t0, t1, t2, ..., tn-1. At time J1, a new round of detection and special effects processing can be performed. The specific process is not repeated here.
[0037] The present disclosure will be described in detail below with reference to specific embodiments.
[0038] FIG3 is a flowchart illustrating a method for processing a video stream according to an exemplary embodiment. This method can be applied to a terminal device. In this embodiment, for ease of understanding, an example is provided using a terminal device capable of installing third-party applications. Those skilled in the art will appreciate that the terminal device may include, but is not limited to, a mobile terminal device such as a smartphone, a smart wearable device, a tablet computer, a laptop computer, and a desktop computer. The method may include the following steps:
[0039] As shown in FIG3 , in step 301 , a target object in an image frame of a current video stream is detected to obtain a detection result.
[0040] In this embodiment, the video stream involved may be a video stream in a live broadcast scenario. During the live broadcast, the target object in the image frame of the video stream may be detected and identified at regular intervals. For example, detection of the target object may be performed every m seconds, or detection of the target object may be performed every s frames of image. The target object may be an object in the live video stream that requires special effects processing. For example, the target object may be a person, an animal, an object, or a specified area of a specified object. It is understood that the target object may be any object that can be detected and identified, and this embodiment does not limit the specific type of the target object.
[0041] In this embodiment, the target object in the video stream image frame can be detected at the detection time. The detection time can be represented by the time interval since the last detection, or by the number of image frames since the last detection. For example, the detection time is determined to have been reached when a seconds have passed since the last detection. Alternatively, the detection time is determined to have been reached when b frames have passed since the last detection.
[0042] When the detection time arrives, the target object in the current video stream image frame can be detected to obtain a detection result. The detection result may include first information indicating the degree to which the target object is obscured. The first information may include the confidence level corresponding to the target object, or the ratio of the area of the target object obscured region to the area occupied by the target object, or data obtained based on the confidence level corresponding to the target object and the ratio of the area of the target object obscured region to the area occupied by the target object. It is understood that the first information may be any information that can indicate the degree to which the target object is obscured, and this embodiment is not limited to this aspect.
[0043] Furthermore, the detection result may also include second information indicating the location of the target object. For example, the second information may include information about key points corresponding to the target object, or may include contour information corresponding to the target object.
[0044] In step 302, based on the first information, the next detection time of the target object in the image frame of the video stream is determined.
[0045] In this embodiment, the detection time of the target object in the video stream image frame can be determined based on the degree to which the target object is obscured. In one implementation, it can be determined based on the first information whether the degree to which the target object is obscured is less than a first preset degree. If the degree to which the target object is obscured is less than the first preset degree, the default first detection frequency can be used for detection. If the degree to which the target object is obscured is greater than or equal to the first preset degree, the detection frequency can be increased and a second detection frequency greater than the first detection frequency can be used for detection. Therefore, the detection time of the target object in the video stream image frame can be further determined based on the determined detection frequency.
[0046] For example, if it is determined that the target object is obscured to a degree less than a first preset degree, detection is performed at a default frequency of A detections per second, and the time 1 / A seconds later can be used as the detection time. If it is determined that the target object is obscured to a degree greater than or equal to the first preset degree, detection is performed at a frequency of B detections per second, where A is less than B. The time 1 / B seconds later can be used as the detection time.
[0047] For another example, if it is determined that the target object is obscured to a degree less than a first preset degree, a detection is performed using a default interval of C image frames, and the time after the C frame image can be used as the detection time. If it is determined that the target object is obscured to a degree greater than or equal to the first preset degree, a detection is performed using an interval of D image frames, where C is less than D, and the time after the D frame image can be used as the detection time.
[0048] In another implementation, the degree to which the target object is obscured can be quantified into a numerical value, and the detection frequency can be calculated based on the numerical value according to a preset algorithm, so that the detection frequency is positively correlated with the numerical value (that is, the greater the degree to which the target object is obscured, the greater the detection frequency). Then, based on the detection frequency, the detection time for the next detection is determined.
[0049] Since this embodiment determines the detection time of the next detection based on the degree to which the target object is obscured, the detection frequency is increased when the target object is obscured to a large extent, thereby increasing the speed of adjusting special effects according to the degree to which the target object is obscured, making the special effects processing effect better and enhancing the user experience.
[0050] In step 303, special effects processing is performed on the target object based on the above detection results.
[0051] In this embodiment, special effects processing can be performed on the video stream based on the detection results, targeting the target object. The special effects processing on the target object can include deformation processing or color adjustment of the target object. Specifically, the position information corresponding to the target object can be determined based on the detection results, and a target special effects intensity to be added to the video stream can be determined based on the first information. Finally, based on the position information corresponding to the target object and in accordance with the target special effects intensity, the special effects processing can be performed on the image frames of the video stream based on the target special effects intensity.
[0052] It should be noted that if, based on the first information, it is determined that the degree to which the target object is obscured is greater than a preset threshold (the threshold is relatively large), or the target object is not detected, timing or counting will start. After a preset time or a preset number of frames, if the degree to which the target object is obscured is still greater than the preset threshold or the target object is not detected, the special effects can be turned off.
[0053] The present disclosure provides a video stream processing method that detects a target object in a current video stream image frame to obtain a detection result. The detection result includes first information indicating the degree of obscuration of the target object. Based on the first information, the next detection time for the target object in the video stream image frame is determined, and special effects processing for the target object is performed based on the detection result. Because this embodiment can determine the detection frequency of the target object in the video stream image frame based on the degree of obscuration of the target object, it can improve the special effects and enhance the user experience while balancing the performance overhead of the terminal device.
[0054] FIG4 is a flow chart of another method for processing a video stream according to an exemplary embodiment. This embodiment describes a process of performing special effects processing on a target object, including the following steps:
[0055] As shown in FIG. 4 , in step 401 , based on the above detection results, the location information corresponding to the target object is determined.
[0056] In this embodiment, the position information corresponding to the target object can be any information that can represent the position of the target object in the image. For example, the position information can be information of the key points of the target object, etc., and can include the type and coordinate information of the key points of the target object, etc.
[0057] Specifically, in one implementation, the degree to which the target object is obscured can be compared with a second preset degree based on the first information included in the detection result. If the degree to which the target object is obscured is less than the second preset degree, the second information included in the detection result can be directly used as the position information corresponding to the target object. In addition, position reference information can also be stored in the cache in advance, and the position reference information needs to be continuously updated with the new position information of the target object. The second information can be used to update the position reference information pre-stored in the cache at the same time. If the degree to which the target object is obscured is greater than or equal to the second preset degree, the pre-stored position reference information can be used as the position information corresponding to the target object.
[0058] In another implementation, the degree to which the target object is obscured can be compared with a second preset degree based on the first information included in the detection result. Simultaneously, based on the second information included in the detection result, the position difference of the target object in the current image frame and the target object in the previous image frame can be compared. If the degree to which the target object is obscured is less than the second preset degree, or the position difference is greater than or equal to the preset difference, the second information included in the detection result can be directly used as the position information corresponding to the target object. At the same time, the second information is used to update the position reference information pre-stored in the cache. If the degree to which the target object is obscured is greater than or equal to the second preset degree, and the position difference is less than the preset difference, the pre-stored position reference information can be used as the position information corresponding to the target object.
[0059] It is understood that any other reasonable method can be used to determine the location information corresponding to the target object, and this embodiment is not limited to this aspect. It should be noted that the first preset degree and the second preset degree are two independent and unrelated conditions, and the first preset degree and the second preset degree can be the same or different. Generally, the first preset degree can be set to be greater than the second preset degree.
[0060] In step 402, a target special effect strength is determined based on the first information.
[0061] In this embodiment, the target special effect intensity is the intensity of the special effect processing applied to the target object. For example, the target special effect intensity can be the intensity of the deformation applied to the target object or the intensity of the color adjustment applied to the target object. The intensity of the deformation applied to the target object can indicate the amount of deformation applied to the target object. The greater the deformation intensity, the greater the change in the shape of the target object. The intensity of the color adjustment applied to the target object can indicate the amount of color change applied to the target object. The greater the color adjustment intensity, the greater the change in the color of the target object.
[0062] In this embodiment, a target special effect intensity can be determined based on the first information, such that the degree of occlusion of the target object is negatively correlated with the target special effect intensity. In one implementation, a special effect intensity adjustment parameter can be determined based on the first information, where the special effect intensity adjustment parameter is negatively correlated with the degree of occlusion of the target object. This special effect intensity adjustment parameter can be used as a coefficient and multiplied by a default preset special effect intensity to obtain the target special effect intensity.
[0063] In another implementation, a special effect intensity adjustment parameter may be determined based on the first information, where the special effect intensity adjustment parameter is positively or negatively correlated with the degree of occlusion of the target object. Then, based on a preset algorithm, the special effect intensity adjustment parameter is used to adjust the default special effect intensity to obtain a target special effect intensity that is negatively correlated with the degree of occlusion of the target object.
[0064] In this embodiment, the intensity of the target special effect is negatively correlated with the degree of obscuration of the target object. That is, the greater the degree of obscuration of the target object, the smaller the intensity of the special effect, and the smaller the degree of obscuration of the target object, the greater the intensity of the special effect. For example, the more obscured the target object is, the smaller the deformation and / or color change during the special effect processing, and the less obscured the target object is, the greater the deformation and / or color change during the special effect processing. This achieves a dynamic and smooth special effect gradient effect, improves the special effect quality, and further enhances the user experience.
[0065] In step 403 , special effect processing is performed on the target object according to the target special effect intensity based on the position information.
[0066] In this embodiment, special effects processing targeting the target object can be performed on each image frame based on the target object's corresponding position information and the target special effects intensity. Undetected image frames can be processed based on the position information and target special effects intensity of the most recently detected image frame. For example, when image frame Z0 is captured, detection result L0 can be obtained by detecting image frame Z0, and the target object's position information W0 and special effects intensity Q0 can be determined based on detection result L0. Image frame Z0 can be processed based on position information W0 and special effects intensity Q0. When image frames Z1, Z2, Z3, Z4, and Z5 are captured, no detection or identification of the target object is required. Image frames Z1, Z2, Z3, Z4, and Z5 can be processed based on position information W0 and special effects intensity Q0. When image frame Z6 is captured, detection result L1 can be obtained by detecting image frame Z6, and the target object's position information W1 and special effects intensity Q1 can be determined based on detection result L1. The image frame Z6 is subjected to special effects processing for the target object based on the position information W1 and the special effects intensity Q1, and the subsequent process will not be described in detail.
[0067] Because this embodiment can determine the position information corresponding to the target object based on the detection results of the target object in the image frame, and determine the target special effect intensity according to the degree of occlusion of the target object, it can perform special effects processing on the target object according to the target special effect intensity based on the above position information. This allows the target special effect intensity to change with the degree of occlusion of the target object, thereby achieving a gradual special effect effect after the target object is occluded, improving the user experience.
[0068] It should be noted that although the operations of the methods of the embodiments of the present disclosure are described in a specific order in the above embodiments, this does not require or imply that these operations must be performed in this specific order, or that all of the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flowcharts can be performed in a different order. Additionally or alternatively, certain steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0069] Corresponding to the aforementioned video stream processing method embodiment, the present disclosure also provides an embodiment of a video stream processing device.
[0070] As shown in FIG5 , FIG5 is a block diagram of a video stream processing device according to an exemplary embodiment of the present disclosure. The device may include: a detection module 501 , a determination module 502 and a processing module 503 .
[0071] The detection module 501 is configured to detect a target object in an image frame of a current video stream and obtain a detection result, wherein the detection result includes first information indicating a degree of shielding of the target object.
[0072] The determination module 502 is configured to determine a detection time for next detecting a target object in an image frame of a video stream based on the first information.
[0073] The processing module 503 is used to perform special effect processing on the target object based on the above detection results.
[0074] In some embodiments, the first information may include: a confidence level corresponding to the target object, and / or an area ratio of an area covered by the target object to an area occupied by the target object.
[0075] In other embodiments, the determination module 502 is configured to: if it is determined based on the first information that the target object is obscured to a degree greater than or equal to a first preset degree, use the time after a first interval as the detection time. If it is determined based on the first information that the target object is obscured to a degree less than the first preset degree, use the time after a second interval as the detection time. The first interval is less than the second interval.
[0076] In other implementations, the processing module 503 may include: a first determining submodule, a second determining submodule, and a processing submodule (not shown in the figure).
[0077] The first determination submodule is configured to determine the location information corresponding to the target object based on the above detection results.
[0078] The second determining submodule is used to determine a target special effect intensity based on the first information.
[0079] The processing submodule is used to perform special effect processing on the target object according to the target special effect intensity based on the above position information.
[0080] In other embodiments, the detection result may further include second information indicating the location of the target object, wherein the first determination submodule is configured to: upon determining that the first condition is satisfied based on the detection result, use the second information as the location information corresponding to the target object, and update pre-stored location reference information using the second information. Upon determining that the second condition is satisfied based on the detection result, use the pre-stored location reference information as the location information corresponding to the target object.
[0081] In other embodiments, the first condition may include that the target object is obscured to a degree less than a second preset degree, or that the position difference between the target object in the previous and next image frames is greater than or equal to a preset difference. The second condition may include that the target object is obscured to a degree greater than or equal to the second preset degree, and that the position difference between the target object in the previous and next image frames is less than a preset difference.
[0082] In some other embodiments, the second determining submodule is configured to: determine a special effect intensity adjustment parameter based on the first information, and use the special effect intensity adjustment parameter to adjust the preset special effect intensity to obtain a target special effect intensity, such that the target special effect intensity is negatively correlated with the degree of occlusion of the target object.
[0083] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiment scheme of the present disclosure. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0084] Figure 6 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure. As shown in Figure 6, the electronic device 910 includes a processor 911 and a memory 912, which can be used to implement a client or server. The memory 912 is used to store computer-executable instructions (e.g., one or more computer program modules) non-transiently. The processor 911 is used to run the computer-executable instructions, and when the computer-executable instructions are run by the processor 911, one or more steps in the video stream processing method described above can be executed, thereby implementing the video stream processing method described above. The memory 912 and the processor 911 can be interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0085] For example, the processor 911 may be a central processing unit (CPU), a graphics processing unit (GPU), or other processing units with data processing capabilities and / or program execution capabilities. For example, the central processing unit (CPU) may be an X86 or ARM architecture. The processor 911 may be a general-purpose processor or a dedicated processor, and may control other components in the electronic device 910 to perform desired functions.
[0086] For example, the memory 912 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, a flash memory, etc. One or more computer program modules may be stored on the computer-readable storage medium, and the processor 911 may execute one or more computer program modules to implement various functions of the electronic device 910. Various applications and various data, as well as various data used and / or generated by the applications, may also be stored in the computer-readable storage medium.
[0087] It should be noted that, in the embodiment of the present disclosure, the specific functions and technical effects of the electronic device 910 can be referred to the above description of the video stream processing method, which will not be repeated here.
[0088] Figure 7 is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure. The electronic device 920 is, for example, suitable for implementing the video stream processing method provided by the embodiment of the present disclosure. The electronic device 920 can be a terminal device, etc., which can be used to implement a client or a server. The electronic device 920 can include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. It should be noted that the electronic device 920 shown in Figure 7 is only an example and does not impose any restrictions on the functions and scope of use of the embodiments of the present disclosure.
[0089] As shown in FIG7 , the electronic device 920 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 921, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 922 or a program loaded from a storage device 928 into a random access memory (RAM) 923. Various programs and data required for the operation of the electronic device 920 are also stored in the RAM 923. The processing device 921, the ROM 922, and the RAM 923 are connected to each other via a bus 924. An input / output (I / O) interface 925 is also connected to the bus 924.
[0090] Typically, the following devices may be connected to the I / O interface 925: an input device 926 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 927 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 928 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 929. The communication device 929 may allow the electronic device 920 to communicate with other electronic devices wirelessly or by wire to exchange data. Although FIG. 7 shows the electronic device 920 having various devices, it should be understood that it is not required to implement or have all of the devices shown, and the electronic device 920 may alternatively implement or have more or fewer devices.
[0091] For example, according to an embodiment of the present disclosure, the above-mentioned video stream processing method can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the above-mentioned video stream processing method. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 929, or installed from the storage device 928, or installed from the ROM 922. When the computer program is executed by the processing device 921, the functions defined in the video stream processing method provided by the embodiment of the present disclosure can be implemented.
[0092] FIG8 is a schematic diagram of a storage medium provided in some embodiments of the present disclosure. For example, as shown in FIG8 , storage medium 930 may be a non-transitory computer-readable storage medium for storing non-transitory computer-executable instructions 931. When non-transitory computer-executable instructions 931 are executed by a processor, the video stream processing method described in the embodiments of the present disclosure may be implemented. For example, when non-transitory computer-executable instructions 931 are executed by a processor, one or more steps of the video stream processing method described above may be performed.
[0093] For example, the storage medium 930 may be applied to the above-mentioned electronic device. For example, the storage medium 930 may include a memory in the electronic device.
[0094] For example, the storage medium may include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a flash memory, or any combination of the above storage media, or other applicable storage media.
[0095] For example, the description of the storage medium 930 can refer to the description of the memory in the embodiment of the electronic device, and the repeated parts are not repeated. The specific functions and technical effects of the storage medium 930 can refer to the description of the video stream processing method above, and are not repeated here.
[0096] It should be noted that in the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, 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), an optical fiber, 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 that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0097] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the embodiments of the present disclosure. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The embodiments of the present disclosure are to be considered merely as exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.
[0098] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A video stream processing method, comprising: Detecting a target object in an image frame of a current video stream to obtain a detection result, wherein the detection result includes first information indicating a degree to which the target object is obscured; Based on the first information, determining a detection time for the target object in the image frame of the video stream next time; and Based on the detection result, special effect processing is performed on the target object.
2. The method according to claim 1, wherein: The first information includes: a confidence level corresponding to the target object, and / or an area ratio of an area shielded by the target object to an area occupied by the target object.
3. The method according to claim 1 or 2, wherein: The determining, based on the first information, a detection time of the target object in the image frame of the video stream for the next detection includes: If it is determined based on the first information that the target object is shielded to a degree greater than or equal to a first preset degree, the time after the first time interval is used as the detection time; If it is determined based on the first information that the target object is shielded to a degree less than the first preset degree, the time after a second time interval is used as the detection time; wherein the first time interval is less than the second time interval.
4. The method according to any one of claims 1 to 3, wherein: The performing special effect processing on the target object based on the detection result includes: Based on the detection result, determining the location information corresponding to the target object; Based on the first information, determining a target special effect strength; Based on the position information, special effect processing is performed on the target object according to the target special effect intensity.
5. The method according to claim 4, wherein: The detection result also includes second information indicating the position of the target object; wherein determining the position information corresponding to the target object based on the detection result includes: In a case where it is determined based on the detection result that the first condition is met, using the second information as the position information corresponding to the target object, and using the second information to update the pre-stored position reference information; When it is determined based on the detection result that the second condition is met, the pre-stored position reference information is used as the position information corresponding to the target object.
6. The method according to claim 5, wherein: The first condition includes that the degree of shielding of the target object is less than a second preset degree, or the position difference of the target object in the previous and next image frames is greater than or equal to a preset difference; The second condition includes that the target object is shielded to a degree greater than or equal to the second preset degree, and a position difference between the target object in the previous and next image frames is less than a preset difference.
7. The method according to any one of claims 4 to 6, wherein determining a target special effect strength based on the first information comprises: Based on the first information, determining a special effect intensity adjustment parameter; Using the special effect intensity adjustment parameter to adjust the preset special effect intensity to obtain the target special effect intensity; The intensity of the target special effect is negatively correlated with the degree to which the target object is shielded.
8. A video stream processing device, comprising: The detection module is configured to detect the target object in the image frame of the current video stream and obtain a detection result; The detection result includes first information indicating the degree to which the target object is shielded; a determination module configured to determine a detection time for the target object in the image frame of the video stream next time based on the first information; The processing module is configured to perform special effect processing on the target object based on the detection result.
9. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, wherein: The memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Video object division method based on change detection and frame difference accumulation
CN102970528A
Target detection method and device and fuzzy processing method and device
CN108460395A
Face detection method and device, electronic equipment and storage medium
CN113205079A
Video stream processing method and device and electronic equipment
CN117061822A
Method and device for image rendering processing
US20170163958A1