A driving mechanism drives a phase difference sensor including a pair of photodetectors arranged in line in a direction (sensor arrangement direction) perpendicular to the direction of arrangement of the photodetectors. The distance to a target object is measured in the sensor arrangement direction while the phase difference sensor is set in a given position. The distance to the target object is measured in a direction perpendicular to the sensor arrangement direction by moving the phase difference sensor through the driving mechanism.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority from prior Japanese Patent Application No. 2005-279454, filed Sep. 27, 2005, the entire contents of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a distance-measuring apparatus for measuring the distance to a target object using a phase difference sensor, a projecting apparatus using the distance-measuring apparatus, an imaging apparatus using the distance-measuring apparatus, and a distance-measuring method.

2. Description of the Related Art

When a projecting apparatus (projector) projects an image on a screen, the image might be distorted like a trapezoid depending on how the projector is disposed with respect to the screen.

As a method of correcting the distortion of a projected image automatically, the following is performed. The distance from a projection optical system to a screen is measured at three or more points. On the basis of a phase difference among the distances to the three points, the inclination angle of the projection plane of the screen is detected, and the distortion of an image projected on the plane is corrected (see Jpn. Pat. Appln. KOKAI Publication No. 2005-006228, for example).

Measuring the distance to a target object is called “distance measurement.” Correcting the distortion of a projected image on the basis of the result of the distance measurement is called “trapezoid correction” because the image is distorted like a trapezoid.

A projector usually includes two phase difference sensors1and2as illustrated inFIG. 19. The phase difference sensor1detects the inclination of a projected image in the horizontal direction, while the phase difference sensor2detects the inclination of a projected image in the vertical direction. The phase difference sensor1is so provided that its sensor components are arranged in the horizontal direction and the phase difference sensor2is so provided that its sensor components are arranged in the vertical direction. InFIG. 19, reference numeral3denotes a projector lens of the projector and reference numeral4denotes a display element.

With the two phase difference sensors1and2, the distance in the horizontal direction can be measured at a plurality of points, as can be the distance in the vertical direction. The distortion of a projected image can thus be corrected exactly on the basis of distance data of these points.

However, the use of two phase difference sensors causes a problem of a decrease in measurement precision due to a change in the shape of the sensors as well as a problem of an increase in cost. The phase difference sensors are sometimes influenced by ambient temperature, heat of a light source, etc. and changed in shape with time. Though the change in shape is very small, the sensors have a great influence on measurement precision because the size of the sensors themselves is small.

In particular, both ends of each phase difference sensor are changed in shape and thus the precision of so-called “multi-point distance measurement” using both the ends remarkably lowers. Due to a difference in the change in shape between the two phase difference sensors, the measurement precision in the horizontal and vertical directions becomes uneven and thus the distortion of an image cannot be corrected precisely.

A technique of reducing an error in measurement using a phase difference sensor in a prior art projector is disclosed in Jpn. Pat. Appln. KOKAI Publication No. 2005-061925. The Publication discloses that a chart image (pattern image for distance measurement) is shifted a plurality of times and projected to measure the distance to a target object and the results of a plurality of measurements are averaged. However, the technique is a method of reducing an error by a plurality of measurements, and cannot cancel an error in measurement due to a change in the shape of the phase difference sensors and a difference between the sensors.

Jpn. Pat. Appln. KOKAI Publication No. 2005-307934 discloses a camera using phase difference sensors. The camera has a function of detecting an external factor in inhibiting measurement and a function of promoting the necessity of remeasurement. If an image is picked up with the phase difference sensors covered with an operator's finger, a warning is given to the operator. However, this warning shows only the incapability of measurement. As in the case of Publication No. 2005-061925, Publication No. 2005-307934 cannot cancel an error in measurement due to a change in the shape of the phase difference sensors and a difference between the sensors.

As described above, conventionally, the multi-point distance measurement has been achieved using two phase difference sensors. However, the use of two phase difference sensors causes the problems that the cost of the components of the sensors is increased and the measurement precision due to a difference in shape between the sensors is decreased.

BRIEF SUMMARY OF THE INVENTION

The present invention has been developed in consideration of the above situation and its object is to provide a distance-measuring apparatus and a distance-measuring method both capable of multi-point distance measurement for measuring the distance to a target object using a single phase difference sensor to thereby reduce an error in measurement due to a change in the shape of the sensor and increase the measurement precision.

According to a first aspect of the present invention, there is provided a distance-measuring apparatus comprising:

a phase difference sensor including a pair of light-receiving components arranged in line;

a driving mechanism which supports the phase difference sensor such that the light-receiving components face a target object, and moves the phase difference sensor in a direction perpendicular to a direction of arrangement of the light-receiving components; and

a distance-measuring unit which measures a distance to the target object in the direction of arrangement of the light-receiving components while the phase difference sensor is set in a given position and which moves the phase difference sensor through the driving mechanism to measure a distance to the target object in the direction perpendicular to a direction of arrangement of the light-receiving components.

According to a second aspect of the present invention, there is provided a distance-measuring apparatus comprising:

a phase difference sensor including a pair of light-receiving components arranged in line;

an optical member provided on a front of the phase difference sensor;

a driving mechanism which supports the optical member such that the optical member faces a target object, and moves the optical member to change a direction of measurement of the phase difference sensor to a direction perpendicular to a direction of arrangement of the light-receiving components; and

a distance-measuring unit which measures a distance to the target object in the direction of arrangement of the light-receiving components while the optical member is set in a given position and which moves the optical member through the driving mechanism to measure a distance to the target object in the direction perpendicular to the direction of arrangement of the light-receiving components.

According to a third aspect of the present invention, there is provided a n projecting apparatus comprising:

a distance-measuring apparatus including:a phase difference sensor including a pair of light-receiving components arranged in line;a driving mechanism which supports the phase difference sensor such that the light-receiving components face a target object, and moves the phase difference sensor in a direction perpendicular to a direction of arrangement of the light-receiving components; anda distance-measuring unit which measures a distance to the target object in the direction of arrangement of the light-receiving components while the phase difference sensor is set in a given position and which moves the phase difference sensor through the driving mechanism to measure a distance to the target object in the direction perpendicular to a direction of arrangement of the light-receiving components;

a distance-measuring control unit which controls a distance-measuring operation of the distance-measuring apparatus; and

a trapezoid correcting unit which corrects a trapezoidal image projected on the target object based on the distances to the target object obtained from the distance-measuring apparatus in response to an instruction of the distance-measuring control unit.

According to a fourth aspect of the present invention, there is provided a projecting apparatus comprising:

a distance-measuring apparatus including:a phase difference sensor including a pair of light-receiving components arranged in line;an optical member provided on a front of the phase difference sensor;a driving mechanism which supports the optical member such that the optical member faces a target object, and moves the optical member to change a direction of measurement of the phase difference sensor to a direction perpendicular to a direction of arrangement of the light-receiving components; anda distance-measuring unit which measures a distance to the target object in the direction of arrangement of the light-receiving components while the optical member is set in a given position and moves the optical member through the driving mechanism to measure a distance to the target object in the direction perpendicular to the direction of arrangement of the light-receiving components;

a distance-measuring control unit which controls a distance-measuring operation of the distance-measuring apparatus; and

a trapezoid correcting unit which corrects a trapezoidal image projected on the target object based on the distances to the target object obtained from the distance-measuring apparatus in response to an instruction of the distance-measuring control unit.

According to a fifth aspect of the present invention, there is provided an imaging apparatus comprising:

a distance-measuring apparatus including:a phase difference sensor including a pair of light-receiving components arranged in line;a driving mechanism which supports the phase difference sensor such that the light-receiving components face a target object, and moves the phase difference sensor in a direction perpendicular to a direction of arrangement of the light-receiving components; anda distance-measuring unit which measures a distance to the target object in the direction of arrangement of the light-receiving components while the phase difference sensor is set in a given position and which moves the phase difference sensor through the driving mechanism to measure a distance to the target object in the direction perpendicular to a direction of arrangement of the light-receiving components;

a distance-measuring control unit which controls a distance-measuring operation of the distance-measuring apparatus; and

an automatic focusing unit which focuses light on a subject of the target object based on the distances to the target object obtained from the distance-measuring apparatus in response to an instruction of the distance-measuring control unit.

According to a sixth aspect of the present invention, there is provided an imaging apparatus comprising:

a distance-measuring apparatus including:a phase difference sensor including a pair of light-receiving components arranged in line;an optical member provided on a front of the phase difference sensor;a driving mechanism which supports the optical member such that the optical member faces a target object, and moves the optical member to change a direction of measurement of the phase difference sensor to a direction perpendicular to a direction of arrangement of the light-receiving components; anda distance-measuring unit which measures a distance to the target object in the direction of arrangement of the light-receiving components while the optical member is set in a given position and which moves the optical member through the driving mechanism to measure a distance to the target object in the direction perpendicular to the direction of arrangement of the light-receiving components;

a distance-measuring control unit which controls a distance-measuring operation of the distance-measuring apparatus; and

an automatic focusing unit which focuses light on a subject of the target object based on the distances to the target object obtained from the distance-measuring apparatus in response to an instruction of the distance-measuring control unit.

According to a seventh aspect of the present invention, there is provided a distance-measuring method comprising:

driving a phase difference sensor, which includes a pair of light-receiving components arranged in line in, in a direction perpendicular to a direction of arrangement of the light-receiving components;

measuring a distance to the target object in the direction of arrangement of the light-receiving components while the phase difference sensor is set in a given position; and

moving the phase difference sensor to measure a distance to the target object in the direction perpendicular to a direction of arrangement of the light-receiving components.

According to an eighth aspect of the present invention, there is provided a distance-measuring method comprising:

driving an optical member, which is provided on a front of a phase difference sensor including a pair of light-receiving components arranged in line in, to change a direction of measurement of the phase difference sensor to a direction perpendicular to a direction of arrangement of the light-receiving components;

measuring a distance to the target object in the direction of arrangement of the light-receiving components while the optical member is set in a given position; and

moving the optical member to measure a distance to the target object in the direction perpendicular to a direction of arrangement of the light-receiving components.

According to a ninth aspect of the present invention, there is provided a distance-measuring apparatus comprising:

a phase difference sensor including a pair of light-receiving components arranged in line;

a driving mechanism which supports the phase difference sensor such that the light-receiving components face a target object, and moves the phase difference sensor in a direction perpendicular to a direction of arrangement of the light-receiving components; and

distance-measuring means for measuring a distance to the target object in the direction of arrangement of the light-receiving components while the phase difference sensor is set in a given position and for moving the phase difference sensor through the driving mechanism to measure a distance to the target object in the direction perpendicular to a direction of arrangement of the light-receiving components.

According to a tenth aspect of the present invention, there is provided a distance-measuring apparatus comprising:

a phase difference sensor including a pair of light-receiving components arranged in line;

an optical member provided on a front of the phase difference sensor;

a driving mechanism which supports the optical member such that the optical member faces a target object, and moves the optical member to change a direction of measurement of the phase difference sensor to a direction perpendicular to a direction of arrangement of the light-receiving components; and

distance-measuring means for measuring a distance to the target object in the direction of arrangement of the light-receiving components while the optical member is set in a given position and for moving the optical member through the driving mechanism to measure a distance to the target object in the direction perpendicular to the direction of arrangement of the light-receiving components.

DETAILED DESCRIPTION OF THE INVENTION

A distance-measuring apparatus according to each of first to third embodiments of the present invention will be described with reference to the accompanying drawings. In the embodiments, the distance-measuring apparatus is applied to a projecting apparatus (referred to as a projector hereinafter).

First Embodiment

The projector of the first embodiment includes a driving mechanism capable of driving a “longitudinally-arranged” phase difference sensor in a horizontal direction. The driving mechanism changes the direction of measurement of the phase difference sensor such that the one phase difference sensor can measure the distances to a target object in both horizontal and vertical directions.

The above phrase “longitudinally-arranged” means that the paired light-receiving components incorporated in a phase difference sensor are arranged in a longitudinal direction, or the direction of arrangement of the light-receiving components (sensor arrangement direction) is a vertical direction. In contrast, a phrase “transversally-arranged” means that the paired light-receiving components incorporated in a phase difference sensor are arranged in a transversal direction, or the sensor arrangement direction is a horizontal direction.

FIGS. 1 and 2are perspective views of a projector10according to the first embodiment of the present invention. Of these figures,FIG. 1shows the projector viewed from above andFIG. 2shows the projector viewed from below.

The projector10includes a rectangular-parallelepiped main casing11, a projector lens12provided on the front of the main casing11, a phase difference sensor13and an IR receiving unit14, as shown inFIG. 1.

The projector lens12projects an optical image that is formed by a spatial optical modulator such as a micro mirror element (described later). The focal position and zoom position (angle of view) of the projector lens12can freely be varied. The phase difference sensor13measures the distance to a target object and, more specifically, the distance to the plane on which an image is projected, on the basis of the principle of triangular distance measurement. The structure of the phase difference sensor13will be described in detail later.

The IR receiving unit14receives infrared light on which a keying signal is superposed from a remote control (not shown) of the projector10.

On the top of the main casing11, a main key/indicator15, a speaker16and a cover17are arranged.

The main key/indicator15includes operation keys such as a power key, a zoom key and a focus key and indicators for displaying the ON/OFF state of a power supply, the temperature of a light source, and the like. The speaker16loudly outputs voices when moving images are played back. The cover17is opened and closed when a sub-key (not shown) is operated. The operations that cannot be set by the keys of the main key/indicator15are performed by the keys of the main key/indicator15without using the remote controller of the projector10.

On the back of the main casing11, an input/output connector18, an IR receiving unit19and an AC adapter connecting section20are arranged as shown inFIG. 2.

The input/output connector18includes a USB terminal for connecting the projector10to an external device such as a personal computer, a mini D-SUB terminal, an S terminal and an RCA terminal for inputting video signals, and a stereo mini terminal for inputting voice signals. Like the IR receiving unit14, the IR receiving unit19receives infrared light on which a keying signal is superposed from the remote control. The AC adapter connecting section20is used to connect a cable of an AC adapter (not shown) serving as a power supply.

A pair of fixing legs21is attached to the undersurface of the main casing11and close to the back thereof, and a height-adjustable leg22is attached to the undersurface of the main casing11and close to the front thereof. Screwing the leg22manually, a component in a direction perpendicular to the projection direction of the projector lens12, namely an angle of elevation is adjusted.

FIG. 3is a block diagram of an electronic circuit of the projector10. As shown inFIG. 3, the input/output connector18receives image signals of different formats and supplies them to an image converting unit32via an input/output interface (I/F)31and a system bus SB. The unit32converts the image signals into an image signal of a given format and sends it to a display encoder33.

The display encoder33causes the image signal to be expanded and stored in a video RAM34. Then, the encoder33generates a video signal from the contents stored in the video RAM34and supplies it to a display driving unit35.

The display driving unit35drives a spatial optical modulator (SOM)36at an appropriate frame rate corresponding to the video signal, e.g., a frame rate of 30 frames per second. The spatial optical modulator36is irradiated with high-luminance white light from a light source lamp37such as an extra-high voltage mercury lamp to thereby form an optical image. The optical image is then projected on a screen (not shown) through the projector lens12. The projector lens12is driven by a lens motor (M)38to shift its zoom position and focus position appropriately.

It is a control unit39that controls the operations of all of the circuit components described above. The control unit39is a microcomputer and includes a CPU, a ROM that fixedly stores operation programs to be executed by the CPU and a RAM used as a work memory.

An image storing unit40and a voice processing unit41are connected to the control unit39via the system bus SB.

The image storing unit40is, for example, a flash memory and stores image data such as a distance-measuring chart image (horizontal chart image and vertical chart image) and a user logo image. The image data is sent to the display encoder33and projected on the screen through the projector lens12.

The voice processing unit41includes a sound source circuit such as a PCM sound source. The unit41converts voice data, which is provided when the image data is projected, into analog data and drives the speaker16to output the analog data loudly.

The main key/indicator15and the sub-key (not shown) in the cover17compose a key input unit42. The key input unit42supplies a keying signal of the main key/indicator15directly to the control unit39. The IR receiving units14and19receive an infrared light signal and supply the signal directly to the control unit39.

The projector10also includes a distance-measuring unit50. The distance-measuring unit50has the phase difference sensor13, a driving mechanism51, a driving control unit52and a distance-measurement processing sub unit53.

The phase difference sensor13is longitudinally arranged on the front of the main casing11. The sensor13includes a pair of photodetectors13aand13barranged in line to detect the distance to a target object using a phase difference system. The photodetectors13aand13bhave photosensor arrays131and132and lenses133and134, respectively. The lenses133and134are provided in front of and in parallel with the photosensor arrays131and132. The lenses133and134are designed to form a target object on the sensing planes of the photosensor arrays131and132. The photosensor arrays131and132sense an image of the target object and output it as an electrical signal. The target object is an image that is projected on the screen.

The driving mechanism51supports the phase difference sensor13such that the sensor13faces a target subject, and moves the sensor13in a direction perpendicular to the direction of the arrangement of the photodetectors13aand13b, i.e., in the horizontal direction. The structure of the driving mechanism51will be described in detail later with reference toFIGS. 9 and 10.

The driving control unit52drives the driving mechanism51in response to an instruction from a distance-measuring control unit39cof the control unit39. The distance-measurement processing sub unit53measures the distance to a target object using the phase difference sensor13.

The control unit39includes a trapezoid correcting unit39bthat corrects a trapezoidal projection plane on the basis of the distance measured by the distance-measurement processing sub unit53.

For easy understanding of the present invention, a distance-measuring method using a phase difference system will be described with reference toFIGS. 4 to 7.FIG. 4is an illustration of a distance-measuring method using the phase difference sensor,FIG. 5is an illustration of a multi-point distance-measuring function of the phase difference sensor,FIG. 6is an illustration of a method of computing an inclination angle by the phase difference sensor, andFIG. 7is an illustration of center-point distance measurement and multi-point distance measurement using the phase difference sensor.

As shown inFIG. 4, when the distance to a target object61is measured, the target object61is irradiated with light from an emitting unit (not shown). The light reflected by the target object61is transmitted through the lens133and its image is formed on the photosensor array131. The reflected light is also transmitted through the lens134and its image is formed on the photosensor array132. InFIG. 4, reference numerals62and63indicate the image forming portions of the photosensor arrays131and132.

Assume that the distance between the center of the lens133and the image forming portion62is X1and the distance between the center of the lens134and the image forming portion63is X2, the distance between the lenses133and134is B, and the distance of each of the photosensor arrays131and132and each of the lenses133and134is f. The distance d to the target object61is given by the following equation (1):
d=B*f/(x1+x2)  (1)

In the equation (1), the distance B and the distance f are each proper to the phase difference sensor13. The distance d is therefore obtained by the phases (x1, x2) of the photosensor arrays131and132.

As shown inFIG. 5, the phase difference sensor13is capable of measuring the distance to the target object61within a range of about ±10 degrees toward the direction of arrangement of the photodetectors13aand13bfrom the direction of optical axis K of the sensor13. This is a multi-point distance-measuring function.

More specifically, measuring the distance to the target object61using the central points (B1and B2) of the photosensor arrays131and132of the phase difference sensor13, as shown inFIG. 7, is called “center-point distance measurement.” In contrast, measuring the distance to the target object61using the other points (A1and A2, C1and C2) of the photosensor arrays131and132, as shown inFIG. 7, is called “multi-point distance measurement.” The center-point distance measurement is more increased in measurement precision than the multi-point distance measurement, and is not so influenced by a change of the shape of the sensor with time.

As shown inFIG. 6, the projector10acquires distance data of plural directions using the multi-point distance-measuring function of the phase difference sensor13and computes an inclination angle S of the target object61(screen) to the direction of the arrangement of the photodetectors13aand13bon the basis of the distance data. Assuming now that the distances to two measurement points P1and P2in the direction of optical axis K of the sensor13are L and R, and the inclination of the optical axis K is ±W, the inclination angle S of target object61is expressed by the following equation (2):

The driving mechanism of the phase difference sensor13will be described below.

FIG. 8is a sketch showing a relationship between the projector and the phase difference sensor.FIG. 9is an exploded, perspective view showing a specific structure of the driving mechanism of the phase difference sensor.

Referring toFIG. 8, the phase difference sensor13is longitudinally arranged close to the projector lens12. In this structure, the photodetector13ais arranged above the photodetector13b. The driving mechanism51can adjust the measurement direction of the phase difference sensor13in the horizontal direction as indicated by the double-headed arrow.

Referring toFIG. 9, the phase difference sensor13is supported on an oscillating table71with the photodetectors13aand13barranged longitudinally toward a target object to be measured. The table71has a slide hole71athat is formed to a given length in the longitudinal direction thereof. A pedestal72is horizontally provided in the main casing11. The table71is attached to the pedestal72such that it can be rotated in the horizontal direction on an oscillating shaft73formed on the pedestal72.

A mechanism for driving the oscillating table71in the horizontal direction includes a motor76, a worm gear77coupled to the shaft of the motor76and a gear78engaged with the worm gear77. The gear78is rotatably attached to a gear shaft74on the pedestal72.

In order to regulate the range of rotation of the oscillating table71, stopper members75aand75bare provided at both ends of the pedestal72. A link pin80is provided on the gear78as a mechanism for linking the oscillating table71and gear78such that the table71can be stopped at the maximum angle by the stopper members75aand75beven though the control accuracy of the motor76is low. The link pin80can be slid by a spring79and fitted slidably into the slide hole71a.

FIGS. 10A to 10Care illustrations of the movement of the phase difference sensor at the time of distance measurement. Of these figures,FIG. 10Ashows the phase difference sensor located in a first position,FIG. 10Bshows the phase difference sensor located in a second position, andFIG. 10Cshows the phase difference sensor located in a third position.

Usually, the phase difference sensor13is set in a first position (home position) as shown inFIG. 10A. The first position indicates that the phase difference sensor13faces a target object. In this position, the distance to the target object in the vertical direction is measured using the photodetectors13aand13barranged longitudinally. The distance to the target object in the horizontal direction is measured by horizontally moving the phase difference sensor13to the second or third position as shown inFIGS. 10Band10C.

As described above, the phase difference sensor13is supported on the oscillating table71and its measurement direction can be adjusted in the horizontal direction by the rotation of the table71. More specifically, when the motor76is driven, its torque is transmitted to the gear78via the worm gear77. Thus, the gear78rotates and accordingly the table71rotates in the horizontal direction through the link pin80. The range of rotation of the table71is regulated by the stopper members75aand75b.

Assume here that the position regulated by the stopper member75bis the second position as shown inFIG. 10B. In the second position, the phase difference sensor13faces a target object only at a given angle in one direction (right direction inFIG. 10B).

Assume here that the position regulated by the stopper member75ais the third position as shown inFIG. 10C. In the third position, the phase difference sensor13faces a target object only at a given angle in a direction (left direction inFIG. 10C) opposite to the above one direction.

Since the motor76is driven to rotate the oscillating table71in the horizontal direction, the measurement direction of the phase difference sensor13is adjusted horizontally within a given range. Consequently, the distance to a target object in the horizontal direction can be measured.

An operation of processing an image projected by the projector10with the phase difference sensor13will be described.

FIG. 11is a flowchart showing an operation of processing an image projected by the projector. The operation is performed when a program is loaded by the control unit (microcomputer)39including a CPU.

When an image is projected on a screen provided in front of the projector10, the control unit39first causes the projection system including the projector lens12to project and display a chart image for distance measurement on the basis of the image data stored in the image storing unit40(step S11). The chart image includes a pattern image having, for example, black-and-white horizontal stripes. The reason why the chart image is displayed is that the screen is usually white only and thus the phase difference sensor13cannot read a measurement point.

Then, while the chart image is displayed, the control unit39gives an instruction to drive the driving control unit52shown inFIG. 3and sets the phase difference sensor13in the first position through the driving mechanism51(step S12). The first position indicates that the phase difference sensor13faces a target object, or the optical axis of the sensor13is perpendicular to the horizontal plane of the target object. The phase difference sensor13is usually set in the first position as a home position.

When the phase difference sensor13is set in the first position, the control unit39performs multi-point distance measurement for at least two points on the vertical line of the chart image through the distance-measurement processing sub unit53(step S13). The multi-point distance measurement is to measure the distance to a target object using points (e.g., both ends) other than the central point of each of the photodetectors13aand13bof the phase difference sensor13, as has been described with reference toFIG. 7.

FIG. 12shows an example of measurement points for the multi-point distance measurement. When the phase difference sensor13is set in the first position, measurement points P11and P12shown inFIG. 12are read in sequence by points (e.g., both ends) other than the central points of the photodetectors13aand13b. More specifically, the brightness of white points corresponding to the measurement points P11and P12of a black-and-white pattern of the chart image is read, and the distance to each of the measurement points P11and P12is measured by the distance-measurement processing sub unit53. The measured distance is stored in a measured-distance storing unit39aprovided in the control unit39.

On the basis of the distances stored in the storing unit39a, the control unit39computes an angle “θv” at which the projection plane of the screen is inclined in the up-and-down direction, or the vertical direction, with respect to the optical axis (step S14).

After that, the control unit39gives an instruction to drive the driving control unit52to move the phase difference sensor13to the second and third positions through the driving mechanism51(step S15). In the second and third positions, the phase difference sensor13faces a target object only at a given angle in the horizontal direction, as shown inFIGS. 10B and 10C.

Under the above condition, the control unit39performs center-point distance measurement for at least two points on the horizontal line of the chart image through the distance-measurement processing sub unit53(step S16). The center-point distance measurement is to measure the distance to a target object using central points of the photodetectors13aand13bof the phase difference sensor13, as has been described with reference toFIG. 7.

In the example shown inFIG. 12, when the phase difference sensor13is set in the second and third positions, the measurement points P13and P14are read in sequence by the central points of the photodetectors13aand13b, and the distance to each of the measurement points P13and P14is measured by the distance-measurement processing sub unit53. The measured distance is stored in the measured-distance storing unit39aprovided in the control unit39.

On the basis of the distances stored in the storing unit39a, the control unit39computes an angle “θh” at which the projection plane of the screen is inclined in the right-and-left direction, or the horizontal direction, with respect to the optical axis (step S17).

After that, the trapezoid correcting unit39bof the control unit39performs a trapezoid correcting process for a projected image on the basis of the angle “θv” obtained in step S14and the angle “θh” obtained in step S17(step S18). More specifically, the unit39bcomputes an angle necessary for trapezoid correction to determine which direction and how many angles the projection plane of the screen is inclined and to form the screen as a rectangle having a proper aspect ratio that is the same as that of a projected image. The display encoder33corrects the ratio of the upper side to the lower side of image data expanded and stored in the video RAM34and the ratio of the right side to the left side thereof.

According to the first embodiment described above, the distance to each of two points in the vertical direction is measured and so is the distance to each of two points in the horizontal direction. For example, the distance to each of nine points arranged in matrix can be measured, as shown inFIG. 13. When the phase difference sensor13is set in the first position, the distance to each of measurement points P21to P23is measured. Then, the sensor13moves in the horizontal direction. When the sensor13is set in the second position, the distance to each of measurement points P24to P26is measured. When the sensor13is set in the third position, the distance to each of measurement points P27to P29is measured. The distance to each of measurement points P22, P25and P28is measured by the center-point distance measurement. If the distance measurement is performed for the nine measurement points, the inclination of a projected image can accurately be corrected.

In the first embodiment, the distance measurement in the vertical direction is performed first. However, the distance measurement in the horizontal direction can be done first.

The inclination of a projected image can be corrected by measuring the distance to each of three measurement points none of which are aligned with one another if a relationship in position among the three measurement points has only to be clarified.

In the example shown inFIG. 13, the distance to each of six measurement points P24to P26and P27to P29can be measured, or the distance to each of three measurement points P25, P27and P28or three measurement points P24, P25and P28can be measured. Time for inclination correction can thus be shortened.

Moreover, the distance measurement for not nine measurement points but more measurement points such as sixteen points (4×4) and twenty-five points (5×5) can be performed. Inclination can thus be corrected with high precision.

The longitudinally-arranged phase difference sensor13need not be moved in the horizontal direction, but can be done in a direction other than the vertical direction. If the direction in which the sensor13moves differs from the directions of the photodetectors13aand13bof the sensor13, at least two-dimensional distance measurement can be performed. In other words, when the sensor13is longitudinally arranged, it can be moved in a direction other than the vertical direction.

If the sensor13is arranged transversally or diagonally, it can be moved in a direction other than the direction of arrangement of the sensor13.

As described above, the driving mechanism51for moving the longitudinally-arranged phase difference sensor13in the horizontal direction allows the sensor13to perform distance measurement in both the horizontal and vertical directions.

Second Embodiment

A projector according to a second embodiment of the present invention will be described.

In the first embodiment, the phase difference sensor is moved to change the direction of distance measurement. In the second embodiment, when a phase difference sensor is longitudinally fixed and arranged, an optical member provided on the front of the sensor is moved to change the direction of distance measurement. A prism is used as the optical member.

Since the circuit arrangement and data processing of a projector10of the second embodiment are basically the same as those of the projector of the first embodiment, their descriptions are omitted.

FIG. 14is a perspective view specifically showing a structure of a driving mechanism of the projector according to the second embodiment, in which a prism is used as an optical member.

The phase difference sensor13is longitudinally fixed and arranged in a main casing11of the projector10. A prism81whose end face is shaped like an isosceles triangle is provided in front of the sensor13. The prism81has three rectangular light-receiving surfaces81ato81c. Of these light-receiving surfaces, the light-receiving surface81cis arranged in parallel with the sensing planes of photodetectors13aand13band supported on a parallel-moving plate82.

A pair of slide holes82aand82bis formed to a given length in the horizontal direction thereof. Stopper members83aand83bare slidably fitted into the slide holes82aand82b, respectively. Gear teeth84are formed on one side of the parallel-moving plate82.

A mechanism for sliding the parallel-moving plate82includes a motor85, a worm gear86coupled to the shaft of the motor85and a gear87engaged with the worm gear86. The gear87is fitted to the gear teeth84of the parallel-moving plate82.

FIGS. 15A to 15Care illustrations of the movement of the prism81at the time of distance measurement.FIG. 15Ashows the prism81located in a first position,FIG. 15Bshows the prism81located in a second position, andFIG. 15Cshows the prism81located in a third position.

The prism81is usually set in the first position (home position) as shown inFIG. 15A. In the first position, the vertex of an isosceles triangle formed by light-receiving surfaces81ato81cof the prism81is located on the optical axis of the phase difference sensor13, as indicated by a one-dot-one-dash line. In the first position, however, there is possibility that light reflected by a target object will be diffused in the prism81. To avoid this, relative positions between the sensor13and prism81are slightly displaced from each other, so that light reflected by a target object enters the photodetectors13aand13balmost straightly through the light-receiving surfaces81aand81b.

When the distance to a target object is measured, a chart image for distance measurement is first projected and displayed. While the prism81is set in the first position, the phase difference sensor13measures the distance in the vertical direction. In this case, multi-point distance measurement for at least two points is performed using points (e.g., both ends) other than the central point of each of the photodetectors13aand13bof the sensor13.

After that, the parallel-moving plate82moves to the second or third position parallel to itself to measure the distance in the horizontal direction, as shown inFIGS. 15B and 15C. The prism81is supported on the plate82as described above. When the motor85is driven, its torque is transmitted to the gear87through the worm gear86. Thus, the gear87rotates and accordingly the plate82moves in the horizontal direction. As the plate82moves, the stopper members83aand83bslide in the slide holes82aand82b, with the result that the movement of the plate82is controlled to fall within a range of the slide holes82aand82b.

When the parallel-moving plate82moves to the second position, the stopper member83astops at one end of the slide hole82aand the stopper member83bstops at one end of the slide hole82b, as shown inFIG. 15B. In the second position, light reflected by a target object is refracted at a given angle through the light-receiving surface81aof the prism81and enters the phase difference sensor13.

When the parallel-moving plate82moves to the third position, the stopper member83astops at the other end of the slide hole82aand the stopper member83bstops at the other end of the slide hole82b, as shown inFIG. 15C. In the third position, light reflected by a target object is refracted at a given angle through the light-receiving surface81bof the prism81and enters the phase difference sensor13.

As described above, the prism81is moved to the second and third positions such that the phase difference sensor13can measured the distance to a target object in the right-and-left direction or the horizontal direction using the index of refraction of the prism81. In this case, center-point distance measurement for at least two points is performed using the central points of the photodetectors13aand13bof the phase difference sensor13.

The process performed after the distance measurement is the same as that in the first embodiment. Specifically, the inclination of a projected image is computed on the basis of distance measurement data of measurement points in the vertical and horizontal directions, which are obtained by the phase difference sensor13, and the distortion of the projected image is corrected in accordance with the inclination.

Though the prism81provided in front of the phase difference sensor13has to be moved, the one phase difference sensor13can measure the distances to a target object in both the vertical and horizontal directions as in the first embodiment.

Modification

In the second embodiment, the prism81whose end face is shaped like an isosceles triangle is used. However, a prism88whose end face is shaped like an isosceles trapezoid can be used as shown inFIG. 16. The prism88has four rectangular light-receiving surfaces88ato88d. Of these light-receiving surfaces, the surface88cis supported on the parallel-moving plate82in parallel with the sensing planes of photodetectors13aand13bof the phase difference sensor13.

When the prism88is set in the first position, the light-receiving surface88dof the prism88faces the sensing planes of the photodetectors13aand13bas shown inFIG. 16. The phase difference sensor13can receive light straightly reflected by a target object through the light-receiving surface88d. Unlike in the case where the prism81is used, the position need not be adjusted.

In addition to the prism81and prism88, for example, a cylindrical lens can be used. The cylindrical lens has refractive power on its one section only.

Third Embodiment

A projector according to a third embodiment of the present invention will be described.

In the third embodiment, a phase difference sensor is longitudinally fixed and arranged, and a reflecting mirror is provided in front of the phase difference sensor. The direction of the reflecting mirror is adjusted to change the direction of measurement of the phase difference sensor.

Since the circuit arrangement and data processing of the projector of the third embodiment are basically the same as those of the projector of the first embodiment, their descriptions are omitted.

FIGS. 17A to 17Care illustrations of the movement of a reflecting mirror of the projector according to the third embodiment.FIG. 17Ashows the reflecting mirror located in a first position,FIG. 17Bshows the reflecting mirror located in a second position, andFIG. 17Cshows the reflecting mirror located in a third position.

A phase difference sensor13is longitudinally fixed and arranged in a main casing11of a projector10. A reflecting mirror19is provided in front of the sensor13. The reflecting mirror19is provided above a gear92such that the angle of the mirror19with respect to the sensor13can be varied. The gear92is rotated through a worm gear94by driving a motor93.

Usually, the reflecting mirror91is so positioned that the reflection angle of the reflecting mirror91with respect to the phase difference sensor13becomes 90 degrees, as shown inFIG. 17A. This state is defined as a first position (home position).

When the distance to a target object is measured, a chart image for distance measurement is first projected and displayed. While the reflecting mirror91is set in the first position, the phase difference sensor13measures the distance in the vertical direction. In this case, multi-point distance measurement for at least two points is performed using points (e.g., both ends) other than the central point of each of the photodetectors13aand13bof the sensor13.

After that, the direction of the reflecting mirror91is changed to the second or third position to measure the distance in the horizontal direction, as shown inFIGS. 17B and 17C. As described above, the reflecting mirror91is supported on the gear92and the gear92is rotated through the worm gear94by driving the motor93. The position in which the mirror91is rotated by a given angle in one direction from the first position by the rotation of the gear92is defined as the second position, while the position in which the mirror91is rotated by a given angle in an opposite direction from the first position is defined as the third position.

If the direction of the reflecting mirror91is adjusted as described above, the phase difference sensor13can measure the distance in the right-and-left direction or the horizontal direction using the reflection property of the mirror91. In this case, center-point distance measurement for at least two points is performed using the central points of the photodetectors13aand13bof the sensor13.

The process performed after the distance measurement is the same as that in the first embodiment. Specifically, the inclination of a projected image is computed on the basis of distance measurement data of measurement points in the vertical and horizontal directions, which are obtained by the phase difference sensor13, and the distortion of the projected image is corrected in accordance with the inclination.

Though the direction of the reflecting mirror91has to be adjusted, the one phase difference sensor13can measure the distances to a target object in both the vertical and horizontal directions as in the first embodiment.

According to the present invention described above, a single phase difference sensor measures the distances in both vertical and horizontal directions. The components of the sensor can be reduced and the costs thereof can be lowered. The problem that the use of two phase difference sensors causes a difference in shape between the sensors can be resolved, and the precision of distance measurement can be prevented from decreasing.

When the phase difference sensor is longitudinally arranged and moved in the horizontal direction by a driving mechanism particularly as in the first embodiment, the distance to a target object in the horizontal direction can be measured using one point of the phase difference sensor (center-point distance measurement). The distance measurement can thus be performed correctly without being influenced by an error due to a change in shape with time.

Since the distance in the vertical direction is measured using different points of the phase difference sensor (multi-point distance measurement), the distance measurement is easily influenced by an error due to a change in shape with time. Since, however, the eyes of human beings are arranged in a right-and-left, direction, it is desirable to give higher priority to the distance measurement in the horizontal direction than that in the vertical direction. The structure for moving the phase difference sensor in the horizontal direction can be achieved more easily than that for moving it in the vertical direction.

In order to measure the distance in the vertical direction with higher precision according to the circumstances and conditions of measurement, the phase difference sensor can be arranged transversally and moved in the vertical direction.

Even though an optical member is provided on the front of a phase difference sensor and moved to change the direction of measurement of the sensor as in the second and third embodiments, the same advantages as those of the first embodiment can be obtained. Since the phase difference sensor can be fixed, it can be prevented from being displaced by, e.g., a shock and thus its measurement precision can be prevented from decreasing.

If a prism or a lens is used as the optical member as in the second embodiment, the direction of distance measurement can easily be controlled using the refraction property of the prism or lens.

If a reflecting mirror that is more inexpensive than the prism or lens is used as the optical member as in the second embodiment, the costs for the components can be lowered.

The first to third embodiments are directed to a projector. However, the present invention is not limited to the projector, but can be applied to all apparatuses necessary for distance measurement as well as an imaging device such as a digital camera. The same advantages as those of the first to third embodiments can be obtained from thee devices.

FIG. 18shows a digital camera to which the present invention is applied. InFIG. 18, reference numeral100indicates a small-sized digital camera. The camera100has a main body101. Operation keys such as a power key102and a shutter key103are provided on the top of the main body101. An optical finder window104and a shooting lens105are provided in front of the main body101.

The main body101incorporates a control unit110of a microcomputer (CPU). The control unit110includes an automatic focusing (AF) unit110aand a distance-measuring control unit110b. The AF unit110aautomatically focuses light on a target object. Focus adjustment is called focus processing. The distance-measuring control unit110bcontrols the distance-measuring operation of a distance-measuring unit107loaded in the digital camera100.

A phase difference sensor106that is a component of the distance-measuring unit107is provided close to the shooting lens105. The sensor106is arranged longitudinally and its measurement direction can be changed to the horizontal direction using any of the techniques of the first to third embodiments.

In the digital camera100so configured, the phase difference sensor106performs multi-point distance measurement for a target object in response to an instruction from the distance-measuring control unit110b. The AF unit110aperforms focus processing on the basis of the distances to measurement points obtained as the results of the multi-point distance measurement.