Image processing method and device

By introducing environmental illumination maps and virtual light sources into the three-dimensional reconstruction technology to perform illumination compensation, the problem of inaccurate three-dimensional reconstruction results caused by the influence of environmental illumination in the existing technology is solved, and the color authenticity and user experience of the three-dimensional model are improved.

CN116704111BActive Publication Date: 2024-08-27HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211573792.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-08
Publication Date
2024-08-27
Estimated Expiration
2042-12-08

AI Technical Summary

Technical Problem

Due to the influence of environmental lighting, the existing image-based 3D reconstruction technology results in unclear texture and unrealistic color of the target object, and the accuracy of the 3D reconstruction results is poor.

Method used

By acquiring multiple original images from different viewing angles, extract matching feature points, determine the three-dimensional coordinates and relative pose of the camera, calculate the environmental illumination map, determine the three-dimensional coordinates of the virtual light source, and perform illumination compensation to generate illumination compensation images to improve three-dimensional reconstruction. color authenticity.

Benefits of technology

The accuracy of the 3D reconstruction results is improved, making the color of the reconstructed 3D model closer to the real color under actual ambient lighting, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116704111B
    Figure CN116704111B
Patent Text Reader

Abstract

The present application provides an image processing method and device, which is conducive to improving the accuracy of three-dimensional reconstruction results. The method includes: obtaining multiple groups of matching feature points based on multiple original images, and determining the three-dimensional coordinates of the multiple groups of matching feature points and the relative position and posture of the camera corresponding to each original image based on the pixel coordinates of the multiple groups of matching feature points in the original images, determining the depth information of the corresponding matching feature points on each original image based on the three-dimensional coordinates of the multiple groups of matching feature points and the relative position and posture of the camera corresponding to each original image, and combining the multiple original images to determine the ambient illumination map corresponding to each original image, and determining the three-dimensional coordinates of the virtual light source based on the ambient illumination map and the relative position and posture of the camera corresponding to each original image; obtaining multiple illumination compensation images based on the three-dimensional coordinates of the virtual light source and multiple ambient illumination maps; and determining the three-dimensional model of the target object based on the multiple illumination compensation images and the three-dimensional coordinates of the multiple groups of matching feature points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method and device. Background Art

[0002] 3D reconstruction technology refers to the use of computer technology to reconstruct real-world scenes or objects into data models that can be expressed and processed by computers. Image-based 3D reconstruction technology is increasingly being used due to its low requirements for image acquisition equipment and low-cost reconstruction process.

[0003] At present, the image-based 3D reconstruction technology mainly includes: extracting feature points from multi-view images, completing feature point matching, reconstructing sparse point clouds based on motion recovery structure technology, and reconstructing densely based on multi-view stereo technology. Usually, after the sparse point cloud is reconstructed, the average color of the matching feature points in the image at different view angles is taken as the corresponding 3D point color to color the sparse point cloud. Based on the colored sparse point cloud, dense reconstruction is performed through multi-view stereo technology to improve the accuracy of the 3D reconstruction result.

[0004] However, due to the surface material of the target object, the position or color of the ambient light when collecting the image of the target object, the images under different viewing angles may have unclear texture of the target object, unrealistic colors, inconsistent textures under multiple viewing angles, etc. The average color of the matching feature points in the images under different viewing angles does not represent the true color of the target object. Therefore, the accuracy of the 3D reconstruction results of the above method is poor. Summary of the invention

[0005] The present application provides an image processing method and device, which can take into account the influence of ambient lighting on a target object, thereby facilitating improving the accuracy of three-dimensional reconstruction results.

[0006] In a first aspect, an image processing method is provided, comprising: acquiring multiple original images of a target object, wherein the multiple original images are obtained by photographing the target object at different viewing angles; obtaining multiple groups of matching feature points based on the multiple original images, and determining three-dimensional coordinates of the multiple groups of matching feature points and a relative camera pose corresponding to each original image based on pixel coordinates of the multiple groups of matching feature points in the corresponding original images; determining depth information of the corresponding matching feature points on each original image based on the three-dimensional coordinates of the multiple groups of matching feature points and the relative camera pose corresponding to each original image; determining an ambient lighting map corresponding to each original image based on the depth information of the corresponding matching feature points on each original image and the multiple original images; determining three-dimensional coordinates of a virtual light source based on the ambient lighting map corresponding to each original image and the relative camera pose corresponding to each original image; performing illumination compensation on each original image based on the three-dimensional coordinates of the virtual light source and the ambient lighting map corresponding to each original image to obtain multiple illumination compensated images; and determining a three-dimensional model of the target object based on the multiple illumination compensated images and the three-dimensional coordinates of the multiple groups of matching feature points.

[0007] The image processing method of the embodiment of the present application considers the influence of ambient lighting on the target object. During three-dimensional reconstruction, an ambient lighting map is introduced. The three-dimensional coordinates of a virtual light source are determined by using the ambient lighting map. The original image is subjected to lighting compensation based on the three-dimensional coordinates of the virtual light source and the ambient lighting map to obtain multiple lighting compensation images. Since the lighting compensation image includes the influence of ambient lighting on the target object, three-dimensional reconstruction of the target object is performed using multiple lighting compensation images. This can make the color of the three-dimensional model obtained after the three-dimensional reconstruction closer to the real color of the target object in the actual ambient lighting scene, which is beneficial to improving the accuracy of the three-dimensional reconstruction results, thereby improving the user experience.

[0008] It should be understood that the depth information is the vertical distance from each group of matching feature points to the imaging plane of the corresponding image acquisition device (such as a camera).

[0009] It should also be understood that the ambient light map is an image used to represent the brightness information of each pixel in the original image under the influence of the ambient light source. Each of the above multiple original images has a corresponding ambient light map, that is, this step can obtain multiple original light maps.

[0010] It should also be understood that the number of virtual light sources can be one or more.

[0011] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: determining updated virtual light source three-dimensional coordinates and updated three-dimensional coordinates of multiple groups of matching feature points based on the relative camera posture corresponding to each original image, the three-dimensional coordinates of the virtual light source and the three-dimensional coordinates of multiple groups of matching feature points; performing lighting compensation on each original image based on the three-dimensional coordinates of the virtual light source and the ambient lighting map corresponding to each original image, including: performing lighting compensation on each original image based on the updated three-dimensional coordinates of the virtual light source and the ambient lighting map corresponding to each original image; determining the three-dimensional model of the target object based on multiple lighting compensation images and the three-dimensional coordinates of multiple groups of matching feature points, including: determining the three-dimensional model of the target object based on multiple lighting compensation images and the updated three-dimensional coordinates of multiple groups of matching feature points.

[0012] The image processing method of the embodiment of the present application performs illumination compensation on each original image by determining updated three-dimensional coordinates of a virtual light source and updated three-dimensional coordinates of multiple groups of matching feature points, and determines a three-dimensional model of the target object based on the illumination-compensated image and the updated three-dimensional coordinates of multiple groups of matching feature points. The updated three-dimensional coordinates of the virtual light source and the updated three-dimensional coordinates of the multiple groups of matching feature points have smaller errors than those of the unupdated three-dimensional coordinates of the virtual light source and the updated three-dimensional coordinates of the multiple groups of matching feature points, which is beneficial to improving the accuracy of the three-dimensional reconstruction results.

[0013] In combination with the first aspect, in certain implementations of the first aspect, illumination compensation is performed on each original image to obtain multiple illumination compensated images, including: determining updated pixel coordinates of the virtual light source in each original image based on the updated three-dimensional coordinates of the virtual light source; displacing pixel points in an ambient illumination map corresponding to each original image based on the difference between the updated pixel coordinates of the virtual light source in each original image and the pixel coordinates corresponding to the virtual light source in each original image to obtain an ambient illumination compensation map corresponding to each original image; and performing illumination compensation on each original image based on the ambient illumination compensation map corresponding to each original image to obtain multiple illumination compensated images.

[0014] Exemplarily, the image processing device may map the ambient illumination compensation map corresponding to each original image to the corresponding original image, and perform illumination compensation on each original image respectively through a back-projection operation to obtain a plurality of illumination-compensated images.

[0015] In combination with the first aspect, in certain implementations of the first aspect, a three-dimensional model of a target object is determined based on multiple illumination compensation images and updated three-dimensional coordinates of multiple groups of matching feature points, including: determining the updated three-dimensional coordinates of the multiple groups of matching feature points as a colorless sparse three-dimensional point cloud; obtaining the pixel coordinates of the multiple groups of matching feature points in the corresponding multiple illumination compensation images; coloring the colorless sparse three-dimensional point cloud using the pixel coordinates of the multiple groups of matching feature points in the corresponding multiple illumination compensation images to obtain a colored sparse three-dimensional point cloud; and determining the three-dimensional model of the target object based on the colored sparse three-dimensional point cloud and the multiple illumination compensation images.

[0016] Exemplarily, the image processing device may colorize the colorless sparse three-dimensional point cloud using the average of the pixel coordinates of the multiple sets of matching feature points in the corresponding multiple illumination-compensated images to obtain a colored sparse three-dimensional point cloud.

[0017] In combination with the first aspect, in certain implementations of the first aspect, multiple groups of matching feature points are obtained based on multiple original images, including: extracting feature points of each of the multiple original images; performing feature point matching on the multiple original images to obtain multiple groups of matching feature points.

[0018] It should be understood that the image processing device can extract feature points of each of the multiple original images through a feature extraction algorithm. Exemplarily, the feature extraction algorithm can be a feature point extraction algorithm such as a scale-invariant feature transform (SIFT), an accelerated robust features algorithm (SURF), a corner detection algorithm (FAST), or an oriented fast and rotated brief (ORB) algorithm to extract feature points of each of the multiple original images, and the embodiments of the present application are not limited to this.

[0019] It should also be understood that the image processing device can extract multiple feature points from multiple original images and perform feature point matching through a feature matching strategy to obtain multiple sets of matching feature points. For example, the feature matching strategy can be a brute force matching strategy, a K-nearest neighbor (KNN) matching strategy, etc., which is not limited in the embodiments of the present application.

[0020] Through appropriate feature extraction algorithms and feature matching strategies, the image processing device can extract feature points more accurately and obtain more accurate feature matching results, namely the above-mentioned multiple groups of matching feature points, which is conducive to improving the accuracy of subsequent three-dimensional reconstruction results.

[0021] In combination with the first aspect, in certain implementations of the first aspect, the three-dimensional coordinates of multiple groups of matching feature points and the relative pose of the camera corresponding to each original image are determined, including: based on the pixel coordinates of the multiple groups of matching feature points in the corresponding original images and the camera intrinsic parameters corresponding to the multiple original images, using a triangulation method to determine the relative pose of the camera corresponding to each original image; based on the pixel coordinates of the multiple groups of matching feature points in the corresponding original images and the relative pose of the camera corresponding to each original image, using a triangulation method to determine the three-dimensional coordinates of the multiple groups of matching feature points.

[0022] In combination with the first aspect, in certain implementations of the first aspect, the depth information of the corresponding matching feature points on each original image is determined, including: inputting the three-dimensional coordinates of multiple sets of matching feature points and the relative position of the camera corresponding to each original image into a depth estimation network model to obtain the depth information of the corresponding matching feature points on each original image.

[0023] Exemplarily, the depth estimation network model may be a convolutional neural network (CNN).

[0024] In combination with the first aspect, in certain implementations of the first aspect, determining the ambient lighting map corresponding to each original image includes: inputting the depth information of the corresponding matching feature points on each original image and multiple original images into a lighting estimation network model to obtain the ambient lighting map corresponding to each original image.

[0025] Exemplarily, the illumination estimation network model may be Gardner's illumination estimation network model.

[0026] In combination with the first aspect, in certain implementations of the first aspect, determining the three-dimensional coordinates of the virtual light source includes: determining the pixel coordinates with the smallest pixel amplitude in the ambient lighting map corresponding to each original image as the pixel coordinates corresponding to the virtual light source in each original image; determining the three-dimensional coordinates of the virtual light source based on the pixel coordinates corresponding to the virtual light source in each original image and the relative position of the camera corresponding to each original image.

[0027] In a second aspect, an image processing device is provided, including: an acquisition module, used to acquire multiple original images of a target object, wherein the multiple original images are obtained by photographing the target object at different viewing angles; a processing module, used to obtain multiple groups of matching feature points based on the multiple original images, and determine the three-dimensional coordinates of the multiple groups of matching feature points and the relative camera pose corresponding to each original image based on the pixel coordinates of the multiple groups of matching feature points in the corresponding original images; determine the depth information of the corresponding matching feature points on each original image based on the three-dimensional coordinates of the multiple groups of matching feature points and the relative camera pose corresponding to each original image; determine the ambient lighting map corresponding to each original image based on the depth information of the corresponding matching feature points on each original image and the multiple original images; determine the three-dimensional coordinates of a virtual light source based on the ambient lighting map corresponding to each original image and the relative camera pose corresponding to each original image; perform lighting compensation on each original image based on the three-dimensional coordinates of the virtual light source and the ambient lighting map corresponding to each original image to obtain multiple lighting compensated images; and determine the three-dimensional model of the target object based on the multiple lighting compensated images and the three-dimensional coordinates of the multiple groups of matching feature points.

[0028] In combination with the second aspect, in certain implementations of the second aspect, the processing module is also used to: determine the updated three-dimensional coordinates of the virtual light source and the updated three-dimensional coordinates of the multiple groups of matching feature points based on the relative camera posture corresponding to each original image, the three-dimensional coordinates of the virtual light source, and the three-dimensional coordinates of the multiple groups of matching feature points; perform lighting compensation on each original image based on the updated three-dimensional coordinates of the virtual light source and the ambient lighting map corresponding to each original image; and determine the three-dimensional model of the target object based on multiple lighting compensation images and the updated three-dimensional coordinates of the multiple groups of matching feature points.

[0029] In combination with the second aspect, in certain implementations of the second aspect, the processing module is also used to: determine the updated pixel coordinates of the virtual light source in each original image based on the updated three-dimensional coordinates of the virtual light source; displace the pixel points in the ambient lighting map corresponding to each original image based on the difference between the updated pixel coordinates of the virtual light source in each original image and the pixel coordinates corresponding to the virtual light source in each original image to obtain an ambient lighting compensation map corresponding to each original image; perform lighting compensation on each original image based on the ambient lighting compensation map corresponding to each original image to obtain multiple lighting compensated images.

[0030] In combination with the second aspect, in certain implementations of the second aspect, the processing module is also used to: determine the updated three-dimensional coordinates of multiple groups of matching feature points as a colorless sparse three-dimensional point cloud; the acquisition module is also used to: obtain the pixel coordinates of the multiple groups of matching feature points in the corresponding multiple illumination compensation images; the processing module is also used to: use the pixel coordinates of the multiple groups of matching feature points in the corresponding multiple illumination compensation images to color the colorless sparse three-dimensional point cloud to obtain a colored sparse three-dimensional point cloud; determine the three-dimensional model of the target object based on the colored sparse three-dimensional point cloud and the multiple illumination compensation images.

[0031] In combination with the second aspect, in certain implementations of the second aspect, the processing module is further used to: extract feature points of each of the multiple original images; and perform feature point matching on the multiple original images to obtain multiple groups of matching feature points.

[0032] In combination with the second aspect, in certain implementations of the second aspect, the processing module is also used to: determine the relative pose of the camera corresponding to each original image based on the pixel coordinates of the multiple sets of matching feature points in the corresponding original images and the camera intrinsic parameters corresponding to the multiple original images, using a triangulation method; and determine the three-dimensional coordinates of the multiple sets of matching feature points based on the pixel coordinates of the multiple sets of matching feature points in the corresponding original images and the camera relative pose corresponding to each original image, using a triangulation method.

[0033] In combination with the second aspect, in certain implementations of the second aspect, the processing module is also used to: input the three-dimensional coordinates of multiple sets of matching feature points and the relative position of the camera corresponding to each original image into the depth estimation network model to obtain the depth information of the corresponding matching feature points on each original image.

[0034] In combination with the second aspect, in certain implementations of the second aspect, the processing module is also used to: input the depth information of the corresponding matching feature points on each original image and multiple original images into the illumination estimation network model to obtain the ambient illumination map corresponding to each original image.

[0035] In combination with the second aspect, in certain implementations of the second aspect, the processing module is also used to: determine the pixel coordinates with the smallest pixel amplitude in the ambient lighting map corresponding to each original image as the pixel coordinates corresponding to the virtual light source in each original image; and determine the three-dimensional coordinates of the virtual light source based on the pixel coordinates corresponding to the virtual light source in each original image and the relative position of the camera corresponding to each original image.

[0036] In a third aspect, another image processing device is provided, comprising a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any possible implementation of the first aspect.

[0037] Optionally, there are one or more processors and one or more memories.

[0038] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0039] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0040] The image processing device in the third aspect mentioned above can be a chip, and the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0041] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code or instruction), which, when executed on a computer, enables the computer to execute a method in any possible implementation of the first aspect.

[0042] In a fifth aspect, a computer program product is provided, which includes: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute a method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a schematic diagram of an application scenario of an embodiment of the present application;

[0044] Figure 2 is a schematic flow chart of an image processing method provided in an embodiment of the present application;

[0045] Figure 3 is a schematic diagram of a virtual light source position provided in an embodiment of the present application;

[0046] Figure 4 is a schematic flow chart of another image processing method provided in an embodiment of the present application;

[0047] Figure 5 is a schematic block diagram of an image processing device provided in an embodiment of the present application;

[0048] Figure 6 It is a schematic block diagram of another image processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0050] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.

[0051] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0052] In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.

[0053] 3D reconstruction technology refers to the use of computer technology to reconstruct real-world scenes or objects into data models that can be expressed and processed by computers. Image-based 3D reconstruction is increasingly widely used due to its low requirements for acquisition equipment and low cost of the reconstruction process.

[0054] In order to facilitate the understanding of this application, Figure 1 The application scenarios involved in the embodiments of the present application are introduced.

[0055] Figure 1A schematic diagram of an application scenario 100 of an embodiment of the present application is shown. The application scenario includes an image acquisition device 101 and an image processing device 102. The image acquisition device 101 can acquire images of different viewing angles of a target object or a scene where the target object is located for three-dimensional reconstruction, and send the images of different viewing angles to the image processing device 102. Correspondingly, after receiving the images of different viewing angles, the image processing device 102 can use the images of different viewing angles to perform three-dimensional reconstruction of the target object or the scene where the target object is located.

[0056] Optionally, the image acquisition device 101 can use a camera to take pictures of the target object and directly capture multiple images from different perspectives; it can also use a camera to record video and capture a video including pictures of the target object from different perspectives, and then edit the images of the target object from different perspectives in the video; it can also obtain network pictures of the same target object from different perspectives from the Internet. The embodiments of the present application are not limited to this.

[0057] It should be understood that the image acquisition device 101 may be a device including a camera, and the image processing device 102 may be a device having data processing capabilities. It should also be understood that in the above application scenario, the number of image acquisition devices may be one or more, and the present application embodiment does not limit this.

[0058] Above Figure 1 Only one possible scenario is shown. In other possible scenarios, the image acquisition device and the image processing device can be combined into one physical device. For ease of description, the present application embodiment refers to it as an image processing device. In other words, the image processing device in the present application embodiment can have the function of image acquisition, acquire images of the target object from different perspectives by itself, and can also receive images acquired from other devices. The present application embodiment does not limit this.

[0059] At present, the process of 3D reconstruction based on images from different perspectives by image processing equipment may include: extracting feature points from multi-perspective images, completing feature point matching, reconstructing sparse point clouds based on motion recovery structure technology, and reconstructing densely based on multi-view stereo technology. Usually, after the sparse point cloud is reconstructed, the average value of the color of the same feature point in images from different perspectives is taken as the corresponding 3D point color, and the sparse point cloud is colored. Based on the colored sparse point cloud, dense reconstruction is performed through multi-view stereo technology to improve the accuracy of the 3D reconstruction result.

[0060] However, due to the surface material of the target object, the position or color of the ambient light when collecting the image of the target object, the images under different viewing angles may have unclear texture of the target object, unrealistic colors, inconsistent textures under multiple viewing angles, etc. The average color of the matching feature points in the images under different viewing angles does not represent the true color of the target object. Therefore, the accuracy of the 3D reconstruction results of the above method is poor.

[0061] In view of this, an embodiment of the present application proposes an image processing method and device, which takes into account the impact of ambient lighting on the target object, introduces an ambient lighting map during three-dimensional reconstruction, uses the ambient lighting map to determine the three-dimensional coordinates of a virtual light source, and performs lighting compensation on the original image based on the three-dimensional coordinates of the virtual light source and the ambient lighting map to obtain multiple lighting compensated images. Since the lighting compensated image includes the impact of ambient lighting on the target object, the target object is reconstructed in three dimensions using multiple lighting compensated images, thereby improving the accuracy of the three-dimensional reconstruction result.

[0062] The following will be combined Figures 2 to 3 , the image processing method provided in the embodiment of the present application is described.

[0063] Figure 2 is a schematic flow chart of an image processing method 200 provided in an embodiment of the present application. The method 200 may be Figure 1 The image processing device 102 shown in the figure may also be executed by other similar devices, which is not limited in the present embodiment. For ease of description, the present embodiment is collectively referred to as an image processing device. The method 200 includes the following steps:

[0064] S201, obtaining a plurality of original images of a target object, where the plurality of original images are obtained by photographing the target object at different viewing angles.

[0065] It should be understood that the above-mentioned multiple original images can be obtained by the image processing device itself (when the image processing device has an image acquisition function), or by an image acquisition device. In addition, the above-mentioned multiple original images can be panoramic images acquired by a panoramic camera, or wide-angle images, or images taken by an ordinary camera, and this application does not limit this.

[0066] S202, obtaining multiple groups of matching feature points based on multiple original images, and determining three-dimensional coordinates of the multiple groups of matching feature points and a relative position of a camera corresponding to each original image based on pixel coordinates of the multiple groups of matching feature points in the corresponding original images.

[0067] It should be understood that the image processing device can extract multiple feature points on multiple original images respectively through a feature extraction algorithm, and match the multiple feature points of each original image on the multiple original images through a feature matching strategy to obtain multiple groups of matching feature points.

[0068] The above matching feature points can be matching feature points in the two images, for example, there are feature points in the first original image 1-1 and feature points 1-2 , there are feature points in the second original image 2-1 and feature points 2-2 , feature points 1-1 and feature points 2-1 is the imaging point of the same physical space point in the above two original images, so the feature point 1-1 and feature points 2-1 is a set of matching feature points.

[0069] The above matching feature points may also be matching feature points in two or more images, for example, there are feature points in the first original image. 1-1 and feature points 1-2 , there are feature points in the second original image 2-1 and feature points 2-2 , there are feature points in the third original image 3-1 and feature points 3-2 , feature points 1-1 , Feature Points 2-1 and feature points 3-1 is the imaging point of the same physical space point in the above three original images, so the feature point 1-1 , Feature Points 2-1 and feature points 3-1 is a set of matching feature points.

[0070] In the above example, the image processing device can determine the feature points 1-1 Pixel coordinates, feature points in the first original image 2-1 Pixel coordinates in the second original image, and feature points 3-1 The pixel coordinates in the third original image. 1-1 , Feature Points 2-1 and feature points 3-1 are imaging points of the same physical space point in the above three original images, and the three-dimensional coordinates of the group of matching feature points are the three-dimensional coordinates of the same physical space point corresponding to the group of matching feature points.

[0071] The above example is only described using a group of matching feature points as an example. In actual operation, multiple original images may have one group of matching feature points or multiple groups of matching feature points, and the embodiments of the present application do not limit this.

[0072] S203, determining depth information of the matching feature points corresponding to each original image based on the three-dimensional coordinates of the multiple groups of matching feature points and the relative position and posture of the camera corresponding to each original image.

[0073] It should be understood that the depth information is the vertical distance from each group of matching feature points to the imaging plane of the corresponding image acquisition device (such as a camera). 1-1 , feature points 1-1 There are feature points in the second original image 2-1 is a set of matching feature points, the feature points in the first original image 1-1 The vertical distance to the camera imaging plane is the depth information of the feature point.

[0074] S204: Determine an environment illumination map corresponding to each original image based on the depth information of the matching feature points corresponding to each original image and the multiple original images.

[0075] It should be understood that the ambient light map is an image used to represent the brightness information of each pixel in the original image under the influence of the ambient light source. Each of the above multiple original images has a corresponding ambient light map, that is, this step can obtain multiple original light maps.

[0076] S205 , determining the three-dimensional coordinates of the virtual light source based on the ambient lighting map corresponding to each original image and the relative position and posture of the camera corresponding to each original image.

[0077] It should be understood that the number of virtual light sources can be one or more, and correspondingly, the number of three-dimensional coordinates of virtual light sources can be one or more, which is not limited in the embodiments of the present application.

[0078] Optionally, if the above-mentioned multiple original images are captured in a scene with outdoor natural light, the number of virtual light sources may be one; if the above-mentioned multiple original images are captured in a scene with poor outdoor natural light or indoors, the number of virtual light sources may be one or more.

[0079] S206, performing illumination compensation on each original image based on the three-dimensional coordinates of the virtual light source and the ambient illumination map corresponding to each original image, to obtain a plurality of illumination compensated images.

[0080] S207, determining a three-dimensional model of the target object based on the multiple illumination compensation images and the three-dimensional coordinates of the multiple sets of matching feature points.

[0081] The image processing method of the embodiment of the present application considers the influence of ambient lighting on the target object. During three-dimensional reconstruction, an ambient lighting map is introduced. The three-dimensional coordinates of a virtual light source are determined by using the ambient lighting map. The original image is subjected to lighting compensation based on the three-dimensional coordinates of the virtual light source and the ambient lighting map to obtain multiple lighting compensation images. Since the lighting compensation image includes the influence of ambient lighting on the target object, three-dimensional reconstruction of the target object is performed using multiple lighting compensation images. This can make the color of the three-dimensional model obtained after the three-dimensional reconstruction closer to the real color of the target object in the actual ambient lighting scene, which is beneficial to improving the accuracy of the three-dimensional reconstruction results, thereby improving the user experience.

[0082] As an optional embodiment, the above method further includes:

[0083] Based on the relative position of the camera corresponding to each original image, the three-dimensional coordinates of the virtual light source and the three-dimensional coordinates of the multiple groups of matching feature points, determine the updated three-dimensional coordinates of the virtual light source and the updated three-dimensional coordinates of the multiple groups of matching feature points;

[0084] S206, performing illumination compensation on each original image based on the three-dimensional coordinates of the virtual light source and the ambient illumination map corresponding to each original image, including:

[0085] Perform illumination compensation on each original image based on the updated three-dimensional coordinates of the virtual light source and the ambient illumination map corresponding to each original image;

[0086] S207, determining a three-dimensional model of the target object based on the multiple illumination compensation images and the three-dimensional coordinates of the multiple sets of matching feature points, including:

[0087] Based on multiple illumination-compensated images and updated three-dimensional coordinates of multiple sets of matching feature points, a three-dimensional model of the target object is determined.

[0088] The image processing method of the embodiment of the present application performs illumination compensation on each original image by determining updated three-dimensional coordinates of a virtual light source and updated three-dimensional coordinates of multiple groups of matching feature points, and determines a three-dimensional model of the target object based on the illumination-compensated image and the updated three-dimensional coordinates of multiple groups of matching feature points. The updated three-dimensional coordinates of the virtual light source and the updated three-dimensional coordinates of the multiple groups of matching feature points have smaller errors than those of the unupdated three-dimensional coordinates of the virtual light source and the updated three-dimensional coordinates of the multiple groups of matching feature points, which is beneficial to improving the accuracy of the three-dimensional reconstruction results.

[0089] It should be understood that the updated three-dimensional coordinates of the virtual light source and the updated three-dimensional coordinates of the multiple sets of matching feature points may also be referred to as precise three-dimensional coordinates of the virtual light source and the precise three-dimensional coordinates of the multiple sets of matching feature points.

[0090] It should be understood that the image processing device has errors in the process of calculating the relative camera pose, virtual light source three-dimensional coordinates and three-dimensional coordinates of multiple groups of matching feature points corresponding to each original image, which affects the accuracy of the three-dimensional model of the target object. Since the relative camera pose, virtual light source three-dimensional coordinates and three-dimensional coordinates of multiple groups of matching feature points corresponding to each original image affect each other, whether the relative camera pose corresponding to each original image is updated will affect the three-dimensional coordinates of the virtual light source and the three-dimensional coordinates of multiple groups of matching feature points. The image processing device can adjust the relative camera pose, virtual light source three-dimensional coordinates and three-dimensional coordinates of multiple groups of matching feature points corresponding to each original image, and obtain the accurate relative camera pose, accurate virtual light source three-dimensional coordinates and accurate three-dimensional coordinates of multiple groups of matching feature points corresponding to each original image, and finally improve the accuracy of the three-dimensional model of the target object.

[0091] As an optional embodiment, the above S206 performs illumination compensation on each original image to obtain multiple illumination compensated images, including: determining the updated pixel coordinates of the virtual light source in each original image based on the updated three-dimensional coordinates of the virtual light source; displacing the pixel points in the ambient illumination map corresponding to each original image based on the difference between the updated pixel coordinates of the virtual light source in each original image and the pixel coordinates corresponding to the virtual light source in each original image to obtain an ambient illumination compensation map corresponding to each original image; and performing illumination compensation on each original image based on the ambient illumination compensation map corresponding to each original image to obtain multiple illumination compensated images.

[0092] Exemplarily, the image processing device may map the ambient illumination compensation map corresponding to each original image to the corresponding original image, and perform illumination compensation on each original image respectively through a back-projection operation to obtain a plurality of illumination-compensated images.

[0093] As an optional embodiment, the above S207 determines the three-dimensional model of the target object based on multiple illumination compensation images and the updated three-dimensional coordinates of multiple groups of matching feature points, including: determining the updated three-dimensional coordinates of the multiple groups of matching feature points as a colorless sparse three-dimensional point cloud; obtaining the pixel coordinates of the multiple groups of matching feature points in the corresponding multiple illumination compensation images; using the pixel coordinates of the multiple groups of matching feature points in the corresponding multiple illumination compensation images, coloring the colorless sparse three-dimensional point cloud to obtain a colored sparse three-dimensional point cloud; determining the three-dimensional model of the target object based on the colored sparse three-dimensional point cloud and the multiple illumination compensation images.

[0094] Exemplarily, the image processing device may colorize the colorless sparse three-dimensional point cloud using the average of the pixel coordinates of the multiple sets of matching feature points in the corresponding multiple illumination-compensated images to obtain a colored sparse three-dimensional point cloud.

[0095] As an optional embodiment, the above S202, obtaining multiple groups of matching feature points based on multiple original images, includes: extracting feature points of each of the multiple original images; performing feature point matching on the multiple original images to obtain multiple groups of matching feature points.

[0096] It should be understood that the image processing device can extract feature points of each of the multiple original images through a feature extraction algorithm. Exemplarily, the feature extraction algorithm can be a feature point extraction algorithm such as a scale-invariant feature transform (SIFT), an accelerated robust features algorithm (SURF), a corner detection algorithm (FAST), or an oriented fast and rotated brief (ORB) algorithm to extract feature points of each of the multiple original images, and the embodiments of the present application are not limited to this.

[0097] It should be understood that the image processing device can extract multiple feature points from multiple original images respectively through a feature matching strategy to perform feature point matching to obtain multiple sets of matching feature points. For example, the feature matching strategy can be a brute force matching strategy, a K-nearest neighbor (KNN) matching strategy, etc., which is not limited in the embodiments of the present application.

[0098] Through appropriate feature extraction algorithms and feature matching strategies, the image processing device can extract feature points more accurately and obtain more accurate feature matching results, namely the above-mentioned multiple groups of matching feature points, which is conducive to improving the accuracy of subsequent three-dimensional reconstruction results.

[0099] As an optional embodiment, the above S202 determines the three-dimensional coordinates of multiple groups of matching feature points and the relative pose of the camera corresponding to each original image, including: based on the pixel coordinates of the multiple groups of matching feature points in the corresponding original images and the camera intrinsic parameters corresponding to the multiple original images, using a triangulation method to determine the relative pose of the camera corresponding to each original image; based on the pixel coordinates of the multiple groups of matching feature points in the corresponding original images and the relative pose of the camera corresponding to each original image, using a triangulation method to determine the three-dimensional coordinates of the multiple groups of matching feature points.

[0100] For example, there are feature points in the first original image. 1-1 , there are feature points in the second original image 2-1 , feature points 1-1 and feature points 2-1 is a set of matching feature points. Based on feature points1-1 Pixel coordinates, feature points in the first original image 2-1 The pixel coordinates in the second original image, the relative camera pose of the first original image (e.g., a preset unit matrix), and the camera internal parameters can be triangulated to obtain the relative camera pose corresponding to the second original image. 1-1 Pixel coordinates and feature points in the first original image 2-1 The pixel coordinates in the second original image can be used to determine the three-dimensional coordinates of the matching feature points through a triangulation method.

[0101] For example, there are feature points in the first original image. 1-1 , there are feature points in the second original image 2-1 , there are feature points in the third original image 3-1 , feature points 1-1 , Feature Points 2-1 and feature points 3-1 is a set of matching feature points. Based on feature points 1-1 Pixel coordinates, feature points in the first original image 2-1 The pixel coordinates in the second original image, the camera relative pose of the first original image (such as a preset unit matrix) and the camera internal parameters can be used to determine the camera relative pose corresponding to the second original image and the three-dimensional coordinates P1' of the matching feature points through the above triangulation method. 1-1 Pixel coordinates, feature points in the first original image 3-1 The pixel coordinates in the third original image, the camera relative posture of the first original image (for example, a preset unit matrix) and the camera intrinsic parameters can be used to determine the camera relative posture corresponding to the third original image and the three-dimensional coordinates P1" of the matching feature points through the above-mentioned triangulation method. Based on the three-dimensional coordinates P1' and P1", P1 is determined as the three-dimensional coordinates of the corresponding matching feature point through a joint equation.

[0102] As an optional embodiment, the above S203 determines the depth information of the corresponding matching feature points on each original image, including: inputting the three-dimensional coordinates of multiple sets of matching feature points and the relative position of the camera corresponding to each original image into the depth estimation network model to obtain the depth information of the corresponding matching feature points on each original image.

[0103] Exemplarily, the depth estimation network model may be a convolutional neural network (CNN).

[0104] As an optional embodiment, the above S204 determines the ambient lighting map corresponding to each original image, including: inputting the depth information of the corresponding matching feature points on each original image and multiple original images into the lighting estimation network model to obtain the ambient lighting map corresponding to each original image.

[0105] Exemplarily, the illumination estimation network model may be Gardner's illumination estimation network model.

[0106] As an optional embodiment, the above S205 determines the three-dimensional coordinates of the virtual light source, including: determining the pixel coordinates with the smallest pixel amplitude in the ambient lighting map corresponding to each original image as the pixel coordinates corresponding to the virtual light source in each original image; determining the three-dimensional coordinates of the virtual light source based on the pixel coordinates corresponding to the virtual light source in each original image and the relative position of the camera corresponding to each original image.

[0107] It should be understood that the pixel amplitude indicates the brightness of a single pixel. For example, the pixel amplitude ranges from 0 to 256, a pixel amplitude of 0 can be used to indicate white, and a pixel amplitude of 256 can be used to indicate black.

[0108] For example, Figure 3 a is the ambient lighting map, in which there is a virtual light source P. Figure 3 b is the position of the virtual light source P in the camera coordinate system. Figure 3 Point P in a is the point where the pixel amplitude is closest to 0, and point P is determined as the virtual light source. Figure 3 aThe position of the ambient light map. The virtual light source is Figure 3 The pixel coordinates in the ambient light map can be converted from the pixel coordinate system to the image coordinate system to the camera coordinate system to obtain the coordinates of the virtual light source P in the camera coordinate system as follows: Figure 3 b.

[0109] Optionally, based on the pixel coordinates of the virtual light source corresponding to each original image and the relative position and posture of the camera corresponding to each original image, the three-dimensional coordinates of the virtual light source are determined by a triangulation method.

[0110] Combine the following Figure 4 , taking 10 original images of different viewing angles collected under outdoor natural light as an example, the embodiment of the present application is described in detail.

[0111] Figure 4 is a schematic flow chart of another image processing method 400 provided in an embodiment of the present application. The method 400 may be Figure 1 The method 400 is performed by the image processing device 102 shown, and may also be performed by other similar devices, which is not limited in the present embodiment. The method 400 includes the following steps:

[0112] S401, an image processing device obtains 10 original images of a target object, where the 10 original images are obtained by photographing the target object at different viewing angles.

[0113] S402: The image processing device extracts a plurality of feature points from each of the 10 original images to obtain a plurality of feature point information of each original image, wherein the plurality of feature point information includes pixel coordinates of the feature points in the original image.

[0114] Exemplarily, the image processing device may extract a plurality of feature points from each of the ten original images by using a SIFT algorithm, a SURF algorithm, a FAST algorithm, or an ORB algorithm.

[0115] S403, the image processing device performs feature point matching on the 10 original images based on the multiple feature point information of the 10 original images to obtain multiple groups of matching feature points. Matching feature points can be understood as imaging points of the same physical space point of the target object in multiple original images.

[0116] Exemplarily, the image processing device may match multiple feature points of the ten original images through a brute-force matcher (BFM) strategy to obtain multiple groups of matching feature points.

[0117] S404, based on the pixel coordinates of the multiple sets of matching feature points in the corresponding original images and the camera intrinsic parameters corresponding to the original images, the image processing device obtains the three-dimensional coordinates of the multiple sets of matching feature points and the relative position and posture of the camera corresponding to each original image.

[0118] Optionally, the image processing device may obtain the relative camera pose by a triangulation method based on the pixel coordinates of the matching feature points in each of the two original images in the corresponding original images and the camera intrinsic parameters. The image processing device may obtain the three-dimensional coordinates of the matching feature points in each of the two original images by a triangulation method based on the obtained relative camera pose and the pixel coordinates of the matching feature points in each of the two original images in the corresponding original images.

[0119] S405, the image processing device obtains the depth information of the matching feature points on the corresponding original images through a depth estimation network model based on the three-dimensional coordinates of the matching feature points in each of the two original images and the relative position of the camera corresponding to each of the original images.

[0120] Exemplarily, the depth estimation network model may be a CNN.

[0121] S406: The image processing device obtains an environmental illumination map corresponding to the 10 original images based on the 10 original images and the depth information of the corresponding matching feature points on the 10 original images using an illumination estimation network model.

[0122] Exemplarily, the above-mentioned illumination estimation network model may be Gardner's illumination estimation network model.

[0123] S407: The image processing device determines, based on the ambient illumination maps corresponding to the 10 original images, pixel coordinates with the smallest pixel amplitude in the ambient illumination map as pixel coordinates corresponding to the virtual light source in each of the original images.

[0124] Optionally, the image processing device can divide each ambient light map into connected areas according to the pixel amplitude of the pixel points in the ambient light map, find the point with the smallest pixel amplitude in the area less than or equal to the preset threshold, and use the position of the point as the position of the virtual point light source. The range of pixel amplitude is 0-256, when the pixel amplitude is 0, it is white, and when the pixel amplitude is 256, it is black.

[0125] S408: The image processing device calculates the three-dimensional coordinates of the virtual light source based on the relative postures of the cameras corresponding to the 10 original images and the pixel coordinates corresponding to the virtual light source in each original image.

[0126] Optionally, the image processing device may calculate the three-dimensional coordinates of the virtual light source through a triangulation method based on the relative postures of the cameras corresponding to the 10 original images and the pixel coordinates corresponding to the virtual light source in each original image.

[0127] S409, the image processing device calculates and updates the three-dimensional coordinates of the virtual light source and the three-dimensional coordinates of the multiple sets of matching feature points based on the relative camera poses, the three-dimensional coordinates of the virtual light source and the three-dimensional coordinates of the multiple sets of matching feature points corresponding to the 10 original images using the bundle optimization equation.

[0128] S410: The image processing device performs illumination compensation on the corresponding 10 original images based on the updated three-dimensional coordinates of the virtual light source and the ambient illumination maps corresponding to the 10 original images to obtain 10 illumination-compensated images.

[0129] S411, the image processing device determines the updated three-dimensional coordinates of the multiple groups of matching feature points as a colorless sparse three-dimensional point cloud, obtains the pixel coordinates of the multiple groups of matching feature points in the corresponding 10 illumination compensation images, calculates the average value of the pixel coordinates of the multiple groups of matching feature points in the corresponding multiple illumination compensation images, colors the colorless sparse three-dimensional point cloud, and obtains a colored sparse three-dimensional point cloud.

[0130] S412: The image processing device obtains a three-dimensional model of the target object based on the ten illumination-compensated images and the colored sparse three-dimensional point clouds.

[0131] Optionally, the image processing device obtains a three-dimensional model of the target object based on the 10 illumination-compensated images and the colored sparse three-dimensional point cloud by a dense reconstruction algorithm. The dense reconstruction algorithm may be a multi-view stereo (MVS) algorithm.

[0132] The image processing method of the embodiment of the present application performs illumination compensation on each original image by determining updated three-dimensional coordinates of a virtual light source and updated three-dimensional coordinates of multiple groups of matching feature points, and determines a three-dimensional model of the target object based on the illumination-compensated image and the updated three-dimensional coordinates of multiple groups of matching feature points. The updated three-dimensional coordinates of the virtual light source and the updated three-dimensional coordinates of the multiple groups of matching feature points have smaller errors than those of the unupdated three-dimensional coordinates of the virtual light source and the updated three-dimensional coordinates of the multiple groups of matching feature points, which is beneficial to improving the accuracy of the three-dimensional reconstruction results.

[0133] Combination of the above Figures 2 to 4 , describes in detail the image processing method of the embodiment of the present application, and will now be combined with Figure 5 and Figure 6 , describes in detail the image processing device of an embodiment of the present application.

[0134] Figure 5 An image processing device 500 provided in an embodiment of the present application is shown. The image processing device 500 includes: an acquisition module 501 and a processing module 502 .

[0135] The acquisition module 501 is used to acquire multiple original images of the target object, and the multiple original images are obtained by photographing the target object at different viewing angles; the processing module 502 is used to obtain multiple groups of matching feature points based on the multiple original images, and determine the three-dimensional coordinates of the multiple groups of matching feature points and the relative camera pose corresponding to each original image based on the pixel coordinates of the multiple groups of matching feature points in the corresponding original images; determine the depth information of the matching feature points corresponding to each original image based on the three-dimensional coordinates of the multiple groups of matching feature points and the relative camera pose corresponding to each original image; determine the ambient illumination map corresponding to each original image based on the depth information of the matching feature points corresponding to each original image and the multiple original images; determine the three-dimensional coordinates of the virtual light source based on the ambient illumination map corresponding to each original image and the relative camera pose corresponding to each original image; perform illumination compensation on each original image based on the three-dimensional coordinates of the virtual light source and the ambient illumination map corresponding to each original image to obtain multiple illumination compensated images; and determine the three-dimensional model of the target object based on the multiple illumination compensated images and the three-dimensional coordinates of the multiple groups of matching feature points.

[0136] Optionally, the processing module 502 is also used to: determine the updated three-dimensional coordinates of the virtual light source and the updated three-dimensional coordinates of the multiple groups of matching feature points based on the relative camera posture corresponding to each original image, the three-dimensional coordinates of the virtual light source and the three-dimensional coordinates of the multiple groups of matching feature points; perform lighting compensation on each original image based on the updated three-dimensional coordinates of the virtual light source and the ambient lighting map corresponding to each original image; and determine the three-dimensional model of the target object based on multiple lighting compensation images and the updated three-dimensional coordinates of the multiple groups of matching feature points.

[0137] Optionally, the processing module 502 is also used to: determine the updated pixel coordinates of the virtual light source in each original image based on the updated three-dimensional coordinates of the virtual light source; displace the pixel points in the ambient lighting map corresponding to each original image based on the difference between the updated pixel coordinates of the virtual light source in each original image and the pixel coordinates corresponding to the virtual light source in each original image to obtain an ambient lighting compensation map corresponding to each original image; and perform lighting compensation on each original image based on the ambient lighting compensation map corresponding to each original image to obtain multiple lighting compensated images.

[0138] Optionally, the processing module 502 is also used to: determine the updated three-dimensional coordinates of multiple groups of matching feature points as a colorless sparse three-dimensional point cloud; the acquisition module 501 is also used to: obtain the pixel coordinates of the multiple groups of matching feature points in the corresponding multiple illumination compensation images; the processing module is also used to: use the pixel coordinates of the multiple groups of matching feature points in the corresponding multiple illumination compensation images to color the colorless sparse three-dimensional point cloud to obtain a colored sparse three-dimensional point cloud; determine the three-dimensional model of the target object based on the colored sparse three-dimensional point cloud and the multiple illumination compensation images.

[0139] Optionally, the processing module 502 is further used to: extract feature points of each of the multiple original images; and perform feature point matching on the multiple original images to obtain multiple groups of matching feature points.

[0140] Optionally, the processing module 502 is also used to: determine the relative posture of the camera corresponding to each original image based on the pixel coordinates of the multiple sets of matching feature points in the corresponding original images and the camera intrinsic parameters corresponding to the multiple original images, using a triangulation method; and determine the three-dimensional coordinates of the multiple sets of matching feature points based on the pixel coordinates of the multiple sets of matching feature points in the corresponding original images and the camera relative posture corresponding to each original image, using a triangulation method.

[0141] Optionally, the processing module 502 is further used to: input the three-dimensional coordinates of multiple groups of matching feature points and the relative position of the camera corresponding to each original image into the depth estimation network model to obtain the depth information of the corresponding matching feature points on each original image.

[0142] Optionally, the processing module 502 is further used to: input the depth information of the corresponding matching feature points on each original image and the multiple original images into the illumination estimation network model to obtain the environment illumination map corresponding to each original image.

[0143] Optionally, the processing module 502 is also used to: determine the pixel coordinates with the smallest pixel amplitude in the ambient lighting map corresponding to each original image as the pixel coordinates corresponding to the virtual light source in each original image; and determine the three-dimensional coordinates of the virtual light source based on the pixel coordinates corresponding to the virtual light source in each original image and the relative position of the camera corresponding to each original image.

[0144] It should be understood that the device 500 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art can understand that the device 500 can be specifically an image processing device in the above-mentioned embodiment, and the device 500 can be used to execute the various processes and / or steps corresponding to the image processing device in the above-mentioned method embodiment. To avoid repetition, it will not be repeated here.

[0145] The device 500 has the function of implementing the corresponding steps performed by the image processing device in the method; the above functions can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0146] In the embodiments of the present application, Figure 5 The device 500 may also be a chip or a chip system, such as a system on chip (SoC).

[0147] Figure 6 Another image processing device 600 provided in an embodiment of the present application is shown, and the image processing device 600 includes a processor 601, a transceiver 602, and a memory 603. The processor 601, the transceiver 602, and the memory 603 communicate with each other through an internal connection path, the memory 603 is used to store commands, and the processor 601 is used to execute the instructions stored in the memory 603 to control the transceiver 602 to send signals and / or receive signals.

[0148] It should be understood that the image processing device 600 can be specifically an image processing device in the above-mentioned embodiment, and can be used to execute the various steps and / or processes corresponding to the image processing device in the above-mentioned method embodiment. Optionally, the memory 603 may include a read-only memory and a random access memory, and provide instructions and data to the processor 601. A part of the memory 603 may also include a non-volatile random access memory. For example, the memory 603 may also store information about the device type. The processor 601 may be used to execute the instructions stored in the memory, and when the processor 501 executes the instructions stored in the memory, the processor 601 is used to execute the various steps and / or processes of the above-mentioned method embodiment corresponding to the image processing device. The transceiver 602 may include a transmitter and a receiver, the transmitter may be used to implement the various steps and / or processes corresponding to the above-mentioned transceiver for performing the sending action, and the receiver may be used to implement the various steps and / or processes corresponding to the above-mentioned transceiver for performing the receiving action.

[0149] It should be understood that in the embodiment of the present application, the processor 601 may be a central processing unit (CPU), and the processor 601 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0150] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0151] The present application also provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to implement the method corresponding to the image processing device in the above embodiment.

[0152] The present application also provides a computer program product, which includes a computer program (also referred to as code or instruction). When the computer program runs on a computer, the computer can execute the method corresponding to the image processing device in the above embodiment.

[0153] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0154] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0155] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0156] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0157] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0158] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0159] The above is only a specific implementation of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the embodiments of the present application, which should be included in the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be based on the protection scope of the claims.

Claims

1. An image processing method, characterized in that: include: Acquire multiple original images of the target object, where the multiple original images are obtained by photographing the target object at different viewing angles; Obtaining multiple groups of matching feature points based on the multiple original images, and determining the three-dimensional coordinates of the multiple groups of matching feature points and the relative position and posture of the camera corresponding to each original image based on the pixel coordinates of the multiple groups of matching feature points in the corresponding original images; Determine depth information of the matching feature points corresponding to each original image based on the three-dimensional coordinates of the multiple groups of matching feature points and the relative position and posture of the camera corresponding to each original image; Determine an ambient light map corresponding to each original image based on the depth information of the matching feature points corresponding to each original image and the multiple original images, wherein the ambient light map is an image used to represent the brightness information of each pixel in the original image under the influence of the ambient light source; Determine the three-dimensional coordinates of the virtual light source based on the ambient lighting map corresponding to each original image and the relative position of the camera corresponding to each original image; Based on the three-dimensional coordinates of the virtual light source and the ambient lighting map corresponding to each original image, performing lighting compensation on each original image to obtain a plurality of lighting compensated images; Determining a three-dimensional model of the target object based on the multiple illumination-compensated images and the three-dimensional coordinates of the multiple sets of matching feature points; The method further comprises: Based on the relative position of the camera corresponding to each original image, the three-dimensional coordinates of the virtual light source and the three-dimensional coordinates of the multiple groups of matching feature points, determine to update the three-dimensional coordinates of the virtual light source and the updated three-dimensional coordinates of the multiple groups of matching feature points; The performing illumination compensation on each original image based on the three-dimensional coordinates of the virtual light source and the ambient illumination map corresponding to each original image includes: Based on the updated virtual light source three-dimensional coordinates and the ambient lighting map corresponding to each original image, performing lighting compensation on each original image; The determining of the three-dimensional model of the target object based on the multiple illumination compensation images and the three-dimensional coordinates of the multiple groups of matching feature points includes: A three-dimensional model of the target object is determined based on the multiple illumination-compensated images and the updated three-dimensional coordinates of the multiple groups of matching feature points.

2. The method according to claim 1, characterized in that: The step of performing illumination compensation on each of the original images to obtain a plurality of illumination compensated images includes: Based on the updated three-dimensional coordinates of the virtual light source, determining updated pixel coordinates of the virtual light source in each of the original images; Based on the difference between the updated pixel coordinates of the virtual light source in each original image and the pixel coordinates corresponding to the virtual light source in each original image, displacing the pixel points in the ambient illumination map corresponding to each original image to obtain the ambient illumination compensation map corresponding to each original image; Based on the ambient illumination compensation map corresponding to each original image, illumination compensation is performed on each original image to obtain the multiple illumination compensated images.

3. The method according to claim 2, characterized in that The step of determining the three-dimensional model of the target object based on the multiple illumination compensation images and the updated three-dimensional coordinates of the multiple sets of matching feature points includes: determining updated three-dimensional coordinates of the plurality of sets of matching feature points as a colorless sparse three-dimensional point cloud; Obtaining pixel coordinates of the multiple groups of matching feature points in the corresponding multiple illumination compensation images; Coloring the colorless sparse three-dimensional point cloud using the pixel coordinates of the multiple sets of matching feature points in the corresponding multiple illumination compensation images to obtain a colored sparse three-dimensional point cloud; A three-dimensional model of the target object is determined based on the colored sparse three-dimensional point cloud and the multiple illumination-compensated images.

4. The method according to any one of claims 1 to 3, characterized in that The obtaining of multiple groups of matching feature points based on the multiple original images includes: Extracting feature points of each original image from the plurality of original images; Perform feature point matching on the multiple original images to obtain the multiple groups of matching feature points.

5. The method according to any one of claims 1 to 4, characterized in that The determining of the three-dimensional coordinates of the multiple groups of matching feature points and the relative position of the camera corresponding to each original image includes: Determine the relative position and posture of the camera corresponding to each of the original images by using a triangulation method based on the pixel coordinates of the multiple sets of matching feature points in the corresponding original images and the camera intrinsic parameters corresponding to the multiple original images; Based on the pixel coordinates of the multiple groups of matching feature points in the corresponding original images and the relative position and posture of the camera corresponding to each original image, the three-dimensional coordinates of the multiple groups of matching feature points are determined by using a triangulation method.

6. The method according to any one of claims 1 to 4, characterized in that The determining the depth information of the corresponding matching feature points on each original image includes: The three-dimensional coordinates of the multiple groups of matching feature points and the relative position of the camera corresponding to each original image are input into the depth estimation network model to obtain the depth information of the matching feature points corresponding to each original image.

7. The method according to any one of claims 1 to 4, characterized in that The determining the environment illumination map corresponding to each original image includes: The depth information of the matching feature points corresponding to each original image and the multiple original images are input into the illumination estimation network model to obtain the environment illumination map corresponding to each original image.

8. The method according to any one of claims 1 to 4, characterized in that The determining of the three-dimensional coordinates of the virtual light source includes: Determine the pixel coordinates with the smallest pixel amplitude in the ambient illumination map corresponding to each original image as the pixel coordinates corresponding to the virtual light source in each original image; The three-dimensional coordinates of the virtual light source are determined based on the pixel coordinates corresponding to the virtual light source in each original image and the relative position of the camera corresponding to each original image.

9. An image processing device, characterized in that: include: An acquisition module is used to acquire multiple original images of a target object, wherein the multiple original images are obtained by photographing the target object at different viewing angles; A processing module, configured to obtain a plurality of groups of matching feature points based on the plurality of original images, and determine the three-dimensional coordinates of the plurality of groups of matching feature points and the relative position and posture of the camera corresponding to each original image based on the pixel coordinates of the plurality of groups of matching feature points in the corresponding original images; Determine depth information of the matching feature points corresponding to each original image based on the three-dimensional coordinates of the multiple groups of matching feature points and the relative position and posture of the camera corresponding to each original image; Based on the depth information of the matching feature points corresponding to each original image and the multiple original images, determine the ambient lighting map corresponding to each original image, wherein the ambient lighting map is an image used to represent the brightness information of each pixel in the original image under the influence of the ambient light source; based on the ambient lighting map corresponding to each original image and the relative position of the camera corresponding to each original image, determine the three-dimensional coordinates of the virtual light source; based on the three-dimensional coordinates of the virtual light source and the ambient lighting map corresponding to each original image, perform lighting compensation on each original image to obtain multiple lighting compensated images; and, based on the multiple lighting compensated images and the three-dimensional coordinates of the multiple groups of matching feature points, determine the three-dimensional model of the target object; The processing module is also used for: Based on the relative position of the camera corresponding to each original image, the three-dimensional coordinates of the virtual light source and the three-dimensional coordinates of the multiple groups of matching feature points, determine the updated three-dimensional coordinates of the virtual light source and the updated three-dimensional coordinates of the multiple groups of matching feature points; based on the updated three-dimensional coordinates of the virtual light source and the ambient lighting map corresponding to each original image, perform lighting compensation on each original image; and, based on the multiple lighting compensation images and the updated three-dimensional coordinates of the multiple groups of matching feature points, determine the three-dimensional model of the target object.

10. The device according to claim 9, characterized in that The processing module is also used for: Based on the updated three-dimensional coordinates of the virtual light source, the updated pixel coordinates of the virtual light source in each of the original images are determined; based on the difference between the updated pixel coordinates of the virtual light source in each of the original images and the pixel coordinates corresponding to the virtual light source in each of the original images, the pixel points in the ambient lighting map corresponding to each of the original images are displaced to obtain an ambient lighting compensation map corresponding to each of the original images; based on the ambient lighting compensation map corresponding to each of the original images, lighting compensation is performed on each of the original images to obtain the multiple lighting compensated images.

11. The device according to claim 10, characterized in that The processing module is also used for: determining updated three-dimensional coordinates of the plurality of sets of matching feature points as a colorless sparse three-dimensional point cloud; The acquisition module is also used for: Obtaining pixel coordinates of the multiple groups of matching feature points in the corresponding multiple illumination compensation images; The processing module is also used for: Coloring the colorless sparse three-dimensional point cloud using the pixel coordinates of the multiple sets of matching feature points in the corresponding multiple illumination compensation images to obtain a colored sparse three-dimensional point cloud; A three-dimensional model of the target object is determined based on the colored sparse three-dimensional point cloud and the multiple illumination-compensated images.

12. The device according to any one of claims 9 to 11, characterized in that The processing module is also used for: Extracting feature points of each of the multiple original images; performing feature point matching on the multiple original images to obtain the multiple groups of matching feature points.

13. The device according to any one of claims 9 to 11, characterized in that The processing module is also used for: Determine the relative position and posture of the camera corresponding to each of the original images by using a triangulation method based on the pixel coordinates of the multiple sets of matching feature points in the corresponding original images and the camera intrinsic parameters corresponding to the multiple original images; And, based on the pixel coordinates of the multiple groups of matching feature points in the corresponding original images and the relative position and posture of the camera corresponding to each original image, the three-dimensional coordinates of the multiple groups of matching feature points are determined by using a triangulation method.

14. The device according to any one of claims 9 to 11, characterized in that The processing module is also used for: The three-dimensional coordinates of the multiple groups of matching feature points and the relative position of the camera corresponding to each original image are input into the depth estimation network model to obtain the depth information of the matching feature points corresponding to each original image.

15. The device according to any one of claims 9 to 11, characterized in that The processing module is also used for: The depth information of the matching feature points corresponding to each original image and the multiple original images are input into the illumination estimation network model to obtain the environment illumination map corresponding to each original image.

16. The device according to any one of claims 9 to 11, characterized in that The processing module is also used for: The pixel coordinates with the smallest pixel amplitude in the ambient illumination map corresponding to each original image are determined as the pixel coordinates corresponding to the virtual light source in each original image; and the three-dimensional coordinates of the virtual light source are determined based on the pixel coordinates corresponding to the virtual light source in each original image and the relative position of the camera corresponding to each original image.

17. An image processing device, characterized in that: include: A processor, wherein the processor is coupled to a memory, wherein the memory is used to store a computer program, and when the processor calls the computer program, the image processing device executes the method according to any one of claims 1 to 8.

18. A computer-readable storage medium, characterized in that: Used to store a computer program, the computer program comprising instructions for implementing the method according to any one of claims 1 to 8.

19. A computer program product, characterized in that The computer program product includes a computer program code, and when the computer program code is executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 8.