METHOD OF AND APPARATUS FOR MEASURING COORDINATES

Abstract: A coordinates measuring apparatus comprising a detect­ ing unit constituted by an optical system for obtaining an image of an object and a detecting system having a plurality of arrayed detecting elements disposed in such a manner that respective detecting signals are superposed at the position of said image, a control unit for taking out data from each of said arrayed detecting elements, and a storage unit for storing the data of each array taken out from said control unit.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to a method of and apparatus for measuring coordinates, and more particularly to a method of and apparatus for measuring three-dimensional coordinates at a measurement point on an object or three-dimensional coordinates at an arbitrarily selected measurement point in a stereo image. Description of Prior Art As an example of a conventional method of noncontact-type measurement of three-dimensional coordinates, a method is known whereby corresponding measurement points are extracted from a pair of stereo pictures, and three-dimensional coordinate values are calculated from the coordinates at these measurement points. In the above-described conventional method of measurement of three-dimensional coordinates, technical skills and considerable time are involved in the extraction of a measurement point, and, particularly when the configuration of an object to be measured is complicated and has numerous points to be measured, the measurer suffers from considerable fatigue, and the work proceeds very inefficiently. In US-A-3,943,344 an apparatus for measuring the elevation of a three-dimensional foreground subject by reference to paired images of said subject photographed from two points of known height as disclosed. The aeronautic photography is carried out in such a manner that about 60% of the two photographs overlap each other so as to cause about 60% of the same area to be included in each photograph. The apparatus is further applicable in obtaining data on the depth of a three-dimensional foreground subject using two photographic apparatuses as when it is desired to detect the overall outline of this subject during its assembly. It is also possible to carry out photoelectric conversion simultaneously with image pick-up and record the resultant electric image data in a memory device. From US-A-3,678,582 a photogrammetric apparatus is known, wherein a pair of stereophotographs have their images projected into the apparatus's optical system so as to form a stereomodel therein, which is visually observable through the optical system's binocular viewer. Relative movement of the optical system's measuring markers and the stereomodel is detected by moving a scanner device over a planar surface of a grid device, which serves as an encoder and develops commandsignals corresponding to the coordinates of a selected relative position of the scanner device and the grid device. A computer then from the command signals develops control signals for casing a servo system to move the stereophotographs so that the markers and the stereomodel assume a relative position corresponding to the coordinates selected by the scanner device. The scanner device can also simultaneously plot a reproduction of the contour of the stereomodel being traced in any desired scale. Additionally a plotter can plot another reproduction of the same contour in a still different scale. DESCRIPTION OF THE INVENTION Object of the Invention It is an object of the present invention to provide a method of and apparatus for measuring coordinates which is capable of easily effecting measurement by inputting the designation of a point to be measured only to one stereo image data, while a corresponding point in the other stereo image data is automatically determined by correlation processing without requiring any expert skills, thereby overcoming the above-described problems of the prior art. Another object of the present invention is to provide a method of and apparatus for measuring coordinates in which, if the extraction of a corresponding point with respect to a point being measured has not been carried out accurately, the point being measured is viewed as floating or submerging relative to an object being measure, thereby making it possible to easily check whether or not the extraction of an erroneous corresponding point (hereinafter referred to as "mismatching") has taken place. A still another object of the present invention is to provide a method of and apparatus for measuring coordinates which is capable of extracting corresponding points accurately with fewer mismatches irrespective of the situation of image data by providing a window having a different width to a first image data and performing correlation processing of a second image data on the basis of the same. Summary of the Invention According to the present invention, the above objects can be accomplished by a coordinates measuring apparatus comprising: a storage unit for storing a first image data and a second image data together constituting a stereo image; a setting unit for setting a measurement point with respect to the first image data; a correlating unit for determining a corresponding point in the second image data corresponding to said measurement point by means of correlation processing; a marker unit for generating a modified first image data by adding measurement point mark data to the first image data and for generating a modified second image data by adding corresponding point mark data to said second image data, the measuring point mark data indicating said measurement point supplied from said setting unit and the corresponding point mark data indicating said corresponding point supplied from said correlating unit, and for outputting the so modified image data; an image forming unit having an image forming device, which alternately forms the modified first image and the modified second image, the modified first and second images being alternately displayed on the same monitor, further having a scope disposed in front of a viewer's right and left eyes and allowing any of said modified first and second images to be viewed by the left eye and the other by the right eye and a display unit for displaying three-dimensional coordinate values of said measurement point and the data of the corresponding point. In addition, the present invention also provides a method of measuring coordinates, comprising: a first step of storing a first image data and a second image data together constituting a stereo image of an object to be measured; a second step of setting a measurement point in the first image data; a third step of finding a corresponding point in the second image data corresponding to the measurement point by means of correlation processing; a fourth step of generating a modified first image data by adding measurement point mark data to said first image data and for generating a modified second image data by adding corresponding point mark data to said second image data, the measurement point mark data indicating said measurement point supplied from said setting unit and the corresponding point mark data indicating said corresponding point supplied from said correlating unit; a fifth step of alternately forming the first modified image and the modified second image, the modified first and second images being alternately displayed on the same monitor, and allowing any of said modified first and second images to be viewed by the left eye and the other by the right eye of a viewer; and a sixth step of calculating and displaying three-dimensional coordinate values of the measurement point on the basis of the data of said measurement point and the data of said corresponding point. In a preferred embodiment of the invention, the coordinates measuring apparatus according to claim 1 comprises further: A detecting unit constituted by two object lenses which are aligned in a first direction (x-direction) and which are disposed at positions spaced apart in a second direction (z-direction) from the object and by two photoelectrical elements to detect said first and second images, the photoelectrical elements having linear arrays and being arranged to form a detection direction parallel to the first direction (x-direction); a control unit for taking out data from each of said arrayed photoelectrical elements; and a storage unit for storing the data of each array taken out from said control unit. The above and other objects and features of the present invention will become apparent from the following descriptions of preferred embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of the data reading system of a coordinate measuring apparatus according to an embodiment of the present invention; Fig. 2 is similarly a block diagram of a processing output system; Fig. 3 is a waveform chart of the data reading system; Fig 4 is a diagram explaining the basic principle of calculation of coordinates; Fig. 5 is a block diagram of a correlator; Fig. 6 is a block diagram of a synthesizer according to a first embodiment of the present invention; Fig. 7 is a block diagram of a synthesizer according to a second embodiment of the present invention; Fig. 8 is a waveform chart of the synthesizers of the first and second embodiments; and Fig. 9 is a flowchart of an arithmetic unit for performing correlation processing. DESCRIPTION OF THE PREFERRED EMBODIMENT Description of an embodiment of the present invention will be made hereinafter separately for a data reading system and a processing output system. (Data Reading System) As shown in Fig. 1, a data reading system 100 comprises: a detecting unit 10 constitued by an optical system for obtaining an optical image of an object 3 to be measured and a means of photoelectrically detecting the optical image; a control unit 20 for receiving data from the detecting unit 10 and processing the same; and a storage unit 30 for storing the data obtained from the control unit 20. First, as shown in Fig. 1, coordinates (X, Y, Z) are determined by taking the object 3 into consideration. The detector 10 is a arranged such that two object lenses 105, 106 are disposed at positions above the object 3 such as to be aligned in the x-axis direction, linear CCDs (charge coupled devices) 103, 104 are disposed at positions where the image of the object 3 are formed by means of the object lenses 105, 106, in such a manner that the detecting direction becomes parallel with the x-axis direction. The CCDs 103, 104 and the object lenses 105, 106 constitute a detecting unit (A) 101 and a detecting unit (B) 102, respectively, and are movable in the y-axis direction integrally with the detectors 101, 102 by means of a pulse motor 107. An illumination unit 108 constituted by an object lens 109, a pattern film 110, and a light source 111 is interposed between the detectors 101, 102. The illumination unit 108 is used to project a latticed or striped pattern or a random pattern relating to the density or a period onto the surface of the object 3 when the surface of the object 3 does not have any pattern. Meanwhile, the control unit 20 and the storage unit 30 are arranged as follows. The control unit 20 includes an A/D converter (A) 121 and an A/D converter (B) 122 for converting signals from the detecting unit (A) 101 and the detecting unit (B) 102 to digital signals; a counter 125 for administering the addresses of RAMs 123, 124, which will be described later, when the RAMs 123, 124 store digital signals of one scanning cycle; a maximum value detecting unit (A) 127 and a maximum value detecting unit (B) 126 for detecting a maximum signal in one scanning cycle; and a timing pulse generating unit 128 for controlling the CCDs 103, 104 and timing of various units. The storage unit 30 is constituted by the RAM (A) 123 and the RAM (B) 124 for storing digital signals in one scanning cycle and a disk 2 for storing the data of the entire scanning. The timing pulse generating unit 128 outputs pulse signals for an A/D conversion start to the A/D converters 121, 122 via a signal line AS and receives A/D conversion completion signals from the A/D converters 121, 122 via signal lines AEA, AEB. Upon receiving A/D conversion completion signals from both the A/D converters 121, 122, the timing pulse generating unit 128 converts a clock signal T1 (S) (refer to Fig. 3), which is delivered to the CCDs 103, 104 via a signal line T1, from "0" to "1", or from "1" to "0", shifts the CCDs 103, 104 by one bit, respectively, and redelivers the pulse signals for an A/D conversion start to the A/D converters 121, 122. In other words, an oscillation loop is formed by the timing pulse generating unit 128 and the A/D converters 121, 122, scanning by CCDs 103, 104 is executed by the operation of the oscillation loop, and these output signals are converted to digital signals by the A/D converters 121, 122 and inputted to the RAMs 123, 124. In addition, the timing pulse generating unit 128 receives periodic data from a main control unit 1 via a data line TC. A counter which counts digital signals output through the signal line T1 as the clock signal T1 (S) (refer to Fig. 3) and creates one cycle on the basis of the periodic data is included in the timing pulse generating unit 128. This counter delivers one pulse of a timing pulse signal T2 (S) to the CCDs 103, 104 via a signal line T2 for each cycle. The CCDs 103, 104 are of cumulative effect type and are therefore capable of changing the magnitude of an output signal by controlling the cumulative time. The timing pulse signal T2 (S), which is output to the CCDs 103, 104 through the signal line T2, is used to control this cumulative time. Furthermore, the timing pulse generating unit 128 receives a read start signal S (S) (refer to Fig. 3) from the main control unit 1 through a signal line S. When the timing pulse generating unit 128 receives the read start signal S (S) and outputs the timing pulse signals T2 (S) to the CCDs 103, 104, the timing pulse generating unit 128 outputs a write signal T3 (S) (refer to Fig. 3) synchronized with the clock signal T1 (S) to the counter 125 through a signal line T3, while the generation of the pulse signal T3 is stopped on receipt of a read completion signal E (S) (refer to Fig. 3), which will be described later, which is input from the counter 125 through a signal line E. The counter 125 is reset as it receives the read start signal S (S) from the main control unit 1 through the signal line S, and subsequently counts the write signal T3 (S). The values counted by the counter 125 indicate the address values of the CCDs 103, 104 and are output to the RAMs 123, 124 through an address data line ADR. When the counted value reaches a predetermined number, e.g. the number of bits of the CCDs 103, 104, the counter 125 delivers the read completion signal E (S) to the timing pulse generating unit 128 and the main control unit 1 via the signal line E. Upon receipt of the write signal T3 (S), the RAMs 123, 124 write output data from the A/D converters 121, 122 at address positions according to the counted values of the counter 125. The maximum value detecting units 126, 127 are constituted by a comparator and a latch, respectively. The latch is reset by the read start signal S (S), and subsequently, if the data from the A/D converters 121, 122 is greater than the data in the latch, the content of the latch is replaced by the data output by the A/D converters by means of the write signal T3 (S). In other words, when a reading operation for one scanning cycle is completed, the maximum values (Amax), (Bmax) of the read data are held. These maximum values (A max), (Bmax) are output to the main control unit 1 through a data line DAT upon receipt of a control signal delivered from the main control unit 1 through signal lines ME1, ME2. When measurement starts, the main control unit 1, which is constituted by a microcomputer or a personal computer, first sends periodic data to the timing pulse generating unit 128 through a data line TC and then similarly sends the read start signal S (S) to the timing pulse generating unit 128 through the signal line S. As described above, the timing pulse generating unit 128 controls the cumulative time of the CCDs 103, 104, as described earlier, output signals for one scanning cycle from the CCDs 103, 104 are written in the RAMs 123, 124, and the maximum values (Amax), (Bmax) for one scanning cycle are detected by the maximum value detecting units 126, 127. Upon receipt of the read completion signal E (S) from the counter 125, as described above, the main control unit 1 outputs control signals to the maximum value detecting units 126, 127 through signal lines ME1, ME2 so as to input the aforementioned maximum values (Amax), (Bmax) to the main control unit 1 through the data line DAT. If the greater of the data (Amax), (Bmax) is not included in a predetermined range, i.e., if the output of CCDs 103, 104 is too low, the read start signal S (S) is output to the timing pulse generating unit 128 by readjusting the periodic data, and the read data is retaken. Meanwhile, if the greater of the data (Amax), (Bmax) is included in the predetermined range, the main control unit 1 transfers a pair of image data (A), (B) obtained in one scanning cycle which are stored in the RAMs 123, 124 to the main control unit 1 through the data line DAT, by controlling the RAMS 123, 124 through the address data line ADR and read signal lines RR1, RR2, and then inputs the same to the disk 2. Subsequently, the main control unit 1 drives the pulse motor 107 through a signal line MT to move the detecting units 101, 102 in the y-axis direction, and scanning in the x-axis direction is carried out again. Thus, image data (A), (B) concerning the object 3 with respect to the X- and Y-axes are stored in the disk 2. (Processing Output System) As shown in Fig. 2, the processing output system 200 alternately displays the images of the object 3 on a monitor TV 254 from the pair of image data (A), (B) stored in the disk 2, allows the measurer to obtain stereoscopy of the image of the object by viewing through separation eyeglasses 259 having a shutter for closing its right and left lenses alternately, and calculates and displays the coordinates on the X-, Y-, and Z-axes at a desired measurement point on the object 3. As shown in Fig. 2, the processing output system 200 comprises a storage unit 210 for storing the image data (A), (B) forming stereo images; a measurement point setting unit 220 for setting a measurement point in the image data (A); a correlating unit 230 for finding a corresponding point in the image data (B) with respect to that a measurement point by means of correlation processing; a marker unit 240 for adding measurement point mark data to the image data (A) on the basis of the measurement point set in the setting unit 220 and for adding a corresponding point mark data to the image data (B) on the basis of the corresponding supplied from the correlating unit 230 and outputting the same; an image forming unit 250 for forming images by means of the image data (A) including the aforementioned measurement point mark data output from the marker unit 240 and the image data (B) including the aforementioned corresponding mark data; and a display unit 260 for displaying a measurement point on the basis of the measurement point mark data and the corresponding point mark data. The processing output system having the above-described arrangement is controlled by the main control unit 1 which is connected to an input device 4 so as to effect desired control. The video signal controlling unit 252 of the image forming unit 250 outputs a horizontal synchronization signal H and a vertical synchronization signal V, and a blanking signal B to the monitor TV 254, and a blanking signal B to the blanking unit 257 using as a clock signal the output signal of the generator 251 constituted by a counter or the like, and also outputs the address data for displaying the image data of the image memories VRAM (A) 213, (B) 214 of the storage unit 210 at predetermined positions on the monitor TV 254 to the VRAMs 213, 214 through an address data line ADV. When an inhibiting signal which is output from the main control unit 1 through a signal line VCE is input, the video signal control unit 252 stops outputting the address data to the VRAMs (A) 213, (B) 214, but, at all other times, repeatedly outputs the address data to the VRAMs (A) 213, (B) 214. The main control unit 1 inputs image data pertaining to a desired region amongst the image data stored in the disk 2 to the VRAMs (A) 213, (B) 214 by means of the input device 4. The output data of the VRAMs (A) 213, (B) 214 are input to the changeover switch 256 of the image forming unit 250 via the markers (A) 242, (B) 244 of the marker unit 240. The signal of a frequency in which the vertical synchronization signal V of the video signal control unit 252 is divided into two is input to the changeover switch 256, on the basis of which the changeover switch 256 alternately changes over the outputs from the marker (A) 242, (B) 244 to the blanking unit 257. Consequently, the monitor TV 254 alternately displays the images of the object based on the image data (A), (B) by means of the changeover operation of the changeover switch 256. The blanking unit 257 stops the output of image data by means of the blanking signal B output from the video signal control unit 252 at the time of the fly-back of the monitor TV 254, and at other times delivers the output of the changeover switch 256 to a D/A converter 258. The D/A converter 258 converts a digital image data signal from the blanking unit 257 to an analog signal and outputs the same to the monitor TV 254. The separation eyeglasses 259, which is used by the measurer when viewing the monitor TV 254, is arranged such that an optical shutter made by a liquid crystal or the like is provided to the right and left eyeglass lens frames, the optical shutter is made to synchronize with the pictures that are changed over on the monitor TV 254 by means of the output of a flip-flop 258-1 so as to open and close the right and left lenses alternately, thereby allowing a stereoscopy view of the object by viewing the images of the object based on the image data (A), (B) by the measurer's right and left eyes, respectively. Measurement point setting unit 220 is designed to input coordinate values x p , y p to set a measurement point on the monitor TV 254, and the output of a tablet or key 221 for inputting the coordinates of the measurement point is delivered to the setting unit 222. The setting unit 222 stores the input coordinate values x p , y p of the measurement point and outputs the same to a comparator to be described later. At the same time, the setting unit 222 adds to the coordinate value x p a window constant ±ω, which has already been input concerning the coordinate value x p , and thereby outputs (x p + ω), (x p -ω) to a comparator (x p ±ω) 224. Since the correlating unit is adapted to extract a data train similar to a data train in the vicinity of a measurement point in the image data (A) from the image data (B), the window constant (±ω) restricts the length of the data train at that time. The comparator (x p ± ω) 224 receives address data from the video signal control unit 252 and window constant signals (x p + ω), (x p - ω) from the setting unit 222 and generates an output signal when the address data concerning the x-axis direction is between (x p + ω) and (x p - ω). A comparator (y p ) 226 receives address data from the video signal control unit 252 and the coordinate value y p from the setting unit 222, and generates an output signal when the address data concerning the y-axis direction coincides with y p . The AND circuit 232 of the correlating unit 230 generates an output upon receipt of both output signals from the comparator (x p ± ω) 224 and the comparator y p 226. The comparator 234 receives the output signal of a generator 251 through a terminal CL as a clock signal, and, when the output signal of the AND circuit 232 is being input to a terminal A, an output data from the VRAM (A) is input through a terminal DA. Meanwhile, when an output signal from the comparator y p 226 is being input to a terminal B, an output data from the VRAM (B) 214 is input through a terminal DB. In other words, an image data within the range of "x p ±ω " at the line of the co-ordinate value y p stored in the VRAM (A) 213 as a correlation data, as well as an image data for one scanning cycle of the line of the coordinate value y p stored in the VRAM (B) 214 are input to the correlator 234. The correlator 234 detects a portion of an image data similar to the image data of (x p ± ω) input from the terminal DA among the image data of one scanning cycle input from the terminal DB, and outputs a positional signal relating to the position of this portion, i.e, the coordinate value x p ' of a point corresponding to an coordinate value x o . The detailed arrangement of the correlator 234 will be described later. The comparator x p 238 of the correlating unit 230 recives the signal of data x p input from the setting unit 222 and an address data signal in the x-axis direction from the video signal control unit 252, and, when the two coincide, the comparator x p 238 outputs the same to the marker (A) 242 of the marker unit 240. When an output signal is input from both the comparators y p and x p , the marker (A) 242 outputs the output data from the VRAM (A) 213 by replacing it with a mark data, or by replacing the mark data with "FF" when the maximum value is a hexadecimal numeral and smaller than "FF", for instance. In other words, the image data (A) from the VRAM (A) 213 is output from the marker (A) 242 in the form of the image data containing a mark data which indicates a measurement point. The comparator (x p ') 236 receives the signal of the cooordinate value x p ' of a corresponding point corresponding to the coordinate value x p output from the correlator 234 as well as an address data signal in the x-axis direction from the video signal control unit 252, and, when the two coincide, the comparator (x p ') delivers the same to the marker (B) 244. The marker (B) 244 is connected to the comparator (y p ) 226 and the comparator (x p ') 236, and, when outputs from the two comparators 226, 236 are input, the marker (B) 244 delivers an output from the VRAM (B) by replacing it with a mark data. In other words, the image data (B) from the VRAM (B) is output from the marker (B) 244 in the form of the image data (B) containing a mark data which indicates a corresponding point. The image data (A), (B) containing mark data output from the markers (A) 243, (B) 244 are input to the monitor TV 254 via the changeover switch 256, the blanking unit 257, and the D/A converter 258, are displayed on the monitor TV 254 as an image of the object, and the image of the object is viewed stereoscopicaly through the separation eyeglasses 259. At this juncture, if the results of the above-described correlation processing are not correct, the mark of a measurement point is viewed as floated or submerged relative to the surface of the image of the object, so that by observing the mark it is possible to discern whether correlation processing has been correctly carried out or not. Meanwhile, the display 260 for calculating the coordinates (X, Y, Z) of a measurement point includes an arithmetic unit (Y) 262 and an arithmetic unit (X, Z) 264. The arithmetic unit (Y) 262 receives the signal of the coordinate value y p from the setting unit 222, and calculates Y = αy p + Y o , where, α denotes a moving pitch in the Y-axis direction by means of the pulse motor 107, while Y o denotes the position of the reference address (e.g. x = 0, y = 0) of the VRAM (A) 213 in the Y-axis direction with respect to an origin arbitrarily determined on a table for mounting the object 3. The arithmetic unit (X, Z) 264 receives the signal of the coordinate value x p from the setting unit 222 and the signal of the coordinate value x p ' from the correlator 234 and performs the following operations to output the values of X and Z: where β is an interval between the elements of the CCDs 103, 104; L₁, L₂ are distances from the left end of the CCDs 103, 104 to the centers O₁, O₂ of the lenses 105, 106, respectively, as shown in Fig. 4; L is a distance between the centers of the lenses O₁, O₂; f is a distance between the lenses 105, 106 and CCDs 103, 104; and X o , Z o are an X coordinate value and a Y coordinate value, respectively, of a point O₁ with respect to the origin of an X, Y, Z coordinate system. Formulas (1) and (2) are obtained from the relations (3) to (8) shown below. X= X'+ X₀ (3) Z=-Z'+ Z₀ (4) ℓ₁ = L₁ - β x p (7) ℓ₂ =β x p - L₂ (8) The operation of the coordinates (X, Y, Z) may be performed by inputting the data y p , x p , and x p ' into the microcomputer or personal computer constituting the main control unit 1. Next, description of the aforementioned correlator 234 will be made. With respect to the basic principle of the correlator, there are the Sequential Similarity Detection Algorithm method (SSDA method) and the correlation coefficient method. The SSDA method is a method whereby in x p ' is changed consecutively, and x p ' at the time when G₁ becomes minimum is found. Meanwhile, the correlation coefficient method is a method whereby in x p ' is changed consecutively, and x p ' at the time when G₂ comes closest to "1" is found, where Ax p , Bx p denote mean values. Referring now to Fig. 5, description will be made of the arrangement of the correlator 234 based on the aforementioned SSDA method. The terminal A where the output of the AND circuit 232 is delivered is connected to the AND circuit 301 and the changeover switch 304, while the terminal B where the output of the comparator (y p ) 226 is input is connected to the reset terminal RST of the counter (1) 307, the AND circuit 308, the RAM 305, and an inverter 306. The terminal DA where the output of the VRAM (A) 213 is input is connected to the changeover switch 304, while a terminal DB where the output of the VRAM (B) 214 is input is connected to the RAM 305. A terminal CL where the output of the generator 251 is input is connected to the clock terminal CL of the counter (1) 307, the AND circuits 301, 302, the RAM 305, and the cumulative adders (1) 314, (2) 315. The output terminal of the counter (1) 307 is connected to the counter (2) 309, the cumulative adders (1) 314, the minimum value detector 317, the cumulative adders (2) 315, the adder 310, and the comparator 320. The output terminal of the AND circuit 308 is connected to the counter (2) 309. The output terminal of the inverter 306 is connected to and AND circuit 302 and a delay element 322, while the output of the AND circuits 301, 302 is input to a shift register 303. The output of the changeover switch 304 input to the shift register 303, while the output of the shift register 303 is input to the changeover switch 304 and a subtractor 312. The output of the counter (2) 309 is input to the adder (1) 310 and the adder (2) 323, while the output of the adder (1) 310 is input to the RAM 305 and a comparator (END) 311. The output of the comparator (END) 311 is input to the counter (2) 309 and the AND circuit 321, while the output of the delay element 322 is also input to the AND circuit 321. Meanwhile, the output of the RAM 305 is input to the cumulative adder (1) 314 and the cumulative adder (2) 315 via the subtractor 312 and an absolute value arithmetic unit 313. The outputs of the cumulative adders (1) 314, (2) 315 are input to a synthesizer 316, while the output of the synthesizer 316 is input to a minimum value detector 317. The output of the AND circuit 321 is input to the latch 319 and the minimum value detector 317. Furthermore, the output of the adder (2) 323 is input to the latch 319 via an address latch 318, while the output of the minimum value detector 317 is input to the address latch 318. The output of the latch 319 becomes an output of the correlator 234. In the correlator 234 having the above-described arrangement, when a signal from the AND circuit 232 is input to the terminal A, a clock signal input from the terminal CL is input to the shift register 303 through the AND circuit 301, and output data from the VRAM (A) 213 input from the terminal DA are consecutively input to the shift register 303 through the changeover switch 304. As for the shift registers 303, shift registers in a (2ω + 1) stage corresponding to the number of data of (x p ± ω) are disposed in parallel in a number equivalent to the number of bits constituting the data and shift the contents of the data in a parallel manner. Meanwhile, when signals from the AND circuit 232 cease to be input to the terminal A, the changeover switch 304 supplies the output data of the shift register 303 to be used as the input of the shift register. Accordingly, a ring-shaped shift register, i.e., a ring register is formed by the changeover switch 304 and the shift register 303. When a signal from the comparator (y p ) 226 is input to the terminal B, the counter (1) 307 is reset, the RAM 305 assumes a writing state, and the counter (2) 309 assumes a calculating state by receiving a clock signal through the AND circuit 308. In other words, since the count of the counter (1) 307 is 0, the RAM 305 receives the contents of the counter (2) 309 as it is as an address signal through the adder (1) 310, and writes the data from the terminal DB in an address position in accordance with the output of the counter (2) 309. The comparator (END) 311 compares the number 'n' of data for one scanning cycle which is an object for the detection of a corresponding point and the value from the adder (1) 310, and resets the counter (2) 309 when the two coincide. When a signal from the comparator (y p ) 226 is being input to the terminal B, the AND circuits 302, 321 assume an inhibited state by means of the inverter 306, and do not generate signals. Here, the delay element 322 prevents the AND circuit 321 from generating a signal owing to a time lag caused by the counter (2) 309, the adder (1) 310, and the comparator (END) 311. As described earlier, while the address data concerning the y-axis from the video signal control unit 252 is y p , signals are generated at the terminal B, and, while the address data concerning the x-axis during that period of generation is within the range of (x p ± ω ), signals are generated at the terminal A. Accordingly, among the image data (B) stored in the VRAM (B) 214, the image data in one scanning at the line y p is input, while, among the image data (A) stored in the VRAM (A) 213, the image data at the line y p falling within the range of "x p ± ω" are consecutively input to the shift register 303. The completion of generation of signals at the terminal B means the start of correlation processing. In other words, when signals from the comparator (y p ) 226 ceases to be applied to the terminal B, the counter (1) 307 begins counting clock signals, and the aforementioned ring register constituted by the changeover switch 304 and the shift register 303 operates in accordance with the clock signals as the inhibition of the AND circuit is released. Also, the completion of generation of signals at the terminal B sets the RAM 305 in a read state, and makes the state of release of inhibition i.e., the state of output of the comparator (END) 311, transmittable to the latch 319 by slightly delaying the AND circuit 321. The counter (1) 307 is a counter which counts one cycle when the count is (2 ω + 1), and operates in synchronization with the aforementioned ring register. The counted value of the counter (1) 307 means 'i' in Formula (9), and the correlator 234 calculates G₁ of Formula (9) every time the counter (1) 307 counts one cycle. The counted value of the counter (2) 309 means (x p ' -ω), and increases by 1 every time the counter (1) 307 counts one cycle. The adder (1) 310 adds the counted values of the counters (1) 307, (2) 309, and inputs this counted value to the RAM 305 as address data. Accordingly during the initial cycle of the counter (1) 307, the RAM 305 outputs the output data of B₀, B₁, ..... B₂ω, during the following cycle outputs the output data of B₁, B₂, ..., B 2ω+1 , and during the ensuring cycle outputs the output data of B₂, B₃, ...., B 2ω+2 . In other words, the output of the RAM 305 becomes a data train in which the value is increased by 1 data every time the counter (1) 307 counts 1 cycle. The shift register 303 repeatedly outputs the data train of A₀, A₁, ....., A₂ every time the counter (2) 309 counts one cycle. This operation of the counter (1) 307 continues until the correlation processing is completed when the output value of the adder (1) 310 becomes 'n' and the comparator (END) 311 generates an output signal. The subtractor 312 subtracts the output data of the RAM 305 from the output data of the shift register 303 and delivers the output. The absolute value arithmetic unit 313 converts to positive the output data of the subtractor 312 when that data is negative. The cumulative adder (1) is constituted by an adder and a latch, and consecutively adds the output data of the absolute value arithmetic unit 313 to the data held in the latch while the counter (1) 307 counts 1 cycle. Although the synthesizer 316 will be described later in detail, it should be understood here for the sake of explanation that the synthesizer 316 inputs the output of the cumulative adder (1) 314 to the minimum value detector 317. The minimum value detector 317 is constituted by a comparator and a latch. The latch, when reset, assumes the largest value (e.g. "FF" in the case of 8-bits). When comparison of the input data with the content of the latch is made by the aforementioned comparator, and if the input data is smaller, the input data is input to the aforementioned latch, and an output signal meaning a change in the data held in the latch is output from the minimum value detector 317 to the address latch 318. An output signal from the counter (1) 307 is supplied to the cumulative adder (1) 314 and the minimum value detector 317, and, every time the counter (1) 307 counts 1 cycle and its output signal is generated, the minimum value detector 317 operates. Upon completion of the generation of the output signal of the counter (1) 307, the cumulative adder (1) 314 is reset, and the output signal of the minimum value detector 317 stops. Since a value in which ω is added to the counted value of the counter (2) 309 by the adder (2) 323, i.e., the value of x p ' - ω + ω = x p ' since the counted value of the counter (2) 309 is (x p ' - ω ), is supplied to the address latch 318, and this x p ' is stored in the latch 319 in conjunction with the generation of an output signal of the minimum value detector 317. Accordingly, the value x p ' at the time when a smaller G₁ is obtained is stored in the address latch 318. The output signal of the comparator (END) 311 is supplied to the latch 319 and the minimum value detector 317 through the AND circuit 321. As a result, the content of the address latch 318 is stored in the latch 319, and is output to the outside of the correlator 234 as output data. Meanwhile, the minimum value detector 317 assumes a reset state and provides for the next correlation processing. The wider the window width (2 ω) in the correlation processing, the fewer the cases of disagreement of a corresponding point with respect to a measurement point i.e., mismatching, but the change in the values of G₁ with respect to the change in x p ' is gradual, with a resultant low detection sensitivity. On the other hand, the narrower the window width (2 ω ), the higher the detection sensitivity, but the number of cases of mismatching increases since the data to be used in the calculation of correlation are fewer. To overcome this defect, the correlator 234 of the present embodiment is arranged such that, using two or more window widths, it is capable of detecting a final corresponding point by synthesizing the states of correlation obtained from each window width. The synthesizer 316, the cumulative adder (2) 315, and the comparator 320, which will be described hereinafter, operate for this purpose. The comparator 320 generates an output signal when the output value of the counter (1) 307 is in the range of (ω ± ω'). Since the output of the shift register 303 is x p when the counted value of the counter (1) 307 is ω , (ω + ω') means (x p ' ± ω'), where ω > ω'. The cumulative adder (2) 315 performs cumulative addition only when the comparator 320 is generating output signals. The synthesizer 316 synthesizes the values of the cumulative adders (1) 314, (2) 315 and delivers its output to the minimum value detector 317. Next, description will be made of the synthesizer 316. As shown in Fig. 6, the synthesizer in the first embodiment is constituted by a comparator 401 into which the output of the cumulative adder (1) 314 is input and a gate 402 into which the outputs of the comparator 401 and the cumulative adder (2) are input. As shown in Fig. 6, the comparator 401 compares an output a ○ from the cumulative adder (1) 314 with a predetermined threshold level, and when the output a ○ from the cumulative adder (1) 314 is smaller, the comparator 401 releases the gate 402 and delivers the output b ○ of the cumulative adder (2) 315 to the minimum value detector 317, and, when the output a ○ is larger than the aforementioned threshold level, inhibits the gate 402 and delivers to the same the largest value ("FF" in the case of 8-bits) as an output c ○. Accordingly, in the synthesizer of the first embodiment, when a condition of correlation at a large window width is not good, it is assumed that there is no state of correlation by disregarding the state of correlation at a small window width. On the other hand, when a state of correlation is good at a large window width, a corresponding point is detected in a condition of correlation at a small window width which can be expected to be able to perform more accurate correlation processing. The synthesizer of a second embodiment is constituted by an adder 403, as shown in Fig. 7, and outputs to the minimum value detector 317 an output d ○ in which the output a ○ of the cumulative adder (1) 314 and the output b ○ of the cumulative adder (2) 315 are added by the adder 403. This method, whereby a state of correlation at respective window widths is synthesized using the above-described two or more window widths so as to detect a final corresponding point, is applicable to a correlator employing the aforementioned correlation coefficient method. As for a synthesizing method in this case, it is appropriate to adopt a method whereby a state of correlation at a large window width is judged with respect to a predetermined threshold level, as in the case of the synthesizer of the first embodiment, and, when the state of correlation is good, a state of correlation at a small window width is employed, or a method in which states of correlation at a large window width and a small window width are multiplied. In the above-described embodiments of the coordinates measuring apparatus, an arrangement is made such that the input of a measurement point is effected by means of a tablet or key, but it is also possible to make an alternative arrangement in which measurement points are predetermined and corresponding points are detected consecutively with respect to these measurement points. Furthermore, the input of a measurement point may be effected by projecting a latticed pattern onto the object 3 by means of the illumination unit 108, extracting the position of the latticed pattern from the image data (A) , setting the extracted position of the latticed pattern as the x-coordinate value of the measurement point, and using a predetermined one as the y-coordinate value. The above-described correlator 234 has a circuit shown in Fig. 5 to effect correlation processing on a real-time basis. If it is not necessary to effect correlation processing at a high speed, the correlation processing may be carried out by an arithmetic unit such as a microcomputer. As is apparent from Formula (10), the correlation coefficient method has numerous operating functions and is therefore processing by means of a program becomes advantages. Therefore, the correlation processing according to the correlation coefficient method using an arithmetic unit will be described with reference to a flowchart shown in Fig. 9. As described before, the correlation coefficient method is expressed by Formula (10), and if this Formula (10) is developed, we have Hence, a coefficient of correlation G can be obtained by fixing factors CA, CB, CC, WX and WY and inserting them into Formula (11). Referring now to Fig. 9, in Step 1 ○ , large and small window widths ω, ω' are read from the setting unit 222 and in Step 2 ○ , coordinate values x p , y p of the measurement point are read from the setting unit 222. In Step 3 ○ , image data from (Ax p - ω ) to (Ax p + ω ) and from B o to B n at a y p line set in the setting unit are read from the VRAMs (A) 213, (B) 214. In Step 4 ○ , 0 is input as the initial value used at the time when there is no correlation. In Step 5 ○ , as the initial setting of x p ', ω , which is one half of the window width, is input. In Step 6 ○ , input 0 as the initial value of i. In Step 7 ○ , 0 is input to CA₂, CA₃, CB₂, CB₃, CC₂, CC₃, WX₂, WX₃, WY₂ and WY₃, respectively. In Steps 8 ○, 9 ○ and , (Ax p -ω+i · Bx p -ω+i) (Ax p -ω+1)², and (Bx p -ω+i)² are calculated, and the results are written in CA₁, CB₁ and CC₁, respectively. In Step , judgment is made as to whether i < ω - ω', and if YES is the answer, the operation proceeds to step , and if NO, to Step . In Step , judgment is made as to whether i > (ω + ω'), and if YES is the answer, the operation proceeds to Step , and if NO, to Step . In Step , CA₁ is added to CA₃, and CB₁ to CB₃, CC₁ to CC₃, WX₁ to WX₃, and WY₁ to WY₃, respectively, and hence CA₃, CB₃, CC₃, WX₃, WY₃ are rewritten, respectively. In Step , CA₁ is added to CA₂, CB₁ to CB₂, CC₁ to CC₂, WX₁ to WX₂, and WY₁ to WY₂, respectively, and hence CA₂, CB₂, CC₂ WX₂, and WY₂ are rewritten, respectively. In Step , 1 is added to the value of i, and the processing data advances one stage as a result. In Step , judgment is made as to whether i = 2ω, i.e., whether or not all data in the window have been processed. If YES, the operation proceeds to Step , and if NO, returns to Step 8 ○ . In Step , CA₂ is added to CA₃, CB₂ to CB₃, CC₂ to CC₃, WX₂ to WX₃, and WY₂ to WY₃, respectively, each becoming a factor corresponding to a large window. CA₂, CB₂, CC₂, WX₂, and WY₂ represent factors corresponding to small windows, and, by performing operations by inserting these values into Formula (11), a coefficient of correlation g₁ in a small window is found. In Step , by performing operations by inserting into Formula (11) the values of the factors CA₃, CB₃, CC₃, WX₃, and WY₃ obtained in Step , a coefficient of correlation g₂ in a large window is found. In Step , G o , which is a coefficient of correlation synthesized by the coefficient of correlation g₁ in the small window and the coefficient of correlation g₂ in the large window, is found from g₁ and g₂. In Step , decision is made as to whether or not G o > G m . If YES, the operation proceeds to Step , and if NO, to Step . In Step , the content of Gm is substituted by G o , and in Step , x p ' is input for x p '. In Step , judgment is made as whether or not x p ' = n - ω , i.e., whether or not retrival has ended. If YES, the operation proceeds to Step , and if NO, to Step in which 'X p ' is increased by 1 and the operation is returned to 6 ○ . In Step , x p ', in which a maximum coefficient of correlation G o is obtained, i.e., a corresponding point, is output, thereby completing the correlation processing. In the foregoing embodiments, the minimum value detector 317 of the correlator 234 accumulates the data indicating the state of correlation of corresponding points, but this state of correlation can also be indicated by displaying a mark indicating a measurement point, for example, by changing the color or the like. In addition, it is also possible to connect an adder to the output portion of the correlator 234, and to make a such an arrangement that, when it is decided that the correlation processing is not being carried out with a desired accuracy, the coordinates of a corresponding point can be corrected by the use of said adder.

Claims: A coordinates measuring apparatus comprising: a storage unit (210) for storing a first image data and a second image data together constituting a stereo image of an object (3) to be measured; a setting unit (222) for setting a measurement point in said first image data; a correlating unit (234) for determining a corresponding point in said second image data corresponding to said measurement point by means of correlation processing; a marker unit (242, 244) for generating a modified first image data by adding measurement point mark data to said first image data and for generating a modified second image data by adding corresponding point mark data to said second image data, the measurement point mark data indicating said measurement point supplied from said setting unit and the corresponding point mark data indicating said corresponding point supplied from said correlating unit, and for outputting the so modified image data; an image forming unit (250) having an image forming device, which alternately forms the modified first image and the modified second image, the modified first and second images being alternately displayed on the same monitor (254), further having a scope (259) disposed in front of a viewer's right and left eyes and allowing any of said modified first and second images to be viewed by the left eye and the other by the right eye; and a display unit (260) for calculating and displaying three-dimensional coordinate values of said measurement point from both the data of said measurement point and the data of said corresponding point. A coordinates measuring apparatus according to claim 1, wherein said correlating unit is arranged such as to perform correlation processing on the basis of a first data train included in a first window centering on said measurement point provided in said first image data as well as a second data train included in a second window having a window narrower than said first window so as to obtain said corresponding point. A coordinates measuring apparatus according to claim 1 or 2, wherein said correlating unit (234) is arranged such as to perform processing by the Sequential Similarity Detection Algorithm method (SSDA method). A coordinates measuring apparatus according to claim 1 or 2, wherein said correlating unit (234) is arranged such as to perform processing by the correlation coefficient method. A method of measuring coordinates, comprising: a first step of storing a first image data and a second image data together constituting a stereo image of an object (3) to be measured; a second step of setting a measurement point in said first image data; a third step of finding a corresponding point in said second image data corresponding to said measurement point by means of correlation processing; a fourth step of generating a modified first image data by adding measurement point mark data to said first image data and for generating a modified second image data by adding corresponding point mark data to said second image data, the measurement point mark data indicating said measurement point supplied from said setting unit and the corresponding point mark data indicating said corresponding point supplied from said correlating unit; a fifth step of alternately forming the modified first image and the modified second image, the modified first and second images being alternately displayed on the same monitor (254), and allowing any of said modified first and second images to be viewed by the left eye and the other by the right eye of a viewer; and a sixth step of calculating and displaying three-dimensional coordinate values of said measurement point on the basis of the data of said measurement point and the data of said corresponding point. A coordinates measuring apparatus according to claim 1, which further comprises: a detecting unit (10) constituted by two object lenses (105, 106) which are aligned in a first direction (x-direction) and which are disposed at positions spaced apart in a second direction (z-direction) from the object (3) and by two photoelectrical elements (103, 104) to detect said first and second images, the photoelectrical elements having linear arrays and being arranged to form a detection direction parallel to the first direction (x-direction); a control unit (20) for taking out data from each of said arrayed photoelectrical elements; and storage means (30) for storing the data of each array taken out from said control unit. A coordinates measuring apparatus according to claim 6, wherein said detecting unit (10) is arranged to be integrally movable by a moving unit in a third direction (y-direction) orthogonal to the first direction (x-direction) and the second direction (z-direction), and wherein said control unit (20) is arranged such as to move the detecting unit (10) after taking out the data of each array from said arrayed photoelectrical elements. A coordinates measuring apparatus according to claim 6, wherein said detecting unit (10) has a projection unit for projecting a predetermined pattern onto said object. A coordinates measuring apparatus according to claim 7, wherein said storage means (30) includes an auxiliary storage unit for temporarily storing the data of each array each time said arrayed detecting elements move, and a main storage unit for storing the entire data stored by said auxiliary storage unit on each occasion of movement. A coordinates measuring apparatus according to claim 6, wherein said arrayed detecting element includes a charge-transferring element, and said control unit (20) has a comparing unit for detecting the maximum value of the output data of said charge-transfer element and for comparing the same with a predetermined value, in such a manner that, when the maximum value of the output data of said charge-transfer element does not fall within a predetermined range, adjustment of the cumulative time of said charge-transfer element is made to effect redetection.

Inventors: MURAI, SHUNJI, OHTANI, HITOSHI, OHTOMO, FUMIO
Applicants: KABUSHIKI KAISHA TOPCON
Application year: 1986
Main classification: G01B11
IPC codes: G01C11