



技术领域technical field
本发明涉及红外触摸屏领域,具体为一种适用于大尺寸红外触摸屏的快速算法。The present invention relates to the field of infrared touch screens, specifically a fast algorithm suitable for large-size infrared touch screens.
背景技术Background technique
近年来,触摸屏作为一种新型的人机交互设备,以其自然性和方便性,越来越受到人们的喜爱。随着科技的发展,单点触摸屏已不能满足人们的需要,多点触摸屏应运而生。目前发展中应用较多的多点触摸屏主要分为电容式触摸屏和红外触摸屏,电容式多点触摸屏主要应用在小尺寸的设备上,在大尺寸上由于自身原因并不适合,而红外触摸屏具有安装方便、使用寿命长、透光性高等优点,尤其是在大尺寸的应用上,更具有优势。但随着尺寸的加大,为了剔除坐标“鬼点”,大多数情况下都增加了扫描光线的数量,使得数据处理量急剧增加,尤其是在多点情况下,数据处理量很大,计算时间很长,严重影响了触摸屏的反应速度。目前采用的提高触摸屏效率的方法有硬件结构的改进,即将红外发射对管进行分组,多组同时扫描,节省了扫描时间;有些采用分开扫描方式,即扫描一部分红外对发射管,在能够识别坐标点的情况下,另一部分红外对管就不工作的方法,使扫描时间尽量少,处理的信号量少,但这些方法均未从根本上解决数据处理时间长的问题。In recent years, as a new type of human-computer interaction device, touch screen has become more and more popular due to its naturalness and convenience. With the development of science and technology, single-point touch screens can no longer meet people's needs, and multi-point touch screens have emerged as the times require. At present, the multi-point touch screens that are widely used in development are mainly divided into capacitive touch screens and infrared touch screens. Capacitive multi-point touch screens are mainly used in small-sized devices, but they are not suitable for large sizes due to their own reasons. Infrared touch screens have installation Convenience, long service life, high light transmittance, etc., especially in large-size applications, have more advantages. However, as the size increases, in order to eliminate coordinate “ghost points”, the number of scanning rays is increased in most cases, which makes the amount of data processing increase sharply. The time is very long, which seriously affects the response speed of the touch screen. The method currently used to improve the efficiency of the touch screen is the improvement of the hardware structure, that is, grouping the infrared emission tubes, and scanning multiple groups at the same time, which saves scanning time; some use separate scanning methods, that is, scanning a part of the infrared emission tubes. In the case of a point, the other part of the infrared tube does not work, so that the scanning time is minimized and the amount of signal processed is small, but these methods have not fundamentally solved the problem of long data processing time.
发明内容Contents of the invention
本发明目的是提出一种适用于大尺寸红外触摸屏的快速算法,以解决大尺寸红外触摸屏计算速度慢,坐标计算不精确的问题。The purpose of the present invention is to propose a fast algorithm suitable for large-size infrared touch screens, so as to solve the problems of slow calculation speed and inaccurate coordinate calculation of large-size infrared touch screens.
本发明采用的技术方案是:The technical scheme adopted in the present invention is:
一种适用于大尺寸红外触摸屏的快速算法,其特征在于:触摸屏中触摸点的位置信息由被遮挡的光线给出,其中任意两条相交的光线均可通过方程计算或者查表方法得到坐标点信息,将此点的信息转化成像素值,对相应像素点所对应的标志位加1,轮询所有相交直线,对相应的标志位进行累加,最后,将标志位大于一定值的像素点组成的区域作为触摸点的区域,将得到的所有区域进行相应的处理,最终得到的区域为触摸物体的形状,若最终需得到触摸点的坐标值,则该区域的质心坐标值即为触摸点的中心坐标值。A fast algorithm suitable for large-scale infrared touch screen, characterized in that: the position information of the touch point in the touch screen is given by the blocked light rays, and any two intersecting light rays can be obtained by equation calculation or table look-up method. Information, convert the information of this point into a pixel value, add 1 to the flag corresponding to the corresponding pixel, poll all intersecting lines, accumulate the corresponding flag, and finally, form the pixel points whose flag is greater than a certain value The area of the touch point is used as the area of the touch point, and all the obtained areas are processed accordingly. The finally obtained area is the shape of the touch object. If the coordinate value of the touch point is finally obtained, the centroid coordinate value of the area is the touch point. Center coordinate value.
所述的一种适用于大尺寸红外触摸屏的快速算法,其特征在于:所选计算坐标的光线为触摸屏所有方向光线中的任意两条相交光线,为了提高计算效率,可优先选择角度相差较大的光线如上下方向的光线与左右方向的光线;所述的计算坐标点信息的方法采用直观的解方程的方法得到坐标,再转换成像素点信息,或者采用查表的方法由被遮挡光线的位置直接查表得到相应像素点,提高了效率。The above-mentioned fast algorithm suitable for large-scale infrared touch screen is characterized in that: the rays selected for calculating the coordinates are any two intersecting rays in all directions of the touch screen. In order to improve the calculation efficiency, it is preferable to select Light rays such as light rays in the up-down direction and light rays in the left-right direction; the method for calculating coordinate point information adopts an intuitive method of solving equations to obtain coordinates, and then converts them into pixel point information, or uses the method of looking up the table from the blocked light rays. The position is directly looked up in the table to obtain the corresponding pixel, which improves the efficiency.
所述的一种适用于大尺寸红外触摸屏的快速算法,其特征在于:所述的判别触摸点区域的依据为像素点的标志位的大小,其标志位的大小由轮询的直线决定:当轮询所有直线时,标志位的设定与所有直线数有关,并且相交直线越多,得到的区域形状越接近真实触摸物体的形状;当优先选择部分光线时,标志位的设定相应减小,从而提高了计算效率,但精度会有一定程度的衰减。The fast algorithm applicable to large-scale infrared touch screens is characterized in that: the basis for determining the area of the touch point is the size of the flag of the pixel, and the size of the flag is determined by the polling line: when When polling all straight lines, the setting of the flag bit is related to the number of all straight lines, and the more intersecting straight lines, the closer the shape of the obtained area is to the shape of the real touch object; when partial light is preferentially selected, the setting of the flag bit is correspondingly reduced , thus improving the calculation efficiency, but the accuracy will be attenuated to a certain extent.
所述的一种适用于大尺寸红外触摸屏的快速算法,其特征在于:所述的对得到的区域进行处理指的是对相近的区域可进行区域合并,并对区域进行平滑处理,最终得到了几个区域即为有几个触摸物体,区域形状为触摸物体的形状,区域的中心为触摸物体的质心坐标。The fast algorithm applicable to large-scale infrared touch screens is characterized in that: the processing of the obtained regions refers to merging similar regions and smoothing the regions, finally obtaining Several areas mean that there are several touch objects, the shape of the area is the shape of the touch object, and the center of the area is the coordinates of the center of mass of the touch object.
本发明中,为了解决大尺寸红外触摸屏坐标点计算速度慢,计算不精确的问题, 提出了一种适用于大尺寸红外触摸屏的快速算法:将触摸点的信息由被遮挡的光线给出,通过方程计算或查表的方法计算任意两条相交光线得到坐标点信息,将坐标点信息转换成像素点信息,对响应的像素点的标志位加1,轮询所有的相交直线或部分相交直线,对相应的标志位进行累加,最后根据标志位的大小得到一定的区域,对得到的区域进行处理后,存在的区域个数即为触摸点的个数,区域形状即为触摸物体的形状,区域的中心即为触摸物体的质心。In the present invention, in order to solve the problem of slow calculation speed and inaccurate calculation of coordinate points on large-scale infrared touch screens, a fast algorithm suitable for large-scale infrared touch screens is proposed: the information of the touch point is given by the blocked light, through Equation calculation or table look-up method calculates any two intersecting rays to obtain coordinate point information, converts coordinate point information into pixel point information, adds 1 to the flag bit of the corresponding pixel point, polls all intersecting straight lines or partial intersecting straight lines, Accumulate the corresponding flag bits, and finally get a certain area according to the size of the flag bits. After processing the obtained area, the number of existing areas is the number of touch points, and the shape of the area is the shape of the touched object. The center of is the centroid of the touching object.
本发明的优点是:The advantages of the present invention are:
本发明的算法解决了现有的大尺寸红外触摸屏尤其在多点触摸应用中数据量大、处理时间长、多点识别不准确、坐标点计算不精确的问题。The algorithm of the invention solves the problems of large data volume, long processing time, inaccurate multi-point identification and inaccurate coordinate point calculation in the existing large-size infrared touch screen, especially in multi-point touch applications.
附图说明Description of drawings
图1 是本发明坐标(像素点)计算示意图。Figure 1 is a schematic diagram of the calculation of coordinates (pixels) in the present invention.
图2 是本发明一种坐标区域处理示意图。Fig. 2 is a schematic diagram of coordinate area processing in the present invention.
图3 是本发明另一种坐标区域处理示意图。Fig. 3 is a schematic diagram of another coordinate area processing in the present invention.
图4 是本发明算法计算流程示意图。Fig. 4 is a schematic diagram of the calculation flow of the algorithm of the present invention.
具体实施方式Detailed ways
如图1所示。当触摸屏存在触摸点A时,以图1中被遮挡的8条光线为例,其中光线1和5是一个方向,光线3和4是一个方向,光线6和7是一个方向,光线2和8是一个方向,任取两个不同方向的光线如1和3,可通过光线的位置与角度得到光线的方程,进而得到光线1和3的交点,再将交点坐标转换成像素点的坐标,或者由光线1和3查表直接得到所对应的像素点坐标。同理根据其他不同方向相交的光线得到所有被遮挡的像素点坐标值,将相应像素点的标志位进行加1累加。As shown in Figure 1. When there is touch point A on the touch screen, take the 8 blocked rays in Figure 1 as an example, where
为了提高计算速率,可选择角度相差较大的两个光线进行计算,如图1所示,光线3与光线2,光线1与光线2,光线7与光线2均是角度相差较大的光线,由这样的光线计算得到的像素点更贴近触摸物体的真实形状,但由于计算次数的减少,使得精度有所降低。In order to improve the calculation rate, two rays with a large angle difference can be selected for calculation. As shown in Figure 1, ray 3 and
如图2所示,图中的每个小方格代表一个像素点。将所有的相交直线计算过后,得到了一系列像素点的标志位的值,若设定标志位的值大于25的像素点为触摸点所存在的区域,轮询所有标志位的值,得到触摸区域如图中黑色粗实线所示,为真实的反应触摸物体的形状,将边缘部分做平滑处理,此区域的中心点即为触摸物体的中心坐标。As shown in Figure 2, each small square in the figure represents a pixel. After calculating all the intersecting straight lines, the value of the flag bit of a series of pixels is obtained. If the pixel point with the value of the flag bit greater than 25 is the area where the touch point exists, poll the values of all flag bits and get the touch point The area is shown by the black thick solid line in the figure, which reflects the shape of the touch object, and the edge part is smoothed. The center point of this area is the center coordinate of the touch object.
如图3所示,图中的每个小方格代表一个像素点。将所有的相交直线计算过后,得到了一系列像素点的标志位的值,若设定标志位的值大于25的像素点为触摸点所在的区域,则得到的触摸区域有两个,如图3(a)黑色实线所示。但此两个区域相距较近,实际中很难有两个触摸点的距离以像素点来计,因此对得到的相近的触摸区域进行区域合并,得到如图3(b)所示的黑色粗实线的区域,将此区域形状记为触摸物体的形状,中心点为触摸物体中点坐标。As shown in Figure 3, each small square in the figure represents a pixel. After calculating all the intersecting straight lines, the flag value of a series of pixels is obtained. If the pixel point whose flag value is greater than 25 is set as the area where the touch point is located, there are two touch areas obtained, as shown in the figure 3(a) is shown by the black solid line. However, these two areas are relatively close to each other. In practice, it is difficult to measure the distance between two touch points in pixels. Therefore, the obtained similar touch areas are merged to obtain a black thick touch area as shown in Figure 3(b). For the area of the solid line, record the shape of this area as the shape of the touch object, and the center point is the coordinate of the midpoint of the touch object.
本算法的总的流程示意图如图4所示。首先获取含有触摸信息的直线(具体的直线形式由电路的设计结构决定);任取其中两条相交直线得到触摸坐标,计算方法可采用解方程的方法,也可采用查表的方法,将坐标信息转换成像素点的信息,对遮挡的像素点的标志位加1,计算所有相交直线将得到的像素点的标志位进行累加,为了调高效率,也可计算一部分相交直线;最后将标志位大于一定值的像素点作为被遮挡区域,将得到的区域进行平滑处理,如有需要可进行合并;最终存在几个区域即为几个触摸物体,区域形状为触摸物体形状,中心坐标为触摸物体中心坐标。The overall flow diagram of this algorithm is shown in Figure 4. First obtain the straight line containing touch information (the specific form of the straight line is determined by the design structure of the circuit); take any two intersecting straight lines to get the touch coordinates, the calculation method can be the method of solving the equation, or the method of looking up the table. Convert the information into pixel information, add 1 to the flag bit of the blocked pixel point, calculate all the intersecting straight lines and accumulate the flag bits of the obtained pixel points, in order to improve the efficiency, you can also calculate a part of the intersecting straight line; finally the flag bit Pixels greater than a certain value are used as the occluded area, and the obtained area is smoothed, and can be merged if necessary; finally there are several areas that are several touch objects, the shape of the area is the shape of the touch object, and the center coordinates are the touch object center coordinates.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310378773.9ACN103761012B (en) | 2013-08-27 | 2013-08-27 | A Fast Algorithm Applicable to Large Size Infrared Touch Screen |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310378773.9ACN103761012B (en) | 2013-08-27 | 2013-08-27 | A Fast Algorithm Applicable to Large Size Infrared Touch Screen |
| Publication Number | Publication Date |
|---|---|
| CN103761012Atrue CN103761012A (en) | 2014-04-30 |
| CN103761012B CN103761012B (en) | 2016-07-13 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201310378773.9AExpired - Fee RelatedCN103761012B (en) | 2013-08-27 | 2013-08-27 | A Fast Algorithm Applicable to Large Size Infrared Touch Screen |
| Country | Link |
|---|---|
| CN (1) | CN103761012B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103970372A (en)* | 2014-05-27 | 2014-08-06 | 广州华欣电子科技有限公司 | Method for treating scanning asynchronism of infrared touch screen and infrared touch screen |
| CN105094457A (en)* | 2014-05-23 | 2015-11-25 | 北京汇冠新技术股份有限公司 | Single contact point recognition method for infrared touch screen based on point-slope transformation |
| CN111708469A (en)* | 2020-06-29 | 2020-09-25 | 广州华欣电子科技有限公司 | Infrared touch screen |
| CN114356130A (en)* | 2021-12-01 | 2022-04-15 | 深圳市鸿合创新信息技术有限责任公司 | Touch area identification method, system and electronic device of infrared touch screen |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101075168A (en)* | 2007-06-22 | 2007-11-21 | 北京汇冠新技术有限公司 | Method for discriminating multiple points on infrared touch screen |
| CN101286104A (en)* | 2008-06-05 | 2008-10-15 | 成都吉锐触摸技术股份有限公司 | Method for recognizing multiple touch point at infrared touch screen |
| CN201548935U (en)* | 2009-10-30 | 2010-08-11 | 北京汇冠新技术股份有限公司 | Infrared touch screen |
| CN101968699A (en)* | 2010-08-13 | 2011-02-09 | 广东威创视讯科技股份有限公司 | Infrared touch screen positioning device and method |
| CN102004586A (en)* | 2010-11-23 | 2011-04-06 | 广东威创视讯科技股份有限公司 | Touch point positioning device and method |
| CN102067075A (en)* | 2008-06-23 | 2011-05-18 | 平蛙实验室股份公司 | Detecting the locations of a plurality of objects on a touch surface |
| US20110304590A1 (en)* | 2010-06-14 | 2011-12-15 | Pixart Imaging Inc. | Touch system and positioning method therefor |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101075168A (en)* | 2007-06-22 | 2007-11-21 | 北京汇冠新技术有限公司 | Method for discriminating multiple points on infrared touch screen |
| CN101286104A (en)* | 2008-06-05 | 2008-10-15 | 成都吉锐触摸技术股份有限公司 | Method for recognizing multiple touch point at infrared touch screen |
| CN102067075A (en)* | 2008-06-23 | 2011-05-18 | 平蛙实验室股份公司 | Detecting the locations of a plurality of objects on a touch surface |
| CN201548935U (en)* | 2009-10-30 | 2010-08-11 | 北京汇冠新技术股份有限公司 | Infrared touch screen |
| US20110304590A1 (en)* | 2010-06-14 | 2011-12-15 | Pixart Imaging Inc. | Touch system and positioning method therefor |
| CN101968699A (en)* | 2010-08-13 | 2011-02-09 | 广东威创视讯科技股份有限公司 | Infrared touch screen positioning device and method |
| CN102004586A (en)* | 2010-11-23 | 2011-04-06 | 广东威创视讯科技股份有限公司 | Touch point positioning device and method |
| Title |
|---|
| 王璐,等: "基于计算几何的新型红外式触摸屏多点触摸识别算法", 《中南大学学报》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105094457A (en)* | 2014-05-23 | 2015-11-25 | 北京汇冠新技术股份有限公司 | Single contact point recognition method for infrared touch screen based on point-slope transformation |
| CN103970372A (en)* | 2014-05-27 | 2014-08-06 | 广州华欣电子科技有限公司 | Method for treating scanning asynchronism of infrared touch screen and infrared touch screen |
| CN111708469A (en)* | 2020-06-29 | 2020-09-25 | 广州华欣电子科技有限公司 | Infrared touch screen |
| CN114356130A (en)* | 2021-12-01 | 2022-04-15 | 深圳市鸿合创新信息技术有限责任公司 | Touch area identification method, system and electronic device of infrared touch screen |
| Publication number | Publication date |
|---|---|
| CN103761012B (en) | 2016-07-13 |
| Publication | Publication Date | Title |
|---|---|---|
| CN100520692C (en) | Hand-written input method capable of implementing writing style effect | |
| US10698106B2 (en) | Obstacle detecting method and apparatus, device and storage medium | |
| CN103902105B (en) | Touch recognition method and touch recognition system for infrared touch screen | |
| TWI496041B (en) | Two-dimensional touch sensors | |
| CN102945109B (en) | Method for detecting touch area of mutual capacitance screen | |
| CN103761012B (en) | A Fast Algorithm Applicable to Large Size Infrared Touch Screen | |
| CN106650648A (en) | Identification method and system for erasing handwriting | |
| TW201218042A (en) | Optical screen touch system and method thereof | |
| CN108268829A (en) | Optical recognition method and system | |
| TWI493425B (en) | Near-surface object sensing device and sensing method | |
| CN103970360B (en) | Multipoint-touch-based gesture identification method and system | |
| CN112083846A (en) | Detection method, device and electronic device for map display marker click area | |
| CN103914871B (en) | The method of body surface coordinate point is chosen based on the interactive mode of cloud data | |
| CN104461100A (en) | Single-layer electrode structure | |
| CN103984445A (en) | Infrared touch screen and touch point positioning method thereof | |
| CN102622140B (en) | Image pick-up multi-point touch system | |
| CN111047635A (en) | Depth image-based plane touch method and device and touch system | |
| CN103176671B (en) | Touch electronic device and touch track correction method | |
| CN115599245A (en) | A real touch point recognition method for an infrared touch screen and an infrared touch screen | |
| CN105468200A (en) | Method and device for fingerprint touch control and fingerprint equipment | |
| TWI448918B (en) | Optical panel touch system | |
| CN103488351A (en) | New structure for improving precision of infrared touch screen | |
| WO2014127642A1 (en) | Touch operation response method and system, and touchscreen terminal | |
| CN103412686A (en) | Multi-point touch screen coordinated with four-way camera and corresponding touch method | |
| CN201859424U (en) | Display touch system |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20160713 Termination date:20190827 | |
| CF01 | Termination of patent right due to non-payment of annual fee |