Image processing method and apparatus, and device, computer-readable storage medium and product
By performing distortion correction and inverse transformation on the image of the target object area in the virtual reality live broadcast, the problem of poor beautification effect caused by the distortion of the binocular virtual reality camera acquisition image is solved, and an efficient and real-time beautification effect of the target object is achieved.
Patent Information
- Application Number
- PCT/CN2024/079929
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-07
- Filing Date
- 2024-03-04
- Publication Date
- 2024-09-12
AI Technical Summary
During the virtual reality live broadcast, due to severe distortion in the images collected by the binocular virtual reality cameras, the beautification effect of the target objects was poor and the user experience was affected.
By obtaining the target image frame in the virtual reality live broadcast, the distortion correction of the target object area image is performed to obtain a distortion-free image, and image processing is performed on the distortion-free image, and finally the inverse-transformed image is replaced back to the target image frame to achieve high quality The target object is beautified.
It reduces the calculation amount and rendering pressure of image processing, ensures real-time performance and user experience, and improves the effect of beautifying the target object.
Smart Images

Figure CN2024079929_12092024_PF_FP_ABST
Abstract
Description
Image processing method, device, equipment, computer-readable storage medium and product
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on the Chinese application with application number 202310232924.3 and application date March 7, 2023, and claims its priority. The disclosed content of the Chinese application is hereby introduced as a whole into this application. Technical Field
[0003] The embodiments of the present disclosure relate to the field of virtual reality technology, and in particular to an image processing method, apparatus, device, computer-readable storage medium, and product. Background Art
[0004] With the continuous advancement of virtual reality technology, live streaming has gradually become part of users' lives. When users are live streaming virtual reality content, they often need to enhance it. For example, users can trigger beautification requests such as beauty enhancement and makeup enhancement based on their actual needs.
[0005] In practical applications, VR live broadcasts typically use binocular VR cameras to capture live content. However, the target object in images captured by binocular VR cameras is severely distorted, significantly different from images captured by ordinary cameras. Therefore, if the target object is beautified directly based on the images captured by binocular VR cameras, the beautification effect often fails to meet the user's actual needs, resulting in a poor user experience.
[0006] Summary of the Invention
[0007] The embodiments of the present disclosure provide an image processing method, apparatus, device, computer-readable storage medium, and product for solving the technical problem of poor target object processing effect in existing virtual reality live broadcasting.
[0008] In a first aspect, an embodiment of the present disclosure provides an image processing method, comprising:
[0009] In response to a target object processing request triggered by a user during a virtual reality live broadcast, obtaining at least one target object area image in a target image frame corresponding to the virtual reality live broadcast;
[0010] Performing a distortion correction operation on the at least one target object area image to obtain at least one undistorted image;
[0011] performing an image processing operation based on the at least one undistorted image to obtain at least one processed image;
[0012] performing an inverse transformation operation of the distortion correction operation on the at least one processed image to obtain at least one inversely transformed image;
[0013] At least one target object area image in the target image frame is replaced by at least one inverse transformation image to obtain a processed target image frame.
[0014] In a second aspect, an embodiment of the present disclosure provides an image processing device, including:
[0015] an acquisition module, configured to respond to a target object processing request triggered by a user during a virtual reality live broadcast and acquire at least one target object region image in a target image frame corresponding to the virtual reality live broadcast;
[0016] a correction module, configured to perform a distortion correction operation on the at least one target object area image to obtain at least one undistorted image;
[0017] a processing module, configured to perform an image processing operation based on the at least one undistorted image to obtain at least one processed image;
[0018] an inverse transformation module, configured to perform an inverse transformation operation of the distortion correction operation on the at least one processed image to obtain at least one inversely transformed image;
[0019] The replacement module is used to replace at least one target object area image in the target image frame with at least one inverse transformation image to obtain a processed target image frame.
[0020] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0021] The memory stores computer-executable instructions;
[0022] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the image processing method described in the first aspect and various possible designs of the first aspect.
[0023] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the image processing method described in the first aspect and various possible designs of the first aspect is implemented.
[0024] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the image processing method described in the first aspect and various possible designs of the first aspect.
[0025] The image processing method, apparatus, device, computer-readable storage medium, and product provided in this embodiment obtain at least one target object area image in the target image frame corresponding to the virtual reality live broadcast after obtaining a target object processing request triggered by a user during the virtual reality live broadcast, and perform a distortion correction operation on the target object area image to obtain an undistorted image. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. 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.
[0027] FIG1 is a schematic diagram of a flow chart of an image processing method provided by an embodiment of the present disclosure;
[0028] FIG2 is a schematic flow chart of an image processing method provided by another embodiment of the present disclosure;
[0029] FIG3 is a schematic diagram of a virtual camera provided by an embodiment of the present disclosure;
[0030] FIG4 is a schematic flow chart of an image processing method provided by yet another embodiment of the present disclosure;
[0031] FIG5 is a schematic flow chart of an image processing method provided by yet another embodiment of the present disclosure;
[0032] FIG6 is a schematic flow chart of an image processing method provided by yet another embodiment of the present disclosure;
[0033] FIG7 is a schematic structural diagram of an image processing device provided by an embodiment of the present disclosure;
[0034] FIG8 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] 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.
[0036] In order to solve the technical problem of poor target object processing effect in the existing virtual reality live broadcast process, the present disclosure provides an image processing method, device, equipment, computer-readable storage medium and product.
[0037] It should be noted that the image processing method, apparatus, device, computer-readable storage medium, and product provided by the present disclosure can be applied to any virtual reality image processing scenario.
[0038] Current virtual reality live broadcasts generally use binocular virtual reality cameras to capture virtual reality live content. However, the live image frames captured by binocular virtual reality cameras often have a higher resolution. For example, the live image frames captured by binocular virtual reality cameras can be images with an 8K resolution (3840*7680). Therefore, image beautification operations based on such high-resolution live image frames often require a large amount of computation and cannot guarantee the real-time performance of image beautification. In addition, since the target object part in the live image frames captured by the binocular virtual reality camera is severely distorted, performing image processing operations on the target object directly based on the live image frames captured by the binocular virtual reality camera will affect the accuracy of the target object's key point detection and cannot guarantee the beautification effect of the target object.
[0039] In the process of solving the above-mentioned technical problems, the inventors discovered through research that, in order to ensure the beautification effect of the target object in the target image frame during the virtual reality live broadcast, after obtaining the target image frame during the virtual reality live broadcast, a distortion correction operation can be performed on the target object portion of the live image frame to obtain an undistorted target object region image. Based on the undistorted target object region image, an image processing operation is then performed on the target object. An inverse transformation operation of the distortion correction operation is performed on the beautified target object region image, and the target object portion in the target image frame is replaced with the target object region image after the inverse transformation operation to achieve a high-quality target object beautification effect.
[0040] Furthermore, by performing distortion correction operations only on part of the target object and performing image processing operations on the target object based on the undistorted target object area image, the amount of calculation in the target object beautification process can be effectively reduced, the pressure on the video memory and internal memory can be reduced, and the real-time beautification of the target object can be ensured.
[0041] The system architecture underlying this embodiment includes at least a terminal device, a virtual reality device, and a server. The server is in communication with both the terminal device and the virtual reality device. Based on a target object processing request triggered by a user on the terminal device, the server can obtain a target image frame captured by the virtual reality device. Distortion correction is then performed on the target object portion of the target image frame to obtain an undistorted target object region image. Target object processing is then performed based on the undistorted target object region image.
[0042] FIG1 is a flow chart of an image processing method provided by an embodiment of the present disclosure. As shown in FIG1 , the method includes:
[0043] Step 101: In response to a target object processing request triggered by a user during a virtual reality live broadcast, at least one target object area image in a target image frame corresponding to the virtual reality live broadcast is obtained.
[0044] The execution subject of this embodiment is an image processing device. The image processing device can be coupled to a server, which can be communicatively connected to a terminal device and a virtual reality device, respectively. This allows the device to obtain target image frames captured by the virtual reality device based on a target object processing request triggered by a user on the terminal device, and perform image processing operations. Alternatively, the image processing device can be coupled to either the terminal device or the virtual reality device. This allows the device to obtain target image frames captured by the virtual reality device based on a target object processing request triggered by a user on the terminal device, and perform image processing operations.
[0045] In this embodiment, when a user is live streaming VR content and needs to perform image processing on the live video, they can initiate a target object processing request. For example, a user-triggered beautification request can be used. This target object processing request for the live video includes, but is not limited to, beautification operations such as facial enhancement, special effects processing, and adding filters.
[0046] Accordingly, the image processing device may respond to a target object processing request triggered by a user during a virtual reality live broadcast and obtain a target image frame corresponding to the virtual reality live broadcast.
[0047] Furthermore, the target object processing request can be a beautification request for a preset target object. Continuing with the above example, if the target object processing request is a beautification request or a makeup request, the target object can be the user's facial area. Alternatively, if the target object processing request is a special effects rendering request, the target object can be the object to be rendered with the special effect. For example, if the special effect is to render a face with virtual glasses, the target object can be the user's eye area.
[0048] Therefore, in order to accurately implement the image processing operation for the target object, a target object region image in the target image frame may be acquired, wherein the number of the target object region image may be at least one.
[0049] For example, a target image frame captured by a binocular virtual reality camera can be composed of two images captured by left and right cameras, respectively, and the target object region image can be extracted from each of the two images to obtain at least one target object region image.
[0050] It should be noted that the facial image is obtained after obtaining full authorization from the user.
[0051] Step 102: Perform a distortion correction operation on the at least one target object area image to obtain at least one undistorted image.
[0052] In this embodiment, when using a binocular virtual reality camera to capture live VR content, the images captured by the binocular virtual reality camera often have severe distortion. Therefore, if image processing is directly performed on the target object in the captured target image frame, the image processing effect will be poor, resulting in a poor user experience.
[0053] Therefore, in order to ensure the processing effect of the target object of the virtual reality live broadcast content, after obtaining at least one target object area image, a distortion correction operation can be performed on the at least one target object area image to obtain at least one undistorted image.
[0054] Step 103: Perform an image processing operation based on the at least one undistorted image to obtain at least one processed image.
[0055] In this embodiment, after acquiring at least one undistorted image, an image processing operation can be performed based on the at least one undistorted image to obtain at least one processed image. Because undistorted images are free of distortion, performing image processing based on the undistorted image can produce high-quality image processing results.
[0056] Furthermore, after distortion correction is performed on the target object area image, the resolution of the resulting undistorted image is significantly lower than the resolution of the target image frame. Therefore, performing image processing operations based on the undistorted image can effectively reduce the computational complexity of the image processing process, thereby ensuring real-time image processing during virtual live broadcasts and further improving the user experience.
[0057] Step 104: Perform an inverse transformation operation of the distortion correction operation on the at least one processed image to obtain at least one inversely transformed image.
[0058] In this embodiment, to ensure a good viewing experience for the VR live broadcast, at least one processed image can be resized to resemble an image captured by a binocular VR camera. Therefore, an inverse transformation of the distortion correction operation can be performed on the at least one processed image to obtain at least one inversely transformed image.
[0059] Step 105 : Replace at least one target object region image in the target image frame with at least one inverse transformation image to obtain a processed target image frame.
[0060] In this embodiment, at least one target object area image in the target image frame may be replaced by the at least one inverse transformation image to obtain a processed target image frame.
[0061] For example, the target object processing request might be a user-triggered beautification request during a live broadcast. After acquiring the target image frame, at least one facial region image within the target image frame can be captured. Distortion correction can then be performed on the at least one facial region image to obtain an undistorted image. Subsequent beautification operations can then be performed on this undistorted image, resulting in a higher-quality beautification effect.
[0062] The image processing method provided in this embodiment, after receiving a target object processing request triggered by a user during a virtual reality live broadcast, obtains at least one target object region image in the target image frame corresponding to the virtual reality live broadcast, and performs a distortion correction operation on the target object region image to obtain an undistorted image. Subsequent target object processing operations performed on this undistorted image can thereby achieve higher-quality processing results. Furthermore, an inverse transformation of the distortion correction operation can be performed on the processed image, and the target object region image in the target image frame can be replaced based on the inversely transformed image to obtain a processed target image frame. This effectively improves the target object processing effect. Furthermore, by performing the distortion correction operation only on the inversely transformed image, an undistorted image is obtained, the size of which is significantly smaller than the size of the target image frame. Performing target object image processing based on this undistorted image effectively reduces the computational complexity during target object processing, reduces rendering pressure, and improves target object processing efficiency.
[0063] Furthermore, based on any of the above embodiments, step 101 includes:
[0064] In response to a target object processing request triggered by a user during a virtual reality live broadcast, a live video stream corresponding to the virtual reality live broadcast is obtained.
[0065] For each target image frame in the live video stream, a target object recognition operation is performed on the target image frame to determine position information of at least one target object in the target image frame.
[0066] The at least one target object area image is acquired according to the position information of the at least one target object.
[0067] In this embodiment, when a user is performing a virtual reality live broadcast and needs to perform an image processing operation on the live broadcast image, a target object processing request can be initiated. For example, the user can trigger the target object processing request on the terminal device.
[0068] Accordingly, after receiving the target object processing request, a live video stream corresponding to the virtual reality live broadcast can be obtained. This live video stream may include multiple target image frames. For each target image frame in the live video stream, a target object recognition operation is performed on the target image frame to determine the location information of at least one target object in the target image frame. At least one target object area image is obtained based on the location information of the at least one target object.
[0069] For example, if the target object is a face, a face recognition operation can be performed on the face in the target image frame using a preset face recognition model to obtain at least one face frame corresponding to the face. An image of the at least one face frame area is extracted as at least one target object area image.
[0070] Further, based on any of the above embodiments, performing a target object recognition operation on the target image frame to determine position information of at least one target object in the target image frame includes:
[0071] The target image frame is scaled according to a preset scaling size to obtain a scaled target image frame.
[0072] A target object recognition operation is performed on the scaled target image frame to determine position information of at least one target object in the scaled target image frame.
[0073] In this embodiment, when performing a target object recognition operation, since the resolution of the image processed by the recognition algorithm may be different from the resolution of the live image frame, it is necessary to perform a scaling operation on the target object before performing target object recognition on the target image frame.
[0074] Optionally, the target image frame may be scaled according to a preset scale size to obtain a scaled target image frame. The preset scale size may be a scale size corresponding to a currently used recognition algorithm. A target object recognition operation is performed on the scaled target image frame to determine position information of at least one target object in the scaled target image frame.
[0075] The image processing method provided in this embodiment, after obtaining the live video stream corresponding to the virtual reality live broadcast, performs a scaling operation on each target image frame in the live video stream, and performs a target object recognition operation based on the scaled target image frame, thereby further reducing the amount of computation in the image processing process and ensuring the real-time performance of image processing during the live broadcast.
[0076] FIG2 is a flow chart of an image processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG2 , step 102 includes:
[0077] Step 201: Create a virtual camera located at the origin of the world coordinate system.
[0078] Step 202 : For each target object area image, convert the target object area image into an image under the perspective of the virtual camera to obtain the undistorted image.
[0079] In this embodiment, the target image frames corresponding to the VR live broadcast are distorted, while the images viewed by the user through the VR device are normal and undistorted. The target image frames corresponding to the VR live broadcast can be displayed in the VR device as a hemispherical map. Therefore, a virtual camera located at the origin of the world coordinate system can be constructed, and the images viewed by the user through the VR device can be simulated based on this virtual camera.
[0080] Therefore, after establishing a virtual camera located at the origin of the world coordinate system, each target object area image can be converted into an image under the perspective of the virtual camera to obtain an undistorted image.
[0081] Figure 3 is a schematic diagram of a virtual camera provided by an embodiment of the present disclosure. As shown in Figure 3, a target image frame 31 can be presented to the viewer in the form of a hemispherical map. A virtual camera 32 located at the origin of the world coordinate system can be established to transform the target object area image into an image from the perspective of the virtual camera, i.e., an undistorted image.
[0082] Further, based on any of the above embodiments, step 202 includes:
[0083] For each first pixel point in each target object area image under the perspective of the virtual camera, a matrix projection operation is performed on the first pixel point according to the observation matrix and the projection matrix corresponding to the virtual camera to obtain a first three-dimensional space coordinate.
[0084] The first longitude and latitude information of each first pixel point in the spherical coordinate system where the target object area image is located is determined according to the first three-dimensional space coordinates corresponding to each first pixel point.
[0085] According to a mapping relationship between the longitude and latitude and a texture mapping coordinate system corresponding to the target object area image, first texture mapping coordinates corresponding to the first longitude and latitude information are determined.
[0086] A combination operation is performed on the first texture map coordinates corresponding to each first pixel point to obtain the undistorted image.
[0087] In this embodiment, after the virtual camera is established, the observation matrix and projection matrix corresponding to the virtual camera can also be determined. Assume that the image under the perspective of the virtual camera is F iFor each first pixel in each target object region image from the perspective of the virtual camera, a matrix projection operation can be performed on the first pixel based on the observation matrix and projection matrix corresponding to the virtual camera to obtain first three-dimensional spatial coordinates. After obtaining the first three-dimensional spatial coordinates, the first longitude and latitude information of each first pixel in the spherical coordinate system of the target object region image can also be reversely determined based on the first three-dimensional spatial coordinates.
[0088] Furthermore, a mapping relationship between the longitude and latitude and the texture map coordinate system corresponding to the target object area image can be determined. The mapping relationship can be shown as formula 1-2: Latitude∈[0,π]→u∈[0,1] (1) Longtitude∈[0,π]→v∈[0,1] (2)
[0089] Based on the mapping relationship, the first texture mapping coordinates corresponding to the first longitude and latitude information can be determined. Each first texture mapping coordinate is assigned to F i A combination operation is performed according to the first texture map coordinates corresponding to each pixel to generate the undistorted image.
[0090] The image processing method provided in this embodiment constructs a virtual camera located at the origin of the world coordinate system and converts the image of the target object area into an image under the perspective of the virtual camera, thereby effectively performing the distortion correction operation on the image of the target object area and ensuring the accuracy of image processing.
[0091] FIG4 is a flowchart of an image processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG4 , step 103 includes:
[0092] Step 401: Perform a target object key point recognition operation on at least one of the undistorted images to obtain target object key point information corresponding to the at least one of the undistorted images.
[0093] Step 402: Perform an image processing operation on the target object in at least one of the undistorted images according to the key point information of the target object corresponding to the at least one undistorted image to obtain the at least one processed image.
[0094] In this embodiment, after obtaining the undistorted image, since there is no distortion in the undistorted image, performing a target object recognition operation based on the undistorted image can obtain a more accurate recognition result.
[0095] Optionally, a target object key point recognition operation may be performed on the at least one undistorted image to obtain target object key point information corresponding to the at least one undistorted image. Furthermore, an image processing operation may be performed on the target object in the at least one undistorted image based on the target object key point information corresponding to the at least one undistorted image to obtain at least one processed image.
[0096] For example, if the target object processing request is to render glasses effects on a human face, key point information of the eyes can be identified in the undistorted image, and the glasses effects rendering operation can be performed on the eyes based on the key point information.
[0097] For example, if the target object processing request is a beautification request, the key points of the user's facial features can be identified in the undistorted image, and then a beautification operation can be performed based on the key points of the facial features.
[0098] The image processing method provided in this embodiment, after obtaining the undistorted image, again performs a target object key point recognition operation on the undistorted image, thereby accurately determining the target object key points in the undistorted image, and then accurately performing image processing based on the target object key points, thereby improving the accuracy of image processing.
[0099] FIG5 is a flowchart of an image processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG5 , step 104 includes:
[0100] Step 501: for each second pixel point in each target object area image, determine the second texture coordinate corresponding to the second pixel point and convert it into second longitude and latitude information according to the mapping relationship between the texture coordinate system corresponding to the target object area image and the longitude and latitude.
[0101] Step 502: Determine the second three-dimensional space coordinates corresponding to the second pixel point according to the second longitude and latitude information.
[0102] Step 503: Detect whether the second three-dimensional space coordinate is within the visible range of the virtual camera located at the origin of the world coordinate system.
[0103] Step 504: Process the second three-dimensional space coordinates according to the detection result to obtain the inverse transformation image.
[0104] In this embodiment, live video frames viewed on a virtual reality device are normal and undistorted. Therefore, if the processed, undistorted images are directly sent to the virtual reality device for display, the user may see distorted images on the device. Therefore, an inverse transformation of the distortion correction operation is required on the processed images.
[0105] Optionally, for each second pixel point in each target object region image, a second texture coordinate corresponding to the second pixel point is converted into second longitude and latitude information based on a mapping relationship between a texture coordinate system corresponding to the target object region image and longitude and latitude. A second three-dimensional space coordinate corresponding to the second pixel point is determined based on the second longitude and latitude information.
[0106] Furthermore, because some pixels in the target object area image fall within the visible range of the virtual camera located at the origin of the world coordinate system, while others fall outside of it, after determining the second 3D spatial coordinate corresponding to the second pixel, it is necessary to detect whether the second 3D spatial coordinate is within the visible range of the virtual camera located at the origin of the world coordinate system. Based on the detection result, the second 3D spatial coordinate is processed using a processing method that matches the detection result to obtain an inverse transformed image.
[0107] Further, based on any of the above embodiments, step 504 includes:
[0108] If the second three-dimensional space coordinate is within the visible range of the virtual camera, a matrix projection operation is performed on the second three-dimensional space coordinate according to the observation matrix and projection matrix corresponding to the image acquisition device that acquires the image of the target object area to obtain the third pixel point of the second three-dimensional space coordinate under the perspective of the image acquisition device, and the corresponding second pixel point is replaced by the third pixel point.
[0109] If the second three-dimensional space coordinate is not within the visible range of the virtual camera, the second pixel point corresponding to the second three-dimensional space coordinate is not processed.
[0110] The inverse transformation image is generated according to a third pixel point located within the visible range of the virtual camera and a second pixel point not within the visible range of the virtual camera.
[0111] In this embodiment, if the second 3D spatial coordinate is within the visible range of the virtual camera, it needs to be converted into a pixel point under the viewpoint of the image acquisition device. Therefore, a matrix projection operation can be performed on the second 3D spatial coordinate based on the observation matrix and projection matrix corresponding to the image acquisition device used to capture the image of the target object area. This operation obtains a third pixel point under the viewpoint of the image acquisition device corresponding to the second 3D spatial coordinate, and the third pixel point replaces the corresponding second pixel point.
[0112] Conversely, if the second 3D spatial coordinate is not within the visible range of the virtual camera, the second pixel corresponding to the second 3D spatial coordinate may not be processed. This allows for the subsequent generation of an inversely transformed image based on the third pixel within the visible range of the virtual camera and the second pixel outside of the visible range, thereby ensuring a consistent viewing experience for the user.
[0113] The image processing method provided in this embodiment allows live content to be presented to viewers in the form of a hemispherical map during VR live streaming. Therefore, after obtaining a distortion-free image, to ensure the user's viewing experience of VR live streaming, the distortion-free image can be converted into an inversely transformed image in the form of a hemispherical map. This ensures the real-time nature of image processing during VR live streaming while also guaranteeing the quality of VR live streaming.
[0114] FIG6 is a flowchart of an image processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG6 , step 105 includes:
[0115] Step 601: For each target object region image, determine a display position of the target object region image in the target image frame.
[0116] Step 602: Inversely transform the target object area image according to the display position to obtain the processed target image frame.
[0117] In this embodiment, to replace the target object region image in the live video frame, the display position of each target object region image in the target image frame can first be determined. This display position can be obtained during the target object recognition process. After obtaining the display position, the target object region image can be inversely transformed based on the display position to obtain a processed target image frame.
[0118] The image processing method provided in this embodiment determines the display position of the target object area image in the target image frame, and can accurately implement the inverse transformation image replacement operation based on the display position. This ensures the real-time performance of image processing during the virtual reality live broadcast and also ensures the live broadcast effect of the virtual reality live broadcast.
[0119] FIG7 is a schematic diagram of the structure of an image processing device provided in an embodiment of the present disclosure. As shown in FIG7 , the device includes: an acquisition module 71, a correction module 72, a processing module 73, an inverse transformation module 74, and a replacement module 75. The acquisition module 71 is configured to, in response to a target object processing request triggered by a user during a virtual reality live broadcast, acquire at least one target object region image in a target image frame corresponding to the virtual reality live broadcast. The correction module 72 is configured to perform a distortion correction operation on the at least one target object region image to obtain at least one undistorted image. The processing module 73 is configured to perform an image processing operation based on the at least one undistorted image to obtain at least one processed image. The inverse transformation module 74 is configured to perform an inverse transformation operation of the distortion correction operation on the at least one processed image to obtain at least one inverse transformed image. The replacement module 75 is configured to replace at least one target object region image in the target image frame with the at least one inverse transformed image to obtain a processed target image frame.
[0120] Furthermore, based on any of the above embodiments, the acquisition module is configured to: in response to a target object processing request triggered by a user during a virtual reality live broadcast, acquire a live video stream corresponding to the virtual reality live broadcast; perform a target object recognition operation on each target image frame in the live video stream to determine the location information of at least one target object in the target image frame; and acquire the at least one target object area image based on the location information of the at least one target object.
[0121] Furthermore, based on any of the above embodiments, the acquisition module is configured to: scale the target image frame according to a preset scaling size to obtain a scaled target image frame; and perform a target object recognition operation on the scaled target image frame to determine position information of at least one target object in the scaled target image frame.
[0122] Furthermore, based on any of the above embodiments, the correction module is configured to: establish a virtual camera located at the origin of a world coordinate system, and for each target object area image, convert the target object area image into an image under the perspective of the virtual camera to obtain the undistorted image.
[0123] Furthermore, based on any of the above embodiments, the correction module is configured to: for each first pixel point in each target object area image under the perspective of the virtual camera, perform a matrix projection operation on the first pixel point according to the observation matrix and projection matrix corresponding to the virtual camera to obtain a first three-dimensional spatial coordinate. Determine the first longitude and latitude information of each first pixel point in the spherical coordinate system where the target object area image is located based on the first three-dimensional spatial coordinates corresponding to each first pixel point. Determine the first texture mapping coordinates corresponding to the first longitude and latitude information based on the mapping relationship between the longitude and latitude and the texture mapping coordinate system corresponding to the target object area image. Perform a combination operation on the first texture mapping coordinates corresponding to each first pixel point to obtain the undistorted image.
[0124] Further, based on any of the foregoing embodiments, the processing module is configured to: perform a target object key point recognition operation on at least one of the distortion-free images to obtain target object key point information corresponding to the at least one distortion-free image; and perform an image processing operation on the target object in the at least one distortion-free image based on the target object key point information corresponding to the at least one distortion-free image to obtain the at least one processed image.
[0125] Further, based on any of the above embodiments, the inverse transformation module is configured to: for each second pixel point in each target object area image, determine, based on a mapping relationship between the texture mapping coordinate system corresponding to the target object area image and longitude and latitude, convert the second texture mapping coordinate corresponding to the second pixel point into second longitude and latitude information; determine, based on the second longitude and latitude information, the second three-dimensional spatial coordinate corresponding to the second pixel point; detect whether the second three-dimensional spatial coordinate is within the visible range of a virtual camera located at the origin of the world coordinate system; and process the second three-dimensional spatial coordinate based on the detection result to obtain the inverse transformation image.
[0126] Furthermore, based on any of the above embodiments, the inverse transformation module is configured to: if the second three-dimensional spatial coordinate is within the visible range of the virtual camera, perform a matrix projection operation on the second three-dimensional spatial coordinate according to the observation matrix and projection matrix corresponding to the image acquisition device that acquires the target object area image, obtain a third pixel point of the second three-dimensional spatial coordinate under the perspective of the image acquisition device, and replace the corresponding second pixel point with the third pixel point. If the second three-dimensional spatial coordinate is not within the visible range of the virtual camera, do not process the second pixel point corresponding to the second three-dimensional spatial coordinate. Generate the inverse transformation image based on the third pixel point within the visible range of the virtual camera and the second pixel point not within the visible range of the virtual camera.
[0127] Furthermore, based on any of the above embodiments, the replacement module is configured to: determine, for each target object region image, a display position of the target object region image in the target image frame, and perform the inverse transformation of the target object region image according to the display position to obtain the processed target image frame.
[0128] 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.
[0129] In order to implement the above embodiment, the present disclosure further provides an electronic device, including: a processor and a memory;
[0130] The memory stores computer-executable instructions;
[0131] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the image processing method as described in any of the above embodiments.
[0132] 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.
[0133] 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.
[0134] 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.
[0135] 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.
[0136] 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.
[0137] 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 image processing method described in any of the above embodiments is implemented.
[0138] 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 image processing method as described in any of the above embodiments when executed by a processor.
[0139] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0140] 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.
[0141] 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).
[0142] 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.
[0143] 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."
[0144] 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.
[0145] 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.
[0146] In a first aspect, according to one or more embodiments of the present disclosure, there is provided an image processing method, comprising:
[0147] In response to a target object processing request triggered by a user during a virtual reality live broadcast, obtaining at least one target object area image in a target image frame corresponding to the virtual reality live broadcast;
[0148] Performing a distortion correction operation on the at least one target object area image to obtain at least one undistorted image;
[0149] performing an image processing operation based on the at least one undistorted image to obtain at least one processed image;
[0150] performing an inverse transformation operation of the distortion correction operation on the at least one processed image to obtain at least one inversely transformed image;
[0151] At least one target object area image in the target image frame is replaced by at least one inverse transformation image to obtain a processed target image frame.
[0152] According to one or more embodiments of the present disclosure, in response to a target object processing request triggered by a user during a virtual reality live broadcast, obtaining at least one target object area image in a target image frame corresponding to the virtual reality live broadcast includes:
[0153] In response to a target object processing request triggered by a user during a virtual reality live broadcast, obtaining a live video stream corresponding to the virtual reality live broadcast;
[0154] For each target image frame in the live video stream, performing a target object recognition operation on the target image frame to determine position information of at least one target object in the target image frame;
[0155] The at least one target object area image is acquired according to the position information of the at least one target object.
[0156] According to one or more embodiments of the present disclosure, performing a target object recognition operation on the target image frame to determine position information of at least one target object in the target image frame includes:
[0157] Performing a scaling operation on the target image frame according to a preset scaling size to obtain a scaled target image frame;
[0158] A target object recognition operation is performed on the scaled target image frame to determine position information of at least one target object in the scaled target image frame.
[0159] According to one or more embodiments of the present disclosure, performing a distortion correction operation on the at least one target object area image to obtain at least one undistorted image includes:
[0160] Create a virtual camera located at the origin of the world coordinate system;
[0161] For each target object area image, the target object area image is converted into an image under the perspective of the virtual camera to obtain the undistorted image.
[0162] According to one or more embodiments of the present disclosure, converting each target object area image into an image under the perspective of the virtual camera to obtain the undistorted image includes:
[0163] For each first pixel point in each target object area image under the perspective of the virtual camera, perform a matrix projection operation on the first pixel point according to the observation matrix and the projection matrix corresponding to the virtual camera to obtain a first three-dimensional space coordinate;
[0164] Determining first longitude and latitude information of each first pixel point in the spherical coordinate system where the target object area image is located according to the first three-dimensional space coordinates corresponding to each first pixel point;
[0165] determining first texture mapping coordinates corresponding to the first longitude and latitude information according to a mapping relationship between the longitude and latitude and a texture mapping coordinate system corresponding to the target object area image;
[0166] A combination operation is performed on the first texture map coordinates corresponding to each first pixel point to obtain the undistorted image.
[0167] According to one or more embodiments of the present disclosure, performing an image processing operation based on the at least one undistorted image to obtain at least one processed image includes:
[0168] Performing a target object key point recognition operation on at least one of the undistorted images to obtain target object key point information corresponding to the at least one undistorted image;
[0169] An image processing operation is performed on the target object in at least one of the undistorted images according to key point information of the target object corresponding to at least one of the undistorted images to obtain the at least one processed image.
[0170] According to one or more embodiments of the present disclosure, performing an inverse transformation operation of the distortion correction operation on the at least one processed image to obtain at least one inverse transformed image includes:
[0171] For each second pixel point in each target object region image, determining, based on a mapping relationship between a texture mapping coordinate system corresponding to the target object region image and longitude and latitude, to convert a second texture mapping coordinate corresponding to the second pixel point into second longitude and latitude information;
[0172] Determine the second three-dimensional space coordinates corresponding to the second pixel point according to the second latitude and longitude information;
[0173] detecting whether the second three-dimensional space coordinate is within a visible range of a virtual camera located at the origin of a world coordinate system;
[0174] The second three-dimensional space coordinates are processed according to the detection result to obtain the inverse transformation image.
[0175] According to one or more embodiments of the present disclosure, processing the second three-dimensional space coordinates according to the detection result to obtain the inverse transformed image includes:
[0176] If the second three-dimensional spatial coordinate is within the visible range of the virtual camera, performing a matrix projection operation on the second three-dimensional spatial coordinate according to an observation matrix and a projection matrix corresponding to an image acquisition device that acquires the image of the target object area, to obtain a third pixel point of the second three-dimensional spatial coordinate in the perspective of the image acquisition device, and replacing the corresponding second pixel point with the third pixel point;
[0177] If the second three-dimensional space coordinate is not within the visible range of the virtual camera, then the second pixel point corresponding to the second three-dimensional space coordinate is not processed;
[0178] The inverse transformation image is generated according to a third pixel point located within the visible range of the virtual camera and a second pixel point not within the visible range of the virtual camera.
[0179] According to one or more embodiments of the present disclosure, the step of replacing at least one target object region image in the target image frame with at least one inverse transformation image to obtain a processed target image frame includes:
[0180] For each target object area image, determining a display position of the target object area image in the target image frame;
[0181] The target object area image is inversely transformed according to the display position to obtain the processed target image frame.
[0182] In a second aspect, according to one or more embodiments of the present disclosure, there is provided an image processing apparatus, comprising:
[0183] an acquisition module, configured to respond to a target object processing request triggered by a user during a virtual reality live broadcast and acquire at least one target object region image in a target image frame corresponding to the virtual reality live broadcast;
[0184] a correction module, configured to perform a distortion correction operation on the at least one target object area image to obtain at least one undistorted image;
[0185] a processing module, configured to perform an image processing operation based on the at least one undistorted image to obtain at least one processed image;
[0186] an inverse transformation module, configured to perform an inverse transformation operation of the distortion correction operation on the at least one processed image to obtain at least one inversely transformed image;
[0187] The replacement module is used to replace at least one target object area image in the target image frame with at least one inverse transformation image to obtain a processed target image frame.
[0188] According to one or more embodiments of the present disclosure, the acquisition module is configured to:
[0189] In response to a target object processing request triggered by a user during a virtual reality live broadcast, obtaining a live video stream corresponding to the virtual reality live broadcast;
[0190] For each target image frame in the live video stream, performing a target object recognition operation on the target image frame to determine position information of at least one target object in the target image frame;
[0191] The at least one target object area image is acquired according to the position information of the at least one target object.
[0192] According to one or more embodiments of the present disclosure, the acquisition module is configured to:
[0193] Performing a scaling operation on the target image frame according to a preset scaling size to obtain a scaled target image frame;
[0194] A target object recognition operation is performed on the scaled target image frame to determine position information of at least one target object in the scaled target image frame.
[0195] According to one or more embodiments of the present disclosure, the correction module is configured to:
[0196] Create a virtual camera located at the origin of the world coordinate system;
[0197] For each target object area image, the target object area image is converted into an image under the perspective of the virtual camera to obtain the undistorted image.
[0198] According to one or more embodiments of the present disclosure, the correction module is configured to:
[0199] For each first pixel point in each target object area image under the perspective of the virtual camera, perform a matrix projection operation on the first pixel point according to the observation matrix and the projection matrix corresponding to the virtual camera to obtain a first three-dimensional space coordinate;
[0200] Determining first longitude and latitude information of each first pixel point in the spherical coordinate system where the target object area image is located according to the first three-dimensional space coordinates corresponding to each first pixel point;
[0201] determining first texture mapping coordinates corresponding to the first longitude and latitude information according to a mapping relationship between the longitude and latitude and a texture mapping coordinate system corresponding to the target object area image;
[0202] A combination operation is performed on the first texture map coordinates corresponding to each first pixel point to obtain the undistorted image.
[0203] According to one or more embodiments of the present disclosure, the processing module is configured to:
[0204] Performing a target object key point recognition operation on at least one of the undistorted images to obtain target object key point information corresponding to the at least one undistorted image;
[0205] An image processing operation is performed on the target object in at least one of the undistorted images according to key point information of the target object corresponding to at least one of the undistorted images to obtain the at least one processed image.
[0206] According to one or more embodiments of the present disclosure, the inverse transform module is configured to:
[0207] For each second pixel point in each target object region image, determining, based on a mapping relationship between a texture mapping coordinate system corresponding to the target object region image and longitude and latitude, to convert a second texture mapping coordinate corresponding to the second pixel point into second longitude and latitude information;
[0208] Determine the second three-dimensional space coordinates corresponding to the second pixel point according to the second latitude and longitude information;
[0209] detecting whether the second three-dimensional space coordinate is within a visible range of a virtual camera located at the origin of a world coordinate system;
[0210] The second three-dimensional space coordinates are processed according to the detection result to obtain the inverse transformation image.
[0211] According to one or more embodiments of the present disclosure, the inverse transformation module is configured to:
[0212] If the second three-dimensional spatial coordinate is within the visible range of the virtual camera, performing a matrix projection operation on the second three-dimensional spatial coordinate according to an observation matrix and a projection matrix corresponding to an image acquisition device that acquires the image of the target object area, to obtain a third pixel point of the second three-dimensional spatial coordinate in the perspective of the image acquisition device, and replacing the corresponding second pixel point with the third pixel point;
[0213] If the second three-dimensional space coordinate is not within the visible range of the virtual camera, then the second pixel point corresponding to the second three-dimensional space coordinate is not processed;
[0214] The inverse transformation image is generated according to a third pixel point located within the visible range of the virtual camera and a second pixel point not within the visible range of the virtual camera.
[0215] According to one or more embodiments of the present disclosure, the replacement module is used to:
[0216] For each target object area image, determining a display position of the target object area image in the target image frame;
[0217] The target object area image is inversely transformed according to the display position to obtain the processed target image frame.
[0218] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0219] The memory stores computer-executable instructions;
[0220] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the image processing method described in the first aspect and various possible designs of the first aspect.
[0221] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the image processing method described in the first aspect and various possible designs of the first aspect is implemented.
[0222] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the image processing method as described in the first aspect and various possible designs of the first aspect.
[0223] 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.
[0224] 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.
[0225] 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, comprising: In response to a target object processing request triggered by a user during a virtual reality live broadcast, obtaining at least one target object area image in a target image frame corresponding to the virtual reality live broadcast; Performing a distortion correction operation on the at least one target object area image to obtain at least one distortion-free image; Performing an image processing operation based on the at least one distortion-free image to obtain at least one processed image; Performing an inverse transformation operation of the distortion correction operation on the at least one processed image to obtain at least one inverse transformation image; At least one target object area image in the target image frame is replaced by at least one inverse transformation image to obtain a processed target image frame.
2. The method according to claim 1, wherein: The step of responding to a target object processing request triggered by a user during a virtual reality live broadcast and obtaining at least one target object area image in a target image frame corresponding to the virtual reality live broadcast includes: In response to a target object processing request triggered by a user during a virtual reality live broadcast, a live video stream corresponding to the virtual reality live broadcast is obtained; For each target image frame in the live video stream, performing a target object recognition operation on the target image frame to determine position information of at least one target object in the target image frame; The at least one target object area image is acquired according to the position information of the at least one target object.
3. The method according to claim 2, wherein: The performing a target object recognition operation on the target image frame to determine position information of at least one target object in the target image frame includes: Scaling the target image frame according to a preset scaling size to obtain a scaled target image frame; A target object recognition operation is performed on the scaled target image frame to determine position information of at least one target object in the scaled target image frame.
4. The method according to any one of claims 1 to 3, wherein: The step of performing a distortion correction operation on the at least one target object area image to obtain at least one distortion-free image includes: Establish a virtual camera located at the origin of the world coordinate system; For each target object area image, the target object area image is converted into an image under the viewing angle of the virtual camera to obtain the undistorted image.
5. The method according to claim 4, wherein: The step of converting each target object area image into an image under the perspective of the virtual camera to obtain the undistorted image includes: For each first pixel point in each target object area image under the perspective of the virtual camera, a matrix projection operation is performed on the first pixel point according to an observation matrix and a projection matrix corresponding to the virtual camera to obtain a first three-dimensional space coordinate; Determine first longitude and latitude information of each first pixel point in the spherical coordinate system where the target object area image is located according to the first three-dimensional space coordinate corresponding to each first pixel point; Determining first texture mapping coordinates corresponding to the first longitude and latitude information according to a mapping relationship between the longitude and latitude and a texture mapping coordinate system corresponding to the target object area image; A combination operation is performed on the first texture map coordinates corresponding to each first pixel point to obtain the undistorted image.
6. The method according to any one of claims 1 to 5, wherein: The performing an image processing operation based on the at least one distortion-free image to obtain at least one processed image comprises: Performing a target object key point recognition operation on at least one of the undistorted images to obtain target object key point information corresponding to at least one of the undistorted images; An image processing operation is performed on the target object in at least one of the undistorted images according to the key point information of the target object corresponding to at least one of the undistorted images to obtain the at least one processed image.
7. The method according to any one of claims 1 to 5, wherein: The step of performing an inverse transformation operation of the distortion correction operation on the at least one processed image to obtain at least one inverse transformed image comprises: For each second pixel point in each target object area image, determine the conversion of the second texture coordinates corresponding to the second pixel point into second longitude and latitude information according to the mapping relationship between the texture coordinate system corresponding to the target object area image and the longitude and latitude; Determine a second three-dimensional space coordinate corresponding to the second pixel point according to the second longitude and latitude information; Detecting whether the second three-dimensional space coordinate is within the visible range of the virtual camera located at the origin of the world coordinate system; The second three-dimensional space coordinates are processed according to the detection result to obtain the inverse transformation image.
8. The method according to claim 7, wherein: The processing of the second three-dimensional space coordinates according to the detection result to obtain the inverse transformation image includes: If the second three-dimensional space coordinate is within the visible range of the virtual camera, a matrix projection operation is performed on the second three-dimensional space coordinate according to an observation matrix and a projection matrix corresponding to an image acquisition device that acquires the target object area image, to obtain a third pixel point of the second three-dimensional space coordinate under the viewing angle of the image acquisition device, and the corresponding second pixel point is replaced by the third pixel point; If the second three-dimensional space coordinate is not within the visible range of the virtual camera, then the second pixel point corresponding to the second three-dimensional space coordinate is not processed; The inverse transformation image is generated according to a third pixel point located within the visible range of the virtual camera and a second pixel point not within the visible range of the virtual camera.
9. The method according to any one of claims 1 to 5, wherein: The step of replacing at least one target object region image in the target image frame with at least one inverse transformation image to obtain a processed target image frame comprises: For each target object area image, determining a display position of the target object area image in the target image frame; The target object area image is inversely transformed according to the display position to obtain the processed target image frame.
10. An image processing device, comprising: An acquisition module, configured to respond to a target object processing request triggered by a user during a virtual reality live broadcast, and acquire at least one target object area image in a target image frame corresponding to the virtual reality live broadcast; A correction module, used for performing a distortion correction operation on the at least one target object area image to obtain at least one distortion-free image; A processing module, configured to perform an image processing operation based on the at least one distortion-free image to obtain at least one processed image; an inverse transformation module, configured to perform an inverse transformation operation of the distortion correction operation on the at least one processed image to obtain at least one inverse transformation image; The replacement module is used to replace at least one target object area image in the target image frame with at least one inverse transformation image to obtain a processed target image frame.
11. The image processing apparatus according to claim 10, wherein: The step of responding to a target object processing request triggered by a user during a virtual reality live broadcast and obtaining at least one target object area image in a target image frame corresponding to the virtual reality live broadcast includes: In response to a target object processing request triggered by a user during a virtual reality live broadcast, a live video stream corresponding to the virtual reality live broadcast is obtained; For each target image frame in the live video stream, performing a target object recognition operation on the target image frame to determine position information of at least one target object in the target image frame; The at least one target object area image is acquired according to the position information of the at least one target object.
12. The image processing device according to claim 11, wherein: The performing a target object recognition operation on the target image frame to determine position information of at least one target object in the target image frame includes: Scaling the target image frame according to a preset scaling size to obtain a scaled target image frame; A target object recognition operation is performed on the scaled target image frame to determine position information of at least one target object in the scaled target image frame.
13. The image processing device according to any one of claims 10 to 12, wherein: The step of performing a distortion correction operation on the at least one target object area image to obtain at least one distortion-free image includes: Establish a virtual camera located at the origin of the world coordinate system; For each target object area image, the target object area image is converted into an image under the viewing angle of the virtual camera to obtain the undistorted image.
14. The image processing apparatus according to claim 13, wherein: The step of converting each target object area image into an image under the perspective of the virtual camera to obtain the undistorted image includes: For each first pixel point in each target object area image under the perspective of the virtual camera, a matrix projection operation is performed on the first pixel point according to an observation matrix and a projection matrix corresponding to the virtual camera to obtain a first three-dimensional space coordinate; Determine first longitude and latitude information of each first pixel point in the spherical coordinate system where the target object area image is located according to the first three-dimensional space coordinate corresponding to each first pixel point; Determining first texture mapping coordinates corresponding to the first longitude and latitude information according to a mapping relationship between the longitude and latitude and a texture mapping coordinate system corresponding to the target object area image; A combination operation is performed on the first texture map coordinates corresponding to each first pixel point to obtain the undistorted image.
15. The image processing device according to any one of claims 10 to 14, wherein: The performing an image processing operation based on the at least one distortion-free image to obtain at least one processed image comprises: Performing a target object key point recognition operation on at least one of the undistorted images to obtain target object key point information corresponding to at least one of the undistorted images; An image processing operation is performed on the target object in at least one of the undistorted images according to the key point information of the target object corresponding to at least one of the undistorted images to obtain the at least one processed image.
16. The image processing device according to any one of claims 10 to 14, wherein: The step of performing an inverse transformation operation of the distortion correction operation on the at least one processed image to obtain at least one inverse transformed image comprises: For each second pixel point in each target object area image, determine the conversion of the second texture coordinates corresponding to the second pixel point into second longitude and latitude information according to the mapping relationship between the texture coordinate system corresponding to the target object area image and the longitude and latitude; Determine a second three-dimensional space coordinate corresponding to the second pixel point according to the second longitude and latitude information; Detecting whether the second three-dimensional space coordinate is within the visible range of the virtual camera located at the origin of the world coordinate system; The second three-dimensional space coordinates are processed according to the detection result to obtain the inverse transformation image.
17. The image processing apparatus according to claim 16, wherein: The processing of the second three-dimensional space coordinates according to the detection result to obtain the inverse transformation image includes: If the second three-dimensional space coordinate is within the visible range of the virtual camera, a matrix projection operation is performed on the second three-dimensional space coordinate according to an observation matrix and a projection matrix corresponding to an image acquisition device that acquires the target object area image, to obtain a third pixel point of the second three-dimensional space coordinate under the viewing angle of the image acquisition device, and the corresponding second pixel point is replaced by the third pixel point; If the second three-dimensional space coordinate is not within the visible range of the virtual camera, then the second pixel point corresponding to the second three-dimensional space coordinate is not processed; The inverse transformation image is generated according to a third pixel point located within the visible range of the virtual camera and a second pixel point not within the visible range of the virtual camera.
18. The image processing device according to any one of claims 10 to 14, wherein: The step of replacing at least one target object region image in the target image frame with at least one inverse transformation image to obtain a processed target image frame comprises: For each target object area image, determining a display position of the target object area image in the target image frame; The target object area image is inversely transformed according to the display position to obtain the processed target image frame.
19. An electronic device comprising: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the image processing method according to any one of claims 1 to 9.
20. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the image processing method according to any one of claims 1 to 9 is implemented.
21. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the image processing method according to any one of claims 1 to 9 is implemented.
22. A computer program, wherein When the computer program is executed by a processor, the image processing method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Beautifying method and system for virtual scene live
CN106713988A
Virtual image distortion correcting method and system
CN108876725A
Video playing method, device, equipment and storage medium
CN109035180A
Live broadcast special effect rendering method, device and equipment, readable storage medium and product
CN115442637A
Electronic device including camera module
KR1020230010472A
