This application is a continuation of PCT/JP2009/062067 filed on Jul. 1, 2009, which claims priority to Japanese Application Nos. 2008-172665 filed on Jul. 1, 2008 and 2008-172737 filed on Jul. 1, 2008. The entire contents of these applications are incorporated herein by reference.
The present invention relates to a position measuring technique which measures photographing positions, photographing postures, and three-dimensional positions of objects based on moving images, and in particular, relates to a position measuring technique which reduces errors.
The theory of photogrammetry has been researched for a long time. In recent years, a position measuring technique that measures photographing positions and photographing postures of a camera and three-dimensional positions of objects based on moving images, using the theory of photogrammetry, has been proposed (see Japanese Unexamined Patent Application Publication No. 2007-171048).
The invention described in Japanese Unexamined Patent Application Publication No. 2007-171048 is directed to a method in which position of a camera is measured by a backward intersection method and position of an object is measured by a forward intersection method, when positions cannot be measured by a GPS (Global Positioning System). According to this aspect, the position measurement is not interrupted.
However, the method in which the position of the camera and the position of the object are measured based on the images tends to generate errors. For example, a technique for overcoming this problem has been proposed in Journal of Information Processing Society of Japan Vol. 0, No. 13, Hirotsugu Yokoji, pages 1 to 11.
The invention described in Journal of Information Processing Society of Japan Vol. 0, No. 13, Hirotsugu Yokoji, pages 1 to 11 is directed to a method which simultaneously minimizes an error (reprojection error) between coordinates, in which an estimated three-dimensional position is projected on the image, and coordinates detected on the image, and a position error defined by GPS positioned values.
In addition, the invention described in Japanese Unexamined Patent Application Publication No. 2006-250917 is directed to a method in which camera vector (CV) data showing the position of the camera and three-dimensional rotational position of the object based on video images, and position measured data of a moving object, are synchronized in time by reference time and are compared on the same time axis, and they are complementarily corrected.
The present invention was completed in consideration of the above problems, and objects thereof are to provide a position measuring technique that measures photographing positions, photographing postures, and three-dimensional positions of objects based on moving images and which reduces errors.
The present invention according to claim 1 is characterized in that a position measurement method includes: an initial value calculating step for calculating initial values of exterior orientation parameters, which are a photographing position and a photographing posture, based on known points in an initial image or a photographing position and/or a photographing posture measured outside; an exterior orientation parameter-calculating step for calculating exterior orientation parameters, based on known points in a moving image which follows the initial image used in the initial value calculating step, or characteristic points in which three-dimensional coordinates are already calculated; an exterior orientation parameter correcting step for correcting the exterior orientation parameters calculated in the exterior orientation parameter-calculating step, based on a difference between photographing timing of the image and obtaining timing of the photographing position and/or the photographing posture measured outside; a bundle-adjusting step for simultaneously adjusting a bundle of the exterior orientation parameters of one or more images and the three-dimensional coordinates of the characteristic points, based on the exterior orientation parameters corrected in the exterior orientation parameter correcting step; a three-dimensional coordinate calculating step for calculating three-dimensional coordinates of characteristic points which are subsequently detected in an area in which the density of the characteristic points is decreased, based on the exterior orientation parameters adjusted bundle thereof; and a repeating step for repeating processing from the exterior orientation parameter-calculating step to the three-dimensional coordinate calculating step until the image becomes a final image.
According to the invention according to claim 1, the exterior orientation parameters are suitably corrected, even when the photographing timing of the image and the obtaining timing of the photographing position and/or the photographing posture measured outside are not synchronized, and therefore, the errors are decreased.
The present invention according to claim 2 is characterized in that in the invention according to claim 1, the exterior orientation parameter correcting step corrects the exterior orientation parameters, based on the difference between the photographing timing of the image and the obtaining timing of the photographing position and/or the photographing posture measured outside, and based on accuracy of the photographing position and/or the photographing posture measured outside.
According to the invention according to claim 2, the exterior orientation parameters calculated from the image are corrected in consideration of specific accuracy of the photographing position and/or the photographing posture measured outside.
The present invention according to claim 3 is characterized in that in the invention according to claim 2, the accuracy of the photographing position measured outside is positioning accuracy of each positioning mode of a RTK-GPS (Real Time Kinematic Global Positioning System), and threshold value for correcting the exterior orientation parameters is changed based on the positioning mode.
In the invention according to claim 3, the RTK-GPS changes the positioning mode in real time, based on position of a GPS satellite, multipath affected by surrounding conditions, correction information from a control station, and the like, which may affect the accuracy. Therefore, the exterior orientation parameters are suitably corrected by changing the threshold for correcting the exterior orientation parameters based on the positioning mode.
The present invention according to claim 4 is characterized in that in the invention according to claim 2, the accuracy of the photographing posture measured outside is accuracy based on measuring time of the photographing posture.
In the invention according to claim 4, the photographing posture measured outside tends to accumulate error by measuring time in a measurement principle. Therefore, the exterior orientation parameters are suitably corrected by considering the accuracy based on the measuring time of the photographing posture.
The present invention according to claim 5 is characterized in that in the invention according to claim 1, the bundle-adjusting step bundle-adjusts the photographing position and/or the photographing posture measured outside and the exterior orientation parameters and the three-dimensional coordinates of the characteristic points by calculating weights thereof and by weighting each data.
According to the invention according to claim 5, the photographing position and/or the photographing posture measured outside is simultaneously bundle-adjusted also in addition to the exterior orientation parameters and the three-dimensional coordinates of the characteristic points. In this case, data having low accuracy are lightly processed and data having high accuracy are heavily processed, since the data are weighted to bundle-adjust. As a result, the errors of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are decreased.
The present invention according to claim 6 is characterized in that in the invention according to claim 5, the weight of the photographing position and/or the photographing posture measured outside is calculated, based on the difference between the photographing timing of the image and the obtaining timing of the photographing position and/or the photographing posture measured outside.
According to the invention according to claim 6, the errors of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are decreased, even when the photographing timing of the image and the obtaining timing of the photographing position and/or the photographing posture measured outside are not synchronized.
The present invention according to claim 7 is characterized in that in the invention according to claim 5, the weights of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are calculated, based on residual between image coordinates of corresponding points calculated by tracking the characteristic points and image coordinates which project three-dimensional coordinates of the corresponding points on the image.
In the invention according to claim 7, the accuracy of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points calculated from the images remarkably tends to depend on the tracking accuracy of the characteristic points. The residual according to claim 7 represents the tracking accuracy. Therefore, the errors of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are decreased by changing the residual to the weights of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points.
The present invention according to claim 8 is characterized in that in the invention according to claim 5, the bundle-adjusting step is performed before calculation of the three-dimensional coordinates of the characteristic points subsequently detected or after calculation of the three-dimensional coordinates of the characteristic points subsequently detected.
According to the invention according to claim 8, when the bundle-adjusting step is performed before the calculation of the three-dimensional coordinates of the characteristic points subsequently detected, the calculation accuracy of the three-dimensional coordinates of the characteristic points subsequently detected is improved. On the other hand, when the bundle-adjusting step is performed after the calculation of the three-dimensional coordinates of the characteristic points subsequently detected, the three-dimensional coordinates of the characteristic points subsequently detected are calculated based on the corrected exterior orientation parameters, and as a result, a similar effect is obtained.
The present invention according to claim 9 is characterized in that the invention according to claim 1 further includes a miscorresponding point removing step for removing miscorresponding points, based on residual between the image coordinates of the corresponding points calculated by tracking the characteristic points and the image coordinates which project the three-dimensional coordinates of the corresponding points on the image.
According to the invention according to claim 9, the errors of the exterior orientation parameters and the characteristic points of the three-dimensional coordinates are reduced, since the miscorresponding points are removed even when the miscorresponding points are included in a tracked result of the characteristic points.
The present invention according to claim 10 is characterized in that the invention according to claim 1 further includes a miscorresponding point removing step for projecting three-dimensional coordinates of corresponding points in prior and subsequent images on a stereo image and for removing miscorresponding points based on difference of coordinate values in a direction intersecting a baseline direction of prior and subsequent stereo images at right angle.
According to the invention according to claim 10, the errors of the exterior orientation parameters and the characteristic points of the three-dimensional coordinates are reduced, since the miscorresponding points are removed even when the miscorresponding points are included in a tracked result of the characteristic points.
The present invention according to claim 11 is characterized in that in the invention according to claim 9 or 10, the miscorresponding point removing step is performed after the bundle-adjusting step or before the exterior orientation parameter-calculating step.
According to the invention according to claim 11, when the miscorresponding point removing step is performed after the bundle-adjusting step, the calculation accuracy of the exterior orientation parameters of subsequent images is improved. On the other hand, when the miscorresponding point removing step is performed before the exterior orientation parameter-calculating step, the errors of the exterior orientation parameters are decreased, since the exterior orientation parameters are not calculated based on the miscorresponding points.
The present invention according to claim 12 is characterized in that in the invention according to claim 9 or 10, the miscorresponding point removing step according to claim 9 or 10 is selected based on change in photographing conditions.
According to the invention according to claim 12, the exterior orientation parameters and the three-dimensional coordinates of the characteristic points can be calculated without depending on the change of the photographing conditions.
The present invention according to claim 13 is characterized in that in the invention according to claim 9 or 10, the miscorresponding point removing step estimates a threshold value by an LMedS estimation method.
According to the invention according to claim 13, compared to a least-squares method, the LMedS estimation method can robustly estimate outliers, even when the data includes numerous outliers. Therefore, the errors of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are decreased.
The present invention according to claim 14 is characterized in that a position measurement program runs the following steps includes: an initial value calculating step for calculating initial values of exterior orientation parameters, which are a photographing position and a photographing posture, based on known points in an initial image or a photographing position and/or a photographing posture measured outside; an exterior orientation parameter-calculating step for calculating exterior orientation parameters, based on known points in a moving image which follows the initial image used in the initial value calculating step, or characteristic points in which three-dimensional coordinates are already calculated; an exterior orientation parameter correcting step for correcting the exterior orientation parameters calculated in the exterior orientation parameter-calculating step, based on difference between photographing timing of the image and obtaining timing of the photographing position and/or the photographing posture measured outside; a bundle-adjusting step for simultaneously adjusting a bundle of the exterior orientation parameters of one or more images and the three-dimensional coordinates of the characteristic points, based on the exterior orientation parameters corrected in the exterior orientation parameter correcting step; a three-dimensional coordinate calculating step for calculating three-dimensional coordinates of characteristic points subsequently detected in an area in which the density of the characteristic points is decreased, based on the exterior orientation parameters adjusted bundle thereof; and a repeating step for repeating processing from the exterior orientation parameter-calculating step to the three-dimensional coordinate calculating step until the image becomes a final image.
According to the invention according to claim 14, the exterior orientation parameters are suitably corrected, even when the photographing timing of the image and the obtaining timing of the photographing position and/or the photographing posture measured outside are not synchronized, and therefore, the errors are decreased.
The present invention according to claim 15 is characterized in that a position measurement device includes: a moving image obtaining unit for obtaining a moving image that is photographed by relatively shifting a photographing section and a photographed object incrementally; a characteristic point detecting and tracking unit for sequentially inputting the images obtained by the moving image obtaining unit and for detecting and tracking characteristic points from the images; a position measuring unit for measuring photographing position of the moving image obtaining unit from the outside; a posture measuring unit for measuring photographing posture of the moving image obtaining unit from the outside; and a computer processing unit for inputting the moving image obtained by the moving image obtaining unit, the characteristic points detected and tracked by the characteristic point detecting and tracking unit, the photographing position measured by the position measuring unit, and the photographing posture measured by the posture measuring unit, and for calculating exterior orientation parameters, which are the photographing position and the photographing posture of the moving image, and three-dimensional coordinates of the characteristic points. The computer processing unit includes: an initial value calculating section for calculating initial values of the exterior orientation parameters, which are a photographing position and a photographing posture, based on known points in an initial image or the photographing position measured by the position measuring unit and the photographing posture measured by the posture measuring unit; an exterior orientation parameter calculating section for calculating exterior orientation parameters based on known points in a moving image which follows the initial image used in the initial value calculating section, or characteristic points in which three-dimensional coordinates are already calculated; an exterior orientation parameter correcting section for correcting the exterior orientation parameters calculated by the exterior orientation parameter calculating section, based on difference between photographing timing of the image and obtaining timing of the photographing position measured by the position measuring unit and/or the photographing posture measured by the posture measuring unit; a bundle adjusting section for simultaneously adjusting a bundle of the exterior orientation parameters of one or more images and the three-dimensional coordinates of the characteristic points, based on the exterior orientation parameters corrected by the exterior orientation parameter correcting section; and a three-dimensional coordinate calculating section for calculating three-dimensional coordinates of characteristic points subsequently detected in an area in which the density of the characteristic points is decreased, based on the exterior orientation parameters adjusted bundle thereof. The process from the exterior orientation parameter calculating section to the three-dimensional coordinate calculating section is repeated until the image becomes a final image.
According to the invention according to claim 15, the exterior orientation parameters are suitably corrected even when the photographing timing of the image and the obtaining timing of the photographing position and/or the photographing posture measured outside are not synchronized, and therefore, the errors are decreased.
The present invention according to claim 16 is characterized in that a position measurement method includes: an initial value calculating step for calculating initial values of exterior orientation parameters, which are a photographing position and a photographing posture, based on known points in an initial image or a photographing position and/or a photographing posture measured outside; an exterior orientation parameter-calculating step for calculating exterior orientation parameters, based on known points in a moving image which follows the initial image used in the initial value calculating step, or characteristic points in which three-dimensional coordinates are already calculated; an exterior orientation parameter evaluating step for evaluating the exterior orientation parameters calculated in the exterior orientation parameter-calculating step, based on at least one selected from the group consisting of track directions of the characteristic points, track distances of the characteristic points, a distribution rate of the characteristic points, an overlapping rate of the characteristic points, and a vertical parallax; a bundle-adjusting step for simultaneously adjusting a bundle of the exterior orientation parameters of one or more images and the three-dimensional coordinates of the characteristic points, based on the exterior orientation parameters corrected in the exterior orientation parameter evaluating step; a three-dimensional coordinate calculating step for calculating three-dimensional coordinates of characteristic points subsequently detected in an area in which the density of the characteristic points is decreased, based on the exterior orientation parameters adjusted bundle thereof; and a repeating step for repeating processing from the exterior orientation parameter-calculating step to the three-dimensional coordinate calculating step until the image becomes a final image.
According to the invention according to claim 16, change of photographing scenes or shift of photographing unit can be evaluated based on at least one selected from the group consisting of the track directions of the characteristic points, the track distances of the characteristic points, the distribution rate of the characteristic points, the overlapping rate of the characteristic points, and the vertical parallax. The change of photographing scenes and the shift of photographing unit make difficult to track the characteristic points, and decrease the accuracy of the exterior orientation parameters calculated from the images. Therefore, when the change of photographing scenes or the shift of photographing unit is relatively large, the exterior orientation parameters calculated from the images are evaluated to have low reliability, and in contrast, when the change of photographing scenes or the shift of photographing unit is relatively small, the exterior orientation parameters calculated from the images are evaluated to have high reliability.
In the case in which the exterior orientation parameters calculated from the images are evaluated to have low reliability, the photographing position and the photographing posture measured outside are used, and the exterior orientation parameters calculated from the images are not used. According to this aspect, the errors due to the change of photographing scenes and the shift of photographing unit can be decreased.
The present invention according to claim 17 is characterized in that in the invention according to claim 16, the track directions of the characteristic points and the track distances of the characteristic points are calculated based on difference between tracks of corresponding points which correspond to the characteristic points in a prior image and tracks of the characteristic points subsequently detected in an image to be processed.
According to the invention according to claim 17, the change of the photographing scenes and the shift of the photographing unit can be easily detected. In the current image to be processed, there are the corresponding points which correspond to the characteristic points in the prior image and the characteristic points subsequently detected. In the case in which the photographing scene changes or the photographing unit shifts, the track direction and the track distance of the corresponding points are different from those of the subsequently detected characteristic points.
The present invention according to claim 18 is characterized in that in the invention according to claim 16, the distribution rate of the characteristic points and the overlapping rate of the characteristic points are calculated by using total value of X coordinates and/or Y coordinates of the characteristic points when an origin is set at the center of the image.
According to the invention according to claim 18, the change of photographing scenes or the shift of the photographing unit can be easily detected.
The present invention according to claim 19 is characterized in that in the invention according to claim 16, the exterior orientation parameter evaluating step evaluates the exterior orientation parameters based on a value obtained by multiplying more than one value selected from the group consisting of the track directions of the characteristic points, the track distances of the characteristic points, the distribution rate of the characteristic points, the overlapping rate of the characteristic points, and the vertical parallax.
According to the invention according to claim 19, the change of photographing scenes or the shift of the photographing unit can be detected by one parameter.
The present invention according to claim 20 is characterized in that in the invention according to claim 16, the bundle-adjusting step bundle-adjusts the photographing position and/or the photographing posture measured outside and the exterior orientation parameters and the three-dimensional coordinates of the characteristic points by calculating weights thereof and by weighting each data.
According to the invention according to claim 20, the photographing position and/or the photographing posture measured outside is simultaneously bundle-adjusted also in addition to the exterior orientation parameters and the three-dimensional coordinates of the characteristic points. In this case, data having low accuracy are lightly processed and data having high accuracy are heavily processed, since the data are weighted to bundle-adjust. As a result, the errors of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are decreased.
The present invention according to claim 21 is characterized in that in the invention according to claim 20, the weight of the photographing position and/or the photographing posture measured outside is calculated based on difference between photographing timing of the image and obtaining timing of the photographing position and/or the photographing posture measured outside.
According to the invention according to claim 21, the errors of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are decreased even when the photographing timing of the image and the obtaining timing of the photographing position and/or the photographing posture measured outside are not synchronized.
The present invention according to claim 22 is characterized in that in the invention according to claim 20, the weights of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are calculated based on at least one selected from the group consisting of the track directions of the characteristic points, the track distances of the characteristic points, the distribution rate of the characteristic points, the overlapping rate of the characteristic points, and the vertical parallax.
According to the invention according to claim 22, the errors of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are decreased.
The present invention according to claim 23 is characterized in that in the invention according to claim 20, the bundle-adjusting step is performed before the calculation of the three-dimensional coordinates of the characteristic points subsequently detected or after the calculation of the three-dimensional coordinates of the characteristic points subsequently detected.
According to the invention according to claim 23, when the bundle-adjusting step is performed before the three-dimensional coordinates of the characteristic points subsequently detected is calculated, the calculation accuracy of the three-dimensional coordinates of the characteristic points subsequently detected is improved. On the other hand, when the bundle-adjusting step is performed after the three-dimensional coordinates of the characteristic points subsequently detected is calculated, the three-dimensional coordinates of the characteristic points subsequently detected is calculated based on the evaluated exterior orientation parameters, and as a result, a similar effect is obtained.
The present invention according to claim 24 is characterized in that the invention according to claim 16 further includes a miscorresponding point removing step for removing miscorresponding points based on residual between image coordinates of corresponding points calculated by tracking the characteristic points and image coordinates which project three-dimensional coordinates of the corresponding points on the image.
According to the invention according to claim 24, the errors of the exterior orientation parameters and the characteristic points of the three-dimensional coordinates are reduced, since the miscorresponding points are removed even when the miscorresponding points are included in a tracked result of the characteristic points.
The present invention according to claim 25 is characterized in that the invention according to claim 16 further includes a miscorresponding point removing step for projecting three-dimensional coordinates of corresponding points in prior and subsequent images on a stereo image and for removing miscorresponding points based on difference of coordinate values in a direction intersecting a baseline direction of prior and subsequent stereo images at right angle.
According to the invention according to claim 25, the errors of the exterior orientation parameters and the characteristic points of the three-dimensional coordinates are reduced, since the miscorresponding points are removed even when the miscorresponding points are included in a tracked result of the characteristic points.
The present invention according to claim 26 is characterized in that in the invention according to claim 24 or 25, the miscorresponding point removing step is performed after the bundle-adjusting step or before the exterior orientation parameter-calculating step.
According to the invention according to claim 26, when the miscorresponding point removing step is performed after the bundle-adjusting step, the calculation accuracy of the exterior orientation parameters of subsequent images is improved. On the other hand, when the miscorresponding point removing step is performed before the exterior orientation parameter-calculating step, the errors of the exterior orientation parameters are decreased, since the exterior orientation parameters are not calculated based on the miscorresponding points.
The present invention according to claim 27 is characterized in that in the invention according to claim 24 or 25, the miscorresponding point removing step according to claim 24 or 25 is selected based on change in photographing conditions.
According to the invention according to claim 27, the exterior orientation parameters and the three-dimensional coordinates of the characteristic points can be calculated without depending on the change of the photographing conditions.
The present invention according to claim 28 is characterized in that in the invention according to claim 24 or 25, the miscorresponding point removing step estimates threshold value by an LMedS estimation method.
According to the invention according to claim 28, compared to a least-squares method, the LMedS estimation method can robustly estimate outliers even when the data includes numerous outliers. Therefore, the errors of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are decreased.
The present invention according to claim 29 is characterized in that a position measurement program runs the following steps including: an initial value calculating step for calculating initial values of exterior orientation parameters, which are a photographing position and a photographing posture, based on known points in an initial image or a photographing position and/or a photographing posture measured outside; an exterior orientation parameter-calculating step for calculating exterior orientation parameters based on known points in a moving image which follows the initial image used in the initial value calculating step, or characteristic points in which three-dimensional coordinates are already calculated; an exterior orientation parameter evaluating step for evaluating the exterior orientation parameters calculated in the exterior orientation parameter-calculating step based on at least one selected from the group consisting of track directions of the characteristic points, track distances of the characteristic points, a distribution rate of the characteristic points, an overlapping rate of the characteristic points, and a vertical parallax; a bundle-adjusting step for simultaneously adjusting a bundle of the exterior orientation parameters of one or more images and the three-dimensional coordinates of the characteristic points, based on the exterior orientation parameters corrected in the exterior orientation parameter evaluating step; a three-dimensional coordinate calculating step for calculating three-dimensional coordinates of characteristic points subsequently detected in an area in which the density of the characteristic points is decreased, based on the exterior orientation parameters adjusted bundle thereof; and a repeating step for repeating processing from the exterior orientation parameter-calculating step to the three-dimensional coordinate calculating step until the image becomes a final image.
According to the invention according to claim 29, change of photographing scenes or shift of photographing unit can be evaluated, based on at least one selected from the group consisting of the track directions of the characteristic points, the track distances of the characteristic points, the distribution rate of the characteristic points, the overlapping rate of the characteristic points, and the vertical parallax. Therefore, the errors due to the change of photographing scenes or the shift of photographing unit can be decreased.
The present invention according to claim 30 is characterized in that a position measurement device includes a moving image obtaining unit for obtaining a moving image that is photographed by relatively shifting a photographing section and a photographed object incrementally; a characteristic point detecting and tracking unit for sequentially inputting images obtained by the moving image obtaining unit and for detecting and tracking the characteristic points from the images; a position measuring unit for measuring photographing position of the moving image obtaining unit from the outside; a posture measuring unit for measuring photographing posture of the moving image obtaining unit from the outside; and a computer processing unit for inputting the moving image obtained by the moving image obtaining unit, the characteristic points detected and tracked by the characteristic point detecting and tracking unit, the photographing position measured by the position measuring unit, and the photographing posture measured by the posture measuring unit, and for calculating exterior orientation parameters, which are the photographing position and the photographing posture of the moving image, and three-dimensional coordinates of the characteristic points. The computer processing unit includes an initial value calculating section for calculating initial values of the exterior orientation parameters, which are a photographing position and a photographing posture, based on known points in an initial image or the photographing position measured by the position measuring unit and the photographing posture measured by the posture measuring unit; an exterior orientation parameter calculating section for calculating exterior orientation parameters, based on known points in a moving image which follows the initial image used in the initial value calculating section, or characteristic points in which three-dimensional coordinates are already calculated; exterior orientation parameters evaluating section for evaluating the exterior orientation parameters calculated by the exterior orientation parameter calculating section, based on at least one selected from the group consisting of track directions of the characteristic points, track distances of the characteristic points, a distribution rate of the characteristic points, an overlapping rate of the characteristic points, and a vertical parallax; a bundle adjusting section for simultaneously adjusting a bundle of the exterior orientation parameters of one or more images and the three-dimensional coordinates of the characteristic points, based on the exterior orientation parameters corrected by the exterior orientation parameters evaluating section; and a three-dimensional coordinate calculating section for calculating three-dimensional coordinates of characteristic points subsequently detected in an area in which the density of the characteristic points is decreased, based on the exterior orientation parameters adjusted bundle thereof. The process from the exterior orientation parameter calculating section to the three-dimensional coordinate calculating section is repeated until the image becomes a final image.
According to the invention according to claim 30, change of photographing scenes or shift of photographing unit can be evaluated, based on at least one selected from the group consisting of the track directions of the characteristic points, the track distances of the characteristic points, the distribution rate of the characteristic points, the overlapping rate of the characteristic points, and the vertical parallax. Therefore, the errors due to the change of photographing scenes or the shift of photographing unit can be decreased.
According to the present invention, in the position measuring technique which measures photographing positions, photographing postures, and three-dimensional positions of objects based on moving images, the errors can be reduced.
1. First Embodiment
An example of a position measurement method, a position measurement device, and a program therefor will be described with reference to the drawings hereinafter.
Structure of a Position Measurement Device
The moving image obtaining unit 2 includes a camera for taking moving images, such as a video camera, a CCD camera (Charge Coupled Device Camera) for industrial measurement, and a CMOS camera (Complementary Metal Oxide Semiconductor Camera). The moving image obtaining unit 2 may include a camera for taking still images. In this case, an object is photographed while the object and the camera are relatively shifted incrementally, and plural still images are obtained.
The characteristic point detecting and tracking unit 3 is made of a characteristic point detecting section 8 and a characteristic point tracking section 9. The characteristic point detecting section 8 detects characteristic points from a moving image obtained by the moving image obtaining unit 2. The characteristic point tracking section 9 tracks corresponding points, which correspond to the characteristic points detected by the characteristic point detecting section 8, in another image. The characteristic point detecting section 8 and the characteristic point tracking section 9 are mounted in the form of firmware such as ASIC (Application Specific Integrated Circuit) and FPGA (Field Programmable Gate Array). The characteristic point detecting section 8 and the characteristic point tracking section 9 may be made of software which is executed on a general-purpose computer.
The position measuring unit 4 is made of a GPS (Global Positioning System) receiver, an IMU (Inertial Measurement Unit), and the like. The position measuring unit 4 is used for measuring a position of a camera (projection center). By combining the GPS and the IMU based on photographing conditions, exterior orientation parameters calculated from an image are appropriately corrected. The offset between the mounting position of the position measuring unit 4 and the mounting position of the camera is preliminarily set.
The posture measuring unit 5 is made of a posture sensor such as a gyroscope, an IMU, an acceleration meter, an angular rate meter, an angular accelerometer, and combinations thereof. By combining these measuring parts based on photographing conditions, the exterior orientation parameters calculated from an image are appropriately corrected. The posture measuring unit 5 is used for measuring posture of the camera.
The reference clock 6 is made of a crystal oscillator, a rubidium oscillator, a radio-controlled clock, or the like. The reference clock 6 converts the time of the moving image obtaining unit 2, the time of the position measuring unit 4, and the time of the posture measuring unit 5, to have the same time axis.
The computer processing unit 7 is made of a PC (Personal Computer). The computer processing unit 7 includes a controlling and calculating unit 10 and a memory unit 11. The controlling and calculating unit 10 is made of a CPU (Central Processing Unit), and the memory unit 11 is made of a semiconductor memory device such as a RAM (Random Access Memory) and a ROM (Read Only Memory), a magnetic-storage device, or the like. The memory unit 11 stores operating systems and position measurement programs, and the controlling and calculating unit 10 reads and executes the programs.
The position measurement program is made of an initial value calculating section 12, an exterior orientation parameter calculating section 13, an exterior orientation parameter correcting section 14, a bundle adjusting section 15, a three-dimensional coordinate calculating section 16, a miscorresponding point removing section 17, a detail measuring section 18, and an exterior orientation parameter and three-dimensional coordinate outputting section 19. The position measurement program can be provided by recording media such as a CD-ROM.
The initial value calculating section 12 calculates initial values of interior orientation parameters of the camera (focal point distance, principal point position (misalignment of center of optical axis), lens distortion coefficient) and exterior orientation parameters (position and posture of the camera). This calculation is based on three-dimensional coordinates of a reference point measured by a total station or a GPS, and is also based on image coordinates of the reference point in an image in which the reference point is photographed.
The exterior orientation parameter calculating section 13 calculates exterior orientation parameters based on a backward intersection method or a relative orientation method. In the backward intersection method, directions from an unknown point to at least three known points are observed, and the position of the unknown point is fixed as an intersection point of these directional lines. As the backward intersection method, a single photo orientation or a DLT method (Direct Linear Transformation Method) may be used.
The exterior orientation parameter correcting section 14 corrects the exterior orientation parameters calculated from the image, according to the difference of the photographing timing of the image and the obtaining timing of the positional data and the postural data. The positional data is obtained by the position measuring unit 4 and the postural data is obtained by the posture measuring unit 5.
The bundle adjusting section 15 adjusts the corrected exterior orientation parameters and the three-dimensional coordinates of the characteristic points in one or more images, or all images, at the same time.
The three-dimensional coordinate calculating section 16 calculates three-dimensional coordinates of subsequently detected characteristic points based on a forward intersection method. In the forward intersection method, directions from at least two known points to an unknown point are observed, and the position of the unknown point is fixed as an intersection point of these directional lines. The bundle adjustment is performed before or after the calculation of the three-dimensional coordinates of the subsequently detected characteristic points.
The miscorresponding point removing section 17 removes points having relatively large error among tracked corresponding points by a backward projection or by using vertical parallaxes calculated from a relative orientation. In the backward projection, error points are removed according to residual values of image coordinates, which are calculated from the three-dimensional coordinates of the characteristic points based on the backward intersection method, and image coordinates of the tracked corresponding points. In the relative orientation, exterior orientation parameters are calculated by using at least six corresponding points in right and left images. The vertical parallax is a difference of y-coordinates of corresponding points in two images that are stereographed, that is, a difference of coordinate values in a direction intersecting a baseline direction of the stereo images at a right angle. The stereo images are a pair of images and are made of two images photographed by cameras in a condition in which the optical axes are parallel, and directions intersecting a baseline direction at a right angle are parallel.
The detail measuring section 18 executes three-dimensional modeling. The three-dimensional modeling is used for forming a three-dimensional object of a photographed object. The detail measuring section 18 calculates contours and surfaces from the three-dimensional coordinates of the characteristic points and thereby forming a wire-frame model and a surface model. The surface model has surfaces to which two-dimensional images are texture-mapped. Moreover, the detail measuring section 18 performs texture analysis based on the mapped texture and calculates three-dimensional coordinates of characteristic portions of the texture. The three-dimensional coordinates of the characteristic portions of the texture are bundle adjusted and are corrected to be optimum value.
The exterior orientation parameter and three-dimensional coordinate outputting section 19 outputs data of the exterior orientation parameters and data of the three-dimensional coordinates of the characteristic points or the characteristic portions of the texture.
Operation of the Position Measurement Device
Next, overall operation of a position measurement device will be described.
First, the moving image obtaining unit 2 obtains moving images (step S1). The moving images are plural continuous images photographed by relatively shifting the moving image obtaining unit 2 and an object incrementally. The plural continuous images are sequentially input to the characteristic point detecting and tracking unit 3.
The characteristic point detecting section 8 detects characteristic points in the image input to the characteristic point detecting and tracking unit 3 (step S2). In the detection of the characteristic points, a filter such as a Moravec filter, a Laplacian filter, and a Sobel filter, is used. Then, the characteristic point tracking section 9 tracks corresponding points, which correspond to the characteristic points, in a subsequent image (step S3). In the tracking of the characteristic points, template matching is used. As the template matching, a SSDA method (Sequential Similarity Detection Algorithm) or a cross-correlation coefficient method may be used.
In the image in which the characteristic points are tracked, the characteristic point detecting section 8 detects more characteristic points in an area in which the density of the characteristic points is decreased. The step S2 for detecting characteristic points and the step S3 for tracking the characteristic points are repeated in the continuous images. The information related to the characteristic points is embedded in each image. The image embedded with the information related to the characteristic points is sequentially output to the computer processing unit 7. The details of the processes of the step S2 and the step S3 are disclosed in Japanese Patent Application Laid-Open No. 2007-147457 and Japanese Patent Application Laid-Open No. 2007-183256.
Then, in the computer processing unit 7, initial values of interior orientation parameters and exterior orientation parameters of the camera are calculated from an image photographed with a reference point (step S4). Before the step S4, an operator needs to set a reference point in an objective space and photograph the reference point. In addition, the operator needs to measure three-dimensional coordinates of the reference point in a real space by a total station or a GPS. In the calculation of the initial values in the step S4, the operator calculates initial values of interior orientation parameters and exterior orientation parameters of the camera by the backward intersection method based on the three-dimensional coordinates and the image coordinates of the reference point. Alternatively, the initial values of the exterior orientation parameters may be calculated from stereo images photographed at plural positions, by using the total station or the GPS for providing three-dimensional coordinate values of the plural positions instead of the three-dimensional coordinate values of the characteristic points.
Alternatively, the operator may photograph plural images by moving a reference plate, in which plural reference points are drawn, without using the total station and the GPS. The distances between the reference points drawn in the reference plate are known values. In this case, in the calculation of the initial values in the step S4, image coordinates of the reference points are calculated from the plural images, which are photographed with the reference points, and the initial values of the position and the posture of the camera are obtained by using relative orientation. It should be noted that the coordinates are in a local coordinate system.
Next, exterior orientation parameters, and three-dimensional coordinates of the subsequently detected characteristic points, are calculated in each of the images that were input (step S5). In the calculation of the exterior orientation parameters, the backward intersection method or the relative orientation method is used. In the calculation of the three-dimensional coordinates of the subsequently detected characteristic points, the forward intersection method is used. This process is performed on all of the images. The detail of this process will be described later.
In order to measure more detail (step S6), a detail measurement is performed (step S8). In the detail measurement, a formation of a wire-frame model, a formation of a surface model, a texture mapping, and a texture analysis are performed. In the texture analysis, three-dimensional coordinates of characteristic portions of a texture are calculated. The three-dimensional coordinates of the characteristic portions of the texture, and also the exterior orientation parameters and the three-dimensional coordinates of the characteristic points, which are calculated in the step S5, are bundle adjusted and are corrected to be optimum values. After this calculation, the data of the exterior orientation parameters and the three-dimensional coordinates are output (step S7).
The process of calculating the three-dimensional coordinates and the exterior orientation parameters in the step S5 relating to the present invention will be described in detail hereinafter. As shown in
The bundle adjustment (step S12) may be performed before the calculation of the three-dimensional coordinates of the subsequently detected characteristic points (
(Step S10) Calculation of the Exterior Orientation Parameters
Single Photo Orientation
In the single photo orientation, a position O (X0, Y0, Z0) and a posture (ω, φ, κ) of a camera, which is used for taking a photograph, are calculated by using a collinearity condition formed on a reference point in the photograph. The collinearity condition is a condition in which a projection center, a photographic image, and objective points (Op1P1, Op2P2, Op3P3) on the ground are on one straight line. The position O (X0, Y0, Z0) of the camera and the posture (ω, φ, κ) of the camera are exterior orientation parameters.
First, the camera coordinate system is assumed to be (x, y, z), the photographic coordinate system is assumed to be (x, y), and the ground coordinate system is assumed to be (X, Y, Z). It is assumed that photographs are taken by turning the camera to left by ω, φ, κ with respect to the positive direction in each coordinate axis in series. Next, three-dimensional coordinates of reference points corresponding to 4 image coordinates (only 3 points are shown in
By using the parameters b1 to b8 in the first formula, exterior orientation parameters are calculated from the following second formula.
ω=tan−1(C·b8)
φ=tan−1(−C·b7·cos ω)
κ=tan−1(−b4/b1) (φ=0)
κ=tan−1(−b2/b5) (φ≠0, ω=0)
κ=tan−1{−(A1·A3−A2·A4)/(A1·A2−A3·A4)}(φ≠0, ω≠0)
Z0=C·cos ω{(A22+A32)/(A12+A42)}1/2+Zm
X0=b3−(tan ω·sin κ/cos φ−tan φ·cos κ)×(Zm−Z0)
Y0=b6−(tan ω·cos κ/cos φ−tan φ·sin κ)×(Zm−Z0) Second formula
The DLT method approximates a relationship between image coordinates and three-dimensional coordinates of an objective space by using a third degree perspective projection formula. The basic formula of the DLT method is the following third formula. The detail of the DLT method may be found in “Shunji Murai: Analytical Photogrammetry, pages 46 to 51 and pages 149 to 155”.
By deleting the denominator in the third formula, a linear formula of a fourth formula is derived.
XL1+YL2+ZL3+L4−xXL9−xYL10−xZL11=x
XL5+YL6+ZL7+L8−yXL9−yYL10−yZL11=y Fourth Formula
Moreover, the fourth formula is converted into the following fifth formula.
By substituting three-dimensional coordinates of at least six the reference points for the fifth formula and by solving with the least-squares method, 11 of unknown variables from L1 to L11 that determine the relationship between the photographic coordinates and the object coordinates are obtained. The L1 to L11 include the exterior orientation parameters.
Next, a calculation of exterior orientation parameters using a relative orientation method will be described. In the relative orientation, relative exterior orientation parameters are obtained even without known points. If there are known points, absolute coordinates are obtained by performing an absolute orientation.
Relative Orientation
As shown in
κ1: Left camera's rotary angle about Z-axis
φ1: Left camera's rotary angle about Y-axis
κ2: Right camera's rotary angle about Z-axis
φ2: Right camera's rotary angle about Y-axis
ω2: Right camera's rotary angle about X-axis
Here, the following relationship for converting coordinates is formed between the model coordinate system XYZ and the camera coordinate system xyz.
Unknown parameters (exterior orientation parameters) are calculated by using the above-described formula according to the steps described below.
When the relative orientation is converged, a successive orientation is then performed. In the successive orientation, the tilt and the scale between each model are unified so as to be in the same coordinate system. When this process is performed, successive differences shown in the following ninth formula are calculated. As a result, if the successive differences ΔZj and ΔDj are not more than predetermined values (for example, 0.0005 ( 1/2000)), it is evaluated that the successive orientation is completed normally.
ΔXi=(Xj r−Xj 1)/(Z0−Zj 1)
ΔYj=(Yj r−Yj 1)/(Z0−Zj 1)
ΔZj=(Zj r−Zj 1)/(Z0−Zj 1)
ΔDj=√{square root over ((ΔXj2+ΔYj2))} Ninth Formula
(Xj 1, Yj 1, Zj 1): The j-th left model in the unified coordinate system
(Xj r, Yj r, Zj r): The j-th right model in the unified coordinate system
(Step S11) Correction of the Exterior Orientation Parameters
Next, the exterior orientation parameters are corrected. The positional data of the position measuring unit 4 and the postural data of the posture measuring unit 5 include the difference between the photographing timing of the image and the obtaining timings of the positional data of the position measuring unit 4 or the postural data of the posture measuring unit 5. The exterior orientation parameters are corrected after this positional data of the position measuring unit 4 and this postural data of the posture measuring unit 5 are evaluated. The method for correcting the exterior orientation parameters (position and posture of the camera) will be described hereinafter.
Correction of the Position of the Camera
The positional data obtained from the position measuring unit 4 (a GPS or an IMU) have specific accuracy according to each device. For example, when the accuracy is represented as σ, 2σ, 3σ, or the like is used for evaluation values (threshold values) of the positional data of the GPS and the IMU. The positional data of the GPS and the IMU include the error based on the difference between the photographing timing of the image and the obtaining timing of the positional data of the GPS and the IMU. If the positional data of the GPS and the IMU are out of the range of the threshold value, the position of the camera calculated from the image is selected. On the other hand, if these positional data of the GPS and the IMU are in the range of the threshold value, the positional data of the GPS and the IMU are selected. The offset between the mounting position of the camera and the mounting position of the GPS or the IMU is preliminary corrected.
A method for calculating an error in the positional data of the GPS will be described hereinafter. Generally, the time of the GPS is not synchronized with the time of the camera. This is because synchronization of the time of the GPS and the time of the camera requires a large investment and therefore is practically difficult to realize. Therefore, in the present invention, the obtaining time of the positional data of the GPS and the photographing time of the image are converted to a reference time output from the reference clock 6. The converted time compensates transmission delay of the positional data and transmission delay of the image data.
The frame rate of the moving image do not coincide with the obtaining rate of the positional data of the GPS, whereby the photographing timing of the image do not synchronize with the obtaining timing of the positional data of the GPS. Therefore, the error in the positional data of the GPS includes the error based on the difference between the photographing timing of the image and the obtaining timing of the positional data of the GPS.
As shown in
Et=vΔt Tenth Formula
When the reference clock 6 is not used, the value of Δt in the tenth formula is usually unknown. In this case, if the frame rate of the moving image is set to be 30 fps, and the obtaining rate of the positional data of the GPS is set to be 1 fps, it can be assumed that the value of Δt is plus or minus 1/30 seconds at most as shown in
When the reference clock 6 is used, the photographing time of the image and the obtaining time of the positional data of the GPS are represented by the same time axis according to the reference clock 6. Therefore, the time difference between the obtaining time of the positional data of the GPS and the photographing time of an image, which is photographed at a time nearest to the obtaining time, is represented as Δt. The value of Δt shown in
The rate v is calculated from a moving distance of the characteristic point in the moving image and the frame rate of the moving image. The following eleventh formula is a formula for computation of the rate v. For example, when (Xi−Xi-1)=0.1 m, and the frame rate is 30 fps, v=3 m/seconds. Accordingly, the error Et in the positional data of the GPS comes to 3×( 1/30)=0.1 m.
v=(Xi−Xi-1)×fps Eleventh Formula
Moreover, positioning accuracy specific for the GPS is evaluated. The positioning accuracy of the GPS varies depending on values of a satellite position (DOP: Dilution of Precision), multipath, link quality (LQ), convergence estimation of positioning calculation, and the like. For example, in a case of a RTK-GPS (Real Time Kinematic GPS) system, a positioning mode is changed in real time according to a position of a GPS satellite, effects of multipath affected by surrounding environment, correction information from a control station, and the like. The following Table 1 schematically shows positioning accuracy in each positioning mode.
Therefore, if the positioning accuracy of the GPS is represented as GPSrtke, a total error EtALL in the positional data of the GPS including the difference of the photographing timing of the image and the obtaining timing of the positional data of the GPS is represented by a twelfth formula. For example, when Et=0.1 m, and GPSrtke=0.03 m in the RTK-fix positioning mode, the total error in the positional data of the GPS comes to EtALL=0.13 m. When a threshold is set to be 3σ in the RTK-fix positioning mode, the threshold value comes to 0.03×3=0.09 m. In this case, since the value of EtALL is greater than the threshold value, the exterior orientation parameters (position of the camera) calculated from the image is used instead of the positional data of the GPS.
EtALL=Et+GPSrtke Twelfth Formula
Whether the exterior orientation parameters (position of the camera) will be corrected or not may be selected depending on which positioning mode is used for measuring the positional data of the GPS, among the positioning mode shown in the Table 1. For example, only the RTK-fix positioning mode is selected to be used. In this case, the exterior orientation parameters calculated from the image are selected.
After the error in the positional data of the GPS is calculated, the positional data of the GPS, which includes the difference between the photographing timing of the image and the obtaining timing of the positional data of the GPS, is evaluated.
Correction of the Posture of the Camera
The postural data obtained from the posture measuring unit 5 (an posture sensor or an IMU) is evaluated by using 2σ or 3σ of an assumable accuracy σ as an evaluation value (threshold value). The postural data includes an error based on the difference between the photographing timing of the image and the obtaining timing of the postural data of the posture sensor and the IMU. That is, if this postural data is out of the range of the threshold value, the posture of the camera calculated from the image is selected. On the other hand, if this postural data is in the range of the threshold value, the postural data of the posture measuring unit 5 is selected.
The postural data of the posture measuring unit 5 is made of three rotary angles (ω, φ, κ) of camera coordinate axes, and one of the rotary angles may be evaluated, or two or all three of the rotary angles may be evaluated. In this case, whether the rotary angles are used or not is set depending on the accuracy of the posture sensor and the IMU.
A method for calculating an error in the posture sensor will be described hereinafter.
Ext=1.05t−1
Eyt=1.05t−1
Ezt=1.05t−1 Thirteenth Formula
In the present invention, although the time of the posture sensor is not synchronized with the time of the camera, the obtaining time of the postural data and the photographing time of the image are converted to the reference time output from the reference clock 6. The converted time compensates the transmission delay of the postural data of the posture sensor and the transmission delay of the image data.
The frame rate of the moving image does not coincide with the obtaining rate of the postural data of the posture sensor, whereby the photographing timing of the image does not synchronized with the obtaining timing of the postural data of the posture sensor. Therefore, the error in the postural data of the posture sensor includes the error based on the difference between the photographing timing of the image and the obtaining timing of the postural data of the posture sensor.
Ext=1.05t−1+vxΔt
Eyt=1.05t−1+vyΔt
Ezt=1.05t−1+vzΔt Fourteenth Formula
When the reference clock 6 is used, the photographing time of the image and the obtaining time of the postural data of the posture sensor are represented by the same time axis according to the reference clock 6. Therefore, time difference between the obtaining time of the postural data of the posture sensor and the photographing time of an image, which is photographed at a time nearest to the obtaining time, is represented as Δt. The value of Δt shown in
Moreover, if a specific accuracy IMUe of the posture sensor is included, total errors ExtALL, EytALL, EztALL of the postural data of the posture sensor are represented by the following fifteenth formula.
ExtALL=Ext+IMUe
EytALL=Eyt+IMUe
EztALL=Ezt+IMUe Fifteenth Formula
If the total errors ExtALL, EutALL, EztALL of the postural data of the posture sensor are out of the range of the predetermined threshold values, exterior orientation parameters (posture of the camera) calculated from the image are selected. If the total errors ExtALL, EytALL, EztALL of the postural data of the posture sensor are in the range of the predetermined threshold values, the postural data of the posture sensor is selected.
(Step S12) Bundle Adjustment
After the exterior orientation parameters are corrected, a bundle adjustment is performed on the exterior orientation parameters and the three-dimensional coordinates of the characteristic points in one or more images, or all images at the same time. The bundle adjustment method uses a collinearity condition such that light fluxes (bundles) connecting a point in the objective space, a point in the image, and the projection center, must be on the same straight line. In the bundle adjustment, an observation equation is formed for each of the light flux in each image based on the collinearity condition, and simultaneous adjustment is performed by the least-squares method. The collinearity conditional formula is represented as the following sixteenth formula.
In the bundle adjustment, a successive approximation method is used. Specifically, approximate values of the three-dimensional coordinates of the reference point and the characteristic points, and approximate values of the exterior orientation parameters, are represented as (X′, Y′, Z′) and (X0′, Y0′, Z0′, ω′, φ′, κ′), respectively. Then, correction amounts are added to the approximate values, whereby (X′+ΔX, Y′+ΔY, Z′+ΔZ) and (X0′+ΔX0, Y0′+ΔY0, Z0′+ΔZ0, ω′+Δω, φ′+Δφ, κ′+Δκ) are obtained. These approximate values including the correction amounts are used as true values of the three-dimensional coordinates of the reference point and the characteristic points and the exterior orientation parameters. Measured values of the image coordinates corresponding to the reference point and the characteristic points are represented as (x′, y′). Then, errors are added to the measured values, whereby (x′+dx, y′+dy) are obtained and are used as true values of the image coordinates corresponding to the reference point and the characteristic points. The approximate values including the correction amounts and the measured values including the errors are substituted for the collinearity conditional formula (sixteenth formula) of one or more images. The sixteenth formula is expanded by using Taylor's formula about the approximate value and is linearized. Then, correction amounts are calculated by the least-squares method. The approximate values are corrected according to the calculated correction amounts, and the above calculations are repeated in the same manner, whereby convergence results are obtained.
In this case, the symbols Ax and Ay represent correction terms of the internal orientation parameters (focal point distance, principal point position, lens distortion coefficient). The following eighteenth formula represents a compensatory model of internal orientation parameters in a case in which a lens has distortion in a radiation direction. The internal orientation parameters are adjusted at the same time by using the eighteenth formula. That is, the bundle adjustment includes self calibration.
Δx=x0+x(k1r2+k2r4)
Δy=y0+y(k1r2+k2r4)
r2=(x2+y2)/c2 Eighteenth Formula
Based on the exterior orientation parameters which are bundle adjusted, three-dimensional coordinates of subsequently detected characteristic points are calculated. These characteristic points were detected in an area in which the density of the characteristic points was decreased. In this calculation, the forward intersection method or the DLT method may be used. As shown in
As shown in
Specifically, a collinearity conditional formula (sixteenth formula) for the two light rays is formed, and the exterior orientation parameters, the internal orientation parameters, and the image coordinates of the corresponding point, all of which are known values, are substituted for the sixteenth formula. Moreover, approximate values including correction amounts of the unknown point P are substituted for the collinearity conditional formula. In this case, the approximate values of the unknown point P are represented as (X′, Y′, Z′), and the approximate values including the correction amounts are represented as (X′+ΔX, Y′+ΔY, Z′+ΔZ). The sixteenth formula is expanded by using Taylor's formula about the approximate value and is linearized. Then, the correction amounts are calculated by the least-squares method. The approximate values are corrected according to the calculated correction amounts, and the above calculations are repeated in the same manner, whereby convergence results are obtained. According to this step, the three-dimensional coordinates P (X, Y, Z) of the characteristic point is calculated.
(Step S14) Evaluation of Final Frame
After the three-dimensional coordinates of the subsequently detected characteristic points are calculated, whether the image which is currently processed is the final image or not is evaluated. When the image which is currently processed is not the final image, exterior orientation parameters of a following image are calculated by returning to the step S10. Then, the steps S10 to S14 are repeated until the image is evaluated as the final image. When the image which is currently processed is the final image, the process is finished.
Advantages of the First Embodiment
According to the first embodiment, the difference between the photographing timing of the image and the obtaining timing of the positional data of the position measuring unit 4 or the postural data of the posture measuring unit 5, is used as an error of the positional data of the position measuring unit 4 or the postural data of the posture measuring unit 5. The positional data of the position measuring unit 4 and the postural data of the posture measuring unit 5 include this difference. The exterior orientation parameters are corrected depending on whether this positional data and this postural data are in the range of predetermined threshold values or not. Even when the photographing timing of the image do not synchronize with the obtaining timing of the positional data of the position measuring unit 4 and the postural data of the posture measuring unit 5, the exterior orientation parameters are appropriately corrected. Therefore, the errors are decreased.
In the errors of the positional data of the position measuring unit 4 and the postural data of the posture measuring unit 5, specific accuracy in the positional data and the postural data is added to the error based on the time difference Δt. Therefore, the exterior orientation parameters calculated from the image are appropriately corrected.
Specifically, in the case of RTK-GPS (Real Time Kinematic GPS), the positioning mode is changed in real time based on a position of a GPS satellite, multipath affected by surrounding environment, correction information from a control station, and the like, which may affect the accuracy. Accordingly, by changing the threshold value for correcting the exterior orientation parameters based on the positioning mode, the exterior orientation parameters are appropriately corrected.
On the other hand, in the postural data of the posture measuring unit 5, the error tends to accumulate due to the function of the measurement and the measuring time t. Therefore, by including the accuracy based on the measuring time t of the postural data, the exterior orientation parameters are appropriately corrected.
2. Second Embodiment
A modification of the first embodiment will be described hereinafter. In the second embodiment, change of photographing scenes and shift of a photographing unit are evaluated based on at least one selected from the group consisting of directions and distances of tracks of the characteristic points, a distribution rate of the characteristic points, an overlapping rate, and a vertical parallax.
Structure of the Position Measurement Device
In the image analyzing section 20, change of photographing scenes and shift of a photographing unit are analyzed based on track directions of the characteristic points, moved distances of the characteristic points, a distribution rate of the characteristic points, an overlapping rate, and a vertical parallax.
In the exterior orientation parameter evaluating section 21, the exterior orientation parameters calculated from the image are evaluated based on the analyzed result of the image analyzing section 20. When the change of the photographing scenes is evaluated to be relatively great, the exterior orientation parameters are corrected by using the positional data obtained from the position measuring unit 4 and the postural data obtained from the posture measuring unit 5. When the change of the photographing scenes is evaluated to be relatively small, the exterior orientation parameters calculated from the image is selected.
Operation of the Position Measurement Device
Next, overall operation of the position measurement device will be described.
A process of calculating three-dimensional coordinates and exterior orientation parameters in the step S5 related to the second embodiment will be described in detail hereinafter. As shown in
The bundle adjustment (step S12) may be performed before the calculation of the three-dimensional coordinates of the subsequently detected characteristic points (
(Step S16) Evaluation of the Exterior Orientation Parameters
The calculation of the exterior orientation parameters is based on the three-dimensional coordinates of the reference point or the characteristic points in which the three-dimensional coordinates are previously calculated, and is also based on the image coordinates obtained by tracking the characteristic points. Therefore, the accuracy of the exterior orientation parameters depends on the tracking accuracy of the characteristic points. The tracking accuracy of the characteristic points depends on remarkable change of the photographing scenes and shift of the photographing unit. Therefore, depending on change of the photographing scenes and shift of the photographing unit, errors may occur or calculations may not be performable.
Accordingly, when change of the photographing scenes and shift of the photographing unit are great, and the exterior orientation parameters calculated from the image are not reliable, positional data obtained from the position measuring unit 4 and postural data obtained from the posture measuring unit 5 are used. In this case, the exterior orientation parameters calculated from the image are not used.
The amount of the change of the photographing scenes and the amount of the shift of the photographing unit are evaluated based on directions and distances of tracks of the characteristic points, a distribution rate of the characteristic points, an overlapping rate, and a vertical parallax. This evaluation is performed by the image analyzing section 20. A method for evaluating the change of the photographing scenes will be described hereinafter.
Evaluation According to Directions and Distances of tracks of the Characteristic Points
For example, as shown in
The change of the track direction of the characteristic point is defined as an angle θ between a track vector “a” of a characteristic point in a prior frame and a track vector “b” of a subsequently detected characteristic point. This angle is calculated from a definition of the inner product represented by a nineteenth formula.
Furthermore, for example, as shown in
The change of the tracking distance is the difference between the length of the track vector “a” of the characteristic point in the prior frame and the length of the track vector “b” of the subsequently detected characteristic point. This difference is calculated from the following twentieth formula. Threshold values for directions and distances of the tracks of the characteristic points are adjustable.
Evaluation According to the Distribution Rate of the Characteristic Points and the Overlapping Rate
When the change of the photographing scene and the shift of the photographing unit are great, there may be cases in which the characteristic points cannot be tracked, and the points are partially distributed in an image.
When the camera is shifted in a horizontal direction, a distribution rate of the characteristic points in the horizontal direction is calculated as a total value of X coordinates of the characteristic points. In this case, the center of the image is assumed to be origin (0, 0). For example, in the case shown in
When the camera is shifted in a vertical direction, the distribution rate of the characteristic points in the vertical direction is calculated as a total value of Y coordinates of the characteristic points. In this case, the center of the image is assumed to be origin (0, 0). Therefore, the distribution rate of the characteristic points in the vertical direction may be calculated from the total value of the Y coordinates of the characteristic points.
When the change of the photographing scene and the shift of the photographing unit are great, there may be cases in which characteristic points overlapping in the prior and the subsequent frames are partially distributed. These overlapping characteristic points are points obtained by tracking the characteristic points.
As shown in
The distribution condition (overlapping rate) of the overlapping characteristic points is evaluated by the method for calculating the distribution rate of the characteristic points. Threshold values for the distribution rate of the characteristic points and the overlapping rate are adjustable.
Evaluation According to the Vertical Parallax
The vertical parallax is a difference between y coordinates of corresponding points in two images that are stereographed. That is, the vertical parallax is a difference of coordinate values in a direction intersecting the baseline direction of the stereo images at a right angle. The stereo images are a pair of images and are made of two images photographed by cameras in a condition in which the optical axes are parallel, and directions intersecting a baseline direction at a right angle are parallel. Therefore, the y coordinates of the corresponding points in the two images are equal, whereby the vertical parallax in the stereo images is usually zero pixel.
If the photographing unit is shifted, the vertical parallax does not come to zero pixel. Therefore, when there is not less than 1 pixel of the vertical parallax, the exterior orientation parameters calculated from the image are not used, and the positional data obtained from the position measuring unit 4 and the postural data obtained from the posture measuring unit 5 are used.
The vertical parallax is obtained by calculating the difference between the y coordinate of the characteristic point in a prior frame and the y coordinate of the characteristic point in a current frame. A threshold value for the vertical parallax is adjustable.
The change of the photographing scene and the shift of the photographing unit may be evaluated based on the value obtained by multiplying more than one or all of the parameters selected from the group consisting of the directions and the distances of the tracks of the characteristic points, the distribution rate of the characteristic points, the overlapping rate, and the vertical parallax.
Advantages of the Second Embodiment
According to the second embodiment, the change of the photographing scene and the shift of the photographing unit are evaluated based on at least one selected from the group consisting of the directions and the distances of the tracks of the characteristic points, the distribution rate of the characteristic points, the overlapping rate, and the vertical parallax. The change of the photographing scene and the shift of the photographing unit cause difficulty in tracking of the characteristic points and cause decrease in the accuracy of the exterior orientation parameters calculated from the images. Therefore, when the change of the photographing scene and the shift of the photographing unit are relatively great, the exterior orientation parameters calculated from the images are evaluated to have low reliability. On the other hand, when the change of the photographing scene and the shift of the photographing unit are relatively small, the exterior orientation parameters calculated from the images are evaluated to have high reliability.
When the exterior orientation parameters calculated from the images are evaluated to have low reliability, the positional data obtained from the position measuring unit 4 and the postural data obtained from the posture measuring unit 5 are used whereas the exterior orientation parameters calculated from the images are not used. According to this embodiment, errors due to the change of the photographing scene and the shift of the photographing unit are decreased.
3. Third Embodiment
A modification of the first and the second embodiments will be described hereinafter. In the third embodiment, a weighted bundle adjustment is performed.
On the other hand, in the third embodiment, the exterior orientation parameters are not corrected by using best data, but the positional data of the GPS, the postural data of the posture sensor, and the exterior orientation parameters calculated from the camera, are weighted and are bundle adjusted.
The weight is calculated based on the accuracy of each data. If the accuracy of each data is represented as u, the weight w is calculated from a twenty-first formula. The accuracy of each data will be described hereinafter.
w=1/σ2 Twenty-first Formula
Accuracy of the Positional Data of the GPS and the Postural Data of the Posture Sensor
The accuracy of the positional data of the GPS and the postural data of the posture sensor are based on an error caused by the difference between the photographing timing of the image and the obtaining timing of the positional data of the GPS or the postural data of the posture sensor, and are also based on specific accuracy of the positional data of the GPS and the postural data of the posture sensor.
Generally, the times of the GPS and the posture sensor are not synchronized with the time of the camera. Therefore, in the present invention, the obtaining time of the positional data of the GPS and the photographing time of the image are converted to the reference time outputted from the reference clock 6. The converted times include the transmission delay of the positional data and the postural data and the transmission delay of the image data.
The frame rate of the moving image do not coincide with the obtaining rate of the GPS and the posture sensor, whereby the photographing timing of the image do not synchronize with the obtaining timing of the positional data of the GPS and the postural data of the posture sensor. Therefore, the accuracy of the GPS and the posture sensor include an error based on the difference between the photographing timing of the image and the obtaining timing of the positional data of the GPS or the postural data of the posture sensor.
It is assumed that the difference of the photographing timing of the image and the obtaining timing of the positional data of the GPS or the postural data of the posture sensor is represented as Δt. When the camera moves at a rate v (angle rate vx, vy, vz), an error Et of the positional data of the GPS is represented as a twenty-second formula, and errors Ext, Eyt, Ezt of the postural data of the posture sensor are represented as a twenty-third formula.
Et=vΔt Twenty-second Formula
Ext=vxΔt
Eyt=vyΔt
Ezt=vzΔt Twenty-third Formula
The photographing time of the image and the obtaining time of the positional data of the GPS and the postural data of the posture sensor are represented by the same time axis according to the reference clock 6. Therefore, time difference between the obtaining time of the positional data of the GPS and the postural data of the posture sensor and the photographing time of an image, which is photographed at a time nearest to the obtaining time, is represented as Δt.
The rate v is calculated from a moving distance of the characteristic point in the moving image and the frame rate of the moving image. For the angle rate vx, vy, vz, values obtained from the posture sensor and the IMU are used.
v=(Xi−Xi-1)×fps Twenty-fourth Formula
Next, specific accuracy of the GPS and the posture sensor will be described. The positioning accuracy of the GPS varies depending on values of the satellite position (DOP: Dilution of Precision), the multipath, the link quality (LQ), the convergence estimation of positioning calculation, and the like. For example, in the case of the RTK-GPS (Real Time Kinematic GPS) system, the positioning mode is changed in real time as shown in the Table 1, according to the position of the GPS satellite, the effects of multipath affected by surrounding environment, the correction information from a control station, etc.
If the positioning accuracy of the GPS is represented as GPSrtke, a total error EtALL of the positional data of the GPS is represented as a twenty-fifth formula.
EtALL=Et+GPSrtke Twenty-fifth Formula
In the posture sensor, since acceleration may be integrated or be double integrated essentially, error accumulates as time passes. It is assumed that the measuring time from setting of the initial value or from resetting of the hardware is represented as t, and the accumulated error is approximated to an exponential function of 1.05t−1. In this case, the accuracy of the posture sensor is represented by a twenty-sixth formula. Moreover, if the specific accuracy IMUe of the posture sensor is included in the twenty-sixth formula, the total values ExtALL, EytALL, EztALL of the accuracy of the posture sensor are represented by a twenty-seventh formula.
Ext=1.05t−1+vxΔt
Eyt=1.05t−1+vyΔt
Ezt=1.05t−1+vzΔt Twenty-sixth Formula
ExtALL=Ext+IMUe
EytALL=Eyt+IMUe
EztALL=Ezt+IMUe Twenty-seventh Formula
Accuracy of the Exterior Orientation Parameters and the Three-dimensional Coordinates of the Characteristic Points
The accuracy of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are obtained based on at least one selected from the group consisting of the directions and the distances of the tracks of the characteristic points, the distribution rate of the characteristic points, the overlapping rate, and the vertical parallax, in the second embodiment. The change of the track direction of the characteristic point is represented as an angle θ between a vector “a” and a vector “b” (tenth formula), and the change of the track distance of the characteristic point is represented as a difference |a−b| of the vector “a” and the vector “b” (eleventh formula). Therefore, the accuracy σ is represented as θ or |a−b|.
The distribution rate of the characteristic points and the overlapping rate are the total values of the X coordinates and the Y coordinates of the characteristic points which have an origin at the center of the image. Therefore, the accuracy σ is represented by an absolute value of the distribution rate or the overlapping rate. Since the vertical parallax is the difference between the y coordinates of the characteristic points in the stereo images, the accuracy σ is represented by an absolute value of the difference between the y coordinates of the characteristic points.
The accuracy c of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points may be represented by a value obtained by multiplying more than one or all of the parameters selected from the group consisting of the directions and the distances of the tracks of the characteristic points, the distribution rate of the characteristic points, the overlapping rate, and the vertical parallax.
Weighted Bundle Adjustment
Each correction amount in the weighted bundle adjustment is calculated as a value for minimizing the following function G. For example, the symbol “w2” represents a weight of the three-dimensional coordinates obtained by the camera, and the symbols “w3” and “w4” represent weights of the exterior orientation parameters.
G=[w1(Δxi2+Δyi2)]+[w2(ΔXi2+ΔYi2+ΔZi2)]+[w3(Δωi2+Δφi2+Δκi2)]+[w4(ΔX02+ΔY02+ΔZ02)] Twenty-eighth Formula
When the positional data of the GPS and the IMU and the postural data of the posture sensor are included, the following twenty-ninth formula is used and is minimized. For example, the symbol “w5” represents a weight of the positional data of the GPS, the symbol “w6” represents a weight of the positional data of the IMU, and the symbol “w7” represents a weight of the postural data of the posture sensor.
Advantages of the Third Embodiment
According to the third embodiment, the exterior orientation parameters and the three-dimensional coordinates of the characteristic points, and also the positional data of the position measuring unit 4 and the postural data of the posture measuring unit 5, are bundle adjusted at the same time. In this case, each data is weighted and is bundle adjusted, whereby the weights of data having low accuracy are decreased, and the weights of data having high accuracy are increased. Accordingly, the errors of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are decreased.
The weights of the positional data of the position measuring unit 4 and the postural data of the posture measuring unit 5 are calculated based on the difference between the photographing timing of the image and the obtaining timing of the positional data of the position measuring unit 4 or the postural data of the posture measuring unit 5. Therefore, even when the photographing timing of the image do not synchronize with the obtaining timing of the positional data of the position measuring unit 4 and the postural data of the posture measuring unit 5, the errors of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are decreased.
The weights of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are calculated based on at least one selected from the group consisting of the directions and the distances of the tracks of the characteristic points, the distribution rate of the characteristic points, the overlapping rate, and the vertical parallax. The accuracy of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points calculated from the image have strong tendency to depend on the change of the photographing scene and the shift of the photographing unit. The directions and the distances of the tracks of the characteristic points, the distribution rate of the characteristic points, the overlapping rate, and the vertical parallax, are reference for evaluating the change of the photographing scene and the shift of the photographing unit. Therefore, by using these parameters for the weights of exterior orientation parameters and the three-dimensional coordinates of the characteristic points, the errors of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are decreased.
4. Fourth Embodiment
A modification of the first to the third embodiments will be described hereinafter. In the fourth embodiment, by removing points having relatively large errors (miscorresponding points) from the corresponding points which are tracked, calculation accuracy of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are improved.
In the method for removing the miscorresponding points, the backward projection or the vertical parallax calculated by the relative orientation is used. These removal methods may be used separately or may be used together depending on the photographing conditions. For example, the removing of the miscorresponding points by the backward projection using a single photo orientation is used when the change of the scene is large because the miscorresponding points are removed based on one image. On the other hand, the removing of the miscorresponding points by the relative orientation is used when the change of the scene is small because the miscorresponding points are removed based on plural images.
In order to estimate a threshold value for evaluating the errors, a robust estimation may be used. For example, a LMedS estimation (Least Median of Squares estimation), a RANSAC estimation (RANdom SAmple Consensus estimation), and an M estimation may be used. Specifically, the LMedS estimation is superior in robustness, and the miscorresponding points are automatically removed even when the error range is unknown.
The threshold value for evaluating the errors may be set to be a fixed threshold value which is adjustable, instead of using the robust estimation. According to this embodiment, the calculation process is simple, whereby the processing speed is improved.
The fourth embodiment of the present invention will be described according to a flow chart shown in
Removal of the Miscorresponding Points by the Backward Projection
First, corresponding points which are tracked are randomly sampled (step S20). Then, image coordinates (x′, y′) of a corresponding point with respect to each of the sampled point are calculated based on the exterior orientation parameters calculated by the backward intersection method (single photo orientation or DLT method) and the three-dimensional coordinates of the tracked corresponding point. For example, in a case of the single photo orientation, by substituting the exterior orientation parameters (X0, Y0, Z0, ω, φ, κ) and the three-dimensional coordinates (X, Y, Z) of the corresponding point for the collinearity conditional formula of the sixth formula, the image coordinates (x′, y′) are inversely calculated (step S21).
In each of the sampled points, a square of a residual value between the image coordinates (x′, y′) obtained by the backward intersection method and the image coordinates (x, y) of the tracked corresponding point is calculated, and a central value of the squares of the residual values is calculated (step S22). Then, the steps S20 to S22 are repeated, and the minimum value (LMedS) of the central value is calculated (step S23). A standard of the LMedS is shown in the following thirtieth formula.
LMedS=min(med(εi2)) Thirtieth Formula
The number of times required to repeat the steps S20 to S22 is defined by using probability in which an exception value is not included at least one time in q times of the random sampling. For example, if the rate of the exception value in the whole data is represented as “c”, the probability P is represented by the following thirty-first formula. For example, when c=0.3 and n=3, q=11 in order to obtain P=0.01.
P=1−{1−(1−cn}q Thirty-first Formula
Then, points having large errors are removed by using the value of the LMedS calculated in the step S23 as a threshold value (step S24).
Removal of the Miscorresponding Point by Using the Vertical Parallax
First, corresponding points in the prior and the subsequent images are randomly sampled (step S30). Then, as shown in
The vertical parallax is calculated as the difference between the y coordinates of the two corresponding points that are reprojected. The vertical parallax is a difference of y-coordinates of corresponding points in two images that are stereographed, that is, a difference of coordinate values in a direction intersecting a baseline direction of the stereo images at a right angle. The stereo images are a pair of images and are made of two images photographed by cameras in a condition in which the optical axes are parallel, and directions intersecting a baseline direction at a right angle are parallel. Then, a square of the vertical parallax is calculated, and the central value of the squares of the vertical parallaxes is calculated (step S32). The steps S30 to S32 are repeated, and the minimum value (LMdeS) of the central value is obtained (step S33). The standard of the LMedS is represented by the thirtieth formula.
Then, points having large errors are removed by using the value of the LMedS calculated in the step S33 as a threshold value (step S34).
Advantages of the Fourth Embodiment
The tracking results of the characteristic points include numerous miscorresponding points. Therefore, the exterior orientation parameters and the three-dimensional coordinates of the characteristic points calculated based on the miscorresponding points are inferior in the accuracy. However, by removing the miscorresponding points, the calculation accuracy of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are improved, and the errors are decreased.
Moreover, the method for removing the miscorresponding points (residual value calculated by the backward projection or the vertical parallax calculated by the relative orientation) is selected based on the change of the photographing conditions. Therefore, the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are calculated regardless of the change of the photographing conditions.
In the LMedS method, compared to the least-squares method, even when numerous outliers are included in the data, the outliers are robustly estimated. Accordingly, the errors of the exterior orientation parameters and the three-dimensional coordinates of the characteristic points are decreased.
Industrial Applicability
The present invention can be utilized in a position measurement method, a position measurement device, and programs therefor. In this case, the position measurement method, the position measurement device, and the programs therefor may be used for measuring a position and a posture, at which photograph is performed, and a three-dimensional position of an object, based on moving images.
Number | Date | Country | Kind |
---|---|---|---|
2008-172665 | Jul 2008 | JP | national |
2008-172737 | Jul 2008 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
7552025 | Ohtomo et al. | Jun 2009 | B2 |
20050151839 | Ito et al. | Jul 2005 | A1 |
20070167154 | Ohtomo et al. | Jul 2007 | A1 |
20070263924 | Kochi et al. | Nov 2007 | A1 |
20080095402 | Kochi et al. | Apr 2008 | A1 |
20080306708 | Germain et al. | Dec 2008 | A1 |
Number | Date | Country |
---|---|---|
2005-338107 | Dec 2005 | JP |
2006-250917 | Sep 2006 | JP |
2007-147522 | Jun 2007 | JP |
2007-171048 | Jul 2007 | JP |
2007-322170 | Dec 2007 | JP |
2008-089314 | Apr 2008 | JP |
Entry |
---|
International Search Report for International Application No. PCT/JP2009/062067, dated Aug. 11, 2009, 2 pages. |
Yokochi, Yuji et al., “Estimation of Extrinsic Camera Parameters Based on Feature Tracking and GPS Data,” Information Processing Society of Japan, vol. 47, No. SIG 5 (CVIM 13), Mar. 2006, pp. 69-79 (with English abstract). |
Number | Date | Country | |
---|---|---|---|
20110096957 A1 | Apr 2011 | US |