Three-dimensional measuring apparatus

Abstract: A three-dimensional measuring apparatus comprises a multi-slit projector (101) for projecting a coded multi-slit light pattern onto an object to be measured and an image recognizing apparatus. The image recognising appartus comprises an image pick up unit (102) for picking up said coded multi-slit light pattern projected on said object, a binarization circuit (103) for binarizing image signals from said image pick up unit (102), an image arithmetic unit (105) for changing, each time said coded multi-slit light pattern is changed, weights assigned to the binarized image signals obtained by said binarization circuit (103), and for summing up the last weighted binarized image signals or the image signals of the last added results read out from an image memory (104), with newly weighted binarized image signals, a coded pattern irradiated point memory (106) for storing a coordinate of a coded pattern irradiated point of said object, said coordinate corresponding to said multi-slit light which is decoded from the final arithmetic results of said image arithmetic unit (105), and a distance calculating unit (107) for calculating a three-dimensional position of said coded pattern irradiated point of said object, based on the coordinates of the coded pattern irradiated points stored in said coded pattern irradiated point memory (106).

Description: BACKGROUND OF THE INVENTION The present invention is divided from European patent 91 110 071.7 and relates to a three-dimensional measuring apparatus for measuring a shape of an object by projecting multi-slit lights on the object to obtain a three-dimensional measurement. In the fields involving a three-dimensional visual function for recognizing an object to be measured for use in a robot or other various automatic apparatuses, or a shape input apparatus for measuring the shape of the object to be input, there is a known arrangement in which a slit light is irradiated by a projector onto the object to be measured, and scanned and imaged by an imaging unit from an angle different from the irradiating direction, to calculate the distance from the observation point to the slit light irradiated point based on the triangulation, to thereby recognize the shape of the object to be measured. Instead of scanning the slit light, a multi-slit projector which irradiates a plurality of parallel slit lights to enable a plurality of points to be measured at the same time can be used. In this case, the resolution in the measurement of the object to be measured is determined by the resolution of the imaging apparatus, and the pitch between the slit lights irradiated from the projector, and thus the resolution in the measurement of the object must be improved. In the three-dimensional multi-slit measuring apparatus, multi-slit lights are projected onto an object to be measured, the projected image is picked up by an image pick up unit such as a television camera, and a reference slit light is determined among the projected multi-slit lights to calculate a distance from an observation point to a coded pattern irradiated point of the object to be measured. In this apparatus, however, the speeding at which the measurement is made must be increased. An object of the present invention is to increase the speed of the three-dimensional measurement of the object to be measured. To attain the object of the present invention, there is provided a three-dimensional measuring apparatus comprising a multi-slit projector for projecting a coded multi-slit light pattern onto an object to be measured, and an image recognizing apparatus, the image recognizing apparatus comprising: an image pick up unit for picking up the coded multi-slit light pattern projected onto the object; a binarization circuit for binarizing the image signals from the image pick up unit ; an image arithmetic unit for changing, each time the coded multi-slit light pattern is changed, weights assigned to the binarized image signals obtained by the binarization circuit, and for summing up the last weighted binarized image signals or the image signals of the last added results read out from an image memory, with newly weighted binarized image signals; a coded pattern irradiated point memory for storing a coordinate of a coded pattern irradiated point of the object, the coordinate corresponding to the multi-slit light which is decoded from the final arithmetic results of the image arithmetic unit; and a distance calculating unit for calculating a three-dimensional position of the coded pattern irradiated point of the object, based on the coordinates of the coded pattern irradiated points stored in the coded pattern irradiated point memory. The present invention will be more clearly understood from the following description, given by way of example, of preferred embodiments with reference to the accompanying drawings, wherein: Fig. 1 is a diagram showing a conventional example of a projector in a three-dimensional measuring apparatus; Fig. 2 is a diagram showing another conventional example of a projector; Fig. 3 is a diagram showing a known multi-slit projector; Fig. 4 is a diagram principally showing a projector in a three-dimensional measuring apparatus with movable multi-slit lights; Fig. 5 is a perspective view of a projector according to the principle shown in Fig 4; Fig. 6 is a sectional view of the projector showing the principal part of the projector shown in Fig 5; Fig. 7 is a perspective view of another projector according to the principle shown in Fig 4; Fig. 8 is a perspective view of yet another projector according to the principle shown in Fig 4; Fig. 9 is a diagram explaining conventional coded multi-slit light pattern; Fig. 10 is a diagram explaining the principle of the three-dimensional measuring apparatus according to the present invention; Fig. 11 is a block diagram showing a three-dimensional measuring apparatus according to an embodiment of the present invention; Fig. 12 is a flowchart explaining the operation of the apparatus shown in Fig. 12; Fig. 13 is a diagram explaining the operation of the apparatus shown in Fig. 11; Fig. 14 is a diagram explaining the distance measurement in the apparatus shown in Fig. 11; Fig. 15 is a block diagram showing a three-dimensional apparatus according to another embodiment of the present invention; Fig. 16 is diagram explaining a pipeline processing according to still another embodiment of the present invention; Fig. 17 is a diagram explaining a pipeline processing according to still another embodiment of the present invention. DESCRIPTION OF THE PREFERRED EMBODIMENTS For a better understanding of the present invention, conventional arts will be first described with reference to Fig. 1 to Fig. 3. Fig. 1 shows a conventional multi-slit projector for irradiating a plurality of parallel lights. In Fig. 1, a light from a high-brightness lamp 11 such as a xenon lamp is incident upon a lens 13 through slits 12 which produce a plurality of slit lights 14 irradiating an object to be measured. In this case, the slits 12 and lens 13 are selected so as to be capable of obtaining a desired length L1 of the slit lights 14. Also, Fig. 2 shows another conventional example in which, through a combination of a semiconductor laser, a collimating lens, a cylindrical lens, etc., a plurality of light sources 21, 22, and 23 for irradiating slit lights on a mirror 25 are arranged on circumferentially around the rotational shaft of a motor 24, and the mirror 25 is rotated by the motor 24 to irradiate the slit lights onto the object to be measured. Additional light sources may be arranged. The length L2 of the mirror 25 is, for example, 12 cm, and the distance between the rotational shaft of the motor 24 and the light sources 21, 22, 23 is set, for example, to 20cm, thus leading to a comparatively large-sized configuration. There is also known an apparatus in which a coded multi-slit light is projected onto the object to be measured, to execute a three-dimensional measurement. The multi-slit projector in the three-dimensional measuring apparatus, for example, has a constitution as shown in Fig. 3, in which laser lights having a single wavelength emitted from a semiconductor laser 31 are focused to produce parallel lights, which are incident on a first diffraction grating 34 which produces an output light 38 consisting of spot lights arranged in the y-axis direction, which in turn strikes on a second diffraction grating 35. The diffraction grating 35 is formed so that its diffractive direction is perpendicular to that of the first diffraction grating 34, and thus the spot lights are made output lights arranged in a plurality lines and which fall on a cylindrical lens 33. The first and second diffraction gratings 34, 35 may be constituted of optical fibers having a diameter of, for example, about 20 to 70 µ m, and arranged in a plane. The cylindrical lens 33 is extended in the x-axis direction, which produces an output light 40 in the form of a multi-slit light consisting of spot lights linked in the y-axis. In this case, providing that the cylindrical lens 33 is extended in the y-axis direction, the output light 40 is a multi-slit light consisting of spot lights linked in the x-direction. The output light 40 arrives at the shutter array 37, which produces a coded multi-slit light pattern 36 by a selective opening and closing of the shutter array. The shutter array 37 may be constituted, for example, by liquid crystal shutters utilizing a polarization effect, or shutters utilizing electrooptical effect elements. Fig. 9 is an explanatory drawing of the conventional coded multi-slit light pattern, in which different patterns A, B, and C are projected in sequence to produce patterns of eight slit lights. The pattern A has an alternate slit light pattern, the pattern B has an alternate pair of slits light pattern, and the pattern C has an alternate adjacent four slits light pattern, and Each time these three kinds of coded multi-slit light pattern are projected, picked-up image signals are stored in the image memory. For example, at a position of a slit light corresponding to stored image signals, when "1" is read for the pattern A, "0" for the pattern B, and "1" for the pattern C, "C, B, A" = "101" is obtained, whereby it can be recognized that the slit light is the No. 5 slit light. Namely, provided that "n" kinds of multi-slit light patterns are projected for 2 n slit lights, all of the slit numbers can be recognized. In this manner, since respective numbers of the multi-slit lights projected on the object to be measured are identified, the position of each point of the object to be measured can be three-dimensionally calculated, to thereby determine the three-dimensional configuration thereof. In the three-dimensional measuring means using the slit lights, the measurement must have an accuracy equal or superior to that of the pixel resolution of the imaging apparatus. In the above-mentioned conventional example shown in Fig. 1, the width of the slit light is determined by the slit 12, which usually makes the slit light width larger than the pixel of the imaging apparatus, partially because the light source 11 does not emit parallel light and the phases of the lights are different, and thus an image of light overlaps two pixels of the imaging apparatus, and accordingly, it is difficult to improve the resolution. Further, in the conventional three-dimensional measuring apparatus shown in Fig. 1, slit lights are projected onto the object to be measured, and picked up on a two-dimensional plane in the form of coordinates, to measure the distance from an observation point, and thus a drawback arises in that the measuring time is prolonged due to the necessity for a successive scanning. Conversely, the conventional examples shown in Fig. 2 have a brightness distribution of the slit lights in the sectional direction in the form of a Gaussian distribution. Accordingly, even though the slit light image overlaps two pixels, the center of the slit light can be determined by a weighted operation or comparative operation, to thereby improve the pixel resolution. Nevertheless, when a high-speed three-dimensional measurement is carried out for the object to be measured, 50 to 60 or more slit lights are needed. Therefore, the conventional example shown in Fig. 2 must have several tens of light sources arranged circumferentially around the rotational shaft of the motor 24, which results in an enlargement of the apparatus size and a higher production cost, and thus it is difficult to put the apparatus to practical use. Furthermore, to realize a visual function for use in a robot or other automatic apparatuses, a multi-slit projector must be mounted on the moving body, which requires miniaturization. The conventional example as shown in Fig. 1, however, uses a high-brightness lamp 11, which prevents such a miniaturization. Also, as described earlier, it is difficult to miniaturize the conventional example shown in Fig. 2. Conversely, the miniaturization of the multi-slit projector shown in Fig. 3 is easy because it employs only the single semiconductor laser 31, the first and the second diffraction gratings 34 and 35, and the cylindrical lens 33, to obtain a multi-slit light. Nevertheless, this has a disadvantage in that it is impossible to measure the portion between the slits, and thus the pixel resolution is analogous to that of the conventional example shown in Fig. 1. The multi-slit projector shown in Fig. 4, is based on the multi-slit projector shown in Fig. 3, but an improvement in the pixel resolution is attained by making the multi-slit lights movable. The multi-slit projector of Fig. 4 comprises a light source 41 for emitting parallel lights; first and second diffraction gratings 42 and 43 for receiving the parallel lights from the light source 41 and for diffracting the parallel lights in diffractive directions perpendicularly to each other; a cylindrical lens 44 on which output lights diffracted by the first and second diffraction gratings 42 and 43 are incident and which produces a plurality of parallel slit lights dispersed in the diffractive direction of either one of the first and second diffraction gratings 42 and 43; and a shutter array for obstructing predetermined slit lights among the parallel slit lights from the cylindrical lens 44, to thereby form a code therefrom. There is further provided an actuator 46 for displacing a configuration including at least one of the first and second diffraction gratings 42 and 43 by only a minute distance in the direction perpendicular to the parallel slit lights. Parallel lights emitted from the light source 41 modified into oval spot lights 47 through the first diffraction grating 42, and further modified into spot lights 48 in a matrix arrangement. Subsequently, the cylindrical lens 44 produces parallel slit lights arranged in the direction perpendicular to the longitudinal direction of the cylindrical lens 44 and having a pitch 10, which impinges on the shutter array 5 by which the parallel slit lights are formed into a code by a selective use of the shutters. When the actuator 46 causes the first and the second diffraction gratings 42 and 43, the cylindrical lens 44, and the shutter array 45 to be displaced in the X-axis direction perpendicular to the slit lights extending along Y-axis, by, for example, half the pitch P of the slit lights, the parallel slit lights 49 are the same as when slit lights having a pitch equal to half of the pitch P are irradiated, thereby improving the pixel resolution. Similarly, when the displacement is effected by a 1/3 pitch, and subsequently effected by further a 1/3 pitch, the parallel slit lights 49 are the same as when the slit lights have a 1/3 pitch of the pitch P. Namely, the pixel resolution can be improved by a simple structure. Figure. 5 is a perspective view of the multi-slit projector using the principle described above with respect to Fig. 4 in which a voice coil motor 60 is used as an actuator, and Fig. 6 is a sectional view of the principal part thereof. In the figures, reference numeral 51a denotes a semiconductor laser, 51b a collimating lens, 52 a first diffraction grating, 53 a second diffraction grating, 54 a cylindrical lens, 55 a shutter array, and 56 a support frame for supporting the first and second diffraction gratings 52 and 53, the cylindrical lens 54, and the shutter array 55. Reference numeral 57 represents a base plate, 57a is an upright portion thereof, 58 and 59 are support springs, 61 is an iron core, 62 is a coil, 63 is a support cylinder, and 64 designates a permanent field magnet. A light having a single wavelength emitted from the semiconductor laser 51a is converted into a parallel beam by the collimating lens 51b and arrives at the first diffraction grating 52 which produces an output light consisting of oval spot lights arranged in a line. The output light falls on the second diffraction grating, which produces spot lights arranged in a matrix, and impinges on the cylindrical lens 54. In Fig. 5, the cylindrical lens 54 is in the shape of a half-cylinder, but also may have a fully cylindrical shape. The spot lights are arranged in the direction perpendicular to the longitudinal direction of the cylindrical lens 54, as chain-like slit lights respectively through the cylindrical lens 54, and arrive at the shutter array 55. When the shutter array 55 is completely opened, all of the slit lights are output in the form of a multi-slit light. Further, when the multi-slit light is irradiated a plurality of times, it can be coded by closing the shutters at selected locations. As the shutter array 55, for example, a liquid crystal shutter array utilizing a polarized light, and a shutter array having electrooptic effect elements intervened between the polarizing plates can be used. In these cases, electrodes can be selected to apply voltage, to thereby control the opening and closing of the selected shutter. Also, in the voice coil motor 60 acting as the actuator, the iron core 61 is fixed to the upright portion 57a of the base plate 57, and facing the permanent field magnet 64 fastened to the iron core 61 is the coil 62 secured to the support cylinder 63, which in turn is connected to the support spring 59. The bottom ends of the support springs 58 and 59 respectively are fixed to the base plate 57, and at the top ends thereof, there is mounted a support frame to which is fixed the first and second diffraction gratings 52 and 53, the cylindrical lens 54, and the shutter array 55. Consequently, when the coil 62 is supplied with an electric current, the support cylinder 63 fixing the coil 62 is displaced by a magnetic attraction or repulsion produced between the coil 62 and the permanent field magnet 64, which causes the configuration including the first and the second diffraction gratings to shift by a minute distance with respect to the light source, against the support springs 58 and 59. In this case, since the multi-slit light is composed of longitudinal slit lights, a laterally microscopic displacement thereof occurs. If the minute displacement is, for example, half a pitch P of the multi-slit light, the situation is the same as when the multi-slit light having a P/2 pitch is irradiated onto the object to be measured. It is also possible to displace same at a pitch of P/3 or P/4, and such a microscopic displacement can be accurately achieved without difficulty by a feedback control of the voice coil motor 60. Furthermore, a continuous displacement between the slit lights also can be used for the measurement of the object. Moreover, there may be adopted configurations in which only the first diffraction grating 52 is supported by the support springs 58 and 59 so as to be displaceable while the second diffraction gratings 53, the cylindrical lens 54, and the shutter array 55 are fixed along with the light source, or in which only the second diffraction grating 53 is displaceably supported by the support springs 58 and 59 while fixing the first diffraction grating 52, the cylindrical lens 54, and the shutter array 55 together with the light source. Further, it is also acceptable to displaceably support only the first and the second diffraction gratings 52 and 53 by the support springs 58 and 59 with the other parts fixed together with the light source. As described above, the configuration including at least one of the first and the second diffraction gratings is shifted by only a minute distance, so that positional slippage between the multi-slit light and the shutter should be taken into consideration when the shutter array 55 is fixed. Further, the first and second gratings can be constituted of an optical fiber array. For example, in Fig. 4, the first diffraction grating 42 consists of a plurality of optical fibers extending along the X-axis and arranged in the Y-axis direction, whereas the second diffraction grating 43 consists of Y-axis extending optical fibers arranged in the X-axis direction. In the slit lights produced by such diffraction gratings, adjacent slit lights have an irradiation angle Δ established by the following expression; Δ =  m -  m-1 = sin -1 mλ d -sin -1 (m-1) λ d where λ is a wavelength of the light emitted from the semiconductor laser 51a, "d" is a diameter of the optical fiber constituting the first and second diffraction gratings 12 and 13,  m is an angle between the slit lights respectively having a diffraction mode 0 (a slit light emitted on the optical axis) and having a diffraction mode "m" (a "m"th slit light from the optical axis), and  m-1 represents an angle between the slit lights of mode 0 and mode "m-1". In addition, the interval W m between slit lights projected on the object spaced by a distance L is given by the following expression. W m = L (tan m - tan m-1 ) = L[tan(sin -1 mλ d ) - tan(sin -1 (m-1) λ d )] Since the diameter "d" of the optical fiber is usually 20 to 100 µ m, the distance by which the support springs 58 and 59 are displaced by the voice coil motor 60 may be 20 to 100 µ m or less. Further, even between the slit lights of the multi-slit light which is projected on the object to be measured, slit lights can be projected by displacing at least one of the first and second diffraction gratings 52 and 53 by a microscopic distance, thereby improving the pixel resolution. Fig. 7 is a perspective view of a further multi-slit projector according to the Fig 4 principle, in which a piezoelectric element 65 is used as the actuator. In Fig. 5 and in Fig. 7, the same elements are designated by the same reference numerals. As for the piezoelectric element 65 in this arrangement, providing a desired displacement is not obtained by a single piezoelectric element, and a plurality of piezoelectric elements may be stacked to cause a displacement on the order of 20 to 100 µ m, without difficulty. In this projector too, an accurate microscopic displacement can be ensured under a feedback control. In the same manner as the above-described arrangement, a configuration including at least one of the first and second diffraction gratings 52 and 53 can be displaced by only a minute distance, by the support springs 58 and 59 through the support frame 56. Fig. 8 is a perspective view of yet a further multi-slit projector according to the Fig. 4 principle, in which a linear motor 66 is used as the actuator. In Fig. 5 and in Fig. 8, the same elements are labelled with the same reference numerals. The linear motor 66 in this arrangement comprises a moving element 67 to which the support frame 56 is fixed, a stator 68, and wheels 69 and a guide rails 70 which guide the moving element 67. For example, a coil is mounted on either the moving element 67 or the stator 68, and a permanent magnet is mounted on the other. Thus, when the coil is energized, the moving element 67 is guided by the wheels 69 and the guide rails 70 to be shifted by a minute distance. In this arrangement too, a desired amount of minute displacement can be accurately achieved by a position sensing and a feedback control. Further, in this arrangement also, the configuration including at least one of the first and second diffraction gratings 52 and 53 is fixed to the support frame 56 so as to allow a minute displacement by the moving element 67. The possibilities are not restricted to the above described arrangements. For example, as the actuator for a minute displacement, various arrangements can be employed besides the voice coil motor 60, the piezoelectric element 65, or the linear motor 66. As described hereinbefore, the multi-slit projector comprises the first and second diffraction gratings 42 and 43, the cylindrical lens 44, and the shutter array 45, in which parallel lights from the light source 41 are made a multi-slit light, and a configuration including at least one of the first and second diffraction gratings 42 and 43 is displaced by only a minute distance with respect to the light source by the actuator 46, to allow the slit lights to be irradiated on spaces between the slit lights, and accordingly, can be controlled such that a situation identical to the situation in which the pitches between the slit lights can be even lessened or the space between the slit lights can be successively scanned, to thereby improve the pixel resolution and accomplish the miniaturization of the apparatus without difficulty. The multi-slit projector described with respect to Figs 4-8 for three-dimensional measurement can be used to realize a visual function and the like for a robot or other various automatic apparatuses. Further, an accuracy of the three-dimensional measurement for the object to be measured can be improved by simple structure. Next, picked up image recognizing devices in the three-dimensional measuring apparatus according to various embodiments of the present invention are described. In the conventional picked-up image recognizing device, as described before with reference to Fig. 9, after projecting all of the patterns A, B, and C, the image signals corresponding to the coded multi-slit light patterns are stored in the image memories respectively, and then are collated to decode the coded multi-slit light, i.e., to number the slit lights. Therefore, this has a disadvantage that many image memories must be provided. In addition, the decoding of the coded multi-slit lights is carried out by collating data in the corresponding image memory after projecting all of the patterns, and therefore a drawback arises in that the processing time is prolonged and the number of patterns increased as a result of an increase of the number of multi-slit lights. The image recognizing device in the three-dimensional measuring apparatus according to an embodiment of the present invention is intended to speed-up the processing and to reduce the memory capacity by the application of the image processing described with reference to Fig. 10. The three-dimensional measuring apparatus in Fig. 10 comprises a multi-slit projector 101 for projecting a multi-slit light pattern under the control, of a shutter array, and a picked-up image recognizing device 108. The picked-up image recognizing device 108 comprises an image pick up unit 102 for picking up the coded multi-slit light pattern projected on an object to be measured, a binarization circuit 103 for binarizing the image signals from the image pick up unit 102, an image arithmetic unit 105 which changes a weight assigned to the binarized image signal, which is converted by the binarization circuit 103 each time the coded multi-slit light pattern is changed, and sums up the last weighted binarized image signals or the image signals of the last addition results read out from the image memory 104, and the newly weighted binarized image signals, a coded pattern irradiated point memory 106 for storing the coordinates for the coded pattern irradiated points of the object to be measured corresponding to the multi-slit light decoded by the final operating results of the image arithmetic unit 105, and a distance calculating unit 107 for computing the three-dimensional position of the coded pattern irradiated points of the object to be measured, based on the coordinates for the coded pattern irradiated points stored in the coded pattern irradiated point memory 106. Further, the multi-slit projector 101 and the image pick up unit 102 are arranged on a surface which crosses each of the multi-slit lights at a right angle, and are arranged to have the same X axis extending parallel to the direction of the array of the multi-slit lights. The distance calculating unit 107 is constructed by a read-only memory (ROM) which can read out the data of the three-dimensional position by the use of the coordinates of the coded pattern irradiated points stored in the coded pattern irradiated point memory 106 as the addresses. The multi-slit projector 101 comprises, as described with reference to Fig. 3 or Fig. 4, a semiconductor laser, first and second diffraction gratings, a cylindrical lens, and a shutter array which projects a coded multi-slit light pattern. The image pick up unit 102 is a television camera which picks up an image of an object to be measured,which is subjected to a multi-slit light, and the image signals are binarized by the binarization circuit 103. Note, alternatively, after storing the image signals in the image memory 104, they may be binarized by the binarization circuit 103. The image calculating unit 105 changes a weight assigned to a binarized image signal each time the coded multi-slit light pattern is changed, and sums up the last weighted binarized image signal and newly weighted binarized image signal, or sums up the content in the image memory 104 storing the last addition results and newly weighted binarized image signal. Namely, the first binarized image signal in the coded multi-slit light pattern is assigned a weight 2° and is stored in the image memory 104, and the second binarized image signal is assigned a weight 2 1 . The first and the second binarized image signals with the weights are then added and stored in the image memory 104, a weight 2 2 is assigned to a third binarized image signal, and the third binarized signal with the weight 2 2 and the previously added result are added and stored in the image memory 104. In the same manner hereafter, for the multi-slit light consisting of "n" slit lights, "n" kinds of coded multi-slit light patterns are successively projected, and the i-th binarized image signal is assigned a weight 2 i-1 , and the weighted image signal is added to the previously added result, and thus, when the multi-slit light patterns are projected "n" times, and the final addition result is obtained, decoded slit-lights can be obtained. Note, instead of the weighting in the image arithmetic unit 105, a weighting for the binarized image signals may be performed in the binarization circuit 103. In correspondence with the slit lights thus decoded, the coordinates of the coded pattern irradiated points of the object to be measured determined by projecting the multi-slit light are stored in the coded pattern irradiated point memory 106, and based on the coordinates of the coded pattern irradiated points, the three-dimensional position is determined by the distance calculating unit 107. Namely, the coordinates position of the coded pattern irradiated points are calculated by a triangulation. Also, by arranging the multi-slit projector 101 and the image pick up unit 102 on a surface which crosses each of the multi-slit lights at a right angle, and by arranging them to have the same X axis extending parallel to the direction of the array of the multi-slit lights, it becomes possible to previously determine the coefficients in the distance calculation, thereby making it possible to use the read-only memory (ROM) to read out the three-dimensional position of the object to be measured from the coordinates stored in the coded pattern irradiated memory 106. Fig. 11 is a block diagram showing the embodiment of Fig. 10 in more detail. In Fig. 11, a reference numeral 110 denotes an image processor, 111 a multi-slit projector, 112 an image pickup unit, 113 a binarization circuit, 114 an image memory consisting of regions M1 to M4 each having a capacity for one screen of, for example, 8 bits for each pixel, 115 an image arithmetic unit, 116 a coded pattern irradiated point memory, 117 a distance calculating unit, 118 a processor (CPU) for controlling each unit, 119 a main memory, 120 an interface unit, 121 a common bus, 122 a multi-slit light, and 123 an object to be measured. The multi-slit projector 111 is the same as that shown in Fig. 4 or Fig. 5. The image pick up unit 112 picks up the multi-slit lights 122 projected onto the object 123 to be measured, and the pick up image signal is binarized by the binarization circuit 113, and then applied to the image arithmetic unit 115 or the image memory 114. Alternatively, the pick up image signal may be stored in the image memory 114, and then binarized by the binarization circuit 113. The image processor 110 includes the binarization circuit 113, the image memory 114, the image arithmetic unit 115, and a coded pattern irradiated point memory 116. The binarized image signal is weighted by the binarization circuit 113 or the image arithmetic unit 115, and control data for projecting a coded multi-slit light pattern from the multi-slit projector 111 are transferred from the processor 118 to the image processor 110. The weighting is controlled based on the transferred control data. Fig. 12 is a flowchart explaining the operation of the three-dimensional measuring apparatus shown in Fig. 11, which is composed of steps S1 to S11. Further, Fig. 13 is a diagram also explaining the operation of the apparatus shown in Fig. 11. In this embodiment, a multi-slit consisting of eight slit lights is projected. More slit lights are, of course, applicable if required. Referring to Figs. 11 to 13, first, from the multi-slit projector 111, a pattern A is projected onto the object 123 to be measured, and the image signal picked up by the image pick up unit 112 is stored in the memory region M1 in the image memory 114 (S1). This pattern A is composed of alternate slit lights (shown by the solid line), in which the broken line designates lights obstructed by the shutter array. The slit lights are picked up through the image pick up unit from an angle which is different from the angle at which the multi-slit light is projected, and thus they can be picked up in a bent or curved state corresponding to the configuration of the object 123 to be measured. For example, if each slit light is picked up in the form of a line, it is proved to be a plane. Next, the image signal of the pattern A stored in the memory region M1 is binarized by the binarization circuit 113, and weighted and stored in the memory region M2, which is designated as an image signal IA (S2). In this case, the weight is assigned to be 0 for the low-level "0", and is assigned to be 2 0 = 1 (H = 2 0 ) for the high-level "1". Therefore, as shown in the pattern A in Fig. 13, the image signal IA consisting of a multi-slit light represented by a code "10101010" is obtained. Subsequently, a pattern B is projected, and the pick up image signal is stored in the memory region M3 (S3). This pattern B is composed of slit lights arranged alternate pair of slits light pattern. The image signal stored in the memory region M3 is binarized by the binarization circuit 113, and the weighting is performed by the binarization circuit 113 or the image arithmetic unit 115. The binarized image signal having the high level "1" is weighted by 2 1 = 2 (H = 2 1 ), stored in the memory region M4, and designated as an image signal IB (S4). Accordingly, as shown in the pattern B in Fig. 13, an image signal IB consisting of a multi-slit represented by a code " 22002200" is provided. The image signal IA stored in the memory region M2 and the image signal IB stored in the memory region M4 are each read out, both are summed by the image arithmetic unit 115, and the result is stored in the memory region M1, which is designated as an image signal IS (S5). Consequently, as shown in Fig. 13, the image signal IS is constituted of the multi-slit light represented by a code "32103210". Then, a pattern C is projected, and the pick up image signal is stored in the memory region M3 (S6). This pattern C is composed of slit lights arranged on alternate adjacent four slits light pattern. The image signal stored in the memory region M3 is binarized by the binarization circuit 13, a weight of 2 2 = 4 is assigned to the high level "1" (H = 22) of the binarized image signal. The weighted signal is then stored in the memory region M4 and designated as an image signal IC (S7). As a result, as shown in the pattern C in Fig. 13, the image signal IC composed of a multi-slit light represented by a code "44 440000" is obtained. Next, the image signal IS stored in the memory region M1 and the image signal IC stored in the memory region M4 are summed up with the aid of the image arithmetic unit 115, and the added result is stored in the memory region M2. The stored result is designated as an image signal IS' (S8). In consequence, as shown in Fig. 13, as a result of the addition, the image signal IS' consisting of a multi-slit light represented by a code "76543210" is obtained, and thus the coded multi-slit light is decoded. In this case, the coding is based on the natural binary number, but other codes such as a Gray code are also applicable. The image signal IS' stored in the memory region M2 and showing the decoded result is represented by the multi-number, and thus it must be binarized to store the coordinate points having a level higher than 2 ° to the coded pattern irradiated point memory 16 (S9). Then, the content of the coded pattern irradiated point memory 116 is read out (S10), and a distance between coordinate points is calculated by the distance calculating unit 117 (S11). In this case, the distance calculation is executed by the special purpose distance calculating unit 117, but the operation function of the processor 118 may be utilized instead. Where various parameters and the like are predetermined, it is also possible to use a read only memory (ROM) as the distance calculating unit 117. The outline of the distance measurement will be described with reference to Fig. 14. Assuming that a camera coordinate system whose origin is located at the center of lens of the image pick up unit 12 is O-XYZ, and a light source coordinate system whose origin is at the center of light source of the multi-slit projector is o-xyz, then the relationship between the two is expressed by where t ij (i= 1 to 3, j = to 4) is a constant determined by the arrangement between the multi-slit projector 111 and the image pick up unit 112, which can be determined by calculation. The multi-slit projector emits "m" slit lights dispersed around the y-axis, where the respective slit light planes π j are designated as (j= 1 to m). The "j"th slit light produces a projection image P on the object to be measured while its pick up image I is formed on the image surface π I of the image pick up device 112. At that time, based on the principle of triangulation, a three-dimensional position of a point P k (X k , Y k , Z k ) on the projection image can be calculated as follows, as an intersection point between a line of sight OI k connecting the lens center O and a point I k (x k , y k ) on the image plane, and the slit light plane π j . u = h / g g = (t 11 x k + t 12 y k + t 13 f) cos j - (t 31 x k + t 32 y k + t 33 f) sin j h = t 34 sin j - t 14 cos j where (x k ,y k ) signifies the position of the P k on the image plane,  j represents a projection angle of the slit light plane, and "f" means a focal distance. The coordinates (x k ,y k ) can be determined as the coordinates stored in the coded pattern irradiated point memory 116, and  j can be determined from the decoded slit light No. j. Namely, the value of "j" can be obtained as a gray level stored in the coded pattern irradiated point memory 116. Fig. 15 is a block diagram of the principal part of the distance calculating unit 117, in which the coordinates x k and y k read out from the coded pattern irradiated point memory 116, and the focal distance f, are input, and values u(1) to u(m) according to the above expression (3) are calculated by calculating units 151-1 to 151-m corresponding to slit light numbers (1) to (m). Then, in accordance with the slit light number j, u(j) corresponding to one of the slit light numbers (1) to (m) is applied to the multiplication portions 153 to 155 with the aid of a selector 152, which executes multiplication based on the expression (2), to determine the three-dimensional positions X k , Y k and Z k In this case, by arranging the multi-slit projector 111 and the image pick up unit 112 on a surface which crosses each of the multi-slit lights at a right angle, and by arranging them at the same X axis extending parallel to the direction of the array of the multi-slit lights, "u" in the expression (3) is expressed as follows. u = α/(β + γ) α = t 34 sin j - t 14 cos j β = t 11 cos j + t 13 sin j γ = t 13 cos j - t 11 sin j The coefficients t 11 to t 14 and t 31 to t 34 can be determined in advance as described above. Further, although  j can have "m" kinds of values according to the slit light Nos. (1) to (m), it is possible to predetermine the coefficients corresponding to the value  j . Therefore, u is a function of x k and  j . As a result, the three-dimensional position of the object 123 to be measured can be obtained without delay by storing a value of "u" or values of X k , Y k , and Z k to the read-only memory (ROM). Fig. 16 illustrates an example of the operation of a pipeline processing by the measuring apparatus shown in Fig. 11. In Fig. 16, F1 to F8 denote frames of the image signals, respectively. In the frame F1, the pattern A is projected on the object 123 to be measured, and the image signals picked up by the image pick up unit 112 are stored in the memory region M1. Next in the frame F2, the image signals of the pattern A in the memory region M1 are binarized, and stored in the memory region M2 as the image signals IA, and the pattern B is projected onto the object 123 to be measured, and the image signals by the image pick up unit 112 are stored in the memory region M3. In the next frame F3, the image signals of the pattern B in the memory region M3 are binarized, and stored in the memory region M4 as the image signals IB. In the next frame F4, the contents in the memory regions M2 and M4 are added and stored in the memory region M1 as image signals IS. Subsequently, in the frame F5, the pattern C is projected onto the object 123 to be measured, and the image signals by the image pick up unit are stored in the memory region M3. Next, in the frame F6, the image signals of the pattern C in the memory region M3 are binarized and stored into the memory region M4 as image signals IC. Next, in the frame F7, the contents of the memory regions M1 and M4 are summed up and stored in the memory region M2 in the form of image signals IS', and thus the coded multi-slit light is decoded. Finally, in the next frame F8, the image signals IS' in the memory region M2 are binarized, and stored in the coded pattern irradiated point memory 116. The decoding in this embodiment requires seven frame periods in the case of eight slit lights. For more slit lights, however, it is possible to decode, for example, by nine frame periods in the case of 16 slit lights, and by 11 frame periods in the case of 32 slit lights. That is, the greater the number of slit light, the lower the increase in the number of additional frames. Fig. 17 illustrates another example of the operation of a pipeline processing in the apparatus shown in Fig. 11. In this embodiment, in frame F1, the pattern A is projected, and the image signals by the image pick up unit 112 are stored in the memory region M1. Next, in the frame F2, image signals having the pattern A in the memory region M1 are binarized and stored in the memory region M2 as the image signals IA, and the pattern B is projected onto the object 123 to be measured, and the image signals by the image pick up unit 112 are stored in the memory region M3. To this point, the procedures are the same as those in the embodiment shown in Fig. 16. In the next frame F3, however, the processes in the frames F3, F4, and F5 in Fig. 16 are simultaneously executed, i.e., the pattern C is projected onto the object 123 to be measured, the image signals picked up by the image pick up unit 112 are stored in the memory region M4, the pattern B image signals in the memory region M3 are binarized, and the image signals IA in the memory region M2 are read out, delayed corresponding to the binarization processing to perform the addition, and stored in the memory region M1 as the image signals IS. Subsequently, in the frame F4, the processes in the frames F6 and F7 are simultaneously conducted, that is, the image signals of the pattern C in the memory region M4 are binarized, the image signals IS are read out, delayed corresponding to the binarization processing to perform the addition, and stored in the memory region M2 as the image signals IS', and thus the coded multi-slit light is decoded. In the next frame F5, similar to F8 in Fig. 16, the image signals IS' are binarized, and stored in the coded pattern irradiated point memory 116. Note, on the frame F5, a step for projecting the pattern A for the measurement of the next object to be measured may be initiated. The image signals read out from the memory regions M2 and M1 in the above-mentioned frames F3 and F4 commonly provide address signals for the memory regions M1 to M4, which causes a delay in the binarization processing. It is also possible to delay the read-out addresses of the image signals IA and IS, to thereby perform the addition processing between the binarized image signals. In this embodiment, the binarization of the image signals, addition processing between the images, and the projection of the coded multi-slit light may be simultaneously executed, whereby the decoding is accomplished by four frames in the case of eight slit lights as described earlier, by five frames in the case of sixteen slit lights, and by six frames in the case of thirty two slit lights. Namely, even less time is required for decoding, compared to the embodiment shown in Fig. 16. According to the embodiments of the present invention as described with reference to Figs. 10 to 17, a coded multi-slit light is projected onto the object to be measured from the multi-slit projector, the image signals picked up by the image pick up unit are binarized through the binarization circuit, each time the pattern of the coded multi-slit light is changed the weighting of the binarized image signal is altered, and the last binarized image signals or image signals of the last addition results are summed up by the image operating unit, to decode the coded multi-slit light, whereby even though the number of slit lights of the multi-slit light is large, the capacity of the image memory may be, for example, on the order of 4 screens, which results in a miniaturization and cost saving. Moreover, an addition between the images may be executed through the image processor or the like, to thereby realize a high-speed decoding of the coded multi-slit light, thus leading to the speeding-up of the three-dimensional measurement processing. Further, the multi-slit projector and the image pick up unit are arranged on a surface which crosses each of the multi-slit lights at a right angle, and are arranged to have the same X axis extending parallel to the direction of the array of the multi-slit lights, whereby it is possible to predetermine the coefficients and the like in the distance computation, and thus the read-only memory can be used to read out the three-dimensional coordinates, to consequently simplify the structure and obtaine a high-speed processing. In the above described embodiments, as the coded multi-slit light patterns, "n" kinds of patterns are provided for 2 n multi-slit lights, to thereby number all of the slit lights. In that case, the image of the the object to be measured is obtained by the image pick up unit such as a television camera every time the "n" kinds of coded multi-slit light patterns are changed over for projection, the image signals for one screen having a plural-bit configuration for one pixel are stored in the image memories, the image. signals each stored in the "n" image memories are read-out, and the slit lights are numbered by an arithmetic process between the image signals for each slit light. Therefore, in the above embodiments described with reference to Figs. 10 to 17, therefore, the coded multi-slit light pattern is projected on the object to be measured, picked up image signals are converted into, for example, digital signals having an 8-bit configuration for one pixel to be stored into image memories, and the image signals are stored into different image memories at every change of the coded multi-slit light pattern, and accordingly, the use of a multiplicity of slit lights leads to an increase in the number of patterns, which requires a multiplicity of image memories, thus resulting in increased production costs. Further, based on the image signals stored in each image memory, the collating processing and the like are successively performed by a slit light, thereby increasing the number of slit lights, and thus prolonging the processing time.

Claims: A three-dimensional measuring apparatus comprising a multi-slit projector (101) for projecting a coded multi-slit light pattern onto an object to be measured and an image recognizing apparatus, said image recognizing apparatus comprising: an image pick up unit (102) for picking up said coded multi-slit light pattern projected on said object; a binarization circuit (103) for binarizing image signals from said image pick up unit (102); an image arithmetic unit (105) for changing, each time said coded multi-slit light pattern is changed, weights assigned to the binarized image signals obtained by said binarization circuit (103), and for summing up the last weighted binarized image signals or the image signals of the last added results read out from an image memory (104), with newly weighted binarized image signals; a coded pattern irradiated point memory (106) for storing a coordinate of a coded pattern irradiated point of said object, said coordinate corresponding to said multi-slit light which is decoded from the final arithmetic results of said image arithmetic unit (105); and a distance calculating unit (107) for calculating a three-dimensional position of said coded pattern irradiated points stored in said coded pattern irradiated point memory (106). A three-dimensional measuring apparatus as claimed in claim 1, wherein said multi-slit projector (101) and said image pick up unit (102) are arranged on a surface which crosses each of the multi-slit lights at a right angle, and said image pick up unit (102) is arranged to have the same X axis extending parallel to the direction of the array of the multi-slit lights, and said distance calculating unit comprises a read-only memory for storing coordinates of three-dimensional positions of said object, said coordinates of the three-dimensional positions corresponding to said coordinates of the coded pattern irradiated points. A three-dimensional measuring apparatus according to any preceding claim, wherein said multi-slit projector comprises: a light source (41) for emitting parallel lights; first and second diffraction gratings (42, 43) for receiving said parallel lights from said light source (41) and for diffracting said parallel lights in diffractive directions perpendicular to each other; a cylindrical lens (44) on which output lights diffracted by said first and second diffraction gratings (42, 43) are incident and which produces a plurality of parallel slit lights dispersed in the diffractive direction of either one of said first and second diffraction gratings (42, 43); and a shutter array for obstructing predetermined slit lights among the parallel slit lights from said cylindrical lens (44), to thereby form a code; and an actuator (46) for displacing a configuration including at least one of said first and second diffraction gratings (42, 43) by a distance smaller than a pitch of said multi-slit lights in the direction perpendicular both to the direction in which said parallel slit lights extend and to the light emission direction from the light source. A three-dimensional measuring apparatus as claimed in claim 3, wherein said actuator (46) comprises means for displacing said configuration step by step. A three-dimensional measuring apparatus as claimed in claim 3, wherein said actuator (46) comprises means for displacing said configuration continuously. A three-dimensional measuring apparatus as claimed in claim 3, wherein said actuator (46) comprises a voice-coil motor (20) and a supporting spring (18, 19) driven by said voice-coil motor (20), said supporting spring being associated with at least one of said first and second diffraction gratings (42, 43). A three-dimensional measuring apparatus as claimed in claim 3, wherein said actuator (46) comprises a piezo-electric element (25) and a supporting spring (18, 19) driven by said piezo-electric element (25), said supporting spring being associated with at least one of said first and second diffraction gratings (42, 43). A three-dimensional measuring apparatus as claimed in claim 3, wherein said actuator (46) comprises a linear motor (26) and a supporting spring (18, 19) driven by said linear motor (26), said supporting spring being associated with at least one of said first and second diffraction gratings (42, 43).

Inventors: KANDA SHINJI, MARUYAMA TSUGITO, WAKITANI JUN, KANDA, SHINJI, MARUYAMA, TSUGITO, WAKITANI, JUN, MARUYAMA, TSUGITO C/O FUJITSU LIMITED, Wakitani, Jun, Fujitsu Limited
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1991
Main classification: G01B11
IPC codes: G01S7, G01S17, G01B11