Position and orientation detection device, shape measuring device, and position and orientation detection method
The position and orientation detection device automates the alignment process in three-dimensional coordinate measuring machines, reducing operation time and improving versatility by using image acquisition and model conversion techniques.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2026-03-12
AI Technical Summary
Three-dimensional coordinate measuring machines require manual alignment by operators, which is time-consuming and prone to errors, and using workpiece installation jigs limits versatility.
A position and orientation detection device that automatically detects the position and orientation of a workpiece using a captured image acquisition unit, conversion processing, and a determination unit to match a three-dimensional model with the workpiece's actual position, eliminating the need for manual alignment.
Automated detection of workpiece position and orientation reduces operation time and minimizes the risk of collisions, enhancing the versatility of the measuring machine.
Smart Images

Figure 2026043936000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a position and orientation detection device and a position detection method for detecting the position and orientation of a workpiece placed on a shape measuring machine, and to a shape measuring machine equipped with this position detection device. [Background technology]
[0002] Conventionally, there has been known a three-dimensional coordinate measuring machine (shape measuring machine) that has a drive unit that displaces the position and posture of a probe, and that performs various measurements such as the dimensions and shape of a measurement element by bringing this probe into contact (probing) with each of a plurality of measurement elements (e.g., a line, a circular hole, a plane, a sphere, etc.) formed on a workpiece (object to be measured) (see Patent Document 1).
[0003] In the three-dimensional coordinate measuring machine described in Patent Document 1, before measuring the shape of a workpiece, a measurement plan (also called a measurement program or measurement plan) is created in advance based on the actual workpiece or a CAD (Computer Aided Design) model. Next, when starting to measure the shape of a workpiece using this three-dimensional coordinate measuring machine, the workpiece is first placed on a surface plate. Next, an operator operates the control unit of the three-dimensional coordinate measuring machine to perform manual alignment by probing multiple points on the workpiece with a probe, thereby detecting the position and orientation (position and orientation) of the workpiece placed on the surface plate. This links the machine coordinate system of the three-dimensional coordinate measuring machine with a workpiece coordinate system based on the workpiece.
[0004] Once manual alignment is complete, the 3D coordinate measuring machine measures one or more measurement items (radius, diameter, roundness, etc.) of the measurement element of the workpiece with the probe according to the previously determined measurement plan. Then, the 3D coordinate measuring machine acquires measurement data of the workpiece corresponding to the measurement items based on the coordinate values of the probing points obtained by this measurement. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Japanese Patent Application Laid-Open No. 2017-133909 Summary of the Invention [Problem to be solved by the invention]
[0006] However, the three-dimensional coordinate measuring machine described in Patent Document 1 requires manual alignment by an operator, which results in a long operation time. Furthermore, depending on the operator's skill level, there is a risk of the probe colliding with the workpiece. For this reason, it is possible to omit manual alignment by using a workpiece installation jig, but in this case, the jig must be fixed to the three-dimensional coordinate measuring machine in advance, which is time-consuming. Furthermore, since a jig must be prepared for each type of workpiece, the versatility of the three-dimensional coordinate measuring machine is lost.
[0007] The present invention has been made in consideration of the above circumstances, and aims to provide a position and orientation detection device and position detection method that can automatically detect the position and orientation of a workpiece, and a shape measuring machine equipped with this position detection device. [Means for solving the problem]
[0008] A position and orientation detection device for achieving the object of the present invention detects the position and orientation of a workpiece placed in a shape measuring machine that measures the shape of the workpiece, and includes a captured image acquisition unit that acquires a captured image of the workpiece placed in the shape measuring machine, a capturing condition acquisition unit that acquires the capturing conditions of the captured image, a three-dimensional model placement unit that virtually places a three-dimensional model of the workpiece on the shape measuring machine, a conversion processing unit that converts the three-dimensional model into a two-dimensional image that would be obtained if the three-dimensional model were captured under the same conditions as the capturing conditions, based on the position and orientation of the three-dimensional model virtually placed on the shape measuring machine and the capturing conditions acquired by the capturing condition acquisition unit, and the position and orientation of the workpiece and the three-dimensional model based on the calculation result of the degree of coincidence calculation unit; a determination unit that determines whether the positions and orientations of the workpiece and the three-dimensional model match based on the calculation result of the degree of coincidence calculation unit; a repetitive control unit that, if the determination unit determines that they do not match, repeatedly executes repetitive control including displacement of the three-dimensional model, generation of a two-dimensional image by the conversion processing unit, calculation of the degree of coincidence by the degree of coincidence calculation unit, and determination by the determination unit until the determination unit determines that they match; and a determination unit that determines the position and orientation of the three-dimensional model when the determination unit determines that they match as the position and orientation of the workpiece.
[0009] This position and orientation detection device can automatically detect the position and orientation of a workpiece without performing manual alignment.
[0010] In a position and orientation detection device according to another aspect of the present invention, an imaging condition acquisition unit acquires, as imaging conditions, the position and orientation of a camera that images a workpiece and the position and orientation of an illumination light source that illuminates the workpiece, thereby enabling conversion of a three-dimensional model into a two-dimensional image that would be obtained if the workpiece were imaged under the same imaging conditions.
[0011] In a position and orientation detection device according to another aspect of the present invention, the photographing condition acquisition unit further acquires, as the photographing conditions, information capable of identifying an image reflected on the surface of the workpiece. This allows the coincidence calculation unit to accurately calculate the coincidence even when reflection occurs on the surface of the workpiece, thereby improving the detection accuracy of the position and orientation of the workpiece.
[0012] In a pose detecting apparatus according to another aspect of the present invention, a conversion processing unit converts a three-dimensional model into a two-dimensional image by differentiable rendering.
[0013] In a position and orientation detecting device according to another aspect of the present invention, the coincidence calculation unit calculates an error between the captured image and the two-dimensional image or a differential value of the error as the coincidence.
[0014] In a position and orientation detecting device according to another aspect of the present invention, a three-dimensional model placement unit determines, by simulation, an initial position and orientation of a three-dimensional model to be virtually placed on a shape measuring machine.
[0015] In a position and orientation detection device according to another aspect of the present invention, the determination unit determines that the position and orientation of the workpiece and the position and orientation of the three-dimensional model match when the number of repetitions by the repetition control unit reaches a predetermined number.
[0016] In another aspect of the present invention, a position and orientation detection device includes a captured image processing unit that performs image processing on the captured image acquired by the captured image acquisition unit to mask or delete a background image that differs from the image of the workpiece, and a matching degree calculation unit that calculates the matching degree between the captured image that has been image-processed by the captured image processing unit and the two-dimensional image. This allows the matching degree calculation unit to accurately calculate the matching degree, thereby improving the detection accuracy of the position and orientation of the workpiece.
[0017] A shape measuring machine for achieving the object of the present invention includes a surface plate on which a workpiece is placed, a camera for photographing the workpiece placed on the surface plate, and the position and orientation detection device described above.
[0018] In another aspect of the present invention, a shape measuring instrument includes an index provided on a surface plate to indicate the position and orientation of a workpiece to be placed on the surface plate, and a three-dimensional model placement unit virtually places a three-dimensional model in accordance with the position and orientation of the workpiece when the workpiece is placed on the surface plate according to the index, thereby reducing the number of repetitions by the repetition control unit.
[0019] A position and orientation detection method for achieving the object of the present invention is a position and orientation detection method for detecting the position and orientation of a workpiece placed in a shape measuring machine that measures the shape of the workpiece, the position and orientation detection method comprising: a photographed image acquisition step for acquiring a photographed image of the workpiece placed in the shape measuring machine; a photographing condition acquisition step for acquiring photographing conditions for the photographed image; a three-dimensional model arrangement step for virtually arranging a three-dimensional model of the workpiece in the shape measuring machine; a conversion processing step for converting the three-dimensional model into a two-dimensional image that would be obtained if the three-dimensional model were photographed under the same conditions as the photographing conditions, based on the position and orientation of the three-dimensional model virtually arranged in the shape measuring machine and the photographing conditions acquired in the photographing condition acquisition step; The method includes a coincidence calculation step for calculating the degree of coincidence between the captured image acquired in the step and the two-dimensional image generated in the conversion processing step; a judgment step for judging whether or not the positions and orientations of the workpiece and the three-dimensional model match based on the calculation result of the coincidence calculation step; a repetitive control step for repeatedly executing the displacement of the three-dimensional model, the conversion processing step, the coincidence calculation step, and the judgment step if the judgment step determines that they match; and a determination step for determining the position and orientation of the three-dimensional model when the judgment step determines that they match as the position and orientation of the workpiece. [Effects of the Invention]
[0020] The present invention can automatically detect the position and orientation of a workpiece. [Brief explanation of the drawings]
[0021] [Figure 1] 1 is a schematic diagram of a three-dimensional coordinate measuring machine according to a first embodiment. [Figure 2] FIG. 2 is an enlarged perspective view of the workpiece in FIG. [Figure 3] FIG. 2 is a functional block diagram of a control device according to the first embodiment. [Figure 4] 10 is a diagram showing an example of a photographed image of a workpiece acquired by a photographed image acquisition unit. FIG. [Figure 5] 4 is a diagram showing an example of a shooting condition acquired by a shooting condition acquisition unit. FIG. [Figure 6] FIG. 6 is a diagram showing an example of camera conditions among the shooting conditions in FIG. 5. [Figure 7] Reference numeral 7A is a diagram for explaining the virtual placement of a three-dimensional model by the three-dimensional model placement unit, and reference numeral 7B is a diagram for explaining the generation of a two-dimensional image by the rendering unit. [Figure 8] FIG. 2 is an explanatory diagram for explaining the formula [2]. [Figure 9] 10 is a graph showing the relationship between the number of iterations (number of iterations) performed by the iteration control unit and the error calculated by the error calculation unit. [Figure 10] This is a diagram comparing the position and posture of the workpiece (see symbol XA), the initial position and posture of the three-dimensional model (see symbol XB), and the position and posture of the three-dimensional model when the error in Figure 9 has been sufficiently reduced (see symbol XC). [Figure 11] 4 is a flowchart showing the flow of a process for measuring the shape of a workpiece by the three-dimensional coordinate measuring machine of the first embodiment. [Figure 12] FIG. 10 is a functional block diagram showing functions of a position and orientation detection unit in a control device of a three-dimensional coordinate measuring machine according to a second embodiment. [Figure 13] 10 is an explanatory diagram for explaining image processing of a captured image by a captured image processing unit. FIG. [Figure 14] FIG. 10 is a perspective view of a surface plate of a three-dimensional coordinate measuring machine according to a third embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0022] [Configuration of the three-dimensional coordinate measuring machine 10 of the first embodiment] Fig. 1 is a schematic diagram of a three-dimensional coordinate measuring machine 10 according to a first embodiment, which corresponds to a shape measuring machine of the present invention. Fig. 2 is an enlarged perspective view of a workpiece W in Fig. 1. Note that the mutually orthogonal X, Y, and Z axes in Fig. 1 represent a machine coordinate system that is determined based on a machine coordinate origin specific to the three-dimensional coordinate measuring machine 10. Furthermore, the mutually orthogonal X, Y, and Z axes in Fig. 2 represent a workpiece coordinate system that is set with the workpiece W as the reference.
[0023] As shown in Figures 1 and 2, the three-dimensional coordinate measuring machine 10 uses a coordinate measurement probe 26 compatible with contact measurement to perform shape measurement of one or more measurement items (measurement elements) of a workpiece W in accordance with a predetermined measurement plan (created in a workpiece coordinate system). The shape of the workpiece W here includes, for example, the three-dimensional shape, two-dimensional shape, surface shape, and contour shape of the workpiece W, as well as various dimensional shapes such as length and diameter. The shape and type of the workpiece W to be measured are not particularly limited. A known non-contact measurement probe may be used instead of the contact measurement probe 26.
[0024] The three-dimensional coordinate measuring machine 10 automatically detects the position and posture (workpiece coordinate system) of the workpiece W without the operator having to perform manual alignment, and performs shape measurement of the workpiece W in accordance with a predetermined measurement plan by linking the machine coordinate system and the workpiece coordinate system based on this detection result.
[0025] The three-dimensional coordinate measuring machine 10 comprises a base 12, a base plate 14 mounted on the base plate 12, a right Y carriage 16R and a left Y carriage 16L erected at both ends of the base plate 14, an X guide 18 connecting the upper parts of the right Y carriage 16R and the left Y carriage 16L, an illumination light source 27, a camera 28, a controller 29, and a control device 30.
[0026] The operator places the workpiece W in any position and orientation on the upper surface of the surface plate 14. Sliding surfaces along which the right Y carriage 16R and left Y carriage 16L slide in the Y direction are formed on the upper surface and side surfaces of both ends of the surface plate 14 in the X direction. Air bearings (not shown) are provided on the right Y carriage 16R and left Y carriage 16L at positions facing the sliding surfaces of the surface plate 14. This allows the right Y carriage 16R and left Y carriage 16L to move freely in the Y direction together with the X guide 18.
[0027] X carriage 20 is attached to X guide 18. A sliding surface along the X direction is formed on X guide 18 along which X carriage 20 slides. An air bearing (not shown) is also provided on X carriage 20 at a position facing the sliding surface of X guide 18. This allows X carriage 20 to move freely in the X direction.
[0028] A Z carriage 22 (also called a Z spindle) is attached to the X carriage 20. The X carriage 20 is also provided with a Z-direction guide air bearing (not shown) that guides the Z carriage 22 in the Z direction. This allows the Z carriage 22 to be held by the X carriage 20 so that it can move in the Z direction. A probe head 24 that holds a probe 26 (also called a stylus) is provided at the bottom end of the Z carriage 22.
[0029] The three-dimensional coordinate measuring machine 10 is also provided with an XYZ drive unit 32 (see FIG. 3) that moves the portal frame 19 in the Y direction, the X carriage 20 in the X direction, and the Z carriage 22 in the Z direction. The XYZ drive unit 32 is a known actuator configured, for example, with a motor or the like. Driving the XYZ drive unit 32 makes it possible to move the probe head 24 (probe 26) in the X, Y, and Z directions.
[0030] Furthermore, although not shown, a Y linear scale is provided at the end of surface plate 14 on the right Y carriage 16R side, an X linear scale is provided on X guide 18, and a Z linear scale is provided on Z carriage 22. Furthermore, three-dimensional coordinate measuring machine 10 is provided with a read head 33 (see FIG. 3) that reads each of the X, Y, and Z linear scales. The detection result of this read head 33 is output to control device 30 via controller 29.
[0031] The probe head 24 is, for example, a known five-axis simultaneous control head equipped with a stepless positioning mechanism. The probe head 24 is provided with a rotation drive unit 34 (see FIG. 3) such as a motor that rotates the probe 26 around a rotation axis parallel to the Z direction and around a rotation axis perpendicular to the Z direction. Driving the rotation drive unit 34 allows the orientation of the probe 26 to be changed.
[0032] The probe head 24 is also provided with a rotation angle detection unit 35 (see FIG. 3) such as a rotary encoder that detects the rotation angle around each axis of the probe 26. The detection result of the rotation angle detection unit 35 is output to the control device 30 via the controller 29.
[0033] The probe 26 is detachably attached to the probe head 24. The probe 26 is a contact-type touch trigger probe, and has a known contactor 26a (probing ball). The type of the probe 26 is not particularly limited.
[0034] The illumination light source 27 and the camera 28 are used to detect the position and orientation of the workpiece W placed on the surface plate 14. In this embodiment, the illumination light source 27 and the camera 28 are provided separately, but they may be integrated, and for example, the camera 28 with a light source may be used.
[0035] The illumination light source 27 emits illumination light toward the upper surface of the surface plate 14. As a result, the illumination light source 27 illuminates the workpiece W placed on the surface plate 14.
[0036] The camera 28 photographs the upper surface of the surface plate 14. As a result, the camera 28 photographs the workpiece W illuminated by the illumination light source 27 on the surface plate 14. The camera 28 outputs the photographed image D of the workpiece W to the control device 30. Note that if a good photographed image D of the workpiece W can be obtained without illumination by the illumination light source 27, the illumination light source 27 may be omitted.
[0037] The controller 29 controls the XYZ drive unit 32 and the rotation drive unit 34 shown in Fig. 3 described later to control the movement of the probe head 24, i.e., the position and orientation of the probe 26. When the three-dimensional coordinate measuring machine 10 is in the manual measurement mode, the controller 29 drives the XYZ drive unit 32 and the rotation drive unit 34 in response to operation input from the operator, and brings the probe 26 into contact with a plurality of measurement points (probing points) corresponding to each measurement item of the workpiece W defined in the measurement plan. When the three-dimensional coordinate measuring machine 10 is in the automatic measurement mode, the controller 29 drives the XYZ drive unit 32 and the rotation drive unit 34 under the control of the control device 30 to bring the probe 26 into contact with a plurality of measurement points corresponding to each measurement item of the workpiece W according to the measurement plan.
[0038] The controller 29 is connected to a contact detection sensor (not shown) of the contact touch trigger type probe 26, a reading head 33 and a rotation angle detection unit 35 shown in Fig. 3 described below. The moment the contact detection sensor detects that the probe 26 has come into contact with a measurement point of each measurement item on the workpiece W, the controller 29 acquires the detection results of the reading head 33 and the rotation angle detection unit 35 and outputs them to the control device 30.
[0039] The control device 30 (computer) is connected to the controller 29 via a known communication interface such as a LAN (Local Area Network) so as to be able to communicate data with the controller 29. The control device 30 comprehensively controls the operation of each part of the three-dimensional coordinate measuring machine 10. The control device 30 also functions as a position and orientation detection device of the present invention, and automatically detects the position and orientation of the workpiece W placed on the surface plate 14.
[0040] The control device 30 includes an arithmetic circuit configured with various processors, memories, etc. The various processors include a central processing unit (CPU), a graphics processing unit (GPU), an application specific integrated circuit (ASIC), and a programmable logic device (e.g., simple programmable logic device (SPLD), complex programmable logic device (CPLD), and field programmable gate array (FPGA)). The various functions of the control device 30 may be realized by a single processor, or by multiple processors of the same or different types.
[0041] [Configuration of the control device 30 and the storage unit 38] Fig. 3 is a functional block diagram of the control device 30 of the first embodiment. As shown in Fig. 3, in addition to the illumination light source 27, camera 28, and controller 29 already described, an operation unit 36, a display unit 37, and a storage unit 38 are connected to the control device 30.
[0042] The operation unit 36 accepts input operations by an operator. The operation unit 36 may be integrated with the controller 29. The display unit 37 displays various operation screens, measurement screens, menu screens, measurement data 41, and the like.
[0043] The storage unit 38 stores measurement plan data 40 (measurement program), measurement data 41, a three-dimensional model 42, and imaging conditions 43 (also referred to as environmental conditions) in addition to a control program (not shown) that operates the control device 30. The storage unit 38 also includes an external server that is network-connected to the control device 30 via various communication lines.
[0044] The measurement plan data 40 is created in advance before measuring the shape of the workpiece W. This measurement plan data 40 sets a measurement plan for each measurement item of the workpiece W. The measurement plan defines the movement path of the probe 26 (for example, the measurement order of each measurement item, the coordinate values of all measurement points for each measurement item, and the coordinate values of intermediate points that are points on the movement path of the probe 26) in the workpiece coordinate system. The measurement data 41 is the shape measurement results for each individual measurement item of the workpiece W.
[0045] The three-dimensional model 42 is, for example, a CAD model of the workpiece W whose shape is to be measured, and is stored in the storage unit 38 for each workpiece W whose shape is to be measured by the three-dimensional coordinate measuring machine 10. The photographing conditions 43, which will be described in detail later, are data that store the conditions when the photographed image D of the workpiece W is photographed by the camera 28.
[0046] The control device 30 functions as a position and orientation detection unit 50, a coordinate system linking unit 52, a drive control unit 54, a probing data acquisition unit 56, and a measurement data calculation unit 58 by executing a control program (not shown) stored in the memory unit 38.
[0047] The position and orientation detection unit 50 detects the position and orientation of the workpiece W placed on the surface plate 14 based on the captured image D captured by the camera 28, the three-dimensional model 42 and the imaging conditions 43 in the storage unit 38. This sets a workpiece coordinate system based on the workpiece W placed on the surface plate 14.
[0048] The coordinate system linking unit 52 links the workpiece coordinate system set based on the detection result of the position and orientation detection unit 50 with the machine coordinate system of the three-dimensional coordinate measuring machine 10 using a known method.
[0049] The drive control unit 54 operates when the three-dimensional coordinate measuring machine 10 is in automatic measurement mode. The drive control unit 54 drives the rotation drive unit 34 and the XYZ drive unit 32 via the controller 29 based on the measurement plan data 40 in the memory unit 38 and the linking result by the coordinate system linking unit 52, thereby executing probing processing for each measurement plan of the workpiece W. The probing processing is processing in which the probe 26 is brought into contact in order with all measurement points on the workpiece W that correspond to the measurement items.
[0050] The probing data acquisition unit 56 acquires probing data including the XYZ coordinate values of the measurement point (probing point) contacted by the probe 26 during the probing process in the automatic measurement mode or the manual measurement mode, and outputs the probing data to the measurement data calculation unit 58 each time the probe 26 contacts the measurement point of the workpiece W.
[0051] The measurement data calculation unit 58 calculates the measurement data 41 for each measurement item of the workpiece W based on the probing data input from the probing data acquisition unit 56. The measurement data 41 for each measurement item calculated by the measurement data calculation unit 58 is stored in the memory unit 38 and displayed on the display unit 37.
[0052] [Configuration of position and orientation detection unit 50] The position and orientation detection unit 50 detects the position and orientation of the workpiece W on the surface plate 14 after the operator places the workpiece W on the surface plate 14 and before starting to measure the shape of the workpiece W (before starting the probing process). For example, in this embodiment, after the operator places the workpiece W on the surface plate 14, when the operator inputs a measurement start operation to the operation unit 36, detection of the position and orientation of the workpiece W by the position and orientation detection unit 50 begins.
[0053] The position and orientation of the workpiece W can be expressed, for example, by the translation components (Tx, Ty, Tz) and rotation components (Rx, Ry, Rz) of the workpiece W. Note that the Rodriguez equation or Euler angles may be selected for the rotation components. Furthermore, the coordinate system in which the position and orientation of the workpiece W is expressed is preferably the machine coordinate system, but other coordinate systems may also be used.
[0054] The position and orientation detection unit 50 functions as a captured image acquisition unit 60, a capturing condition acquisition unit 62, a three-dimensional model placement unit 64, a rendering unit 66, an error calculation unit 68, a determination unit 70, a repetition control unit 72, and a determination unit 74.
[0055] 4 is a diagram showing an example of a photographed image D of the workpiece W acquired by the photographed image acquisition unit 60. As shown in FIGS. 3 and 4, the photographed image acquisition unit 60 acquires the photographed image D of the workpiece W from the camera 28 and outputs this photographed image D to the error calculation unit 68.
[0056] Fig. 5 is a diagram showing an example of the shooting conditions 43 acquired by the shooting condition acquisition unit 62. Fig. 6 is a diagram showing an example of the camera conditions in the shooting conditions 43 in Fig. 5. As shown in Figs. 3, 5, and 6, the shooting condition acquisition unit 62 acquires the shooting conditions 43 of the captured image D from the storage unit 38, and outputs the shooting conditions 43 to the rendering unit 66.
[0057] The photographing conditions 43 include "camera conditions" related to the camera 28 that photographs the workpiece W on the surface plate 14, "lighting conditions" of the illumination light source 27 that illuminates the workpiece W on the surface plate 14, and "other" conditions. The photographing conditions 43 are conditions determined by the type and position and orientation of the camera 28, the type and position and orientation of the illumination light source 27, and the type of three-dimensional coordinate measuring machine 10, and are therefore created in advance and stored in the storage unit 38.
[0058] The camera conditions include, for example, three-dimensional position information of camera 28 in the mechanical coordinate system (see Figure 6), posture information of camera 28 in the mechanical coordinate system (information indicating the direction of the shooting optical axis of camera 28, see Figure 6), focal length of camera 28 (shooting angle of view), and distortion parameters of the lens of camera 28.
[0059] The illumination conditions include, for example, three-dimensional position information of the illumination light source 27 in the machine coordinate system, and attitude information of the illumination light source 27 in the machine coordinate system (information indicating the direction of the illumination optical axis of the illumination light source 27). Note that the illumination conditions may also include the wavelength of the illumination light.
[0060] The "other" conditions include, for example, reflection information. The reflection information is information that can identify an image (e.g., a partial image of the three-dimensional coordinate measuring machine 10) that is reflected on the surface of the workpiece W and the surface of the background (such as the surface of the surface plate 14) when the workpiece W is photographed by the camera 28. If a partial image of the three-dimensional coordinate measuring machine 10 is reflected on the surfaces of the workpiece W and the background, the partial image of the three-dimensional coordinate measuring machine 10 is also included in the images of the workpiece W and the background in the photographed image D. For this reason, the reflection information is used, for example, to reflect a partial image of the three-dimensional coordinate measuring machine 10 in the two-dimensional image 80 generated by the rendering unit 66 described below, or to exclude a partial image of the three-dimensional coordinate measuring machine 10 from the photographed image D when an error calculation is performed by the error calculation unit 68 described below.
[0061] Reference numeral 7A in FIG. 7 is a diagram for explaining the virtual placement of the three-dimensional model 42 by the three-dimensional model placement unit 64, and reference numeral 7B is a diagram for explaining the generation of the two-dimensional image 80 by the rendering unit 66.
[0062] As shown in Figures 3 and 7, the three-dimensional model placement unit 64 acquires a three-dimensional model 42 of the workpiece W from the memory unit 38 and virtually places this three-dimensional model 42 on a virtual base plate 14 (a three-dimensional model, etc.) (see symbol 7A in Figure 7).
[0063] In this case, the initial position and orientation of the three-dimensional model 42 virtually placed on the surface plate 14 is arbitrary, but the closer this initial position and orientation is to the position and orientation of the workpiece W on the surface plate 14, the more likely it is that the number of repetitive control operations (iterations) performed by the repetitive control unit 72, which will be described later, will be reduced. For this reason, the three-dimensional model placement unit 64 may determine the initial position and orientation of the three-dimensional model 42 by simulation so that the initial position and orientation of the three-dimensional model 42 is close to the position and orientation of the workpiece W on the surface plate 14 or so that the number of repetitive control operations is minimized. For example, the three-dimensional model placement unit 64 determines the initial position and orientation of the three-dimensional model 42 by performing one or more iterations using the Monte Carlo method.
[0064] The rendering unit 66 corresponds to the conversion processing unit of the present invention. Based on the position and orientation of the three-dimensional model 42 virtually arranged by the three-dimensional model arrangement unit 64 and the shooting conditions 43 input from the shooting condition acquisition unit 62, the rendering unit 66 converts the three-dimensional model 42 into a two-dimensional image 80 obtained by photographing the three-dimensional model 42 under the same conditions as the shooting conditions 43. Specifically, the rendering unit 66 converts the three-dimensional model 42 into the two-dimensional image 80 by differentiable rendering. The generation of the two-dimensional image 80 by differentiable rendering will be specifically described below.
[0065] The conversion equation for converting the three-dimensional model 42 into the two-dimensional image 80 is expressed by the following [Equation 1]. Here, "I r (x, y)" indicates the luminance (brightness) of a pixel in the two-dimensional image 80. Furthermore, "π" in the formula R(x, y, π) in Equation 1 includes the three-dimensional model 42, the shooting conditions 43, and the like.
[0066]
number
[0067] In "R" of the above formula (1), the brightness at which the three-dimensional model 42 appears is calculated according to the rendering equation expressed by the following formula (2).
[0068]
number
[0069] 8 is an explanatory diagram for explaining the formula (2). As shown in FIG. 8, in the formula (2), "x" is the position of the three-dimensional model 42, "n" is the normal vector of the surface at x, "ω0" is the emission vector, and "ω i " is the incident vector. Also, "L e " is the brightness of the self-luminous light (radiance), and "L r " is the reflected brightness. Furthermore, "f r" is a BRDF (Bidirectional Reflectance Distribution Function) and defines the material and texture of the three-dimensional model 42. Furthermore, "Ω" in [Equation 2] stands for ω i The range is n>0.
[0070] In the above [Equation 2], "x" and "n" are parameters that are affected by the position and orientation of the three-dimensional model 42. Therefore, "x" and "n" in the above [Equation 2] are replaced by the following [Equation 3]. Here, Trans(Tx, Ty, Tz) is a known translation matrix, and Rot(Rx, Ry, Rz) is a known rotation matrix. Also, "x" in the [Equation 3] i "," "n i " are the coordinates and normals of the three-dimensional model 42 before translation and rotation are applied, respectively, and are expressed in the work coordinate system in this embodiment.
[0071]
number
[0072] By replacing "x" and "n" in Equation 2 with Equation 3, the two-dimensional image 80 rendered by the rendering unit 66 can be partially differentiated with respect to the translation components (Tx, Ty, Tz) and rotation components (Rx, Ry, Rz).
[0073] Since "π" in the above [Equation 1] is a function of "Tx, Ty, Tz, Rx, Ry, Rz", the above [Equation 1] can be converted to the following [Equation 4].
[0074]
number
[0075] The rendering unit 66 converts the three-dimensional model 42 into a two-dimensional image 80 by differentiable rendering based on the above [Equation 4], i.e., the above [Equation 2] substituted with the above [Equation 3]. Then, the rendering unit 66 outputs the generated two-dimensional image 80 to the error calculation unit 68.
[0076] 3, the error calculation unit 68 corresponds to the coincidence calculation unit of the present invention. The error calculation unit 68 calculates the error (or a differential value of the error) between the captured image D and the two-dimensional image 80 as an index showing the coincidence between the captured image D input from the captured image acquisition unit 60 and the two-dimensional image 80 generated by the rendering unit 66.
[0077] Here, the two-dimensional image 80 is obtained by converting the three-dimensional model 42 by differentiable rendering based on the shooting conditions 43 of the captured image D. For this reason, if the position and orientation of the workpiece W when photographed by the camera 28 matches the position and orientation of the three-dimensional model 42 when differentiable rendering is performed, the degree of match between the captured image D and the two-dimensional image 80 will be high, and the error between them will be small. Conversely, if the position and orientation of the workpiece W when photographed by the camera 28 does not match the position and orientation of the three-dimensional model 42 when differentiable rendering is performed, the degree of match between the captured image D and the two-dimensional image 80 will be low, and the error between them will be large.
[0078] The error calculation unit 68 calculates the error [E(Tx, Ty, Tz, Rx, Ry, Rz)] using, for example, the following [Equation 5]. Here, "Ic(x, y)" in [Equation 5] is the luminance value (brightness) of the pixel of the captured image D.
[0079]
number
[0080] The determination unit 70 determines whether or not the positions and orientations of the workpiece W and the three-dimensional model 42 match based on the calculation result of the error calculation unit 68. For example, the determination unit 70 determines that the positions and orientations of the workpiece W and the three-dimensional model 42 match when a first condition is satisfied that the error (or its derivative value) calculated by the error calculation unit 68 is equal to or less than a predetermined threshold, and determines that the positions and orientations of the workpiece W and the three-dimensional model 42 do not match when this error is greater than the predetermined threshold.
[0081] Furthermore, when repetitive control is performed by a repetitive control unit 72 described later, the determination unit 70 may determine whether the positions and postures of the workpiece W and the three-dimensional model 42 match based on whether a second condition is satisfied, that is, whether the gradient of the error calculated by the error calculation unit 68 is equal to or less than a predetermined threshold (see FIG. 9 described later). Furthermore, when repetitive control is performed by the repetitive control unit 72, the determination unit 70 may determine whether the positions and postures of the workpiece W and the three-dimensional model 42 match based on whether a third condition is satisfied, that is, whether the number of repetitive control cycles (iteration count) reaches a predetermined number, instead of the second condition (see FIG. 9 described later).
[0082] The repetitive control unit 72 operates when the determination unit 70 determines that the positions and orientations of the workpiece W and the three-dimensional model 42 do not match. This repetitive control unit 72 repeatedly executes repetitive control including displacement of the position and orientation of the virtually placed three-dimensional model 42, generation of a two-dimensional image 80 by the rendering unit 66, calculation of an error by the error calculation unit 68, and determination by the determination unit 70, until the determination unit 70 determines that the positions and orientations of the workpiece W and the three-dimensional model 42 match. Here, the "displacement of the position and orientation of the three-dimensional model 42" in the repetitive control means displacing at least one of the position and orientation of the three-dimensional model 42.
[0083] Furthermore, when displacing the position and orientation of the three-dimensional model 42 in the repetitive control, it is preferable that the repetitive control unit 72 calculates the position and orientation of the three-dimensional model 42 so that the error calculated by the error calculation unit 68 is minimized, and displaces the position and orientation of the three-dimensional model 42 in accordance with this calculated position and orientation. Note that the position and orientation of the three-dimensional model 42 so that the error is minimized can be calculated, for example, by partially differentiating the error [E(Tx, Ty, Tz, Rx, Ry, Rz)] calculated by the error calculation unit 68 with respect to Tx, Ty, Tz, Rx, Ry, Rz, and applying a general optimization algorithm such as the steepest descent method, the conjugate gradient method, or Adam.
[0084] Fig. 9 is a graph showing the relationship between the number of iterations (number of iterations) of the iterative control by the iterative control unit 72 and the error calculated by the error calculation unit 68. Fig. 10 is a diagram comparing the position and posture of the workpiece W (see symbol XA), the initial position and posture of the three-dimensional model 42 (see symbol XB), and the position and posture of the three-dimensional model 42 when the error in Fig. 9 has been sufficiently reduced (see symbol XC).
[0085] 9, as the number of times of repetitive control by the repetitive control unit 72, i.e., the number of iterations, increases, the error calculated by the error calculation unit 68 decreases, and thereafter the error becomes approximately constant regardless of the increase in the number of iterations. Also, as shown in Fig. 10, when the error calculated by the error calculation unit 68 decreases sufficiently (for example, to about 0.0003) as the number of iterations increases, the positions and orientations of the workpiece W and the three-dimensional model 42 approximately match.
[0086] The above-mentioned determination unit 70 determines that the first condition is satisfied when the error calculated by the error calculation unit 68 is equal to or less than a predetermined threshold, determines that the second condition is satisfied when the gradient of the error calculated by the error calculation unit 68 is equal to or less than a predetermined threshold, and determines that the third condition is satisfied when the number of iterations reaches a predetermined number. Therefore, the determination unit 70 determines that the positions and orientations of the workpiece W and the three-dimensional model 42 match when one or more conditions preselected from the first to third conditions are satisfied.
[0087] 3, when the determination unit 70 determines that the positions and orientations of the workpiece W and the three-dimensional model 42 match, the determination unit 74 determines the position and orientation of the three-dimensional model 42 as the position and orientation of the workpiece W. This completes the detection of the position and orientation of the workpiece W by the position and orientation detection unit 50.
[0088] [Operation of the three-dimensional coordinate measuring machine of the first embodiment] 11 is a flowchart showing the flow of a shape measurement process (particularly a method for detecting the position and orientation of the workpiece W) for the workpiece W by the three-dimensional coordinate measuring machine 10 of the first embodiment. As shown in Fig. 11, a measurement plan for the workpiece W is created in advance by a known method, and measurement plan data 40 for the workpiece W is stored in the storage unit 38 (step S1). A three-dimensional model 42 and imaging conditions 43 for the workpiece W are also stored in the storage unit 38 in advance.
[0089] Next, the operator places the workpiece W to be measured on the surface plate 14 (step S2). When the operator inputs a measurement start operation to the operation unit 36, the position and orientation detection unit 50 of the control device 30 is activated, and this position and orientation detection unit 50 functions as a photographed image acquisition unit 60, a photographing condition acquisition unit 62, a three-dimensional model placement unit 64, a rendering unit 66, an error calculation unit 68, a judgment unit 70, a repetition control unit 72, and a determination unit 74.
[0090] Then, the image acquisition unit 60 causes the camera 28 to take an image of the workpiece W on the base plate 14, acquires an image D of the workpiece W from the camera 28, and outputs the image D to the error calculation unit 68 (step S3, which corresponds to the image acquisition step of the present invention).
[0091] Moreover, the photographing condition acquisition unit 62 acquires the photographing conditions 43 from the storage unit 38 and outputs them to the rendering unit 66 (step S4, which corresponds to the photographing condition acquisition step of the present invention).
[0092] Furthermore, the three-dimensional model placement unit 64 acquires the three-dimensional model 42 corresponding to the workpiece W from the memory unit 38, and virtually places this three-dimensional model 42 on the virtual surface plate 14 as shown by reference numeral 7A in FIG. 7 (step S5, which corresponds to the three-dimensional model placement step of the present invention). At this time, the three-dimensional model placement unit 64 may determine the initial position and orientation of the three-dimensional model 42 by simulation so that the initial position and orientation of the three-dimensional model 42 is close to the position and orientation of the workpiece W on the surface plate 14. This makes it possible to reduce the number of times of repetitive control (number of iterations) by the repetitive control unit 72, and to detect the position and orientation of the workpiece W in a short time.
[0093] Next, as shown by reference numeral 7B in FIG. 7 , the rendering unit 66 converts the three-dimensional model 42 into a two-dimensional image 80 by differentiable rendering based on the position and orientation of the three-dimensional model 42 virtually placed in the three-dimensional model placement unit 64 and the shooting conditions 43 input from the shooting condition acquisition unit 62 (step S6, corresponding to the conversion processing step of the present invention). This results in a two-dimensional image 80, which is an image of the three-dimensional model 42 photographed under the same conditions as the shooting conditions 43. The rendering unit 66 then outputs the generated two-dimensional image 80 to the error calculation unit 68.
[0094] When the error calculation unit 68 receives input of the captured image D from the captured image acquisition unit 60 and input of the two-dimensional image 80 from the rendering unit 66, it calculates the error between the captured image D and the two-dimensional image 80 and outputs the calculation result to the judgment unit 70 (step S7, which corresponds to the coincidence calculation step of the present invention).
[0095] When the determination unit 70 receives the input of the error calculation result from the determination unit 70, the determination unit 70 determines whether the positions and orientations of the workpiece W and the three-dimensional model 42 match based on whether this error satisfies the above-mentioned first condition (step S8, which corresponds to the determination step of the present invention). If the determination unit 70 determines that they match, the process proceeds to step S11 (YES in step S8).
[0096] On the other hand, if the determination unit 70 determines that the positions and orientations of the workpiece W and the three-dimensional model 42 do not match (NO in step S8), the iterative control unit 72 operates. The iterative control unit 72 calculates the position and orientation of the three-dimensional model 42 that minimizes the error, for example, based on the error calculated by the error calculation unit 68, by partially differentiating the error and applying the optimization algorithm described above. This updates the position and orientation (set value) of the three-dimensional model 42 (step S9). Next, the iterative control unit 72 displaces the position and orientation of the three-dimensional model 42 to match the new position and orientation (step S10).
[0097] Then, the repeat control unit 72 repeatedly executes the generation of the two-dimensional image 80 by the rendering unit 66 (step S6), the error calculation by the error calculation unit 68 (step S7), and the judgment by the judgment unit 70 (step S8). Note that in the second and subsequent judgment processes, the judgment unit 70 judges that the positions and orientations of the workpiece W and the three-dimensional model 42 match even if the second or third condition described above is satisfied.
[0098] Thereafter, the repeat control unit 72 repeatedly executes the processes of steps S9, S10, and S6 to S8 until the determination unit 70 determines that the positions and postures of the workpiece W and the three-dimensional model 42 match (YES in step S8, which corresponds to the repeat control step of the present invention).
[0099] When the determination unit 70 determines that the positions and orientations of the workpiece W and the three-dimensional model 42 match, the determination unit 74 determines the latest position and orientation of the three-dimensional model 42 as the position and orientation of the workpiece W (step S11, which corresponds to the determination step of the present invention). This completes the detection of the position and orientation of the workpiece W by the position and orientation detection unit 50. As a result, a workpiece coordinate system is set with the workpiece W on the surface plate 14 as the reference.
[0100] Next, the coordinate system linking unit 52 links the workpiece coordinate system with the machine coordinate system of the three-dimensional coordinate measuring machine 10 using a known method (step S12).
[0101] When the workpiece coordinate system and the machine coordinate system have been linked, the drive control unit 54 executes the probing process by driving the rotation drive unit 34 and the XYZ drive unit 32 via the controller 29 based on the measurement plan data 40 in the memory unit 38 and the linking result by the coordinate system linking unit 52. In addition, the probing data acquisition unit 56 acquires probing data including the XYZ coordinate values of the measurement point contacted by the probe 26 every time the probe 26 contacts a measurement point on the workpiece W during the probing process, and outputs the probing data to the measurement data calculation unit 58.
[0102] Then, the measurement data calculation unit 58 calculates the measurement data 41 for each measurement item of the workpiece W based on the probing data input from the probing data acquisition unit 56 (step S13). This measurement data 41 is stored in the memory unit 38 and is also displayed on the display unit 37.
[0103] As described above, the three-dimensional coordinate measuring machine 10 of the first embodiment can automatically detect the position and orientation (workpiece coordinate system) of the workpiece W placed on the surface plate 14 without the operator having to perform manual alignment. As a result, the time required to measure the shape of the workpiece W can be significantly shortened and the operator's workload can be reduced. Furthermore, there is no longer any need to install a jig for workpiece placement as in the past, which reduces the operator's workload and ensures the versatility of the three-dimensional coordinate measuring machine 10.
[0104] [Second embodiment] 12 is a functional block diagram showing the functions of the position and orientation detection unit 50 in the control device 30 of the three-dimensional coordinate measuring machine 10 of the second embodiment. In the three-dimensional coordinate measuring machine 10 of the first embodiment, the error calculation unit 68 calculates the error between the captured image D and the two-dimensional image 80. However, if various objects are reflected in the background of the workpiece W in the captured image D (for example, the surface of the surface plate 14), this reflection may affect the error calculation. For this reason, in the first embodiment, the reflection information of the shooting conditions 43 shown in FIG. 5 is created, but in the second embodiment, a method different from that in the first embodiment is used to prevent objects reflected in the background of the workpiece W from affecting the error calculation by the error calculation unit 68.
[0105] 12, the three-dimensional coordinate measuring machine 10 of the second embodiment has basically the same configuration as the three-dimensional coordinate measuring machine 10 of the first embodiment, except that the position and orientation detection unit 50 further functions as a captured image processing unit 61. For this reason, components that are the same in function or configuration as those of the first embodiment are given the same reference numerals, and descriptions thereof will be omitted.
[0106] FIG. 13 is an explanatory diagram for explaining image processing of the captured image D by the captured image processing unit 61. As shown in FIG. 13 and the above-described FIG. 12, when the captured image acquisition unit 60 acquires the captured image D (see reference symbol XIIIA in FIG. 13) from the camera 28, the captured image processing unit 61 performs image processing on the captured image D to mask or delete a background image that is different from the image of the workpiece W in the captured image D (see reference symbol XIIIB in FIG. 13). This eliminates the need to consider the reflection of various objects in the background of the workpiece W, and prevents objects reflected in the background of the workpiece W from affecting the error calculation by the error calculation unit 68. As a result, the accuracy of the error calculation by the error calculation unit 68 is improved, and the detection accuracy of the position and orientation of the workpiece W is improved.
[0107] [Third embodiment] 14 is a perspective view of the surface plate 14 of the three-dimensional coordinate measuring machine 10 of the third embodiment. As described above, in order to reduce the number of times of repetitive control (number of iterations) by the repetitive control unit 72, it is necessary to make the initial position and orientation of the three-dimensional model 42 virtually placed on the surface plate 14 by the three-dimensional model placement unit 64 closer to the position and orientation of the workpiece W on the surface plate 14. For this reason, in each of the above embodiments, the three-dimensional model placement unit 64 determines the initial position and orientation of the three-dimensional model 42 by simulation, but the initial position and orientation of the three-dimensional model 42 may be made closer to the position and orientation of the workpiece W by other methods.
[0108] 14, the three-dimensional coordinate measuring machine 10 of the third embodiment has basically the same configuration as the three-dimensional coordinate measuring machine 10 of each of the above-described embodiments, except that an index 82 is formed on the upper surface of the surface plate 14. Therefore, components that are the same in function or configuration as those of the above-described embodiments are given the same reference numerals, and their description will be omitted.
[0109] The indicator 82 is a marking or the like that serves as a guide for the position and posture of the workpiece W when the operator places the workpiece W on the surface plate 14. As a result, the position and posture of the workpiece W placed on the surface plate 14 by the operator is always the position and posture determined by the indicator 82 or a position and posture close to that.
[0110] The three-dimensional model placement unit 64 of the third embodiment determines the position and orientation of the workpiece W when the workpiece W is placed on the surface plate 14 according to the index 82 as the initial position and orientation of the three-dimensional model 42, and virtually places the three-dimensional model 42 on the surface plate 14 in accordance with this initial position and orientation. This allows the initial position and orientation of the three-dimensional model 42 to approach the position and orientation of the workpiece W. As a result, the number of times of repetitive control (number of iterations) by the repetitive control unit 72 can be reduced.
[0111] [others] In each of the above embodiments, the rendering unit 66 converts the three-dimensional model 42 into the two-dimensional image 80 using differentiable rendering, but the three-dimensional model 42 may also be converted into the two-dimensional image 80 using a known method other than differentiable rendering.
[0112] In each of the above embodiments, the error calculation unit 68 calculates the error between the captured image D and the two-dimensional image 80 as the degree of similarity between the captured image D and the two-dimensional image 80, but something other than the error may also be calculated as the degree of similarity (similarity) between the captured image D and the two-dimensional image 80.
[0113] In each of the above embodiments, the three-dimensional coordinate measuring machine 10 was used as an example of the shape measuring machine of the present invention, but the present invention can be applied to various shape measuring machines that require detection of the position and posture (workpiece coordinate system) of the workpiece W before measuring the shape of the workpiece W. [Explanation of symbols]
[0114] 10... Three-dimensional coordinate measuring machine, 12... Stand, 14... Surface plate, 16L... Left Y carriage, 16R... Right Y carriage, 18... X guide, 19... Gantry frame, 20... X carriage, 22... Z carriage, 24... Probe head, 26... Probe, 26a... Contact, 27... Illumination light source, 28... Camera, 29... Controller, 30... Control device, 32... XYZ drive unit, 33... Reading head, 34... Rotation drive unit, 35... Rotation angle detection unit, 36... Operation unit, 37... Display unit, 38... Memory unit, 40... Measurement Regular plan data, 41... measurement data, 42... three-dimensional model, 43... shooting conditions, 50... position and orientation detection unit, 52... coordinate system linking unit, 54... drive control unit, 56... probing data acquisition unit, 58... measurement data calculation unit, 60... captured image acquisition unit, 61... captured image processing unit, 62... shooting condition acquisition unit, 64... three-dimensional model placement unit, 66... rendering unit, 68... error calculation unit, 70... determination unit, 72... repetition control unit, 74... determination unit, 80... two-dimensional image, 82... index, D... captured image, W... work
Claims
1. A position and orientation detection device for detecting the position and orientation of a workpiece disposed in a shape measuring machine for measuring the shape of the workpiece, an image acquisition unit that acquires an image of the workpiece placed on the shape measuring machine; a photographing condition acquisition unit that acquires photographing conditions for the photographed image; a three-dimensional model placement unit that virtually places a three-dimensional model of the workpiece on the shape measuring machine; a conversion processing unit that converts the three-dimensional model into a two-dimensional image that would be obtained if the three-dimensional model were photographed under the same conditions as the photographing conditions acquired by the photographing condition acquisition unit, based on the position and orientation of the three-dimensional model virtually placed in the shape measuring machine and the photographing conditions acquired by the photographing condition acquisition unit; a matching degree calculation unit that calculates a matching degree between the captured image acquired by the captured image acquisition unit and the two-dimensional image generated by the conversion processing unit; a determination unit that determines whether or not the positions and orientations of the workpiece and the three-dimensional model match based on the calculation result of the degree of match calculation unit; a repeat control unit that repeatedly executes a repeat control including displacement of the three-dimensional model, generation of the two-dimensional image by the conversion processing unit, calculation of the degree of coincidence by the degree of coincidence calculation unit, and determination by the determination unit, when the determination unit determines that the two-dimensional image matches, until the determination unit determines that the two-dimensional image matches; a determination unit that determines the position and posture of the three-dimensional model as the position and posture of the workpiece when the determination unit determines that the positions and postures match; A position and orientation detection device comprising:
2. The position and orientation detection device according to claim 1 , wherein the photographing condition acquisition unit acquires, as the photographing conditions, the position and orientation of a camera that photographs the workpiece and the position and orientation of an illumination light source that illuminates the workpiece.
3. The position and orientation detecting device according to claim 2 , wherein the photographing condition acquiring unit further acquires, as the photographing conditions, information capable of identifying an image reflected on the surface of the workpiece.
4. The pose detecting apparatus according to claim 1 , wherein the transformation processing unit transforms the three-dimensional model into the two-dimensional image by differentiable rendering.
5. The position and orientation detecting device according to claim 1 , wherein the coincidence calculation unit calculates an error between the captured image and the two-dimensional image or a differential value of the error as the coincidence.
6. 2. The position and orientation detecting device according to claim 1, wherein the three-dimensional model placement unit determines the initial position and orientation of the three-dimensional model to be virtually placed on the shape measuring machine by simulation.
7. The position and orientation detection device according to claim 1 , wherein the determination unit determines that the position and orientation of the workpiece and the position and orientation of the three-dimensional model match when the number of repetitions by the repetition control unit reaches a predetermined number.
8. A photographed image processing unit performs image processing on the photographed image acquired by the photographed image acquisition unit to mask or delete a background image different from the image of the workpiece, The position and orientation detecting device according to claim 1 , wherein the coincidence calculation unit calculates the coincidence between the captured image that has been subjected to the image processing by the captured image processing unit and the two-dimensional image.
9. a surface plate on which the workpiece is placed; A camera that photographs the workpiece placed on the surface plate; a position and orientation detection device according to any one of claims 1 to 8; A shape measuring machine equipped with:
10. An index is provided on the surface plate and indicates the position and orientation of the workpiece to be placed on the surface plate, 10. The shape measuring machine according to claim 9, wherein the three-dimensional model placement unit virtually places the three-dimensional model in accordance with the position and orientation of the workpiece when the workpiece is placed on the surface plate according to the index.
11. 1. A position and orientation detection method for detecting the position and orientation of a workpiece placed on a shape measuring machine that measures the shape of the workpiece, comprising: an image acquisition step of acquiring an image of the workpiece placed on the shape measuring machine; a photographing condition acquisition step of acquiring photographing conditions for the photographed image; a three-dimensional model placement step of virtually placing the three-dimensional model of the workpiece on the shape measuring machine; a conversion processing step of converting the three-dimensional model into a two-dimensional image that would be obtained if the three-dimensional model were photographed under the same conditions as the photographing conditions acquired in the photographing condition acquisition step, based on the position and orientation of the three-dimensional model virtually placed in the shape measuring machine; a matching degree calculation step of calculating a matching degree between the captured image acquired in the captured image acquisition step and the two-dimensional image generated in the conversion processing step; a determination step of determining whether or not the positions and orientations of the workpiece and the three-dimensional model match based on a calculation result of the degree of match calculation step; a repeat control step of repeatedly executing the displacement of the three-dimensional model, the conversion processing step, the coincidence calculation step, and the determination step, if the determination step determines that the two images match, until the determination step determines that the two images match; a determination step of determining the position and orientation of the three-dimensional model as the position and orientation of the workpiece when it is determined that they match in the determination step; A position and orientation detection method having the following.
Citation Information
Patent Citations
Measurement method of three-dimensional measurement instrument, measurement control device, and measurement program
JP2017133909A