WO2011052693A1 - Three-dimensional measurement device and three-dimensional measurement method - Google Patents

Three-dimensional measurement device and three-dimensional measurement method Download PDF

Info

Publication number
WO2011052693A1
WO2011052693A1 PCT/JP2010/069208 JP2010069208W WO2011052693A1 WO 2011052693 A1 WO2011052693 A1 WO 2011052693A1 JP 2010069208 W JP2010069208 W JP 2010069208W WO 2011052693 A1 WO2011052693 A1 WO 2011052693A1
Authority
WO
WIPO (PCT)
Prior art keywords
luminance
value
centroid
detected
pixel
Prior art date
Application number
PCT/JP2010/069208
Other languages
French (fr)
Japanese (ja)
Inventor
知泰 西郷
進 柴田
Original Assignee
富士機械製造株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士機械製造株式会社 filed Critical 富士機械製造株式会社
Publication of WO2011052693A1 publication Critical patent/WO2011052693A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders
    • G01C3/02Details
    • G01C3/06Use of electric means to obtain final indication
    • G01C3/08Use of electric radiation detectors

Definitions

  • the present invention relates to a three-dimensional measuring apparatus and a three-dimensional measuring method.
  • a three-dimensional measuring apparatus using the depth-of-focus method evaluates the amount of out-of-focus and determines the in-focus position. Evaluation of the out-of-focus amount includes a method in which a photographed image is passed through a differential filter and evaluated from its dispersion value or from the sum of luminance.
  • a three-dimensional measurement apparatus using a depth of focus method is a three-dimensional shape detection apparatus that optically detects a three-dimensional shape of an object as shown in Patent Document 1 below, and is obtained for the same object.
  • a focal point is obtained for each point on the object from a plurality of images with different focal positions in correspondence with the image, and the maximum value of the focusing measure between the plurality of images obtained for the point correspondence is obtained. The focal position at the moment is obtained as the height of the point.
  • the contrast of the image is obtained in consideration of the luminance blur, and the contrast is second-order differentiated to obtain the focal point.
  • a three-dimensional measuring apparatus a plurality of images having different focal positions are obtained for each point on the object, and the focal position of the image having the maximum in-focus measure is obtained as the height for that point.
  • the three-dimensional shape of the object can be measured from the height of each point thus obtained.
  • the object to be detected based on the brightness since the blur of the brightness is noticeably generated in the captured image as it is out of focus, the object to be detected based on the brightness
  • the first problem is that the position on the XY plane is difficult to specify, and the position detection accuracy on the XY plane is lowered.
  • the detection in the height direction (distance) is performed based on the luminance detected by the pixels (pixels) in the image sensor, but by raising or lowering the imaging system, the object to be detected in the XY plane is detected. The detection position is also slightly shifted.
  • the present invention has been made to solve the above-described two problems, and with a simple configuration, the detection accuracy of an object on the XY plane can be improved even when luminance blur occurs in an image obtained by imaging the object. It is an object of the present invention to obtain a three-dimensional measurement apparatus and a three-dimensional measurement method capable of measuring the distance and the position of the object with high accuracy even when the detection position of the object in the pixel of the image pickup device is shifted. .
  • the three-dimensional measurement apparatus includes an imaging unit that images an object using an imaging element having pixels, The target object is extracted in units of pixels when the brightness detected by each image captured by the image capturing means at a different distance between the target object and the image capturing means is a predetermined brightness or more.
  • Bright spot extraction means Including the pixel having the bright point, the brightness of each constant area formed by the pixels around the pixel is detected, and the brightness distribution for each of the X axis and Y axis in the constant area is obtained, and based on the brightness distribution Means for calculating a luminance centroid to obtain a first luminance centroid value;
  • a luminance correction means for obtaining a luminance correction value obtained by correcting the luminance of the pixel in which the luminance centroid value is detected and the luminance detected by pixels surrounding the pixel to the luminance of the luminance centroid value;
  • 3D detection means for obtaining a distance value with respect to the object based on the brightness correction value and detecting a position on the X and Y of the object based on the brightness centroid value. It is characterized by.
  • the brightness detected by each image picked up by the image pickup means at a different distance between the object and the image pickup means is determined in advance by the bright spot detection means being equal to or higher than a threshold value.
  • the pixel is detected, and the luminance center of gravity calculation means detects the luminance for each fixed region centered on the bright point of the image, obtains the luminance distribution for each X axis and Y axis in the fixed region, and based on the luminance distribution Therefore, the position of the bright point on the XY plane can be accurately detected according to the luminance distribution.
  • the fixed region may form a circle with pixels centered on the bright point. This is because the luminance blur often becomes substantially circular.
  • the fixed area may be, for example, a substantially square having a fixed area of 3 ⁇ 3 pixels, 5 ⁇ 5 pixels, and 7 ⁇ 7 pixels centered on the bright point. Therefore, even if a bright spot exists around the pixel of the image sensor, the brightness is detected from a plurality of pixels, so that the position of the bright spot can be accurately detected.
  • the luminance correction unit obtains a luminance correction value obtained by correcting the luminance detected from the pixel in which the luminance centroid value is detected and the pixels around the pixel based on the luminance centroid value.
  • the three-dimensional detection means measures the distance by the luminance correction value obtained by correcting the luminance for measuring the distance of the object to the luminance of the luminance centroid value, and based on the luminance centroid value, A position on X and Y is detected. Thereby, for example, when the imaging system is raised or lowered, the detection position of the object in the XY plane is slightly shifted.
  • a luminance correction value is obtained by correcting the luminance detected by the pixels having the luminance centroid value and the pixels around the pixel to the luminance of the luminance centroid value. . Since the distance to the object is measured by this brightness correction value, the distance can be accurately detected. Therefore, the distance can be accurately detected even if the bright point (vertex) due to the reflection of light based on the object is smaller than one pixel of the image sensor.
  • the three-dimensional detection means may also detect the position of the object on the X and Y coordinates from the luminance centroid value corresponding to the luminance correction value obtained from the distance of the object.
  • the object has a large number of luminance centroid values obtained for the imaging system, the object, and the distances Z1, Z2,... Zn, and interpolates a large number of luminance centroid values by a quadratic function, for example.
  • Obtain the interpolation value of the center of gravity detect the distance value to the object based on the brightness correction value, and the object on the X and Y coordinates based on the brightness center value corresponding to the brightness correction value obtained the distance value The position of the object may be detected.
  • the luminance that the luminance of each pixel contributes to the luminance centroid value is obtained based on the distance from each pixel to the luminance centroid value.
  • the luminance of each pixel may be obtained as the luminance of the luminance centroid value by a Gaussian distribution of the distance to the luminance centroid value.
  • the three-dimensional measurement apparatus of the present invention comprises a luminance offset detection means for detecting a luminance offset from the certain region of the image,
  • the luminance centroid calculating means obtains a new luminance distribution obtained by removing the luminance offset from the luminance distribution, and obtains a second luminance centroid value based on the new luminance distribution.
  • the luminance offset is a constant luminance generated in all regions from the luminance of the certain region, and is preferably a minimum luminance value. This is because it is easy to detect only the luminance change of the object.
  • the luminance offset detecting means detects the luminance offset from the luminance of the image
  • the luminance centroid calculating means obtains a new luminance distribution from which the luminance offset is removed from the luminance distribution. Find the luminance centroid value. Therefore, the luminance centroid value is obtained based only on the luminance change near the bright point from which the luminance offset is removed from the luminance distribution, that is, the luminance change caused by the object, and the XY of the object is determined based on the luminance centroid value. Detect the position in the plane.
  • the luminance centroid value is obtained from the luminance detected by the pixels in the vicinity of the bright point by removing the influence of the pixel detecting the irregular reflection from the object as the luminance and the luminance centroid value detection accuracy is improved. This improves the position detection accuracy of the object in the XY plane. Furthermore, since the brightness correction means detects the distance of the object based on the brightness correction value corrected based on the brightness centroid value with improved detection accuracy by removing the brightness offset, the distance detection accuracy is further improved. improves.
  • the three-dimensional measurement apparatus includes a luminance offset detection unit that detects a luminance offset from the certain region of the image, obtains a new luminance distribution obtained by removing the luminance offset from the luminance distribution, and It is preferable to include a second luminance centroid calculating means for obtaining a second luminance centroid value based on the luminance distribution.
  • the luminance correction means corrects the luminance detected by the pixel having the first luminance centroid value and the luminance detected by pixels around the pixel to the luminance of the first luminance centroid value. A brightness correction value is obtained.
  • the three-dimensional detection means obtains a distance value to the object based on the first luminance correction value and detects the position on the X and Y of the object based on the second luminance gravity center value. good.
  • the luminance offset is taken into account for detecting the position of the object without considering the luminance offset to obtain the distance value with the object. Therefore, the detection accuracy of the position of the object is further improved.
  • the luminance correction unit corrects the luminance detected by the pixel having the second luminance centroid value and the luminance detected by the pixels around the pixel to the luminance of the second luminance centroid value. Get the correction value.
  • the three-dimensional detection means obtains a distance value to the object based on the second luminance correction value and detects the position on the X and Y of the object based on the first luminance centroid value. good.
  • the luminance offset is taken into account for obtaining the distance value from the object, and the luminance offset is not taken into account for detecting the position of the object. Therefore, the detection accuracy of the distance of the object is further improved.
  • the three-dimensional measurement apparatus of the present invention includes a luminance interpolation unit that interpolates the luminance correction value with a predetermined function to obtain a luminance interpolation value,
  • the three-dimensional detection means preferably obtains a distance value with respect to the object based on the luminance interpolation value.
  • the luminance interpolation means interpolates the luminance correction value with a predetermined function to obtain the luminance interpolation value, and the three-dimensional detection means detects the object based on the luminance interpolation value. Find the distance value.
  • required for every distance is interpolated, a brightness
  • Luminance centroid calculation step of detecting the luminance for each constant region including the bright point of the image, obtaining the luminance distribution for each X-axis and Y-axis in the fixed region, and obtaining the luminance centroid value based on the luminance distribution
  • Luminance centroid calculation step After running After setting a certain region having a plurality of pixels based on the luminance centroid value, and obtaining a luminance correction value obtained by correcting the luminance detected from the pixel based on the luminance centroid value, A distance value with respect to the object is obtained based on the correction value of the luminance, and a position on the X and Y of the object is detected based on the luminance centroid value.
  • the position of the bright spot as the object can be detected based on the luminance centroid value, it is not easily affected by the luminance blur around the bright spot. Further, the detected luminance is corrected based on the luminance centroid value to obtain a luminance correction value, and the distance to the object is detected based on the luminance correction value. Therefore, the distance is detected regardless of the detection position of the pixel in the image sensor. Detection accuracy is improved.
  • a new luminance distribution is obtained for each of the X axis and Y axis in the fixed region obtained by removing the luminance offset from the luminance distribution, and a luminance centroid value is obtained based on the new luminance distribution.
  • a new luminance distribution is obtained for each of the X axis and the Y axis in the certain region from which the luminance offset is removed from the luminance distribution, and the luminance centroid value is calculated based on the new luminance distribution.
  • the luminance center of gravity is obtained from the amount of change in luminance based on the object, so that the luminance center of gravity can be accurately detected. Therefore, the detection accuracy of the distance and position of the object is improved.
  • the detection accuracy of the object on the XY plane is improved and the object in the pixel of the image sensor is improved. Even if the detection position is shifted, it is possible to obtain a three-dimensional measuring apparatus or a three-dimensional measuring method capable of measuring the distance and position with the object with high accuracy.
  • FIG. 1 is an overall view of a three-dimensional measuring apparatus showing an embodiment of the present invention.
  • FIG. 4 is an actual image (a) according to an embodiment of the present invention, an image (b) showing a bright spot and a fixed area, and a schematic diagram (c) showing a fixed area and a bright spot in the image.
  • FIG. 3 is a characteristic diagram showing a luminance center of gravity while showing a sampled luminance value and an X coordinate in the three-dimensional measuring apparatus according to FIG. 1.
  • FIG. 2 is a schematic diagram (a) illustrating a ratio of luminance depending on positions of pixels and metal particles of the image sensor of the three-dimensional measurement apparatus in FIG. 1, and a partial cross-sectional view (b) of the image sensor.
  • FIG. 4 is an actual image (a) according to an embodiment of the present invention, an image (b) showing a bright spot and a fixed area, and a schematic diagram (c) showing a fixed area and a bright spot in the image.
  • FIG. 3 is a
  • FIG. 2A is a diagram illustrating a pixel value of an image sensor of the three-dimensional measurement apparatus in FIG. 1
  • FIG. 2B is a plan view illustrating a relationship between a luminance centroid value and a center position of each pixel.
  • It is a characteristic curve figure which shows the relationship between the distance with the brightness
  • FIG. 12 is a characteristic curve diagram illustrating a relationship between a detected luminance value, a luminance change value obtained by removing a luminance offset from the detected luminance value, and an X coordinate in the three-dimensional measurement apparatus according to FIG. 11. It is a characteristic curve figure which shows the relationship between the luminance value of a metal particle by the presence or absence of a brightness
  • FIG. 12 is a characteristic curve diagram illustrating a relationship between a detected luminance value, a luminance change value obtained by removing a luminance offset from the detected luminance value, and an X coordinate in the three-dimensional measurement apparatus according to FIG. 11. It is a characteristic curve figure which shows the relationship between the luminance value of a metal particle by the presence or absence of a brightness
  • FIG. 12 is a characteristic curve diagram illustrating a relationship between a brightness value, a brightness correction value, a continuous interpolation value of brightness, and a distance from an object by the three-dimensional measurement apparatus of FIG. 11. It is a flowchart which shows the whole operation
  • FIG. 1 is an overall view of a three-dimensional measuring apparatus showing an embodiment of the present invention.
  • a three-dimensional measuring apparatus 1 detects a distance Z to the surface of an object 5 that is easily reflected and a position on an XY plane.
  • the first three-dimensional measurement apparatus 1 captures an image of the object 5, and includes an imaging system 10 including an imaging device 14 having a large number of pixels 14a, and an L shape for moving the imaging system 10 up and down in the Z-axis direction.
  • a control unit 55 is included.
  • One pixel 14a is referred to as a pixel unit U1.
  • the first three-dimensional measuring apparatus 1 has an imaging system driving unit 65 that drives the driving mechanism 60 in response to a position command signal from the control unit 55, takes in an image captured by the imaging element 14, and And a first three-dimensional detector 30 that detects the position of the object 5 on the XY plane, as well as the distance from the imaging system 10 to the surface of the object 5.
  • the object 5 is not particularly limited, but is preferably provided on the surface of the resin plate 5 and is preferably a plurality of metal particles 5h such as six spheres that easily reflect light. It may be larger or smaller than one pixel 14a.
  • the first three-dimensional detector 30 is composed of a microcomputer, and has a known interface, CPU, RAM, and ROM, and extracts a bright point at which a luminance of a predetermined value or more from the metal particle 5h is generated in a pixel unit U1. In addition, it has a bright spot extraction unit 32 for detecting luminance.
  • the reason why the metal particles 5h are detected with a luminance equal to or higher than a predetermined value is that if the metal particles 5h are present, the luminance is higher than the surroundings due to the reflection.
  • the first three-dimensional detector 30 corrects the brightness of the bright point using the first brightness centroid value calculating unit 36 for obtaining the first brightness centroid value from the brightness having the bright point, and the first brightness centroid value.
  • the distance between the first luminance correction unit 38 and the metal particle 5h is obtained from the first luminance correction value, and the position of the XY plane of the metal particle 5h is determined from the first luminance centroid value corresponding to the distance. And a first three-dimensional detection unit 43 for detection.
  • FIG. 2 is an actual image (a) according to an embodiment, an image (b) showing a bright spot and a fixed area, and a schematic diagram (c) showing a fixed area and a bright spot in the image.
  • the bright spot extraction unit 32 from each of the image files G1, G2,... Gn captured at the distances Z1, Z2,.
  • a pixel 14a having a luminance equal to or higher than a threshold value is detected, and this pixel 14a is extracted as a luminance cell B1... B6, and as shown in FIGS.
  • the center that is, the vertex directly reflected from the plurality of metal particles 5h is detected in the pixel unit U1 as the first bright point P1 to the sixth bright point P6. Even if the metal particle 5h is spherical, a vertex is generated by direct reflection from the metal particle 5h, and this vertex is less than one pixel 14a.
  • the light spot extraction unit 32 calculates the difference in luminance in the fixed area A1... A6 formed by the central pixel 14a including each bright spot P1... P6 and the pixels 14a around the central pixel 14a. It is configured to obtain a contrast value and detect that the contrast value is greater than or equal to a predetermined threshold value.
  • a predetermined threshold value For example, in order to extract the bright point by the vertex 5h of the metal particle, it is determined that the contrast value is equal to or greater than the threshold value by preventing the influence of the fluctuation of the brightness, and the bright points P1, P2,. This is to prevent erroneous detection.
  • the predetermined area A1... A6 formed by the plurality of pixels 14a is 5 ⁇ 5 pixels.
  • a fixed region formed by a plurality of pixels 14a including the pixel 14a from which the bright point is extracted is determined, and the first luminance barycentric value is obtained from the luminance distribution of the fixed region, and the position of the bright point, that is, the metal particle 5h.
  • the position of is detected.
  • the fixed regions A1... A6 are regions formed by 5 ⁇ 5 pixels 14a.
  • the central pixel 14a including each bright point and the pixels around the central pixel 14a. 14 may be formed in a substantially circular shape.
  • the fixed area may be determined by the plurality of pixels 14a depending on the blurred shape of the received luminance.
  • the first luminance centroid operation unit 36 calculates the first luminance distribution in the fixed region A1, that is, the first luminance centroid value (Xg, Yg) in the X and Y coordinates from the detected luminance L by the following equation (1). ) And (2) respectively. Then, the first luminance centroid value (Xg, Yg) is the position of the metal particle 5h in the X, Y coordinates.
  • the first luminance center-of-gravity calculation unit 36 obtains a first luminance center-of-gravity value for each of the distances Z1, Z2,... Zn between the imaging element 14 and the metal particles 5h.
  • the distances Z1, Z2,... Zn between the imaging element 14 and the metal particles 5h.
  • the reason for obtaining the luminance center of gravity is to detect the positions of the bright points P1,... P6 more accurately than the pixel unit U1. That is, by obtaining the first luminance barycentric value from the first luminance distribution at the positions of the bright points P1,... P6, the bright points P1,. The position of P6 can be detected. Therefore, as shown in FIG. 3, even if the brightness of the bright spot is sampled so as to be a constant value in the unit of the pixel 14a by obtaining the first brightness centroid value, each coordinate of the metal particle 5h is obtained. An accurate position in the XY direction can be detected. 3 shows only the X coordinate, the relationship between the Y coordinate and the luminance value is the same as that of the X coordinate.
  • the imaging element 14 has square pixels 14a formed in a lattice shape, and each pixel 14a has a circular three-dimensional detection unit 14s. For this reason, when there is a bright point Pc as the first bright point P1 due to the metal particles 5h narrower than the area of the pixel 14a at the center of the pixel 14a, the luminance detection ratio of one pixel 14a is 1, and It is sufficient to detect the point Pc with one pixel 14a that has detected the point Pc. Even if the size of the metal particle 5h itself is larger than one pixel 14a, the bright point P1 based on the direct reflection from the metal particle 5h may be one pixel 14a.
  • the first luminance center of gravity is a cross formed between the thresholds of the pixels 14a and 14a, that is, the threshold, as a bright point Pa as the first bright point P1.
  • the luminance detection ratio of the surrounding four pixels 14a is 0.25, respectively.
  • the surrounding four pixels 14a have a detected brightness detection ratio of 0.6, respectively. 0.2, 0.0, 0.2. Therefore, if the luminance at the first luminance centroid value is determined by the luminance detected by only one pixel 14a from which the bright point is extracted, the luminance at the first luminance centroid value may not be detected accurately.
  • the detection characteristics of the pixel 14a of the image sensor 14 are different between the central portion and the peripheral portion. As shown in FIG. 4B, the pixel 14a passes through the microlens 14s as a circular three-dimensional detection portion. The received light is received by the photodiode 14p provided in the wiring layer 14c through the filter 14f. Therefore, as described above, the detection characteristics deteriorate in the peripheral portion of the pixel 14a.
  • the imaging element 14 Since the imaging element 14 has the detection characteristics as described above, as shown in FIG. 6, the distance between the imaging system 10 and the metal particles 5h is changed, and one pixel 14a having a bright point P1 at each distance is changed.
  • a characteristic curve indicated by a cross in FIG. 6 is obtained.
  • the detected brightness increases as the focal point of the imaging system 10 is approached, and the luminance decreases as the distance from the focal point increases.
  • What is shown may show a substantially V characteristic indicated by a one-dot chain line in which the luminance suddenly decreases and increases as the luminance increases.
  • Such a phenomenon occurs when the first luminance center-of-gravity value is shifted from the vicinity of the center of the pixel 14a to the vicinity thereof as the imaging system 10 moves. This is because the center of the image sensor 14 is not at the same position on the XY plane and slightly shifts with the movement of the image pickup system 10 in the height direction. Therefore, if the detected luminance is not corrected, an area having the highest luminance is regarded as a focal point, and an error occurs in distance detection of the metal particles 5h. For this reason, it is necessary to correct the luminance value for detecting the distance of the metal particles 5h with the movement of the first luminance centroid value in the XY plane.
  • the luminance is corrected by using the luminance detected by the pixel 14a including the first luminance centroid value and the pixels 14a around the pixel 14a as the luminance of the first luminance centroid value.
  • the luminance is corrected for each extracted bright point P1... P6 for each distance between the imaging system 10 and the metal particle 5h.
  • the first luminance correction unit 38 detects the luminance detected by each of the pixels 14 a having the first luminance centroid and the pixels 14 a around the pixel 14 a, the first luminance centroid value, and each of the pixels in the image sensor 14.
  • the brightness inherent in the first brightness centroid is estimated by correcting the distance from the center position of the pixel 14a. That is, the luminance correction unit 38 obtains the luminance correction value Lm from the following equation (3), using the luminance detected by the surrounding pixels 14a as the luminance of the luminance centroid value.
  • the first luminance correction unit 36 obtains each based on the first luminance centroid value obtained for each of the distances Z1, Z2,... Zn between the imaging element 14 and the metal particles 5h.
  • the identification number for specifying each pixel 14a in the image sensor 14 is specified by determining the pixel values in the X direction and the Y direction in the order of alignment of the pixels 14a in the X direction and the Y direction.
  • the pixel value (xn, yn) is the sum of the pixel 14a that detects the bright point Pa, which is the first luminance centroid value, and the pixels 14a around the pixel 14a.
  • the four are pixel (1, 2), pixel (2, 2), pixel (1, 3), and pixel (2, 3), respectively.
  • the correction luminance is Lm
  • the luminance value at which each pixel 14a is detected is ⁇ L ( ⁇ x>, ⁇ y>)
  • the difference between the detected center position of the pixel 14a and the first luminance centroid value (Xg, Yg) Is set to ⁇ x and ⁇ y in the X and Y directions, respectively, the following equation (3) is established.
  • Lm (Xg, Yg) ⁇ L ( ⁇ x>, ⁇ y>) ( ⁇ x, ⁇ y) (3)
  • ⁇ x> Pixel value in the X direction
  • ⁇ y> Pixel value in the Y direction
  • ⁇ x and ⁇ y are expressed by the following equations (4) and (5).
  • ⁇ x Xg ⁇ ⁇ x>
  • ⁇ y Yg ⁇ ⁇ y> (5)
  • the luminance detected by the pixel 14a having the first luminance centroid value and the pixels 14a around the pixel 14a affects the first luminance centroid, so that the luminance of the first luminance centroid is It is assumed that the model function of the distances ⁇ x and ⁇ y between the center value of each pixel 14a and the first luminance centroid value is affected by a Gaussian distribution. Then, f ( ⁇ x, ⁇ y) becomes the following equation (6). .... (6)
  • the first luminance correction value Lm (x, y) is the detected luminance value ⁇ L ( ⁇ x>, ⁇ y>) and the distance from the first luminance centroid value to the center value of each pixel 14a.
  • the luminance of the first luminance centroid value can be obtained by correcting the luminance detected by each pixel 14a by the Gaussian distribution of the distance.
  • the model function is not limited to the Gaussian distribution, and may be inversely proportional to the distances ⁇ x and ⁇ y with respect to the first luminance center of gravity, for example. In the above description, the four pixels 14a including the first luminance centroid value are used.
  • 3 ⁇ 3 pixels 14a or 5 ⁇ 5 pixels 14a including the first luminance centroid value may be used. That is, the number of pixels 14a for obtaining the first luminance correction value is determined from the resolution of the pixels 14a, the nature of the object 5 and the like.
  • ⁇ L ( ⁇ x>, ⁇ y>) L (1,2) f (0.5,07) + L (2,2) f (0.5,07) + L (1,3) f (0.5,03) + L (3,2) f (0.5,03) If the luminance detected by the pixel (1, 2), the pixel (2, 2), the pixel (1, 3), and the pixel (3, 2) is 100, 90, 90, 100, respectively, f ( ⁇ x, ⁇ y) is It becomes.
  • 0.5
  • the luminance correction value Lm is as follows.
  • the first three-dimensional detection unit 43 calculates the luminance from the luminance near each bright point from each of the image files G1, G2,... Gn captured at the distances Z1, Z2,. Find the correction value. Then, as shown in FIG. 6, the brightness correction value is stored in relation to the distance of the metal particle 5h, the distance value with the metal particle 5h is detected based on the brightness correction value, and the highest brightness is obtained. The position of the metal particle 5h on the X and Y coordinates is detected from the luminance centroid value obtained from the first luminance correction value.
  • the first detection unit 43 also detects the position of the metal particle 5h on the X and Y coordinates from the luminance centroid value corresponding to the first luminance correction value having the highest luminance. Also good. That is, by interpolating, for example, a quadratic function, the luminance centroid values obtained by the imaging system 10, the metal particles 5h, and the distances Z1, Z2,. In this case, the distance value to the metal particle 5h is detected based on the brightness correction value, and the position of the metal particle 5h on the X and Y coordinates is detected based on the brightness centroid value corresponding to the distance value. good.
  • the luminance correction value affects not only the distance detection of the metal particles 5h but also the selection of the luminance centroid value for detecting the position of the metal particles 5h.
  • the luminance centroid value based on the luminance correction value obtained from the distance of the metal particle 5h is selected, and the position detection accuracy of the metal particle 5h is also improved based on the luminance centroid value.
  • the drive mechanism 60 is operated, the imaging system 10 is lowered in the Z-axis direction, and an image file for each of the heights Z1, Z2,.
  • G1, G2,... Gn store the luminance for each read pixel unit U1 (step S100)
  • the bright spot extracting unit 32 stores the image files G1, G2,.
  • the vertices of the six metal particles 5h are extracted from Gn as bright points P1, P2,... P6, and the position and luminance are detected in pixel unit U1 (step S200).
  • the first luminance centroid operation unit 36 calculates the luminance centroids (Xg1, Yg1), (Xg2, Yg2),... From the luminance distribution of the fixed area A1 for each of the heights Z1, Z2,. .. (Xgn, Ygn) is obtained (step S400).
  • the brightness correction unit 38 obtains the brightness correction value of the first brightness centroid value for each height Z1, Z2,... Zn of the imaging system 10 using, for example, a Gaussian distribution as described above (step S500). ).
  • the first three-dimensional detection unit 43 measures the distance of the metal particles 5h based on the luminance correction value, and detects the XY planar position of the metal particles 5h based on the first luminance centroid value (step) S700).
  • the other bright points P2... P6 also correspond to the fixed areas A2,... A6 and detect the distance and position of the metal particles 5h in the same manner as the bright point P1 as described above.
  • the bright spot extraction unit 32 uses the image files G1, G2,... Gn captured for the heights Z1, Z2,. As shown in FIG. 8, the vertices of the six metal particles 5h are extracted as bright points P1, P2,... P6, and the brightness of the bright point P1 is compared with the brightness of the bright point P1 and a predetermined brightness threshold. It is determined whether or not the luminance is equal to or higher than the threshold value (step S201).
  • the luminance is equal to or higher than the threshold value, it is detected that the luminance of the bright point P1 is equal to or higher than the peripheral luminance in the fixed area A1 with the bright point P1 as the center. ).
  • the maximum value and the minimum value of the luminance in the fixed area A1 are acquired, and the contrast is obtained from the difference between the maximum value and the minimum value of the luminance (step S205).
  • the bright spot extraction unit 32 determines that the contrast is equal to or higher than a predetermined threshold (step S207), and determines the X and Y coordinate metal particles 5h of the metal particles 5h in the image files G1, G2,. Detected by the pixel unit U1, the position of the metal particle 5h is stored in association with the heights Z1, Z2,... Zn (step S209). Note that the other bright points P2 to P6 also detect the metal particles 5h in pixel units U1 in the same manner as the bright points P1.
  • the first luminance center-of-gravity calculation unit 36 determines the luminance value of each pixel 14a in each image file G1, G2,... Gn detected in step S100.
  • the luminance barycentric value Xg at the X coordinate is obtained by the above equation (1) within the constant area A1 of the bright point P1, and corresponds to the heights Z1, Z2,.
  • the luminance centroid value Xg is stored (step S403), and the luminance centroid value Yg at the Y coordinate is obtained by the above equation (2) and stored in the constant area A1 of the bright point P1 (step S405).
  • the other bright points P2,..., P6 obtain the luminance centroid values in the same manner as described above, and store the first luminance centroid values corresponding to the heights Z1, Z2,.
  • the luminance correction unit 38 reads the luminance value of each pixel 14a in the 5 ⁇ 5 pixel area A1 as a fixed area including the bright point P1 detected in step S100.
  • Step S501 the luminance distribution of a new constant region A1 ′ is obtained centering on the first luminance centroid value (Xg1, Yg1) obtained in Steps S403 and S405 (Step S503).
  • the reason why the new constant area A1 ′ is used is that there may be a constant area different from that in step S501 depending on the luminance centroid value.
  • the constant area A1 ′ in step 503 may be the same constant area A1 as in step S501.
  • a luminance correction value is obtained from the new luminance centroid values (Xg1, Yg1) by the above formulas (3) to (6), and the height Z1, Z2,.
  • a brightness correction value is stored in association with Zn (step S505). Further, the brightness correction values of other bright points P2... P6 are obtained in the same manner as described above, and the brightness correction values are stored in correspondence with the heights Z1, Z2,.
  • the first three-dimensional detection unit 43 measures the distance of the metal particle 5h from the highest luminance by the first luminance correction based on the first luminance correction value by the bright point P1, and the highest luminance.
  • the position of one metal particle 5h on the XY plane is detected from the first luminance centroid value obtained from the first luminance correction value (step S700).
  • the other bright points P2,... P6 also detect the distance and position of the metal particles 5h in the same manner as described above. Thereby, the distance of the plurality of metal particles 5h and the position on the XY plane can be accurately detected. Moreover, even if the detected luminance is sampled in the pixel unit U1, it is possible to detect the exact bright spot position.
  • the three-dimensional measuring device 1 configured as described above includes an imaging system 10 that images the metal particles 5h using the imaging device 14 having the pixels 14a, and an imaging element for each different distance between the metal particles 5h and the imaging system 10. 14, the bright point extraction unit 32 that detects the bright point P 1 (P 2... P 6) of each of the images G 1, G 2,. Detecting the luminance distribution for each of the X axis and Y axis in the fixed region and calculating the luminance centroid value based on the luminance distribution, and the luminance centroid value detected.
  • a first three-dimensional detection unit 43 that obtains the distance from the metal particle 5h and obtains the position of the metal particle 5h on the XY plane based on the brightness centroid value based on the brightness correction value obtained from the distance. It is.
  • the bright point extraction unit 32 performs the bright point P1 of each of the images G1, G2,... G6 captured by the imaging system 10 at different distances between the object 5 and the imaging system 10.
  • P2... P6 is detected
  • the first luminance centroid calculating unit 36 detects the luminance for each constant region A1 (A2... A6) centered on the bright point of the image, and X in the constant region is detected.
  • the first luminance distribution for each of the axes and the Y-axis is obtained, and the luminance centroid value is obtained based on the first luminance distribution, so that the position of the bright spot in the fixed area is accurately detected according to the first luminance distribution. it can.
  • the luminance centroid calculating unit 36 obtains the luminance centroid value by limiting to the pixels 14a for each fixed region, so that the processing speed is increased.
  • the three-dimensional measurement apparatus 1 sets a constant area A1 (A2... A6) based on the luminance centroid value, and determines the luminance of the luminance centroid value from the luminance detected by each pixel 14a in the predetermined area.
  • a luminance correction unit 38 to be obtained as a correction value is provided, and the three-dimensional detection unit 43 obtains a distance value from the metal particle 5h based on the luminance correction value, and a luminance centroid value based on the luminance correction value obtained from the distance. To obtain the position of the metal particle 5h on the XY plane.
  • the luminance of the luminance centroid is obtained as a luminance correction value based on the luminance of the pixel 14a including the luminance centroid and the surrounding pixels 14a, and the distance from the metal particle 5h is detected based on the luminance correction value. Therefore, even if the detection position of the bright point (metal particle 5h) detected based on the reflection of the light of the metal particle 5h in the pixel 14a of the image sensor 14 is shifted in the one-dimensional image sensor 14a, the three-dimensional measuring device 1 is the distance of the metal particle 5h. Can be detected accurately.
  • the position on the XY plane of the metal particle 5h is obtained from the luminance centroid value based on the luminance correction value for which the distance is obtained, the distance is determined while taking into account the luminance blur around the bright point P1 (P2... P6).
  • the position on the XY plane of the metal particle 5h (at the focal point) at the detected point can be detected. Therefore, the position of the metal particle 5h at the point can be accurately detected, and the position of the metal particle 5h can be detected without being affected by sampling in which the luminance is regarded as a constant value in the pixel unit U1.
  • the bright points P1 (P2%) Of the images G1, G2,... Gn captured by the imaging system 10 at different distances between the object 5 and the imaging system 10.
  • the brightness of each fixed area A1 (A2... An) centered on the bright point P1 (P2... Pn) of the images G1, G2.
  • the luminance distribution for each of the X-axis and Y-axis is obtained, and the luminance centroid value is obtained based on the first luminance distribution.
  • the correction of the luminance is performed.
  • the distance value with respect to the metal particle 5h is obtained, and the position on the X and Y of the metal particle 5h is detected based on the luminance centroid value based on the luminance correction value obtained from the distance.
  • the position of the metal particle 5h on the XY plane can be accurately measured based on the luminance centroid value, and the luminance centroid has the luminance detected from the pixel 14a having the luminance centroid and the pixels 14a around the pixel 14a.
  • a brightness correction value as brightness is obtained, and the distance from the metal particle 5h is detected based on the brightness correction value. Therefore, in the three-dimensional measurement method, even if the detection position of the bright spot (metal particle 5h) detected based on the reflection of the light of the metal particle 5h is shifted in one pixel 14a of the image sensor 14, the distance of the metal particle 5h is changed. It can be detected with high accuracy.
  • FIG. 11 is an overall view of a three-dimensional measuring apparatus according to another embodiment.
  • the same reference numerals as those in FIG. 1 denote the same parts, and the description thereof is omitted.
  • the second three-dimensional detector 130 in the second three-dimensional measuring apparatus 101 is composed of a microcomputer, has a well-known interface, CPU, RAM, and ROM, and from an image having a bright point P1.
  • a luminance offset detector 34 for detecting a luminance offset, a second luminance distribution obtained by subtracting the luminance offset from the luminance distribution of a certain area having the bright point P1, and a second luminance centroid value from the luminance distribution.
  • the luminance interpolator 41 that uses a number of second luminance correction values obtained in the above as continuous luminance interpolation values by a function and the distance between the metal particles 5h from the luminance interpolation values and corresponding to the distance And a second three-dimensional detection unit 143 for detecting the position of the XY plane of the metal particles 5h based on 2 luminance centroid value.
  • the configuration of each part of the three-dimensional measuring apparatus 1 will be described with reference to FIGS. Since the bright spot extraction unit 32 is the same as that in the first embodiment, the description thereof is omitted.
  • the luminance offset detection unit 34 detects a luminance offset that achieves a minimum luminance value in each of the images G1, G2,... Gn in a certain region including each of the dot-like bright points P1,.
  • the luminance offset is generated because the pixel 14a of the image sensor 14 detects irregularly reflected light from other metal particles 5h and the like.
  • the second luminance center-of-gravity calculating unit 136 removes (subtracts) the luminance offset from the first luminance distribution value detected from the image in the fixed area A1 made up of 5 ⁇ 5 pixels 14a having a bright point.
  • the second luminance centroid value (Xgo, Ygo) in the constant area A1 having the bright point P1 is obtained by the following equations (7) and (8).
  • the luminance offset is removed by obtaining the luminance change value (luminance distribution) Ld of only the luminance change due to the reflected light of the metal particles 5h, and obtaining the second luminance centroid value from this luminance change value.
  • the position of the metal particle 5h is accurately detected based on the second luminance centroid value.
  • the first luminance distribution (detected luminance) indicated by the dotted line is changed to the second luminance distribution (luminance change value) indicated by the solid line, and an accurate vertex position of the metal particle 5 h can be obtained.
  • the luminance offset is preferably set to the minimum luminance value, but may be a constant luminance value higher than the minimum luminance value in a certain region.
  • Xgo ⁇ X (L ⁇ Lo) / ⁇ (L ⁇ Lo) (7)
  • Ygo ⁇ Y (L ⁇ Lo) / ⁇ (L ⁇ Lo) (8)
  • Lo luminance offset
  • the second luminance centroid value is obtained by calculating the position of the point-like bright point P1 (P2... P6) in relation to the ambient luminance from which the luminance offset is removed, thereby reducing the influence of luminance blur. This is because the position of the metal particle 5h is accurately detected without being affected by the influence of irregular reflection light from the other metal particle 5h.
  • the second luminance correction unit 38 includes the pixel 14a having the second luminance centroid value, the luminance detected by the pixel 14a, the luminance detected by the pixels 14a around the pixel 14a, and the center of each pixel 14a.
  • the second luminance centroid value has the following expression (3) to (6). It is formed so as to obtain luminance.
  • the luminance interpolation unit 41 obtains the maximum luminance value using the luminance correction value, obtains the luminance correction value within ⁇ Z as the height of the imaging system around the maximum luminance value, and is indicated by a solid line in FIG. Thus, a continuous interpolation value of brightness obtained by interpolating the brightness correction value by a quadratic function is obtained.
  • By interpolating the luminance matching with each luminance correction value obtained for each different distance between the imaging system 10 and the metal particle 5h is obtained.
  • the continuity of the interpolation value of the luminance can be obtained, and the detection accuracy of the distance from the metal particle 5h can be improved.
  • the second distance detection unit 143 uses the characteristic curve of the luminance continuous interpolation value and the distance value between the metal particles 5h as the object and the distance between the metal particles 5h and the imaging system 10. And the positions of the X and Y coordinates of the metal particle 5h are also detected based on the second luminance centroid value corresponding to the detected distance value.
  • the drive mechanism 60 in response to a position command signal from the imaging system driving unit 65, the drive mechanism 60 is operated, the imaging system 10 is lowered in the Z-axis direction, and an image file for each of the heights Z1, Z2,.
  • the light spot extraction unit 32 detects the position and brightness of the light spot P1 as the vertex of the metal particle 5h from the image file in the pixel unit U1 (step S100) (step S100). S200).
  • the luminance offset detector 34 detects the luminance offset from the constant area A1 centered on the bright point P1 (step S300).
  • the second luminance centroid operation unit 136 obtains the luminance centroid within the constant area A1 with the bright point P1 as the center (step S1400).
  • the second luminance correction unit 138 uses the luminance centroid values (Xg1, Yg1), (Xg2, Yg2),... (Xgn, Ygn) for the heights Z1, Z2,.
  • the luminance of the second luminance centroid value is obtained as a luminance correction value using a Gaussian distribution (step S1500).
  • the luminance interpolation unit 41 obtains a continuous interpolation value by using a plurality of luminance correction values using a function (step S600).
  • the second three-dimensional detection unit 143 measures the distance of the metal particle 5h from the maximum luminance value in the fixed region A1, and also determines the position of the metal particle 5h in the XY plane from the second luminance centroid value corresponding to the maximum luminance value. Is detected (step S700).
  • the brightness offset detection unit 34 in each of the image files G1, G2,... Gn has respective bright points P1.
  • the brightness of each X, Y coordinate is detected and stored (step S301), and the minimum brightness value in the fixed area A1 centered on the bright point P1 is set as the brightness offset Lo.
  • the luminance offset Lo is removed (subtracted) from the luminance of each of the X and Y coordinates, and the luminance change value Ld is obtained (step S307).
  • a luminance change value obtained by removing the luminance offset Lo from the detected luminance is obtained after detecting the luminance offset Lo in the constant area A1 centered on the bright point P1.
  • the other bright points P2... P6 also correspond to the fixed areas A2,... A6, and obtain luminance change values from which the luminance offset Lo has been removed in the same manner as the bright points P1 as described above.
  • the second luminance centroid calculation unit 136 reads the luminance value of the pixel 14a detected in step S100 (step S1401), and includes a constant including the bright point P1. Within the area A1, the second luminance centroid value Xgo at the X coordinate is obtained by the above equation (7) and stored (step S1403), and the second luminance centroid at the Y coordinate is obtained within the certain area A1 including the bright point P1. The value Ygo is obtained and stored (step S1405).
  • the luminance center-of-gravity calculation unit 136 executes steps S1401 to S1405 with the image files G1, G2,... Gn. Accordingly, the second luminance centroid is obtained from the luminance change value shown in FIG. 13 obtained by subtracting the luminance offset from the luminance distribution, so that the luminance centroid value in a certain region can be accurately detected.
  • the luminance correction unit 38 reads the luminance value of each pixel 14a detected in step S100 (step S501), and uses the X and Y coordinates obtained in step S400.
  • a new fixed area of 5 ⁇ 5 pixels is set using the second luminance centroid (step S503), and a second luminance correction value is obtained by correcting the luminance by the above equations (3) to (6). (Step S505).
  • the maximum luminance value at the heights Z1, Z2... Zn of the imaging system 10 is acquired (step S603).
  • the maximum luminance value is determined and acquired (step S605), and n luminance data values are acquired centering on the maximum luminance value (step S607).
  • the limitation to n luminance data values is that high-speed processing is possible by omitting continuous interpolation of unnecessary data away from the focal point.
  • the n luminance data values are subjected to quadratic interpolation to obtain a continuous interpolation curve as shown by the solid line in FIG. 14 (step S609).
  • the second three-dimensional detection unit 143 detects the distance of the metal particle 5h based on the maximum luminance value in the luminance interpolation value, and based on the luminance centroid value corresponding to the luminance interpolation value that has detected the distance, The position of the metal particle 5h on the X and Y coordinates of 5h is detected (step S700).
  • the three-dimensional measuring apparatus 101 configured as described above is picked up by the image pickup system 10 at different distances between the image pickup system 10 that picks up the metal particles 5h using the image pickup device 14 and the metal particles 5h and the image pickup system 10.
  • a bright point three-dimensional detector 32 that detects the bright points P1, P2,... Pn of each image G1, G2,...
  • a luminance offset detector 34 that detects a luminance offset from a certain area of the image, The brightness of each fixed area centered on the bright point of the image is detected, a second brightness distribution obtained by removing the brightness offset from the brightness distribution of each X axis and Y axis in the fixed area is obtained, and the second brightness
  • the luminance center of gravity is calculated from the luminance detected by the second luminance center-of-gravity calculating unit 136 for obtaining the second luminance center-of-gravity value based on the distribution, the pixel 14a in which the luminance center-of-gravity value is detected, and the pixels 14a around the pixel 14a.
  • the brightness of the value The distance between the brightness correction unit 38 obtained as the brightness correction value and the metal particle 5h based on the brightness correction value and the metal particle based on the second brightness center of gravity corresponding to the brightness correction value for which the distance has been determined. And a second three-dimensional detection unit 143 for obtaining a position on X, Y of 5h.
  • the function / effect of the first embodiment is provided, and the luminance offset detecting unit 34 that detects the luminance offset from a certain region of the image is provided, and the constant is centered on the bright point of the image.
  • the luminance of each region is detected, a second luminance distribution obtained by removing the luminance offset from the luminance distribution for each X-axis and Y-axis in the fixed region is obtained, and the second luminance centroid is calculated based on the second luminance distribution. Since the pixel 14a is not easily affected by the luminance detected by the reflection from the metal particle 5h, the second luminance center of gravity calculation unit 136 for obtaining the value is provided.
  • the second luminance based on the luminance correction value obtained for the distance is used.
  • the barycentric value of the brightness of is exactly overlapped with the position of the metal particle 5h on the XY plane. Accordingly, the three-dimensional measurement apparatus 101 obtains the second luminance centroid value based only on the luminance change value obtained by removing the luminance offset from the luminance near the bright point, and determines the position of the bright point by the second luminance centroid value. Since the detection is performed, the position of the bright point on the XY plane can be accurately detected without being affected by the reflection of the metal particles 5h. Therefore, the detection accuracy of the position of the metal particle 5h is improved. Further, the second luminance correction value corrected based on the second luminance centroid value is obtained, and the distance of the metal particles 5h is detected based on the second luminance correction value. Detection accuracy is further improved.
  • the bright point of the images G1, G2,. P1, P2,..., Pn are detected for each constant region, and the first luminance distribution for each X-axis and Y-axis in the fixed region is obtained, and the luminance offset is calculated from the first luminance distribution.
  • a second luminance centroid value is obtained based on the subtracted second luminance distribution.
  • the distance value with the metal particle 5h is obtained based on the brightness correction value, and the positions of the metal particles 5h on X and Y are determined based on the second brightness centroid value based on the brightness correction value obtained from the distance. Detect.
  • the position of the bright point is detected based only on the luminance change value obtained by removing the luminance offset from the luminance near the bright point, it is not affected by the reflection of the metal particles 5h, etc. It can be detected accurately. Therefore, the detection accuracy of the distance and position of the metal particles 5h is improved.
  • the first (second) three-dimensional detector 30 obtains the distance value from the metal particle 5h based on the first (second) luminance correction value, and Although the position on the X and Y of the metal particle 5h is detected based on the first (second) luminance center-of-gravity value, it may be as follows.
  • the three-dimensional measurement apparatus includes a bright point extraction unit 32, a first luminance centroid calculation unit 36, a luminance offset detection unit 34, a second luminance centroid calculation unit 136, and a first luminance.
  • a correction unit 43 and a third three-dimensional detector are provided.
  • the third three-dimensional detector obtains a distance value with respect to the metal particle 5h based on the first brightness correction value, and based on the second brightness centroid value corresponding to the distance value, X, A position on Y may be detected.
  • the luminance offset is taken into account for detecting the position of the metal particle 5h without taking the luminance offset into consideration when obtaining the distance value with the metal particle 5h. Therefore, the detection accuracy of the position of the metal particle 5h is further improved.
  • the three-dimensional measurement apparatus includes a bright point extraction unit 32, a first luminance centroid calculation unit 36, a luminance offset three-dimensional detection unit 34, and a second luminance centroid calculation unit 136. , A first luminance correction unit 43 and a fourth three-dimensional detector. In place of the third three-dimensional detector, a fourth three-dimensional detector is provided, and the fourth three-dimensional detector obtains a distance value from the metal particle 5h based on the second luminance correction value, The positions on the X and Y of the metal particles 5h may be detected based on the first luminance centroid value corresponding to the distance value.
  • the luminance offset is taken into account for obtaining the distance value with respect to the metal particle 5h, and the luminance offset is not taken into account for detecting the position of the object 5. Therefore, the detection accuracy of the distance of the metal particles 5h is further improved.
  • the present invention can be applied to a three-dimensional measuring apparatus.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Measurement Of Optical Distance (AREA)
  • Image Analysis (AREA)

Abstract

In order to obtain a three-dimensional measurement device capable of measuring the distance to and position of a subject with high accuracy, disclosed is a three-dimensional measurement device provided with: an image capturing system (10) which captures an image of a subject (5) by an image capturing element (14); a bright point extraction unit (32) which detects the subject (5) by luminances that are detected from respective images captured at different distances between the subject (5) and the image capturing system (10) and have a predetermined threshold value or more; a luminance centroid calculation unit (36) which detects luminances in each given region including a plurality of pixels around a bright point of the image, finds the luminance distribution within the given region, and finds the luminance centroid value on the basis of the luminance distribution; a luminance correction unit (38) which obtains the luminance corrected value as a result of correcting the luminance possessed by a pixel (14a) in which the luminance centroid value is detected and the luminances detected by surrounding pixels (14a) to the luminance of the luminance centroid value; and a three-dimensional detection unit (43) which finds the value of the distance to the subject (5) on the basis of the luminance corrected value and detects the position of the subject (5) on the basis of the luminance centroid value.

Description

三次元計測装置及び三次元計測方法Three-dimensional measuring apparatus and three-dimensional measuring method
 本発明は、三次元計測装置及び三次元計測方法に関するものである。 The present invention relates to a three-dimensional measuring apparatus and a three-dimensional measuring method.
 焦点深度法を用いた三次元計測装置は、ピントボケ量の評価を行って合焦点位置を決定している。ピントボケ量の評価は、撮影画像に対して微分フィルターを通し、その分散値から評価したり、輝度の総和から評価したりする方式がある。
 焦点深度法を用いた三次元計測装置は、下記特許文献1に示すように、被対象物の立体的形状を光学的に検出する立体的形状検出装置であって、同一被対象物について求められた、焦点位置の異なる複数の画像より該被対象物上の点各々について画像対応に合焦点を求め、該点対応に求められた、複数の画像間での合焦測度の最大値が得られる際での焦点位置を、該点についての高さとして求めるものである。
 そして、輝度のボケを考慮して画像のコントラストを得て該コントラストを二次微分して合焦点を求めている。
A three-dimensional measuring apparatus using the depth-of-focus method evaluates the amount of out-of-focus and determines the in-focus position. Evaluation of the out-of-focus amount includes a method in which a photographed image is passed through a differential filter and evaluated from its dispersion value or from the sum of luminance.
A three-dimensional measurement apparatus using a depth of focus method is a three-dimensional shape detection apparatus that optically detects a three-dimensional shape of an object as shown in Patent Document 1 below, and is obtained for the same object. In addition, a focal point is obtained for each point on the object from a plurality of images with different focal positions in correspondence with the image, and the maximum value of the focusing measure between the plurality of images obtained for the point correspondence is obtained. The focal position at the moment is obtained as the height of the point.
Then, the contrast of the image is obtained in consideration of the luminance blur, and the contrast is second-order differentiated to obtain the focal point.
 かかる三次元計測装置によれば、被対象物上の点各々について焦点位置が異なる複数の画像を得て、合焦点測度が最大となる画像の焦点位置をその点についての高さとして求める。このようにして求めた点各々の高さから被対象物の立体形状を計測できる。 According to such a three-dimensional measuring apparatus, a plurality of images having different focal positions are obtained for each point on the object, and the focal position of the image having the maximum in-focus measure is obtained as the height for that point. The three-dimensional shape of the object can be measured from the height of each point thus obtained.
特開平3-63507号公報Japanese Unexamined Patent Publication No. 3-63507
 しかしながら、発明者は鋭意研究検討を重ねた結果、上記三次元計測装置によれば、撮像した画像において、合焦点から外れるに従い輝度のボケが顕著に生じるので、輝度に基づいて検知する被対象物のXY平面における位置が特定しづらくなり、XY平面での位置検出精度が低下するという第1の課題を見出した。
 さらに、高さ方向(距離)の検知は、撮像素子における画素(ピクセル)が検知した輝度に基づいて行われるが、撮像系を上昇又は下降することにより、検出すべき被対象物のXY平面における検知位置も僅かにずれる。これに伴い、被対象物が画素の中央付近から周辺部に移動した時に生じるので、撮像素子の画素における検知位置がずれる。
 したがって、該画素の被対象物に基づく輝度が正確に検出できなくなるので、被対象物の距離が正確に検知できないと共に、該距離に対応する被対象物のXY平面における位置の検知も正確に検知できないことが生じ得るという第2の課題を見出した。
However, as a result of repeated researches by the inventor, according to the above three-dimensional measurement apparatus, since the blur of the brightness is noticeably generated in the captured image as it is out of focus, the object to be detected based on the brightness The first problem is that the position on the XY plane is difficult to specify, and the position detection accuracy on the XY plane is lowered.
Furthermore, the detection in the height direction (distance) is performed based on the luminance detected by the pixels (pixels) in the image sensor, but by raising or lowering the imaging system, the object to be detected in the XY plane is detected. The detection position is also slightly shifted. Along with this, since the object is moved from the vicinity of the center of the pixel to the peripheral portion, the detection position of the pixel of the image sensor is shifted.
Therefore, since the luminance based on the object of the pixel cannot be detected accurately, the distance of the object cannot be accurately detected, and the position of the object corresponding to the distance on the XY plane is also accurately detected. We found a second problem that things that can't be done.
 本発明は、上記二つの課題を解決するためになされたもので、簡易な構成で、被対象物を撮像した画像に輝度のボケが生じても、XY平面での被対象物の検出精度を向上すると共に、撮像素子の画素における被対象物の検知位置がずれても、被対象物との距離、位置を高精度に測定できる三次元計測装置及び三次元計測方法を得ることを課題としている。 The present invention has been made to solve the above-described two problems, and with a simple configuration, the detection accuracy of an object on the XY plane can be improved even when luminance blur occurs in an image obtained by imaging the object. It is an object of the present invention to obtain a three-dimensional measurement apparatus and a three-dimensional measurement method capable of measuring the distance and the position of the object with high accuracy even when the detection position of the object in the pixel of the image pickup device is shifted. .
 本発明に係る三次元計測装置は、被対象物を、画素を有する撮像素子により撮像する撮像手段と、
 前記被対象物と前記撮像手段との異なる距離毎に前記撮像手段により撮像された各画像により検知された輝度が予め定められ閾値以上の輝度であることにより前記被対象物を画素単位で抽出する明点抽出手段と、
 前記明点を有する画素を含み、該画素の周囲の画素により成す一定領域ごとの輝度を検知し、該一定領域内のX軸,Y軸ごとの輝度分布を求めると共に、該輝度分布に基づいて第1の輝度重心値を求める輝度重心の演算手段と、
 前記輝度重心値が検知された画素が有する輝度と、該画素の周囲の画素が検知した輝度とを、前記輝度重心値が有する輝度に補正した輝度補正値を得る輝度補正手段と、
 前記輝度補正値に基づいて前記被対象物との距離値を求めると共に、前記輝度重心値に基づいて前記被対象物のX,Y上の位置を検知する三次元検知手段と、を備えたことを特徴とするものである。
The three-dimensional measurement apparatus according to the present invention includes an imaging unit that images an object using an imaging element having pixels,
The target object is extracted in units of pixels when the brightness detected by each image captured by the image capturing means at a different distance between the target object and the image capturing means is a predetermined brightness or more. Bright spot extraction means;
Including the pixel having the bright point, the brightness of each constant area formed by the pixels around the pixel is detected, and the brightness distribution for each of the X axis and Y axis in the constant area is obtained, and based on the brightness distribution Means for calculating a luminance centroid to obtain a first luminance centroid value;
A luminance correction means for obtaining a luminance correction value obtained by correcting the luminance of the pixel in which the luminance centroid value is detected and the luminance detected by pixels surrounding the pixel to the luminance of the luminance centroid value;
3D detection means for obtaining a distance value with respect to the object based on the brightness correction value and detecting a position on the X and Y of the object based on the brightness centroid value. It is characterized by.
 かかる三次元計測装置によれば、明点検知手段が被対象物と撮像手段との異なる距離毎に前記撮像手段により撮像された各画像により検知された輝度が予め定められ閾値以上である輝度と画素とを検出し、輝度重心の演算手段が画像の明点を中心とした一定領域ごとの輝度を検知し、一定領域内のX軸,Y軸ごとの輝度分布を求めると共に、輝度分布に基づいて輝度重心値を求めるので、輝度分布に応じて明点のXY平面での位置を正確に検知できる。したがって、画像に輝度のボケが生じても、XY平面での被対象物の検出精度を向上できると共に、画素単位で輝度を一定値とみなす標本化の影響を受けずに位置を検知できる。
 ここで、一定領域は、明点を中心とした画素により円形を形成しても良い。輝度のボケは、略円形となることが多いからである。
 また、一定領域は、例えば、明点を中心として3×3画素、5×5画素、7×7画素を一定領域とする略正方形としても良い。したがって、撮像素子の画素の周辺に明点が存在しても、複数の画素から輝度を検知するので、明点の位置を正確に検知できる。
According to such a three-dimensional measuring apparatus, the brightness detected by each image picked up by the image pickup means at a different distance between the object and the image pickup means is determined in advance by the bright spot detection means being equal to or higher than a threshold value. The pixel is detected, and the luminance center of gravity calculation means detects the luminance for each fixed region centered on the bright point of the image, obtains the luminance distribution for each X axis and Y axis in the fixed region, and based on the luminance distribution Therefore, the position of the bright point on the XY plane can be accurately detected according to the luminance distribution. Therefore, even if luminance blur occurs in the image, the detection accuracy of the object on the XY plane can be improved, and the position can be detected without being affected by sampling in which the luminance is regarded as a constant value in pixel units.
Here, the fixed region may form a circle with pixels centered on the bright point. This is because the luminance blur often becomes substantially circular.
Further, the fixed area may be, for example, a substantially square having a fixed area of 3 × 3 pixels, 5 × 5 pixels, and 7 × 7 pixels centered on the bright point. Therefore, even if a bright spot exists around the pixel of the image sensor, the brightness is detected from a plurality of pixels, so that the position of the bright spot can be accurately detected.
 さらに、輝度補正手段は、輝度重心値が検知された画素と、該画素の周囲の画素とから検知した輝度を、輝度重心値に基づいて補正した輝度の補正値を得る。これにより、三次元検知手段は、被対象物の距離を計測する輝度を、輝度重心値が有する輝度に補正した輝度補正値によって距離を計測すると共に、輝度重心値に基づいて前記被対象物のX,Y上の位置を検知する。
 これにより、例えば、撮像系を上昇又は下降することにより、被対象物のXY平面における検知位置も僅かにずれる。これにより、撮像素子の画素における検知位置がずれても、輝度重心値を有する画素と、該画素の周囲の画素が検知した輝度を、輝度重心値が有する輝度に補正した輝度の補正値を求める。この輝度の補正値によって、被対象物との距離を計測するので、距離を正確に検出できる。したがって、被対象物に基づく光の反射による明点(頂点)が撮像素子の一画素未満の大きさでも、正確に距離を検知できる。
 また、三次元検知手段は、被対象物の距離を求めた輝度補正値に対応する輝度重心値からX,Y座標上の被対象物の位置も検知しても良い。さらに、撮像系と被対象物と距離Z1、Z2・・・Zn毎に求めた輝度の重心値を多数有しており、多数の輝度重心値を例えば二次関数により補間して、距離と輝度重心の補間値を得て、輝度補正値に基づいて被対象物との距離値を検知して、該距離値を求めた輝度補正値に対応する輝度重心値によりX,Y座標上の被対象物の位置を検知しても良い。
Further, the luminance correction unit obtains a luminance correction value obtained by correcting the luminance detected from the pixel in which the luminance centroid value is detected and the pixels around the pixel based on the luminance centroid value. As a result, the three-dimensional detection means measures the distance by the luminance correction value obtained by correcting the luminance for measuring the distance of the object to the luminance of the luminance centroid value, and based on the luminance centroid value, A position on X and Y is detected.
Thereby, for example, when the imaging system is raised or lowered, the detection position of the object in the XY plane is slightly shifted. Thereby, even if the detection position of the pixel of the image sensor is shifted, a luminance correction value is obtained by correcting the luminance detected by the pixels having the luminance centroid value and the pixels around the pixel to the luminance of the luminance centroid value. . Since the distance to the object is measured by this brightness correction value, the distance can be accurately detected. Therefore, the distance can be accurately detected even if the bright point (vertex) due to the reflection of light based on the object is smaller than one pixel of the image sensor.
The three-dimensional detection means may also detect the position of the object on the X and Y coordinates from the luminance centroid value corresponding to the luminance correction value obtained from the distance of the object. Furthermore, it has a large number of luminance centroid values obtained for the imaging system, the object, and the distances Z1, Z2,... Zn, and interpolates a large number of luminance centroid values by a quadratic function, for example. Obtain the interpolation value of the center of gravity, detect the distance value to the object based on the brightness correction value, and the object on the X and Y coordinates based on the brightness center value corresponding to the brightness correction value obtained the distance value The position of the object may be detected.
 輝度補正手段における輝度重心値が有する輝度の補正は、例えば、各画素から輝度重心値までの距離に基づいて各画素の輝度が輝度重心値に寄与する輝度を求める。ここで、上記寄与する度合いを定めるのに、例えば、各画素の輝度が輝度重心値まで距離のガウス分布により輝度重心値が有する輝度として求めても良い。 For the correction of the luminance of the luminance centroid value in the luminance correction means, for example, the luminance that the luminance of each pixel contributes to the luminance centroid value is obtained based on the distance from each pixel to the luminance centroid value. Here, in order to determine the degree of contribution, for example, the luminance of each pixel may be obtained as the luminance of the luminance centroid value by a Gaussian distribution of the distance to the luminance centroid value.
 本発明の三次元計測装置は、前記画像の前記一定領域から輝度オフセットを検知する輝度オフセットの検知手段を備え、
 前記輝度重心の演算手段は、前記輝度分布から前記輝度オフセットを除去した新たな輝度分布を求めると共に、該新たな輝度分布に基づいて第2の輝度重心値を求める、ことが好ましい。
 ここで、輝度オフセットは、一定領域の輝度からすべての領域において生じている一定の輝度で、最小輝度値であることが好ましい。被対象物の輝度変化のみを検知し易いからである。
 この三次元計測装置では、輝度オフセットの検知手段が画像の輝度から輝度オフセットを検知し、輝度重心の演算手段は輝度分布から該輝度オフセットを除去した新たな輝度分布を求め、新たな輝度分布により輝度重心値を求める。したがって、輝度分布から該輝度オフセットを除去した明点付近の輝度変化、すなわち、被対象物に起因する輝度変化のみに基づいて輝度重心値を求め、この輝度重心値に基づいて被対象物のXY平面における位置を検知する。
 したがって、被対象物からの乱反射などを画素が輝度として検知する影響を除去して、明点付近の画素が検知した輝度から輝度重心値を求めるので、輝度重心値の検知精度が向上する。これによって、XY平面における被対象物の位置検出精度が向上する。
 さらに、輝度補正手段は、輝度オフセットを除去して、検知精度が向上した輝度重心値に基づいて補正した輝度の補正値に基づいて被対象物の距離を検知するので、距離の検出精度もさらに向上する。
The three-dimensional measurement apparatus of the present invention comprises a luminance offset detection means for detecting a luminance offset from the certain region of the image,
Preferably, the luminance centroid calculating means obtains a new luminance distribution obtained by removing the luminance offset from the luminance distribution, and obtains a second luminance centroid value based on the new luminance distribution.
Here, the luminance offset is a constant luminance generated in all regions from the luminance of the certain region, and is preferably a minimum luminance value. This is because it is easy to detect only the luminance change of the object.
In this three-dimensional measuring apparatus, the luminance offset detecting means detects the luminance offset from the luminance of the image, and the luminance centroid calculating means obtains a new luminance distribution from which the luminance offset is removed from the luminance distribution. Find the luminance centroid value. Therefore, the luminance centroid value is obtained based only on the luminance change near the bright point from which the luminance offset is removed from the luminance distribution, that is, the luminance change caused by the object, and the XY of the object is determined based on the luminance centroid value. Detect the position in the plane.
Therefore, the luminance centroid value is obtained from the luminance detected by the pixels in the vicinity of the bright point by removing the influence of the pixel detecting the irregular reflection from the object as the luminance and the luminance centroid value detection accuracy is improved. This improves the position detection accuracy of the object in the XY plane.
Furthermore, since the brightness correction means detects the distance of the object based on the brightness correction value corrected based on the brightness centroid value with improved detection accuracy by removing the brightness offset, the distance detection accuracy is further improved. improves.
 本発明の三次元計測装置は、前記画像の前記一定領域から輝度オフセットを検知する輝度オフセットの検知手段を備え、前記輝度分布から前記輝度オフセットを除去した新たな輝度分布を求めると共に、該新たな輝度分布に基づいて第2の輝度重心値を求める第2の輝度重心の演算手段を備えることが好ましい。
 これにより、輝度補正手段は、第1の輝度重心値を有する画素が検知した輝度と、該画素の周囲の画素が検知した輝度を、第1の輝度重心値が有する輝度に補正した第1の輝度補正値を得る。
 三次元検知手段は、第1の輝度補正値に基づいて被対象物との距離値を求めると共に、第2の輝度重心値に基づいて被対象物のX,Y上の位置を検知しても良い。これにより、被対象物との距離値を求めるのに、輝度オフセットを考慮せず、被対象物の位置を検知するのに、輝度オフセットを考慮している。したがって、被対象物の位置の検知精度がより向上する。
 また、輝度補正手段は、第2の輝度重心値を有する画素が検知した輝度と、該画素の周囲の画素が検知した輝度を、第2の輝度重心値が有する輝度に補正した第2の輝度補正値を得る。
 三次元検知手段は、第2の輝度補正値に基づいて被対象物との距離値を求めると共に、第1の輝度重心値に基づいて被対象物のX,Y上の位置を検知しても良い。これにより、被対象物との距離値を求めるのに、輝度オフセットを考慮し、被対象物の位置を検知するのに、輝度オフセットを考慮していない。したがって、被対象物の距離の検知精度がより向上する、
The three-dimensional measurement apparatus according to the present invention includes a luminance offset detection unit that detects a luminance offset from the certain region of the image, obtains a new luminance distribution obtained by removing the luminance offset from the luminance distribution, and It is preferable to include a second luminance centroid calculating means for obtaining a second luminance centroid value based on the luminance distribution.
As a result, the luminance correction means corrects the luminance detected by the pixel having the first luminance centroid value and the luminance detected by pixels around the pixel to the luminance of the first luminance centroid value. A brightness correction value is obtained.
The three-dimensional detection means obtains a distance value to the object based on the first luminance correction value and detects the position on the X and Y of the object based on the second luminance gravity center value. good. Thus, the luminance offset is taken into account for detecting the position of the object without considering the luminance offset to obtain the distance value with the object. Therefore, the detection accuracy of the position of the object is further improved.
In addition, the luminance correction unit corrects the luminance detected by the pixel having the second luminance centroid value and the luminance detected by the pixels around the pixel to the luminance of the second luminance centroid value. Get the correction value.
The three-dimensional detection means obtains a distance value to the object based on the second luminance correction value and detects the position on the X and Y of the object based on the first luminance centroid value. good. As a result, the luminance offset is taken into account for obtaining the distance value from the object, and the luminance offset is not taken into account for detecting the position of the object. Therefore, the detection accuracy of the distance of the object is further improved.
 本発明の三次元計測装置は、前記輝度の補正値を所定の関数で補間して輝度の補間値を求める輝度の補間手段を備え、
 前記三次元検知手段は、前記輝度の補間値に基づいて前記被対象物との距離値を求める、ことが好ましい。
 この三次元計測装置では、輝度の補間手段は、輝度の補正値を所定の関数で補間して輝度の補間値を得て、三次元検知手段は、輝度の補間値に基づいて被対象物との距離値を求める。
 これにより、距離毎に求められた輝度を補間して輝度補間値を得て、輝度補間値に基づいて被対象物との距離値を求める。したがって、撮像系の高さ毎に検知した各画像間における輝度の連続性が保たれるので、高精度に被対象物の距離を求めることができる。
The three-dimensional measurement apparatus of the present invention includes a luminance interpolation unit that interpolates the luminance correction value with a predetermined function to obtain a luminance interpolation value,
The three-dimensional detection means preferably obtains a distance value with respect to the object based on the luminance interpolation value.
In this three-dimensional measurement apparatus, the luminance interpolation means interpolates the luminance correction value with a predetermined function to obtain the luminance interpolation value, and the three-dimensional detection means detects the object based on the luminance interpolation value. Find the distance value.
Thereby, the brightness | luminance calculated | required for every distance is interpolated, a brightness | luminance interpolation value is obtained, and the distance value with a target object is calculated | required based on a brightness | luminance interpolation value. Therefore, since the continuity of the brightness between the images detected for each height of the imaging system is maintained, the distance of the object can be obtained with high accuracy.
 本発明の三次元計測方法は、被対象物と前記撮像手段との異なる距離毎に前記撮像手段により撮像された各画像の明点を検出する明点抽出工程を実行した後、
 前記画像の明点を含む一定領域ごとの輝度を検知し、該一定領域内のX軸,Y軸ごとの輝度分布を求めると共に、前記輝度分布に基づいて輝度重心値を求める輝度重心の演算工程を実行した後、
 前記輝度重心値に基づいて複数の画素を有する一定領域を設定して、該画素から検知した輝度を、前記輝度重心値に基づいて補正した輝度の補正値を得た後、
 前記輝度の補正値に基づいて前記被対象物との距離値を求めると共に、前記輝度重心値に基づいて前記被対象物のX,Y上の位置を検知する、ものである。
 本発明の三次元計測方法によれば、輝度重心値に基づいて被対象物としての明点の位置を検知できるので、明点周囲の輝度ボケの影響を受けにくい。さらに、輝度重心値に基づいて検知した輝度を補正して輝度補正値とし、この輝度補正値に基づいて被対象物との距離を検知するので、撮像素子における画素の検知位置に拘わらず、距離の検知精度が向上する。
In the three-dimensional measurement method of the present invention, after executing a bright point extraction step of detecting a bright point of each image captured by the imaging unit at different distances between the object and the imaging unit,
Luminance centroid calculation step of detecting the luminance for each constant region including the bright point of the image, obtaining the luminance distribution for each X-axis and Y-axis in the fixed region, and obtaining the luminance centroid value based on the luminance distribution After running
After setting a certain region having a plurality of pixels based on the luminance centroid value, and obtaining a luminance correction value obtained by correcting the luminance detected from the pixel based on the luminance centroid value,
A distance value with respect to the object is obtained based on the correction value of the luminance, and a position on the X and Y of the object is detected based on the luminance centroid value.
According to the three-dimensional measurement method of the present invention, since the position of the bright spot as the object can be detected based on the luminance centroid value, it is not easily affected by the luminance blur around the bright spot. Further, the detected luminance is corrected based on the luminance centroid value to obtain a luminance correction value, and the distance to the object is detected based on the luminance correction value. Therefore, the distance is detected regardless of the detection position of the pixel in the image sensor. Detection accuracy is improved.
 本発明の三次元計測方法は、前記明点抽出工程を実行した後、前記画像から輝度オフセットを検知する輝度オフセットの検知工程を実行した後、
 輝度重心の演算工程は、前記輝度分布から前記輝度オフセットを除去した該一定領域内のX軸,Y軸ごとの新たな輝度分布を求めると共に、前記新たな輝度分布に基づいて輝度重心値を求める、ことが好ましい。
 本発明の三次元計測方法によれば、輝度分布から輝度オフセットを除去した該一定領域内のX軸,Y軸ごとの新たな輝度分布を求めると共に、新たな輝度分布に基づいて輝度重心値を求める。これにより、被対象物に基づく輝度の変化量により輝度重心を求めるので、輝度の重心が正確に検知できる。したがって、被対象物の距離と位置との検出精度が向上する。
In the three-dimensional measurement method of the present invention, after executing the bright spot extraction step, after executing a luminance offset detection step of detecting a luminance offset from the image,
In the luminance centroid calculation step, a new luminance distribution is obtained for each of the X axis and Y axis in the fixed region obtained by removing the luminance offset from the luminance distribution, and a luminance centroid value is obtained based on the new luminance distribution. Is preferable.
According to the three-dimensional measurement method of the present invention, a new luminance distribution is obtained for each of the X axis and the Y axis in the certain region from which the luminance offset is removed from the luminance distribution, and the luminance centroid value is calculated based on the new luminance distribution. Ask. As a result, the luminance center of gravity is obtained from the amount of change in luminance based on the object, so that the luminance center of gravity can be accurately detected. Therefore, the detection accuracy of the distance and position of the object is improved.
 本発明によれば、簡易な構成で、被対象物を撮像した画像に輝度のボケが生じても、XY平面における被対象物の検出精度を向上すると共に、撮像素子の画素における被対象物の検知位置がずれても、被対象物との距離及び位置を高精度測定できる三次元計測装置又は三次元計測方法を得ることができる。 According to the present invention, even when luminance blur occurs in an image obtained by capturing an object with a simple configuration, the detection accuracy of the object on the XY plane is improved and the object in the pixel of the image sensor is improved. Even if the detection position is shifted, it is possible to obtain a three-dimensional measuring apparatus or a three-dimensional measuring method capable of measuring the distance and position with the object with high accuracy.
本発明の一実施の形態を示す三次元計測装置の全体図である。1 is an overall view of a three-dimensional measuring apparatus showing an embodiment of the present invention. 本発明の一実施の形態による実際の画像図(a)、明点と一定領域を示した画像図(b)、画像内の一定領域と明点とを示す摸式図(c)である。FIG. 4 is an actual image (a) according to an embodiment of the present invention, an image (b) showing a bright spot and a fixed area, and a schematic diagram (c) showing a fixed area and a bright spot in the image. 図1による三次元計測装置で、標本化された輝度値とX座標とを示すと共に、輝度重心を示す特性図である。FIG. 3 is a characteristic diagram showing a luminance center of gravity while showing a sampled luminance value and an X coordinate in the three-dimensional measuring apparatus according to FIG. 1. 図1の三次元計測装置の撮像素子の画素と金属粒子の位置による輝度の比率を示す模式図(a)、撮像素子の一部断面図(b)である。FIG. 2 is a schematic diagram (a) illustrating a ratio of luminance depending on positions of pixels and metal particles of the image sensor of the three-dimensional measurement apparatus in FIG. 1, and a partial cross-sectional view (b) of the image sensor. 図1の三次元計測装置の撮像素子の画素値を示す図(a)、輝度重心値と各画素の中心位置との関係を示す平面図(b)ある。FIG. 2A is a diagram illustrating a pixel value of an image sensor of the three-dimensional measurement apparatus in FIG. 1, and FIG. 2B is a plan view illustrating a relationship between a luminance centroid value and a center position of each pixel. 図1の三次元計測装置による検知された輝度値、輝度補正値と、被対象物との距離との関係を示す特性曲線図である。It is a characteristic curve figure which shows the relationship between the distance with the brightness | luminance value detected by the three-dimensional measuring apparatus of FIG. 1, a brightness | luminance correction value, and a target object. 図1の三次元計測装置の全体動作を示すフローチャートである。It is a flowchart which shows the whole operation | movement of the three-dimensional measuring apparatus of FIG. 図1の三次元計測装置による明点抽出工程を示すフローチャートである。It is a flowchart which shows the bright spot extraction process by the three-dimensional measuring apparatus of FIG. 図1の三次元計測装置による第1の輝度重心の演算工程を示すフローチャートである。It is a flowchart which shows the calculation process of the 1st brightness | luminance gravity center by the three-dimensional measuring apparatus of FIG. 図1の三次元計測装置による輝度の補正工程を示すフローチャートである。It is a flowchart which shows the correction process of the brightness | luminance by the three-dimensional measuring apparatus of FIG. 本発明の他の実施の形態を示す三次元計測装置の全体図である。It is a whole figure of the three-dimensional measuring device which shows other embodiment of this invention. 図11による三次元計測装置で、検知輝度値,検知輝度値から輝度オフセットを除去した輝度変化値とX座標との関係を示す特性曲線図である。FIG. 12 is a characteristic curve diagram illustrating a relationship between a detected luminance value, a luminance change value obtained by removing a luminance offset from the detected luminance value, and an X coordinate in the three-dimensional measurement apparatus according to FIG. 11. 輝度オフセットの有無による金属粒子の輝度値とX座標との関係を示す特性曲線図である。It is a characteristic curve figure which shows the relationship between the luminance value of a metal particle by the presence or absence of a brightness | luminance offset, and X coordinate. 図11の三次元計測装置による輝度値、輝度補正値、輝度の連続補間値と被対象物との距離との関係を示す特性曲線図である。FIG. 12 is a characteristic curve diagram illustrating a relationship between a brightness value, a brightness correction value, a continuous interpolation value of brightness, and a distance from an object by the three-dimensional measurement apparatus of FIG. 11. 図11の三次元計測装置の全体動作を示すフローチャートである。It is a flowchart which shows the whole operation | movement of the three-dimensional measuring apparatus of FIG. 図11の三次元計測装置による輝度オフセットの検知工程の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the detection process of the brightness | luminance offset by the three-dimensional measuring apparatus of FIG. 図11の三次元計測装置による第2の輝度重心の演算工程の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the calculation process of the 2nd brightness | luminance gravity center by the three-dimensional measuring apparatus of FIG. 図11の三次元計測装置による輝度の補間工程の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the brightness | luminance interpolation process by the three-dimensional measuring apparatus of FIG.
実施の形態1.
 本発明の一実施の形態となる三次元計測装置の全体構成を図1によって説明する。図1は本発明の一実施の形態を示す三次元計測装置の全体図である。
 図1において、三次元計測装置1は、反射され易い被対象物5の表面までの距離Zと、XY平面における位置とを検出するものである。
 第1の三次元計測装置1は、被対象物5を撮像すると共に、多数の画素14aを有する撮像素子14を備えた撮像系10と、撮像系10をZ軸方向に上下させるためにL形状の台7に立設されたボールネジ62と、このボールネジ62に螺合されると共に、撮像系10が固定されたモータ等を有する駆動機構60と、駆動機構60を動作させる位置指令信号を発生する制御部55を有している。
 なお、一つの画素14aを画素単位U1という。
Embodiment 1 FIG.
An overall configuration of a three-dimensional measuring apparatus according to an embodiment of the present invention will be described with reference to FIG. FIG. 1 is an overall view of a three-dimensional measuring apparatus showing an embodiment of the present invention.
In FIG. 1, a three-dimensional measuring apparatus 1 detects a distance Z to the surface of an object 5 that is easily reflected and a position on an XY plane.
The first three-dimensional measurement apparatus 1 captures an image of the object 5, and includes an imaging system 10 including an imaging device 14 having a large number of pixels 14a, and an L shape for moving the imaging system 10 up and down in the Z-axis direction. A ball screw 62 erected on the base 7, a drive mechanism 60 having a motor or the like to which the imaging system 10 is fixed, and a position command signal for operating the drive mechanism 60. A control unit 55 is included.
One pixel 14a is referred to as a pixel unit U1.
 さらに、第1の三次元計測装置1は、制御部55からの位置指令信号により駆動機構60を駆動する撮像系駆動部65を有しており、撮像素子14が撮像した画像を取込み、該画像から撮像系10から被対象物5の表面までの距離を求めると共に、被対象物5のXY平面における位置を検出する第1の三次元検出器30を有している。
 ここで、被対象物5は特に限定されないが、樹脂板5の表面に設けられると共に、光を反射し易い複数として六つの球状などの金属粒子5hなどが好適で、金属粒子5hは撮像素子14の一画素14aよりも大きくも、小さくても良い。
Furthermore, the first three-dimensional measuring apparatus 1 has an imaging system driving unit 65 that drives the driving mechanism 60 in response to a position command signal from the control unit 55, takes in an image captured by the imaging element 14, and And a first three-dimensional detector 30 that detects the position of the object 5 on the XY plane, as well as the distance from the imaging system 10 to the surface of the object 5.
Here, the object 5 is not particularly limited, but is preferably provided on the surface of the resin plate 5 and is preferably a plurality of metal particles 5h such as six spheres that easily reflect light. It may be larger or smaller than one pixel 14a.
 第1の三次元検出器30は、マイクロコンピュータから成り、周知のインターフェイス、CPU、RAM、ROMを有しており、金属粒子5hを所定値以上の輝度が生じる明点を画素単位U1で抽出すると共に、輝度を検知する明点抽出部32を有している。
 ここで、金属粒子5hを所定値以上の輝度により検知するのは、金属粒子5hがあるとその反射によって、周辺よりも輝度が高くなるからである。
 さらに、第1の三次元検出器30は、明点を有する輝度から第1の輝度重心値を求める第1の輝度重心の演算部36と、第1の輝度重心値により明点の輝度を補正する第1の輝度の補正部38と、第1の輝度の補正値から金属粒子5hとの距離を求めると共に、該距離に対応する第1の輝度重心値から金属粒子5hのXY平面の位置を検出する第1の三次元検知部43とを備えている。
The first three-dimensional detector 30 is composed of a microcomputer, and has a known interface, CPU, RAM, and ROM, and extracts a bright point at which a luminance of a predetermined value or more from the metal particle 5h is generated in a pixel unit U1. In addition, it has a bright spot extraction unit 32 for detecting luminance.
Here, the reason why the metal particles 5h are detected with a luminance equal to or higher than a predetermined value is that if the metal particles 5h are present, the luminance is higher than the surroundings due to the reflection.
Furthermore, the first three-dimensional detector 30 corrects the brightness of the bright point using the first brightness centroid value calculating unit 36 for obtaining the first brightness centroid value from the brightness having the bright point, and the first brightness centroid value. The distance between the first luminance correction unit 38 and the metal particle 5h is obtained from the first luminance correction value, and the position of the XY plane of the metal particle 5h is determined from the first luminance centroid value corresponding to the distance. And a first three-dimensional detection unit 43 for detection.
 三次元計測装置1の各部の構成を図1から図6を参照しつつ説明する。図2は一実施の形態による実際の画像図(a)、明点と一定領域を示した画像図(b)、画像内の一定領域と明点とを示す摸式図(c)である。
 明点抽出部32は、図2(a)に示すように、撮像素子14と金属粒子5hとの距離Z1,Z2・・・Zn毎において撮像した各画像ファイルG1,G2・・Gnそれぞれから、閾値以上の輝度を有する画素14aを検知し、この画素14aを輝度セルB1・・・B6として抽出し、図2(b)及び(c)に示すように、各輝度セルB1・・・B6の中心、つまり複数の金属粒子5hから直接反射を受けた頂点を第1の明点P1から第6の明点P6として画素単位U1で検知する。
 なお、金属粒子5hが球状でも金属粒子5hからの直接反射によって頂点が生じ、この頂点が一画素14a未満となっている。
The configuration of each part of the three-dimensional measuring apparatus 1 will be described with reference to FIGS. FIG. 2 is an actual image (a) according to an embodiment, an image (b) showing a bright spot and a fixed area, and a schematic diagram (c) showing a fixed area and a bright spot in the image.
As shown in FIG. 2 (a), the bright spot extraction unit 32, from each of the image files G1, G2,... Gn captured at the distances Z1, Z2,. A pixel 14a having a luminance equal to or higher than a threshold value is detected, and this pixel 14a is extracted as a luminance cell B1... B6, and as shown in FIGS. The center, that is, the vertex directly reflected from the plurality of metal particles 5h is detected in the pixel unit U1 as the first bright point P1 to the sixth bright point P6.
Even if the metal particle 5h is spherical, a vertex is generated by direct reflection from the metal particle 5h, and this vertex is less than one pixel 14a.
 そして、明点抽出部32は各明点P1・・P6を含む中心の画素14aと、該中心の画素14aの周囲の画素14aとから形成される一定領域A1・・A6内における輝度の差からコントラスト値を得て、該コントラスト値が予め定められた閾値以上であることを検知するように形成されている。ここで、金属粒子の頂点5hによる明点を抽出するのに、コントラスト値が閾値以上であることを判断するのは、輝度のゆらぎの影響を防止して、明点P1,P2・・P6の誤検出を防止するためである。
 なお、複数の画素14aにより形成される上記一定領域A1・・A6として例えば5×5画素としている。
Then, the light spot extraction unit 32 calculates the difference in luminance in the fixed area A1... A6 formed by the central pixel 14a including each bright spot P1... P6 and the pixels 14a around the central pixel 14a. It is configured to obtain a contrast value and detect that the contrast value is greater than or equal to a predetermined threshold value. Here, in order to extract the bright point by the vertex 5h of the metal particle, it is determined that the contrast value is equal to or greater than the threshold value by preventing the influence of the fluctuation of the brightness, and the bright points P1, P2,. This is to prevent erroneous detection.
For example, the predetermined area A1... A6 formed by the plurality of pixels 14a is 5 × 5 pixels.
<第1の輝度重心の演算部36の必要性>
 明点抽出部32によって、金属粒子5h、すなわち、輝度が高い値を示した撮像素子14を画素単位U1で特定することにより、該画素14aから金属粒子5hのXY平面での位置を検知できる。
 しかし、画素単位U1よりも分解能を有する検知精度を得ることができないばかりか、検知された輝度がボケるために、明点を有する画素14aの特定が不正確になるおそれがある。
 そこで、明点を抽出した画素14aを含む複数の画素14aで形成される一定領域を定め、該一定領域の輝度分布から第1の輝度重心値を求めて明点の位置、すなわち、金属粒子5hの位置を検知する。
 ここで、一定領域A1・・A6としては、5×5画素14aにより形成される領域としている。また、点状の各明点P1・・・・P6を中心とした輝度のボケは、一般に円形になることから、各明点を含む中心の画素14aと、該中心の画素14aの周囲の画素14とから成る複数の画素14aで、略円形に形成しても良い。さらに、受光された輝度のボケ形状によって、複数の画素14aにより一定領域を決定しても良い。
<Necessity of First Luminance Center of Gravity Calculation Unit 36>
By specifying the metal particle 5h, that is, the imaging element 14 showing a high luminance value by the pixel unit U1 by the bright spot extraction unit 32, the position of the metal particle 5h on the XY plane can be detected from the pixel 14a.
However, not only the detection accuracy having a resolution higher than that of the pixel unit U1 can be obtained, but also the detected luminance is blurred, and therefore the specification of the pixel 14a having a bright point may be inaccurate.
Therefore, a fixed region formed by a plurality of pixels 14a including the pixel 14a from which the bright point is extracted is determined, and the first luminance barycentric value is obtained from the luminance distribution of the fixed region, and the position of the bright point, that is, the metal particle 5h. The position of is detected.
Here, the fixed regions A1... A6 are regions formed by 5 × 5 pixels 14a. In addition, since the luminance blur centered on each of the dotted bright points P1,... P6 is generally circular, the central pixel 14a including each bright point and the pixels around the central pixel 14a. 14 may be formed in a substantially circular shape. Furthermore, the fixed area may be determined by the plurality of pixels 14a depending on the blurred shape of the received luminance.
<第1の輝度重心の演算部36の構成>
 第1の輝度重心の演算部36は、一定領域A1における第1の輝度分布、すなわち、検知された輝度LからX,Y座標における第1の輝度重心値(Xg,Yg)を下式(1)及び(2)式によりそれぞれ求めている。そして、第1の輝度重心値(Xg,Yg)が金属粒子5hのX,Y座標での位置となる。
  Xg=ΣxL/ΣL ・・・・(1)
  Yg=ΣyL/ΣL ・・・・(2)
 ここで、L:検知された輝度
 また、第1の輝度重心の演算部36は、撮像素子14と金属粒子5hとの距離Z1,Z2・・・Zn毎に第1の輝度重心値をそれぞれ求めて記憶する。
 なお、他の明点P2・・・P6に対応する他の一定領域A2・・・A6についても上記一定領域A1と同様に輝度重心値を求める。
<Configuration of First Luminance Center of Gravity Calculation Unit 36>
The first luminance centroid operation unit 36 calculates the first luminance distribution in the fixed region A1, that is, the first luminance centroid value (Xg, Yg) in the X and Y coordinates from the detected luminance L by the following equation (1). ) And (2) respectively. Then, the first luminance centroid value (Xg, Yg) is the position of the metal particle 5h in the X, Y coordinates.
Xg = ΣxL / ΣL (1)
Yg = ΣyL / ΣL (2)
Here, L: Detected luminance Further, the first luminance center-of-gravity calculation unit 36 obtains a first luminance center-of-gravity value for each of the distances Z1, Z2,... Zn between the imaging element 14 and the metal particles 5h. Remember.
For other fixed areas A2... A6 corresponding to other bright points P2.
 輝度重心を求めるのは、明点P1・・・・P6の位置を画素単位U1よりも正確に検出するためである。すなわち、明点P1・・・・P6の位置を第1の輝度分布から第1の輝度重心値を求めることにより、検知された輝度のボケの影響を受けずに、明点P1・・・・P6の位置を検知できる。したがって、図3に示すように、第1の輝度重心値を求めることにより、明点の輝度が画素14aの単位で、一定値になるように標本化されていても、金属粒子5hの各座標における正確なXY方向の位置を検出できる。
 なお、図3は、X座標のみについて示しているが、Y座標と輝度値の関係もX座標と同様である。
The reason for obtaining the luminance center of gravity is to detect the positions of the bright points P1,... P6 more accurately than the pixel unit U1. That is, by obtaining the first luminance barycentric value from the first luminance distribution at the positions of the bright points P1,... P6, the bright points P1,. The position of P6 can be detected. Therefore, as shown in FIG. 3, even if the brightness of the bright spot is sampled so as to be a constant value in the unit of the pixel 14a by obtaining the first brightness centroid value, each coordinate of the metal particle 5h is obtained. An accurate position in the XY direction can be detected.
3 shows only the X coordinate, the relationship between the Y coordinate and the luminance value is the same as that of the X coordinate.
<輝度の補正部38の必要性>
 撮像素子14は、図4(a)に示すように正方形の画素14aが格子状に形成されており、各画素14aは、円形の三次元検知部14sを有している。このため、画素14aの中央に画素14aの面積よりも狭い金属粒子5hによる第1の明点P1としての明点Pcがある場合には、一つの画素14aの輝度の検知比率が1となり、明点Pcを検知した画素14a一つで検知すれば足りる。
 なお、金属粒子5h自体の大きさが一画素14aよりも大きくても、金属粒子5hからの直接反射に基づく明点P1は、一画素14aとなることがある。
<Necessity of Luminance Correction Unit 38>
As shown in FIG. 4A, the imaging element 14 has square pixels 14a formed in a lattice shape, and each pixel 14a has a circular three-dimensional detection unit 14s. For this reason, when there is a bright point Pc as the first bright point P1 due to the metal particles 5h narrower than the area of the pixel 14a at the center of the pixel 14a, the luminance detection ratio of one pixel 14a is 1, and It is sufficient to detect the point Pc with one pixel 14a that has detected the point Pc.
Even if the size of the metal particle 5h itself is larger than one pixel 14a, the bright point P1 based on the direct reflection from the metal particle 5h may be one pixel 14a.
 しかしながら、図4(a)に示すように第1の明点P1としての明点Paのように、第1の輝度重心が画素14aと画素14aとの敷居間、すなわち、敷居で形成される十字の中央付近に位置すると、周囲の四つの画素14aの輝度の検知比率がそれぞれ0.25となる。また、第1の輝度重心が画素14aの上下の境に第1の明点P1としての明点Pbが位置すると、周囲の四つの画素14aは、検知した輝度の検知比率がそれぞれ0.6,0.2,0.0,0.2となる。
 したがって、明点を抽出した一つの画素14aのみが検知した輝度によって、第1の輝度重心値における輝度とすると、第1の輝度重心値における輝度が正確に検知できなくなることがある。
However, as shown in FIG. 4A, the first luminance center of gravity is a cross formed between the thresholds of the pixels 14a and 14a, that is, the threshold, as a bright point Pa as the first bright point P1. , The luminance detection ratio of the surrounding four pixels 14a is 0.25, respectively. When the bright spot Pb as the first bright spot P1 is located at the upper and lower borders of the pixel 14a with the first brightness center of gravity, the surrounding four pixels 14a have a detected brightness detection ratio of 0.6, respectively. 0.2, 0.0, 0.2.
Therefore, if the luminance at the first luminance centroid value is determined by the luminance detected by only one pixel 14a from which the bright point is extracted, the luminance at the first luminance centroid value may not be detected accurately.
 上記のように、撮像素子14の画素14aの検知特性が中央部と周辺部とで異なるのは、画素14aが図4(b)示すように、円形の三次元検知部としてマイクロレンズ14sを通過した光がフィルター14fを介して配線層14cに設けられたフォトダイオード14pに受光される。したがって、上記のように画素14aの周辺部では検知特性が低下するためである。 As described above, the detection characteristics of the pixel 14a of the image sensor 14 are different between the central portion and the peripheral portion. As shown in FIG. 4B, the pixel 14a passes through the microlens 14s as a circular three-dimensional detection portion. The received light is received by the photodiode 14p provided in the wiring layer 14c through the filter 14f. Therefore, as described above, the detection characteristics deteriorate in the peripheral portion of the pixel 14a.
 撮像素子14は、上記のような検知特性を有するので、図6に示すように、撮像系10と金属粒子5hとの距離を変化して、各距離において明点P1を有する一つの画素14aを特定して、該画素14aが検知した輝度をプロットすると、図6の×印で示す特性曲線が得られる。この特性曲線を観察すると、距離220~270付近において、本来、撮像系10の有する合焦点に近づくにつれて検知された輝度が上昇し、合焦点から離れるにつれて輝度が減少して略山状の特性を示すものが、輝度が高くなるにつれて急に輝度が減少して上昇するという一点鎖線で示す略V特性を示すことがある。 Since the imaging element 14 has the detection characteristics as described above, as shown in FIG. 6, the distance between the imaging system 10 and the metal particles 5h is changed, and one pixel 14a having a bright point P1 at each distance is changed. When the brightness detected by the pixel 14a is plotted, a characteristic curve indicated by a cross in FIG. 6 is obtained. When observing this characteristic curve, the detected brightness increases as the focal point of the imaging system 10 is approached, and the luminance decreases as the distance from the focal point increases. What is shown may show a substantially V characteristic indicated by a one-dot chain line in which the luminance suddenly decreases and increases as the luminance increases.
 このような現象は、撮像系10の移動に伴い、第1の輝度重心値が画素14aの中央付近から周辺付近にずれたことによって生じる。これは、高さ方向の撮像系10の移動に伴い、撮像素子14の中心がXY平面で同一位置でなく、僅かにずれるからである。
 したがって、検知した輝度を補正しないと、輝度が最も高いところを、合焦点とみなすことから、金属粒子5hの距離検知に誤差を生じることとなる。
 このため、XY平面における第1の輝度重心値の移動に伴い、金属粒子5hの距離を検知するための輝度値を補正する必要が生じる。そこで、第1の輝度重心値を含む画素14aと、該画素14aの周囲の画素14aとが検知した輝度を、第1の輝度重心値が有する輝度として輝度の補正をする。この輝度の補正により、金属粒子5hの距離を求めるので、距離の検知精度を向上する。
 なお、輝度の補正は撮像系10と金属粒子5hとの各距離毎に、抽出した各明点P1・・・P6毎になされる。
Such a phenomenon occurs when the first luminance center-of-gravity value is shifted from the vicinity of the center of the pixel 14a to the vicinity thereof as the imaging system 10 moves. This is because the center of the image sensor 14 is not at the same position on the XY plane and slightly shifts with the movement of the image pickup system 10 in the height direction.
Therefore, if the detected luminance is not corrected, an area having the highest luminance is regarded as a focal point, and an error occurs in distance detection of the metal particles 5h.
For this reason, it is necessary to correct the luminance value for detecting the distance of the metal particles 5h with the movement of the first luminance centroid value in the XY plane. Therefore, the luminance is corrected by using the luminance detected by the pixel 14a including the first luminance centroid value and the pixels 14a around the pixel 14a as the luminance of the first luminance centroid value. By correcting the luminance, the distance of the metal particles 5h is obtained, so that the distance detection accuracy is improved.
Note that the luminance is corrected for each extracted bright point P1... P6 for each distance between the imaging system 10 and the metal particle 5h.
<輝度の補正部38の構成>
 第1の輝度の補正部38は、第1の輝度重心を有する画素14aと、該画素14aの周囲の画素14aそれぞれが検知した各輝度を、第1の輝度重心値と、撮像素子14における各画素14aの中心位置との距離により補正して、第1の輝度重心が本来有する輝度を推定するものである。
 すなわち、輝度の補正部38は、周辺の画素14aが検知した輝度を、輝度重心値が有する輝度として輝度補正値Lmを下記(3)式により求める。
 また、第1の輝度の補正部36は、撮像素子14と金属粒子5hとの距離Z1,Z2・・・Zn毎に求めた第1の輝度重心値に基づいてそれぞれを求める。
<Configuration of Luminance Correction Unit 38>
The first luminance correction unit 38 detects the luminance detected by each of the pixels 14 a having the first luminance centroid and the pixels 14 a around the pixel 14 a, the first luminance centroid value, and each of the pixels in the image sensor 14. The brightness inherent in the first brightness centroid is estimated by correcting the distance from the center position of the pixel 14a.
That is, the luminance correction unit 38 obtains the luminance correction value Lm from the following equation (3), using the luminance detected by the surrounding pixels 14a as the luminance of the luminance centroid value.
Further, the first luminance correction unit 36 obtains each based on the first luminance centroid value obtained for each of the distances Z1, Z2,... Zn between the imaging element 14 and the metal particles 5h.
 撮像素子14における各画素14aを特定するための識別番号は、X方向とY方向との画素14aの整列順に、X方向とY方向とのピクセル値を定めて特定している。この、ピクセル値(xn,yn)は、図5(a)に示すように、第1の輝度重心値となる明点Paを検知する画素14aと、該画素14aの周囲の画素14aとの合計四つで、それぞれ画素(1,2)、画素(2,2)、画素(1,3)、画素(2,3)となる。
 補正輝度をLmは、各画素14aが検知された輝度値をΣL(<x>,<y>)とし、検知した画素14aの中心位置と第1の輝度重心値(Xg,Yg)との差となる距離をX,Y方向にそれぞれΔx、Δyとすれば下記(3)式が成立する。
 
 Lm(Xg,Yg)=ΣL(<x>,<y>)(Δx,Δy)  ・・・・(3)
 ここに、<x>:X方向のピクセル値、 <y>:Y方向のピクセル値
 また、Δx,Δyは、下記(4),(5)式となる。
     Δx=Xg-<x>  ・・・・(4)
     Δy=Yg-<y> ・・・・(5)
The identification number for specifying each pixel 14a in the image sensor 14 is specified by determining the pixel values in the X direction and the Y direction in the order of alignment of the pixels 14a in the X direction and the Y direction. As shown in FIG. 5A, the pixel value (xn, yn) is the sum of the pixel 14a that detects the bright point Pa, which is the first luminance centroid value, and the pixels 14a around the pixel 14a. The four are pixel (1, 2), pixel (2, 2), pixel (1, 3), and pixel (2, 3), respectively.
The correction luminance is Lm, the luminance value at which each pixel 14a is detected is ΣL (<x>, <y>), and the difference between the detected center position of the pixel 14a and the first luminance centroid value (Xg, Yg). Is set to Δx and Δy in the X and Y directions, respectively, the following equation (3) is established.

Lm (Xg, Yg) = ΣL (<x>, <y>) (Δx, Δy) (3)
Here, <x>: Pixel value in the X direction, <y>: Pixel value in the Y direction Further, Δx and Δy are expressed by the following equations (4) and (5).
Δx = Xg− <x> (4)
Δy = Yg− <y> (5)
 そして、第1の輝度重心値を有する画素14aと、該画素14aの周囲の画素14aとが検知した輝度が第1の輝度重心に影響を与えることにより、第1の輝度重心が有する輝度は、各画素14aの中心値と第1の輝度重心値との上記距離Δx,Δyのモデル関数としてガウス分布で影響を受けるとする。そうするとf(Δx,Δy)は、下記(6)式となる。
Figure JPOXMLDOC01-appb-M000001
・・・・(6)
The luminance detected by the pixel 14a having the first luminance centroid value and the pixels 14a around the pixel 14a affects the first luminance centroid, so that the luminance of the first luminance centroid is It is assumed that the model function of the distances Δx and Δy between the center value of each pixel 14a and the first luminance centroid value is affected by a Gaussian distribution. Then, f (Δx, Δy) becomes the following equation (6).
Figure JPOXMLDOC01-appb-M000001
.... (6)
 したがって、第1の輝度補正値Lm(x,y)は、検知された輝度値をΣL(<x>,<y>)と、第1の輝度重心値から各画素14aの中心値までの距離を求め、該距離のガウス分布により各画素14aが検知した輝度を補正することにより、第1の輝度重心値が有する輝度を求めることができる。
 ここで、上記モデル関数としては、ガウス分布に限定されず、例えば、第1の輝度重心との上記距離Δx,Δyに反比例させても良い。
 なお、上記では第1の輝度重心値を含む四つの画素14aとしたが、第1の輝度重心値を含む3×3画素14a又は、5×5画素14aとしても良い。すなわち、第1の輝度補正値を求めるための画素14aの数は、画素14aの分解能、被対象物5の性質などから決定することになる。
Therefore, the first luminance correction value Lm (x, y) is the detected luminance value ΣL (<x>, <y>) and the distance from the first luminance centroid value to the center value of each pixel 14a. And the luminance of the first luminance centroid value can be obtained by correcting the luminance detected by each pixel 14a by the Gaussian distribution of the distance.
Here, the model function is not limited to the Gaussian distribution, and may be inversely proportional to the distances Δx and Δy with respect to the first luminance center of gravity, for example.
In the above description, the four pixels 14a including the first luminance centroid value are used. However, 3 × 3 pixels 14a or 5 × 5 pixels 14a including the first luminance centroid value may be used. That is, the number of pixels 14a for obtaining the first luminance correction value is determined from the resolution of the pixels 14a, the nature of the object 5 and the like.
<輝度補正の具体例>
 いま、図5(b)に示すように、第1の輝度重心Pa(1.5,2.7)とすると、第1の輝度重心Paにおける輝度は、第1の輝度重心を有する画素14aを含む四つの画素14aが検知した輝度から以下のようにして補正する。
 ΣL(<x>,<y>)=L(1,2)f(0.5,07)+L(2,2)f(0.5,07)
          +L(1,3)f(0.5,03)+L(3,2)f(0.5,03)
 画素(1,2)、画素(2,2)、画素(1,3)、画素(3,2)が検知した輝度をそれぞれ100、90、90、100とするとf(Δx,Δy)は下記となる。
 Lm=ΣL(<x>,<y>)f(Δx,Δy)
  =100e-0.74/2σ2+90e-0.74/2σ2+90e-0.74/2σ2+100e-0.74/2σ2
 ここで、σ=0.5とすると、輝度補正値Lmは、下記となる。
 Lm=100e-0.74/0.5+90e-0.74/0.5+90e-0.74/0.5+100e-0.74/0.5
 Lm=2×100×0.228+2×90×0.228=86.6
 このようにして、各第1の輝度重心値が有する第1の輝度補正値を求めることにより図6に示す○印のプロットした特性曲線が得られる。この特性曲線によれば、×印の特性曲線では、V形状になっていたものが、略山状の特性曲線となり、輝度特性が改善されている。
<Specific example of brightness correction>
Now, as shown in FIG. 5B, assuming that the first luminance centroid Pa (1.5, 2.7), the luminance at the first luminance centroid Pa is the pixel 14a having the first luminance centroid Pa. Correction is performed as follows from the luminance detected by the four pixels 14a included.
ΣL (<x>, <y>) = L (1,2) f (0.5,07) + L (2,2) f (0.5,07)
+ L (1,3) f (0.5,03) + L (3,2) f (0.5,03)
If the luminance detected by the pixel (1, 2), the pixel (2, 2), the pixel (1, 3), and the pixel (3, 2) is 100, 90, 90, 100, respectively, f (Δx, Δy) is It becomes.
Lm = ΣL (<x>, <y>) f (Δx, Δy)
= 100e- 0.74 / 2σ2 + 90e- 0.74 / 2σ2 + 90e- 0.74 / 2σ2 + 100e- 0.74 / 2σ2
Here, assuming that σ = 0.5, the luminance correction value Lm is as follows.
Lm = 100e- 0.74 / 0.5 + 90e- 0.74 / 0.5 + 90e- 0.74 / 0.5 + 100e- 0.74 / 0.5
Lm = 2 × 100 × 0.228 + 2 × 90 × 0.228 = 86.6
In this way, by obtaining the first brightness correction value possessed by each of the first brightness centroid values, the characteristic curve plotted with a circle shown in FIG. 6 is obtained. According to this characteristic curve, the V-shaped characteristic curve becomes a substantially mountain-shaped characteristic curve, and the luminance characteristic is improved.
 第1の三次元検出部43は、撮像素子14との距離Z1,Z2・・・Znにおいて撮像した各画像ファイルG1,G2・・Gnそれぞれから各明点付近の輝度から上記のようにして輝度補正値を求める。そして、図6に示すように、金属粒子5hの距離との関係で輝度補正値を記憶しておいて、輝度補正値に基づいて金属粒子5hとの距離値を検知すると共に、最も高い輝度となる第1の輝度補正値を求めた輝度重心値からX,Y座標上の金属粒子5hの位置を検知する。 The first three-dimensional detection unit 43 calculates the luminance from the luminance near each bright point from each of the image files G1, G2,... Gn captured at the distances Z1, Z2,. Find the correction value. Then, as shown in FIG. 6, the brightness correction value is stored in relation to the distance of the metal particle 5h, the distance value with the metal particle 5h is detected based on the brightness correction value, and the highest brightness is obtained. The position of the metal particle 5h on the X and Y coordinates is detected from the luminance centroid value obtained from the first luminance correction value.
 なお、上記第1の検出部43は、最も高い輝度となる第1の輝度補正値に対応する輝度重心値からX,Y座標上の金属粒子5hの位置も検知するが、以下のようにしても良い。すなわち、撮像系10と金属粒子5hと距離Z1、Z2・・・Zn毎により求めた多数の輝度の重心値を例えば二次関数により補間して、距離と輝度重心の補間値を求めて記憶しておいて、輝度補正値に基づいて金属粒子5hとの距離値を検知して、該距離値に対応する輝度重心値に基づいてX,Y座標上の金属粒子5hの位置を検知しても良い。
 このように、輝度補正値は、金属粒子5hの距離検知のみではなく、金属粒子5hの位置を検出する輝度重心値の選択にも影響を与える。これにより、金属粒子5hの距離を求めた輝度補正値に基づいた輝度重心値を選択して、該輝度重心値に基づいて金属粒子5hの位置検知精度も向上する。
The first detection unit 43 also detects the position of the metal particle 5h on the X and Y coordinates from the luminance centroid value corresponding to the first luminance correction value having the highest luminance. Also good. That is, by interpolating, for example, a quadratic function, the luminance centroid values obtained by the imaging system 10, the metal particles 5h, and the distances Z1, Z2,. In this case, the distance value to the metal particle 5h is detected based on the brightness correction value, and the position of the metal particle 5h on the X and Y coordinates is detected based on the brightness centroid value corresponding to the distance value. good.
Thus, the luminance correction value affects not only the distance detection of the metal particles 5h but also the selection of the luminance centroid value for detecting the position of the metal particles 5h. Thereby, the luminance centroid value based on the luminance correction value obtained from the distance of the metal particle 5h is selected, and the position detection accuracy of the metal particle 5h is also improved based on the luminance centroid value.
 上記のように構成された三次元計測装置の全体動作を図1から図7を参照し、被対象物として樹脂板5に設けられた六つの金属粒子5hの三次元計測について説明する。
 まず、撮像系駆動部65からの位置指令信号により、駆動機構60を動作し、撮像系10をZ軸方向に下降して、撮像系10の高さZ1,Z2・・・Zn毎に画像ファイルG1,G2,・・・Gnを図2(a)に示すように、読み込み画素単位U1毎に輝度を記憶し(ステップS100)、明点抽出部32はこの画像ファイルG1,G2,・・・Gnから六つの金属粒子5hの頂点を明点P1,P2・・・P6として抽出して画素単位U1で位置及び輝度を検知する(ステップS200)。
The overall operation of the three-dimensional measuring apparatus configured as described above will be described with reference to FIGS. 1 to 7 for the three-dimensional measurement of the six metal particles 5h provided on the resin plate 5 as the object.
First, in response to a position command signal from the imaging system driving unit 65, the drive mechanism 60 is operated, the imaging system 10 is lowered in the Z-axis direction, and an image file for each of the heights Z1, Z2,. As shown in FIG. 2A, G1, G2,... Gn store the luminance for each read pixel unit U1 (step S100), and the bright spot extracting unit 32 stores the image files G1, G2,. The vertices of the six metal particles 5h are extracted from Gn as bright points P1, P2,... P6, and the position and luminance are detected in pixel unit U1 (step S200).
 第1の輝度重心の演算部36は、撮像系10の高さZ1,Z2・・・Zn毎において、一定領域A1の輝度分布から各々の輝度重心(Xg1,Yg1),(Xg2,Yg2)・・・(Xgn,Ygn)を求める(ステップS400)。輝度の補正部38は、撮像系10の高さZ1,Z2・・・Zn毎において、例えば上記のようにガウス分布を用いて第1の輝度重心値が有する輝度の補正値を得る(ステップS500)。第1の三次元検知部43は、輝度の補正値に基づいて金属粒子5hの距離を測定すると共に、第1の輝度重心値に基づいて金属粒子5hのXY平面状の位置を検知する(ステップS700)。
 なお、他の明点P2・・・P6も一定領域A2・・A6に対応して、上記のように明点P1と同様にして金属粒子5hの距離及び位置を検知する。
The first luminance centroid operation unit 36 calculates the luminance centroids (Xg1, Yg1), (Xg2, Yg2),... From the luminance distribution of the fixed area A1 for each of the heights Z1, Z2,. .. (Xgn, Ygn) is obtained (step S400). The brightness correction unit 38 obtains the brightness correction value of the first brightness centroid value for each height Z1, Z2,... Zn of the imaging system 10 using, for example, a Gaussian distribution as described above (step S500). ). The first three-dimensional detection unit 43 measures the distance of the metal particles 5h based on the luminance correction value, and detects the XY planar position of the metal particles 5h based on the first luminance centroid value (step) S700).
The other bright points P2... P6 also correspond to the fixed areas A2,... A6 and detect the distance and position of the metal particles 5h in the same manner as the bright point P1 as described above.
 上記のように構成された三次元計測装置の各工程における動作を図1から図10を参照して説明する。
 上記金属粒子5hの明点抽出工程S200では、明点抽出部32は撮像系10の高さZ1,Z2・・・Zn毎に撮像した各画像ファイルG1,G2,・・・Gnにおいて、図2及び図8に示すように、六つの金属粒子5hの頂点を明点P1,P2・・・P6として抽出し、明点P1の輝度と予め定められた輝度の閾値と比較して明点P1の輝度が閾値以上か否かを判断し(ステップS201)、閾値以上であれば、明点P1を中央として明点P1の輝度が一定領域A1内の周辺輝度以上であることを検出し(ステップS203)、一定領域A1内の輝度の最大値と最小値とを取得して該輝度の最大値と最小値との差からコントラストを求める(ステップS205)。
 明点抽出部32は、コントラストが予め定められた閾値以上であることを判断し(ステップS207)、各画像ファイルG1,G2・・・Gnにおける金属粒子5hのX,Y座標の金属粒子5hを画素単位U1で検知して該金属粒子5hの位置を上記高さZ1,Z2・・・Znと関係付けて記憶する(ステップS209)。
 なお、他の明点P2・・・P6も、各明点P1と同様にして金属粒子5hを画素単位U1で検知する。
The operation of each step of the three-dimensional measuring apparatus configured as described above will be described with reference to FIGS.
In the bright spot extraction step S200 of the metal particles 5h, the bright spot extraction unit 32 uses the image files G1, G2,... Gn captured for the heights Z1, Z2,. As shown in FIG. 8, the vertices of the six metal particles 5h are extracted as bright points P1, P2,... P6, and the brightness of the bright point P1 is compared with the brightness of the bright point P1 and a predetermined brightness threshold. It is determined whether or not the luminance is equal to or higher than the threshold value (step S201). If the luminance is equal to or higher than the threshold value, it is detected that the luminance of the bright point P1 is equal to or higher than the peripheral luminance in the fixed area A1 with the bright point P1 as the center. ), The maximum value and the minimum value of the luminance in the fixed area A1 are acquired, and the contrast is obtained from the difference between the maximum value and the minimum value of the luminance (step S205).
The bright spot extraction unit 32 determines that the contrast is equal to or higher than a predetermined threshold (step S207), and determines the X and Y coordinate metal particles 5h of the metal particles 5h in the image files G1, G2,. Detected by the pixel unit U1, the position of the metal particle 5h is stored in association with the heights Z1, Z2,... Zn (step S209).
Note that the other bright points P2 to P6 also detect the metal particles 5h in pixel units U1 in the same manner as the bright points P1.
 上記輝度重心の演算工程S400では、図9に示すように、第1の輝度重心の演算部36は、ステップS100において検知した各画像ファイルG1,G2,・・・Gnにおける各画素14aの輝度値を読み出し(ステップS401)、明点P1の一定領域A1内で、X座標における輝度重心値Xgをそれぞれ上記(1)式により求め、撮像系10の高さZ1,Z2・・・Znと対応して、輝度重心値Xgを記憶し(ステップS403)、明点P1の一定領域A1内で、Y座標における輝度重心値Ygを上記(2)式によりそれぞれ求めて記憶する(ステップS405)。
 また、他の明点P2・・P6も上記と同様に輝度重心値を求め撮像系10の高さZ1,Z2・・・Znと対応して第1の輝度重心値を記憶する。
In the luminance center-of-gravity calculation step S400, as shown in FIG. 9, the first luminance center-of-gravity calculation unit 36 determines the luminance value of each pixel 14a in each image file G1, G2,... Gn detected in step S100. (Step S401), the luminance barycentric value Xg at the X coordinate is obtained by the above equation (1) within the constant area A1 of the bright point P1, and corresponds to the heights Z1, Z2,. Then, the luminance centroid value Xg is stored (step S403), and the luminance centroid value Yg at the Y coordinate is obtained by the above equation (2) and stored in the constant area A1 of the bright point P1 (step S405).
Also, the other bright points P2,..., P6 obtain the luminance centroid values in the same manner as described above, and store the first luminance centroid values corresponding to the heights Z1, Z2,.
 上記輝度の補正工程S500では、図10に示すように、輝度の補正部38は、ステップS100において検知した明点P1を含む一定領域として5×5画素領域A1の各画素14aの輝度値を読み出し(ステップS501)、上記ステップS403,S405において求めた第1の輝度重心値(Xg1,Yg1)を中心に新たな一定領域A1´の輝度分布を求める(ステップS503)。ここで、新たな一定領域A1´としたのは、輝度重心値によっては、ステップS501と異なる一定領域のこともあるからである。
 なお、ステップ503における一定領域A1´は、上記ステップS501と同一の一定領域A1のこともある。
 上記ステップS503において求めた輝度分布を用いて、新たな輝度重心値(Xg1,Yg1)から輝度補正値を上記(3)~(6)式により求め、撮像系10の高さZ1,Z2・・・Znと対応して輝度補正値を記憶する(ステップS505)。
 また、他の明点P2・・P6も上記と同様に輝度補正値を求め撮像系10の高さZ1,Z2・・・Znと対応して輝度補正値を記憶する。
In the luminance correction step S500, as shown in FIG. 10, the luminance correction unit 38 reads the luminance value of each pixel 14a in the 5 × 5 pixel area A1 as a fixed area including the bright point P1 detected in step S100. (Step S501), the luminance distribution of a new constant region A1 ′ is obtained centering on the first luminance centroid value (Xg1, Yg1) obtained in Steps S403 and S405 (Step S503). Here, the reason why the new constant area A1 ′ is used is that there may be a constant area different from that in step S501 depending on the luminance centroid value.
Note that the constant area A1 ′ in step 503 may be the same constant area A1 as in step S501.
Using the luminance distribution obtained in step S503, a luminance correction value is obtained from the new luminance centroid values (Xg1, Yg1) by the above formulas (3) to (6), and the height Z1, Z2,. A brightness correction value is stored in association with Zn (step S505).
Further, the brightness correction values of other bright points P2... P6 are obtained in the same manner as described above, and the brightness correction values are stored in correspondence with the heights Z1, Z2,.
 第1の三次元検知部43は、明点P1による第1の輝度補正値に基づいて、すなわち、第1の輝度補正が最も高い輝度から金属粒子5hの距離を測定すると共に、最も高い輝度となる第1の輝度補正値を求めた第1の輝度重心値から一つの金属粒子5hのXY平面上の位置を検知する(ステップS700)。
 また、他の明点P2・・P6も上記と同様に金属粒子5hの距離及び位置を検知する。
 これにより、複数の金属粒子5hの距離及びXY平面での位置を正確に検知できる。しかも、検知された輝度が画素単位U1で標本化されていても、正確な明点の位置を検知できる。
The first three-dimensional detection unit 43 measures the distance of the metal particle 5h from the highest luminance by the first luminance correction based on the first luminance correction value by the bright point P1, and the highest luminance. The position of one metal particle 5h on the XY plane is detected from the first luminance centroid value obtained from the first luminance correction value (step S700).
Further, the other bright points P2,... P6 also detect the distance and position of the metal particles 5h in the same manner as described above.
Thereby, the distance of the plurality of metal particles 5h and the position on the XY plane can be accurately detected. Moreover, even if the detected luminance is sampled in the pixel unit U1, it is possible to detect the exact bright spot position.
 上記のように構成された三次元計測装置1は、金属粒子5hを画素14aを有する撮像素子14を用いて撮像する撮像系10と、金属粒子5hと撮像系10との異なる距離毎に撮像素子14により撮像された各画像G1,G2・・・G6の明点P1(P2・・・P6)を検出する明点抽出部32と、画像の各明点を中心とした一定領域ごとの輝度を検知し、該一定領域内のX軸,Y軸ごとの輝度分布を求めると共に、該輝度分布に基づいて輝度重心値を求める第1の輝度重心の演算部36と、輝度重心値が検知された画素14aと、該画素14aの周囲の画素14aとから検知した輝度を、各画素14aの中心値と輝度重心値との距離に基づいて、輝度重心値が有する輝度を輝度の補正値として得る輝度の補正部38と、輝度補正値に基づいて金属粒子5hとの距離を求めると共に、距離を求めた輝度補正値に基づいた輝度重心値により金属粒子5hのXY面上の位置を求める第1の三次元検知部43と、を備えたものである。 The three-dimensional measuring device 1 configured as described above includes an imaging system 10 that images the metal particles 5h using the imaging device 14 having the pixels 14a, and an imaging element for each different distance between the metal particles 5h and the imaging system 10. 14, the bright point extraction unit 32 that detects the bright point P 1 (P 2... P 6) of each of the images G 1, G 2,. Detecting the luminance distribution for each of the X axis and Y axis in the fixed region and calculating the luminance centroid value based on the luminance distribution, and the luminance centroid value detected. The brightness obtained from the brightness detected from the pixel 14a and the surrounding pixels 14a based on the distance between the center value of each pixel 14a and the brightness centroid value as a brightness correction value Correction unit 38 and the luminance correction value A first three-dimensional detection unit 43 that obtains the distance from the metal particle 5h and obtains the position of the metal particle 5h on the XY plane based on the brightness centroid value based on the brightness correction value obtained from the distance. It is.
 かかる三次元計測装置1によれば、明点抽出部32が被対象物5と撮像系10との異なる距離毎に撮像系10により撮像された各画像G1,G2・・・G6の明点P1(P2・・・P6)を検出し、第1の輝度重心演算部36が画像の明点を中心とした一定領域A1(A2・・A6)ごとの輝度を検知し、該一定領域内のX軸,Y軸ごとの第1の輝度分布を求めると共に、第1の輝度分布に基づいて輝度重心値を求めるので、第1の輝度分布に応じて一定領域内の明点の位置を正確に検知できる。
 また、輝度重心の演算部36は、一定領域ごとの画素14aに限定して輝度重心値を求めているので、処理が高速化される。
According to the three-dimensional measuring apparatus 1, the bright point extraction unit 32 performs the bright point P1 of each of the images G1, G2,... G6 captured by the imaging system 10 at different distances between the object 5 and the imaging system 10. (P2... P6) is detected, and the first luminance centroid calculating unit 36 detects the luminance for each constant region A1 (A2... A6) centered on the bright point of the image, and X in the constant region is detected. The first luminance distribution for each of the axes and the Y-axis is obtained, and the luminance centroid value is obtained based on the first luminance distribution, so that the position of the bright spot in the fixed area is accurately detected according to the first luminance distribution. it can.
In addition, the luminance centroid calculating unit 36 obtains the luminance centroid value by limiting to the pixels 14a for each fixed region, so that the processing speed is increased.
 さらに、三次元計測装置1は、輝度重心値に基づいて一定領域A1(A2・・A6)を設定して、該一定領域において各画素14aが検知した輝度から輝度重心値が有する輝度を、輝度補正値として求める輝度の補正部38を備え、三次元検知部43は、輝度の補正値に基づいて金属粒子5hとの距離値を求めると共に、距離を求めた輝度補正値に基づいた輝度重心値により金属粒子5hのXY面上の位置を求める。これにより、輝度重心を含む画素14aと、周囲の画素14aとが有する輝度に基づいて輝度重心が有する輝度を、輝度補正値として求め、この輝度補正値により金属粒子5hとの距離を検知する。したがって、三次元計測装置1は、撮像素子14の一画素14aにおいて、金属粒子5hの光の反射に基づいて検知した明点(金属粒子5h)の検知位置がずれても、金属粒子5hの距離を精度良く検知できる。
 さらに、距離を求めた輝度補正値に基づいた輝度重心値により金属粒子5hのXY面上の位置を求めるので、明点P1(P2・・・P6)周囲の輝度ボケを考慮しながら、距離を検知した点における(合焦点における)金属粒子5hのXY面上における位置を検知できる。したがって、距離を求め点における金属粒子5hの位置を正確に検知できると共に、画素単位U1で輝度を一定値とみなす標本化の影響を受けずに金属粒子5hの位置を検知できる。
Further, the three-dimensional measurement apparatus 1 sets a constant area A1 (A2... A6) based on the luminance centroid value, and determines the luminance of the luminance centroid value from the luminance detected by each pixel 14a in the predetermined area. A luminance correction unit 38 to be obtained as a correction value is provided, and the three-dimensional detection unit 43 obtains a distance value from the metal particle 5h based on the luminance correction value, and a luminance centroid value based on the luminance correction value obtained from the distance. To obtain the position of the metal particle 5h on the XY plane. Thereby, the luminance of the luminance centroid is obtained as a luminance correction value based on the luminance of the pixel 14a including the luminance centroid and the surrounding pixels 14a, and the distance from the metal particle 5h is detected based on the luminance correction value. Therefore, even if the detection position of the bright point (metal particle 5h) detected based on the reflection of the light of the metal particle 5h in the pixel 14a of the image sensor 14 is shifted in the one-dimensional image sensor 14a, the three-dimensional measuring device 1 is the distance of the metal particle 5h. Can be detected accurately.
Furthermore, since the position on the XY plane of the metal particle 5h is obtained from the luminance centroid value based on the luminance correction value for which the distance is obtained, the distance is determined while taking into account the luminance blur around the bright point P1 (P2... P6). The position on the XY plane of the metal particle 5h (at the focal point) at the detected point can be detected. Therefore, the position of the metal particle 5h at the point can be accurately detected, and the position of the metal particle 5h can be detected without being affected by sampling in which the luminance is regarded as a constant value in the pixel unit U1.
 上記実施の形態の三次元計測方法は、被対象物5と撮像系10との異なる距離毎に撮像系10により撮像された各画像G1,G2・・・Gnの明点P1(P2・・・Pn)を検出した後、画像G1,G2・・・Gnの明点P1(P2・・・Pn)を中心とした一定領域A1(A2・・An)ごとの輝度を検知し、該一定領域内のX軸,Y軸ごとの輝度分布を求めると共に、第1の輝度分布に基づいて輝度重心値を求める。その後、輝度重心値が検知された画素14aと、該画素14aの周囲の画素14aとから検知した輝度を、輝度重心値が有する輝度に補正した輝度の補正値を得た後、該輝度の補正値に基づいて金属粒子5hとの距離値を求めると共に、距離を求めた輝度補正値に基づいた輝度重心値に基づいて金属粒子5hのX,Y上の位置を検知する。
 これにより、輝度重心値に基づいて金属粒子5hのXY平面の位置を正確に測定できると共に、輝度重心を有する画素14aと、該画素14aの周囲の画素14aから検知した輝度を、輝度重心が有する輝度としての輝度補正値を求め、この輝度補正値により金属粒子5hとの距離を検知する。したがって、三次元計測方法は、撮像素子14の一画素14aにおいて、金属粒子5hの光の反射に基づいて検知した明点(金属粒子5h)の検知位置がずれても、金属粒子5hの距離を精度良く検知できる。
In the three-dimensional measurement method of the above embodiment, the bright points P1 (P2...) Of the images G1, G2,... Gn captured by the imaging system 10 at different distances between the object 5 and the imaging system 10. After detecting Pn), the brightness of each fixed area A1 (A2... An) centered on the bright point P1 (P2... Pn) of the images G1, G2. The luminance distribution for each of the X-axis and Y-axis is obtained, and the luminance centroid value is obtained based on the first luminance distribution. Then, after obtaining the luminance correction value obtained by correcting the luminance detected from the pixel 14a in which the luminance centroid value is detected and the pixels 14a around the pixel 14a to the luminance of the luminance centroid value, the correction of the luminance is performed. Based on the value, the distance value with respect to the metal particle 5h is obtained, and the position on the X and Y of the metal particle 5h is detected based on the luminance centroid value based on the luminance correction value obtained from the distance.
Thereby, the position of the metal particle 5h on the XY plane can be accurately measured based on the luminance centroid value, and the luminance centroid has the luminance detected from the pixel 14a having the luminance centroid and the pixels 14a around the pixel 14a. A brightness correction value as brightness is obtained, and the distance from the metal particle 5h is detected based on the brightness correction value. Therefore, in the three-dimensional measurement method, even if the detection position of the bright spot (metal particle 5h) detected based on the reflection of the light of the metal particle 5h is shifted in one pixel 14a of the image sensor 14, the distance of the metal particle 5h is changed. It can be detected with high accuracy.
実施の形態2.
 本発明の他の実施の形態となる三次元計測装置を図11によって説明する。図11は他の実施の形態となる三次元計測装置の全体図で、図11中、図1と同一符号は、同一部分を示し、その説明を省略する。
 図11において、第2の三次元計測装置101における第2の三次元検出器130は、マイクロコンピュータから成り、周知のインターフェイス、CPU、RAM、ROMを有しており、明点P1を有する画像から輝度オフセットを検知する輝度オフセットの検知部34と、明点P1を有する一定領域の輝度分布から輝度オフセットを差引いた新たな輝度分布を求め、該輝度分布から第2の輝度重心値を求める第2の輝度重心の演算部136と、該第2の輝度重心値に基づいて第2の輝度補正値を得る第2の輝度補正部138と、撮像系10の高さZ1,Z2・・・Zn毎に求めた多数の第2の輝度補正値を関数により連続した輝度補間値とする輝度の補間部41と、輝度補間値から金属粒子5hとの距離を求めると共に、該距離に対応した第2の輝度重心値に基づいて金属粒子5hのXY平面の位置を検知する第2の三次元検知部143とを備えている。
Embodiment 2. FIG.
A three-dimensional measuring apparatus according to another embodiment of the present invention will be described with reference to FIG. FIG. 11 is an overall view of a three-dimensional measuring apparatus according to another embodiment. In FIG. 11, the same reference numerals as those in FIG. 1 denote the same parts, and the description thereof is omitted.
In FIG. 11, the second three-dimensional detector 130 in the second three-dimensional measuring apparatus 101 is composed of a microcomputer, has a well-known interface, CPU, RAM, and ROM, and from an image having a bright point P1. A luminance offset detector 34 for detecting a luminance offset, a second luminance distribution obtained by subtracting the luminance offset from the luminance distribution of a certain area having the bright point P1, and a second luminance centroid value from the luminance distribution. Brightness center of gravity calculation unit 136, second brightness correction unit 138 that obtains a second brightness correction value based on the second brightness center of gravity value, and heights Z1, Z2,... The luminance interpolator 41 that uses a number of second luminance correction values obtained in the above as continuous luminance interpolation values by a function and the distance between the metal particles 5h from the luminance interpolation values and corresponding to the distance And a second three-dimensional detection unit 143 for detecting the position of the XY plane of the metal particles 5h based on 2 luminance centroid value.
 三次元計測装置1の各部の構成を図11から図14を参照しつつ説明する。明点抽出部32は上記実施の形態1と同一であるため、その説明を省略する。
 輝度オフセットの検知部34は、点状の各明点P1・・・・P6を含む一定の領域の各画像G1,G2・・Gnにおいて、最小輝度値をとなる輝度オフセットを検知している。
 ここで、輝度オフセットが生じるのは、他の金属粒子5hなどからの乱反射光などを撮像素子14の画素14aが検知するためである。
The configuration of each part of the three-dimensional measuring apparatus 1 will be described with reference to FIGS. Since the bright spot extraction unit 32 is the same as that in the first embodiment, the description thereof is omitted.
The luminance offset detection unit 34 detects a luminance offset that achieves a minimum luminance value in each of the images G1, G2,... Gn in a certain region including each of the dot-like bright points P1,.
Here, the luminance offset is generated because the pixel 14a of the image sensor 14 detects irregularly reflected light from other metal particles 5h and the like.
 第2の輝度重心の演算部136は、明点を有する5×5画素14aから成る一定領域A1内の画像から検知した第1の輝度分布値から輝度オフセットを除去(差引いた)した第2の輝度分布を求めた後、明点P1を有する一定領域A1における第2の輝度重心値(Xgo,Ygo)を下記(7)及び(8)式により求めている。
 輝度オフセットを除去するのは、図12に示すように、金属粒子5hの反射光による輝度変化のみの輝度変化値(輝度分布)Ldを得て、この輝度変化値から第2の輝度重心値を求め、第2の輝度重心値に基づいて金属粒子5hの位置を正確に検知するためである。図13に示すように、点線の第1の輝度分布(検知した輝度)から実線の第2の輝度分布(輝度変化値)となり、正確な金属粒子5hの頂点の位置を求めることができる。
 なお、輝度オフセットは最小輝度値に設定することが好ましいが、一定の領域における最小輝度値よりも高い一定輝度値でも良い。
 
 Xgo=ΣX(L-Lo)/Σ(L-Lo)・・・・(7)
 Ygo=ΣY(L-Lo)/Σ(L-Lo)・・・・(8)
 ここで、L:検知された輝度  Lo:輝度オフセット
The second luminance center-of-gravity calculating unit 136 removes (subtracts) the luminance offset from the first luminance distribution value detected from the image in the fixed area A1 made up of 5 × 5 pixels 14a having a bright point. After obtaining the luminance distribution, the second luminance centroid value (Xgo, Ygo) in the constant area A1 having the bright point P1 is obtained by the following equations (7) and (8).
As shown in FIG. 12, the luminance offset is removed by obtaining the luminance change value (luminance distribution) Ld of only the luminance change due to the reflected light of the metal particles 5h, and obtaining the second luminance centroid value from this luminance change value. This is because the position of the metal particle 5h is accurately detected based on the second luminance centroid value. As shown in FIG. 13, the first luminance distribution (detected luminance) indicated by the dotted line is changed to the second luminance distribution (luminance change value) indicated by the solid line, and an accurate vertex position of the metal particle 5 h can be obtained.
The luminance offset is preferably set to the minimum luminance value, but may be a constant luminance value higher than the minimum luminance value in a certain region.

Xgo = ΣX (L−Lo) / Σ (L−Lo) (7)
Ygo = ΣY (L−Lo) / Σ (L−Lo) (8)
Where L: detected luminance Lo: luminance offset
 第2の輝度重心値を求めるのは、点状の明点P1(P2・・・・P6)の位置を、輝度オフセットを除去した周囲輝度との関係で求めることにより、輝度のボケの影響を受けずに、さらに、他の金属粒子5hなどからの乱反射光などの影響を受けずに、金属粒子5hの位置を正確に検出するためである。 The second luminance centroid value is obtained by calculating the position of the point-like bright point P1 (P2... P6) in relation to the ambient luminance from which the luminance offset is removed, thereby reducing the influence of luminance blur. This is because the position of the metal particle 5h is accurately detected without being affected by the influence of irregular reflection light from the other metal particle 5h.
 第2の輝度の補正部38は、第2の輝度重心値を有する画素14aと、該画素14aが検知した輝度と該画素14aの周囲の画素14aとが検知した輝度と、各画素14aの中心値と第2の輝度重心値との上記距離Δx,Δyのモデル関数として検知した輝度がガウス分布で影響を受けるとして、上記(3)から(6)式により、第2の輝度重心値が有する輝度を求めるように形成されている。
 このようにして求めた第2の輝度重心値が有する輝度を、輝度の補正値として表示すると図14に示す○印の特性曲線のようになる。
The second luminance correction unit 38 includes the pixel 14a having the second luminance centroid value, the luminance detected by the pixel 14a, the luminance detected by the pixels 14a around the pixel 14a, and the center of each pixel 14a. Assuming that the luminance detected as a model function of the distances Δx and Δy between the value and the second luminance centroid value is affected by the Gaussian distribution, the second luminance centroid value has the following expression (3) to (6). It is formed so as to obtain luminance.
When the luminance of the second luminance centroid value obtained in this way is displayed as a luminance correction value, a characteristic curve indicated by a circle shown in FIG. 14 is obtained.
 輝度の補間部41は、輝度の補正値を用いて最大輝度値を取得して最大輝度値を中心に撮像系の高さとして±Z内における輝度補正値を得ると共に、図14の実線により示すように、該輝度補正値を例えば二次関数により補間した輝度の連続補間値を得ている。
 輝度を補間することにより撮像系10と金属粒子5hとの異なる距離毎に求めた各各輝度の補正値との整合を得る。また、輝度を連続補間することにより輝度の補間値の連続性を得て、金属粒子5hとの距離の検出精度を向上できる。
The luminance interpolation unit 41 obtains the maximum luminance value using the luminance correction value, obtains the luminance correction value within ± Z as the height of the imaging system around the maximum luminance value, and is indicated by a solid line in FIG. Thus, a continuous interpolation value of brightness obtained by interpolating the brightness correction value by a quadratic function is obtained.
By interpolating the luminance, matching with each luminance correction value obtained for each different distance between the imaging system 10 and the metal particle 5h is obtained. In addition, by continuously interpolating the luminance, the continuity of the interpolation value of the luminance can be obtained, and the detection accuracy of the distance from the metal particle 5h can be improved.
 第2の距離検出部143は、図14に示すように輝度の連続補間値と対象物としての金属粒子5hとの距離値との特性曲線を利用して金属粒子5hと撮像系10との距離を検知すると共に、検知した距離値に対応する第2の輝度重心値に基づいて金属粒子5hのX,Y座標の位置も検知する。 As shown in FIG. 14, the second distance detection unit 143 uses the characteristic curve of the luminance continuous interpolation value and the distance value between the metal particles 5h as the object and the distance between the metal particles 5h and the imaging system 10. And the positions of the X and Y coordinates of the metal particle 5h are also detected based on the second luminance centroid value corresponding to the detected distance value.
 上記のように構成された三次元計測装置の全体動作を図11及び図15を参照して説明する。まず、撮像系駆動部65からの位置指令信号により、駆動機構60を動作し、撮像系10をZ軸方向に下降して、撮像系10の高さZ1,Z2・・・Zn毎に画像ファイルを図2(a)に示すように、読み込み(ステップS100)、明点抽出部32はこの画像ファイルから金属粒子5hの頂点としての明点P1を画素単位U1で位置及び輝度を検知する(ステップS200)。輝度オフセットの検知部34は、明点P1を中心とした一定領域A1から輝度オフセットを検知する(ステップS300)。 The overall operation of the three-dimensional measuring apparatus configured as described above will be described with reference to FIGS. First, in response to a position command signal from the imaging system driving unit 65, the drive mechanism 60 is operated, the imaging system 10 is lowered in the Z-axis direction, and an image file for each of the heights Z1, Z2,. As shown in FIG. 2A, the light spot extraction unit 32 detects the position and brightness of the light spot P1 as the vertex of the metal particle 5h from the image file in the pixel unit U1 (step S100) (step S100). S200). The luminance offset detector 34 detects the luminance offset from the constant area A1 centered on the bright point P1 (step S300).
 第2の輝度重心の演算部136は、明点P1を中心とした一定領域A1内の輝度重心を求める(ステップS1400)。第2の輝度補正部138は、撮像系10の高さZ1,Z2・・・Zn毎の輝度重心値(Xg1,Yg1),(Xg2,Yg2)・・・(Xgn,Ygn)を用いて、例えばガウス分布を用いて第2の輝度重心値が有する輝度を、輝度の補正値として得る(ステップS1500)。輝度の補間部41は、多数の輝度の補正値を、関数を用いて連続した連続補間値を得る(ステップS600)。第2の三次元検知部143は、一定領域A1における最大輝度値から金属粒子5hの距離を測定すると共に、最大輝度値に対応する第2の輝度重心値から金属粒子5hのXY平面状の位置が検知する(ステップS700)。 The second luminance centroid operation unit 136 obtains the luminance centroid within the constant area A1 with the bright point P1 as the center (step S1400). The second luminance correction unit 138 uses the luminance centroid values (Xg1, Yg1), (Xg2, Yg2),... (Xgn, Ygn) for the heights Z1, Z2,. For example, the luminance of the second luminance centroid value is obtained as a luminance correction value using a Gaussian distribution (step S1500). The luminance interpolation unit 41 obtains a continuous interpolation value by using a plurality of luminance correction values using a function (step S600). The second three-dimensional detection unit 143 measures the distance of the metal particle 5h from the maximum luminance value in the fixed region A1, and also determines the position of the metal particle 5h in the XY plane from the second luminance centroid value corresponding to the maximum luminance value. Is detected (step S700).
 上記のように構成された三次元計測装置の各工程における動作を図11から図18を参照して説明する。
 上記輝度オフセットの検知工程S300では、輝度オフセットの検知部34は、各画像ファイルG1,G2・・・Gnにおいて、図16に示すように、各明点P1・・・P6を中心としたそれぞれの一定領域A1・・・A6内において、各X,Y座標の輝度を検知してから記憶し(ステップS301)、明点P1を中心とする一定領域A1内の最小輝度値を輝度オフセットLoとして設定し記憶し(ステップS303,S305)、上記各X,Y座標の輝度から輝度オフセットLoを除去(差し引き)し、輝度変化値Ldを求める(ステップS307)。
 すなわち、明点P1を中心とした一定領域A1内の輝度オフセットLoを検知してから検知した輝度から輝度オフセットLoを除去した輝度変化値を得る。
 なお、他の明点P2・・・P6も一定領域A2・・A6に対応して、上記のように明点P1と同様にして輝度オフセットLoを除去した輝度変化値を得る。
The operation of each step of the three-dimensional measuring apparatus configured as described above will be described with reference to FIGS.
In the brightness offset detection step S300, the brightness offset detection unit 34 in each of the image files G1, G2,... Gn has respective bright points P1. In the fixed area A1... A6, the brightness of each X, Y coordinate is detected and stored (step S301), and the minimum brightness value in the fixed area A1 centered on the bright point P1 is set as the brightness offset Lo. Then, the luminance offset Lo is removed (subtracted) from the luminance of each of the X and Y coordinates, and the luminance change value Ld is obtained (step S307).
That is, a luminance change value obtained by removing the luminance offset Lo from the detected luminance is obtained after detecting the luminance offset Lo in the constant area A1 centered on the bright point P1.
The other bright points P2... P6 also correspond to the fixed areas A2,... A6, and obtain luminance change values from which the luminance offset Lo has been removed in the same manner as the bright points P1 as described above.
 上記輝度重心の演算工程S1400では、図17に示すように、第2の輝度重心の演算部136は、ステップS100において検知した画素14aの輝度値を読み出し(ステップS1401)、明点P1を含む一定領域A1内で、X座標における第2の輝度重心値Xgoを上記(7)式により求めて記憶し(ステップS1403)、明点P1を含む一定領域A1内で、Y座標における第2の輝度重心値Ygoを求めて記憶する(ステップS1405)。
 輝度重心の演算部136は、上記ステップS1401からS1405を各画像ファイルG1,G2,・・・Gnで実行する。
 これにより、輝度分布から輝度オフセットを差し引いた図13に示す輝度の変化値により第2の輝度重心を求めるので、一定領域における輝度重心値を正確に検知できる。
In the luminance centroid calculation step S1400, as shown in FIG. 17, the second luminance centroid calculation unit 136 reads the luminance value of the pixel 14a detected in step S100 (step S1401), and includes a constant including the bright point P1. Within the area A1, the second luminance centroid value Xgo at the X coordinate is obtained by the above equation (7) and stored (step S1403), and the second luminance centroid at the Y coordinate is obtained within the certain area A1 including the bright point P1. The value Ygo is obtained and stored (step S1405).
The luminance center-of-gravity calculation unit 136 executes steps S1401 to S1405 with the image files G1, G2,... Gn.
Accordingly, the second luminance centroid is obtained from the luminance change value shown in FIG. 13 obtained by subtracting the luminance offset from the luminance distribution, so that the luminance centroid value in a certain region can be accurately detected.
 上記輝度の補正工程S1500では、図10に示すように、輝度の補正部38は、ステップS100において検知した各画素14aの輝度値を読み出し(ステップS501)、ステップS400において求めたX,Y座標における第2の輝度重心を用いて、新たな5×5画素の一定領域を設定してから(ステップS503)、輝度を上記(3)~(6)式によって補正した第2の輝度補正値を求めて記憶する(ステップS505)。 In the luminance correction step S1500, as shown in FIG. 10, the luminance correction unit 38 reads the luminance value of each pixel 14a detected in step S100 (step S501), and uses the X and Y coordinates obtained in step S400. A new fixed area of 5 × 5 pixels is set using the second luminance centroid (step S503), and a second luminance correction value is obtained by correcting the luminance by the above equations (3) to (6). (Step S505).
 上記輝度の補間工程S600では、図18に示すように、金属粒子5hを検知すると(ステップS601)、撮像系10の高さZ1,Z2・・・Znにおける最大輝度値を取得(ステップS603)、最大輝度値が生じるのは、何枚目かを判断して取得し(ステップS605)、最大輝度値を中心にn個の輝度データ値を取得する(ステップS607)。
 ここで、n個の輝度データ値に限定したのは、合焦点から離れた不要なデータの連続補間を省き、高速の処理が可能としている。そして、n個の輝度データ値を二次補間して図14の実線に示すように、連続補間曲線を得る(ステップS609)。第2の三次元検知部143は、輝度の補間値における最大輝度値に基づいて金属粒子5hの距離を検知すると共に、距離を検知した輝度補間値に対応する輝度重心値に基づいて、金属粒子5hのX,Y座標上の金属粒子5hの位置を検知する(ステップS700)。
In the luminance interpolation step S600, as shown in FIG. 18, when the metal particle 5h is detected (step S601), the maximum luminance value at the heights Z1, Z2... Zn of the imaging system 10 is acquired (step S603). The maximum luminance value is determined and acquired (step S605), and n luminance data values are acquired centering on the maximum luminance value (step S607).
Here, the limitation to n luminance data values is that high-speed processing is possible by omitting continuous interpolation of unnecessary data away from the focal point. Then, the n luminance data values are subjected to quadratic interpolation to obtain a continuous interpolation curve as shown by the solid line in FIG. 14 (step S609). The second three-dimensional detection unit 143 detects the distance of the metal particle 5h based on the maximum luminance value in the luminance interpolation value, and based on the luminance centroid value corresponding to the luminance interpolation value that has detected the distance, The position of the metal particle 5h on the X and Y coordinates of 5h is detected (step S700).
 上記のように構成された三次元計測装置101は、金属粒子5hを撮像素子14を用いて撮像する撮像系10と、金属粒子5hと撮像系10との異なる距離毎に撮像系10により撮像された各画像G1,G2・・・Gnの明点P1,P2・・・Pnを検出する明点三次元検知部32と、画像の一定領域から輝度オフセットを検知する輝度オフセットの検知部34と、画像の明点を中心とした一定領域ごとの輝度を検知し、該一定領域内のX軸,Y軸ごとの輝度分布から輝度オフセットを除去した第2の輝度分布を求めると共に、第2の輝度分布に基づいて第2の輝度重心値を求める第2の輝度重心の演算部136と、輝度重心値が検知された画素14aと、該画素14aの周囲の画素14aとが検知した輝度から輝度重心値が有する輝度を、輝度の補正値として得る輝度の補正部38と、輝度補正値に基づいて金属粒子5hとの距離を求めると共に、該距離を求めた輝度補正値に対応する第2の輝度重心に基づいて金属粒子5hのX,Y上の位置を求める第2の三次元検知部143と、を備えたものである。 The three-dimensional measuring apparatus 101 configured as described above is picked up by the image pickup system 10 at different distances between the image pickup system 10 that picks up the metal particles 5h using the image pickup device 14 and the metal particles 5h and the image pickup system 10. A bright point three-dimensional detector 32 that detects the bright points P1, P2,... Pn of each image G1, G2,... Gn, a luminance offset detector 34 that detects a luminance offset from a certain area of the image, The brightness of each fixed area centered on the bright point of the image is detected, a second brightness distribution obtained by removing the brightness offset from the brightness distribution of each X axis and Y axis in the fixed area is obtained, and the second brightness The luminance center of gravity is calculated from the luminance detected by the second luminance center-of-gravity calculating unit 136 for obtaining the second luminance center-of-gravity value based on the distribution, the pixel 14a in which the luminance center-of-gravity value is detected, and the pixels 14a around the pixel 14a. The brightness of the value The distance between the brightness correction unit 38 obtained as the brightness correction value and the metal particle 5h based on the brightness correction value and the metal particle based on the second brightness center of gravity corresponding to the brightness correction value for which the distance has been determined. And a second three-dimensional detection unit 143 for obtaining a position on X, Y of 5h.
 かかる三次元計測装置101によれば、上記実施形態1の作用・効果を奏すると共に、画像の一定領域から輝度オフセットを検知する輝度オフセットの検知部34を備え、画像の明点を中心とした一定領域ごとの輝度を検知し、該一定領域内のX軸,Y軸ごとの輝度分布から輝度オフセットを除去した第2の輝度分布を求めると共に、第2の輝度分布に基づいて第2の輝度重心値を求める第2の輝度重心の演算部136とを備えたので、画素14aが金属粒子5hからの反射によって検知した輝度の影響を受けにくいので、距離を求めた輝度補正値に基づいた第2の輝度の重心値が金属粒子5hのXY平面上の位置と正確に重なることになる。
 これにより、三次元計測装置101では、明点付近の輝度から輝度オフセットを除去した輝度変化値のみに基づいて第2の輝度重心値を求めて、第2の輝度重心値によって明点の位置を検知するので、金属粒子5hの反射などの影響を受けずに、正確に明点のXY平面での位置を検知できる。したがって、金属粒子5hの位置の検知精度が向上する。
 さらに、第2の輝度重心値に基づいて補正した第2の輝度の補正値を得て、第2の輝度の補正値に基づいて金属粒子5hの距離を検知するので、金属粒子5hの距離の検知精度がより向上する。
According to the three-dimensional measuring apparatus 101, the function / effect of the first embodiment is provided, and the luminance offset detecting unit 34 that detects the luminance offset from a certain region of the image is provided, and the constant is centered on the bright point of the image. The luminance of each region is detected, a second luminance distribution obtained by removing the luminance offset from the luminance distribution for each X-axis and Y-axis in the fixed region is obtained, and the second luminance centroid is calculated based on the second luminance distribution. Since the pixel 14a is not easily affected by the luminance detected by the reflection from the metal particle 5h, the second luminance center of gravity calculation unit 136 for obtaining the value is provided. Therefore, the second luminance based on the luminance correction value obtained for the distance is used. The barycentric value of the brightness of is exactly overlapped with the position of the metal particle 5h on the XY plane.
Accordingly, the three-dimensional measurement apparatus 101 obtains the second luminance centroid value based only on the luminance change value obtained by removing the luminance offset from the luminance near the bright point, and determines the position of the bright point by the second luminance centroid value. Since the detection is performed, the position of the bright point on the XY plane can be accurately detected without being affected by the reflection of the metal particles 5h. Therefore, the detection accuracy of the position of the metal particle 5h is improved.
Further, the second luminance correction value corrected based on the second luminance centroid value is obtained, and the distance of the metal particles 5h is detected based on the second luminance correction value. Detection accuracy is further improved.
 上記実施の形態の三次元計測方法は、被対象物5と撮像系10との異なる距離毎に撮像系10により撮像された各画像G1,G2・・・Gnの明点P1,P2・・・Pnを検出した後、画像G1,G2・・・Gnから明点を中心とした一定領域から輝度オフセットを検知する輝度オフセットの検知工程を実行した後、画像G1,G2・・・Gnの明点P1,P2・・・Pnを中心とした一定領域ごとの輝度を検知し、該一定領域内のX軸,Y軸ごとの第1の輝度分布を求めると共に、第1の輝度分布から輝度オフセットを差し引いた第2の輝度分布に基づいて第2の輝度重心値を求める。その後、輝度の補正値に基づいて金属粒子5hとの距離値を求めると共に、距離を求めた輝度補正値に基づいた第2の輝度重心値に基づいて金属粒子5hのX,Y上の位置を検知する、ものである。
 これにより、三次元計測装置101では、明点付近の輝度から輝度オフセットを除去した輝度変化値のみに基づいて明点の位置を検知するので、金属粒子5hの反射などの影響を受けずに、正確に検知できる。したがって、金属粒子5hの距離及び位置の検知精度が向上する。
In the three-dimensional measurement method of the above embodiment, the bright points P1, P2,... Of the images G1, G2,... Gn captured by the imaging system 10 at different distances between the object 5 and the imaging system 10. After detecting Pn, after performing a luminance offset detection process for detecting a luminance offset from a certain region centered on the bright point from the images G1, G2,... Gn, the bright point of the images G1, G2,. P1, P2,..., Pn are detected for each constant region, and the first luminance distribution for each X-axis and Y-axis in the fixed region is obtained, and the luminance offset is calculated from the first luminance distribution. A second luminance centroid value is obtained based on the subtracted second luminance distribution. Thereafter, the distance value with the metal particle 5h is obtained based on the brightness correction value, and the positions of the metal particles 5h on X and Y are determined based on the second brightness centroid value based on the brightness correction value obtained from the distance. Detect.
Thereby, in the three-dimensional measurement apparatus 101, since the position of the bright point is detected based only on the luminance change value obtained by removing the luminance offset from the luminance near the bright point, it is not affected by the reflection of the metal particles 5h, etc. It can be detected accurately. Therefore, the detection accuracy of the distance and position of the metal particles 5h is improved.
実施の形態3.
 上記実施の形態1,2では、第1(第2)の三次元検出器30(130)は、第1(第2)の輝度補正値に基づいて金属粒子5hとの距離値を求めると共に、第1(第2)の輝度重心値に基づいて金属粒子5hのX,Y上の位置を検知したが、以下のようにしても良い。
 本実施形態の三次元計測装置は、明点抽出部32と、第1の輝度重心演算部36と、輝度オフセットの検知部34と、第2の輝度重心の演算部136と、第1の輝度補正部43と、第3の三次元検出器とを備えている。
 第3の三次元検出器は、第1の輝度補正値に基づいて金属粒子5hとの距離値を求めると共に、該距離値に対応した第2の輝度重心値に基づいて金属粒子5hのX,Y上の位置を検知しても良い。これにより、金属粒子5hとの距離値を求めるのに、輝度オフセットを考慮せず、金属粒子5hの位置を検知するのに、輝度オフセットを考慮している。したがって、金属粒子5hの位置の検知精度がより向上する、
Embodiment 3 FIG.
In the first and second embodiments, the first (second) three-dimensional detector 30 (130) obtains the distance value from the metal particle 5h based on the first (second) luminance correction value, and Although the position on the X and Y of the metal particle 5h is detected based on the first (second) luminance center-of-gravity value, it may be as follows.
The three-dimensional measurement apparatus according to the present embodiment includes a bright point extraction unit 32, a first luminance centroid calculation unit 36, a luminance offset detection unit 34, a second luminance centroid calculation unit 136, and a first luminance. A correction unit 43 and a third three-dimensional detector are provided.
The third three-dimensional detector obtains a distance value with respect to the metal particle 5h based on the first brightness correction value, and based on the second brightness centroid value corresponding to the distance value, X, A position on Y may be detected. As a result, the luminance offset is taken into account for detecting the position of the metal particle 5h without taking the luminance offset into consideration when obtaining the distance value with the metal particle 5h. Therefore, the detection accuracy of the position of the metal particle 5h is further improved.
 また、他の実施形態の三次元計測装置は、明点抽出部32と、第1の輝度重心演算部36と、輝度オフセットの三次元検知部34と、第2の輝度重心の演算部136と、第1の輝度補正部43と、第4の三次元検出器とを備えている。
 第3の三次元検出器の代わりに、第4の三次元検出器を設け、第4の三次元検知器は、第2の輝度補正値に基づいて金属粒子5hとの距離値を求めると共に、該距離値に対応した第1の輝度重心値に基づいて金属粒子5hのX,Y上の位置を検知しても良い。これにより、金属粒子5hとの距離値を求めるのに、輝度オフセットを考慮し、被対象物5の位置を検知するのに、輝度オフセットを考慮していない。したがって、金属粒子5hの距離の検知精度がより向上する、
The three-dimensional measurement apparatus according to another embodiment includes a bright point extraction unit 32, a first luminance centroid calculation unit 36, a luminance offset three-dimensional detection unit 34, and a second luminance centroid calculation unit 136. , A first luminance correction unit 43 and a fourth three-dimensional detector.
In place of the third three-dimensional detector, a fourth three-dimensional detector is provided, and the fourth three-dimensional detector obtains a distance value from the metal particle 5h based on the second luminance correction value, The positions on the X and Y of the metal particles 5h may be detected based on the first luminance centroid value corresponding to the distance value. As a result, the luminance offset is taken into account for obtaining the distance value with respect to the metal particle 5h, and the luminance offset is not taken into account for detecting the position of the object 5. Therefore, the detection accuracy of the distance of the metal particles 5h is further improved.
 本発明は、三次元計測装置に適用できる。 The present invention can be applied to a three-dimensional measuring apparatus.
 本発明は、上記発明の実施の形態の説明に何ら限定されるものではない。特許請求の範囲の記載を逸脱せず、当業者が容易に想到できる範囲で種々の変形態様も本発明に含まれる。 The present invention is not limited to the description of the embodiment of the above invention. Various modifications are also included in the present invention as long as those skilled in the art can easily conceive without departing from the scope of the claims.
 1,101 三次元計測装置、 5 樹脂板、5h 金属粒子(被対象物)、10 撮像系、32 明点抽出部、34 輝度のオフセット検知部、36 第1の輝度重心の演算部、38 第1の輝度の補正部、41 輝度の補間部、43 第1の三次元検知部、136 第2の輝度重心の演算部、138 第2の輝度の補正部、143 第2の三次元検知部。
 
DESCRIPTION OF SYMBOLS 1,101 Three-dimensional measuring apparatus, 5 Resin plate, 5h Metal particle (object), 10 Imaging system, 32 Bright point extraction part, 34 Luminance offset detection part, 36 1st luminance gravity center calculation part, 38 1st 1 luminance correction unit, 41 luminance interpolation unit, 43 first three-dimensional detection unit, 136 second luminance gravity center calculation unit, 138 second luminance correction unit, 143 second three-dimensional detection unit.

Claims (6)

  1.  被対象物を、画素を有する撮像素子により撮像する撮像手段と、
     前記被対象物と前記撮像手段との異なる距離毎に前記撮像手段により撮像された各画像により検知された輝度が予め定められ閾値以上の輝度であることにより前記被対象物を画素単位で抽出する明点抽出手段と、
     前記明点を有する画素を含み、該画素の周囲の画素により成す一定領域ごとの輝度を検知し、該一定領域内のX軸,Y軸ごとの輝度分布を求めると共に、該輝度分布に基づいて第1の輝度重心値を求める輝度重心の演算手段と、
     前記輝度重心値が検知された画素が有する輝度と、該画素の周囲の画素が検知した輝度とを、前記輝度重心値が有する輝度に補正した輝度補正値を得る輝度補正手段と、
     前記輝度補正値に基づいて前記被対象物との距離値を求めると共に、前記輝度重心値に基づいて前記被対象物のX,Y上の位置を検知する三次元検知手段と、
     を備えたことを特徴とする三次元計測装置。
    Imaging means for imaging an object by an imaging device having pixels;
    The target object is extracted in units of pixels when the brightness detected by each image captured by the image capturing means at a different distance between the target object and the image capturing means is a predetermined brightness or more. Bright spot extraction means;
    Including the pixel having the bright point, the brightness of each constant area formed by the pixels around the pixel is detected, and the brightness distribution for each of the X axis and Y axis in the constant area is obtained, and based on the brightness distribution Means for calculating a luminance centroid to obtain a first luminance centroid value;
    A luminance correction means for obtaining a luminance correction value obtained by correcting the luminance of the pixel in which the luminance centroid value is detected and the luminance detected by pixels surrounding the pixel to the luminance of the luminance centroid value;
    A three-dimensional detection means for obtaining a distance value to the object based on the luminance correction value and detecting a position on the X, Y of the object based on the luminance centroid value;
    A three-dimensional measuring device comprising:
  2.  前記画像の前記一定領域から輝度オフセットを検知する輝度オフセットの検知手段を備え、
     前記輝度重心の演算手段は、前記第1の輝度重心値を求める代わりに、前記輝度分布から前記輝度オフセットを除去した新たな輝度分布を求めると共に、該新たな輝度分布に基づいて第2の輝度重心値を求める、
     ことを特徴とする請求項1に記載の三次元計測装置。
    A luminance offset detecting means for detecting a luminance offset from the certain area of the image;
    The luminance centroid calculating means obtains a new luminance distribution obtained by removing the luminance offset from the luminance distribution, instead of obtaining the first luminance centroid value, and generates a second luminance based on the new luminance distribution. Find the center of gravity value,
    The three-dimensional measuring apparatus according to claim 1.
  3.  前記画像の前記一定領域から輝度オフセットを検知する輝度オフセットの検知手段を備え、
     前記輝度分布から前記輝度オフセットを除去した新たな輝度分布を求めると共に、該新たな輝度分布に基づいて第2の輝度重心値を求める第2の輝度重心の演算手段を、
     を備えことを特徴とする請求項1に記載の三次元計測装置。
    A luminance offset detecting means for detecting a luminance offset from the certain area of the image;
    A second luminance centroid calculating means for obtaining a new luminance distribution obtained by removing the luminance offset from the luminance distribution and obtaining a second luminance centroid value based on the new luminance distribution,
    The three-dimensional measuring apparatus according to claim 1, comprising:
  4.  複数の前記輝度の補正値を所定の関数で補間して輝度の補間値を求める輝度の補間手段を備え、
     前記三次元検知手段は、前記輝度の補間値に基づいて前記被対象物との距離値を求める、
     ことを特徴とする請求項1から3のいずれかに記載の三次元計測装置。
    A luminance interpolation means for interpolating a plurality of luminance correction values with a predetermined function to obtain a luminance interpolation value,
    The three-dimensional detection means obtains a distance value to the object based on the luminance interpolation value.
    The three-dimensional measuring apparatus according to any one of claims 1 to 3, wherein
  5.  被対象物と前記撮像手段との異なる距離毎に前記撮像手段により撮像された各画像の明点を検出する明点抽出工程を実行した後、
     前記画像の明点を含む一定領域ごとの輝度を検知し、該一定領域内のX軸,Y軸ごとの輝度分布を求めると共に、前記輝度分布に基づいて輝度重心値を求める輝度重心の演算工程を実行した後、
     前記輝度重心値が検知された画素が有する輝度と、該画素の周囲の画素が検知した輝度とを、前記輝度重心値が有する輝度に補正した輝度の補正値を得た後、
     前記輝度の補正値に基づいて前記被対象物との距離値を求めると共に、前記輝度重心値に基づいて前記被対象物のX,Y上の位置を検知する、
     ことを特徴とする三次元計測方法。
    After performing a bright spot extraction step of detecting a bright spot of each image captured by the imaging means at different distances between the object and the imaging means,
    Luminance centroid calculation step of detecting the luminance for each constant region including the bright point of the image, obtaining the luminance distribution for each X-axis and Y-axis in the fixed region, and obtaining the luminance centroid value based on the luminance distribution After running
    After obtaining the luminance correction value obtained by correcting the luminance of the pixel in which the luminance centroid value is detected and the luminance detected by the pixels around the pixel to the luminance of the luminance centroid value,
    Obtaining a distance value with respect to the object based on the correction value of the luminance, and detecting a position on the X and Y of the object based on the luminance gravity value;
    A three-dimensional measurement method characterized by this.
  6.  前記明点抽出工程を実行した後、前記画像の明点を含む一定領域から輝度オフセットを検知する輝度オフセットの検知工程を実行した後、
     輝度重心の演算工程は、前記輝度分布から前記輝度オフセットを除去した該一定領域内のX軸,Y軸ごとの新たな輝度分布を求めると共に、前記新たな輝度分布に基づいて輝度重心値を求める、
     ことを特徴とする請求項5に記載の三次元計測方法。
    After performing the light spot extraction step, after performing a brightness offset detection step of detecting a brightness offset from a certain region including the light point of the image,
    In the luminance centroid calculation step, a new luminance distribution is obtained for each of the X axis and Y axis in the fixed region obtained by removing the luminance offset from the luminance distribution, and a luminance centroid value is obtained based on the new luminance distribution. ,
    The three-dimensional measurement method according to claim 5.
PCT/JP2010/069208 2009-10-29 2010-10-28 Three-dimensional measurement device and three-dimensional measurement method WO2011052693A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2009-249158 2009-10-29
JP2009249158A JP5621077B2 (en) 2009-10-29 2009-10-29 Three-dimensional measuring apparatus and three-dimensional measuring method

Publications (1)

Publication Number Publication Date
WO2011052693A1 true WO2011052693A1 (en) 2011-05-05

Family

ID=43922116

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/069208 WO2011052693A1 (en) 2009-10-29 2010-10-28 Three-dimensional measurement device and three-dimensional measurement method

Country Status (2)

Country Link
JP (1) JP5621077B2 (en)
WO (1) WO2011052693A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020500310A (en) * 2016-11-17 2020-01-09 トリナミクス ゲゼルシャフト ミット ベシュレンクテル ハフツング Detector for optically detecting at least one object

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2022209219A1 (en) * 2021-03-31 2022-10-06

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0363507A (en) * 1989-08-02 1991-03-19 Hitachi Ltd Solid shape detecting method
JPH0719826A (en) * 1993-06-30 1995-01-20 Nissan Motor Co Ltd Recognizing apparatus for cross-sectional shape
JPH07209436A (en) * 1994-01-17 1995-08-11 Murata Mfg Co Ltd Position detecting device, distance detecting device and size detecting device for heat source
JPH09113235A (en) * 1995-10-16 1997-05-02 Dainippon Screen Mfg Co Ltd Three-dimensional measuring method and indication method and three-dimensional measuring device
JP2009002829A (en) * 2007-06-22 2009-01-08 Toppan Printing Co Ltd Shape measurement method and shape measurement apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0363507A (en) * 1989-08-02 1991-03-19 Hitachi Ltd Solid shape detecting method
JPH0719826A (en) * 1993-06-30 1995-01-20 Nissan Motor Co Ltd Recognizing apparatus for cross-sectional shape
JPH07209436A (en) * 1994-01-17 1995-08-11 Murata Mfg Co Ltd Position detecting device, distance detecting device and size detecting device for heat source
JPH09113235A (en) * 1995-10-16 1997-05-02 Dainippon Screen Mfg Co Ltd Three-dimensional measuring method and indication method and three-dimensional measuring device
JP2009002829A (en) * 2007-06-22 2009-01-08 Toppan Printing Co Ltd Shape measurement method and shape measurement apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020500310A (en) * 2016-11-17 2020-01-09 トリナミクス ゲゼルシャフト ミット ベシュレンクテル ハフツング Detector for optically detecting at least one object

Also Published As

Publication number Publication date
JP2011095093A (en) 2011-05-12
JP5621077B2 (en) 2014-11-05

Similar Documents

Publication Publication Date Title
JP6363863B2 (en) Information processing apparatus and information processing method
JP3951984B2 (en) Image projection method and image projection apparatus
JP6415066B2 (en) Information processing apparatus, information processing method, position and orientation estimation apparatus, robot system
JP4885584B2 (en) Rangefinder calibration method and apparatus
EP1524492B1 (en) Three-dimensional measurement apparatus
JP4929828B2 (en) Three-dimensional authentication method, three-dimensional authentication device, and three-dimensional authentication program
WO2013061976A1 (en) Shape inspection method and device
KR101090082B1 (en) System and method for automatic measuring of the stair dimensions using a single camera and a laser
JP5621077B2 (en) Three-dimensional measuring apparatus and three-dimensional measuring method
JP2011069797A (en) Displacement measuring device and displacement measuring method
JP2018009927A (en) Image processing device, image processing method and program
JP4935769B2 (en) Plane region estimation apparatus and program
JP3491029B2 (en) Automatic monitoring device
JP5664078B2 (en) Imaging apparatus, image evaluation method, and focus adjustment control program
JP6789899B2 (en) Measuring device and operating method of measuring device
KR20140133359A (en) Distance measurement method using single camera module
JP2008203214A (en) Work deformation/distortion detecting method
JP5339070B2 (en) Displacement measuring apparatus and measuring method
KR101574195B1 (en) Auto Calibration Method for Virtual Camera based on Mobile Platform
CN108833789A (en) A kind of real-time autofocus and auto focusing method
JP4468019B2 (en) Image processing device
CN111536895A (en) Shape recognition device, shape recognition system, and shape recognition method
JP2006349443A (en) Camera calibration device
CN117119325B (en) Area array sensor camera and mounting position adjusting method thereof
CN112805607A (en) Measurement device, measurement method, and microscope system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10826825

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10826825

Country of ref document: EP

Kind code of ref document: A1