This disclosure generally relates to a navigation device and, more particularly, to a navigation device with a fast frame rate upshift and an operating method thereof.
Conventionally, it is able to reduce the power consumption of an optical mouse by changing an image capture frequency of an image sensor thereof. For example, when the moving speed of the optical mouse is faster, an image capture frame rate of the image sensor becomes higher; on the contrary, when the moving speed of the optical mouse is slower, the image capture frame rate becomes lower. Accordingly, the total power consumption of the optical mouse can be reduced.
However, under the condition that the moving speed is extremely low, the image capture frame rate is arranged to be relatively slow such that when an acceleration or de-acceleration occurs, the so-called runaway or speed break can happen because the acceleration or de-acceleration that the optical mouse can handle is depending on the image capture frame rate.
Accordingly, the navigation device having a fast response to the abrupt acceleration or de-acceleration change is required.
One object of the present disclosure is to provide a navigation device and an operation method thereof that upshift the image frame rate of an image sensor for capturing a next image frame as long as a detected acceleration or de-acceleration is large enough.
To achieve the above object, the present disclosure provides a navigation device including a memory, an image sensor and a processor. The navigation device detects displacement with respect to a surface. The memory stores a predetermined relationship between a plurality of moving speeds and a plurality of frame periods. The image sensor successively captures a second previous image frame, a previous image frame and a current image frame. The processor is electrically coupled to the memory and the image sensor. The processor calculates a previous displacement according to the second previous image frame and the previous image frame, calculates a current displacement and a current speed according to the previous image frame and the current image frame, reads a frame period from the memory according to the calculated current speed, determines a speed change according to the current displacement and the previous displacement, sets a next frame period as the read frame period when the speed change is smaller than an acceleration threshold, and sets the next frame period as the read frame period multiplied by an acceleration ratio, which is smaller than 1 and calculated according to the previous displacement and the current displacement, when the speed change is larger than the acceleration threshold.
The present disclosure further provides an operating method of a navigation device. The navigation device includes a memory, an image sensor and a processor electrically coupled to the memory and the image sensor. The operating method includes: successively capturing, by the image sensor, a second previous image frame, a previous image frame and a current image frame; calculating, by the processor, a previous displacement according to the second previous image frame and the previous image frame; calculating, by the processor, a current displacement and a current speed according to the previous image frame and the current image frame; reading a frame period from the memory according to the calculated current speed; determining, by the processor, a speed change according to the current displacement and the previous displacement; setting a next frame period as the read frame period when the speed change is smaller than an acceleration threshold; and setting the next frame period as the read frame period multiplied by an acceleration ratio, which is calculated according to the previous displacement and the current displacement, when the speed change is larger than the acceleration threshold.
The present disclosure further provides a navigation device including a memory, an image sensor and a processor. The navigation device detects displacement with respect to a surface. The memory stores a predetermined relationship between a plurality of moving speeds and a plurality of frame periods. The image sensor successively captures a second previous image frame, a previous image frame and a current image frame. The processor is electrically coupled to the memory and the image sensor. The processor calculates a previous displacement according to the second previous image frame and the previous image frame, calculates a current displacement and a current speed according to the previous image frame and the current image frame, reads a frame period from the memory according to the calculated current speed, determines an acceleration according to the current displacement and the previous displacement; and sets a next frame period as the read frame period multiplied by an acceleration ratio, wherein the acceleration ratio is 1 when the acceleration is smaller than an acceleration threshold while the acceleration ratio is smaller than 1 when the acceleration is larger than the acceleration threshold.
The navigation device and an operating method thereof of the present disclosure select a read frame period from a lookup table based on a calculated moving speed at first. The read frame period is used as a next frame period when an acceleration or de-acceleration is not detected, while the read frame period is multiplied by a ratio, which is smaller than 1, to obtain a shorter next frame period when an acceleration or de-acceleration is detected. Accordingly, the runaway or speed break does not happen even operating in an extremely low speed condition.
Other objects, advantages, and novel features of the present disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.
It should be noted that, wherever possible, the same reference numbers will be used throughout the drawings to refer to the same or like parts.
Referring to
The navigation device 10 includes a light source 11, an image sensor 13, a processor 15, a memory 17 and a register 19 electrically coupled to each other, e.g., through an electric board, signal line and/or semiconductor circuit. In some embodiments, these elements included in the navigation device 10 are arranged inside a housing 100 of the navigation device 10. The housing 100 preferably has an opening through which the navigation device 10 detects the relative displacement with respect to the surface S.
The light source 11 emits light of an identifiable spectrum to illuminate the surface S. Generally, said identifiable spectrum is arranged within an invisible spectrum such that the emitted light does not affect the user. For example, the light source 11 is at least one red light emitting diode (LED), at least one red laser diode, at least one infrared LED or at least one infrared laser diode, but not limited thereto.
The image sensor 13 receives light reflected from the surface S at a frame rate to output image frames. The image sensor 13 is a CMOS image sensor, a CCD image sensor or other optical sensors for generating raw data according to the received light from the surface S.
In some embodiments, the navigation device 10 further includes the light guiding element(s) for guiding the light emitted from the light source 11 and/or received by the image sensor 13. It is possible to arrange the light source 11 and the image sensor 13 as the so-called bright field arrangement or dark field arrangement according to different applications.
Referring to
The light source 11 is controlled by the processor 15 to illuminate light every an emission period Pe which is adjusted corresponding to the frame periods, e.g., PP, PC and PN, of the image sensor 13. The image sensor 13 is controlled by the processor 15 to capture image frames with an adjustable frame period (described later). For example,
The memory 17 includes a volatile and/or a nonvolatile memory device for storing a predetermined relationship between a plurality of moving speeds and a plurality of frame periods. Other parameters or algorithms for the operation are also stored in the memory 17. For example, referring to
Preferably, the lookup table or the predetermined relationship is previously stored in the memory 17 before the shipment of the navigation device 10. It can be seen from
frame period=frame rate/FPC clock
In
The processor 15 is a central processing unit (CPU), a microcontroller (MCU), a digital signal processor (DSP), an application specific integrated circuit (ASIC) or the like. The processor 15 is electrically coupled to the memory 15 to access the lookup table and electrically coupled to the image sensor 13 to receive the image frames, e.g., FP2, FP, FC and FN, from the image sensor 13 for post-processing. The above operation performed by the processor 15 is implemented by software codes and/or hardware codes without particular limitations. In the present disclosure, the processor 15 adjusts the frame period (or frame rate) based on
In one embodiment, the processor 15 calculates a previous displacement according to the second previous image frame and the previous image frame, calculates a current displacement and a current speed according to the previous image frame and the current image frame, reads a frame period from the memory according to the calculated current speed, determines a speed change according to the current displacement and the previous displacement, sets a next frame period as the read frame period when the speed change is smaller than an acceleration threshold, and sets the next frame period as the read frame period multiplied by an acceleration ratio, which is smaller than 1 and calculated according to the previous displacement and the current displacement, when the speed change is larger than the acceleration threshold.
Referring to
The processor 15 controls the image sensor 13 to successively capture a second previous image frame FP2, a previous image frame FP and a current image frame FC. The processor 15 calculates a previous displacement ΔDP by comparing the second previous image frame FP2 and the previous image frame FP, e.g., calculating the correlation between the second previous image frame FP2 and the previous image frame FP, but not limited thereto. The previous displacement ΔDP includes a first direction previous displacement ΔDPX and a second direction previous displacement ΔDPY, wherein the first direction X is perpendicular to the second direction Y in the present disclosure. The previous displacement ΔDP is divided into the first direction previous displacement ΔDPX and the second direction previous displacement ΔDPY using triangulation.
In a similar way, the processor 15 calculates a current displacement ΔDC by comparing the previous image frame FP and the current image frame Fc. The current displacement ΔDC also includes a first direction current displacement ΔDCX and a second direction current displacement ΔDCY.
Furthermore, the processor 15 calculates a current speed VC using the current displacement ΔDC and a current frame period PC between the current image frame FC and the previous image frame FP. Similarly, the current speed VC includes a first direction speed and a second direction speed. The first direction speed is calculated by dividing the first direction current displacement ΔDCX by the current frame period PC, and the second direction speed is calculated by dividing the second direction current displacement ΔDCY by the current frame period PC.
Then the processor 15 reads a frame period from the memory 17 according to the calculated current speed VC. For example, the processor 15 compares the first direction speed and the second direction speed at first, and then selects the frame rate in
Finally, the processor 15 identifies whether an acceleration or de-acceleration (i.e. a negative acceleration) is detected so as to determine the next frame period PN for capturing a next image frame FN. In one embodiment, the acceleration occurs if anyone of (i) a first direction difference, which is an absolute value, between the first direction previous displacement ΔDPX and the first direction current displacement ΔDCX and (2) a second direction difference, which is an absolute value, between the second direction previous displacement ΔDPY and the second direction current displacement ΔDCY is larger than an acceleration threshold, wherein the acceleration threshold is arranged as a half pixel size, one pixel size or others depending on different applications. The first direction difference (i.e. |ΔDPX-ΔDCX|) and the second direction difference (i.e. |ΔDPY-ΔDCY|) are referred to the speed change or the acceleration between the previous frame period PP and the current frame period PC herein.
Regarding the way of comparison, the processor 15 respectively compares the first direction difference (i.e. |ΔDPX-ΔDCX|) and the second direction difference (i.e. |ΔDPY-ΔDCY|) with the acceleration threshold, or compares a larger one of the first direction difference (i.e. |ΔDPX-ΔDCX|) and the second direction difference (i.e. |ΔDPY-ΔDCY|) with the acceleration threshold to confirm whether an enough acceleration occurs. In the present disclosure, the acceleration threshold is a fixed value or adaptively changeable.
If the acceleration is not detected (i.e. both the first and second direction differences smaller than the acceleration threshold), the next frame period PN is set as the read frame period Pr, which is read from the memory 17 according to the calculated current speed VC within the current frame period PC.
If the acceleration is detected (i.e. any one the first direction difference and second direction difference larger than the acceleration threshold), the next frame period PN is set as the read frame period Pr multiplied by an acceleration ratio. The acceleration ratio is smaller than 1 and calculated according to the previous displacement ΔDP and the current displacement ΔDC. For example, when the first direction difference (i.e. |ΔDPX-ΔDCX|) is larger than the second direction difference (i.e. |ΔDPY-ΔDCY|), a larger acceleration in the first direction, the acceleration ratio is set as a smaller one of (i) the first direction current displacement ΔDCX divided by the first direction previous displacement ΔDPX, and (ii) the first direction previous displacement ΔDPX divided by the first direction current displacement ΔDCX, i.e. the one of (i) and (ii) which is smaller than 1. However, when the second direction difference (i.e. |ΔDPY-ΔDCY|) is larger than the first direction difference (i.e. |ΔDPX-ΔDcx|), a larger acceleration in the second direction, the acceleration ratio is a smaller one of (i) the second direction current displacement ΔDCY divided by the second direction previous displacement ΔDPY, and (ii) the second direction previous displacement ΔDPY divided by the second direction current displacement ΔDCY, i.e. the one of (i) and (ii) which is smaller than 1. Accordingly, the next frame period PN is shorter than the read frame period Pr to avoid the runaway happens due to the existence of the acceleration.
In this way, the processor 15 sets the next frame period PN as the read frame period Pr or being shorter than the read frame period Pr. Using the similar process, the current frame period PC is another read frame period Pr2 (i.e. determined according to a previous moving speed VP) accessed from the memory 17 or the another read frame period Pr2 multiplied by another acceleration ratio calculated within the previous frame period PP.
In some embodiments, the navigation device 10 further includes a register 19 electrically coupled to the processor 15. The register 19 stores a flag bit indicating whether the acceleration is smaller or larger than the acceleration threshold. For example, the register 19 stores a digital value 0 or 1 if the acceleration is not detected (e.g., speed change smaller than an acceleration threshold) by the processor 15, and the digital value is changed to 1 or 0 if the acceleration is detected (e.g., speed change bigger than an acceleration threshold). In other embodiments, the register 19 is included in the memory 17 or the processor 15, but not limited to that shown in
Referring to
Referring to
Step S41: The processor 15 controls the image sensor 13 to successively capture a second previous image frame FP2 and a previous image frame FP separated by a previous frame period PP, and captures the previous image frame FP and a current image frame FC separated by a current frame period PC. Meanwhile, the processor 15 controls the light source 11 to illuminate corresponding to the image capturing of the image sensor 13.
Step S42: Next, the processor 15 calculates a previous displacement ΔDP by comparing the second previous image frame FP2 and the previous image frame FP using any suitable way. The previous displacement ΔDP includes a first direction previous displacement ΔDPX and a second direction previous displacement ΔDPY. It is possible that the previous displacement ΔDP is calculated and temporarily stored, e.g., in the memory 17, before the current image frame FC is captured.
Step S43: The processor 15 calculates a current displacement ΔDC by comparing the previous image frame FP and the current image frame FC using any suitable way. The current displacement ΔDC also includes a first direction current displacement ΔDCX and a second direction current displacement ΔDCY. Meanwhile, the processor 15 calculates a current speed VC using the current displacement ΔDC and a current frame period PC. The current speed VC is possible to be divided into two elements in a first direction (e.g., X direction) and a second direction (e.g., Y direction). The calculation of the first direction speed and the second direction speed has been illustrated above, and thus details thereof are not repeated herein.
Step S44: The processor 15 reads a frame period from the memory 17 according to a larger one of the first direction speed and the second direction speed.
Step S45: The processor 15 then confirms whether an acceleration is detected according to a speed change between the current displacement ΔDC and the previous displacement ΔDP. As mentioned above, if any one of the first direction difference (i.e. |ΔDPX-ΔDCX|) and the second direction difference (i.e. |ΔDPY-ΔDCY|) is larger than an acceleration threshold, which is previously set based on pixel size, the processor 15 confirms the acceleration occurs.
Step S46: If the acceleration does not occur, e.g., by accessing the register 19, the processor 15 captures a next image frame FN after a next frame period PN which is directly set as a read frame period Pr corresponding to the calculated current speed VC (e.g., the first or second direction speed) by accessing the lookup table stored in the memory 17. The calculation of the current speed VC has been illustrated above and thus details thereof are not repeated herein.
Step S46: If the acceleration is detected, e.g., by accessing the register 19, the processor 15 sets a next frame period PN as a read frame period Pr multiplied by an acceleration ratio. As mentioned above, the processor 15 calculates the acceleration ratio using a larger speed change among the first and second directions. If the larger speed change is in the first direction, the processor 15 calculates the acceleration ratio by using a smaller one among the first direction current displacement ΔDCX and the first direction previous displacement ΔDPX to be divided by a larger one among the first direction current displacement ΔDCX and the first direction previous displacement ΔDPX. However, if the larger speed change is in the second direction, the processor 15 calculates the acceleration ratio by using a smaller one among the second direction current displacement ΔDCY and the second direction previous displacement ΔDPY to be divided by a larger one among the second direction current displacement ΔDCY and the second direction previous displacement ΔDPY.
In other embodiments, if the lookup table stored in the memory 17 includes a plurality of moving speed each corresponding to one frame rate as shown in the second and third columns in
Referring to
The steps S41-S45 in
Step S56: The processor 15 identifies whether an acceleration or de-acceleration occurs by comparing the acceleration, which is referred herein as a speed change between the previous frame period PP and the current frame period PC, with an acceleration threshold. In some embodiments, the acceleration is calculated by (|ΔDPX/PP-ΔDCX/PC|) or (|ΔDPY/PP-ΔDCY/PC|) only the acceleration threshold is arranged as a different value.
The next frame period PN is set as the frame period, which is read in the Step S44, multiplied by an acceleration ratio. More specifically, in this embodiment, the processor 15 determines the acceleration ratio according to whether the acceleration is detected or not. If the acceleration is detected, the acceleration ratio is set as 1. If the acceleration is not detected, the acceleration ratio is set as being smaller than 1 to shorten the frame period. The calculation of the acceleration ratio is identical to that illustrated in
It should be mentioned that in the above embodiments the displacement and moving speed are separated into two elements in two orthogonal directions (e.g., X direction and Y direction), but it is only intended to illustrate but not to limit the present disclosure. In other embodiments, the acceleration threshold is compared with |ΔDP-ΔDC| and the read frame period Pr is determined according to the current displacement VC instead of the sub-elements in two orthogonal directions. It is appreciated that in this case, values of the acceleration threshold and in the lookup table are set to be different from the above embodiments.
The operating method mentioned above is also applicable to a touchpad or a touch screen without being limited to optical displacement detection devices. In this case, the device employing the operating method of the present disclosure does not include a light source.
As mentioned above, as the so-called runaway or speed break often happens when an optical mouse operates in a very low speed if an image capture frame rate of the optical mouse is adjusted with the moving speed. Therefore, the present disclosure further provides a navigation device (
Although the disclosure has been explained in relation to its preferred embodiment, it is not used to limit the disclosure. It is to be understood that many other possible modifications and variations can be made by those skilled in the art without departing from the spirit and scope of the disclosure as hereinafter claimed.