A controller positioning method, apparatus, device and storage medium

By locating the controller using a maximum of two frames of images and utilizing feature geometry and light source device state switching, the problem of insufficient positioning accuracy in existing algorithms is solved, thus improving the user experience.

CN115909115BActive Publication Date: 2026-02-27GEER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211362315.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-02
Publication Date
2026-02-27
Estimated Expiration
2042-11-02

AI Technical Summary

Technical Problem

Existing controller positioning algorithms are highly accurate at high refresh rates but are prone to accumulating errors and drifting after prolonged use. Visual algorithms lack positioning accuracy, resulting in a poor user experience.

Method used

The controller is positioned using a maximum of two frames of images. Initial positioning is achieved by using light spots with characteristic geometric shapes. If no characteristic geometric shape is found, the light source device state is switched to obtain a second image. Precise positioning is achieved based on the geometric transformation between the two images.

Benefits of technology

It reduces the risk of mismatch caused by misidentification, improves the accuracy of controller pose estimation, and enhances the user's virtual reality experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115909115B_ABST
    Figure CN115909115B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of virtual reality, and discloses a controller positioning method and device, equipment and a storage medium, which comprise the following steps: judging whether a geometric shape constituted by light spots in a first image contains a characteristic geometric shape; a light source device corresponding to the light spots constituting the characteristic geometric shape is a characteristic light source device arranged on the controller and capable of reflecting a pose of the controller; if yes, the controller is positioned according to the light spots constituting the characteristic geometric shape; if no, preset light source devices on the controller are switched to an off state, a second image corresponding to the first image is acquired, and the controller is positioned based on a transformation condition of geometric shapes constituted by light spots in the first image and the second image. According to the application, the controller can be accurately positioned by using at most two images, the risk of false matching caused by false recognition is reduced, the pose estimation accuracy of the controller is improved, and the virtual reality experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of virtual reality, and in particular to a controller positioning method and device, equipment and a storage medium. BACKGROUND

[0002] With the rapid development of VR / AR, the role of the controller in the VR device all-in-one is very important, and the accuracy and refresh frequency of the controller positioning tracking directly determine the user experience. The existing controller generally adopts a visual algorithm positioning and an inertial measurement unit (IMU) data fusion algorithm. On the one hand, the positioning result is limited by the camera shooting frequency (usually 30 fps, and the highest can reach 90 fps); on the other hand, the cost will also increase accordingly. The existing algorithm needs to fuse the IMU data to predict the controller pose, and the IMU with a high refresh frequency has high accuracy in a short time but accumulates errors, and appears drift after long time use, which needs the visual algorithm positioning to correct the IMU error, but the accuracy of the visual algorithm positioning cannot be guaranteed.

[0003] Therefore, how to improve the accuracy of the controller positioning is a technical problem to be solved by those skilled in the art. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a controller positioning method, device, equipment and storage medium, which can accurately position the controller through at most two images, reduce the risk of false matching caused by false recognition, improve the accuracy of the controller pose estimation, and improve the virtual reality experience of the user. The specific scheme is as follows:

[0005] The first aspect of the present application provides a controller positioning method, comprising:

[0006] determining whether the geometric shape constituted by the light spots in the first image contains a feature geometric shape; wherein the light source device corresponding to the light spot constituting the feature geometric shape is a feature light source device arranged on the controller and capable of reflecting the pose of the controller;

[0007] If yes, the controller is positioned according to the light spot constituting the feature geometric shape;

[0008] If no, the preset light source device on the controller is switched to an off state, a second image corresponding to the first image is acquired, and the controller is positioned based on the transformation of the geometric shape constituted by the light spots in the first image and the second image.

[0009] Optionally, the controller positioning method further comprises:

[0010] segmenting the controller to obtain an upper segment, a middle segment and a lower segment;

[0011] Three light source devices are arranged in the upper segment and the lower segment respectively, and four light source devices are arranged in the middle segment; wherein the three light source devices in the upper segment form a first triangle, the three light source devices in the lower segment form a second triangle, the first triangle and the second triangle are asymmetric, and the four light source devices in the middle segment are the feature light source devices and form a feature quadrilateral.

[0012] Optionally, the judging whether the geometric shape composed of the light spots in the first image contains the feature geometric shape comprises:

[0013] judging whether the geometric shape composed of the light spots in the first image contains the feature quadrilateral;

[0014] Correspondingly, if yes, the controller is positioned according to the light spots constituting the feature geometric shape, comprising:

[0015] If yes, a mapping relationship is established between the light spots constituting the feature quadrilateral and the feature light source devices in the middle segment to position the controller.

[0016] Optionally, before the preset light source device on the controller is switched to the off state, the method further comprises:

[0017] The inertial measurement unit data of the controller is used to determine the controller segment position of the first image, and the preset light source device is determined according to the controller segment position.

[0018] Optionally, the determining the preset light source device according to the controller segment position comprises:

[0019] If the controller segment position is the upper segment, the light source device at the vertex close to the middle segment in the first triangle is determined as the preset light source device;

[0020] If the controller segment position is the lower segment, the light source device at the vertex close to the middle segment in the second triangle is determined as the preset light source device.

[0021] Optionally, the positioning the controller based on the transformation of the geometric shapes composed of the light spots in the first image and the second image comprises:

[0022] A third triangle is constructed in the first image, and a fourth triangle is constructed in the second image; wherein the third triangle is composed of three light spots close to the middle segment in the first image, and the fourth triangle is composed of three light spots close to the middle segment in the second image;

[0023] determine, if yes, a mapping relationship between the light spots in the image and the light source devices in the controller according to the specific transformation relationship and a segment position of the controller, so as to position the controller.

[0024] Optionally, the determining whether the third triangle and the fourth triangle have the specific transformation relationship comprises:

[0025] The determining whether the third triangle and the fourth triangle have the specific transformation relationship is performed by detecting whether a corresponding included angle of the third triangle and the fourth triangle changes and / or by detecting whether a distance between corresponding vertices of the third triangle and the fourth triangle changes.

[0026] The second aspect of the present application provides a controller positioning device, comprising:

[0027] The feature determining module is configured to determine whether a geometric shape composed of the light spots in the first image contains a feature geometric shape; wherein the light source devices corresponding to the light spots constituting the feature geometric shape are feature light source devices arranged on the controller and capable of reflecting a pose of the controller.

[0028] The first positioning module is configured to, if yes, position the controller according to the light spots constituting the feature geometric shape.

[0029] The second positioning module is configured to, if no, switch a preset light source device on the controller to an off state, acquire a second image corresponding to the first image, and position the controller based on a transformation of geometric shapes composed of light spots in the first image and the second image.

[0030] The third aspect of the present application provides an electronic device, comprising a processor and a memory; wherein the memory is configured to store a computer program, the computer program is loaded and executed by the processor to implement the foregoing controller positioning method.

[0031] The fourth aspect of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores computer executable instructions, and the computer executable instructions are loaded and executed by a processor to implement the foregoing controller positioning method.

[0032] In the present application, firstly, it is judged whether the geometric shape constituted by the light spots in the first image contains a characteristic geometric shape; wherein the light source device corresponding to the light spot constituting the characteristic geometric shape is a characteristic light source device set on the controller and capable of reflecting the pose of the controller; if yes, the controller is positioned according to the light spot constituting the characteristic geometric shape; if no, the preset light source device on the controller is switched to an off state and a second image corresponding to the first image is acquired, and the controller is positioned based on the transformation of the geometric shape constituted by the light spots in the first image and the second image. The present application can accurately position the controller through at most two images, and in the case that the first image contains a characteristic geometric shape, positioning is realized according to the light spot constituting the characteristic geometric shape; in the case that the first image does not contain a characteristic geometric shape, a second image is acquired by controlling the light source device to turn on and off, and positioning is further realized based on the transformation of the geometric shape in the first image and the second image. The risk of false matching caused by false recognition is reduced, the accuracy of controller pose estimation is improved, and the virtual reality experience of users is improved. BRIEF DESCRIPTION OF DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only constitute the embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on the provided drawings.

[0034] Figure 1 A controller positioning method flow chart is provided for the present application;

[0035] Figure 2 A specific controller positioning method flow chart is provided for the present application;

[0036] Figure 3 A specific light band design result example diagram is provided for the present application;

[0037] Figure 4 A specific specific transformation relationship conversion example diagram is provided for the present application;

[0038] Figure 5 A specific specific transformation relationship conversion example diagram is provided for the present application;

[0039] Figure 6 A specific controller positioning method schematic diagram is provided for the present application;

[0040] Figure 7 A controller positioning device structure schematic diagram is provided for the present application;

[0041] Figure 8 A controller positioning electronic device structure diagram is provided for the present application. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0043] The existing controller generally adopts a visual algorithm positioning and an inertial measurement unit (IMU) data fusion algorithm. The existing algorithm needs to fuse IMU data to predict the controller pose, and the IMU with a high refresh frequency is highly accurate in a short time but accumulates errors, and appears to drift in long-term use, and needs to be corrected by the visual algorithm positioning to correct the IMU error, but the accuracy of the visual algorithm positioning cannot be guaranteed. In view of the above technical defects, the present application provides a controller positioning scheme, which can accurately position the controller through at most two images. In the case that the first image contains a characteristic geometric shape, the positioning is realized according to the light spots constituting the characteristic geometric shape; in the case that the first image does not contain a characteristic geometric shape, a second image is obtained by controlling the light source device to turn on and off, and the positioning is further realized based on the transformation of the geometric shape in the first image and the second image. The risk of false matching caused by false recognition is reduced, the accuracy of controller pose estimation is improved, and the virtual reality experience of the user is improved.

[0044] Figure 1 A controller positioning method flowchart is provided for the embodiments of the present application. Referring to FIG. 1, Figure 1 The controller positioning method includes:

[0045] S11: judging whether a geometric shape constituted by light spots in a first image contains a characteristic geometric shape; wherein the light source device corresponding to the light spots constituting the characteristic geometric shape is a characteristic light source device arranged on the controller and capable of reflecting the pose of the controller.

[0046] In the present embodiment, a first frame image is obtained by using a camera to shoot an image. The first frame image is the first image. For the acquisition of the image shot by the camera, the interface of the camera needs to be called in the service to set the required exposure, gain and fps, and then the picture of the camera is obtained through the callback of the HIDL function.

[0047] In this embodiment, for the first frame image, it is first determined whether the geometric shape composed of the light spots in the first image contains the characteristic geometric shape. Since the light source devices corresponding to the light spots constituting the characteristic geometric shape are the characteristic light source devices arranged on the controller and capable of reflecting the pose of the controller, as long as the light spots in the first image can constitute the characteristic geometric shape, it can be determined that these light spots are the light spots of the characteristic light source devices, and the pose of the controller can be determined. The light source devices include but are not limited to lamp beads and light-emitting diodes, which are not limited in this embodiment.

[0048] It should be noted that the determination of the characteristic geometric shape in this embodiment can be determined by calculating the included angle of the light spot constituting vector, and other determination methods can also be used, which are not limited in this embodiment.

[0049] S12: If yes, the controller is positioned according to the light spots constituting the characteristic geometric shape.

[0050] In this embodiment, if it is determined that the geometric shape composed of the light spots in the first image contains the characteristic geometric shape, the controller can be positioned according to the light spots constituting the characteristic geometric shape. The fact that the geometric shape composed of the light spots in the first image contains the characteristic geometric shape indicates that all the characteristic light source devices arranged on the controller are captured in the first image, and the characteristic light source devices can reflect the pose of the controller, that is, the corresponding relationship between the characteristic light source devices and the light spots constituting the characteristic geometric shape can be determined, and the pose coordinates of the controller can be calculated directly by using the positioning algorithm without other complicated steps, so as to position the controller. In this case, only one frame of image is needed to realize accurate positioning of the controller.

[0051] S13: If no, the preset light source devices on the controller are switched to the off state, a second image corresponding to the first image is acquired, and the controller is positioned based on the transformation of the geometric shapes composed of the light spots in the first image and the second image.

[0052] In this embodiment, if it is determined that the geometric shape composed of the light spots in the first image does not contain the characteristic geometric shape, the preset light source devices on the controller are switched to the off state, a second image corresponding to the first image is acquired, and then the controller is positioned based on the transformation of the geometric shapes composed of the light spots in the first image and the second image. The fact that the geometric shape composed of the light spots in the first image does not contain the characteristic geometric shape indicates that all the characteristic light source devices arranged on the controller are not captured in the first image, and in this case, the corresponding relationship between the light spots and the light source devices cannot be determined, that is, the controller cannot be positioned.

[0053] In this case, the embodiment obtains the second image by controlling the light source device to turn on and off, and further realizes positioning based on the transformation of the geometric shapes in the first image and the second image. That is, different geometric shapes are constructed by fixing the on-off conversion of the light source device, so that the correspondence between the light source device and the light spot is found, and the risk of false matching caused by false recognition is greatly reduced, thereby avoiding false pose estimation.

[0054] It can be seen that the embodiment of the application first judges whether the geometric shape constituted by the light spots in the first image contains a feature geometric shape; wherein the light source device corresponding to the light spot constituting the feature geometric shape is a feature light source device set on the controller and capable of reflecting the pose of the controller; if yes, the controller is positioned according to the light spot constituting the feature geometric shape; if no, the preset light source device on the controller is switched to an off state and a second image corresponding to the first image is obtained, and the controller is positioned based on the transformation of the geometric shapes constituted by the light spots in the first image and the second image. The embodiment of the application can accurately position the controller through at most two images. In the case where the first image contains a feature geometric shape, positioning is realized according to the light spot constituting the feature geometric shape; in the case where the first image does not contain a feature geometric shape, a second image is obtained by controlling the light source device to turn on and off, and further positioning is realized based on the transformation of the geometric shapes in the first image and the second image. The risk of false matching caused by false recognition is reduced, the accuracy of the pose estimation of the controller is improved, and the virtual reality experience of the user is improved.

[0055] Figure 2 A specific controller positioning method flowchart is provided for the embodiment of the application. Referring to FIG. 8, the controller positioning method comprises the following steps. Figure 2

[0056] S21: The controller is divided into an upper segment, a middle segment and a lower segment.

[0057] S22: Three light source devices are arranged in the upper segment and the lower segment respectively, and four light source devices are arranged in the middle segment; wherein the three light source devices in the upper segment constitute a first triangle, the three light source devices in the lower segment constitute a second triangle, the first triangle and the second triangle are asymmetric, the four light source devices in the middle segment are feature light source devices, and constitute a feature quadrilateral.

[0058] ​In this embodiment, the light source device on the controller needs to be designed. Specifically, the controller is first divided into upper, middle and lower sections. Then three light source devices are arranged on the upper section, three light source devices are arranged on the lower section, and four light source devices are arranged on the middle section; wherein the three light source devices on the upper section form a first triangle, the three light source devices on the lower section form a second triangle, the first triangle and the second triangle are asymmetric, and the four light source devices on the middle section are characteristic light source devices and form a characteristic quadrilateral.

[0059] For example, the light source device is set as an led infrared lamp bead, and finally a light strip design result as shown in Figure 3 is obtained. Two rows of a total of 10 infrared led lamp beads are arranged on the controller, the distribution of the led lamp beads is uneven, the distribution of the lamp beads is uneven, the middle is a quadrilateral feature, and the two sides are triangular features. The upper section is provided with led1, led2 and led3, the first triangle is a triangle with led1, led2 and led3 as vertices; the middle section is provided with led4, led5, led6 and led7, led4, led5, led6 and led7 are the characteristic lamp beads, and the characteristic quadrilateral is a quadrilateral with led4, led5, led6 and led7 as vertices; the lower section is provided with led8, led9 and led10, and the second triangle is a triangle with led8, led9 and led10 as vertices.

[0060] S23: determining whether the geometric shape formed by the light spots in the first image contains the characteristic quadrilateral.

[0061] S24: if yes, establishing a mapping relationship between the light spots constituting the characteristic quadrilateral and the characteristic light source devices of the middle section to position the controller.

[0062] In this embodiment, after obtaining the first image, it is first determined whether the geometric shape formed by the light spots in the first image contains the characteristic quadrilateral. Specifically, first, a vector is constructed according to the coordinates of the light spot centroid, then the included angle α = arcos((a.b / |a|*|b|)*180 / PI) between the vectors is calculated, and if the included angle between the two adjacent vectors constructed by interval points is less than the threshold value, it is considered that the middle section of the controller is recognized. For example, Figure 3 the layout, that is, the included angle between the vectors constructed by led4 and led5 is less than the threshold value, the included angle between the vectors constructed by led6 and led7 is less than the threshold value, the included angle between the vectors constructed by led4 and led6 is less than the threshold value, and the included angle between the vectors constructed by led5 and led7 is less than the threshold value, at this time it can be determined that the first image is taken by the middle section of the controller.

[0063] At this time, a mapping relationship is established between the light spots constituting the feature quadrilateral and the feature light source device of the middle segment to position the controller. That is, the corresponding relationship between the four infrared lamp beads led4, led5, led6 and led7 and the light spots can be determined. Then, a positioning algorithm can be executed to calculate the pose coordinates of the controller.

[0064] S25: If no, the controller segment position captured by the first image is determined by using the inertial measurement unit data of the controller, and the preset light source device is determined according to the controller segment position.

[0065] In the embodiment, if it is judged that the geometric shape constituted by the light spots in the first image does not contain the feature quadrilateral, it means that the first image captures not the middle segment but the upper segment or the lower segment of the controller. At this time, it is necessary to further judge whether it is the upper segment or the lower segment, which relates to the selection of the preset light source device. Specifically, the controller segment position captured by the first image is determined by using the inertial measurement unit data of the controller, and the preset light source device is determined according to the controller segment position.

[0066] In the embodiment, if the controller segment position is the upper segment, the light source device at the vertex of the first triangle close to the middle segment is determined as the preset light source device, that is, led3 is determined as the preset light source device; if the controller segment position is the lower segment, the light source device at the vertex of the second triangle close to the middle segment is determined as the preset light source device, that is, led8 is determined as the preset light source device.

[0067] S26: Switching the preset light source device on the controller to an off state and acquiring a second image corresponding to the first image.

[0068] In the embodiment, the preset light source device on the controller is switched to an off state and a second image corresponding to the first image is acquired. Specifically, if the light spot in the first image is the upper segment, the headset issues a command for switching the led3 infrared lamp bead between on and off. The command is sent to the controller end in the form of 2.4G wireless transmission (retransmission mechanism ensures that there is no packet loss), and the controller end analyzes the instruction after receiving the command and controls the switching of led3 between on and off through PWM. If the light spot in the first image is the lower segment, the headset issues a command for switching the led8 infrared lamp bead between on and off. The command is sent to the controller end in the form of 2.4G wireless transmission (retransmission mechanism ensures that there is no packet loss), and the controller end analyzes the instruction after receiving the command and controls the switching of led8 between on and off through PWM. At this time, a second frame of image, that is, the second image, is acquired.

[0069] S27: Construct a third triangle in the first image and a fourth triangle in the second image; wherein the third triangle is composed of three light spots near the middle section of the first image, and the fourth triangle is composed of three light spots near the middle section of the second image.

[0070] S28: Determine whether there is a specific transformation relationship between the third triangle and the fourth triangle. If so, determine the mapping relationship between the light spot in the image and the light source device in the controller based on the specific transformation relationship and the controller segment, so as to locate the controller.

[0071] In this embodiment, a third triangle is constructed in the first image, and a fourth triangle is constructed in the second image. The third triangle is formed by three light spots near the middle section of the first image, and the fourth triangle is formed by three light spots near the middle section of the second image. Based on this, it is determined whether there is a specific transformation relationship between the third and fourth triangles. If so, the mapping relationship between the light spots in the image and the light source device in the controller is determined according to the specific transformation relationship and the controller segment, in order to locate the controller.

[0072] In this embodiment, when the controller segment is at the upper segment, if the third triangle is composed of light spots corresponding to LED3, LED4, and LED5, and if the fourth triangle is composed of light spots corresponding to LED2, LED4, and LED5. That is, if the third triangle composed of light spots corresponding to LED3, LED4, and LED5 is transformed into the fourth triangle composed of light spots corresponding to LED2, LED4, and LED5, the specific transformation relationship is as follows: Figure 4 As shown, the upper section of the controller is identified. At this point, the correspondence between the five infrared LEDs (led1, led2, led3, led4, and led5) and the light spots can be determined. The specific LED number of the upper section is then determined, and the positioning algorithm can be executed to calculate the pose coordinates of the controller.

[0073] In this embodiment, when the controller segment is in the lower segment, if the third triangle is composed of light spots corresponding to LED8, LED4, and LED5, and if the fourth triangle is composed of light spots corresponding to LED9, LED4, and LED5. That is, if the third triangle composed of light spots corresponding to LED8, LED4, and LED5 is transformed into the fourth triangle composed of light spots corresponding to LED9, LED4, and LED5, the specific transformation relationship is as follows: Figure 5As shown, the lower section of the controller is identified, and the correspondence between the five infrared light beads, i.e., led4, led5, led6, led7 and led8, and the light spots is determined, the specific light bead number of the lower section is determined, and then the positioning algorithm is executed to calculate the pose coordinates of the controller.

[0074] Further, the embodiment can determine whether the third triangle and the fourth triangle have a specific transformation relationship by detecting whether the corresponding included angle of the third triangle and the fourth triangle changes and / or by detecting whether the distance between the corresponding vertices of the third triangle and the fourth triangle changes. Figure 4 and Figure 5 There are two detection methods for the feature change in the above formula: one is angle detection, i.e., detecting the change of the included angle of the vectors constituted by the light spots. Specifically, a vector can be constructed according to the light spot centroid coordinates, the included angle α between the vectors is calculated as α = arcos((a.b / |a|*|b|)*180 / PI), and whether the specific transformation relationship exists can be determined according to the included angle. The other is distance detection, i.e., the distance between two adjacent points changes. Both methods can be used together. The embodiment is not limited in this regard. Figure 6 The above process corresponds to the schematic diagram.

[0075] Referring to Figure 7 As shown, the embodiment of the application also discloses a controller positioning device, which comprises:

[0076] A feature judgment module 11 is configured to judge whether the geometric shape constituted by the light spots in the first image contains a feature geometric shape; wherein the light source device corresponding to the light spots constituting the feature geometric shape is a feature light source device arranged on the controller and capable of reflecting the pose of the controller.

[0077] A first positioning module 12 is configured to, if yes, position the controller according to the light spots constituting the feature geometric shape.

[0078] A second positioning module 13 is configured to, if no, switch the preset light source device on the controller to an off state, acquire a second image corresponding to the first image, and position the controller based on the transformation of the geometric shape constituted by the light spots in the first image and the second image.

[0079] As can be seen, this embodiment first determines whether the geometric shape formed by the light spots in the first image contains a characteristic geometric shape; wherein, the light source device corresponding to the light spot constituting the characteristic geometric shape is a characteristic light source device set on the controller that can reflect the controller's pose; if yes, the controller is positioned based on the light spot constituting the characteristic geometric shape; if no, the preset light source device on the controller is switched to the off state and a second image corresponding to the first image is obtained, and the controller is positioned based on the transformation of the geometric shape formed by the light spots in the first image and the second image. This embodiment can accurately position the controller using at most two frames of images. If the first image contains a characteristic geometric shape, positioning is achieved based on the light spot constituting the characteristic geometric shape; if the first image does not contain a characteristic geometric shape, the second image is obtained by controlling the on / off state of the light source device, and positioning is further achieved based on the transformation of the geometric shape in the first image and the second image. This reduces the risk of mismatch caused by misidentification, improves the accuracy of controller pose estimation, and enhances the user's virtual reality experience.

[0080] In some specific embodiments, the controller positioning device further includes:

[0081] The segmentation module is used to divide the controller into segments, resulting in upper, middle, and lower segments;

[0082] The light source device setting module is used to set three light source devices in the upper section and the lower section respectively, and four light source devices in the middle section; wherein, the three light source devices in the upper section form a first triangle, the three light source devices in the lower section form a second triangle and the first triangle and the second triangle are asymmetrical, and the four light source devices in the middle section are the feature light source devices and form a feature quadrilateral.

[0083] The segment determination module is used to determine the controller segment captured in the first image using data from the controller's inertial measurement unit.

[0084] The light source device determination module is used to determine the preset light source device based on the controller segment.

[0085] In some specific embodiments, the feature determination module 11 is specifically used to determine whether the geometric shape formed by the light spots in the first image contains the feature quadrilateral.

[0086] In some specific embodiments, the first positioning module 12 is specifically used to establish a mapping relationship between the light spot constituting the characteristic quadrilateral and the characteristic light source device in the middle section, if so, to position the controller.

[0087] In some specific embodiments, the light source device determining module specifically includes:

[0088] The first determining unit is configured to determine the light source device at the vertex of the first triangle close to the middle segment as the preset light source device if the controller segment position is the upper segment.

[0089] The second determining unit is configured to determine the light source device at the vertex of the second triangle close to the middle segment as the preset light source device if the controller segment position is the lower segment.

[0090] In some embodiments, the second positioning module 13 specifically includes:

[0091] The constructing unit is configured to construct a third triangle in the first image and construct a fourth triangle in the second image, wherein the third triangle is composed of three light spots close to the middle segment in the first image, and the fourth triangle is composed of three light spots close to the middle segment in the second image.

[0092] The transformation relationship judging unit is configured to judge whether the third triangle and the fourth triangle have a specific transformation relationship, and if so, determine the mapping relationship between the light spots in the image and the light source devices in the controller according to the specific transformation relationship and the controller segment position, so as to position the controller.

[0093] In some embodiments, the transformation relationship judging unit is specifically configured to judge whether the third triangle and the fourth triangle have a specific transformation relationship by detecting whether the corresponding angles of the third triangle and the fourth triangle change and / or by detecting whether the distances between the corresponding vertices of the third triangle and the fourth triangle change.

[0094] Further, the embodiments of the present application also provide an electronic device. Figure 8 The electronic device 20 shown in the figure is according to an exemplary embodiment, and the content in the figure cannot be considered as any limitation on the use range of the present application.

[0095] Figure 8 The electronic device 20 shown in the figure is according to an exemplary embodiment, and the content in the figure cannot be considered as any limitation on the use range of the present application.

[0096] In this embodiment, the power supply 23 is configured to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 is configured to create a data transmission channel between the electronic device 20 and external devices, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which is not limited specifically herein; the input / output interface 25 is configured to obtain external input data or output data to the outside, and the specific interface type can be selected according to the specific application needs, which is not limited specifically herein.

[0097] In addition, the memory 22 as a carrier of resource storage can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon can include an operating system 221, a computer program 222 and data 223, etc., and the storage mode can be temporary storage or permanent storage.

[0098] The operating system 221 is configured to manage and control each hardware device on the electronic device 20 and the computer program 222, so as to realize the operation and processing of the processor 21 on the mass data 223 in the memory 22, and the operating system 221 can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program capable of completing the controller positioning method disclosed in any of the preceding embodiments and executed by the electronic device 20, the computer program 222 can further include a computer program capable of completing other specific work. The data 223 can include image data collected by the electronic device 20.

[0099] Further, the embodiment of the present application further discloses a storage medium, wherein the storage medium stores a computer program, and the computer program is loaded and executed by a processor to realize the controller positioning method steps disclosed in any of the preceding embodiments.

[0100] In the specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts of each embodiment can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.

[0101] Finally, it needs to be pointed out that in this document, relational terms such as first and second and the like can only be intended to distinguish one entity or operation from another entity or operation without necessarily requiring or implying any such actual relationship or order between such entities or operations. Moreover, the terms "comprising", "including", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or even inherent to such process, method, article, or apparatus. Without more limitations, an element defined by an "including a..." statement does not exclude the existence of additional identical elements in the process, method, article, or apparatus including the one defined by the "including a..." statement.

[0102] The above describes in detail the controller positioning method, device, equipment and storage medium provided by the present application. The principles and implementation manners of the present application are described by applying specific examples. The above description of the embodiments is only for helping to understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges can be changed. In summary, the content of the specification should not be understood as limiting the present application.

Claims

1. A controller positioning method, characterized by, The application relates to a controller positioning method and device. The controller is divided into an upper segment, a middle segment and a lower segment; Three light source devices are arranged in the upper segment and the lower segment respectively, and four light source devices are arranged in the middle segment; wherein the three light source devices in the upper segment form a first triangle, the three light source devices in the lower segment form a second triangle, the first triangle and the second triangle are asymmetric, the four light source devices in the middle segment are characteristic light source devices and form a characteristic quadrangle; It is judged whether the geometric shape formed by the light spots in the first image contains a characteristic geometric shape; wherein the light source device corresponding to the light spot forming the characteristic geometric shape is the characteristic light source device arranged on the controller and capable of reflecting the pose of the controller; If yes, the controller is positioned according to the light spot forming the characteristic geometric shape; If no, the preset light source device on the controller is switched to an off state, a second image corresponding to the first image is acquired, and the controller is positioned based on the transformation of the geometric shapes formed by the light spots in the first image and the second image; The determination of the preset light source device comprises: The controller segment position photographed by the first image is determined by using the inertial measurement unit data of the controller, and the preset light source device is determined according to the controller segment position; wherein if the controller segment position is the upper segment, the light source device at the vertex of the first triangle close to the middle segment is determined as the preset light source device; if the controller segment position is the lower segment, the light source device at the vertex of the second triangle close to the middle segment is determined as the preset light source device.

2. The controller positioning method of claim 1, wherein, The judgment whether the geometric shape formed by the light spots in the first image contains a characteristic geometric shape comprises: It is judged whether the geometric shape formed by the light spots in the first image contains the characteristic quadrangle; Correspondingly, if yes, the controller is positioned according to the light spot forming the characteristic geometric shape, which comprises: If yes, a mapping relationship is established between the light spot forming the characteristic quadrangle and the characteristic light source device in the middle segment to position the controller.

3. The controller positioning method of claim 1, wherein, The positioning of the controller based on the transformation of the geometric shapes formed by the light spots in the first image and the second image comprises: A third triangle is constructed in the first image, and a fourth triangle is constructed in the second image; wherein the third triangle is formed by the three light spots close to the middle segment in the first image, and the fourth triangle is formed by the three light spots close to the middle segment in the second image; It is judged whether the third triangle and the fourth triangle have a specific transformation relationship, if yes, the mapping relationship between the light spot in the image and the light source device in the controller is determined according to the specific transformation relationship and the controller segment position to position the controller. The specific transformation relationship is a change in geometric features of corresponding triangular groups of light spots in the first image and corresponding triangular groups of light spots in the second image due to switching of the on-off state of the preset light source device, and specifically includes: the third triangle in the first image, which is composed of light spots of the preset light source device and two other light source devices adjacent to the preset light source device, is transformed into the fourth triangle in the second image, which is composed of light spots of another light source device at the same segment position as the preset light source device and still retains light spots of the two other light source devices.

4. The controller positioning method of claim 3, wherein, The judgment of whether the third triangle and the fourth triangle have the specific transformation relationship includes: The judgment of whether the third triangle and the fourth triangle have the specific transformation relationship is achieved by detecting whether the corresponding included angle of the third triangle and the fourth triangle changes and / or by detecting whether the distance between the corresponding vertices of the third triangle and the fourth triangle changes.

5. A controller positioning device, characterized by, The method includes: The segmenting module is configured to divide the controller into segments to obtain an upper segment, a middle segment and a lower segment. The light source device setting module is configured to set three light source devices in the upper segment and the lower segment respectively, and set four light source devices in the middle segment; wherein the three light source devices in the upper segment form a first triangle, the three light source devices in the lower segment form a second triangle, the first triangle and the second triangle are asymmetric, and the four light source devices in the middle segment are characteristic light source devices and form a characteristic quadrilateral. The feature judgment module is configured to judge whether a geometric shape composed of light spots in the first image contains a characteristic geometric shape; wherein the light source devices corresponding to the light spots constituting the characteristic geometric shape are characteristic light source devices set on the controller to reflect the pose of the controller. The first positioning module is configured to, if yes, position the controller according to the light spots constituting the characteristic geometric shape. The segment determination module is configured to determine the segment of the controller photographed by the first image by using inertial measurement unit data of the controller. The light source device determination module is configured to determine the preset light source device according to the segment of the controller. The second positioning module is configured to, if no, switch the preset light source device on the controller to an off state, acquire a second image corresponding to the first image, and position the controller based on transformation of geometric shapes composed of light spots in the first image and the second image. The light source device determination module includes: The first determination unit is configured to, if the segment of the controller is the upper segment, determine the light source device at the vertex close to the middle segment in the first triangle as the preset light source device. The second determination unit is configured to, if the segment of the controller is the lower segment, determine the light source device at the vertex close to the middle segment in the second triangle as the preset light source device.

6. An electronic device, comprising: The electronic device includes a processor and a memory; wherein the memory is configured to store a computer program, the computer program is loaded and executed by the processor to implement the controller positioning method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, Computer program product for storing computer-executable instructions which, when loaded and executed by a processor, implement the controller positioning method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Image acquisition method, handle device, head-mounted device and head-mounted system

    CN112437213A

  • Controller positioning method and device, head-mounted display equipment and storage medium

    CN114549285A