MACHINE CONTROL DEVICE
Patent Information
- Application Number
- DE102020200009
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-02-05
- Filing Date
- 2020-01-02
- Publication Date
- 2025-02-20
- Estimated Expiration
- 2040-01-02
Smart Images

Figure 00000000_0001_ABST 
Figure 00000000_0000_ABST
Abstract
Description
BACKGROUND OF THE INVENTIONField of the invention
[0001] The present invention relates to a machine control device that controls machine tools or machines such as industrial robots. State of the art
[0002] For example, there is a numerical control device of a machine tool that performs machining (predetermined processing) such as cutting on a workpiece (object) using a tool. With such a numerical control device, when the relative position between the tool and the workpiece is controlled, it is expected that information about the position and orientation of the workpiece will be used, based on an image of the workpiece captured by an image sensor (imaging device) (see, for example, patent document 1).
[0003] Patent document 2 describes that a motion command to move an end effector to several predetermined positions is sent to a robot control unit to change a relative position of a target object, which becomes an image acquisition target object, with respect to an image acquisition device. Patent Document 1: JP 2 889 011 B2 Patent document 2: DE 10 2015 226 696 A1 SUMMARY OF THE INVENTION
[0004] Compared to the machining precision of the machine tool's numerical control device, the image sensor's measurement accuracy is low. Therefore, if the workpiece's position and orientation information, based on the image captured by the image sensor, is used for positioning without considering the image sensor's measurement accuracy, a collision between the tool and the workpiece may occur, potentially damaging either the tool or the workpiece.
[0005] It is an object of the present invention to provide a machine control device for improving safety in a machine control device for controlling a machine, based on an image of an object that is captured by an imaging device.
[0006] The problem is solved by a machine control device with the features of claim 1.
[0007] A first aspect of a machine control device according to the present invention is a machine control device (for example, a machine control device 10 described later) that controls a machine performing a predetermined operation on an object (for example, a workpiece W described later), wherein the machine control device is configured to control a relative position of the machine and the object based on an image containing the object captured by the imaging device (for example, an image sensor 2 described later), wherein the machine control device includes: an imaging control unit (for example, an imaging control unit 11 described later) that controls a position and orientation of the imaging device and controls the imaging device to capture two or more images containing the object at two or more different imaging positions.based on a control command; and an imaging position information acquisition unit (for example, an imaging position information acquisition unit 13) that acquires position information of the two or more imaging positions; a measurement distance restoration unit (for example, a measurement distance restoration unit 14) that restores a measurement distance of the object as position information of the object based on at least two images of the two or more images, distance information between at least two imaging positions corresponding to the at least two images of the two or more imaging positions, and a parameter of the imaging device using a stereo camera method; a measurement precision computing unit (for example, a measurement precision computing unit 15) that calculates a measurement precision of the measurement distance of the object based on the at least two images,the distance information between the at least two imaging positions and the parameter of the imaging device; a range specification unit (for example, a range specification unit 12) that specifies a partial area of the object as a specified area; and a measurement precision determination unit (for example, a measurement precision determination unit 16) that determines whether the measurement precision of the object meets a predetermined precision in the specified area.
[0008] According to a second aspect of the present invention, in the machine control device as described in the first aspect, the measuring distance restoration unit can determine parallax information Z for each pixel by performing range adjustment on the at least two images, and can calculate a measuring distance H of the object by equation (1) below, based on the parallax information Z for each pixel, distance information between the at least two imaging positions D and the focal length f, which is the parameter of the imaging device, and the measuring precision computing unit 15 can calculate a measuring accuracy P of the measuring distance of the object by equation (2) below, which calculates a difference of the measuring distance H from an adjacent pixel by deriving the measuring distance H from the parallax information Z. H=D×f / Z P=|dH / dZ|=D×f / Z2=H2 / (D×f)
[0009] According to a third aspect of the present invention, the machine control device, as described in the first aspect or the second aspect, can stop the control of the machine if the measurement accuracy of the object W does not meet the predetermined accuracy.
[0010] According to a fourth aspect of the present invention, the machine control device, as described in the first aspect or the second aspect, when the measurement accuracy of the object does not meet the predetermined accuracy, can control the position and orientation of the imaging device and change at least one of the at least two imaging positions in order to improve the measurement accuracy of the object.
[0011] According to a fifth aspect of the present invention, the machine control device, as described in the fourth aspect, can control the position of the imaging device in a direction that increases the distance between the at least two imaging positions, or in a direction that brings the imaging position closer to the object, in order to improve the measurement accuracy of the object when the measurement accuracy of the object does not correspond to the predetermined accuracy.
[0012] According to a sixth aspect of the present invention, the machine control device, as described in the fourth or fifth aspect, can further include a predetermined accuracy position calculation unit (for example, a predetermined accuracy position calculation unit 17) which calculates distance information between the at least two imaging positions in which the measurement accuracy of the object meets a predetermined accuracy, based on the at least two images, the measurement distance of the object, and the parameter of the imaging device, or calculates a measurement distance of the object in which the measurement accuracy of the object meets a predetermined accuracy, based on the at least two images, the distance information between the at least two imaging positions, and the parameter of the imaging device in the specified range.in which the machine control device can control the position and orientation of the imaging device, based on the distance information between the at least two imaging positions or the measurement distance of the object, which is calculated by the predetermined accuracy position computing unit, and can change at least one of the at least two imaging positions.
[0013] According to a seventh aspect of the present invention, in the machine control device as described in the sixth aspect, the measuring distance restoration unit can determine parallax information Z for each pixel by performing range adjustment on the at least two images and can calculate a measuring distance H of the object by equation (1) below, based on the parallax information Z for each pixel, distance information between the at least two imaging positions D and the focal length f, which is a parameter of the imaging device, and the predetermined accuracy position calculation unit calculates a distance D' between the at least two imaging positions in which the measuring accuracy of the object satisfies a predetermined accuracy P', by equation (3) below, based on the measuring distance H of the object and a focal length f, which is a parameter of the imaging device, or calculates a measuring distance H' of the object.in which the measurement accuracy of the object satisfies the predetermined accuracy P', by a subsequent equation (4), based on the distance between the at least two imaging positions D and the focal length f, which is the parameter of the imaging device, , H=D×f / Z P′=H2 / (D′×f) P′=H′2 / (D×f)
[0014] According to the present invention, it is possible to provide a machine control device for improving safety in a machine control device for controlling a machine, which is based on an image of an object that is captured by an imaging device. BRIEF DESCRIPTION OF THE DRAWINGS Fig. Figure 1 is a diagram showing a main part of the machine control device of a machine tool according to a first embodiment as an embodiment of the present invention; Fig. Figure 2 is a diagram to explain how an image sensor is controlled by the machine control device; Fig. Figure 3 is a diagram to explain how to restore a workpiece's measurement distance using the stereo camera method; Fig. Figure 4 is a diagram to explain a calculation of two imaging positions (movement amounts) that meet a target accuracy through the machine control device; Fig. Figure 5 is a diagram showing an example of a program for controlling the image sensor by the machine control device (left area) and explanations thereof (right area); Fig. Figure 6 is a diagram illustrating a calculation of two imaging positions (movement amounts) that satisfies a targeting accuracy by the machine control device according to a modification example; and Fig. Figure 7 is a diagram showing an example of a program for controlling the image sensor by the machine control device according to a modification example (left area) and explanations thereof (right area). DETAILED DESCRIPTION OF THE INVENTION
[0015] An example of an embodiment of the present invention is described below with reference to the attached drawings. It should be noted that the same reference numerals are placed in identical or corresponding areas of the respective drawings. (First embodiment)
[0016] Fig. Figure 1 is a diagram showing a main part of a machine control device of a machine tool according to a first embodiment as one embodiment. A diagram in Fig. The machine control device 10 shown in Figure 1 is a numerical control device that controls a machine tool to perform a predetermined operation (for example, machining such as cutting) on a workpiece (object) W. During such an operation, the machine control device 10 detects the position of the workpiece W based on an image of the workpiece W captured by an image sensor (vision sensor, imaging device) 2 and controls the relative position of a tool T and the workpiece W of the machine tool. For example, the machine control device 10 can control the position of the tool T of the machine tool or, alternatively, the position of the workpiece W. If the image sensor 2 is mounted near the tool T of the machine tool, the movement command of the tool T of the machine tool and the movement command of the image sensor 2 can be made identical.The control of the image sensor 2 by the machine control device 10 is described in detail below.
[0017] The machine control device 10 is configured, for example, by an arithmetic processor such as a CPU (central processing unit) and a DSP (digital signal processor). The various functions of the machine control device 10 are implemented by executing predefined software (programs, applications) that are stored, for example, in a memory unit. The various functions of the machine control device 10 can be implemented through the cooperation of hardware and software, or they can be implemented using only FPGA (field-programmable gate array) or hardware (electronic circuits).
[0018] The machine control device 10 includes an image control unit 11, a range specification unit 12, an imaging position information acquisition unit 13, a measurement distance restoration unit 14, a measurement precision calculation unit 15, a measurement precision determination unit 16 and a predetermined accuracy position calculation unit 17.
[0019] Fig. Figure 2 is a diagram illustrating the control of the image sensor 2 by the machine control device 10. As shown in Fig. As shown in Figure 2, the image control unit 11 controls the position and orientation of the image sensor 2 and controls the image sensor 2 to acquire two images containing the workpiece W at two different imaging positions, based, for example, on a control command stored in a (not shown) memory unit. For example, the image control unit 11 causes the image sensor 2 to move in a predetermined direction and performs image acquisition of the workpiece W by the image sensor 2 at two imaging positions a distance between imaging positions D (hereinafter also referred to as the inter-viewpoint distance).
[0020] In the two images, the area specification unit 12 specifies a partial area of a workpiece W as a specified area (hereinafter also referred to as a specified pixel or a pixel of interest). The specified area can be an area of a workpiece that is manually specified by the user, based on a captured image displayed on the display unit or the like, or it can be an area of a workpiece that is automatically specified by imaging processing of the captured image (for example, feature point extraction algorithms).
[0021] The imaging position information acquisition unit 13 acquires position information of the two imaging positions (for example, coordinates XYZ in the camera coordinate system or the machine coordinate system) from the control command described above. It should be noted that the imaging position information acquisition unit 13 can acquire coordinates before and after the movement from the machine control device 10.
[0022] The measuring distance restoration unit 14 restores the measuring distance of the workpiece W as the position information of the workpiece W, based on the two images, the distance information between the two imaging positions and the parameters of the image sensor 2 using the stereo camera method. Fig. Figure 3 is a diagram illustrating the restoration of the workpiece measurement distance using the stereo camera method. As shown in Fig. As shown in Figure 3, the measuring distance restoration unit 14 determines the parallax for each pixel by performing range matching on the two images and calculates the measuring distance H of the workpiece W by the following equation (1), based on the parallax Z for each pixel, the distance between the two imaging positions D and the focal length f, which is a parameter of the image sensor 2. H=D×f / Z
[0023] Here, the machine control device 10 recognizes the position of the workpiece W, based on the image containing the workpiece W, captured by the image sensor 2, and controls the relative position between the tool T and the workpiece W of the machine tool.
[0024] Compared to the machining accuracy of the numerical control device of the machine tool, the measuring accuracy of the image sensor 2 is lower. Therefore, if the information on the position and orientation of the workpiece W, which is based on the image of the workpiece W captured by the image sensor 2, is used, for example, to determine the position of the workpiece W without taking into account the measuring accuracy of the image sensor 2, a collision between the tool T and the workpiece W may occur, and the tool T or the workpiece W may be damaged. Therefore, the machine control device 10 of the present embodiment includes the measuring precision computing unit 15, the measuring precision determination unit 16, and the predetermined accuracy position computing unit 17, in addition to the measuring distance restoration unit 14.
[0025] The measurement precision computing unit 15 calculates the measurement accuracy P of the workpiece W's measurement distance, based on the two images, the distance information between the two imaging positions, and the parameters of the image sensor 2 using the stereo camera method. The measurement accuracy P is defined as the difference that occurs when the workpiece W, as displayed on a photographic surface, is assumed to be displayed erroneously on the adjacent pixel (the parallax at that time is defined as Z') (see equation (2) below). In other words, the measurement accuracy P is a value obtained by differentiating the measurement distance H with respect to Z. P=|H(Z′)|=|dH / dZ|=D×f / Z2
[0026] The above equation (1) is substituted into it and the measurement accuracy P is represented by the following equation (2). P=H2 / (D×f)
[0027] This shows that the measurement accuracy P is smaller when the distance between the two imaging positions D is larger, and thus the accuracy is high.
[0028] The measurement precision determination unit 16 determines whether the measurement accuracy P of the workpiece W meets the target accuracy P' (predetermined accuracy, hereinafter referred to as specified accuracy) within the specified range. The target accuracy P' can be a predetermined value and can be stored in a memory unit or the like.
[0029] The predetermined accuracy position calculation unit 17 calculates two imaging positions at which the measurement accuracy P of the workpiece W meets the target accuracy P'. For example, the predetermined accuracy position calculation unit 17 calculates two image positions where the measurement accuracy P of the workpiece W meets the target accuracy P', based on the two images and the parameters of the image sensor 2. More specifically, the predetermined accuracy position calculation unit 17 calculates distance information between two imaging positions at which the measurement accuracy of the workpiece W meets a predetermined accuracy, based on the two images, the measurement distance of the workpiece W, and the parameters of the image sensor 2 within the specified range.
[0030] Fig. Figure 4 is a diagram illustrating the calculation of two imaging positions (movement amounts) that meet the target accuracy P' specified by the machine control device 10. For example, the predetermined accuracy position calculation unit 17 calculates the distance between two imaging positions D', at which the measurement accuracy of the workpiece W meets the predetermined accuracy P', using the following equation (3), based on the measurement distance H of the workpiece W and the focal length f, which is a parameter of the imaging device. P′=H2 / (D′×f)
[0031] Thus, the movement distance E from the state of the intermediate viewing distance D is determined by the following equation E=D′=D
[0032] Alternatively, the predetermined accuracy position computation unit 17 can calculate the measurement distance of the workpiece W at which the measurement accuracy of the workpiece W meets a predetermined accuracy, based on the two images, the distance information between the two imaging positions, and the parameters of the image sensor 2 in the specified area. For example, the predetermined accuracy position computation unit 17 can calculate the measurement distance H' of the workpiece W at which the measurement accuracy of the workpiece W meets the predetermined accuracy P' using the following equation (4), based on the distance between the two imaging positions D and the focal length f, which is a parameter of the image sensor 2. P′=H′2 / (D×f)
[0033] As described above, the measurement accuracy is improved by increasing the intermediate viewing distance D. Alternatively, the measurement accuracy is improved by keeping the intermediate viewing distance D constant and moving the image sensor 2 close to the workpiece W.
[0034] If the measuring accuracy of the workpiece W meets the target accuracy, the machine control device 10 controls the relative position of the tool T and the workpiece W of the machine tool, based on the position information of the workpiece W, which is calculated by the measuring distance restoration unit 14, and performs a predetermined operation on the workpiece W using the tool T.
[0035] If, on the other hand, the measurement accuracy of the workpiece W does not meet the target accuracy, the machine control device 10 performs the subsequent processing based on the two imaging positions that meet the target accuracy P, which is calculated by the predetermined accuracy position calculation unit 17: - Movement and recording by the image sensor 2 according to the image control unit 11; - Calculation of the position of the workpiece W by the area specification unit 12, the imaging position information acquisition unit 13 and the measurement distance restoration unit 14; and - Calculation and determination of the measuring accuracy of the workpiece W by the precision computing unit 15 and the precision determination unit 16.
[0036] If the measurement accuracy of the workpiece W does not meet the target accuracy, the machine control device 10 can repeat the subsequent processing until the target accuracy is determined: - Calculation of two imaging positions that meet the target accuracy P' by the predetermined accuracy position calculation unit 17; - Movement and recording by the image sensor 2 according to the image control unit 11; - Calculation of the workpiece position W by the area specification unit 12, the imaging position information acquisition unit 13 and the measurement distance restoration unit 14; and - Calculation and determination of the measuring accuracy of the workpiece W by the precision computing unit 15 and the precision determination unit 16.
[0037] If the target accuracy cannot be maintained, even by repeating the processing described above a predetermined number of times, or if it is difficult to move the image sensor 2, the machine control device 10 stops controlling the relative position of the tool T of the machine tool and the workpiece W, based on the position information of the workpiece W calculated by the measuring distance recovery unit 14, and the predetermined operation of the workpiece W using the tool T.
[0038] Fig. Figure 5 is a diagram showing an example of a program for controlling the image sensor 2 by the machine control device 10 (left area) and an explanation thereof (right area). “G800” is a movement command for the image sensor. “G810” is a command to start imaging and image processing (measurement of position and accuracy information). As a result, the image control unit 11 causes the image sensor 2 to move in a predetermined direction and performs imaging of the workpiece W by the image sensor 2 at two imaging positions with a distance between imaging positions (inter-view distance) D. The imaging position information acquisition unit 13 acquires two imaging positions from the control command.
[0039] "G820" is a command for specifying a pixel of interest (specified area). As a result, the area specification unit 12 specifies a partial area of a workpiece W as a specified area in two images. The column and row of a specified pixel are entered as #100 and #101. The measurement distance recovery unit 14 recovers the measurement distance of the workpiece W as the position information of the workpiece W based on the two images, the distance information between two imaging positions, and the parameters of the image sensor 2 using the stereo camera method. The measurement precision calculation unit 15 calculates the measurement accuracy of the measurement distance of the workpiece W based on the two images, the distance information between the two imaging positions, and the parameter of the image sensor 2.
[0040] "G830" is a command to determine whether the position information of the workpiece W corresponding to pixels (#100, #101) meets the accuracy requirement of (0.1, 0.1, 0.1) mm. As a result, the measurement precision determination unit 16 determines whether the measurement accuracy P of the workpiece W meets the target accuracy P' within the specified range. For example, the measurement precision determination unit 16 determines whether the measurement data of the pixel in column #100 and row #101 of the image meets the measurement accuracy requirement of (0.1, 0.1, 0.1) mm. If, for example, it does not meet the requirement, a number other than 0 is entered in #8998.
[0041] "G840" is a command for calculating the imaging position required for the target pixel (specified area) to meet the specified accuracy (target accuracy). As a result, the predetermined accuracy position computation unit 17 calculates two imaging positions at which the measurement accuracy P of the workpiece W meets the target accuracy P' (the distance between the two imaging positions D' or measurement distance H' of the workpiece W). For example, the predetermined accuracy position computation unit 17 calculates the imaging position required for the measurement data of the pixel specified by column #100 and row #101 to meet the specified accuracy and sets the next movement distance to X-direction #300, Y-direction #301, and Z-direction #303.
[0042] The processing returns to the second line via the “GOTO 10” command and the image sensor is moved once again to perform imaging.
[0043] As described above, according to the machine control device 10 of the present embodiment, it is possible to improve the measuring accuracy of the workpiece W and the safety of the machine control device, which controls the machine tool, based on the image of the workpiece W captured by the image sensor 2. Furthermore, according to the machine control device 10 of the present embodiment, it also functions effectively if a faulty measurement or an inability to measure occurs due to haloing or occlusion.
[0044] According to the inventor of the present application, the following knowledge will be obtained. - Existing image sensors cannot control the measurement accuracy. - Measurement accuracy can be improved by bringing the image sensor closer to the object; however, there are risks and limitations.
[0045] Sensors with high-resolution elements and high-precision lenses are expensive. Currently, there is no way for the numerical control device to determine the measurement accuracy of the image sensor. There is also no way for the numerical control device to know the measurement accuracy of the image sensor.
[0046] There is no procedure for determining whether the required accuracy for processing has been met. Currently, there is no mechanism to ensure the numerical control device operates reliably if the image sensor lacks accuracy. There is also no mechanism to stop the numerical control device from operating under the image sensor. Furthermore, there is no mechanism to instruct the numerical control device to improve the image sensor's accuracy.
[0047] In these respects, the following advantages can be obtained through the machine control device 10 of the present embodiment. - The numerical control device is able to know the measurement accuracy of the image sensor. - The numerical control device makes it possible to determine whether the image sensor output value meets the specified accuracy or not. - The numerical control device is able to control (improve) the measurement accuracy of the image sensor. - If the measurement accuracy is insufficient, it is possible to stop the numerical control device. - Improved reliability
[0048] It is possible to guarantee the measurement accuracy of the image sensor required for processing.
[0049] It is possible to safely use the image sensors in a numerical control device. - Improved detection accuracy
[0050] It is possible to improve the measurement accuracy of the image sensor and the detection accuracy can be improved. - Reduction in equipment costs
[0051] It is possible to achieve functions equivalent to stereo cameras with a numerical control device + monocular camera + control software (programs). (Modification example)
[0052] In Fig. It may be that the machine control device 10 is not equipped with the predetermined accuracy position calculation unit 17. In other words, it may be that the machine control device 10 does not perform the calculation of the two imaging positions that satisfy the target accuracy P' using the predetermined accuracy position calculation unit 17. In the modification example, if the measurement accuracy of the workpiece W does not meet the target accuracy, the machine control device 10 gradually expands the two imaging positions (for example, the distance between the two imaging positions D) until the target accuracy is achieved.
[0053] Fig. Figure 6 is a diagram illustrating the calculation of two imaging positions (movement amounts) that meet the targeting accuracy requirements, by the machine control device 10 according to the modification example. As in Fig. As shown in Figure 6, if the measurement accuracy of the workpiece W does not meet the target accuracy, the machine control device 10, according to the modification example, extends the two imaging positions (for example, the distance between the two imaging positions D) by a predetermined amount (smallest amount) until the target accuracy is achieved. The predetermined amount (tiny amount) can be a fixed value and can, for example, be stored in a memory unit or the like. Alternatively, in the same way as described above, the machine control device 10, according to the modification example, can move the two imaging positions (for example, the measurement distance H of the workpiece W) closer to the workpiece W by a predetermined amount (tiny amount).
[0054] In other words, if the measurement accuracy of the workpiece W does not meet the target accuracy, the machine control device 10 of the modification example repeats the subsequent processing until the target accuracy is achieved: - Changing the imaging position by a predetermined amount (tiny amount); - Movement and recording by the image sensor 2 according to the image control unit 11; - Calculating the position of the workpiece W by the area specification unit 12, the imaging position information acquisition unit 13 and the measurement distance restoration unit 14; and - Calculation and determination of the measurement accuracy of the workpiece W by the measurement precision calculation unit 15 and the measurement precision determination unit 16.
[0055] Fig. Figure 7 is a diagram showing an example of a program for controlling the image sensor 2 by the machine control device 10 according to the modification example (left area) and explanations thereof (right area). The in Fig. The program shown in Figure 7 differs in the position of the "G800" from the one in Figure 7. Fig. 5 programs shown.
[0056] "G800" is a movement command for the image sensor. For example, the image sensor is moved in the X direction by a predetermined distance (for example, an initial value or a user specification) contained in #200.
[0057] Although embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and various modifications and variations are possible. For example, the embodiment described above exemplifies the machine control device for measuring the position of the object based on an image containing the object captured by the image sensor; however, the present invention is not limited to this embodiment and is applicable to a machine control device for measuring the position of an object based on an image containing the object captured by various imaging devices. Examples of such various imaging devices include a monocular camera, a stereo camera capable of three-dimensional measurement, and a three-dimensional camera.Even with stereo cameras and three-dimensional cameras, measurement accuracy can be improved by bringing them close to the object.
[0058] Furthermore, the embodiment described above exemplifies the machine control device for controlling the position relative to the object, based on two images containing the object, which is captured at two imaging positions; however, the present invention is not limited thereto and is applicable to a machine control device for controlling the position relative to the object, based on three or more images containing the object, which is captured at three or more imaging positions. In this case, it can be configured to determine the imaging position as a reference and to calculate, for each imaging position of the object, the measurement distance of the object as the object's position information, as described above (the measurement distance restoration unit), and the measurement accuracy of the object's measurement distance (the measurement accuracy calculation unit).to determine whether the object's measurement accuracy meets a predetermined accuracy (the measurement accuracy determination unit), to calculate the distance information between the two imaging positions or the measurement distance of the object at which the object's measurement accuracy meets a predetermined accuracy (predetermined accuracy calculation unit), to control the position and orientation of the imaging device based on the distance information between the two imaging positions or the object's measurement distance calculated by the predetermined accuracy position calculation unit, and to change the imaging position with respect to the difference (the distance between the two imaging positions or the object's measurement distance).
[0059] Furthermore, the embodiment described above exemplifies the numerical control device of the machine tool for performing a predetermined operation on a workpiece by controlling the relative position of the workpiece and a tool attached to the machine tool. However, the present invention is not limited to this and can be applied to various types of tool control devices, such as a robot control device for performing a predetermined operation on a workpiece by controlling the relative position of the workpiece and a tool, or a hand attached to an industrial robot. In this case, if the imaging device is attached to the robot's arm, the movement command of the robot's arm and the movement command of the imaging device can be made identical. EXPLANATION OF REFERENCE MARKS 2 Image sensor (imaging device) 10 Machine control device 11 Image control unit 12 Area specification unit 13 Imaging Position Information Acquisition Unit 14 Measuring distance restoration unit 15 Measurement precision computing unit 16 Measurement precision determination unit 17 Predetermined accuracy position calculation units
Claims
[1] A machine control device (10) that controls a machine that performs a predetermined operation on an object (W), the machine control device (10) being configured to control a relative position of the machine and the object (W) based on an image containing the object (W) captured by an imaging device (2), the machine control device (10) including: an imaging control unit (11) that controls a position and orientation of the imaging device (2) and controls the imaging device (2) to capture two or more images including the object at two or more different imaging positions based on a control command; an imaging position information acquiring unit (13) that acquires position information of the two or more imaging positions; a measurement distance restoration unit (14) that restores a measurement distance of the object (W) as position information of the object (W) based on at least two images from the two or more images, distance information between at least two imaging positions corresponding to the at least two images from the two or more imaging positions, and a parameter of the imaging device, using a stereo camera method; a measurement precision calculation unit (15) that calculates a measurement precision of the measurement distance of the object (W) based on the at least two images, the distance information between the at least two imaging positions and the parameter of the imaging device; an area specifying unit (12) that specifies a partial area of the object (W) as a specified area; and a measurement precision determining unit (16) that determines whether the measurement precision of the object (W) satisfies a predetermined precision in the specified range. [2] The machine control device (10) according to claim 1, wherein the measurement distance recovery unit (14) obtains parallax information (Z) for each pixel by performing area matching on the at least two images, and calculates a measurement distance (H) of the object (W) by equation (1) below based on the parallax information (Z) for each pixel, distance information between the at least two imaging positions (D) and the focal length f, which is the parameter of the imaging device, and the measurement precision calculation unit (15) calculates a measurement accuracy (P) of the measurement distance of the object (W) by equation (2) below, which calculates a difference of the measurement distance (H) from an adjacent pixel by deriving the measurement distance (H) by the parallax information (Z), H=D×f / Z P=|dH / dZ|=D×f / Z2=H2 / (D×f) [3] The machine control device (10) according to claim 1 or 2, wherein, when the measurement accuracy of the object (W) does not satisfy the predetermined accuracy, the machine control device (10) stops controlling the machine. [4] The machine control device (10) according to claim 1 or 2, wherein, when the measurement accuracy of the object (W) does not satisfy the predetermined accuracy, the machine control device (10) controls the position and orientation of the imaging device (2), and changes at least one of the at least two imaging positions so as to improve the measurement accuracy of the object (W). [5] The machine control device (10) according to claim 4, wherein, when the measurement accuracy of the object (W) does not meet the predetermined accuracy, the machine control device (10) controls the position of the imaging device (2) in a direction that increases a distance between the at least two imaging positions or in a direction that brings the imaging position close to the object (W), thereby improving the measurement accuracy of the object (W). [6] Machine control device (10) according to claim 4 or 5, further comprising: a predetermined accuracy position calculation unit (17) which calculates distance information between the at least two imaging positions in which the measurement accuracy of the object (W) satisfies a predetermined accuracy, based on the at least two images, the measurement distance of the object (W) and the parameter of the imaging device (2), or calculates a measurement distance of the object (W) at which the measurement accuracy of the object (W) satisfies a predetermined accuracy, based on the at least two images, the distance information between the at least two imaging positions and the parameter of the imaging device (2) in the specified range, wherein the machine control device (10) controls the position and orientation of the imaging device (2) based on the distance information between the at least two imaging positions or the measurement distance of the object (W) calculated by the predetermined accuracy position calculation unit (17), and changes at least one of the at least two imaging positions. [7] The machine control device (10) according to claim 6, wherein the measurement distance recovery unit (14) obtains parallax information (Z) for each pixel by performing area matching on the at least two images, and calculates a measurement distance (H) of the object (W) by equation (1) below based on the parallax information (Z) for each pixel, distance information between the at least two imaging positions (D) and the focal length (f) which is a parameter of the imaging device (2), and the predetermined accuracy position calculation unit (17) calculates a distance (D') between the at least two imaging positions in which the measurement accuracy of the object (W) satisfies a predetermined accuracy (P') by equation (3) below, based on the measurement distance (H) of the object and a focal length (f), which is a parameter of the imaging device (2), or calculates a measurement distance (H') of the object (W) at which the measurement accuracy of the object (W) satisfies the predetermined accuracy (P') by a following equation (4), based on the distance between the at least two imaging positions (D) and the focal length (f), which is the parameter of the imaging device (2), H=D×f / Z P′=H2 / (D′×f) P′=H′2 / (D×f)
Citation Information
Patent Citations
image processing device, image processing system, image processing method and computer program
DE102015226696A1
Detection position correction method
JP2889011B2
JP000002889011B2