Space calibration adjustment method and device, equipment, medium and program

By automatically detecting and recommending adjustable lines in XR scenes, users can adjust the calibration lines, solving the problem of low accuracy of calibration results in the existing technology and achieving more efficient spatial calibration and a better user experience.

CN118691680APending Publication Date: 2024-09-24BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310301057.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-24
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing spatial calibration methods have low accuracy in calibration results in extended reality (XR) scenarios, resulting in poor user experience.

Method used

By acquiring images corresponding to the space, adjustable lines are automatically detected and recommended. Users can adjust the calibration lines based on these lines to achieve more accurate spatial calibration. The method includes a straight line detection algorithm, which determines straight lines that are close to the user or match the type as adjustable lines, and display them differently in the perspective image, and make adjustments after the user confirms.

Benefits of technology

It improves the accuracy and user experience of spatial calibration and provides an intelligent and convenient adjustment method to ensure users obtain satisfactory calibration results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691680A
    Figure CN118691680A
Patent Text Reader

Abstract

The embodiment of the invention provides a space calibration adjustment method and device, equipment, a medium and a program, and the method comprises the steps: obtaining an image corresponding to a space, and determining an adjustable line in the space according to the image corresponding to the space; according to the space calibration result of the space and the position of the adjustable line, the adjustable line and the calibration line in the space are displayed in the perspective image corresponding to the space, and the adjustable line is displayed different from the calibration line in the space; and receiving an adjustment confirmation instruction for the adjustable line, and adjusting the calibration line in the space according to the adjustment confirmation instruction and the adjustable line. In the method, the adjustable line in the space is automatically detected through the image corresponding to the space, the adjustable line is recommended to the user, and the calibration line in the space is adjusted by using the adjustable line based on the user operation, so that the adjustment of the calibration line in the space is realized, the space calibration result satisfied by the user is obtained, the adjustment mode is intelligent and convenient, and the user experience is improved. And better experience is brought to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence, and in particular, to a method, device, equipment, medium and program for adjusting spatial calibration. Background Art

[0002] Extended Reality (XR) refers to the combination of reality and virtuality through computers to create a virtual environment for human-computer interaction. XR is also a general term for multiple technologies such as Virtual Reality (VR), Augmented Reality (AR) and Mixed Reality (MR). By integrating the visual interaction technologies of the three, it brings the experiencer an "immersive feeling" of seamless transition between the virtual world and the real world.

[0003] In the MR scene, the room capture method is used to calibrate the positions of objects such as the floor, walls, ceiling, and furniture in the room. Specifically, the user calibrates the objects through the rays emitted by the handle of the MR device. The calibration results can be applied to virtual house viewing, virtual furniture placement, virtual decoration, etc., and can also be applied to games. For example, according to the position of the furniture in the calibration results, a virtual sphere can be catapulted onto the furniture and collided back.

[0004] However, the calibration results of existing calibration methods have low accuracy. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus, device, medium and program for adjusting space calibration, which automatically detects adjustable lines in the space through images corresponding to the space, recommends the adjustable lines to the user, and uses the adjustable lines to adjust the calibration lines in the space based on the user operation, thereby adjusting the calibration lines in the space and obtaining a space calibration result that satisfies the user. The adjustment method is intelligent and convenient, giving the user a better experience.

[0006] In a first aspect, an embodiment of the present application provides a method for adjusting a spatial calibration, the method comprising:

[0007] Acquire an image corresponding to the space, and determine an adjustable line in the space according to the image corresponding to the space;

[0008] According to the spatial calibration result of the space and the position of the adjustable line, the adjustable line and the calibration line in the space are displayed in the perspective image corresponding to the space, and the adjustable line is displayed separately from the calibration line in the space;

[0009] receiving an adjustment confirmation instruction for the adjustable line;

[0010] The calibration line in the space is adjusted according to the adjustment confirmation instruction and the adjustable line.

[0011] In some embodiments, determining the adjustable line in the space according to the image corresponding to the space includes:

[0012] Using a straight line detection algorithm, detect straight lines in the space from an image corresponding to the space;

[0013] The adjustable line is determined from straight lines in the space.

[0014] In some embodiments, determining the adjustable line from the straight lines in the space comprises:

[0015] According to the distance between the straight line in the space and the user, one or more straight lines closer to the user are determined as the adjustable lines.

[0016] In some embodiments, determining the adjustable line from the straight lines in the space comprises:

[0017] The adjustable line is determined according to the type of the straight line in the space and the type of the preset adjustable line.

[0018] In some embodiments, adjusting the calibration line in the space according to the adjustment confirmation instruction and the adjustable line includes:

[0019] In response to the adjustment confirmation instruction, determining two calibration surfaces adjacent to the adjustable line according to the position of the adjustable line and the spatial calibration result;

[0020] The adjustable line is connected to two calibration surfaces adjacent to the adjustable line.

[0021] In some embodiments, determining two calibration surfaces adjacent to the adjustable line according to the position of the adjustable line and the spatial calibration result includes:

[0022] Determining the distance between the adjustable line and each calibration surface in the space according to the position of the adjustable line and the position of the calibration surface in the space;

[0023] Determining two calibration surfaces adjacent to the adjustable line according to the distances between the adjustable line and each calibration surface in the space;

[0024] The step of connecting the adjustable line to two calibration surfaces adjacent to the adjustable line comprises:

[0025] When two calibration surfaces adjacent to the adjustable line have an intersection line, the intersection line of the two calibration surfaces adjacent to the adjustable line is deleted, and the adjustable line is connected to the two calibration surfaces adjacent to the adjustable line;

[0026] When there is no intersection line between two adjacent calibration surfaces of the adjustable line, the adjustable line is connected to the two adjacent calibration surfaces of the adjustable line.

[0027] In some embodiments, determining the distance between the adjustable line and each calibration surface in the space according to the position of the adjustable line and the position of the calibration surface in the space includes:

[0028] Calculating a first distance between the center of each calibration surface and the adjustable line according to the position of the adjustable line and the position of the calibration surface in the space;

[0029] The step of determining two calibration surfaces adjacent to the adjustable line according to the distances between the adjustable line and each calibration surface in the space includes:

[0030] It is determined that the two calibration surfaces with the shortest first distance are two calibration surfaces adjacent to the adjustable line.

[0031] In some embodiments, determining two calibration surfaces adjacent to the adjustable line according to the position of the adjustable line and the spatial calibration result includes:

[0032] Determining, from the space, a candidate calibration line parallel to the adjustable line according to the position of the adjustable line and the positions of each calibration line in the space;

[0033] determining a distance between the adjustable line and the candidate calibration line according to the position of the adjustable line and the position of the candidate calibration line;

[0034] Determine a target candidate calibration line that is closest to the adjustable line from the candidate calibration lines;

[0035] When the distance between the adjustable line and the target candidate calibration line is less than or equal to a preset distance, determining two target calibration surfaces that use the target candidate calibration line as an intersection line as two calibration surfaces adjacent to the adjustable line;

[0036] The step of connecting the adjustable line to two calibration surfaces adjacent to the adjustable line comprises:

[0037] The target candidate calibration line is deleted, and the adjustable line is connected to the two target calibration surfaces.

[0038] In some embodiments, it also includes:

[0039] When the distance between the adjustable line and the target candidate calibration line is greater than the preset distance, determining that the adjustable line is a calibration line of missing mark;

[0040] According to the distance between the adjustable line and each calibration surface in the space, two calibration surfaces adjacent to the adjustable line are determined.

[0041] In some embodiments, the receiving of an adjustment confirmation instruction for the adjustable line includes:

[0042] receiving a first operation on the adjustable line;

[0043] Alternatively, an adjustment option is displayed in the perspective image corresponding to the space, the adjustment option being used to select whether to use the adjustable line for adjustment;

[0044] Receive a confirmation adjustment operation of the user on the adjustment option.

[0045] In some embodiments, it also includes:

[0046] receiving an instruction to cancel adjustment of the adjustable line;

[0047] The adjustable line is hidden or the next adjustable line is displayed according to the adjustment cancel instruction.

[0048] In some embodiments, the receiving of an instruction to cancel adjustment of the adjustable line includes:

[0049] receiving a second operation on the adjustable line;

[0050] Alternatively, an adjustment option is displayed in the perspective image corresponding to the space, the adjustment option being used to select whether to use the adjustable line for adjustment;

[0051] A user's denial of the adjustment operation on the adjustment option is received.

[0052] In some embodiments, before receiving the adjustment confirmation instruction for the adjustable line, the method further includes:

[0053] receiving a user's adjustment operation on a display position of the adjustable line in the perspective image corresponding to the space;

[0054] The adjusted position of the adjustable line is determined according to the adjusted display position of the adjustable line in the perspective image corresponding to the space.

[0055] On the other hand, an embodiment of the present application provides a spatial calibration adjustment device, the device comprising:

[0056] An acquisition module, used for acquiring an image corresponding to a space, and determining an adjustable line in the space according to the image corresponding to the space;

[0057] A display module, configured to display the adjustable line and the calibration line in the space in a perspective image corresponding to the space according to the spatial calibration result of the space and the position of the adjustable line, wherein the adjustable line is displayed separately from the calibration line in the space;

[0058] A receiving module, used for receiving an adjustment confirmation instruction for the adjustable line;

[0059] An adjustment module is used to adjust the calibration line in the space according to the adjustment confirmation instruction and the adjustable line.

[0060] On the other hand, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute any of the methods described above.

[0061] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program enables a computer to execute any of the methods described above.

[0062] On the other hand, an embodiment of the present application provides a computer program product, including a computer program, which implements any of the methods described above when executed by a processor.

[0063] The adjustment method, device, equipment, medium and program of space calibration provided by the embodiment of the present application include: obtaining an image corresponding to the space, determining the adjustable line in the space according to the image corresponding to the space; displaying the adjustable line and the calibration line in the space in the perspective image corresponding to the space according to the spatial calibration result of the space and the position of the adjustable line, and the adjustable line is displayed differently from the calibration line in the space; receiving an adjustment confirmation instruction for the adjustable line, and adjusting the calibration line in the space according to the adjustment confirmation instruction and the adjustable line. In this method, the adjustable line in the space is automatically detected through the image corresponding to the space, and the adjustable line is recommended to the user. Based on the user operation, the adjustable line is used to adjust the calibration line in the space, thereby realizing the adjustment of the calibration line in the space, obtaining a space calibration result that satisfies the user, and the adjustment method is intelligent and convenient, bringing a better experience to the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0065] Figure 1 It is a schematic diagram of the process of MR application;

[0066] Figure 2 Schematic diagram of the process for room calibration;

[0067] Figure 3 is a flow chart of the adjustment method of space calibration provided in Example 1 of the present application;

[0068] Figure 4 A schematic diagram of the adjustment process of the wall corner line in the space;

[0069] Figure 5 A flowchart of a method for adjusting spatial calibration provided in Embodiment 2 of the present application;

[0070] Figure 6 A flowchart of a method for adjusting spatial calibration provided in Embodiment 3 of the present application;

[0071] Figure 7 A schematic diagram of the structure of the adjustment device for space calibration provided in the fourth embodiment of the present application;

[0072] Figure 8 A schematic diagram of the structure of an electronic device provided in Example 5 of the present application. DETAILED DESCRIPTION

[0073] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0074] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0075] In order to facilitate understanding of the embodiments of the present application, before describing each embodiment of the present application, some concepts involved in all embodiments of the present application are first appropriately explained, as follows:

[0076] The spatial calibration adjustment method provided in the embodiment of the present application can be applied to XR devices, including but not limited to VR devices, AR devices and MR devices.

[0077] VR: Technology for creating and experiencing a virtual world. It generates a virtual environment by computation. It is a multi-source information (the virtual reality mentioned in this article includes at least visual perception, and can also include auditory perception, tactile perception, motion perception, and even taste perception, olfactory perception, etc.). It realizes the simulation of the fusion and interactive three-dimensional dynamic vision and entity behavior of the virtual environment, immersing users in a simulated virtual reality environment, and realizing applications in various virtual environments such as maps, games, videos, education, medical care, simulation, collaborative training, sales, assisted manufacturing, maintenance and repair.

[0078] AR: AR scenery refers to a simulated scenery in which at least one virtual object is superimposed on a physical scenery or a representation thereof. For example, an electronic system may have an opaque display and at least one imaging sensor for capturing images or videos of a physical scenery, which are representations of the physical scenery. The system combines the image or video with the virtual object and displays the combination on the opaque display. An individual uses the system to indirectly view the physical scenery via an image or video of the physical scenery and observes the virtual object superimposed on the physical scenery. When the system uses one or more image sensors to capture images of the physical scenery and uses those images to present the AR scenery on an opaque display, the displayed image is referred to as video transmission. Alternatively, an electronic system for displaying an AR scenery may have a transparent or translucent display through which an individual can directly view the physical scenery. The system may display virtual objects on a transparent or translucent display so that an individual uses the system to observe virtual objects superimposed on the physical scenery. As another example, the system may include a projection system that projects virtual objects into a physical scenery. Virtual objects can be projected, for example, on a physical surface or as a hologram, so that individuals using the system observe virtual objects superimposed on a physical setting. Specifically, a technology that calculates the camera's posture parameters in the real world (or three-dimensional world, real world) in real time during the process of the camera capturing images, and adds virtual elements to the images captured by the camera based on the camera posture parameters. Virtual elements include, but are not limited to: images, videos, and three-dimensional models. The goal of AR technology is to integrate the virtual world into the real world on the screen for interaction.

[0079] MR: By presenting virtual scene information in the real scene, an interactive feedback information loop is established between the real world, the virtual world and the user to enhance the realism of the user experience. For example, computer-created sensory input (e.g., virtual objects) is integrated with sensory input from the physical scene or its representation in the simulated scene. In some MR scenes, the computer-created sensory input can adapt to changes in sensory input from the physical scene. In addition, some electronic systems used to present MR scenes can monitor the orientation and / or position relative to the physical scene so that virtual objects can interact with real objects (i.e., physical elements from the physical scene or their representations). For example, the system can monitor movement so that virtual plants appear stationary relative to physical buildings.

[0080] Virtual reality devices refer to terminals that achieve virtual reality effects, which can usually be provided in the form of glasses, helmet-mounted displays (Head Mount Display, abbreviated as HMD), and contact lenses to achieve visual perception and other forms of perception. Of course, the form of virtual reality devices is not limited to this, and can be further miniaturized or enlarged according to actual needs.

[0081] Optionally, the virtual reality device (ie, XR device) described in the embodiments of the present application may include but is not limited to the following types:

[0082] 1) Mobile virtual reality devices support the configuration of mobile terminals (such as smart phones) in various ways (such as head-mounted displays with dedicated card slots). Through wired or wireless connection with the mobile terminal, the mobile terminal performs relevant calculations of virtual reality functions and outputs data to the mobile virtual reality device, such as watching virtual reality videos through the mobile terminal's APP.

[0083] 2) All-in-one virtual reality devices have a processor for performing relevant calculations of virtual functions, and thus have independent virtual reality input and output functions. They do not need to be connected to a PC or mobile terminal and have a high degree of freedom in use.

[0084] 3) Computer-based virtual reality (PCVR) devices use the PC to perform relevant calculations and data output for virtual reality functions. External computer-based virtual reality devices use the data output by the PC to achieve virtual reality effects.

[0085] Taking the MR scene as an example, an application scenario of the spatial calibration adjustment method provided by the present application is described. Figure 1 The flowchart of MR application is shown in Figure 2. Figure 1As shown, the user opens the MR application through the MR device and plays a splash animation to help the user understand the basic functions of the MR application. Determine whether the room has been calibrated. If it has not been calibrated, call the room calibration function. If it has not been calibrated, call the software development kit (SDK) identification interface to identify whether the current room has been calibrated. If it is recognized that the current room has been calibrated, call the calibration result and jump back to the MR application. If it is recognized that the current room has not been calibrated, create a new room, call the room calibration function, calibrate the new room to obtain the calibration result, and jump back to the MR application according to the calibration result of the new room.

[0086] After jumping back to the MR application, the user can experience the content of the MR application according to the calibration results. When experiencing the content of the MR application, if the user finds that the calibration results are inaccurate, a secondary calibration can be performed, that is, the room calibration can be recalibrated. After experiencing the MR content, the content of the MR application is set as a tool or resource library, and the process ends.

[0087] Figure 2 The process diagram for room calibration is as follows: Figure 2 As shown, after starting the calibration, first determine whether the calibration has been performed. If it has not been calibrated, the calibration is performed in the following order: calibrate the floor, calibrate the walls, calibrate the ceiling, and calibrate the furniture. If it has been calibrated, identify whether the current room has been calibrated. If it is identified that the current room has been calibrated, determine whether to reset the space. In the room calibration process, the space includes the space composed of the floor, walls, and ceiling, and does not include the furniture in the room. Resetting the space means resetting or recalibrating the calibration results of the floor, walls, and ceiling. If the user chooses to reset the space, a new room is created, and the floor, walls, ceiling, and furniture are calibrated in turn according to the above calibration order. If the user chooses not to reset the space, determine whether to add or delete furniture. If the user chooses to add or delete furniture, enter the furniture calibration module and recalibrate the furniture. If the user chooses not to add or delete furniture, the calibration is completed.

[0088] Optionally, when calibrating the furniture in the space, the furniture in the space is divided into cube-type furniture and rectagle-type furniture. Cube-type furniture refers to furniture whose calibration body is a three-dimensional shape. The three-dimensional calibration body can be a cube, a cuboid or a parallelepiped, etc., while the calibration body of rectagle-type furniture is a plane shape, such as a rectangle, a square or a rhombus, etc.

[0089] Cube-type furniture can be furniture and buildings in a space, such as tables, sofas, chairs, cabinets, etc. Rectangle-type furniture is doors, windows, etc. Cube-type objects can be calibrated by ray or probe.

[0090] When calibrating walls, ceilings, and furniture, you can return to the previous calibration module and recalibrate. For example, when calibrating the ceiling, if you find that the results of the wall or floor calibration are not satisfactory, you can return to the calibrate floor module or calibrate wall module and recalibrate.

[0091] Figure 2 In the calibration process shown, after calibrating the wall, you can enter the fine-tuning mode and use the adjustment method of space calibration provided in the embodiment of the present application to adjust the calibration result. It is understandable that the user can also enter the fine-tuning mode after calibrating the ceiling, or enter the fine-tuning mode after calibrating the furniture, and use the adjustment method of space calibration provided in the embodiment of the present application to adjust the calibration result.

[0092] Optionally, the spatial calibration adjustment method provided in the embodiment of the present application can also be applied to Figure 1 The calibration results are adjusted in the content stage of experiencing the MR application. If the user finds that the calibration results of some objects are inaccurate during the content stage of experiencing the MR application, the user can enter the adjustment mode and adjust the calibration results using the spatial calibration adjustment method provided in the embodiment of the present application.

[0093] It should be noted that the method of the embodiment of the present application does not limit the calibration method of the spatial calibration result. Regardless of the calibration method used, the adjustment method provided in the embodiment of the present application can be used for fine-tuning.

[0094] Figure 3 1 is a flow chart of a method for adjusting spatial calibration provided in the first embodiment of the present application, which is applied in an XR device. Figure 1 As shown, the method provided in this embodiment includes the following steps.

[0095] S101. Acquire an image corresponding to the space, and determine an adjustable line in the space according to the image corresponding to the space.

[0096] The image corresponding to the space is the image of the real environment in which the space is located. The XR device collects the image corresponding to the space in real time through the head-mounted camera, and determines the adjustable line in the space based on the image corresponding to the space.

[0097] Exemplarily, a straight line detection algorithm is used to detect straight lines in the space from an image corresponding to the space, and the adjustable line is determined from the straight lines in the space.

[0098] Line detection is a classic underlying visual task. The embodiments of the present application can use any existing line detection algorithm to detect lines in space from images corresponding to the space. Commonly used line detection algorithms are divided into two categories: traditional algorithms and deep learning algorithms.

[0099] Traditional algorithms include but are not limited to: Hough transform algorithm and line segment detection (LSD). LSD is a "perceptual clustering" method that relies on carefully designed image features and detection strategies. Its accuracy and algorithm complexity are better than Hough line detection.

[0100] Deep learning algorithms include but are not limited to: Wireframe networks and line-Convolutional Neural Networks (LCNN).

[0101] Wireframe is a widely used detection algorithm. Wireframe is a line detection network proposed with the dataset. The idea is to detect the two endpoints of a line (junction) and segment the line pixels. The junction path needs to regress the position of the endpoint (junction center decoders) and the line direction and confidence information corresponding to the endpoint (junction branch decoders), while the line path is to determine whether each point is a line pixel.

[0102] The XR device may use one or more images corresponding to the space to perform straight line detection, and detect that there may be one or more straight lines in the space, and the adjustable line may be determined from the detected straight lines.

[0103] The detected straight lines in the space may include corner lines, top corner lines, base lines, furniture edges, door and window edges, etc. Among them, the corner line refers to the straight line between two walls, the base line refers to the straight line between the ground and the wall, and the top corner line refers to the straight line between the wall and the ceiling.

[0104] Optionally, the adjustable lines may be determined from the straight lines in the space in the following ways, and the number of the adjustable lines may be one or more.

[0105] Method 1: According to the distance between the straight line in the space and the user, one or more straight lines closer to the user are determined as adjustable lines.

[0106] The distances of the straight lines in the space from the user are different. In this method, only the straight lines that are closer to the user can be adjusted.

[0107] For example, only the line closest to the user is adjusted, or three lines closest to the user are selected for adjustment, or a line whose distance to the user is less than a preset distance threshold is selected as an adjustable line.

[0108] Method 2: determining the adjustable line according to the type of the straight line in the space and the type of the preset adjustable line.

[0109] Exemplarily, the types of straight lines in the space include five types: wall corner lines, top corner lines, baseboards, furniture edge lines, and door and window edge lines. The types of adjustable lines can be one or more, and accordingly, only the straight lines that match the types of adjustable lines are adjusted.

[0110] For example, when the type of the adjustable line is a corner line, a straight line of the corner line type is determined from the straight lines in the space, and the corner line is used as the adjustable line.

[0111] Method three: determining the adjustable line according to the type of the straight line in the space and the distance between the straight line in the space and the user.

[0112] This method is a combination of method 1 and method 2. For example, first, based on the type of the straight line in the space, a straight line that matches the type of the preset adjustable line is determined from the straight lines in the space as a candidate straight line, and then the adjustable line is determined from the candidate straight lines based on the distance between each candidate straight line and the user.

[0113] Method 4: Determine the adjustable line according to the direction of the straight line in space and / or the length of the straight line.

[0114] For example, a straight line perpendicular to the ground is determined to be an adjustable line, or a straight line parallel to the ground is determined to be an adjustable line, or a straight line with a length greater than a preset length is determined to be an adjustable line, or a straight line perpendicular to the ground and with a length greater than a preset length is determined to be an adjustable line.

[0115] As the user moves or the head-mounted XR device rotates, the viewing angle of the camera of the XR device keeps changing, and the image corresponding to the space captured by the camera keeps changing. Correspondingly, the straight lines detected in the space also change.

[0116] S102. Display the adjustable lines and the calibration lines in the space in a perspective image corresponding to the space according to the spatial calibration result of the space and the positions of the adjustable lines, wherein the adjustable lines are displayed separately from the calibration lines in the space.

[0117] In this embodiment, the video see-through (VST) function of the XR device can be used to display the calibration space corresponding to the adjustable line and space calibration result to the user. VST technology collects real-time views of the surrounding environment through the camera of the XR device, and then combines it with computer technology to present it on an opaque display, giving people a feeling that the human eye can directly see the real world around through the head display, so it is also called the perspective function, which increases the user's perception of the surrounding environment.

[0118] The XR device performs VST processing on the image corresponding to the space to obtain the perspective image corresponding to the space. The image corresponding to the space captured by the camera is a 2D image, and the perspective image corresponding to the space obtained after VST processing is a 3D image. The perspective image corresponding to the space is displayed through the display of the XR device, and the user can intuitively see the real environment through the display. For head-mounted XR devices, users can accurately see the real environment of the outside world without removing the head-mounted XR device, which is convenient for users to interact with the real environment of the outside world.

[0119] The spatial calibration results may include position information of the ground, walls, ceiling and furniture in the space. The position information may be the 3D coordinates of the ground, walls, ceiling and furniture. Based on the 3D coordinates of the ground, walls, ceiling and furniture, the positions of the calibration lines of the ground, walls, ceiling and furniture in the corresponding perspective image of the space are determined.

[0120] Likewise, the position of the adjustable line refers to the 3D coordinates of the adjustable line in space, and the position of the adjustable line in the perspective image corresponding to the space is determined according to the 3D coordinates of the adjustable line.

[0121] According to the position of the adjustable line in the perspective image corresponding to the space and the position of the calibration lines of the ground, walls, ceiling and furniture in the space in the perspective image corresponding to the space, the adjustable line and the calibration lines in the space are displayed in the perspective image corresponding to the space. The calibration lines in the space include calibration lines of one or more objects in the ground, walls, ceiling and furniture.

[0122] The adjustable lines are displayed separately from the calibration lines in the space so that the user can distinguish the adjustable lines from the calibration lines in the space.

[0123] In one implementation, the styles of the adjustable line and the calibration line in the space are different, and the style of the line includes the color, thickness or type of the line.

[0124] For example, the color of the adjustable line is yellow, and the color of the calibration line in the space is white. Alternatively, the adjustable line is a dotted line, and the calibration line in the space is a solid line. Alternatively, the adjustable line is highlighted, and the calibration line in the space is displayed normally.

[0125] In another implementation, the adjustable line is displayed with special effects, while the demarcated line in the space is displayed without special effects. The adjustable line and the demarcated line in the space are distinguished by the special effects.

[0126] The special effect of the adjustable line may be an image or text, for example, an aperture surrounds the adjustable line. Optionally, a prompt message may be displayed to remind the user that the straight line is an adjustable line.

[0127] The special effect of the adjustable line may also be that the adjustable line itself has a special changing state, such as reciprocating motion between two positions or periodic enlargement and reduction, etc. The embodiments of the present application are not limited to this.

[0128] In this embodiment, the adjustable lines in the space are automatically detected by the image corresponding to the space, and the adjustable lines are recommended to the user, so that the user can use the adjustable lines to adjust the calibration lines in the space. The adjustable lines in the space are automatically detected according to the image corresponding to the space, making the adjustment more intelligent.

[0129] S103: Receive an adjustment confirmation instruction for the adjustable line.

[0130] The adjustment confirmation instruction is used to confirm the use of the adjustable line to adjust the calibration line in the space. The adjustment confirmation instruction can be input by the user through any one of gesture, voice, handheld device control or gaze control, where the handheld device can be a handle or glove of the XR device.

[0131] In one embodiment, the adjustment confirmation instruction is a first operation on the adjustable line, and the first operation can be a click operation, a double-click operation, a long press operation, or a hover operation on the adjustable line.

[0132] Taking the hover operation as an example, the user controls the cursor of the interactive ray to move to the adjustable line through the handle. After the cursor stays on the adjustable line for a preset period of time, an adjustment option is displayed. The adjustment option is used to select whether to use the adjustable line for adjustment, and the user's selection operation for the adjustment option is received.

[0133] In another manner, an adjustment option is displayed in the perspective image corresponding to the space, and the adjustment option is used to select whether to use the adjustable line for adjustment, and a confirmation adjustment operation of the user on the adjustment option is received.

[0134] In this method, while the adjustable line is displayed in the perspective image corresponding to the space, the adjustment options are displayed in the perspective image corresponding to the space. The adjustment options can be displayed around the adjustable line.

[0135] The adjustment options may include a confirmation option and a denial option. The user's selection operation of the confirmation option is the confirmation adjustment operation, and the user's selection operation of the denial option is the denial adjustment operation. Exemplarily, the confirmation option is a "yes" option, and the denial option is a "no" option. If the user selects "yes", the adjustable line is used for adjustment, and if the user selects "no", it is determined that the adjustable line is not used for adjustment.

[0136] After the user chooses to deny the adjustment operation, the adjustable line is hidden or the next adjustable line is displayed according to the denied adjustment operation. Hiding the adjustable line means not using the adjustable line to adjust the calibration line in the space. If there are other adjustable lines, when the user chooses not to use the current adjustable line, the next adjustable line is displayed to continue adjusting the calibration line in the space.

[0137] Optionally, after step S102, the user inputs an adjustment cancel instruction for the adjustable line, the adjustment cancel instruction for the adjustable line is received, and the adjustable line is hidden or the next adjustable line is displayed according to the adjustment cancel instruction.

[0138] Exemplarily, the adjustment cancel instruction is a second operation on the adjustable line, and the second operation is different from the first operation on the adjustable line, for example, the first operation is a single-click operation, and the second operation is a double-click operation, or the first operation is a double-click operation, and the second operation is a long-press operation. Alternatively, the adjustment cancel instruction is a denial of the adjustment operation on the adjustment option.

[0139] Optionally, before step S103, the display position of the adjustable line in the perspective image corresponding to the space may also be adjusted. Specifically, an adjustment operation of the user on the display position of the adjustable line in the perspective image corresponding to the space is received, and the adjusted position of the adjustable line is determined according to the adjusted display position of the adjustable line in the perspective image corresponding to the space.

[0140] The display position adjustment operation may be a drag operation on the adjustable line, and the user completes the adjustment of the display position of the adjustable line by dragging the adjustable line to the desired position. After the display position of the adjustable line is adjusted, it is also necessary to determine the adjusted position of the adjustable line according to the adjusted display position, where the adjusted position of the adjustable line refers to the position of the adjustable line in the real space, and the position of the adjustable line in the real space is updated to the spatial calibration result.

[0141] S104, adjusting the calibration line in the space according to the adjustment confirmation instruction and the adjustable line.

[0142] Optionally, in response to the adjustment confirmation instruction, two calibration surfaces adjacent to the adjustable line are determined according to the position of the adjustable line and the spatial calibration result, and the adjustable line is connected to the two calibration surfaces adjacent to the adjustable line.

[0143] Multiple calibration lines in the space are connected to form multiple calibration surfaces, and the calibration surfaces are connected to form a closed space. For example, taking a wall as an example, four calibration lines of the wall are usually connected to form a calibration surface of the wall, and the calibration surfaces of each wall in the space are connected to form a closed space.

[0144] The adjustable lines displayed in the perspective image corresponding to the space are independent straight lines. It is necessary to connect the adjustable lines with the existing calibration surfaces in the space to re-form a closed space.

[0145] In this embodiment, the user only needs to perform a confirmation operation on the adjustable line, and the device automatically adjusts the calibration line in the space according to the adjustment confirmation instruction of the adjustable line and the adjustable line, and the user operation steps are simple.

[0146] In actual scenarios, due to the errors introduced by the calibration method, there may be the following two scenarios where the spatial calibration results need to be adjusted: Scenario 1: the calibration position of the calibration line in the space is inaccurate, and the position of the calibration line needs to be adjusted; Scenario 2: the calibration line in the space is missed, for example, a corner line is missed, and the missed calibration line needs to be added in the space.

[0147] Accordingly, in this embodiment, the adjustable line may be a replacement line of a certain calibration line that already exists in the space, or may be a calibration line that is missed in the space, that is, the adjustable line is not calibrated in the space.

[0148] For scenario one, when the adjustable line is a replacement line for a calibration line that already exists in the space, the calibration line that already exists in the space is replaced by the adjustable line, and the replaced calibration line is deleted, and the two calibration surfaces connected by the replaced calibration line are used as two adjacent calibration surfaces of the adjustable line, wherein the two calibration surfaces connected by the replaced calibration line are the two calibration surfaces that intersect the calibration line to be replaced, and the adjustable line is connected to the two calibration surfaces connected by the replaced calibration line.

[0149] For scenario 2, when the adjustable line is a calibration line that is missing in the space, two calibration surfaces adjacent to the adjustable line are determined according to the position of the adjustable line, and the adjustable line is connected to the two adjacent calibration surfaces.

[0150] Figure 4 This is a schematic diagram of the adjustment process of the wall corner line in the space, such as Figure 4 As shown in the figure, after the floor and walls in the room are calibrated, Figure 4 (a) shows the closed space. At this time, the user can choose to enter the fine-tuning mode.

[0151] After entering the fine-tuning mode, the image corresponding to the space is obtained, the adjustable line in the space is determined according to the image corresponding to the space, and the adjustable line is displayed in the perspective image corresponding to the space, such as Figure 4 As shown in (b), the perspective image corresponding to the space also displays the calibration lines in the space.

[0152] After receiving the user's confirmation adjustment instruction for the adjustable line, Figure 4The target calibration line shown in (b) is deleted and replaced by the adjustable line, that is, the two calibration surfaces connecting the adjustable line and the target calibration line are connected to form Figure 4 (c) The closed space shown.

[0153] Figure 4 Taking the adjustment of the corner line in the space as an example, it can be understood that the adjustment operations for other marking lines in the space are similar, and such operations will not be given one by one.

[0154] Optionally, there may be some independent calibration lines in the space, which are not connected with adjacent calibration lines to form a merged space, but are located on a certain calibration surface. For such calibration lines, when it is determined that the adjustable line is a replacement line for a calibration line that already exists in the space, the adjustable line can be used to replace the adjustment line, and there is no need to connect the adjustable line to other calibration surfaces.

[0155] In this embodiment, an image corresponding to the space is obtained, and the adjustable lines in the space are determined according to the image corresponding to the space; the adjustable lines and the calibration lines in the space are displayed in the perspective image corresponding to the space according to the spatial calibration result of the space and the position of the adjustable lines, and the adjustable lines are displayed differently from the calibration lines in the space; an adjustment confirmation instruction for the adjustable lines is received, and the calibration lines in the space are adjusted according to the adjustment confirmation instruction and the adjustable lines. In this method, the adjustable lines in the space are automatically detected through the image corresponding to the space, and the adjustable lines are recommended to the user. Based on the user operation, the adjustable lines are used to adjust the calibration lines in the space, thereby realizing the adjustment of the calibration lines in the space, obtaining a spatial calibration result that satisfies the user, and the adjustment method is intelligent and convenient, giving the user a better experience.

[0156] On the basis of the first embodiment, the second embodiment of the present application provides a method for adjusting a spatial calibration, which is used to explain step S104 in the first embodiment in detail. Figure 5 This is a flow chart of the method for adjusting the spatial calibration provided in the second embodiment of the present application, such as Figure 5 As shown, the method provided in this embodiment includes the following steps.

[0157] S201 . In response to an adjustment confirmation instruction, determine the distance between the adjustable line and each calibration surface in the space according to the position of the adjustable line and the position of the calibration surface in the space.

[0158] After the user chooses to use the adjustable line to adjust the calibration line in the space, it is necessary to determine two calibration surfaces adjacent to the adjustable line from the calibration surfaces in the space based on the position of the adjustable line and the position of the calibration surface in the space, and then determine the two calibration surfaces adjacent to the adjustable line based on the distance between the adjustable line and each calibration surface in the space.

[0159] The distance between the adjustable line and the calibration surface in the space may be a first distance between the center of the calibration surface and the adjustable line, and the XR device calculates the first distance between the center of each calibration surface and the adjustable line.

[0160] The first distance between the center of the calibration surface and the adjustable line may be a perpendicular distance from the center of the calibration surface to the adjustable line, or may be a distance between the center of the calibration surface and the center of the adjustable line.

[0161] S202: Determine two calibration surfaces adjacent to the adjustable line according to the distances between the adjustable line and each calibration surface in the space.

[0162] The distances between the adjustable line and each calibration surface in the space are compared. Optionally, two calibration surfaces with the shortest distances can be selected from each calibration surface as two calibration surfaces adjacent to the adjustable line.

[0163] S203: Determine whether two adjacent calibration surfaces of the adjustable line have an intersection line.

[0164] This step is to determine whether the adjustable line is a replacement line of a certain calibration line that already exists in the space, or a calibration line that is missing. When the two calibration surfaces adjacent to the adjustable line have an intersection line, it means that the adjustable line is a replacement line of a certain calibration line that already exists in the space, and the intersection line is the replacement line, and then step S204 is executed. When the two calibration surfaces adjacent to the adjustable line do not have an intersection line, it means that the adjustable line is a calibration line that is missing in the space, and then step S205 is executed.

[0165] S204: Delete the intersection line of the two calibration surfaces adjacent to the adjustable line, and connect the adjustable line with the two calibration surfaces adjacent to the adjustable line.

[0166] This step is applicable to scenario 1, that is, the calibration position of the calibration line in the space is inaccurate, and the inaccurate calibration line is replaced by the adjustable line, and the inaccurate calibration line is the intersection line of two calibration surfaces adjacent to the adjustable line.

[0167] S205: Connect the adjustable line to two calibration surfaces adjacent to the adjustable line.

[0168] This step is applicable to scenario 2, that is, the calibration line in the space is missing. In this case, you only need to connect the missing calibration line with two adjacent calibration surfaces to form a closed space.

[0169] In this embodiment, the distance between the adjustable line and each calibration surface in the space is determined, and two calibration surfaces adjacent to the adjustable line are determined according to the distance between the adjustable line and each calibration surface in the space, and the adjustable line is connected to the two calibration surfaces adjacent to the adjustable line to complete the adjustment of the calibration line in the space. The two calibration surfaces adjacent to the adjustable line can be accurately identified by the distance between the adjustable line and each calibration surface in the space, thereby improving the accuracy of adjusting the calibration line in the space.

[0170] Based on the first embodiment, the third embodiment of the present application provides a method for adjusting a spatial calibration, which is used to explain step S104 in the first embodiment in detail. Figure 6 This is a flow chart of the method for adjusting the spatial calibration provided in the third embodiment of the present application, such as Figure 6 As shown, the method provided in this embodiment includes the following steps.

[0171] S301 . In response to an adjustment confirmation instruction, determine a candidate calibration line parallel to the adjustable line in the space according to the position of the adjustable line and the positions of each calibration line in the space.

[0172] After the user chooses to use the adjustable line to adjust the calibration line in the space, a candidate calibration line parallel to the adjustable line is determined according to the position of the adjustable line and the positions of each calibration line in the space.

[0173] In this embodiment, when the included angle between the adjustable line and the calibration line is less than or equal to a preset angle, it can be considered that the adjustable line and the calibration line are parallel. The preset angle is, for example, 5 degrees or 10 degrees.

[0174] This is because both the straight line detection method and the spatial calibration will inevitably introduce errors. For the same straight line in space, the position of the adjustable line detected by the straight line detection method and the position of the calibration line obtained by the spatial calibration are unlikely to be exactly the same, that is, the angle between the two is unlikely to be 0. Therefore, in this embodiment, as long as the angle between the adjustable line and the calibration line is less than or equal to the preset angle, the adjustable line can be considered to be parallel to the calibration line. The preset angle can be set according to the accuracy requirements of the calibration line position in the application scenario.

[0175] S302: Determine the distance between the adjustable line and the candidate calibration line according to the position of the adjustable line and the position of the candidate calibration line.

[0176] S303: Determine, from the candidate calibration lines, a target candidate calibration line that is closest to the adjustable line.

[0177] There may be one or more candidate calibration lines determined in the previous step. When there is only one candidate calibration line, the only candidate calibration line is used as the target candidate calibration line. When there are multiple candidate calibration lines, the distances between each candidate calibration line and the adjustable line are compared, and the candidate calibration line with the closest distance is selected as the target candidate calibration line.

[0178] S304: Determine whether the distance between the adjustable line and the target candidate calibration line is less than or equal to a preset distance.

[0179] This step is to determine whether the adjustable line is a replacement line for the target candidate calibration line that already exists in the space. When the distance between the adjustable line and the target candidate calibration line is less than or equal to the preset distance, it means that the two correspond to the same line in reality, and the adjustable line is a replacement line for the target candidate calibration line that already exists in the space, and step S305 is executed. When the distance between the adjustable line and the target candidate calibration line is greater than the preset distance, it means that the adjustable line is not a replacement line for the target candidate calibration line that already exists in the space, and the adjustable line is a calibration line that is missing, and step S306 is executed.

[0180] S305 , determining that two target calibration surfaces that use the target candidate calibration line as an intersection line are two calibration surfaces adjacent to the adjustable line, deleting the target candidate calibration line, and connecting the adjustable line to the two target calibration surfaces.

[0181] This step is applicable to scenario 1, that is, the calibration position of the target candidate calibration line is inaccurate, and the target candidate calibration line is replaced by the adjustable line.

[0182] S306: Determine the adjustable line as a calibration line that is missing a mark, and determine two calibration surfaces adjacent to the adjustable line according to the distance between the adjustable line and each calibration surface in the space.

[0183] When the adjustable line is a calibration line that is missing a mark, the distance between the adjustable line and each calibration surface in the space is determined according to the position of the adjustable line and the position of each calibration surface in the space. According to the distance between the adjustable line and each calibration surface in the space, two calibration surfaces adjacent to the adjustable line are determined. For the specific determination method, refer to the relevant description of steps S201 and S202 in Example 2.

[0184] S307 , connecting the adjustable line and two calibration surfaces adjacent to the adjustable line.

[0185] In this embodiment, a candidate calibration line parallel to the adjustable line is determined from the space, and a target candidate calibration line that is closest to the adjustable line is determined from the candidate calibration lines. According to the distance between the adjustable line and the target candidate calibration line, it is determined whether the target candidate calibration line is a replacement line for the adjustable line. If the target candidate calibration line is a replacement line for the adjustable line, two target calibration surfaces that use the target candidate calibration line as an intersection line are determined to be two calibration surfaces adjacent to the adjustable line. If the target candidate calibration line is not a replacement line for the adjustable line, the distance between the adjustable line and each calibration surface in the space is used to determine the two calibration surfaces adjacent to the adjustable line. This method can accurately identify the two calibration surfaces adjacent to the adjustable line, thereby improving the accuracy of adjusting the calibration line in the space.

[0186] In the schemes of Embodiment 2 and Embodiment 3, after the user chooses to use the adjustable line, the two calibration surfaces adjacent to the adjustable line are automatically determined based on the position of the adjustable line and the position of the calibration line and calibration surface in space, and the adjustable line is connected to the two adjacent calibration surfaces. This method can automatically connect the adjustable line with the adjacent calibration surfaces.

[0187] Optionally, in other embodiments of the present application, the user can also manually connect the adjustable line with two adjacent calibration surfaces. After the adjustable line and the calibration line in the space are displayed in the perspective image corresponding to the space, the user can determine the two calibration surfaces adjacent to the adjustable line according to the position of the adjustable line, and then manually connect the adjustable line with the two adjacent calibration surfaces. If there is an intersection line between the two calibration surfaces adjacent to the adjustable line, the user can manually delete the intersection line, or, after the user connects the adjustable line with the two adjacent calibration surfaces, the intersection line is automatically deleted.

[0188] In order to facilitate better implementation of the spatial calibration adjustment method of the embodiment of the present application, the embodiment of the present application also provides a spatial calibration adjustment device. Figure 7 A schematic diagram of the structure of the adjustment device for space calibration provided in the fourth embodiment of the present application, such as Figure 7 As shown, the spatial calibration adjustment device 100 may include:

[0189] An acquisition module 11 is used to acquire an image corresponding to a space, and determine an adjustable line in the space according to the image corresponding to the space;

[0190] A display module 12, configured to display the adjustable line and the calibration line in the space in a perspective image corresponding to the space according to the spatial calibration result of the space and the position of the adjustable line, wherein the adjustable line is displayed separately from the calibration line in the space;

[0191] A receiving module 13, configured to receive an adjustment confirmation instruction for the adjustable line;

[0192] The adjustment module 14 is used to adjust the calibration line in the space according to the adjustment confirmation instruction and the adjustable line.

[0193] In some embodiments, the acquisition module 11 is specifically used for:

[0194] Using a straight line detection algorithm, detect straight lines in the space from an image corresponding to the space;

[0195] The adjustable line is determined from straight lines in the space.

[0196] In some embodiments, the acquisition module 11 is specifically used for:

[0197] According to the distance between the straight line in the space and the user, one or more straight lines closer to the user are determined as the adjustable lines.

[0198] In some embodiments, the acquisition module 11 is specifically used for:

[0199] The adjustable line is determined according to the type of the straight line in the space and the type of the preset adjustable line.

[0200] In some embodiments, the adjustment module 14 is specifically used to:

[0201] In response to the adjustment confirmation instruction, determining two calibration surfaces adjacent to the adjustable line according to the position of the adjustable line and the spatial calibration result;

[0202] The adjustable line is connected to two calibration surfaces adjacent to the adjustable line.

[0203] In some embodiments, the adjustment module 14 is specifically used to:

[0204] Determining the distance between the adjustable line and each calibration surface in the space according to the position of the adjustable line and the position of the calibration surface in the space;

[0205] Determining two calibration surfaces adjacent to the adjustable line according to the distances between the adjustable line and each calibration surface in the space;

[0206] When two calibration surfaces adjacent to the adjustable line have an intersection line, the intersection line of the two calibration surfaces adjacent to the adjustable line is deleted, and the adjustable line is connected to the two calibration surfaces adjacent to the adjustable line;

[0207] When there is no intersection line between two adjacent calibration surfaces of the adjustable line, the adjustable line is connected to the two adjacent calibration surfaces of the adjustable line.

[0208] In some embodiments, the adjustment module 14 is specifically used to:

[0209] Calculating a first distance between the center of each calibration surface and the adjustable line according to the position of the adjustable line and the position of the calibration surface in the space;

[0210] It is determined that the two calibration surfaces with the shortest first distance are two calibration surfaces adjacent to the adjustable line.

[0211] In some embodiments, the adjustment module 14 is specifically used to:

[0212] Determining, from the space, a candidate calibration line parallel to the adjustable line according to the position of the adjustable line and the positions of each calibration line in the space;

[0213] determining a distance between the adjustable line and the candidate calibration line according to the position of the adjustable line and the position of the candidate calibration line;

[0214] Determine a target candidate calibration line that is closest to the adjustable line from the candidate calibration lines;

[0215] When the distance between the adjustable line and the target candidate calibration line is less than or equal to a preset distance, determining two target calibration surfaces that use the target candidate calibration line as an intersection line as two calibration surfaces adjacent to the adjustable line;

[0216] The target candidate calibration line is deleted, and the adjustable line is connected to the two target calibration surfaces.

[0217] In some embodiments, the adjustment module 14 is further configured to:

[0218] When the distance between the adjustable line and the target candidate calibration line is greater than the preset distance, determining that the adjustable line is a calibration line of missing mark;

[0219] According to the distance between the adjustable line and each calibration surface in the space, two calibration surfaces adjacent to the adjustable line are determined.

[0220] In some embodiments, the receiving module 13 is specifically used for:

[0221] receiving a first operation on the adjustable line;

[0222] Alternatively, an adjustment option is displayed in the perspective image corresponding to the space, the adjustment option being used to select whether to use the adjustable line for adjustment;

[0223] Receive a confirmation adjustment operation of the user on the adjustment option.

[0224] In some embodiments, the receiving module 13 is further used for:

[0225] receiving an instruction to cancel adjustment of the adjustable line;

[0226] The adjustable line is hidden or the next adjustable line is displayed according to the adjustment cancel instruction.

[0227] In some embodiments, the receiving module 13 is specifically used for:

[0228] receiving a second operation on the adjustable line;

[0229] Alternatively, an adjustment option is displayed in the perspective image corresponding to the space, the adjustment option being used to select whether to use the adjustable line for adjustment;

[0230] A user's denial of the adjustment operation on the adjustment option is received.

[0231] In some embodiments, the display module 12 is further used for:

[0232] receiving a user's adjustment operation on a display position of the adjustable line in the perspective image corresponding to the space;

[0233] The adjusted position of the adjustable line is determined according to the adjusted display position of the adjustable line in the perspective image corresponding to the space.

[0234] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here.

[0235] The above describes the device 100 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.

[0236] An embodiment of the present application also provides an electronic device. Figure 8 A structural diagram of an electronic device provided in Embodiment 5 of the present application is shown as follows: Figure 8 As shown, the electronic device 200 may include:

[0237] The memory 21 and the processor 22, the memory 21 is used to store the computer program and transmit the program code to the processor 22. In other words, the processor 22 can call and run the computer program from the memory 21 to implement the method in the embodiment of the present application.

[0238] For example, the processor 22 may be configured to execute the above method embodiments according to instructions in the computer program.

[0239] In some embodiments of the present application, the processor 22 may include but is not limited to:

[0240] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0241] In some embodiments of the present application, the memory 21 includes but is not limited to:

[0242] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0243] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 21 and executed by the processor 22 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.

[0244] like Figure 8 As shown, the electronic device may further include: a transceiver 23 , which may be connected to the processor 22 or the memory 21 .

[0245] The processor 22 may control the transceiver 23 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 23 may include a transmitter and a receiver. The transceiver 23 may further include an antenna, and the number of antennas may be one or more.

[0246] Understandable, although Figure 8 Not shown, the electronic device 200 may also include a camera module, a wireless fidelity WIFI module, a positioning module, a Bluetooth module, a display, a controller, etc., which will not be repeated here.

[0247] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0248] The present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.

[0249] The present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the electronic device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the electronic device executes the corresponding process in the method for controlling the user position in the virtual scene in the embodiment of the present application, which will not be described in detail for the sake of brevity.

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

[0251] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

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

Claims

1. A method for adjusting spatial calibration, characterized in that: include: Acquire an image corresponding to the space, and determine an adjustable line in the space according to the image corresponding to the space; According to the spatial calibration result of the space and the position of the adjustable line, the adjustable line and the calibration line in the space are displayed in the perspective image corresponding to the space, and the adjustable line is displayed separately from the calibration line in the space; receiving an adjustment confirmation instruction for the adjustable line; The calibration line in the space is adjusted according to the adjustment confirmation instruction and the adjustable line.

2. The method according to claim 1, characterized in that The step of determining the adjustable line in the space according to the image corresponding to the space includes: Using a straight line detection algorithm, detect straight lines in the space from an image corresponding to the space; The adjustable line is determined from straight lines in the space.

3. The method according to claim 2, characterized in that The step of determining the adjustable line from the straight lines in the space comprises: According to the distance between the straight line in the space and the user, one or more straight lines closer to the user are determined as the adjustable lines.

4. The method according to claim 2, characterized in that: The step of determining the adjustable line from the straight lines in the space comprises: The adjustable line is determined according to the type of the straight line in the space and the type of the preset adjustable line.

5. The method according to claim 1, characterized in that The adjusting the calibration line in the space according to the adjustment confirmation instruction and the adjustable line includes: In response to the adjustment confirmation instruction, determining two calibration surfaces adjacent to the adjustable line according to the position of the adjustable line and the spatial calibration result; The adjustable line is connected to two calibration surfaces adjacent to the adjustable line.

6. The method according to claim 5, characterized in that The step of determining two calibration surfaces adjacent to the adjustable line according to the position of the adjustable line and the spatial calibration result includes: Determining the distance between the adjustable line and each calibration surface in the space according to the position of the adjustable line and the position of the calibration surface in the space; Determining two calibration surfaces adjacent to the adjustable line according to the distances between the adjustable line and each calibration surface in the space; The step of connecting the adjustable line to two calibration surfaces adjacent to the adjustable line comprises: When two calibration surfaces adjacent to the adjustable line have an intersection line, the intersection line of the two calibration surfaces adjacent to the adjustable line is deleted, and the adjustable line is connected to the two calibration surfaces adjacent to the adjustable line; When there is no intersection line between two adjacent calibration surfaces of the adjustable line, the adjustable line is connected to the two adjacent calibration surfaces of the adjustable line.

7. The method according to claim 6, characterized in that Determining the distance between the adjustable line and each calibration surface in the space according to the position of the adjustable line and the position of the calibration surface in the space includes: Calculating a first distance between the center of each calibration surface and the adjustable line according to the position of the adjustable line and the position of the calibration surface in the space; The step of determining two calibration surfaces adjacent to the adjustable line according to the distances between the adjustable line and each calibration surface in the space comprises: It is determined that the two calibration surfaces with the shortest first distance are two calibration surfaces adjacent to the adjustable line.

8. The method according to claim 5, characterized in that The step of determining two calibration surfaces adjacent to the adjustable line according to the position of the adjustable line and the spatial calibration result includes: Determining, from the space, a candidate calibration line parallel to the adjustable line according to the position of the adjustable line and the positions of each calibration line in the space; determining a distance between the adjustable line and the candidate calibration line according to the position of the adjustable line and the position of the candidate calibration line; Determine a target candidate calibration line that is closest to the adjustable line from the candidate calibration lines; When the distance between the adjustable line and the target candidate calibration line is less than or equal to a preset distance, determining two target calibration surfaces that use the target candidate calibration line as an intersection line as two calibration surfaces adjacent to the adjustable line; The step of connecting the adjustable line to two calibration surfaces adjacent to the adjustable line comprises: The target candidate calibration line is deleted, and the adjustable line is connected to the two target calibration surfaces.

9. The method according to claim 8, characterized in that Also includes: When the distance between the adjustable line and the target candidate calibration line is greater than the preset distance, determining that the adjustable line is a calibration line of missing mark; According to the distance between the adjustable line and each calibration surface in the space, two calibration surfaces adjacent to the adjustable line are determined.

10. The method according to any one of claims 1 to 9, characterized in that The receiving of the adjustment confirmation instruction for the adjustable line includes: receiving a first operation on the adjustable line; Alternatively, an adjustment option is displayed in the perspective image corresponding to the space, the adjustment option being used to select whether to use the adjustable line for adjustment; Receive a confirmation adjustment operation of the user on the adjustment option.

11. The method according to any one of claims 1 to 9, characterized in that Also includes: receiving an instruction to cancel adjustment of the adjustable line; The adjustable line is hidden or the next adjustable line is displayed according to the adjustment cancel instruction.

12. The method according to claim 11, characterized in that The receiving of an instruction to cancel adjustment of the adjustable line comprises: receiving a second operation on the adjustable line; Alternatively, an adjustment option is displayed in the perspective image corresponding to the space, the adjustment option being used to select whether to use the adjustable line for adjustment; A user's denial of the adjustment operation on the adjustment option is received.

13. The method according to any one of claims 1 to 9, characterized in that Before receiving the adjustment confirmation instruction for the adjustable line, the method further includes: receiving a user's adjustment operation on a display position of the adjustable line in the perspective image corresponding to the space; The adjusted position of the adjustable line is determined according to the adjusted display position of the adjustable line in the perspective image corresponding to the space.

14. A spatial calibration adjustment device, characterized in that: The device comprises: An acquisition module, used for acquiring an image corresponding to a space, and determining an adjustable line in the space according to the image corresponding to the space; A display module, configured to display the adjustable line and the calibration line in the space in a perspective image corresponding to the space according to the spatial calibration result of the space and the position of the adjustable line, wherein the adjustable line is displayed separately from the calibration line in the space; A receiving module, used for receiving an adjustment confirmation instruction for the adjustable line; An adjustment module is used to adjust the calibration line in the space according to the adjustment confirmation instruction and the adjustable line.

15. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 13.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.

Citation Information

Patent Citations

  • Line-of-sight positioning method, display device, electronic equipment and storage medium

    CN110705504A

  • Three-dimensional space marked line display method and device, electronic equipment and storage medium

    CN111968245A

  • Spatial Calibration System for Augmented Reality Display

    US20140063063A1

  • Self calibration for smartphone goggles

    US20170221270A1

  • Method and apparatus for calibrating external parameters of binocular camera

    WO2023283929A1