WO2025007702A1 - 网格构建方法、装置、电子设备、介质和程序产品 - Google Patents
网格构建方法、装置、电子设备、介质和程序产品 Download PDFInfo
- Publication number
- WO2025007702A1 WO2025007702A1 PCT/CN2024/098014 CN2024098014W WO2025007702A1 WO 2025007702 A1 WO2025007702 A1 WO 2025007702A1 CN 2024098014 W CN2024098014 W CN 2024098014W WO 2025007702 A1 WO2025007702 A1 WO 2025007702A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- depth
- grid
- construction method
- pixel point
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three-dimensional [3D] modelling for computer graphics
- G06T17/05—Geographic models
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—Three-dimensional [3D] image rendering
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—Three-dimensional [3D] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
Definitions
- the present disclosure relates to the technical field of three-dimensional reconstruction, and in particular to a grid construction method, device and electronic equipment.
- extended reality devices With the development of extended reality technology, various extended reality devices have also developed. For extended reality devices, they have a perspective function. The perspective function allows the user to see the real world through the extended reality device. Therefore, when the perspective function is turned on, the scene that the user can currently see will be reconstructed in three dimensions to obtain the grid corresponding to the scene, that is, the three-dimensional scene model.
- Embodiments of the present disclosure provide a grid construction method, device, and electronic device.
- an embodiment of the present disclosure provides a grid construction method, which is applied to a head-mounted device, and the grid construction method includes: obtaining a depth image of a current scene captured by the head-mounted device; constructing a grid corresponding to the current scene based on the depth image; wherein the depth image includes target pixels, and the actual depth of the target object corresponding to the target pixels meets a preset condition in the current scene; in the process of constructing the grid, the depth value of the target pixel adopts a preset depth value.
- an embodiment of the present disclosure provides a grid construction device, which is applied to a head-mounted device, and the grid construction device includes: an acquisition unit, which is used to acquire a depth image of a current scene collected by the head-mounted device; a construction unit, which is used to construct a grid corresponding to the current scene based on the depth image; wherein the depth image includes target pixel points, and the actual depth of the target object corresponding to the target pixel points meets preset conditions in the current scene; in the process of constructing the grid, the depth value of the target pixel point adopts a preset depth value.
- an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device; Used to store one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the grid construction method as described in the first aspect.
- an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the grid construction method as described in the first aspect.
- FIG1 is a flow chart of an embodiment of a grid construction method according to the present disclosure.
- FIG2 is a flow chart of another embodiment of a grid construction method according to the present disclosure.
- FIG3 is a schematic structural diagram of an embodiment of a grid construction device according to the present disclosure.
- FIG4 is an exemplary system architecture in which a grid construction method according to an embodiment of the present disclosure may be applied;
- FIG5 is a schematic diagram of a basic structure of an electronic device provided according to an embodiment of the present disclosure.
- the technical solution of the disclosed embodiment can be applied to various extended reality scenarios, or to other application scenarios involving perspective functions.
- the scene that the user can currently see is reconstructed in three dimensions to generate a three-dimensional scene model.
- the generated three-dimensional scene model is referred to as a grid in the embodiment of the present disclosure.
- head-mounted devices With the development of head-mounted devices and extended reality technology, more and more users hope to use head-mounted devices in outdoor scenes for some outdoor entertainment, such as: real-life outdoor games; many businesses also hope that head-mounted devices will develop more extended reality effects, such as: displaying virtual images in playgrounds. That is, at present, there is a demand for building environmental grids in outdoor scenes.
- the embodiment of the present disclosure provides a grid construction scheme, which takes into account the problem of poor depth accuracy in large-scale environments. If the grid is directly constructed in this part, the inaccuracy of its depth will lead to inaccurate grid construction. Therefore, using a preset depth value to realize the grid construction of this part of pixels can solve the problem caused by the inaccuracy of the depth and ensure the accuracy of the environmental grid construction; so that the constructed grid can meet the perspective use. Furthermore, the grid construction scheme can be applied to grid construction based on outdoor scenes.
- FIG1 shows a flow chart of an embodiment of a grid construction method according to the present disclosure.
- the grid construction method can be applied to a terminal device. As shown in FIG1, the grid construction method includes the following steps:
- Step 101 Obtain a depth image of the current scene captured by a head mounted device.
- the head mounted device includes a depth sensor, which can be used to obtain a depth image.
- the depth sensor for example, is a TOF (Time of flight) camera.
- the head-mounted device includes a binocular camera, which can acquire depth images based on binocular recognition.
- the current scene is an outdoor scene; in other embodiments, the current scene may also be a non-outdoor scene, but there are objects whose depth is difficult to estimate in the current scene.
- the depth image includes a target pixel point, and the actual depth of the target object corresponding to the target pixel point meets a preset condition in the current scene.
- Preset conditions include, for example, that the actual depth is difficult to predict, the actual depth is greater than or much greater than the preset depth, etc.
- the target object may be, for example, the sky, glass, or other objects whose depth is difficult to predict, which are not limited here.
- the target pixel is the pixel corresponding to the target object, it is necessary to first Only by detection can the target pixel be determined.
- the grid construction method further includes: determining a target object detection result corresponding to the depth image; and determining a target pixel point according to the target object detection result.
- the accuracy of its depth value is difficult to guarantee. If the target object is detected directly based on the depth image, the accuracy of the detection result may not be high enough.
- determining the target object detection result corresponding to the depth image includes: obtaining an environment image corresponding to the depth image; the environment image includes pixel points that correspond one-to-one to the pixel points of the depth image; and determining the target object detection result based on the environment image.
- the environment image may be a color image, a grayscale image, etc., which is different from a depth image.
- both the environment image and the depth image can be acquired through a binocular camera; in other embodiments, the environment image and the depth image can be acquired using different cameras; for example, the depth image is acquired through a binocular camera, and the environment image is acquired through a grayscale camera; or the environment image is acquired through a color camera, etc.
- the environment image includes pixels that correspond one-to-one to pixels of the depth image. Then, there is a pixel correspondence relationship between the grayscale image and the depth image. Thus, the target object detection result of the depth image can be determined based on the target object detection result of the environment image.
- the target object detection result is determined based on the environment image and a pre-trained neural network model.
- the training data set corresponding to the pre-trained neural network model can be images labeled with target objects, and the neural network model is trained using these images so that the trained neural network model can be used to detect the target object.
- some implementation methods that can improve the accuracy of the neural network model can be adopted, such as: presetting the number of training times, and after reaching the number of training times, the model training is considered to be completed. Another example: presetting a test data set, using the test data set to test the accuracy of the trained neural network model, if the accuracy does not meet the standard, continue to train the model, or improve the model, etc.
- the target object detection result can be used to indicate whether the environment image includes the target object, and if the target object is included, to indicate the area where the target object is located, or the target pixel point corresponding to the target object.
- the target pixel point corresponding to the target object in the depth image can be determined.
- Step 102 construct a grid corresponding to the current scene based on the depth image.
- the depth value of the target pixel point adopts the preset depth value.
- the preset depth value is used as the depth value of the target pixel.
- the preset depth value may be different in combination with different target objects.
- the preset depth value may be 10, or other preset farthest depths.
- the preset depth value may also be selected in combination with the pupil distance of the human eye, and no specific value is limited here.
- the depth values corresponding to the target pixels in the depth image can be marked as invalid depth values, and these invalid depth values can be replaced with preset depth values in subsequent applications. Invalid depth values, for example -1.
- step 102 includes: determining the spherical coordinates of each pixel point based on the depth value of each pixel point in the depth image and the pixel coordinates of each pixel point; and constructing a grid corresponding to the current scene based on the spherical coordinates of each pixel point.
- the pixel coordinates of each pixel are first converted into spherical coordinates based on the depth value of each pixel and the pixel coordinates of each pixel; thus, a grid corresponding to the current scene is constructed according to the spherical coordinates of each pixel. It can be understood that for the depth value of the target pixel, a preset depth value is used.
- R IS ,t IS is used to represent the conversion of pixel points in the image coordinate system to the grid coordinate system
- D(px) is used to represent the depth value of the pixel coordinate on the depth image.
- the preset depth value is 10
- normalize( ⁇ ) represents the normalization of the vector.
- the grid corresponding to the current scene can be constructed based on the spherical coordinates of each pixel point, but the constructed grid may be distorted. Therefore, in order to solve the problem of grid distortion, in the embodiment of the present disclosure, the environment grid can be constructed by spherical sampling.
- a grid corresponding to the current scene is constructed based on the spherical coordinates of each pixel point, including: generating a sphere corresponding to each pixel point based on the spherical coordinates of each pixel point; sampling based on the spherical surface to determine the grid coordinates of multiple sampling points; and constructing a grid corresponding to the current scene based on the grid coordinates of multiple sampling points.
- determining the grid coordinates of the plurality of sampling points includes: determining the rendering inverse depths respectively corresponding to the plurality of sampling points; wherein the rendering inverse depth is a depth value determined based on the depth value of the neighborhood sampling point; and determining the grid coordinates respectively corresponding to the plurality of sampling points based on the rendering inverse depths respectively corresponding to the plurality of sampling points and the spherical coordinates respectively corresponding to the plurality of sampling points.
- the rendering inverse depth needs to be determined in combination with the depth values of the neighboring sampling points of the sampling point.
- an average inverse depth value and a weight influence value of the sampling point are determined based on the depth values of the neighborhood sampling points of the sampling point; and a rendering inverse depth of the sampling point is determined based on the average inverse depth value of the sampling point, the weight influence value of the sampling point, the initial rendering inverse depth, and a preset energy relationship.
- the neighborhood sampling points are, for example, neighborhood sampling points within a range of 3*3.
- the preset energy relationship is used to characterize the energy equation constructed based on the spherical grid.
- the average inverse depth value of the sampling point can be understood as a depth value obtained by averaging the depth values of neighboring sampling points based on the weight influence value.
- the depth value of the neighborhood sampling point is the reciprocal of the preset depth value. If the pixel corresponding to the neighborhood sampling point is not the target pixel, the depth value uses the depth value in the depth image.
- the weight influence value is determined based on the number of neighboring sampling points of the sampling point.
- the average inverse depth value is expressed as:
- Count represents the number of neighborhood sampling points of this point, which means that if the depth of the neighborhood sampling point is greater than 0.1 (i.e., the inverse of the preset depth), the original depth value is used, otherwise 0.1 is used. That is, for the neighborhood sampling point corresponding to the target pixel point, its depth value uses 0.1, while for the neighborhood sampling points corresponding to other pixels, its depth value uses the original depth value.
- the preset energy relationship can be expressed as: Among them, N(i) represents the set of sampling points directly connected to the grid sampling point i, that is, the set of neighborhood sampling points, and ⁇ i represents the rendering
- N(i) represents the set of sampling points directly connected to the grid sampling point i, that is, the set of neighborhood sampling points
- ⁇ i represents the rendering
- the inverse depth of dyeing can correspond to an initial value and then be optimized based on the initial value.
- the energy is optimized, and the rendering inverse depth corresponding to the optimized energy is the finally determined rendering inverse depth.
- the final grid coordinates corresponding to each sampling point are expressed as: Based on the three-dimensional coordinates of the grid sampling points, a grid model for rendering can finally be obtained.
- optimization conditions can be preset, for example: the difference between the energies determined twice is less than the preset difference, that is, the energy basically no longer changes; for another example, the finally determined energy value meets the preset energy value conditions, etc., which are not limited here.
- the present disclosure provides an application flow chart of three-dimensional modeling.
- sky segmentation is first implemented based on the grayscale image, and then the sky depth is eliminated based on the depth map corresponding to the grayscale image. Then, mesh projection and solution are performed based on the result of sky elimination, and finally the rendering of the three-dimensional model is completed.
- the elimination of sky depth is essentially to mark the depth value of the sky part, so that in the process of mesh projection and solution, this part of the depth value is specially processed to avoid affecting the final mesh construction result.
- a mesh corresponding to the current scene is constructed based on the depth image of the current scene collected by the head-mounted device; wherein, the depth image includes the target object whose actual depth meets the preset conditions in the current scene. If the mesh is directly constructed for this part, the inaccuracy of its depth will lead to inaccurate mesh construction. Therefore, using the preset depth value to realize the mesh construction of this part of the pixel points can solve the problem caused by the inaccuracy of the depth and ensure the accuracy of the environment mesh construction; so that the constructed mesh can meet the perspective use.
- a neighborhood sampling method is used to solve the mesh distortion problem, so that the final mesh has better smoothness and improves the effect of the final rendering model.
- the present disclosure provides an embodiment of a grid construction device, which corresponds to the grid construction method embodiment shown in FIG. 1 , and can be specifically applied to various electronic devices.
- the grid construction device of this embodiment includes: an acquisition unit 301, used to acquire a depth image of the current scene collected by a head-mounted device; the depth image includes target pixels, and the actual depth of the target object corresponding to the target pixel meets the preset conditions in the current scene; a construction unit 302, used to construct a grid corresponding to the current scene based on the depth image; wherein, in the process of constructing the grid, the depth value of the target pixel adopts a preset depth value.
- the construction unit 302 is further used to determine a target object detection result corresponding to the depth image; The target pixel point is determined according to the target object detection result.
- the construction unit 302 is further used to obtain an environment image corresponding to the depth image; the environment image includes pixel points that correspond one-to-one to pixel points of the depth image; and based on the environment image, determine the target object detection result.
- the construction unit 302 is further used to determine the spherical coordinates of each pixel point based on the depth value of each pixel point in the depth image and the pixel coordinates of each pixel point; and construct a grid corresponding to the current scene based on the spherical coordinates of each pixel point.
- the construction unit 302 is further used to generate a sphere corresponding to each pixel point based on the spherical coordinates of each pixel point; perform sampling based on the spherical surface to determine the grid coordinates of multiple sampling points; and construct a grid corresponding to the current scene based on the grid coordinates of the multiple sampling points.
- the construction unit 302 is further used to determine the rendering inverse depths corresponding to the multiple sampling points respectively; wherein the rendering inverse depth is a depth value determined based on the depth value of the neighborhood sampling point; based on the rendering inverse depths corresponding to the multiple sampling points respectively and the spherical coordinates corresponding to the multiple sampling points respectively, determine the grid coordinates corresponding to the multiple sampling points respectively.
- the construction unit 302 is further used to: determine, for a sampling point among the multiple sampling points, an average inverse depth value and a weight influence value of the sampling point based on the depth values of the neighborhood sampling points of the sampling point; and determine the rendering inverse depth of the sampling point based on the average inverse depth value of the sampling point, the weight influence value of the sampling point, the initial rendering inverse depth and a preset energy relationship.
- the depth value of the neighborhood sampling point is the reciprocal of the preset depth value.
- the weight influence value is determined based on the number of neighborhood sampling points of the sampling point.
- FIG. 4 shows an exemplary system architecture to which the grid construction method according to an embodiment of the present disclosure can be applied.
- the system architecture may include terminal devices 401, 402, 403, a network 404, and a server 405.
- the network 404 may be used to provide a medium for a communication link between the terminal devices 401, 402, 403 and the server 405.
- the network 404 may include various connection types, such as wired, wireless communication links, or optical fiber cables.
- the terminal devices 401, 402, 403 can interact with the server 405 through the network 404 to receive or send messages, etc.
- Various client applications can be installed on the terminal devices 401, 402, 403, such as web browser applications, search applications, and news information applications.
- the client applications in the terminal devices 401, 402, 403 can receive user instructions and perform corresponding functions according to the user instructions, such as adding relevant information to the information according to the user instructions. Response information.
- Terminal devices 401, 402, 403 can be hardware or software.
- terminal devices 401, 402, 403 When terminal devices 401, 402, 403 are hardware, they can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) players, laptop computers and desktop computers, etc.
- terminal devices 401, 402, 403 When terminal devices 401, 402, 403 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
- the server 405 may be a server that provides various services, such as receiving information acquisition requests sent by the terminal devices 401, 402, and 403, acquiring display information corresponding to the information acquisition requests in various ways according to the information acquisition requests, and sending relevant data of the display information to the terminal devices 401, 402, and 403.
- the grid construction method provided in the embodiment of the present disclosure can be executed by a terminal device, and accordingly, the grid construction device can be set in the terminal devices 401, 402, and 403.
- the grid construction method provided in the embodiment of the present disclosure can also be executed by a server 405, and accordingly, the grid construction device can be set in the server 405.
- terminal devices, networks and servers in Figure 4 is only illustrative. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
- FIG5 shows a schematic diagram of the structure of an electronic device (such as the terminal device or server in FIG4) suitable for implementing the embodiment of the present disclosure.
- the terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.
- the electronic device shown in FIG5 is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present disclosure.
- the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503.
- ROM read-only memory
- RAM random access memory
- Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503.
- the processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504.
- An input/output (I/O) interface 505 is also connected to the bus 504.
- the electronic device 500 includes an input device 506 such as a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 such as a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 such as a magnetic tape, a hard disk, etc.; and a communication device 509.
- the communication device 509 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data.
- FIG. 5 shows an electronic device with various devices, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or provided instead.
- an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
- the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM502.
- the processing device 501 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
- the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
- the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above.
- Computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
- a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.
- a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried.
- This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above.
- the computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device.
- the program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
- the client and server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network).
- HTTP HyperText Transfer Protocol
- Examples of communication networks include a local area network ("LAN”), a wide area network ("WAN”), an internet (e.g., the Internet), and a peer-to-peer network. (e.g., ad hoc peer-to-peer networks), and any other currently known or later developed networks.
- the computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
- the above-mentioned computer-readable medium carries one or more programs.
- the electronic device obtains a depth image of the current scene collected by the head-mounted device; the depth image includes target pixels, and the actual depth of the target object corresponding to the target pixels meets the preset conditions in the current scene; constructs a grid corresponding to the current scene based on the depth image; wherein, in the process of constructing the grid, the depth value of the target pixel adopts the preset depth value.
- Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages.
- the program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server.
- the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
- LAN local area network
- WAN wide area network
- Internet service provider e.g., AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
- each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function.
- the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
- each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
- the units involved in the embodiments described in the present disclosure may be implemented by software or hardware.
- the name of a unit does not limit the unit itself in some cases.
- the acquisition unit 301 may also be described as a "unit for acquiring a depth image of the current scene captured by the head-mounted device".
- FPGAs field programmable gate arrays
- ASICs application specific integrated circuits
- ASSPs application specific standard products
- SOCs system on a chip
- CPLD complex programmable logic Devices
- a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment.
- a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
- a machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing.
- a more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
- RAM random access memory
- ROM read-only memory
- EPROM or flash memory erasable programmable read-only memory
- CD-ROM portable compact disk read-only memory
- CD-ROM compact disk read-only memory
- magnetic storage device or any suitable combination of the foregoing.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- Computer Graphics (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Artificial Intelligence (AREA)
- Multimedia (AREA)
- Geometry (AREA)
- Remote Sensing (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Image Processing (AREA)
Abstract
本公开实施例公开了网格构建方法、装置、电子设备、介质和程序产品。网格构建方法,应用于头戴设备,所述网格构建方法包括:获取头戴设备采集到的当前场景的深度图像;基于所述深度图像构建所述当前场景对应的网格;其中,所述深度图像包括目标像素点,所述目标像素点对应的目标对象的实际深度在所述当前场景中符合预设条件;在构建所述网格的过程中,所述目标像素点的深度值采用预设深度值。
Description
相关技术的交叉引用
本申请是以申请号为202310822219.9、申请日为2023年7月5日的中国专利申请为基础,并主张其优先权,该中国专利申请的公开内容在此作为整体引入本申请中。
本公开涉及三维重建技术领域,尤其涉及一种网格构建方法、装置和电子设备。
随着扩展现实技术的发展,各种扩展现实设备也随之发展。对于扩展现实设备来说,具备透视功能。透视功能可以实现通过扩展现实设备看到真实的世界,因此,在开启透视功能时,会对用户当前所能看到的场景进行三维重建,以得到该场景对应的网格,即三维场景模型。
发明内容
提供该公开内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该公开内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。
本公开实施例提供了一种网格构建方法、装置和电子设备。
第一方面,本公开实施例提供了一种网格构建方法,应用于头戴设备,所述网格构建方法包括:获取头戴设备采集到的当前场景的深度图像;基于所述深度图像构建所述当前场景对应的网格;其中,所述深度图像包括目标像素点,所述目标像素点对应的目标对象的实际深度在所述当前场景中符合预设条件;在构建所述网格的过程中,所述目标像素点的深度值采用预设深度值。
第二方面,本公开实施例提供了一种网格构建装置,应用于头戴设备,所述网格构建装置包括:获取单元,用于获取头戴设备采集到的当前场景的深度图像;构建单元,用于基于所述深度图像构建所述当前场景对应的网格;其中,所述深度图像包括目标像素点,所述目标像素点对应的目标对象的实际深度在所述当前场景中符合预设条件;在构建所述网格的过程中,所述目标像素点的深度值采用预设深度值。
第三方面,本公开实施例提供了一种电子设备,包括:一个或多个处理器;存储装置,
用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如第一方面所述的网格构建方法。
第四方面,本公开实施例提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理器执行时实现如第一方面所述的网格构建方法。
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1是根据本公开的网格构建方法的一个实施例的流程图;
图2是根据本公开的网格构建方法的另一个实施例的流程图;
图3是根据本公开的网格构建装置的一个实施例的结构示意图;
图4是本公开的一个实施例的网格构建方法可以应用于其中的示例性系统架构;
图5是根据本公开实施例提供的电子设备的基本结构的示意图。
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
本公开实施方式的技术方案可以应用于各种扩展现实场景中,或者应用于其他涉及到透视功能的应用场景中。
在这些应用场景中,当开启透视功能时,对用户当前所能看到的场景进行三维重建,生成三维场景模型,生成的三维场景模型在本公开实施例中称之为网格。
随着头戴设备和扩展现实技术的发展,越来越多的用户希望能在室外场景中使用头戴设备,做一些户外娱乐,例如:真人户外游戏;也有不少的商家希望头戴设备开发更多的扩展现实效果,例如:在游乐场中显示虚拟形象。即,目前,存在着在户外场景中构建环境网格的需求。
但是,由于户外场景面临尺度较大的问题,可能无法像室内一样实时构建当前视角下的环境网格,以满足透视使用。
基于此,本公开实施例提供一种网格构建方案,该网格构建方案考虑到尺度较大的环境的深度准确性差的问题,该部分若直接进行网格的构建,由于其深度的不准确性会导致网格构建的不准确性。因此,利用预设深度值实现该部分像素点的网格构建,能够解决深度的不准确性带来的问题,保证环境网格构建的准确性;从而使得构建的网格可以满足透视使用。进而,该网格构建方案可以应用于基于户外场景的网格构建。
请参考图1,其示出了根据本公开的网格构建方法的一个实施例的流程。该网格构建方法可以应用于终端设备。如图1所示,该网格构建方法包括以下步骤:
步骤101,获取头戴设备采集到的当前场景的深度图像。
在一些实施例中,头戴设备包括深度传感器,该深度传感器可用于实现深度图像的获取。深度传感器,例如:TOF(Time of flight,飞行时间)相机。
在一些实施例中,头戴设备包括双目相机,该双目相机可基于双目识别实现深度图像的获取。
在一些实施例中,当前场景为户外场景;在另一些实施例中,当前场景也可以为非户外场景,但是当前场景中存在深度难以估计的对象。
因此,在一些实施例中,深度图像包括目标像素点,该目标像素点对应的目标对象的实际深度在当前场景中符合预设条件。
预设条件例如,实际深度难以预测、实际深度大于或远大于预设深度等。
目标对象例如,天空、玻璃,或者其他深度难以预测的对象,在此不作限定。
在一些实施例中,由于目标像素点是目标对象对应的像素点,所以需要先对目标对象
进行检测,才能确定目标像素点。
因此,作为一种可选的实施方式,该网格构建方法还包括:确定深度图像对应的目标对象检测结果;根据目标对象检测结果确定目标像素点。
可以理解,由于目标对象的深度难以预测,其深度值的准确性难以得到保证,如直接基于深度图像对目标对象进行检测,检测结果的准确性可能也不够高。
因此,作为一种可选的实施方式,确定深度图像对应的目标对象检测结果,包括:获取深度图像对应的环境图像;该环境图像包括与深度图像的像素点一一对应的像素点;基于环境图像,确定目标对象检测结果。
在一些实施例中,环境图像可以是彩色图像、灰度图像等,区别于深度图像的图像。
在一些实施例中,环境图像和深度图像均可以通过双目相机获取;在另一些实施例中,环境图像和深度图像可以采用不同的相机获取;例如,深度图像通过双目相机获取,环境图像通过灰度相机获取;或者环境图像通过彩色相机获取等。
在一些实施例中,环境图像包括与深度图像的像素点一一对应的像素点,则,灰度图像与深度图像之间具有像素点对应关系,从而,可以基于环境图像的目标对象检测结果,确定深度图像的目标对象检测结果。
在一些实施例中,基于环境图像和预先训练的神经网络模型,实现目标对象检测结果的确定。
其中,预先训练的神经网络模型对应的训练数据集可以是标注有目标对象的图像,利用这些图像对神经网络模型进行训练,使得训练的神经网络模型可用于检测目标对象。
在一些实施例中,在神经网络模型的训练过程中,可以采用一些能够提高神经网络模型的精度的实施方式,例如:预设训练次数,在达到训练次数后,视为完成模型的训练。再例如:预设测试数据集,利用测试数据集对训练的神经网络模型的精度进行测试,若精度未达到标准,则继续对模型进行训练,或者改进模型等。
在一些实施例中,目标对象检测结果既可以用于表征环境图像中是否包括目标对象,还可以在包括目标对象的情况下,指示目标对象所在的区域,或者说目标对象对应的目标像素点。
从而,基于环境图像的目标对象检测结果,可以确定深度图像中的目标对象对应的目标像素点。
步骤102,基于深度图像构建当前场景对应的网格。
其中,在构建网格的过程中,目标像素点的深度值采用预设深度值。
在一些实施例中,由于目标像素点的深度值无法预测,而在基于深度图像构建当前对
应的网格的过程中,需要应用到目标像素点的深度值。因此,在本公开实施例中,采用预设深度值作为目标像素点的深度值。
在一些实施例中,结合不同的目标对象,预设深度值可以不同。例如,对于天空这种对象,预设深度值可以为10,或者其他的预设的最远深度。
在一些实施例中,预设深度值还可以结合人眼瞳距选取,在此不对具体值作限定。
在一些实施例中,为了避免后续基于深度图像构建网格时出现错误,在深度图像中,可以将目标像素点对应的深度值标记为无效深度值,后续在应用时,将这些无效深度值替换为预设深度值即可。无效深度值,例如-1。
作为一种可选的实施方式,步骤102包括:基于深度图像中各个像素点的深度值和各个像素点的像素坐标,确定各个像素点的球面坐标;基于各个像素点的球面坐标,构建当前场景对应的网格。
在这种实施方式中,先基于各个像素点的深度值和各个像素点的像素坐标,将各个像素点的像素坐标转换为球面坐标;从而,再根据各个像素点的球面坐标,构建当前场景对应的网格。可以理解,对于目标像素点的深度值,采用预设深度值。
在一些实施例中,假设网格所在坐标系为I,图像所在坐标系为S,用RIS,tIS表征将图像坐标系下的像素点转换到网格坐标系下,用π-1(·)表征将图像的像素坐标投影到图像坐标系下的归一化坐标(z=1)上,则,基于深度图像,将深度图中的点投影到网格坐标系下,可表示为:PI=RISπ-1(px)D(px)+tIS,if D(px)>0。
进一步地,用D(px)表征深度图像上像素坐标为的深度值,对于目标像素点,即D(px)=-1的像素点(即无效的像素点的深度在深度图像中置为-1),对应的转换关系为:PI=RISnormalize(π-1(px))*10。此处,预设深度取值为10,以及,normalize(·)表征把向量单位化。
进一步地,再将网格所在坐标系下的点转换为球面坐标:
其中,|PI|表征向量PI的模长。
在一些实施例中,基于各个像素点的球面坐标,可实现当前场景对应的网格的构建,但是,此时构建的网格可能存在着畸变的可能性。因此,为了解决网格的畸变问题,在本公开实施方式中,可通过球面采样的方式,构建环境网格。
作为一种可选的实施方式,基于各个像素点的球面坐标,构建当前场景对应的网格,包括:基于各个像素点的球面坐标,生成各个像素点对应的球面;基于球面进行采样,确定多个采样点的网格坐标;基于多个采样点的网格坐标,构建当前场景对应的网格。
在一些实施例中,假设P*表示球面网格上的第i个采样点,则其球面坐标可以表示为:
进一步地,确定多个采样点的网格坐标,包括:确定多个采样点分别对应的渲染逆深度;其中,该渲染逆深度为基于邻域采样点的深度值确定的深度值;基于多个采样点分别对应的渲染逆深度和多个采样点分别对应的球面坐标,确定多个采样点分别对应的网格坐标。
在一些实施例中,对于各个采样点来说,需要利用渲染逆深度重新求解网格坐标,该渲染逆深度需要结合采样点的邻域采样点的深度值确定。
在一些实施例中,针对多个采样点中的采样点,基于该采样点的邻域采样点的深度值确定该采样点的平均逆深度值和权重影响值;基于该采样点的平均逆深度值、该采样点的权重影响值、初始渲染逆深度和预设的能量关系,确定该采样点的渲染逆深度。
在一些实施例中,邻域采样点,例如:3*3范围内的邻域采样点。
在一些实施例中,预设的能量关系,用于表征基于球面网格构建的能量方程。
在一些实施例中,该采样点的平均逆深度值,可以理解为基于权重影响值,对邻域采样点的深度值求平均值获得的深度值。
在一些实施例中,若邻域采样点对应的像素点为目标像素点,则该邻域采样点的深度值为预设深度值的倒数。若邻域采样点对应的像素点不是目标像素点,则深度值采用深度图像中的深度值。
在一些实施例中,权重影响值基于该采样点的邻域采样点的数量确定。
在一些实施例中,平均逆深度值表示为:权重影响值表示为:w*=count。其中,count表示这个点的邻域采样点的数量,表示如果邻域采样点的深度大于0.1(即预设深度的倒数),则用原来的深度值,否则取0.1。即,针对目标像素点对应的邻域采样点,其深度值采用0.1,而针对其他像素点对应的邻域采样点,其深度值采用本来的深度值。
在一些实施例中,预设的能量关系可表示为:其中,N(i)表示和网格采样点i直接相连的采样点的集合,也即邻域采样点集合,ρi表示渲
染逆深度,其可以对应一个初始值,然后基于该初始值进行优化。
基于该预设的能量关系,对能量进行优化,优化完成的能量对应的渲染逆深度,即为最终确定的渲染逆深度。
从而,各个采样点对应的最终网格坐标表示为:基于该网格采样点的三维坐标,最终可得到用于渲染的网格模型。
在一些实施例中,在对能量进行优化时,可预设优化条件,例如:前后两次确定的能量之间的差值小于预设差值,即能量基本不再变化;再例如,最终确定的能量值符合预设的能量值条件等,在此不作限定。
进一步参考图2,本公开提供一种三维建模的应用流程图,在图2中,先基于灰度图实现天空分割,然后基于与灰度图对应的深度图实现天空深度的剔除,接着基于天空剔除的结果进行网格投影与求解,最终完成三维模型的渲染。其中,天空深度的剔除,本质上是将天空部分的深度值进行标识,以在网格投影与求解的过程中,对这部分深度值采用特殊的处理方式,以避免对最终的网格构建结果的影响。
从而,基于头戴设备采集到的当前场景的深度图像构建当前场景对应的网格;其中,该深度图像包括实际深度在当前场景中符合预设条件的目标对象,该部分若直接进行网格的构建,由于其深度的不准确性会导致网格构建的不准确性。因此,利用预设深度值实现该部分像素点的网格构建,能够解决深度的不准确性带来的问题,保证环境网格构建的准确性;从而使得构建的网格可以满足透视使用。
以及,在基于深度图像进行网格构建的过程中,利用邻域采样的方式,解决网格的畸变问题,使得最终得到的网格平滑性较好,提高最终的渲染模型的效果。
进一步参考图3,作为对上述各图所示方法的实现,本公开提供了一种网格构建装置的一个实施例,该装置实施例与图1所示的网格构建方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图3所示,本实施例的网格构建装置包括:获取单元301,用于获取头戴设备采集到的当前场景的深度图像;所述深度图像包括目标像素点,所述目标像素点对应的目标对象的实际深度在所述当前场景中符合预设条件;构建单元302,用于基于所述深度图像构建所述当前场景对应的网格;其中,在构建所述网格的过程中,所述目标像素点的深度值采用预设深度值。
在一些实施例中,构建单元302还用于确定所述深度图像对应的目标对象检测结果;
根据所述目标对象检测结果确定所述目标像素点。
在一些实施例中,构建单元302进一步用于获取所述深度图像对应的环境图像;所述环境图像包括与所述深度图像的像素点一一对应的像素点;基于所述环境图像,确定所述目标对象检测结果。
在一些实施例中,构建单元302进一步用于基于所述深度图像中各个像素点的深度值和各个像素点的像素坐标,确定所述各个像素点的球面坐标;基于所述各个像素点的球面坐标,构建所述当前场景对应的网格。
在一些实施例中,构建单元302进一步用于基于所述各个像素点的球面坐标,生成所述各个像素点对应的球面;基于所述球面进行采样,确定多个采样点的网格坐标;基于所述多个采样点的网格坐标,构建所述当前场景对应的网格。
在一些实施例中,构建单元302进一步用于确定所述多个采样点分别对应的渲染逆深度;其中,该渲染逆深度为基于邻域采样点的深度值确定的深度值;基于所述多个采样点分别对应的渲染逆深度和所述多个采样点分别对应的球面坐标,确定所述多个采样点分别对应的网格坐标。
在一些实施例中,构建单元302还用于:针对所述多个采样点中的采样点,基于该采样点的邻域采样点的深度值确定该采样点的平均逆深度值和权重影响值;基于该采样点的平均逆深度值、该采样点的权重影响值、初始渲染逆深度和预设的能量关系,确定该采样点的渲染逆深度。
在一些实施例中,若邻域采样点对应的像素点为所述目标像素点,则该邻域采样点的深度值为所述预设深度值的倒数。
在一些实施例中,所述权重影响值基于该采样点的邻域采样点的数量确定。
请参考图4,图4示出了本公开的一个实施例的网格构建方法可以应用于其中的示例性系统架构。
如图4所示,系统架构可以包括终端设备401、402、403,网络404,服务器405。网络404可以用以在终端设备401、402、403和服务器405之间提供通信链路的介质。网络404可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
终端设备401、402、403可以通过网络404与服务器405交互,以接收或发送消息等。终端设备401、402、403上可以安装有各种客户端应用,例如网页浏览器应用、搜索类应用、新闻资讯类应用。终端设备401、402、403中的客户端应用可以接收用户的指令,并根据用户的指令完成相应的功能,例如根据用户的指令在信息中添加相
应信息。
终端设备401、402、403可以是硬件,也可以是软件。当终端设备401、402、403为硬件时,可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。当终端设备401、402、403为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供分布式服务的软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。
服务器405可以是提供各种服务的服务器,例如接收终端设备401、402、403发送的信息获取请求,根据信息获取请求通过各种方式获取信息获取请求对应的展示信息。并展示信息的相关数据发送给终端设备401、402、403。
需要说明的是,本公开实施例所提供的网格构建方法可以由终端设备执行,相应地,网格构建装置可以设置在终端设备401、402、403中。此外,本公开实施例所提供的网格构建方法还可以由服务器405执行,相应地,网格构建装置可以设置于服务器405中。
应该理解,图4中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。
下面参考图5,其示出了适于用来实现本公开实施例的电子设备(例如图4中的终端设备或服务器)的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图5示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图5所示,电子设备可以包括处理装置(例如中央处理器、图形处理器等)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储装置508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有电子设备500操作所需的各种程序和数据。处理装置501、ROM502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、键盘、鼠
标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置507;包括例如磁带、硬盘等的存储装置508;以及通信装置509。通信装置509可以允许电子设备与其他设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM502被安装。在该计算机程序被处理装置501执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络
(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取头戴设备采集到的当前场景的深度图像;所述深度图像包括目标像素点,所述目标像素点对应的目标对象的实际深度在所述当前场景中符合预设条件;基于所述深度图像构建所述当前场景对应的网格;其中,在构建所述网格的过程中,所述目标像素点的深度值采用预设深度值。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,获取单元301还可以被描述为“获取头戴设备采集到的当前场景的深度图像的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑
设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。
Claims (17)
- 一种网格构建方法,应用于头戴设备,所述网格构建方法包括:获取所述头戴设备采集到的当前场景的深度图像,所述深度图像包括目标像素点,所述目标像素点对应的目标对象的实际深度在所述当前场景中符合预设条件;以及基于所述深度图像构建所述当前场景对应的网格,其中,在构建所述网格的过程中,所述目标像素点的深度值采用预设深度值。
- 根据权利要求1所述的网格构建方法,还包括:确定所述深度图像对应的目标对象检测结果;以及根据所述目标对象检测结果确定所述目标像素点。
- 根据权利要求2所述的网格构建方法,所述确定深度图像对应的目标对象检测结果,包括:获取所述深度图像对应的环境图像,所述环境图像包括与所述深度图像的像素点一一对应的像素点;以及基于所述环境图像,确定所述目标对象检测结果。
- 根据权利要求3所述的网格构建方法,其中,所述环境图像包括彩色图像或灰度图像。
- 根据权利要求3或4所述的网格构建方法,其中,所述基于所述环境图像,确定所述目标对象检测结果,包括:基于所述环境图像和预先训练的神经网络模型,确定所述目标对象检测结果。
- 根据权利要求1至5中任一项所述的网格构建方法,其中,对于不同的目标对象,采用不同的预设深度值。
- 根据权利要求1所述的网格构建方法,其中,所述基于所述深度图像构建所述当前场景对应的网格,包括:基于所述深度图像中各个像素点的深度值和各个像素点的像素坐标,确定所述各个像素点的球面坐标;以及基于所述各个像素点的球面坐标,构建所述当前场景对应的网格。
- 根据权利要求7所述的网格构建方法,其中,所述基于所述各个像素点的球面坐标,构建所述当前场景对应的网格,包括:基于所述各个像素点的球面坐标,生成所述各个像素点对应的球面;基于所述球面进行采样,确定多个采样点的网格坐标;以及基于所述多个采样点的网格坐标,构建所述当前场景对应的网格。
- 根据权利要求8所述的网格构建方法,其中,所述确定所述多个采样点的网格坐标,包括:确定所述多个采样点分别对应的渲染逆深度,其中,所述渲染逆深度为基于邻域采样点的深度值确定的深度值;以及基于所述多个采样点分别对应的渲染逆深度和所述多个采样点分别对应的球面坐标,确定所述多个采样点分别对应的网格坐标。
- 根据权利要求9所述的网格构建方法,还包括:针对所述多个采样点中的采样点,基于所述采样点的邻域采样点的深度值确定所述采样点的平均逆深度值和所述采样点的权重影响值;以及基于所述采样点的平均逆深度值、所述采样点的权重影响值、初始渲染逆深度和预设的能量关系,确定所述采样点的渲染逆深度。
- 根据权利要求8或者9所述的网格构建方法,其中,所述邻域采样点对应的像素点为所述目标像素点,所述邻域采样点的深度值为所述预设深度值的倒数。
- 根据权利要求8或9所述的网格构建方法,其中,所述邻域采样点对应的像素点不为所述目标像素点,所述邻域采样点的深度值为所述深度图像中所述邻域采样点的像素点对应的深度值。
- 根据权利要求10所述的网格构建方法,其中,所述权重影响值基于所述采样点的邻域采样点的数量确定。
- 一种网格构建装置,应用于头戴设备,所述网格构建装置包括:获取单元,用于获取头戴设备采集到的当前场景的深度图像;所述深度图像中包括目 标像素点,所述目标像素点对应的目标对象的实际深度在所述当前场景中符合预设条件;以及构建单元,用于基于所述深度图像构建所述当前场景对应的网格;其中,在构建所述网格的过程中,所述目标像素点的深度值采用预设深度值。
- 一种电子设备,包括:一个或多个处理器;以及存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-13中任一所述的方法。
- 一种计算机可读介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-13中任一所述的方法。
- 一种计算机程序产品,包括承载在非暂态计算机可读介质上的计算机程序,所述计算机程序在被处理器执行时实现如权利要求1-13中任一所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310822219.9A CN119273859A (zh) | 2023-07-05 | 2023-07-05 | 网格构建方法、装置和电子设备 |
| CN202310822219.9 | 2023-07-05 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025007702A1 true WO2025007702A1 (zh) | 2025-01-09 |
Family
ID=94115452
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/098014 Ceased WO2025007702A1 (zh) | 2023-07-05 | 2024-06-07 | 网格构建方法、装置、电子设备、介质和程序产品 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN119273859A (zh) |
| WO (1) | WO2025007702A1 (zh) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110109617A1 (en) * | 2009-11-12 | 2011-05-12 | Microsoft Corporation | Visualizing Depth |
| CN111476087A (zh) * | 2020-03-02 | 2020-07-31 | 深圳市商汤科技有限公司 | 目标检测方法及其相关的模型训练方法、设备、装置 |
| CN113711165A (zh) * | 2019-04-22 | 2021-11-26 | 微软技术许可有限责任公司 | 将虚拟环境与情境物理现实相混合 |
| CN114742703A (zh) * | 2022-03-11 | 2022-07-12 | 影石创新科技股份有限公司 | 双目立体全景图像的生成方法、装置、设备和存储介质 |
| CN114860070A (zh) * | 2022-04-15 | 2022-08-05 | 北京世冠金洋科技发展有限公司 | 一种动态交互方法及装置 |
-
2023
- 2023-07-05 CN CN202310822219.9A patent/CN119273859A/zh active Pending
-
2024
- 2024-06-07 WO PCT/CN2024/098014 patent/WO2025007702A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110109617A1 (en) * | 2009-11-12 | 2011-05-12 | Microsoft Corporation | Visualizing Depth |
| CN113711165A (zh) * | 2019-04-22 | 2021-11-26 | 微软技术许可有限责任公司 | 将虚拟环境与情境物理现实相混合 |
| CN111476087A (zh) * | 2020-03-02 | 2020-07-31 | 深圳市商汤科技有限公司 | 目标检测方法及其相关的模型训练方法、设备、装置 |
| CN114742703A (zh) * | 2022-03-11 | 2022-07-12 | 影石创新科技股份有限公司 | 双目立体全景图像的生成方法、装置、设备和存储介质 |
| CN114860070A (zh) * | 2022-04-15 | 2022-08-05 | 北京世冠金洋科技发展有限公司 | 一种动态交互方法及装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119273859A (zh) | 2025-01-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20250191299A1 (en) | Rendering method and apparatus for 3d material, and device and storage medium | |
| CN115409696B (zh) | 图像处理方法、装置、电子设备及存储介质 | |
| US20240273808A1 (en) | Texture mapping method and apparatus, device and storage medium | |
| CN112330788B (zh) | 图像处理方法、装置、可读介质及电子设备 | |
| CN111292406A (zh) | 模型渲染方法、装置、电子设备及介质 | |
| CN114049417B (zh) | 虚拟角色图像的生成方法、装置、可读介质及电子设备 | |
| CN115937010B (zh) | 一种图像处理方法、装置、设备及介质 | |
| CN116596748A (zh) | 图像风格化处理方法、装置、设备、存储介质和程序产品 | |
| CN112418233B (zh) | 图像处理方法、装置、可读介质及电子设备 | |
| WO2023029892A1 (zh) | 视频处理方法、装置、设备及存储介质 | |
| CN114419298A (zh) | 虚拟物体的生成方法、装置、设备及存储介质 | |
| CN114049403A (zh) | 一种多角度三维人脸重建方法、装置及存储介质 | |
| CN111680754B (zh) | 图像分类方法、装置、电子设备及计算机可读存储介质 | |
| CN114066722B (zh) | 用于获取图像的方法、装置和电子设备 | |
| CN114529452A (zh) | 用于显示图像的方法、装置和电子设备 | |
| WO2025007702A1 (zh) | 网格构建方法、装置、电子设备、介质和程序产品 | |
| CN118967487A (zh) | 深度图像质量增强模型训练方法、系统、设备及介质 | |
| CN113066166B (zh) | 图像处理方法、装置和电子设备 | |
| CN115035223A (zh) | 一种图像处理方法、装置、设备及介质 | |
| CN114612596A (zh) | 特效图的生成方法、装置、设备及存储介质 | |
| CN114742930A (zh) | 图像生成方法、装置、设备及存储介质 | |
| CN112862110B (zh) | 模型生成方法、装置和电子设备 | |
| CN118521848A (zh) | 样本数据生成方法、装置和电子设备 | |
| CN111582376B (zh) | 神经网络的可视化方法、装置、电子设备和介质 | |
| CN118135144A (zh) | 点云处理方法、装置和电子设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24835185 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |