CN104808856B - The method, apparatus and a kind of mobile terminal that a kind of simulated touch screen slides - Google Patents
The method, apparatus and a kind of mobile terminal that a kind of simulated touch screen slides Download PDFInfo
- Publication number
- CN104808856B CN104808856B CN201510222170.9A CN201510222170A CN104808856B CN 104808856 B CN104808856 B CN 104808856B CN 201510222170 A CN201510222170 A CN 201510222170A CN 104808856 B CN104808856 B CN 104808856B
- Authority
- CN
- China
- Prior art keywords
- touch screen
- pixels
- dot matrix
- sliding
- distance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 239000011159 matrix material Substances 0.000 claims abstract description 131
- 238000013507 mapping Methods 0.000 claims abstract description 23
- 238000004364 calculation method Methods 0.000 claims description 26
- 238000012545 processing Methods 0.000 claims description 16
- 238000004422 calculation algorithm Methods 0.000 claims description 10
- 230000009471 action Effects 0.000 claims description 9
- 230000008569 process Effects 0.000 claims description 8
- 230000004044 response Effects 0.000 claims description 6
- 238000001914 filtration Methods 0.000 claims description 4
- 230000000694 effects Effects 0.000 abstract description 9
- 230000006870 function Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 10
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Position Input By Displaying (AREA)
Abstract
本发明公开了一种模拟触摸屏滑动的方法、装置和一种移动终端,以实现与触摸屏相似的隔空滑动效果。所述方法包括:将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏,所述N和M均为大于1的自然数,且所述N不大于所述M;捕获在所述点阵红外传感器构成的屏幕上的手势;计算所述手势在所述点阵红外传感器构成的屏幕上滑动距离d时对应在所述M×M个像素点的触摸屏上滑动的距离d’;响应在所述M×M个像素点的触摸屏上滑动的距离d’。本发明提供的技术方案在点阵红外传感器构成的屏幕上滑动手指,能够模拟类似触摸屏的有粘性消息,实现类似于触摸屏的隔空滑动功能。
The invention discloses a method, a device and a mobile terminal for simulating sliding of a touch screen, so as to realize the effect of sliding in space similar to that of a touch screen. The method includes: mapping a dot matrix composed of N×N infrared sensors to a touch screen with M×M pixels, where both N and M are natural numbers greater than 1, and the N is not greater than the M; Gestures on the screen formed by the dot matrix infrared sensor; calculating the sliding distance d of the gesture on the screen formed by the dot matrix infrared sensor corresponding to the sliding distance d on the touch screen with M×M pixels '; Responding to the sliding distance d' on the touch screen with M×M pixels. The technical solution provided by the invention slides a finger on a screen formed by a dot-matrix infrared sensor, which can simulate a sticky message similar to a touch screen, and realize an air sliding function similar to a touch screen.
Description
技术领域technical field
本发明属于移动通信领域,尤其涉及一种模拟触摸屏滑动的方法、装置和一种移动终端。The invention belongs to the field of mobile communication, and in particular relates to a method and device for simulating sliding of a touch screen and a mobile terminal.
背景技术Background technique
智能终端技术的飞速发展,使得触摸屏在智能手机上大行其道。从技术原理角度讲,触摸屏是一套透明的绝对定位系统。绝对坐标系的特点是每一次定位坐标与上一次定位坐标没有关系,触摸屏在物理上是一套独立的坐标定位系统,每次触摸的数据通过校准数据转为屏幕上的坐标。各种触摸屏技术都是依靠各自的传感器来工作的。各自的定位原理和各自所用的传感器决定了触摸屏的反应速度、可靠性、稳定性和寿命。The rapid development of smart terminal technology has made touch screens popular on smart phones. From the perspective of technical principles, the touch screen is a transparent absolute positioning system. The characteristic of the absolute coordinate system is that each positioning coordinate has nothing to do with the last positioning coordinate. The touch screen is physically an independent coordinate positioning system. The data of each touch is converted into the coordinates on the screen through the calibration data. Various touch screen technologies rely on their own sensors to work. The respective positioning principles and the sensors used determine the response speed, reliability, stability and life of the touch screen.
目前,市面上存在点阵红外传感器(Sensor),此种点阵红外传感器是二维平面点阵。以4×4点阵为例,红外传感器上传数据包含两类,一类是识别手势之后的方向数据标识,这一类数据是非连续上报,另一类是上报点阵中每个红外传感器的原始数据,这一类数据是连续上报。At present, there are dot-matrix infrared sensors (Sensors) on the market, and this dot-matrix infrared sensor is a two-dimensional planar dot matrix. Taking the 4×4 dot matrix as an example, the data uploaded by the infrared sensor includes two types, one is the direction data identification after the gesture is recognized, this type of data is reported non-continuously, and the other is the original data of each infrared sensor in the dot matrix. Data, this type of data is reported continuously.
发明人对上述点阵红外传感器的研究发现,此种点阵红外传感器有二维平面的数据,红外传感器识别手势之后上报到上层即Java层。上层应用根据识别的方向,完成该方向上界面的整页滑动,然而,却无法实现类似触摸屏滑动距离跟随手指位置的效果。The inventor's research on the above-mentioned dot-matrix infrared sensor found that this dot-matrix infrared sensor has data on a two-dimensional plane, and after the infrared sensor recognizes gestures, it reports to the upper layer, that is, the Java layer. The upper-layer application completes the full-page sliding of the interface in this direction according to the recognized direction. However, it cannot achieve the effect similar to the sliding distance of the touch screen following the position of the finger.
发明内容Contents of the invention
本发明提供一种模拟触摸屏滑动的方法、装置和一种移动终端,以实现与触摸屏相似的隔空滑动效果。The invention provides a method and device for simulating sliding on a touch screen, and a mobile terminal, so as to realize the effect of sliding in space similar to that of a touch screen.
本发明第一方面提供一种模拟触摸屏滑动的方法,包括:The first aspect of the present invention provides a method for simulating touch screen sliding, including:
将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏,所述N和M均为大于1的自然数,且所述N不大于所述M;Mapping a dot matrix composed of N×N infrared sensors to a touch screen with M×M pixels, where both N and M are natural numbers greater than 1, and the N is not greater than the M;
捕获在所述点阵红外传感器构成的屏幕上的手势;Capturing gestures on the screen formed by the dot matrix infrared sensor;
计算所述手势在所述点阵红外传感器构成的屏幕上滑动距离d时对应在所述M×M个像素点的触摸屏上滑动的距离d’;Calculate the distance d' corresponding to the sliding distance d' on the touch screen of the M×M pixels when the gesture is sliding on the screen formed by the dot matrix infrared sensor;
响应在所述M×M个像素点的触摸屏上滑动的距离d’。Responding to the distance d' sliding on the touch screen with M×M pixels.
结合第一方面,在第一方面的第一种可能的实现方式中,若所述N远小于M,则将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏之前,所述方法还包括:With reference to the first aspect, in the first possible implementation of the first aspect, if the N is much smaller than M, the dot matrix composed of N×N infrared sensors is mapped to the front of the touch screen with M×M pixels , the method also includes:
对触摸屏上M×M个像素点中即将被映射的N×N个像素点进行插值处理,使N×N个像素点变为N1×N2个像素点,所述N1=N×x,所述N2=N×y,所述x和y分别为插值倍数。Perform interpolation processing on the N×N pixel points to be mapped among the M×M pixel points on the touch screen, so that the N×N pixel points become N 1 ×N 2 pixel points, and the N 1 =N×x , the N 2 =N×y, and the x and y are interpolation multiples respectively.
结合第一方面,在第一方面的第二种可能的实现方式中,所述捕获在所述点阵红外传感器构成的屏幕上的手势之后,所述方法还包括:With reference to the first aspect, in a second possible implementation of the first aspect, after capturing the gesture on the screen formed by the dot matrix infrared sensor, the method further includes:
通过补偿算法,处理误识别动作。Misrecognition actions are dealt with through compensation algorithms.
结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述通过补偿算法,处理误识别动作包括:With reference to the second possible implementation of the first aspect, in the third possible implementation of the first aspect, the processing of misidentification actions through compensation algorithms includes:
判断所述手势在所述点阵红外传感器构成的屏幕上从起始位置滑动到目标位置时的滑动方向;Judging the sliding direction of the gesture when sliding from the initial position to the target position on the screen formed by the dot matrix infrared sensor;
若在预设时间内,所述手势从所述目标位置沿与所述滑动方向相反的方向返回至所述起始位置,则过滤所述手势从所述目标位置沿与所述滑动方向相反的方向返回至所述起始位置产生的事件。If the gesture returns from the target position to the starting position in the direction opposite to the sliding direction within a preset time, filter the gesture from the target position in the direction opposite to the sliding direction Orientation returns to the start position event generated.
结合第一方面,在第一方面的第四种可能的实现方式中,所述计算所述手势在所述点阵红外传感器构成的屏幕上滑动距离d时对应在所述M×M个像素点的触摸屏上滑动的距离d’,包括:With reference to the first aspect, in a fourth possible implementation of the first aspect, the calculation of the sliding distance d of the gesture on the screen formed by the dot matrix infrared sensor corresponds to the M×M pixel points The sliding distance d' on the touch screen includes:
根据起始位置至目标位置之间任意一点至N×N个红外传感器中任意一列红外传感器构成的直线的距离以及所述任意一点分别与所述N个红外传感器的距离,计算所述手势在所述点阵红外传感器构成的屏幕上滑动的距离d,所述目标位置为手势在所述点阵红外传感器构成的屏幕上滑动距离d时的终点;According to the distance between any point between the starting position and the target position to a straight line formed by any column of infrared sensors in the N×N infrared sensors and the distances between the arbitrary point and the N infrared sensors, calculate the distance between the gesture and the N infrared sensors. The distance d of sliding on the screen formed by the dot matrix infrared sensor, the target position is the end point when the gesture slides distance d on the screen formed by the dot matrix infrared sensor;
根据公式d’=M×d/D,计算在所述M×M个像素点的触摸屏上滑动的距离d’,所述D为N×N个红外传感器构成的点阵中任意一列点阵发射信号时的覆盖范围。According to the formula d'=M×d/D, calculate the distance d' sliding on the touch screen of the M×M pixels, and the D is any column of dot matrix emission in the dot matrix composed of N×N infrared sensors signal coverage.
本发明第二方面提供一种模拟触摸屏滑动的装置,包括:The second aspect of the present invention provides a device for simulating touch screen sliding, including:
映射模块,用于将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏,所述N和M均为大于1的自然数,且所述N不大于所述M;A mapping module, configured to map a dot matrix composed of N×N infrared sensors to a touch screen with M×M pixels, where both N and M are natural numbers greater than 1, and the N is not greater than the M;
手势捕获模块,用于捕获在所述点阵红外传感器构成的屏幕上的手势;A gesture capture module, configured to capture gestures on the screen formed by the dot matrix infrared sensor;
距离计算模块,用于计算所述手势在所述点阵红外传感器构成的屏幕上滑动距离d时对应在所述M×M个像素点的触摸屏上滑动的距离d’;The distance calculation module is used to calculate the distance d' corresponding to the sliding distance d' on the touch screen of the M * M pixel points when the gesture slides the distance d on the screen formed by the dot matrix infrared sensor;
响应模块,用于响应在所述M×M个像素点的触摸屏上滑动的距离d’。A response module, configured to respond to the distance d' sliding on the touch screen with M×M pixels.
结合第二方面,在第二方面的第一种可能的实现方式中,所述装置还包括:With reference to the second aspect, in a first possible implementation manner of the second aspect, the device further includes:
插值模块,用于若所述N远小于M时,映射模块将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏之前,对触摸屏上M×M个像素点中即将被映射的N×N个像素点进行插值处理,使N×N个像素点变为N1×N2个像素点,所述N1=N×x,所述N2=N×y,所述x和y分别为插值倍数。The interpolation module is used for if the N is much smaller than M, before the mapping module maps the dot matrix formed by N×N infrared sensors to the touch screen with M×M pixels, the M×M pixels on the touch screen are about to The mapped N×N pixels are interpolated so that the N×N pixels become N 1 ×N 2 pixels, the N 1 =N×x, the N 2 =N×y, so Said x and y are interpolation multiples respectively.
结合第二方面,在第二方面的第二种可能的实现方式中,所述装置还包括:With reference to the second aspect, in a second possible implementation manner of the second aspect, the device further includes:
误识别处理模块,用于手势捕获模块捕获在所述点阵红外传感器构成的屏幕上的手势之后,通过补偿算法,处理误识别动作。The misrecognition processing module is used for the gesture capture module to process the misrecognition action through a compensation algorithm after capturing the gesture on the screen formed by the dot-matrix infrared sensor.
结合第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述误识别处理模块包括:With reference to the second possible implementation of the second aspect, in a third possible implementation of the second aspect, the misidentification processing module includes:
滑动方向判断单元,用于判断所述手势在所述点阵红外传感器构成的屏幕上从起始位置滑动到目标位置时的滑动方向;A sliding direction judging unit, configured to judge the sliding direction of the gesture when sliding from the initial position to the target position on the screen formed by the dot matrix infrared sensor;
过滤单元,用于若在预设时间内,所述手势从所述目标位置沿与所述滑动方向相反的方向返回至所述起始位置,则过滤所述手势从所述目标位置沿与所述滑动方向相反的方向返回至所述起始位置产生的事件。A filtering unit, configured to filter the gesture from the target position along the direction opposite to the sliding direction to the initial position if the gesture returns to the starting position from the target position within a preset time. The event generated by returning to the starting position in the opposite direction of the sliding direction.
结合第二方面,在第二方面的第四种可能的实现方式中,所述距离计算模块包括:With reference to the second aspect, in a fourth possible implementation manner of the second aspect, the distance calculation module includes:
第一计算单元,用于根据起始位置至目标位置之间任意一点至N×N个红外传感器中任意一列红外传感器构成的直线的距离以及所述任意一点分别与所述N个红外传感器的距离,计算所述手势在所述点阵红外传感器构成的屏幕上滑动的距离d,所述目标位置为手势在所述点阵红外传感器构成的屏幕上滑动距离d时的终点;The first calculation unit is used to calculate the distance from any point between the starting position to the target position to a straight line formed by any column of infrared sensors among the N×N infrared sensors and the distance between the arbitrary point and the N infrared sensors respectively , calculating the distance d that the gesture slides on the screen formed by the dot matrix infrared sensor, and the target position is the end point when the gesture slides the distance d on the screen formed by the dot matrix infrared sensor;
第二计算单元,用于根据公式d’=M×d/D,计算在所述M×M个像素点的触摸屏上滑动的距离d’,所述D为N×N个红外传感器构成的点阵中任意一列点阵发射信号时的覆盖范围。The second calculation unit is used to calculate the distance d' sliding on the touch screen with M×M pixels according to the formula d'=M×d/D, and the D is a point formed by N×N infrared sensors The coverage area when any column of dot matrix in the array transmits the signal.
本发明第三方面提供一种移动终端,所述移动终端包括上述模拟触摸屏滑动的装置。A third aspect of the present invention provides a mobile terminal, which includes the above-mentioned device for simulating sliding on a touch screen.
从上述本发明技术方案可知,由于能够将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏,在捕获在点阵红外传感器构成的屏幕上的手势后,计算手势在点阵红外传感器构成的屏幕上滑动距离d时对应在M×M个像素点的触摸屏上滑动的距离d’。因此,本发明提供的技术方案在点阵红外传感器构成的屏幕上滑动手指,能够模拟类似触摸屏的有粘性消息,实现类似于触摸屏的隔空滑动功能。It can be seen from the above-mentioned technical solution of the present invention that since the dot matrix formed by N×N infrared sensors can be mapped to a touch screen with M×M pixels, after the gesture on the screen formed by the dot matrix infrared sensor is captured, the gesture is calculated at The sliding distance d on the screen formed by the dot matrix infrared sensor corresponds to the sliding distance d' on the touch screen with M×M pixels. Therefore, the technical solution provided by the present invention slides the finger on the screen formed by the dot-matrix infrared sensor, which can simulate sticky messages similar to a touch screen, and realize the air sliding function similar to a touch screen.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1是本发明实施例一提供的模拟触摸屏滑动的方法的实现流程示意图;FIG. 1 is a schematic diagram of the implementation flow of the method for simulating touch screen sliding provided by Embodiment 1 of the present invention;
图2-a是本发明实施例提供的4×4个红外传感器构成的点阵示意图;Fig. 2-a is a schematic diagram of a dot matrix composed of 4×4 infrared sensors provided by an embodiment of the present invention;
图2-b是本发明实施例提供的以4×4个红外传感器构成的点阵为例计算计算手势在N×N点阵红外传感器构成的屏幕上滑动距离d时对应在M×M个像素点的触摸屏上滑动的距离d’第一示意图;Figure 2-b is an example of the calculation and calculation of the dot matrix composed of 4×4 infrared sensors provided by the embodiment of the present invention. When the gesture is slid on the screen composed of N×N dot matrix infrared sensors for a distance d, it corresponds to M×M pixels. The first schematic diagram of the sliding distance d' of the point on the touch screen;
图2-c是本发明实施例提供的以4×4个红外传感器构成的点阵为例计算计算手势在N×N点阵红外传感器构成的屏幕上滑动距离d时对应在M×M个像素点的触摸屏上滑动的距离d’第二示意图;Figure 2-c is an example of the calculation and calculation of the dot matrix composed of 4×4 infrared sensors provided by the embodiment of the present invention. When the gesture is slid on the screen composed of N×N dot matrix infrared sensors for a distance d, it corresponds to M×M pixels. The second schematic diagram of the sliding distance d' of the point on the touch screen;
图3是本发明实施例二提供的模拟触摸屏滑动的装置的结构示意图;FIG. 3 is a schematic structural diagram of a device for simulating touch screen sliding provided by Embodiment 2 of the present invention;
图4是本发明实施例三提供的模拟触摸屏滑动的装置的结构示意图;FIG. 4 is a schematic structural diagram of a device for simulating touch screen sliding provided by Embodiment 3 of the present invention;
图5是本发明实施例四提供的模拟触摸屏滑动的装置的结构示意图;Fig. 5 is a schematic structural diagram of a device for simulating touch screen sliding provided by Embodiment 4 of the present invention;
图6是本发明实施例五提供的模拟触摸屏滑动的装置的结构示意图;FIG. 6 is a schematic structural diagram of a device for simulating sliding on a touch screen provided in Embodiment 5 of the present invention;
图7是本发明实施例六提供的模拟触摸屏滑动的装置的结构示意图。FIG. 7 is a schematic structural diagram of a device for simulating sliding on a touch screen provided by Embodiment 6 of the present invention.
具体实施方式Detailed ways
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而非全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described The embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
本发明实施例提供一种模拟触摸屏滑动的方法,所述方法包括:将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏,所述N和M均为大于1的自然数,且所述N不大于所述M;捕获在所述点阵红外传感器构成的屏幕上的手势;计算所述手势在所述点阵红外传感器构成的屏幕上滑动距离d时对应在所述M×M个像素点的触摸屏上滑动的距离d’;响应在所述M×M个像素点的触摸屏上滑动的距离d’。本发明实施例还提供相应的模拟触摸屏滑动的装置和一种移动终端。以下分别进行详细说明。An embodiment of the present invention provides a method for simulating sliding on a touch screen, the method comprising: mapping a dot matrix composed of N×N infrared sensors to a touch screen with M×M pixels, where both N and M are greater than 1 A natural number, and the N is not greater than the M; capture the gesture on the screen formed by the dot matrix infrared sensor; calculate the sliding distance d of the gesture on the screen formed by the dot matrix infrared sensor corresponding to the The sliding distance d' on the touch screen with M×M pixels; the distance d' in response to the sliding on the touch screen with M×M pixels. Embodiments of the present invention also provide a corresponding device for simulating sliding on a touch screen and a mobile terminal. Each will be described in detail below.
请参阅附图1,是本发明实施例一提供的模拟触摸屏滑动的方法的实现流程,其执行主体可以是智能手机、平板电脑等移动终端。附图1示例的模拟触摸屏滑动的方法主要包括以下步骤S101至步骤S104:Please refer to FIG. 1 , which is the implementation flow of the method for simulating touch screen sliding provided by Embodiment 1 of the present invention, and its execution subject may be a mobile terminal such as a smart phone or a tablet computer. The method for simulating touch screen sliding illustrated in accompanying drawing 1 mainly includes the following steps S101 to S104:
S101,将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏。S101 , mapping a dot matrix formed by N×N infrared sensors to a touch screen with M×M pixels.
在本发明实施例中,N和M均为大于1的自然数,且N不大于M。将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏,相当于将每M个像素点平均分成N等份,每份M/N个像素点,然后,N×N个红外传感器构成的点阵中,每一列或每一行点阵的第一个红外传感器对应M×M个像素点中相应列或相应行的第M/N个像素点,第二个红外传感器对应M×M个像素点中相应列或相应行的第2M/N个像素点,……,第N个红外传感器对应M×M个像素点中相应列或相应行的第M个像素点。例如,对于50×50个红外传感器构成的点阵,要将其映射至300×300个像素点的触摸屏,则将300均分成50等份,每间隔6个像素点即被50×50个红外传感器构成的点阵中的一个红外传感器对应。具体地,50×50个红外传感器构成的点阵中的每一列或每一行点阵的第1个红外传感器对应300×300个像素点中相应列或相应行的第6个像素点,第2个红外传感器对应300×300个像素点中相应列或相应行的第12个像素点,……,第50个红外传感器对应300×300个像素点中相应列或相应行的第300个像素点。需要说明的是,在M/N不为整数时,视情形对M/N向下取整或向上取整。一旦N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏,则可以将手势运动产生的连续的传感器(Sensor)数据转化为连续的运动事件(MotionEvent)数据,相当于M×M分辨率的触摸屏产生的数据。In the embodiment of the present invention, both N and M are natural numbers greater than 1, and N is not greater than M. Mapping a dot matrix composed of N×N infrared sensors to a touch screen with M×M pixels is equivalent to dividing each M pixel into N equal parts, each with M/N pixels, and then, N×N In a dot matrix composed of three infrared sensors, the first infrared sensor in each column or row of dot matrix corresponds to the M/Nth pixel in the corresponding column or row of M×M pixels, and the second infrared sensor corresponds to The 2M/Nth pixel in the corresponding column or row in the M×M pixels, ..., the Nth infrared sensor corresponds to the Mth pixel in the corresponding column or row in the M×M pixels. For example, for a dot matrix composed of 50×50 infrared sensors, if it is to be mapped to a touch screen with 300×300 pixels, divide 300 into 50 equal parts, and each interval of 6 pixels is divided into 50×50 infrared sensors. One infrared sensor in the dot matrix formed by the sensor corresponds. Specifically, the first infrared sensor in each column or row of the dot matrix composed of 50×50 infrared sensors corresponds to the sixth pixel in the corresponding column or row in the 300×300 pixels, and the second The first infrared sensor corresponds to the 12th pixel in the corresponding column or row of 300×300 pixels, ..., the 50th infrared sensor corresponds to the 300th pixel in the corresponding column or row of 300×300 pixels . It should be noted that when M/N is not an integer, M/N is rounded down or rounded up depending on the situation. Once the dot matrix composed of N×N infrared sensors is mapped to the touch screen with M×M pixels, the continuous sensor (Sensor) data generated by gesture movements can be converted into continuous motion event (MotionEvent) data, which is equivalent to M Data generated by a touch screen with ×M resolution.
在N远小于M时,直接将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏后,被映射的像素点太少,那么,最终模拟出来的滑动效果不流畅,给用户的感觉是一卡一卡的,体验不好。因此,在本发明实施例中,可以对触摸屏上M×M个像素点中即将被映射的N×N个像素点进行插值处理,使N×N个像素点变为N1×N2个像素点,其中,N1=N×x,N2=N×y,x和y分别为插值倍数。When N is much smaller than M, after directly mapping the dot matrix composed of N×N infrared sensors to the touch screen with M×M pixels, there are too few mapped pixels, so the final simulated sliding effect is not smooth, It gives the user the feeling that one card is one card, and the experience is not good. Therefore, in the embodiment of the present invention, interpolation processing can be performed on the N×N pixel points to be mapped among the M×M pixel points on the touch screen, so that the N×N pixel points become N 1 ×N 2 pixels points, wherein, N 1 =N×x, N 2 =N×y, and x and y are interpolation multiples respectively.
例如,对于50×50个红外传感器构成的点阵映射至3000×3000个像素点的触摸屏,由于50与3000相隔60倍,可以视为50远小于3000,如此,直接将50×50个红外传感器构成的点阵映射至3000×3000个像素点的触摸屏后,被映射的像素点太少(只有50个,相对于3000太少),那么,最终模拟出来的滑动效果不流畅,给用户的感觉是一卡一卡的,体验不好。在本发明实施例中,如将50×50个红外传感器构成的点阵映射至3000×3000个像素点的触摸屏,则将3000均分成50等份,每间隔60个像素点被50×50个红外传感器构成的点阵中的一个红外传感器对应,即,50×50个红外传感器构成的点阵中的每一列或每一行点阵的第1个红外传感器对应3000×3000个像素点中相应列或相应行的第60个像素点,第2个红外传感器对应3000×3000个像素点中相应列或相应行的第120个像素点,……,第50个红外传感器对应3000×3000个像素点中相应列或相应行的第3000个像素点。若对触摸屏上3000×3000个像素点中即将被映射的50×50个像素点进行插值处理,例如,按照插值倍数10倍来插值,则相当于在每一列或者每一行的3000个像素点中,在第1个像素点至第60个像素点中每间隔6个像素点插入一个像素点,即在第1个像素点至第60个像素点中总共插入10像素点,在第61个像素点至第120个像素点中每间隔6个像素点插入一个像素点,即在第61个像素点至第60个像素点中总共插入10像素点,……,在第2941个像素点至第3000个像素点中每间隔6个像素点插入一个像素点,即在第2941个像素点至第300个像素点中总共插入10像素点,如此,总共插入了500个像素点,加上被映射的50个像素点,3000×3000个像素点中每一行或者每一列总共是550个像素点,相对于没有插值之前的50个像素点,在映射后再模拟手势滑动,能够大大提高流畅性,减小一卡一卡的感觉。For example, for a touch screen with a dot matrix composed of 50×50 infrared sensors mapped to 3000×3000 pixels, since the distance between 50 and 3000 is 60 times, it can be considered that 50 is much smaller than 3000, so that the 50×50 infrared sensors are directly After the formed dot matrix is mapped to a touch screen with 3000×3000 pixels, there are too few pixels to be mapped (only 50, which is too few compared to 3000), so the final simulated sliding effect is not smooth, giving the user a feeling of It's one card for one card, and the experience is not good. In the embodiment of the present invention, if a dot matrix composed of 50×50 infrared sensors is mapped to a touch screen with 3000×3000 pixels, then 3000 will be divided into 50 equal parts, and every interval of 60 pixels will be divided into 50×50 pixels. One infrared sensor in the dot matrix composed of infrared sensors corresponds, that is, the first infrared sensor in each column or row of the dot matrix composed of 50×50 infrared sensors corresponds to the corresponding column in the 3000×3000 pixel points Or the 60th pixel of the corresponding row, the second infrared sensor corresponds to the 120th pixel of the corresponding column or row in the 3000×3000 pixels, ..., the 50th infrared sensor corresponds to 3000×3000 pixels The 3000th pixel of the corresponding column or corresponding row in . If interpolation is performed on the 50×50 pixels to be mapped among the 3000×3000 pixels on the touch screen, for example, interpolation is performed according to the interpolation multiple of 10 times, which is equivalent to 3000 pixels in each column or row , insert a pixel every 6 pixels from the first pixel to the 60th pixel, that is, insert a total of 10 pixels from the first pixel to the 60th pixel, and insert a pixel at the 61st pixel Insert a pixel at intervals of 6 pixels from the point to the 120th pixel, that is, insert a total of 10 pixels from the 61st pixel to the 60th pixel, ..., from the 2941st pixel to the 2941st pixel A pixel is inserted every 6 pixels in the 3000 pixels, that is, a total of 10 pixels are inserted from the 2941st pixel to the 300th pixel. In this way, a total of 500 pixels are inserted, plus the mapped There are 50 pixels in the 3000×3000 pixels, and each row or column in the 3000×3000 pixels is a total of 550 pixels. Compared with the 50 pixels before interpolation, after mapping and then simulating gesture sliding, the fluency can be greatly improved. Reduce the feeling of one card one card.
S102,捕获在N×N点阵红外传感器构成的屏幕上的手势。S102. Capturing gestures on the screen composed of N×N dot-matrix infrared sensors.
在本发明实施例中,当手指在点阵红外传感器构成的屏幕上滑动时,点阵传感器中的每个红外传感器可以捕获传感器数据;随着手指的滑动和每个红外传感器的捕获,即可捕获在N×N点阵红外传感器(N×N个传感器构成的点阵)构成的屏幕上的手势。In the embodiment of the present invention, when the finger slides on the screen formed by the dot matrix infrared sensor, each infrared sensor in the dot matrix sensor can capture sensor data; Capture gestures on the screen composed of N×N dot matrix infrared sensors (dot matrix composed of N×N sensors).
由于某些用户在将手指从一个地方滑动至另一个地方时,可能会立刻回到起始位置。按照用户的愿意,短时间回到起始位置是不应该被识别的。若识别,则就是误识别。为了防止这种情形的发生,在本发明实施例中,捕获在点阵红外传感器构成的屏幕上的手势之后,所述方法还包括:通过补偿算法,处理误识别动作。具体地,可以先判断手势在N×N的点阵红外传感器构成的屏幕上从起始位置滑动到目标位置时的滑动方向,然后,若在预设时间内,例如,800ms内,所述手势从目标位置沿与滑动方向相反的方向返回至起始位置,则过滤所述手势从所述目标位置沿与所述滑动方向相反的方向返回至所述起始位置产生的事件。一旦这类事件被过滤,则后续系统不会有对手势响应,从而不会出现滑动效果。Because some users may immediately return to the starting position when swiping their fingers from one place to another. According to the user's wishes, returning to the starting position for a short time should not be recognized. If recognized, it is misidentified. In order to prevent this from happening, in the embodiment of the present invention, after capturing the gesture on the screen formed by the dot-matrix infrared sensor, the method further includes: using a compensation algorithm to process misrecognized actions. Specifically, it is possible to first determine the sliding direction of the gesture when it slides from the initial position to the target position on the screen composed of N×N dot matrix infrared sensors, and then, if within a preset time, for example, within 800ms, the gesture Returning from the target position to the starting position in the direction opposite to the sliding direction, then filter the event generated by the gesture returning from the target position to the starting position in the direction opposite to the sliding direction. Once this type of event is filtered, the subsequent system will not respond to the gesture, so there will be no sliding effect.
S103,计算手势在N×N点阵红外传感器构成的屏幕上滑动距离d时对应在M×M个像素点的触摸屏上滑动的距离d’。S103, calculate the sliding distance d' corresponding to the sliding distance d on the touch screen with M×M pixels when the gesture slides on the screen composed of N×N dot matrix infrared sensors.
具体地,作为本发明一个实施例,计算手势在N×N点阵红外传感器构成的屏幕上滑动距离d时对应在M×M个像素点的触摸屏上滑动的距离d’可以包括如下步骤S1031和步骤S1032:Specifically, as an embodiment of the present invention, calculating the sliding distance d' corresponding to the gesture sliding distance d on the screen composed of N×N dot matrix infrared sensors on the touch screen with M×M pixels may include the following steps S1031 and Step S1032:
S1031,根据起始位置至目标位置之间任意一点至N×N个红外传感器中任意一列红外传感器构成的直线的距离以及所述任意一点分别与所述N个点阵的距离,计算所述手势在N×N点阵红外传感器构成的屏幕上滑动的距离d,其中,目标位置为手势在N×N点阵红外传感器构成的屏幕上滑动距离d时的终点。S1031. Calculate the gesture according to the distance from any point between the starting position to the target position to a straight line formed by any column of infrared sensors among the N×N infrared sensors and the distances between the arbitrary point and the N dot matrixes respectively A sliding distance d on the screen composed of N×N dot-matrix infrared sensors, wherein the target position is the end point when the gesture slides the distance d on the screen composed of N×N dot-matrix infrared sensors.
S1032,根据公式d’=M×d/D,计算在M×M个像素点的触摸屏上滑动的距离d’,其中,D为N×N个红外传感器构成的点阵中任意一列点阵发射信号时的覆盖范围。S1032, according to the formula d'=M×d/D, calculate the sliding distance d' on the touch screen with M×M pixels, where D is any array of dot matrix emission in the dot matrix formed by N×N infrared sensors signal coverage.
以4×4个红外传感器构成的点阵为例,如附图2-a所示。如附图2-b所示,假设4×4个红外传感器中任意一列红外传感器点阵即4个红外传感器(图中4个黑点所示,编号分别为1、2、3和4,以下分别称为红外传感器1、红外传感器2、红外传感器3和红外传感器4)探测到手势从起始位置(图中涂黑三角形所示)滑动到目标位置(图中圆圈所示),起始位置至目标位置的距离使用d表示,4个红外传感器发射信号时的覆盖范围在图中使用D表示,起始位置至目标位置之间任意一点至4×4个红外传感器中任意一列红外传感器(4个红外传感器)构成的直线的距离在图中使用Lmin表示,起始位置至目标位置之间任意一点(图中一个正方形黑点所示)分别与4个红外传感器的距离使用L1、L2、L3和L4表示。Take the dot matrix composed of 4×4 infrared sensors as an example, as shown in Figure 2-a. As shown in Figure 2-b, assume that any column of infrared sensor dot matrix in the 4×4 infrared sensors is 4 infrared sensors (shown by 4 black dots in the figure, the numbers are 1, 2, 3 and 4 respectively, the following Respectively referred to as infrared sensor 1, infrared sensor 2, infrared sensor 3 and infrared sensor 4) when the gesture is detected to slide from the initial position (shown by the black triangle in the figure) to the target position (shown by the circle in the figure), the initial position The distance to the target position is represented by d, and the coverage area of the 4 infrared sensors when transmitting signals is represented by D in the figure. The distance of a straight line formed by two infrared sensors) is represented by Lmin in the figure, and the distances between any point between the starting position and the target position (shown by a square black dot in the figure) and the four infrared sensors are respectively represented by L1, L2, and L3 and L4 said.
假设在起始位置只有红外传感器1检测到目标位置,起始位置至红外传感器1的距离为L11,如附图2-c所示,那么起始位置至阵子检测中心点的位置d1可以根据三角函数式得到以同样方法计算上图中的d2,这样距离d=d1+d2。如果红外传感器1检测不到目标位置,就以红外传感器2为坐标点计算纵向位置,而假设红外传感器1的检测范围上下是对称的即d=2×d1+d3,此处假设以红外传感器2为坐标点计算的纵向距离。Assuming that only the infrared sensor 1 detects the target position at the initial position, and the distance from the initial position to the infrared sensor 1 is L11, as shown in Figure 2-c, then the position d1 from the initial position to the center point of the array detection can be calculated according to the triangle function to get Calculate d2 in the above figure in the same way, so that the distance d=d1+d2. If the infrared sensor 1 cannot detect the target position, the longitudinal position is calculated with the infrared sensor 2 as the coordinate point, and assuming that the detection range of the infrared sensor 1 is symmetrical up and down, that is, d=2×d1+d3, here it is assumed that the infrared sensor 2 The longitudinal distance calculated for the coordinate point.
手势在N×N点阵红外传感器构成的屏幕上滑动的距离d计算出来后,根据公式d’=M×d/D,容易计算在M×M个像素点的触摸屏上滑动的距离d’。After calculating the sliding distance d of the gesture on the screen composed of N×N dot matrix infrared sensors, according to the formula d’=M×d/D, it is easy to calculate the sliding distance d’ on the touch screen with M×M pixels.
S104,响应在M×M个像素点的触摸屏上滑动的距离d’。S104, responding to the sliding distance d' on the touch screen with M×M pixels.
从上述附图1示例的模拟触摸屏滑动的方法可知,由于能够将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏,在捕获在点阵红外传感器构成的屏幕上的手势后,计算手势在点阵红外传感器构成的屏幕上滑动距离d时对应在M×M个像素点的触摸屏上滑动的距离d’。因此,本发明提供的技术方案在点阵红外传感器构成的屏幕上滑动手指,能够模拟类似触摸屏的有粘性消息,实现类似于触摸屏的隔空滑动功能。It can be seen from the method of simulating the sliding of the touch screen in the example of accompanying drawing 1 above, since the dot matrix composed of N*N infrared sensors can be mapped to the touch screen with M*M pixels, the screen captured on the screen composed of dot matrix infrared sensors After the gesture, calculate the sliding distance d' corresponding to the sliding distance d on the touch screen with M×M pixels when the gesture slides on the screen formed by the dot matrix infrared sensor. Therefore, the technical solution provided by the present invention slides the finger on the screen formed by the dot-matrix infrared sensor, which can simulate sticky messages similar to a touch screen, and realize the air sliding function similar to a touch screen.
请参阅附图3,是本发明实施例二提供的模拟触摸屏滑动的装置的结构示意图。为了便于说明,仅示出了与本发明实施例相关的部分。附图3示例的模拟触摸屏滑动的装置可以是前述实施例提供的模拟触摸屏滑动的方法的执行主体,其可以是智能终端或者其中的一个功能模块。附图3示例的模拟触摸屏滑动的装置主要包括映射模块301、手势捕获模块302、距离计算模块303和响应模块304,各功能模块详细说明如下:Please refer to FIG. 3 , which is a schematic structural diagram of a device for simulating sliding on a touch screen provided by Embodiment 2 of the present invention. For ease of description, only parts related to the embodiments of the present invention are shown. The device for simulating touch screen sliding illustrated in FIG. 3 may be the subject of execution of the method for simulating touch screen sliding provided in the foregoing embodiments, which may be a smart terminal or a functional module thereof. The device for simulating touch screen sliding shown in Figure 3 mainly includes a mapping module 301, a gesture capture module 302, a distance calculation module 303 and a response module 304, and each functional module is described in detail as follows:
映射模块301,用于将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏。The mapping module 301 is configured to map the dot matrix formed by N×N infrared sensors to the touch screen with M×M pixels.
在本发明实施例中,N和M均为大于1的自然数,且N不大于M。映射模块301将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏,相当于将每M个像素点平均分成N等份,每份M/N个像素点,然后,N×N个红外传感器构成的点阵中,每一列或每一行点阵的第一个红外传感器对应M×M个像素点中相应列或相应行的第M/N个像素点,第二个红外传感器对应M×M个像素点中相应列或相应行的第2M/N个像素点,……,第N个红外传感器对应M×M个像素点中相应列或相应行的第M个像素点。例如,对于50×50个红外传感器构成的点阵,映射模块301要将其映射至300×300个像素点的触摸屏,则将300均分成50等份,每间隔6个像素点即被50×50个红外传感器构成的点阵中的一个红外传感器对应。具体地,50×50个红外传感器构成的点阵中的每一列或每一行点阵的第1个红外传感器对应300×300个像素点中相应列或相应行的第6个像素点,第2个红外传感器对应300×300个像素点中相应列或相应行的第12个像素点,……,第50个红外传感器对应300×300个像素点中相应列或相应行的第300个像素点。需要说明的是,在M/N不为整数时,视情形对M/N向下取整或向上取整。一旦N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏,则可以将手势运动产生的连续的传感器(Sensor)数据转化为连续的运动事件(MotionEvent)数据,相当于M×M分辨率的触摸屏产生的数据。In the embodiment of the present invention, both N and M are natural numbers greater than 1, and N is not greater than M. The mapping module 301 maps the dot matrix formed by N×N infrared sensors to the touch screen with M×M pixels, which is equivalent to dividing every M pixels into N equal parts, each with M/N pixels, and then, In a dot matrix composed of N×N infrared sensors, the first infrared sensor in each column or row of dot matrix corresponds to the M/Nth pixel in the corresponding column or row of M×M pixels, and the second The infrared sensor corresponds to the 2M/Nth pixel in the corresponding column or row of M×M pixels, ..., the Nth infrared sensor corresponds to the Mth pixel in the corresponding column or row of M×M pixels point. For example, for a dot matrix composed of 50×50 infrared sensors, if the mapping module 301 is to map it to a touch screen with 300×300 pixels, 300 will be divided into 50 equal parts, and every 6 pixels will be divided into 50× One infrared sensor in the dot matrix composed of 50 infrared sensors corresponds. Specifically, the first infrared sensor in each column or row of the dot matrix composed of 50×50 infrared sensors corresponds to the sixth pixel in the corresponding column or row in the 300×300 pixels, and the second The first infrared sensor corresponds to the 12th pixel in the corresponding column or row of 300×300 pixels, ..., the 50th infrared sensor corresponds to the 300th pixel in the corresponding column or row of 300×300 pixels . It should be noted that when M/N is not an integer, M/N is rounded down or rounded up depending on the situation. Once the dot matrix composed of N×N infrared sensors is mapped to the touch screen with M×M pixels, the continuous sensor (Sensor) data generated by gesture movements can be converted into continuous motion event (MotionEvent) data, which is equivalent to M The data generated by the touch screen with ×M resolution.
手势捕获模块302,用于捕获在N×N点阵红外传感器构成的屏幕上的手势。The gesture capture module 302 is configured to capture gestures on the screen formed by N×N dot matrix infrared sensors.
在本发明实施例中,当手指在点阵红外传感器构成的屏幕上滑动时,点阵传感器中的每个红外传感器可以捕获传感器数据;随着手指的滑动和每个红外传感器的捕获,手势捕获模块302即可捕获在N×N点阵红外传感器(N×N个传感器构成的点阵)构成的屏幕上的手势。In the embodiment of the present invention, when the finger slides on the screen formed by the dot-matrix infrared sensors, each infrared sensor in the dot-matrix sensor can capture sensor data; The module 302 can capture gestures on the screen formed by N×N dot-matrix infrared sensors (a dot matrix composed of N×N sensors).
距离计算模块303,用于计算手势在N×N点阵红外传感器构成的屏幕上滑动距离d时对应在M×M个像素点的触摸屏上滑动的距离d’;The distance calculation module 303 is used to calculate the distance d' corresponding to the sliding distance d' on the touch screen of M * M pixel points when the gesture slides the distance d on the screen formed by the N * N dot matrix infrared sensor;
响应模块304,用于响应在M×M个像素点的触摸屏上滑动的距离d’。A response module 304, configured to respond to the distance d' sliding on the touch screen with M×M pixels.
需要说明的是,以上附图3示例的模拟触摸屏滑动的装置的实施方式中,各功能模块的划分仅是举例说明,实际应用中可以根据需要,例如相应硬件的配置要求或者软件的实现的便利考虑,而将上述功能分配由不同的功能模块完成,即将所述模拟触摸屏滑动的装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。而且,实际应用中,本实施例中的相应的功能模块可以是由相应的硬件实现,也可以由相应的硬件执行相应的软件完成,例如,前述的映射模块,可以是具有执行前述将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏的硬件,例如映射器,也可以是能够执行相应计算机程序从而完成前述功能的一般处理器或者其他硬件设备;再如前述的手势捕获模块,可以是执行捕获在所述点阵红外传感器构成的屏幕上的手势的硬件,例如手势捕获器,也可以是能够执行相应计算机程序从而完成前述功能的一般处理器或者其他硬件设备(本说明书提供的各个实施例都可应用上述描述原则)。It should be noted that, in the embodiment of the device for simulating touch screen sliding shown in Fig. 3 above, the division of each functional module is only for illustration. Considering that the above function allocation is completed by different functional modules, that is, the internal structure of the device for simulating touch screen sliding is divided into different functional modules to complete all or part of the functions described above. Moreover, in practical applications, the corresponding functional modules in this embodiment may be implemented by corresponding hardware, or may be completed by corresponding hardware executing corresponding software. For example, the aforementioned mapping module may be capable of executing the aforementioned N× The dot matrix formed by N infrared sensors is mapped to the hardware of the touch screen with M×M pixels, such as a mapper, or it can be a general processor or other hardware device capable of executing the corresponding computer program to complete the aforementioned functions; as mentioned above The gesture capture module can be hardware that executes gestures captured on the screen formed by the dot matrix infrared sensor, such as a gesture capture device, or can be a general processor or other hardware device capable of executing a corresponding computer program to complete the aforementioned functions ( Each of the embodiments provided in this specification can apply the above description principle).
从上述附图3示例的模拟触摸屏滑动的装置可知,由于映射模块能够将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏,在手势捕获模块捕获在点阵红外传感器构成的屏幕上的手势后,距离计算模块计算手势在点阵红外传感器构成的屏幕上滑动距离d时对应在M×M个像素点的触摸屏上滑动的距离d’。因此,本发明提供的技术方案在点阵红外传感器构成的屏幕上滑动手指,能够模拟类似触摸屏的有粘性消息,实现类似于触摸屏的隔空滑动功能。It can be seen from the device for simulating the sliding of the touch screen in the example of accompanying drawing 3 that since the mapping module can map the dot matrix formed by N*N infrared sensors to the touch screen of M*M pixels, the gesture capture module captures the dot matrix infrared sensor After the gesture on the screen is formed, the distance calculation module calculates the sliding distance d' corresponding to the sliding distance d' on the touch screen with M×M pixels when the gesture slides the distance d on the screen formed by the dot matrix infrared sensor. Therefore, the technical solution provided by the present invention slides the finger on the screen formed by the dot-matrix infrared sensor, which can simulate sticky messages similar to a touch screen, and realize the air sliding function similar to a touch screen.
附图3示例的模拟触摸屏滑动的装置还可以包括插值模块401,如附图4所示本发明实施例三提供的模拟触摸屏滑动的装置。插值模块401用于若N远小于M时,映射模块301将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏之前,对触摸屏上M×M个像素点中即将被映射的N×N个像素点进行插值处理,使N×N个像素点变为N1×N2个像素点,其中,N1=N×x,N2=N×y,x和y分别为插值倍数。The device for simulating sliding on a touch screen illustrated in FIG. 3 may further include an interpolation module 401 , as shown in FIG. 4 , the device for simulating sliding on a touch screen provided in Embodiment 3 of the present invention. The interpolation module 401 is used for if N is much smaller than M, the mapping module 301 maps the dot matrix formed by N×N infrared sensors to the touch screen with M×M pixels, and the M×M pixels on the touch screen are about to be The mapped N×N pixels are interpolated so that N×N pixels become N 1 ×N 2 pixels, where N 1 =N×x, N 2 =N×y, x and y are respectively is the interpolation multiple.
在N远小于M时,映射模块301直接将N×N个红外传感器构成的点阵映射至M×M个像素点的触摸屏后,被映射的像素点太少,那么,最终模拟出来的滑动效果不流畅,给用户的感觉是一卡一卡的,体验不好。因此,在本发明实施例中,插值模块401可以对触摸屏上M×M个像素点中即将被映射的N×N个像素点进行插值处理,使N×N个像素点变为N1×N2个像素点,其中,N1=N×x,N2=N×y,x和y分别为插值倍数。When N is much smaller than M, after the mapping module 301 directly maps the dot matrix formed by N×N infrared sensors to the touch screen with M×M pixels, there are too few mapped pixels, so the final simulated sliding effect It is not smooth, and the user feels that there is one card and one card, and the experience is not good. Therefore, in the embodiment of the present invention, the interpolation module 401 can perform interpolation processing on the N×N pixel points to be mapped among the M×M pixel points on the touch screen, so that the N×N pixel points become N 1 ×N 2 pixels, where N 1 =N×x, N 2 =N×y, and x and y are interpolation multiples respectively.
例如,对于50×50个红外传感器构成的点阵映射至3000×3000个像素点的触摸屏,由于50与3000相隔60倍,可以视为50远小于3000,如此,映射模块301直接将50×50个红外传感器构成的点阵映射至3000×3000个像素点的触摸屏后,被映射的像素点太少(只有50个,相对于3000太少),那么,最终模拟出来的滑动效果不流畅,给用户的感觉是一卡一卡的,体验不好。在本发明实施例中,如映射模块301将50×50个红外传感器构成的点阵映射至3000×3000个像素点的触摸屏,则将3000均分成50等份,每间隔60个像素点被50×50个红外传感器构成的点阵中的一个红外传感器对应,即,50×50个红外传感器构成的点阵中的每一列或每一行点阵的第1个红外传感器对应3000×3000个像素点中相应列或相应行的第60个像素点,第2个红外传感器对应3000×3000个像素点中相应列或相应行的第120个像素点,……,第50个红外传感器对应3000×3000个像素点中相应列或相应行的第3000个像素点。若插值模块401对触摸屏上3000×3000个像素点中即将被映射的50×50个像素点进行插值处理,例如,按照插值倍数10倍来插值,则相当于在每一列或者每一行的3000个像素点中,在第1个像素点至第60个像素点中每间隔6个像素点插入一个像素点,即在第1个像素点至第60个像素点中总共插入10像素点,在第61个像素点至第120个像素点中每间隔6个像素点插入一个像素点,即在第61个像素点至第60个像素点中总共插入10像素点,……,在第2941个像素点至第3000个像素点中每间隔6个像素点插入一个像素点,即在第2941个像素点至第300个像素点中总共插入10像素点,如此,总共插入了500个像素点,加上被映射的50个像素点,3000×3000个像素点中每一行或者每一列总共是550个像素点,相对于没有插值之前的50个像素点,在映射后再模拟手势滑动,能够大大提高流畅性,减小一卡一卡的感觉。For example, for a touch screen with a dot matrix composed of 50×50 infrared sensors mapped to 3000×3000 pixels, since 50 and 3000 are 60 times apart, it can be considered that 50 is much smaller than 3000, so the mapping module 301 directly converts 50×50 After the dot matrix composed of three infrared sensors is mapped to the touch screen with 3000×3000 pixels, the mapped pixels are too few (only 50, which is too few compared to 3000), so the final simulated sliding effect is not smooth, giving The user feels that there is one card and one card, and the experience is not good. In the embodiment of the present invention, if the mapping module 301 maps a dot matrix composed of 50×50 infrared sensors to a touch screen with 3000×3000 pixels, the 3000 is divided into 50 equal parts, and every interval of 60 pixels is divided by 50 One infrared sensor in the dot matrix composed of ×50 infrared sensors corresponds, that is, the first infrared sensor in each column or row of the dot matrix composed of 50×50 infrared sensors corresponds to 3000×3000 pixels The 60th pixel in the corresponding column or row, the second infrared sensor corresponds to the 120th pixel in the corresponding column or row of 3000×3000 pixels, ..., the 50th infrared sensor corresponds to 3000×3000 The 3000th pixel of the corresponding column or corresponding row in the pixels. If the interpolation module 401 performs interpolation processing on the 50×50 pixels to be mapped among the 3000×3000 pixels on the touch screen, for example, interpolating according to the interpolation multiple of 10 times, it is equivalent to 3000 pixels in each column or row Among the pixels, a pixel is inserted at intervals of 6 pixels from the first pixel to the 60th pixel, that is, a total of 10 pixels are inserted from the first pixel to the 60th pixel. From the 61st pixel to the 120th pixel, insert a pixel every 6 pixels, that is, insert a total of 10 pixels from the 61st pixel to the 60th pixel, ..., at the 2941st pixel From the point to the 3000th pixel, a pixel is inserted at intervals of 6 pixels, that is, a total of 10 pixels are inserted from the 2941st pixel to the 300th pixel. In this way, a total of 500 pixels are inserted, plus For the 50 pixels mapped above, each row or column of 3000×3000 pixels has a total of 550 pixels. Compared with the 50 pixels before interpolation, simulating gesture sliding after mapping can greatly improve Fluency, reducing the feeling of one card after another.
附图3示例的模拟触摸屏滑动的装置还可以包括误识别处理模块501,如附图5所示本发明实施例四提供的模拟触摸屏滑动的装置。误识别处理模块501用于手势捕获模块302捕获在N×N点阵红外传感器构成的屏幕上的手势之后,通过补偿算法,处理误识别动作。由于某些用户在将手指从一个地方滑动至另一个地方时,可能会立刻回到起始位置。按照用户的愿意,短时间回到起始位置是不应该被识别的。若识别,则就是误识别。为了防止这种情形的发生,在本发明实施例中,手势捕获模块302捕获在点阵红外传感器构成的屏幕上的手势之后,误识别处理模块501通过补偿算法,处理误识别动作。The device for simulating sliding on the touch screen illustrated in FIG. 3 may further include a misrecognition processing module 501 , such as the device for simulating sliding on the touch screen provided in Embodiment 4 of the present invention as shown in FIG. 5 . The misrecognition processing module 501 is used for the gesture capturing module 302 to process misrecognition actions through compensation algorithms after the gestures on the screen composed of N×N dot matrix infrared sensors are captured. Because some users may immediately return to the starting position when swiping their fingers from one place to another. According to the user's wishes, returning to the starting position for a short time should not be recognized. If recognized, it is misidentified. In order to prevent this from happening, in the embodiment of the present invention, after the gesture capture module 302 captures the gesture on the screen formed by the dot matrix infrared sensor, the misrecognition processing module 501 processes the misrecognition action through a compensation algorithm.
附图5示例的误识别处理模块501可以包括滑动方向判断单元601和过滤单元602,如附图6所示本发明实施例五提供的模拟触摸屏滑动的装置,其中:The misrecognition processing module 501 illustrated in Figure 5 may include a sliding direction judgment unit 601 and a filtering unit 602, as shown in Figure 6, the device for simulating touch screen sliding provided by Embodiment 5 of the present invention, wherein:
滑动方向判断单元601,用于判断手势在N×N点阵红外传感器构成的屏幕上从起始位置滑动到目标位置时的滑动方向;The sliding direction judging unit 601 is used to judge the sliding direction when the gesture slides from the initial position to the target position on the screen composed of N×N dot matrix infrared sensors;
过滤单元602,用于若在预设时间内,手势从目标位置沿与滑动方向相反的方向返回至起始位置,则过滤手势从所述目标位置沿与所述滑动方向相反的方向返回至所述起始位置产生的事件。The filtering unit 602 is configured to return the gesture from the target position to the starting position in the direction opposite to the sliding direction within a preset time, then return the gesture from the target position to the starting position in the direction opposite to the sliding direction. Events generated at the starting position described above.
附图3示例的距离计算模块303可以包括第一计算单元701和第二计算单元702,如附图7所示本发明实施例六提供的模拟触摸屏滑动的装置,其中:The distance calculation module 303 illustrated in Figure 3 may include a first calculation unit 701 and a second calculation unit 702, as shown in Figure 7, the device for simulating touch screen sliding provided by Embodiment 6 of the present invention, wherein:
第一计算单元701,用于根据起始位置至目标位置之间任意一点至N×N个红外传感器中任意一列红外传感器构成的直线的距离以及所述任意一点分别与N个红外传感器的距离,计算手势在N×N点阵红外传感器构成的屏幕上滑动的距离d,其中,目标位置为手势在N×N点阵红外传感器构成的屏幕上滑动距离d时的终点;The first calculation unit 701 is configured to, according to the distance from any point between the starting position to the target position to a straight line formed by any column of infrared sensors in the N×N infrared sensors and the distances between the arbitrary point and the N infrared sensors respectively, Calculate the distance d of the gesture sliding on the screen composed of N×N dot matrix infrared sensors, where the target position is the end point of the gesture sliding distance d on the screen composed of N×N dot matrix infrared sensors;
第二计算单元702,用于根据公式d’=M×d/D,计算在M×M个像素点的触摸屏上滑动的距离d’,所述D为N×N个红外传感器构成的点阵中任意一列点阵发射信号时的覆盖范围。The second calculation unit 702 is used to calculate the sliding distance d' on the touch screen with M×M pixels according to the formula d'=M×d/D, where D is a dot matrix composed of N×N infrared sensors The coverage area when any column of dot matrix transmits signal.
第一计算单元701和第二计算单元702的具体计算方法,可参阅前述附图2-a至附图2-c及其对应的文字说明,此处不做赘述。For the specific calculation methods of the first calculation unit 701 and the second calculation unit 702, please refer to the above-mentioned accompanying drawings 2-a to 2-c and their corresponding text descriptions, which will not be repeated here.
本发明实施例还提供一种移动终端,该移动终端包括附图3至附图7任一示例提供的模拟触摸屏滑动的装置。An embodiment of the present invention also provides a mobile terminal, which includes the device for simulating sliding on a touch screen provided in any of the examples in FIG. 3 to FIG. 7 .
需要说明的是,上述装置各模块/单元之间的信息交互、执行过程等内容,由于与本发明方法实施例基于同一构思,其带来的技术效果与本发明方法实施例相同,具体内容可参见本发明方法实施例中的叙述,此处不再赘述。It should be noted that the information interaction and execution process between the modules/units of the above-mentioned device are based on the same idea as the method embodiment of the present invention, and the technical effect it brings is the same as that of the method embodiment of the present invention. The specific content can be Refer to the descriptions in the method embodiments of the present invention, and details are not repeated here.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes. .
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510222170.9A CN104808856B (en) | 2015-05-04 | 2015-05-04 | The method, apparatus and a kind of mobile terminal that a kind of simulated touch screen slides |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510222170.9A CN104808856B (en) | 2015-05-04 | 2015-05-04 | The method, apparatus and a kind of mobile terminal that a kind of simulated touch screen slides |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104808856A CN104808856A (en) | 2015-07-29 |
CN104808856B true CN104808856B (en) | 2018-01-16 |
Family
ID=53693740
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510222170.9A Expired - Fee Related CN104808856B (en) | 2015-05-04 | 2015-05-04 | The method, apparatus and a kind of mobile terminal that a kind of simulated touch screen slides |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104808856B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107656681A (en) * | 2016-07-26 | 2018-02-02 | 中兴通讯股份有限公司 | A kind of method and device of slide on simulated touch screen |
CN106371595B (en) * | 2016-08-31 | 2020-10-30 | 维沃移动通信有限公司 | Method for calling out message notification bar and mobile terminal |
CN110045819B (en) * | 2019-03-01 | 2021-07-09 | 华为技术有限公司 | A gesture processing method and device |
CN113671855A (en) * | 2021-08-20 | 2021-11-19 | 广东好太太智能家居有限公司 | Clothes airing equipment control method, device and system and clothes airing equipment |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104346061A (en) * | 2013-08-07 | 2015-02-11 | 联想(北京)有限公司 | Control method and electronic device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101632311B1 (en) * | 2010-12-30 | 2016-06-22 | 삼성전자주식회사 | Panel type camera, optical touch screen and display apparatus employing the same |
-
2015
- 2015-05-04 CN CN201510222170.9A patent/CN104808856B/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104346061A (en) * | 2013-08-07 | 2015-02-11 | 联想(北京)有限公司 | Control method and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN104808856A (en) | 2015-07-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022166243A1 (en) | Method, apparatus and system for detecting and identifying pinching gesture | |
EP3943881A1 (en) | Method and apparatus for measuring geometric parameter of object, and terminal | |
JP5942456B2 (en) | Image processing apparatus, image processing method, and program | |
RU2602343C1 (en) | Method for displaying content of interface and user equipment | |
US9305260B2 (en) | System and method for distinguishing human swipe input sequence behavior | |
TWI599922B (en) | Electronic device with a user interface that has more than two degrees of freedom, the user interface comprising a touch-sensitive surface and contact-free detection means | |
CN111475097B (en) | Handwriting selection method and device, computer equipment and storage medium | |
CN104808856B (en) | The method, apparatus and a kind of mobile terminal that a kind of simulated touch screen slides | |
US20140253431A1 (en) | Providing a gesture-based interface | |
CN102262476A (en) | Tactile Communication System And Method | |
CN106951132B (en) | The report point of capacitive touch screen determines method, apparatus, touch screen and terminal | |
JP6479148B2 (en) | Enhanced dynamic haptic effect | |
CN107481299A (en) | A kind of written handwriting display methods and system, intelligent terminal and intelligent writing system | |
WO2018018624A1 (en) | Gesture input method for wearable device, and wearable device | |
CN103125115A (en) | Information processing apparatus, information processing system and information processing method | |
CN112905102A (en) | Method and device for realizing writing tip, electronic equipment and readable storage medium | |
CN115793893B (en) | Method, device, electronic device and storage medium for generating handwriting by touch | |
CN104991684A (en) | Touch control device and working method therefor | |
CN103679788A (en) | 3D image generating method and device in mobile terminal | |
US20170140215A1 (en) | Gesture recognition method and virtual reality display output device | |
CN103455262A (en) | Pen-based interaction method and system based on mobile computing platform | |
CN114360047A (en) | Hand-lifting gesture recognition method and device, electronic equipment and storage medium | |
CN104407696A (en) | Virtual ball simulation and control method of mobile device | |
CN104822029B (en) | A kind of method, apparatus that control rotating camera rotates and a kind of mobile terminal | |
CN114816135B (en) | Cross-device drawing system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20170323 Address after: Changan town in Guangdong province Dongguan 523841 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: 518000 Guangdong city of Shenzhen province Nanshan District Gao Xin Road No. 013 Fu technology building B block 6 Building Applicant before: SHENZHEN OPPO COMMUNICATION SOFTWARE Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523841 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
CP03 | Change of name, title or address | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180116 |
|
CF01 | Termination of patent right due to non-payment of annual fee |