Search

CN-115826838-B - Gesture recognition method and related equipment

CN115826838BCN 115826838 BCN115826838 BCN 115826838BCN-115826838-B

Abstract

The application provides a gesture recognition method and related equipment. The method comprises the steps of obtaining the number of touch points of a touch screen, obtaining pixel data of the touch points according to the number of the touch points, calculating to obtain physical data of the touch points according to the number of the touch points, the pixel data of the touch points, the obtained physical parameters of the touch screen and the obtained resolution of the touch screen, and obtaining gestures corresponding to the touch points according to the physical data of the touch points and a preset threshold value. According to the embodiment of the application, the physical data of the touch point is calculated through the acquired pixel data and the physical data and resolution of the touch screen, the pixel data is effectively converted into the actual physical data, further, the physical data is utilized to further identify the touch gesture, the problem that the gesture is not accurately identified by setting a single pixel threshold value is effectively solved, larger errors are prevented when the gesture is judged, and the accuracy of touch gesture identification is effectively improved.

Inventors

  • DONG YUSHENG
  • GU JINBO

Assignees

  • 北京鸿合爱学教育科技有限公司

Dates

Publication Date
20260512
Application Date
20221111

Claims (8)

  1. 1. A method of gesture recognition, comprising: Acquiring the number of touch points of a touch screen, and acquiring pixel data of the touch points according to the number of the touch points; Calculating physical data of the touch points according to the number of the touch points, the pixel data of the touch points, the acquired physical parameters of the touch screen and the acquired resolution of the touch screen, wherein the calculating comprises the steps of responding to the number of the touch points as one, and calculating to obtain a physical maximum width value of the touch points according to a maximum pixel width value of a touch area of the touch points, a physical width value of the touch screen and the resolution width of the touch screen; calculating to obtain a physical maximum height value of the touch point according to the maximum pixel height value of the touch area, the physical height value of the touch screen and the resolution height of the touch screen, wherein the pixel data of the touch point comprises a maximum pixel width value of the touch area of the touch point and a maximum pixel height value of the touch area of the touch point, the physical parameters of the touch screen comprise a physical width value of the touch screen and a physical height value of the touch screen, the resolution of the touch screen comprises a resolution width of the touch screen and a resolution height of the touch screen, and the physical data of the touch point comprises a physical maximum width value of the touch point and a physical maximum height value of the touch point; And obtaining a gesture corresponding to the touch point according to the physical data of the touch point and a preset threshold value.
  2. 2. The method of claim 1, wherein the number of touch points is greater than one, and the pixel data of the touch points includes a pixel abscissa value of a center pixel point of the touch points and a pixel ordinate value of the center pixel point of the touch points, the center pixel point being located at a center point of a touch area corresponding to the touch points.
  3. 3. The method of claim 2, wherein the physical parameters of the touch screen include a physical width value of the touch screen and a physical height value of the touch screen; The resolution of the touch screen comprises the resolution width of the touch screen and the resolution height of the touch screen; the physical data of the touch point comprises a physical abscissa value of the touch point and a physical ordinate value of the touch point; The calculating to obtain the physical data of the touch point according to the number of the touch points, the pixel data of the touch points, the acquired physical parameters of the touch screen and the acquired resolution of the touch screen includes: calculating to obtain a physical abscissa value of the touch point according to a pixel abscissa value of a central pixel point of the touch point, a physical width value of the touch screen and a resolution width of the touch screen; and calculating to obtain the physical ordinate value of the touch point according to the pixel ordinate value of the central pixel point of the touch point, the physical height value of the touch screen and the resolution height of the touch screen.
  4. 4. The method of claim 1, wherein the gesture corresponding to the touch point comprises back hand erasure, normal writing and pen writing, and the preset threshold comprises a first threshold and a second threshold, and the second threshold is smaller than the first threshold; The step of obtaining the gesture corresponding to the touch point according to the physical data of the touch point and a preset threshold value includes: when the physical data of any touch point is larger than the first threshold value, the gesture corresponding to the touch point is obtained to be hand back erasure; when the physical data of all the touch points are smaller than the first threshold value and the physical data of any one of the touch points are larger than the second threshold value, the gesture corresponding to the touch point is obtained to be normal writing; And when the physical data of all the touch points are smaller than the second threshold value, obtaining that the gesture corresponding to the touch point is fine pen writing.
  5. 5. The method of claim 3, wherein the gesture corresponding to the touch point comprises two-finger zoom rotation, two-finger translation, and five-finger erasure, wherein the preset threshold comprises a third threshold and a fourth threshold; The step of obtaining the gesture corresponding to the touch point according to the physical data of the touch point and a preset threshold value includes: when the number of the touch points is two, calculating a first physical distance between the two touch points; when the first physical distance is larger than the third threshold value, the gesture corresponding to the touch point is obtained to be a two-finger scaling rotation; When the first physical distance is smaller than the third threshold value, the gesture corresponding to the touch point is obtained to be two-finger translation; When the number of the touch points is five, calculating a second physical distance between physical coordinates of every two adjacent touch points; and when all the second physical distances are smaller than the fourth threshold value, obtaining the gesture corresponding to the touch point to be five-finger erasure.
  6. 6. The method according to any one of claims 1 to 5, wherein the preset threshold is automatically adjustable according to the physical data.
  7. 7. A gesture recognition apparatus, comprising: the acquisition module is configured to acquire the number of touch points of the touch screen, and acquire pixel data of the touch points according to the number of the touch points; The computing module is configured to compute the physical data of the touch points according to the number of the touch points, the pixel data of the touch points, the acquired physical parameters of the touch screen and the acquired resolution of the touch screen, and comprises the steps of responding to the number of the touch points as one, and computing the physical maximum width value of the touch points according to the maximum pixel width value of the touch area of the touch points, the physical width value of the touch screen and the resolution width of the touch screen; calculating to obtain a physical maximum height value of the touch point according to the maximum pixel height value of the touch area, the physical height value of the touch screen and the resolution height of the touch screen, wherein the pixel data of the touch point comprises a maximum pixel width value of the touch area of the touch point and a maximum pixel height value of the touch area of the touch point, the physical parameters of the touch screen comprise a physical width value of the touch screen and a physical height value of the touch screen, the resolution of the touch screen comprises a resolution width of the touch screen and a resolution height of the touch screen, and the physical data of the touch point comprises a physical maximum width value of the touch point and a physical maximum height value of the touch point; the judging module is configured to obtain a gesture corresponding to the touch point according to the physical data of the touch point and a preset threshold value.
  8. 8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 6 when the program is executed by the processor.

Description

Gesture recognition method and related equipment Technical Field The present application relates to the field of gesture recognition technologies, and in particular, to a gesture recognition method and related devices. Background When using a touch screen, gesture operations are very convenient for users. The judgment of whether the gesture is formed is generally performed by analyzing information such as a multi-finger movement track, a multi-finger movement speed and a multi-finger contact area of a user, and the gesture is generally processed and judged based on the pixel value because the application software obtains the touch data of the user based on the pixel value. However, when the gesture is determined based on the pixel value, a determination condition with the pixel as a unit needs to be set, the touch screen can be set with different resolutions, and the touch screen itself has various sizes, which can result in the same finger operation, and when the gesture is determined, the pixel value error is too large, so that some gestures cannot be triggered or are triggered by mistake easily. Disclosure of Invention In view of the above, the present application is directed to a gesture recognition method and related apparatus. Based on the above object, the present application provides a gesture recognition method, comprising: Acquiring the number of touch points of a touch screen, and acquiring pixel data of the touch points according to the number of the touch points; Calculating to obtain physical data of the touch points according to the number of the touch points, the pixel data of the touch points, the acquired physical parameters of the touch screen and the acquired resolution of the touch screen; And obtaining a gesture corresponding to the touch point according to the physical data of the touch point and a preset threshold value. In one possible implementation, the number of the touch points is one, and the pixel data of the touch points includes a maximum pixel width value of a touch area of the touch point and a maximum pixel height value of the touch area of the touch point. In one possible implementation, the physical parameters of the touch screen include a physical width value of the touch screen and a physical height value of the touch screen; The resolution of the touch screen comprises the resolution width of the touch screen and the resolution height of the touch screen; the physical data of the touch point comprises a physical maximum width value of the touch point and a physical maximum height value of the touch point; The calculating to obtain the physical data of the touch point according to the number of the touch points, the pixel data of the touch points, the acquired physical parameters of the touch screen and the acquired resolution of the touch screen includes: calculating to obtain a physical maximum width value of the touch point according to a maximum pixel width value of the touch area of the touch point, a physical width value of the touch screen and a resolution width of the touch screen; and calculating the physical maximum height value of the touch point according to the maximum pixel height value of the touch area, the physical height value of the touch screen and the resolution height of the touch screen. In one possible implementation manner, the number of the touch points is greater than one, and the pixel data of the touch points comprises a pixel abscissa value of a central pixel point of the touch point and a pixel ordinate value of the central pixel point of the touch point, wherein the central pixel point is positioned at a central point of a touch area corresponding to the touch point. In one possible implementation, the physical parameters of the touch screen include a physical width value of the touch screen and a physical height value of the touch screen; The resolution of the touch screen comprises the resolution width of the touch screen and the resolution height of the touch screen; the physical data of the touch point comprises a physical abscissa value of the touch point and a physical ordinate value of the touch point; The calculating to obtain the physical data of the touch point according to the number of the touch points, the pixel data of the touch points, the acquired physical parameters of the touch screen and the acquired resolution of the touch screen includes: calculating to obtain a physical abscissa value of the touch point according to a pixel abscissa value of a central pixel point of the touch point, a physical width value of the touch screen and a resolution width of the touch screen; calculating to obtain a physical ordinate value of the touch point according to a pixel ordinate value of a central pixel point of the touch point, a physical height value of the touch screen and a resolution height of the touch screen; In a possible implementation manner, the gesture corresponding to the touch point comprises back hand erasure, norma