Touch object recognition method and apparatus for infrared touch frame, and infrared touch device
By calculating infrared occlusion data and matching loss values, the infrared touch frame can identify the rotation angle of complex shape touch objects with high accuracy, solving the problem of low recognition accuracy and accuracy in the prior art, and providing a richer interactive experience.
Patent Information
- Application Number
- PCT/CN2024/076314
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2025-08-14
AI Technical Summary
When the existing infrared touch frame recognizes the shape and rotation angle of the touch object, the accuracy and accuracy are low, making it difficult to meet the diverse touch recognition scene needs.
By obtaining infrared occlusion data of the touch object to be identified, the first projection length at each projection angle is calculated, and the loss value is calculated with the preset touch object at different rotation angles and the second projection length at different rotation angles and projection angles is calculated, and the rotation angle of the touch object to be identified is determined.
It realizes high-precision recognition of various complex shape touch objects and their rotation angles, reduces the requirements for infrared lamp density and scanned light, improves noise resistance, and provides a diversified interactive experience for infrared touch.
Smart Images

Figure CN2024076314_14082025_PF_FP_ABST
Abstract
Description
Infrared touch frame touch object recognition method, device and infrared touch device Technical Field
[0001] The present application relates to the field of touch frame technology, and in particular to a touch object recognition method and apparatus for an infrared touch frame, an infrared touch device, a computer device, and a computer-readable storage medium. Background Art
[0002] The infrared touch frame is a device that performs touch positioning and recognition through the emission and reception of infrared lamps. The system scans and receives the infrared light signals of the lamps and performs touch positioning and recognition based on the obstruction of the infrared light signals.
[0003] Currently, infrared touch requires not only the location of the touch point, but also the recognition of the shape and rotation angle of the touch object. Currently, the recognition of the shape and rotation angle of infrared touch objects is mainly based on image recognition methods. However, image recognition methods have low recognition accuracy and relatively low precision, making it difficult to meet the needs of more touch recognition scenarios. As shown in Figure 1, which is a schematic diagram of an infrared touch frame, due to the inherent characteristics of the detection network formed by the interweaving of infrared detection light, different rotation angles of the same equilateral triangle will result in very different recognized polygon shapes, thus affecting the recognition of the shape and rotation angle of the touch object. Therefore, it can be seen that the existing technology for recognizing the shape and rotation angle of touch objects still has significant defects in terms of usage conditions, application scope, accuracy and precision.
[0004] Summary of the Invention
[0005] Based on this, it is necessary to provide a touch object recognition method and apparatus for an infrared touch frame, an infrared touch device, a computer device, and a computer-readable storage medium to address one of the above technical issues.
[0006] A touch object recognition method for an infrared touch frame, comprising:
[0007] Acquire infrared occlusion data of the touch object to be identified, and calculate a first projection length occluded by the touch object to be identified at each projection angle according to the infrared occlusion data;
[0008] Obtaining second projection lengths of a preset touch object at different rotation angles and projection angles, and calculating a matching loss value between the touch object to be identified and the preset touch object based on the first projection length and the second projection length;
[0009] The rotation angle of the touch object to be identified is obtained according to the matching loss value.
[0010] In one embodiment, the touch object recognition method of the infrared touch frame further includes:
[0011] Get the geometric parameters of each preset touch object;
[0012] Calculating projection angle-projection length projection relationship curves corresponding to each preset touch object at different rotation angles according to the geometric figure parameters;
[0013] The projection relationship curves under several rotation angles are selected and stored, and are used to calculate the second projection length corresponding to the preset touch object under different projection angles according to the selected rotation angles and the projection relationship curves.
[0014] In one embodiment, before calculating the first projection length blocked by the touch object to be identified at each projection angle according to the infrared blocking data, the method further includes:
[0015] calculating shape parameters of the touch object to be identified according to the infrared occlusion data, and screening preset touch objects whose shapes do not match the touch object to be identified according to the shape parameters;
[0016] The shape parameters include the width, height and / or area of the touch object.
[0017] In one embodiment, before calculating the matching loss value between the touch object to be identified and the preset touch object according to the first projection length and the second projection length, the method further includes:
[0018] Unmatched preset touch objects are deleted from the preset touch objects, and second projection lengths corresponding to the remaining preset touch objects at various projection angles are selected for calculating the matching loss value.
[0019] In one embodiment, the second projection length includes: a projection length of each projection angle of the preset touch object at different rotation angles, a shortest projection length, and a longest projection length.
[0020] In one embodiment, before calculating the matching loss value between the touch object to be identified and the preset touch object according to the first projection length and the second projection length, the method further includes:
[0021] Comparing the first projection length of the touch object to be identified at each projection angle with the second projection length corresponding to each preset touch object at different rotation angles to identify the target touch object corresponding to the touch object to be identified;
[0022] The projection length corresponding to the target touch object at each projection angle is selected to calculate the matching loss value.
[0023] In one embodiment, before calculating the matching loss value between the touch object to be identified and the preset touch object according to the first projection length and the second projection length, the method further includes:
[0024] From the second projection length of the target touch object at the projection angle, second projection lengths at some discrete projection angles are selected for calculating the matching loss value.
[0025] In one embodiment, the calculating of the matching loss value between the touch object to be identified and the preset touch object according to the first projection length and the second projection length includes:
[0026] Selecting some angles as target angles from all available projection angles according to a priority strategy;
[0027] A matching loss value between a first projection length of the touch object to be identified at the target angle and a second projection length of each preset touch object at the target angle is calculated.
[0028] In one embodiment, the touch object recognition method of the infrared touch frame further includes:
[0029] If the matching loss value calculated by the currently selected target angle cannot obtain the rotation angle of the touch object to be identified, another part of the projection angle is selected as the target angle according to the priority strategy, and so on, until the rotation angle of the touch object to be identified is obtained, or until all projection angles are selected.
[0030] In one embodiment, before calculating the first projection length blocked by the touch object to be identified at each projection angle according to the infrared blocking data, the method further includes:
[0031] The projection angles of the infrared touch frame scan are obtained according to the infrared shielding data, and the projection angles without projection length are excluded to obtain a valid projection angle range.
[0032] In one embodiment, the step of calculating the first projection length blocked by the touch object to be identified at each projection angle according to the infrared blocking data includes:
[0033] Obtain infrared blocking light at various projection angles, and perform interpolation and smoothing based on the infrared blocking light to obtain the real blocking light;
[0034] The projection lengths at various projection angles are calculated according to the actual blocked light to obtain a first projection length of the touch object to be identified.
[0035] In one embodiment, the calculating of the matching loss value between the touch object to be identified and the preset touch object according to the first projection length and the second projection length includes:
[0036] Obtaining the first projection length of the touch object to be identified at the current projection angle;
[0037] Obtain the second projection length of each preset touch object at the current projection angle;
[0038] At each projection angle, respectively calculating a matching loss value between a first projection length of the touch object to be identified and a second projection length of each preset touch object at different rotation angles;
[0039] A matching loss value set is formed according to the matching loss values calculated at each projection angle.
[0040] In one embodiment, obtaining the rotation angle of the touch object to be identified according to the matching loss value includes:
[0041] Get the minimum loss value in the matching loss value set;
[0042] If the minimum loss value is smaller than a set threshold, the rotation angle of the touch object to be identified is determined according to the minimum loss value.
[0043] In one embodiment, determining the rotation angle of the touch object to be identified according to the minimum loss value includes:
[0044] A preset touch object corresponding to the minimum loss value and its rotation angle are determined, and the rotation angle of the touch object to be identified is determined according to the rotation angle of the preset touch object.
[0045] In one embodiment, determining the rotation angle of the touch object to be identified according to the preset rotation angle of the touch object includes:
[0046] The closest rotation angle is searched near the preset rotation angle of the touch object corresponding to the minimum loss value, and is used as the rotation angle of the touch object to be identified.
[0047] In one embodiment, the touch object recognition method of the infrared touch frame further includes:
[0048] The shape of the touch object to be identified is determined according to the preset touch object corresponding to the minimum loss value.
[0049] In one embodiment, the matching loss value includes: the Euclidean distance, the Manhattan distance, or the Mahalanobis distance between the first projection length and the second projection length.
[0050] A touch object recognition device for an infrared touch frame, comprising:
[0051] a projection calculation module, configured to obtain infrared occlusion data of a touch object to be identified, and calculate a first projection length occluded by the touch object to be identified at each projection angle based on the infrared occlusion data;
[0052] a matching calculation module for obtaining a second projection length of a preset touch object at different rotation angles and projection angles, and calculating a matching loss value between the touch object to be identified and the preset touch object based on the first projection length and the second projection length;
[0053] The angle recognition module is used to obtain the rotation angle of the touch object to be recognized according to the matching loss value.
[0054] An infrared touch device, comprising: an infrared touch frame and a controller; wherein the infrared touch frame performs touch operation through a preset touch object;
[0055] The infrared touch frame is used to scan infrared occlusion data of a touch object to be identified;
[0056] The controller is configured to execute the steps of the touch object recognition method of the infrared touch frame.
[0057] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the touch object recognition method of the infrared touch frame when executing the computer program.
[0058] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the touch object recognition method for an infrared touch frame.
[0059] The above-mentioned touch object recognition method, device, infrared touch device, computer device and computer-readable storage medium of the infrared touch frame first obtain infrared occlusion data of the touch object to be identified, calculate the first projection length occluded by the touch object to be identified at various projection angles based on the infrared occlusion data, then obtain the second projection length of the preset touch object at different rotation angles and various projection angles, and calculate the matching loss value between the touch object to be identified and the preset touch object based on the first projection length and the second projection length. Finally, obtain the rotation angle of the touch object to be identified based on the matching loss value. This technical solution determines the touch object and its rotation angle by calculating the overall loss, can support the recognition of touch objects of various complex shapes and their rotation angles, has high recognition accuracy, low requirements on the density of infrared lamps and the number of scanning lights, and strong anti-noise ability, providing a more diverse interactive experience for infrared touch. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] FIG1 is a schematic diagram of an example infrared touch frame;
[0061] FIG2 is a schematic diagram of an example of light angles;
[0062] FIG3 is a schematic diagram of an example projection length;
[0063] FIG4 is a schematic diagram of an example of a touch object shape;
[0064] FIG5 is a schematic diagram of an exemplary angle-projection length relationship;
[0065] FIG6 is a flow chart of a touch object recognition method of an infrared touch frame according to an embodiment;
[0066] FIG7 is a schematic diagram of an example of interpolation processing;
[0067] FIG8 is a flow chart of a method for calculating a matching loss value according to an embodiment;
[0068] FIG9 is a schematic diagram of an edge projection of an example;
[0069] FIG10 is a schematic structural diagram of a touch object recognition device of an infrared touch frame according to an embodiment;
[0070] FIG11 is a schematic diagram of an exemplary computer device structure. DETAILED DESCRIPTION
[0071] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0072] For the application scenario of the touch object recognition method of the infrared touch frame of the present application, refer to Figure 1, which is a schematic diagram of an example infrared touch frame. In the infrared touch frame in the figure, there are an array of transmitting lamps and an array of receiving lamps. Each transmitting lamp and receiving lamp can be compiled with a corresponding serial number, such as the transmitting lamps T1, T2, ..., T n , receiving lamps R1, R2, ... R m The transmitting and receiving lamp arrays transmit and receive light, respectively, identifying the touched object by blocking light. The shape and rotation angle of the touched object are part of the interaction, enhancing the user experience. However, current technical solutions determine the shape and rotation angle of the touched object based on the distance and angle between a specific point and the boundary light. This requires a high density of the infrared light network, and the accuracy and precision of rotation angle recognition for complex graphics are limited.
[0073] To this end, the present application provides a touch object recognition method for an infrared touch frame, which can support the recognition of touch objects of various complex shapes and their rotation angles, has high recognition accuracy, low requirements on the density of infrared lamps and the number of scanning lights, and strong anti-noise ability, providing a more diverse interactive experience for infrared touch.
[0074] In the infrared touch frame, the placement of each infrared emitting tube and infrared receiving tube is fixed—for example, the infrared emitting tube is placed at the bottom and right side, and the infrared receiving tube is placed at the top and left side, as shown in Figure 1. Each ray of light is emitted by a specific infrared emitting tube and received by a specific infrared receiving tube. Since the positions of the infrared emitting tubes and infrared receiving tubes in the infrared touch frame are known, each ray of light has a specific projection angle α. Light rays with different projection angles α exist in the infrared touch frame, and the projection angle of each ray of light within the coordinate system of the infrared touch frame is known. See Figure 2 for details, which is a schematic diagram of ray angles, illustrating a ray of light with a projection angle α.
[0075] When the touch object is placed in the infrared touch frame, the angle of each blocked light is known. Among all the blocked light rays of the touch object, the projection length of the light rays of the touch object at all projection angles α is L = f(α). Since the touch object has a specific shape, when it rotates at different angles, the projection length function f(α) will also change. Considering the rotation angle β of the touch object, the projection length of the light rays of the touch object at the projection angle α is L β =f β (α), the rotation angle β is the rotation angle of the touch object in the infrared touch frame coordinate system. When the touch object is at the set rotation angle β, its projection length L β =ρ max (α)-ρ min (α), where ρ max (α) is the projection value of the light at the leftmost position of the touch object under the projection angle α, ρ min (α) is the projection value of the light at the rightmost position of the touch object under the projection angle α. Referring to FIG3 , FIG3 is a schematic diagram of an example of projection length, and the projection length L under the rotation angle β is β The projection values of the two rays ρ max (α) and ρ min (α) The length between
[0076] In one embodiment, touch objects of various shapes can be preset, defined as preset touch objects, and their projection lengths are the second projection lengths. Then, x geometric figures of preset touch objects are set in the infrared touch screen system, and then the second projection lengths L corresponding to the projection angles α of each preset touch object at different rotation angles β are calculated based on the geometric figure parameters. β 1. L β 2. ...L βx, for example, setting three preset touch objects, the rotation angle is 1° to 360°, then there are 360 rotation angles, and the projection angle is 1° to 180°, then there are 180 projection angles, then the stored second projection lengths are 3×360×180=194400; in actual application, the rotation angle and projection length to be used are selected according to needs.
[0077] As shown in Figure 4, Figure 4 is a schematic diagram of an example of a preset touch object shape. The figure shows a 2D plane diagram of a group of preset touch objects. In the figure, rectangles, triangles, and squares are used as examples. The preset touch objects are different in shape or size. Generally, the greater the difference in shape and size, the higher the recognition accuracy. Based on the geometric figures of each preset touch object, the relevant parameters of each geometric figure are initialized, and the projection length L of the three preset touch objects at different rotation angles β and different projection angles α are calculated. β 1. L β 2. L β 3.
[0078] As shown in FIG5 , FIG5 is a schematic diagram of an exemplary rotation angle-projection angle-projection length relationship, which shows that when the rotation angle β is a specific value, the projection angle α of the touch object-projection length f β (α) relationship diagram; As can be seen in the figure, the left figure is a schematic diagram of a geometric figure; it includes parameter diagrams of three shapes: square, rectangle and triangle; the right figure is the projection angle α-projection length f β (α) relationship diagram, showing the three preset geometric figures at different projection angles α and projection lengths L β 1. L β 2. L β 3 relationship curve.
[0079] For example, the geometric figures of each preset touch object can be pre-calculated, and the projection length f of the projection angle α within the range of 2π (360°) under different rotation angles β can be calculated. β (α) change curve, get the rotation angle β-projection angle α-projection length f β Alternatively, in order to reduce the amount of data storage, only specific rotation angles β = β1, β2, ... β can be stored for the preset touch object. k In this case, k rotation angle values are stored and fitted into a projection relationship curve; k = 0° as an example, the projection length of the corresponding projection angle α in the range of 2π (360°) can be obtained by The change curve is represented, and then during the detection, the projection relationship curve under this specific rotation angle can be used to calculate different rotation angles β-projection angle α-projection length L in real time. β The corresponding relationship.
[0080] In one embodiment, referring to FIG6 , FIG6 is a flow chart of a touch object recognition method of an infrared touch frame according to an embodiment, including the following steps:
[0081] Step S10 : acquiring infrared occlusion data of the touch object to be identified, and calculating a first projection length occluded by the touch object to be identified at each projection angle according to the infrared occlusion data.
[0082] Specifically, the touch object to be identified is the touch object currently being used and detected in real time. When it is detected that the geometric parameters of the touch object to be identified are greater than the set threshold, such as the length, height or area is greater than the set threshold, the projection length L of each touch object to be identified at each projection angle α is calculated according to L=f(α). θ ,α∈[0,2π), where θ is the current rotation angle of the touch object to be identified, that is, the rotation angle value that needs to be identified.
[0083] In some cases, due to the light arrangement of the infrared touch screen, the touch object to be identified has no projection value at some projection angles α, so the projection length L of the relevant projection angle can be ignored. θ The calculation only calculates the projection length L corresponding to the projection angle α with the projection value θ That's it.
[0084] During infrared touch recognition, infrared occlusion data generated by the touch object to be identified on the current touch screen during the touch operation is obtained. The infrared occlusion data generally includes information such as the coordinate axis (X / Y) to which the light belongs, the corresponding transmitting light and receiving light, the geometric equation of the light, and the occlusion depth. The position of the touch object is calculated based on the infrared occlusion data using a commonly used positioning and recognition algorithm, as well as the first projection length occluded by the touch object to be identified at each projection angle. Since there may be multiple touch objects to be identified touching the touch screen at the same time, multiple sets of infrared occlusion data can be scanned based on multiple projection angles during the infrared lamp scanning process of the touch screen, thereby obtaining the first projection length of each touch object to be identified that is occluded at multiple different projection angles.
[0085] In one embodiment, when calculating the first projection length, due to the asymmetry and incompleteness of the optical network, interpolation, smoothing, and other processing may be performed on it before calculation; specifically, since the infrared lamps have a certain spacing and the light cannot cover all angles, for a specific projection angle, the light coverage is not continuous, and therefore it may not be possible to directly obtain the accurate first projection length at this projection angle by blocking the light.
[0086] As shown in FIG7 , FIG7 is a schematic diagram of an example of interpolation processing. In the figure, the projection angle α is a scanning angle of 120°. Since the infrared light blocked by the touch object (the shape in the figure is a rectangle as an example) is determined according to the position of the infrared receiving tube, there is a certain distance between the two receiving tubes. There is a certain error when calculating based on the blocking of the infrared light. At this time, the real blocking light can be fitted through interpolation and smoothing. In the figure, the dotted line is the infrared light, and the solid line is the real blocking light. At this time, the accurate projection length L θ =rho, as shown in the figure, is the distance between the two solid lines.
[0087] As in the above embodiment, interpolation and smoothing are performed on the light rays at similar angles to obtain their projection lengths. The real blocked light rays can be obtained through interpolation and smoothing, thereby accurately calculating the first projection length.
[0088] Step S20 , obtaining the second projection lengths of the preset touch object at different rotation angles and projection angles, and calculating the matching loss value between the touch object to be identified and the preset touch object according to the first projection length and the second projection length.
[0089] In this step, the pre-calculated second projection lengths corresponding to the projection angles of each preset touch object at different rotation angles are used to calculate the matching degree between the touch object to be identified and the touch object to be identified by feature matching. Specifically, for the touch object to be identified on the touch screen, its first projection length at each projection angle is used to calculate the projection length L corresponding to the projection angle α of each preset touch object at different rotation angles β. β 1. L β 2. ...L β x, the matching loss value is the feature matching loss, which can be expressed by a loss function and can be used to measure the difference between two objects.
[0090] For example, among the x preset touch objects, the subscript is used to distinguish the projection length value of each preset touch object. For the first preset touch object, the second projection length L under each projection angle α when the rotation angle β is calculated. β 11 and the first projection length L of the touch object to be identifiedθ The matching loss value Loss1(θ),θ∈[0,2π); Similarly, for the second preset touch object, calculate its second projection length L under each projection angle α when the rotation angle β β 2 and the first projection length L of the touch object to be identified θ Matching loss value: Loss2(θ),θ∈[0,2π), and so on, until the last preset touch object x, the second projection length L under each projection angle α when the rotation angle β β x and the first projection length L of the touch object to be identified θ Matching loss value Loss x (θ),θ∈[0,2π).
[0091] In one embodiment, in the process of calculating the matching loss value in step S20, if there are multiple touch objects to be identified, the above calculation process can be performed by executing the same calculation process for each touch object to obtain a set of matching loss values corresponding to each touch object to be identified. Referring to FIG8 , FIG8 is a flow chart of a method for calculating matching loss values according to an embodiment. The calculation process may specifically include the following:
[0092] S201: Obtain a first projection length of a touch object to be identified at a current projection angle.
[0093] For each touch object to be identified, at a current projection angle having a projection value, a first projection length of the touch object at the current projection angle is calculated.
[0094] S202: Obtain a second projection length of each preset touch object at the current projection angle.
[0095] For each preset touch object, its second projection length under the same current projection angle can also be obtained.
[0096] S203 , at each projection angle, respectively calculating a matching loss value between a first projection length of the touch object to be identified and a second projection length of each preset touch object at different rotation angles.
[0097] S204: forming a matching loss value set according to the matching loss values calculated at each projection angle.
[0098] Since the preset touch object has different rotation angles, the matching loss values under each projection angle α at different rotation angles β are obtained, and finally a matching loss value set is formed.
[0099] For example, the matching loss value calculation method of the above embodiment may be as follows:
[0100] Among them, Loss(θ) is the matching loss value under the rotation angle θ, L θ is the first projection length of the touch object to be identified at the projection angle α calculated in real time, and θ is the rotation angle to be calculated; L β The second projection length of the rotation angle at the projection angle α, including the pre-stored etc.; D(a,b) is the loss calculation function, and common optional ones include Euclidean distance, Manhattan distance, and Mahalanobis distance.
[0101] Step S30 : obtaining the rotation angle of the touch object to be identified according to the matching loss value.
[0102] In this step, since the matching loss value can measure the difference between the touch object to be identified and the preset touch object, by finding a matching loss value within a certain range among all the calculated matching loss values, it can be considered that the rotation angle of the touch object to be identified is consistent with the preset touch object, thereby matching the rotation angle corresponding to the touch object to be identified.
[0103] In one embodiment, the method for obtaining the rotation angle of the touch object to be identified in step S30 may include the following steps:
[0104] A minimum loss value in the matching loss value set is obtained. If the minimum loss value is less than a set threshold, the rotation angle of the touch object to be identified is determined according to the minimum loss value.
[0105] In this embodiment, when determining the rotation angle of the touch object to be identified, the preset touch object and its rotation angle corresponding to the minimum loss value can be determined, and then the rotation angle of the touch object to be identified is determined according to the rotation angle of the preset touch object.
[0106] Specifically, the minimum loss value θ can be obtained by comparison min , if the minimum loss value θ min Less than or equal to the set threshold, continue matching, if there is θ min ∈[β1, β2, ... β k ], then the rotation angle β corresponding to the minimum loss value k As the rotation angle θ of the touch object to be identified, the match is successful. min If the value is greater than the threshold, the match fails.
[0107] In one embodiment, considering that the preset rotation angle and projection angle of the touch object are limited, that is, not every angle is set, all pre-stored projection angles may not necessarily match the corresponding rotation angle.
[0108] Accordingly, when matching the rotation angle, the closest rotation angle may be searched near the preset rotation angle of the touch object corresponding to the minimum loss value, and used as the rotation angle of the touch object to be identified.
[0109] In addition, when the matching loss values are very close at adjacent projection angles, the projection angles can be averaged to obtain the appropriate minimum loss value θ min For example, when the projection angle is 10°, the matching loss value is l1, when the projection angle is 11°, the matching loss value is greater than or equal to l2, when the projection angle is 12°, the matching loss value is greater than or equal to l2, and when the projection angle is 13°, the matching loss value is l1. Projection angles of 11° and 12° have the same matching loss value. At this time, the rotation angle is judged to be the average value of the corresponding rotation angles when the projection angles are 11° and 12°, that is, it is assumed to be the minimum loss value corresponding to the projection angle of 11.5°.
[0110] In one embodiment, if the shape of the touch object to be identified has not been determined before matching, the shape of the touch object to be identified may also be determined according to the preset touch object corresponding to the minimum loss value during the matching process.
[0111] Specifically, when the minimum loss value is matched, the shape of the touch object to be identified is determined according to the preset touch object corresponding to the minimum loss value, and reported to the touch positioning system of the infrared touch screen.
[0112] As in the above embodiment, the matching process can not only match the closest rotation angle, but also determine which shape of the preset touch object, such as triangle, square, rectangle, etc., the shape of the touch object to be identified corresponds to.
[0113] As in the technical solutions of the aforementioned embodiments, the touch object to be identified and its rotation angle are determined by calculating the overall loss, which can support the identification of touch objects to be identified and their rotation angles of various complex shapes, with high recognition accuracy, low requirements on the density of infrared lamps and the number of scanning lights, and strong anti-noise ability, providing a more diverse interactive experience for infrared touch.
[0114] In order to make the technical effects of the technical solution of this application clearer, it is described below with reference to the accompanying drawings and more embodiments.
[0115] In one embodiment, considering that direct matching calculations consume a lot of computing power, in order to reduce the amount of matching calculations, unmatched shapes can be preliminarily excluded based on the shape parameters of the touch object to be identified, such as the width, height, area and other information of the touch object, thereby reducing the amount of second projection length data of the preset touch object that needs to be matched.
[0116] Accordingly, before calculating the matching loss value in step S20, shape parameters such as width, height, and area of the touch object to be identified can also be calculated based on the infrared occlusion data to exclude the shapes of preset touch objects that do not match the touch object to be identified; the unmatched preset touch objects and their saved second projection lengths and other data are deleted from each preset touch object, and the second projection lengths corresponding to the remaining preset touch objects are selected for calculating the matching loss value.
[0117] As in the technical solution of the above embodiment, since the shapes of different preset touch objects are different, infrared occlusion data is obtained based on scanning. These infrared occlusion data can be used to first calculate the width, height, area, etc., thereby eliminating some interfering calculation items and reducing the amount of data for matching calculation, thereby improving recognition efficiency.
[0118] In one embodiment, in order to further reduce the amount of matching calculations, the shape of the touch object to be identified can be identified before calculating the matching loss value, so that the projection length data of the preset touch object corresponding to the determined touch object shape can be directly selected for calculation when calculating the matching loss value.
[0119] Accordingly, in the case of multiple preset touch objects, once a preset touch object of a specific shape is determined, in the subsequent continuous touch process, only the data of the second projection length of the preset touch object of the determined shape is used, and the data of preset touch objects of other shapes are no longer needed.
[0120] Specifically, the projection lengths of the preset touch object at different rotation angles, the shortest projection length, and the longest projection length are used to compare the projection length of the touch object to be identified at the projection angle with the corresponding projection lengths of each preset touch object at different rotation angles to identify the target touch object corresponding to the touch object to be identified (that is, the preset touch object of which shape); then, only the projection length corresponding to the target touch object at each projection angle is selected to calculate the matching loss value.
[0121] For example, as shown in FIG5 , among the triangle, rectangle, and square shapes in the aforementioned examples, the shortest projection length of the rectangle is much smaller than the shortest projection length of the triangle and the square. Assuming that the current first projection length is found to be within 50-80 mm through comparison, the preset touch object can be directly identified as a rectangular shape, and the second projection length of the rectangle can be directly used to calculate the matching loss value.
[0122] In one embodiment, after the shape of the touch object to be identified is identified, the second projection lengths at some discrete projection angles may be selected from the second projection lengths of the target touch object at various projection angles for calculating the matching loss value.
[0123] As in the technical solution of the above embodiment, the shape of the touch object to be identified is first attempted through parameters such as projection length, shortest projection length, and longest projection length. If it can be identified, the matching loss value can be calculated using only the second projection length of the corresponding target touch object, which greatly reduces the amount of calculation and improves recognition efficiency.
[0124] In one embodiment, in order to optimize the matching calculation method, when selecting the projection angle for calculation, some angles can be selected from all available projection angles as target angles according to a priority strategy; then, the matching loss value between the first projection length of the touch object to be identified at the target angle and the second projection length of each preset touch object at the target angle is calculated.
[0125] As in the solution of the above embodiment, some projection angles are selected as target angles for calculation according to priority, thereby completing the matching process more quickly.
[0126] Furthermore, considering that the selected projection angle cannot match the rotation angle, if the matching loss value calculated by the currently selected target angle cannot obtain the rotation angle of the touch object to be identified, another part of the projection angle can be selected as the target angle according to the priority strategy, and so on, until the rotation angle of the touch object to be identified is obtained, or until all the projection angles are selected.
[0127] As in the technical solution of the above embodiment, some projection angles of the preset touch object are first selected to calculate the matching loss value. If the corresponding rotation angle can be matched, there is no need to use the remaining projection angles for calculation. If the selected projection angles do not match the rotation angle, the next projection angle is selected for calculation. Since all available projection angles are selected one by one to calculate their matching loss values, the amount of calculation can be reduced to a certain extent, saving computing resources.
[0128] In one embodiment, when selecting the projection angle, the angle scanned by the infrared touch frame can usually be used as the valid projection angle range. However, since some projection angles have no projection length information, in order to reduce invalid calculations, they can be excluded before calculating the matching loss value.
[0129] Therefore, before calculating the first projection length, various projection angles scanned by the infrared touch frame may be obtained according to the infrared shielding data, and projection angles without projection length may be excluded to obtain a valid projection angle range.
[0130] For example, as shown in Figure 9, Figure 9 is an edge projection diagram of an example. At the corner position of the infrared touch frame, when the touch object is in the edge area of the infrared scanning frame, due to the non-cross-axis scanning method (only infrared light from the bottom to the top and from the right to the left), there is no red light from the X-axis to the Y-axis. The touch object shown in the figure has projection light only on the right side, and the projection on the left side has exceeded the boundary of the frame, and the projection light of the dotted part is missing. Since the corresponding projection angle generates the projection light on the left, the projection length cannot be determined. At this time, this part of the projection angle can be discarded, and the projection angle without projection length is excluded to finally obtain a valid projection angle range for calculating the first projection length. The discarding of this part of the projection angle does not affect the recognition of the touch object to be identified and the detection of the rotation angle.
[0131] In addition, in the cross-axis scanning scheme of the infrared touch frame (there is infrared light from the X-axis to the Y-axis), due to the limited working angle of the infrared lamp, there may be some projection angles without projection lengths. The relevant projection angles without corresponding projection lengths are removed.
[0132] Based on the touch object recognition solution of the infrared touch frame provided in the embodiment of the present application, an application example is listed below.
[0133] In this application example, assuming that the touch object to be identified is a rectangular eraser, the projection length L of the rectangular eraser at different projection angles is calculated. β , and use this as the default parameter for rotation angle recognition to calculate the projection length L of the current rectangular eraser at different rotation angles α θ ,α∈[0,2π), calculate the maximum value ρ of the first projection length max and the minimum value ρ min Each shape has a reported ID, so the application can determine the shape of the current touch object based on the obtained ID.
[0134] For example, the ID of a rectangular eraser is 1, and if it is a non-eraser, the ID is set to a default value of 0. Specifically, the rotation angle recognition process of this example includes the following steps:
[0135] (1) Infrared touch scanning is started to obtain infrared occlusion light signals, and the position and area of the touch object to be identified are calculated based on the infrared occlusion light signals using a touch recognition algorithm.
[0136] (2) If the minimum width and height of the touch object to be identified exceeds the short side length of the preset rectangular eraser, and the maximum length and width are less than 1.5 times the diagonal length of the rectangular eraser, the preset touch object shape recognition process is entered.
[0137] (3) Calculating the first projection length of the touch object to be identified at each projection angle at different rotation angles based on all infrared blocking light signals.
[0138] Since the infrared lamps have a certain distance and the infrared light cannot cover all projection angles, the infrared light network is asymmetric and incomplete. Therefore, some projection angles cannot be directly obtained by infrared blocking light. In order to obtain the accurate projection length at this projection angle, when calculating the projection length, the infrared blocking light of similar projection angles can be interpolated, smoothed, etc., and finally the first projection length L is obtained. θ ,α∈[0,2π).
[0139] (4) Select some projection angles as the target angle range.
[0140] Since in the edge area, there may be only one side of the projection information, and the projection of the other side has exceeded the boundary, this part of the projection information can be discarded; it does not affect the shape recognition and rotation angle detection of the touch object to be identified.
[0141] (5) Calculate the rotation angle matching loss value Loss(θ) corresponding to the touch object to be identified in the target angle range.
[0142] (6) Identify the shape and rotation angle of the touch object to be identified based on the minimum loss value.
[0143] Compare and get the minimum loss value θ min , if the minimum loss value θ min If the value is less than or equal to the set threshold, the match is successful, and the rotation angle of the touch object to be identified is θ min ; If θ min If the value is greater than the threshold, the match fails. If the match succeeds, the shape of the touch object (rectangular eraser) and its rotation angle are reported, that is, shape Id = 1, and the reported rotation angle is θ min If the match fails, Id=0 is reported and the rotation angle is 0°.
[0144] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0145] Based on the same inventive concept, embodiments of the present application also provide an infrared touch frame touch object recognition device for implementing the aforementioned infrared touch frame touch object recognition method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of the one or more embodiments of the infrared touch frame touch object recognition device provided below can be found in the aforementioned limitations of the infrared touch frame touch object recognition method and will not be further elaborated here.
[0146] In one embodiment, as shown in FIG10 , FIG10 is a schematic structural diagram of a touch object recognition device of an infrared touch frame according to an embodiment, including:
[0147] The projection calculation module 10 is used to obtain infrared occlusion data of the touch object to be identified, and calculate the first projection length occluded by the touch object to be identified at various projection angles based on the infrared occlusion data;
[0148] The matching calculation module 20 obtains the second projection length of the preset touch object at different rotation angles and projection angles, and calculates the matching loss value between the touch object to be identified and the preset touch object based on the first projection length and the second projection length;
[0149] The angle recognition module 30 is configured to obtain the rotation angle of the touch object to be recognized according to the matching loss value.
[0150] Each module in the aforementioned infrared touch frame touch object recognition device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in hardware form, or stored in memory as software, allowing the processor to call and execute the corresponding operations of each module.
[0151] In one embodiment, the present application also provides an infrared touch device, which may include: an infrared touch frame and a controller; the infrared touch frame is provided with a transmitting lamp and a receiving lamp; the transmitting lamp and the receiving lamp are connected to the controller through a signal processing circuit; the transmitting lamp tube emits infrared rays under the control of the controller; the receiving lamp tube receives the infrared signal; the infrared touch frame performs touch operations through a preset touch object; in identifying the shape of the preset touch object and its rotation angle, the controller is configured to execute the steps of the touch object recognition method of the infrared touch frame of any of the above embodiments.
[0152] The infrared touch device of this embodiment determines the shape of a preset touch object and its rotation angle by calculating the overall loss when identifying the shape and rotation angle of the preset touch object. This can support the identification of touch objects of various complex shapes and their rotation angles, has high recognition accuracy, has low requirements on the density of infrared lamps and the number of scanning lights, and has strong anti-noise capabilities, providing a more diverse interactive experience for infrared touch.
[0153] In one embodiment, the present application also provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the steps of the touch object recognition method of the infrared touch frame of any of the above embodiments. Referring to Figure 11, Figure 11 is an exemplary structural diagram of a computer device, which may include a processor, memory, communication interface, etc. connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities, the memory includes a non-volatile storage medium and an internal memory, the non-volatile storage medium stores an operating system and a computer program, the internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium, and the communication interface can be used to communicate with external devices in a wired or wireless manner. The wireless method can be implemented through WIFI, mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, the steps of the touch object recognition method of the infrared touch frame of any of the above embodiments are implemented.
[0154] Those skilled in the art will understand that the structure shown in the figure is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the controller to which the solution of the present application is applied. The specific controller may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0155] In one embodiment, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above-mentioned method embodiments when the computer program is executed by a processor.
[0156] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processors involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0157] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A touch object recognition method for an infrared touch frame, characterized in that: include: Acquire infrared occlusion data of the touch object to be identified, and calculate a first projection length occluded by the touch object to be identified at each projection angle according to the infrared occlusion data; Obtaining second projection lengths of a preset touch object at different rotation angles and projection angles, and calculating a matching loss value between the touch object to be identified and the preset touch object based on the first projection length and the second projection length; The rotation angle of the touch object to be identified is obtained according to the matching loss value.
2. The touch object recognition method of the infrared touch frame according to claim 1, characterized in that: Also includes: Get the geometric parameters of each preset touch object; Calculating projection angle-projection length projection relationship curves corresponding to each preset touch object at different rotation angles according to the geometric figure parameters; The projection relationship curves under several rotation angles are selected and stored, and are used to calculate the second projection length corresponding to the preset touch object under different projection angles according to the selected rotation angles and the projection relationship curves.
3. The touch object recognition method of the infrared touch frame according to claim 1, characterized in that: Before calculating the first projection length blocked by the touch object to be identified at each projection angle according to the infrared blocking data, the method further includes: calculating shape parameters of the touch object to be identified according to the infrared occlusion data, and screening preset touch objects whose shapes do not match the touch object to be identified according to the shape parameters; The shape parameters include the width, height and / or area of the touch object.
4. The touch object recognition method of the infrared touch frame according to claim 3, characterized in that: Before calculating the matching loss value between the touch object to be identified and the preset touch object according to the first projection length and the second projection length, the method further includes: Unmatched preset touch objects are deleted from the preset touch objects, and second projection lengths corresponding to the remaining preset touch objects at various projection angles are selected for calculating the matching loss value.
5. The touch object recognition method of the infrared touch frame according to claim 2, characterized in that: The second projection length includes: the projection length of each projection angle of the preset touch object at different rotation angles, the shortest projection length, and the longest projection length.
6. The touch object recognition method of the infrared touch frame according to claim 5, characterized in that: Before calculating the matching loss value between the touch object to be identified and the preset touch object according to the first projection length and the second projection length, the method further includes: Comparing the first projection length of the touch object to be identified at each projection angle with the second projection length corresponding to each preset touch object at different rotation angles to identify the target touch object corresponding to the touch object to be identified; The projection length corresponding to the target touch object at each projection angle is selected to calculate the matching loss value.
7. The touch object recognition method of the infrared touch frame according to claim 6, characterized in that: Before calculating the matching loss value between the touch object to be identified and the preset touch object according to the first projection length and the second projection length, the method further includes: From the second projection length of the target touch object at the projection angle, second projection lengths at some discrete projection angles are selected for calculating the matching loss value.
8. The touch object recognition method of the infrared touch frame according to claim 1, characterized in that: The calculating the matching loss value between the touch object to be identified and the preset touch object according to the first projection length and the second projection length includes: Selecting some angles as target angles from all available projection angles according to a priority strategy; A matching loss value between a first projection length of the touch object to be identified at the target angle and a second projection length of each preset touch object at the target angle is calculated.
9. The touch object recognition method of the infrared touch frame according to claim 8, characterized in that: Also includes: If the matching loss value calculated by the currently selected target angle cannot obtain the rotation angle of the touch object to be identified, another part of the projection angle is selected as the target angle according to the priority strategy, and so on, until the rotation angle of the touch object to be identified is obtained, or until all projection angles are selected.
10. The touch object recognition method of the infrared touch frame according to claim 1, characterized in that: Before calculating the first projection length blocked by the touch object to be identified at each projection angle according to the infrared blocking data, the method further includes: Obtain each projection angle of the infrared touch frame scan based on the infrared occlusion data, and exclude the angles without projection The projection angle of the length obtains the effective projection angle range.
11. The touch object recognition method of the infrared touch frame according to claim 1, characterized in that: The calculating, based on the infrared occlusion data, a first projection length of the touch object to be identified at each projection angle includes: Obtain infrared blocking light at various projection angles, and perform interpolation and smoothing based on the infrared blocking light to obtain the real blocking light; The projection lengths at various projection angles are calculated according to the actual blocked light to obtain a first projection length of the touch object to be identified.
12. The touch object recognition method of the infrared touch frame according to claim 1, characterized in that: The calculating the matching loss value between the touch object to be identified and the preset touch object according to the first projection length and the second projection length includes: Obtaining the first projection length of the touch object to be identified at the current projection angle; Obtain the second projection length of each preset touch object at the current projection angle; At each projection angle, respectively calculating a matching loss value between a first projection length of the touch object to be identified and a second projection length of each preset touch object at different rotation angles; A matching loss value set is formed according to the matching loss values calculated at each projection angle.
13. The touch object recognition method of the infrared touch frame according to claim 12, characterized in that: The obtaining of the rotation angle of the touch object to be identified according to the matching loss value includes: Get the minimum loss value in the matching loss value set; If the minimum loss value is smaller than a set threshold, the rotation angle of the touch object to be identified is determined according to the minimum loss value.
14. The touch object recognition method of the infrared touch frame according to claim 13, characterized in that: The determining the rotation angle of the touch object to be identified according to the minimum loss value includes: A preset touch object corresponding to the minimum loss value and its rotation angle are determined, and the rotation angle of the touch object to be identified is determined according to the rotation angle of the preset touch object.
15. The touch object recognition method of the infrared touch frame according to claim 14, characterized in that: The determining the rotation angle of the touch object to be identified according to the preset rotation angle of the touch object includes: Search for the closest rotation angle near the preset touch object rotation angle corresponding to the minimum loss value Angle, and use it as the rotation angle of the touch object to be recognized.
16. The touch object recognition method of the infrared touch frame according to claim 13, characterized in that: Also includes: The shape of the touch object to be identified is determined according to the preset touch object corresponding to the minimum loss value.
17. The touch object recognition method of the infrared touch frame according to claim 1, characterized in that: The matching loss value includes: a Euclidean distance, a Manhattan distance, or a Mahalanobis distance between the first projection length and the second projection length.
18. A touch object recognition device for an infrared touch frame, characterized in that: include: a projection calculation module, configured to obtain infrared occlusion data of a touch object to be identified, and calculate a first projection length occluded by the touch object to be identified at each projection angle based on the infrared occlusion data; a matching calculation module for obtaining a second projection length of a preset touch object at different rotation angles and projection angles, and calculating a matching loss value between the touch object to be identified and the preset touch object based on the first projection length and the second projection length; The angle recognition module is used to obtain the rotation angle of the touch object to be recognized according to the matching loss value.
19. An infrared touch device, characterized in that: include: An infrared touch frame and a controller; wherein the infrared touch frame performs touch operations through a preset touch object; The infrared touch frame is used to scan infrared occlusion data of a touch object to be identified; The controller is configured to execute the steps of the touch object recognition method for the infrared touch frame according to any one of claims 1 to 17.
20. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the touch object recognition method of the infrared touch frame according to any one of claims 1 to 17 are implemented.
21. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the touch object recognition method of the infrared touch frame according to any one of claims 1 to 17 are implemented.
Citation Information
Patent Citations
Infrared touch frame and scanning touch method
CN106383616A
Touch screen desktop device, and control method and object identification method thereof
CN107390913A
Touch control recognition method and device
CN108572765A
Infrared touch method, device and equipment and computer storage medium
CN112462982A