Optical displacement meter

By using the relative movement of slit light to the workpiece and the image sensor to detect the cluster inclination of the peak position candidates in the optical displacement meter, the noise interference caused by multiple reflections is solved, and the accuracy of workpiece profile measurement is improved.

CN118960606APending Publication Date: 2024-11-15KEYENCE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411029075.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-04-18
Filing Date
2024-07-30
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

It is difficult to accurately measure the profile of the workpiece under multiple reflections, resulting in noise interference and affecting the measurement accuracy.

Method used

By moving relative to the slit light extending in the X direction and the workpiece, the image sensor receives reflected light and generates a light-receiving image. The control unit detects peak position candidates based on the light-receiving amount distribution of the light-receiving image, forms a cluster, and according to the inclination of the cluster Degree determines whether noise is included, thereby generating outline data of the workpiece.

Benefits of technology

It effectively suppresses noise interference caused by multiple reflections, improves the accuracy of workpiece shape measurement, and ensures accurate contour measurement in the case of multiple reflections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118960606A_ABST
    Figure CN118960606A_ABST
Patent Text Reader

Abstract

The invention relates to an optical displacement meter which suppresses noise caused by multiple reflections when a workpiece moving relatively is irradiated with slit light extending in the X direction to measure the shape of the workpiece. The control unit controls the image sensor so as to sequentially acquire a plurality of light-receiving images in accordance with the relative movement of the workpiece, detects peak position candidates in the V direction (a direction orthogonal to the U direction) for each position in the U direction (a direction corresponding to the X direction) on the basis of the light-receiving amount distribution of the light-receiving images for each light-receiving image, and determines the peak position candidates in the V direction (a direction orthogonal to the U direction) for each position in the U direction. Generating one or more clusters composed of a plurality of peak position candidates selected such that the distance between the peak position candidate of any light-receiving image and the peak position candidate of another light-receiving image is equal to or less than a certain distance, and generating one or more light-receiving images on the basis of the inclination of the clusters with respect to the direction of the relative movement. A determination is performed as to whether noise is included in the cluster, and contour data of the workpiece is generated based on a result of the determination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an optical displacement meter for detecting the displacement of a measurement object by a triangulation distance measurement method. Background Art

[0002] In a light-cutting optical displacement meter, a strip of light with a linear cross section is irradiated from a light-projecting portion onto a measurement object (hereinafter referred to as a workpiece), and its reflected light is received by a two-dimensional light-receiving element. The contour of the workpiece is measured based on the position of the peak of the light receiving amount distribution obtained by the light-receiving element. Here, the light irradiated onto the workpiece is sometimes reflected multiple times on the surface of the workpiece. In this case, since multiple peaks appear in the light receiving amount distribution due to the multiple reflected light entering the light-receiving element, it is impossible to measure the accurate contour of the workpiece. The same problem also occurs when light (interference light) other than the light-projecting portion enters the light-receiving element, or when light reflected from a portion of the workpiece other than the measurement object enters the light-receiving element.

[0003] Prior art literature

[0004] Patent Literature

[0005] Patent Document 1: Japanese Patent Application Publication No. 2020-270536 Summary of the invention

[0006] Problem that the invention aims to solve

[0007] The noise caused by multiple reflections is generated and observed in units of light-receiving images. The optical displacement meter disclosed in Patent Document 1 uses a light-receiving image itself to distinguish the true peak position from the noise caused by multiple reflections based on the positional relationship between peak candidates in the U direction corresponding to the X direction (the direction in which the slit light is extended).

[0008] The inventors of the present invention have conducted various studies on the noise caused by multiple reflections and found that when a three-dimensional image is obtained by acquiring multiple light-receiving images and multiple contours in a scanning direction through relative movement between an optical displacement meter and a workpiece, it is possible to distinguish the true peak position from the noise caused by multiple reflections based on the positional relationship between the peak candidates in the scanning direction.

[0009] An object of the present invention is to provide a new method for suppressing noise due to multiple reflection when measuring the shape of a workpiece by irradiating a slit light extending in the X direction onto the workpiece that is relatively moving in a direction intersecting the X direction.

[0010] Solutions for solving problems

[0011] An optical displacement meter according to one aspect of the present invention comprises: a light projecting unit that irradiates a slit light extending along the X direction toward a workpiece that is relatively moving along a direction intersecting the X direction; an image sensor that has a plurality of pixels arranged two-dimensionally in a U direction corresponding to the X direction and in a V direction orthogonal to the U direction, the image sensor receiving reflected light reflected by the workpiece using the plurality of pixels and outputting a light-receiving image representing a distribution of light-receiving amounts; and a control unit that generates contour data of the workpiece based on the light-receiving image and measures a shape of the workpiece based on the contour data. The control unit controls the image sensor to sequentially acquire the plurality of light-receiving images along with the relative movement, and the control unit detects peak position candidates in the V direction for each position in the U direction based on the light-receiving amount distribution of the light-receiving image for each light-receiving image, and for each position in the U direction, the control unit generates one or more clusters consisting of a plurality of peak position candidates, and the plurality of peak position candidates are selected so that the distance between a peak position candidate of any light-receiving image and a peak position candidate of other light-receiving images is less than a certain distance, and the control unit performs a determination as to whether noise is contained in the cluster based on an inclination of the cluster with respect to the direction of the relative movement, and the control unit generates the contour data based on a result of the determination.

[0012] An optical displacement meter according to another aspect of the present invention comprises: a light projecting unit that irradiates a slit light extending along the X direction toward a workpiece that is relatively moving along a direction intersecting the X direction; an image sensor that has a plurality of pixels arranged two-dimensionally in a U direction corresponding to the X direction and in a V direction orthogonal to the U direction, the image sensor receiving reflected light reflected by the workpiece using the plurality of pixels and outputting a light-receiving image representing a distribution of light-receiving amounts; and a control unit that generates contour data of the workpiece based on the light-receiving image and measures a shape of the workpiece based on the contour data. The control unit controls the image sensor to sequentially acquire a plurality of light-receiving images along with the relative movement, the control unit detects a peak position candidate in the V direction for each position in the U direction based on a light-receiving amount distribution of the light-receiving image for each of the light-receiving images, the control unit transforms UV coordinate information including each position in the U direction and the peak position candidate in the V direction at each position in the U direction, and information related to the relative movement into XYZ coordinate information including a peak position candidate in the Z direction corresponding to each XY coordinate based on a predetermined coordinate transformation condition, the control unit generates one or more clusters consisting of a plurality of peak position candidates for each position in the X-axis direction of the XYZ coordinate information, the plurality of peak position candidates being selected such that a distance between a peak position candidate at an arbitrary position in the Y-axis direction and a peak position candidate at another position in the Y-axis direction is less than a certain distance, the control unit performs a determination as to whether noise is included in the cluster based on an inclination of the cluster with respect to the Y-axis direction, and the control unit generates the profile data based on a result of the determination.

[0013] Furthermore, other features, elements, steps, advantages, and characteristics will become more apparent from the following embodiments of the present invention and the accompanying drawings related thereto.

[0014] Effects of the Invention

[0015] According to the optical displacement meter of the present invention, it is possible to provide a new method for suppressing noise due to multiple reflection when measuring the shape of a workpiece by irradiating slit light extending in the X direction onto the workpiece that is relatively moving in a direction intersecting the X direction. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a diagram for explaining the optical displacement measuring system according to the first embodiment.

[0017] Figure 2 This is a diagram for explaining the measurement range of the rotary optical displacement meter.

[0018] Figure 3It is a diagram for explaining an optical displacement meter including a reflecting member.

[0019] Figure 4 It is a diagram for explaining the method of detecting the peak position.

[0020] Figure 5 This is a functional block diagram of an optical displacement meter.

[0021] Fig. 6A It is a schematic diagram showing the true height of the workpiece and the height that may be misperceived.

[0022] Figure 6B It is a schematic diagram showing the true height of the workpiece and the height that may be misperceived.

[0023] Figure 6C It is a schematic diagram showing the true height of the workpiece and the height that may be misperceived.

[0024] Figure 7 This is contour data obtained by summarizing the height of the workpiece at each position in the Y direction.

[0025] Figure 8 1 is a diagram showing a processing flow of a measurement operation of the optical displacement measurement system.

[0026] Fig. 9A is a diagram showing two-dimensional data of a peak candidate group.

[0027] Fig. 9B 2D data of peak candidate groups divided into clusters are shown in FIG.

[0028] Fig. 9C 2 is a diagram showing the corrected two-dimensional data of the peak candidate group divided into clusters.

[0029] Fig.9D 2 is a diagram showing the corrected two-dimensional data of the peak candidate group divided into clusters.

[0030] Fig.9E is a diagram showing two clusters with different inclinations.

[0031] Fig.9F is a diagram showing two clusters with different inclinations.

[0032] Figure 9G is a diagram showing two clusters with different inclinations.

[0033] Fig.10 This is a diagram showing another processing flow of the measurement operation of the optical displacement measuring system.

[0034] Fig.11 It is a diagram for explaining the optical displacement measuring system according to the second embodiment.

[0035] Fig.12 It is a diagram illustrating the principle of triangulation.

[0036] Fig.13 It is a diagram for explaining the method of detecting the peak position.

[0037] Fig.14 This is a functional block diagram of an optical displacement meter.

[0038] Fig.15 It is a schematic diagram showing the true height of the workpiece and the height that may be misperceived.

[0039] Fig.16 This is contour data obtained by summarizing the height of the workpiece at each position in the Y direction.

[0040] Fig.17 It is a diagram showing a modified example of the optical displacement meter. DETAILED DESCRIPTION

[0041] Hereinafter, embodiments of the present invention will be described in detail based on the drawings. Note that the following description of preferred embodiments is merely illustrative in nature, and the present invention is not intended to limit its application or use.

[0042] <<First Embodiment>>

[0043] <Optical displacement measurement system>

[0044] Figure 1 It is a diagram showing a schematic configuration example of the optical displacement measuring system according to the first embodiment. Figure 1 The optical displacement measuring system 100 shown includes an optical displacement meter 1 , a control device 2 , a display device 3 , and an input device 4 .

[0045] In this embodiment, the X direction corresponds to the width direction of the slit light L1 output from the optical displacement meter 1, the Z direction corresponds to the height direction of the workpiece W, and the Y direction corresponds to the direction of the slit light L1 passing through the light projection unit (in Figure 1 The XZ plane described later is a plane extending along the X direction and the Z direction. In addition, the optical displacement meter 1 scans the slit light L1 by rotating the light-projecting and light-receiving module 20, so the scanning direction of the slit light L1 is a direction orthogonal to the X direction on the YZ plane, including the Y direction. In addition, in this specification, "rotation" means reciprocating swinging motion centered on the rotation axis.

[0046] The optical displacement measurement system 100 is a system for measuring the contour and three-dimensional shape of a workpiece W. The contour of the workpiece W refers to data indicating the outer edge of a cross-section surface of the workpiece W generated by the slit light L1. When the slit light is irradiated parallel to the XZ plane, the contour of the workpiece W becomes data indicating the outer edge of the cross-section surface parallel to the XZ plane, and is therefore also referred to as a two-dimensional contour of the XZ cross section of the workpiece W.

[0047] For example, a contour is a collection of (xi, zi) (i is an index). xi represents the position in the X direction. zi represents the height in the Z direction. In addition, a three-dimensional shape is a collection of (xi, yi, zi). yi represents the position in the Y direction.

[0048] The optical displacement meter 1 operates according to the instruction from the control device 2. The optical displacement meter 1 outputs the slit light L1 extending in the X direction and receives the reflected light L2 from the workpiece W. Moreover, the optical displacement meter 1 calculates the contour of the workpiece W based on the light reception result. The optical displacement meter 1 performs imaging at regular intervals to generate the contours of different workpieces W. In addition, the optical displacement meter 1 generates the three-dimensional shape data of the workpiece W based on the contours of different workpieces W.

[0049] The control device 2 outputs instructions based on user input received by the input device 4 to the optical displacement meter 1, and receives measurement results of the workpiece W from the optical displacement meter 1. The control device 2 also outputs display signals to the display device 3. The control device 2 is, for example, a personal computer or a programmable logic controller.

[0050] The display device 3 displays, for example, the measurement result of the workpiece W, a UI (User Interface) for setting the optical displacement meter 1 , and the like based on a display signal from the control device 2 .

[0051] The input device 4 receives user input to the optical displacement measuring system 100. Figure 1 In FIG. 4 , a keyboard and a mouse are illustrated as the input device 4 . However, the input device 4 is not limited to a keyboard and a mouse. For example, the input device 4 may be a touch panel disposed on the display screen of the display device 3 .

[0052] Figure 2 1 is a diagram for explaining the measurement range of the rotary optical displacement meter 1. A light projecting unit 11, a light receiving lens 12, and an imaging unit 13 are accommodated inside a housing 10 of the optical displacement meter 1. The light projecting unit 11 includes a light source 14 and a light projecting lens 15. For example, the light source 14 is a laser beam emitter, and the light projecting lens 15 may also be composed of a plurality of lenses including a cylindrical lens.

[0053] The light output from the light source 14 is converted into the slit light L1 by passing through the light projection lens 15. The housing 10 is provided with a light projection window 16 having light transmittance through which the slit light L1 passes. Similarly, the housing 10 is provided with a light receiving window 17 having light transmittance through which the reflected light L2 passes. The light projection window 16 and the light receiving window 17 are separate (different components). By separating the light projection window 16 and the light receiving window 17, the light projection window 16 and the light receiving window 17 are respectively flat-plate-shaped components, thereby facilitating the manufacture of the light projection window 16 and the light receiving window 17. However, the light projection window 16 and the light receiving window 17 may also be integrated (one component).

[0054] The light receiving lens 12 is a lens for converging the reflected light L2 and forming an image on the light receiving surface of the imaging unit 13. The light receiving lens 12 may be a structure including only one lens or a structure including a plurality of lenses. In addition, the light receiving lens 12 may also be a structure including optical components other than lenses (such as optical filters, etc.). The imaging unit 13 is an image sensor having a plurality of photoelectric conversion elements arranged in a two-dimensional manner. The imaging unit 13 receives the light that has been converged by the light receiving lens.

[0055] like Figure 2 As shown, the optical axis AX2 of the light receiving lens 12 is inclined relative to the light projection axis AX1 of the light projecting unit 11. The light projection axis AX1 of the light projecting unit 11 is consistent with the optical axis of the light source 14. As a result, the reflected light L2 from the height Z1 is imaged at the position V1 in the V direction of the light receiving surface of the imaging unit 13, and the reflected light L2 from the height Z2 is imaged at the position V2 in the V direction of the light receiving surface of the imaging unit 13. In other words, the V direction of the light receiving surface of the imaging unit 13 corresponds to the Z direction of the workpiece W. Although the U direction of the light receiving surface of the imaging unit 13 is not shown in the figure, the U direction corresponds to the X direction of the workpiece W. In other words, the longitudinal direction of the light receiving image representing the light receiving amount distribution output by the imaging unit 13 is the V direction, and the lateral direction is the U direction.

[0056] The light projecting unit 11, the light receiving lens 12, and the camera unit 13 can rotate around the rotation axis AX3 along the X direction. The relative positions of the light projecting unit 11, the light receiving lens 12, and the camera unit 13 are fixed. For example, the light projecting unit 11, the light receiving lens, and the camera unit 13 are arranged and fixed to a supporting member (not shown) in a state where the relative positions are fixed. Figure 2 In the figure, the solid line shows the state of the light projecting unit 11, the light receiving lens 12 and the camera unit 13 before rotating in the counterclockwise direction CCW, and the dotted line shows the state of the light projecting unit 11, the light receiving lens 12 and the camera unit 13 after rotating in the counterclockwise direction CCW.

[0057] By means of the motor 21 (see below) Figure 5) is limited in its rotation range, and the rotation ranges of the light projecting unit 11, the light receiving lens 12, and the camera unit 13 are also limited. The limitation of the rotation range of the motor 21 can be achieved, for example, by controlling the motor 21 or by physically blocking the light projecting and light receiving module 20 (see below). Figure 5 )'s movement is achieved by a stopper.

[0058] At one end of the rotation range of the motor 21, the light receiving window 17 is separated from and closest to the end of the light receiving unit 18 on the workpiece W side having the light receiving lens 12 and the camera unit 13, and the inner wall of the housing 10 is separated from the light projecting unit 11. At the other end of the rotation range of the motor 21, the light projecting window 16 is separated from and closest to the end of the light projecting unit 11 on the workpiece W side, and the inner wall of the housing 10 is separated from the light receiving unit 18. Thus, the contact between the light receiving window 17 and the light receiving unit 18 and the contact between the light projecting window 16 and the light projecting unit 11 can be avoided, and the housing 10 can be miniaturized.

[0059] The light projecting unit 11, the light receiving lens 12, and the imaging unit 13 can rotate around the rotation axis AX3 along the X direction in a state where the light receiving surface of the imaging unit 13 is tilted relative to the optical axis of the light receiving lens 12 and satisfies Scham's law. Figure 2 In the area R1 shown by the grid in the figure, each cross section through which the projection axis AX1 passes is focused. That is, even if the height of the workpiece W changes, the optical displacement meter 1 can generate the outline of the workpiece W in focus. Therefore, it is sufficient to set the area R1 as the measurement range of the slit light L1. In other words, the measurement range of the slit light L1 can be set by the motor 21 (refer to the later described Figure 5 ) can be formed by the range within which the relationship of Scham's law holds.

[0060] In addition, the positional relationship between the light projecting unit 11, the light receiving lens 12, and the imaging unit 13 may also be different from Figure 2 The positional relationship shown is reversed.

[0061] In addition, if Figure 3 As shown, the optical displacement meter 1 may also be provided with a reflecting component 19. In the case where the optical displacement meter 1 is provided with the reflecting component 19, the light receiving unit 18 is a structure having a light receiving lens 12, an imaging unit 13 and a reflecting component 19. The reflecting component 19 is provided on the optical path between the light receiving window 17 and the imaging unit 13, and is used to bend the reflected light L2 and the optical axis AX2 of the light receiving lens 12 back to the light projecting unit 11 side. Thus, a light projecting and light receiving module that integrally holds the light projecting unit 11, the light receiving lens 12, the imaging unit 13 and the reflecting component 19 can be compactly constructed on a YZ plane extending along the Y direction and the Z direction. Therefore, the moment of inertia of the light projecting and light receiving module that integrally holds the light projecting unit 11, the light receiving lens 12, the imaging unit 13 and the reflecting component 19 around the rotation axis AX3 can be reduced.

[0062] exist Figure 3 In the embodiment, the reflecting member 19 is provided on the optical path between the light receiving lens 12 and the imaging unit 13 , but the reflecting member 19 may be provided on the optical path between the light receiving window 17 and the light receiving lens 12 .

[0063] When the reflective member 19 is disposed on the optical path between the light receiving lens 12 and the imaging unit 13, the reflective member 19 reflects the light converged by the light receiving lens 12, so that the area of ​​the reflective surface of the reflective member 19 can be reduced. When the reflective member 19 is disposed on the optical path between the light receiving window 17 and the light receiving lens 12, the heavy light receiving lens 12 can be arranged close to the rotation axis AX3, thereby increasing the effect of reducing the moment of inertia.

[0064] <Position (calculation of height)>

[0065] Figure 4 This is a diagram for explaining a method of calculating the height of the contour based on the image I1 as the light receiving result output by the imaging unit 13. The slit light L1 has a certain width in the Y direction. Therefore, the width of the spot generated by the reflected light L2 on the light receiving surface of the imaging unit 13 is also as wide as that across a plurality of photoelectric conversion elements.

[0066] Therefore, the optical displacement meter 1 obtains an approximate curve P1 representing the change in brightness value based on the brightness value of each pixel, and calculates the position of the peak in the approximate curve P1 in the V direction. Figure 4 In the figure, the leftmost column is the focus column, and the distribution of the brightness value of the focus column is illustrated (approximate curve P1). The approximate curve P1 is obtained by performing curve fitting on multiple sampling values. Sampling values ​​that are less than the detection threshold are not considered. The position where the peak occurs in the V direction represents the height of the workpiece W. The optical displacement meter 1 obtains the approximate curve P1 at each position (each pixel column) in the U direction, and calculates the position (height) of the peak in the V direction based on the approximate curve P1. By performing this operation processing for each position in the U direction, a contour can be obtained. Such an operation processing can also be called sub-pixel processing.

[0067] In addition, for example, by calibrating before shipment, coordinate transformation conditions (e.g., coordinate transformation table) are generated, which represent the correspondence between the UV coordinates and the rotation angle θ and the local coordinates (X, Y, Z), as represented by (U, V, θ) = (X, Y, Z), and the coordinate transformation conditions are stored in the storage unit (not shown) of the optical displacement meter 1, so that the optical displacement meter 1 can transform the contour in the UV coordinate system into the XYZ coordinate system based on the rotation angle θ by simple calculation. In addition, in the coordinate transformation, equal interval correction in the X direction and the Y direction may be performed by plotting the positions in the X direction and the Y direction at equal intervals, and Z corresponding to the corrected (X, Y) may be obtained by linear interpolation or the like, and output as a measurement result. In many cases, the image processing performed on the measurement result is based on data obtained by sampling at equal intervals in the X direction and the Y direction, so it is easy to perform subsequent image processing by equal interval correction.

[0068] <Function Block>

[0069] Figure 5 1 is a functional block diagram of the optical displacement meter 1. The optical displacement meter 1 includes a light projecting and receiving module 20, a motor 21, and a control unit 22.

[0070] The light projecting and receiving module 20 integrally holds the light projecting unit 11, the light receiving lens 12, and the imaging unit 13. In addition, when the optical displacement meter 1 includes the reflecting member 19, the light projecting and receiving module 20 integrally holds the light projecting unit 11, the light receiving lens 12, the imaging unit 13, and the reflecting member 19 (in Figure 5 (not shown) are maintained integrally.

[0071] The motor 21 rotates the light projecting unit 11, the light receiving lens 12, and the camera unit 13. More specifically, the motor 21 rotates the light projecting and light receiving module 20. The motor 21 can rotate the light projecting and light receiving module 20 by a direct drive method without configuring an intermediate mechanism such as a speed reducer between the motor 21 and the light projecting and light receiving module 20, or can rotate the light projecting and light receiving module 20 via an intermediate mechanism such as a speed reducer.

[0072] The control unit 22 includes a motor control unit 23, a signal processing unit 24, and a communication unit 25. The control unit 22 controls the motor 21 to rotate the light projecting unit 11, the light receiving lens 12, and the imaging unit 13 in a state satisfying the relationship of Scham's law, so that the slit light L1 is scanned in a direction intersecting the X direction. More specifically, the motor control unit 23 controls the motor 21 to rotate the light projecting unit 11, the light receiving lens 12, and the imaging unit 13 in a state satisfying the relationship of Scham's law, and the signal processing unit 24 controls the light projecting unit 11 to irradiate the slit light L1 from the light projecting unit 11.

[0073] The signal processing unit 24 includes a peak detection unit 241 , a profile generation unit 242 , a three-dimensional data generation unit 243 , a check unit 244 , and a setting unit 245 .

[0074] The peak detection unit 241 detects the position (peak position) of the peak of the brightness value in the V direction based on the light reception result output from the imaging unit 13. The contour generation unit 242 generates one contour data by summing up the heights (zi) at each position (xi) in the X direction of the workpiece W obtained by the peak detection unit 241. The three-dimensional data generation unit 243 generates three-dimensional shape data of the workpiece W based on the contours of the different workpieces W generated by the contour generation unit 242.

[0075] The inspection unit 244 inspects the workpiece W based on the three-dimensional shape data of the workpiece W generated by the three-dimensional data generating unit 243. The inspection unit 244 performs predetermined measurements on the three-dimensional shape data of the workpiece W, and inspects the workpiece W based on the measurement results. For example, the inspection unit 244 measures the length, angle, etc. of a predetermined portion of the workpiece W. Then, the inspection unit 244 determines whether the workpiece W is a good product based on these measurement results and a preset threshold value, etc.

[0076] The setting unit 245 is Figure 1 The input device 4 shown is a part that detects the operation when it is operated by the user and accepts various settings related to the control unit 22. For example, the setting unit 245 sets the inspection parameters used in the inspection unit 244. In addition, for example, the setting unit 245 sets the imaging parameters that are the imaging conditions in the imaging unit 13.

[0077] In addition, at least a part of the peak detection unit 241, the profile generation unit 242, the three-dimensional data generation unit 243, the inspection unit 244, and the setting unit 245 may be provided in a place separated from the main body of the optical displacement meter 1 (for example, Figure 1 In this case, the optical displacement meter 1 has a separation structure including a main body of the optical displacement meter 1 and a separation portion of the optical displacement meter 1 .

[0078] The communication unit 25 communicates with the control device 2 by wire or wirelessly. For example, the communication unit 25 receives an instruction from the control device 2 and transmits the instruction to the control unit 22. In addition, the communication unit 25 transmits the contour data and three-dimensional shape data of the workpiece W generated by the signal processing unit 24 and the inspection result of the workpiece W determined by the inspection unit 244 to the control device 2.

[0079] <Countermeasures against stray light>

[0080] Figure 6A to Figure 6C It is a schematic diagram showing the true height of the workpiece W and the height that may be misperceived. Fig. 6A The horizontal surface extending along the Y direction of the workpiece W is measured, and the measurement light reflected by the horizontal surface is not only directly incident on the imaging unit 13, but also further reflected by the vertical surface extending along the Z direction of the workpiece W and then incident on the imaging unit 13. Fig. 6A In the figure, the light projecting unit 11, the light receiving lens 12 and the imaging unit 13 at the first measuring timing of the horizontal surface extending along the Y direction of the workpiece W are shown by solid lines, and the light projecting unit 11, the light receiving lens 12 and the imaging unit 13 at the second measuring timing are shown by dotted lines. Figure 6B and Figure 6C The vertical surface extending in the Z direction of the workpiece W is measured, and the measurement light reflected by the vertical surface is not only directly incident on the imaging unit 13, but also further reflected by the horizontal surface extending in the Y direction of the workpiece W and then incident on the imaging unit 13. Figure 6B The middle figure shows the first measurement timing of the vertical surface of the workpiece W extending in the Z direction. Figure 6C The middle figure shows the second measurement timing of the vertical surface of the workpiece W extending in the Z direction.

[0081] The actual height H1 of the workpiece W hardly changes between the first measurement timing and the second measurement timing. In contrast, the possible misidentified height H2 of the workpiece W caused by the light (stray light) after multiple reflections on the surface of the workpiece W entering the camera unit 13 changes greatly between the first measurement timing and the second measurement timing.

[0082] Therefore, when the workpiece W of the shape shown in FIG. 6 is measured without taking measures against stray light by the peak detection unit 241, the profile data obtained by summarizing the heights (zi) of the workpiece W at each position (yi) in the Y direction at a certain position in the X direction becomes as follows: Figure 7 As shown. Figure 7 It can be seen that the inclination of the possible misidentified height H2 of the workpiece W relative to the Y direction caused by the light (stray light) after multiple reflections on the surface of the workpiece W entering the imaging unit 13 is greater than the inclination of the true height H1 of the workpiece W relative to the Y direction. In the present embodiment, the peak detection unit 241 uses this knowledge to perform stray light countermeasures.

[0083] <Processing Flow>

[0084] Figure 8 1 is a diagram showing the processing flow of the measurement operation of the optical displacement measuring system 100. When the input device 4 receives a user input for instructing the start of measurement, the measurement starts. Figure 8 The processing flow.

[0085] First, in step S1, the light projecting unit 11 starts to irradiate the slit light L1. In the next step S2, the motor control unit 23 starts to rotate the motor 21. In addition, the processing of step S1 and the processing of step S2 can also be performed simultaneously. The motor control unit 23 can also rotate the motor before executing step S1 to move the light projecting and receiving module 20 to a specified scanning start position. Through the processing of step S1 and step S2, the scanning of the slit light L1 starts. When the processing of step S1 and step S2 is completed, the process enters step S3.

[0086] The imaging unit 13 performs imaging at equal time intervals or equal rotation intervals of the motor 21 as an imaging cycle (step S3) to generate a light-receiving image (step S4) with the longitudinal direction being the V direction and the lateral direction being the U direction. When imaging is performed at equal rotation intervals, for example, the position information of the rotation of the motor 21 can be detected using an encoder.

[0087] In the next step S5, the peak detection unit 241 detects a maximum of N (N is a predetermined integer greater than 2) peak candidate positions in the V direction with a predetermined light receiving amount or more at each position in the U direction of the light receiving image. When there are more than N peak candidate positions in the V direction, the N peak candidate positions are detected in descending order of the light receiving amount. In addition, there may be a case where the number of detected peak candidate positions in the V direction is zero.

[0088] The processing of steps S3 to S5 described above is performed in each imaging cycle in which one light-receiving image is captured.

[0089] When the irradiation position of the slit light L1 reaches the scanning end position, the flow proceeds to step S6.

[0090] In step S6, the motor control unit 23 stops the rotation of the motor 21. In the next step S7, the light projecting unit 11 stops the irradiation of the slit light L1. In addition, the processing of step S6 and the processing of step S7 may be performed simultaneously. Through the processing of step S6 and step S7, the scanning of the slit light L1 is ended. When the scanning of the slit light L1 is ended, the process proceeds to step S8.

[0091] The processing of steps S8 to S10 is executed for each position in the U direction.

[0092] In step S8, the peak detection unit 241 plots the peak candidate positions at the positions (Ui) in the U direction with the horizontal axis being the θ direction and the vertical axis being the V direction, and generates, for example Fig. 9A In addition, Fig. 9A In the example shown, the maximum number of detected peak candidate positions is set to four.

[0093] In the next step S9, the peak detection unit 241 performs a noise suppression process. The details of the noise suppression process will be described below.

[0094] First, the peak detection unit 241 forms a cluster using a plurality of peak position candidates selected so that the distance between a peak position candidate of an arbitrary light-receiving image and a peak position candidate of another light-receiving image (a light-receiving image whose value in the θ direction is different from the value in the θ direction of the arbitrary light-receiving image) in the two-dimensional data of the peak candidate group is less than a certain distance. When the peak position candidate of an arbitrary light-receiving image and any peak position candidate of any other light-receiving image in the two-dimensional data of the peak candidate group are farther than a certain distance, the peak detection unit 241 forms a cluster using only one peak position candidate of the arbitrary light-receiving image.

[0095] Next, the peak detection unit 241 calculates the inclination of each cluster with respect to the θ direction by the least square method or the like. In addition, since the θ direction is rotated, strictly speaking, it is not a straight line, but the inclination of each cluster can be calculated by treating the θ direction locally as a straight line. In any range in the θ direction, there are first cluster candidates with different inclinations (e.g. Fig. 9A The cluster candidate A1 shown) and the second cluster candidate (eg Fig. 9A In the case of cluster candidate A2 shown in FIG. 1 , even if the shortest distance between the first cluster candidate and the second cluster candidate is less than a certain distance, the peak detection unit 241 regards the first cluster candidate and the second cluster candidate as different clusters rather than a single cluster. In this case, the cluster candidate on one side is likely to include noise, so by considering them as different clusters even if they are adjacent, the measurement accuracy becomes higher. Furthermore, even if the first cluster candidate (e.g. Fig. 9A The cluster candidate A1 shown in FIG. 1 is associated with the second cluster candidate (eg Fig. 9A The shortest distance between the cluster candidates A2 shown in FIG. 1 is less than a certain distance. There is a third cluster candidate (eg, Fig. 9A In the case of cluster candidate A3 shown in FIG. 1 , the peak detection unit 241 also regards the third cluster candidate as a cluster different from both the first cluster candidate and the second cluster candidate.

[0096] When the peak detection unit 241 detects Fig. 9A In the example shown, when multiple peak candidate positions are clustered, Fig. 9A In the example shown, multiple peak candidate positions are shown in Fig. 9B As shown, it is divided into clusters CL1 to CL15.

[0097] Here, even if the distance between any peak position candidate of the light-receiving image and the peak position candidate of another light-receiving image is less than a certain distance, a gradient (in Figure 8In the case of the process shown in the figure, the inclination in the θ direction is Fig.10 In the case of the process shown, even when the change is greater than a certain amount of change in the inclination relative to the Y-axis direction, the peak detection unit 241 regards the location where the inclination changes as different clusters.

[0098] For example, the right end of the peak candidate position included in CL1 and the left end of the peak candidate position included in CL3 are less than a certain distance apart, so CL1 and CL3 can also be considered as one cluster, but in this case, a change of more than a certain amount of inclination occurs between CL1 and CL3, so the location where the change in inclination occurs is considered as a different cluster. Locations with a height difference in the scanning direction, that is, the Y direction, such as the edge of the workpiece W, are prone to noise. Therefore, when they are grouped in the same cluster even if the change in inclination is large, peak candidate positions based on the true height of the workpiece W and peak candidate positions based on noise are mixed in one cluster, resulting in a decrease in measurement accuracy. By setting different clusters with the location where the change in inclination occurs as a boundary as described above, it is possible to suppress the mixing of peak candidate positions based on the true height of the workpiece W and peak candidate positions based on noise in one cluster.

[0099] Next, the peak detection unit 241 calculates the number of peak candidate positions constituting each cluster (hereinafter referred to as the number of members), and deletes clusters whose number of members is less than the threshold. Clusters caused by unstable noise tend to have a small number of members, so noise can be suppressed by deleting clusters with a small number of members. For example, when the threshold is set to 2, clusters CL6 to CL13 are deleted, Fig. 9B The two-dimensional data of the peak candidate group after cluster division shown is corrected to Fig. 9C The two-dimensional data of the peak candidate group after being divided into clusters is shown.

[0100] Next, the peak detection unit 241 determines that the entire cluster whose absolute value of the inclination with respect to the θ direction is greater than a predetermined value is noise, and removes the entire cluster. Fig. 9C The two-dimensional data of the peak candidate group after cluster division shown in FIG. 4 is modified to be as follows by removing clusters CL2, CL5, and CL14. Fig.9D The two-dimensional data of the peak candidate group after being divided into clusters is shown.

[0101] Furthermore, when there are multiple clusters within an arbitrary range in the θ direction, the peak detection unit 241 generates profile data by preferentially using a cluster with a small absolute value of inclination relative to the θ direction among the multiple clusters. Specifically, when there are multiple clusters within an arbitrary range in the θ direction, a cluster with a large absolute value of inclination relative to the θ direction among the multiple clusters is determined as noise and removed, and profile data is generated based on a cluster with a small absolute value of inclination. The cluster with a large absolute value of inclination relative to the θ direction is more likely to be a cluster caused by stray light, so the possibility of suppressing noise can be increased by determining a cluster with a large absolute value of inclination relative to the θ direction as noise and removing the cluster.

[0102] In addition, when a plurality of clusters partially overlap within an arbitrary range in the θ direction, the peak detection unit 241 generates contour data based on a cluster with a smaller absolute value of the inclination with respect to the θ direction at the overlapped position, and on the other hand, the peak detection unit 241 generates contour data based on each of the plurality of clusters at positions other than the overlapped position. There are cases where a peak candidate position based on the true height of the workpiece W and a peak candidate position based on noise are mixed in one cluster, so by limiting the removal to only the positions where a plurality of clusters overlap in the θ direction, the concern of excessively deleting peak candidate positions can be reduced.

[0103] For example, if there is a cluster CLN-1 and a cluster CLN whose absolute value of inclination with respect to the θ direction is larger than the absolute value of the inclination of the cluster CLN-1 and smaller than a predetermined value, Fig.9E In this way, cluster CLN-1 and cluster CLN do not overlap in the θ direction, and cluster CLN-1 and cluster CLN are not removed. On the other hand, if Fig.9F or Figure 9G In that case, cluster CLN-1 overlaps with cluster CLN in the θ direction, and cluster CLN is removed only at the position where it overlaps in the θ direction.

[0104] In addition, two clusters with similar inclinations (two clusters whose difference in inclination is less than the allowable value) are regarded as two clusters with the same inclination, and the peak detection unit 241 does not perform the process of judging the cluster with a large absolute value of inclination relative to the θ direction as noise and removing the cluster for the two clusters regarded as having the same inclination.

[0105] Finally, in the case where a plurality of peak candidate positions remain at each position in the θ direction, the peak detection section 241 uses the information on the amount of light to narrow down the peak candidate position to one at each position in the θ direction.

[0106] In step S10 , the peak detection unit 241 sets the peak candidate positions at the positions in the θ direction remaining after the noise suppression process in step S9 as the peak positions at the positions in the θ direction. When the process in step S10 is completed, the flow proceeds to step S11 .

[0107] The contour generating unit 27 transforms the contour in the UV coordinate system into the XYZ coordinate system (step S11 ), and generates a two-dimensional contour of the XZ cross section of the workpiece W (step S12 ).

[0108] In the next step S13 , the three-dimensional data generating unit 28 generates three-dimensional data.

[0109] In the next step S14, the display device 3 displays the measurement result. The measurement result is, for example, a cross-sectional view of the workpiece W based on the contour, a three-dimensional image of the workpiece W based on the three-dimensional data, etc. When the processing of step S14 is completed, Figure 8 The processing flow ends.

[0110] exist Figure 8 In the processing flow of FIG. 1 , after executing the noise suppression processing of step S8, the coordinate transformation of step S11 is performed, but it can also be performed as follows Fig.10 As in the processing flow of FIG. 1 , coordinate transformation is performed first and then noise suppression processing is performed.

[0111] Fig.10 Step S8' in Figure 8 In step S11, Fig.10 Step S9' in Figure 8 In step S8, Fig.10 Step S10' in Figure 8 In step S9, Fig.10 Step S11' in Figure 8 Corresponding to step S10 in .

[0112] exist Figure 8 The U direction portion in steps S8 to S10 is Fig.10 In steps S9' to S11', the X direction is Figure 8 In steps S8 to S10, the V direction portion is Fig.10 In steps S9' to S11', it is the Z direction.

[0113] <<Second Embodiment>>

[0114] <Optical displacement measurement system>

[0115] Fig.11 It is a diagram showing a schematic configuration example of an optical displacement measuring system according to a second embodiment. Fig.11The optical displacement measuring system 100 shown includes an optical displacement meter 1 , a control device 2 , a display device 3 , an input device 4 , and a belt conveyor 5 .

[0116] In this embodiment, the X direction corresponds to the width direction of the slit light L1 output from the optical displacement meter 1 , the Z direction corresponds to the height direction of the workpiece W, and the Y direction is a direction orthogonal to the X and Z directions. The XZ plane described below is a plane extending along the X and Z directions.

[0117] The optical displacement measurement system 100 is a system for measuring the contour and three-dimensional shape of the workpiece W conveyed in the Y direction by the belt conveyor 5. The contour of the workpiece W refers to data indicating the outer edge of the cross-section surface generated by the slit light L1 of the workpiece W. When the slit light is irradiated parallel to the XZ plane, the contour of the workpiece W becomes data indicating the outer edge of the cross-section surface parallel to the XZ plane, and is therefore also referred to as the two-dimensional contour of the XZ cross section of the workpiece W.

[0118] For example, a contour is a collection of (xi, zi) (i is an index). xi represents the position in the X direction. zi represents the height in the Z direction. In addition, a three-dimensional shape is a collection of (xi, yi, zi). yi represents the position in the Y direction.

[0119] The optical displacement meter 1 operates according to the instruction from the control device 2. The optical displacement meter 1 outputs the slit light L1 extending in the X direction and receives the reflected light L2 from the workpiece W. Moreover, the optical displacement meter 1 calculates the contour of the workpiece W based on the light reception result. The optical displacement meter 1 performs imaging at regular intervals to generate the contours of different workpieces W. In addition, the optical displacement meter 1 generates the three-dimensional shape data of the workpiece W based on the contours of different workpieces W.

[0120] The control device 2 outputs instructions based on user input received by the input device 4 to the optical displacement meter 1, and receives measurement results of the workpiece W from the optical displacement meter 1. The control device 2 also outputs display signals to the display device 3. The control device 2 is, for example, a personal computer or a programmable logic controller.

[0121] The display device 3 displays, for example, the measurement result of the workpiece W, a UI (User Interface) for setting the optical displacement meter 1 , and the like based on a display signal from the control device 2 .

[0122] The input device 4 receives user input to the optical displacement measuring system 100. Figure 1 In the figure, a keyboard and a mouse are shown as the input device 4. However, the input device 4 is not limited to a keyboard and a mouse. For example, the input device 4 may also be a touch panel configured on the display screen of the display device 3.

[0123] Fig.12 This is a diagram for explaining the principle of the light section method (triangulation ranging). A light projecting unit 11, a light receiving lens 12, and a camera unit 13 are built into the housing 10 of the optical displacement meter 1. The light projecting unit 11 has a light source 14 and a light projecting lens 15. For example, the light source 14 is a laser beam emitter, and the light projecting lens 15 can also be composed of a plurality of lenses including a cylindrical lens. The light output from the light source 14 is converted into a slit light L1 by passing through the light projecting lens 15. A light projecting window 16 for allowing the slit light L1 to pass is provided in the housing 10. Similarly, a light receiving window 17 for guiding the reflected light L2 to the inside of the housing 10 is provided in the housing 10.

[0124] The light receiving lens 12 is a lens for forming an image of the reflected light L2 on the imaging unit 13. The imaging unit 13 is a sensor having a plurality of pixels (also referred to as light receiving elements or photoelectric conversion elements) arranged two-dimensionally. Fig.12 As shown, the light receiving axis AX2 of the imaging unit 13 is inclined at an angle θ1 with respect to the light projection axis AX1 of the light source 6. That is, the reflected light L2 from the height Z0 is imaged at the position V0 in the V direction of the imaging unit 13. The reflected light L2 from the height Z1 is imaged at the position V1 in the V direction of the imaging unit 13. The reflected light L2 from the height Z2 is imaged at the position V2 in the V direction of the imaging unit 13. In this way, the V direction of the imaging unit 13 corresponds to the Z direction of the workpiece W. Although the U direction of the imaging unit 13 is not shown in the figure, the U direction corresponds to the X direction of the workpiece W. That is, the longitudinal direction of the image as the light receiving result output by the imaging unit 13 is the V direction, and the lateral direction is the U direction.

[0125] exist Fig.12 In the embodiment, the light source 14 is arranged so as to output the slit light L1 along the Z-axis direction, but the positional relationship between the pair of the light source 14 and the light projecting lens 15 and the pair of the imaging unit 13 and the light receiving lens 12 may be reversed.

[0126] <Position (calculation of height)>

[0127] Fig.13 This is a diagram for explaining a method of calculating the height of the contour based on the image I1 as the light receiving result output by the imaging unit 13. The slit light L1 has a certain width in the Y direction. Therefore, the width of the spot generated by the reflected light L2 on the light receiving surface of the imaging unit 13 is also as wide as that across a plurality of photoelectric conversion elements.

[0128] Therefore, the optical displacement meter 1 obtains an approximate curve P1 representing the change in brightness value based on the brightness value of each pixel, and calculates the position of the peak in the approximate curve P1 in the V direction. Fig.13In the figure, the leftmost column is the focus column, and the distribution of the brightness value of the focus column is illustrated (approximate curve P1). The approximate curve P1 is obtained by performing curve fitting on multiple sampling values. Sampling values ​​that are less than the detection threshold are not considered. The position where the peak occurs in the V direction represents the height of the workpiece W. The optical displacement meter 1 obtains the approximate curve P1 at each position (each pixel column) in the U direction, and calculates the position (height) of the peak in the V direction based on the approximate curve P1. By performing this operation processing for each position in the U direction, a contour can be obtained. Such an operation processing can also be called sub-pixel processing.

[0129] In addition, for example, by calibrating before shipment, coordinate transformation conditions (e.g., coordinate transformation table) are generated, which represent the correspondence between the UV coordinates and the relative position y between the optical displacement meter 1 and the workpiece W in the Y direction and the local coordinates (X, Y, Z), as represented by (U, V, y) = (X, Y, Z), and the coordinate transformation conditions are stored in a storage unit (not shown) of the optical displacement meter 1. Therefore, the optical displacement meter 1 can transform the contour in the UV coordinate system into the XYZ coordinate system based on the relative position y between the optical displacement meter 1 and the workpiece W in the Y direction by simple calculation. In addition, in the coordinate transformation, equal interval correction in the X and Y directions may be performed by plotting the positions in the X and Y directions at equal intervals, and Z corresponding to the corrected (X, Y) may be obtained by linear interpolation or the like, and output as a measurement result. In many cases, the image processing performed on the measurement result is based on data obtained by sampling at equal intervals in the X and Y directions, so it is easy to perform subsequent image processing by equal interval correction.

[0130] <Function Block>

[0131] Fig.14 1 is a functional block diagram of the optical displacement meter 1. The optical displacement meter 1 includes a light projecting and receiving module 20 and a control unit 22.

[0132] The light projecting and receiving module 20 integrally holds the light projecting unit 11 , the light receiving lens 12 , and the imaging unit 13 .

[0133] The control unit 22 includes a signal processing unit 24 and a communication unit 25. The signal processing unit 24 controls the light projecting unit 11 so that the slit light L1 is radiated from the light projecting unit 11.

[0134] The signal processing unit 24 includes a peak detection unit 241 , a profile generation unit 242 , a three-dimensional data generation unit 243 , a check unit 244 , and a setting unit 245 .

[0135] The peak detection unit 241 detects the position (peak position) of the peak of the brightness value in the V direction based on the light reception result output from the imaging unit 13. The contour generation unit 242 generates one contour data by summing up the heights (zi) at each position (xi) in the X direction of the workpiece W obtained by the peak detection unit 241. The three-dimensional data generation unit 243 generates three-dimensional shape data of the workpiece W based on the contours of the different workpieces W generated by the contour generation unit 242.

[0136] The inspection unit 244 inspects the workpiece W based on the three-dimensional shape data of the workpiece W generated by the three-dimensional data generating unit 243. The inspection unit 244 performs predetermined measurements on the three-dimensional shape data of the workpiece W, and inspects the workpiece W based on the measurement results. For example, the inspection unit 244 measures the length, angle, etc. of a predetermined portion of the workpiece W. Then, the inspection unit 244 determines whether the workpiece W is a good product based on these measurement results and a preset threshold value, etc.

[0137] The setting unit 245 is Fig.11 The input device 4 shown is a part that detects the operation when it is operated by the user and accepts various settings related to the control unit 22. For example, the setting unit 245 sets the inspection parameters used in the inspection unit 244. In addition, for example, the setting unit 245 sets the imaging parameters that are the imaging conditions in the imaging unit 13.

[0138] In addition, at least a part of the peak detection unit 241, the profile generation unit 242, the three-dimensional data generation unit 243, the inspection unit 244, and the setting unit 245 may be provided in a place separated from the main body of the optical displacement meter 1 (for example, Fig.11 In this case, the optical displacement meter 1 has a separation structure including a main body of the optical displacement meter 1 and a separation portion of the optical displacement meter 1 .

[0139] The communication unit 25 communicates with the control device 2 by wire or wirelessly. For example, the communication unit 25 receives an instruction from the control device 2 and transmits the instruction to the control unit 22. In addition, the communication unit 25 transmits the contour data and three-dimensional shape data of the workpiece W generated by the signal processing unit 24 and the inspection result of the workpiece W determined by the inspection unit 244 to the control device 2.

[0140] <Countermeasures against stray light>

[0141] Fig.15 Schematic diagram showing the true height of the workpiece W and the height that may be misidentified. Fig.15 In FIG. 1 , the light projecting unit 11 , the light receiving lens 12 , and the imaging unit 13 at the first measurement timing are indicated by solid lines, and the light projecting unit 11 , the light receiving lens 12 , and the imaging unit 13 at the second measurement timing are indicated by dotted lines.

[0142] The actual height H1 of the workpiece W hardly changes between the first measurement timing and the second measurement timing. In contrast, the possible misidentified height H2 of the workpiece W caused by the light (stray light) after multiple reflections on the surface of the workpiece W entering the camera unit 13 changes greatly between the first measurement timing and the second measurement timing.

[0143] Therefore, in the manner in which the peak detection unit 241 does not perform stray light countermeasures, Fig.15 When a workpiece W of the shape shown in the figure is measured, the profile data obtained by summarizing the height (zi) of the workpiece W at each position (yi) in the Y direction at a certain position in the X direction becomes as follows: Fig.16 As shown. Fig.16 It can be seen that the inclination of the possible misidentified height H2 of the workpiece W relative to the Y direction caused by the light (stray light) after multiple reflections on the surface of the workpiece W entering the imaging unit 13 is greater than the inclination of the true height H1 of the workpiece W relative to the Y direction. In the present embodiment, the peak detection unit 241 uses this knowledge found by the inventors to perform stray light countermeasures.

[0144] <Processing Flow>

[0145] In this embodiment, the motor 21 of the first embodiment is replaced by a driving motor of the belt conveyor 5. In the first embodiment, the scanning direction is the rotation direction of the light-emitting and light-receiving module 20. In contrast, in this embodiment, the scanning direction is the conveying direction (Y direction) of the workpiece W conveyed by the belt conveyor 5. Therefore, by changing the motor and the content of the coordinate transformation, it is possible to Figure 8 The processing flow shown and Fig.10 The processing flow shown is also applied to this embodiment.

[0146] <Variation of relative movement>

[0147] exist Fig.11 In the optical displacement measuring system 100 shown, the workpiece W is relatively moved in the Y direction relative to the light-emitting and light-receiving module 20 of the optical displacement meter 1 by the belt conveyor 5, thereby measuring the contour and three-dimensional shape of the workpiece W. In the present embodiment, the workpiece W is moved, but the relative movement of the workpiece W and the light-emitting and light-receiving module 20 of the optical displacement meter 1 is not limited to this. Therefore, the workpiece W may not be moved but the light-emitting and light-receiving module 20 of the optical displacement meter 1 may be moved, or both the workpiece W and the light-emitting and light-receiving module 20 of the optical displacement meter 1 may be moved.

[0148] In the case of moving the light-emitting and light-receiving module 20 of the optical displacement meter 1, as shown in FIG. Fig.17As shown, the optical displacement meter 1 includes a direct-acting mechanism 26, and the control unit 22 includes a direct-acting mechanism control unit 27. The direct-acting mechanism control unit 27 controls the direct-acting mechanism 26 to move the light projecting and receiving modules in the housing 10 in the Y direction.

[0149] <<Others>>

[0150] In addition, the various technical features disclosed in this specification can be subjected to various changes without departing from the scope of the main purpose of the technical design, except for the above-mentioned embodiments. That is, the above-mentioned embodiments should be considered to be illustrative and non-restrictive in all aspects. In addition, it should be understood that the scope of protection of the present invention is defined by the claims, including all changes within the meaning and scope equivalent to the claims.

[0151] Description of Reference Numerals

[0152] 1: optical displacement meter; 2: control device; 3: display device; 4: input device; 5: belt conveyor; 10: housing; 11: light projecting unit; 12: light receiving lens; 13: camera unit (image sensor); 14: light source; 15: light projecting lens; 16: light projecting window; 17: light receiving window; 18: light receiving unit; 19: reflection member; 20: light projecting and light receiving module; 21: motor; 22: control unit; 23: motor control unit; 2 4: signal processing unit; 25: communication unit; 26: direct-acting mechanism; 27: direct-acting mechanism control unit; 100: optical displacement measurement system; 241: peak detection unit; 242: contour generation unit; 243: three-dimensional data generation unit; 244: inspection unit; 245: setting unit; AX1: projection axis; AX2: optical axis; AX3: rotation axis; I1: image; L1: slit light; L2: reflected light; R1: area; W: workpiece.

Claims

1. An optical displacement meter, comprising: a light projecting unit for irradiating a slit light extending along the X direction to a workpiece moving relatively along a direction intersecting the X direction; an image sensor having a plurality of pixels arranged two-dimensionally in a U direction corresponding to the X direction and in a V direction orthogonal to the U direction, the image sensor receiving reflected light obtained by the workpiece using the plurality of pixels and outputting a light receiving image indicating a distribution of received light amount; and a control unit that generates contour data of the workpiece based on the light-receiving image and measures a shape of the workpiece based on the contour data, in, The control unit controls the image sensor to sequentially acquire the plurality of light-receiving images along with the relative movement. The control unit detects a peak position candidate in the V direction for each position in the U direction based on a light receiving amount distribution of the light receiving image for each of the light receiving images, For each position in the U direction, The control unit generates one or more clusters composed of a plurality of peak position candidates, wherein the plurality of peak position candidates are selected so that a distance between a peak position candidate of any of the light-receiving images and a peak position candidate of another of the light-receiving images is less than a certain distance. The control section performs determination as to whether noise is included in the cluster based on an inclination of the cluster with respect to the direction of relative movement, The control unit generates the outline data based on a result of the determination.

2. An optical displacement meter, comprising: a light projecting unit for irradiating a slit light extending along the X direction to a workpiece moving relatively along a direction intersecting the X direction; an image sensor having a plurality of pixels arranged two-dimensionally in a U direction corresponding to the X direction and in a V direction orthogonal to the U direction, the image sensor receiving reflected light obtained by the workpiece using the plurality of pixels and outputting a light receiving image indicating a distribution of received light amount; and a control unit that generates contour data of the workpiece based on the light-receiving image and measures a shape of the workpiece based on the contour data, in, The control unit controls the image sensor to sequentially acquire a plurality of light-receiving images along with the relative movement. The control unit detects a peak position candidate in the V direction for each position in the U direction based on a light receiving amount distribution of the light receiving image for each of the light receiving images, The control unit transforms the UV coordinate information including each position in the U direction and the peak position candidate in the V direction at each position in the U direction, and the information related to the relative movement into XYZ coordinate information including the peak position candidate in the Z direction corresponding to each XY coordinate based on a predetermined coordinate transformation condition, For each position in the X-axis direction of the XYZ coordinate information, The control unit generates one or more clusters consisting of a plurality of peak position candidates, wherein the plurality of peak position candidates are selected so that a distance between a peak position candidate at any position in the Y-axis direction and a peak position candidate at another position in the Y-axis direction is less than a certain distance, The control unit performs a determination as to whether noise is included in the cluster based on an inclination of the cluster with respect to the Y-axis direction, The control unit generates the outline data based on a result of the determination.

3. The optical displacement meter according to claim 1 or 2, wherein: In the case where there are a first cluster candidate and a second cluster candidate with different inclinations within an arbitrary range in the direction of the relative movement, the control unit regards the first cluster candidate and the second cluster candidate as different clusters rather than a single cluster even if the shortest distance between the first cluster candidate and the second cluster candidate is less than the certain distance.

4. The optical displacement meter according to claim 3, wherein: Even if there is a third cluster candidate at a position less than the certain distance from the position where the shortest distance between the first cluster candidate and the second cluster candidate is less than the certain distance, the control unit will regard the third cluster candidate as a cluster different from both the first cluster candidate and the second cluster candidate.

5. The optical displacement meter according to claim 1 or 2, wherein: Even if the distance between any peak position candidate of the light-receiving image and the peak position candidate of other light-receiving images is less than the certain distance, when a change of inclination exceeding a certain amount occurs within the cluster candidates, the control unit regards the clusters as different clusters based on the location where the change of inclination occurs.

6. The optical displacement meter according to claim 1 or 2, wherein: The control unit determines that the entire cluster whose absolute value of the inclination is greater than or equal to a predetermined value is noise, and removes the entire cluster.

7. The optical displacement meter according to claim 1 or 2, wherein: When a plurality of the clusters exist within an arbitrary range in the direction of the relative movement, the control unit generates the outline data by preferentially using a cluster having a smaller absolute value of the inclination among the plurality of clusters.

8. The optical displacement meter according to claim 1 or 2, wherein: When a plurality of the clusters exist within an arbitrary range in the direction of relative movement, the control unit determines a cluster having a large absolute value of the inclination among the plurality of clusters as noise and removes the cluster, and generates the outline data based on a cluster having a small absolute value of the inclination.

9. The optical displacement meter according to claim 1 or 2, wherein: When a plurality of cluster parts are repeated within an arbitrary range in the direction of the relative movement, the control unit generates the contour data based on a cluster having a smaller absolute value of the inclination among the plurality of clusters at the repeated position, and on the other hand, the control unit generates the contour data based on each cluster among the plurality of clusters at a position other than the repeated position.