Workpiece measuring device and workpiece measuring method
By combining linear light and normal illumination in the working piece measurement equipment to generate brightness distribution maps, the problem that the existing technology is difficult to obtain high-quality two-dimensional and three-dimensional data at the same time is solved, and the effect of simplification of the equipment and improving measurement accuracy is achieved.
Patent Information
- Application Number
- JP2023565762
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-12-08
- Publication Date
- 2025-04-28
- Estimated Expiration
- 2041-12-08
AI Technical Summary
In the prior art, when measuring working pieces, it is difficult to obtain high-quality two-dimensional and three-dimensional data at the same time, and the equipment is complicated.
A working piece measurement device is adopted, equipped with a first light source for illuminating ray light and a second light source for normal illumination. Combined with a movement mechanism and a control unit, the camera device captures the linear light and image data under normal illumination, generates a brightness distribution map, and then extracts two-dimensional and three-dimensional data.
It realizes efficient acquisition of two-dimensional and three-dimensional data of working pieces without complex equipment, improving the workingability and accuracy of measurement.
Smart Images

Figure 0007669526000001 
Figure 0007669526000002 
Figure 0007669526000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a workpiece measuring device and a measuring method for acquiring two-dimensional data and three-dimensional data of a workpiece to be measured. [Background technology]
[0002] The light-section method is known as a method for non-contact height measurement of a workpiece. In the light-section method, a workpiece irradiated with a line of light is scanned and imaged, and the height of the workpiece is obtained from the image by the principle of triangulation. Patent Document 1 discloses a three-dimensional shape measurement device for a workpiece that uses the light-section method. The measurement device in Patent Document 1 arranges the brightness values of pixels at points of interest in the image obtained by scanning in chronological order, and obtains the brightness change of the points of interest.
[0003] Patent Document 2 discloses an apparatus for generating a three-dimensional model of a workpiece from the three-dimensional shape and two-dimensional texture image of the workpiece. In order to simultaneously obtain three-dimensional data and two-dimensional data of the workpiece, the measuring apparatus of Patent Document 2 includes a first light source and a first light receiving unit for three-dimensional measurement, and a second light source and a second light receiving unit for two-dimensional measurement, the second light source having a different wavelength from the first light source.
[0004] However, when using a measuring device that obtains only three-dimensional data of a workpiece as in Patent Document 1, a separate measurement process for the workpiece is required to obtain two-dimensional data of the workpiece. On the other hand, the measuring device in Patent Document 2 requires a light source and a camera for three-dimensional measurement and two-dimensional measurement of the workpiece, respectively, which complicates the device. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2015-105883 A [Patent Document 2] JP 2006-162386 A Summary of the Invention [Problem to be solved by the invention]
[0006] An object of the present invention is to provide a workpiece measuring device and a measuring method that can measure two-dimensional data and three-dimensional data of a workpiece with good operability and without complicating the device.
[0007] According to one aspect of the present invention, there is provided a work measurement device comprising: a first light source which irradiates a line light onto a work to be measured; a second light source which irradiates normal illumination light onto the work; an imaging unit capable of acquiring images of the work and its surroundings irradiated with the line light and the normal illumination light; a moving mechanism which moves the work relatively in a predetermined feed direction; a control unit which controls operation of the imaging unit, the first light source, the second light source, and the moving mechanism; and a measurement unit which obtains two-dimensional data and three-dimensional data for the work based on the images acquired by the imaging unit. The control unit moves the work using the moving mechanism while causing the imaging unit to perform an imaging operation of the work in a predetermined camera scale unit with the first light source and the second light source turned on simultaneously. The measurement unit extracts image data corresponding to a position of interest of the work from each of the images sequentially captured in the camera scale unit, and arranges the extracted image data in chronological order to generate a brightness distribution map of the position of interest. Based on the brightness distribution map, the two-dimensional data and three-dimensional data of the position of interest are derived.
[0008] A work measurement method according to another aspect of the present invention is a work measurement method for acquiring two-dimensional data and three-dimensional data of a work to be measured, in which the work is moved while line light and normal illumination light are simultaneously irradiated onto the work, images of the work are acquired in a predetermined camera scale unit, image data corresponding to a position of interest on the work is extracted from each of the images captured sequentially in the camera scale unit, the extracted image data is arranged in chronological order to generate a brightness distribution map of the position of interest, and the two-dimensional data and three-dimensional data of the position of interest are derived based on the brightness distribution map. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a schematic diagram showing in a simplified manner the hardware configuration of a workpiece measuring device according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a block diagram showing an electrical configuration of the workpiece measuring device. [Diagram 3] 3(A) to (C) are schematic diagrams showing a method for measuring the height of a workpiece by the light-section method. [Figure 4A] FIG. 4A is a diagram showing an imaging situation for a target position on a workpiece. [Figure 4B] FIG. 4B is a diagram showing an imaging situation for a target position on a workpiece. [Figure 4C] FIG. 4C is a diagram showing an imaging situation for a target position on a workpiece. [Figure 4D] FIG. 4D is a diagram showing an imaging situation for a target position on a workpiece. [Diagram 5] FIG. 5A is a diagram showing an example of a luminance distribution map of the target position, and FIG. 5B is a graph showing luminance values along the line VB-VB in FIG. 5A. [Figure 6] 6(A) to 6(E) are diagrams for explaining the process of deriving two-dimensional data and three-dimensional data of a workpiece from the luminance distribution map. [Figure 7] FIG. 7 is a flowchart showing a process for deriving two-dimensional data and three-dimensional data of a workpiece using the workpiece measuring device of this embodiment. [Figure 8] 8(A) to (D) are diagrams for explaining the process of deriving two-dimensional data and three-dimensional data of a workpiece from a luminance distribution map according to a modified example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. The work measurement device according to the present invention can be widely applied to two-dimensional and three-dimensional measurement of workpieces to be measured, such as various industrial products, semi-finished products, machine parts, electronic parts, food, agricultural products, etc. For example, the work measurement device of the present invention is suitable for performing two-dimensional and three-dimensional measurement of a workpiece that is a component mounted on a circuit board.
[0011] [Device configuration] 1 is a schematic diagram showing in a simplified manner the hardware configuration of a workpiece measuring device 1 according to this embodiment. The workpiece measuring device 1 includes a first light source 2, a second light source 3, a camera device 4 (imaging unit), a moving motor 5 (moving mechanism), and a control unit 6. The workpiece measuring device 1 is a device that derives two-dimensional data (brightness measurement data) and three-dimensional data (height measurement data) of a workpiece W placed on a base 51. Here, an example is shown in which a mouse is placed on the base 51 as the workpiece W. The surface of the base 51 becomes a reference height surface when measuring the height. When the workpiece W is a component on a mounting board, the base 51 becomes the board on which the component is mounted.
[0012] The first light source 2 is a light source that generates slit-shaped light and irradiates a line light SL onto the workpiece W to be measured. For example, the first light source 2 may be a light source device including a laser light source and an optical component that converts the laser light emitted by the laser light source into slit light spreading in a fan shape. In this embodiment, an example is shown in which the first light source 2 is disposed so as to irradiate the line light SL from vertically above the workpiece W.
[0013] The second light source 3 irradiates the workpiece W with normal illumination light TL. In FIG. 1, the normal illumination light TL is shown as diffuse light spreading in a cone shape for the sake of simplicity, but the actual normal illumination light TL is non-directional illumination light capable of irradiating the workpiece W from all directions. The second light source 3 may be, for example, a light source device in which a substrate on which a matrix of many LEDs is mounted is arranged in a ring shape with different directional directions. There is no particular limitation on the arrangement of the second light source 3 as long as it is possible to irradiate the workpiece W with non-directional illumination light.
[0014] The camera device 4 acquires an image of the workpiece W and its surroundings irradiated with the line light SL and the normal illumination light TL. The camera device 4 has an imaging optical axis AX tilted with respect to the vertical direction of the base 51. That is, the camera device 4 is equipped with an imaging optical axis AX tilted with respect to the projection axis of the line light SL. These axial arrangements are arranged for measuring the three-dimensional shape of the workpiece W by the light section method. Note that the imaging optical axis AX may be arranged in the vertical direction, and the projection axis of the line light SL may be arranged at an angle with respect to the imaging optical axis AX.
[0015] The movement motor 5 is a drive source of a movement mechanism that moves the workpiece W relatively in a predetermined workpiece feed direction F. Examples of the relative movement of the workpiece W include a mode in which the measurement system of the first light source 2, the second light source 3, and the camera device 4 is fixedly disposed, and the workpiece W and the base 51 are moved in the workpiece feed direction F, and a mode in which the measurement system is scanned and moved in the workpiece feed direction F relative to the stationary workpiece W and base 51. In the former case, the movement motor 5 serves as a drive source for a conveyor or the like that moves the workpiece W and base 51, and in the latter case, serves as a drive source for moving the measurement system along a guide rail or the like.
[0016] The control unit 6 is composed of a microcomputer, a personal computer, or the like, and controls the operations of the first light source 2, the second light source 3, the camera device 4, and the moving motor 5. Specifically, the control unit 6 controls the operation of emitting line light SL by the first light source 2, the operation of emitting normal illumination light TL by the second light source 3, the operation of capturing an image of the workpiece W by the camera device 4, and the operation of feeding the workpiece W by the moving motor 5, i.e., the scanning operation.
[0017] [Electrical configuration of workpiece measurement device] 2 is a block diagram showing the electrical configuration of the workpiece measuring device 1. The camera device 4 includes an image sensor 41, an image memory 42, a measuring unit 43, a setting storage unit 44, and an I / F unit 45. The image sensor 41 is a sensor in which pixels made of photoelectric conversion elements are arranged in a matrix. As the image sensor 41, it is desirable to use a CMOS sensor capable of specifying a ROI (Region Of Interest) that determines the pixel readout range.
[0018] The image memory 42 temporarily stores image data acquired by the imaging element 41. The measurement unit 43 obtains two-dimensional data and three-dimensional data of the workpiece W based on the image of the workpiece W acquired by the imaging operation, that is, the image data stored in the image memory 42. In this embodiment, an example in which the measurement unit 43 is equipped in the camera device 4 is shown, but the measurement unit 43 may be equipped in the control unit 6 or another external device. The setting storage unit 44 stores various setting data and parameters related to the measurement operation of the measurement unit 43. Setting values related to reference positions that divide the 2D and 3D regions in the luminance distribution map M described later may be stored in the setting storage unit 44. The I / F unit 45 is an interface circuit for performing data communication with the control unit 6.
[0019] The measurement unit 43 functionally includes an image arrangement unit 431, a height calculation unit 432, a brightness calculation unit 433, and an ROI setting unit 434. The image arrangement unit 431 extracts image data corresponding to a position of interest on the workpiece W from each of the images sequentially captured by the imaging element 41 in a predetermined camera scale unit. Furthermore, the image arrangement unit 431 arranges the extracted image data in chronological order to generate a brightness distribution map M (FIG. 5) for the position of interest.
[0020] The height calculation unit 432 executes a process of determining the height of each target position of the workpiece W by a light section method based on the brightness distribution map M in order to derive three-dimensional data of the workpiece W. The brightness calculation unit 433 executes a process of determining the brightness of each target position based on the brightness distribution map M in order to derive two-dimensional data of the workpiece W. The ROI setting unit 434 specifies the ROI of the image sensor 41. The wider the range of the ROI in the workpiece feed direction F, i.e., the range in the profile direction, the wider the height range of the workpiece W to be measured, and the higher the three-dimensional measurement of the workpiece W becomes possible.
[0021] The control unit 6 causes the camera device 4 to perform an image capturing operation of the workpiece W at a predetermined frame rate while moving the workpiece W in the workpiece feed direction F by a moving mechanism equipped with a moving motor 5 and simultaneously turning on the first light source 2 and the second light source 3. That is, the control unit 6 causes the camera device 4 to perform an image capturing operation at pitches proportional to the size of the pixel row of the imaging element 41, in other words, in camera scale units. The control unit 6 operates so as to be functionally equipped with a camera control unit 61, a light source control unit 62, a motor control unit 63, a data storage unit 64, and an I / F unit 65 by executing a predetermined program.
[0022] The camera control unit 61 controls the camera device 4 to capture an image of the relatively moving workpiece W in a predetermined camera scale unit. Through this imaging, a large number of frame images of the workpiece W are acquired and stored in the image memory 42. The camera scale unit is set so that the relative movement distance of the workpiece W and the size on the pixel row of the imaging element 41 are in a proportional relationship.
[0023] The light source control unit 62 simultaneously turns on the first light source 2 and the second light source 3 when the camera device 4 captures an image of the workpiece W. This allows both the line light SL and the normal illumination light TL reflected from the workpiece W to be incident on the camera device 4 simultaneously. The motor control unit 63 controls the movement motor 5 when the camera device 4 captures an image of the workpiece W to relatively move the workpiece W and the base 51 at a predetermined movement speed in the workpiece feed direction F. The data storage unit 64 stores the two-dimensional data and three-dimensional data of the workpiece W transmitted from the measurement unit 43 of the camera device 4. The I / F unit 65 is an interface circuit for performing data communication with the camera device 4.
[0024] [Height measurement using the light-cutting method] With reference to Figures 3(A) to (C), three-dimensional measurement (height measurement) by the light-section method that can be performed by the workpiece measuring device 1 will be described. As shown in Figure 3(A), an example is shown in which a rectangular parallelepiped workpiece W is mounted on a base 51 as a measurement target. For height measurement, the above-mentioned camera device 4 and a first light source 2 that emits line light SL are used. Unlike Figure 1, Figure 3(A) shows an example in which the camera device 4 is arranged so that the imaging optical axis AX is vertical, and the first light source 2 is arranged so that the projection optical axis of the line light SL has a predetermined intersection angle θ with the imaging optical axis AX.
[0025] 3(B) shows a frame image F01 acquired by the camera device 4 at a certain scan position where the workpiece W is irradiated with the line light SL. When the line light SL is irradiated onto an area including the workpiece W, the camera device 4 captures reflected light RL1 from the base 51 around the workpiece W, i.e., from the reference height, and reflected light RL2 from the top surface of the workpiece W. Since the line light SL is oblique light and the workpiece W has height, the reflected light RL1 and RL2 are observed at different positions on the X coordinate on the frame image F01. Specifically, the reflected light RL1 appears at coordinate x11, and the reflected light RL2 appears at coordinate x12, which is located upstream of coordinate x11 in the workpiece feed direction F.
[0026] The point P0 in FIG. 3(A) where the line light SL is irradiated is treated as a point where the calculated height is 0. Then, as shown in FIG. 3(C), the principle of triangulation using the intersection angle θ allows height data to be obtained such that the height at coordinate x11 is h1 and the height at coordinate x12 is h2. Thereafter, subsequent frame images F02 and F03 are captured in sequence, and images of different positions of the workpiece W are obtained. As a result, height data at coordinates x21 and x22 is obtained in frame image F02, and height data at coordinates x31 and x32 is obtained in frame image F03. Needless to say, the actual camera scale unit has a much narrower pitch than the example shown.
[0027] By integrating the multiple height data acquired by the above-described scanning operation, it is possible to obtain three-dimensional data of the workpiece W. The height data acquired in each frame image F01, F02, F03 is based on the result of irradiating reflected light RL1, RL2 at different X coordinate positions. For this reason, when integrating the data, for example, a height table may be created that matches the height data of the coordinate x12 obtained in the area of the workpiece W in the frame image F01 with the height data of the coordinate x12 obtained in the area of the base 51 at the subsequent scan position.
[0028] [Simultaneous acquisition of 2D and 3D data] Next, a description will be given of the simultaneous acquisition of two-dimensional data and three-dimensional data in the work measurement device 1. Fig. 4A to Fig. 4D are diagrams showing imaging conditions for a target position N of the work W. Fig. 4A to Fig. 4D show a state in which an image of the work W is captured in a predetermined camera scale unit while a rectangular parallelepiped work W having a height h is moved relative to the image sensor 41 of the camera device 4 in the work feed direction F.
[0029] The workpiece W is simultaneously irradiated with line light SL emitted by the first light source 2 and normal illumination light TL (not shown) emitted by the second light source 3. For this reason, line reflected light RL, which is the reflected light of the line light SL irradiated to the workpiece W, and normal reflected light RT, which is the reflected light of the normal illumination light TL, are simultaneously incident on the imaging element 41. Note that, as the line reflected light RL, line reflected light RL1 from the position h=0 and line reflected light RL2 from a height h are shown.
[0030] The workpiece W is shown with a position of interest N for which two-dimensional data and three-dimensional data should be obtained. The size of the position of interest N in the workpiece feed direction F corresponds to the distance that the workpiece W moves between the imaging pitch of one frame image and the next frame image. The pixel rows L1 to L10 attached to the imaging element 41 are pixel rows having a number of pixels corresponding to the imaging pitch. The position of interest N is sequentially imaged by each of the pixel rows L1 to L10 in ten frame images F1 to F10 that are continuously imaged while being moved in the workpiece feed direction F. Of these, Figs. 4A to 4D show the imaging conditions of the third to sixth frame images F3 to F6. The line reflected light RL1 with h=0 is set to be incident on the pixel row L4.
[0031] In the frame image F3 in Fig. 4A, the attention position N has not yet reached the irradiation position of the line light SL. Therefore, the image data F3-L3 acquired in the pixel row L3 in which the attention position N is captured in the frame image F3 is image data consisting of only the normal reflected light RT. The same is true for the frame images F1 and F2 captured before the frame image F3.
[0032] In frame image F4 in Fig. 4B, the position of interest N is imaged by pixel row L4, which is adjacent to pixel row L3 on the downstream side in the work feed direction F. In frame image F4, ordinary reflected light RT from the work W is also incident on pixel row L4. In addition, line reflected light RL1 from an area where h = 0 is at the same position in the work feed direction F as the position of interest N is also incident on pixel row L4. For this reason, image data F4-L4 acquired by pixel row L4 in which the position of interest N is imaged in frame image F4 is image data in which line reflected light RL1 is superimposed on ordinary reflected light RT.
[0033] 4C, the position of interest N is captured by pixel row L5. In frame image F5, ordinary reflected light RT from the workpiece W is also incident on pixel row L5, and further, line reflected light RL2 from an area of height h of the workpiece W is also incident on pixel row L5. Therefore, image data F5-L5 acquired in pixel row L5 in which the position of interest N is captured in frame image F5 is image data in which line reflected light RL2 is superimposed on ordinary reflected light RT.
[0034] On the other hand, at the timing when the frame image F6 in Fig. 4D is captured, the target position N has passed through the irradiation position of the line light SL. Therefore, the image data F6-L6 acquired in the pixel row L6 where the target position N is captured in the frame image F6 is image data mainly of the normal reflected light RT. Note that although the line light SL is depicted as a simple linear light in Figs. 4A to 4D, the actual line light SL has a Gaussian light intensity distribution in the work feed direction F. Therefore, the image data F6-L6 may be image data in which part of the line reflected light RL2 is superimposed on the normal reflected light RT. The frame images F7 to F10 captured after the frame image F6 are images where only the normal reflected light RT is incident.
[0035] As described above, the frame images F1 to F10 including the image data F3-L3 to F6-L6 of Figures 4A to 4D are temporarily stored in the image memory 42 (Figure 2). The image arrangement section 431 of the measurement unit 43 extracts image data corresponding to the attention position N from the frame images F1 to F10 stored in the image memory 42. Furthermore, the image arrangement section 431 arranges the extracted image data in chronological order to generate a brightness distribution map of the attention position N. The same process is repeated for other parts of the workpiece W as the attention position N.
[0036] Fig. 5(A) is a diagram showing an example of a luminance distribution map M of a target position N. The x direction in the diagram is the direction in which image data is arranged in chronological order, and is the profile direction in which the height data of the workpiece W is expressed. The y direction is the width direction of the workpiece W perpendicular to the workpiece feed direction F, and is the extension direction of the line light SL. Fig. 5(B) is a graph showing luminance values along the line VB-VB in Fig. 5(A).
[0037] 5(A) is created by arranging, in the x direction, image data F1-L1 to F10-L10 acquired for a position of interest N in each of the frame images F1 to F10. In other words, the brightness distribution map M shows the brightness change at one position of interest N in the frame images F1 to F10.
[0038] As shown in FIG. 4B, the image data F4-L4 includes the line reflected light RL1 from the region of h=0. Therefore, in the region F4-L4 of the luminance distribution map M, the luminance data D11 corresponding to the line reflected light RL1 is measured. Also, as shown in FIG. 4C, the image data F5-L5 includes the line reflected light RL2 from the region of the height h of the workpiece W. Therefore, in the region F5-L5 of the luminance distribution map M, the luminance data D12 corresponding to the line reflected light RL2 is measured. On the other hand, the normal reflected light RT is included in all the image data F1-L1 to F10-L10. Therefore, as shown in FIG. 5B, the luminance data D2 corresponding to the normal reflected light RT is measured in the entire region of the luminance distribution map M. On the VB-VB line, the luminance data D12 of the line reflected light RL2 shows a prominently high luminance value. The luminance data D12 is a triangular wave rather than a square wave because the line light SL has a light intensity distribution of a Gaussian distribution, as described above.
[0039] Based on the above-mentioned luminance distribution map M, the height calculation unit 432 of the measurement unit 43 derives height data of the attention position N, i.e., three-dimensional data, and the luminance calculation unit 433 derives luminance data of the attention position N, i.e., two-dimensional data. Figures 6(A) to (E) are diagrams for explaining the process of deriving the two-dimensional data and three-dimensional data of the workpiece from the luminance distribution map M.
[0040] When deriving data, the image arrangement unit 431 sets, on the luminance distribution map M, a 2D region M1 for acquiring two-dimensional data and a 3D region M2 for acquiring three-dimensional data, as shown in Fig. 6(A). The 3D region M2 is set to a region in the luminance distribution map M where height information of the workpiece W based on the line light SL appears, and the 2D region M1 is set to the other region. In the luminance distribution map M illustrated in Fig. 5(A), the height information appears in the region of the image data F4-L4 to F10-L10, so that region is set to the 3D region M2. In this case, the 2D region M1 is the region of the image data F1-L1 to F3-L3.
[0041] The range of the 3D region M2 can be adjusted by the range of the ROI of the image sensor 41 specified by the ROI setting unit 434. The image sensor 41 has a large number of pixels arranged in a matrix, and the two-dimensional array range of these pixels becomes the image area from which an image can be acquired. The ROI setting unit 434 performs ROI designation, which specifies a portion to be used of the entire image area acquired by the image sensor 41. If an ROI with a wide range in the work feed direction F is specified, the measurable height range of the work W can be expanded. The ROI setting unit 434 performs ROI designation with an appropriate range according to the type of work W. The setting values of the 2D region M1 and the 3D region M2 based on the ROI designation are stored in the setting storage unit 44.
[0042] As shown in FIG. 6B, the luminance calculation unit 433 extracts a predetermined number of luminance data on a data acquisition line G1 arbitrarily set in the 2D region M1. The data acquisition line G1 may be only one line or may be multiple lines. FIG. 6C is a graph showing luminance data extracted at an arbitrary pitch along the data acquisition line G1. Although the normal reflected light RT is a reflected light of the non-directional normal illumination light TL, the luminance data on the data acquisition line G1 has a certain degree of variation in luminance value. The luminance calculation unit 433 performs a process to obtain, for example, the average value, maximum value, or median value of the extracted luminance data group to derive one piece of luminance data. This luminance data becomes the two-dimensional data of the target position N.
[0043] As shown in FIG. 6(D), the height calculation unit 432 extracts a predetermined number of luminance data on a data acquisition line G2 that crosses the luminance data D12 corresponding to the highest position of the workpiece W in the x direction in the 3D region M2. FIG. 6(E) is a graph showing luminance data extracted at an arbitrary pitch along the data acquisition line G2. In the waveform of this luminance data, a peak value TD of the luminance data D12 that is raised by the luminance component of the normal reflected light RT appears. The peak value TD becomes luminance data that accurately represents the height h of the workpiece W. The height calculation unit 432 obtains the peak value TD by, for example, center of gravity calculation or phase calculation, and sets it as the height position of the luminance data D12. Similarly, the peak value of the luminance data D11 is also obtained, and sets it as the height reference position of h=0. Based on each peak value of the luminance data D11 and D12 obtained in this way, the height calculation unit 432 obtains the height of the attention position N by the light section method, thereby acquiring three-dimensional data.
[0044] [Data derivation process flow] 7 is a flowchart showing a process of deriving two-dimensional data and three-dimensional data of a workpiece W using the workpiece measurement device 1 of this embodiment. When starting measurement of the workpiece W, the ROI setting unit 434 specifies the ROI of the image sensor 41 (step S1). If the height of the workpiece W is estimated in advance, this ROI specification leads to the setting of the above-mentioned 2D region M1 and 3D region M2. The setting of the ranges of the 2D region M1 and 3D region M2 may be stored in the setting storage unit 44 in advance, and the setting may be read out in step S1.
[0045] Next, the workpiece W is scanned (step S2). During scanning, the light source control unit 62 of the control unit 6 simultaneously turns on the first light source 2 and the second light source 3 to irradiate the line light SL and the normal illumination light TL onto the workpiece W. The motor control unit 63 operates the movement motor 5 to move the workpiece W in the workpiece feed direction F at a predetermined speed. The camera control unit 61 controls the camera device 4 to continuously capture frame images of the workpiece W in a predetermined camera scale unit. The acquired frame image data is temporarily stored in the image memory 42 (step S3).
[0046] Thereafter, the measurement unit 43 reads out the image data from the image memory 42 and executes a process of deriving the measurement data of the workpiece W. First, the measurement unit 43 sets a position of interest N on the workpiece W (step S4). The surface of the workpiece W is subdivided to set n positions of interest N. Next, the image arrangement unit 431 sets a counter to N=1 and extracts image data of the first position of interest N from each of the frame images in the image memory 42 (step S5). This image data is, for example, image data F3-L3 to F6-L6 shown in Figs. 4A to 4D. Furthermore, the image arrangement unit 431 arranges the extracted image data in chronological order to generate a luminance distribution map M of the position of interest N (step S6). A specific example of the luminance distribution map M is shown in Fig. 5(A).
[0047] Next, the height calculation unit 432 reads the luminance data from the 3D region M2 of the luminance distribution map M (step S7). The 3D region M2 is as illustrated in the luminance distribution map M of FIG. 6(A), and reading the luminance data corresponds to extracting the luminance data along the data acquisition line G2 of FIG. 6(D). Next, the height calculation unit 432 executes a process of obtaining the center position of the line light SL (line reflected light RL) by obtaining the peak value TD of the waveform of the extracted luminance data as illustrated in FIG. 6(E) (step S8). This identifies the position of the height h of the workpiece W. Then, the height calculation unit 432 derives three-dimensional data corresponding to the height of the target position N by the light section method with reference to the height reference position where h=0 (step S9).
[0048] Next, the luminance calculation unit 433 reads luminance data from the 2D region M1 of the luminance distribution map M (step S10). The 3D region M2 is as illustrated in the luminance distribution map M of FIG. 6(A), and reading the luminance data corresponds to extracting the luminance data along the data acquisition line G1 of FIG. 6(B). Next, the luminance calculation unit 433 derives two-dimensional data corresponding to the luminance of the attention position N by, for example, calculating the average value of the extracted luminance data (step S11). The three-dimensional data and two-dimensional data derived in steps S9 and S11, respectively, are transferred to the control unit 6 and stored in the data storage unit 64 (step S12).
[0049] Next, the measurement unit 43 determines whether or not the counter indicating the number of processed positions of interest N has reached n set in step S4, that is, whether or not N=n is satisfied (step S13). If N=n is not satisfied (NO in step S13), the measurement unit 43 increments the counter as N=N+1 (step S14), and returns to step S5 to execute the same process for the next position of interest N. On the other hand, if N=n is satisfied (YES in step S13), the measurement unit 43 ends the process.
[0050] As described above, according to the workpiece measuring device 1 of this embodiment, three-dimensional data of the workpiece W can be obtained by the light section method by capturing an image of the line reflected light RL obtained by irradiating the workpiece W with the line light SL of the first light source 2. In addition, two-dimensional data of the workpiece W can be obtained by capturing an image of the normal reflected light RT obtained by irradiating the workpiece W with the normal illumination light TL of the second light source 3. The control unit 6 causes the camera device 4 to perform an imaging operation while moving the workpiece W and turning on the first light source 2 and the second light source 3 simultaneously. Therefore, the camera device 4 can acquire frame images from which both two-dimensional and three-dimensional measurement data can be extracted.
[0051] The luminance distribution map M of the attention position N created from the acquired frame image group is luminance information based on the line reflected light RL and the normal reflected light RT, and is luminance distribution information including two-dimensional and three-dimensional information about the attention position N. Therefore, two-dimensional data and three-dimensional data of the attention position N can be derived from the luminance distribution map M. In this way, according to the workpiece measuring device 1 of this embodiment, the two-dimensional data and three-dimensional data of the workpiece W can be obtained by a single scanning operation of the workpiece W using one camera device 4. Therefore, the workpiece W can be measured with good operability and without complicating the device.
[0052] [Variations] 8(A) to (D) are diagrams for explaining a process of deriving two-dimensional data and three-dimensional data of a workpiece W from a luminance distribution map MA according to a modified example. In the modified example, an example is shown in which the measurement unit 43 calculates an average luminance value of the luminance distribution map MA to obtain two-dimensional data when a 3D region in the luminance distribution map MA is set to a region wider than a predetermined region width.
[0053] As shown in FIG. 8(A), the range of the 3D region in the profile direction (x direction) in the brightness distribution map MA according to the modified example is set wider than the range of the 3D region in FIG. 6(A). The range of the 3D region can be expanded by the ROI setting unit 434 specifying a wider ROI in the work feed direction F. Expanding the 3D region increases the range of the height measurement of the workpiece W. Therefore, it is possible to measure the brightness data D12A that appears at a position considerably separated on the brightness distribution map MA from the brightness data D11 based on the height. In other words, it is possible to measure the height of a taller workpiece W.
[0054] In the case of the luminance distribution map MA in which the height range of the 3D region is sufficiently large, for example, when the range in the profile direction of the 3D region is set to about 2 to 5 times that of the 2D region, the component of the line light SL (line reflected light RL) becomes relatively small in the image captured by the camera device 4. Therefore, the average luminance value of the luminance distribution map MA approximates the luminance data corresponding to the two-dimensional data.
[0055] Based on the above knowledge, in a modified example, as shown in Fig. 8(B), the measurement unit 43 extracts luminance data at an arbitrary pitch along a data acquisition line G3 that crosses the luminance data D12 in the x direction. Fig. 8(C) is a graph showing the distribution of the extracted luminance data in the x direction. The luminance calculation unit 433 calculates the average luminance value of the multiple luminance data extracted along the data acquisition line G3. This average luminance value is treated as two-dimensional data approximately derived for the target position N of the workpiece W.
[0056] The height calculation unit 432 uses a plurality of luminance data extracted along the data acquisition line G3 to create a graph showing luminance data as shown in Fig. 8(D). The height calculation unit 432 then obtains the peak value TD of the luminance data D12 in the same manner as in the above-described embodiment, and obtains the height of the position of interest N by the light section method to obtain three-dimensional data. According to this modified example, two-dimensional data and three-dimensional data can be derived by extracting luminance data along one data acquisition line G3, so that the measurement work can be simplified.
[0057] [Inventions included in the above embodiments] According to one aspect of the present invention, there is provided a work measurement device comprising: a first light source which irradiates a line light onto a work to be measured; a second light source which irradiates normal illumination light onto the work; an imaging unit capable of acquiring images of the work and its surroundings irradiated with the line light and the normal illumination light; a moving mechanism which moves the work relatively in a predetermined feed direction; a control unit which controls operation of the imaging unit, the first light source, the second light source, and the moving mechanism; and a measurement unit which obtains two-dimensional data and three-dimensional data for the work based on the images acquired by the imaging unit. The control unit moves the work using the moving mechanism while causing the imaging unit to perform an imaging operation of the work in a predetermined camera scale unit with the first light source and the second light source turned on simultaneously. The measurement unit extracts image data corresponding to a position of interest of the work from each of the images sequentially captured in the camera scale unit, and arranges the extracted image data in chronological order to generate a brightness distribution map of the position of interest. Based on the brightness distribution map, the two-dimensional data and three-dimensional data of the position of interest are derived.
[0058] A work measurement method according to another aspect of the present invention is a work measurement method for acquiring two-dimensional data and three-dimensional data of a work to be measured, in which the work is moved relatively while line light and normal illumination light are simultaneously irradiated onto the work, images of the work are acquired in a predetermined camera scale unit, image data corresponding to a position of interest on the work is extracted from each of the images captured sequentially in the camera scale unit, the extracted image data is arranged in chronological order to generate a brightness distribution map of the position of interest, and the two-dimensional data and three-dimensional data of the position of interest are derived based on the brightness distribution map.
[0059] According to the above-mentioned workpiece measuring device or measuring method, three-dimensional data of the workpiece can be obtained by the light section method by having the imaging unit capture the reflected light of the line light of the first light source irradiated onto the workpiece. Also, two-dimensional data of the workpiece can be obtained by having the imaging unit capture the reflected light of the normal illumination light of the second light source irradiated onto the workpiece. The normal illumination light is non-directional illumination light capable of irradiating the workpiece with light rays from all directions. Then, the control unit causes the imaging unit to perform an imaging operation while simultaneously turning on the first light source and the second light source. Therefore, the imaging unit can obtain images from which two-dimensional and three-dimensional measurement data can be extracted for each imaging along the camera scale unit.
[0060] Furthermore, the measurement unit extracts image data corresponding to the position of interest of the workpiece from each of the images captured sequentially while moving the workpiece. The extracted image data is arranged in chronological order to generate a luminance distribution map of the position of interest. This luminance distribution map is luminance information based on the reflected light of the line light and the normal illumination light, and is luminance distribution information including two-dimensional and three-dimensional information about a certain position of interest. Therefore, two-dimensional data and three-dimensional data of the position of interest can be derived from the luminance distribution map. In this way, according to the workpiece measuring device or measuring method of the present invention, it is possible to obtain two-dimensional data and three-dimensional data of the workpiece by a single scanning operation of the workpiece using one imaging unit. Therefore, the workpiece can be measured with good operability and without complicating the device.
[0061] In the above-mentioned work measurement device, it is desirable that the measurement unit sets an area in the brightness distribution map in which height information based on the line light appears as a 3D area for acquiring the three-dimensional data, and other areas as 2D areas for acquiring the two-dimensional data.
[0062] According to this workpiece measuring device, a 2D region is set outside the region in which height information appears in the brightness distribution map, so that two-dimensional data and three-dimensional data can be reliably and sharply distinguished from each other and acquired.
[0063] In the above-mentioned workpiece measuring device, it is desirable that the measuring unit obtains the three-dimensional data by determining the height of the position of interest by a light-section method based on information of the 3D area, and obtains the two-dimensional data of the position of interest based on brightness data of the 2D area.
[0064] This workpiece measuring device makes it possible to obtain the three-dimensional shape of a position of interest based on the light-section method, and to obtain the color, pattern, etc. of the position of interest based on the brightness data.
[0065] In the above-mentioned workpiece measuring device, when the 3D region in the brightness distribution map is set to a region wider than a predetermined region width, it is desirable that the measurement unit calculates an average brightness value of the brightness distribution map to obtain the two-dimensional data.
[0066] When the height range of the 3D region in the brightness distribution map is sufficiently large, the line light component in the captured image becomes relatively small. Therefore, the average brightness value of the brightness distribution map approximates the brightness data corresponding to the two-dimensional data. According to the above-mentioned workpiece measuring device, it is possible to simplify the derivation of the two-dimensional data.
[0067] In the above-mentioned work measurement device, the imaging unit is equipped with an imaging element having pixels arranged in a matrix, and the measurement unit is capable of specifying an ROI to be used, which specifies a portion of the entire image area acquired by the imaging element, and the 3D region can be set based on the range of the ROI specification.
[0068] According to this workpiece measuring device, the range of the ROI designation can be appropriately adjusted according to the expected height of the workpiece, etc., thereby making it possible to accurately obtain three-dimensional data of the workpiece. [Explanation of symbols]
[0069] 1 Workpiece measuring device 2 1st light source 3 Second light source 4 Camera device (imaging section) 41 Image sensor 43 Measurement section 431 Image Alignment Section 432 Height Calculation Unit 433 Luminance Calculation Unit 434 ROI setting section 5. Movement motor (movement mechanism) 6 Control Unit 6 F Work feed direction SL Line Light TL Normal illumination light RL Line Reflector RT Normal reflected light Double work N Point of interest M Luminance distribution map
Claims
1. a first light source that irradiates a line of light onto a workpiece to be measured; A second light source that irradiates normal illumination light onto the workpiece; an imaging unit capable of acquiring an image of the workpiece and its surroundings irradiated with the line light and the normal illumination light; A moving mechanism that relatively moves the workpiece in a predetermined feed direction; a control unit that controls operations of the imaging unit, the first light source, the second light source, and the moving mechanism; A measurement unit that obtains two-dimensional data and three-dimensional data about the workpiece based on the image acquired by the imaging unit, The control unit causes the imaging unit to perform an imaging operation of the workpiece in a predetermined camera scale unit while the first light source and the second light source are simultaneously turned on, while the workpiece is moved by the moving mechanism, The measurement unit is Image data corresponding to a position of interest of the workpiece is extracted from each of the images sequentially captured in the camera scale unit, and the extracted image data is arranged in chronological order to generate a brightness distribution map of the position of interest; The workpiece measuring device derives two-dimensional data and three-dimensional data of the position of interest based on the brightness distribution map.
2. 2. The workpiece measuring device according to claim 1, The measurement unit sets the area in the brightness distribution map where height information based on the line light appears as a 3D area for acquiring the three-dimensional data, and other areas as 2D areas for acquiring the two-dimensional data, in a work measurement device.
3. 3. The workpiece measuring device according to claim 2, The measurement unit obtains the three-dimensional data by determining the height of the position of interest using a light cutting method based on information of the 3D area, and obtains the two-dimensional data of the position of interest based on brightness data of the 2D area.
4. 4. The workpiece measuring device according to claim 2, The measurement unit calculates an average brightness value of the brightness distribution map to obtain the two-dimensional data when the 3D region in the brightness distribution map is set to a region wider than a predetermined region width.
5. In the workpiece measuring device according to any one of claims 2 to 4, the imaging unit includes an imaging element in which pixels are arranged in a matrix; The measurement unit is capable of designating an ROI (Region of Interest) to be used, the ROI designating a portion of an entire image area acquired by the imaging element; A workpiece measuring device, wherein the 3D area is set based on a specified ROI range.
6. A workpiece measurement method for acquiring two-dimensional data and three-dimensional data of a workpiece to be measured, comprising the steps of: While moving the workpiece relative to the camera, an image of the workpiece is acquired in a predetermined camera scale unit while the line light and the normal illumination light are simultaneously irradiated onto the workpiece. Image data corresponding to a position of interest of the workpiece is extracted from each of the images sequentially captured in the camera scale unit, and the extracted image data is arranged in chronological order to generate a brightness distribution map of the position of interest; A workpiece measuring method, comprising: deriving two-dimensional data and three-dimensional data of the position of interest based on the brightness distribution map.
Citation Information
Patent Citations
Three-dimensional model generation device, three-dimensional model generation system, and three-dimensional model generation program
JP2006162386A
Shape measuring instrument
JP2009068986A
Inspection method and visual inspection apparatus
JP2013242257A
Measurement device
JP2015105883A
Device and method of combining measurement signals from illumination signals
US20190026877A1