METHOD FOR RECOGNIZING GESTURE AND GESTURE SENSING APPARATUS

A method for recognizing a gesture and gesture sensing apparatus are provided. When movement of an object is detected, a first energy sequence and a second energy sequence are generated. Then, whether signal patterns of the first energy sequence and the second energy sequence match is determined. After determining that the signal patterns of the first energy sequence match that of the second energy sequence, the first energy sequence and the second energy sequence are analyzed to obtain a corresponding gesture event.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims the priority benefit of Chinese patent application serial no. 202010200373.9, filed on Mar. 20, 2020. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification.

BACKGROUND

Field of the Disclosure

The disclosure relates to a sensing method and apparatus, and more particularly, to a gesture recognizing method and a gesture sensing apparatus.

Description of Related Art

In conventional technology, infrared sensing elements have been utilized to detect infrared radiation emitted from human body, thereby detecting human movement. The technology is to sample analog signal, convert the infrared radiation value received by the sensing element into a signal, and further set a threshold value, and determine whether an object is approaching by determining whether the signal exceeds the threshold value. However, the method described above cannot determine complicated gesture events.

SUMMARY OF THE DISCLOSURE

The disclosure provides a gesture recognizing method and a gesture sensing apparatus, calculating the energy of the sensed signal to confirm the signal pattern, and further determining the occurrence of different gesture events.

The gesture recognizing method in the disclosure includes: detecting the movement of an object to generate a first energy sequence and a second energy sequence; determining whether the signal patterns of the first energy sequence match that of the second energy sequence; and analyzing the first energy sequence and the second energy sequence to obtain a corresponding gesture event.

The gesture sensing apparatus of the disclosure includes: a signal sensing apparatus that detects the movement of an object to generate a first energy sequence and a second energy sequence; and a processor coupled to the signal sensing apparatus to receive the first energy sequence and the second energy sequence, wherein the processor determines whether the signal patterns of the first energy sequence match that of the second energy sequence, and analyzes the first energy sequence and second energy sequence to obtain a corresponding gesture event.

Based on the above, by calculating the energy sequence of the signal output by the signal sensing apparatus, the disclosure can make a more accurate and flexible judgment on signal patterns. In the meantime, when there are different signal patterns but the signal energy is the same, it is possible to perform further processing to obtain more accurate results.

DESCRIPTION OF EMBODIMENTS

FIG. 1is a block view of a gesture sensing apparatus according to an embodiment of the disclosure. InFIG. 1, a gesture sensing apparatus100includes a processor110and a signal sensing apparatus120. The processor110is, for example, a Central Processing Unit (CPU), a Physical Processing Unit (PPU), a programmable microprocessor, an embedded control chip, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC) or other similar devices.

The signal sensing apparatus120is configured to detect the movement of objects. Here, the signal sensing apparatus120includes a plurality of sensors. The signal patterns output by the plurality of sensors are utilized to further determine the occurrence of different gesture events, which can achieve the functions of dimming and effective detection of object movement. In the case where a passive infrared sensor is utilized as the signal sensing apparatus120, the signal sensing apparatus120absorbs external infrared radiation signals, which passes through Fresnel lens on the surface of the signal sensing apparatus120, thereby generating positive and negative oscillation signals. The design of the placement of the plurality of sensors enables the plurality of sensors to generate a fixed signal output pattern under different gestures, thereby further determining the gesture event.

The gesture sensing apparatus100is utilized below to further explain the steps of the gesture recognizing method.FIG. 2is a flowchart of a gesture recognizing method according to an embodiment of the disclosure. Please refer toFIG. 1andFIG. 2. In step S205, the first energy sequence and the second energy sequence are generated by detecting the movement of the object through the signal sensing apparatus120. The energy calculation method calculates the energy calculation of the signal sequence after sampling at the sampling frequency fs within the signal interval of a length N (as expressed by the following formula (1)).

wherein E is the energy, fs is the sampling frequency, and N is the length of the signal interval.

For example, the signal sensing apparatus120includes two sensors. By performing energy calculations on the output signals of the two sensors respectively, the first energy sequence and the second energy sequence can be further obtained.

Next, in step S210, the processor110determines whether the signal patterns of the first energy sequence match that of the second energy sequence. After determining that the signal patterns of the first energy sequence match that of the second energy sequence, as shown in step S215, the processor110analyzes the first energy sequence and the second energy sequence to obtain a corresponding gesture event.

FIG. 3is a schematic view of a signal pattern when an object moves from the top to the bottom according to an embodiment of the disclosure.FIG. 4is a schematic view of a signal pattern when an object moves from the bottom to the top according to an embodiment of the disclosure. In this embodiment, the signal sensing apparatus120includes a first sensor120A and a second sensor120B. The first sensor120A and the second sensor120B are utilized to detect the movement of the object in the first direction (for example, the up-down direction) to generate the first energy sequence and the second energy sequence, respectively.

InFIG. 3, when an object (such as a hand) moves from the top to the bottom of the signal sensing apparatus120, the first sensor120A outputs the first energy sequence301, and the second sensor120B outputs the second energy sequence302. The first energy sequence301and the second energy sequence302are upside-down signal patterns, and there is a delay time τ between the signal patterns of the first energy sequence301and the second energy sequence302. InFIG. 3, the box311′ and the box312′ are enlarged views of the box311and the box312, respectively. By comparing the signal patterns in the box311′ and the box312′, it can be obtained that they are upside-down signal patterns.

InFIG. 4, when an object (such as a hand) moves from the bottom to the top of the signal sensing apparatus120, the first sensor120A outputs the first energy sequence401, and the second sensor120B outputs the second energy sequence402. The first energy sequence401and the second energy sequence402are another upside-down signal patterns, and there is a delay time τ between the signal patterns of the first energy sequence401and the second energy sequence402.

TakeFIG. 3as an example to explain how to determine whether the signal patterns of the first energy sequence301match that of the second energy sequence302. Please refer toFIG. 3, M first sampling signals are taken from the first energy sequence301, and M second sampling signals are taken from the second energy sequence302after the delay time τ has elapsed. That is, corresponding to the time point when the first sampling signals are taken from the first energy sequence301, the second sampling signals are taken from the second energy sequence302after the delay time τ has passed, wherein M is a signal pattern length, there are different signal pattern lengths for different gesture signals. Then, the M first sampling signals and the M second sampling signals are compared to obtain M energy differences; and when the M energy differences are all smaller than or equal to a threshold value, it is determined that the signal patterns of the first energy sequence301match that of the second energy sequence302.

The energies E1(0) to E1(M−1) of the M first sampling signals and the energies E2(τ) to E2(M−1+τ) of the M second sampling signals are calculated based on the formula (1). Then, the energy difference is compared to a threshold value.

That is, in the condition where |E1[0]−E2[τ]≤Th, |E1[1]−E2[1+τ]|≤Th, |E1[2]−E2[2+τ]|≤Th, . . . |E1[M−1]−E2[M−1+τ]|≤Th, it is determined that the signal patterns of the first energy sequence301match that of the second energy sequence302.

FIG. 5is a schematic view of a signal pattern when an object moves from left to right according to an embodiment of the disclosure.FIG. 6is a schematic view of a signal pattern when an object moves from right to left according to an embodiment of the disclosure. In the embodiment, the signal sensing apparatus120includes a first sensor120A, a second sensor120B, a third sensor120C, and a fourth sensor120D. In the embodiments ofFIG. 5andFIG. 6, in addition to using the first sensor120A and the second sensor120B to detect the movement of the object in the first direction (for example, the up-down direction) to generate the first energy sequence and the second energy sequence respectively, the third sensor120C and the fourth sensor120D are also utilized to detect the movement of the object in the second direction (for example, the left-right direction) to generate the third energy sequence and the fourth energy sequence respectively.

InFIG. 5, when an object (such as a hand) moves from the left to the right of the signal sensing apparatus120, the third sensor120C outputs the third energy sequence501, and the fourth sensor120D outputs the fourth energy sequence502. The third energy sequence501and the fourth energy sequence502are upside-down signal patterns, and there is a delay time τ between the signal patterns of the third energy sequence501and the fourth energy sequence502. InFIG. 5, the box511′ and the box512′ are enlarged views of the box511and the box512, respectively. By comparing the signal patterns in the box511′ and the box512′, it can be obtained that they are upside-down signal patterns.

InFIG. 6, when an object (such as a hand) moves from the right to the left of the signal sensing apparatus120, the third sensor120C outputs the third energy sequence601and the fourth sensor120D outputs the fourth energy sequence602. The third energy sequence601and the fourth energy sequence602are upside-down signal patterns, and there is a delay time τ between the signal patterns of the third energy sequence601and the fourth energy sequence602.

FIG. 7is a schematic view of state transition of a gesture sensing apparatus according to an embodiment of the disclosure. Please refer toFIG. 7. In this embodiment, the gesture sensing apparatus100is used as the dimming apparatus. Also, the gesture sensing apparatus100includes an idle state705, an occupied state710, a signal pre-processing state715, a gesture analyzing state720, and a dimming state725.

When the signal sensing apparatus120of the gesture sensing apparatus100is in the state of detecting nothing, the gesture sensing apparatus100is in the idle state705. When the signal sensing apparatus120detects an object, the gesture sensing apparatus100enters the occupied state710and also enters the signal pre-processing state715. When the gesture sensing apparatus100is in the signal pre-processing state715, when the signal patterns of the first energy sequence match that of the second energy sequence, the gesture sensing apparatus100enters the gesture analyzing state720. When a matching gesture event is found in the gesture analyzing state720, the gesture sensing apparatus100enters the dimming state725and performs the corresponding dimming operation. When no matching gesture event (no related event) is found in the gesture analyzing state720, the gesture sensing apparatus100returns to the signal pre-processing state715. In the signal pre-processing state715, when the signal output by the signal sensing apparatus120has no energy change (indicating that no object is detected), the gesture sensing apparatus100returns to the idle state705, and waits for the next sensing signal generated by the signal sensing apparatus120. In the meantime, in the signal pre-processing state715, the signal sensing apparatus120is in a state of continuously generating a signal and performs energy calculation to obtain an energy sequence (first energy sequence to fourth energy sequence, etc.) until the signal stays stable and unchanged.

FIG. 8is a block view of a dimmer according to an embodiment of the disclosure. In this embodiment, the gesture sensing apparatus100is utilized as a dimming apparatus to perform dimming processing. Specifically, a plurality of modules are stored in the memory of the gesture sensing apparatus100, and these modules are executed by the processor110to recognize gestures and further adjust dimming. These modules include a retarder805, a mobile processing module810, a signal pre-processing module815, a gesture analyzing module820, and a dimming module825.

InFIG. 8, the signal sensing apparatus120is utilized to determine whether to enter the signal pre-processing state715or whether to return to the idle state705. The retarder805provides a delay time τ for the signal output by the signal sensing apparatus120. Here, the retarder805can perform delay processing according to different signal strengths, thereby adjusting different delay times for the signal pre-processing module815to calculate and determine the signal pattern.

The mobile processing module810is configured to determine whether the gesture sensing apparatus100enters the occupied state710. For example, when the signal sensing apparatus120detects an object, it is determined that there is an object moving, so the gesture sensing apparatus100enters the occupied state710.

The signal pre-processing module815is configured to process the signal output by the signal sensing apparatus120to determine the signal pattern.FIG. 9is a block view of a signal pre-processing module according to an embodiment of the disclosure. The signal pre-processing module815includes a signal sampler905, an energy calculator910, a pattern comparator915, and an adaptive threshold generator920. The signal sampler905is configured to process the sampling of continuous signals. The energy calculator910is configured to calculate the energy of the signal after sampling.

For example, the signal sampler905utilizes two sensors to output a first sensing signal and a second sensing signal. The signal sampler905samples the signal at a sampling frequency in a signal interval of a length N in the first sensing signal and the second sensing signal, respectively. Then, the energy calculator910calculates the energy of the first sensing signal and the energy of the second sensing signal respectively after sampling based on the formula (1), and further obtains the first energy sequence and the second energy sequence. After the energy calculation, the pattern comparer915is utilized to compare whether the signal patterns of the first energy sequence match that of the second energy sequence. The pattern comparator915can also adjust the delay time τ simultaneously to achieve a more complete signal pattern.

After the energy calculator910completes the energy calculation, the energy calculator910further determines whether the energy difference between the first sensing signal and the second sensing signal after the delay time is smaller than a threshold value. In the signal pattern comparator, the energy of M signals is continuously sampled from the first sensing signal and the second sensing signal for comparison. If the M energy differences obtained are smaller than or equal to the threshold value after comparison, it is determined that the pattern comparison is successful, and the gesture analyzing module820is entered to perform a gesture event comparison.

The adaptive threshold generator920is configured to generate the threshold value for comparison with the energy difference and the delay time by using the adaptive threshold method. After the energy calculator910calculates the energy, the calculation result is input to the adaptive threshold generator920to generate the optimal threshold value and delay time. The optimal threshold value can be generated through intelligent algorithms, such as, Minimum Mean Squared Error (MSE), Least Mean Square (LMS), Neural Network, Particle Swarm Optimization (PSO) and other intelligent algorithms, the disclosure is not limited thereto. The threshold value is configured for signal energy pattern comparison. After determining that the signal patterns of the first energy sequence match that of the second energy sequence, the gesture event is further determined.

The gesture analyzing module820is configured to perform comparison according to a specific signal pattern after the signal pre-processing module815completes processing. If the comparison result is match, the dimming module825is provided to further complete the event corresponding to the signal pattern. Specifically, the gesture analyzing module820analyzes the first energy sequence and the second energy sequence to obtain a corresponding gesture event. For example, the gesture analyzing module820analyzes the first energy sequence301and the second energy sequence302shown inFIG. 3, and the obtained gesture event is sliding from the top to the bottom. The gesture analyzing module820analyzes the first energy sequence401and the second energy sequence402shown inFIG. 4, and the obtained gesture event is sliding from the bottom to the top. After obtaining a gesture event, the dimming module825will trigger a relative event.

In addition, when the user uses the gesture sensing apparatus100for the first time, the threshold value and the delay time can be further calculated through a correction mode. For example, after the user finishes installing the gesture sensing apparatus100, the correction mode is entered first, and the energy is further detected and calculated with respect to the user's gesture, thereby adjusting the threshold value and the delay time. In this way, the gesture sensing apparatus100can be optimized to adjust the threshold value and the delay time according to gestures of different users, thereby achieving a more accurate gesture detecting event. Through the correction mode, different gestures can correspond to different signal pattern lengths. In the meantime, when the user performs a gesture test, the signal sensing apparatus120can further determine the selection of the signal pattern length M through the signal change. If the signal has no change after the gesture is completed, the signal pattern length M ends.

In summary, by calculating the energy sequence of the signal output by the signal sensing apparatus, the disclosure can make a more accurate and flexible judgment on signal patterns. In the meantime, when there are different signal patterns but the signal energy is the same, it is possible to perform further processing to obtain more accurate results.