1. Field of the Invention
The present invention relates to a detection method; in particular, to a tapping detection method of an optical navigation module.
2. Description of Related Art
The conventional navigation module uses a mechanical switch for determining whether an electronic device receives a tapping or scrolling command. According to the switching operation of users for closing or opening the electrical circuits, the processor of the electrical device may determine the operation thereof. However, the manner described above may need to dispose a switch at the electronic device, and may provide a space at the navigation device for disposing the hardware component.
Additionally, the determination commands of the navigation device may generate misjudgment because of the operations of users, and the navigation device may generate wrong responses.
According to an embodiment of the present invention, a tapping detection method of an optical navigation module having an optical sensor and a processor are disclosed. The method includes steps of calculating a displacement quantity of an object contacting with the optical navigation module according to the sense image sensed by the optical sensor, and comparing the displacement quantity with a displacement threshold value. When the displacement quantity is smaller than the displacement threshold value, the method may include steps of calculating a brightness difference value of the sense image, and comparing the brightness difference value with a brightness threshold value. When the brightness difference value is smaller than the brightness threshold value, the optical navigation module may be determined to be tapped by the object.
A tapping detection of an optical navigation module may also be disclosed according to another embodiment of the present invention. The method includes steps of calculating a displacement quantity of an object contacting with the optical navigation module according to a sense image sensed by the optical sensor, and comparing the displacement quantity with the displacement threshold value. When the displacement quantity is smaller than the displacement threshold value, the method may further include steps of calculating a brightness difference value of the sense image, and comparing the brightness difference value with a brightness threshold value. When the brightness difference value is smaller than the brightness threshold value, the optical navigation module may be determined to be tapped by the object, and a time counting of a tapping time may be executed. When the tapping time is not expired to end, the image characteristic value of a next sense image may be calculated, and may be compared with the navigation threshold value. When the image characteristic value is smaller than the navigation threshold value, the time counting of the tapping time may be stopped, and the optical navigation module may be determined to be tapped.
A computer readable recording medium may be provided according to an embodiment of the present invention. The medium is used for recording a set of program code which may execute the aforementioned tapping detection method.
For further understanding of the present disclosure, reference is made to the following detailed description illustrating the embodiments and examples of the present disclosure. The description is only for illustrating the present disclosure, not for limiting the scope of the claim.
The drawings included herein provide further understanding of the present disclosure. A brief introduction of the drawings is as follows:
The aforementioned illustrations and following detailed descriptions are exemplary for the purpose of further explaining the scope of the present invention. Other objectives and advantages related to the present invention will be illustrated in the subsequent descriptions and appended drawings.
[Embodiments of an Optical Navigation Module and a Tapping Detection Method Thereof]
Please refer to
The optical navigation module 10 may be an optical finger navigation module. The optical sensor 102 may be a complementary metal oxide semiconductor (CMOS) sensor or a charge coupled device (CCD) sensor, and the processor 104 may be a digital signal processor, a microcontroller, an application specific integrated circuits (ASIC), or other kinds of control component. The object 2 which is operating on the sense plane 100 may be a finger of a user or a touch pen, or the like.
The processor 104 may calculate every sense image for determining the operations of the object 2 relative to the optical navigation module 10, such as tapping on the sense plane 100, or lifting from the sense plane 100 and being away from the module 10.
Please refer to
However, when the object 2 moves fast on the sense plane 100, the processor 104 may mistakenly determine that the object 2 is tapping instead of sliding on the module 10. As shown in
Please refer to
When the processor 104 receives a sense image sensed by the optical sensor 102, an image characteristic value of the sense image may be calculated (S401). For example, the image characteristic value may be a pixel average value or an image contrast of the detected sense image. The processor 104 may also compare the image characteristic value with a predetermined or dynamically determined navigation threshold value, for determining whether the image characteristic value is greater than or equals to the navigation threshold value (S403). If the result of comparison indicates that the image characteristic value is smaller than the navigation threshold value, a sense image next to the calculated sense image may be selected (S405), and the method may go back to step S401 for calculating and comparing the newly selected sense image.
The optical sensor 102 may continuously sense and generate sense images, when the object 2 leaves the sense plane 100, the pixel average value of the sense image detected by the optical sensor 102 may become relatively small, and the image contrast may become unobvious in the meantime. On the other hand, when the object 2 contacts with the sense plane 100, the pixel average value may be relatively great and the image contrast may be relatively high. Therefore, the comparison in step S403 may be used to determine whether the object image 20 of the object 2 is presented in the sense image (see
When the comparison result of the step S403 is yes, the processor 104 may further compare out vertical and horizontal displacement of the object image, and calculate a displacement quantity among the sense image in correspondence to the object 2 (S407).
The processor 104 may then compare the displacement quantity corresponding to the sense image with a displacement threshold value (S409), for determining whether the object 2 continuously contacts substantially the same location of the sense plane 100 or moves around the sense plane 100 and thus generate obvious displacement.
Please compare
When the determination result shows that the displacement quantities corresponding to the sense images are smaller than the displacement threshold value, the processor 104 may further calculate a brightness difference value of the sense image (S413), and may compare the brightness difference value with a brightness threshold value for determining whether the brightness difference value is greater than or equals to the brightness threshold value or not (S415).
In this embodiment, the brightness difference value may be a difference value between a maximum pixel value and a minimum pixel value among the pixels of the sense image. When the object images 20 corresponding to the object 2 is included in the sense image, the pixel values corresponding to the object images 20 in the sense image are relatively great. And the other part of the sense image may have relatively small pixel values.
Please refer to the following descriptions along with
On the other hand, when the object 2 touches the sense plane 100 of the optical navigation module 10 by a manner of fast sliding, even the displacement quantities of the object images 20 are smaller than the displacement threshold value, but because the object 2 actually lifts after short distance movement, the sense images sensed by the optical sensor 102 may easily generate part of the screen has the object images 20 while other part does not, as shown in
Therefore, when the determination result shows that the brightness difference value is larger than or equals to the brightness threshold value, the processor 104 may determine that the object 2 is at non-tapping mode when the sense image is captured (S411), and the operation mode of the object 2 may be dragging data or scrolling a moving bar. On the other hand, after the double filtering via displacement threshold value and the brightness threshold value, and the processor 104 determine that the displacement quantity is smaller than the displacement threshold value and the brightness difference value is also smaller than the brightness threshold value, the operation mode of the object 2 may be identified as tapping mode (S417).
[Another Embodiment of Tapping Detection Method of an Electronic Device]
The tapping detection method of this embodiment may not only distinguish whether the object 2 contacts with the optical navigation module 10 by tapping instead of sliding or scrolling on it, but also determine whether the object 2 presses or clicks the optical navigation module 10.
Please refer to
If the determination result indicates that the image characteristic value is greater than or equals to the navigation threshold value, the processor 104 may further perform double determinations on the sense image. The double determinations may include determining whether the displacement quantity of the sense image is greater than or equals to the displacement threshold value or not, and determining whether the brightness difference value is greater than or equals to the brightness threshold value (S507).
When one of or both of the results of the aforementioned double determinations is positive, the processor 104 may determine that the operation of the object 2 does not match the characteristics of tapping operation which include small displacement quantity and touching the sense plane 100 with a pattern of fixed-point contacting. Thus, the operation mode of the object 2 is determined to be non-tapping mode (S509). At the moment, the action executed by the object 2 may be scrolling. On the other hand, when the results of the double determinations indicate that both the displacement quantity and the brightness difference value are smaller than the corresponding threshold values, the operation mode of the object 2 may be determined to be tapping mode (S511).
When the processor 104 determines that the object 2 taps on the optical navigation module 10, it may start a time counting according to the time length of a tapping time, and may determine whether the tapping time is expired (S513). If the object 2 is tapping on the optical navigation module 10 and the tapping time is expired to end, that means the object 2 contacts with the sense plane 100 for a period of time, thus the processor 104 may determine that the action executed by the object 2 is not clicking on the sense plane 100 (S509). More specifically, the object 2 may be pressing on the sense plane 100.
If the tapping time is not expired to end, the processor 104 may continuously select the next sense image, and may calculate the image characteristic value of the selected sense image (S515), as the operations shown in S501 and S503. After that, the processor 104 may determine whether the image characteristic value of the sense image passes the sieving of the navigation threshold value or not (S517). If the image characteristic passes the sieving of the navigation threshold value, the processor 104 may go back to step S507, for determining that the sense image passes the double determinations including the displacement threshold value and the brightness threshold value. If the displacement quantity or the brightness difference value of the sense image is greater than or equals to the determination of corresponding threshold values, the processor 104 may determine that during the time the successive sense images are calculated, the object 2 has touched and moved from one location to another on the sense plane 100. Thus the object 2 may be determined not clicking on the optical navigation module 10 (S509).
Reference is made to
After that, the processor 104 may determine whether the click number of times is more than one (S523). If the determination result is positive, that means the object 2 clicks successively on the sense plane 100 for multiple times. Then the processor 104 may further control the electronic device 1 for executing a multi-click operation corresponding to the multiple clicking by the object 2 (S525).
On the other hand, if the click number of times does not exceed one time, the processor 104 may further determine whether the lift time is expired to end or not (S527). The lift time may be used for determining whether the object 2 taps on the sense plane 100 again in a short period of time after lifting from the sense plane 100.
Therefore, when the click number of time does not exceed one (the determination result of step S523 is negative) and the lift time is expired to end (the determination result of step S527 is negative), the processor 104 may determine that the object 2 clicks the optical navigation module 10 for one single time and may further control the electronic device 1 for executing an operation corresponding to the single click (S529).
After determining that the object 2 is continuously or singly clicking on the optical navigation module 10, the processor 104 may reset the click number of times to zero for recording the click number of times again according to the operations of the object 2.
If the lift time is not expired to end (the determination of step S527 is negative), the processor 104 may continuously select another successive sense image, and may calculate the image characteristic values of the latest selected sense image (S531) and determine whether the image characteristic values of the sense image is greater than or equals to the navigation threshold value (S533). If the determination result of step S533 is negative, that means the object 2 is still lifting, thus the processor 104 may go back to step S527 for determining whether the lift time is expired to end or not. On the other hand, if the determination result of step S533 is positive, that means after the object 2 corresponding to the former sense image is determined to lift from the sense plane 100, the object 2 corresponding to the next sense image is determined to contact the sense plane 100 again. Thus, the processor 104 may stop the time counting of the lift time, and may go back to step S507 (shown in both
[Possible Efficiencies of the Embodiments]
According to the embodiments of the present invention, the displacement quantities and the brightness differences of the sense image are both used as sieving conditions for double determining whether the object taps on the optical navigation module or not, which decreases the possibility of misjudging sliding to tapping.
In addition, the tapping detection method of the optical navigation module disclosed in the aforementioned embodiments may precisely determine that the operation mode of the object is tapping mode or non-tapping mode. Moreover, the method may also determine whether the object clicks on the sense plane of the optical navigation module or not. Thus, the electronic device may be able to execute corresponding operations correctly.
Moreover, the tapping detection method of the optical navigation module disclosed in the aforementioned embodiments may further accurately distinguish whether the object is single-clicking or multi-clicking on the module, and thus control the electronic device to perform corresponding work correctly.
According to the tapping detection method of the embodiments of the present invention, a processor may be used to execute program codes for increasing detection mechanics, thus the electronic device does not need any extra hardware for determining the operation statuses of the object. Therefore, the requisite materials of the electronic device may be reduced, which further decreases the cost for manufacturing the electronic device.
Some modifications of these examples, as well as other possibilities will, on reading or having read this description, or having comprehended these examples, will occur to those skilled in the art. Such modifications and variations are comprehended within this disclosure as described here and claimed below. The description above illustrates only a relative few specific embodiments and examples of the present disclosure. The present disclosure, indeed, does include various modifications and variations made to the structures and operations described herein, which still fall within the scope of the present disclosure as defined in the following claims.