Calibrating method for calibrating measured distance of a measured object measured by a distance-measuring device according to ambient temperature and related device

A calibrating method of calibrating a measured distance of a measured object measured by a distance-measuring device according to an ambient temperature includes providing a temperature sensor for measuring the ambient temperature of the distance-measuring device, calculating a calibrated imaging location of the measured object according to the ambient temperature and an imaging location of the measured object, and calibrating the measured distance according to the calibrated imaging location. In this way, when the distance-measuring device measures the measured object, the error due to the variation of the ambient temperature is avoided according to the calibrating method.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention is related to a calibrating method, and more particularly, to a calibrating method for calibrating measured distance of a measured object measured by a distance-measuring device according to ambient temperature.

2. Description of the Prior Art

A distance-measuring device emits detecting light toward a measured object, and receives reflecting light generated by the measured object reflecting the detecting light. The distance-measuring device calculates the distance between the measured object and the distance-measuring device according to variation of an imaging location of the reflecting light. However, when the distance-measuring device senses the reflecting light from the measured object, the distance-measuring device is affected by background light and a flicker phenomenon (for instance, flicker of a fluorescent lamp caused by frequency of an AC power supply) at the same time. Hence, the distance-measuring device calculates an incorrect measured distance because of the above-mentioned effect. Moreover, since the locations of the components of the distance-measuring device may shift or rotate due to assembly error during fabrication, accuracy of the measured distance obtained by the distance-measuring device is further deteriorated, causing a great inconvenience.

SUMMARY OF THE INVENTION

The present invention provides a calibrating method of calibrating a measured distance of a measured object measured by a distance-measuring device according to an ambient temperature. The distance-measuring device has a lighting component, a first lens, and an image sensor. The lighting component emits a detecting light to the measured object so as to generate a reflective light. The reflective light is focused by the first lens on the image sensor so that the measured object forms an image at a first imaging location. The distance-measuring device calculates the measured distance between the distance-measuring device and the measured object according to the first imaging location, a focal length of the first lens, and a first predetermined distance between the lighting component and the image sensor. The calibrating method comprises providing a temperature sensor for measuring the ambient temperature of the distance-measuring device, calculating a calibrated imaging location according to the ambient temperature and the imaging location, and calculating a calibrated measured distance according to the calibrated imaging location.

The present invention further provides a calibrating device of calibrating a measured distance of a measured object measured by a distance-measuring device according to an ambient temperature. The distance-measuring device has a lighting component, a first lens, and an image sensor. The lighting component emits a detecting light to the measured object to generate a reflective light. The reflective light is focused by the first lens on the image sensor so that the measured object forms an image at a first imaging location. The distance-measuring device calculates the measured distance between the distance-measuring device and the measured object according to the first imaging location, a focal length of the first lens, and a first predetermined distance between the lighting component and the image sensor. The calibrating device comprises a temperature sensor and a temperature compensation calculating circuit. The temperature sensor is utilized for measuring the ambient temperature of the distance-measuring device. The temperature compensation calculating circuit is utilized for calculating a first calibrated imaging location according to the ambient temperature and the first imaging location, and providing the first calibrated imaging location to the distance-measuring device for the distance-measuring device calculating a calibrated measured distance.

DETAILED DESCRIPTION

Please refer toFIG. 1andFIG. 2.FIG. 1andFIG. 2are diagrams illustrating the structure and the operation principle of a distance-measuring device100according to the present invention. The distance-measuring device100measures distance according to the variation of the imaging location. More particularly, the distance-measuring device100measures the measured distance DMbetween the measured object MO and the distance-measuring device100. The distance-measuring device100comprises a lighting/sensing controlling circuit110, a lighting component120, an image sensor130, a distance-calculating circuit140, a parameter-calculating circuit150, and a lens LEN1. The coupling relations between the components of the distance-measuring device100are shown inFIG. 1, and hence will not be repeated again for brevity.

The lighting/sensing controlling circuit110generates a lighting pulse signal SLD, a shutter pulse signal SST, a phase signal SP, a reading signal SRE, and a known-distance signal SD. Measuring the distance by the distance-measuring device100can be divided into two phases: 1. distance-sensing phase; 2. noise-sensing phase. During the distance-sensing phase, the lighting/sensing controlling circuit110generates the lighting pulse signal SLDrepresenting “lighting” and the shutter pulse signal SSTrepresenting “turning-on”, wherein the pulse widths of the lighting pulse signal SLDrepresenting “lighting” and the shutter pulse signal SSTrepresenting “turning-on” are both equal to TC. Then the lighting/sensing controlling circuit110generates the reading signal SRErepresenting “reading” and the phase signal SPrepresenting “sum”, wherein the pulse widths of the reading signal SRErepresenting “reading” and the phase signal SPrepresenting “sum” are both equal to TR. During the noise-sensing phase, the lighting/sensing controlling circuit110generates the shutter pulse signal SSTrepresenting “turning-on” and the lighting pulse signal SLDrepresents “not-lighting” at the time, wherein the pulse width of the shutter pulse signal SSTrepresenting “turning-on” during the noise-sensing phase is still equal to TC. Then the lighting/sensing controlling circuit110generates the reading signal representing “reading” and the phase signal SPrepresenting “noise”, wherein the pulse widths of the reading signal SRErepresenting “reading” and the phase signal SPrepresenting “noise” are still both equal to TR.

The lighting component120, according to the lighting pulse signal SLD, emits a detecting light LIDto the measured object MO, so that the measured object MO generates a reflecting light LRD. More particularly, when the lighting pulse signal SLDrepresents “lighting”, the lighting component120emits the detecting light LIDto the measured object MO; when the lighting pulse signal SLDrepresents “not-lighting”, the lighting component120does not emit the detecting light LID. In addition, the lighting component120can be a Light-Emitting Diode (LED) or a laser diode. When the lighting component120is an LED, the distance-measuring device100selectively comprises a lens LEN2for focusing the detecting light LIDemitting to the measured object MO.

The lens LEN1focuses a background light LBor the reflecting light LRDto the image sensor130. The image sensor130comprises M sensing units CS1˜CSM. In the present embodiment, the M sensing units CS1˜CSMare illustrated to be arranged side by side for example. The width of each sensing unit is equal to a pixel width WPIX. That is, the total width of the M sensing units CS1˜CSMarranged side by side is equal to (M×WPIX). The sensing units CS1˜CSMsense the energy of the light focused by the lens LEN1according to the shutter pulse signal SST. More particularly, when the shutter pulse signal SSTrepresents “turning-on”, the sensing units CS1˜CSMsense the energy of the light (for example, the background light LBor the reflecting light LRD) focused by the lens LEN1so as to generate the light-sensed signal; when the shutter pulse signal SSTrepresents “turning-off”, the sensing units CS1˜CSMdo not sense the energy of the light focused by the lens LEN1. For example, when the shutter pulse signal SSTrepresents “turning-on”, the sensing unit CS1senses the energy of the light focused by the lens LEN1so as to generate the light-sensed signal SLS1, the sensing unit CS2senses the energy of the light focused by the lens LEN1so as to generate the light-sensed signal SLS2, . . . , and the sensing unit CSMsenses the energy of the light focused by the lens LEN1so as to generate the light-sensed signal SLSM. In addition, when the reading signal SRErepresents “reading”, the sensing units CS1˜CSMoutputs the light-sensed signal SLS1˜SLSM, respectively.

The distance-calculating circuit140comprises a plurality of storing units for respectively storing the light-sensed signals SLS1˜SLSMoutputted by the sensing units CS1˜CSM. The distance-calculating circuit140sets the attributes of the received light-sensed signals according to the phase signal SP. In the present embodiment, the distance-calculating circuit140is illustrated to comprise M storing units M1˜MMfor example. When the phase signal Sp represents “sum”, the storing units M1˜MMset the attributes of the received light-sensed signals positive. That is, the received light-sensed signals SLS1˜SLSMare marked as positive light-sensed signals SLS1+˜SLSM+according to the phase signal Sp representing “sum”. When the phase signal SPrepresents “noise”, the storing units M1˜MMset the attributes of the received light-sensed signals negative. That is, the received light-sensed signals SLS1˜SLSMare marked as negative light-sensed signals SLS1−˜SLSM−according to the phase signal SPrepresenting “noise”. The distance-calculating circuit140calculates the measured distance DMaccording to the positive light-sensed signals SLS1+˜SLSM+and the negative light-sensed signals SLS1−˜SLSM−. The operation principle of the distance-calculating circuit140calculating the measured distance DMis illustrated as below.

As shown in the left part ofFIG. 2, during the distance-sensing phase, the lighting/sensing controlling circuit110generates the lighting pulse signal SLDrepresents “lighting” for the lighting component120emitting the detecting light LIDto the measured object MO, so that the measured object MO generates the reflecting light LRD. Meanwhile, the lighting/sensing controlling circuit110generates the shutter pulse signal SSTrepresenting “turning-on” for the sensing units CS1-CSMsensing the energy of the reflecting light LRDand the background light LB, so that the sensing units CS1˜CSMgenerate the light-sensed signals SLS1˜SLSMrespectively. Then the lighting/sensing controlling circuit110outputs the reading signal SRErepresenting “reading” for the image sensor130outputting the light-sensed signals SLS1˜SLSMto the distance-calculating circuit140, and the lighting/sensing controlling circuit110generates the phase signal SPrepresenting “sum” for indicating the distance-calculating circuit140that the received light-sensed signals are the light-sensed signals of the distance-sensing phase. That is, the received light-sensed signals of the distance-calculating circuit140at the time are the positive light-sensed signals SLS1+˜SLSM+. It is assumed that the reflecting light LRDis mainly focused on the sensing unit CSKduring the distance-sensing phase (as shown inFIG. 2). The values of the received positive light-sensed signals SLS1+˜SLSM+are shown in the right upper part ofFIG. 2. The sensing unit CSKsenses the background light LBand the reflecting light LRD(that is, the measured object MO images on the sensing unit CSK). Therefore, the light-sensed signal SLSK+is equal to the sum of the energy BK, which is accumulated by the sensing unit CSKsensing the background light LB, and the energy RK, which is accumulated by the sensing unit CSKsensing the reflecting light LRD. The other sensing units only receive the background light LB. For example, the light-sensed signal SLS1+is equal to the energy B1, which is accumulated by the sensing unit CS1sensing the background light LB; the light-sensed signal SLS2+is equal to the energy B2, which is accumulated by the sensing unit CS2sensing the background light LB; . . . ; the light-sensed signal SLSM+is equal to the energy BM, which is accumulated by the sensing unit CSMsensing the background light LB.

As shown in the left part ofFIG. 2, during the noise-sensing phase, the lighting/sensing controlling circuit110generates the shutter pulse signal SSTrepresenting “turning-on” for the sensing units CS1˜CSMsensing the energy of the light focused by the lens LEN1so as to generate the light-sensed signals SLS1˜SLSM. Meanwhile, the lighting/sensing controlling circuit110generates the lighting pulse signal SLDrepresents “not-lighting”. Hence, the lighting component120does not emit the detecting light LIDto the measured object MO, so that the measured object MO does not generate the reflecting light LRD. Then the lighting/sensing controlling circuit110outputs the reading signal SRErepresenting “reading” for the image sensor130outputting the light-sensed signals SLS1˜SLSMto the distance-calculating circuit140, and the lighting/sensing controlling circuit110generates the phase signal SPrepresenting “noise” for indicating the distance-calculating circuit140that the received light-sensed signals are the light-sensed signals of the noise-sensing phase at the time. That is, the received light-sensed signals of the distance-calculating circuit140are the negative light-sensed signals SLS1−˜SLSM−. The values of the received positive light-sensed signals SLS1−˜SLSM−are shown in the right lower part ofFIG. 2. The pulse width of shutter pulse signal SSTduring the distance-sensing phase is equal to the pulse width of shutter pulse signal SSTduring the noise-sensing phase (both are equal to TC). Therefore, the parts, which corresponds to the background light LB, of the light-sensed signals SLS1˜SLSMof the distance-sensing phase are equal to the parts, which corresponds to the background light LB, of the light-sensed signals SLS1˜SLSMof the noise-sensing phase. In other words, the parts contributed by the background light LBof the positive light-sensed signals SLS1+˜SLSM+are equal to the parts contributed by the background light LBof the negative light-sensed signals SLS1−˜SLSM−(both are equal to B1˜BM).

After the distance-sensing phase and the noise-sensing phase, the lighting/sensing controlling circuit110generates the phase signal SPrepresenting “distance-calculating”. Meanwhile, the distance-calculating circuit140deducts the negative light-sensed signals SLS1−˜SLSM−stored in the storing units from the positive light-sensed signals SLS1+˜SLSM+stored in the storing units. The distance-calculating circuit140finds out the storing units having the maximum stored value after the deduction and accordingly determines the imaging location of the reflecting light LRDon the image sensor130. More particularly, the values of the storing units M1˜MMof the distance-calculating circuit140are respectively equal to the values of the negative light-sensed signals SLS1−˜SLSM−deducting from the positive light-sensed signals SLS1+˜SLSM+. For instance, the storing unit M1stores the value of the negative light-sensed signal SLS1−deducting from the positive light-sensed signal SLS1+. Since the positive light-sensed signal SLS1+and the negative light-sensed signal SLS1−are both equal to B1, the stored value of the storing unit M1after the deduction is equal to zero. The storing unit M2stores the value of the negative light-sensed signal SLS2−deducting from the positive light-sensed signal SLS2+. Since the positive light-sensed signal SLS2+and the negative light-sensed signal SLS2−are both equal to B2, the stored value of the storing unit M2after the deduction is equal to zero. Similarly, the storing unit MKstores the value of the negative light-sensed signal SLSK−deducting from the positive light-sensed signal SLSK+. Since the positive light-sensed signal SLSK−is equal to (RK+BK) and the negative light-sensed signal SLSK−is equal to BK, the stored value of the storing unit MKafter the deduction is equal to RK. The storing unit MMstores the value of the negative light-sensed signal SLSM−deducting from the positive light-sensed signal SLSM+. Since the positive light-sensed signal SLSM+and the negative light-sensed signal SLSM−are both equal to BM, the stored value of the storing unit MMafter the deduction is equal to zero. In other words, among the storing units M1˜MM, the stored value of the storing unit MKis equal to RK, and the stored value of the other sensing units are all equal to zero. Consequently, the distance-calculating circuit140determines the positive light-sensed signal stored in the storing unit MKhas the energy corresponding to the reflecting light LRD. Since the storing unit MKstores the light-sensed signal generated by the sensing unit CSK, the distance-calculating circuit140determines the reflecting light LRDgenerated by the measured object MO is mainly focused on the sensing unit CSK. In this way, the distance-calculating circuit140calculates the imaging location DCSof the reflecting light LRDofFIG. 1according to the sensing unit CSKand the following formula:
DCS=K×WPIX(1);

In addition, since, inFIG. 1, the straight light LFformed between the focus point OF1of the lens LEN1and the sensing unit CS1is parallel to the detecting light LID, the included angle θ1between the detecting light LIDand the reflecting light LRDis equal to the included angle θ2between the straight line LFand the reflecting light LRD. In other words, the relation between tan θ1and tan θ2is represented as the following formula:
tan θ1=L/DM=tan θ2=DCS/DF(2);
wherein L represents the predetermined distance between the lighting component120and the image sensor130(or between the detecting light LIDand the reflecting light LRD); DCSrepresents the imaging location of the reflecting light LRD; DFrepresent the focus length of the lens LEN1. The measured distance DMis represented as the following formula according to the formula (2):
DM=(DF×L)/DCS(3);
as a result, the distance-calculating circuit140calculates the imaging location DCSaccording to the formula (1), and then calculates the measured distance DMaccording to the predetermined distance L, the focus length DF, and the formula (3).

In conclusion, in the distance-measuring device100, during the distance-sensing phase, the lighting/sensing controlling circuit110controls the lighting component120to emit the detecting light LIDto the measured object MO. The storing units M1˜MMstore the positive light-sensed signals SLS1+˜SLSM+generated by the sensing unit CS1˜CSMsensing the light (for instance, the reflecting light LRDand the background light LB) focused by the lens LEN1. During the noise-sensing phase, the lighting/sensing controlling circuit110controls the lighting component120not to emit the detecting light LIDto the measured object MO. The storing units M1˜MMstore the negative light-sensed signals SLS1−˜SLSM−generated by the sensing unit CS1˜CSMsensing the light (for instance, the background light LB) focused by the lens LEN1. Then the stored values of the storing units M1˜MMare equal to the values of the negative light-sensed signals SLS1−˜SLSM−deducting from the positive light-sensed signals SLS1+˜SLSM+. Thus, the stored value of the storing unit MK, corresponding to the sensing unit CSKwhere the reflecting light LRDis focused, is larger than the other storing units. In this way, the distance-calculating circuit140determines the reflecting light LRDis focused to the sensing unit CSK, and accordingly calculates the imaging location DCSof the reflecting light LRD. Therefore, the distance-calculating circuit140can calculate the measured distance DMaccording to the imaging location DCS, the focus length DFof the lens LEN1, and the predetermined distance L.

Furthermore, in the distance-measuring device100, the distance-sensing phase and the noise-sensing phase can repeat over and over (for example, Y times), so that the storing units M1˜MMstore the positive light-sensed signals corresponding to the Y distance-sensing phases, and store the negative light-sensed signals corresponding to the Y noise-sensing phases. The parts of the positive light-sensed signals, which corresponds to the background light LBduring each distance-sensing phase, are counteracted by the parts of the negative light-sensed signals, which corresponds to the background light LBduring each noise-sensing phase. Hence, besides the value of the storing unit MK, corresponding to the sensing unit CSKwhere the reflecting light LRDis focused, is equal to (Y×RK), the values of the other storing units are all equal to zero. In this way, even the reflecting light LRDis so weak that the energy RKsensed by the sensing unit CSKis very small, the distance-measuring device100still can enlarge the difference between the value of the storing unit MKand the values of the other storing units by repeating the distance-sensing phase and the noise-sensing phase for several times (that is, Y is enlarged). In this way, in spite of the weak reflecting light LRD, the distance-calculating circuit140still can correctly determine the storing unit MKhaving the maximum value, and accordingly calculates the imaging location of the reflecting light LRD.

Please refer toFIG. 3.FIG. 3is a diagram illustrating the operation principle of the distance-measuring device100reducing the flicker phenomenon. Since the power of the general indoor light sources are from the AC power supply, a part of the background light LB(which is referred as the flicking light LFhereinafter) flicks because of the frequency of the AC power supply. For example, the power of the indoor fluorescent lamp is from the AC power supply. Therefore, the light emitted by the fluorescent lamp is affected by the frequency of the AC power supply, so that the flicker phenomenon is generated. InFIG. 3, it is assumed that the cycle of the AC power supply (or the AC cycle) is TF(for example, the frequency of the AC power supply is 60 Hz, and the AC cycle is 0.0167 s). The power P of the AC power supply varies with time. Hence, the power of the flicking light LFvaries as well. However, the varying cycle of the power P of the AC power supply is equal to a half of the AC cycle (that is, TF/2). For example, when the time is T, the power P of the AC power supply is equal to PT; when the time is (T+TF/2), the power P of the AC power supply is still equal to PT. Since the power of the flicking light is proportional to the power P of the AC power supply, the varying cycle of the power of the flicking light LFis equal to a half of the AC cycle (that is, TF/2) as well. In this way, in the distance-measuring device100, the lighting/sensing controlling circuit110controls the time interval between the distance-sensing phases (for example, T1+and T2+shown inFIG. 3) and the noise-sensing phases (for example, T1−and T2−shown inFIG. 3) equal to a half of the AC cycle TF/2 for reducing the effect of the flicker phenomenon. More particularly, the lighting/sensing controlling circuit110controls the sensing units CS1˜CSMsensing the flicking light LFcorresponding to the power P1(or P2) of the AC power supply during the distance-sensing phase T1+(or T2+), so that the parts of the positive light-sensed signals, which correspond to the flicking light LF, are equal to F11˜FM1(or F12˜FM2). The lighting/sensing controlling circuit110controls the time interval between the distance-sensing phase T1+(or T2+) and the noise-sensing phase T1−(or T2−) equal to a half of the AC cycle TF/2 (for example, 0.0083 s). As a result, the power of the flicking light LFsensed by the sensing units CS1˜CSMduring the noise-sensing phase T1−(or T2−) is equal to the power of the flicking light LFsensed by the sensing units CS1˜CSMduring the distance-sensing phase T1+(or T2+). In this way, the parts, corresponding to the flicking light LF, of the negative light-sensed signals generated by the sensing units CS1˜CSMduring the noise-sensing phase T1−(or T2−) are equal to F11˜FM1(or F12˜FM2) as well. Consequently, the parts, corresponding to the flicking light LF, of the positive light-sensed signals of the distance-sensing phase T1+(or T2+) are counteracted by the parts, corresponding to the flicking light LF, of the negative light-sensed of the noise-sensing phase T1−(or T2−) signals. In other words, besides the value of the storing unit MK, which corresponds to the sensing unit CSKwhere the reflecting light LRDis focused, is equal to RK, the values of the other storing units are all equal to zero. Hence, even the sensing units CS1˜CSMsense the flicking light LF, the lighting/sensing controlling circuit110still can reduce the effect of the flicker phenomenon by controlling the time interval between the distance-sensing phase and the noise-sensing phase equal to a half of the AC cycle (TF/2), so that the distance-calculating circuit140correctly determines the imaging location DCSof the reflecting light LRDand accordingly calculates the measured distance DM.

Since, when the distance-measuring device100is assembled during the fabrication, the locations of the components of the distance-measuring device100are affected by the assembly error, the distance-measuring device100is affected by the assembly error when the distance-measuring device100measures distance. In the present invention, the parameter-calculating circuit150of the distance-measuring device100is utilized for calibrating the assembly error of the distance-measuring device100. The operation principle of the parameter-calculating circuit150is illustrated as below.

The parameter-calculating circuit150receives the known-distance signal SDfor obtaining a known distance DC1and a known distance DC2, wherein the known distance DC1is the distance between a calibrating object CO1and the distance-measuring device100, and the known distance DC2is the distance between a calibrating object CO2and the distance-measuring device100. By means of the method illustrated inFIG. 2, the lighting component120is controlled to emit the detecting light LIDto the calibrating objects CO1and CO2, so that the parameter-calculating circuit150can obtain the imaging location of the reflecting light LRDaccording to the light-sensed signals outputted by the images sensor130and accordingly calibrates the assembly error of the distance-measuring device100.

First, it is assumed that the detecting light LIDemitted by the lighting component120rotates a lighting-error angle θLDbecause of the assembly error.

Please refer toFIG. 4.FIG. 4is a diagram illustrating a calibrating method of calibrating the lighting-error angle θLDof the detecting light LIDemitted by the lighting-component120. The lighting/sensing controlling circuit110controls the lighting component120to emit the detecting light LIDto the calibrating object CO1. The distance between the calibrating object CO1and the distance-measuring device100is the known distance DC1. Since the detecting light LIDis affected by the assembly error of the lighting component120, the detecting light LIDemits to the calibrating object CO1with a lighting-error angle θLD, and the reflecting light LRDgenerated by the calibrating object CO1reflecting the detecting light LIDis focused to the sensing unit CS1. The included angle between the detecting light LIDand the reflecting light LRDis θ1I. The included angle between the straight line LFand the reflecting light LRDis θ2I. As shown inFIG. 4, since the straight light LFis parallel to the surface normal of the calibrating object CO1, (θ1I-θLD) is equal to θ2I. That is, tan θ1I-θLD) is equal to tan θ2I. Therefore, the following formulas are obtained:
DC1=1/[1/(DF×L)×DCSI+B](4);
B=tan θLD/L(5);
wherein B represents the calibrating parameter for calibrating the lighting-error angle θLD; DCSIrepresents the imaging location of the reflecting light LRD. Thus, the parameter-calculating circuit150calculates the calibrating parameter B according to the formula (4). In this way, the parameter-calculating circuit150outputs the calibrating parameter B to the distance-calculating circuit140through the parameter signal SAB, so that the distance-calculating circuit140calibrates the formula (2) to be the following formula for calculating the calibrated measured distance DM:
DM=1/[1/(DF×L)×DCS+B](6);
as a result, even the detecting light LIDemitted by the lighting component120rotates a lighting-error angle θLDbecause of the assembling-error, the distance-calculating circuit140still can correctly calculate the measured distance DM, according to the calibrating parameter B, the focus length of the lens LEN1, the predetermined distance L, and the imaging location DCSof the reflecting light LRDwhen the measured object MO is measured, by means of the parameter-calculating circuit150calculating the calibrating parameter B capable of calibrating the lighting-error angle θLD.

Please refer toFIG. 5andFIG. 6.FIG. 5andFIG. 6are diagrams illustrating a calibrating method of calibrating sensing-error angles θCS1and θCS2rotated by the image sensor130because of the assembly error.FIG. 5is a top view diagram of the distance-measuring device100. As shown inFIG. 5, the sensing-error angle θCS1is on the XY plane.FIG. 6is a side view diagram of the distance-measuring device100. In addition, the sensing-error angles θCS1and θCS2are both shown inFIG. 6. The lighting/sensing controlling circuit110controls the lighting component120to emit the detecting light LIDto the calibrating object CO2. The distance between the calibrating object CO2and the distance-measuring device100is the known distance DC2. InFIG. 5andFIG. 6, it is assumed that the lighting component120is assembled correctly (that is, the lighting-error angle θLDis zero). The detecting light LIDemits to the calibrating object CO2, and the reflecting light LRDgenerated by the calibrating object CO2reflecting the detecting light LIDis focused to the sensing unit CSJ. The included angle between the detecting light LIDand the reflecting light LRDis θ1J. The included angle between the straight line LFand the reflecting light LRDis θ2J. It can be seen inFIG. 6that DCSXis a projected distance projected by the imaging location DCSJof the reflecting light LRD, and the relation between the imaging location DCSJand the projected distance DCSXis represented as the following formula:
DCSX=DCSJ×cos θCS2×cos θCS1(6).

InFIG. 5, the straight line L is parallel to the detecting light LID. Consequently, the included angle θ2Jbetween the straight line LFand the reflecting light LRDis equal to the included angle θ1Jbetween the detecting light LIDand the reflecting light LRD. That is, tan θ1Jis equal to tan θ2J. In this way, the relation between the known distance DC2and the projected distance DCSXis represented as the following formula:
L/DC2=DCSX/DF(7);
hence, the following formulas are obtained according to the formulas (6) and (7):
DC2=1/(A×DCSJ)  (8);
A=(cos θCS2×cos θCS1)/(DF×L)  (9);
wherein A represents the calibrating parameter for calibrating the sensing-error angles θCS2and θCS1. Thus, the parameter-calculating circuit150calculates the calibrating parameter A according to the formula (8). In this way, the parameter-calculating circuit150outputs the calibrating parameter A to the distance-calculating circuit140through the parameter signal SAB, so that the distance-calculating circuit140calibrates the formula (2) to be the following formula for calculating the calculated measured distance DM:
DM=1/(A×DCS1)  (10);
it can be seen that even the image sensor130rotates the sensing-error angles θCS1and θCS2because of the assembly error, the distance-calculating circuit140still can correctly calculate the measured distance DM, according to the calibrating parameter A, and the imaging location DCSof the reflecting light LRDwhen the measured object MO is measured, by means of the parameter-calculating circuit150calculating out the calibrating parameter A capable of calibrating the sensing-error angles θCS1and θCS2.

It is assumed that the detecting light LIDemitted by the lighting component120rotates the lighting-error angle θLD, and the image sensor130also rotates the sensing-error angles θCS1and θCS2, because of the assembly error of the distance-measuring device100. The distance-measuring device100can obtain the imaging location DCS1of the reflecting light LRDcorresponding to the calibrating object CO1and the imaging location DCS2of the reflecting light LRDcorresponding to the calibrating object CO2by the lighting component120emitting the detecting light LIDto the calibrating objects CO1and CO2, according to the illustration ofFIG. 4,FIG. 5, andFIG. 6. The relations among the imaging locations DCS1and DCS2, the known distance DC1between the distance-measuring device100and the calibrating object CO1, the known distance DC2between the distance-measuring device100and the calibrating object CO2, and the calibrating parameters A and B are represented as the following formulas:
DC1=1/[A×DCS1+B](11);
DC2=1/[A×DCS2+B](12);
the parameter-calculating circuit150calculates the calibrating parameter A capable of calibrating the sensing-error angles θCS1and θCS2, and the calibrating parameter B capable of calibrating the lighting-error angles θLD, according to the formulas (11) and (12). The parameter-calculating circuit150outputs the calibrating parameters A and B to the distance-calculating circuit140through the parameter signal SAB, so that the distance-calculating circuit140calibrates the formula (2) to be the following formula for calculating the calculated measured distance DM:
DM=1/[A×DCS1+B](13);
in this way, even the detecting light LIDemitted by the lighting component120rotates the lighting-error angle θLD, and the image sensor130rotates the sensing-error angles θCS1and θCS2at the same time, the distance-calculating circuit140still can correctly calculate the measured distance DMby the parameter-calculating circuit150calculating out the calibrating parameter A, which is capable of calibrating the sensing-error angles θCS1and θCS2, and the calibrating parameter B, which is capable of calibrating the lighting-error angle θLD.

In addition, according to the formula (13), when the distance-calculating circuit140calculates the measured distance DM, only the calibrating parameters A and B, and the imaging location DCSof the reflecting light LRDwhen the measured object MO is measured are required. The focus length DFof the lens LEN1and predetermined distance L do not have to be known. In other words, even the focus length DFof the lens LEN1and predetermined distance L are affected because of the assembly error during the fabrication, the distance-calculating circuit140still can correctly calculates the measured distance DMaccording to the formula (13).

Please refer toFIG. 7.FIG. 7is a diagram illustrating the structure of an image sensor700according to a first embodiment of the present invention. As shown inFIG. 7, the M sensing units of the image sensor700are arranged in N columns and K rows. In the image sensor700, the horizontal locations (that is, the location in the horizontal direction or in the direction of the X-axis shown inFIG. 7) of the sensing units of the same column are the same. Moreover, it is assumed that the widths of the sensing units CS11˜CSNKare all equal to WPIXand the horizontal location of the left side of the sensing unit CS11is represented by zero. If the horizontal location of the sensing units of one column is represented by the center of the column, then the horizontal location of the sensing units CS11˜CS1Kof the 1stcolumn is represented as 1/2×WPIX; the horizontal location of the sensing units CS21˜CS2Kof the 2ndcolumn is represented as 3/2×WPIX; the horizontal location of the sensing units CSN1˜CSNKof the Nthcolumn is represented as [(2×N−1)×WPIX]/2, and so on. Therefore, in the image sensor700, the horizontal locations of the sensing units of each row can be represented as {1/2×WPIX, 3/2×WPIX, . . . [(2×N−1)×WPIX]/2}, according to the above-mentioned illustration.

Please refer toFIG. 8.FIG. 8is a diagram illustrating the operation principle of detecting the imaging location DCSof the reflecting light LRDby the image sensor700. The circle shown in the upper part ofFIG. 8represents the imaging location DCSof the reflecting light LRDon the image sensor700. That is, the sensing units inside the circle sense the energy of the reflecting light LRDso as to generate the light-sensed signals SLShaving the larger values than the other sensing units. For obtaining the imaging location DCSof the reflecting light DCS, the light-sensed signals SLDgenerated by sensing units of each column are respectively summed for obtaining the accumulated light-sensed signals SALSfor each column. For example, the accumulated light-sensed signal generated by summing the light-sensed signals of the sensing units CS11˜CS1Kof the 1stcolumn is SALS1; the accumulated light-sensed signal generated by summing the light-sensed signals of the sensing units CS21˜CS2Kof the 2ndcolumn is SALS2; the accumulated light-sensed signal generated by summing the light-sensed signals of the sensing units CSN1˜CSNKis of the Nthcolumn SALSN, and so on. Since the sensing units sensing the reflecting light LRDgenerate the light-sensed signals having the larger values, the sensing units near the imaging location DCSof the reflecting light LRD(that is, inside the circle) all generate the light-sensed signals having the larger values. In other words, among the accumulated light-sensed signals SALS1˜SALSN, if the accumulated light-sensed signal SALSF, which corresponds to the sensing units CSF1˜CSFKof the Fthcolumn, has the maximum value, it represents that the imaging location DCSof the reflecting light LRD(that is, the center of the circle) is at the Fthcolumn. In this way, the horizontal direction of the Fthcolumn is utilized for representing the imaging location DCSof the reflecting light LRD. For instance, as shown inFIG. 8, the accumulated light-sensed signal SALS5corresponding to the sensing units CS51˜CS5Kof 5thcolumn has the maximum value. Therefore, the imaging location DCSof the reflecting light LRD(that is, the center of the circle) is determined at the 5thcolumn. In this way, the horizontal location of the 5thcolumn (9/2×WPIX) can represent the imaging location DCSof the reflecting light LRD.

Please refer toFIG. 9.FIG. 9is a diagram illustrating the structure of an image sensor900according to another embodiment of the present invention. As shown inFIG. 9, the M sensing units of the image sensor900are arranged in N columns and K rows. Comparing with the image sensor700, in the image sensor900, the horizontal locations of each sensing unit of one row is shifted by a shifting distance DSF, which is assumed to be WPIX/2 inFIG. 9. For example, the horizontal locations of the sensing units CS11˜CSN1of the 1strow can be represented as {1/2×WPIX, 3/2×WPIX, . . . , [(2×N+1)×WPIX]/2}; the horizontal locations of the sensing units CS12˜CSN2of the 2ndrow can be represented as {WPIX, 2×WPIX, . . . , [2×N×WPIX]/2}; the horizontal locations of the sensing units CS1K˜CSNKof the Kthrow can be represented as {[1/2+(K−1)/2]×WPIX, [3/2+(K−1)/2]×WPIX, . . . , [(2×N−1)/2+(K−1)/2]×WPIX}, and so on.

Please refer toFIG. 10.FIG. 10is a diagram illustrating the operation principle of detecting the imaging location DCSof the reflecting light LRDby the μimage sensor900. The circle shown in the upper part ofFIG. 9represents the imaging location of the reflecting light LRDon the image sensor900. The accumulated light-sensed signals generated according to the light-sensed signals of the sensing units CS11˜CSNKof the image sensor900are SASL1˜SALSN. The sensing range corresponding to the accumulated light-sensed signals SALS1is the horizontal locations 0˜WPIX/2. Since among the sensing units CS11˜CSNK, only the sensing range of the sensing unit CS11has a part in the sensing range corresponding to the accumulated light-sensed signals SALS1, the accumulated light-sensed signal SALS1is equal to the value of the light-sensed signal generated by the sensing unit CS11. The sensing range corresponding to the accumulated light-sensed signals SALS2is WPIX/2˜WPIX. Since among the sensing units CS11˜CSNK, the sensing range of the sensing unit CS11and the sensing range of the sensing unit CS21both have a part in the sensing range corresponding to the accumulated light-sensed signals SALS2, the accumulated light-sensed signal SALS1is obtained by summing the light-sensed signals generated by the sensing unit CS11and CS21. The other accumulated light-sensed signals can be obtained in similar way. Among the accumulated light-sensed signals SALS1˜SALS2N, if the accumulated light-sensed signal SALSFhas the maximum value, it represents that the imaging location of the reflecting light LRD(that is, the center of the circle) is at the sensing units CSF1˜CSFKof the Fthcolumn. For instance, as shown inFIG. 10, the accumulated light-sensed signal SALS10has the maximum value. Thus, the imaging location of the reflecting light LRD(that is, the center of the circle) is determined to be at the horizontal location of the accumulated light-sensed signal SALS10. Since the sensing range corresponding to the accumulated light-sensed signal SALS10is 9/2×WPIX˜5×WPIX. Consequently, the horizontal location of the accumulated light-sensed signal SALS10is represented as 19/4×WPIX. In this way, the horizontal location 19/4×WPIXrepresents the imaging location DCSof the reflecting light LRD.

Comparing with the image sensor700, the image sensor900has a higher resolution. For example, when the image location DCSof the reflecting light LRDis detected by the image sensor700, if the horizontal location of the image location DCSof the reflecting light LRD(the center of the circle) is actually (17/4)×WPIX, the accumulated light-sensed signal SALS5has the maximum value. Therefore, the image location DCSof the reflecting light LRDis represented by the horizontal location 9/2×WPIXof the 5thcolumn. However, if the horizontal location of the image location DCSof the reflecting light LRD(the center of the circle) changes to (19/4)×WPIX, the accumulated light-sensed signal SALS5still has the maximum value. That is, although the actual horizontal location of the imaging location DCSof the reflecting light LRDhas already changed from (17/4)×WPIXto (19/4)×WPIX, the imaging location DCSof the reflecting light LRDis still represented as 9/2×WPIX(the horizontal location of the 5thcolumn) by means of the image sensor700. However, when the image location DCSof the reflecting light LRDis detected by the image sensor900, if the horizontal location of the image location DCSof the reflecting light LRD(the center of the circle) is actually (17/4)×WPIX, the accumulated light-sensed signal SALS9has the maximum value. Therefore, the image location DCSof the reflecting light LRDis represented by the horizontal location 17/4×WPIXof the 9thcolumn. If the horizontal location of the image location DCSof the reflecting light LRD(the center of the circle) changes to (19/4)×WPIX, the accumulated light-sensed signal SALS10has the maximum value. As a result, the image location DCSof the reflecting light LRDis represented by the horizontal location 19/4×WPIXof the 10thcolumn. Consequently, the imaging location DCSof the reflecting light LRDare more accurately detected by the image sensor900. In conclusion, by shifting the horizontal locations of each sensing unit of the same column, the image sensor900has the higher resolution than the image sensor700.

However, in the image sensor900, the shifting distances between the adjacent rows of the sensing units do not have to be the same. For example, the shifting distance between the 1stand the 2ndrows of the sensing units is WPIX/2; the shifting distance between the 2ndand the 3rdrows of the sensing units is WPIX/4. By such organization, the imaging location DCSof the reflecting light LRDstill can be detected by the method illustrated inFIG. 10.

Please refer toFIG. 11.FIG. 11is a diagram illustrating the structure of an image sensor1100according to another embodiment of the present invention. As shown inFIG. 11, the M sensing units of the image sensor1100are arranged in N columns and Q rows. Comparing the image sensor1100with the image sensor700, it can be understood that each sensing unit in the image sensor700is a square. However, each sensing unit in the image sensor1100is a rectangle. For instance, both the width and the height of each sensing unit of image sensor700are equal to WPIX, but, the width of each sensing unit of image sensor1100is WPIXand the height of each sensing unit of image sensor1100is (WPIX×K/Q), wherein Q<K. That is, the long side of each sensing unit of image sensor1100is in the vertical direction, and the short side of each sensing unit of image sensor1100is in the horizontal direction (the X-axis direction). In other words, each sensing unit of image sensor1100has the same width as the each sensing unit of image sensor700. Although the number Q is smaller than the number K, the total area of the sensing units of one column of the image sensor1100is still equal to the total area of the sensing units of one column of the image sensor700. Similar to the image sensor700, the image sensor1100also provides M light-sensed signals generated by the M sensing units to the distance-calculating circuit140, so that the distance-calculating circuit140calculates the accumulated light-sensed signals SALS1˜SALSN. For example, the accumulated light-sensed signal generated by summing the light-sensed signals of the sensing units CS11˜CS1Qof the 1stcolumn is SALS1; the accumulated light-sensed signal generated by summing the light-sensed signals of the sensing units CS21˜CS2Qof the 2ndcolumn is SALS2; the accumulated light-sensed signal generated by summing the light-sensed signals of the sensing units CSN1˜CSNQof the Nthcolumn is SALSN, and so on. In this way, the distance-calculating circuit140obtains the imaging location DCSof the reflecting light LRDaccording to the accumulated light-sensed signals SALS1˜SALSNby the method illustrated inFIG. 8, and accordingly calculates the measured distance DM.

Comparing with the image sensor700, it can be seen that in the image sensor1100, the side of each sensing unit in the vertical direction is longer, so that the number of sensing units of one column is reduced (that is Q<K). Therefore, the number of the accumulating times which the distance-calculating circuit140generates the accumulated light-sensed signals SALS1˜SALSN, is reduced as well. Since the total area of the sensing units of one column of the image sensor1100is the same as the total area of the sensing units of one column of the image sensor700, the received energy of the sensing units of each column sensing the light focused by the lens LEN1remains unchanged. In other words, when the imaging location DCSof the reflecting light LRDis measured by means of the image sensor1100, the computation of the distance-calculating circuit140generating the accumulated light-sensed signals SALS1˜SALSNis reduced, and the noise-to-signal ratios of the accumulated light-sensed signals SALS1˜SALSNare maintained at the same time. In addition, the short side of the sensing units of each column of the image sensor1100is in the horizontal direction and the width of each column sensing units is WPIX. In other words, when the imaging location DCSof the reflecting light LRDis measured, the image sensor1100has the same resolution as the image sensor700. Thus, comparing with the image sensor700, it can be seen that the image sensor1100reduces the computation of the distance-calculating circuit140generating the accumulated light-sensed signals SALS1˜SALSNand maintains the resolution of the imaging location DCSin the horizontal direction (that is, the direction of the short side) and the signal-to-noise ratios of the accumulated light-sensed signals as well.

In conclusion, the distance-measuring device provided by the present invention reduces the effect of the background light and the flicker phenomenon by means of removing the parts corresponding to the background light and the flicking light from the light-sensed signals generated by the image sensor. In the image sensor of the present invention, the resolution is improved by shifting the sensing units of adjacent rows. In addition, the present invention further provides a calibrating method of the distance-measuring device. The first imaging location corresponding to the first calibrating object and the second imaging location corresponding to the second calibrating object are respectively obtained by means of the lighting component emits the detecting light to the first calibrating object with the first known distance and to the second calibrating object with the second known distance. The calibrating parameters capable of calibrating the assembly error of the distance-measuring device are calculated out according to the first and the second imaging location, and the first and the second known distance. In this way, the distance-measuring device correctly calculates the measured distance by means of the calibrating parameters, providing a great convenience.

In addition, when the ambient temperature of the distance-measuring device changes, the change of the distances between the internal components of the distance-measuring device and the deformation of the internal components are induced. For instance, the lens of the distance-measuring device is expanded so that the surface curvature and the refractive index of the lens change. In this way, the imaging location of the reflecting light focused by the lens onto the image sensor changes. In other words, the change of the ambient temperature induces the change of the imaging location of the reflecting light. Therefore, when the ambient temperature changes, the measured distance calculated by the distance-measuring device has an error. Consequently, the present invention provides a calibrating method of calibrating the measured distance of the measured object measured by the distance-measuring device according to the ambient temperature. The operational principle of the calibrating method is illustrated in the following description.

Please refer toFIG. 12.FIG. 12is a diagram illustrating a calibrating method1200of calibrating a measured distance DMof a measured object MO measured by a distance-measuring device DMD according to an ambient temperature TEMPAMB. The distance-measuring device DMD includes a lighting component LD, a lens LEN1, and an image sensor CS. The distance between the lighting component LD and the image sensor CS is a predetermined distance L1. The lighting component LD emits a detecting light LIDto the measured object MO so as to generate a reflecting light LRD. The reflecting light LRDis focused by the lens LEN1onto the image sensor CS so as to form an image at the imaging location DCS1. The distance-measuring device DMD calculates the measured distance DMbetween the distance-measuring device DMD and the measured object MO according to the imaging location DCS1, the focal length DFof the lens LEN1, and the predetermined distance L1. The steps of the calibrating method1200of the present invention are illustrated as below:step1210: providing a temperature sensor TS for measuring the ambient temperature TEMPAMBof the distance-measuring device DMD;step1220: calculating a calibrated imaging location DCS—CABaccording to the ambient temperature TEMPAMBand the imaging location DCS1;step1230: calculating a calibrated measured distance DMaccording to the calibrated imaging location DCS—CAB.

When the ambient temperature TEMPAMBchanges, the change of the imaging location DCS1is mainly caused by the deformation of the lens LEN1. Thus, the step1210of the calibrating method1200is mainly utilized for detecting the temperature variation of the environment of the lens LEN1. For example, the temperature sensor TS is disposed near the lens LEN1. In this way, when the distance-measuring device DMD measures the measured distance DM, the temperature sensor TS measures the temperature of the lens LEN1so as to obtain the ambient temperature TEMPAMB. In addition, the temperature sensor TS can also be disposed near the image sensor CS. The temperature sensor TS measures an operating temperature variation ΔTEMPICof the image sensor CS first. More particularly, as shown inFIG. 13, when the image sensor CS receives power to enter the operating mode, the temperature sensor TS measures the present temperature of the image sensor CS to obtain a start-up temperature TEMPSTART1. The image sensor CS emits heat during operation so that the temperature of the image sensor CS increases as time goes by. However, as shown inFIG. 13, a delay period TSTEADYafter the image sensor CS enters the operating mode, the temperature of the image sensor CS stops increasing and approximately maintains a constant value. Meanwhile, the temperature sensor TS measures the present temperature of the image sensor CS to obtain a steady temperature TEMPSTEADY1. As a result, the operating temperature variation ΔTEMPIC1due to the image sensor CS emitting heat during the operation can be calculated according to the start-up temperature TEMPSTART1and the steady temperature TEMPSTEADY1. More precisely, the operating temperature variation ΔTEMPIC1due to the image sensor CS emitting heat during the operation can be calculated by subtracting the start-up temperature TEMPSTART1from the steady temperature TEMPSTEADY1. When distance-measuring device DMD measures the measured distance DM, the temperature sensor TS measures the temperature of the image sensor CS to obtain a chip operation temperature TEMPDETECT. Since the temperature of the image sensor CS is equal to the sum of the ambient temperature TEMPAMBand the operating temperature variation ΔTEMPIC1, the ambient temperature TEMPAMBcan be obtained by subtracting the operating temperature variation ΔTEMPIC1from the chip operation temperature TEMPDETECT. In addition, as shown inFIG. 14, if the image sensor CS enters a power-saving mode, a delay period TSTEADYafter the image sensor CS enters the operating mode from the power-saving mode, the temperature of the image sensor CS is measured to obtain a new steady temperature TEMPSTEADY2. Hence, the present operating temperature variation ΔTEMPIC2due to the image sensor CS emitting heat during operation can be calculated according to the steady temperature TEMPSTEADY2and the start-up temperature TEMPSTART1. In this way, even if the image sensor CS has entered the power-saving mode, the temperature sensor TS can still correctly measure operating temperature variation ΔTEMPIC2. Therefore, when the distance-measuring device DMD measures the measured distance DM, the temperature sensor TS can correctly measure the ambient temperature TEMPAMBaccording to the chip operation temperature TEMPDETECTand the operating temperature variation ΔTEMPIC2. To sum up, in the step1210, in addition to disposing the temperature sensor TS near the lens LEN1to directly measure the temperature of the lens LEN1, the temperature sensor TS can also be disposed near the image sensor CS to measure the ambient temperature TEMPAMBby measuring the operating temperature variation ΔTEMPICof the image sensor CS. In addition, when the temperature sensor TS is disposed near the image sensor CS, the temperature sensor TS can be further integrated with the image sensor CS into a chip, saving the cost of the distance-measuring device DMD.

In the step1220, during a calibrating phase PHCAB, the distance-measuring device DMD measures a calibrating object CO3with a predetermined distance DC3respectively at predetermined ambient temperatures TEMPPRE1and TEMPPRE2(for example, 30° C. and 50° C.), so as to obtain imaging locations DCS3and DCS4. That is, since the internal components such as the lens LEN1of the distance-measuring device DMD are affected by the change of the ambient temperature TEMPAMB, the distance-measuring device DMD obtains different imaging locations (DCS3and DCS4) when measuring the calibrating object CO3at different predetermined ambient temperatures (TEMPPRE1and TEMPPRE2). In the step1220, a calibrating slope SLCABand a standard temperature TEMPSTDare calculated according to the predetermined temperatures TEMPPRE1and TEMPPRE2, and the imaging locations DCS3and DCS4. More particularly, a standard imaging location DCS—STDof the calibrating object CO3with the predetermined distance DC3measured by the distance-measuring device DMD at the standard temperature TEMPSTDcan be calculated according to the predetermined distance DC3. For instance, it is assumed that the operational principle of the distance-measuring device DMD is similar to that of the distance-measuring device100. Thus, the distance-measuring device DMD can calculate a measured distance DMaccording to the formula (3). In this way, by substituting the predetermined distance DC3into the formula (3), the following formula can be obtained:
DC3=(DF×L1)/DCS—STD(14);
wherein DFrepresents the focal length of the lens LEN1at the standard temperature TEMPSTD(such as 25° C.) and L1represents the predetermined distance between the lighting component LD and the image sensor CS at the standard temperature TEMPSTD. As a result, the standard imaging location DCS—STDcalculated according to the formula (14) is the imaging location of the calibrating object CO3measured by the distance-measuring device DMD at the standard temperature TEMPSTD. Since the variation of the imaging location is approximately proportional to the variation of the ambient temperature (as shown inFIG. 15), the relationship among the imaging locations DCS1, DCS3, and DCS—STD, and the ambient temperatures TEMPPRE1, TEMPPRE2, and TEMPSTDcan be represented by the following equations:
DCS2−DCS—STD=SLCAB×(TEMPPRE1−TEMPSTD)  (15); and
DCS3−DCS—STD=SLCAB×(TEMPPRE2−TEMPSTD)  (16);
wherein SLCABis a calibrating slope representing the ratio between the variation of the imaging location and the variation of the ambient temperature. The imaging locations DCS2, DCS3, and DCS—STD, and the ambient temperatures TEMPPRE1, TEMPPRE2, and TEMPSTDare all known values. Therefore, the standard temperature TEMPSTDand the calibrating slope SLCABcan be calculated according to the formulas (15) and (16). In this way, a location compensation DCDELTAfor compensating the imaging location DCS1of the measured object MO measured by the distance-measuring device DMD can be calculated according to the calibrating slope SLCAB, the standard temperature TEMPSTD, and the ambient temperature TEMPAMBof the distance-measuring device DMD measured by the temperature sensor TS, by the following formula:
DCDELTA=SLCAB×(TEMPAMB−TEMPSTD)  (17);
the calibrated imaging location DCS—CABcan be calculated according to the imaging location DCS1and the location compensation DCDELTAcalculated by the formula (17). More particularly, the calibrated imaging location DCS—CABcan be calculated by adding the imaging location DCS1and the location compensation DCDELTAtogether.

In the step1230, the calibrated measured distance DMis calculated according to the calibrated imaging location DCS—CAB. For instance, it is assumed that the operational principle of the distance-measuring device DMD is similar to that of the distance-measuring device100. Hence, the measured distance DMcan be calculated by substituting the calibrated imaging location DCSinto the formula (3), as shown in the following formula:
DM=(DF×L1/DCS—CAB(18);
in addition, it is assumed that the distance-measuring device DMD further includes the parameter-calculating circuit150. Since the parameter-calculating circuit150can calculate the calibrating parameter A for calibrating the sensing-error angles θCS1and θCS2and the calibrating parameter B for calibrating the lighting-error angle θLDaccording to the formulas (11) and (12), the distance-measuring device DMD can calculate the calibrated measured distance DMaccording to the calibrating parameters A and B, by the formula (13). More precisely, when the distance-measuring device DMD uses the calibrating parameters A and B for calibrating the assembly error, and uses the calibrated imaging location DCS—CABfor calibrating the effect of the temperature variation as well, the distance-measuring device DMD calculates the calibrated measured distance DMby the following formula:
DM=1/[A×DCS—CAB+B](19);
wherein the relationship among the calibrating parameter A and the sensing-error angles θCS1and θCS2is shown in formula (9); and the relationship between the calibrating parameter B and the lighting-error angle θLDis shown in formula (5).

According to the basic spirit of the calibrating method1200, the present invention further provides a calibrating device. Please refer toFIG. 16.FIG. 16is a diagram illustrating a calibrating device1600capable of calibrating the measured distance DMof the measured object MO measured by the distance-measuring device DMaccording to the ambient temperature TEMPAMB. The calibrating device1600includes a temperature sensor1610, a temperature-sensing controlling circuit1620, and a temperature compensation calculating circuit1630.

The temperature sensor1610is utilized for measuring the ambient temperature TEMPAMBof the distance-measuring device DMD. The structure and the operational principle of the temperature sensor1610are similar to those of the above-mentioned temperature sensor TS. The temperature sensor1610can be disposed near the lens LEN1of the distance-measuring device DMD. In this way, when the distance-measuring device DMD measures the measured distance DM, the temperature sensor1610measures the temperature of the lens LEN1to obtain the ambient temperature TEMPAMB. In addition, the temperature sensor1610can also be disposed near the image sensor CS of the distance-measuring device DMD, or further integrated with the image sensor CS into a chip for saving cost. The temperature-sensing controlling circuit1620controls the temperature sensor1610to measure the operating temperature variation ΔTEMPICof the image sensor CS, and controls the temperature sensor1610to measure the temperature of the image sensor CS when the distance-measuring device DMD measures the measured distance DMfor obtaining the chip operation temperature TEMPDETECT. In this way, the temperature-sensing controlling circuit1620calculates the ambient temperature TEMPAMBaccording to the chip operation temperature TEMPDETECTand the operating temperature variation ΔTEMPIC. More particularly, the temperature-sensing controlling circuit1620controls the temperature sensor1610to measure the start-up temperature TEMPSTARTand the steady temperature TEMPSTEADYof the image sensor CS by means of the method illustrated inFIG. 13andFIG. 14, for obtaining the operating temperature variation ΔTEMPICof the image sensor CS. When the image sensor CS receives power to enter the operating mode, the temperature-sensing controlling circuit1620controls the temperature sensor1610to measure the temperature of the image sensor CS so as to obtain a start-up temperature TEMPSTART1. A delay period TSTEADYafter the image sensor CS enters the operating mode, the temperature-sensing controlling circuit1620controls the temperature sensor1610to measure the temperature of the image sensor CS so as to obtain a steady temperature TSTEADY1. In this way, the temperature-sensing controlling circuit1620calculates the operating temperature variation ΔTEMPIC1according to the steady temperature TSTEADY1and the start-up temperature TSTART1. In addition, a delay period TSTEADYafter the image sensor CS enters the operating mode from a power-saving mode, the temperature-sensing controlling circuit1620controls the temperature sensor1610to measure the temperature of the image sensor CS to obtain a new steady temperature TSTEADY2. In this way, the temperature-sensing controlling circuit1620can calculate a new operating temperature variation ΔTEMPIC2according to the steady temperature TSTEADY2and the start-up temperature TSTART1. When the distance-measuring device DMD measures the measured distance DM, the temperature-sensing controlling circuit1620controls the temperature sensor1610to measure the temperature of the image sensor CS for obtaining the chip operation temperature TEMPDETECT. In this way, the temperature-sensing controlling circuit1620can calculate the ambient temperature TEMPAMBaccording to the chip operation temperature TEMPDETECTand the operating temperature variation ΔTEMPICby the following formula:
TEMPAMB=TEMPDETECT−ΔTEMPIC(20).

The temperature compensation calculating circuit1630calculates a calibrated imaging location DCS—CABaccording to the ambient temperature TEMPAMBand the imaging location DCS1of the measured object MO measured by the distance-measuring device DMD. The temperature compensation calculating circuit1630provides the calibrated imaging location DCS—CABto the distance-measuring device DMD so that the distance-measuring device DMD can calculate a calibrated measured distance DM. More particularly, in a calibrating phase PHCAB, the temperature compensation calculating circuit1630controls the distance-measuring device DMD to measure a calibrating object CO3with a predetermined distance DC3respectively at predetermined ambient temperatures TEMPPRE1and TEMPPRE2(for example, 30° C. and 50° C.), so as to obtain imaging locations DCS3and DCS4. The temperature compensation calculating circuit1630calculates a calibrating slope SLCABand a standard temperature TEMPSTDaccording to the predetermined temperatures TEMPPRE1and TEMPPRE2, and the imaging locations DCS3and DCS4. More particularly, the temperature compensation calculating circuit1630calculates a standard imaging location DCS—STDof the calibrating object CO3with the predetermined distance DC3measured by the distance-measuring device DMD at the standard temperature TEMPSTDaccording to the predetermined distance DC3. For instance, it is assumed that the operational principle of the distance-measuring device DMD is similar to that of the distance-measuring device100. Thus, the distance-measuring device DMD can calculate a measured distance DMaccording to the formula (3). Hence, the temperature compensation calculating circuit1630can calculate the standard imaging location DCS—STDof the calibrating object CO3with the predetermined distance DC3measured by the distance-measuring device DMD at the standard temperature TEMPSTDaccording to the formula (14). The temperature compensation calculating circuit1630further calculates the calibrating slope SLCABand the standard temperature TEMPSTDaccording to the formulas (15) and (16). In this way, by the formula (17), the temperature compensation calculating circuit1630calculates the location compensation DCDELTAcapable of compensating the imaging location DCS1of the measured object MO measured by the distance-measuring device DMD according to the calibrating slope SLCAB, the standard temperature TEMPSTD, and the ambient temperature TEMPAMBof the distance-measuring device DMD (that is, the ambient temperature TEMPAMBprovided by the temperature-sensing controlling circuit1620). As a result, the temperature compensation calculating circuit1630adds the imaging location DCS1and the location compensation DCDELTAtogether to calculate the calibrated imaging location DCS—CAB.

The distance-measuring device DMD calculates the calibrated measured distance DMaccording to the calibrated imaging location DCS—CAB. For instance, it is assumed that the operational principle of the distance-measuring device DMD is similar to that of the distance-measuring device100. Therefore, the distance-measuring device DMD can calculate the calibrated measured distance DMaccording to the calibrated imaging location DCS—CABby the formula (18). In addition, provided that the distance-measuring device DMD further includes the parameter-calculating circuit150, since the parameter-calculating circuit150can calculate the calibrating parameter A for calibrating the sensing-error angles θCS1and θCS2and the calibrating parameter B for calibrating the lighting-error angle θLDaccording to the formulas (11) and (12), the distance-measuring device DMD can calculate the calibrated measured distance DMby the formula (13), and the calibrating parameters A and B. In this way, the distance-measuring device DMD uses the calibrating parameters A and B for calibrating the assembly error, and uses the calibrated imaging location DCS—CABfor calibrating the effect of the temperature variation as well. The distance-measuring device DMD calculates the calibrated measured distance DMby the formula (19).

In conclusion, the present invention provides a calibrating method of calibrating the measured distance of the measured object measured by the distance-measuring device according to the ambient temperature. The calibrating method provided by the present invention includes providing a temperature sensor for measuring the ambient temperature of the distance-measuring device, calculating a first calibrated imaging location according to the ambient temperature and the imaging location, and calculating a calibrated measured distance according to the first calibrated imaging location. In this way, when the distance-measuring device measures distance, the error due to the variation of the ambient temperature is avoided according to the calibrating method. In addition, in the calibrating method of the present invention, the temperature sensor can be disposed near the lens of the distance-measuring device to directly measure the ambient temperature. However, the temperature sensor can also be disposed near the image sensor to indirectly measure the ambient temperature. In this way, the temperature sensor can be integrated with the image sensor into a chip to reduce the cost of distance-measuring device, providing a great convenience to the user.