Image processing method, special-effect rendering method, and apparatus, device and storage medium

By performing panoramic de-distortion and matting processing on the frames captured by VR binocular panoramic cameras, the problem of inaccurate binocular matting results is solved and high-accuracy and consistent matting in virtual reality scenes is achieved. Effect.

WO2024193401A1PCT designated stage expired Publication Date: 2024-09-26BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/081264
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-22
Filing Date
2024-03-12
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

Existing image processing methods cannot effectively achieve the accuracy and consistency of VR binocular matting results. Especially when matting people in frames captured by binocular panoramic cameras, there is large distortion, resulting in inaccurate matting results. .

Method used

By performing panoramic de-distortion processing on the received picture frames, after reducing the distortion, the network model is used for matting processing, and edge optimization is performed in the matting results to ensure the accuracy and consistency of the matting results.

Benefits of technology

The accuracy and consistency of binocular matting results are improved, ensuring the effectiveness and authenticity of matting in virtual reality scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024081264_26092024_PF_FP
    Figure CN2024081264_26092024_PF_FP
Patent Text Reader

Abstract

Provided in the embodiments of the present disclosure are an image processing method, a special-effect rendering method, and an apparatus, a device and a storage medium. The image processing method comprises: performing panoramic undistortion processing on a received picture frame to obtain an undistorted picture frame; determining, according to the undistorted picture frame, a picture frame to be processed, and obtaining a matted picture frame on the basis of the picture frame to be processed; and determining, according to the matted picture frame, a target matted picture frame corresponding to the received picture frame, and implementing edge optimization on a target object in the target matted picture frame on the basis of panoramic undistortion.
Need to check novelty before this filing date? Find Prior Art

Description

Image processing, special effects rendering method, device, equipment and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 22, 2023, with application number 202310288171.8, and invention name “A method, device, equipment and storage medium for image processing and special effects rendering”, the entire contents of which are incorporated into this application by reference. Technical Field

[0002] The embodiments of the present disclosure relate to the field of image processing technology, and in particular to an image processing and special effects rendering method, apparatus, device, and storage medium. Background Art

[0003] Virtual reality (VR) technology is gradually being incorporated into people's lives. With the development of VR technology, current VR devices now have the same functions as physical electronic devices, allowing the installation and use of application software. For example, with popular live streaming software, VR devices can display the installed live streaming client on the display panel of the virtual scene, and viewers can trigger the live streaming client to access live streaming related functions and applications.

[0004] In VR live streaming applications, the host's implementation differs from that in the real world. For example, the host uses a binocular panoramic camera to capture images and generate a binocular panoramic video stream, which is then transmitted via the live streaming server to the live streaming client for viewers to watch. Similar to the functionality of real live streaming applications, both the host and the audience can trigger special effects during the live broadcast, which are then displayed in real time on the live broadcast screen.

[0005] Typically, special effects rendering in live broadcasts involves processing frames in the original video stream. For example, a special effect implementation requires obtaining a cutout of a person in a frame, which necessitates character cutout processing. However, existing image processing methods cannot effectively cut out characters in such images, and cannot guarantee the accuracy and consistency of VR binocular cutout results.

[0006] Summary of the Invention

[0007] The present disclosure provides an image processing and special effects rendering method, apparatus, device and storage medium to achieve effective cutout of picture frames, thereby improving the accuracy and consistency of binocular cutout results.

[0008] In a first aspect, an embodiment of the present disclosure provides an image processing method, the image processing method comprising:

[0009] Performing panoramic dedistortion processing on the received picture frames to obtain dedistorted picture frames;

[0010] Determine a picture frame to be processed according to the dedistorted picture frame, and obtain a cutout picture frame based on the picture frame to be processed;

[0011] According to the cutout picture frame, a target cutout picture frame corresponding to the received picture frame is determined, and edge optimization of a target object in the target cutout picture frame is achieved based on panoramic dedistortion.

[0012] In a second aspect, an embodiment of the present disclosure provides a special effects rendering method, the special effects rendering method comprising:

[0013] In response to the received special effect triggering instruction, obtaining special effect rendering material corresponding to the special effect triggering instruction;

[0014] Taking the left-eye panoramic picture frame and the right-eye panoramic picture frame in the received binocular panoramic picture frames as received picture frames, and processing the received picture frames according to the method described in the embodiment of the first aspect to obtain a binocular target cutout picture frame;

[0015] Special effects rendering is performed according to the binocular target cutout picture frame, special effects rendering material and the determined depth information to obtain a binocular panoramic special effects picture frame.

[0016] In a third aspect, an embodiment of the present disclosure further provides an image processing device, the image processing device comprising:

[0017] A dedistortion processing module is used to perform panoramic dedistortion processing on the received picture frames to obtain dedistorted picture frames;

[0018] a target cutout determination module, configured to determine a to-be-processed picture frame according to the dedistorted picture frame, and obtain a cutout picture frame based on the to-be-processed picture frame;

[0019] The panoramic cutout determination module is used to determine a target cutout frame corresponding to the received frame according to the cutout frame, and the edge optimization of the target object in the target cutout frame is achieved based on panoramic dedistortion.

[0020] In a fourth aspect, an embodiment of the present disclosure further provides a special effects rendering device, the special effects rendering device comprising:

[0021] A material acquisition module, configured to obtain, in response to a received special effect trigger instruction, a special effect rendering material corresponding to the special effect trigger instruction;

[0022] a cutout picture determination module, configured to take the left-eye panoramic picture frame and the right-eye panoramic picture frame in the received binocular panoramic picture frames as received picture frames, and process the received picture frames according to the method described in the embodiment of the first aspect to obtain a binocular target cutout picture frame;

[0023] The special effects picture determination module is used to perform special effects rendering according to the binocular target cutout picture frame, special effects rendering material and the determined depth information to obtain a binocular panoramic special effects picture frame.

[0024] In a fifth aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0025] one or more processors;

[0026] a storage device for storing one or more programs,

[0027] When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any embodiment of the present invention.

[0028] In a sixth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any embodiment of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0030] FIG1 is a flow chart of an image processing method provided by an embodiment of the present disclosure;

[0031] FIG2 shows a display diagram of a picture frame captured by a panoramic camera in the prior art;

[0032] FIG3 shows a diagram showing the effect of dedistorting a picture frame in an image processing method provided by an embodiment of the present disclosure;

[0033] FIG4 shows an example flow chart of an image processing method executed in a certain application scenario provided by an embodiment of the present disclosure;

[0034] FIG5 is a schematic diagram showing a flow chart of a special effects rendering method provided by an embodiment of the present disclosure;

[0035] FIG6 shows an example diagram of the execution flow of a special effects rendering method provided by an embodiment of the present disclosure;

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

[0037] FIG8 shows a schematic structural diagram of a special effects rendering device provided by an embodiment of the present disclosure;

[0038] FIG9 shows a structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0039] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0040] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0041] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0042] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0043] It should be noted that the modifications of “one” and “multiple” mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as “one or more”.

[0044] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0045] 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.

[0046] 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.

[0047] 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.

[0048] 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.

[0049] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.

[0050] It's important to note that current VR devices also possess the same functions as physical electronic devices, allowing for the installation and use of application software. For example, with popular live streaming software, VR devices can display the installed live streaming client on their virtual scene display panel. Live viewers can trigger the live streaming client to access live streaming-related functional applications. For viewers, after donning VR equipment (such as VR glasses), a virtual panel appears in front of them, displaying triggerable functional applications. For example, when a viewer triggers a live streaming application, they can watch the live broadcast in the virtual scene. Once the viewer dons the VR device and triggers the live streaming interface, they can select the desired live broadcast room and watch the live broadcast in the virtual reality scene. When a live streamer broadcasts live to a camera, the camera captures the live stream and transmits it in real time to the video client via the server, allowing players to watch the live broadcast in real time in the virtual reality scene.

[0051] In live streaming applications using VR technology, the host's implementation differs from that in the real world. Wearing VR equipment is equivalent to a 3D scene, and images captured by a panoramic camera are required. The normal display image is what is seen in the 3D scene. For example, the host using VR technology needs to use a binocular panoramic camera to capture images to form a binocular panoramic video stream, which is then transmitted to the live streaming client via the live streaming server for the audience to watch.

[0052] Generally, video clients or anchor terminals often have applications for special effects triggering. For example, when the audience wants to send the special effects of "flowers" to the anchor, the special effects of "flowers" will be presented in real time. When the anchor wants to present the special effects of the anchor in the sea to the audience, the corresponding special effects can also be triggered to achieve the corresponding effects. When the special effects are triggered and rendered, they are not directly overlaid on the live screen. The parts that need to be rendered (such as characters) need to be cut out separately, and then rendered based on the characters and special effects materials, and then rendered into the corresponding scene. At this time, the problem of portrait cutout is involved. When performing cutout in the existing technology, a cutout model can be pre-trained, and the image can be input into the cutout model to output the desired cutout. However, the panoramic image in the binocular scene is greatly distorted, and the accuracy and consistency of the binocular cutout results cannot be guaranteed. Therefore, it should be considered how to achieve effective cutout of the picture frames captured by the binocular panoramic camera.

[0053] Based on this, an embodiment of the present disclosure provides an image processing method. Figure 1 shows a flow chart of an image processing method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation where a picture frame is cut out. The method can be executed by an image processing device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which is preferably a mobile terminal, a desktop computer, a laptop computer, a server, etc.

[0054] As shown in FIG1 , the image processing method provided by the embodiment of the present disclosure may specifically include:

[0055] S101: Perform panoramic dedistortion processing on received picture frames to obtain dedistorted picture frames.

[0056] In this embodiment, the image frames are captured by a panoramic camera with a wider shooting angle than a standard camera. Images captured by this type of camera exhibit certain distortion in the appearance of people and scenery, particularly at the edges. The image frames can be combined into a video stream for continuous, real-time transmission to the client. For example, a VR binocular camera uses two fisheye cameras, each capable of capturing video with a 180-degree field of view. A fisheye lens is composed of a combination of more than a dozen different lenses. During the imaging process, incident light undergoes varying degrees of refraction and is projected onto a limited imaging plane, resulting in a larger field of view than a standard lens. It should be noted that the image frames can be, but are not limited to, binocular images. For binocular images, the left and right images can be processed separately. For example, Figure 2 shows an example of an image frame captured by a panoramic camera in the prior art. As can be seen in Figure 2, the outline of a box, which should be a straight line, is distorted in the image frame, resulting in a certain curvature.

[0057] Taking into account the existence of certain distortion in the picture frame, it is necessary to perform panoramic dedistortion on the picture frame before performing the cutout processing on the picture frame. The specific implementation of the panoramic dedistortion on the picture frame is to perform a projection transformation, and the fisheye projection method is adopted in this embodiment. The picture frame is composed of various pixel points. When the picture frame is known, the pixel coordinates of each pixel point and the pixel value of the pixel point can be obtained. When performing panoramic dedistortion on the picture frame, the pixel coordinates of each pixel point in the picture frame can be transformed, and then based on the correspondence between the pixel coordinates before the transformation and the pixel coordinates after the transformation, the pixel value of the pixel point corresponding to the pixel coordinates before the transformation is set to the pixel value of the pixel point corresponding to the pixel coordinates after the transformation.

[0058] In this embodiment, the image frame is captured by a panoramic camera. The captured image is equivalent to a spherical image. In order to image the curved image, the spherical image data needs to be projected onto a plane. In this embodiment, the image frame can be understood as data under equirectangular projection (ERP).

[0059] It is understandable that in equidistant cylindrical projection, the coordinates in the Cartesian coordinate system are converted into coordinates in the spherical coordinate system, and then some of the coordinates in the spherical coordinate system are linearly mapped to the pixel coordinate system, which will produce large distortion. Since the data under the equidistant cylindrical projection will have large distortion at the edges, in this embodiment, it is reprojected as fisheye data to reduce distortion. The pixel point information in the picture frame can be converted into data under the fisheye projection by using the fisheye projection change. In this embodiment, the picture frame is subjected to panoramic dedistortion processing, that is, the picture frame obtained after fisheye projection is recorded as the dedistorted picture frame.

[0060] In this embodiment, before performing the cutout processing on the image frame, the image frame is first subjected to panoramic dedistortion processing to obtain a dedistorted image frame. The dedistorted image frame is used as the basic data for the subsequent cutout processing, which can improve the cutout effect and increase the accuracy of the cutout. For example, FIG3 shows the effect of a dedistorted image frame in an image processing method provided by an embodiment of the present disclosure. As can be seen from FIG3, after the panoramic dedistortion processing, the outline 1 of the box in the dedistorted image frame is free of distortion and becomes a straight line.

[0061] S102: Determine a to-be-processed picture frame according to the dedistorted picture frame, and obtain a cutout picture frame based on the to-be-processed picture frame.

[0062] In this embodiment, after obtaining the dedistorted image frame in the above steps, the dedistorted image frame can also be optimized, and the optimized image frame is recorded as the image frame to be processed. Directly performing cutout processing on the captured high-resolution image frame will result in errors at the edges of the cutout result, making it impossible to ensure the stability of the cutout result, and will consume a large amount of computing resources and have low processing efficiency. Therefore, before performing cutout processing on the dedistorted image frame, the dedistorted image frame is first downsampled, and the dedistorted image frame after the downsampling processing is recorded as the image frame to be processed.

[0063] Continuing with the above description, after determining the image frame to be processed, the image frame to be processed can be subjected to cutout processing. In this embodiment, the image frame to be processed can be subjected to cutout processing through a network model. The purpose of performing image processing through this network model is to identify the target object in the image and cut out the target object. Therefore, in this embodiment, the network model can be regarded as a target object cutout model formed through training. This is equivalent to using image training samples combined with given training logic to perform model training on a pre-built cutout model, thereby forming the final network model.

[0064] Specifically, the picture to be processed is used as input data and input into the network model. After the network model performs cutout processing on the picture to be processed, the output result is a cutout picture frame, which is recorded as a cutout picture frame in this embodiment. Preferably, the network model is used to cut out the target object in the picture frame, and it can be based on a large number of various types of marked picture frames as samples, and the picture frame should contain the target object. For example, if the picture frame is a live picture frame, and the person in the live picture frame needs to be cut out, the dedistorted and optimized live picture frame can be input into the network model, and a cutout picture frame containing only the person can be obtained.

[0065] S103 : Determine a target cutout frame corresponding to the received frame according to the cutout frame, and optimize the edge of a target object in the target cutout frame based on panoramic dedistortion.

[0066] It should be noted that the original image frame is distorted. After performing panoramic dedistortion on the image frame and then performing target object cutout on the processed image, more effective edge optimization can be achieved. The target object can be specifically understood as the object to be captured in the image frame, for example, a person, a building, etc. The edge optimization of the target object depends on the dedistortion effect of the panoramic dedistortion on the image frame, and there is a correlation between the two.

[0067] In this embodiment, since the cutout picture frame is input into the network model for cutout after the dedistorted picture frame is downsampled, the cutout result obtained will also be a cutout result of the corresponding resolution. There is a large error in the edge of the target object between the cutout result and the high-resolution picture frame initially input. Therefore, it is necessary to optimize the edge area of ​​the cutout task in the cutout picture frame. After obtaining the cutout picture frame, the edge area of ​​the target object in the cutout picture frame is further optimized to obtain a more accurate cutout edge. Exemplarily, the way to optimize the edge area is: the dedistorted picture frame is used as a guide map to perform guided filtering on the cutout picture frame. The picture frame obtained after the guided filtering process has been upsampled, and the output resolution is improved. The cutout result with improved resolution is then Gaussian blurred to achieve smoothing, and the smoothed picture frame is then binarized to obtain the processed cutout optimized picture frame.

[0068] In this embodiment, the output result, that is, the cutout optimized picture frame is converted back into the original format, and the fisheye data is converted into the data format of the equidistant cylindrical projection. The process of dedistorting and restoring the cutout optimized picture is equivalent to the reverse process of performing a projection panoramic dedistortion process on the picture frame. Specifically, by obtaining the pixel point information of the cutout optimized picture frame, the pixel point information includes pixel point coordinates and pixel values, and performing a projection transformation on the pixel point coordinates of each pixel point in the cutout optimized picture frame to obtain the pixel coordinate value of the equidistant cylindrical projection, and then assigning the pixel value to the corresponding pixel point, the target cutout picture frame with the same image format as the picture frame can be restored. Exemplarily, the pixel value range of each pixel point in the target cutout picture frame is 0 to 255, where 255 represents the target object and 0 represents the background.

[0069] An image processing method provided by an embodiment of the present disclosure can first perform panoramic dedistortion processing on a received image frame to obtain a dedistorted image frame; then determine a to-be-processed image frame based on the dedistorted image frame, and obtain a cutout image frame based on the to-be-processed image frame; and finally, determine a target cutout image frame corresponding to the received image frame based on the cutout image frame. The above technical solution of this embodiment first performs panoramic dedistortion processing on the received image frame, and then performs cutout and edge optimization processing on the target object based on the panoramic dedistorted image frame, which can achieve effective cutout of such images and improve the accuracy and consistency of binocular cutout results.

[0070] As an optional embodiment of the above-mentioned embodiment of the present disclosure, the implementation of performing panoramic dedistortion processing on the received picture frame to obtain the dedistorted picture frame can be optimized into the following steps:

[0071] a1) Obtain pixel information of the picture frame.

[0072] The pixel information includes pixel coordinates and corresponding pixel values. Specifically, the pixel coordinates and pixel values ​​of each pixel in the picture frame are obtained. Different pixels in the picture frame have different pixel coordinates and pixel values. The pixel value may be a value between 0 and 255. Specifically, the pixel information of each pixel in the picture frame can be obtained through a preset pixel information extraction device.

[0073] b1) determining a dedistorted picture frame of the picture frame according to the pixel point information.

[0074] After obtaining the pixel coordinates and pixel values ​​of each pixel in the picture frame as described above, the pixel coordinates of each pixel in the picture frame are projectively transformed, and the pixel coordinates of each pixel after the projection transformation can be obtained. Among them, the coordinate transformation can be performed based on a projection de-distortion model, and the projection de-distortion model can be understood as a mapping model for performing fisheye projection on the data of the picture frame. After the projection change, the correspondence between the coordinates of each pixel before the transformation and the coordinates of each pixel after the transformation can be determined, and when assigning the pixel values ​​of each pixel after the transformation, the assignment can be based on the pixel values ​​of the corresponding pixels before the transformation. It is equivalent to forming a new picture frame on a new layer, and filling the pixel values ​​on the layer where the pixel values ​​are all 0 to form a circle.

[0075] In this embodiment, after the coordinates of each pixel in the image frame are transformed based on the projective dedistortion model, it can be understood that the transformed image frame only contains the pixel coordinates of the pixels, and pixel values ​​need to be assigned to each pixel. The pixel values ​​of each pixel in the pre-transformed image frame are assigned to the corresponding pixels in the dedistorted projected image frame. This ensures that after the panoramic dedistortion process, the edges of the image frame are panoramically dedistorted, but the specific content of the image frame remains unchanged.

[0076] This optional embodiment concretizes the steps of performing panoramic dedistortion processing on the received picture frames to obtain dedistorted picture frames, performs panoramic dedistortion processing on the picture frames based on the projection dedistortion model, and uses the resulting dedistorted picture frames as basic data for subsequent cutout processing, thereby ensuring effective cutout of the picture frames and improving the accuracy of the cutout.

[0077] Furthermore, the optimization of determining the dedistorted picture frame of the picture frame according to the pixel point information is as follows:

[0078] b11) Obtaining pixel values ​​and first pixel coordinates of pixels in the picture frame from the pixel information.

[0079] In this embodiment, the pixel information includes pixel coordinates and pixel values. The pixel value and pixel coordinates of each pixel in the picture frame are obtained from the pixel information, and the pixel coordinates are marked as first pixel coordinates.

[0080] b12) Substituting the first pixel point coordinates into the projection dedistortion model, the coordinate results obtained are used as the second pixel point coordinates of the corresponding pixel point.

[0081] Among them, there are many projection functions in fisheye projection. The most common one is equidistant projection d = fθ. The exit angle is smaller than the incident angle. Each pixel point is projected onto the plane in the form of similar triangles. When the original two sides are known, the position of each pixel point after projection can be obtained accordingly.

[0082] In this embodiment, after substituting the first pixel coordinates into the projective dedistortion model, a coordinate result after projective transformation of the first pixel coordinates can be obtained. This coordinate result is used as the pixel coordinate of the corresponding pixel, which is recorded as the second pixel coordinate in this embodiment. The projective dedistortion transformation is performed on the first pixel coordinates of each pixel in the image frame to obtain the second pixel coordinates of each pixel.

[0083] b13) Based on the coordinates of the second pixel point and the pixel values ​​of the corresponding pixel points, a dedistorted picture frame of the picture frame is formed.

[0084] Specifically, after the projection change is performed, the correspondence between the coordinates of each pixel point before the transformation and the coordinates of each pixel point after the transformation can be determined. When assigning the pixel value of each pixel point after the transformation, the assignment can be based on the pixel value of the corresponding pixel point before the transformation. In this embodiment, after the coordinates of each pixel point in the picture frame are transformed based on the projection dedistortion model, it can be understood that the converted picture frame only contains the pixel coordinates of the pixel point, and it is also necessary to assign pixel values ​​to each pixel point. The pixel values ​​of each pixel point in the picture frame before the transformation are respectively assigned to the corresponding pixel points in the picture frame after the dedistortion projection, thereby ensuring that after the panoramic dedistortion process, the edges of the picture frame are dedistorted, but the specific content of the picture frame does not change. According to the correspondence between the coordinates of each second pixel point and the coordinates of the first pixel point, the pixel value of the corresponding pixel point can be assigned to the corresponding pixel point, thereby forming a dedistorted picture frame of the picture frame.

[0085] This optional embodiment specifies how to determine the dedistorted picture frame of the picture frame based on a given projection dedistortion model combined with pixel information, perform projection transformation on the pixel coordinates of the pixel points in the picture frame based on the projection dedistortion model, and assign pixel values ​​to each pixel after the converted coordinates according to the pixel values ​​of the pixel points in the picture frame, thereby realizing the dedistorted picture frame after panoramic dedistortion processing. The formed dedistorted picture frame serves as the basic data for subsequent cutout processing, ensuring the effective cutout of the picture frame and improving the accuracy of the cutout.

[0086] As another optional embodiment of the above-mentioned embodiment of the present disclosure, the implementation of determining the to-be-processed picture frame according to the dedistorted picture frame may be optimized into the following steps:

[0087] a2) Determine the input resolution of the dedistorted picture frame.

[0088] Considering that frames transmitted via video streams have very high resolution, the resolution of the dedistorted frames should also be high. However, if high-resolution frames are clipped, there will be some edge errors, resulting in suboptimal clipping results. Furthermore, clipping high-resolution frames consumes significant computing resources, impacting clipping efficiency and failing to guarantee real-time playback.

[0089] To address the above issues, in this embodiment, the resolution of the dedistorted frame is processed to reduce errors and computing resource usage during frame cutout. First, this step is used to determine the input resolution of the dedistorted frame. For example, the input resolution of a dedistorted frame is 8K.

[0090] b2) Sampling the dedistorted picture frame according to a first set multiple of the input resolution, and determining the first picture frame after the sampling process as the picture frame to be processed.

[0091] This step is used to downsample the dedistorted frame to reduce its resolution. The first set multiple can be a value less than 1, and preferably is set to 1 / 8. Specifically, the dedistorted frame is downsampled according to the first set multiple of the input resolution. The resulting frame is recorded as a first frame, and the first frame is determined as the frame to be processed.

[0092] This optional embodiment concretizes the steps of determining the to-be-processed picture frame based on the dedistorted picture frame. By downsampling the dedistorted picture frame, the downsampled picture frame is used as the to-be-processed picture frame, thereby ensuring a smaller error during the subsequent cutout processing, saving computing resources during the cutout processing, improving the cutout efficiency, and ensuring the real-time playback of the picture frame.

[0093] As another optional embodiment of the above-mentioned embodiment of the present disclosure, determining a target cutout picture frame corresponding to the received picture frame according to the cutout picture frame may include:

[0094] a3) Optimizing the edge area of ​​the target object in the cutout picture frame to obtain a processed cutout optimized picture frame.

[0095] In this embodiment, there is a large error in the edge of the target object between the cutout picture frame and the initially input high-resolution picture frame. After obtaining the cutout picture frame, the edge area of ​​the target object in the cutout picture frame is further optimized to obtain a more accurate cutout edge. Exemplarily, the way to optimize the edge area is: the dedistorted picture frame is used as a guide map to perform guided filtering on the cutout picture frame. The picture frame obtained after the guided filtering process has been upsampled, and the output resolution is improved. The cutout result with improved resolution is then Gaussian blurred to achieve smoothing, and the smoothed picture frame is then binarized to obtain the processed cutout optimized picture frame.

[0096] b3) performing dedistortion restoration on the cutout optimized picture frame to obtain a target cutout picture frame corresponding to the picture frame image after restoration.

[0097] In this embodiment, since the picture frame undergoes image format conversion during the panoramic dedistortion process before the cutout, in order to ensure that the output target cutout picture frame can also be applied to the virtual reality scene for picture display, it is necessary to ensure that the image format is the same. This step is equivalent to converting the output result, that is, the cutout optimized picture frame, into the original format, and converting the fisheye data into the data format of the equidistant cylindrical projection. The process of dedistorting and restoring the cutout optimized picture is equivalent to the reverse process of the projected panoramic dedistortion process on the picture frame. Specifically, by obtaining the pixel point information of the cutout optimized picture frame, the pixel point information includes pixel point coordinates and pixel values, and performing a projection conversion on the pixel point coordinates of each pixel point in the cutout optimized picture frame to obtain the pixel coordinate value of the equidistant cylindrical projection, and then assigning the pixel value to the corresponding pixel point, the target cutout picture frame corresponding to the picture frame image can be restored.

[0098] This optional embodiment concretizes the steps of determining the target cutout picture frame corresponding to the picture frame based on the cutout picture frame, and optimizes the edge area of ​​the target object in the cutout picture frame, and then restores the processed picture frame to the target cutout picture frame with the same image format as the picture frame, thereby achieving effective cutout of the picture frame and improving the cutout accuracy.

[0099] Furthermore, the process of processing the edge area of ​​the target object in the cutout picture frame to obtain the processed cutout optimized picture frame is implemented by the following steps:

[0100] a31) performing guided filtering on the cutout picture frame according to the dedistorted picture frame to obtain a filtered cutout picture frame.

[0101] In this embodiment, guided filtering can be understood as having guidance, that is, by inputting an image as a guidance map, the filter knows where the edge is, and can better protect the edge, and ultimately maintain the edge details while filtering. In this step, a picture frame is determined based on the dedistorted picture frame. For example, the original picture of the dedistorted picture frame can be used or the dedistorted picture frame can be downsampled to obtain a picture frame. The picture frame is used as a guidance map to perform guided filtering on the cutout picture frame, thereby obtaining a filtered cutout picture frame after filtering. It can be understood that guiding filtering the cutout picture frame based on the dedistorted picture frame can improve edge quality while eliminating noise.

[0102] a32) performing smoothing on the edge area of ​​the target object in the filtered cutout picture frame to obtain a first cutout picture frame.

[0103] After obtaining the filtered cutout frame, the edge region of the target object in the filtered cutout frame may be further smoothed. Preferably, convolution is used to implement Gaussian blurring to smooth the edges and further eliminate noise. For example, the convolution kernel size is set to 7*7 and the variance is set to 2.8. Specifically, after smoothing the edge region of the target object in the filtered cutout frame, the resulting cutout frame is recorded as the first cutout frame.

[0104] a33) performing binarization processing on the first cutout picture frame according to the confidence level of the target object in the cutout picture frame, and determining the obtained second cutout picture frame as the cutout optimized picture frame.

[0105] In this embodiment, it can be considered that when the image frame to be processed is input into the network model to obtain the cutout image frame, the confidence level of each pixel in the cutout image frame as the target object can be obtained. For example, the confidence level can be expressed as a percentage, and the value can be 0-100%.

[0106] Continuing with the above description, the first cutout frame is binarized according to the confidence of the target object in the cutout frame, the area with lower confidence is set to 0, the area with higher confidence is set to 1, and the rest is smoothed.

[0107] In this embodiment, areas with a confidence level less than a are directly set to 0, and areas with a confidence level greater than b are directly set to 1. Each pixel has a confidence level. Pixels with a confidence level greater than b are considered to be the target object and are set to 1, while pixels with a confidence level less than a are considered not to be the target object and are set to 0. Pixels with a confidence level greater than a and less than b are considered to be at the edge of the target object and can be smoothed using a smoothing function. Based on this step, a binary image is determined, i.e., the second cutout frame.

[0108] Specifically, according to the confidence of the target object in the cutout picture frame, the first cutout picture frame is binarized, the binarized picture is recorded as the second cutout picture frame, and the second cutout picture frame is used as the cutout optimization picture frame.

[0109] The above technical solution specifically implements the steps of optimizing the edge region of the target object in the cutout frame to obtain the processed optimized cutout frame. First, the cutout frame is subjected to guided filtering based on the dedistorted frame, followed by smoothing, and finally binarization. Through filtering and target object edge smoothing, the optimized cutout frame is obtained, ensuring effective cutout and improving cutout accuracy.

[0110] Furthermore, the step of performing guided filtering on the cutout picture frame according to the dedistorted picture frame to obtain the filtered cutout picture frame is optimized as follows:

[0111] a311) Sampling the dedistorted frame according to a second set multiple of the input resolution of the dedistorted frame to obtain a second frame.

[0112] This step is used to downsample the dedistorted frame to reduce the resolution of the frame, obtaining a downsampled frame, which in this embodiment is referred to as the second frame. The second set multiple can be a value less than 1, and preferably the first set multiple is set to 1 / 2. Specifically, the dedistorted frame is downsampled according to the second set multiple of the input resolution, and the resulting frame is referred to as the second frame.

[0113] a312) Inputting the second picture frame and the cutout picture frame into a given guided filter, and using the output filtering result as the filtered cutout picture frame.

[0114] Among them, the given guided filter can be understood as an edge-preserving filter, which is used to improve edge quality and eliminate noise. The guided filter has a guiding property, that is, by inputting an image as a guiding map, the filter knows where the edge is, and can better protect the edge, and ultimately achieve the goal of maintaining edge details while filtering. Specifically, the second picture frame and the cutout picture frame determined above are input into the guided filter, and the filtering result can be output and used as the filtered cutout picture frame. It can be known that the cutout picture frame is a low-resolution picture frame, while the filtered picture frame is a high-resolution picture frame.

[0115] The above technical solution concretizes the steps of performing guided filtering on the cutout picture frame according to the dedistorted picture frame to obtain the filtered cutout picture frame. By inputting the picture frame after downsampling the dedistorted picture frame and the cutout picture frame into the guided filter, the edge quality of the cutout picture frame is improved and noise is eliminated.

[0116] To more clearly illustrate the image processing method provided by an embodiment of the present invention, an example of image processing of a frame in a practical application scenario is used for illustration. For example, FIG4 shows an example flow chart of the execution of the image processing method in a certain application scenario provided by an embodiment of the present disclosure. As shown in FIG4 , the execution steps of the image processing method specifically include:

[0117] S1. Obtain pixel information of a picture frame, where the picture frame is captured by a panoramic camera.

[0118] S2. Obtain pixel values ​​and first pixel coordinates of pixels in the picture frame from the pixel information.

[0119] S3. Substituting the first pixel point coordinates into the projection dedistortion model, the coordinate results obtained are used as the second pixel point coordinates of the corresponding pixel point.

[0120] S4. Form a dedistorted picture frame based on the second pixel point coordinates and the pixel values ​​of the corresponding pixel points.

[0121] S5. Determine the input resolution of the dedistorted picture frame;

[0122] S6. Sampling the dedistorted picture frame according to a first set multiple of the input resolution, and determining the first picture frame after the sampling process as the picture frame to be processed.

[0123] S7. Obtain a cutout frame based on the to-be-processed frame.

[0124] S8. Sampling the dedistorted frame according to a second set multiple of the input resolution of the dedistorted frame to obtain a second frame.

[0125] S9. Input the second picture frame and the cutout picture frame into a given guided filter, and use the output filtering result as the filtered cutout picture frame.

[0126] S10 , performing smoothing processing on the edge area of ​​the target object in the filtered cutout picture frame to obtain a first cutout picture frame.

[0127] S11 . Binarize the first cutout picture frame according to the confidence level of the target object in the cutout picture frame, and determine the obtained second cutout picture frame as the cutout optimized picture frame.

[0128] S12: Dedistort and restore the cutout optimized picture frame to obtain a target cutout picture frame corresponding to the picture frame after restoration.

[0129] Figure 5 shows a flow chart of a special effects rendering method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation where a picture frame is cut out and then special effects rendering is performed. The method can be executed by a special effects rendering device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which is preferably a mobile terminal, a desktop computer, a laptop computer, a server, etc.

[0130] As shown in FIG5 , the special effects rendering method provided by the embodiment of the present disclosure may specifically include:

[0131] S201 . In response to a received special effect triggering instruction, obtain special effect rendering material corresponding to the special effect triggering instruction.

[0132] It should be noted that for special effects rendering, no matter whether it is triggered by the client or the anchor, the special effects rendering will only be performed after the execution subject receives the special effects trigger instruction. In this embodiment, there is no specific restriction on the triggering form of the special effects rendering function. For example, for the client, the audience can trigger the special effects rendering by clicking the response icon on the panel presented in the virtual reality scene. This step is equivalent to obtaining the special effects rendering material in response to the received special effects trigger instruction. The special effects rendering material can be specifically understood as the relevant material required for special effects rendering, such as which special effect is specifically triggered, and obtaining the rendering material related to the special effect.

[0133] S202 : Taking the left-eye panoramic picture frame and the right-eye panoramic picture frame in the received binocular panoramic picture frames as received picture frames, and processing the received picture frames according to the image processing method described in the above embodiment to obtain a binocular target cutout picture frame.

[0134] In this embodiment, while obtaining the special effect rendering material, the received binocular panoramic picture frame can also be processed to obtain the binocular target cutout picture frame. This step uses a binocular camera to capture the binocular panoramic picture frame, wherein the binocular panoramic picture frame includes a left-eye panoramic picture frame and a right-eye panoramic picture frame, and the left-eye panoramic picture frame and the right-eye panoramic picture frame can be used as the received picture frame. Exemplarily, the VR binocular camera uses two fisheye cameras to shoot, and each camera can shoot a video with a 180-degree viewing angle. The fisheye lens is composed of a combination of more than a dozen different lenses. During the imaging process, the incident light undergoes different degrees of refraction and is projected onto an imaging plane of limited size, so that the fisheye lens has a larger field of view than an ordinary lens.

[0135] Continuing with the above description, after obtaining the received image frame, the received image frame is processed according to the image processing method described in the above embodiment, and the obtained cutout image frame is recorded as the binocular target cutout image frame. It can be clearly seen that the binocular target cutout image frame can be considered as the image frame that requires special effects processing as described below.

[0136] S203 , performing special effects rendering according to the binocular target cutout frame, special effects rendering material, and the determined depth information to obtain a binocular panoramic special effects frame.

[0137] The determined depth information ensures that the target object in the binocular target cutout frame is not directly covered as a plane during rendering. Instead, the depth information is visually considered and presented bit by bit. With this depth information, a more realistic rendering can be ensured. Specifically, special effects rendering is performed based on the binocular target cutout frame, special effects rendering material, and the determined depth information. The rendered special effects image is recorded as a binocular panoramic special effects image frame.

[0138] For example, in order to more clearly illustrate the special effects rendering method provided by the embodiment of the present disclosure, a certain application scenario is used as an example for related description in the implementation of live broadcast application under VR technology. Figure 6 shows an example diagram of the execution process of a special effects rendering method provided by the embodiment of the present disclosure. As shown in Figure 6, the host end under VR technology needs to use a binocular panoramic camera to capture images to form a binocular panoramic video stream, and transmit it to the live broadcast client through the live broadcast server for live broadcast viewers to watch. Before sending the binocular panoramic video stream to the client, it is necessary to decode the video stream and perform depth calculation at the same time. The panoramic picture frame in the video stream needs to be processed by image processing to cut out the target object. Then, based on the depth information and special effects rendering materials, the target object is cut out and special effects processing is performed. The panoramic special effects picture frame is generated and encoded to form a video stream that is transmitted to the client for live broadcast viewers to watch. At the same time, the audience can also feedback to the host end by touching the corresponding function buttons in the virtual scene, such as special effects and gifts. It can be seen that the special effects processing based on the special effects method provided by the embodiment of the present disclosure can ensure that the special effects rendering effect is more realistic.

[0139] For example, when the anchor is broadcasting live, if he wants to cut out the anchor character in the live broadcast picture and then add the special effect of sea water overflowing to the character cutout, he uses the image processing method described in the above embodiment to perform character cutout processing on the panoramic picture frame of the live broadcast picture, and then performs special effect processing on the character cutout based on the depth information and the special effect rendering material of sea water overflowing. Since the depth information is added, the effect of sea water slowly overflowing the character can be displayed, rather than the sea water special effect directly covering the character.

[0140] A special effects rendering method provided by an embodiment of the present disclosure can first respond to a received special effects trigger instruction to obtain a special effects rendering material corresponding to the special effects trigger instruction; then use the left-eye panoramic picture frame and the right-eye panoramic picture frame in the received binocular panoramic picture frame as received picture frames, and process the received picture frames according to the image processing method described in the above embodiment to obtain a binocular target cutout picture frame; finally, special effects rendering is performed based on the binocular target cutout picture frame, the special effects rendering material and the determined depth information to obtain a binocular panoramic special effects picture frame. The above technical solution of this embodiment uses the left-eye panoramic picture frame and the right-eye panoramic picture frame as the received picture frames. Considering that the image format of the received picture frames has large distortion, the image processing method described in the above embodiment is used to process the received picture frames. Before the received picture frames are cut out, the received picture frames are first dedistorted. The dedistorted picture frames have reduced distortion. Based on the dedistorted picture frames, the pre-trained target network model is used for cutout processing, which can achieve effective cutout of such images and improve the accuracy of cutout. Special effects rendering is performed based on the effective cutout results, which can achieve improved special effects rendering effects. At the same time, special effects rendering is performed using depth information. In the perspective presentation, the special effects are presented bit by bit considering the depth information, rather than directly covering the binocular target cutout picture frames, to ensure more realistic rendering.

[0141] FIG7 shows a schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure. As shown in FIG7 , the device includes: a dedistortion processing module 31, a target cutout determination module 32, and a panoramic cutout determination module 33, wherein:

[0142] The dedistortion processing module 31 is used to perform panoramic dedistortion processing on the received picture frames to obtain dedistorted picture frames;

[0143] a target cutout determination module 32, configured to determine a to-be-processed frame according to the dedistorted frame, and obtain a cutout frame based on the to-be-processed frame;

[0144] The panoramic cutout determination module 33 is configured to determine a target cutout frame corresponding to the received frame based on the cutout frame, wherein the edge of the target object in the target cutout frame is optimized based on panoramic dedistortion.

[0145] An image processing device provided by an embodiment of the present disclosure can first perform panoramic dedistortion processing on a received picture frame to obtain a dedistorted picture frame; then determine a picture frame to be processed based on the dedistorted picture frame, and obtain a cutout picture frame based on the picture frame to be processed; finally, determine a target cutout picture frame corresponding to the image of the picture frame based on the cutout picture frame, and implement edge optimization of a target object in the target cutout picture frame based on panoramic dedistortion. The above technical solution of this embodiment first performs panoramic dedistortion processing on the received picture frame, and performs cutout and edge optimization processing on the target object based on the picture frame after panoramic dedistortion, which can achieve effective cutout of such images and improve the accuracy and consistency of binocular cutout results.

[0146] Furthermore, the panoramic dedistortion processing module includes:

[0147] An information acquisition unit, configured to acquire pixel information of the picture frame;

[0148] The dedistortion determination unit is used to determine a dedistorted picture frame of the picture frame according to the pixel point information.

[0149] Furthermore, the dedistortion determination unit is specifically configured to:

[0150] Obtaining a pixel value and a first pixel coordinate of a pixel in the picture frame from the pixel information;

[0151] Substituting the first pixel point coordinates into the projection dedistortion model to obtain a coordinate result as the second pixel point coordinates of the corresponding pixel point;

[0152] Based on the second pixel point coordinates and the pixel values ​​of the corresponding pixels, a dedistorted picture frame of the picture frame is formed.

[0153] Furthermore, the target cutout determination module is specifically configured to:

[0154] Determining an input resolution of the dedistorted picture frame;

[0155] The dedistorted picture frame is sampled according to a first set multiple of the input resolution, and a first picture frame after the sampling process is determined as a picture frame to be processed.

[0156] Furthermore, the panoramic cutout determination module includes:

[0157] an optimization processing unit, configured to optimize an edge region of a target object in the cutout picture frame to obtain a processed cutout optimized picture frame;

[0158] The dedistortion restoration unit is used to perform dedistortion restoration on the cutout optimized picture frame to obtain a target cutout picture frame corresponding to the picture frame after restoration.

[0159] Furthermore, the optimization processing unit is specifically used to:

[0160] performing guided filtering on the cutout picture frame according to the dedistorted picture frame to obtain a filtered cutout picture frame;

[0161] Smoothing the edge area of ​​the target object in the filtered cutout picture frame to obtain a first cutout picture frame;

[0162] According to the confidence level of the target object in the cutout picture frame, the first cutout picture frame is binarized, and the obtained second cutout picture frame is determined as the cutout optimized picture frame.

[0163] Furthermore, the optimization processing unit is configured to perform guided filtering on the cutout picture frame according to the dedistorted picture frame to obtain a filtered cutout picture frame, including:

[0164] Sampling the dedistorted picture frame according to a second set multiple of the input resolution of the dedistorted picture frame to obtain a second picture frame;

[0165] The second picture frame and the cutout picture frame are input into a given guided filter, and the filtering result outputted is used as the filtered cutout picture frame.

[0166] The image processing device provided by the embodiments of the present disclosure can execute the image processing method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0167] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0168] FIG8 shows a structural diagram of a special effect rendering device provided by an embodiment of the present disclosure. As shown in FIG8 , the device includes: a material acquisition module 41, a cutout picture determination module 42, and a special effect picture determination module 43, wherein:

[0169] The material acquisition module 41 is used to obtain the special effect rendering material corresponding to the special effect triggering instruction in response to the received special effect triggering instruction;

[0170] a cutout picture determination module 42 for taking the left-eye panoramic picture frame and the right-eye panoramic picture frame in the received binocular panoramic picture frames as received picture frames, and processing the received picture frames according to the method described in the above embodiment to obtain a binocular target cutout picture frame;

[0171] The special effect picture determination module 43 is used to perform special effect rendering according to the binocular target cutout picture frame, special effect rendering material and the determined depth information to obtain a binocular panoramic special effect picture frame.

[0172] The embodiment of the present disclosure provides a special effects processing device, which takes the left-eye panoramic picture frame and the right-eye panoramic picture frame as the received picture frames. Considering that the image format of the received picture frames has large distortion, the image processing method described in the above embodiment is used to process the received picture frames. Before the received picture frames are cut out, the received picture frames are first subjected to dedistortion processing. The dedistorted picture frames have reduced distortion. Cutout processing is performed based on the dedistorted picture frames, which can achieve effective cutout of such images and improve the accuracy of cutout. Special effects rendering is performed based on the effective cutout results, which can achieve improved special effects rendering effects. At the same time, special effects rendering is performed using depth information, and the special effects are presented bit by bit in the perspective presentation taking into account the depth information, rather than directly covering the binocular target cutout picture frames, to ensure more realistic rendering.

[0173] FIG9 shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring to FIG9 , a schematic diagram of the structure of an electronic device (such as a terminal device or server in FIG9 ) 500 suitable for implementing an embodiment of the present disclosure is shown below. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG9 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.

[0174] As shown in FIG9 , the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 505. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.

[0175] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although FIG5 shows the electronic device 500 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.

[0176] 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 non-transitory computer-readable medium, and the computer program includes a 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 through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0177] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0178] The electronic device provided by the embodiment of the present disclosure and the image processing method or special effects rendering method provided by the above embodiments belong to the same inventive concept. Technical details not fully described in this embodiment can be referred to the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0179] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the image processing method or special effect rendering method provided in the above embodiment is implemented.

[0180] 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.

[0181] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.

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

[0183] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device is enabled to: perform panoramic dedistortion processing on the received picture frame to obtain a dedistorted picture frame; determine the picture frame to be processed based on the dedistorted picture frame, and obtain a cutout picture frame based on the picture frame to be processed; determine the target cutout picture frame corresponding to the picture frame based on the cutout picture frame, and achieve edge optimization of the target object in the target cutout picture frame based on panoramic dedistortion.

[0184] Or in response to a received special effect trigger instruction, obtaining a special effect rendering material corresponding to the special effect trigger instruction; taking the left-eye panoramic picture frame and the right-eye panoramic picture frame in the received binocular panoramic picture frame as received picture frames, and processing the received picture frames according to the method described in the above embodiment to obtain a binocular target cutout picture frame; performing special effect rendering according to the binocular target cutout picture frame, the special effect rendering material and the determined depth information to obtain a binocular panoramic special effect picture frame.

[0185] 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, but not limited to, 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 the 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., through the Internet using an Internet service provider).

[0186] 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 implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. 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 by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0187] 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.

[0188] In the context of this disclosure, a machine-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 machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.

[0189] 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.

[0190] 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.

[0191] 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. An image processing method, characterized in that: include: Performing panoramic dedistortion processing on the received picture frames to obtain dedistorted picture frames; Determine a picture frame to be processed according to the dedistorted picture frame, and obtain a cutout picture frame based on the picture frame to be processed; According to the cutout picture frame, a target cutout picture frame corresponding to the received picture frame is determined, and the target object in the target cutout picture frame is edge optimized based on panoramic dedistortion.

2. The method according to claim 1, characterized in that The step of performing panoramic dedistortion processing on the received picture frames to obtain dedistorted picture frames includes: Obtaining pixel information of the picture frame; A dedistorted picture frame of the picture frame is determined according to the pixel point information.

3. The method according to claim 2, characterized in that Determining a dedistorted picture frame of the picture frame according to the pixel point information includes: Obtaining pixel values ​​and first pixel coordinates of the pixel in the picture frame from the pixel information; Substituting the first pixel point coordinates into the projection de-distortion model to obtain the second pixel point coordinates of the corresponding pixel point; Based on the second pixel point coordinates and the pixel values ​​of the corresponding pixel points, a dedistorted picture frame of the picture frame is formed.

4. The method according to claim 1, characterized in that: The step of determining a to-be-processed picture frame according to the dedistorted picture frame comprises: Determining an input resolution of the dedistorted picture frame; The dedistorted picture frame is sampled according to a first set multiple of the input resolution, The first picture frame after the sampling process is determined as the picture frame to be processed.

5. The method according to claim 1, characterized in that The step of determining a target cutout picture frame corresponding to the received picture frame according to the cutout picture frame comprises: Processing the edge area of ​​the target object in the cutout picture frame to obtain a processed cutout optimized picture frame; The cutout optimized picture frame is dedistorted and restored to obtain a target cutout picture frame corresponding to the picture frame after restoration.

6. The method according to claim 5, characterized in that The step of processing the edge area of ​​the target object in the cutout picture frame to obtain the processed cutout optimized picture frame includes: Performing guided filtering on the cutout picture frame according to the dedistorted picture frame to obtain a filtered cutout picture frame; Smoothing the edge area of ​​the target object in the filtered cutout picture frame to obtain a first cutout picture frame; According to the confidence of the target object in the cutout picture frame, the first cutout picture frame is binarized, and the obtained second cutout picture frame is determined as the cutout optimized picture frame.

7. The method according to claim 6, characterized in that The step of performing guided filtering on the cutout picture frame according to the dedistorted picture frame to obtain a filtered cutout picture frame includes: Sampling the dedistorted picture frame according to a second set multiple of the input resolution of the dedistorted picture frame to obtain a second picture frame; The second picture frame and the cutout picture frame are input into a given guided filter, and the output filtering result is used as a filtered cutout picture frame.

8. A special effects rendering method, characterized in that: include: In response to the received special effect triggering instruction, obtaining the special effect rendering material corresponding to the special effect triggering instruction; Taking the left-eye panoramic picture frame and the right-eye panoramic picture frame in the received binocular panoramic picture frame as received picture frames, and processing the received picture frames according to the method described in any one of claims 1 to 7 to obtain a binocular target cutout picture frame; Special effects rendering is performed according to the binocular target cutout picture frame, special effects rendering material and the determined depth information to obtain a binocular panoramic special effects picture frame.

9. An image processing device, characterized in that: include: A dedistortion processing module, used for performing panoramic dedistortion processing on the received picture frames to obtain dedistorted picture frames; A target cutout determination module, used to determine a to-be-processed picture frame according to the dedistorted picture frame, and obtain a cutout picture frame based on the to-be-processed picture frame; The panoramic cutout determination module is used to determine a target cutout picture frame corresponding to the received picture frame according to the cutout picture frame, and the target object in the target cutout picture frame is edge optimized based on panoramic dedistortion.

10. A special effects rendering device, characterized in that: include: A material acquisition module, used to obtain a special effect rendering material corresponding to the special effect triggering instruction in response to the received special effect triggering instruction; a cutout picture determination module, configured to take a left-eye panoramic picture frame and a right-eye panoramic picture frame in the received binocular panoramic picture frame as received picture frames, and process the received picture frames according to the method described in any one of claims 1 to 7 to obtain a binocular target cutout picture frame; The special effect picture determination module is used to perform special effect rendering according to the binocular target cutout picture frame, special effect rendering material and the determined depth information to obtain a binocular panoramic special effect picture frame.

11. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.

12. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.

13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • 3d-image capturing device

    CN102362487A

  • Method and system for displaying parts of bodies of experiencers in VR environment

    CN106383576A

  • Three-dimensional virtual reality live method and device, and electronic device

    CN106385576A

  • Panoramic video playing method, set top box and computer readable storage medium

    CN109462775A

  • Video processing method and related device

    CN115086686A