Touch calibration method, device and equipment for laser radar touch screen and storage medium
By using the touch calibration method in the lidar touch screen, the associated preset calibration points and their compensation ratio are determined using radar coordinates and calibration compensation data, and the touch points are compensated, which solves the problem of low positioning accuracy in the prior art and significantly reduces positioning errors.
Patent Information
- Application Number
- CN202311511195.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2025-05-13
AI Technical Summary
In the prior art, the accuracy of touch point positioning of the touch screen through lidar is not high enough, and the error in the positioning result is relatively large.
A touch calibration method of a lidar touch screen is adopted. By obtaining the radar coordinates of the touch point collected by the lidar and the calibration compensation data of the preset calibration point, the associated preset calibration points and their compensation ratios associated with the touch point are determined, and the radar coordinates of the touch point are compensated.
The accuracy of positioning touch points through lidar is improved, the error of positioning results is reduced, and adaptive compensation for dynamic change errors is achieved.
Smart Images

Figure CN119987575A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of touch recognition technology, and specifically to a touch calibration method, device, equipment and storage medium for a laser radar touch screen. Background Art
[0002] With the development of electronic technology, touch screens (touch screens for short) are increasingly used in people's daily lives. The more common touch screens that realize touch interaction functions include capacitive touch screens and infrared frame touch screens. In the related art, laser radar is used to realize touch positioning of the touch screen. The laser radar is driven to rotate 360° by clicking, and a laser scanning surface is formed on the screen surface of the touch screen. When an object clicks on the touch screen, it will block the radar scanning line in the laser scanning surface. At this time, the laser scanning data fed back by the radar scanning line can determine the specific position of the object, thereby locating the touch point. However, the accuracy of positioning the touch point / touch point by laser radar in the related art is not high enough, and the positioning result error is large. This problem needs to be solved urgently.
[0003] The above statements are only used to provide background information related to the present application and do not necessarily constitute prior art. Summary of the invention
[0004] In view of the technical problems existing in the related art that the accuracy of locating touch points by laser radar is not high enough and the positioning result error is large, the purpose of this application is to provide a touch calibration method, device, equipment and storage medium for a laser radar touch screen to improve the accuracy of locating touch points by laser radar and reduce the positioning result error. In order to have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a general review, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a preface to the detailed description that follows.
[0005] According to one aspect of an embodiment of the present application, a touch calibration method for a laser radar touch screen is provided, comprising:
[0006] According to the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen obtained in advance, at least one associated preset calibration point associated with the touch point and a compensation ratio corresponding to the associated preset calibration point are obtained;
[0007] The radar coordinates of the touch point are compensated according to the compensation ratio of the associated preset calibration point.
[0008] In some embodiments of the present application, obtaining calibration compensation data of all preset calibration points on the touch screen includes:
[0009] Acquire the radar coordinates of each preset calibration point on the touch screen by using a laser radar; a plurality of preset calibration points are pre-set on the touch screen, and each of the preset calibration points has a pre-acquired real coordinate;
[0010] Obtaining a compensation ratio for each of the preset calibration points;
[0011] The calibration compensation data is formed using the radar coordinates, real coordinates and compensation ratios of all the preset calibration points.
[0012] In some embodiments of the present application, the compensation ratio includes a horizontal coordinate compensation ratio and a vertical coordinate compensation ratio; the horizontal coordinate compensation ratio is the ratio of the horizontal coordinate of the real coordinate of the same preset calibration point to the horizontal coordinate of the radar coordinate, and the vertical coordinate compensation ratio is the ratio of the vertical coordinate of the real coordinate of the same preset calibration point to the vertical coordinate of the radar coordinate.
[0013] In some embodiments of the present application, the acquisition of the real coordinates includes:
[0014] Calculating a first ratio of a horizontal coordinate of a pixel coordinate of the preset calibration point to a horizontal length of a touch screen resolution;
[0015] Calculate the product of the first ratio and the physical horizontal length of the touch screen to obtain the horizontal coordinate of the real coordinate;
[0016] Calculating a second ratio of the vertical coordinate of the pixel coordinate of the preset calibration point to the vertical length of the touch screen resolution;
[0017] The product of the second ratio and the physical longitudinal length of the touch screen is calculated to obtain the longitudinal coordinate of the real coordinate.
[0018] In some embodiments of the present application, the step of obtaining at least one associated preset calibration point associated with the touch point according to the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen obtained in advance includes:
[0019] According to the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen obtained in advance, obtaining the distance between the touch point and each preset calibration point in the calibration compensation data;
[0020] At least one associated preset calibration point associated with the touch point is determined according to the distance and a preset determination condition.
[0021] In some embodiments of the present application, the preset judgment condition includes: a preset calibration point whose distance from the touch point is less than a preset threshold is an associated preset calibration point, or the first preset number of preset calibration points in a sequence arranged in ascending order according to the distance between each preset calibration point and the touch point are associated preset calibration points.
[0022] In some embodiments of the present application, compensating the radar coordinates of the touch point according to the compensation ratio of the associated preset calibration point includes:
[0023] Calculating the sum of the distances between each of the associated preset calibration points and the touch point;
[0024] Calculating the ratio of the distance between each of the associated preset calibration points and the touch point to the sum;
[0025] Allocating one of the ratios as a corresponding weight to each of the associated preset calibration points, wherein the weight corresponding to each of the associated preset calibration points is inversely proportional to the distance between each of the associated preset calibration points and the touch point;
[0026] Calculating a first product of a compensation ratio of a horizontal coordinate of each of the associated preset calibration points and the allocated weight, and calculating a second product of a compensation ratio of a vertical coordinate of each of the associated preset calibration points and the allocated weight;
[0027] Summing the first products of all the associated preset calibration points to obtain a first sum, and summing the second products of all the associated preset calibration points to obtain a second sum;
[0028] For each touch point, the product of the abscissa of the touch point and the first sum is used as the abscissa of the touch point after compensation, and the product of the ordinate of the touch point and the second sum is used as the ordinate of the touch point after compensation.
[0029] According to another aspect of an embodiment of the present application, a touch calibration device for a laser radar touch screen is provided, comprising:
[0030] An acquisition module, configured to acquire at least one associated preset calibration point associated with the touch point and a compensation ratio corresponding to the associated preset calibration point according to the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen acquired in advance;
[0031] A compensation module is used to compensate the radar coordinates of the touch point according to the compensation ratio of the associated preset calibration point.
[0032] According to another aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the touch calibration method for the laser radar touch screen described in any embodiment of the present application.
[0033] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program is executed by a processor to implement the touch calibration method of the laser radar touch screen described in any embodiment of the present application.
[0034] The technical solution provided by one aspect of the embodiments of the present application may have the following beneficial effects:
[0035] The touch calibration method for the laser radar touch screen provided in the embodiment of the present application obtains at least one associated preset calibration point associated with the touch point and a compensation ratio corresponding to the associated preset calibration point based on the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen obtained in advance, and compensates the radar coordinates of the touch point according to the compensation ratio of the associated preset calibration point, thereby improving the accuracy of locating the touch point by the laser radar and reducing the error of the positioning result.
[0036] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 A flow chart of a touch calibration method for a laser radar touch screen according to an embodiment of the present application is shown.
[0039] Figure 2 A flow chart for obtaining calibration compensation data in one embodiment of the present application is shown.
[0040] Figure 3 A schematic diagram showing the positional relationship between the laser radar and the touch screen in one embodiment of the present application is shown.
[0041] Figure 4 A schematic diagram of a preset calibration point on a touch screen in an embodiment of the present application is shown.
[0042] Figure 5 A schematic diagram showing the principle of obtaining the radar coordinates of a preset calibration point on a touch screen in one embodiment of the present application is shown.
[0043] Figure 6 A scatter plot of preset calibration points on a touch screen in a specific example is shown.
[0044] Figure 7 A flow chart of acquiring at least one associated preset calibration point associated with a touch point in one embodiment of the present application is shown.
[0045] Figure 8 A structural block diagram of a touch calibration device for a laser radar touch screen according to an embodiment of the present application is shown.
[0046] Fig. 9 A structural block diagram of an electronic device according to an embodiment of the present application is shown.
[0047] Fig.10 A schematic diagram of a computer-readable storage medium according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0049] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0050] In the application of laser radar touch screen, the reflection of obstacles in the surrounding environment causes errors. Due to the different reflectivities of different obstacles, the errors caused by the reflection of obstacles are not fixed, but variable. The touch calibration method for laser radar touch screen in the related art can only reduce fixed errors or static errors, but cannot adaptively compensate for dynamically changing errors, which leads to the accuracy of positioning the touch point by laser radar is not high enough, and the positioning result error is large. In view of the technical problems existing in the related art, the embodiment of the present application provides a touch calibration method for laser radar touch screen, according to the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen obtained in advance, at least one associated preset calibration point associated with the touch point and the compensation ratio corresponding to the associated preset calibration point are obtained, and the radar coordinates of the touch point are compensated according to the compensation ratio of the associated preset calibration point, so that adaptive compensation for dynamically changing errors can be achieved, the accuracy of positioning the touch point by laser radar is improved, and the positioning result error is reduced.
[0051] refer to Figure 1 As shown, an embodiment of the present application provides a touch calibration method for a laser radar touch screen, which may include steps S10 to S20:
[0052] S10. According to the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen obtained in advance, obtain at least one associated preset calibration point associated with the touch point and a compensation ratio corresponding to the associated preset calibration point.
[0053] The calibration compensation data includes the radar coordinates, real coordinates and compensation ratio of each preset calibration point on the touch screen. The associated preset calibration point of the touch point is the preset calibration point within the neighborhood of the touch point. The present application does not specifically limit the neighborhood and the number of preset calibration points within the neighborhood.
[0054] refer to Figure 2 As shown, in some embodiments, obtaining calibration compensation data may include steps 1 to 3:
[0055] Step 1: Obtain the radar coordinates of each preset calibration point on the touch screen through the laser radar; a plurality of preset calibration points are pre-set on the touch screen, and each preset calibration point has a pre-acquired real coordinate.
[0056] Presetting multiple preset calibration points on the touch screen can increase the density of the preset calibration points on the touch screen, increase the range of the preset calibration points on the touch screen, increase the area of the calibrated area on the touch screen, improve the calibration effect, and further improve the calibration accuracy.
[0057] Exemplarily, obtaining the real coordinates may include: calculating a first ratio of the horizontal coordinate of the pixel coordinate of the preset calibration point to the horizontal length of the touch screen resolution; calculating the product of the first ratio and the physical horizontal length of the touch screen to obtain the horizontal coordinate of the real coordinate; calculating a second ratio of the vertical coordinate of the pixel coordinate of the preset calibration point to the vertical length of the touch screen resolution; calculating the product of the second ratio and the physical vertical length of the touch screen to obtain the vertical coordinate of the real coordinate. That is, the first ratio is the horizontal coordinate of the pixel coordinate of the preset calibration point / the horizontal length of the touch screen resolution, and the second ratio is the vertical coordinate of the pixel coordinate of the preset calibration point / the vertical length of the touch screen resolution.
[0058] The touch screen resolution is expressed by the number of pixels. For example, a touch screen resolution of 1600×1200 means that the number of pixels in the horizontal direction of the touch screen is 1600, and the number of pixels in the direction perpendicular to the horizontal direction is 1200. The pixel coordinates of the preset calibration point are expressed by the number of pixels. For example, the coordinates (800,600) represent the pixel point that is 800 pixels away from the coordinate origin in the horizontal direction and 600 pixels away from the coordinate origin in the vertical direction. The pixel points accurately located on the touch screen meet the following conditions: the horizontal coordinate of the pixel point / the width of the screen resolution = the horizontal coordinate of the real coordinate / the real width of the screen. Therefore, the real coordinates obtained in the above manner are the most accurate. By obtaining the calibration compensation data based on the above real coordinates, a higher calibration compensation accuracy can be achieved.
[0059] Specifically, refer to Figure 3 As shown, Figure 3 The relative positions of the touch screen 1 and the laser radar 2 are shown. A rectangular coordinate system is established with the top left corner vertex O of the touch screen 1 as the origin. The x-axis of the rectangular coordinate system points from the origin to the top right vertex of the touch screen 1 along the upper side of the touch screen 1, and the y-axis of the rectangular coordinate system points from the origin to the bottom left vertex of the touch screen 1 along the left side of the touch screen 1. There are multiple preset calibration points 3 on the touch screen 1. Figure 3 21 preset calibration points are shown in FIG3. Figure 4 As shown, the pixel coordinates of each preset calibration point 3 are known (can be obtained through the display application), for example, Figure 4 The pixel coordinates of the preset calibration point 3 shown in FIG. 1 include a pixel coordinate abscissa x1 and a pixel coordinate ordinate y1. Figure 4 The pixel coordinates of a preset calibration point 3 shown in FIG. 1 are (x1, y1). The display resolution of the touch screen 1 is known, and the physical horizontal length and physical vertical length of the display of the touch screen 1 are known. Multiple preset calibration points are displayed on the touch screen 1, for example, multiple preset calibration points can be displayed through an application, and the pixel coordinates of each preset calibration point are recorded.
[0060] For a preset calibration point, you can press the preset calibration point with an object (such as a finger) to obtain the data (angle and distance) collected by the laser radar and obtain the radar coordinates (x2, y2) of each preset calibration point.
[0061] refer to Figure 5 As shown, in a specific example, the upper left corner of the touch screen 1 is taken as the origin, and the radar coordinates (x2, y2) of the preset calibration point 3 are coordinates calculated based on the measurement data of the laser radar 2 (the measurement data includes the angle α and the distance d), the angle α and the distance d are the data collected by the laser radar 2, L1 is the distance between the laser radar 2 and the origin in the horizontal axis direction (which can be measured by a length measuring tool), and L2 is the distance between the laser radar 2 and the origin in the vertical axis direction (which can be measured by a length measuring tool), and the relationship between the horizontal coordinate and the vertical coordinate of the radar coordinate is obtained:
[0062] Radar coordinate abscissa x2 = d*cosα-L1;
[0063] Radar coordinate ordinate y2 = d*sinα-L2.
[0064] The following relationship is satisfied between pixel coordinates, real coordinates, touch screen resolution size and touch screen physical size:
[0065]
[0067] Thus we can get
[0068]
[0069]
[0070] Step 2: Obtain the compensation ratio of each preset calibration point.
[0071] Specifically, the compensation ratio includes a horizontal coordinate compensation ratio and a vertical coordinate compensation ratio; the horizontal coordinate compensation ratio is the ratio of the horizontal coordinate of the real coordinate of the same preset calibration point to the horizontal coordinate of the radar coordinate, and the vertical coordinate compensation ratio is the ratio of the vertical coordinate of the real coordinate of the same preset calibration point to the vertical coordinate of the radar coordinate.
[0072] Exemplarily, the compensation ratio of each preset calibration point includes a compensation ratio Rx of the abscissa and a compensation ratio Ry of the ordinate, wherein:
[0073]
[0074]
[0075] Through the above steps, the compensation ratio of each preset calibration point can be obtained.
[0076] Step 3: Use the radar coordinates, real coordinates and compensation ratios of all preset calibration points to form calibration compensation data.
[0077] Exemplarily, the calibration compensation data may be in a table form, that is, a calibration compensation table is formed using radar coordinates, real coordinates and compensation ratios of all preset calibration points.
[0078] Table 1 Calibration compensation table
[0079]
[0080]
[0081]
[0082] Figure 6 A scatter plot of preset calibration points in a specific example is shown.
[0083] refer to Figure 7 As shown, in some embodiments, obtaining at least one associated preset calibration point associated with the touch point according to the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen obtained in advance may include steps S101 to S102:
[0084] S101. According to the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen obtained in advance, obtain the distance between the touch point and each preset calibration point in the calibration compensation data.
[0085] Specifically, the radar coordinates of the preset calibration points are found from the calibration compensation data of all preset calibration points on the touch screen obtained in advance. For example, the calculation formula for the distance D between the radar coordinates (x0, y0) of the touch point collected by the laser radar and the radar coordinates (x1, y1) of the preset calibration point is:
[0086]
[0087] For each preset calibration point, the distance between the radar coordinates of the touch point and the radar coordinates of the preset calibration point is calculated.
[0088] S102: Determine at least one associated preset calibration point associated with the touch point according to the distance and a preset determination condition.
[0089] The associated preset calibration point is a preset standard point associated with the touch point. Specifically, the preset determination condition may include: a preset calibration point whose distance from the touch point is less than a preset threshold is an associated preset calibration point, or the first preset number of preset calibration points in a sequence arranged in ascending order according to the distance between each preset calibration point and the touch point are associated preset calibration points. The preset number is a positive integer. When the preset number is 1, the number of associated preset calibration points is 1. When the preset number is an integer greater than 1, the number of associated preset calibration points is multiple.
[0090] S20, compensating the radar coordinates of the touch point according to the compensation ratio associated with the preset calibration point.
[0091] Specifically, the compensation ratio includes a horizontal coordinate compensation ratio and a vertical coordinate compensation ratio; the horizontal coordinate compensation ratio is the ratio of the horizontal coordinate of the real coordinate of the same preset calibration point to the horizontal coordinate of the radar coordinate, and the vertical coordinate compensation ratio is the ratio of the vertical coordinate of the real coordinate of the same preset calibration point to the vertical coordinate of the radar coordinate.
[0092] In some embodiments, compensating the radar coordinates of the touch point according to the compensation ratio of the associated preset calibration point may include: calculating the sum of the distances between each associated preset calibration point and the touch point; calculating the ratio of the distance between each associated preset calibration point and the touch point to the aforementioned sum; assigning one of the aforementioned ratios as a corresponding weight to each associated preset calibration point, and the weight corresponding to each associated preset calibration point is inversely proportional to the distance between each associated preset calibration point and the touch point; calculating a first product of the horizontal coordinate compensation ratio of each associated preset calibration point and the assigned weight, and calculating a second product of the vertical coordinate compensation ratio of each associated preset calibration point and the assigned weight; summing the first products of all associated preset calibration points to obtain a first sum, and summing the second products of all associated preset calibration points to obtain a second sum; for each touch point, taking the product of the horizontal coordinate of the touch point and the first sum as the compensated horizontal coordinate of the touch point, and taking the product of the vertical coordinate of the touch point and the second sum as the compensated vertical coordinate of the touch point, that is, finally obtaining the calibrated touch point coordinates.
[0093] The weight corresponding to the associated preset calibration point is inversely proportional to the distance between the associated preset calibration point and the touch point, that is, the weight corresponding to the associated preset calibration point is inversely proportional to the distance corresponding to the associated preset calibration point. The larger the distance corresponding to an associated preset calibration point, the smaller the weight assigned to the associated preset calibration point. That is, the closer the associated preset calibration point is to the touch point, the larger the weight corresponding to the compensation ratio is, so that the touch point can be determined more accurately, and the accuracy of determining the coordinates of the touch point is improved.
[0094] In a specific example, when the touch screen receives a touch signal, it finds the associated calibration point associated with the touch point (it may include one associated calibration point or multiple associated calibration points, which may be selected according to actual application needs), assuming that the radar coordinates of the user's touch point collected by the laser radar are (x0, y0).
[0095] When there is only one associated calibration point, the distance D between the radar coordinates (x0, y0) of the touch point and the radar coordinates (x1, y1) of the preset calibration point is calculated as follows:
[0096]
[0097] Find the calibration point with the smallest distance D, and calculate the coordinates (x, y) of the calibrated touch point by compensating the ratio:
[0098] x = x0*Rx;
[0099] y=y0*Ry.
[0100] When there are multiple associated calibration points, calculate the distance D between the radar coordinates (x0, y0) of the touch point and the radar coordinates (x1, y1) of each calibration point
[0101]
[0102] Find the nearest preset number of points, for example, the first two points. The distances between the two touch points and the calibration point are D1 and D2, respectively. D2>D1. The compensation ratios of the corresponding calibration points are (Rx1, Ry1) and (Rx2, Ry2), respectively. The coordinates (x, y) of the calibrated touch points are calculated by the compensation ratios:
[0103]
[0104]
[0105] The calibrated touch point coordinates are the real coordinates.
[0106] The preset number may also be other positive integers such as 3, 4, 5, etc. For example, when the preset number is 4, the distances between the four touch points A, B, C, and D and the calibration point are D1, D2, D3, and D4, respectively, D2>D1>D4>D3, and the compensation ratios of the four touch points A, B, C, and D corresponding to the calibration point are (Rx1, Ry1), (Rx2, Ry2), (Rx3, Ry3), and (Rx4, Ry4), respectively. The calibrated touch point coordinates (x, y) are calculated by the compensation ratios:
[0107]
[0108]
[0109] In some embodiments, compensating the radar coordinates of the touch point according to the compensation ratio of the associated preset calibration point may include: determining the farthest associated preset calibration point, the farthest associated preset calibration point being the associated preset calibration point with the largest distance from the touch point; obtaining the distance between the farthest associated preset calibration point and the touch point to obtain the maximum distance; calculating the product of the maximum distance and the number of all associated preset calibration points to obtain a first product; calculating the ratio of the distance between each associated preset calibration point and the touch point to the aforementioned first product to obtain a first ratio; assigning the aforementioned first ratio to each associated preset calibration point as a corresponding weight, and the weight corresponding to the associated preset calibration point The weight is inversely proportional to the distance between the associated preset calibration point and the touch point; the second product of the horizontal coordinate compensation ratio of each associated preset calibration point and the assigned weight is calculated, and the third product of the vertical coordinate compensation ratio of each associated preset calibration point and the assigned weight is calculated; the second products of all associated preset calibration points are summed to obtain the first sum, and the third products of all associated preset calibration points are summed to obtain the second sum; for each touch point, the product of the horizontal coordinate of the touch point and the first sum is used as the horizontal coordinate of the touch point after compensation, and the product of the vertical coordinate of the touch point and the second sum is used as the vertical coordinate of the touch point after compensation, that is, the calibrated touch point coordinates are finally obtained. For example, the distance between the farthest associated preset calibration point and the touch point is d, that is, the maximum distance is d, assuming that the number of all associated preset calibration points is S, then the first product is d*S; the first ratio can be expressed as Dm / (d*S), where Dm represents the distance between the associated preset calibration point and the touch point, and m represents the number of the associated preset calibration point, which is used to mark the distance between the associated preset calibration point m and the touch point, and m is, for example, 1, 2, 3, 4...
[0110] Take 4 touch points A, B, C, D as an example. The distances between the 4 touch points A, B, C, D and the calibration point are D1, D2, D3, and D4, respectively, where D2>D1>D4>D3. The compensation ratios of the 4 touch points A, B, C, D corresponding to the calibration point are (Rx1, Ry1), (Rx2, Ry2), (Rx3, Ry3), and (Rx4, Ry4), respectively. The coordinates (x, y) of the calibrated touch points are calculated by the compensation ratios:
[0111]
[0112] In this example, a can be 1, 2, 3, or 4; ds=4*D2.
[0113] Among them, the four touch points A, B, C, and D are sorted from large to small according to the compensation ratios corresponding to the four touch points: C, D, A, and B. In this way, the closer the associated preset calibration point is to the touch point, the greater the weight corresponding to its compensation ratio, so that the touch point can be determined more accurately, and the accuracy of determining the coordinates of the touch point is improved.
[0114] In some embodiments, compensating the radar coordinates of the touch point according to the compensation ratio of the associated preset calibration point may include: assigning a preset weight to each associated preset calibration point, wherein the number of all preset weights is the same as the number of all associated preset calibration points, and the preset weights are not equal, the value of each preset weight belongs to the interval (0,1), and the preset weight corresponding to the associated preset calibration point is inversely proportional to the distance between the associated preset calibration point and the touch point; calculating a first product of the horizontal coordinate compensation ratio of each associated preset calibration point and the assigned weight, and calculating a second product of the vertical coordinate compensation ratio of each associated preset calibration point and the assigned weight; summing the first products of all associated preset calibration points to obtain a first sum, and summing the second products of all associated preset calibration points to obtain a second sum; for each touch point, taking the product of the horizontal coordinate of the touch point and the first sum as the compensated horizontal coordinate of the touch point, and taking the product of the vertical coordinate of the touch point and the second sum as the compensated vertical coordinate of the touch point, that is, finally obtaining the calibrated touch point coordinates. In this way, the closer the associated preset calibration point is to the touch point, the greater the weight corresponding to the compensation ratio thereof, so that the touch point can be determined more accurately, thereby improving the accuracy of determining the coordinates of the touch point.
[0115] After compensating the radar coordinates of the touch point according to the compensation ratio of the associated preset calibration point, the real coordinates of the touch point are obtained, and the touch calibration of the lidar touch screen is completed, thereby improving the accuracy of positioning the touch point by the lidar and reducing the error of the positioning result.
[0116] refer to Figure 8 As shown, another embodiment of the present application provides a touch calibration device for a laser radar touch screen, comprising:
[0117] An acquisition module, configured to acquire at least one associated preset calibration point associated with the touch point and a compensation ratio corresponding to the associated preset calibration point according to the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen acquired in advance;
[0118] The compensation module is used to compensate the radar coordinates of the touch point according to the compensation ratio of the associated preset calibration point.
[0119] In some embodiments, the touch calibration device of the laser radar touch screen also includes a calibration compensation data acquisition module, which is used to: obtain the radar coordinates of each preset calibration point on the touch screen through the laser radar; a plurality of preset calibration points are pre-set on the touch screen, and each of the preset calibration points has a pre-acquired real coordinate; obtain the compensation ratio of each of the preset calibration points; and use the radar coordinates, real coordinates and compensation ratios of all the preset calibration points to form the calibration compensation data.
[0120] In some embodiments, the compensation ratio includes a horizontal coordinate compensation ratio and a vertical coordinate compensation ratio; the horizontal coordinate compensation ratio is the ratio of the horizontal coordinate of the real coordinate of the same preset calibration point to the horizontal coordinate of the radar coordinate, and the vertical coordinate compensation ratio is the ratio of the vertical coordinate of the real coordinate of the same preset calibration point to the vertical coordinate of the radar coordinate.
[0121] In some embodiments, the touch calibration device of the laser radar touch screen also includes a real coordinate acquisition module, which is used to: calculate a first ratio of the horizontal coordinate of the pixel coordinate of the preset calibration point to the horizontal length of the touch screen resolution; calculate the product of the first ratio and the physical horizontal length of the touch screen to obtain the horizontal coordinate of the real coordinate; calculate the second ratio of the vertical coordinate of the pixel coordinate of the preset calibration point to the vertical length of the touch screen resolution; calculate the product of the second ratio and the physical vertical length of the touch screen to obtain the vertical coordinate of the real coordinate.
[0122] In some embodiments, the acquisition module is further specifically used to: obtain the distance between the touch point and each preset calibration point in the calibration compensation data based on the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen obtained in advance; determine at least one associated preset calibration point associated with the touch point based on the distance and preset judgment conditions.
[0123] In some embodiments, the preset judgment conditions include: a preset calibration point whose distance from the touch point is less than a preset threshold is an associated preset calibration point, or the first preset number of preset calibration points in a sequence arranged in ascending order according to the distance between each preset calibration point and the touch point are associated preset calibration points.
[0124] In some embodiments, the compensation module is further specifically used to: calculate the sum of the distances between each of the associated preset calibration points and the touch point; calculate the ratio of the distance between each of the associated preset calibration points and the touch point to the sum; assign one of the ratios as a corresponding weight to each of the associated preset calibration points, and the weight corresponding to each of the associated preset calibration points is inversely proportional to the distance between each of the associated preset calibration points and the touch point; calculate a first product of the horizontal coordinate compensation ratio of each of the associated preset calibration points and the assigned weight, and calculate a second product of the vertical coordinate compensation ratio of each of the associated preset calibration points and the assigned weight; sum the first products of all of the associated preset calibration points to obtain a first sum, and sum the second products of all of the associated preset calibration points to obtain a second sum; for each touch point, use the product of the horizontal coordinate of the touch point and the first sum as the horizontal coordinate of the touch point after compensation, and use the product of the vertical coordinate of the touch point and the second sum as the vertical coordinate of the touch point after compensation.
[0125] The touch calibration device for the laser radar touch screen provided in the embodiment of the present application obtains at least one associated preset calibration point associated with the touch point and a compensation ratio corresponding to the associated preset calibration point based on the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen obtained in advance, and compensates the radar coordinates of the touch point according to the compensation ratio of the associated preset calibration point, thereby improving the accuracy of positioning the touch point by the laser radar and reducing the error of the positioning result.
[0126] Another embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the touch calibration method for the laser radar touch screen described in any of the above embodiments.
[0127] refer to Fig. 9 As shown, the electronic device 10 may include: a processor 100, a memory 101, a bus 102 and a communication interface 103, and the processor 100, the communication interface 103 and the memory 101 are connected via the bus 102; the memory 101 stores a computer program that can be run on the processor 100, and when the processor 100 runs the computer program, it executes the method provided in any of the aforementioned embodiments of the present application.
[0128] The memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the device network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0129] The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 101 is used to store a program, and the processor 100 executes the program after receiving an execution instruction. The method disclosed in any implementation of the aforementioned embodiment of the present application may be applied to the processor 100, or implemented by the processor 100.
[0130] The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 100 or an instruction in the form of software. The above processor 100 may be a general-purpose processor, which may include a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the above method in combination with its hardware.
[0131] The electronic device provided in the embodiment of the present application and the method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, operated or implemented by them.
[0132] Another embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the touch calibration method for a laser radar touch screen described in any of the above embodiments. Fig.10 As shown, the computer-readable storage medium shown is a CD 20 on which a computer program (ie, a program product) is stored. When the computer program is run by a processor, the method provided by any of the aforementioned embodiments will be executed.
[0133] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0134] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.
[0135] It should be noted that:
[0136] The term "module" is not intended to be limited to a specific physical form. Depending on the specific application, a module can be implemented as hardware, firmware, software, and / or a combination thereof. In addition, different modules can share common components or even be implemented by the same components. There may or may not be clear boundaries between different modules.
[0137] The algorithm and display provided herein are not inherently related to any specific computer, virtual device or other equipment. Various general devices can also be used together with examples based on this. According to the above description, it is obvious to construct the structure required for this type of device. In addition, the application is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the application described herein, and the description made to specific languages above is for the purpose of disclosing the best mode of implementation of the application.
[0138] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by 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 they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0139] The above embodiments only express the implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A touch calibration method for a laser radar touch screen, characterized in that: include: According to the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen obtained in advance, at least one associated preset calibration point associated with the touch point and a compensation ratio corresponding to the associated preset calibration point are obtained; The radar coordinates of the touch point are compensated according to the compensation ratio of the associated preset calibration point.
2. The method according to claim 1, characterized in that The acquisition of calibration compensation data of all preset calibration points on the touch screen includes: Acquire the radar coordinates of each preset calibration point on the touch screen by using a laser radar; a plurality of preset calibration points are pre-set on the touch screen, and each of the preset calibration points has a pre-acquired real coordinate; Obtaining a compensation ratio for each of the preset calibration points; The calibration compensation data is formed using the radar coordinates, real coordinates and compensation ratios of all the preset calibration points.
3. The method according to claim 2, characterized in that The compensation ratio includes a horizontal coordinate compensation ratio and a vertical coordinate compensation ratio; the horizontal coordinate compensation ratio is the ratio of the horizontal coordinate of the real coordinate of the same preset calibration point to the horizontal coordinate of the radar coordinate, and the vertical coordinate compensation ratio is the ratio of the vertical coordinate of the real coordinate of the same preset calibration point to the vertical coordinate of the radar coordinate.
4. The method according to claim 2, characterized in that: The acquisition of the real coordinates includes: Calculating a first ratio of a horizontal coordinate of a pixel coordinate of the preset calibration point to a horizontal length of a touch screen resolution; Calculate the product of the first ratio and the physical horizontal length of the touch screen to obtain the horizontal coordinate of the real coordinate; Calculating a second ratio of the vertical coordinate of the pixel coordinate of the preset calibration point to the vertical length of the touch screen resolution; The product of the second ratio and the physical longitudinal length of the touch screen is calculated to obtain the longitudinal coordinate of the real coordinate.
5. The method according to any one of claims 1 to 4, characterized in that The step of obtaining at least one associated preset calibration point associated with the touch point based on the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen obtained in advance includes: According to the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen obtained in advance, obtaining the distance between the touch point and each preset calibration point in the calibration compensation data; At least one associated preset calibration point associated with the touch point is determined according to the distance and a preset determination condition.
6. The method according to claim 5, characterized in that The preset determination condition includes: a preset calibration point whose distance from the touch point is less than a preset threshold is an associated preset calibration point, or a first preset number of preset calibration points in a sequence arranged in ascending order according to the distance between each preset calibration point and the touch point are associated preset calibration points.
7. The method according to any one of claims 1 to 4, characterized in that The compensating the radar coordinates of the touch point according to the compensation ratio of the associated preset calibration point includes: Calculating the sum of the distances between each of the associated preset calibration points and the touch point; Calculating the ratio of the distance between each of the associated preset calibration points and the touch point to the sum; Allocating one of the ratios as a corresponding weight to each of the associated preset calibration points, wherein the weight corresponding to each of the associated preset calibration points is inversely proportional to the distance between each of the associated preset calibration points and the touch point; Calculating a first product of the horizontal coordinate compensation ratio of each of the associated preset calibration points and the allocated weight, and calculating a second product of the vertical coordinate compensation ratio of each of the associated preset calibration points and the allocated weight; Summing the first products of all the associated preset calibration points to obtain a first sum, and summing the second products of all the associated preset calibration points to obtain a second sum; For each touch point, the product of the abscissa of the touch point and the first sum is used as the abscissa of the touch point after compensation, and the product of the ordinate of the touch point and the second sum is used as the ordinate of the touch point after compensation.
8. A touch calibration device for a laser radar touch screen, characterized in that: include: An acquisition module, configured to acquire at least one associated preset calibration point associated with the touch point and a compensation ratio corresponding to the associated preset calibration point according to the radar coordinates of the touch point collected by the laser radar and the calibration compensation data of all preset calibration points on the touch screen acquired in advance; A compensation module is used to compensate the radar coordinates of the touch point according to the compensation ratio of the associated preset calibration point.
9. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a touch calibration method for a laser radar touch screen as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement the touch calibration method for the laser radar touch screen as described in any one of claims 1-7.