Video processing method and apparatus, device, computer readable storage medium, and product

The video processing method addresses the issue of flat special effects by using three-dimensional data and depth information to construct and adjust scan objects, resulting in more realistic and immersive special effects rendering.

WO2025056026A1PCT designated stage expired Publication Date: 2025-03-20BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/118755
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-15
Filing Date
2024-09-13
Publication Date
2025-03-20

AI Technical Summary

Technical Problem

The use of two-dimensional image content for special effects rendering results in flat and lacking depth, failing to meet user-specific demands for more immersive experiences.

Method used

A video processing method that involves obtaining three-dimensional data and depth information for target areas within video frames, constructing and adjusting scan objects based on this data to enhance the rendering of special effects, and rendering these objects within the frames to create a more realistic and three-dimensional effect.

Benefits of technology

The method effectively increases the realism and depth of special effects rendering, providing a more immersive experience by utilizing three-dimensional data and depth information to accurately represent the target area's spatial distribution and simulate real light sources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024118755_20032025_PF_FP_ABST
    Figure CN2024118755_20032025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a video processing method and apparatus, a device, a computer readable storage medium, and a product. The method comprises: acquiring a video to be processed, and determining three-dimensional data and depth information of a target area in a video frame corresponding to said video; on the basis of the three-dimensional data, constructing a scanning object to be adjusted; on the basis of the depth information, adjusting the shape of said scanning object, so as to obtain a target scanning object; determining a display position of the target scanning object in the video frame on the basis of movement setting information; and on the basis of the display position of the target scanning object in the video frame, rendering the target scanning object on the video frame to obtain a target video.
Need to check novelty before this filing date? Find Prior Art

Description

Video processing method, device, equipment, computer-readable storage medium and product

[0001] This application claims priority to Chinese patent application No. 202311197362.X filed on September 15, 2023. The contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as part of this application. Technical Field

[0002] The embodiments of the present disclosure relate to a video processing method, apparatus, device, computer-readable storage medium, and product. Background Art

[0003] With the continuous development of special effects technology, the variety of special effects is gradually increasing. Users can select their favorite special effects for content capture based on their actual needs. For example, users can select special effects that apply to specific areas for media content capture. During the media content capture process, special effects can be added to the user's target area to improve the quality of the captured media.

[0004] Summary of the Invention

[0005] The embodiments of the present disclosure provide a video processing method, apparatus, device, computer-readable storage medium, and product for solving the technical problem of flattened and non-stereoscopic effects caused by using two-dimensional image content for special effects rendering.

[0006] The present disclosure provides a video processing method, including:

[0007] Obtaining a video to be processed, and determining three-dimensional data and depth information of a target area in a video frame corresponding to the video to be processed;

[0008] constructing a scan object to be adjusted based on the three-dimensional data;

[0009] Adjusting the shape of the scan object to be adjusted according to the depth information to obtain a target scan object;

[0010] determining a display position of the target scanning object within the video frame according to the movement setting information;

[0011] The target scanning object is rendered onto the video frame according to the display position of the target scanning object in the video frame to obtain a target video.

[0012] An embodiment of the present disclosure provides a video processing device, including:

[0013] An acquisition module is configured to acquire a video to be processed and determine three-dimensional data and depth information of a target area in a video frame corresponding to the video to be processed;

[0014] a construction module, configured to construct a scan object to be adjusted based on the three-dimensional data;

[0015] an adjustment module, configured to adjust the shape of the scan object to be adjusted according to the depth information to obtain a target scan object;

[0016] a determination module configured to determine a display position of the target scanning object in the video frame according to the movement setting information;

[0017] The rendering module is configured to render the target scanning object onto the video frame according to the display position of the target scanning object in the video frame to obtain a target video.

[0018] An embodiment of the present disclosure provides an electronic device, comprising: at least one processor and at least one memory;

[0019] said at least one memory storing computer-executable instructions;

[0020] The at least one processor executes the computer-executable instructions stored in the at least one memory, so that the at least one processor executes the above video processing method and various possible designs of the above video processing method.

[0021] An embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above video processing method and various possible designs of the above video processing method are implemented.

[0022] An embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the above video processing method and various possible designs of the above video processing method. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0024] FIG1 is a flow chart of a video processing method according to an embodiment of the present disclosure;

[0025] FIG2 is a schematic diagram of a scan object to be adjusted according to an embodiment of the present disclosure;

[0026] FIG3 is a flow chart of a video processing method provided by another embodiment of the present disclosure;

[0027] FIG4 is a schematic diagram of a target scanning object provided by an embodiment of the present disclosure;

[0028] FIG5 is a flow chart of a video processing method provided by another embodiment of the present disclosure;

[0029] FIG6 is a flow chart of a video processing method provided by yet another embodiment of the present disclosure;

[0030] FIG7 is a schematic structural diagram of a video processing device provided by an embodiment of the present disclosure;

[0031] FIG8 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0033] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0034] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0035] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0036] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0037] Glossary:

[0038] A point cloud is a collection of points formed by obtaining the spatial coordinates of each sampled point on an object's surface. Point clouds used for 3D object detection are typically obtained from LiDAR scans and contain information such as the point's 3D coordinates and intensity.

[0039] Special effects applied to specific areas are typically rendered using two-dimensional information. However, these effects often result in a flat, lacking three-dimensional effect, failing to meet the user's personalized needs. To address the technical issue of using two-dimensional image content for special effects rendering, resulting in flat, lacking three-dimensional effects, the present disclosure provides a video processing method, apparatus, device, computer-readable storage medium, and product.

[0040] It should be noted that the video processing method, apparatus, device, computer-readable storage medium, and product provided by the present disclosure can be applied to any processing scenario of special effects rendering acting on a target area.

[0041] When users collect content based on special effects, they typically render the resulting 2D images. However, rendering based on 2D images often results in a flat, flat, and lacking three-dimensional quality, failing to meet users' personalized needs.

[0042] In the process of solving the above-mentioned technical problems, the inventors discovered through research that, in order to make the special effects rendering results more three-dimensional, the captured video frames can be processed using a preset 3D reconstruction algorithm to obtain 3D data, depth information, normal information, and other information associated with the target area. This allows the scanned object to be adjusted to be constructed based on the 3D data. Furthermore, the shape of the scanned object to be adjusted can be adjusted based on the depth information, so that the adjusted scanned object can more closely conform to the curvature of the target area, enhancing the three-dimensionality and realism of the scanned object.

[0043] Furthermore, the color of the scanned object to be adjusted can be adjusted based on the normal information, thereby simulating a real lighting effect, further improving the stereoscopic effect and realism of the target scanned object.

[0044] The system architecture underlying the disclosed embodiments includes at least a server and a terminal device. The terminal device is used to capture the video to be processed. The server includes a video processing device, which can be written in languages ​​such as C / C++, Java, Shell, or Python. The terminal device can be, for example, a desktop computer or tablet computer.

[0045] Based on the above system architecture, the server can obtain the video to be processed from the terminal device and, for each frame of the video to be processed, determine the 3D data and depth information of the target area in the video frame. Based on the 3D data, the server constructs the scan object to be adjusted and adjusts its shape based on the depth information to obtain the target scan object. The target scan object is then rendered into the video frame, controlling the terminal device to display the face scan effect.

[0046] As an operative approach, the video processing device can also be coupled to a terminal device. Thus, after capturing the video to be processed, the terminal device can determine the three-dimensional data and depth information of the target area in each frame of the video to be processed. Based on the three-dimensional data, the scanned object to be adjusted is constructed, and the shape of the scanned object to be adjusted is adjusted based on the depth information to obtain a target scanned object. The target scanned object is then rendered into the video frame, presenting a facial scan display effect.

[0047] FIG1 is a flow chart of a video processing method provided by an embodiment of the present disclosure. As shown in FIG1 , the method includes:

[0048] Step 101: Obtain a video to be processed, and determine three-dimensional data and depth information of a target area in a video frame corresponding to the video to be processed.

[0049] In this embodiment, a video to be processed may be obtained, wherein the video to be processed includes multiple video frames, and the video frames include a target area. For example, the target area may be a face area, or any area pre-specified by the user, and this disclosure does not limit this.

[0050] Optionally, the video to be processed may be collected in real time by a preset video collection device, or may be uploaded by a user according to actual needs, and the present disclosure does not impose any restrictions on this.

[0051] To implement special effects rendering for the video being processed, the 3D data and depth information of the target area in each frame of the video being processed can be determined. Unlike special effects rendering solutions based on 2D images, by identifying the 3D data and depth information of the target area, 3D data, typically obtained from LiDAR scans and containing information such as the 3D coordinates and intensity of points, can more accurately represent the 3D spatial distribution of the target area, resulting in a more three-dimensional and realistic special effects rendering effect.

[0052] As an implementable approach, any three-dimensional reconstruction algorithm may be used to achieve recognition of three-dimensional data and depth information of the target area, and the present disclosure does not impose any limitation on this.

[0053] Step 102: construct a scan object to be adjusted based on the three-dimensional data.

[0054] In this embodiment, after obtaining the three-dimensional data, a scanned object to be adjusted can be constructed based on the three-dimensional data, wherein the scanned object to be adjusted can be composed of at least one data point in the three-dimensional data, which can be displayed in any form of point, line, or surface.

[0055] In addition, since the three-dimensional data is a representation of the position of the human face, the scan object to be adjusted constructed based on the three-dimensional data can automatically follow the human face.

[0056] After the scan object to be adjusted is constructed, the display parameters of the scan object to be adjusted can be adjusted. For example, the display parameters such as color and brightness can be adjusted to make the scan object to be adjusted appear to be luminous.

[0057] For example, the scan object to be adjusted can be displayed in the form of a line. The scan object to be adjusted can be moved in the target area according to specific movement setting information to achieve a display effect of scanning the target area. The movement setting information includes but is not limited to parameters such as movement speed, movement acceleration, and movement direction.

[0058] Step 103: Adjust the shape of the scan object to be adjusted according to the depth information to obtain a target scan object.

[0059] In this embodiment, since the target area is often not a two-dimensional plane, it has ups and downs, corresponding to different depth values. For example, the depth value of the eye socket part in the target area is greater than the depth value of the nose part.

[0060] Therefore, in order to make the scanning object to be adjusted fit the target area more closely and present the display effect of a real light source irradiating the target area, the shape of the scanning object to be adjusted can be adjusted according to the depth information to obtain the target scanning object, so that the target scanning object can be moved according to the preset scanning parameters to realize the scanning operation of the target area.

[0061] Step 104: Determine a display position of the target scanning object in the video frame according to the movement setting information.

[0062] In this embodiment, the target scanning object can be moved according to preset scanning parameters to achieve a scanning operation on the target area. The video to be processed is often composed of multiple video frames with timestamps. Therefore, in order to present a coherent scanning effect in the processed video after special effects rendering, the display position of the target scanning object within each video frame is determined based on the movement setting information.

[0063] Step 105: Render the target scanning object onto the video frame according to the display position of the target scanning object in the video frame to obtain a target video.

[0064] In this embodiment, after determining the display position of the target scan object in each video frame, the target scan object can be rendered onto the video frame based on the display position of the target scan object in each video frame, thereby obtaining a target image frame. By arranging the multiple target image frames according to their corresponding timestamps, a target video with special effects rendering can be obtained. This allows the target jewelry to present a special effect display of a 3D face scan.

[0065] The video processing method provided in this embodiment determines the three-dimensional data and depth information of the target area in each video frame corresponding to the video to be processed after acquiring the video to be processed. Based on at least one data point in the three-dimensional data, a scanning object to be adjusted is constructed. The shape of the scanning object to be adjusted is adjusted based on the depth information to obtain a target scanning object. By adjusting the shape of the scanning object to be adjusted based on the depth information, the scanning object to be adjusted can be made to fit the target area more closely, thereby presenting a more three-dimensional and realistic display effect. In addition, by controlling the scanning operation of the target scanning object based on the movement setting information, the display effect of the target scanning object can be enriched, further enhancing the user experience.

[0066] Furthermore, based on any of the above embodiments, step 103 includes:

[0067] For each video frame, timestamp information corresponding to the video frame is determined.

[0068] A display position of the target scanning object within the video frame is determined based on the timestamp information and the movement setting information.

[0069] In this embodiment, the video to be processed often consists of multiple video frames with timestamps. Therefore, in order to determine the display position of the target scanning object, the timestamp information corresponding to each video frame can be first determined. The display position of the target scanning object within the video frame can then be determined based on the timestamp information and the movement setting information.

[0070] For example, the target scanning object can be scanned downward along the target area at a speed of 2 mm per second. Furthermore, the timestamp and display position of the first video frame can be determined. For each target video frame in the video to be processed, the time interval between the target video frame and the first video frame can be determined, and the movement distance of the target scanning object can be determined based on the time interval and the movement speed. The display position of the target three-dimensional object in the target video frame can be determined based on the display position, movement distance, and movement direction of the first video frame.

[0071] The video processing method provided in this embodiment determines the display position of the target scanning object based on the timestamp and movement setting information, thereby simulating the display effect of face scanning based on the target scanning object and improving the authenticity of the face scanning operation.

[0072] Optionally, based on any of the above embodiments, step 102 includes:

[0073] A connection operation is performed on a plurality of data points on a target horizontal line in the three-dimensional data to obtain a target line, and the target line is determined as the scan object to be adjusted.

[0074] or,

[0075] A connection operation is performed on a plurality of data points in an area that meets a preset condition in the three-dimensional data to obtain a target area, and the target area is determined as the scan object to be adjusted.

[0076] or,

[0077] A target data point that meets a preset condition is determined in the three-dimensional data, and the target data point is determined as the scan object to be adjusted.

[0078] In this embodiment, the scan object to be adjusted may be composed of at least one data point in three-dimensional data, which may be displayed in any form of point, line, or surface.

[0079] Optionally, the scan object to be adjusted can be displayed in the form of a line. A preset target horizontal line can be determined, and a connection operation can be performed on multiple data points on the target horizontal line in the three-dimensional data to obtain a target line, and the target line is determined as the scan object to be adjusted. Alternatively, a connection operation can be performed on multiple data points on a target vertical line to obtain a target line, and the target line is determined as the scan object to be adjusted. Alternatively, a connection operation can be performed on data points on a diagonal line of the three-dimensional data to obtain a target line, and the target line is determined as the scan object to be adjusted. The present disclosure does not limit the display position or display direction of the target line.

[0080] Optionally, the scanned object to be adjusted can be a planar display. A connection operation is performed on multiple data points within an area of ​​the three-dimensional data that meets a preset condition to obtain a target area, which is then determined as the scanned object to be adjusted. The preset condition can be a preset display area, such as an eye area or a mouth area, or a center area or an edge area, or an area with a depth value within a preset range, etc., and this disclosure does not impose any restrictions on this.

[0081] Optionally, the scan object to be adjusted can be displayed in the form of a point. A target data point that meets a preset condition is determined in the three-dimensional data, and the target data point is determined as the scan object to be adjusted. The preset condition can be a preset display position, such as a center position or a top position. Alternatively, the preset condition can be a position with the highest depth value or a position with the lowest depth value. This disclosure is not limited to this.

[0082] FIG2 is a schematic diagram of a scan object to be adjusted according to an embodiment of the present disclosure. As shown in FIG2 , the scan object to be adjusted can be a line-shaped object. After acquiring three-dimensional data 21, a connection operation can be performed on multiple data points 22 on a target horizontal line in the three-dimensional data 21 to obtain a target line, which is then identified as the scan object to be adjusted 23.

[0083] The video processing method provided in this embodiment constructs scanned objects to be adjusted in different shapes by adopting different methods, thereby further enriching the display effect of the scanned objects to be adjusted and improving the user experience.

[0084] FIG3 is a flow chart of a video processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG3 , step 102 includes:

[0085] Step 301: For a pixel point in the scanned object to be adjusted, determine a depth value corresponding to the pixel point according to the depth information.

[0086] Step 302: Determine shape adjustment information corresponding to the pixel point based on the depth value, wherein the shape adjustment information includes at least one of a shape adjustment amplitude and a shape adjustment direction.

[0087] Step 303: Perform a shape adjustment operation on the scan object to be adjusted according to the shape adjustment information corresponding to each pixel point to obtain the target scan object.

[0088] In this embodiment, since the target area is often not a two-dimensional plane, it has ups and downs. Therefore, in order to make the scanned object to be adjusted fit the target area more closely and present the display effect of a real light source irradiating the target area, the shape of the scanned object to be adjusted can be adjusted according to the depth information to obtain the target scanned object.

[0089] Optionally, for each pixel in the scanned object to be adjusted, a depth value corresponding to the pixel may be determined based on the depth information. Shape adjustment information corresponding to the pixel may be determined based on the depth value, wherein the shape adjustment information includes at least one of a shape adjustment amplitude and a shape adjustment direction.

[0090] For example, the target area could be the face, and the target pixel could be the pixel at the bridge of the nose. Because the bridge of the nose is higher, this target pixel is closer to the lens, and its corresponding depth value is smaller. When the scan object to be adjusted is a display effect projected by a preset linear light source onto a face, the higher the bridge of the nose, the more likely it will appear arched, meaning the shape adjustment direction is upward. The higher the bridge of the nose, the smaller the arch angle, meaning the greater the degree of shape adjustment.

[0091] Therefore, after determining the shape adjustment information corresponding to the pixel point based on the depth value, the shape adjustment operation can be performed on the scanned object to be adjusted according to the shape adjustment information corresponding to each pixel point to obtain the target scanned object, so that the target scanned object fits the target area more closely and presents a more realistic light source projection effect.

[0092] FIG4 is a schematic diagram of a target scanning object provided by an embodiment of the present disclosure. As shown in FIG4 , after constructing a scan object 42 to be adjusted based on three-dimensional data 41, the shape of the scan object 42 to be adjusted can be adjusted based on depth information to obtain a target scanning object 43. This target scanning object 43 can better fit the curvature of a human face, improving the authenticity of the target scanning object.

[0093] The video processing method provided in this embodiment adjusts the shape of the scanned object based on the depth information of the target area, so that the adjusted target scanned object can fit the target area more closely, thereby improving the authenticity and stereoscopicity of the rendering results of the three-dimensional scanning.

[0094] Furthermore, based on any of the above embodiments, after step 102, the following steps may be further included:

[0095] Adjusting the display parameters of the scanned object to be adjusted so that the scanned object to be adjusted presents a luminous display effect;

[0096] The display parameters include one or more of display area, color parameter, brightness parameter, and saturation parameter.

[0097] In this embodiment, in order to further enrich the display effect of the scanned object to be adjusted, the display parameters of the scanned object to be adjusted can be adjusted so that the scanned object to be adjusted presents a luminous display effect, wherein the display parameters include one or more of the display area, color parameters, brightness parameters, and saturation parameters.

[0098] FIG5 is a flow chart of a video processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG5 , after adjusting the display parameters of the scanned object to be adjusted, the method further includes:

[0099] Step 501: Determine normal information of a target area in the video frame.

[0100] Step 502: Perform a color adjustment operation on the target area based on the normal information and the illumination information of the scanned object to be adjusted.

[0101] In this embodiment, since the target area is often not a two-dimensional plane but has ups and downs, when a beam of light is projected onto the target area, different display positions may present different lighting effects.

[0102] Still taking practical applications as an example, the target area can be the human face area. When the light source is projected to the nose bridge, since the eye sockets are at a lower height and the brow bones are at a higher height, the light source projected to the nose bridge may have a partial lighting effect at the eye sockets, while the forehead will not show any lighting effect due to the obstruction of the brow bones.

[0103] Since the scanning object to be adjusted is a luminous scanning object, when the scanning object to be adjusted is scanned in the target area, it will cause changes in the lighting of the target area, and the normal information can truly present the realism and beauty of the lighting effect.

[0104] Therefore, the normal information of the target area in each video frame corresponding to the video to be processed can also be determined. The calculation of the normal information can be realized by using a preset 3D reconstruction algorithm, which is not limited in the present disclosure.

[0105] Furthermore, in order to make the luminous scanned object to be adjusted present a more realistic lighting effect, the lighting of the scanned object to be adjusted can be simulated based on the normal information to perform a color adjustment operation on the target area.

[0106] Further, based on any of the above embodiments, step 602 includes:

[0107] For a pixel point in the scanned object to be adjusted, color information corresponding to the pixel point is determined, and a normal vector corresponding to the pixel point is determined based on the normal information.

[0108] The color information, the normal vector, the illumination information of the scanned object to be adjusted, and the preset transformation intensity are processed by a preset color adjustment algorithm to determine the color adjustment parameters corresponding to the pixel points.

[0109] A color adjustment operation is performed on the pixel point and a display area associated with the pixel point according to the color adjustment parameter.

[0110] In this embodiment, the illumination information includes but is not limited to the illumination direction.

[0111] After obtaining the normal information, for each pixel in the scanned object to be adjusted, the color information C0 corresponding to the pixel is determined, and the normal vector N corresponding to the pixel is determined based on the normal information. A preset color adjustment algorithm is used to process the color information C0, the normal vector N, the illumination direction L of the scanned object to be adjusted, and the preset transformation intensity w to determine the color adjustment parameter C1 corresponding to the pixel.

[0112] The preset color adjustment algorithm may be as shown in Formula 1:

[0113] C1=w*((N*L)* C0)+(1-w)* C0 (1).

[0114] Among them, C0 is the color information corresponding to the pixel, w is the preset transformation intensity, and N is the normal vector.

[0115] After the color adjustment parameters are obtained through the above color adjustment algorithm, a color adjustment operation can be performed on the pixel points and the display area associated with the pixel points according to the color adjustment parameters.

[0116] The video processing method provided in this embodiment adjusts the color of the scanned object to be adjusted based on the normal information of the target area, thereby simulating the real lighting effect, making the scanned object to be adjusted appear to have a glowing effect, and further improving the display effect of the scanned object to be adjusted.

[0117] FIG6 is a flow chart of a video processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG6 , the method further includes:

[0118] Step 601: Acquire a preset random adjustment data set, wherein the random adjustment data set includes a plurality of random adjustment parameters, and the random adjustment parameters are used to adjust at least one of the color, shape, and motion trajectory of the scanned object to be adjusted.

[0119] Step 602: Select at least one video frame set from a plurality of video frames corresponding to the video to be processed according to a preset time period, wherein the video frame set includes at least one adjacent video frame.

[0120] Step 603: For each video frame set, randomly select random adjustment parameters from the random adjustment data set, and perform a random adjustment operation on the scan object to be adjusted in the at least one video frame based on the random adjustment parameters.

[0121] In this embodiment, in order to make the scanning object to be adjusted present a richer display effect, random faults can also be added to the scanning object to be adjusted, such as making the scanning object to be adjusted present a display effect of signal disturbance, controlling the scanning object to be adjusted to change color, controlling the moving speed of the scanning object to be adjusted to change the display effect, etc.

[0122] In order to better present the above-mentioned random faults, such as display effects such as signal disturbance, it is generally necessary to act on multiple video frames, so it is necessary to adjust the scanning objects to be adjusted corresponding to the multiple video frames.

[0123] Optionally, a preset random adjustment data set can be obtained, wherein the random adjustment data set includes multiple random adjustment parameters, and the random adjustment parameters are used to adjust at least one of the color, shape, and motion trajectory of the scanned object to be adjusted. By adjusting the scanned object to be adjusted based on the one or more random adjustment parameters, different display effects can be achieved for the scanned object to be adjusted.

[0124] Furthermore, at least one set of video frames is selected from the multiple video frames corresponding to the video to be processed according to a preset time period, and the video frame set includes at least one adjacent video frame. The random fault can be triggered according to the preset time period. For example, a random fault may be added every two seconds, or every N video frames, although this disclosure does not impose any restrictions on this. For each set of video frames, a random adjustment parameter is randomly selected from the random adjustment data set, and a random adjustment operation is performed on the scan object to be adjusted in at least one video frame based on the random adjustment parameter.

[0125] The video processing method provided in this embodiment can enrich the display effect and motion effect of the scanned object to be adjusted and improve the user experience by randomly adjusting the scanned object to be adjusted based on preset random adjustment parameters in the video to be processed.

[0126] Figure 7 is a structural diagram of a video processing device provided by an embodiment of the present disclosure. As shown in Figure 7, the device includes: an acquisition module 71, a construction module 72, an adjustment module 73, a determination module 74, and a rendering module 75. Among them, the acquisition module 71 is configured to acquire the video to be processed and determine the three-dimensional data and depth information of the target area in the video frame corresponding to the video to be processed. The construction module 72 is configured to construct the scanning object to be adjusted based on the three-dimensional data. The adjustment module 73 is configured to adjust the shape of the scanning object to be adjusted according to the depth information to obtain the target scanning object. The determination module 74 is configured to determine the display position of the target scanning object in the video frame according to the movement setting information. The rendering module 75 is configured to render the target scanning object onto the video frame according to the display position of the target scanning object in the video frame to obtain the target video.

[0127] Further, based on any of the above embodiments, the construction module is configured to: connect multiple data points on a target horizontal line in the three-dimensional data to obtain a target line, and determine the target line as the scan object to be adjusted. Alternatively, connect multiple data points within a region of the three-dimensional data that meets preset conditions to obtain a target region, and determine the target region as the scan object to be adjusted. Alternatively, determine a target data point in the three-dimensional data that meets preset conditions, and determine the target data point as the scan object to be adjusted.

[0128] Furthermore, based on any of the above embodiments, the adjustment module is configured to: determine, for each pixel in the scanned object to be adjusted, a depth value corresponding to the pixel based on the depth information; determine shape adjustment information corresponding to the pixel based on the depth value, wherein the shape adjustment information includes at least one of a shape adjustment amplitude and a shape adjustment direction; and perform a shape adjustment operation on the scanned object to be adjusted based on the shape adjustment information corresponding to each pixel to obtain the target scanned object.

[0129] Furthermore, based on any of the above embodiments, the determining module is configured to: determine, for each video frame, timestamp information corresponding to the video frame, and determine a display position of the target scanning object within the video frame based on the timestamp information and the movement setting information.

[0130] Furthermore, based on any of the above embodiments, the device also includes: an adjustment module, configured to adjust the display parameters of the scanned object to be adjusted so that the scanned object to be adjusted presents a luminous display effect; wherein the display parameters include one or more of the display area, color parameters, brightness parameters, and saturation parameters.

[0131] Furthermore, based on any of the above embodiments, the apparatus further includes: a determination module configured to determine normal information of a target area in the video frame; and an adjustment module configured to perform a color adjustment operation on the target area based on the normal information and illumination information of the scanned object to be adjusted.

[0132] Furthermore, based on any of the above embodiments, the adjustment module is configured to: for each pixel in the scanned object to be adjusted, determine the color information corresponding to the pixel, and determine the normal vector corresponding to the pixel based on the normal information. A preset color adjustment algorithm is used to process the color information, the normal vector, the illumination information of the scanned object to be adjusted, and a preset transformation intensity to determine a color adjustment parameter corresponding to the pixel. Color adjustment operations are then performed on the pixel and the display area associated with the pixel based on the color adjustment parameters.

[0133] Furthermore, based on any of the above embodiments, the apparatus further includes: an acquisition module configured to acquire a preset random adjustment dataset, wherein the random adjustment dataset includes multiple random adjustment parameters, and the random adjustment parameters are used to adjust at least one of the color, shape, and motion trajectory of the scanned object to be adjusted. A determination module configured to select at least one set of video frames from a plurality of video frames corresponding to the video to be processed according to a preset time period, wherein the video frame set includes at least one adjacent video frame. An adjustment module configured to randomly select a random adjustment parameter from the random adjustment dataset for each video frame set, and perform a random adjustment operation on the scanned object to be adjusted in the at least one video frame based on the random adjustment parameter.

[0134] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.

[0135] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the video processing method described in any of the above embodiments is implemented.

[0136] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer program product, including a computer program, which implements the video processing method as described in any of the above embodiments when executed by a processor.

[0137] In order to implement the above embodiment, an embodiment of the present disclosure further provides an electronic device, including: at least one processor and at least one memory.

[0138] The at least one memory stores computer-executable instructions.

[0139] The at least one processor executes the computer-executable instructions stored in the at least one memory, so that the at least one processor performs the video processing method as described in any of the above embodiments.

[0140] FIG8 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. As shown in FIG8 , the electronic device 800 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device shown in FIG8 is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0141] As shown in Figure 8, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the electronic device 800 are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0142] Typically, the following devices may be connected to the I / O interface 805: an input device 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although FIG8 shows an electronic device 800 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0143] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart 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 computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0144] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. 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 of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. 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 computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport 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.

[0145] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0146] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0147] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).

[0148] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation 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 flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of 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 than that 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 and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0149] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0150] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0151] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, 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 of the foregoing.

[0152] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0153] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0154] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A video processing method, comprising: Acquire a video to be processed, and determine three-dimensional data and depth information of a target area in a video frame corresponding to the video to be processed; constructing a scan object to be adjusted based on the three-dimensional data; Adjusting the shape of the scan object to be adjusted according to the depth information to obtain a target scan object; Determine a display position of the target scanning object in the video frame according to the movement setting information; The target scanning object is rendered onto the video frame according to the display position of the target scanning object in the video frame to obtain a target video.

2. The method according to claim 1, wherein: The step of constructing the scanned object to be adjusted based on the three-dimensional data includes: Connecting data points on a target horizontal line in the three-dimensional data to obtain a target line, and determining the target line as the scan object to be adjusted; or, Connecting a plurality of data points in an area that meets a preset condition in the three-dimensional data to obtain a target area, and determining the target area as the scan object to be adjusted; or, A target data point satisfying a preset condition is determined in the three-dimensional data, and the target data point is determined as the scan object to be adjusted.

3. The method according to claim 1, wherein: The step of adjusting the shape of the scanned object to be adjusted according to the depth information to obtain a target scanned object includes: For a pixel point in the scanned object to be adjusted, determining a depth value corresponding to the pixel point according to the depth information; Determining shape adjustment information corresponding to the pixel point based on the depth value, wherein the shape adjustment information includes at least one of a shape adjustment amplitude and a shape adjustment direction; A shape adjustment operation is performed on the scan object to be adjusted according to the shape adjustment information corresponding to each pixel point to obtain the target scan object.

4. The method according to claim 1, wherein: The step of determining the display position of the target scanning object in each video frame according to the movement setting information includes: For each video frame, determining timestamp information corresponding to the video frame; A display position of the target scanning object within the video frame is determined based on the timestamp information and the movement setting information.

5. The method according to claim 1, wherein: After constructing the scanned object to be adjusted based on the three-dimensional data, the method further includes: Adjusting the display parameters of the scanned object to be adjusted so that the scanned object to be adjusted presents a luminous display effect; The display parameters include one or more of display area, color parameter, brightness parameter and saturation parameter.

6. The method according to claim 5, wherein: After the display parameters of the scan object to be adjusted are adjusted, the method further includes: Determining normal information of a target area in the video frame; A color adjustment operation is performed on the target area based on the normal information and the illumination information of the scanned object to be adjusted.

7. The method according to claim 6, wherein: The step of simulating the illumination of the scanned object to be adjusted based on the normal information to perform a color adjustment operation on the target area includes: For a pixel point in the scanned object to be adjusted, determine color information corresponding to the pixel point, and determine a normal vector corresponding to the pixel point based on the normal information; Performing data processing on the color information, the normal vector, the illumination information of the scanned object to be adjusted, and the preset transformation intensity through a preset color adjustment algorithm to determine the color adjustment parameter corresponding to the pixel point; A color adjustment operation is performed on the pixel point and a display area associated with the pixel point according to the color adjustment parameter.

8. The method according to any one of claims 1 to 7, further comprising: Acquire a preset random adjustment data set, wherein the random adjustment data set includes a plurality of random adjustment parameters, and the random adjustment parameters are used to adjust at least one of the color, shape, and motion trajectory of the scanned object to be adjusted; Selecting at least one set of video frames from a plurality of video frames corresponding to the video to be processed according to a preset time period, wherein the video frame set includes at least one adjacent video frame; For each video frame set, a random adjustment parameter is randomly selected from the random adjustment data set, and a random adjustment operation is performed on the scan object to be adjusted in the at least one video frame based on the random adjustment parameter.

9. A video processing device, comprising: An acquisition module is configured to acquire a video to be processed and determine three-dimensional data and depth information of a target area in a video frame corresponding to the video to be processed; A construction module, configured to construct a scan object to be adjusted based on the three-dimensional data; an adjustment module, configured to adjust the shape of the scanned object to be adjusted according to the depth information to obtain a target scanned object; a determination module, configured to determine a display position of the target scanning object in the video frame according to the movement setting information; The rendering module is configured to render the target scanning object onto the video frame according to the display position of the target scanning object in the video frame to obtain a target video.

10. An electronic device, characterized in that: include: at least one processor and at least one memory; The at least one memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the at least one memory, so that the at least one processor performs the video processing method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the video processing method according to any one of claims 1 to 8 is implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the video processing method according to any one of claims 1 to 8 is implemented. 。

Citation Information

Patent Citations

  • Video processing method, device and equipment, computer readable storage medium and product

    CN117241060A

  • Video special effect processing method and apparatus, electronic device, and program product

    WO2023103720A1

  • Special effect rendering

    WO2023142650A1

  • Method and apparatus for determining special effect video, and electronic device and storage medium

    WO2023160363A1