Method and electronic device for detecting light spot mark in handle image

By screening adjacent light spots in the VR device handle image to form a plane figure and matching them, the problem of low efficiency of light spot mark detection in the existing technology is solved, and more efficient light spot mark detection is achieved.

CN116433752BActive Publication Date: 2025-09-26HISENSE ELECTRONICS TECH SHENZHEN CO LTD

Patent Information

Application Number
CN202211390797.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-07
Publication Date
2025-09-26
Estimated Expiration
2042-11-07

AI Technical Summary

Technical Problem

The existing technology is inefficient in detecting light spot markers in VR device handle images, mainly because the brute force matching method is used, which results in a long calculation time.

Method used

By screening out the light spots adjacent to the light spots in the target handle image, a plane figure is formed, and the plane figure is matched with the actual adjacent light spot set of the preset handle to obtain adjacent light spot matching pairs, and the light spot identifier is screened based on the number of these matching pairs.

Benefits of technology

The efficiency of spot mark detection is improved, time and computing resources are saved, and unnecessary combination matching is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116433752B_ABST
    Figure CN116433752B_ABST
Patent Text Reader

Abstract

The present application provides a method and electronic device for detecting light spot identifiers in a handle image, which is used to improve the detection efficiency of light spot identifiers. The method includes: connecting each light spot in the target handle image with each adjacent target light spot to obtain each plane figure; matching each adjacent light spot in any plane figure with each actual light spot in the set of actual adjacent light spots of the handle to obtain each adjacent light spot matching pair; obtaining multiple predicted positions of the handle based on the positions of each adjacent light spot in each adjacent light spot matching pair and the positions of each actual light spot; projecting each actual light spot in the handle into a specified image based on each predicted position and the position of each actual light spot to obtain the position of each projected light spot; matching the projected spot with each other light spot in the specified image based on the position of each projected light spot to obtain each other light spot matching pair; and determining each light spot identifier based on each other light spot matching pair and each light spot matching pair.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image processing for virtual reality devices, and in particular to a method and electronic device for detecting a light spot mark in a handle image. Background Art

[0002] The position of the handle of VR (Virtual Reality) equipment is mainly calculated based on vision. The handle itself is equipped with an infrared LED (light-emitting diode). When the LED of the handle is turned on, a light spot will appear. Figure 1 Each light spot in the handle has a unique identifier, and its 3D (3-dimensional) coordinates in the handle's coordinate system are known. These coordinates are pre-designed and fixed (because the position of the LED light relative to the handle remains unchanged). To calculate the handle's position, the identifiers of each light spot in the image must be determined.

[0003] In existing technology, light spot identifiers in controller images are detected through brute-force matching. Brute-force matching attempts all possible identifier combinations for each light spot and selects the optimal match to determine the light spot identifier. Therefore, brute-force matching in existing technology is time-consuming, resulting in low light spot identifier detection efficiency. Summary of the Invention

[0004] The present application provides a method and electronic device for detecting light spot marks in a handle image, thereby improving the efficiency of detecting light spot marks in a handle image.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting a light spot mark in a handle image, comprising:

[0006] For any light spot in the target handle image at the current moment, based on the position of the light spot, a first specified number of target light spots adjacent to the light spot are screened from other light spots in the target handle image except the light spot; and

[0007] Connecting the light spot with the first specified number of target light spots to obtain a plane figure; and

[0008] For any preset set of actual adjacent light spots of the handle, each adjacent light spot in the plane figure is matched with each actual light spot in the set of actual adjacent light spots to obtain adjacent light spot matching pairs, wherein the adjacent light spot matching pairs include the image light spot index of the adjacent light spot and the identifier of the actual light spot that matches the adjacent light spot;

[0009] For any adjacent light spot matching pair, based on the positions of each adjacent light spot in the adjacent light spot matching pair and the positions of each actual light spot, obtain a plurality of predicted positions of the handle corresponding to the adjacent light spot matching pair;

[0010] For any predicted position, projecting each actual light spot in the handle into a designated image based on the predicted position and the positions of each actual light spot in the handle to obtain the position of each projected light spot; and

[0011] Matching the projection light spot with other light spots in the designated image except for adjacent light spots in the plane figure according to the positions of the projection light spots and the positions of the light spots in the designated image, to obtain other light spot matching pairs;

[0012] Screening the spot matching pairs based on the number of the other spot matching pairs to obtain screened spot matching pairs, wherein the spot matching pairs include the adjacent spot matching pairs and the other spot matching pairs;

[0013] According to the number of the filtered light spot matching pairs, the identifier of each light spot in the target handle image is obtained.

[0014] A second aspect of the present application provides an electronic device, comprising a processor and a memory, wherein the processor and the memory are connected via a bus;

[0015] The memory stores a computer program, and the processor is configured to perform the following operations based on the computer program:

[0016] For any light spot in the target handle image at the current moment, based on the position of the light spot, a first specified number of target light spots adjacent to the light spot are screened from other light spots in the target handle image except the light spot; and

[0017] Connecting the light spot with the first specified number of target light spots to obtain a plane figure; and

[0018] For any preset set of actual adjacent light spots of the handle, each adjacent light spot in the plane figure is matched with each actual light spot in the set of actual adjacent light spots to obtain adjacent light spot matching pairs, wherein the adjacent light spot matching pairs include the image light spot index of the adjacent light spot and the identifier of the actual light spot that matches the adjacent light spot;

[0019] For any adjacent light spot matching pair, based on the positions of each adjacent light spot in the adjacent light spot matching pair and the positions of each actual light spot, obtain a plurality of predicted positions of the handle corresponding to the adjacent light spot matching pair;

[0020] For any predicted position, projecting each actual light spot in the handle into a designated image based on the predicted position and the positions of each actual light spot in the handle to obtain the position of each projected light spot; and

[0021] Matching the projection light spot with other light spots in the designated image except for adjacent light spots in the plane figure according to the positions of the projection light spots and the positions of the light spots in the designated image, to obtain other light spot matching pairs;

[0022] Screening the spot matching pairs based on the number of the other spot matching pairs to obtain screened spot matching pairs, wherein the spot matching pairs include the adjacent spot matching pairs and the other spot matching pairs;

[0023] According to the number of the filtered light spot matching pairs, the identifier of each light spot in the target handle image is obtained.

[0024] According to a third aspect of an embodiment of the present invention, a computer storage medium is provided, wherein the computer storage medium stores a computer program, and the computer program is used to execute the method according to the first aspect.

[0025] In the above embodiment of the present application, for any light spot in the target handle image at the current moment, a plane pattern is obtained by connecting the light spot with each target light spot adjacent to the light spot. Then, each adjacent light spot in the plane pattern is matched with each actual light spot in a preset set of actual adjacent light spots of the handle to obtain each adjacent light spot matching pair. Then, based on each adjacent light spot matching pair, multiple predicted positions of the handle are obtained. Based on the multiple predicted positions of the handle, other light spot matching pairs are obtained. Then, based on the number of other light spot matching pairs, each light spot matching pair is filtered. Finally, based on the number of filtered light spot matching pairs, each light spot identification is determined. Thus, in the present application, each adjacent light spot in the image is first determined to be connected into a plane pattern. Then, the light spots in each plane pattern are matched with the light spots in the preset set of actual adjacent light spots to determine the identification of each light spot in the handle image. Therefore, in the present application, the matching of image adjacent light spots with actual adjacent light spots is performed, which filters out the matching of some non-adjacent light spot combinations. It is not necessary to match all combinations once, thus saving time and computing resources and improving the efficiency of light spot identification detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0027] Figure 1 A schematic diagram of a light spot of a handle provided in an embodiment of the present application is exemplarily shown;

[0028] Figure 2 One of the application scenario diagrams provided by the embodiment of the present application is exemplarily shown;

[0029] Figure 3 The second schematic diagram of the application scenario provided by the embodiment of the present application is exemplarily shown;

[0030] Figure 4 The third schematic diagram of the application scenario provided by the embodiment of the present application is exemplarily shown;

[0031] Figure 5 One of the flow charts of the method for detecting a light spot mark in a handle image provided by an embodiment of the present application is exemplarily shown;

[0032] Figure 6 The schematic diagram of the plane graph provided by the embodiment of the present application is exemplarily shown;

[0033] Figure 7 The following is a schematic diagram of a process for determining matching pairs of adjacent light spots provided in an embodiment of the present application;

[0034] Figure 8 The following is a schematic diagram illustrating a process of screening adjacent spot matching pairs provided by an embodiment of the present application;

[0035] Figure 9 The flowchart for determining other spot matching pairs provided by the embodiment of the present application is exemplarily shown;

[0036] Figure 10 The second flowchart of the method for detecting a light spot mark in a handle image provided by an embodiment of the present application is exemplarily shown;

[0037] Figure 11 The following is a schematic diagram showing the structure of a device for detecting a light spot mark in a handle image provided by an embodiment of the present application;

[0038] Figure 12 The hardware structure diagram of the electronic device provided in the embodiment of the present application is exemplified. DETAILED DESCRIPTION

[0039] In order to make the purpose, implementation mode and advantages of the present application clearer, the exemplary implementation mode of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, not all of the embodiments.

[0040] All other embodiments derived by persons of ordinary skill in the art based on the exemplary embodiments described herein without inventive effort are within the scope of protection of the claims appended hereto. Furthermore, although the disclosure herein is presented based on one or more exemplary embodiments, it should be understood that each aspect of the disclosure may constitute a complete embodiment on its own.

[0041] It should be noted that the brief descriptions of terms in this application are only for the purpose of facilitating the understanding of the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their ordinary and usual meanings.

[0042] The terms "first," "second," and the like in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover, but not exclude, inclusion. For example, a product or device comprising a list of components is not necessarily limited to those components expressly listed, but may include other components not expressly listed or inherent to the product or device.

[0043] The term "module" as used in this application refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic or combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0044] The following is an overview of the concepts of the embodiments of the present application.

[0045] Current technologies for detecting light spot markers in handle images rely on brute-force matching. However, brute-force matching involves trying all possible combinations of markers and selecting the optimal match to determine the light spot marker. Consequently, brute-force matching in existing technologies is time-consuming, resulting in low light spot marker detection efficiency.

[0046] Based on the problem of low efficiency in detecting light spot identification in the prior art, an embodiment of the present application provides a method for detecting light spot identification in a handle image. For any light spot in the target handle image at the current moment, a plane figure is obtained by connecting the light spot with each target light spot adjacent to the light spot, and then each adjacent light spot in the plane figure is matched with each actual light spot in the preset actual adjacent light spot set of the handle to obtain each adjacent light spot matching pair, and then multiple predicted positions of the handle are obtained based on each adjacent light spot matching pair, and other light spot matching pairs are obtained based on the multiple predicted positions of the handle, and then each light spot matching pair is screened based on the number of other light spot matching pairs, and finally, each light spot identification is determined based on the number of screened light spot matching pairs. Therefore, in the present application, it is first determined that each adjacent light spot in the image is connected into a plane figure, and then the light spots in each plane figure are matched with the light spots in the preset actual adjacent light spot set to determine the identification of each light spot in the handle image. Therefore, in this application, the adjacent light spots in the image are matched with the actual adjacent light spots, which filters out the matching of some non-adjacent light spot combinations and does not require all combinations to be matched. Therefore, time and computing resources are saved and the efficiency of light spot identification detection is improved.

[0047] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0048] Figure 2 The following is a schematic diagram of an application scenario provided by an embodiment of the present application; Figure 2 As shown, this application scenario is described using an electronic device as a server. This application scenario includes a VR device 210 and a server 220. Server 220 can be implemented as a single server or multiple servers. Server 220 can be implemented as a physical server or a virtual server.

[0049] In a possible application scenario, for any light spot in the target handle image at the current moment obtained by the VR device 210, the server 220 filters out a first specified number of target light spots adjacent to the light spot from the other light spots in the target handle image except the light spot according to the position of the light spot; and connects the light spot with the first specified number of target light spots to obtain a plane figure; then the server 220 matches each adjacent light spot in the plane figure with each actual light spot in the actual adjacent light spot set for any preset handle to obtain each adjacent light spot matching pair, wherein the adjacent light spot matching pair includes the image light spot index of the adjacent light spot and the identifier of the actual light spot matching the adjacent light spot; and for any adjacent light spot matching pair, based on the position of each adjacent light spot in the adjacent light spot matching pair and the identifier of each actual light spot , and obtain multiple predicted positions of the handle corresponding to the adjacent light spot matching pairs; then the server 220 projects the actual light spots in the handle into the specified image for any predicted position based on the predicted position and the positions of the actual light spots of the handle to obtain the positions of the projected light spots; through the positions of the projected light spots and the positions of the light spots in the specified image, the projected light spots are matched with the other light spots in the specified image except the adjacent light spots in the plane figure to obtain other light spot matching pairs; and the server 220 filters the light spot matching pairs based on the number of the other light spot matching pairs to obtain filtered light spot matching pairs, wherein the light spot matching pairs include the adjacent light spot matching pairs and the other light spot matching pairs; finally, the server 220 obtains the identifiers of the light spots in the target handle image according to the number of the filtered light spot matching pairs.

[0050] like Figure 3As shown, it is a schematic diagram of another application scenario, which includes a VR device 210, a server 220 and a memory 230. For any light spot in the target handle image at the current moment obtained by the VR device 210, the server 220 filters out a first specified number of target light spots adjacent to the light spot from the other light spots in the target handle image except the light spot according to the position of the light spot; and connects the light spot with the first specified number of target light spots to obtain a plane figure; then the server 220 matches each adjacent light spot in the plane figure with each actual light spot in the actual adjacent light spot set for any preset handle to obtain each adjacent light spot matching pair, wherein the adjacent light spot matching pair includes the image light spot index of the adjacent light spot and the identifier of the actual light spot matching with the adjacent light spot; and for any adjacent light spot matching pair, based on the position of each adjacent light spot in the adjacent light spot matching pair and the position of each actual light spot, obtains the image light spot index of the adjacent light spot and the identifier of the actual light spot matching with the adjacent light spot; The server 220 projects the actual light spots in the handle into the designated image for any one of the predicted positions based on the predicted position and the positions of the actual light spots in the handle to obtain the positions of the projected light spots; matches the projected light spots with the other light spots in the designated image except the adjacent light spots in the plane figure through the positions of the projected light spots and the positions of the light spots in the designated image to obtain other light spot matching pairs; and the server 220 filters the light spot matching pairs based on the number of the other light spot matching pairs to obtain filtered light spot matching pairs, wherein the light spot matching pairs include the adjacent light spot matching pairs and the other light spot matching pairs; finally, the server 220 obtains the identifiers of the light spots in the target handle image according to the number of the filtered light spot matching pairs, and stores the identifiers of the light spots in the memory 230.

[0051] like Figure 4As shown, it is a schematic diagram of another application scenario, which includes a VR device 210 and a memory 230. This application scenario is explained by taking the electronic device as a VR device as an example. For any light spot in the target handle image acquired at the current moment, the VR device 210 filters out a first specified number of target light spots adjacent to the light spot from the other light spots in the target handle image except the light spot according to the position of the light spot; and connects the light spot with the first specified number of target light spots to obtain a plane figure; then the VR device 210 matches each adjacent light spot in the plane figure with each actual light spot in the actual adjacent light spot set for any preset handle to obtain each adjacent light spot matching pair, wherein the adjacent light spot matching pair includes the image light spot index of the adjacent light spot and the identifier of the actual light spot that matches the adjacent light spot; and for any adjacent light spot matching pair, based on the position of each adjacent light spot in the adjacent light spot matching pair and the position of each actual light spot, obtains the corresponding adjacent light spot matching pair. multiple predicted positions of the handle; then the VR device 210 projects the actual light spots in the handle into the designated image for any predicted position based on the predicted position and the positions of the actual light spots of the handle to obtain the positions of the projected light spots; through the positions of the projected light spots and the positions of the light spots in the designated image, the projected light spots are matched with the other light spots in the designated image except the adjacent light spots in the plane figure to obtain other light spot matching pairs; and the VR device 210 filters the light spot matching pairs based on the number of the other light spot matching pairs to obtain filtered light spot matching pairs, wherein the light spot matching pairs include the adjacent light spot matching pairs and the other light spot matching pairs; finally, the VR device 210 obtains the identifiers of the light spots in the target handle image according to the number of the filtered light spot matching pairs, and stores the identifiers of the light spots in the memory 230.

[0052] The description in this application only details a single VR device 210, a single server 220, and a single storage 230. However, those skilled in the art should understand that the VR device 210, server 220, and storage 230 shown are intended to illustrate the operations of the VR device 210, server 220, and storage 230 involved in the technical solution of this application. They do not imply any limitation on the number, type, or location of the VR devices 210, servers 220, and storage 230. It should be noted that adding additional modules to the illustrated environment or removing individual modules from it does not change the underlying concepts of the exemplary embodiments of this application.

[0053] It should be noted that the method for detecting the light spot mark in the handle image proposed in this application is not only applicable to Figure 2 、 Figure 3 and Figure 4 The application scenario shown is also applicable to any device that detects light spot marks in the handle image.

[0054] The following describes a method for detecting light spot marks in a handle image according to an exemplary embodiment of the present application in combination with the application scenarios described above and with reference to the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the methods and principles of the present application, and the implementation methods of the present application are not limited in this respect.

[0055] like Figure 5 FIG. 1 is a flow chart of a method for detecting a light spot mark in a handle image, which may include the following steps:

[0056] Step 501: for any light spot in the target handle image at the current moment, based on the position of the light spot, select a first specified number of target light spots adjacent to the light spot from other light spots in the target handle image except the light spot;

[0057] In one embodiment, the target handle image at the current moment is determined by:

[0058] A target detection algorithm is used to perform light spot detection on each handle image acquired by the VR device at the current moment, and each light spot in each handle image is obtained respectively; and the handle image with the largest number of light spots is determined as the target handle image.

[0059] The target detection algorithm in this embodiment includes a handle detection algorithm and a light spot detection algorithm. The handle detection algorithm is first used to determine the position of each handle in each handle image. Then, the light spot detection algorithm is used to detect the position of each handle in each image to obtain the position of each light spot. Both the handle detection algorithm and the light spot detection algorithm in this embodiment are target detection algorithms. The specific target detection algorithm can be set based on actual conditions and is not limited in this embodiment.

[0060] In one embodiment, step 501 can be implemented as follows: based on the position of the light spot and the positions of the other light spots in the target handle image except the light spot, obtain the distance between the light spot and the other light spots; sort the distances between the light spot and the other light spots in ascending order, and determine the other light spots corresponding to the first specified number of distances as the target light spots. The distance between the light spot and any other light spot can be obtained by formula (1):

[0061]

[0062] Wherein, d is the distance between the light spot and any other light spot, x1 is the horizontal coordinate of the position of the light spot, y1 is the vertical coordinate of the position of the light spot, x2 is the horizontal coordinate of the position of the other light spot, and y2 is the vertical coordinate of the position of the other light spot.

[0063] It should be noted that the first designated number in this embodiment is 2, but this is not a limitation and can be set based on actual circumstances. The first designated number corresponds to the plane figure. If the plane figure is a triangle, the first designated number is 2; if the plane figure is a tetrahedron, the first designated number is 3.

[0064] Step 502: Connect the light spot with the first specified number of target light spots to obtain a plane figure;

[0065] The plane figure in this embodiment is a triangle, but this is not limited to the plane figure in this embodiment, and the plane figure in this embodiment can be set according to actual conditions. For example, Figure 6 As shown, multiple triangles are obtained by connecting adjacent light spots in the target handle image.

[0066] Step 503: For any preset set of actual adjacent light spots of the handle, each adjacent light spot in the plane graphic is matched with each actual light spot in the set of actual adjacent light spots to obtain adjacent light spot matching pairs, wherein the adjacent light spot matching pairs include the image light spot index of the adjacent light spot and the identifier of the actual light spot that matches the adjacent light spot;

[0067] like Figure 7 FIG. 1 is a flow chart showing a process of determining matching pairs of adjacent light spots, including the following steps:

[0068] Step 701: Arrange adjacent light spots in the plane graph in ascending order of image light spot index to obtain a light spot list;

[0069] Step 702: traverse each actual light spot in the set of actual adjacent light spots in a specified order, use any traversed actual light spot as the initial position, and sort the other light spots in the specified order to obtain a sorted list;

[0070] Among them, the designated order in this embodiment includes a clockwise order and a counterclockwise order, but the designated order in this embodiment is not limited. The designated order in this embodiment can be set according to actual conditions.

[0071] For example, actual adjacent spot set 1 includes actual spot 1, actual spot 2, and actual spot 3. If the specified order in this implementation is counterclockwise, the order of traversal for each spot in the actual adjacent spot set is actual spot 3, actual spot 2, and actual spot 1. When traversing to actual spot 3, the corresponding sorted list is: actual spot 3, actual spot 2, actual spot 1. When traversing to actual spot 2, the corresponding sorted list is: actual spot 2, actual spot 1, actual spot 3. When traversing to actual spot 1, the corresponding sorted list is: actual spot 1, actual spot 3, actual spot 2.

[0072] Step 703: for any light spot in the sorted list, add the identifier of the actual light spot and the image spot index of the adjacent spot in the light spot list having the same position as the actual light spot in the sorted list to the same adjacent light spot matching pair;

[0073] For example, the order in the spot list is vaguely: spot A, spot B, spot C. Take the sorted list as: actual spot 3, actual spot 2, actual spot 1 as an example. The obtained adjacent spot matching degrees are: spot A - actual spot 3, spot B - actual spot 2, spot C - actual spot 1.

[0074] Step 704: Determine whether there is an actual light spot that has not been traversed in the actual adjacent light spot set. If yes, return to step 702; if not, end.

[0075] Step 504: for any adjacent light spot matching pair, based on the positions of each adjacent light spot in the adjacent light spot matching pair and the positions of each actual light spot, obtain a plurality of predicted positions of the handle corresponding to the adjacent light spot matching pair;

[0076] In one embodiment, for any adjacent light spot matching pair, the positions of each adjacent light spot in the adjacent light spot matching pair and the positions of each actual light spot are input into the p3p algorithm to obtain multiple predicted positions of the handle corresponding to the adjacent light spot matching pair.

[0077] In this embodiment, one adjacent spot is matched to obtain four corresponding predicted positions. The p3p algorithm in this embodiment is an algorithm in the prior art, and will not be described in detail in this embodiment.

[0078] Step 505: For any predicted position, project each actual light spot in the handle into a designated image based on the predicted position and the positions of each actual light spot in the handle to obtain the position of each projected light spot;

[0079] The designated image in this embodiment is at least one of the handle images currently captured. The designated image can be one or more. This embodiment does not limit the number or specific images of designated images. The number of designated images and the specific image to be used can be set based on actual circumstances.

[0080] In one embodiment, the actual light spots in the handle are projected into the designated image using a preset reprojection algorithm, the predicted position, and the positions of the actual light spots in the handle to obtain the positions of the projected light spots.

[0081] It should be noted that the re-projection algorithm in this embodiment is an algorithm in the prior art and will not be described in detail in this embodiment.

[0082] In order to further improve the detection efficiency of the light spot mark in the handle image, in one embodiment, before executing step 505, it is necessary to screen the adjacent light spot matching pairs, such as Figure 8 FIG. 1 is a flow chart showing a process for screening adjacent spot matching pairs, including the following steps:

[0083] Step 801: for any set of multiple predicted positions of the handle corresponding to the adjacent light spot matching pair, obtain a predicted gravity direction vector of the handle corresponding to the adjacent light spot matching pair based on the predicted positions;

[0084] In one embodiment, step 801 may be implemented as follows: inputting a plurality of predicted positions of the handle corresponding to the adjacent light spot matching pairs into a preset imu integration algorithm to obtain a predicted gravity direction vector of the handle corresponding to the adjacent light spot matching pairs.

[0085] It should be noted that the imu integration algorithm is a method in the prior art and will not be described in detail in this embodiment.

[0086] Step 802: Obtaining an actual gravity direction vector of the target handle according to the current position of the electronic device that captures the target handle image;

[0087] In one embodiment, step 802 may be implemented as follows: inputting the posture of the VR device into the p3p algorithm to obtain the actual posture of the handle, wherein the actual posture of the handle includes the actual gravity direction vector of the handle.

[0088] Step 803: Determine the adjacent light spot matching pairs that need to be deleted by using the predicted gravity direction vectors corresponding to the adjacent light spot matching pairs and the actual direction vectors, and delete the adjacent light spot matching pairs that need to be deleted.

[0089] In one embodiment, step 803 can be implemented as follows: for any adjacent spot matching pair, the gravity direction vector angle is obtained based on the predicted gravity direction vector corresponding to the adjacent spot matching pair and the actual direction vector; if the gravity direction vector angle is greater than a specified angle, the adjacent spot matching pair is determined to be the adjacent spot matching pair to be deleted. The gravity direction vector angle can be obtained by formula (2):

[0090]

[0091] Wherein, θ is the angle between the gravity direction vector and is the predicted gravity direction vector, is the actual direction vector.

[0092] For example, if the specified angle is 10°, and the gravity direction vector angle corresponding to adjacent spot matching pair 1 is 4°, then it is determined that adjacent spot matching pair 1 does not need to be deleted. If the gravity direction vector angle corresponding to adjacent spot matching pair 2 is 12°, then it is determined that adjacent spot matching pair 2 needs to be deleted.

[0093] It should be noted that the designated angle in this embodiment can be set according to actual conditions, and this embodiment does not limit the specific value of the designated angle.

[0094] Step 506: Matching the projection light spot with the light spots in the designated image except for the adjacent light spots in the plane figure based on the positions of the projection light spots and the positions of the light spots in the designated image, to obtain other light spot matching pairs;

[0095] like Figure 9 FIG. 1 is a flow chart showing a process for determining other spot matching pairs, including the following steps:

[0096] Step 901: for any other light spot in the designated image, obtaining distances between the other light spot and each of the projection light spots according to the position of the other light spot and the positions of the projection light spots;

[0097] The distance between the other light spots and the projection light spot can be determined by the distance formula in formula (1), which will not be described in detail in this embodiment.

[0098] Step 902: If the shortest distance among the distances is less than the specified distance, the image spot index of the other spot and the identifier of the projection spot corresponding to the shortest distance are added to the same spot matching pair, and the spot matching pair is determined as the other spot matching pair.

[0099] For example, if the specified image includes other light spots A and B, and the distance between other light spot A and projection spot 1 is m, and the distance between other light spot A and projection spot 2 is n, if m>n, then n is determined to be the shortest distance. If n is less than the specified distance, then the light spot matching pair is determined to be (A, 2). If the distance between other light spot B and projection spot 1 is p, and the distance between other light spot B and projection spot 2 is q, if p<q, then p is determined to be the shortest distance. If p is greater than the specified distance, then it is determined that the other light spot does not have a corresponding projection spot.

[0100] It should be noted that the designated distance in this embodiment can be set according to actual conditions, and this embodiment does not limit the designated distance.

[0101] Step 507: screening the spot matching pairs based on the number of the other spot matching pairs to obtain screened spot matching pairs, wherein the spot matching pairs include the adjacent spot matching pairs and the other spot matching pairs;

[0102] In one embodiment, step 507 can be specifically implemented as follows: for the predicted position of any handle, if the number of other light spot matching pairs corresponding to the predicted position is less than the second specified number, then delete the predicted position and other light spot matching pairs corresponding to the predicted position; for any adjacent light spot matching pair, if multiple predicted positions corresponding to the adjacent light spot matching pair have been deleted, then delete the adjacent light spot matching pair.

[0103] As mentioned above, in this embodiment, each adjacent spot matching pair has corresponding four predicted positions. If the four predicted positions corresponding to any adjacent spot matching pair have been deleted, the adjacent spot matching pair will be deleted.

[0104] It should be noted that the second specified number in this embodiment can be set according to actual conditions, and this embodiment does not limit the specific value of the second specified number.

[0105] Step 508: Obtaining the identifier of each light spot in the target handle image according to the number of the filtered light spot matching pairs.

[0106] In one embodiment, step 508 can be specifically implemented as follows: counting the number of each spot matching pair after screening; for each spot matching pair with the same image spot index, determining the spot matching pair with the largest number among the spot matching pairs as the target spot matching pair corresponding to the image spot index, and determining the identifier of the actual spot in the target spot matching pair as the identifier of the spot corresponding to the image spot index.

[0107] For example, the filtered spot matching pairs are: (A, 1), (A, 2), (A, 2), (A, 2), (A, 1), (B, 3), (B, 1), (B, 3), (B, 3), (B, 1). From the filtered spot matching pairs, we can find that the number of spot matching pairs (A, 1) is 2, the number of spot matching pairs (A, 2) is 3, the number of spot matching pairs (B, 1) is 2, and the number of spot matching pairs (B, 3) is 3. The target spot matching pair with image spot index A is determined to be (A, 2), so the identification of the spot with image spot index A is determined to be 2. The target spot matching pair with image spot index B is determined to be (B, 3), so the identification of the spot with image spot index B is determined to be 3.

[0108] In order to further connect the technical solutions in this application, Figure 10 A detailed description may include the following steps:

[0109] Step 1001: for any light spot in the target handle image at the current moment, based on the position of the light spot and the positions of other light spots in the target handle image except the light spot, obtain the distance between the light spot and the other light spots;

[0110] Step 1002: sorting the distances between the light spot and the other light spots in ascending order, and determining the other light spots corresponding to the first specified number of distances as the target light spots;

[0111] Step 1003: Connecting the light spot with the first specified number of target light spots to obtain a plane figure;

[0112] Step 1004: for any preset set of actual adjacent light spots of a handle, arrange the adjacent light spots in the plane graph in ascending order of image light spot index to obtain a light spot list;

[0113] Step 1005: traversing each actual light spot in the set of actual adjacent light spots in a specified order, taking any traversed actual light spot as the initial position, and sorting the other light spots in the specified order to obtain a sorted list;

[0114] Step 1006: for any light spot in the sorted list, add the identifier of the actual light spot and the image spot index of the adjacent spot in the light spot list having the same position as the actual light spot in the sorted list to the same adjacent light spot matching pair;

[0115] Step 1007: Determine whether there is any actual light spot that has not been traversed in the actual adjacent light spot set. If so, return to step 1005; if not, execute step 1008.

[0116] Step 1008: For any adjacent light spot matching pair, based on the positions of each adjacent light spot in the adjacent light spot matching pair and the positions of each actual light spot, obtain multiple predicted positions of the handle corresponding to the adjacent light spot matching pair;

[0117] Step 1009: For any predicted position, project each actual light spot in the handle onto a designated image based on the predicted position and the positions of each actual light spot in the handle to obtain the position of each projected light spot;

[0118] Step 1010: for any other light spot in the designated image, obtaining distances between the other light spot and each of the projection light spots according to the position of the other light spot and the positions of the projection light spots;

[0119] Step 1011: if the shortest distance among the distances is less than the specified distance, then adding the image spot index of the other spot and the identifier of the projection spot corresponding to the shortest distance to the same spot matching pair, and determining the spot matching pair as the other spot matching pair;

[0120] Step 1012: For any predicted position of a handle, if the number of other light spot matching pairs corresponding to the predicted position is less than a second specified number, the predicted position and other light spot matching pairs corresponding to the predicted position are deleted;

[0121] Step 1013: For any adjacent light spot matching pair, if multiple predicted positions corresponding to the adjacent light spot matching pair have been deleted, then delete the adjacent light spot matching pair;

[0122] Step 1014: Count the number of matching pairs of each light spot after screening;

[0123] Step 1015: For each spot matching pair having the same image spot index, the spot matching pair with the largest number among the spot matching pairs is determined as the target spot matching pair corresponding to the image spot index, and the identifier of the actual spot in the target spot matching pair is determined as the identifier of the spot corresponding to the image spot index.

[0124] Based on the same inventive concept, the method for detecting light spots in handle images disclosed above can also be implemented by a device for detecting light spots in handle images. The effect of the device for detecting light spots in handle images is similar to that of the aforementioned method and will not be described in detail here.

[0125] Figure 11 2 is a schematic structural diagram of an apparatus for detecting a light spot mark in a handle image according to an embodiment of the present disclosure.

[0126] like Figure 11 As shown, the device 1100 for detecting light spot identification in a handle image of the present disclosure may include a target light spot determination module 1110, a connection module 1120, a first matching module 1130, a predicted position determination module 1140, a projection module 1150, a second matching module 1160, a first screening module 1170 and an identification determination module 1180.

[0127] The target light spot determination module 1110 is configured to, for any light spot in the target handle image at the current moment, select a first specified number of target light spots adjacent to the light spot from other light spots in the target handle image except the light spot according to the position of the light spot; and

[0128] A connecting module 1120 is configured to connect the light spot with the first specified number of target light spots to obtain a plane figure; and

[0129] A first matching module 1130 is configured to match each adjacent light spot in the plane image with each actual light spot in the actual adjacent light spot set for any preset handle, to obtain adjacent light spot matching pairs, wherein the adjacent light spot matching pairs include an image light spot index of the adjacent light spot and an identifier of the actual light spot that matches the adjacent light spot;

[0130] The predicted position determination module 1140 is configured to obtain, for any adjacent light spot matching pair, a plurality of predicted positions of the handle corresponding to the adjacent light spot matching pair based on the positions of the adjacent light spots in the adjacent light spot matching pair and the positions of the actual light spots;

[0131] The projection module 1150 is configured to project the actual light spots in the handle onto a designated image for any predicted position based on the predicted position and the positions of the actual light spots in the handle to obtain the positions of the projected light spots; and

[0132] A second matching module 1160 is configured to match the projection light spot with other light spots in the designated image except for adjacent light spots in the plane figure based on the positions of the projection light spots and the positions of the light spots in the designated image, to obtain other light spot matching pairs;

[0133] A first screening module 1170 is configured to screen the spot matching pairs based on the number of the other spot matching pairs to obtain screened spot matching pairs, wherein the spot matching pairs include the adjacent spot matching pairs and the other spot matching pairs;

[0134] The identification determination module 1180 is configured to obtain an identification of each light spot in the target handle image according to the number of the filtered light spot matching pairs.

[0135] In one embodiment, the apparatus further comprises:

[0136] The target handle image determination module 1190 is configured to determine the target handle image at the current moment by:

[0137] Use the target detection algorithm to perform spot detection on each handle image acquired at the current moment, and obtain each light spot in each handle image;

[0138] The handle image with the largest number of light spots is determined as the target handle image.

[0139] In one embodiment, the target light spot determination module 1110 is specifically configured to:

[0140] Based on the position of the light spot and the positions of the other light spots in the target handle image except the light spot, obtaining the distance between the light spot and the other light spots;

[0141] The distances between the light spot and the other light spots are sorted in ascending order, and the other light spots corresponding to the first specified number of distances are determined as the target light spots.

[0142] In one embodiment, the first matching module 1130 is specifically configured to:

[0143] Arrange adjacent light spots in the plane graph in ascending order of image light spot index to obtain a light spot list; and

[0144] Traversing each actual light spot in the set of actual adjacent light spots in a specified order, taking any traversed actual light spot as the initial position, and sorting the other light spots in the specified order to obtain a sorted list; and

[0145] For any light spot in the sorted list, adding the identifier of the actual light spot and the image spot index of the adjacent spot in the light spot list having the same position as the actual light spot in the sorted list to the same adjacent light spot matching pair;

[0146] Determining whether there is an actual light spot that has not been traversed in the actual adjacent light spot set;

[0147] If so, the process returns to the step of traversing each actual light spot in the actual adjacent light spot set in a specified order until there is no actual light spot in the actual adjacent light spot set that has not been traversed.

[0148] In one embodiment, the apparatus further comprises:

[0149] A second screening module 1191 is configured to project each actual light spot in the handle into a designated image based on the predicted positions and the actual positions of each light spot in the handle, and before obtaining the positions of each projected light spot, obtain, for any set of multiple predicted positions of the handle corresponding to the adjacent light spot matching pairs, a predicted gravity direction vector of the handle corresponding to the adjacent light spot matching pairs based on the predicted positions; and

[0150] Obtaining an actual gravity direction vector of the handle according to a current position of the electronic device that captures the target handle image;

[0151] Adjacent light spot matching pairs that need to be deleted are determined by using the predicted gravity direction vectors corresponding to each adjacent light spot matching pair and the actual direction vector, and the adjacent light spot matching pairs that need to be deleted are deleted.

[0152] In one embodiment, the second screening module 1191 determines the adjacent light spot matching pairs to be deleted by using the predicted gravity direction vectors and the actual direction vectors corresponding to the adjacent light spot matching pairs, specifically for:

[0153] For any adjacent light spot matching pair, obtaining the angle between the gravity direction vector and the actual direction vector according to the predicted gravity direction vector corresponding to the adjacent light spot matching pair;

[0154] If the angle between the gravity direction vectors is greater than a specified angle, the adjacent light spot matching pair is determined to be the adjacent light spot matching pair that needs to be deleted.

[0155] In one embodiment, the second matching module 1160 is specifically configured to:

[0156] For any other light spot in the designated image, obtaining distances between the other light spot and each projection light spot according to the position of the other light spot and the positions of each projection light spot;

[0157] If the shortest distance among the distances is less than the specified distance, the image spot index of the other spot and the identifier of the projection spot corresponding to the shortest distance are added to the same spot matching pair, and the spot matching pair is determined as the other spot matching pair.

[0158] In one embodiment, the identification determination module 1180 is specifically configured to:

[0159] Count the number of matching pairs of each spot after screening;

[0160] For each spot matching pair with the same image spot index, the spot matching pair with the largest number among the spot matching pairs is determined as the target spot matching pair corresponding to the image spot index, and the identifier of the actual spot in the target spot matching pair is determined as the identifier of the spot corresponding to the image spot index.

[0161] In one embodiment, the first screening module 1170 is specifically configured to:

[0162] For any predicted position of a handle, if the number of other light spot matching pairs corresponding to the predicted position is less than a second specified number, deleting the predicted position and other light spot matching pairs corresponding to the predicted position;

[0163] For any adjacent light spot matching pair, if multiple predicted positions corresponding to the adjacent light spot matching pair have been deleted, the adjacent light spot matching pair is deleted.

[0164] After introducing a method and apparatus for detecting a light spot mark in a handle image according to an exemplary embodiment of the present invention, an electronic device according to another exemplary embodiment of the present invention is introduced next.

[0165] Those skilled in the art will appreciate that various aspects of the present invention may be implemented as systems, methods, or program products. Therefore, various aspects of the present invention may be implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits," "modules," or "systems."

[0166] In some possible implementations, the electronic device according to the present invention may include at least one processor and at least one computer storage medium. The computer storage medium stores program code, and when the program code is executed by the processor, the processor executes the steps of the method for detecting a light spot mark in a handle image according to various exemplary embodiments of the present invention described above. For example, the processor may execute the following steps: Figure 5 Steps 501-508 shown in .

[0167] Refer to the following Figure 12 An electronic device 1200 according to this embodiment of the present invention will be described. Figure 12 The electronic device 1200 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present invention.

[0168] like Figure 12 As shown, electronic device 1200 is a general electronic device. Components of electronic device 1200 may include, but are not limited to, at least one processor 1201, at least one computer storage medium 1202, and a bus 1203 connecting different system components (including computer storage medium 1202 and processor 1201).

[0169] Bus 1203 represents one or more of several types of bus structures, including a computer storage media bus or computer storage media controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.

[0170] Computer storage media 1202 may include readable media in the form of volatile computer storage media, such as random access computer storage media (RAM) 1221 and / or cache storage media 1222 , and may further include read-only computer storage media (ROM) 1223 .

[0171] The computer storage medium 1202 may also include a program / utility 1225 having a set (at least one) of program modules 1224, such program modules 1224 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0172] The electronic device 1200 may also communicate with one or more external devices 1204 (e.g., a keyboard, pointing device, etc.), one or more devices that enable a user to interact with the electronic device 1200, and / or any device that enables the electronic device 1200 to communicate with one or more other electronic devices (e.g., a router, a modem, etc.). Such communication may occur via an input / output (I / O) interface 1205. Furthermore, the electronic device 1200 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 1206. As shown, the network adapter 1206 communicates with other modules of the electronic device 1200 via a bus 1203. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1200, including but not limited to microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0173] In some possible embodiments, various aspects of the method for detecting light spot marks in a handle image provided by the present invention can also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the method for detecting light spot marks in a handle image according to various exemplary embodiments of the present invention described above in this specification.

[0174] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access computer storage medium (RAM), a read-only computer storage medium (ROM), an erasable programmable read-only computer storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only computer storage medium (CD-ROM), an optical computer storage medium, a magnetic computer storage medium, or any suitable combination thereof.

[0175] The program product for detecting light spot markers in handle images according to embodiments of the present invention can be implemented as a portable compact disc read-only computer storage medium (CD-ROM) and include program code, which can be executed on an electronic device. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0176] A readable signal medium may include a data signal transmitted in baseband or as part of a carrier wave, which carries readable program code. Such a transmitted data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0177] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0178] The program code for performing the operations of the present invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user electronic device, partially on the user device, as a separate software package, partially on the user electronic device and partially on a remote electronic device, or entirely on the remote electronic device or server. In cases involving a remote electronic device, the remote electronic device can be connected to the user electronic device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external electronic device (e.g., through the Internet using an Internet service provider).

[0179] It should be noted that although several modules of the device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules described above may be embodied in a single module. Conversely, the features and functions of a single module described above may be further divided and embodied by multiple modules.

[0180] Furthermore, although the operations of the method of the present invention are described in a particular order in the accompanying drawings, this does not require or imply that these operations must be performed in this particular order, or that all illustrated operations must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0181] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk computer storage media, CD-ROMs, optical computer storage media, etc.) containing computer-usable program code.

[0182] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0183] These computer program instructions may also be stored in a computer-readable computer storage medium that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable computer storage medium produce an article of manufacture including an instruction device that implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0184] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0185] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A method for detecting a light spot mark in a handle image, characterized in that: include: For any light spot in the target handle image at the current moment, based on the position of the light spot, screen out a first specified number of target light spots adjacent to the light spot from other light spots in the target handle image except the light spot; and, Connecting the light spot with the first specified number of target light spots to obtain a plane figure; and For any preset set of actual adjacent light spots of the handle, each adjacent light spot in the plane figure is matched with each actual light spot in the set of actual adjacent light spots to obtain adjacent light spot matching pairs, wherein the adjacent light spot matching pairs include the image light spot index of the adjacent light spot and the identifier of the actual light spot that matches the adjacent light spot; For any adjacent light spot matching pair, based on the positions of each adjacent light spot in the adjacent light spot matching pair and the positions of each actual light spot, obtain a plurality of predicted positions of the handle corresponding to the adjacent light spot matching pair; For any predicted position, projecting each actual light spot in the handle into a designated image based on the predicted position and the positions of each actual light spot in the handle to obtain the position of each projected light spot; and Matching the projection light spot with other light spots in the designated image except for adjacent light spots in the plane figure according to the positions of the projection light spots and the positions of the light spots in the designated image, to obtain other light spot matching pairs; Screening the spot matching pairs based on the number of the other spot matching pairs to obtain screened spot matching pairs, wherein the spot matching pairs include the adjacent spot matching pairs and the other spot matching pairs; According to the number of the filtered light spot matching pairs, the identifier of each light spot in the target handle image is obtained.

2. The method according to claim 1, characterized in that The target handle image at the current moment is determined by: Use the target detection algorithm to perform spot detection on each handle image acquired at the current moment, and obtain each light spot in each handle image; The handle image with the largest number of light spots is determined as the target handle image.

3. The method according to claim 1, characterized in that The step of screening out a first specified number of target light spots adjacent to the light spot from light spots other than the light spot in the target handle image according to the position of the light spot includes: Based on the position of the light spot and the positions of the other light spots in the target handle image except the light spot, obtaining the distance between the light spot and the other light spots; The distances between the light spot and the other light spots are sorted in ascending order, and the other light spots corresponding to the first specified number of distances are determined as the target light spots.

4. The method according to claim 1, wherein The step of matching each adjacent light spot in the plane figure with each actual light spot in the actual adjacent light spot set to obtain each adjacent light spot matching pair includes: Arrange adjacent light spots in the plane graph in ascending order of image light spot index to obtain a light spot list; and Traversing each actual light spot in the set of actual adjacent light spots in a specified order, taking any traversed actual light spot as the initial position, and sorting the other light spots in the specified order to obtain a sorted list; and For any light spot in the sorted list, adding the identifier of the actual light spot and the image spot index of the adjacent spot in the light spot list having the same position as the actual light spot in the sorted list to the same adjacent light spot matching pair; Determining whether there is an actual light spot that has not been traversed in the actual adjacent light spot set; If so, the process returns to the step of traversing each actual light spot in the actual adjacent light spot set in a specified order until there is no actual light spot in the actual adjacent light spot set that has not been traversed.

5. The method according to claim 1, wherein Before projecting each actual light spot in the handle onto a designated image based on the predicted position and the actual position of each light spot in the handle to obtain the position of each projected light spot, the method further includes: For any set of multiple predicted positions of the handle corresponding to the adjacent light spot matching pairs, obtaining a predicted gravity direction vector of the handle corresponding to the adjacent light spot matching pairs based on the predicted positions; and Obtaining an actual gravity direction vector of the handle according to a current position of the electronic device that captures the target handle image; Adjacent light spot matching pairs that need to be deleted are determined by using the predicted gravity direction vectors corresponding to each adjacent light spot matching pair and the actual gravity direction vector, and the adjacent light spot matching pairs that need to be deleted are deleted.

6. The method according to claim 5, characterized in that The step of determining adjacent light spot matching pairs to be deleted by using the predicted gravity direction vectors corresponding to the adjacent light spot matching pairs and the actual gravity direction vectors includes: For any adjacent light spot matching pair, obtaining the angle between the gravity direction vector and the actual gravity direction vector according to the predicted gravity direction vector corresponding to the adjacent light spot matching pair; If the angle between the gravity direction vectors is greater than a specified angle, the adjacent light spot matching pair is determined to be the adjacent light spot matching pair that needs to be deleted.

7. The method according to claim 1, characterized in that The step of matching the projection light spot with other light spots in the designated image except for adjacent light spots in the plane figure by using the positions of the projection light spots and the positions of the light spots in the designated image to obtain other light spot matching pairs includes: For any other light spot in the designated image, obtaining distances between the other light spot and each projection light spot according to the position of the other light spot and the positions of each projection light spot; If the shortest distance among the distances is less than the specified distance, the image spot index of the other spot and the identifier of the projection spot corresponding to the shortest distance are added to the same spot matching pair, and the spot matching pair is determined as the other spot matching pair.

8. The method according to claim 1, characterized in that Obtaining the identification of each light spot in the target handle image according to the number of the filtered light spot matching pairs includes: Count the number of matching pairs of each spot after screening; For each spot matching pair with the same image spot index, the spot matching pair with the largest number among the spot matching pairs is determined as the target spot matching pair corresponding to the image spot index, and the identifier of the actual spot in the target spot matching pair is determined as the identifier of the spot corresponding to the image spot index.

9. The method according to claim 1, characterized in that The step of screening the spot matching pairs based on the number of the other spot matching pairs to obtain the screened spot matching pairs includes: For any predicted position of a handle, if the number of other light spot matching pairs corresponding to the predicted position is less than a second specified number, deleting the predicted position and other light spot matching pairs corresponding to the predicted position; For any adjacent light spot matching pair, if multiple predicted positions corresponding to the adjacent light spot matching pair have been deleted, the adjacent light spot matching pair is deleted.

10. An electronic device, characterized in that: comprising a processor and a memory, wherein the processor and the memory are connected via a bus; The memory stores a computer program, and the processor is configured to perform the following operations based on the computer program: For any light spot in the target handle image at the current moment, based on the position of the light spot, screen out a first specified number of target light spots adjacent to the light spot from other light spots in the target handle image except the light spot; and, Connecting the light spot with the first specified number of target light spots to obtain a plane figure; and For any preset set of actual adjacent light spots of the handle, each adjacent light spot in the plane figure is matched with each actual light spot in the set of actual adjacent light spots to obtain adjacent light spot matching pairs, wherein the adjacent light spot matching pairs include the image light spot index of the adjacent light spot and the identifier of the actual light spot that matches the adjacent light spot; For any adjacent light spot matching pair, based on the positions of each adjacent light spot in the adjacent light spot matching pair and the positions of each actual light spot, obtain a plurality of predicted positions of the handle corresponding to the adjacent light spot matching pair; For any predicted position, projecting each actual light spot in the handle into a designated image based on the predicted position and the positions of each actual light spot in the handle to obtain the position of each projected light spot; and Matching the projection light spot with other light spots in the designated image except for adjacent light spots in the plane figure according to the positions of the projection light spots and the positions of the light spots in the designated image, to obtain other light spot matching pairs; Screening the spot matching pairs based on the number of the other spot matching pairs to obtain screened spot matching pairs, wherein the spot matching pairs include the adjacent spot matching pairs and the other spot matching pairs; According to the number of the filtered light spot matching pairs, the identifier of each light spot in the target handle image is obtained.

Citation Information

Patent Citations

  • Optical projection module, and sensing apparatus and device

    CN109445239A

  • Virtual reality equipment and handle positioning method

    CN114489310A

Cited By

  • A bone joint motion rehabilitation training method and device based on virtual reality technology

    CN118718376B