Double-click gesture recognition method based on infrared intensity change

By adopting a multi-state state machine method in infrared gesture recognition, using extreme value detection and abnormal analysis, the problems of infrared gesture recognition are solved with single function, large distance error, low accuracy and susceptibility to interference, and flexible and stable double-click gesture recognition is achieved.

CN120375591APending Publication Date: 2025-07-25SHANGHAI YONIA SMART TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510439820.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing infrared gesture recognition technology has a single function, large distance error, low accuracy, and is susceptible to external interference and ambient light, resulting in instability.

Method used

A double-click gesture recognition method based on infrared intensity changes is adopted to set a variety of states in the state machine, including parameter initialization, waiting for rise, waiting for maximum and minimum values, etc. Through extreme value detection and abnormal analysis, the double-click action is recognized to suppress ambient light and external interference.

Benefits of technology

It realizes the identification distance calibrated, has strong anti-interference ability, high recognition accuracy, flexible user operation, reduces processor performance requirements and low cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0005350718770000011
    Figure HDA0005350718770000011
  • Figure HDA0005350718770000012
    Figure HDA0005350718770000012
  • Figure HDA0005350718770000021
    Figure HDA0005350718770000021
Patent Text Reader

Abstract

The invention discloses a double-click gesture recognition method based on infrared intensity change, and the method achieves the technical effects of controllable infrared gesture recognition distance, stable signal transmission, high anti-interference capability and high environment adaptability through the setting of a first state, a second state, a third state, a fourth state, a fifth state, a sixth state and a tenth state in a state machine and the setting of a logic relation or mode and method between the first state and the tenth state. And meanwhile, the recognition precision is improved, and the use requirements of users are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a double - click gesture recognition method based on infrared intensity change. Background Art

[0002] Currently, infrared gesture recognition methods are widely used in various fields. Its usage method is to control the device by waving the hand, enabling the device to complete different operations or adjustments in states. Its technical implementation principle is: infrared gesture recognition relies on the collaborative work of an infrared emitter and a receiver. When the emitter emits infrared light, if there is an obstacle (such as a hand) blocking it, the infrared light will be reflected back to the receiver, thereby generating a signal. The central processing unit processes the received signal to recognize the gesture action. Although infrared gestures are widely used currently, there are still deficiencies in the usage process: 1. Single function: Currently, the gesture recognition scheme only supports the waving action, which limits the user's demand for multi - functional operation of the device and cannot meet the user's more free operation of the device. 2. Large recognition distance error: Due to the deviation in the emission intensity of the infrared emission tube, there is a relatively obvious distance fluctuation in the recognition distance of the current scheme. 3. Low recognition accuracy: The current scheme has a low recognition rate and has strict requirements for the standardization of the human waving action. If the hand is waved very casually, there will be a phenomenon of non - recognition. 4. Prone to external signal interference: For interference from products such as infrared remote controls, the current scheme is easily interfered and thus leads to non - recognition. 5. Prone to ambient light influence: In an environment with strong sunlight, the current scheme has a phenomenon of false triggering. Therefore, problems such as inaccuracy and instability in infrared gesture recognition are caused. Therefore, it is necessary to develop a double - click gesture recognition method based on infrared intensity change to solve the problems encountered in the current use of infrared gesture recognition. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a double - click gesture recognition method based on infrared intensity change with a calibrated distance, little affected by the external environment, strong anti - interference ability, capable of meeting the needs of different users, and having practicality and wide application.

[0004] To solve the above problems, the present invention adopts the following technical solutions:

[0005] A double - click gesture recognition method based on infrared intensity change performs various state settings in a state machine, including:

[0006] State 1: Parameter initialization; specifically: in this state, some detection parameters are initialized, including an extreme value detection threshold and a fluctuation detection threshold, and then the state is updated to State 2;

[0007] State Two: Idle; specifically: In this state, it is judged whether the current intensity value is greater than the previous intensity value. If it is greater, the state is updated to State Three;

[0008] State Three: Waiting to Rise; specifically: If the current intensity value in this state is less than START_MIN, the current state is updated to State Two. At the same time, it is judged whether the current intensity value in this state is greater than the rising threshold UP_THR1. If it is greater, the state is updated to State Four;

[0009] State Four: Waiting for the First Maximum; specifically: In this state, the timer works normally. If the count value TIMER_COUNTER exceeds the set timeout threshold, the state is updated to State Two, and the abnormal count ABNORMAL_COUNTER is incremented by 1;

[0010] State Five: Waiting for the Second Minimum; specifically: In this state, the timer works normally. If the count value TIMER_COUNTER exceeds the set timeout threshold, the state is updated to State Two, and the abnormal count ABNORMAL_COUNTER is incremented by 1;

[0011] State Six: Waiting for the Second Maximum; specifically: If a maximum value is detected, the following commands are executed: Perform extreme value abnormality analysis;

[0012] State Seven: Waiting for the Intensity Value to Drop; specifically: In this state, the timer works normally. If the count value TIMER_COUNTER exceeds the set timeout threshold, the state is updated to State Nine;

[0013] State Eight: Waiting for the Intensity Value to Stop Rising; specifically: If a minimum value is detected, the following actions are performed: Perform extreme value abnormality analysis;

[0014] State Nine: Waiting for the Intensity Value to Be Flat; specifically: If it is detected that the intensity value has not fluctuated significantly for a period of time, the state is updated to State Two, and ABNORMAL_COUNTER is cleared;

[0015] State Ten: Double - click Recognition Successful; specifically: The state is updated to State Two, and ABNORMAL_COUNTER is cleared.

[0016] Preferably, in State Two, if it is judged in this state that the current intensity value is greater than the previous intensity value, the following commands are executed:

[0017] A. Record the intensity of the current ambient light as START_M1;

[0018] B. Record the current intensity value as START_MIN;

[0019] C. Calculate the rising threshold as UP_THR1.

[0020] Preferably, in State 3, if it is determined that the current intensity value in this state is greater than the rising threshold UP_THR1, the following commands are executed simultaneously:

[0021] A. Clear the count value TIMER_COUNTER of the timer;

[0022] B. Set the extreme value detection to detect the maximum value.

[0023] Preferably, in State 4, if a maximum value is detected, the following steps are executed:

[0024] 1) According to the value of the maximum value timer, find the index number PEAK_MAX_DATA_INDEX of the maximum value in the data cache;

[0025] 2) Update the value of TIMER_COUNTER to the value PEAK_MAX_TIMER_COUNTER of the maximum value timer;

[0026] 3) Record the current maximum value as PEAK_MAX;

[0027] 4) Update the state to State 5.

[0028] Preferably, in State 5, if a minimum value is detected, the following commands are executed:

[0029] Perform extreme value anomaly analysis and perform the following actions according to the analysis results;

[0030] A. If the anomaly is DOUBLE_FAST_ERROR, update the state to State 9;

[0031] B. If the anomaly is other anomalies, update the state to State 2, and increment the anomaly count ABNORMAL_COUNTER by 1;

[0032] C. If there is no anomaly, perform the following actions: If the value of (PEAK_MAX minus START_MIN) divided by (PEAK_MAX minus PEAK_MIN) is less than a certain value, update the state to State 2, and increment the anomaly count ABNORMAL_COUNTER by 1, otherwise update the state to State 6.

[0033] Preferably, in State 6, perform the following actions according to the extreme value anomaly analysis results;

[0034] A. If the anomaly is DOUBLE_FAST_ERROR, update the state to State 9;

[0035] B. If the exception is other exceptions, increment the exception count ABNORMAL_COUNTER by 1; at the same time, determine whether PEAK_MIN_NUM is less than a certain value. If it is less, update the status to status five, otherwise update the status to status two.

[0036] C. If there is no exception, update the status to status seven, and calculate the drop threshold DOWN_THR according to PEA_MAX and PEAK_MIN.

[0037] Preferably, in status seven, if a minimum value is detected, perform the following actions:

[0038] Perform extreme value exception analysis, and perform the following actions according to the analysis results:

[0039] A. If the exception is DOUBLE_FAST_ERROR, update the status to status nine;

[0040] B. If the exception is DOUBLE_D_U_TIME_ERROR, update the status to status nine;

[0041] C. If it is other exceptions, increment the exception count ABNORMAL_COUNTER by 1 and update the status to status two;

[0042] D. If there is no exception, determine whether PEAK_MIN_NUM is less than a certain value. If it is less, update the status to status six, otherwise update the status to status nine;

[0043] E. If the current intensity value is less than DOWN_THR, update the status to status eight; at the same time, perform the following steps:

[0044] 1) Limit the minimum value of WAIT_NOT_UP_COUNTER to prevent the waveform from rising again;

[0045] 2) Update PEA_MAX and the current value, and update the rising threshold UP_THR2;

[0046] Preferably, in status eight, perform the following actions according to the extreme value exception analysis results:

[0047] A. If the exception is DOUBLE_FAST_ERROR, update the status to status nine;

[0048] B. If the exception is DOUBLE_D_U_TIME_ERROR, update the status to status nine;

[0049] C. If it is other exceptions, increment the exception count ABNORMAL_COUNTER by 1 and update the status to status two;

[0050] D. If there is no abnormality, determine whether PEAK_MIN_NUM is less than a certain value. If it is less, update the status to Status Six; otherwise, update the status to Status Nine.

[0051] E. If the intensity value does not rise above the threshold UP_THR2 after a period of time, perform the following steps:

[0052] 1) Calculate the threshold MAX_THR of the maximum intensity value during this double-tap recognition process according to START_MIN; if the maximum intensity value MAX is less than MAX_THR, update the status to Status Two.

[0053] 2) Pass START_M1, START_MIN, MAX_M1, and MAX into the ambient light false touch analysis method. If the analysis result is abnormal, update the status to Status Two.

[0054] 3) If the above analysis results are all normal, update the status to Status Ten.

[0055] Preferably, if a maximum value is currently detected, perform the following steps:

[0056] 1) According to the value of the maximum value timer, find the index number PEAK_MAX_DATA_INDEX of the maximum value in the data cache.

[0057] 2) Update the value of TIMER_COUNTER to the value of the maximum value timer PEAK_MAX_TIMER_COUNTER.

[0058] 3) Record the current maximum value as PEAK_MAX.

[0059] 4) Subtract PEAK_MAX_TIMER_COUNTER from TIMER_COUNTER to obtain the time from the minimum value to the maximum value as PEAK_MAX_POS.

[0060] 5) Calculate the timeout threshold MAX_T_THR according to the abnormal count ABNORMAL_COUNTER; if PEAK_MIN_POS is greater than MAX_T_THR, the output result is the slow error DOUBLE_SLOW_ERROR; if PEAK_MIN_POS is less than the minimum time threshold DOUBLE_MIN_T, the output result is the fast error DOUBLE_FAST_ERROR.

[0061] 6) Calculate the amplitude threshold AMP_THR based on the number of anomalies ABNORMAL_COUNTER and the peak maximum value PEAK_MAX; if the difference between the peak maximum value PEAK_MAX and the peak minimum value PEAK_MIN is less than AMP_THR, the output result is the amplitude error DOUBLE_AMP_ERROR;

[0062] 7) Obtain the middle value PEAK_MIDDLE from PEAK_MAX and PEAK_MIN, and then calculate the data volume from PEAK_MAX to PEAK_MIDDLE as PEAK_MAX_TO_MIDDLE_COUNTER and the data volume from PEAK_MIDDLE to PEAK_MIN as MIDDLE_TO_PEAK_MIN_COUNTER from the data cache according to PEAK_MAX_DATA_INDEX and PEAK_MIN_DATA_INDEX; determine whether the ratio of PEAK_MAX_TO_MIDDLE_COUNTER to MIDDLE_TO_PEAK_MIN_COUNTER is within a certain range, and if it is not within the certain range, the output result is the middle point time error DOUBLE_MID_TIME_ERROR;

[0063] 8) Determine whether the ratio of PEAK_MIN_POS to PEAK_MAX_POS is within a certain range, and if it is not, the output result is the falling and rising time error DOUBLE_D_U_TIME_ERROR;

[0064] 9) Update the value of TIMER_COUNTER to the peak maximum timer value PEAK_MAX_TIMER_COUNTER;

[0065] 10) Record PEAK_MAX_POS as WAIT_NOT_UP_COUNTER to prepare for the subsequent time of waiting for no further rise.

[0066] Preferably, the extreme value anomaly analysis method is as follows: if a current minimum value is detected, the following steps are executed:

[0067] 1) Increment the minimum value count PEAK_MIN_NUM by 1;

[0068] 2) Find the index number PEAK_MIN_DATA_INDEX of the minimum value in the data cache according to the value of the minimum value timer;

[0069] 3) Record the current minimum value as PEAK_MIN;

[0070] 4) Subtract PEAK_MIN_TIMER_COUNTER from TIMER_COUNTER, and the time from the maximum value to the minimum value is obtained as PEAK_MIN_POS;

[0071] 5) Obtain the timeout threshold MAX_T_THR according to the abnormal count ABNORMAL_COUNTER. If PEAK_MIN_POS is greater than MAX_T_THR, the output result is the slow error DOUBLE_SLOW_ERROR; if PEAK_MIN_POS is less than the minimum time threshold DOUBLE_MIN_T, the output result is the fast error DOUBLE_FAST_ERROR;

[0072] 6) Calculate the amplitude threshold AMP_THR according to the abnormal count ABNORMAL_COUNTER and the maximum value PEAK_MAX; if the difference between the maximum value PEAK_MAX and the minimum value PEAK_MIN is less than AMP_THR, the output result is the amplitude error DOUBLE_AMP_ERROR;

[0073] 7) Obtain the middle value PEAK_MIDDLE according to PEAK_MAX and PEAK_MIN; then, according to PEAK_MAX_DATA_INDEX and PEAK_MIN_DATA_INDEX, calculate the data volume from PEAK_MAX to PEAK_MIDDLE in the data cache as PEAK_MAX_TO_MIDDLE_COUNTER, and the data volume from PEAK_MIDDLE to PEAK_MIN as MIDDLE_TO_PEAK_MIN_COUNTER; determine whether the ratio of PEAK_MAX_TO_MIDDLE_COUNTER to MIDDLE_TO_PEAK_MIN_COUNTER is within a certain range. If it is not within a certain range, the output result is the middle point time error DOUBLE_MID_TIME_ERROR;

[0074] 8) Update the value of TIMER_COUNTER to the minimum value timer value PEAK_MIN_TIMER_COUNTER.

[0075] The beneficial effects of the present invention are:

[0076] First, the double-click recognition method has low requirements for the performance of the processor, thus reducing costs, and only requires 4kBytes of ROM + 500Bytes of RAM.

[0077] Second, the double-click recognition method can calibrate the recognition distance, meet the different distance requirements of different users, and ensure the consistency of the distance.

[0078] Thirdly, the double - click recognition method has a high tolerance for the user's double - click actions. Within certain limiting conditions, the user can perform double - click actions very casually during double - clicking; the amplitude of the action can be very large or very small, and the action speed can be restricted and adjusted according to needs.

[0079] Fourthly, the double - click recognition method has a good ability to suppress the interference of ambient light and other external infrared signals. Description of the Drawings

[0080] 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 required in the description of the embodiments or the prior art, but it is not a limitation on the protection scope of the present invention.

[0081] Figure 1 It is the software flow chart of the extreme value detection of the present invention;

[0082] Figure 2 It is the software flow chart of the extreme value anomaly analysis of the present invention;

[0083] Figure 3 It is the schematic diagram of the infrared intensity change during the normal double - click process of the present invention;

[0084] Figure 4 It is the schematic diagram of the infrared intensity change during the abnormal double - click process;

[0085] Figure 5 It is the schematic diagram of the infrared intensity change during the abnormal double - click process;

[0086] Figure 6 It is the schematic diagram of the infrared intensity change during the abnormal double - click process. Detailed Embodiments

[0087] Refer to Figures 1 to 6 The double - click gesture recognition method based on the infrared intensity change shown, and various state settings are performed in the state machine, specifically:

[0088] State 1: Parameter initialization; specifically: in this state, some detection parameters are initialized, including the extreme value detection threshold and the fluctuation detection threshold, and then the state is updated to State 2.

[0089] State 2: Idle; specifically: in this state, it is judged whether the current intensity value is greater than the previous intensity value. If it is greater, the state is updated to State 3, and at the same time, the following commands are executed:

[0090] 1) Record the intensity of the current ambient light as START_M1;

[0091] 2) Record the current intensity value as START_MIN;

[0092] 3) Calculate the rising threshold as UP_THR1.

[0093] State 3: Waiting for rising; specifically: If the current intensity value in this state is less than START_MIN, update the current state to State 2, and at the same time, determine whether the current intensity value in this state is greater than the rising threshold UP_THR1. If it is greater, update the state to State 4, and at the same time execute the following commands:

[0094] 1) Clear the count value TIMER_COUNTER of the timer;

[0095] 2) Set the extreme value detection to detect the maximum value.

[0096] State 4: Waiting for the first maximum value; specifically: In this state, the timer works normally. If the count value TIMER_COUNTER exceeds the set timeout threshold, update the state to State 2, and at the same time increment the abnormal count ABNORMAL_COUNTER by 1. If a maximum value is detected, execute the following steps:

[0097] 1) According to the value of the maximum value timer, find the index number PEAK_MAX_DATA_INDEX of the maximum value in the data cache;

[0098] 2) Update the value of TIMER_COUNTER to the value PEAK_MAX_TIMER_COUNTER of the maximum value timer;

[0099] 3) Record the current maximum value as PEAK_MAX;

[0100] 4) Update the state to State 5.

[0101] The method for detecting the maximum value in the above process:

[0102] A. If the current value is greater than the temporary maximum value TEMP_PEAK_MAX, update TEMP_PEAK_MAX to the current value, and at the same time clear the count value PEAK_MAX_TIMER_COUNTER of the maximum value timer.

[0103] B. If the current value is not greater than TEMP_PEAK_MAX, the maximum value timer works normally.

[0104] C. If the current value is smaller than TEMP_PEAK_MAX by a certain value, it means that the maximum value is detected. Update the extreme value detection to detect the minimum value, and at the same time clear the count value PEAK_MIN_TIMER_COUNTER of the minimum value timer.

[0105] D. If a maximum value is currently detected, perform the following steps:

[0106] 1. Based on the value of the maximum timer, find the index number PEAK_MAX_DATA_INDEX of the maximum value in the data cache.

[0107] 2. Update the value of TIMER_COUNTER to the value of the maximum timer PEAK_MAX_TIMER_COUNTER;

[0108] 3. Record the current maximum value as PEAK_MAX.

[0109] 4. Subtract PEAK_MAX_TIMER_COUNTER from TIMER_COUNTER to obtain the time from the minimum value to the maximum value as PEAK_MAX_POS.

[0110] 5. Calculate the timeout threshold MAX_T_THR based on the abnormal count ABNORMAL_COUNTER. If PEAK_MIN_POS is greater than MAX_T_THR, the output result is the slow error DOUBLE_SLOW_ERROR. If PEAK_MIN_POS is less than the minimum time threshold DOUBLE_MIN_T, the output result is the fast error DOUBLE_FAST_ERROR.

[0111] 6. Calculate the amplitude threshold AMP_THR based on the abnormal count ABNORMAL_COUNTER and the maximum value PEAK_MAX. If the difference between the maximum value PEAK_MAX and the minimum value PEAK_MIN is less than AMP_THR, the output result is the amplitude error DOUBLE_AMP_ERROR.

[0112] 7. Obtain the middle value PEAK_MIDDLE based on PEAK_MAX and PEAK_MIN; then, based on PEAK_MAX_DATA_INDEX and PEAK_MIN_DATA_INDEX, calculate the data volume from PEAK_MAX to PEAK_MIDDLE as PEAK_MAX_TO_MIDDLE_COUNTER and the data volume from PEAK_MIDDLE to PEAK_MIN as MIDDLE_TO_PEAK_MIN_COUNTER in the data cache; determine whether the ratio of PEAK_MAX_TO_MIDDLE_COUNTER to MIDDLE_TO_PEAK_MIN_COUNTER is within a certain range. If it is not within a certain range, the output result is the midpoint time error DOUBLE_MID_TIME_ERROR.

[0113] 8. Determine whether the ratio of PEAK_MIN_POS to PEAK_MAX_POS is within a certain range. If not, output the result as the falling and rising time error DOUBLE_D_U_TIME_ERROR.

[0114] 9. Update the value of TIMER_COUNTER to the maximum value timer's value PEAK_MAX_TIMER_COUNTER.

[0115] 10. Record PEAK_MAX_POS as WAIT_NOT_UP_COUNTER to prepare for the subsequent waiting time when it no longer rises.

[0116] State Five: Wait for the second minimum value; specifically: In this state, the timer works normally. If the count value TIMER_COUNTER exceeds the set timeout threshold, update the state to State Two, and at the same time increment the abnormal count ABNORMAL_COUNTER by 1. If a minimum value is detected, execute the following commands:

[0117] Perform extreme value anomaly analysis and perform the following actions according to the analysis results;

[0118] A. If the anomaly is DOUBLE_FAST_ERROR, update the state to State Nine;

[0119] B. If the anomaly is other anomalies, update the state to State Two, and at the same time increment the abnormal count ABNORMAL_COUNTER by 1;

[0120] C. If there is no anomaly, execute the following actions:

[0121] When the value of (PEAK_MAX minus START_MIN) divided by (PEAK_MAX minus PEAK_MIN) is less than a certain value, update the state to State Two, and at the same time increment the abnormal count ABNORMAL_COUNTER by 1. Otherwise, update the state to State Six;

[0122] Method for detecting the minimum value in State Five:

[0123] A. If the current value is less than the temporary minimum value TEMP_PEAK_MIN, update TEMP_PEAK_MIN to the current value, and at the same time clear the count value of the minimum value timer PEAK_MIN_TIMER_COUNTER.

[0124] B. If the current value is not less than TEMP_PEAK_MIN, the minimum value timer works normally.

[0125] C. If the current value is greater than TEMP_PEAK_MIN by a certain value, it means a minimum value is detected. Update the extreme value detection to detect the maximum value, and at the same time, clear the count value PEAK_MAX_TIMER_COUNTER of the maximum value timer.

[0126] The method for analyzing extreme value anomalies in State 5 is as follows: If a minimum value is currently detected, perform the following steps:

[0127] 1. Increment the minimum value count PEAK_MIN_NUM by 1.

[0128] 2. Based on the value of the minimum value timer, find the index number PEAK_MIN_DATA_INDEX of the minimum value in the data cache.

[0129] 3. Record the current minimum value as PEAK_MIN.

[0130] 4. Subtract PEAK_MIN_TIMER_COUNTER from TIMER_COUNTER to obtain the time PEAK_MIN_POS from the maximum value to the minimum value.

[0131] 5. Calculate the timeout threshold MAX_T_THR based on the abnormal count ABNORMAL_COUNTER. If PEAK_MIN_POS is greater than MAX_T_THR, the output result is the slow error DOUBLE_SLOW_ERROR. If PEAK_MIN_POS is less than the minimum time threshold DOUBLE_MIN_T, the output result is the fast error DOUBLE_FAST_ERROR.

[0132] 6. Calculate the amplitude threshold AMP_THR based on the abnormal count ABNORMAL_COUNTER and the maximum value PEAK_MAX. If the maximum value PEAK_MAX minus the minimum value PEAK_MIN is less than AMP_THR, the output result is the amplitude error DOUBLE_AMP_ERROR.

[0133] 7. Obtain the intermediate value PEAK_MIDDLE based on PEAK_MAX and PEAK_MIN. Then, according to PEAK_MAX_DATA_INDEX and PEAK_MIN_DATA_INDEX, calculate the data volume from PEAK_MAX to PEAK_MIDDLE as PEAK_MAX_TO_MIDDLE_COUNTER and the data volume from PEAK_MIDDLE to PEAK_MIN as MIDDLE_TO_PEAK_MIN_COUNTE from the data cache. Determine whether the ratio of PEAK_MAX_TO_MIDDLE_COUNTER to MIDDLE_TO_PEAK_MIN_COUNTER is within a certain range. If it is not within the certain range, the output result is the double midpoint time error DOUBLE_MID_TIME_ERROR.

[0134] 8. Update the value of TIMER_COUNTER to the value of the minimum timer PEAK_MIN_TIMER_COUNTER.

[0135] Status Six: Wait for the second maximum value; specifically: If a maximum value is detected, execute the following commands: Perform extreme value exception analysis and take the following actions according to the analysis results;

[0136] A. If the exception is DOUBLE_FAST_ERROR, update the status to Status Nine;

[0137] B. If the exception is other exceptions, increment the exception count ABNORMAL_COUNTER by 1; at the same time, determine whether PEAK_MIN_NUM is less than a certain value. If it is less, update the status to Status Five, otherwise update the status to Status Two;

[0138] C. If there is no exception, update the status to Status Seven and calculate the drop threshold DOWN_THR according to PEA_MAX and PEAK_MIN.

[0139] Status Seven: Wait for the intensity value to drop; specifically: In this state, the timer works normally. If the count value TIMER_COUNTER exceeds the set timeout threshold, update the status to Status Nine; If a minimum value is detected, execute the following actions:

[0140] Perform extreme value exception analysis and take the following actions according to the analysis results:

[0141] A. If the exception is DOUBLE_FAST_ERROR, update the status to Status Nine;

[0142] B. If the exception is DOUBLE_D_U_TIME_ERROR, update the status to Status Nine;

[0143] C. If it is other exceptions, increment the exception count ABNORMAL_COUNTER by 1 and update the status to Status Two;

[0144] D. If there is no exception, check if PEAK_MIN_NUM is less than a certain value. If it is less, update the status to Status Six; otherwise, update the status to Status Nine;

[0145] E. If the current intensity value is less than DOWN_THR, update the status to Status Eight; and perform the following steps simultaneously:

[0146] 1) Limit the minimum value of WAIT_NOT_UP_COUNTER to prevent the waveform from rising again;

[0147] 2) Update PEAK_MAX and the current value, and update the rising threshold UP_THR2;

[0148] Status Eight: Wait for the intensity value not to rise again; specifically: If a minimum value is detected, perform the following actions:

[0149] Conduct an extreme value exception analysis and perform the following actions based on the analysis results:

[0150] A. If the exception is DOUBLE_FAST_ERROR, update the status to Status Nine;

[0151] B. If the exception is DOUBLE_D_U_TIME_ERROR, update the status to Status Nine;

[0152] C. If it is other exceptions, increment the exception count ABNORMAL_COUNTER by 1 and update the status to Status Two;

[0153] D. If there is no exception, check if PEAK_MIN_NUM is less than a certain value. If it is less, update the status to Status Six; otherwise, update the status to Status Nine;

[0154] E. If after a period of time, the intensity value does not rise above the threshold UP_THR2, perform the following steps:

[0155] 1) Calculate the threshold MAX_THR for the maximum intensity value during this double-click recognition process based on START_MIN; if the maximum intensity value MAX is less than MAX_THR, update the status to Status Two;

[0156] 2) Pass START_M1, START_MIN, MAX_M1, and MAX into the ambient light accidental touch analysis method. If the analysis result is abnormal, update the status to Status Two;

[0157] 3) If all the above analysis results are normal, update the status to Status Ten;

[0158] The ambient light accidental touch analysis method in step 2) is as follows: The value obtained by subtracting START_MIN from MAX is A; if MAX_M1 is less than START_M1, the value obtained by subtracting MAX_M1 from START_M1 is B1. If A is less than twice B1, the output result is abnormal;

[0159] If MAX_M1 is greater than START_M1, the value obtained by subtracting START_M1 from MAX_M1 is B2. If A is less than four times B2, the output result is abnormal.

[0160] The above method enables infrared gesture recognition to have a good ability to suppress the interference of ambient light and other external infrared signals.

[0161] Status Nine: Wait for the intensity value to flatten; specifically: If it is detected that the intensity value does not fluctuate significantly for a period of time, update the status to Status Two and clear ABNORMAL_COUNTER at the same time.

[0162] Status Ten: Double - click recognition successful; specifically: Update the status to Status Two and clear ABNORMAL_COUNTER at the same time.

[0163] When the present invention is in use, Status One to Status Ten form a logically circular operation process.

[0164] The state machine described in the present invention is composed of a state register and a combinational logic circuit, and can perform state transitions according to control signals in accordance with pre - set states. It is a control center that coordinates the actions of relevant signals and completes specific operations. The finite state machine is abbreviated as FSM (Finite State Machine) and is mainly divided into two categories:

[0165] The first category, if the output is only related to the state and has nothing to do with the input, is called a Moore state machine;

[0166] The second category, if the output is related to both the state and the input, is called a Mealy state machine.

[0167] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any change or replacement that can be thought of without creative work should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope defined by the claims.

Claims

1. A double - click gesture recognition method based on infrared intensity change, characterized in that: Multiple state settings are performed in the state machine, including: State 1: Parameter initialization; specifically: in this state, some detection parameters are initialized, including the extreme value detection threshold and the fluctuation detection threshold, and then the state is updated to State 2; State 2: Idle; specifically: in this state, it is judged whether the current intensity value is greater than the previous intensity value. If it is greater, the state is updated to State 3; State 3: Waiting for rise; specifically: if the current intensity value in this state is less than START_MIN, the current state is updated to State 2, and at the same time, it is judged whether the current intensity value in this state is greater than the rise threshold UP_THR1. If it is greater, the state is updated to State 4; State 4: Waiting for the first maximum value; specifically: in this state, the timer works normally. If the count value TIMER_COUNTER exceeds the set timeout threshold, the state is updated to State 2, and at the same time, the abnormal count ABNORMAL_COUNTER is incremented by 1; State 5: Waiting for the second minimum value; specifically: in this state, the timer works normally. If the count value TIMER_COUNTER exceeds the set timeout threshold, the state is updated to State 2, and at the same time, the abnormal count ABNORMAL_COUNTER is incremented by 1; State 6: Waiting for the second maximum value; specifically: if a maximum value is detected, the following command is executed: perform extreme value anomaly analysis; State 7: Waiting for the intensity value to drop; specifically: in this state, the timer works normally. If the count value TIMER_COUNTER exceeds the set timeout threshold, the state is updated to State 9; State 8: Waiting for the intensity value to stop rising; specifically: if a minimum value is detected, the following action is performed: perform extreme value anomaly analysis; State 9: Waiting for the intensity value to be flat; specifically: if it is detected that the intensity value has not fluctuated significantly for a period of time, the state is updated to State 2, and at the same time, ABNORMAL_COUNTER is cleared; State 10: Double-click recognition successful; specifically: the state is updated to State 2, and at the same time, ABNORMAL_COUNTER is cleared.

2. The double-tap gesture recognition method based on infrared intensity change according to claim 1, characterized in that: In State 2, if it is judged in this state that the current intensity value is greater than the previous intensity value, the following command is executed: A. Record the intensity of the current ambient light as START_M1; B. Record the current intensity value as START_MIN; C. Calculate the rise threshold as UP_THR1.

3. The double-tap gesture recognition method based on infrared intensity change according to claim 1, wherein: In State 3, if it is judged that the current intensity value in this state is greater than the rise threshold UP_THR1, the following commands are executed simultaneously: A. Clear the count value TIMER_COUNTER of the timer; B. Set the extreme value detection to detect the maximum value.

4. The double-tap gesture recognition method based on infrared intensity change according to claim 1, characterized in that: In State 4, if a maximum value is detected, the following steps are executed: 1) According to the value of the maximum value timer, find the index number PEAK_MAX_DATA_INDEX of the maximum value in the data cache; 2) Update the value of TIMER_COUNTER to the value of the maximum value timer PEAK_MAX_TIMER_COUNTER; 3) Record the current maximum value as PEAK_MAX; 4) Update the status to Status Five.

5. The double-tap gesture recognition method based on infrared intensity change according to claim 1, characterized in that: In Status Five, if a minimum value is detected, execute the following commands: Perform extreme value anomaly analysis and take the following actions according to the analysis results; A. If the anomaly is DOUBLE_FAST_ERROR, update the status to Status Nine; B. If the anomaly is other anomalies, update the status to Status Two and increment the anomaly count ABNORMAL_COUNTER by 1; C. If there is no anomaly, take the following actions: If the value of (PEAK_MAX minus START_MIN) divided by (PEAK_MAX minus PEAK_MIN) is less than a certain value, update the status to Status Two and increment the anomaly count ABNORMAL_COUNTER by 1; otherwise, update the status to Status Six.

6. The double-tap gesture recognition method based on infrared intensity change according to claim 1, wherein: In Status Six, take the following actions according to the extreme value anomaly analysis results; A. If the anomaly is DOUBLE_FAST_ERROR, update the status to Status Nine; B. If the anomaly is other anomalies, increment the anomaly count ABNORMAL_COUNTER by 1; also, check if PEAK_MIN_NUM is less than a certain value. If it is less, update the status to Status Five; otherwise, update the status to Status Two; C. If there is no anomaly, update the status to Status Seven and calculate the drop threshold DOWN_THR based on PEA_MAX and PEAK_MIN.

7. The double-tap gesture recognition method based on infrared intensity change according to claim 1, characterized in that: In Status Seven, if a minimum value is detected, execute the following actions: Perform extreme value anomaly analysis and take the following actions according to the analysis results: A. If the anomaly is DOUBLE_FAST_ERROR, update the status to Status Nine; B. If the anomaly is DOUBLE_D_U_TIME_ERROR, update the status to Status Nine; C. If it is other anomalies, increment the anomaly count ABNORMAL_COUNTER by 1 and update the status to Status Two; D. If there is no anomaly, check if PEAK_MIN_NUM is less than a certain value. If it is less, update the status to Status Six; otherwise, update the status to Status Nine; E. If the current intensity value is less than DOWN_THR, update the status to Status Eight; and simultaneously execute the following steps: 1) Limit the minimum value of WAIT_NOT_UP_COUNTER to prevent the waveform from rising again; 2) Update PEAK_MAX and the current value, and update the rising threshold UP_THR2.

8. The double - click gesture recognition method based on infrared intensity change according to claim 1, wherein: In Status Eight, take the following actions according to the extreme value anomaly analysis results: A. If the anomaly is DOUBLE_FAST_ERROR, update the status to Status Nine; B. If the anomaly is DOUBLE_D_U_TIME_ERROR, update the status to Status Nine; C. If it is other anomalies, increment the anomaly count ABNORMAL_COUNTER by 1 and update the status to Status Two; D. If there is no abnormality, check if PEAK_MIN_NUM is less than a certain value. If it is less, update the status to status six; otherwise, update the status to status nine. E. If the intensity value does not rise above the threshold UP_THR2 after a period of time, perform the following steps: 1) Calculate the threshold MAX_THR for the maximum intensity value during this double-tap recognition process based on START_MIN; if the maximum intensity MAX is less than MAX_THR, update the status to status two. 2) Pass START_M1, START_MIN, MAX_M1, and MAX into the ambient light false touch analysis method. If the analysis result is abnormal, update the status to status two. 3) If all the above analysis results are normal, update the status to status ten.

9. The double-tap gesture recognition method based on infrared intensity change according to claim 4, characterized in that: If a maximum value is currently detected, perform the following steps: 1) Based on the value of the maximum value timer, find the index number PEAK_MAX_DATA_INDEX of the maximum value in the data cache. 2) Update the value of TIMER_COUNTER to the value of the maximum value timer PEAK_MAX_TIMER_COUNTER. 3) Record the current maximum value as PEAK_MAX. 4) Subtract PEAK_MAX_TIMER_COUNTER from TIMER_COUNTER to obtain the time from the minimum value to the maximum value as PEAK_MAX_POS. 5) Calculate the timeout threshold MAX_T_THR based on the abnormal count ABNORMAL_COUNTER; if PEAK_MIN_POS is greater than MAX_T_THR, the output result is the slow error DOUBLE_SLOW_ERROR; if PEAK_MIN_POS is less than the minimum time threshold DOUBLE_MIN_T, the output result is the fast error DOUBLE_FAST_ERROR. 6) Calculate the amplitude threshold AMP_THR based on the abnormal count ABNORMAL_COUNTER and the maximum value PEAK_MAX; if the difference between the maximum value PEAK_MAX and the minimum value PEAK_MIN is less than AMP_THR, the output result is the amplitude error DOUBLE_AMP_ERROR. 7) Obtain the intermediate value PEAK_MIDDLE based on PEAK_MAX and PEAK_MIN. Then, according to PEAK_MAX_DATA_INDEX and PEAK_MIN_DATA_INDEX, calculate the data volume from PEAK_MAX to PEAK_MIDDLE in the data cache as PEAK_MAX_TO_MIDDLE_COUNTER, and the data volume from PEAK_MIDDLE to PEAK_MIN as MIDDLE_TO_PEAK_MIN_COUNTER; determine whether the ratio of PEAK_MAX_TO_MIDDLE_COUNTER to MIDDLE_TO_PEAK_MIN_COUNTER is within a certain range. If it is not within the certain range, the output result is the double mid-time error DOUBLE_MID_TIME_ERROR; 8) Determine whether the ratio of PEAK_MIN_POS and PEAK_MAX_POS is within a certain range. If it is not, the output result is the double down-up time error DOUBLE_D_U_TIME_ERROR; 9) Update the value of TIMER_COUNTER to the value of the peak maximum timer PEAK_MAX_TIMER_COUNTER; 10) Record PEAK_MAX_POS as WAIT_NOT_UP_COUNTER to prepare for the subsequent time of waiting for no further rise.

10. The double-tap gesture recognition method based on infrared intensity change according to claim 5, wherein: The extreme value anomaly analysis method is as follows: If a minimum value is currently detected, perform the following steps: 1) Increment the minimum value count PEAK_MIN_NUM by 1; 2) Based on the value of the minimum value timer, find the index number PEAK_MIN_DATA_INDEX of the minimum value in the data cache; 3) Record the current minimum value as PEAK_MIN; 4) Subtract PEAK_MIN_TIMER_COUNTER from TIMER_COUNTER to obtain the time from the maximum value to the minimum value as PEAK_MIN_POS; 5) Obtain the timeout threshold MAX_T_THR according to the anomaly count ABNORMAL_COUNTER. If PEAK_MIN_POS is greater than MAX_T_THR, the output result is the double slow error DOUBLE_SLOW_ERROR; if PEAK_MIN_POS is less than the minimum time threshold DOUBLE_MIN_T, the output result is the double fast error DOUBLE_FAST_ERROR; 6) Calculate the amplitude threshold AMP_THR according to the anomaly count ABNORMAL_COUNTER and the maximum value PEAK_MAX; if the maximum value PEAK_MAX minus the minimum value PEAK_MIN is less than AMP_THR, the output result is the double amplitude error DOUBLE_AMP_ERROR; 7) Obtain the intermediate value PEAK_MIDDLE based on PEAK_MAX and PEAK_MIN; then, according to PEAK_MAX_DATA_INDEX and PEAK_MIN_DATA_INDEX, calculate the data volume from PEAK_MAX to PEAK_MIDDLE as PEAK_MAX_TO_MIDDLE_COUNTER and the data volume from PEAK_MIDDLE to PEAK_MIN as MIDDLE_TO_PEAK_MIN_COUNTER from the data cache; determine whether the ratio of PEAK_MAX_TO_MIDDLE_COUNTER to MIDDLE_TO_PEAK_MIN_COUNTER is within a certain range. If it is not within a certain range, the output result is the double mid-time error DOUBLE_MID_TIME_ERROR; 8) Update the value of TIMER_COUNTER to the value of the minimum timer PEAK_MIN_TIMER_COUNTER.

Citation Information

Patent Citations

  • Gesture based interface system and method

    CN103890695A

  • Infrared gesture recognition device and recognition method

    CN108459723A

  • Shooting scene identification method and device, equipment and storage medium

    CN119520978A

  • Motion detection method and electronic device supporting the same

    US20180299970A1