Shape measurement system

JP2026127241APending Publication Date: 2026-08-06OKUMA CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
OKUMA CORP
Filing Date
2025-01-27
Publication Date
2026-08-06

AI Technical Summary

Benefits of technology

【0017】 本明細書で開示する技術によれば、任意の撮像距離における光軸点と基準点との機械座標系での相対位置関係が特定できるため、撮像ユニットを適切な位置に位置決めできる。そして、結果として、計測対象物の形状を、より正確に計測できる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026127241000001_ABST
    Figure 2026127241000001_ABST
Patent Text Reader

Abstract

This system provides a shape measurement system that can measure the shape of an object more accurately. [Solution] The machine tool 100 includes an imaging unit 12 attached to a movable part 102, and a controller 14 that calculates the shape of a measurement target 120 in the image based on the image captured by the imaging unit 12. The controller 14 calculates a specific offset vector, which is the relative positional relationship in the machine coordinate system between the optical axis point Po and the reference point Ps at a specific imaging distance, for each of two different imaging distances, and calculates a general-purpose offset vector, which is the relative positional relationship in the machine coordinate system between the optical axis point Po and the reference point Ps at an arbitrary imaging distance, based on the two specific offset vectors. The specific offset vector is calculated based on two or more rotation images 31 captured by changing the rotation angle of the imaging unit 12, and two or more translation images 32 captured by moving the movable part 102 in the XY direction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0004] , , , , ,

[0005] , , , ,

[0001] This specification discloses a shape measurement system that has an imaging unit attached to a movable part of a machine tool and measures the shape of a measurement object based on an image captured by the imaging unit.

Background Art

[0002] Conventionally, techniques for measuring the shape of a measurement object based on an image captured by a camera have been widely known. Such measurement techniques are also applied to machine tools. In machine tools, workpieces and jigs are measured based on images, and based on the measurement results, interference detection, generation of tool paths, accuracy measurement of workpieces, and determination of the presence or absence of objects are performed. Patent Documents 1 and 2 disclose techniques for attaching a camera to the spindle of a machine tool and performing shape measurement based on an image captured by the camera.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Patent Document 2

Summary of the Invention

Problems to be Solved by the Invention

[0004] However, in such conventional techniques, the offset between the optical axis of the camera and the spindle is not considered, and positioning during image capture is performed with the spindle as a reference. In this case, there is a possibility that the measurement accuracy may decrease depending on the offset between the optical axis and the spindle.

[0005] In other words, if offset is not considered, the optical axis of the camera during imaging may be far from the point to be measured. Generally, the further away from the optical axis, the greater the image errors such as parallax errors and aberrations. In particular, if the lens of the imaging unit is a non-telecentric lens, the further the point to be measured is from the optical axis, the greater the parallax error at the point to be measured in the image. Naturally, when such errors occur, the accuracy of shape measurement based on the image decreases.

[0006] Therefore, this specification discloses a shape measurement system that can measure the shape of an object more accurately. [Means for solving the problem]

[0007] The shape measurement system disclosed herein comprises an imaging unit mounted on a movable part of a machine tool so as to be rotatable about a predetermined reference axis, and a controller that calculates the shape of an object to be measured as captured in an image based on an image captured by the imaging unit, wherein the movable part is relatively movable with respect to the imaging plane of the imaging unit in the Z direction parallel to the reference axis and in the X and Y directions perpendicular to the Z direction, the optical axis of the imaging unit is parallel to the Z direction or inclined at a small angle with respect to the Z direction, the intersection of the optical axis and the imaging plane is the optical axis point, the intersection of the reference axis and the imaging plane is the reference point, the distance in the Z direction between the movable part and the imaging plane is the imaging distance, and the controller The system is configured to calculate a specific relative positional relationship, which is the relative positional relationship in a mechanical coordinate system between the optical axis point and the reference point at a specific imaging distance, for each of two different imaging distances, and to calculate a general relative positional relationship, which is the relative positional relationship in a mechanical coordinate system between the optical axis point and the reference point at an arbitrary imaging distance, based on the two specific relative positional relationships. The specific relative positional relationship is calculated based on two or more rotational images captured by changing the rotation angle of the imaging unit around the reference axis while keeping the imaging distance between the movable part and the imaging surface constant, and two or more translational images captured by moving the movable part relative to the imaging surface in the XY direction.

[0008] In this case, the machine tool may have calibration marks, and the controller may be configured to control the position of the movable part during imaging so that the calibration marks are visible in both the rotational image and the translational image.

[0009] Furthermore, the controller may be configured to identify a camera-side offset vector indicating the relative positional relationship between the optical axis point and the reference point in the camera coordinate system based on two or more of the rotated images, identify a conversion vector for converting camera coordinate values ​​to machine coordinate values ​​based on two or more of the translational images, and calculate the vector in the machine coordinate system from the optical axis point to the reference point at a specific imaging distance as the specific relative positional relationship based on the camera-side offset vector and the conversion vector.

[0010] Furthermore, the controller may calculate the center coordinates of the circle passing through the camera coordinate values ​​of the calibration marks in each of the two or more rotated images as the camera coordinate values ​​of the reference point.

[0011] Furthermore, the controller may be configured to calculate the transformation vector M1(Φ) based on Equation 1, where Φ is the rotation angle of the imaging unit, m1 is the movement vector in the mechanical coordinate system between the two translational images, p1 is the movement vector in the camera coordinate system, and R(α) is the rotation matrix that rotates by an angle α.

number

[0012] Furthermore, the controller may be configured to calculate a specific offset vector V(DZ1,Φ), which is a vector in the mechanical coordinate system from the optical axis point to the reference point, as V(DZ1,Φ)=M1(Φ)v(DZ1), where v(DZ1) is the camera-side offset vector and M1(Φ) is the transformation vector.

[0013] Furthermore, the controller calculates a general-purpose offset vector V(DZ,Φ), which is a vector from the optical axis point to the reference point at an arbitrary imaging distance DZ and an arbitrary rotation angle Φ, as the general-purpose relative positional relationship. The general-purpose offset vector V(DZ,Φ) may be calculated by the following equation 3, where V(DZ1,Φ) and V(DZ2,Φ) are offset vectors corresponding to two different imaging distances DZ1 and DZ2.

number

[0014] Furthermore, the controller may be configured to position the movable part based on the general relative positional relationship such that the optical axis point is located at the measurement target point of the object to be measured, and to calculate the shape of the object based on the image captured in that state.

[0015] Furthermore, the controller may be configured to determine the position of the movable part for positioning the optical axis point at the measurement target point of the measurement target object, based on the relative positional relationship between the optical axis point and the reference point, which is determined by applying the focal length identified by autofocus as the imaging distance and applying it to the general-purpose relative positional relationship.

[0016] Furthermore, the controller may be configured to calculate the movement path of the movable part for measurement based on the general relative positional relationship and the focal length identified by autofocus execution or the shape model of the object to be measured, so that the optical axis is positioned at the measurement target point, when at least the X and Y coordinate values ​​of the measurement target point of the object to be measured are specified in advance. [Effects of the Invention]

[0017] The technology disclosed herein allows for the determination of the relative positional relationship between the optical axis point and the reference point in the mechanical coordinate system at any imaging distance, thereby enabling the imaging unit to be positioned appropriately. As a result, the shape of the object being measured can be measured more accurately.

Brief Description of the Drawings

[0018] [Figure 1] It is a schematic diagram showing the configuration of the shape measurement system. [Figure 2] It is a diagram showing an example of the measurement object. [Figure 3] It is a schematic side view of the imaging unit attached to the main shaft. [Figure 4] It is a schematic diagram showing the relationship between the machine coordinate system and the camera coordinate system. [Figure 5] It is a flowchart showing the flow of the process for measuring the shape of the workpiece. [Figure 6] It is a flowchart showing the flow of calculating the offset vector. [Figure 7] It is a schematic diagram showing the relationship between the rotated image and the machine coordinate system. [Figure 8] It is a schematic diagram of three rotated images. [Figure 9] It is a schematic diagram showing the relationship between the translated image and the machine coordinate system. [Figure 10] It is a schematic diagram of two translated images. [Figure 11] It is a diagram for explaining the relationship between the imaging distance and the offset distance.

Embodiments for Carrying Out the Invention

[0019] Hereinafter, the configuration of the shape measurement system 10 will be described with reference to the drawings. FIG. 1 is a schematic diagram showing the configuration of the shape measurement system 10. This shape measurement system 10 measures the shape of the measurement object 120 arranged in the processing chamber of the machine tool 100 based on an image obtained by imaging the measurement object 120. Such a shape measurement system 10 includes an imaging unit 12 attached to the movable part 102 of the machine tool 100 and a controller 14. Note that the measurement object 120 is not particularly limited as long as it is an article arranged in the processing chamber, and for example, it may be a workpiece 122, a jig, or a tool 101. Hereinafter, an example in which the workpiece 122 is used as the measurement object 120 will be described.

[0020] The machine tool 100 is a numerically controlled machine tool that, according to an NC program, moves the tool 101 and the workpiece 122 in relative motion to shape the workpiece 122 into a required form. Such a machine tool 100 may be, for example, a lathe, milling machine, turning center, machining center, or multi-tasking machine. However, the type of machine tool 100 is not particularly limited. For example, the machine tool 100 may be a press device for pressing the workpiece 122, a painting device for painting the workpiece 122, or a cutting machine for cutting the workpiece 122. In Figure 1, the machine tool 100 is a machining center having a spindle 104, a table 106, a tool magazine 110, an ATC 108, and a numerical control device 112.

[0021] The spindle 104 is the part that rotatably holds the tool 101 and is the movable part 102 of the machine tool 100. The tool 101 attached to the spindle 104 is replaceable. When measuring the shape of the workpiece 122, the imaging unit 12 is attached to the spindle 104, which is the movable part 102, instead of the tool 101. The workpiece 122 is placed on the table 106. The table 106 may be a fixed table with a fixed position and orientation, or a movable table in which at least one of its position and orientation can be changed.

[0022] The tool magazine 110 stores multiple tools 101. The ATC 108 exchanges tools 101 between the spindle 104 and the tool magazine 110 according to instructions from the numerical control device 112. That is, the ATC 108 attaches one of the multiple tools 101 stored in the tool magazine 110 to the spindle 104. The ATC 108 also removes the tool 101 from the spindle 104 and stores it in the tool magazine 110. In addition to tools 101, the imaging unit 12 can also be stored in the tool magazine 110. When measuring the workpiece 122, the ATC 108 automatically attaches the imaging unit 12 to the spindle 104.

[0023] The numerical control device 112 analyzes the machining program, which is an NC program, and generates numerical information consisting of numbers and symbols, representing the tool path to the workpiece 122, the steps required for machining, and other related operations. Based on this numerical information, the numerical control device 112 controls the operation of the machine tool 100. Physically, the numerical control device 112 is a computer that includes a processor and memory. The machine tool 100 also includes an operation panel that presents information to the operator and receives commands from the operator.

[0024] The imaging unit 12 images the object to be measured 120 (workpiece 122 in this example) in order to measure its shape. The imaging unit 12 transmits the image data obtained from the imaging to the controller 14 via wireless communication. The controller 14 calculates two-dimensional or three-dimensional coordinate values ​​of multiple points located on the surface of the workpiece 122 based on the transmitted image. The imaging unit 12 includes a camera 16 for imaging the subject and a communication interface (not shown) for wireless communication. Furthermore, the imaging unit 12 may have a light source that illuminates the subject with a predetermined pattern of light. The imaging unit 12 may also have two or more cameras fixedly arranged in a known positional relationship. The imaging unit 12 is powered, for example, by a battery. Furthermore, the type of camera 16 provided in the imaging unit 12 is not particularly limited, but for example, the camera 16 may be a non-telecentric lens type camera that can be miniaturized.

[0025] The controller 14 generates an NC program, i.e., a measurement program, for measuring the shape of the object to be measured 120. The controller 14 also determines the offset between the imaging unit 12 and the main axis 104 prior to generating the measurement program, or during the execution of the measurement program.

[0026] Such a controller 14 is a computer having a processor 18, memory 20, a communication interface 22 (hereinafter referred to as "communication I / F 22"), and a UI device 24. This "computer" also includes a microcontroller that incorporates a computer system into a single integrated circuit. Furthermore, the processor 18 refers to a processor in a broad sense, and includes general-purpose processors (e.g., CPU: Central Processing Unit, etc.) and dedicated processors (e.g., GPU: Graphics Processing Unit, ASIC: Application Specific Integrated Circuit, FPGA: Field Programmable Gate Array, programmable logic device, etc.).

[0027] The memory 20 is a device for storing various types of data and includes both a main memory that the processor 18 accesses directly and an auxiliary memory that the processor 18 accesses via an input / output channel. The main memory includes, for example, semiconductor memory. The auxiliary memory includes, for example, semiconductor memory or magnetic memory.

[0028] The communication interface 22 transmits and receives data to and from other external electronic devices via wired or wireless communication. For example, the communication interface 22 communicates with the numerical control unit 112 and the imaging unit 12. The user interface (UI) device 24 presents various information to the operator and receives instructions from the operator. Such a UI device 24 includes, for example, output devices such as a display and a speaker, and input devices such as a keyboard, mouse, microphone, and touch panel. In this example, the UI device 24 is described as a component of the controller 14, but some or all of the UI device 24 may be configured as a completely separate device from the controller 14. For example, some functions of the UI device 24 may be implemented as a user interface of an information terminal (e.g., a smartphone) owned by the operator and capable of communicating with the controller 14. Furthermore, the controller 14 does not need to be a single computer, but may be configured by combining multiple physically separated computers. Furthermore, although Figure 1 shows the controller 14 as a separate element from the numerical control device 112, the numerical control device 112 may also function as the controller 14.

[0029] Next, we will explain the shape measurement performed by the shape measurement system 10. Figure 2 shows an example of a measurement target object 120. As mentioned above, in this example, the workpiece 122 is treated as the measurement target object 120. The shape measurement system 10 measures the shape of the workpiece 122 in two or three dimensions. For example, the shape measurement system 10 measures the workpiece dimension D1, the distance between holes D2, the hole diameter D3, or the three-dimensional coordinate values ​​of a specific point P1. The operator may specify which to measure, or the shape measurement system 10 may automatically determine it based on the machining program, etc. For example, the controller 14 may generate a three-dimensional shape model of the workpiece 122 from material data, machine data, tool data, machining program, etc., and further analyze the machining program to identify the machine coordinate values ​​of parts whose shape changes during machining as the coordinate values ​​of the measurement target points. Alternatively, the controller 14 may present the three-dimensional shape model of the workpiece 122 to the operator via the UI device 24 and then accept the operator's specification of the measurement target points. In any case, prior to generating the measurement program, the controller 14 acquires the machine coordinate values ​​of the point to be measured.

[0030] The shape measurement system 10 captures an image of the area around the measurement target point using the imaging unit 12, and calculates the machine coordinate values ​​of the points that should actually be measured based on the obtained image. In other words, the measurement target point mentioned above is a point that should theoretically be measured, but it is not necessarily the point that should actually be measured. The point that should actually be measured changes due to processing errors, etc. Therefore, the shape measurement system 10 captures an image of the area around the measurement target point, identifies the points that should actually be measured from the obtained image, for example, characteristic points of the shape, and calculates their machine coordinate values. For example, when measuring a hole diameter D3, at least three points that can theoretically be considered on the periphery of the hole are given as measurement target points. The controller 14 captures an image of the area around the measurement target point and analyzes the obtained image to extract the edge of the actual hole periphery, identifies three points located on that edge, and calculates the machine coordinate values ​​of these points. Then, the controller 14 calculates the actual center and diameter of the hole from at least three machine coordinate values. In this case, if the field of view of the camera 16 is narrower than the hole diameter D3, the camera 16 will image the hole in multiple steps. For example, if the hole is formed by a 10mm diameter drill and the camera's imaging range is 5mm square, the hole will naturally not fit within a single image. In this case, the camera 16 is moved to several points around the periphery of the hole and images are taken using the XY information from the drilling program.

[0031] During imaging, the optical axis Ao of the camera 16 is required to be as close as possible to the periphery of the hole (i.e., the point to be measured). This is because the further away from the optical axis Ao, the greater the image errors such as parallax errors and aberrations in the captured image. In particular, if the lens of the camera 16 is a non-telecentric lens, the further the point to be measured is from the optical axis, the greater the parallax error at the point to be measured in the image. Naturally, when such errors occur, the accuracy of shape measurement based on the image decreases. This decrease in measurement accuracy is a particularly significant problem for products requiring high accuracy (for example, products requiring accuracy of a few micrometers).

[0032] Therefore, when imaging the object to be measured 120, it is necessary to control the position of the imaging unit 12, and by extension the position of the spindle 104 to which the imaging unit 12 is attached, so that the point to be measured is located near the optical axis Ao. However, while the machine tool 100 can precisely measure the position of the spindle 104, it cannot precisely measure the position and orientation of the imaging unit 12 attached to the spindle 104. Slight mounting errors when attaching the imaging unit 12 to the spindle 104, or individual differences in the imaging unit 12 itself, cause the position and orientation of the imaging unit 12 relative to the spindle 104 to change. As a result, there was a problem in that it was difficult to position the point to be measured near the optical axis Ao of the camera 16.

[0033] This will be explained with reference to Figures 3 and 4. In the following explanation, the machine coordinate system of the machine tool 100 is represented by XYZ, and the camera coordinate system of the imaging unit 12 is represented by abc. Also, for the sake of clarity in the drawings, the origin position of the coordinate system has been moved as appropriate in each drawing. Figure 3 is a schematic diagram of the imaging unit 12 attached to the spindle 104. The spindle 104, and by extension the imaging unit 12 attached to the spindle 104, can rotate around its central axis. Hereafter, this axis of rotation of the imaging unit 12 (in this example, the axis of rotation of the spindle 104) will be referred to as the reference axis As.

[0034] As described above, in this example, the imaging unit 12 is attached to the spindle 104 instead of the tool 101. The imaging unit 12 images the subject including the measurement target point. Hereinafter, the surface that the imaging unit 12 images and that includes the measurement target point will be referred to as the "imaging surface 30". The intersection of the imaging surface 30 and the optical axis Ao will be referred to as the "optical axis point Po", and the intersection of the imaging surface 30 and the reference axis As will be referred to as the "reference point Ps".

[0035] To measure the area around the target point with high accuracy, the optical axis point Po must be located near the target point. However, slight mounting errors or individual differences in the imaging unit 12 itself can cause the camera 16 to shift relative to the main axis 104, or the optical axis Ao of the camera 16 to tilt relative to the reference axis As of the main axis 104. As a result, the relative positional relationship between the optical axis point Po and the reference axis As changes, making it difficult to position the optical axis point Po near the target point.

[0036] For example, as shown in Figure 3, when the optical axis Ao is tilted with respect to the reference axis As, the offset distance Dos between the optical axis point Po and the reference point Ps changes depending on the distance in the Z direction from the imaging plane 30 to the movable part 102 (hereinafter referred to as the "imaging distance DZ"). Furthermore, the offset distance Dos also changes depending on the positional displacement E of the optical axis Ao with respect to the reference axis As.

[0037] Furthermore, as shown in Figure 4, the camera coordinate system is usually tilted relative to the machine coordinate system. The tilt angle θ of this camera coordinate system changes depending on the orientation of the imaging unit 12 when it is attached to the main shaft 104. If this tilt angle θ cannot be determined, the offset direction obtained in the camera coordinate system (the direction of moving in the +b direction as you move in the -a direction in the illustrated example) cannot be converted to the offset direction of the machine coordinate system (the direction of moving in the -X direction in the illustrated example).

[0038] Therefore, the shape measurement system 10 in this example calculates the offset direction and offset distance Dos (hereinafter collectively referred to as the "offset vector") of the reference point Ps with respect to the optical axis point Po before imaging the point to be measured. The procedure for calculating this offset vector will be explained in detail later.

[0039] Figure 5 is a flowchart showing the process flow for measuring the shape of the workpiece 122. As shown in Figure 5, when measuring the shape of the workpiece 122, the tool 101 attached to the spindle 104 is replaced with the imaging unit 12 (S10). To automate this replacement, an M code (for example, "M06") can be set in the NC program to instruct the replacement from the tool 101 to the spindle 104.

[0040] Once the imaging unit 12 is attached to the spindle 104, the controller 14 calculates an offset vector from the reference point Ps to the optical axis point Po (S12). Subsequently, once the offset vector is obtained, the controller 14 positions the optical axis point Po at the measurement target point based on the offset vector (S14). For example, if the offset vector from the reference point Ps to the optical axis point Po is V, the spindle 104 is positioned -V above the measurement target point. Then, in this state, the imaging unit 12 takes an image of the area around the measurement target point (S16). This allows the area around the measurement target point to be imaged with minimal error. This image acquisition is repeated for all necessary measurement target points (S14-S18). Alternatively, the controller 14 may pre-generate an NC program that instructs these operations as a measurement program and input the generated measurement program into the numerical control device 112 in order to perform the positioning and imaging operations of the spindle 104. Once all the necessary images have been acquired, the shape measurement system 10 calculates the shape of the workpiece 122 based on the multiple images (S20). The algorithm for calculating the shape from the images can utilize conventional technology, so a detailed explanation is omitted here.

[0041] Next, the procedure for calculating the offset vector will be explained. Figure 6 is a flowchart showing the flow of offset vector calculation. As explained with reference to Figure 3, the offset distance Dos, and therefore the offset vector, changes with the imaging distance DZ. In this example, the offset vectors at specific imaging distances DZ=DZ1 and DZ=DZ2 are calculated as specific offset vectors V(DZ1,Φ) and V(DZ2,Φ) respectively (S30~S42). The two specific offset vectors V(DZ1,Φ) and V(DZ2,Φ) correspond to specific relative positional relationships that show the relative positional relationship between the optical axis point Po and the reference point Ps in the mechanical coordinate system at a specific imaging distance DZ. Then, based on the two obtained specific offset vectors V(DZ1,Φ) and V(DZ2,Φ), a general-purpose offset vector V(Z,Φ) is calculated with the imaging distance DZ and rotation angle Φ as variables (S44). The general-purpose offset vector V(Z,Φ) corresponds to a general-purpose relative positional relationship that shows the relative positional relationship in the mechanical coordinate system between the optical axis point Po and the reference point Ps at an arbitrary imaging distance DZ.

[0042] The specific offset vectors V(DZ1,Φ) and V(DZ2,Φ) are valid only when the imaging distances DZ=DZ1 and DZ2 are specified. Below, we will explain the procedure for calculating the specific offset vector V(DZ1,Φ) using the imaging distance DZ=DZ1 as an example.

[0043] The specific offset vector V(DZ1,Φ) is the offset vector in the mechanical coordinate system from the reference point Ps to the optical axis point Po, when the rotation angle of the main axis 104 is Φ and the imaging distance DZ=DZ1. To calculate this specific offset vector V(DZ1,Φ), the controller 14 moves the main axis 104 to the Z position corresponding to the imaging distance DZ=DZ1 (S30). Then, in that state, the controller 14 drives the main axis 104 and the imaging unit 12 to acquire multiple rotation images 31 (S32).

[0044] The rotated image 31 is an image captured by changing the rotation angle Φ of the imaging unit 12 around the reference axis As while keeping the position of the main spindle 104 constant. Figures 7 and 8 are schematic diagrams of the rotated image 31. In order to calculate the offset vector in the camera coordinate system, i.e., the camera-side offset vector v(DZ1), from this rotated image 31, the machine tool 100 is pre-equipped with calibration marks 114.

[0045] The calibration mark 114 is positioned in a location that can be captured by the imaging unit 12 and is not particularly limited as long as it is a mark that can be easily extracted from the image. For example, the calibration mark 114 may be a figure attached to the end of the table 106. Alternatively, the calibration mark 114 may be a feature point of the structure of the machine tool 100. For example, the edge of the end of the table 106 may be used as the calibration mark 114. Furthermore, the calibration mark 114 may be detachable from the machine tool 100, provided that it remains unchanged at a specific position from the start to the end of image acquisition for offset vector calculation. The machine coordinate values ​​of the calibration mark 114 may be known in advance or unknown.

[0046] The controller 14 positions the spindle 104 so that the calibration mark 114 is visible in all of the rotation images 31. For example, if the machine coordinates of the calibration mark 114 are known, the controller 14 matches the XY coordinates of the spindle 104 to those of the calibration mark 114. If the position of the calibration mark 114 is unknown, the operator positions the spindle 104 so that the calibration mark 114 is visible in the image while checking the image from the camera 16.

[0047] Once the XY position of the main spindle 104 is determined, the imaging unit 12 captures calibration marks 114 while rotating the main spindle 104 around the reference axis As, thereby acquiring rotation images 31. For example, the controller 14 captures calibration marks 114 with the main spindle 104 positioned at a predetermined angle Φ=Φ0. Then, it rotates the main spindle 104 by a certain angle ΔΦ and captures the image again. The constant angle ΔΦ is 360° / N (where N is an integer greater than or equal to 2). The controller 14 repeats this process to acquire N rotation images 31 for one full rotation of the main spindle 104. Note that, in this example, the main spindle 104 is rotated at equal intervals for simplicity of calculation, but the rotation intervals of the main spindle 104 may be non-uniform.

[0048] As shown in Figure 7, when the main axis 104 rotates around the reference axis As, the relative position of the optical axis point Po with respect to the calibration mark 114 changes. On the other hand, since the imaging unit 12 is attached to the main axis 104, the relative position of the optical axis point Po with respect to the reference point Ps remains unchanged even when the main axis 104 rotates. Furthermore, since the position of the main axis 104 itself in the mechanical coordinate system remains unchanged, the relative position of the reference point Ps with respect to the calibration mark 114 also remains unchanged even when the main axis 104 rotates.

[0049] When multiple rotated images 31 are superimposed, the optical axis point Po is always located at the center of the image, as shown in Figure 8. Furthermore, the relative position of the reference point Ps with respect to the optical axis point Po remains unchanged in any of the multiple rotated images 31. On the other hand, the calibration marks 114 are aligned on a circle centered on the reference point Ps. Therefore, the controller 14 identifies the reference point Ps in the camera coordinate system based on the position of the calibration marks 114 in each of the multiple rotated images 31.

[0050] For example, the controller 14 uses image processing algorithms such as pattern matching, blob processing, and image moment to calculate the camera coordinate values ​​of the representative points (e.g., centroids) of the calibration marks 114 in each of the multiple rotated images 31. Then, the controller 14 calculates the average of the multiple camera coordinate values ​​obtained. This average value becomes the coordinate value of the reference point Ps in the camera coordinate system. Based on the coordinate value of the reference point Ps in the camera coordinate system, the controller 14 calculates the vector from the reference point Ps to the optical axis point Po at the imaging distance DZ=DZ1, i.e., the camera-side offset vector v(DZ1) (S34).

[0051] In the example described above, the main axis 104 is rotated at equal intervals to capture the rotated image 31. However, the angle at which the rotated image 31 is captured is not particularly limited, and the rotated image 31 may be captured at non-uniform angular intervals. When making the rotation angle Φ when capturing the rotated image 31 non-uniform, at least three or more rotated images 31 with different rotation angles Φ are acquired. Then, the camera coordinate values ​​of the calibration mark 114 are calculated from the three or more rotated images 31, and the center of the circle that approximately passes through the three obtained camera coordinate values ​​can be calculated as the camera coordinate value of the reference point Ps.

[0052] Once the camera-side offset vector v(DZ1) is obtained, the controller 14 then calculates the offset vector in the mechanical coordinate system from the reference point Ps to the optical axis point Po, i.e., the specific offset vector V(DZ1,Φ), when the imaging distance DZ=DZ1 (S38). To calculate the specific offset vector V(DZ1,Φ), the controller 14 acquires multiple translational images 32 (S36).

[0053] The translational image 32 is an image of the calibration mark 114 captured by changing its position in the XY direction while maintaining the main shaft 104 at a predetermined rotation angle Φ and a predetermined imaging distance DZ=DZ1. Figures 9 and 10 are schematic diagrams of the two translational images 32. As shown in Figure 9, let m1 be the movement vector when the main shaft 104 moves from position (X1,Y1) to position (X1',Y1') in the machine coordinate system. Also, as shown in Figure 10, let p1 be the movement vector of the calibration mark 114 within the image at this time. In this case, to convert a vector on an image captured at angle Φ into a machine coordinate vector, the vector on the image should be multiplied from the left by the following transformation matrix M1(Φ).

number

[0054] In Equation 1, the rotation matrix that rotates by angle α is denoted as R(α). Also, in Equation 1, the movement vector m1 in the machine coordinate system can be determined from the position detection value of the main axis 104. The movement vector p1 in the camera coordinate system can be determined by analyzing the two translational images 32. Therefore, the matrix M1(Φ) can be obtained by acquiring the two translational images 32.

[0055] The controller 14 applies the calculated matrix M1(Φ) and the camera-side offset vector v(DZ1) calculated from the rotated image 31 to the following equation 2 to calculate a specific offset vector V(DZ1,Φ) (S38).

number

[0056] As shown in Figure 6, once the controller 14 obtains a specific offset vector V(DZ1,Φ) corresponding to one imaging distance DZ=DZ1, it calculates a specific offset vector V(DZ2,Φ) corresponding to another imaging distance DZ=DZ2. The procedure for calculating the specific offset vector V(DZ2,Φ) corresponding to the imaging distance DZ=DZ2 is the same as the procedure for calculating the specific offset vector V(DZ1,Φ), except that the imaging distance DZ is different.

[0057] Next, if the controller 14 obtains two specific offset vectors V(DZ1,Φ) and V(DZ2,Φ), it calculates the offset vector in the machine coordinate system at an arbitrary imaging distance DZ, i.e., the general-purpose offset vector V(DZ,Φ) (S44).

[0058] In other words, as shown in Figure 11, when the optical axis Ao is tilted with respect to the reference axis As, the offset distance Dos changes with the imaging distance DZ. However, the amount of change in this offset distance is proportional to the amount of change in the imaging distance DZ. Therefore, if two specific offset vectors V(DZ1,Φ) and V(DZ2,Φ) are obtained, a general-purpose offset vector V(DZ,Φ) can be obtained that is generalized to be applicable to any imaging distance DZ.

[0059] Specifically, when imaging at an arbitrary imaging distance DZ and an arbitrary angle Φ, the vector in the mechanical coordinate system from the reference point Ps to the optical axis point Po, i.e., the general-purpose offset vector V(DZ,Φ), is given by the following equation 3.

number

[0060] If the controller 14 can calculate the general-purpose offset vector V(DZ,Φ), it will start measuring the shape of the object to be measured 120. At this time, the controller 14 sets the offset between the reference point Ps and the optical axis point Po as the XY offset value so that the optical axis point Po is located at the measurement target point. The numerical control device 112 positions the main axis 104 at a position shifted by the XY offset value from the measurement target point.

[0061] For example, if you want to measure a point that is thought to be on the edge of the workpiece 122, the XY position of the spindle 104 should be positioned at a location offset by -V(DZ,Φ) from the point to be measured. In order to calculate the offset vector, it is necessary to determine the imaging distance DZ. As mentioned above, the imaging distance DZ is the distance from the imaging surface 30 containing the point to be measured to the spindle 104. Therefore, even if the Z coordinate value of the spindle 104 is the same, if the Z coordinate value of the point to be measured is different, the imaging distance DZ will also be different. To determine this imaging distance DZ, an autofocus function may be used. The autofocus function is a function that changes the focus of the lens so that the overall brightness of the image is highest. The focal length at the time when the autofocus function is in focus may be determined as the distance to the point to be measured, i.e., the imaging distance DZ. The controller 14 may apply this imaging distance DZ to equation 3 to calculate the offset vector V(DZ,Φ) and determine the position of the spindle 104. Furthermore, if an ideal or approximate three-dimensional shape model after machining is obtained by simulating the initial three-dimensional shape model of the workpiece 122 using known interference detection technology, the imaging distance DZ may be determined from the three-dimensional shape model of the object to be measured 120, rather than by the autofocus function. That is, the Z coordinate value of the measurement target point can be determined by analyzing the three-dimensional shape model of the object to be measured 120. The difference between the Z coordinate value of this measurement target point and the Z coordinate value of the main spindle 104 becomes the imaging distance DZ. If there exists an imaging distance DZ=DZa where the reference point Ps coincides with the optical axis point Po, the controller 14 may always position the Z coordinate value of the main spindle 104 so that the imaging distance DZ=DZa, and may also focus by driving the focus lens. With this configuration, the offset between the optical axis point Po and the reference point Ps becomes zero, making positioning in the XY direction easier.

[0062] In any case, by changing the position of the main spindle 104 as needed so that the optical axis point Po is located at the measurement target point according to the imaging distance DZ, the area around the measurement target point can be appropriately imaged and the shape around the measurement target point can be accurately measured. Note that the configurations described so far are all examples, and other configurations may be changed as long as the configuration of claim 1 is met. For example, in the above description, the imaging unit 12 is attached to the main spindle 104, but the imaging unit 12 may be attached to any other type of movable part of the machine tool 100. For example, if the machine tool 100 is a turret lathe (also called a turning center), the imaging unit 12 may be attached to the tool mounting part of the turret device. In this case, the rotation mechanism for rotating the imaging unit 12 around the reference axis As may be provided in the turret device or in the imaging unit 12. Also, the order of processing shown in Figures 5 and 6 is an example and may be changed as appropriate. For example, in the example in Figure 6, image acquisition and offset vector calculation are performed alternately, but the offset vector calculation may be performed all at once after acquiring both the rotated image 31 and the translated image 32. Alternatively, the camera-side offset vector may be calculated based on the rotated image 31 after calculating the transformation vector shown in Equation 1 based on the translated image 32. [Explanation of Symbols]

[0063] 10 Shape measurement system, 12 Imaging unit, 14 Controller, 16 Camera, 18 Processor, 20 Memory, 22 Communication interface, 24 UI device, 30 Imaging plane, 31 Rotational image, 32 Translational image, 100 Machine tool, 101 Tool, 102 Movable part, 104 Spindle, 106 Table, 110 Tool magazine, 112 Numerical control device, 114 Calibration marks, 120 Object to be measured, 122 Workpiece, Ao Optical axis, As Reference axis, Po Optical axis point, Ps Reference point.

Claims

1. An imaging unit mounted on the movable part of a machine tool so as to be rotatable around a predetermined reference axis, A controller that calculates the shape of the object to be measured in the image based on the image captured by the imaging unit, Equipped with, The movable part is movable relative to the imaging plane of the imaging unit in the Z direction parallel to the reference axis and in the X and Y directions perpendicular to the Z direction. The optical axis of the imaging unit is parallel to the Z direction or tilted at a small angle with respect to the Z direction. The intersection of the optical axis and the imaging plane is the optical axis point, the intersection of the reference axis and the imaging plane is the reference point, and the distance in the Z direction between the movable part and the imaging plane is the imaging distance. The aforementioned controller, The specific relative positional relationship, which is the relative positional relationship in the mechanical coordinate system between the optical axis point and the reference point at a specific imaging distance, is calculated for each of two different imaging distances. Based on the two specified relative positional relationships, a general relative positional relationship is calculated, which is the relative positional relationship in the mechanical coordinate system between the optical axis point and the reference point at an arbitrary imaging distance. It is configured in such a way, The aforementioned specific relative positional relationship is calculated based on two or more rotational images captured by changing the rotation angle of the imaging unit around the reference axis while keeping the imaging distance between the movable part and the imaging surface constant, and two or more translational images captured by moving the movable part relative to the imaging surface in the XY direction. A shape measurement system characterized by the following features.

2. A shape measurement system according to claim 1, Calibration marks are located inside the aforementioned machine tool. The shape measurement system is characterized in that the controller is configured to control the position of the movable part during imaging so that the calibration mark is captured in both the rotated image and the translated image.

3. A shape measurement system according to claim 2, The aforementioned controller, Based on two or more of the aforementioned rotated images, a camera-side offset vector is identified that indicates the relative positional relationship between the optical axis point and the reference point in the camera coordinate system. Based on two or more of the aforementioned translational images, a transformation vector is identified to convert camera coordinate values ​​into machine coordinate values. Based on the camera-side offset vector and the transformation vector, the vector in the mechanical coordinate system from the optical axis point to the reference point at a specific imaging distance is calculated as the specific relative positional relationship. A shape measurement system characterized by being configured in such a way.

4. A shape measurement system according to claim 3, The shape measurement system is characterized in that the controller is configured to calculate the center coordinates of a circle passing through the camera coordinate values ​​of the calibration marks in each of the two or more rotated images as the camera coordinate values ​​of the reference point.

5. A shape measurement system according to claim 3, The controller controls the rotation angle of the imaging unit to Φ and the movement vector in the mechanical coordinate system between the two translational images to m. 1 Let p be the movement vector in the camera coordinate system. 1 If R(α) is a rotation matrix that rotates by an angle α, then the transformation vector M is obtained based on equation 1. 1 A shape measurement system characterized by being configured to calculate (Φ). [Math 1]

6. A shape measurement system according to claim 3, When the controller sets the camera-side offset vector as v(DZ 1 ), and the conversion vector as M 1 (Φ), a specific offset vector V(DZ 1 , Φ) which is a vector in the machine coordinate system from the optical axis point to the reference point is calculated as V(DZ 1 , Φ) = M 1 (Φ) v(DZ 1 ). The shape measurement system is configured as such.

7. A shape measurement system according to claim 1, The controller calculates a general-purpose offset vector V(DZ,Φ), which is a vector from the optical axis point to the reference point at an arbitrary imaging distance DZ and an arbitrary rotation angle Φ, as the general-purpose relative positional relationship. The aforementioned general-purpose offset vector V(DZ, Φ) is obtained by taking two different imaging distances DZ 1 , DZ 2 The corresponding offset vector is V(DZ 1 Φ) and V(DZ 2 If we assume Φ, then it is calculated using the following equation 3: A shape measurement system characterized by the following features. [Math 2]

8. A shape measurement system according to claim 1, The shape measurement system is characterized in that the controller is configured to position the movable part based on the general relative position relationship such that the optical axis point is located at the measurement point of the object to be measured, and to calculate the shape of the object to be measured based on the image captured in that state.

9. A shape measurement system according to claim 1, The shape measurement system is characterized in that the controller is configured to determine the position of the movable part for positioning the optical axis point at the measurement target point of the object to be measured, based on the relative positional relationship between the optical axis point and the reference point, which is determined by applying the focal length determined by autofocus as the imaging distance and applying it to the general relative positional relationship.

10. A shape measurement system according to claim 1, The shape measurement system is characterized in that the controller is configured to calculate the movement path of the movable part for measurement based on the general relative positional relationship and the focal length identified by autofocus execution or the shape model of the object to be measured, so that the optical axis is positioned at the point to be measured when at least the X coordinate value and Y coordinate value of the point to be measured of the object to be measured are specified in advance.

Citation Information

Patent Citations

  • Numerical controller and control method of numerical controller

    JP2021163107A

  • Three-dimensional coordinate measuring method by monocular imaging device

    JP2022007134A