Grid construction method and device and electronic equipment

By acquiring depth images in the headset and using preset depth values ​​and spherical coordinate conversion technology, the problem of inaccuracy of grid construction in outdoor scenes is solved, and the accurate construction and perspective use of environmental grids are achieved.

CN119273859APending Publication Date: 2025-01-07BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310822219.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-05
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The depth accuracy of building an environmental grid in outdoor scenes is poor, resulting in inaccurate grid construction and cannot meet the needs of perspective use.

Method used

By obtaining the depth image collected by the headset, the depth value of the target pixel point is detected. If the depth value cannot be predicted, the preset depth value is used for grid construction, and combined with spherical coordinate conversion and neighborhood sampling technology can solve the depth inaccuracy and grid distortion problem.

Benefits of technology

It realizes the accurate construction of environmental mesh, meets the needs of perspective use, and improves the accuracy of mesh construction and the smoothness of rendering models in outdoor scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273859A_ABST
    Figure CN119273859A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a grid construction method and device and electronic equipment. The grid construction method is applied to the head-mounted device, and the grid construction method comprises the following steps: obtaining a depth image of a current scene collected by the head-mounted device; constructing a grid corresponding to the current scene based on the depth image; wherein the depth image comprises a target pixel point, and the actual depth of a target object corresponding to the target pixel point meets a preset condition in the current scene; in the process of constructing the grid, the depth value of the target pixel point adopts a preset depth value. According to the method, accurate construction of the environment grid can be realized, so that the constructed grid can meet perspective use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] 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. Summary of the invention

[0003] This disclosure section is provided to introduce concepts in a brief form, which 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.

[0004] The embodiments of the present disclosure provide a grid construction method, device and electronic device, which can realize accurate construction of an environmental grid, so that the constructed grid can meet the requirements of perspective use.

[0005] 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 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.

[0006] 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 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.

[0007] 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, 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.

[0008] 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.

[0009] The mesh construction method, device and electronic device provided by the embodiments of the present disclosure construct a mesh corresponding to the current scene based on the depth image of the current scene collected by the head-mounted device; wherein the depth image includes a 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 pixels can solve the problem caused by the inaccuracy of the depth and ensure the accuracy of the environment mesh construction; thereby, the constructed mesh can meet the requirements of perspective use. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0011] Figure 1 is a flow chart of an embodiment of a grid construction method according to the present disclosure;

[0012] Figure 2 is a flow chart of another embodiment of a grid construction method according to the present disclosure;

[0013] Figure 3 is a structural schematic diagram of an embodiment of a grid construction device according to the present disclosure;

[0014] Figure 4 is an exemplary system architecture to which the grid construction method of an embodiment of the present disclosure may be applied;

[0015] Figure 5 It is a schematic diagram of the basic structure of an electronic device provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0016] Embodiments of the present disclosure will be described in more detail below 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 being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0017] 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.

[0018] The term "including" and its variations used herein are open inclusions, 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"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0019] It should be noted that the concepts such as "first" and "second" mentioned in the present 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.

[0020] It should be noted that the modifications of "one" and "plurality" 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, it should be understood as "one or more".

[0021] 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.

[0022] The technical solution of the disclosed embodiment can be applied to various extended reality scenarios, or to other application scenarios involving perspective functions.

[0023] 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 referred to as a grid in the embodiment of the present disclosure.

[0024] 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.

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

[0026] Based on this, 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.

[0027] Please refer to Figure 1 , which shows the process of an embodiment of the grid construction method according to the present disclosure. The grid construction method can be applied to terminal devices. Figure 1 The grid construction method shown includes the following steps:

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

[0029] 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.

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

[0031] 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 whose depth is difficult to estimate in the current scene.

[0032] 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.

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

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

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

[0036] 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.

[0037] 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 is also poor.

[0038] 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.

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

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

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

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

[0043] Among them, 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.

[0044] In some embodiments, during the training process of the neural network model, 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.

[0045] 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 point corresponding to the target object.

[0046] Thus, 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.

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

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

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

[0050] 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 farthest depths.

[0051] 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.

[0052] In some embodiments, in order 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, and these invalid depth values ​​can be replaced with preset depth values ​​in subsequent applications. Invalid depth values, for example -1.

[0053] 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.

[0054] In this implementation, 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.

[0055] In some embodiments, assuming that the coordinate system of the grid is I and the coordinate system of the image is S, R IS ,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 = IS π-1 (px)D(px)+ IS ,fD(px)>0.

[0056] 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: I = IS normalize(π -1 (px))*10. Here, the preset depth value is 10, and normalize(·) represents normalizing the vector.

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

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

[0059] 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 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.

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

[0061] Further, 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.

[0062] 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 neighborhood sampling points of the sampling point.

[0063] In some embodiments, for a sampling point among multiple sampling points, 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.

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

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

[0066] 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.

[0067] 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 uses the depth value in the depth image.

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

[0069] In some embodiments, the average inverse depth value is expressed as: The weight influence value is expressed as: w i = count. 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 is 0.1, while for the neighborhood sampling points corresponding to other pixels, their depth values ​​use the original depth values.

[0070] 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.

[0071] Based on the preset energy relationship, the energy is optimized, and the rendering inverse depth corresponding to the optimized energy is the finally determined rendering inverse depth.

[0072] 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.

[0073] In some embodiments, when optimizing energy, 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.

[0074] Further references Figure 2 The present invention provides a three-dimensional modeling application flow chart. Figure 2 In the process, 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 3D model is completed. Among them, 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.

[0075] Thus, 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 pixels can solve the problem caused by the inaccuracy of the depth and ensure the accuracy of the environment mesh construction; thus, the constructed mesh can meet the perspective use.

[0076] Furthermore, in the process of constructing a mesh based on a depth image, 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.

[0077] Further references Figure 3 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a grid construction device. Figure 1 Corresponding to the grid construction method embodiment shown, the device can be specifically applied to various electronic devices.

[0078] like Figure 3As shown, 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 pixels 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.

[0079] 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.

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

[0081] 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.

[0082] 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 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.

[0083] 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 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.

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

[0085] 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.

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

[0087] Please refer to Figure 4 , Figure 4 An exemplary system architecture is shown in which the grid construction method according to an embodiment of the present disclosure can be applied.

[0088] like Figure 4 As shown, the system architecture may include terminal devices 401, 402, 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, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0089] 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, such as web browser applications, search applications, and news information applications, can be installed on the terminal devices 401, 402, 403. 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 corresponding information to the information according to the user instructions.

[0090] Terminal devices 401, 402, 403 can be hardware or software. 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 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, 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.

[0091] 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.

[0092] It should be noted that 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. In addition, 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.

[0093] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0094] Reference below Figure 5 , which shows an electronic device (eg, Figure 4 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook 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. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0095] like Figure 5 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processor, 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. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. 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.

[0096] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 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 Figure 5An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0097] 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 contains 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 ROM502. 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 executed.

[0098] It should be noted that 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. 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 containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, 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.

[0099] In some embodiments, the client and the 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). 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 future developed network.

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

[0101] 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 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.

[0102] 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. 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).

[0103] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, 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. It should also be noted that in some implementations as replacements, 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. It should also be noted that 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.

[0104] 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. For example, 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".

[0105] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, 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 chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0106] In the context of the present disclosure, 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.

[0107] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. 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 a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0108] 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 are 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.

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

Claims

1. A grid construction method, characterized in that: Applied to a head mounted device, the grid construction method includes: Acquire a depth image of the current scene collected by the head mounted device; 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; 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, characterized in that: The grid construction method further comprises: Determine a target object detection result corresponding to the depth image; The target pixel point is determined according to the target object detection result.

3. The grid construction method according to claim 2, characterized in that: The determining of the target object detection result corresponding to the depth image includes: Acquire 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; Based on the environment image, the target object detection result is determined.

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

5. The grid construction method according to claim 4, characterized in that: 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; Sampling is performed based on the spherical surface to determine grid coordinates of a plurality of sampling points; A grid corresponding to the current scene is constructed based on the grid coordinates of the multiple sampling points.

6. The grid construction method according to claim 5, characterized in that: The determining the grid coordinates of the plurality of sampling points comprises: Determine the rendering inverse depths corresponding to the plurality of 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 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.

7. The grid construction method according to claim 6, characterized in that: The grid construction method further comprises: For a sampling point among the plurality of sampling points, determining an average inverse depth value and a weighted influence value of the sampling point based on depth values ​​of neighboring sampling points of the sampling point; 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 the preset energy relationship.

8. The grid construction method according to claim 6 or 7, characterized in that: 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.

9. The grid construction method according to claim 7, characterized in that: The weight influence value is determined based on the number of neighborhood sampling points of the sampling point.

10. A grid construction device, characterized in that: Applied to a head mounted device, the grid construction device comprises: An acquisition unit, configured to acquire a depth image of a current scene captured by a head mounted device; the depth image includes 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; 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.

11. An electronic device, characterized in that: include: one or more processors; 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 9.

12. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.