1. Field of the Invention
The present invention relates to the technical field of optical mouse and, more particularly, to a method and apparatus for controlling dynamic image capturing rate of an optical mouse.
2. Description of Related Art
A typical optical mouse applies a light-emitting diode (LED) to illuminate a mouse pad corresponding to the mouse or other object in order to obtain an image via an image sensor, and then the image sensor captures another image on the mouse pad, thus a moving vector of the optical mouse is found by comparing the two images. The moving vector is the moved distance of the mouse between two sampling points. As shown in
For power consumption, the LED consumes most power (about 60%) in an optical mouse. It is known that the operating speed to a typical mouse is limited by the operating speed of human hand, typically between 2˜6 ips (inch per second). A displacement obtained by such an operating speed and the constant capturing rate will less than 2 dots, and it will not exceed a detectable range. However, because the conventional mouse lights the LED at a constant speed to capture image and compute displacement, it consumes resources like computing capacity and power. Therefore, it is desirable for the above conventional optical mouse to be improved so as to mitigate and/or obviate the aforementioned problems.
The object of the present invention is to provide a method and apparatus for controlling dynamic image capturing rate of an optical mouse, which reduces frequency of lighting LED in the optical mouse and the LED power consumption, and which saves much computation time and energy, thereby effectively reducing power consumption to achieve the purpose of saving power.
In accordance with one aspect of the present invention, there is provided a method for controlling dynamic image capturing rate of an optical mouse. The optical mouse has a light source and an image sensor. The light source is lighted at a lighting frequency such that the image sensor can capture an external image. The method includes the steps: (A) capturing a first image; (B) capturing a second image for comparing the first image and the second image and thus finding match parts to determine displacement and moving speed of the optical mouse; and (C) proportionally adjusting the lighting frequency of the light source and an image capturing rate based on the moving speed, and then executing step (B).
In accordance with another aspect of the present invention, there is provided an apparatus for controlling dynamic image extraction rate of an optical mouse. The apparatus includes an image sensor, a light source, a memory and a processor. The image sensor captures images. The light source is lighted at a lighting frequency such that the image sensor can capture external images. The memory stores images captured by the image sensor. The processor is coupled to the memory. When the image sensor captures a current image and stores it in the memory, the processor finds match parts by comparing the current image with a previous image to accordingly determine displacement and moving speed of the optical mouse and thus proportionally adjust the lighting frequency of the light source and an image capturing rate based on the moving speed.
Other objects, advantages, and novel features of the invention will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.
When the optical mouse moves to left up corner, an image captured by the image sensor 210 moves to right down corner, as shown in
As shown in
In step S305, it determines whether the sampling time is reached or not. If yes, step S307 is performed. At this point, a new image can be captured by the image sensor 210 because the sampling time is reached and the lighting source 220 bas been lighted.
In step S309, it finds matched parts by comparing images of t1 and t2 to thus determine displacement and moving speed of the optical mouse. A comparison method is applied to compare a comparison range B′ of t2 and a comparison range B of t1 to thus determine the similarity. The comparison method can be a second order momentum method, a mean squared error (MSE) or the like.
After the comparison, the similarity of the comparison ranges B′ and B is determined (step S311). If the comparison ranges B′ and B are similar, it represents that a triangle C′ corresponding to the triangle C included in the comparison range B of t2 can be found in the comparison range B′ of t2. Accordingly, a moving vector D can be computed based on a position change of image and further a moving speed of the optical mouse can be found as v=D/Δt (step S313), where Δt is time difference between two successive images captured by the image sensor 210, i.e., α t=t2−t1.
When the moving speed v increases, it implies that the optical mouse moves quicker. Thus, the capturing rate of the image sensor 210 and the lighting frequency of the light source 220 can be increased to prevent a sampled image from moving outside the range of detectable moving vector. When the moving speed v reduces, it implies that the optical mouse moves slower. Thus, the capturing rate of the image sensor 210 and the lighting frequency of the light source 220 can be reduced for power saving. In this case, the sampled image will not move outside the range of detectable moving vector (step S315).
When the comparison ranges B′ and B are not similar, it represents that the triangle C′ corresponding to the triangle C included in the comparison range B of t1 cannot be found in the comparison range B′ of t2, as shown in
In view of the foregoing, it is known that the invention can dynamically adjust the capturing rate when an captured image does not move outside a range of detectable moving vector, thereby reducing lighting times of LED and power consumption for lighting, so as to lower sampling and comparison numbers and reduce power consumption for computation.
Although the present invention has been explained in relation to its preferred embodiment, it is to be understood that many other possible modifications and variations can be made without departing from the spirit and scope of the invention as hereinafter claimed.
Number | Date | Country | Kind |
---|---|---|---|
092126760 | Sep 2003 | TW | national |