Image processing method and apparatus, and terminal device
By determining the object correspondence and key point information of the first and second images in spatial video, the problem of poor image processing accuracy and consistency in the prior art is solved, and a more efficient image processing effect is achieved.
Patent Information
- Application Number
- PCT/CN2025/089920
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-19
- Filing Date
- 2025-04-18
- Publication Date
- 2026-01-22
AI Technical Summary
Existing technologies suffer from low image processing accuracy and poor consistency when processing spatial video images, especially when processing multi-view video frames, where they cannot effectively guarantee image processing consistency.
By acquiring the first and second images of the spatial video, the correspondence between the objects in the two images is determined, and the target layer is determined based on the correspondence. Image processing is performed using the first and second key point information to ensure the accuracy and consistency of image processing.
It improves the accuracy and consistency of spatial video image processing and enhances the image processing efficiency of multi-view video frames.
Smart Images

Figure CN2025089920_22012026_PF_FP_ABST
Abstract
Description
Image processing methods, devices and terminal equipment
[0001] Cross-references to related applications
[0002] This application claims priority to Chinese Patent Application No. 202410973209.X, filed on July 19, 2024, entitled "Image Processing Method, Apparatus and Terminal Equipment", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This disclosure relates to the field of image processing technology, and in particular to an image processing method, apparatus, and terminal device. Background Technology
[0004] Image processing techniques can effectively improve the visual presentation of images. For example, adding a whitening effect to an image can enhance the brightness and color of objects within it. Summary of the Invention
[0005] This disclosure provides an image processing method, apparatus, and terminal device to solve the technical problems in the prior art.
[0006] In a first aspect, this disclosure provides an image processing method, which includes:
[0007] Acquire a first image and a second image of the spatial video, wherein the first image and the second image are at the same playback time of the spatial video but have different perspectives;
[0008] Determine the correspondence between objects in the first image and objects in the second image;
[0009] Based on the first image, the second image, and the correspondence, a target layer is determined, the target layer including the layer used when image processing is performed on the image associated with the first image and the image associated with the second image;
[0010] Based on the target layer, the image processing is performed on the first image and the second image.
[0011] In a second aspect, this disclosure provides an image processing apparatus, which includes an acquisition module, a first determination module, a second determination module, and a processing module, wherein:
[0012] The acquisition module is used to acquire a first image and a second image of the spatial video, wherein the first image and the second image are at the same playback time of the spatial video but have different perspectives;
[0013] The first determining module is used to determine the correspondence between objects in the first image and objects in the second image;
[0014] The second determining module is used to determine a target layer based on the first image, the second image, and the correspondence, wherein the target layer includes the layer used when image processing is performed on the image associated with the first image and the image associated with the second image;
[0015] The processing module is used to perform the image processing on the first image and the second image based on the target layer.
[0016] Thirdly, this disclosure provides a terminal device including: a processor and a memory;
[0017] The memory stores computer-executed instructions;
[0018] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the image processing methods described in the first aspect above and various possible aspects of the first aspect.
[0019] Fourthly, this disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the image processing methods described in the first aspect and various possible aspects thereof.
[0020] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the image processing methods described in the first aspect above and various possible aspects of the first aspect. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of this disclosure;
[0023] Figure 2 is a schematic flowchart of an image processing method provided in an embodiment of this disclosure;
[0024] Figure 3 is a schematic diagram of a first image and a second image provided in an embodiment of this disclosure;
[0025] Figure 4 is a schematic diagram of determining a correspondence according to an embodiment of this disclosure;
[0026] Figure 5 is a schematic diagram of a process for determining a target layer according to an embodiment of this disclosure;
[0027] Figure 6 is a schematic diagram of a hybrid embodiment provided in this disclosure;
[0028] Figure 7 is a schematic diagram of a method for determining a target layer according to an embodiment of this disclosure;
[0029] Figure 8 is a schematic diagram of an image processing method provided in an embodiment of this disclosure;
[0030] Figure 9 is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this disclosure;
[0031] Figure 10 is a schematic diagram of the structure of a terminal device provided in an embodiment of this disclosure. Detailed Implementation
[0032] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0033] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0034] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation 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 software or hardware, such as the terminal device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0035] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the terminal device.
[0036] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0037] For ease of understanding, the concepts involved in the embodiments of this disclosure will be explained below.
[0038] Terminal equipment: A device with wireless transceiver capabilities. Terminal equipment can be deployed on land, including indoors or outdoors, handheld, wearable, or vehicle-mounted. Terminal equipment can be a mobile phone, tablet, computer with wireless transceiver capabilities, virtual reality (VR) terminal equipment, augmented reality (AR) terminal equipment, wireless terminals in industrial control, vehicle-mounted terminal equipment, wireless terminals in self-driving vehicles, wireless terminal equipment in remote medical care, wireless terminal equipment in smart grids, wireless terminal equipment in transportation safety, wireless terminal equipment in smart cities, wireless terminal equipment in smart homes, wearable terminal equipment, etc. The terminal equipment involved in the embodiments of this disclosure can also be referred to as a terminal, user equipment (UE), access terminal equipment, vehicle-mounted terminal, industrial control terminal, UE unit, UE station, mobile station, mobile station, remote station, remote terminal equipment, mobile device, UE terminal equipment, wireless communication equipment, UE agent, or UE device, etc. Terminal devices can be fixed or mobile.
[0039] The application scenarios of the embodiments of this disclosure will now be described with reference to Figure 1.
[0040] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of this disclosure. Referring to Figure 1, it includes: spatial video and a terminal device. The spatial video may include a left-eye video and a right-eye video, which can be obtained by two shooting devices placed in different positions, capturing the same object as two videos. The terminal device may include a left-eye viewing area and a right-eye viewing area. When the terminal device plays the spatial video, it can display the left-eye video in the left-eye viewing area and the right-eye video in the right-eye viewing area. Thus, by watching the video through the terminal device, the user can experience a stereoscopic display effect.
[0041] It should be noted that Figure 1 is merely an example of an application scenario of the embodiments of this disclosure, and is not intended to limit the application scenarios of the embodiments of this disclosure.
[0042] Currently, terminal devices can perform image processing on video frames to add processed display effects to the video. For example, a terminal device can add a whitening effect to each video frame, thus adding a whitening effect to the video. However, the above image processing methods can only process videos displayed in a two-dimensional format. When processing images related to spatial video, the accuracy of the image processing will be relatively low.
[0043] In related technologies, image processing of video frames can effectively improve the display effect of a video. For example, a video may include a face, and the terminal device can add a whitening effect to each video frame, thus whitening the face in the video. However, the above method is usually used to process videos displayed in a two-dimensional format. For example, a two-dimensional video may consist of one video stream, and the terminal device can improve the display effect by processing the video frames in that video stream using image processing technology. Spatial video includes two related video streams. If the image processing methods used for two-dimensional videos are applied to spatial videos, it will lead to poor consistency in image processing between the video frames in the two video streams. For example, if a spatial video includes a face, the face in the left-eye video may have a whitening effect, but the face in the right-eye video may not. This will result in poor accuracy of image processing.
[0044] To address the technical problems in related technologies, this application provides an image processing method. A terminal device can acquire a first image and a second image of a spatial video. The first image and the second image are played at the same time but from different perspectives. The terminal device can determine the correspondence between objects in the first image and objects in the second image. Based on this correspondence, it determines first key point information of the objects in the first image and second key point information of the objects in the second image. Based on the first key point information, the second key point information, the first image, and the second image, a target layer is determined. This target layer includes layers used for image processing of images associated with the first image and images associated with the second image. The terminal device can perform image processing on the first image and the second image based on the target layer. Thus, since the terminal device can perform image processing on the first image and the second image based on the target layer, the efficiency of image processing can be improved when performing various image processing operations on the first image and the second image. Furthermore, since the terminal device can process the first image and the second image based on the correspondence, the consistency of image processing between the first image and the second image is ensured. Combining the first key point information and the second key point information improves the accuracy of image processing on the first image and the second image.
[0045] The technical solutions of this disclosure and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this disclosure will now be described with reference to the accompanying drawings.
[0046] Figure 2 is a schematic flowchart of an image processing method provided in an embodiment of this disclosure. Referring to Figure 2, the method may include:
[0047] S201. Acquire the first and second images of the spatial video.
[0048] The execution entity of this disclosure can be a terminal device or an image processing device within the terminal device. The image processing device can be implemented in software, or it can be implemented using a combination of software and hardware; this disclosure does not limit the implementation in this regard.
[0049] The spatial video can include videos from a first-person perspective and videos from a second-person perspective. For example, the first-person perspective can be a left-eye perspective, and the second-person perspective can be a right-eye perspective. The spatial video can include videos from both the left and right eye perspectives. When the spatial video is played, the video from the left eye perspective is played in the area viewed by the user's left eye, and the video from the right eye perspective is played in the area viewed by the user's right eye. This allows the user to experience a stereoscopic display effect when watching the spatial video.
[0050] It should be noted that the first perspective can also be the right eye perspective, and the second perspective can also be the left eye perspective; this disclosure does not limit this.
[0051] Optionally, the parallax between the first viewpoint and the second viewpoint can be the parallax of the human eye, and the parallax between the first viewpoint and the second viewpoint can also be set arbitrarily. This embodiment of the present disclosure does not limit this.
[0052] Optionally, the terminal device can generate spatial video. For example, the terminal device can simulate a virtual scene and create a virtual camera in the virtual scene based on the shooting parameters of the spatial video (such as aspect ratio, range, and field of view). Then, it can render video streams from two different perspectives captured by the virtual camera to obtain spatial video.
[0053] Optionally, the terminal device can capture spatial video. For example, the terminal device may include two cameras that can capture images from different perspectives. Therefore, based on the two cameras, the terminal device can capture two video streams from different perspectives to obtain spatial video.
[0054] It should be noted that the terminal device can also acquire spatial video (e.g., receive spatial video sent by other devices) based on any feasible implementation method, and the embodiments disclosed herein do not limit this.
[0055] The first image and the second image can be images from a spatial video, and the first image and the second image are played at the same time but from different perspectives. For example, the spatial video includes video a and video b, and video a and video b have different perspectives. The first image can be an image from video a, and the second image can be an image from video b (that is, the first image and the second image have different perspectives). Furthermore, if the first image is the first frame of video a, then the second image can be the first frame of video b (that is, the first image and the second image are played at the same time).
[0056] Optionally, the terminal device may acquire the first image and the second image of the spatial video according to any feasible implementation method (e.g., the terminal device acquires the first image and determines the second image based on the first image, etc.). This disclosure does not limit this.
[0057] The first and second images will now be explained with reference to Figure 3.
[0058] Figure 3 is a schematic diagram of a first image and a second image provided in an embodiment of this disclosure. Referring to Figure 3, it includes a left-eye video and a right-eye video. The left-eye video includes 1 frame, 2 frames, 3 frames, 4 frames, etc., and the right-eye video also includes 1 frame, 2 frames, 3 frames, 4 frames, etc. If the first image is 1 frame of the left-eye video, then the second image can be 1 frame of the right-eye video. Similarly, if the first image is 2 frames of the left-eye video, then the second image can be 2 frames of the right-eye video; if the first image is 3 frames of the left-eye video, then the second image can be 3 frames of the right-eye video; if the first image is 4 frames of the left-eye video, then the second image can be 4 frames of the right-eye video.
[0059] It should be noted that Figure 3 is only an example of the first and second images, and is not intended to limit the first and second images.
[0060] S202. Determine the correspondence between the objects in the first image and the objects in the second image.
[0061] The first and second images may include objects. For example, the objects may be objects included in the scene of the spatial video. For example, the objects may be tables, chairs, buildings, animals, faces, etc., and this disclosure does not limit them.
[0062] The correspondence may include the correspondence between identical objects in the first image and the second image. Optionally, the terminal device may determine the correspondence between objects in the first image and objects in the second image according to the following feasible implementation: performing image detection processing on the first image to obtain objects in the first image, performing image detection processing on the second image to obtain objects in the second image, and determining the correspondence based on the objects in the first image and the objects in the second image.
[0063] Optionally, the correspondence can indicate the same objects in the first image and the second image. For example, the first image may include a table and a chair, and the second image may also include a table and a chair. The correspondence can include the correspondence between the table in the first image and the table in the second image, and the correspondence between the chair in the first image and the chair in the second image. For example, the first image may include the face 'a' of the first user and the face 'b' of the second user, and the second image may include the face 'c' of the first user and the face 'd' of the second user. The correspondence can include the correspondence between face 'a' and face 'c', and between face 'b' and face 'd'. In this way, the terminal device can determine the same objects in the first image and the second image. Therefore, based on the correspondence, the terminal device can improve the consistency of image processing between the first image and the second image.
[0064] Optionally, the terminal device can identify objects in the first image and the second image based on an image detection algorithm, and identify the same objects in the first image and the second image. For example, the terminal device can detect faces in the first image and the second image based on a face detection algorithm, and the face detection algorithm can detect the similarity between faces in the first image and faces in the second image. The terminal device can obtain a correspondence based on faces with a similarity greater than or equal to a preset threshold.
[0065] Optionally, the terminal device can identify objects in the first and second images, as well as the positions of the objects in the first and second images, based on image detection algorithms, and then determine the correspondence based on the positions. For example, the terminal device processes the first and second images based on a face detection algorithm to obtain faces a and b in the first image and faces c and d in the second image, where face a is to the left of face b and face c is to the left of face d. The terminal device can then determine that face a corresponds to face c and face b corresponds to face d.
[0066] It should be noted that the terminal device can also determine the correspondence between the objects in the first image and the objects in the second image based on any feasible implementation method (for example, the terminal device can detect the objects in the first image and the second image based on the image detection algorithm, and number the objects in the first image and the second image respectively based on the preset numbering rules, and the terminal device can determine the objects with the same number as the same object). This disclosure does not limit this.
[0067] The process of determining the correspondence will be explained below with reference to Figure 4.
[0068] Figure 4 is a schematic diagram illustrating the determination of a correspondence relationship according to an embodiment of this disclosure. Referring to Figure 4, it includes a first image and a second image. The first image may include face 1 and face 2, and the second image may include face 3 and face 4 (due to different viewpoints, the positions of face 3 and face 4 in the second image may differ from the positions of face 1 and face 2 in the first image). A terminal device (not shown in Figure 4) can determine the correspondence between face 1 and face 3, and between face 2 and face 4, based on the similarity of the faces, thereby obtaining the correspondence relationship between the faces in the first image and the faces in the second image. The terminal device performs image processing based on this correspondence relationship, ensuring consistency in image processing between the first and second images.
[0069] S203. Based on the first image, the second image, and the correspondence, determine the target layer.
[0070] The target layer includes layers used for image processing of the image associated with the first image and the image associated with the second image. For example, the terminal device can add a skin smoothing effect (a beautification image processing technique) to the image associated with the first image and the image associated with the second image. During the process of adding the skin smoothing effect, multiple intermediate skin smoothing textures can be obtained, and these multiple intermediate skin smoothing textures can be multiple layers for adding the skin smoothing effect.
[0071] Optionally, the target layer may include layers used for various image processing operations on the images associated with the first image and the second image. For example, the terminal device may add skin smoothing, eye enlargement and face slimming effects (a beautification image processing technique), and whitening effects to the images associated with the first image and the second image. In this case, the target layer may include multiple layers for adding skin smoothing effects, a layer for adding eye enlargement and face slimming effects (pixel offset information), and a layer for adding whitening effects (color mapping relationship).
[0072] The terminal device can determine the target layer based on the following feasible implementation: Based on the correspondence, determine the first key point information associated with the first image and the second key point information associated with the second image; based on the first key point information, the second key point information, the first image, and the second image, determine the target layer. In this way, combining the key point information can improve the accuracy of image processing, thereby improving the accuracy of the target layer.
[0073] The first key point information may include key point related information of the object in the first image (such as number, location, etc.), and the second key point information may include key point related information of the object in the second image.
[0074] The terminal device can determine the first key point information of the object in the first image and the second key point information of the second image based on the following feasible implementation method: among the objects in the first image and the objects in the second image, at least one set of target objects is determined, and the key points of at least one set of target objects are aligned to obtain the first key point information and the second key point information.
[0075] Here, the target objects are objects with a corresponding relationship. Optionally, the terminal device can determine at least one set of target objects based on the corresponding relationship. For example, if the first image includes object a and object b, and the second image includes object c and object d, and if object a and object c have a corresponding relationship, and object b and object d have a corresponding relationship, then the terminal device can determine two sets of target objects, one set including object a and object c, and the other set including object b and object d. For example, if the first image includes face a and face b, and the second image includes face c and face d, and if face a and face c are the same, and face b and face d are the same, then the terminal device can determine two sets of target faces, one set including face a and face c, and the other set including face b and face d.
[0076] Optionally, the terminal device can align the key points of the target object in the horizontal and / or vertical directions. For example, if the target object includes face 'a' in the first image and face 'b' in the second image, the terminal device uses the key points of face 'a' as a reference and aligns the key points of face 'b' with the key points of face 'a' in the vertical direction (y-direction) to obtain first key point information (key points of face 'a') and second key point information (aligned key points of face 'b'). Alternatively, the terminal device uses the key points of face 'b' as a reference and aligns the key points of face 'a' with the key points of face 'b' in the vertical direction to obtain first key point information (aligned key points of face 'a') and second key point information (key points of face 'b'). Because the first and second key point information are aligned in the vertical direction, the parallax deviation between the first and second images can be reduced (due to factors such as image synthesis, parallax changes, and parallax deviation can be the difference between the changed parallax and the original parallax), thereby improving the accuracy of image processing.
[0077] It should be noted that the terminal device can align the key points of at least one set of target objects based on any feasible implementation method, and the embodiments disclosed herein are not limited in this respect.
[0078] It should be noted that the number of key points of the objects in the first and second images can be preset. For example, if the objects in the first and second images are faces, and the terminal device is preset to include 64 key points in a face (the number and position of each key point can be preset), then the terminal device can perform key point detection on the face in the first image to obtain 64 key points. Similarly, the terminal device can perform key point detection on the face in the second image to obtain 64 key points.
[0079] It should be noted that when the terminal device acquires the first image and the second image, it can perform key point detection on the objects in the first image and on the objects in the second image. The terminal device can also perform key point detection on the first image and the second image based on any other feasible implementation method. This embodiment of the present disclosure does not limit this.
[0080] It should be noted that the terminal device can perform key point detection on objects in the first image and objects in the second image based on any feasible implementation method, and the embodiments disclosed herein are not limited in this regard.
[0081] Optionally, the target layer may include a layer associated with the first image (a layer during image processing of the image associated with the first image) and a layer associated with the second image (a layer during image processing of the image associated with the second image). The terminal device can process the image associated with the first image based on first key point information to obtain the layer associated with the first image, and process the image associated with the second image based on second key point information to obtain the layer associated with the second image, thereby improving the accuracy of the target layer.
[0082] Optionally, the terminal device may obtain the target layer during image processing, or it may perform partial image processing on the image associated with the first image and the image associated with the second image to obtain the target layer. This embodiment of the present disclosure does not limit this.
[0083] It should be noted that when the terminal device obtains the target layer, it can obtain the layer associated with the first image and the layer associated with the second image (e.g., perform image processing on the image associated with the first image and the image associated with the second image respectively). The terminal device can also determine the layer associated with the first image and the layer associated with the second image based on any feasible implementation method. This disclosure does not limit this.
[0084] It should be noted that the first key point information can provide accurate positioning information (such as the position of eyebrows and eyes on a face). Therefore, based on the first key point information, the terminal device can accurately perform image processing on the first image (for example, when adding a big eye effect, the terminal device can accurately determine the position of the eyes in the first image based on the first key point information; when adding a skin smoothing effect, the terminal device can accurately determine the skin smoothing position in the first image based on the first key point information). Similarly, based on the second key point information, the terminal device can accurately perform image processing on the second image.
[0085] The image associated with the first image can be an image that has been downsampled from the first image, and the image associated with the second image can be an image that has been downsampled from the second image. The downsampling ratio can be any ratio, and this embodiment does not limit it. Furthermore, the downsampling ratio of the first image can be the same as or different from the downsampling ratio of the second image.
[0086] Optionally, image processing may include pixel-shifting image processing, pixel-adding image processing, and pixel color adjustment image processing.
[0087] Among them, pixel-shifting image processing refers to image processing that adjusts the position of pixels in an image. For example, pixel-shifting image processing can include image processing in beautification scenarios such as adding an eye-enlarging effect or adding a face-slimming effect. In image processing that adds an eye-enlarging effect, the terminal device can move the pixels around the eyes of the face in the image to increase the size of the eyes. In image processing that adds a face-slimming effect, the terminal device can move the pixels around the edges of the face in the image to reduce the size of the face.
[0088] Image processing that adds new pixels can be categorized as image processing that adds new pixels to an image. For example, image processing that adds new pixels can include image processing in beautification scenarios such as adding makeup effects or adding sticker effects. In image processing that adds makeup effects, the terminal device can add new pixels to the eyes of a face in the image. These new pixels can be pixels obtained by the terminal device from the makeup image material. Similarly, in image processing that adds sticker effects, the terminal device can add new pixels to the image. These new pixels can be pixels obtained by the terminal device from the sticker image.
[0089] Pixel color adjustment type image processing refers to image processing that adjusts the colors of pixels in an image. For example, pixel color adjustment type image processing can include image processing that adds a whitening effect or image processing that adds a filter. In image processing that adds a whitening effect, the terminal device can adjust the color values of pixels in the image based on the look-up table (Lut) corresponding to the whitening effect, thereby changing the color of the image.
[0090] Wherein, if the image processing includes pixel-shifting image processing, the target layer may include an offset texture. For example, the offset texture may include the offset of each pixel in the image. For instance, a first image may include pixels 1, 2, and 3. The offset texture associated with the first image may indicate that pixel 1 is offset to the left by 1 pixel, pixel 2 is offset to the right by 2 pixels, and pixel 3 is not offset. The terminal device may perform pixel-shifting image processing on the first image based on this offset texture. Similarly, the terminal device may perform pixel-shifting image processing on the second image based on the offset texture associated with the second image.
[0091] If the image processing includes image processing involving the addition of new pixels, the target layer may include an intermediate texture (which may be an image or information) from the process of adding new pixels. For example, the intermediate texture from the process of adding new pixels may include a mask, a layer containing new pixels, etc. This embodiment of the present disclosure does not limit this, and the terminal device may perform image processing involving the addition of new pixels on the first image and the second image based on the intermediate texture from the process of adding new pixels.
[0092] If the image processing includes pixel color adjustment type image processing, the target layer may include the layer used in the pixel color adjustment process. For example, the layer used in the pixel color adjustment process may include filter-related layers, LUT maps, etc. This embodiment of the present disclosure does not limit this, and the terminal device may perform pixel color adjustment type image processing on the first image and the second image based on the layer used in the pixel color adjustment process.
[0093] The process of determining the target layer will be explained below with reference to Figure 5.
[0094] Figure 5 is a schematic diagram of a process for determining a target layer according to an embodiment of this disclosure. Referring to Figure 5, it includes: a first image and a second image. A terminal device (not shown in Figure 5) can perform a 4x downsampling process on the first image to obtain a first downsampled image. The terminal device can perform a 4x downsampling process on the second image to obtain a second downsampled image. Based on first key point information, the terminal device can perform skin smoothing processing on the first downsampled image (image processing with added skin smoothing effects, or image processing of a partial process with added skin smoothing effects) to obtain skin smoothing intermediate texture 5, skin smoothing intermediate texture 6, and skin smoothing intermediate texture 7.
[0095] Referring to Figure 5, the terminal device can perform eye-enlarging and face-slimming processing on the first downsampled image based on the first keypoint information (image processing that adds an eye-enlarging and face-slimming effect, or image processing of a partial process that adds an eye-enlarging and face-slimming effect), resulting in offset texture 8. The terminal device can perform eye-enlarging and face-slimming processing on the second downsampled image based on the second keypoint information, resulting in offset texture 9. The terminal device can perform skin smoothing processing on the second downsampled image based on the second keypoint information, resulting in skin smoothing intermediate textures 10, 11, and 12.
[0096] Please refer to Figure 5. The terminal device can determine the target layer, which may include skin smoothing intermediate textures 5, 6, 7, offset textures 8, 9, 10, 11, and 12. It should be noted that if the terminal device adds a whitening effect to the first and second images, the target layer may also include a whitening LUT image. Thus, since the terminal device can determine the target layer based on the downsampled image, the efficiency of acquiring the target layer can be improved, and the processing complexity reduced. Furthermore, since the first and second keypoint information are aligned keypoint information, parallax bias can be reduced, improving the accuracy of the target layer.
[0097] It should be noted that, in the embodiment shown in Figure 5, the intermediate skin smoothing texture 5, intermediate skin smoothing texture 6, intermediate skin smoothing texture 7 and offset texture 8 can be layers associated with the first image, and the offset texture 9, intermediate skin smoothing texture 10, intermediate skin smoothing texture 11 and intermediate skin smoothing texture 12 can be layers associated with the second image.
[0098] S204. Based on the target layer, perform image processing on the first image and the second image.
[0099] The terminal device can perform image processing on the first and second images by blending the target layer with the first and second images. The resulting image can have image processing effects (such as whitening or skin smoothing) added to the first and second images.
[0100] In this context, "blending" can refer to image processing techniques within the field of image processing, and it can be used for pixel-level data processing. For example, in pixel-level blending, the color or brightness value of each pixel in an image can be calculated based on preset blending rules to generate the pixel or brightness value of the output image. Blending can fuse data from multiple images or image layers to obtain a new image that includes all features of the input images. Blending can be performed globally or on any region of the image. For instance, blending can be applied to image compositing and special effects creation scenarios such as adding skin smoothing, whitening, or eye-enlarging / face-slimming effects. This disclosure does not limit the scope of the application.
[0101] The terminal device can perform image processing on the first image and the second image based on the following feasible implementation: determining a first mixing order between the layer associated with the first image and the first image, and mixing the layer associated with the first image with the first image based on the first mixing order; determining a second mixing order between the layer associated with the second image and the second image, and mixing the layer associated with the second image with the second image based on the second mixing order.
[0102] The first blending order can be used to indicate the blending order of layers associated with the first image and the first image. For example, if there is only one type of image processing, the layers associated with the first image may include multiple layers in that image processing process, and the first blending order can indicate the blending order of these multiple layers with the first image. For example, if the image processing is to add a skin smoothing effect, the layers associated with the first image may include skin smoothing intermediate texture a, skin smoothing intermediate texture b, and skin smoothing intermediate texture c, and the first blending order can indicate the blending order of skin smoothing intermediate texture a, skin smoothing intermediate texture b, and skin smoothing intermediate texture c with the first image. It should be noted that in this scenario, the first blending order can be determined based on the process of adding the skin smoothing effect (e.g., if the process of adding the skin smoothing effect is: first blending skin smoothing intermediate texture a, then blending skin smoothing intermediate texture b, and finally blending skin smoothing intermediate texture c, then the first blending order can be: skin smoothing intermediate texture a, skin smoothing intermediate texture b, and skin smoothing intermediate texture c). This embodiment of the present disclosure does not limit this.
[0103] For example, if there are multiple types of image processing, the first blending order can indicate the blending order of the layers related to the multiple image processing with the first image. If any image processing includes multiple related layers, the first blending order can also indicate the blending order of the multiple related layers included in the image processing with the first image. For example, if the image processing can include adding a whitening effect and an eye-enlarging effect, the layers related to the first image can include a whitening LUT image for adding the whitening effect and an offset texture for adding the eye-enlarging effect. The first blending order can indicate the blending order of the whitening LUT, the offset texture, and the first image. If the image processing can also include adding a skin-smoothing effect, the layers related to the first image can also include multiple intermediate skin-smoothing textures related to adding the skin-smoothing effect. The first blending order can also indicate the blending order of the multiple intermediate skin-smoothing textures with the first image.
[0104] For example, if the first blending order is: adding an eye-enlarging effect, adding a skin-smoothing effect, and adding a whitening effect, and in the skin-smoothing effect, the order of adding the intermediate skin-smoothing texture is intermediate skin-smoothing texture a, intermediate skin-smoothing texture b, and intermediate skin-smoothing texture c, then the terminal device can, based on the first blending order, blend the offset texture for adding the eye-enlarging effect, intermediate skin-smoothing texture a, intermediate skin-smoothing texture b, and intermediate skin-smoothing texture c, and the whitening LUT with the first image, thereby adding an eye-enlarging effect, a skin-smoothing effect, and a whitening effect to the first image.
[0105] The process of blending the layers related to the first image with the first image will be explained below with reference to Figure 6.
[0106] Figure 6 is a schematic diagram of a mixing method provided in an embodiment of this disclosure. Referring to Figure 6, it includes: a layer related to a first image. This layer may include a skin-smoothing intermediate texture 13, a skin-smoothing intermediate texture 14, a skin-smoothing intermediate texture 15, an offset 16, a whitening LUT image, and the first image. The terminal device (not shown in Figure 6) can mix the skin-smoothing intermediate texture 13, skin-smoothing intermediate texture 14, skin-smoothing intermediate texture 15, offset 16 (a layer for adding an eye-enlarging effect), the whitening LUT image, and the first image based on a first mixing order to obtain a beautified image. The beautified image is an image in which skin-smoothing, eye-enlarging, and whitening effects are added to the first image. In this way, the terminal device only needs to perform one mixing process to add multiple image processing-related effects to the first image, thereby improving the efficiency of image processing.
[0107] The second mixing order can be used to indicate the mixing order of layers associated with the second image and the second image. It should be noted that the second mixing order can indicate the mixing order of layers associated with multiple image processing and the second image. The second mixing order can also indicate the mixing order of multiple layers associated with any one image processing and the second image. For specific examples, please refer to the example of the first mixing order mentioned above. Furthermore, the method for determining the second mixing order can refer to the method for determining the first mixing order. The embodiments of this disclosure will not be described in detail here.
[0108] It should be noted that the terminal device blends the layers associated with the second image with the second image based on the second blending order. This can be done by referring to the method of the terminal device blending the layers associated with the first image with the first image based on the first blending order (as shown in Figure 6). The embodiments disclosed herein will not be described in detail here.
[0109] This disclosure provides an image processing method. A terminal device can acquire a first image and a second image of spatial video. The terminal device can determine the correspondence between objects in the first image and objects in the second image. The terminal device can identify at least one set of target objects from the objects in the first image and the objects in the second image, and align the key points of the at least one set of target objects to obtain first key point information and second key point information. Based on the first key point information, the second key point information, the first image, and the second image, the terminal device can determine a target layer, and perform image processing on the first image and the second image based on the target layer. In this way, since the correspondence can indicate the same objects in the first image and the second image, the consistency of image processing between the first image and the second image can be guaranteed. Since the terminal device can perform image processing on the first image and the second image based on the target layer, the efficiency and accuracy of image processing can be improved when performing multiple image processing operations on the first image and the second image.
[0110] Based on the embodiment shown in Figure 2, the method for determining the target layer based on the first key point information, the second key point information, the first image, and the second image in the above image processing method will be described in detail below with reference to Figure 7.
[0111] Figure 7 is a schematic diagram of a method for determining a target layer according to an embodiment of this disclosure. Referring to Figure 7, the method flow includes:
[0112] S701. Downsample the first image to obtain the image associated with the first image.
[0113] The terminal device can perform a 2x downsampling process on the first image to obtain an image associated with the first image, or it can perform a 4x downsampling process on the first image to obtain an image associated with the first image. This embodiment of the present disclosure does not limit the scope of the application.
[0114] S702. Downsample the second image to obtain the image associated with the second image.
[0115] The terminal device can perform a 2x downsampling process on the second image to obtain an image associated with the second image, or it can perform a 4x downsampling process on the second image to obtain an image associated with the second image. This embodiment of the present disclosure does not limit the specific method used.
[0116] It should be noted that the terminal device can perform downsampling processing on the first image and the second image based on any feasible implementation method, and the embodiments disclosed herein are not limited in this regard.
[0117] S703. Based on the first key point information, the second key point information, the image associated with the first image, and the image associated with the second image, determine the target layer.
[0118] The target layer may include a layer associated with the first image and a layer associated with the second image. The terminal device may determine the target layer based on the following feasible implementation: based on the first key point information, perform image processing on the image associated with the first image and obtain the layer during the image processing of the image associated with the first image to obtain the layer associated with the first image; based on the second key point information, perform image processing on the image associated with the second image and obtain the layer during the image processing of the image associated with the second image to obtain the layer associated with the second image.
[0119] Specifically, the terminal device can identify the layers associated with the first image and the second image as target layers. For example, based on the first key point information, the terminal device can accurately determine the position of a face in the image associated with the first image, and then add a skin-smoothing effect to the image associated with the first image. During the skin-smoothing process, multiple intermediate skin-smoothing textures can be generated. The terminal device can acquire these multiple intermediate skin-smoothing textures to obtain the layer associated with the first image. Similarly, the terminal device can obtain the layer associated with the second image. This improves the accuracy of the target layer.
[0120] This disclosure provides a method for determining a target layer. A terminal device downsamples a first image to obtain an image associated with the first image, downsamples a second image to obtain an image associated with the second image, performs image processing on the image associated with the first image based on first keypoint information, and obtains the layer associated with the first image during the image processing process. Similarly, it performs image processing on the image associated with the second image based on second keypoint information, and obtains the layer associated with the second image during the image processing process. This method improves the efficiency of obtaining the target layer because the terminal device can obtain it based on the downsampled image. Furthermore, since the first and second keypoint information include aligned keypoints, parallax bias is reduced, thereby improving the accuracy of the target layer.
[0121] Based on any of the above embodiments, the process of the above image processing method will be described in detail below with reference to FIG8.
[0122] Figure 8 is a schematic diagram of an image processing method provided in an embodiment of this disclosure. Referring to Figure 8, it includes a first image and a second image. The first image includes a face 17, and the second image includes a person 18. A terminal device (not shown in Figure 8) can perform a 4x downsampling process on the first image to obtain a first downsampled image, and perform a 4x downsampling process on the second image to obtain a second downsampled image. The terminal device can perform key point detection and face matching in the first and second images, and align the key points of identical faces in the vertical direction to obtain the first key point information of face 17 and the second key point information of face 18.
[0123] Referring to Figure 8, the terminal device can add a skin smoothing effect to the first downsampled image based on the first key point information, and add a skin smoothing effect to the second downsampled image based on the second key point information. It can also acquire the layers during the skin smoothing process, resulting in skin smoothing intermediate textures 19, 20, 21, and 22. Specifically, skin smoothing intermediate textures 19 and 20 are skin smoothing intermediate textures related to the first downsampled image, while skin smoothing intermediate textures 21 and 22 are skin smoothing intermediate textures related to the second downsampled image.
[0124] Referring to Figure 8, the terminal device can add an eye-enlarging and face-slimming effect to the first downsampled image based on the first key point information, and add the same effect to the second downsampled image based on the second key point information, resulting in offset texture 23 and offset texture 24. Offset texture 23 is the offset texture associated with the first downsampled image, and offset texture 24 is the offset texture associated with the second downsampled image.
[0125] Referring to Figure 8, the terminal device can acquire a whitening LUT image and blend the first image, the second image, and the skin smoothing intermediate textures 19, 20, 21, 22, 23, 24, and the whitening LUT image to obtain a beautified image 25 associated with the first image and a beautified image 26 associated with the second image. The beautified images 25 and 26 include effects such as enlarged eyes and slimmed face, skin smoothing, and whitening.
[0126] In this way, since the terminal device can acquire the target layer based on the downsampled image, the efficiency of acquiring the target layer can be improved. Furthermore, since the first key point information and the second key point information include aligned key points, parallax bias can be reduced, the accuracy of the target layer can be improved, and thus the efficiency and accuracy of image processing can be improved.
[0127] Figure 9 is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this disclosure. Referring to Figure 9, the image processing apparatus 900 includes an acquisition module 901, a first determination module 902, a second determination module 903, and a processing module 904, wherein:
[0128] The acquisition module 901 is used to acquire a first image and a second image of the spatial video, wherein the first image and the second image are at the same playback time of the spatial video but have different perspectives;
[0129] The first determining module 902 is used to determine the correspondence between objects in the first image and objects in the second image;
[0130] The second determining module 903 is used to determine a target layer based on the first image, the second image and the correspondence, wherein the target layer includes the layer when image processing is performed on the image associated with the first image and the image associated with the second image;
[0131] The processing module 904 is used to perform the image processing on the first image and the second image based on the target layer.
[0132] According to one or more embodiments of this disclosure, the second determining module 903 is specifically used for:
[0133] Based on the correspondence, determine the first key point information associated with the first image and the second key point information associated with the second image;
[0134] The target layer is determined based on the first key point information, the second key point information, the first image, and the second image.
[0135] According to one or more embodiments of this disclosure, the second determining module 903 is specifically used for:
[0136] The first image is downsampled to obtain an image associated with the first image;
[0137] The second image is downsampled to obtain an image associated with the second image;
[0138] The target layer is determined based on the first key point information, the second key point information, the image associated with the first image, and the image associated with the second image.
[0139] According to one or more embodiments of this disclosure, the second determining module 903 is specifically used for:
[0140] Based on the first key point information, image processing is performed on the image associated with the first image, and the layer in the process of image processing of the image associated with the first image is obtained to obtain the layer associated with the first image.
[0141] Based on the second key point information, image processing is performed on the image associated with the second image, and the layers in the image processing process are obtained to obtain the layer associated with the second image.
[0142] According to one or more embodiments of this disclosure, the second determining module 903 is specifically used for:
[0143] Among the objects in the first image and the objects in the second image, at least one set of target objects is determined, wherein the target objects are objects that have a corresponding relationship;
[0144] Align the key points of the at least one set of target objects to obtain the first key point information and the second key point information.
[0145] According to one or more embodiments of this disclosure, the processing module 904 is specifically used for:
[0146] Determine a first blending order between the layers associated with the first image and the first image, and blend the layers associated with the first image with the first image based on the first blending order;
[0147] Determine a second blending order between the layers associated with the second image and the second image, and blend the layers associated with the second image with the second image based on the second blending order.
[0148] According to one or more embodiments of this disclosure, the image processing includes moving pixel type image processing, adding pixel type image processing, and pixel color adjustment type image processing.
[0149] According to one or more embodiments of this disclosure, if the image processing includes moving pixel type image processing, then the target layer includes an offset texture;
[0150] If the image processing includes image processing of the type of adding pixels, then the target layer includes intermediate textures in the process of adding pixels;
[0151] If the image processing includes pixel color adjustment type image processing, then the target layer includes intermediate textures in the pixel color adjustment process.
[0152] According to one or more embodiments of this disclosure, the first determining module 902 is specifically used for:
[0153] The first image is subjected to image detection processing to obtain the objects in the first image;
[0154] The second image is subjected to image detection processing to obtain the objects in the second image;
[0155] The correspondence is determined based on the objects in the first image and the objects in the second image, and the correspondence is used to indicate the same objects in the first image and the second image.
[0156] The image processing apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.
[0157] Figure 10 is a schematic diagram of the structure of a terminal device provided in an embodiment of this disclosure. Referring to Figure 10, it shows a schematic diagram of the structure of a terminal device 1000 suitable for implementing an embodiment of this disclosure. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The terminal device shown in Figure 10 is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this disclosure.
[0158] As shown in Figure 10, the terminal device 1000 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1008 into random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the terminal device 1000. The processing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0159] Typically, the following devices can be connected to I / O interface 1005: input devices 1006 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 1007 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1008 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows terminal device 1000 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 10 shows a terminal device 1000 with various devices, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0160] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1009, or installed from storage device 1008, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of embodiments of this disclosure.
[0161] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0162] The aforementioned computer-readable medium may be included in the aforementioned terminal device; or it may exist independently and not assembled into the terminal device.
[0163] The aforementioned computer-readable medium carries one or more programs, which, when executed by the terminal device, cause the terminal device to perform the method shown in the above embodiments.
[0164] This disclosure provides a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements various methods that may be involved in the above embodiments.
[0165] This disclosure provides a computer program product, including a computer program that, when executed by a processor, implements various methods that may be involved in the above embodiments.
[0166] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone 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 remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0167] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0168] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0169] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0170] In the context of this disclosure, a machine-readable medium can 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 can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0171] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0172] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0173] It is understood that the data involved in this technical solution (including but not limited to the data itself, its acquisition, or its use) shall comply with the requirements of relevant laws, regulations, and provisions. Data may include information, parameters, and messages, such as flow control instructions.
[0174] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0175] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. Multitasking and parallel processing may be advantageous in certain environments. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments. Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely exemplary forms of implementing the claims.
Claims
1. An image processing method comprising: obtaining a first image and a second image of a spatial video, the first image and the second image being at a same time of playing of the spatial video and having different perspectives; determining a correspondence between an object in the first image and an object in the second image; based on the first image, the second image and the correspondence, determining a target layer, the target layer comprising a layer in image processing of an image associated with the first image and an image associated with the second image; based on the target layer, performing the image processing on the first image and the second image.
2. The method of claim 1, wherein the determining the target layer based on the first image, the second image and the correspondence comprises: based on the correspondence, determining first key point information associated with the first image and second key point information associated with the second image; based on the first key point information, the second key point information, the first image and the second image, determining the target layer.
3. The method of claim 2, wherein the determining the target layer based on the first key point information, the second key point information, the first image and the second image comprises: performing down-sampling processing on the first image to obtain an image associated with the first image; performing down-sampling processing on the second image to obtain an image associated with the second image; based on the first key point information, the second key point information, the image associated with the first image and the image associated with the second image, determining the target layer.
4. The method of claim 3, wherein the target layer comprises a layer associated with the first image and a layer associated with the second image; and the determining the target layer based on the first key point information, the second key point information, the image associated with the first image and the image associated with the second image comprises: based on the first key point information, performing image processing on the image associated with the first image, and obtaining a layer in the image processing of the image associated with the first image to obtain the layer associated with the first image; based on the second key point information, performing image processing on the image associated with the second image, and obtaining a layer in the image processing of the image associated with the second image to obtain the layer associated with the second image.
5. The method of any one of claims 2-4, wherein the determining the first key point information associated with the first image and the second key point information associated with the second image based on the correspondence comprises: determining at least one group of target objects from the object in the first image and the object in the second image, the target object being an object having the correspondence; aligning key points of the at least one group of target objects to obtain the first key point information and the second key point information.
6. The method of any one of claims 1-4, wherein the performing the image processing on the first image and the second image based on the target layer comprises: determining a first blending order of layers associated with the first image and the first image, and blending the layers associated with the first image and the first image based on the first blending order; determining a second blending order of layers associated with the second image and the second image, and blending the layers associated with the second image and the second image based on the second blending order.
7. The method of any one of claims 1-4, wherein the image processing comprises a pixel moving type of image processing, a pixel adding type of image processing, and a pixel color adjusting type of image processing.
8. The method of claim 7, wherein if the image processing comprises the pixel moving type of image processing, the target layer comprises an offset texture; if the image processing comprises the pixel adding type of image processing, the target layer comprises an intermediate texture in a pixel adding process; if the image processing comprises the pixel color adjusting type of image processing, the target layer comprises an intermediate texture in a pixel color adjusting process.
9. The method of any one of claims 1-4, wherein the determining the correspondence between the object in the first image and the object in the second image comprises: performing image detection processing on the first image to obtain the object in the first image; performing image detection processing on the second image to obtain the object in the second image; based on the object in the first image and the object in the second image, determining the correspondence, the correspondence indicating the same object in the first image and the second image.
10. An image processing apparatus, comprising an obtaining module, a first determining module, a second determining module, and a processing module, wherein: the obtaining module is configured to obtain a first image and a second image of a spatial video, the first image and the second image being the same in a playing time and different in a perspective angle of the spatial video; the first determining module is configured to determine a correspondence between an object in the first image and an object in the second image; the second determining module is configured to determine a target layer based on the first image, the second image, and the correspondence, the target layer comprising a layer in image processing of an image associated with the first image and an image associated with the second image; the processing module is configured to perform the image processing on the first image and the second image based on the target layer.
11. A terminal device comprising: a processor and a 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 of any one of claims 1-9.
12. A computer-readable storage medium, the computer-readable storage medium storing computer-executable instructions, when a processor executes the computer-executable instructions, the image processing method of any one of claims 1-9 is implemented.
13. A computer program product, comprising a computer program, the computer program being executed by a processor to implement the image processing method of any one of claims 1-9.
Citation Information
Patent Citations
Three-dimensional beautification method and device of image
CN104811684A
Image processing method, intelligent terminal and storage medium
CN114187166A
Image rendering method and device, electronic equipment and storage medium
CN115767182A
Data processing method and system, related device, and storage medium
WO2021249414A1