Mesh construction method and apparatus, and electronic device, medium and program product

By using preset depth values ​​and target object detection in outdoor scenes, combined with neural network and spherical sampling technology, the problem of inaccuracy of grid construction depth in outdoor scenes is solved, and accurate and smooth grid construction is achieved to meet perspective Functional requirements.

WO2025007702A1PCT designated stage expired Publication Date: 2025-01-09BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/098014
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-05
Filing Date
2024-06-07
Publication Date
2025-01-09

AI Technical Summary

Technical Problem

Due to the large scale in outdoor scenes, it is difficult to build an accurate environmental grid in real time, resulting in inaccuracy of the perspective function, affecting the three-dimensional reconstruction effect.

Method used

Preset depth values ​​are used to build a grid, combined with target object detection of depth images and environmental images, and used neural network models and spherical sampling technology to determine the depth values ​​and grid coordinates of pixel points to solve the problems of depth inaccuracy and distortion.

Benefits of technology

It improves the accuracy and smoothness of grid construction in outdoor scenes, meets the needs of perspective use, and improves the rendering effect of the three-dimensional reconstruction model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024098014_09012025_PF_FP_ABST
    Figure CN2024098014_09012025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present disclosure are a mesh construction method and apparatus, and an electronic device, a medium and a program product. The mesh construction method is applied to a head-mounted device. The mesh construction method comprises: acquiring a depth image of the current scene collected by a head-mounted device; and on the basis of the depth image, constructing a mesh corresponding to the current scene, wherein the depth image comprises a target pixel point, the actual depth of a target object corresponding to the target pixel point meets a preset condition in the current scene, and during the construction of the mesh, a depth value of the target pixel point is a preset depth value.
Need to check novelty before this filing date? Find Prior Art

Description

Grid construction method, device, electronic device, medium and program product

[0001] Cross-references to related art

[0002] This application is based on and claims priority to the Chinese patent application with application number 202310822219.9 and application date July 5, 2023. The disclosed content of the Chinese patent application is hereby introduced as a whole into this application. Technical Field

[0003] The present disclosure relates to the field of three-dimensional reconstruction technology, and in particular to a grid construction method, device, and electronic device. Background Art

[0004] With the development of extended reality technology, various extended reality devices have also evolved. These devices often have a see-through feature. This feature allows users to see the real world through the device. Therefore, when the see-through feature is enabled, a 3D reconstruction of the scene currently visible to the user is performed to generate a corresponding mesh, or 3D scene model.

[0005] Summary of the Invention

[0006] This disclosure section is provided to briefly introduce concepts that will be described in detail in the detailed description section below. This disclosure section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0007] Embodiments of the present disclosure provide a grid construction method, device, and electronic device.

[0008] In a first aspect, 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 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.

[0009] In a second aspect, 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 the 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.

[0010] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: one or more processors; a storage device for storing one or more programs, wherein 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.

[0011] In a fourth 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. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0013] FIG1 is a flow chart of an embodiment of a grid construction method according to the present disclosure;

[0014] FIG2 is a flow chart of another embodiment of a grid construction method according to the present disclosure;

[0015] FIG3 is a schematic structural diagram of an embodiment of a grid construction device according to the present disclosure;

[0016] FIG4 is an exemplary system architecture in which the grid construction method according to an embodiment of the present disclosure may be applied;

[0017] FIG5 is a schematic diagram of a basic structure of an electronic device provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0019] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0020] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0021] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0022] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0023] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0024] The technical solutions of the embodiments of the present disclosure can be applied to various augmented reality scenarios, or to other application scenarios involving perspective functions.

[0025] In these application scenarios, when the perspective function is turned on, 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 called a grid in the embodiment of the present disclosure.

[0026] With the development of head-mounted devices and extended reality technology, more and more users want to use them in outdoor scenes for outdoor entertainment, such as real-life outdoor games. Many businesses also want to develop more extended reality effects for head-mounted devices, such as displaying virtual avatars in playgrounds. Therefore, there is a demand for building environmental meshes in outdoor scenes.

[0027] However, due to the large scale of outdoor scenes, it may not be possible to construct the environmental mesh under the current perspective in real time like indoor scenes to meet perspective usage.

[0028] Based on this, the disclosed embodiments provide a grid construction solution that takes into account the poor depth accuracy of larger environments. Directly constructing a grid in this area would result in inaccurate depth due to the inaccurate depth. Therefore, using preset depth values ​​to construct a grid for these pixels can address the issue of depth inaccuracy and ensure the accuracy of the environmental grid construction; thus, the constructed grid can meet perspective requirements. Furthermore, this grid construction solution can be applied to grid construction based on outdoor scenes.

[0029] Please refer to Figure 1, which shows a process 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 Figure 1, the grid construction method includes the following steps:

[0030] Step 101: Obtain a depth image of the current scene captured by a head-mounted device.

[0031] In some embodiments, the head-mounted device includes a depth sensor, which can be used to acquire a depth image. The depth sensor is, for example, a TOF (Time of Flight) camera.

[0032] In some embodiments, the head-mounted device includes a binocular camera, which can acquire depth images based on binocular recognition.

[0033] In some embodiments, the current scene is an outdoor scene; in other embodiments, the current scene may also be a non-outdoor scene, but there are objects in the current scene whose depth is difficult to estimate.

[0034] Therefore, in some embodiments, 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.

[0035] Preset conditions include, for example, that the actual depth is difficult to predict, or that the actual depth is greater than or much greater than the preset depth.

[0036] The target object may be, for example, the sky, glass, or other objects whose depth is difficult to predict, which are not limited here.

[0037] In some embodiments, since the target pixel point is a pixel point corresponding to the target object, the target object needs to be detected first before the target pixel point can be determined.

[0038] Therefore, as an optional implementation, 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.

[0039] It is understandable that since the depth of the target object is difficult to predict, 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.

[0040] Therefore, as an optional implementation, 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.

[0041] In some embodiments, the environment image may be a color image, a grayscale image, etc., which is different from a depth image.

[0042] In some embodiments, both the environmental image and the depth image can be acquired through a binocular camera; in other embodiments, the environmental image and the depth image can be acquired using different cameras; for example, the depth image is acquired through a binocular camera, and the environmental image is acquired through a grayscale camera; or the environmental image is acquired through a color camera, etc.

[0043] In some embodiments, the environmental image includes pixel points that correspond one-to-one with the pixel points of the depth image. Then, there is a pixel correspondence relationship between the grayscale image and the depth image. Therefore, the target object detection result of the depth image can be determined based on the target object detection result of the environmental image.

[0044] In some embodiments, the target object detection result is determined based on the environment image and a pre-trained neural network model.

[0045] The training data set corresponding to the pre-trained neural network model may 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 target objects.

[0046] In some embodiments, during the training process of a neural network model, some implementation methods that can improve the accuracy of the neural network model can be adopted. For example, a preset number of training times can be set, and model training is considered complete after reaching the training number. Another example is a preset test data set, and the accuracy of the trained neural network model is tested using the test data set. If the accuracy does not meet the standard, the model training can be continued or improved.

[0047] In some embodiments, 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 corresponding to the target object.

[0048] Therefore, based on the target object detection result of the environment image, the target pixel point corresponding to the target object in the depth image can be determined.

[0049] Step 102: construct a mesh corresponding to the current scene based on the depth image.

[0050] In the process of constructing the grid, the depth value of the target pixel point adopts the preset depth value.

[0051] In some embodiments, since the depth value of a target pixel cannot be predicted, the depth value of the target pixel needs to be applied to the process of constructing the current corresponding grid based on the depth image. Therefore, in the embodiments of the present disclosure, a preset depth value is used as the depth value of the target pixel.

[0052] In some embodiments, the preset depth value may be different in combination with different target objects. For example, for an object such as the sky, the preset depth value may be 10, or other preset maximum depths.

[0053] In some embodiments, 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.

[0054] In some embodiments, to avoid errors when subsequently constructing a grid based on the depth image, the depth values ​​corresponding to the target pixels in the depth image can be marked as invalid depth values. In subsequent applications, these invalid depth values ​​can be replaced with preset depth values. Invalid depth values, for example, -1.

[0055] As an optional implementation, 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.

[0056] In this embodiment, the pixel coordinates of each pixel are first converted to spherical coordinates based on the depth value and pixel coordinates of each pixel; then, a grid corresponding to the current scene is constructed based on the spherical coordinates of each pixel. It will be understood that the depth value of the target pixel is a preset depth value.

[0057] In some embodiments, assuming that the coordinate system of the grid is I and the coordinate system of the image is S, R IS ,t IS Represents the conversion of pixel points in the image coordinate system to the grid coordinate system, using π -1 (·) represents the projection of the pixel coordinates of the image onto the normalized coordinates (z=1) in the image coordinate system. Then, based on the depth image, the points in the depth map are projected onto the grid coordinate system, which can be expressed as: P I =R IS π -1 (px)D(px)+t IS ,if D(px)>0.

[0058] Furthermore, D(px) is used to represent the depth value of the pixel coordinate on the depth image. For the target pixel, that is, the pixel with D(px) = -1 (that is, the depth of the invalid pixel is set to -1 in the depth image), the corresponding conversion relationship is: P I =R IS normalize(π -1 (px))*10. Here, the default depth is 10, and normalize(·) represents the normalization of the vector.

[0059] Furthermore, the points in the grid coordinate system are converted to spherical coordinates: Among them, |P I |Representation vector P I The mold length.

[0060] In some embodiments, a mesh corresponding to the current scene can be constructed based on the spherical coordinates of each pixel point. However, the constructed mesh may be distorted. Therefore, to address the mesh distortion issue, in embodiments of the present disclosure, an environment mesh can be constructed using spherical sampling.

[0061] As an optional implementation, 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 sphere 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.

[0062] In some embodiments, assuming P * represents the i-th sampling point on the spherical grid, then its spherical coordinates can be expressed as:

[0063] Furthermore, determining the grid coordinates of the plurality of sampling points includes: determining a rendering inverse depth corresponding to each of the plurality of sampling points; wherein the rendering inverse depth is a depth value determined based on a depth value of a neighboring sampling point; and determining the grid coordinates corresponding to each of the plurality of sampling points based on the rendering inverse depth corresponding to each of the plurality of sampling points and the spherical coordinates corresponding to each of the plurality of sampling points.

[0064] In some embodiments, for each sampling point, it is necessary to use the rendering inverse depth to re-solve the grid coordinates. The rendering inverse depth needs to be determined in combination with the depth values ​​of the neighboring sampling points of the sampling point.

[0065] In some embodiments, for a sampling point among a plurality of sampling points, an average inverse depth value and a weighted influence value of the sampling point are determined based on the depth values ​​of the sampling points of its neighborhood; and a rendered inverse depth of the sampling point is determined based on the average inverse depth value of the sampling point, the weighted influence value of the sampling point, the initial rendered inverse depth, and a preset energy relationship.

[0066] In some embodiments, the neighborhood sampling points are, for example, neighborhood sampling points within a range of 3*3.

[0067] In some embodiments, the preset energy relationship is used to characterize an energy equation constructed based on a spherical grid.

[0068] In some embodiments, 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.

[0069] In some embodiments, if the pixel corresponding to the neighborhood sampling point is the target pixel, 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 is the depth value in the depth image.

[0070] In some embodiments, the weight influence value is determined based on the number of neighboring sampling points of the sampling point.

[0071] In some embodiments, the average inverse depth value is expressed as: The weighted influence value is expressed as: w *= count. Count represents the number of neighboring sampling points for this point. If the depth of a neighboring sampling point is greater than 0.1 (the inverse of the preset depth), the original depth value is used; otherwise, 0.1 is used. That is, the depth value of the neighboring sampling points corresponding to the target pixel is 0.1, while the depth values ​​of the neighboring sampling points corresponding to other pixels are the original depth values.

[0072] In some embodiments, 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, ρ i Indicates the rendering inverse depth, which can correspond to an initial value and then be optimized based on the initial value.

[0073] Based on the preset energy relationship, the energy is optimized, and the rendering inverse depth corresponding to the optimized energy is the final rendering inverse depth.

[0074] Therefore, 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 be finally obtained.

[0075] In some embodiments, when optimizing energy, optimization conditions may be preset, for example: the difference between the energies determined twice before and after 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.

[0076] Further referring to FIG2 , the present disclosure provides a flowchart for a 3D modeling application. In FIG2 , sky segmentation is first performed based on a grayscale image, followed by sky depth culling based on a depth map corresponding to the grayscale image. Mesh projection and solving are then performed based on the results of sky culling, ultimately completing the rendering of the 3D model. Sky depth culling essentially involves identifying the depth values ​​of the sky portion so that these depth values ​​can be specially processed during mesh projection and solving to avoid affecting the final mesh construction result.

[0077] Thus, a mesh corresponding to the current scene is constructed based on the depth image of the current scene captured by the head-mounted device. This depth image includes target objects whose actual depths meet preset conditions in the current scene. Directly constructing a mesh for these objects would result in inaccurate depths. Therefore, using preset depth values ​​to construct a mesh for these pixels can address the issue of depth inaccuracy and ensure the accuracy of the environmental mesh. This ensures that the constructed mesh can meet the requirements of perspective use.

[0078] Furthermore, in the process of constructing a mesh based on a depth image, neighborhood sampling is used to solve the mesh distortion problem, so that the resulting mesh is smoother and the effect of the final rendering model is improved.

[0079] Further referring to FIG3 , as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a grid construction device. The device embodiment corresponds to the grid construction method embodiment shown in FIG1 , and the device can be specifically applied to various electronic devices.

[0080] As shown in Figure 3, the grid construction device of this embodiment includes: an acquisition unit 301, used to obtain 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 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 the preset depth value.

[0081] In some embodiments, the construction unit 302 is further configured to determine a target object detection result corresponding to the depth image; and determine the target pixel point according to the target object detection result.

[0082] In some embodiments, the construction unit 302 is further configured to obtain an environment image corresponding to the depth image; the environment image includes pixel points corresponding one-to-one to pixel points of the depth image; and determine the target object detection result based on the environment image.

[0083] In some embodiments, 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.

[0084] In some embodiments, 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 sphere 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.

[0085] In some embodiments, 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 neighboring 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.

[0086] In some embodiments, the construction unit 302 is further configured to: determine, for a sampling point among the multiple sampling points, an average inverse depth value and a weighted influence value of the sampling point based on the depth values ​​of the sampling point's neighboring sampling points; and determine a rendered inverse depth of the sampling point based on the average inverse depth value of the sampling point, the weighted influence value of the sampling point, the initial rendered inverse depth, and a preset energy relationship.

[0087] In some embodiments, if the pixel point corresponding to the neighborhood sampling point is the target pixel point, the depth value of the neighborhood sampling point is the reciprocal of the preset depth value.

[0088] In some embodiments, the weight influence value is determined based on the number of neighboring sampling points of the sampling point.

[0089] Please refer to FIG. 4 , which shows an exemplary system architecture to which the grid construction method according to an embodiment of the present disclosure can be applied.

[0090] As shown in Figure 4, the system architecture may include terminal devices 401, 402, and 403, a network 404, and a server 405. The network 404 may be used as a medium to provide a communication link between the terminal devices 401, 402, and 403 and the server 405. The network 404 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0091] Terminal devices 401, 402, and 403 can interact with server 405 via network 404 to receive or send messages, etc. Various client applications can be installed on terminal devices 401, 402, and 403, such as web browser applications, search applications, and news and information applications. The client applications in terminal devices 401, 402, and 403 can receive user instructions and perform corresponding functions based on the user instructions, such as adding corresponding information to the message based on the user's instructions.

[0092] Terminal devices 401, 402, and 403 can be hardware or software. When terminal devices 401, 402, and 403 are hardware, they can be various electronic devices with display screens and support 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 Group Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) players, laptop computers, and desktop computers, etc. When terminal devices 401, 402, and 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.

[0093] 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 through various means according to the information acquisition requests, and sending relevant data of the display information to the terminal devices 401, 402, and 403.

[0094] It should be noted that the grid construction method provided in the embodiments 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. In addition, the grid construction method provided in the embodiments of the present disclosure can also be executed by the server 405, and accordingly, the grid construction device can be set in the server 405.

[0095] It should be understood that the number of terminal devices, networks, and servers in Figure 4 is merely illustrative and any number of terminal devices, networks, and servers may be provided as required.

[0096] Reference is now made to FIG5 , which illustrates a schematic diagram of the structure of an electronic device (e.g., the terminal device or server in FIG4 ) suitable for implementing an 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), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device illustrated in FIG5 is merely an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.

[0097] As shown in Figure 5, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can 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. 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.

[0098] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 5 illustrates an electronic device having various devices, it should be understood that not all of the illustrated devices are required to be implemented or present. More or fewer devices may alternatively be implemented or present.

[0099] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0100] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0101] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). 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., an ad hoc peer-to-peer network), as well as any currently known or later developed network.

[0102] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0103] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains a depth image of the current scene captured 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.

[0104] 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 stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0105] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0106] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. The name of a unit does not, in some cases, limit the unit itself. For example, 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."

[0107] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0108] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0109] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0110] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0111] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A grid construction method, applied to a head mounted device, the grid construction method comprising: Acquire a depth image of the current scene captured by the head mounted device, the depth image including a target pixel point, and an actual depth of a target object corresponding to the target pixel point meets a preset condition in the current scene; as well as A grid corresponding to the current scene is constructed based on the depth image, wherein, in the process of constructing the grid, the depth value of the target pixel point adopts a preset depth value.

2. The grid construction method according to claim 1, further comprising: Determine a target object detection result corresponding to the depth image; as well as The target pixel point is determined according to the target object detection result.

3. The grid construction method according to claim 2, wherein the step of determining the target object detection result corresponding to the depth image comprises: Acquire an environment image corresponding to the depth image, the environment image comprising pixel points that correspond one-to-one to pixel points of the depth image; as well as Based on the environment image, the target object detection result is determined.

4. The grid construction method according to claim 3, wherein: The environment image includes a color image or a grayscale image.

5. The grid construction method according to claim 3 or 4, wherein: The step of determining the target object detection result based on the environment image includes: The target object detection result is determined based on the environment image and a pre-trained neural network model.

6. The grid construction method according to any one of claims 1 to 5, wherein: For different target objects, different preset depth values ​​are used.

7. The grid construction method according to claim 1, wherein: The step of constructing a grid corresponding to the current scene based on the depth image 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 Based on the spherical coordinates of each pixel point, a grid corresponding to the current scene is constructed.

8. The grid construction method according to claim 7, wherein: The step of constructing a grid corresponding to the current scene based on the spherical coordinates of each pixel point includes: Based on the spherical coordinates of each pixel point, generating a spherical surface corresponding to each pixel point; Perform sampling based on the spherical surface to determine grid coordinates of a plurality of sampling points; and A grid corresponding to the current scene is constructed based on the grid coordinates of the multiple sampling points.

9. The grid construction method according to claim 8, wherein: The determining the grid coordinates of the plurality of sampling points comprises: Determine rendering inverse depths corresponding to the plurality of sampling points respectively, wherein the rendering inverse depths are depth values ​​determined based on depth values ​​of neighboring sampling points; and 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 grid coordinates respectively corresponding to the plurality of sampling points are determined.

10. The grid construction method according to claim 9, further comprising: For a sampling point among the plurality of sampling points, determining an average inverse depth value of the sampling point and a weight influence value of the sampling point based on depth values ​​of neighboring sampling points of the sampling point; as well as The rendering inverse depth of the sampling point is determined based on the average inverse depth value of the sampling point, the weighted influence value of the sampling point, the initial rendering inverse depth and a preset energy relationship.

11. The grid construction method according to claim 8 or 9, wherein: The pixel point corresponding to the neighborhood sampling point is the target pixel point, and the depth value of the neighborhood sampling point is the reciprocal of the preset depth value.

12. The grid construction method according to claim 8 or 9, wherein: The pixel point corresponding to the neighborhood sampling point is not the target pixel point, and the depth value of the neighborhood sampling point is the depth value corresponding to the pixel point of the neighborhood sampling point in the depth image.

13. The grid construction method according to claim 10, wherein: The weight influence value is determined based on the number of neighborhood sampling points of the sampling point.

14. A grid construction device, applied to a head mounted device, the grid construction device comprising: An acquisition unit, used to acquire a depth image of the current scene collected by the head mounted device; The depth image includes A target pixel point, the actual depth of the target object corresponding to the target pixel point meets a preset condition in the current scene; as well as A construction unit is 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 point adopts a preset depth value.

15. An electronic device, comprising: one or more processors; as well as a storage device for storing 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 method according to any one of claims 1 to 13.

16. A computer readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 13.

17. A computer program product, comprising a computer program carried on a non-transitory computer readable medium, wherein the computer program implements the method according to any one of claims 1 to 13 when executed by a processor.

Citation Information

Patent Citations

  • Target detection method and related model training method, device and apparatus

    CN111476087A

  • Blending virtual environments with situated physical reality

    CN113711165A

  • Binocular stereo panoramic image generation method and device, equipment and storage medium

    CN114742703A

  • Dynamic interaction method and device

    CN114860070A

  • Visualizing Depth

    US20110109617A1