A target object surface reconstruction method and related device

By using preset mapping tables and sampling point prediction models, the camera attitude and sampling points are directly acquired and predicted, and the problem of long-term calculation of camera posture in the prior art is solved, and an efficient three-dimensional reconstruction process is achieved.

CN119180917BActive Publication Date: 2025-04-08HUNAN MANGO DIGITAL INTELLIGENCE ART TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411662907.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-04-08
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

The existing three-dimensional reconstruction algorithm based on image takes a long time to calculate the camera pose, resulting in a slow reconstruction process.

Method used

The camera posture is obtained by presetting the mapping table and the camera shooting angle and shooting interval, and directly looking up the table to obtain the camera's camera posture, avoiding the step of calculating the camera posture, and using the sampling point prediction model to directly output the sampling points corresponding to each pixel in each surface image.

Benefits of technology

The reconstruction process is simplified, the reconstruction efficiency is significantly improved, the reconstruction error caused by inaccurate camera pose calculations is reduced, and the detail quality of the three-dimensional model is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119180917B_ABST
    Figure CN119180917B_ABST
Patent Text Reader

Abstract

The present application discloses a method for reconstructing the surface of a target object and a related device, which relate to the field of image processing, including: using a camera group on an acquisition platform to acquire an image of the target object to obtain a surface image, calculating the camera posture of each camera based on the shooting angle and shooting interval of each camera, mapping the position of each pixel in the surface image in the camera coordinate system to the world coordinate system based on the camera posture, then using a sampling point prediction model to output the corresponding sampling point of the ray corresponding to each pixel in the surface image, and finally using a three-dimensional reconstruction model to perform three-dimensional reconstruction based on the coordinates and directions of the sampling points in the world coordinate system. In the modeling process, there is no need to calculate the camera posture, and the camera posture of the camera can be directly obtained by looking up a table, and the sampling point prediction model can be used to directly output the sampling point corresponding to each pixel in each surface image. The overall modeling process is short in time, thereby improving the modeling efficiency.
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 a target object surface reconstruction method and related devices. Background Art

[0002] With the rapid development of digital technology, the importance of 3D reconstruction technology in cultural heritage protection, museum display, education research and other fields has become increasingly prominent. Traditional 3D reconstruction methods mainly rely on professional scanning equipment, such as laser scanners or structured light scanners, which are expensive, complex to operate, and have limitations when dealing with cultural relics with fine textures and complex geometric structures.

[0003] In recent years, image-based 3D reconstruction technology has gradually attracted attention. This method uses visual images taken by ordinary cameras to reconstruct the 3D model of the object through computer vision algorithms.

[0004] The current mainstream image-based 3D reconstruction algorithms can be divided into two technical routes: 1) 3D reconstruction algorithms based on volume rendering, with representative algorithms such as nerf, nerf++, and instant-ngp. 2) 3D reconstruction algorithms based on point clouds, with representative algorithms such as 3dgs.

[0005] Existing image-based 3D reconstruction algorithms, whether volume rendering-based 3D reconstruction or point cloud-based 3D reconstruction, have their limitations. First, these two algorithms generally rely on the colmap tool to calculate the camera pose. The colmap tool often takes a long time to calculate the camera pose, even more than the time it takes to train the model, which results in a slow reconstruction process. Summary of the invention

[0006] In view of the above problems, the present application provides a target object surface reconstruction method and related devices to achieve the purpose of rapid modeling of the target object. The specific scheme is as follows:

[0007] The first aspect of the present application provides a target object surface reconstruction method, comprising:

[0008] A surface image obtained by collecting images of a target object by a camera group, wherein the camera group includes N cameras, and different cameras have different image collection angles for the target object, and N is a positive integer not less than 2;

[0009] Acquire the camera posture of each camera corresponding to the surface image based on a preset mapping table and the shooting angle and shooting interval of each camera;

[0010] Based on the camera posture, mapping the coordinate point of each pixel in the surface image to a world coordinate system;

[0011] Using a sampling point prediction model to predict the sampling points corresponding to the rays corresponding to each pixel in the surface image, to obtain the sampling points corresponding to each ray in each image;

[0012] A three-dimensional reconstruction model is used to perform three-dimensional reconstruction based on the coordinates and directions of the sampling points in the world coordinate system.

[0013] In a possible implementation, acquiring the camera posture of each camera corresponding to the surface image based on a preset mapping table and the shooting angle and shooting interval of each camera includes:

[0014] Get the internal parameters of each camera;

[0015] Obtain the shooting time of the camera corresponding to each surface image;

[0016] Based on the preset mapping table, the camera's shooting angle, shooting time, and the rotation speed of the target object relative to the camera are searched to calculate the rotation matrix corresponding to each surface image captured by the camera;

[0017] Based on the position of the camera and the center position of the world coordinate system, the translation matrix of each camera is obtained.

[0018] In a possible implementation, using a three-dimensional reconstruction model to perform three-dimensional reconstruction based on the coordinates and directions of the sampling points in a world coordinate system includes:

[0019] Mapping the coordinates and directions of the sampling points from a low-dimensional vector space to a high-dimensional vector space;

[0020] The coordinates and directions of the sampling points mapped to the high-dimensional vector space are rendered using a three-dimensional reconstruction model to obtain the density and color of the sampling points.

[0021] In a possible implementation, the training process of the sampling point prediction model includes:

[0022] Obtaining labels, wherein the labels are obtained by reconstructing the sampling point density in the coarse sampling stage by using coarse sampling, and then calculating the sampling point positions of fine sampling based on the density of the sampling points;

[0023] Dividing the labels into a training set and a test set;

[0024] The sampling point prediction model is trained and learned using the training set, and the reliability of the output result of the trained sampling point prediction model is tested using the test set. If the test result is unqualified, the sampling point prediction model is iteratively tested using the training set until the test result is qualified.

[0025] In a possible implementation, the sampling point prediction model is specifically used for:

[0026] Get the polar coordinates of the ray of the desired prediction sampling point;

[0027] Based on the polar coordinate prediction, sampling points on the ray of each required prediction sampling point are obtained.

[0028] In one possible implementation, the coordinates and directions of the sampling points are mapped from a low-dimensional vector space to a high-dimensional vector space, including:

[0029] Initialize a learnable position encoding that is consistent with the original position encoding dimension;

[0030] Obtaining a position code of a hash map that matches the coordinates and direction of the sampling point;

[0031] Adding the hash-mapped position code to the learnable position code to obtain a fused hash-mapped position code;

[0032] A high-dimensional vector space matching the coordinates and directions of the sampling points is created based on the fused position encoding after hash mapping. A second aspect of the present application provides a target object surface reconstruction device, comprising:

[0033] An image acquisition unit, used to acquire a surface image obtained by a camera group acquiring an image of a target object, wherein the camera group includes N cameras, and different cameras acquire images of the target object at different angles, and N is a positive integer not less than 2;

[0034] A camera attitude acquisition unit, used to acquire the camera attitude of each camera corresponding to the surface image based on a preset mapping table and the shooting angle and shooting interval of each camera;

[0035] A coordinate conversion unit, used for mapping the coordinate point of each pixel in the surface image to a world coordinate system based on the camera posture;

[0036] A sampling point prediction unit, used to predict the sampling point corresponding to the ray corresponding to each pixel in the surface image by using a sampling point prediction model, so as to obtain the sampling point corresponding to each ray in each image;

[0037] The modeling unit is used to perform three-dimensional reconstruction based on the coordinates and directions of the sampling points in the world coordinate system by using a three-dimensional reconstruction model.

[0038] A third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the target object surface reconstruction method of the first aspect or any implementation of the first aspect.

[0039] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:

[0040] The memory is used to store computer programs;

[0041] The processor is used to execute the computer program so that the electronic device can implement the target object surface reconstruction method of the first aspect or any implementation method of the first aspect.

[0042] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the target object surface reconstruction method according to the first aspect or any implementation of the first aspect.

[0043] By means of the above-mentioned technical scheme, the above-mentioned scheme provided by the present application uses a camera group on an acquisition platform to acquire an image of the target object to obtain a surface image, calculates the camera posture of each camera based on the shooting angle and shooting interval of each camera, and maps the position of each pixel in the surface image in the camera coordinate system to the world coordinate system based on the camera posture, and then uses a sampling point prediction model to output the corresponding sampling point of the ray corresponding to each pixel in the surface image, and finally uses a three-dimensional reconstruction model to perform three-dimensional reconstruction based on the coordinates and directions of the sampling points in the world coordinate system. In this modeling process, there is no need to calculate the camera posture, and the camera posture of the camera can be directly obtained by looking up the table, and the sampling point prediction model can be used to directly output the sampling point corresponding to each pixel in each surface image. The overall modeling process is short in time, thereby improving the modeling efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0045] Figure 1 A schematic diagram of a system architecture provided for this application;

[0046] Figure 2 A schematic diagram of an optional hardware structure of the terminal 100 provided in this application;

[0047] Figure 3 A schematic diagram of the structure of a server 200 is provided;

[0048] Figure 4 A schematic diagram of a process for reconstructing the surface of a target object provided in an embodiment of the present application;

[0049] Figure 5 A schematic diagram of a scene in which a camera group acquires images of a target object;

[0050] Figure 6 Schematic diagram of the distribution of sampling points on the ray;

[0051] Figure 7 It is a schematic diagram of the prediction results of the sampling point prediction model;

[0052] Figure 8 is the calculation flow chart of the external parameters corresponding to the surface image;

[0053] Fig. 9 A schematic diagram of a process for calculating position encoding of sampling points in a two-dimensional space;

[0054] Fig.10 A schematic diagram of the structure of a target object surface reconstruction device provided in an embodiment of the present application;

[0055] Fig.11 A schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0057] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0058] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0059] The present application can be applied in the field of image processing. Taking the scenario of three-dimensional modeling of a target object as an example, multiple application scenarios implemented in products will be introduced below.

[0060] First, the application scenario of this application is introduced.

[0061] This application can be applied to, but is not limited to, applications with image processing functions or cloud services provided by cloud-side servers, etc., which are introduced below:

[0062] See also Figure 1 , Figure 1 A schematic diagram of a system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers ( Figure 1 In the example, a server is included, and the server 200 can provide the method provided in the embodiment of the present application for one or more terminals.

[0063] Among them, the terminal 100 can be installed with an application for realizing surface reconstruction of the target object. The above application and web page can provide an interactive interface. The terminal 100 can receive relevant parameters input by the user on the interactive interface (these parameters can be the surface image obtained by the camera group acquiring the image of the target object), and send the above parameters to the server 200. The server 200 can obtain the processing result based on the received parameters and return the processing result to the terminal 100.

[0064] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters by itself without the cooperation of the server, and the embodiments of the present application are not limited to this.

[0065] Next describe Figure 1 The product form of the mid-terminal 100;

[0066] The terminal 100 in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiment of the present application does not impose any limitation on this.

[0067] Figure 2 An optional hardware structure diagram of the terminal 100 is shown.

[0068] refer to Figure 2As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), an earphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190 and other components. Those skilled in the art will appreciate that Figure 2 These are merely examples of terminals or multi-function devices and do not constitute limitations on the terminals or multi-function devices, which may include more or fewer components than those shown in the figures, or combinations of certain components, or different components.

[0069] The input unit 130 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the portable multifunctional device. Specifically, the input unit 130 may include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect the user's touch operations on or near it (such as the user's operation on or near the touch screen using any suitable object such as fingers, joints, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch screen can detect the user's touch action on the touch screen, convert the touch action into a touch signal and send it to the processor 170, and can receive and execute the command sent by the processor 170; the touch signal at least includes the touch point coordinate information. The touch screen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, the touch screen can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0070] Among them, the input device 132 can receive input data and the like.

[0071] The display unit 140 may be used to display information input by the user or provided to the user, various menus of the terminal 100, an interactive interface, file display and / or playback of any multimedia file. In the embodiment of the present application, the display unit 140 may be used to display an interactive interface, processing results, etc.

[0072] The memory 120 can be used to store instructions and data. The memory 120 can mainly include an instruction storage area and a data storage area. The data storage area can store various data, such as multimedia files, texts, etc.; the instruction storage area can store software units such as operating systems, applications, instructions required for at least one function, or their subsets and extensions. It can also include a non-volatile random access memory; provide the processor 170 with hardware, software and data resources including management of computing and processing equipment, and support control software and applications. It is also used for the storage of multimedia files, and the storage of running programs and applications.

[0073] The processor 170 is the control center of the terminal 100. It uses various interfaces and lines to connect various parts of the entire terminal 100. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it executes various functions of the terminal 100 and processes data, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 170. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips. The processor 170 may also be used to generate corresponding operation control signals, send them to corresponding components of the computing and processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that each functional module therein performs corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.

[0074] Among them, the memory 120 can be used to store software codes related to the target object surface reconstruction method, the processor 170 can execute the steps of the target object surface reconstruction method, and can also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to achieve corresponding functions.

[0075] The radio frequency unit 110 (optional) can be used for receiving and sending information or receiving and sending signals during a call, for example, after receiving the downlink information of the base station, it is sent to the processor 170 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the radio frequency unit 110 can also communicate with network devices and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.

[0076] In this embodiment of the present application, the RF unit 110 can send data to the server 200 and receive processing results sent by the server 200.

[0077] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.

[0078] The terminal 100 also includes a power supply 190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.

[0079] The terminal 100 further includes an external interface 180 , which may be a standard Micro USB interface or a multi-pin connector, and may be used to connect the terminal 100 to communicate with other devices, or to connect a charger to charge the terminal 100 .

[0080] Although not shown, the terminal 100 may also include a flashlight, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which are not described in detail here. Some or all of the methods described below may be applied in the following embodiments. Figure 2 In the terminal 100 shown.

[0081] Next describe Figure 1 The product form of the server 200;

[0082] Figure 3 A structural diagram of a server 200 is provided, such as Figure 3 As shown, the server 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other via the bus 201.

[0083] The bus 201 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0084] The processor 202 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0085] The memory 204 may include a volatile memory, such as a random access memory (RAM). The memory 204 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard drive (HDD), or a solid state drive (SSD).

[0086] The memory 204 may be used to store software codes related to the target object surface reconstruction method, and the processor 202 may execute the steps of the target object surface reconstruction method of the chip, and may also schedule other units to implement corresponding functions.

[0087] It should be understood that the above-mentioned terminal 100 and server 200 can be centralized or distributed devices, and the processors in the above-mentioned terminal 100 and server 200 (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuit (ASIC), field-programmable gate array (FPGA), general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.

[0088] In order to solve the above problems mentioned in the background technology, the present application provides a method for reconstructing the surface of a target object. The method for reconstructing the surface of a target object in the present application is described in detail below with reference to the accompanying drawings.

[0089] Reference Figure 4 , Figure 4 A flow chart of a target object surface reconstruction method provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, a data processing method provided in an embodiment of the present application may include steps S401 to S405, and these steps are described in detail below.

[0090] Step S401: acquiring a surface image of a target object through a camera group;

[0091] The camera group includes N cameras, and different cameras have different image acquisition angles for the target object. Each camera in the camera group can be fixedly installed on a collection platform or other device so as to be able to perform stable image acquisition of the target object, thereby obtaining a high-quality image of the target object, and N is a positive integer not less than 2.

[0092] The essence of this solution is a 3D reconstruction algorithm of cultural relics based on vision. The 3D reconstruction algorithm of cultural relics based on vision requires taking images of target objects from multiple perspectives. Therefore, an image acquisition platform can be pre-built. The image acquisition platform includes N image acquisition devices. In this application, the image acquisition device can be a camera,

[0093] like Figure 5As shown, the value of N can be 3, that is, the camera group includes three cameras, which are respectively recorded as the first camera, the second camera and the third camera. The first camera, the second camera and the third camera are installed on the image acquisition platform. In order to enable the camera group to capture images of various surfaces of the target object in all directions, the first camera captures the target object at an angle of sight; the first camera captures the target object at an angle of elevation; and the first camera captures the target object at an angle of depression. The degree of the elevation angle is 45°, and the degree of the depression angle is 45°.

[0094] When the camera group collects the image of the target object, the target object is mounted on the collection table turntable of the collection table, such as Figure 5 As shown, the acquisition table turntable drives the target object to rotate based on a preset speed. The value of the preset speed can be selected according to user needs. For example, the acquisition table turntable rotates once a minute. At this time, the camera in the camera group can shoot the target object at a speed of 1s / frame. The three cameras in the camera group can shoot a total of 3×60=180 pictures. This image acquisition method will cause a certain overlap between the continuously shot images, and will not cause excessive redundancy to increase the amount of calculation.

[0095] Step S402: acquiring the camera posture of each camera based on a preset mapping table and the shooting angle and shooting interval of each camera;

[0096] The existing mainstream camera pose calculation method is based on the colmap tool. The colmap tool first calculates the key points (feature points) of the image based on the SIFT feature algorithm, then matches the key points between the images captured by the camera, and then uses the SFM method to calculate the camera pose. This solution has several problems.

[0097] (1) The camera pose calculation for some images fails due to the failure to predict and match key points. These images with incorrect pose estimation cannot participate in the subsequent 3D reconstruction training. If there are too many failures, the 3D reconstruction of the target object cannot be performed.

[0098] (2) The process of calculating key points is a necessary step in conventional vision-based 3D modeling, and this process takes a lot of time.

[0099] (3) The calculated camera pose may be inaccurate.

[0100] In order to solve the above problems, the present application can adopt a mathematical calculation solution to calculate the camera posture, and the position of the camera in the present application is fixed, and the shooting interval of the camera is pre-set by the user. Therefore, the camera posture is also fixed. Here, in the present application, the corresponding camera posture can be pre-calculated based on the shooting angle and shooting interval of the camera relative to the target object, and these corresponding relationships are stored in a mapping list. After determining the shooting angle and shooting interval of the camera, the camera posture of each camera can be determined directly based on the mapping list.

[0101] In this application, the camera pose includes the camera's intrinsic parameters and w2c (the transformation matrix from the world coordinate system to the camera coordinate system).

[0102] The camera intrinsic parameters include focal length and distortion coefficient. The camera intrinsic parameters are fixed. You can use the checkerboard and Zhang Zhengyou calibration method to calibrate the camera to obtain the camera intrinsic parameters.

[0103] w2c is composed of a rotation matrix and a translation matrix. Figure 5 As shown, the center of the world coordinate system can be set to the center of the acquisition platform turntable ( Figure 5 The place marked by the five-pointed star in the middle is the center of the target object). Driven by the rotation of the acquisition platform, the target object rotates relative to the camera. At this time, the camera can shoot different angles of the target object. The overall shooting effect is equivalent to placing different cameras at 360 degrees of the cultural relic. Assume that the rotation period of the turntable is 60s. The angular velocity is 360 / 60=6 degrees / s. The camera takes a picture every 1s, and the distance between the camera and the center of the origin of the world coordinate system is R. That is, it can be equivalent to that the camera falls on a circle with a radius of R, and a camera is placed every 6 degrees, for a total of 60×3 cameras. After determining the position of the camera, the external parameter of the camera, that is, the w2c matrix, can be calculated. After the camera position has been determined and the world coordinate system has been determined, the rotation matrix and the translation matrix can be calculated. The translation and rotation matrices corresponding to each camera are calculated separately. The translation matrix refers to the distance between the camera and the center of the world coordinate system in the x, y, and z directions. The value of the translation matrix is ​​the distance between the camera and the center of the world coordinate system. The rotation matrix can be used to translate the camera coordinate system to the world coordinate system (the center of the circle), and then calculate the angle between the camera coordinate system and the world coordinate system in the horizontal direction and the vertical direction, and then calculate the corresponding rotation matrix when the camera takes each image. Specifically, when determining the rotation matrix, the world coordinate system and the camera coordinate system are rotated around the x, y, and z axes respectively, so that the x, y, and z axes of the world coordinate system and the camera coordinate system coincide. The rotation angles at this time are recorded as R1, R2, and R3, and the rotation matrix is ​​recorded as R=R1×R2×R3.

[0104] The conversion formula between the world coordinate system and the pixel coordinate system is shown in the following formula:

[0105] .

[0106] Among them, in the above formula, is the camera internal parameter, where , is the focal length, , is the center of the pixel plane, R is a 3×3 rotation matrix, and T is a 3×1 translation matrix. Through the above method, the camera intrinsics and extrinsic parameters of the camera at each moment corresponding to each image can be obtained. The calculated camera intrinsics and extrinsic parameters can be reused in the process of 3D modeling of all target objects. In this way, the camera intrinsic and extrinsic parameters only need to be calculated once, and there is no need to repeat the calculation when modeling other objects later.

[0107] Step S403: Based on the camera posture, the coordinate point of each pixel in the surface image is mapped to a world coordinate system.

[0108] After the camera postures corresponding to the surface images collected by the cameras are determined, the pixel points in the surface images can be mapped from the camera coordinate system to the world coordinate system based on the camera postures.

[0109] Step S404: using the sampling point prediction model to predict the sampling points corresponding to the rays corresponding to each pixel in the surface image, to obtain the sampling points corresponding to each ray in each image.

[0110] Assume that the pixel size of the picture taken by the camera is 7680×7680, that is, each picture has a total of 58982400 pixels. Figure 6 As shown in the figure, each pixel point is equivalent to a ray during training, and the dots on the ray are sampling points. Sampling needs to be performed on this ray to determine the location of the sampling point. The traditional technical solution is divided into two stages when determining the location of the sampling point, namely coarse sampling and fine sampling. Coarse sampling is uniform sampling. After the coarse sampling is completed, the density of each sampling point will be output, and the fine sampling points will be calculated based on the density, so that the sampling points are distributed as much as possible on the target object to be modeled. It can be seen that the existing method requires two stages of sampling, and the sampling time is relatively long.

[0111] This solution can construct a sampling point prediction model to predict the distribution of sampling points. The model can be trained using existing labels. Here, the existing labels can refer to the sampling results of fine sampling. After the sampling point density of the coarse sampling stage is obtained by coarse sampling reconstruction, the sampling point positions of fine sampling are calculated based on the density of the sampling points. The positions of these fine sampling sampling points are distributed on the surface of the target object. These fine sampling sampling point positions are used as labels for training the sampling point prediction model. The number of labels for training the sampling point prediction model can be selected according to user needs. The larger the number of labels, the more reliable the sampling point prediction model obtained by training. In one embodiment of the present application, a data set of 10w or other data volumes (a data set composed of labels) can be constructed, that is, the data set includes 10w or other number of labels. The data set is divided into a training set and a test set, and the training set is used to train and learn the sampling point prediction model. The test set is used to test the reliability of the output results of the trained sampling point prediction model. If the test result is unqualified, the training set is continued to be used to iteratively test the sampling point prediction model until the test result is qualified. Finally, a sampling point prediction model that meets the test requirements is obtained. After the sampling point prediction model is constructed, the sampling points of the acquired image can be predicted. Figure 7, the input of the sampling point prediction model is the image captured by the camera, and the output is a matrix of the same size as the original image. The model can automatically predict the distribution of sampling points of the target object to be modeled, and can generalize the training results to all target objects, that is, the sampling point prediction model can be reused. The input of the prediction model is the image captured by the camera. Assume that the image size is 128×128, that is, the height and width are 128 pixels. Each pixel value is equivalent to the color value obtained by volume rendering of the sampling point on a ray, so each image corresponds to a total of 128×128 rays. The model output is 128×128×128, the first 128×128 is the ray, and the latter 128 represents the distance of the 128 sampling points on each ray from the camera. In this way, it is possible to directly predict which sampling points should be sampled on each ray. The sampling point prediction model is used to predict the coordinates of the sampling points on the ray. Assuming that the ray can be expressed in polar coordinates: r(t)=o+td, where o is c2w[:3,-1], c2w is the transformation matrix from the world coordinate system to the camera coordinate system, and d is the coordinate of each pixel on the image multiplied by the transformation matrix, i.e., c2w[:3,:3]. Since the transformation matrix c2w is known, it is only necessary to use the sampling point prediction model to find the parameter t (sampling distance) to confirm the position of the sampling point in the world coordinate system. Therefore, in this solution, the sampling point prediction model is mainly used to predict t. In this solution, the sampling point prediction model can be implemented using the Unet encoder-decoder model, the output of which is a matrix of the same size as the original image, where the number of channels of the model is the number of sampling points, for example, 128. After the sampling point prediction model is trained, the picture taken by the camera can be sent to the model to directly predict the sampling points of each ray. These sampling points are distributed on the objects to be modeled, thereby improving the convergence speed and effect of reconstruction.

[0112] Step S405: using a 3D reconstruction model to perform 3D reconstruction based on the coordinates and directions of the sampling points in the world coordinate system.

[0113] In this embodiment, in order to ensure the reliability of the output three-dimensional model, the three-dimensional model can be trained in advance in this solution, and the training labels can be the coordinates and directions of the fine sampling points on the ray obtained by using the existing solution. During the training process, the input data of the three-dimensional model are the particle coordinates and directions of the sampling points on at least one ray obtained by sampling, that is, each training sample will input the particle coordinates and directions of all the sampling points on at least one ray, and the output of the three-dimensional model is the density and color of each sampling point on the ray. The density and color of all sampling points on each ray are volume rendered (the process can be differentiated), and the color prediction value of the pixel where the ray is located can be obtained. This predicted value and the true color value are back-propagated by MSE loss calculation to complete the training of the three-dimensional model.

[0114] After the 3D model training is completed and the sampling points on each ray are determined, the coordinates and directions of each sampling point in the world coordinate system (i.e., the coordinates and directions of the sampling points in the previous text) are obtained, and the coordinates and directions of the sampling points are input into the 3D reconstruction model. The output of the 3D reconstruction model is the density and color of the sampling points. The density and color of the sampling points are further processed to obtain the color prediction value of the pixel point where the ray is located. At this point, the surface reconstruction of the target object is completed.

[0115] It can be seen from the above scheme that the target object surface reconstruction method disclosed in the above embodiment of the present application uses a camera group on an acquisition platform to acquire an image of the target object to obtain a surface image, calculates the camera posture of each camera based on the shooting angle and shooting interval of each camera, and maps the position of each pixel in the surface image in the camera coordinate system to the world coordinate system based on the camera posture, and then uses a sampling point prediction model to output the corresponding sampling point of the ray corresponding to each pixel in the surface image, and finally uses a three-dimensional reconstruction model to perform three-dimensional reconstruction based on the coordinates and directions of the sampling points in the world coordinate system. In this modeling process, there is no need to calculate the camera posture, and the camera posture of the camera can be directly obtained by looking up the table, and the sampling point prediction model can be used to directly output the sampling point corresponding to each pixel in each surface image. The overall modeling process is short in time, thereby improving the modeling efficiency.

[0116] When the acquisition table turntable rotates, the x-axis, y-axis, and z-axis of the world coordinate system are in the optional state, while the camera coordinate system is stationary. Therefore, the angles between the axes in the camera coordinate system and the axes in the world coordinate system will change. Therefore, the external parameters of the camera are different at the acquisition time corresponding to different surface images. It is necessary to calculate the external parameters corresponding to each surface image. See Figure 8 In the above solution of the present application, the camera posture of each camera corresponding to the surface image is obtained based on the preset mapping table and the shooting angle and shooting interval of each camera, including:

[0117] Step S801: Obtain the internal parameters of each camera.

[0118] The camera posture consists of the camera's intrinsic parameters and extrinsic parameters. Since the camera's intrinsic parameters are fixed, this application can directly obtain the camera's intrinsic parameters.

[0119] Step S802: Obtain the shooting time of the camera corresponding to each surface image.

[0120] In this step, since the shooting interval of the camera is fixed and the rotation speed of the collection table turntable is also fixed, the rotation time of the collection table turntable can be calculated based on the shooting time of the surface image and the initial time when the collection table turntable starts to rotate, and then based on the time and the rotation speed of the collection table turntable, the rotation angle of the collection table turntable can be calculated, and then based on the angles between the axes of the camera coordinate system and the axes of the world coordinate system at the initial moment and the calculated rotation angle, the angles between the axes of the camera coordinate system and the axes of the world coordinate system at the moment of surface image acquisition are calculated. In this scheme, the angles between the camera coordinate systems corresponding to each camera at the initial moment and the axes of the world coordinate system are known. When the shooting angles of the cameras are determined, the angles between the camera coordinate systems corresponding to each camera at the initial moment and the axes of the world coordinate system are already determined. Since the rotation speed of the acquisition platform turntable is known, the rotation angles of the axes of the world coordinate system are also fixed every time the acquisition platform turntable rotates for a certain period of time. Therefore, after determining the shooting moment of the camera corresponding to the surface image, the angles between the axes of the camera coordinate system at the initial moment and the axes of the world coordinate system, and the rotation angles of the axes of the world coordinate system every time the acquisition platform turntable rotates for a certain period of time, the angles between the camera coordinate system at the shooting moment of the camera corresponding to the surface image and the axes of the world coordinate system are also known. In the technical solution disclosed in this embodiment, the shooting angles of each camera in the camera group are fixed and the rotation speed of the acquisition platform turntable is fixed. Therefore, it is only necessary to find out the shooting time of the camera corresponding to the surface image in order to calculate the angles of each axis between the camera coordinate system and the world coordinate system at that time. After the angles of each axis between the camera coordinate system and the world coordinate system are determined, the rotation matrix of the camera is also determined.

[0121] Step S803: searching the camera's shooting angle, shooting time, and shooting time interval based on a preset mapping table to calculate the rotation matrix corresponding to each surface image captured by the camera;

[0122] In order to quickly determine the angle, the present application may pre-suggest a mapping relationship table, which records the mapping relationship between the shooting time of the camera (in this embodiment, the shooting time of the camera is equivalent to the rotation time of the turntable of the acquisition platform) and the angles of each axis between the camera coordinate system and the world coordinate system. Therefore, after determining the shooting time of the camera corresponding to the surface image, the rotation matrix of the camera corresponding to the surface image at the shooting time can be determined directly based on the mapping relationship table.

[0123] Step S804: Based on the position of the camera and the center position of the world coordinate system, the translation matrix of each camera is obtained.

[0124] The translation matrix refers to the distance between the camera and the center of the world coordinate system in the x, y, and z directions. Once the position of the camera is determined, the translation matrix is ​​also determined.

[0125] When a three-dimensional reconstruction model is used to perform three-dimensional reconstruction based on the coordinates and directions of the sampling points in the world coordinate system, the three-dimensional model is mainly reconstructed based on the idea of ​​volume rendering. Since the coordinates and directions of the sampling points are in a lower dimensional space, directly inputting them into the training model will result in the loss of details of the reconstructed three-dimensional model of the target object. Therefore, the present application pre-encodes the position of each sampling point and converts the coordinates and directions of the sampling points in the world coordinate system from a low-dimensional vector space to a high-dimensional vector space.

[0126] Fig. 9 A schematic diagram of a process for calculating the position encoding of sampling points in a two-dimensional space is shown. Fig. 9 , explained from the perspective of two-dimensional space. First, the entire plane space is evenly divided into an N×N grid, that is, there are (N+1)×(N+1) vertices. Construct a hash table F, each row of which is a 2D feature. After each vertex (x, y) is processed by the hash function, the vertex is projected onto a row of the hash table, that is, the position encoding feature f of the current vertex is obtained.

[0127] When performing three-dimensional reconstruction based on the coordinates and directions of the sampling points in the world coordinate system, the direction and position of the sampling points will be processed and encoded to obtain the position code corresponding to the position and direction of the sampling points, and then three-dimensional reconstruction will be performed based on the position code of the acquired sampling points. The sampling points acquired in this application are located in the plane space and will fall into one of the grids. At the same time, each vertex corresponding to the four vertices of the grid can be projected into the hash table to obtain the corresponding position code. The position codes of these four vertices are subjected to 3-linear interpolation to obtain the position code of the current sampling point.

[0128] The applicant has found through research that there is a problem with this method. In order to reduce the amount of training calculations, it is assumed that the number of rows in the hash table, i.e., the size, is set to 2^16. The number of divided grids is set to 512×512×512 (three-dimensional space), i.e., 2^27. Obviously, the number of vertices will be greater than the number of hash tables, which will inevitably cause hash conflicts, i.e., the same vertex corresponds to the same row on the hash table. In order to solve this problem, the present application initializes a learnable position code ff (the dimension is consistent with the original position code), and when inputting the reconstruction model, it is added to the position code after hash mapping, that is, the position code after hash mapping is added to the learnable position code (ff). This addition operation is to fuse the two types of position information together, so that the final position code contains both the position information after hash mapping and the unique information that can be learned and distinguish different particles. In this way, the position codes corresponding to different sampling points are different, and then the fused position code is used as input to obtain a high-dimensional vector space through the reconstruction model. At this point, the coordinates and directions of the sampling points are mapped from the low-dimensional vector space to the high-dimensional vector space. That is, in this solution, the position code of the sampling point = hash position code + ff (learnable position code, whose value will be trained with the network), and the added position code can ensure that the output is different position code for different input coordinates. Among them, the learnable position code ff is obtained using nn.Embedding of the pytorch library, with the input being the position coordinates of the sampling point and the output being the 128-dimensional ff position code.

[0129] Based on the above solutions, this application has the following advantages:

[0130] 1) Improve reconstruction efficiency: This application does not need to use tools such as Colmap to calculate the camera pose. It can directly obtain the camera pose from the captured visual images, which simplifies the reconstruction process and significantly improves the reconstruction efficiency.

[0131] 2) Reducing reconstruction errors: Since calculation bias is avoided, the solution disclosed in the present application can directly obtain the camera pose based on the mapping table without calculating the camera pose, thereby reducing the reconstruction error caused by inaccurate camera pose calculation.

[0132] 3) Improved detail quality of the constructed 3D model: This application improves the traditional position coding scheme and solves the hash conflict problem in the traditional scheme, so that the position coding of different sampling points remains unique, thereby more accurately reconstructing the details of the target object.

[0133] 4) Save training time: By using the sampling point prediction model to directly predict the sampling points, the time loss caused by the two-stage training method of predicting sampling points is avoided. This makes the reconstruction process more efficient and helps save computing resources and time costs.

[0134] This embodiment also provides a target object surface reconstruction device, see Fig.10 , the device may include:

[0135] An image acquisition unit 1, which corresponds to step S401 in the present application, and is used to acquire a surface image of a target object by acquiring an image of the target object through a camera group, wherein the camera group includes N cameras, and different cameras acquire the image of the target object at different angles, and N is a positive integer not less than 2;

[0136] A camera posture acquisition unit 2, which corresponds to step S402 in the present application, is used to acquire the camera posture of each camera corresponding to the surface image based on a preset mapping table and the shooting angle and shooting interval of each camera;

[0137] A coordinate conversion unit 3, which corresponds to step S403 in the present application, is used to map the coordinate points of each pixel in the surface image to a world coordinate system based on the camera posture,

[0138] The sampling point prediction unit 4, which corresponds to step S404 in the present application, is used to predict the sampling points corresponding to the rays corresponding to each pixel in the surface image using the sampling point prediction model to obtain the sampling points corresponding to each ray in each image;

[0139] The modeling unit 5 corresponds to step S405 in the present application and is used to perform three-dimensional reconstruction based on the coordinates and directions of the sampling points in the world coordinate system using a three-dimensional reconstruction model.

[0140] A corresponding electronic device is also provided in the embodiment of the present application. Fig.11 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Fig.11 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0141] like Fig.11As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0142] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Fig.11 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0143] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any target object surface reconstruction method provided in the embodiment of the present application.

[0144] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any target object surface reconstruction method provided in the embodiment of the present application.

[0145] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0146] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0147] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0148] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A method for reconstructing the surface of a target object, characterized in that: include: A surface image obtained by collecting images of a target object by a camera group, wherein the camera group includes N cameras, and different cameras have different image collection angles for the target object, and N is a positive integer not less than 2; Acquire the camera posture of each camera corresponding to the surface image based on a preset mapping table and the shooting angle and shooting interval of each camera; Based on the camera posture, mapping the coordinate point of each pixel in the surface image to a world coordinate system; Using a sampling point prediction model to predict the sampling points corresponding to the rays corresponding to each pixel in the surface image, to obtain the sampling points corresponding to each ray in each image; Using a three-dimensional reconstruction model to perform three-dimensional reconstruction based on the coordinates and directions of the sampling points in a world coordinate system; Acquiring the camera posture of each camera corresponding to the surface image based on a preset mapping table and the shooting angle and shooting interval of each camera, including: Get the internal parameters of each camera; Obtain the shooting time of the camera corresponding to each surface image; Based on the preset mapping table, the camera's shooting angle, shooting time, and the rotation speed of the target object relative to the camera are searched to calculate the rotation matrix corresponding to each surface image captured by the camera; Based on the position of the camera and the center position of the world coordinate system, obtaining the translation matrix of each camera; The training process of the sampling point prediction model includes: Obtaining labels, wherein the labels are obtained by reconstructing the sampling point density in the coarse sampling stage by using coarse sampling, and then calculating the sampling point positions of fine sampling based on the density of the sampling points; Dividing the labels into a training set and a test set; The sampling point prediction model is trained and learned using the training set, and the reliability of the output result of the trained sampling point prediction model is tested using the test set. If the test result is unqualified, the sampling point prediction model is iteratively tested using the training set until the test result is qualified.

2. The target object surface reconstruction method according to claim 1, characterized in that: The three-dimensional reconstruction model is used to perform three-dimensional reconstruction based on the coordinates and directions of the sampling points in the world coordinate system, including: Mapping the coordinates and directions of the sampling points from a low-dimensional vector space to a high-dimensional vector space; The coordinates and directions of the sampling points mapped to the high-dimensional vector space are rendered using a three-dimensional reconstruction model to obtain the density and color of the sampling points.

3. The target object surface reconstruction method according to claim 1, characterized in that: The sampling point prediction model is specifically used for: Get the polar coordinates of the ray of the desired prediction sampling point; Based on the polar coordinate prediction, sampling points on the ray of each required prediction sampling point are obtained.

4. The target object surface reconstruction method according to claim 2, characterized in that: Mapping the coordinates and directions of the sampling points from the low-dimensional vector space to the high-dimensional vector space includes: Initialize a learnable position encoding that is consistent with the original position encoding dimension; Obtaining a position code of a hash map that matches the coordinates and direction of the sampling point; Adding the hash-mapped position code to the learnable position code to obtain a fused hash-mapped position code; A high-dimensional vector space matching the coordinates and directions of the sampling points is created based on the fused hash-mapped position encoding.

5. A target object surface reconstruction device, characterized in that: include: An image acquisition unit, used for acquiring a surface image of a target object by acquiring an image of the target object through a camera group, wherein the camera group includes N cameras, and different cameras acquire the image of the target object at different angles, and N is a positive integer not less than 2; A camera attitude acquisition unit, used to acquire the camera attitude of each camera corresponding to the surface image based on a preset mapping table and the shooting angle and shooting interval of each camera; A coordinate conversion unit, used for mapping the coordinate point of each pixel in the surface image to a world coordinate system based on the camera posture; A sampling point prediction unit, used to predict the sampling point corresponding to the ray corresponding to each pixel in the surface image by using a sampling point prediction model, so as to obtain the sampling point corresponding to each ray in each image; A modeling unit, configured to perform three-dimensional reconstruction based on the coordinates and directions of the sampling points in a world coordinate system using a three-dimensional reconstruction model; Acquiring the camera posture of each camera corresponding to the surface image based on a preset mapping table and the shooting angle and shooting interval of each camera, including: Get the internal parameters of each camera; Obtain the shooting time of the camera corresponding to each surface image; Based on the preset mapping table, the camera's shooting angle, shooting time, and the rotation speed of the target object relative to the camera are searched to calculate the rotation matrix corresponding to each surface image captured by the camera; Based on the position of the camera and the center position of the world coordinate system, obtaining the translation matrix of each camera; The training process of the sampling point prediction model includes: Obtaining labels, wherein the labels are obtained by reconstructing the sampling point density in the coarse sampling stage by using coarse sampling, and then calculating the sampling point positions of fine sampling based on the density of the sampling points; Dividing the labels into a training set and a test set; The sampling point prediction model is trained and learned using the training set, and the reliability of the output result of the trained sampling point prediction model is tested using the test set. If the test result is unqualified, the sampling point prediction model is iteratively tested using the training set until the test result is qualified.

6. A computer program product, characterized in that The method comprises computer-readable instructions, which, when executed on an electronic device, enable the electronic device to implement the target object surface reconstruction method as claimed in any one of claims 1 to 4.

7. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the target object surface reconstruction method as described in any one of claims 1 to 4.

8. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the target object surface reconstruction method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Ancient tomb chamber structure digital reconstruction system

    CN109961505A

  • Object three-dimensional reconstruction method based on depth camera module

    CN110751684A