WO2021187316A1 - 対象物3次元データ測定方法、対象物3次元データ測定装置、学習データ生成方法および学習データ生成装置 - Google Patents

対象物3次元データ測定方法、対象物3次元データ測定装置、学習データ生成方法および学習データ生成装置 Download PDF

Info

Publication number
WO2021187316A1
WO2021187316A1 PCT/JP2021/009821 JP2021009821W WO2021187316A1 WO 2021187316 A1 WO2021187316 A1 WO 2021187316A1 JP 2021009821 W JP2021009821 W JP 2021009821W WO 2021187316 A1 WO2021187316 A1 WO 2021187316A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
light
visible light
image
dimensional
Prior art date
Application number
PCT/JP2021/009821
Other languages
English (en)
French (fr)
Inventor
芳宏 中野
Original Assignee
ミネベアミツミ株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from JP2020046409A external-priority patent/JP7474083B2/ja
Priority claimed from JP2020188150A external-priority patent/JP2022077338A/ja
Application filed by ミネベアミツミ株式会社 filed Critical ミネベアミツミ株式会社
Publication of WO2021187316A1 publication Critical patent/WO2021187316A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/521Depth or shape recovery from laser ranging, e.g. using interferometry; from the projection of structured light
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/593Depth or shape recovery from multiple images from stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras

Definitions

  • the present invention relates to an object three-dimensional data measuring method, an object three-dimensional data measuring device, a learning data generation method, and a learning data generation device.
  • artificial intelligence such as a convolutional neural network is used to recognize the type, position, and orientation of the object from the captured image of the object. May be used.
  • Machine learning using a huge amount of learning data is indispensable for the proper use of a system using artificial intelligence, and the cost required to prepare the learning data is large.
  • paint etc. may be attached to the surface of the object by spraying etc. to change the color and texture, but in that case the texture of the surface of the object cannot be measured accurately. It ends up. Therefore, the measurement of the three-dimensional shape and the measurement of the texture must be performed in separate steps, which causes a problem that the work man-hours increase and the alignment between the three-dimensional shape and the texture becomes complicated.
  • the present invention has been made in view of the above, and an object of the present invention is to provide a method for easily measuring three-dimensional data of an object including a three-dimensional shape and a texture.
  • the object three-dimensional data measuring method emits light by the first visible light when irradiated with light having a wavelength shorter than that of visible light.
  • the object to which the colorless and transparent paint is applied is irradiated with light having a wavelength shorter than that of the visible light according to a predetermined pattern, and the object is photographed and photographed.
  • a first step of measuring the three-dimensional shape of the object from the image is provided.
  • the object 3D data measuring method can easily measure the object 3D data including the 3D shape and texture.
  • FIG. 1 is an external view showing an example of an object grasping system.
  • FIG. 2 is a block diagram showing an example of the configuration of the object grasping system.
  • FIG. 3 is a diagram showing an example of processing related to control of the robot arm.
  • FIG. 4 is a diagram showing another example of processing related to control of the robot arm.
  • FIG. 5 is a diagram showing an example of a detection model.
  • FIG. 6 is a diagram showing an example of a feature map output by the feature detection layer (u1).
  • FIG. 7 is a diagram showing an example of the estimation result of the position and posture of the object.
  • FIG. 8 is a diagram showing another example of the estimation result of the gripping position of the object.
  • FIG. 9 is a diagram showing an example of bulk images taken by a stereo camera.
  • FIG. 9 is a diagram showing an example of bulk images taken by a stereo camera.
  • FIG. 10 is a diagram showing an example of the relationship between the bulk image and the matching map.
  • FIG. 11 is a flowchart showing an example of the estimation process.
  • FIG. 12 is a diagram showing an example of estimation processing.
  • FIG. 13 is a diagram showing an example of a bulk image including a tray according to a modified example.
  • FIG. 14 is a diagram showing an example of a position deviation estimation model according to a modified example.
  • FIG. 15 is a diagram showing another example of the position deviation estimation model according to the modified example.
  • FIG. 16 is a block diagram showing an example of a configuration of a system for acquiring (measuring) and learning three-dimensional data of an object according to the first embodiment.
  • FIG. 17 is a flowchart showing an example of processing for acquiring three-dimensional object data according to the first embodiment.
  • FIG. 18 is a diagram showing an example of a state in which the object according to the first embodiment is irradiated with a UV pattern from a projector.
  • FIG. 19 is a diagram showing an example of a state in which the object according to the first embodiment is irradiated with visible light.
  • FIG. 20 is a flowchart showing another example of the process of acquiring the object three-dimensional data according to the first embodiment.
  • FIG. 21 is a flowchart showing an example of learning data generation and learning processing according to the first embodiment.
  • FIG. 22 is a diagram showing an example of three-dimensional data of the object according to the first embodiment.
  • FIG. 23 is a diagram showing an example of a captured image of a virtual space in which a plurality of objects according to the first embodiment are arranged.
  • FIG. 24 is a block diagram showing an example of a system configuration for acquiring (measuring) three-dimensional data of the target group and generating a three-dimensional model of the target group according to the second embodiment.
  • FIG. 25 is a diagram showing an example of the measurement process according to the second embodiment.
  • FIG. 26 is a diagram showing an example of three-dimensional data of the object according to the second embodiment.
  • FIG. 27 is a flowchart showing an example of preprocessing according to the second embodiment.
  • FIG. 28 is a diagram showing an example of the calibration process according to the second embodiment.
  • FIG. 29 is a diagram showing an example of a plurality of objects coated with the paint according to the second embodiment.
  • FIG. 30 is a flowchart showing an example of the process of acquiring the target group three-dimensional data according to the second embodiment.
  • FIG. 31 is a diagram showing an example of a state in which the target group according to the second embodiment is irradiated with the UV pattern from the projector.
  • FIG. 32 is a diagram showing an example of a state in which the target group according to the second embodiment is irradiated with visible light.
  • FIG. 33 is a block diagram showing an example of an information processing device that executes a measurement program.
  • the object 3D data measurement method, the object 3D data measurement device, the learning data generation method, and the learning data generation device according to each embodiment will be described with reference to the drawings.
  • the present invention is not limited to each embodiment.
  • the relationship between the dimensions of each element in the drawing, the ratio of each element, and the like may differ from the reality. Even between drawings, there may be parts where the relationship and ratio of dimensions are different from each other. Further, in principle, the contents described in one embodiment or modification are similarly applied to other embodiments or modifications.
  • FIG. 1 is an external view showing an example of the object grasping system 1.
  • the object grasping system 1 shown in FIG. 1 includes an image processing device 10 (not shown), a camera 20, and a robot arm 30.
  • the camera 20 is provided at a position where, for example, both the robot arm 30 and the bulk workpieces 41, 42, etc., which are objects to be gripped by the robot arm 30, can be photographed.
  • the camera 20 captures, for example, images of the robot arm 30 and the works 41 and 42 and outputs them to the image processing device 10.
  • the robot arm 30 and the works 41, 42 and the like stacked in bulk may be photographed by different cameras. As shown in FIG.
  • the camera 20 a camera capable of capturing a plurality of images, such as a known stereo camera, is used.
  • the image processing device 10 estimates the positions and orientations of the works 41, 42, etc. using the image output from the camera 20.
  • the image processing device 10 outputs a signal for controlling the operation of the robot arm 30 based on the estimated positions and postures of the workpieces 41, 42, and the like.
  • the robot arm 30 performs an operation of gripping the works 41, 42, and the like based on the signal output from the image processing device 10.
  • FIG. 1 the type of work may be one type. Here, a case where there is only one type of work will be described.
  • the works 41, 42 and the like are arranged so that their positions and postures are irregular. As shown in FIG. 1, for example, a plurality of workpieces may be arranged so as to overlap each other in a top view.
  • the works 41 and 42 are examples of objects.
  • FIG. 2 is a block diagram showing an example of the configuration of the object grasping system 1.
  • the image processing device 10 is communicably connected to the camera 20 and the robot arm 30 through the network NW. Further, as shown in FIG. 2, the image processing device 10 includes a communication I / F (interface) 11, an input I / F 12, a display 13, a storage circuit 14, and a processing circuit 15.
  • the communication I / F 11 controls data input / output communication with an external device through the network NW.
  • the communication I / F 11 is realized by a network card, a network adapter, a NIC (Network Interface Controller), etc., receives image data output from the camera 20, and transmits a signal to be output to the robot arm 30.
  • the input I / F 12 is connected to the processing circuit 15, converts the input operation received from the administrator (not shown) of the image processing device 10 into an electric signal, and outputs the input operation to the processing circuit 15.
  • the input I / F12 is a switch button, a mouse, a keyboard, a touch panel, or the like.
  • the display 13 is connected to the processing circuit 15 and displays various information and various image data output from the processing circuit 15.
  • the display 13 is realized by a liquid crystal monitor, a CRT (Cathode Ray Tube) monitor, a touch panel, or the like.
  • the storage circuit 14 is realized by, for example, a storage device such as a memory.
  • the storage circuit 14 stores various programs executed by the processing circuit 15. Further, the storage circuit 14 temporarily stores various data used when various programs are executed by the processing circuit 15.
  • the storage circuit 14 has a machine (deep) learning model 141.
  • the machine (deep) learning model 141 includes a neural network structure 141a and learning parameters 141b.
  • the neural network structure 141a is an application of a known network such as the convolutional neural network b1 of FIG. 5, and is a network structure shown in FIG. 12 described later.
  • the learning parameter 141b is, for example, the weight of the convolutional filter of the convolutional neural network, and is a parameter that is learned and optimized for estimating the position and orientation of the object.
  • the neural network structure 141a may be provided in the estimation unit 152.
  • the machine (deep layer) learning model 141 in the present invention will be described by taking a trained model as an example, but the present invention is not limited to this. In the following, the machine (deep) learning model 141 may be simply referred to as a “learning model 141”.
  • the learning model 141 is used in the process of estimating the position and orientation of the work from the image output from the camera 20.
  • the learning model 141 is generated, for example, by learning the positions and postures of a plurality of works and images of the plurality of works as teacher data.
  • the learning model 141 is generated by, for example, the processing circuit 15, but is not limited to this, and may be generated by an external computer.
  • the processing circuit 15 is realized by a processor such as a CPU (Central Processing Unit).
  • the processing circuit 15 controls the entire image processing device 10.
  • the processing circuit 15 reads various programs stored in the storage circuit 14 and executes the read programs to execute various processes.
  • the processing circuit 15 includes an image acquisition unit 151, an estimation unit 152, and a robot control unit 153.
  • the image acquisition unit 151 acquires bulk images through communication I / F11, for example, and outputs them to the estimation unit 152.
  • the image acquisition unit 151 is an example of an acquisition unit.
  • the estimation unit 152 estimates the position and orientation of the object using the output bulk image. For example, the estimation unit 152 performs estimation processing on the image of the object using the learning model 141, and outputs the estimation result to the robot control unit 153. The estimation unit 152 may further estimate the position and orientation of the tray or the like on which the object is placed, for example. The configuration for estimating the position and orientation of the tray will be described later.
  • the robot control unit 153 generates a signal for controlling the robot arm 30 based on the estimated position and orientation of the object, and outputs the signal to the robot arm 30 through the communication I / F 11.
  • the robot control unit 153 acquires, for example, information regarding the current position and orientation of the robot arm 30. Then, the robot control unit 153 generates a trajectory that the robot arm 30 moves when gripping the object according to the current position and posture of the robot arm 30 and the estimated position and posture of the object.
  • the robot control unit 153 may correct the trajectory in which the robot arm 30 moves based on the position and posture of the tray or the like.
  • FIG. 3 is a diagram showing an example of processing related to control of the robot arm.
  • the estimation unit 152 estimates the position and orientation of the target object from the bulk images.
  • the estimation unit 152 may estimate the position and orientation of the tray or the like on which the object is placed from the bulk images.
  • the robot control unit 153 calculates the coordinates and posture of the hand position of the robot arm 30 based on the estimated model of the object and the tray, and generates the trajectory of the robot arm 30.
  • FIG. 4 is a diagram showing another example of processing related to control of the robot arm.
  • the image acquisition unit 151 acquires an image of an object gripped by the robot arm 30 taken by the camera 20.
  • the estimation unit 152 estimates the position and orientation of the target object gripped by the robot arm 30, and outputs the position and orientation to the robot control unit 153.
  • the image acquisition unit 151 may further acquire an image of a tray or the like of the alignment destination, which is a movement destination of the grasped object, taken by the camera 20.
  • the image acquisition unit 151 further acquires an image (arranged image) of the object already aligned on the tray or the like of the alignment destination.
  • the estimation unit 152 estimates the position and orientation of the tray or the like to be aligned, and the position and orientation of the already aligned objects from the aligned image or the aligned image.
  • the robot control unit 153 determines the estimated position and orientation of the object held by the robot arm 30, the position and orientation of the tray or the like to be aligned, and the position and orientation of the already aligned object. Based on this, the coordinates and posture of the hand position of the robot arm 30 are calculated, and the trajectory of the robot arm 30 when aligning the objects is generated.
  • the estimation unit 152 extracts the feature amount of the object by using, for example, a model to which an object detection model having known downsampling, upsampling, and skip connection is applied.
  • FIG. 5 is a diagram showing an example of a detection model.
  • the d1 layer divides a loosely stacked image P1 (320 ⁇ 320 pixels) into 40 ⁇ 40 grids in length and width by downsampling via a convolutional neural network b1, and has a plurality of features for each grid. Calculate the amount (for example, 256 types).
  • the grid divided by the d1 layer is divided coarser than the d1 layer (for example, 20 ⁇ 20 grids), and the feature amount of each grid is calculated.
  • the d3 layer and the d4 layer which are lower layers than the d1 layer and the d2 layer, divide the grid divided by the d2 layer more coarsely, respectively.
  • the d4 layer calculates the feature amount in a finer division by upsampling, and at the same time, integrates with the feature amount of the d3 layer by the skip connection s3 to generate the u3 layer.
  • the skip connection may be a simple addition or a connection of features, or a transformation such as a convolutional neural network may be added to the features of the d3 layer.
  • the feature amount calculated by upsampling the u3 layer and the feature amount of the d2 layer are integrated by the skip connection s2 to generate the u2 layer.
  • the u1 layer is generated in the same manner. As a result, in the u1 layer, the feature amount of each grid divided into 40 ⁇ 40 grids is calculated as in the d1 layer.
  • FIG. 6 is a diagram showing an example of a feature map output by the feature detection layer (u1).
  • the horizontal direction of the feature map shown in FIG. 6 indicates each grid in the horizontal direction of the bulk image P1 divided into 40 ⁇ 40 grids, and the vertical direction indicates each grid in the vertical direction. Further, the depth direction of the feature map shown in FIG. 6 indicates an element of the feature amount in each grid.
  • FIG. 7 is a diagram showing an example of the estimation result of the position and posture of the object.
  • the estimation unit includes two-dimensional coordinates ( ⁇ x, ⁇ y) indicating the position of the object, quaternions (qx, qy, qz, qw) indicating the posture of the object, and a classification score (C0). , C1, ..., Cn) is output.
  • ⁇ x, ⁇ y two-dimensional coordinates
  • quaternions qx, qy, qz, qw
  • C0 classification score
  • the depth referred to here means the distance from the z-coordinate of the camera to the z-coordinate of the object in the z-axis direction parallel to the optical axis of the camera.
  • the classification score is a value output for each grid, and is the probability that the center point of the object is included in the grid. For example, when there are n types of objects, the score of n + 1 class classifications is output by adding the "probability that the center point of the object is not included". For example, when there is only one type of target work, the scores of two classifications are output. Also, when there are a plurality of objects in the same grid, the probability of the objects stacked on top is output.
  • the point C indicates the center of the grid Gx
  • the point ⁇ C which is the coordinates ( ⁇ x, ⁇ y) indicates, for example, the center point of the detected object. That is, in the example shown in FIG. 7, the center of the object is offset from the center point C of the grid Gx by ⁇ x in the x-axis direction and ⁇ y in the y-axis direction.
  • arbitrary points a, b, and c other than the center of the object are set as shown in FIG. 8, and arbitrary points a, b, and c from the center point C of the grid Gx are set.
  • the coordinates ( ⁇ x1, ⁇ y1, ⁇ z1, ⁇ x2, ⁇ y2, ⁇ z2, x3, ⁇ y3, ⁇ z3) may be output. Any point may be set at any position of the object, and may be one point or a plurality of points.
  • the grid is coarser than the size of the object, multiple objects may be included in one grid, and the features of each object may be mixed and erroneously detected. Only the feature map, which is the output of the feature extraction layer (u1) in which the finally generated fine (40 ⁇ 40 grid) feature amount is calculated, is used.
  • FIG. 9 is a diagram showing an example of bulk images taken by a stereo camera.
  • the image acquisition unit 151 acquires two types of bulk images, the left image P1L and the right image P1R.
  • the estimation unit 152 performs estimation processing using the learning model 141 on both the left image P1L and the right image P1R.
  • a part or all of the learning parameters 141b used for the left image P1L may be shared as a weight for the right image P1R.
  • one camera may be used, and the positions of the cameras may be shifted to capture images corresponding to two types of left and right images at two locations.
  • the estimation unit 152 suppresses erroneous recognition of the object by using a matching map that combines the feature amount of the left image P1L and the feature amount of the right image P1R.
  • the matching map shows the strength of the correlation between the right image P1R and the left image P1L for each feature amount. That is, by using the matching map, it is possible to match the left image P1L and the right image P1R by paying attention to the feature amount in each image.
  • FIG. 10 is a diagram showing an example of the relationship between the bulk image and the matching map.
  • the matching map ML that is based on the left image P1L and corresponds to the right image P1R
  • the grid MLa having the largest correlation with the feature amount contained in P1R is highlighted and displayed.
  • the matching map MR that is based on the right image P1R and corresponds to the left image P1L
  • the feature amount of the grid including the center point of the object W1R of the right image P1R and the left image P1L are included.
  • the grid MRa which has the largest correlation with the feature amount, is highlighted and displayed.
  • the grid MLa having the largest correlation in the matching map ML corresponds to the grid on which the object W1L in the left image P1L is located
  • the grid MRa having the largest correlation in the matching map MR is the position of the object W1R in the right image P1R.
  • the grid to be corresponds to the grid to be.
  • the matching grids are the grid G1L of the left image P1L and the grid G1R of the right image P1R.
  • the parallax with respect to the object W1 can be specified based on the X coordinate of the object W1L in the left image P1L and the X coordinate of the object W1R in the right image P1R. Can be identified.
  • FIG. 11 is a flowchart showing an example of estimation processing.
  • FIG. 12 is a diagram showing an example of estimation processing.
  • the image acquisition unit 151 acquires the left and right images of the object as shown in the left image P1L and the right image P1R shown in FIG. 9 (step S201).
  • the estimation unit 152 calculates the feature amount for each horizontal grid of the left and right images.
  • the first left side of the equation (1) is calculated in the horizontal direction of each image.
  • a 40-by-40 matrix is obtained as shown in the terms and the second term (the product of the first term matrix and the second term matrix).
  • the estimation unit 152 executes the process m shown in FIG.
  • the estimation unit 152 calculates, for example, the matrix product of the feature amount of the same column extracted from the right image P1R transposed to the feature amount of the specific column extracted from the left image P1L by the equation (1).
  • the feature amounts l11 to l1n in the first grid in the horizontal direction of the specific column of the left image P1L are arranged in the row direction, respectively.
  • the feature amounts r11 to r1n of the first grid in the horizontal direction of the right image P1R specific column are arranged in the column direction, respectively.
  • the matrix of the second term on the left side is a transposed matrix in which the feature amounts r11 to r1m of the grid are arranged in the row direction in the horizontal direction of the specific column of the right image P1R.
  • the right side of the equation (1) is a calculation of the matrix product of the first term on the left side and the matrix of the second term on the left side.
  • the first column on the right side of the equation (1) represents the correlation between the feature amount of the first grid extracted from the right image P1R and the feature amount of each horizontal grid of the specific column extracted from the left image P1L, and one row.
  • the eyes represent the correlation between the feature amount of the first grid extracted from the left image P1L and the feature amount of each horizontal grid of a specific column extracted from the right image P1R. That is, the right side of the equation (1) shows a correlation map between the feature amount of each grid of the left image P1L and the feature amount of each grid of the right image P1R.
  • the subscript "m” indicates the position of the grid in the horizontal direction of each image
  • the subscript "n” indicates the number of the feature amount in each grid. That is, m is 1 to 40 and n is 1 to 256.
  • the estimation unit 152 calculates the matching map ML of the right image P1R with respect to the left image P1L as shown in the matrix (1) using the calculated correlation map.
  • the matching map ML of the right image P1R with respect to the left image P1L is calculated, for example, by applying the Softmax function to the row direction of the correlation map. This normalizes the value of the correlation in the horizontal direction. That is, all the values in the row direction are converted so that the sum is 1.
  • the estimation unit 152 convolves the feature amount extracted from the right image P1R into the calculated matching map ML, for example, by the equation (2).
  • the first term on the left side of the equation (2) is a transposed version of the matrix (1)
  • the second term on the left side is the matrix of the second term on the left side of the equation (1).
  • the feature amount for correlating and the feature amount for convolution in the matching map are the same, but a new correlation is obtained from the extracted feature amount by a convolutional neural network or the like.
  • the feature amount for convolution and the feature amount for convolution may be generated separately.
  • the estimation unit 152 connects the feature amount obtained by the equation (2) to the feature amount extracted from the left image P1L, and generates a new feature amount by a convolutional neural network, for example. By integrating the features of the left and right images in this way, the estimation accuracy of the position and orientation is improved.
  • the process m in FIG. 12 may be repeated a plurality of times.
  • the estimation unit 152 estimates the position, orientation, and classification from the features obtained here, for example, by a convolutional neural network.
  • the estimation unit 152 calculates the matching map MR of the left image P1L with respect to the right image P1R as shown in the matrix (2) using the calculated correlation map (step S202).
  • the matching map MR of the left image P1L with respect to the right image P1R is also calculated by applying the Softmax function to the row direction of the correlation map, for example, in the same manner as the matching map ML of the right image P1R with respect to the left image P1L.
  • the estimation unit 152 convolves the feature amount of the left image P1L into the calculated matching map, for example, by the equation (3).
  • the first term on the left side of the equation (3) is the matrix (2), and the second term on the left side is the one before the transposition of the second term on the left side of the equation (1).
  • the estimation unit 152 selects and compares the preset threshold value and the grid with the largest estimation result of the target (object) classification estimated from the left image P1L (step S203). If the threshold is not exceeded, it ends as if there is no target. If the threshold value is exceeded, the grid with the largest value is selected from the matching map ML with the right image P1R for that grid (step S204).
  • the estimation result of the target class classification of the right image P1R is compared with the preset threshold value (step S208). If the threshold value is exceeded, the grid with the largest value is selected from the matching map ML with the left image P1L for that grid (step S209). If the threshold value is not exceeded, the classification score of the grid selected from the estimation result of the left image P1L is set to 0, and the process returns to step S203 (step S207).
  • step S210 it is compared whether the grid of the matching map ML selected in step S209 and the grid selected from the estimation result of the left image P1L in step S204 are equal (step S210). If the grids are different, the classification score of the grid selected from the estimation result of the left image P1L in step S204 is set to 0, and the process returns to the grid selection in step S203 (step S207). Finally, the parallax is calculated from the detection result of the position information (for example, the value of x in the horizontal direction in FIG. 1) of the grid selected in the left image P1L and the right image P1R (step S211).
  • step S212 the depth of the target is calculated based on the parallax calculated from step S211 (step S212).
  • the classification score of the grid selected from the estimation results of the left image P1L and the right image P1R is set to 0, and then the process returns to step S203.
  • the process up to step S212 may be repeated.
  • the image processing device 10 includes an acquisition unit and an estimation unit.
  • the acquisition unit acquires a first image and a second image obtained by photographing the works piled up in bulk.
  • the estimation unit generates a matching map of the feature amount of the first image and the feature amount of the second image, and the position and orientation of each target work for each of the first image and the second image.
  • the classification score is estimated, and the depth from the stereo camera to the work is calculated by estimating the work position based on the matching result and the position estimation result using the attention map. As a result, erroneous detection in object recognition can be suppressed.
  • FIG. 13 is a diagram showing an example of a bulk image including a tray according to a modified example. In the example shown in FIG.
  • the image processing device 10 can set a trajectory so that the robot arm 30 does not collide with the tray by specifying the position and posture of the tray on which the object is arranged.
  • the tray to be detected is an example of an obstacle.
  • the image processing device 10 may be configured to detect other obstacles other than the tray.
  • FIG. 14 is a diagram showing an example of a position deviation estimation model according to a modified example. As shown in FIG. 14, the image processing apparatus 10 may cut out a portion of the left image P1L and the right image P1R that is smaller in size than the grid around the estimated position and combine them. Then, the estimation process may be performed in the same manner as the estimation process described above, and the positional deviation may be estimated based on the processing result.
  • FIG. 15 is a diagram showing another example of the position deviation estimation model according to the modified example.
  • the image processing device 10 separately performs estimation processing on the left image P1L and the right image P1R.
  • the image processing apparatus 10 may share the weighting for the left image P1L with the weighting for the right image P1R when performing the respective estimation processes, as described above.
  • the estimation process described above is not applied to the images of the workpieces 41 and 42 stacked in bulk, but to the robot arm 30, the workpieces 41 and 42 held by the robot arm 30, or the workpieces aligned at the alignment destination. It may be done for 41 and 42.
  • FIG. 16 is a block diagram showing an example of a configuration of a system for acquiring (measuring) and learning three-dimensional data of an object according to the first embodiment.
  • the processing device 110 and the three-dimensional data measuring device 140 are communicably connected to each other through the network NW.
  • the processing device 110 includes a communication I / F (interface) 111, an input I / F 112, a display 113, a storage circuit 114, and a processing circuit 115.
  • the three-dimensional data measuring device 140 is connected to the projector 120 and the camera 130.
  • the three-dimensional data measuring device 140 includes a communication I / F 141, an input I / F 142, a display 143, a storage circuit 144, and a processing circuit 145.
  • the projector 120 can irradiate (project) a predetermined pattern with light having a wavelength shorter than that of visible light (for example, UV (ultraviolet) light), and can also illuminate with visible light.
  • visible light for example, UV (ultraviolet) light
  • the camera 130 is a color camera, the visible light is illuminated by white light, and when the camera 130 is a monochrome camera, it is illuminated by red light, blue light, and green light, respectively.
  • a visible light illumination device may be provided separately from the projector 120.
  • the camera 130 is a color camera or a monochrome camera capable of capturing visible light.
  • the communication I / F 111 controls data input / output communication with an external device through the network NW.
  • the communication I / F 111 is realized by a network card, a network adapter, a NIC (Network Interface Controller), or the like.
  • the input I / F 112 is connected to the processing circuit 115, converts an input operation received from the administrator (not shown) of the processing device 110 into an electric signal, and outputs the input operation to the processing circuit 115.
  • the input I / F 112 is a switch button, a mouse, a keyboard, a touch panel, or the like.
  • the display 113 is connected to the processing circuit 115 and displays various information and various image data output from the processing circuit 115.
  • the display 113 is realized by a liquid crystal monitor, a CRT (Cathode Ray Tube) monitor, a touch panel, or the like.
  • the storage circuit 114 is realized by, for example, a storage device such as a memory.
  • the storage circuit 114 stores various programs executed by the processing circuit 115. Further, the storage circuit 114 temporarily stores various data used when various programs are executed by the processing circuit 115.
  • the storage circuit 114 has an object three-dimensional data 1141 and a machine (deep) learning model 1142.
  • the object three-dimensional data 1141 includes three-dimensional shape data and texture data for various objects.
  • the texture data referred to here is RGB (Red, Green, Blue) color data, metal (reflection) representing the texture, roughness (surface roughness), transparency, and the like.
  • the texture data to be acquired may be only RGB color data, or may include data on color and texture, or both of them.
  • the machine (deep) learning model 1142 includes a neural network structure 1142a and a learning parameter 1142b.
  • the neural network structure 1142a is an application of a known network such as the convolutional neural network b1 of FIG. 5, and is the network structure shown in FIG.
  • the learning parameter 1142b is, for example, the weight of the convolutional filter of the convolutional neural network, and is a parameter that is learned and optimized for estimating the position and orientation of the object.
  • the machine (deep) learning model 1142 is used in the object grasping system 1 (FIGS. 1 and 2) to estimate the position and orientation of the work from the images output from the cameras 20 (FIGS. 1 and 2). ..
  • the machine (deep) learning model 1142 is generated, for example, by learning the positions and postures of a plurality of works and images of the plurality of works as teacher data.
  • the machine (deep layer) learning model 1142 is generated by, for example, the processing circuit 115, but is not limited to this, and may be generated by an external computer.
  • the processing circuit 115 is realized by a processor such as a CPU (Central Processing Unit).
  • the processing circuit 115 controls the entire processing device 110.
  • the processing circuit 115 executes various processes by reading various programs stored in the storage circuit 114 and executing the read programs.
  • the processing circuit 115 will have a learning unit 1151 and a data output unit 1152.
  • the learning unit 1151 is separated by image generation software based on the object 3D data 1141 (including both the data newly measured and accumulated by the 3D data measuring device 140 and the data accumulated in the past). An image of the stacked work is generated to create machine learning training data, machine learning of the machine (deep layer) learning model 1142 is performed based on the training data, and the learning parameter 1142b is updated.
  • the data output unit 1152 outputs the object three-dimensional data 1141 stored in the storage circuit 114 and the data of the machine (deep) learning model 1142 in response to an operator's instruction or an external request.
  • the communication I / F 141 controls data input / output communication with an external device through the network NW.
  • the communication I / F 141 is realized by a network card, a network adapter, a NIC, or the like.
  • the communication I / F 141 transmits a control signal to be output to the projector 120 according to a standard such as HDMI (registered trademark) (High-Definition Multimedia Interface), and receives a status signal from the projector 120.
  • the communication I / F 141 transmits a control signal to the camera 130 and receives image data output from the camera 130.
  • the input I / F 142 is connected to the processing circuit 145, converts the input operation received from the administrator (not shown) of the three-dimensional data measuring device 140 into an electric signal, and outputs the input operation to the processing circuit 145.
  • the input I / F 142 is a switch button, a mouse, a keyboard, a touch panel, or the like.
  • the display 143 is connected to the processing circuit 145 and displays various information and various image data output from the processing circuit 145.
  • the display 143 is realized by a liquid crystal monitor, a CRT monitor, a touch panel, or the like.
  • the storage circuit 144 is realized by, for example, a storage device such as a memory.
  • the storage circuit 144 stores various programs executed by the processing circuit 145. Further, the storage circuit 144 temporarily stores various data used when various programs are executed by the processing circuit 145.
  • the storage circuit 144 has the object three-dimensional data 1441.
  • the object 3D data 1441 is the original data for a part of the object 3D data 1141 stored in the storage circuit 114 of the processing device 110, and is the communication I / F 141, the network NW, and the communication I / of the processing device 110. It is stored in the storage circuit 114 via F111.
  • the processing circuit 145 of the three-dimensional data measuring device 140 is realized by a processor such as a CPU.
  • the processing circuit 145 controls the entire three-dimensional data measuring device 140.
  • the processing circuit 145 reads various programs stored in the storage circuit 144 and executes the read programs to execute various processes.
  • the processing circuit 145 will have an object three-dimensional data measuring unit 1451.
  • the object 3D data measurement unit 1451 controls the projector 120 and the camera 130 through the communication I / F 141, measures the 3D shape and texture from the image of the object captured by the camera 130, and measures the 3D shape data. And the three-dimensional data of the object including the texture data are acquired.
  • the measurement of the three-dimensional shape of the object is performed based on an image obtained by irradiating the object with a predetermined pattern and photographing the object by, for example, a known lattice method or the like.
  • the three-dimensional shape of the object is measured while changing the posture of the object.
  • FIG. 17 is a flowchart showing an example of processing for acquiring three-dimensional data of an object according to the first embodiment, and is a processing example when shooting is performed by a color camera 130.
  • a predetermined paint is applied to the object.
  • a fluorescent paint that emits light by the first visible light when irradiated with light having a wavelength shorter than that of visible light (for example, UV (ultraviolet) light) and becomes colorless and transparent with respect to visible light. Is. This can also be called invisible paint.
  • light having a wavelength shorter than that of visible light will be described as UV light, but the present invention is not limited to this.
  • two-photon excitation can generate light with a wavelength shorter than that of visible light, which can be used for pattern light irradiation.
  • FIG. 17 is a diagram showing an example of a state in which the object W according to the first embodiment is irradiated with a UV pattern from the projector 120, and the object W is determined by irradiation with UV light from the projector 120 with an invisible paint. The light is emitted in the pattern of, and the state is photographed by the camera 130. Since the light emitted by the first visible light is due to the invisible paint, there is no problem even if the object W is a glossy object or a black object.
  • step S11 the calculation of the three-dimensional shape of the object (step S11) is performed in consideration of the image taken under the previous UV pattern after the irradiation of the second and subsequent UV patterns is performed. It is said. As a result, the accuracy of measuring the three-dimensional shape is improved. Further, only the photographing is performed at the time of irradiating the UV pattern, and after the photographing is completed for all the UV patterns, the three-dimensional shape of the object may be calculated based on all the captured images. In addition, when irradiating and shooting a UV pattern, only the images taken under the UV pattern are processed, and after the shooting is completed for all the UV patterns, the calculation considering all the images is performed. You may do it.
  • the three-dimensional data measuring device 140 determines whether or not the processing for the predetermined UV pattern is completed (step S12), and if it is determined that the processing is not completed (No in step S12), another UV pattern is used. It repeats from irradiation and the like (step S11). When it is determined that the processing for the predetermined UV pattern is completed (Yes in step S12), the process proceeds to the next processing.
  • the three-dimensional data measuring device 140 irradiates an object with white light by a projector 120 or an external light source, takes a picture with a camera 130, acquires a texture based on the taken image, and stores it.
  • FIG. 19 is a diagram showing an example of a state in which the object W according to the first embodiment is irradiated with visible light, and the invisible paint of the object W becomes colorless and transparent by irradiation with white light from the projector 120. The original texture of the object W appears, and the state is photographed by the camera 130.
  • the three-dimensional data measuring device 140 performs point cloud data matching and updates the data in the second and subsequent processes after the posture change (step S14). That is, the three-dimensional data measuring device 140 can determine that the parts are the same from the three-dimensional shape data of the object acquired in the previous process and the three-dimensional shape data of the object acquired in the current process. The data is concatenated based on the part, and the data of the three-dimensional shape of the object is updated. As a result, it is possible to acquire a three-dimensional shape of an object that cannot be captured only by photographing from one side.
  • the three-dimensional data measuring device 140 determines whether or not the processing has been completed for the predetermined posture covering all the appearances of the object (step S15), and if it is determined that the processing has not been completed (No. in step S15). ) Changes the posture of the object (step S16), and repeats from irradiation of the UV pattern and the like (step S11). The posture of the object may be changed manually by the operator or by a drive mechanism. When the three-dimensional data measuring device 140 determines that the process has been completed for the predetermined posture (Yes in step S15), the three-dimensional data measuring device 140 ends the process.
  • FIG. 20 is a flowchart showing another example of the process of acquiring the object three-dimensional data according to the first embodiment, and is a process example when the shooting is performed by the monochrome camera 130.
  • the preparations for the treatment are the same as those described above.
  • the projector 120 irradiates an object with a UV pattern. Then, the object is photographed by the camera 130 having a predetermined positional relationship with the projector 120, the three-dimensional shape of the object is calculated based on the photographed image, and the object is stored in the storage circuit (step S21). After the second and subsequent UV patterns are irradiated, the three-dimensional shape of the object is calculated in consideration of the images taken under the previous UV pattern. It should be noted that shooting may be performed only when the UV pattern is irradiated, and after the shooting is completed for all the UV patterns, the three-dimensional shape of the object may be calculated based on all the shot images. In addition, when irradiating and shooting a UV pattern, only the images taken under the UV pattern are processed, and after the shooting is completed for all the UV patterns, the calculation considering all the images is performed. You may do it.
  • the three-dimensional data measuring device 140 determines whether or not the processing for the predetermined UV pattern is completed (step S22), and if it is determined that the processing is not completed (No in step S22), another UV pattern is used. It repeats from irradiation and the like (step S21). When it is determined that the processing for the predetermined UV pattern is completed (Yes in step S22), the process proceeds to the next processing.
  • the three-dimensional data measuring device 140 irradiates the object with red light by the projector 120 or an external light source, takes a picture by the camera 130, and acquires the red component of the texture based on the taken image. Then, it is stored in the storage circuit (step S23). Since it can be estimated that the object has not moved from the image taken by irradiating the UV pattern, the three-dimensional shape of the object acquired from the image taken under the UV pattern can be easily matched with the texture.
  • the three-dimensional data measuring device 140 irradiates the object with blue light by the projector 120 or an external light source, takes a picture with the camera 130, acquires the blue component of the texture based on the taken image, and stores it. Stored in the circuit (step S24).
  • the three-dimensional data measuring device 140 irradiates the object with green light by the projector 120 or an external light source, takes a picture with the camera 130, acquires the green component of the texture based on the taken image, and stores it. Stored in the circuit (step S25).
  • the three-dimensional data measuring device 140 performs point cloud data matching and updates the data in the second and subsequent processes after the posture change (step S26). That is, the three-dimensional data measuring device 140 can determine that the parts are the same from the three-dimensional shape data of the object acquired in the previous process and the three-dimensional shape data of the object acquired in the current process. The data is concatenated based on the part, and the data of the three-dimensional shape of the object is updated.
  • the three-dimensional data measuring device 140 determines whether or not the processing has been completed for the predetermined posture covering all the appearances of the object (step S27), and if it is determined that the processing has not been completed (No. in step S27). ) Changes the posture of the object (step S28), and repeats from irradiation of the UV pattern and the like (step S21). The posture of the object may be changed manually by the operator or by a drive mechanism.
  • the three-dimensional data measuring device 140 determines that the process has been completed for the predetermined posture (Yes in step S27)
  • the three-dimensional data measuring device 140 ends the process.
  • FIG. 21 is a flowchart showing an example of learning data generation and learning processing according to the first embodiment.
  • the learning model is generated and updated by the processing device 110 shown in FIG. 16 will be described, but the present invention is not limited to this, and may be performed by another computer (not shown).
  • the processing device 110 acquires the three-dimensional data of the desired object from the three-dimensional data 1141 of the object (step S101).
  • FIG. 22 is a diagram showing an example of three-dimensional data of the object according to the first embodiment.
  • the processing device 110 sets various conditions for arranging the object in the virtual space (step S102).
  • the object can be placed in the virtual space by using, for example, known image generation software or the like.
  • Conditions such as the number, position, and posture of the objects to be arranged can be set so that the image generation software randomly generates the objects, but the present invention is not limited to this, and the administrator of the processing device 110 arbitrarily sets the conditions. May be good.
  • the processing device 110 arranges the object in the virtual space according to the set conditions (step S103).
  • the processing device 110 acquires an image, a position, and a posture of the arranged objects by capturing, for example, a virtual space in which a plurality of objects are arranged (step S104).
  • the position and orientation of the object are indicated by, for example, three-dimensional coordinates (x, y, z), and the attitude of the object is a quaternion (qx, qy) which is a quaternion representing the attitude or rotational state of the object. , Qz, qw).
  • FIG. 23 is a diagram showing an example of a captured image of a virtual space in which a plurality of objects according to the first embodiment are arranged.
  • a plurality of objects W1a and W1b are arranged at random positions and postures in the virtual space. Further, in the following, an image of randomly arranged objects may be referred to as a “bulk image”.
  • the processing device 110 stores the acquired image and the position and orientation of the arranged object in the storage circuit 14 (step S105). Further, the processing device 110 repeats steps S102 to S105 a predetermined number of times (step S106).
  • teacher data the combination of the image acquired by the above step and the position and posture in which the object is arranged, which is stored in the storage circuit 114, may be referred to as "teacher data".
  • the processing device 110 generates or updates the learning parameter 1142b used as a weight in the neural network structure 1142a by performing the learning process a predetermined number of times using the generated teacher data (step S107).
  • teacher data including the image of the object and the combination of the position and the posture used in the learning process can be easily generated. can do.
  • the object three-dimensional data measuring method emits light by the first visible light when it is irradiated with light having a wavelength shorter than that of visible light, and the visible light is subjected to light emission.
  • the first object coated with the colorless and transparent paint is irradiated with light having a wavelength shorter than that of visible light according to a predetermined pattern, the first object is photographed, and the first object is photographed from the photographed image. It comprises a first step of measuring the three-dimensional shape of the object of. This makes it possible to easily measure the three-dimensional shape from an actual object.
  • the first object is irradiated with visible light, the first object is photographed, and the texture of the first object is measured from the photographed image.
  • a second step may be further provided. Thereby, the three-dimensional data of the object including the three-dimensional shape and the texture can be easily measured from the actual object.
  • a plurality of predetermined patterns are switched with respect to one posture of the first object, and the three-dimensional shape of the first object is measured. Thereby, the accuracy of the measurement of the three-dimensional shape can be improved.
  • the posture of the first object is changed, and the measurement of the three-dimensional shape of the first object by the first step and the measurement of the texture of the first object by the second step are repeated to obtain a point cloud.
  • Data is concatenated and updated by data matching. As a result, it is possible to acquire a three-dimensional shape of an object that cannot be captured only by photographing from one side.
  • the second step when shooting is performed with a color camera, white light is irradiated and photographed, and when shooting is performed with a monochrome camera, red light, blue light, and green light are irradiated and photographed, respectively. conduct. This makes it possible to flexibly support a color camera and a monochrome camera.
  • the object three-dimensional data measuring device emits light by the first visible light when irradiated with light having a wavelength shorter than that of visible light, and is colorless and transparent with respect to visible light.
  • the first object coated with the paint is irradiated with light having a wavelength shorter than that of visible light according to a predetermined pattern, the first object is photographed, and the first object is photographed from the photographed image.
  • the processing circuit executes the first process of measuring the three-dimensional shape of the light.
  • the learning data generation method generates images of workpieces stacked separately by image generation software based on the object 3D data obtained by the above object 3D data measurement method. , Machine learning learning data. As a result, the cost required for preparing the learning data can be reduced.
  • the learning data generation device generates images of workpieces separately stacked by image generation software based on the object three-dimensional data obtained by the above-mentioned object three-dimensional data measurement method.
  • the processing circuit executes the process of making the learning data of machine learning.
  • the above-mentioned learning data generation method can be realized as an apparatus.
  • FIG. 24 is a block diagram showing an example of a system configuration for acquiring (measuring) three-dimensional data of the target group and generating a three-dimensional model of the target group according to the second embodiment.
  • the processing device 110 and the three-dimensional data measuring device 140 are communicably connected to each other through the network NW.
  • the processing device 110 includes a communication I / F (interface) 111, an input I / F 112, a display 113, a storage circuit 114, and a processing circuit 115.
  • the 3D data measuring device 140 is connected to the projector 120, the stereo cameras 131 and 132, and the 3D scanner camera 150.
  • the three-dimensional data measuring device 140 includes a communication I / F 146, an input I / F 142, a display 143, a storage circuit 144, and a processing circuit 145.
  • the stereo cameras 131 and 132 when expressed without distinction, they may be simply referred to as the camera 130.
  • the projector 120 can irradiate (project) a predetermined pattern with light having a wavelength shorter than that of visible light (for example, UV (ultraviolet) light), and can also illuminate with visible light.
  • the illumination by visible light may be performed by illumination by white light, illumination by each of red light, blue light, and green light, or illumination matching the expected color of the interior light.
  • a visible light illumination device may be provided separately from the projector 120.
  • the camera 130 is a color camera or a monochrome camera capable of capturing visible light.
  • Stereo cameras 131 and 132 are color cameras or monochrome cameras capable of capturing visible light.
  • the distance information between the target group and the target group is acquired by the camera 150 for a 3D scanner.
  • the camera 150 for a 3D scanner is a color camera that captures an object group irradiated with light having a wavelength shorter than that of visible light by the projector 120.
  • the camera 150 for a 3D scanner may form a part of the stereo camera 130, and at least one of the cameras 131 and 132 is a target group that has been irradiated with light having a wavelength shorter than that of visible light. It may be configured to take an image.
  • the camera 150 for a 3D scanner images a group of objects including a plurality of objects (workpieces) irradiated with light having a wavelength shorter than visible light by the projector 120.
  • the stereo cameras 131 and 132 image a group of objects irradiated with visible light by the projector 120.
  • FIG. 25 is a diagram showing an example of the measurement process according to the second embodiment. As shown in FIG. 25, the stereo cameras 131 and 132 photograph a group of objects including a plurality of objects W1 and W2.
  • the 3D scanner camera 150 acquires point cloud data indicating the distances to the respective objects W1 and W2 by photographing the plurality of objects W1 and W2.
  • the communication I / F 111 controls data input / output communication with an external device through the network NW.
  • the communication I / F 111 is realized by a network card, a network adapter, a NIC (Network Interface Controller), or the like.
  • the input I / F 112 is connected to the processing circuit 115, converts an input operation received from the administrator (not shown) of the processing device 110 into an electric signal, and outputs the input operation to the processing circuit 115.
  • the input I / F 112 is a switch button, a mouse, a keyboard, a touch panel, or the like.
  • the display 113 is connected to the processing circuit 115 and displays various information and various image data output from the processing circuit 115.
  • the display 113 is realized by a liquid crystal monitor, a CRT (Cathode Ray Tube) monitor, a touch panel, or the like.
  • the storage circuit 114 is realized by, for example, a storage device such as a memory.
  • the storage circuit 114 stores various programs executed by the processing circuit 115. Further, the storage circuit 114 temporarily stores various data used when various programs are executed by the processing circuit 115.
  • the storage circuit 114 has an image / position / attitude data 1141 of the target group and a machine (deep) learning model 1142.
  • the machine (deep) learning model 1142 includes a neural network structure 1142a and a learning parameter 1142b.
  • the neural network structure 1142a is an application of a known network such as the convolutional neural network b1 of FIG. 5, and is the network structure shown in FIG.
  • the learning parameter 1142b is, for example, the weight of the convolutional filter of the convolutional neural network, and is a parameter that is learned and optimized for estimating the position and orientation of each object included in the object group.
  • the machine (deep) learning model 1142 is used in the object grasping system 1 (FIGS. 1 and 2) to estimate the position and orientation of the work from the images output from the cameras 20 (FIGS. 1 and 2). ..
  • the machine (deep) learning model 1142 is generated, for example, by learning the positions and postures of a plurality of works and images of the plurality of works as teacher data.
  • the machine (deep layer) learning model 1142 is generated by, for example, the processing circuit 115, but is not limited to this, and may be generated by an external computer.
  • the processing circuit 115 is realized by a processor such as a CPU (Central Processing Unit).
  • the processing circuit 115 controls the entire processing device 110.
  • the processing circuit 115 executes various processes by reading various programs stored in the storage circuit 114 and executing the read programs.
  • the processing circuit 115 will have a learning unit 1151 and a data output unit 1152.
  • the learning unit 1151 is based on the image / position / posture data 1141 of the target group (including both the data newly measured and accumulated by the three-dimensional data measuring device 140 and the data accumulated in the past). Machine learning of the machine (deep) learning model 1142 is performed, and the learning parameter 1142b is updated.
  • the data output unit 1152 outputs the image / position / posture data 1141 of the target group stored in the storage circuit 114 and the data of the machine (deep layer) learning model 1142 in response to the instruction of the operator or the request from the outside.
  • the communication I / F 146 controls data input / output communication with an external device through the network NW.
  • the communication I / F 146 is realized by a network card, a network adapter, a NIC, or the like.
  • the communication I / F 146 transmits a control signal to be output to the projector 120 according to a standard such as HDMI (registered trademark) (High-Definition Multimedia Interface), and receives a status signal from the projector 120.
  • the communication I / F 146 transmits a control signal to the camera 130 and receives image data output from the camera 130.
  • the input I / F 142 is connected to the processing circuit 145, converts the input operation received from the administrator (not shown) of the three-dimensional data measuring device 140 into an electric signal, and outputs the input operation to the processing circuit 145.
  • the input I / F 142 is a switch button, a mouse, a keyboard, a touch panel, or the like.
  • the display 143 is connected to the processing circuit 145 and displays various information and various image data output from the processing circuit 145.
  • the display 143 is realized by a liquid crystal monitor, a CRT monitor, a touch panel, or the like.
  • the storage circuit 144 is realized by, for example, a storage device such as a memory.
  • the storage circuit 144 stores various programs executed by the processing circuit 145. Further, the storage circuit 144 temporarily stores various data used when various programs are executed by the processing circuit 145.
  • the storage circuit 144 has the target group three-dimensional data 1441 and the target group image / position / posture data 1442.
  • the image / position / attitude data 1442 of the target group is the original data for a part of the image / position / attitude data 1141 of the target group stored in the storage circuit 114 of the processing device 110, and is the communication I / F 146 and the network NW. , It is stored in the storage circuit 114 via the communication I / F 111 of the processing device 110.
  • the three-dimensional data of the individual objects included in the target group may be already stored in the storage circuit 144, for example.
  • FIG. 26 is a diagram showing an example of three-dimensional data of the object according to the second embodiment.
  • the object group 3D data measuring unit 1451 includes, for example, an image taken by the camera 130 or the camera 150 for a 3D scanner, and the object 3D model M already stored in the storage circuit 144 shown in FIG. May be detected by matching the objects W1 and W2 included in the target group.
  • the processing circuit 145 of the three-dimensional data measuring device 140 is realized by a processor such as a CPU.
  • the processing circuit 145 controls the entire three-dimensional data measuring device 140.
  • the processing circuit 145 reads various programs stored in the storage circuit 144 and executes the read programs to execute various processes.
  • the processing circuit 145 will have a target group three-dimensional data measuring unit 1451.
  • the three-dimensional data measurement unit 1451 controls the projector 120 and the camera 130 through the communication I / F 146, captures an image of the target group captured by the camera 130, and acquires the target group by the camera 150 for a 3D scanner.
  • the point group data showing the three-dimensional shape of each target group is acquired from the image of.
  • the measurement of the three-dimensional shape of each object included in the object group is performed based on an image obtained by irradiating and photographing each object with a predetermined pattern by, for example, a known lattice method or the like.
  • the three-dimensional shape of each object is measured while changing the shooting direction of each object.
  • the camera 150 for a 3D scanner discriminates each object included in the target group based on the difference in visible light shown below.
  • the stereo cameras 131 and 132 and the 3D scanner camera 150 are calibrated (calibrated), and a predetermined paint is applied to each object.
  • the predetermined coating material is a fluorescent coating material that emits light by visible light when irradiated with light having a wavelength shorter than that of visible light (for example, UV (ultraviolet) light) and becomes colorless and transparent with respect to visible light. This can also be called invisible paint.
  • each object is coated with an invisible paint that emits light with different visible light.
  • the object W1 is coated with a first invisible paint that emits light by a first visible light
  • the object W2 is coated with a second invisible paint that emits light by a second visible light. Will be done.
  • UV light light having a wavelength shorter than that of visible light
  • two-photon excitation can excite a fluorescent paint in the same manner as light having a wavelength shorter than that of visible light, and it can be used for irradiating patterned light.
  • FIG. 27 is a flowchart showing an example of preprocessing according to the second embodiment.
  • the target group 3D data measuring unit 1451 of the 3D data measuring device 140 performs a calibration process of the stereo cameras 131 and 132 (step S201).
  • the cameras 131 and 132 constituting the stereo camera may be referred to as a stereo set.
  • FIG. 28 is a diagram showing an example of the calibration process according to the second embodiment. As shown in FIG. 28, the calibration process of the stereo set is performed, for example, by the stereo cameras 131 and 132 taking a picture of a known calibration board CB under visible light. The calibration process is performed by a commonly known and known method.
  • the target group 3D data measurement unit 1451 performs a calibration process of the projector 120 that irradiates light having a wavelength shorter than that of visible light and the 3D scanner camera 150 that acquires point cloud data (step S202). ..
  • the combination of the projector 120 and the camera 150 for a 3D scanner may be referred to as a 3D scan set.
  • the target group 3D data measurement unit 1451 also performs a calibration process between the stereo set and the 3D scan set (step S203).
  • the 3D scan set calibration process and the calibration process between the 3D scan set and the stereo set in steps S202 and S203 may also be performed with visible light, or a calibration board printed with fluorescent paint may be used. Therefore, the light may be shorter than the visible light.
  • FIG. 29 is a diagram showing an example of a plurality of objects coated with the paint according to the second embodiment. As shown in FIG. 29, different invisible paints are applied to the plurality of objects (workpieces) W1 and W2 included in the object group. In the second embodiment, the objects W1 and W2 are arranged at arbitrary positions, for example, as shown in FIG. 26, such as positions where they appear to overlap each other when photographed from the stereo cameras 131 and 132.
  • FIG. 30 is a flowchart showing an example of processing for acquiring the target group three-dimensional data according to the second embodiment, and is a processing example when shooting is performed by the color camera 150.
  • FIG. 30 when the three-dimensional data measuring device 140 starts processing, the projector 120 irradiates an object with a UV pattern. Then, each object included in the target group is photographed by the 3D scanner camera 150 having a predetermined positional relationship with the projector 120 (step S301).
  • FIG. 31 is a diagram showing an example of a state in which the target group according to the second embodiment is irradiated with the UV pattern from the projector, and the objects W1 and W2 are predetermined by the invisible paint by the irradiation of the UV light from the projector 120. The light is emitted in the pattern of, and the state is photographed by the camera 150 for a 3D scanner.
  • step S301 the first invisible paint is applied to the object W1 that emits the first visible light, and the second invisible paint is applied to the object W2 that emits the second visible light. However, they are shot at the same time.
  • step S301 the photographing of the object (step S301) is repeated until the UV pattern emitted from the projector 120 is changed (step S303) and the predetermined UV pattern is completed (step S302: No). Then, the three-dimensional data measuring device 140 calculates the three-dimensional shape of each object group based on the plurality of images taken for each UV pattern, and stores the three-dimensional shape in the storage circuit (step S304).
  • FIG. 32 is a diagram showing an example of a state in which the target group according to the second embodiment is irradiated with visible light, and the first invisible paint and the target object of the object W1 are irradiated with white light from the projector 120.
  • the second invisible paint of W2 is colorless and transparent, and can generate machine learning data similar to the original state of the objects W1 and W2. Therefore, the work is actually gripped by the robot arm. It can be expected to improve the recognition accuracy of position and posture.
  • the three-dimensional data measuring device 140 determines whether or not the processing from the predetermined direction is completed (step S321), and if it is determined that the processing is not completed (step S321: No), The imaging direction with respect to the target group is changed (step S322), and the process is repeated from irradiation of the UV pattern (step S301).
  • the posture of the object may be changed manually by the operator or by a drive mechanism.
  • the process proceeds to step S323. If the positions and postures of all the objects included in the target group can be specified only by photographing from one direction, it is not necessary to repeat the processes after step S322.
  • the three-dimensional data measuring device 140 performs point cloud data matching between the point cloud data measured from different directions and updates the data (step S323).
  • the three-dimensional data measuring device 140 includes the point cloud data of the object W1 acquired based on the first visible light and the point cloud data of the object W2 acquired based on the second visible light.
  • the point cloud data may be matched individually for each of the target groups, or the point cloud data may be matched for the entire target group.
  • the point cloud data acquired based on the first visible light is matched with the point cloud of the three-dimensional data stored in advance.
  • the relative position with respect to the stereo camera at the time of image shooting is calculated, and the position and orientation data of the object is acquired (S324).
  • the point cloud data acquired based on the second visible light and the point cloud matching with the 3D model are performed in the same manner, and if there is other data separated for each emission color, the 3D model for each emission color. Repeats matching with (S331, S332).
  • the three-dimensional data measuring device 140 determines whether or not a predetermined number of images for generating data have been taken (step S341).
  • step S341 determines that a predetermined number of images have not been taken
  • step S342 after the bulk state of the objects is changed (step S342), UV pattern irradiation or the like is performed.
  • Step S301 is repeated.
  • step S342 for example, the processes in steps S112 to S113 shown in FIG. 27 are performed.
  • the machine learning data generation method emits light by the first visible light when irradiated with light having a wavelength shorter than that of visible light, and is colorless to visible light.
  • the first object coated with the transparent first paint is irradiated with light having a wavelength shorter than that of the visible light
  • the second visible light emits light
  • the visible light is colorless and transparent.
  • the second object coated with the second paint is irradiated with light having a wavelength shorter than that of the visible light according to a predetermined pattern to obtain the first object and the second object.
  • the first step of photographing is provided. This makes it possible to easily measure the three-dimensional data of the target group including the three-dimensional shape of each individual object from the actual target group including a plurality of objects.
  • the first object and the second object are irradiated with visible light, and the first object and the second object are photographed.
  • a second step is provided. Further, in the first step, the position and the three-dimensional shape of the first object are measured by detecting the first visible light, and the second visible light is detected by detecting the second visible light. Measure the position and three-dimensional shape of the object. Further, in the machine learning data generation method, the first object and the second object are obtained from the three-dimensional shape measured in the first step due to the difference between the first visible light and the second visible light.
  • a third step of separating into the three-dimensional shape of the object of the above and matching with the three-dimensional data of the first object and the three-dimensional data of the second object held in advance may be provided. .. This makes it possible to easily measure the three-dimensional data of the object group including the three-dimensional shape of each individual object.
  • a plurality of predetermined patterns are switched for one posture of the first object and the second object, and the first object and the second object are switched. Measure the three-dimensional shape. Thereby, the accuracy of the measurement of the three-dimensional shape can be improved.
  • the machine learning data generation method changes the direction in which the first object and the second object are photographed, and the first object and the second object according to the first step are taken.
  • the measurement of the three-dimensional shape of the above and the photographing of the first object and the second object by the second step may be repeated, and the data may be connected and updated by point cloud data matching.
  • the machine learning data generation method includes measurement of the three-dimensional shape of the first object and the second object by the first step, and the first object and the second object by the second step.
  • the shooting of the object may be repeated, and the data may be concatenated and updated by matching the point cloud data separated for each object with the three-dimensional data. Also. As a result, it is possible to acquire the three-dimensional shape of each object that cannot be captured only by photographing from one side.
  • the object machine learning data measuring device emits light by the first visible light when irradiated with light having a wavelength shorter than that of the visible light, and is colorless and transparent to the visible light.
  • the first object coated with the first paint of No. 1 When the first object coated with the first paint of No. 1 is irradiated with light having a wavelength shorter than that of the visible light, the light is emitted by the second visible light and is colorless and transparent to the visible light.
  • the second object coated with the second paint is irradiated with light having a wavelength shorter than that of the visible light according to a predetermined pattern, and the first object and the second object are photographed.
  • a first processing unit that measures the position and three-dimensional shape of the first object and the position and three-dimensional shape of the second object from the captured image is provided. Thereby, the above-mentioned object three-dimensional data measurement method can be realized as an apparatus.
  • the present invention is not limited to each of the above embodiments, and various modifications can be made without departing from the spirit of the present invention.
  • the number of objects included in the target group is not limited to those described, and may be a target group including three or more objects.
  • FIG. 33 is a block diagram showing an example of an information processing device that executes a measurement program.
  • the information processing device 900 that executes the measurement program shown in FIG. 33 includes a communication device 910, an input device 920, an output device 930, a ROM 940, a RAM 950, a CPU 960, and a bus 970.
  • the communication device 910 functions as the communication I / F 146 shown in FIG. 24
  • the input device 920 functions as the input I / F 142 shown in FIG. 24
  • the output device 930 functions as the display 143 shown in FIG. 24.
  • the measurement program may be recorded not in the ROM 940 but in a storage device such as a hard disk built in the computer system or a recording medium that can be read by a drive (not shown).
  • the recording medium may be, for example, a portable recording medium such as a CD-ROM, a DVD disc, a USB memory, or an SD card, or a semiconductor memory such as a flash memory.
  • the measurement program is 940A.
  • the measurement program 940A may be integrated or dispersed as appropriate.
  • the CPU 960 reads the measurement program 940A from the ROM 940 and deploys these read programs on the work area of the RAM 950. Then, as shown in FIG. 33, the CPU 960 functions the measurement program 940A developed on the RAM 950 as the measurement process 950A.
  • the CPU 960 determines whether or not the identification information included in the setting change information received from the maintenance device 200 belongs to the motor control device.
  • the CPU 960 changes the setting by using the setting change information corresponding to the identification information determined to belong to the motor control device.
  • the CPU 960 transfers the setting change information including identification information other than the motor control device to another motor control device.
  • FIG. 33 describes the information processing device 900 that executes the measurement program having the same function as the three-dimensional data measuring device 140, the processing device 110 and the image processing device 10 are also similarly prepared in advance. Can be realized by executing the above with an information processing device.
  • the information processing apparatus 900 is, for example, a stand-alone computer, but is not limited to this, and may be realized by a plurality of computers capable of communicating with each other, or may be realized in a virtual machine on the cloud. Further, all or a part of the functions of the information processing apparatus 900 may be realized by an integrated circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array).
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the present invention is not limited by the above-described embodiment.
  • the present invention also includes a configuration in which the above-mentioned constituent elements are appropriately combined. Further, further effects and modifications can be easily derived by those skilled in the art. Therefore, the broader aspect of the present invention is not limited to the above-described embodiment, and various modifications can be made.
  • processing device 114 storage circuit, 1141 object 3D data, 1142 machine (deep layer) learning model, 1142a neural network structure, 1142b learning parameter, 115 processing circuit, 1151 learning unit, 1152 data output unit, 120 projector, 130 camera , 140 3D data measuring device, 144 storage circuit, 1441 object 3D data, 145 processing circuit, 1451 object 3D data measuring unit, W object

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Optics & Photonics (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

対象物3次元データ測定方法は、可視光よりも波長の短い光の照射を受けると第1の可視光による発光を行い、可視光に対しては無色透明の塗料が塗布された対象物(W)に対し、所定のパターンによる前記可視光よりも波長の短い光の照射を行って、前記対象物を撮影し、撮影された画像から前記対象物の3次元形状を測定する第1の工程を備える。

Description

対象物3次元データ測定方法、対象物3次元データ測定装置、学習データ生成方法および学習データ生成装置
 本発明は、対象物3次元データ測定方法、対象物3次元データ測定装置、学習データ生成方法および学習データ生成装置に関する。
 バラ積みされた複数の対象物(ワーク)をロボットアームにより把持する物体把持システム等において、対象物を撮影した画像からの対象物の種類や位置・姿勢の認識に畳み込みニューラルネットワーク等の人工知能が用いられる場合がある。人工知能を用いたシステムの適正な利用のためには、膨大な数の学習データによる機械学習が不可欠であり、学習データの準備に要するコストは大きなものとなる。
 バラ積みされた複数の対象物を、撮影された画像から正確に認識させるためには、実際の作業台等に置かれた状態に近い画像の学習データを用意しなければならず、対象物の3次元形状データだけでは不十分であり、対象物の表面のテクスチャデータも必要になる。一般には、実際の対象物から測定された3次元形状データやテクスチャデータに加工を施して相当数の学習データを生成している。物体の3次元形状を非接触で精密に計測する手法については、種々の技術が提案されている(特許文献1等を参照)。
特開平7-280535号公報 特開2020-103284号公報 特開2008-281399号公報
 しかしながら、実際の対象物から光学的な測定によって3次元形状データとテクスチャデータとを取得する場合、対象物が光沢物であったり黒色物体であったりする場合には測定が困難であった。すなわち、対象物が光沢物であったり黒色物体であったりする場合、測定のために照射した光が正常に戻ってこないため、正確な3次元形状の測定が困難である。
 照射した光を正常に反射させるため、対象物の表面にスプレー等により塗料等を付着させ、色や質感を変える場合があるが、そうした場合には対象物の表面のテクスチャが正確に測定できなくなってしまう。そのため、3次元形状の測定とテクスチャの測定とを別工程で行わなければならず、作業工数が増大するとともに、3次元形状とテクスチャとの位置合わせが煩雑になるという問題があった。
 本発明は、上記に鑑みてなされたものであって、3次元形状とテクスチャとを含む対象物3次元データを容易に測定する手法を提供することを目的とする。
 上述した課題を解決し、目的を達成するために、本発明の一態様に係る対象物3次元データ測定方法は、可視光よりも波長の短い光の照射を受けると第1の可視光による発光を行い、可視光に対しては無色透明の塗料が塗布された対象物に対し、所定のパターンによる前記可視光よりも波長の短い光の照射を行って、前記対象物を撮影し、撮影された画像から前記対象物の3次元形状を測定する第1の工程を備える。
 本発明の一態様に係る対象物3次元データ測定方法は、3次元形状とテクスチャとを含む対象物3次元データを容易に測定することができる。
図1は、物体把持システムの一例を示す外観図である。 図2は、物体把持システムの構成の一例を示すブロック図である。 図3は、ロボットアームの制御に関する処理の一例を示す図である。 図4は、ロボットアームの制御に関する処理の別の一例を示す図である。 図5は、検出モデルの一例を示す図である。 図6は、特徴検出層(u1)が出力する特徴マップの一例を示す図である。 図7は、対象物の位置および姿勢の推定結果の一例を示す図である。 図8は、対象物の把持位置の推定結果の別の一例を示す図である。 図9は、ステレオカメラにより撮影されたバラ積み画像の一例を示す図である。 図10は、バラ積み画像とマッチングマップとの関係の一例を示す図である。 図11は、推定処理の一例を示すフローチャートである。 図12は、推定処理の一例を示す図である。 図13は、変形例に係るトレイを含むバラ積み画像の一例を示す図である。 図14は、変形例に係る位置ずれ推定モデルの一例を示す図である。 図15は、変形例に係る位置ずれ推定モデルの別の一例を示す図である。 図16は、第1の実施形態に係る対象物3次元データの取得(測定)および学習のためのシステムの構成の一例を示すブロック図である。 図17は、第1の実施形態に係る対象物3次元データの取得の処理の一例を示すフローチャートである。 図18は、第1の実施形態に係る対象物にプロジェクタからUVパターンが照射された状態の例を示す図である。 図19は、第1の実施形態に係る対象物に可視光が照射された状態の例を示す図である。 図20は、第1の実施形態に係る対象物3次元データの取得の処理の別の一例を示すフローチャートである。 図21は、第1の実施形態に係る学習データの生成および学習処理の一例を示すフローチャートである。 図22は、第1の実施形態に係る対象物の3次元データの一例を示す図である。 図23は、第1の実施形態に係る複数の対象物が配置された仮想空間のキャプチャ画像の一例を示す図である。 図24は、第2の実施形態に係る対象群3次元データの取得(測定)および対象群の3次元モデル生成のためのシステムの構成の一例を示すブロック図である。 図25は、第2の実施形態に係る測定処理の一例を示す図である。 図26は、第2の実施形態に係る対象物の3次元データの一例を示す図である。 図27は、第2の実施形態に係る事前処理の一例を示すフローチャートである。 図28は、第2の実施形態に係るキャリブレーション処理の一例を示す図である。 図29は、第2の実施形態に係る塗料が塗布された複数の対象物の一例を示す図である。 図30は、第2の実施形態に係る対象群3次元データの取得の処理の一例を示すフローチャートである。 図31は、第2の実施形態に係る対象群にプロジェクタからUVパターンが照射された状態の例を示す図である。 図32は、第2の実施形態に係る対象群に可視光が照射された状態の例を示す図である。 図33は、測定プログラムを実行する情報処理装置の一例を示すブロック図である。
 以下、各実施形態に係る対象物3次元データ測定方法、対象物3次元データ測定装置、学習データ生成方法および学習データ生成装置について図面を参照して説明する。なお、各実施形態によりこの発明が限定されるものではない。また、図面における各要素の寸法の関係、各要素の比率などは、現実と異なる場合がある。図面の相互間においても、互いの寸法の関係や比率が異なる部分が含まれている場合がある。また、1つの実施形態や変形例に記載された内容は、原則として他の実施形態や変形例にも同様に適用される。
(物体把持システム)
 図1は、物体把持システム1の一例を示す外観図である。図1に示す物体把持システム1は、図示しない画像処理装置10と、カメラ20と、ロボットアーム30とを備える。カメラ20は、例えば、ロボットアーム30と、ロボットアーム30が把持する対象物となる、バラ積みされたワーク41、42等との両方を撮影可能な位置に設けられる。カメラ20は、例えば、ロボットアーム30と、ワーク41、42の画像とを撮影し、画像処理装置10に出力する。なお、ロボットアーム30とバラ積みされたワーク41,42等とは別々のカメラで撮影してもよい。カメラ20には、図1に示されるように、例えば公知のステレオカメラ等、複数の画像を撮影できるカメラが用いられる。画像処理装置10は、カメラ20から出力された画像を用いて、ワーク41、42等の位置および姿勢を推定する。画像処理装置10は、推定されたワーク41、42等の位置および姿勢に基づいて、ロボットアーム30の動作を制御する信号を出力する。ロボットアーム30は、画像処理装置10から出力された信号に基づいて、ワーク41、42等を把持する動作を行う。なお、図1においては、複数の異なる種類のワーク41、42等が開示されているが、ワークの種類は1種類であってもよい。ここでは、ワークが1種類である場合について説明する。また、ワーク41、42等は、位置および姿勢が不規則であるように配置されている。図1に示すように、例えば、複数のワークが上面視において重なるように配置されていてもよい。また、ワーク41、42は、対象物の一例である。
 図2は、物体把持システム1の構成の一例を示すブロック図である。図2に示すように、画像処理装置10は、カメラ20およびロボットアーム30と、ネットワークNWを通じて通信可能に接続されている。また、図2に示すように、画像処理装置10は、通信I/F(インターフェース)11と、入力I/F12と、ディスプレイ13と、記憶回路14と、処理回路15とを備える。
 通信I/F11は、ネットワークNWを通じた外部装置とのデータ入出力の通信を制御する。例えば、通信I/F11は、ネットワークカードやネットワークアダプタ、NIC(Network Interface Controller)等によって実現され、カメラ20から出力される画像のデータを受信するとともに、ロボットアーム30に出力する信号を送信する。
 入力I/F12は、処理回路15に接続され、画像処理装置10の管理者(不図示)から受け付けた入力操作を電気信号に変換して処理回路15に出力する。例えば、入力I/F12は、スイッチボタン、マウス、キーボード、タッチパネル等である。
 ディスプレイ13は、処理回路15に接続され、処理回路15から出力される各種情報および各種画像データを表示する。例えば、ディスプレイ13は、液晶モニタやCRT(Cathode Ray Tube)モニタ、タッチパネル等によって実現される。
 記憶回路14は、例えば、メモリ等の記憶装置により実現される。記憶回路14には、処理回路15により実行される各種のプログラムが記憶されている。また、記憶回路14には、処理回路15により各種のプログラムが実行される際に用いられる各種のデータが一時的に記憶される。記憶回路14は、機械(深層)学習モデル141を有する。さらに、機械(深層)学習モデル141はニューラルネットワーク構造141aと学習パラメータ141bを備えている。ニューラルネットワーク構造141aは、例えば、図5の畳み込みニューラルネットワークb1のような公知のネットワークを応用したもので、後述する図12に示されるネットワーク構造である。学習パラメータ141bは、例えば、畳み込みニューラルネットワークの畳み込みフィルタの重みであり、対象物の位置および姿勢を推定するために学習され、最適化されるパラメータである。ニューラルネットワーク構造141aは、推定部152に備えられていても構わない。なお、本発明における機械(深層)学習モデル141は学習済みモデルを例として説明するが、これに限定されない。なお、以下において、機械(深層)学習モデル141を、単に「学習モデル141」と表記する場合がある。
 学習モデル141は、カメラ20から出力された画像から、ワークの位置および姿勢を推定する処理に用いられる。学習モデル141は、例えば、複数のワークの位置および姿勢と、当該複数のワークを撮影した画像とを教師データして学習することにより生成される。なお、ここでは、学習モデル141が、例えば、処理回路15により生成されるが、これに限られず、外部のコンピュータにより生成されてもよい。
 処理回路15は、CPU(Central Processing Unit)等のプロセッサにより実現される。処理回路15は、画像処理装置10全体を制御する。処理回路15は、記憶回路14に記憶された各種のプログラムを読み取り、読み取ったプログラムを実行することで、各種の処理を実行する。例えば、処理回路15は、画像取得部151と、推定部152と、ロボット制御部153とを有することとなる。
 画像取得部151は、例えば、通信I/F11を通じて、バラ積み画像を取得し、推定部152に出力する。画像取得部151は、取得部の一例である。
 推定部152は、出力されたバラ積み画像を用いて、対象物の位置および姿勢を推定する。推定部152は、例えば、学習モデル141を用いて、対象物の画像に対する推定処理を行い、推定結果をロボット制御部153に出力する。なお、推定部152は、例えば、対象物が配置されるトレイ等の位置および姿勢をさらに推定してもよい。トレイの位置および姿勢を推定する構成については、後に説明する。
 ロボット制御部153は、推定された対象物の位置および姿勢に基づいて、ロボットアーム30を制御する信号を生成し、通信I/F11を通じてロボットアーム30に出力する。ロボット制御部153は、例えば、現在のロボットアーム30の位置および姿勢に関する情報を取得する。そして、ロボット制御部153は、現在のロボットアーム30の位置および姿勢と、推定された対象物の位置および姿勢に応じて、ロボットアーム30が対象物を把持する際に移動する軌道を生成する。なお、ロボット制御部153は、トレイ等の位置および姿勢に基づいて、ロボットアーム30が移動する軌道を修正してもよい。
 図3は、ロボットアームの制御に関する処理の一例を示す図である。図3に示すように、推定部152は、バラ積み画像から、ターゲットとなる対象物の位置および姿勢を推定する。同様に、推定部152は、バラ積み画像から、対象物が配置されたトレイ等の位置および姿勢を推定してもよい。ロボット制御部153は、推定された対象物およびトレイ等のモデルに基づいて、ロボットアーム30の手先の位置の座標および姿勢を算出し、ロボットアーム30の軌道を生成する。
 なお、ロボット制御部153は、ロボットアーム30が対象物を把持した後に、把持した対象物を整列させるためのロボットアーム30の動作を制御する信号を、さらに出力してもよい。図4は、ロボットアームの制御に関する処理の別の一例を示す図である。図4に示すように、画像取得部151は、カメラ20により撮影された、ロボットアーム30により把持された対象物を撮影した画像を取得する。推定部152は、ターゲットとなる、ロボットアーム30に把持された対象物の位置および姿勢を推定し、ロボット制御部153に出力する。また、画像取得部151は、カメラ20により撮影された、把持された対象物の移動先となる、整列先のトレイ等の画像をさらに取得してもよい。その際、画像取得部151は、整列先のトレイ等に既に整列された対象物の画像(整列済み画像)をさらに取得する。推定部152は、整列先の画像、または整列済み画像から、整列先となるトレイ等の位置および姿勢、並びに既に整列済みである対象物の位置および姿勢を推定する。そして、ロボット制御部153は、推定された、ロボットアーム30に把持された対象物の位置および姿勢、整列先となるトレイ等の位置および姿勢、並びに既に整列済みである対象物の位置および姿勢に基づいて、ロボットアーム30の手先の位置の座標および姿勢を算出し、対象物を整列させる際のロボットアーム30の軌道を生成する。
 次に、推定部152における推定処理について説明する。推定部152は、例えば公知のダウンサンプリング、アップサンプリング、スキップコネクションを持つ物体検出モデルを応用したモデルを用いて、対象物の特徴量を抽出する。図5は、検出モデルの一例を示す図である。図5に示す物体検出モデルにおいて、d1層は、例えばバラ積み画像P1(320×320ピクセル)を畳み込みニューラルネットワークb1を介してダウンサンプリングによって縦横40×40グリッドに区分し、各グリッドについて複数の特徴量(例えば256種類)を算出する。また、d1層より下位の層にあたるd2層は、d1層で区分されたグリッドを、d1層よりも粗く(例えば20×20グリッドに)区分して、各グリッドの特徴量を算出する。同様に、d1層およびd2層よりも下位の層にあたるd3層およびd4層は、d2層で区分されたグリッドを、それぞれより粗く区分する。d4層はアップサンプリングによって、より精細な区分で特徴量を算出し、同時にスキップコネクションs3によりd3層の特徴量と統合してu3層を生成する。スキップコネクションは、単純な加算、特徴量の連結でも良く、d3層の特徴量に対して畳み込みニューラルネットワークのような変換が加えられていても良い。同様にu3層をアップサンプリングして算出した特徴量とd2層の特徴量をスキップコネクションs2により統合してu2層を生成する。さらに同様にu1層を生成する。この結果、u1層においては、d1層と同様に、40×40グリッドに区分された各グリッドの特徴量が算出される。
 図6は、特徴検出層(u1)が出力する特徴マップの一例を示す図である。図6に示す特徴マップの水平方向は、40×40のグリッドに区分されたバラ積み画像P1の水平方向の各グリッドを示し、垂直方向は、垂直方向の各グリッドを示す。また、図6に示す特徴マップの奥行方向は、各グリッドにおける特徴量の要素を示す。
 図7は、対象物の位置および姿勢の推定結果の一例を示す図である。図7に示すように、推定部は、対象物の位置を示す2次元座標(Δx,Δy)、対象物の姿勢を示すクオタニオン(qx,qy,qz,qw)、およびクラス分類のスコア(C0,C1,…,Cn)を出力する。なお、ここでは、推定結果として、対象物の位置を示す座標のうち、カメラ20から対象物までの距離を示す深度の値は算出されない。深度の値を算出する構成については、後に説明する。なお、ここで言う深度とは、カメラの光軸に平行なz軸方向における、カメラのz座標から対象物のz座標までの距離をいう。なお、クラス分類のスコアはグリッドごとに出力される値であって、そのグリッドに対象物の中心点が含まれている確率である。例えば、対象物の種類がn種類だった場合に、これに“対象物の中心点が含まれていない確率”を加えてn+1個のクラス分類のスコアが出力される。例えば、対象物となるワークが1種類のみの場合は、2個のクラス分類のスコアが出力される。また、同一グリッド内に複数の対象物が存在する場合、より上に積まれている物体の確率を出力する。
 図7において、点CはグリッドGxの中心を示し、座標(Δx,Δy)である点ΔCは、例えば、検出された対象物の中心点を示す。すなわち、図7に示す例において、対象物の中心は、グリッドGxの中心点Cから、x軸方向にΔx、y軸方向にΔyだけオフセットしている。
 なお、図7に代えて、図8に示すように対象物の中心以外の任意の点a、b、cを設定し、グリッドGxの中心の点Cからの任意の点a、b、cの座標(Δx1,Δy1、Δz1、Δx2,Δy2、Δz2、x3,Δy3、Δz3)を出力してもよい。なお、任意の点は対象物のどの位置に設定してもよく、1点でも複数の点でも構わない。
 なお、対象物の大きさに比してグリッドの区分が粗いと、複数の対象物が一つのグリッドに入ってしまい、各対象物の特徴が交じり合って誤検出するおそれがあるため、ここでは、最終的に生成された精細な(40×40グリッドの)特徴量が算出される特徴抽出層(u1)の出力である特徴マップのみ利用する。
 また、ここでは、例えばステレオカメラを用いて、左右2種類の画像を撮影することにより、カメラ20から対象物までの距離を特定する。図9は、ステレオカメラにより撮影されたバラ積み画像の一例を示す図である。図9に示すように、画像取得部151は、左画像P1Lおよび右画像P1Rの2種類のバラ積み画像を取得する。また、推定部152は、左画像P1Lおよび右画像P1Rの両方に対して、学習モデル141を用いた推定処理を行う。なお、推定処理を行う際に、左画像P1Lに対して用いられる学習パラメータ141bの一部、またはすべてを、右画像P1Rに対する重み付けとして共有してもよい。なお、ステレオカメラではなく、1台のカメラを用い、カメラの位置をずらして、2か所で左右2種の画像に相当する画像を撮影してもよい。
 そこで、ここでは、推定部152は、左画像P1Lの特徴量と、右画像P1Rの特徴量とを組み合わせたマッチングマップを用いることにより、対象物の誤認識を抑制する。マッチングマップは、各特徴量について、右画像P1Rと左画像P1Lとで特徴量の相関の強弱を示す。すなわち、マッチングマップを用いることにより、各画像における特徴量に着目して、左画像P1Lと右画像P1Rとのマッチングを図ることができる。
 図10は、バラ積み画像とマッチングマップとの関係の一例を示す図である。図10に示すように、左画像P1Lを基準とし、右画像P1Rとの対応をとったマッチングマップMLにおいては、左画像P1Lの対象物W1Lの中心点が含まれるグリッドの特徴量と、右画像P1Rに含まれる特徴量との相関が最も大きいグリッドMLaが強調して表示される。同様に、右画像P1Rを基準とし、左画像P1Lとの対応をとったマッチングマップMRにおいても、右画像P1Rの対象物W1Rの中心点が含まれるグリッドの特徴量と、左画像P1Lに含まれる特徴量との相関が最も大きいグリッドMRaが強調して表示される。また、マッチングマップMLにおいて相関が最も大きいグリッドMLaは、左画像P1Lにおける対象物W1Lが位置するグリッドに対応し、マッチングマップMRにおいて相関が最も大きいグリッドMRaは、右画像P1Rにおける対象物W1Rが位置するグリッドに対応する。これにより、左画像P1Lにおいて対象物W1Lが位置するグリッドと、右画像P1Rにおいて対象物W1Rが位置するグリッドとが一致することを特定できる。すなわち、図9においては、一致するグリッドは、左画像P1LのグリッドG1Lと、右画像P1RのグリッドG1Rである。これにより、左画像P1Lにおける対象物W1LのX座標と、右画像P1Rにおける対象物W1RのX座標とに基づいて、対象物W1に対する視差を特定できるので、カメラ20から対象物W1までの深度zを特定することができる。
 図11は、推定処理の一例を示すフローチャートである。また、図12は、推定処理の一例を示す図である。以降、図9~図12を用いて説明する。まず、画像取得部151は、図9に示す左画像P1Lおよび右画像P1Rのように、対象物の左右の各画像を取得する(ステップS201)。次に、推定部152は、左右の各画像の水平方向の各グリッドについて、特徴量を算出する。ここで、上で述べたように、各画像を40×40のグリッドに区分し、各グリッドについて256個の特徴量を算出する場合、各画像の水平方向において、式(1)の左辺第1項および第2項(第1項の行列と第2項の行列の積)に示すような40行40列の行列が得られる。
Figure JPOXMLDOC01-appb-M000001
 次に、推定部152は、図12に示す処理mを実行する。まず、推定部152は、例えば、式(1)により、左画像P1Lから抽出した特定の列の特徴量に、右画像P1Rから抽出した同じ列の特徴量を転置したものの行列積を計算する。式(1)において、左辺第1項は、左画像P1Lの特定の列の水平方向における1番目のグリッドにおける各特徴量l11乃至l1nが、それぞれ行方向に並んでいる。一方、式(1)の左辺第2項においては、右画像P1R特定の列の水平方向における1番目のグリッドの各特徴量r11乃至r1nが、それぞれ列方向に並んでいる。すなわち、左辺第2項の行列は、右画像P1Rの特定の列の水平方向にグリッドの各特徴量r11乃至r1mがそれぞれ行方向に並んだ行列を転置したものである。また、式(1)の右辺は、左辺第1項の行列と、左辺第2項の行列の行列積とを計算したものである。式(1)の右辺の1列目は、右画像P1Rから抽出した1グリッド目の特徴量と左画像P1Lから抽出した特定の列の水平方向の各グリッドの特徴量の相関を表し、1行目は、左画像P1Lから抽出した1グリッド目の特徴量と右画像P1Rから抽出した特定の列の水平方向の各グリッドの特徴量の相関を表す。すなわち、式(1)の右辺は、左画像P1Lの各グリッドの特徴量と、右画像P1Rの各グリッドの特徴量との相関マップを示す。なお、式(1)において、添字「m」は各画像の水平方向のグリッドの位置を示し、添え字「n」は各グリッドにおける特徴量の番号を示す。すなわち、mは1~40であり、nは1~256である。
 次に、推定部152は、算出された相関マップを用いて、行列(1)に示すような左画像P1Lに対する右画像P1RのマッチングマップMLを算出する。左画像P1Lに対する右画像P1RのマッチングマップMLは、例えば、相関マップの行方向に対してSoftmax関数を適用することにより算出される。これにより、水平方向の相関の値を正規化している。つまり、行方向の値をすべて合計すると1になるよう変換している。
Figure JPOXMLDOC01-appb-M000002
 次に、推定部152は、算出されたマッチングマップMLに、例えば、式(2)により、右画像P1Rから抽出された特徴量を畳み込む。式(2)の左辺第1項は、行列(1)を転置したものであり、左辺第2項は、式(1)の左辺第2項の行列である。なお、本発明では、相関を取るための特徴量と、マッチングマップに畳み込むための特徴量とは同じものを用いているが、抽出された特徴量から畳み込みニューラルネットワーク等によって、新たに相関を取るための特徴量と畳み込むための特徴量を別々に生成しても良い。
 次に、推定部152は式(2)で得られた特徴量を左画像P1Lから抽出された特徴量に連結させて、例え畳み込みニューラルネットワークによって新たな特徴量を生成する。このように、左右の画像の特徴量を統合することにより、位置、姿勢の推定精度が向上する。なお、図12における処理mは複数回繰り返しても良い。
Figure JPOXMLDOC01-appb-M000003
 次に、推定部152はここで得られた特徴量から、例えば畳み込みニューラルネットワークによって位置、姿勢およびクラス分類を推定する。あわせて、推定部152は、算出された相関マップを用いて、行列(2)に示すような右画像P1Rに対する左画像P1LのマッチングマップMRを算出する(ステップS202)。右画像P1Rに対する左画像P1LのマッチングマップMRも、左画像P1Lに対する右画像P1RのマッチングマップMLと同様に、例えば、相関マップの行方向に対してSoftmax関数を適用することにより算出される。
Figure JPOXMLDOC01-appb-M000004
 次に、推定部152は、算出されたマッチングマップに、例えば、式(3)により、左画像P1Lの特徴量を畳み込む。式(3)の左辺第1項は、行列(2)であり、左辺第2項は、式(1)の左辺第2項の行列の転置前のものである。
Figure JPOXMLDOC01-appb-M000005
 次に推定部152は、あらかじめ設定しておいた閾値と、左画像P1Lから推定したターゲット(対象物)のクラス分類の推定結果が一番大きいグリッドを選択して比較する(ステップS203)。閾値をこえていなかった場合は、ターゲットが無いとして終了する。閾値をこえていた場合は、そのグリッドに対する右画像P1RとのマッチングマップMLから、一番大きい値のグリッドを選択する(ステップS204)。
 次に、選択したグリッドにおいて、右画像P1Rのターゲットのクラス分類の推定結果とあらかじめ設定しておいた閾値とを比較する(ステップS208)。閾値をこえていた場合は、そのグリッドに対する左画像P1LとのマッチングマップMLから一番大きい値のグリッドを選択する(ステップS209)。閾値を超えていない場合は、左画像P1Lの推定結果から選択したグリッドのクラス分類スコアを0にしてステップS203へ戻る(ステップS207)。
 次に、ステップS209にて選択したマッチングマップMLのグリッドと、ステップS204にて左画像P1Lの推定結果から選択したグリッドが等しいかを比較する(ステップS210)。グリッドが異なる場合は、ステップS204にて左画像P1Lの推定結果から選択したグリッドのクラス分類スコアを0にして、ステップS203のグリッドの選択に戻る(ステップS207)。最終的に、左画像P1Lおよび右画像P1Rで選択したグリッドの位置情報(例えば、図1における水平方向xの値)の検出結果から視差を算出する(ステップS211)。
 次に、ステップS211から算出した視差をもとに、ターゲットの深度を算出する(ステップS212)。なお、複数のターゲットに対して深度を算出する場合は、ステップS211の後、左画像P1Lおよび右画像P1Rの推定結果から選択したグリッドのクラス分類スコアを0にしてからステップS203に戻り、以後、ステップS212までを繰り返せば良い。
 以上述べたように、画像処理装置10は、取得部と、推定部と、を備える。取得部は、バラ積みされたワークを撮影した第1の画像および第2の画像を取得する。推定部は、第1の画像の特徴量と、第2の画像の特徴量とのマッチングマップを生成し、第1の画像と第2の画像それぞれに対してターゲットとなる各ワークの位置と姿勢とクラス分類スコアを推定し、前記アテンションマップを用いたマッチング結果と位置の推定結果に基づいて、ワーク位置を推定することにより、ステレオカメラからワークまでの深度を算出する。これにより、物体認識における誤検出を抑制できる。
(画像処理の変形例)
 以上、物体把持システム1について説明したが、上記の説明内容に限定されるものではなく、その趣旨を逸脱しない限りにおいて種々の変更が可能である。例えば、対象物(ワーク)が1種類である場合について説明したが、これに限られず、画像処理装置10が、複数のワークの種類を検出するような構成であってもよい。また、画像処理装置10は、対象物を検出するだけでなく、対象物が配置されたトレイ等の位置や姿勢をさらに検出してもよい。図13は、変形例に係るトレイを含むバラ積み画像の一例を示す図である。図13に示す例において、画像処理装置10は、対象物が配置されたトレイの位置および姿勢を特定することにより、ロボットアーム30がトレイに衝突しないような軌道を設定することができる。なお、検出する対象であるトレイは、障害物の一例である。画像処理装置10は、トレイ以外のその他の障害物となるものを検出するような構成であってもよい。
 また、画像処理装置10が、例えばバラ積み画像を40×40のグリッドに区分する例について説明したが、これに限られず、より細かな、あるいは、より粗いグリッドに区分して対象物を検出してもよく、また画素単位で推定処理を行ってもよい。これにより、画像処理装置10は、より精度よくカメラと対象物との距離を算出することができる。図14は、変形例に係る位置ずれ推定モデルの一例を示す図である。図14に示すように、画像処理装置10は、左画像P1Lと右画像P1Rのうち、推定位置周辺のグリッドよりもサイズが小さい部分を切り出して結合してもよい。そして、前述した推定処理と同様に推定処理を行い、処理結果に基づいて位置ずれを推定してもよい。
 また、細かな、あるいは、粗いグリッド単位や画素単位で推定処理を行う場合に、前述したのと同様に、左画像P1Lと右画像P1Rとで、それぞれ個別に推定処理を行ってもよい。図15は、変形例に係る位置ずれ推定モデルの別の一例を示す図である。図15に示す例では、画像処理装置10は、左画像P1Lと右画像P1Rとに対し、それぞれ別々に推定処理を行う。この場合においても、画像処理装置10は、前述したのと同様に、それぞれの推定処理を行う際に、左画像P1Lに対する重み付けを、右画像P1Rに対する重み付けと共有してもよい。
 また、以上述べた推定処理を、バラ積みされたワーク41、42の画像に対してではなく、ロボットアーム30や、ロボットアーム30に保持されたワーク41、42、または整列先に整列されたワーク41、42に対して行ってもよい。
(第1の実施形態に係る対象物3次元データの取得および学習)
 図16は、第1の実施形態に係る対象物3次元データの取得(測定)および学習のためのシステムの構成の一例を示すブロック図である。図16において、処理装置110と3次元データ測定装置140とは、ネットワークNWを通じて通信可能に接続されている。また、処理装置110は、通信I/F(インターフェース)111と、入力I/F112と、ディスプレイ113と、記憶回路114と、処理回路115とを備える。
 3次元データ測定装置140は、プロジェクタ120およびカメラ130と接続されている。3次元データ測定装置140は、通信I/F141と、入力I/F142と、ディスプレイ143と、記憶回路144と、処理回路145とを備える。
 プロジェクタ120は、可視光よりも波長の短い光(例えば、UV(紫外線)光)による所定のパターンの照射(投影)が可能であるとともに、可視光による照明が可能となっている。可視光による照明は、カメラ130がカラーカメラである場合には白色光による照明が行われ、カメラ130がモノクロカメラである場合は赤色光、青色光および緑色光のそれぞれによる照明が行われる。プロジェクタ120とは別に、可視光の照明装置が設けられるのでもよい。カメラ130は、可視光を撮影可能なカラーカメラまたはモノクロカメラである。
 処理装置110において、通信I/F111は、ネットワークNWを通じた外部装置とのデータ入出力の通信を制御する。例えば、通信I/F111は、ネットワークカードやネットワークアダプタ、NIC(Network Interface Controller)等によって実現される。
 入力I/F112は、処理回路115に接続され、処理装置110の管理者(不図示)から受け付けた入力操作を電気信号に変換して処理回路115に出力する。例えば、入力I/F112は、スイッチボタン、マウス、キーボード、タッチパネル等である。
 ディスプレイ113は、処理回路115に接続され、処理回路115から出力される各種情報および各種画像データを表示する。例えば、ディスプレイ113は、液晶モニタやCRT(Cathode Ray Tube)モニタ、タッチパネル等によって実現される。
 記憶回路114は、例えば、メモリ等の記憶装置により実現される。記憶回路114には、処理回路115により実行される各種のプログラムが記憶されている。また、記憶回路114には、処理回路115により各種のプログラムが実行される際に用いられる各種のデータが一時的に記憶される。記憶回路114は、対象物3次元データ1141と機械(深層)学習モデル1142とを有する。対象物3次元データ1141は、各種の対象物についての、3次元形状データとテクスチャデータとを含む。ここで言うテクスチャデータとは、RGB(Red,Green,Blue)の色データや、質感を表すメタル(反射)、ラフネス(表面粗さ)、透明度などである。また、取得対象となるテクスチャデータとしては、RGBの色データのみでもよいし、色と質感に関するデータのいずれかまたは両者を含むものでもよい。
 さらに、機械(深層)学習モデル1142はニューラルネットワーク構造1142aと学習パラメータ1142bを備えている。ニューラルネットワーク構造1142aは、例えば、図5の畳み込みニューラルネットワークb1のような公知のネットワークを応用したもので、図12に示されるネットワーク構造である。学習パラメータ1142bは、例えば、畳み込みニューラルネットワークの畳み込みフィルタの重みであり、対象物の位置および姿勢を推定するために学習され、最適化されるパラメータである。
 機械(深層)学習モデル1142は、物体把持システム1(図1、図2)において、カメラ20(図1、図2)から出力された画像から、ワークの位置および姿勢を推定する処理に用いられる。機械(深層)学習モデル1142は、例えば、複数のワークの位置および姿勢と、当該複数のワークを撮影した画像とを教師データして学習することにより生成される。なお、ここでは、機械(深層)学習モデル1142が、例えば、処理回路115により生成されるが、これに限られず、外部のコンピュータにより生成されてもよい。
 処理回路115は、CPU(Central Processing Unit)等のプロセッサにより実現される。処理回路115は、処理装置110全体を制御する。処理回路115は、記憶回路114に記憶された各種のプログラムを読み取り、読み取ったプログラムを実行することで、各種の処理を実行する。例えば、処理回路115は、学習部1151と、データ出力部1152とを有することとなる。
 学習部1151は、対象物3次元データ1141(新たに3次元データ測定装置140により測定されて蓄積されたものと、過去に蓄積されたものとの両者を含む)に基づき、画像生成ソフトウェアによりバラ積みされたワークの画像を生成して機械学習の学習データを作成し、学習データに基づいて機械(深層)学習モデル1142の機械学習を行い、学習パラメータ1142bの更新を行う。
 データ出力部1152は、操作者の指示または外部からの要求に応じ、記憶回路114に記憶された対象物3次元データ1141や機械(深層)学習モデル1142のデータを出力する。
 3次元データ測定装置140において、通信I/F141は、ネットワークNWを通じた外部装置とのデータ入出力の通信を制御する。例えば、通信I/F141は、ネットワークカードやネットワークアダプタ、NIC等によって実現される。また、通信I/F141は、HDMI(登録商標)(High-Definition Multimedia Interface)等の規格に従ってプロジェクタ120に出力する制御信号を送信し、プロジェクタ120から状態信号を受信する。また、通信I/F141は、カメラ130に制御信号を送信し、カメラ130から出力される画像のデータを受信する。
 入力I/F142は、処理回路145に接続され、3次元データ測定装置140の管理者(不図示)から受け付けた入力操作を電気信号に変換して処理回路145に出力する。例えば、入力I/F142は、スイッチボタン、マウス、キーボード、タッチパネル等である。
 ディスプレイ143は、処理回路145に接続され、処理回路145から出力される各種情報および各種画像データを表示する。例えば、ディスプレイ143は、液晶モニタやCRTモニタ、タッチパネル等によって実現される。
 記憶回路144は、例えば、メモリ等の記憶装置により実現される。記憶回路144には、処理回路145により実行される各種のプログラムが記憶されている。また、記憶回路144には、処理回路145により各種のプログラムが実行される際に用いられる各種のデータが一時的に記憶される。記憶回路144は、対象物3次元データ1441を有する。対象物3次元データ1441は、処理装置110の記憶回路114に記憶される対象物3次元データ1141の一部についての元データであり、通信I/F141、ネットワークNW、処理装置110の通信I/F111を介して記憶回路114に蓄積される。
 3次元データ測定装置140の処理回路145は、CPU等のプロセッサにより実現される。処理回路145は、3次元データ測定装置140全体を制御する。処理回路145は、記憶回路144に記憶された各種のプログラムを読み取り、読み取ったプログラムを実行することで、各種の処理を実行する。例えば、処理回路145は、対象物3次元データ測定部1451を有することとなる。
 対象物3次元データ測定部1451は、通信I/F141を通じて、プロジェクタ120およびカメラ130を制御し、カメラ130により撮影された対象物の画像から3次元形状とテクスチャとを計測し、3次元形状データとテクスチャデータとを含む対象物3次元データを取得する。対象物の3次元形状の測定は、例えば、公知の格子法等により、対象物への所定のパターンの照射および撮影により得られた画像に基づいて行われる。対象物の3次元形状の測定は、対象物の姿勢を変更しながら行われる。
 図17は、第1の実施形態に係る対象物3次元データの取得の処理の一例を示すフローチャートであり、撮影がカラーのカメラ130により行われる場合の処理例である。処理に際しての事前の準備として、対象物に所定の塗料を塗布しておく。所定の塗料としては、可視光よりも波長の短い光(例えば、UV(紫外線)光)の照射を受けると第1の可視光による発光を行い、可視光に対しては無色透明となる蛍光塗料である。これは、インビジブル塗料と呼ぶこともできる。なお、以下では可視光よりも波長の短い光をUV光として説明するが、それに限られない。例えば、2光子励起により可視光よりも波長の短い光を発生させることができ、それをパターン光の照射に用いることができる。
 図17において、3次元データ測定装置140は、処理を開始すると、プロジェクタ120により対象物に向けてUVパターンを照射する。そして、プロジェクタ120と所定の位置関係にあるカメラ130により対象物の撮影を行い、撮影された画像に基づいて対象物の3次元形状を算出し、記憶回路に記憶する(ステップS11)。図18は、第1の実施形態に係る対象物Wにプロジェクタ120からUVパターンが照射された状態の例を示す図であり、プロジェクタ120からのUV光の照射により対象物Wがインビジブル塗料により所定のパターンで発光し、その状態がカメラ130により撮影される。第1の可視光での発光はインビジブル塗料によるものであるため、対象物Wが光沢物であったり黒色物体であったりしても問題はない。
 図17に戻り、対象物の3次元形状の算出(ステップS11)は、2つ目以降のUVパターンの照射が行われた後は、以前のUVパターン下で撮影された画像も考慮して行われる。これにより、3次元形状の測定の精度が高められる。また、UVパターンの照射時に撮影だけが行われ、全てのUVパターンについて撮影が完了した後に、撮影された全ての画像に基づいて対象物の3次元形状の算出が行われるようにしてもよい。また、UVパターンの照射および撮影の際にはそのUVパターン下で撮影された画像についてだけの処理が行われ、全てのUVパターンについて撮影が完了した後に、全画像を考慮した算出が行われるようにしてもよい。
 次いで、3次元データ測定装置140は、所定のUVパターンについて処理が完了したか否か判断し(ステップS12)、完了していないと判断した場合(ステップS12のNo)は、別のUVパターンの照射等(ステップS11)から繰り返す。所定のUVパターンについて処理が完了したと判断した場合(ステップS12のYes)は、次の処理に移行する。
 3次元データ測定装置140は、次の処理として、プロジェクタ120または外部光源により対象物に向けて白色光を照射し、カメラ130により撮影を行い、撮影された画像に基づいてテクスチャを取得して記憶回路に記憶する(ステップS13)。図19は、第1の実施形態に係る対象物Wに可視光が照射された状態の例を示す図であり、プロジェクタ120からの白色光の照射により対象物Wのインビジブル塗料は無色透明となり、対象物W本来のテクスチャが表れており、その状態がカメラ130により撮影される。
 また、UVパターンの照射による撮影から対象物は移動していないと推定できるため、UVパターン下で撮影された画像から取得された対象物の3次元形状とテクスチャとのマッチングは容易に行うことができる。
 次いで、図17に戻り、3次元データ測定装置140は、姿勢変更後の2回目以降の処理において、点群データマッチングを行い、データ更新を行う(ステップS14)。すなわち、3次元データ測定装置140は、以前の処理で取得された対象物の3次元形状のデータと今回の処理で取得された対象物の3次元形状のデータとから、同一の部分と判断できる部分に基づいてデータを連結し、対象物の3次元形状のデータを更新していく。これにより、一方の側からの撮影だけでは捉えられない対象物の3次元形状を取得することができる。
 次いで、3次元データ測定装置140は、対象物の全ての外観をカバーする所定の姿勢について処理が完了したか否か判断し(ステップS15)、完了していないと判断した場合(ステップS15のNo)は、対象物の姿勢変更を行い(ステップS16)、UVパターンの照射等(ステップS11)から繰り返す。対象物の姿勢変更は操作者の手動によるものであってもよいし、駆動機構によるものであってもよい。3次元データ測定装置140は、所定の姿勢について処理が完了したと判断した場合(ステップS15のYes)は、処理を終了する。
 図20は、第1の実施形態に係る対象物3次元データの取得の処理の別の一例を示すフローチャートであり、撮影がモノクロのカメラ130により行われる場合の処理例である。処理に際しての事前の準備は前述したものと同様である。
 図20において、3次元データ測定装置140は、処理を開始すると、プロジェクタ120により対象物に向けてUVパターンを照射する。そして、プロジェクタ120と所定の位置関係にあるカメラ130により対象物の撮影を行い、撮影された画像に基づいて対象物の3次元形状を算出し、記憶回路に記憶する(ステップS21)。対象物の3次元形状の算出は、2つ目以降のUVパターンの照射が行われた後は、以前のUVパターン下で撮影された画像も考慮して行われる。なお、UVパターンの照射時に撮影だけが行われ、全てのUVパターンについて撮影が完了した後に、撮影された全ての画像に基づいて対象物の3次元形状の算出が行われるようにしてもよい。また、UVパターンの照射および撮影の際にはそのUVパターン下で撮影された画像についてだけの処理が行われ、全てのUVパターンについて撮影が完了した後に、全画像を考慮した算出が行われるようにしてもよい。
 次いで、3次元データ測定装置140は、所定のUVパターンについて処理が完了したか否か判断し(ステップS22)、完了していないと判断した場合(ステップS22のNo)は、別のUVパターンの照射等(ステップS21)から繰り返す。所定のUVパターンについて処理が完了したと判断した場合(ステップS22のYes)は、次の処理に移行する。
 3次元データ測定装置140は、次の処理として、プロジェクタ120または外部光源により対象物に向けて赤色光を照射し、カメラ130により撮影を行い、撮影された画像に基づいてテクスチャの赤色成分を取得して記憶回路に記憶する(ステップS23)。UVパターンの照射による撮影から対象物は移動していないと推定できるため、UVパターン下で撮影された画像から取得された対象物の3次元形状とテクスチャとのマッチングは容易に行うことができる。
 次いで、3次元データ測定装置140は、プロジェクタ120または外部光源により対象物に向けて青色光を照射し、カメラ130により撮影を行い、撮影された画像に基づいてテクスチャの青色成分を取得して記憶回路に記憶する(ステップS24)。
 次いで、3次元データ測定装置140は、プロジェクタ120または外部光源により対象物に向けて緑色光を照射し、カメラ130により撮影を行い、撮影された画像に基づいてテクスチャの緑色成分を取得して記憶回路に記憶する(ステップS25)。
 次いで、3次元データ測定装置140は、姿勢変更後の2回目以降の処理において、点群データマッチングを行い、データ更新を行う(ステップS26)。すなわち、3次元データ測定装置140は、以前の処理で取得された対象物の3次元形状のデータと今回の処理で取得された対象物の3次元形状のデータとから、同一の部分と判断できる部分に基づいてデータを連結し、対象物の3次元形状のデータを更新していく。
 次いで、3次元データ測定装置140は、対象物の全ての外観をカバーする所定の姿勢について処理が完了したか否か判断し(ステップS27)、完了していないと判断した場合(ステップS27のNo)は、対象物の姿勢変更を行い(ステップS28)、UVパターンの照射等(ステップS21)から繰り返す。対象物の姿勢変更は操作者の手動によるものであってもよいし、駆動機構によるものであってもよい。3次元データ測定装置140は、所定の姿勢について処理が完了したと判断した場合(ステップS27のYes)は、処理を終了する。
 図21は、第1の実施形態に係る学習データの生成および学習処理の一例を示すフローチャートである。以下では、図16に示された処理装置110により学習モデルが生成および更新される場合について説明するが、これに限られず、図示しない他のコンピュータにより行われるものでもよい。
 図21に示すように、処理装置110は、対象物3次元データ1141から所望の対象物の3次元データを取得する(ステップS101)。図22は、第1の実施形態に係る対象物の3次元データの一例を示す図である。3次元データを取得することにより、仮想空間上において、ワークの姿勢を任意に変更して配置させることができる。
 次に、図21に戻り、処理装置110は、仮想空間上に、対象物を配置する際の各種条件を設定する(ステップS102)。仮想空間への対象物の配置は、例えば公知の画像生成ソフトウェア等を用いて行うことができる。配置する対象物の数や位置、姿勢などの条件は、画像生成ソフトウェアがランダムに対象物を生成するように設定することも可能だが、これに限らず、処理装置110の管理者が任意に設定してもよい。
 次に、処理装置110は、設定された条件に従い、仮想空間上に対象物を配置する(ステップS103)。次に、処理装置110は、例えば、複数の対象物が配置された仮想空間をキャプチャすることにより、配置された対象物の画像、位置および姿勢を取得する(ステップS104)。ここでは、対象物の位置および姿勢は、例えば3次元座標(x,y,z)により示され、対象物の姿勢は、物体の姿勢または回転状態を表す四元数であるクオタニオン(qx,qy,qz,qw)により示される。
 図23は、第1の実施形態に係る複数の対象物が配置された仮想空間のキャプチャ画像の一例を示す図である。図23に示すように、仮想空間上には、複数の対象物W1aおよびW1bが、それぞれランダムな位置および姿勢にて配置される。また、以下において、ランダムに配置された対象物の画像を、「バラ積み画像」と表記する場合がある。次に、処理装置110は、取得された画像と、配置された対象物の位置および姿勢を記憶回路14に保存する(ステップS105)。さらに、処理装置110は、ステップS102からステップS105をあらかじめ定められた回数繰り返す(ステップS106)。なお、ここで記憶回路114に保存される、上記ステップによって取得された画像と対象物が配置された位置および姿勢との組み合わせを「教師データ」と表記する場合がある。ステップS102からステップS105までの処理を所定の回数繰り返すことにより、学習処理を繰り返し行うために十分な数の教師データが生成される。
 そして、処理装置110は、生成された教師データを用いて所定の回数学習処理を行うことにより、ニューラルネットワーク構造1142aにおいて重み付けとして用いられる学習パラメータ1142bを生成し、または更新する(ステップS107)。このように、3次元データが取得された対象物を仮想空間上に配置することにより、学習処理に用いられる、対象物の画像と、位置および姿勢の組み合わせとを含む教師データを、容易に生成することができる。
 以上のように、第1の実施形態に係る対象物3次元データ測定方法は、可視光よりも波長の短い光の照射を受けると第1の可視光による発光を行い、可視光に対しては無色透明の塗料が塗布された第1の対象物に対し、所定のパターンによる可視光よりも波長の短い光の照射を行って、第1の対象物を撮影し、撮影された画像から第1の対象物の3次元形状を測定する第1の工程を備える。これにより、実際の対象物から3次元形状を容易に測定することができる。
 また、対象物3次元データ測定方法は、第1の対象物に対し、可視光の照射を行って、第1の対象物を撮影し、撮影された画像から第1の対象物のテクスチャを測定する第2の工程をさらに備えてもよい。これにより、実際の対象物から3次元形状とテクスチャとを含む対象物3次元データを容易に測定することができる。
 また、第1の工程では、第1の対象物の一つの姿勢に対して所定のパターンを複数切り替えて第1の対象物の3次元形状を測定する。これにより、3次元形状の測定の精度を高めることができる。
 また、第1の対象物の姿勢を変更し、第1の工程による第1の対象物の3次元形状の測定と第2の工程による第1の対象物のテクスチャの測定とを繰り返し、点群データマッチングによりデータを連結して更新する。これにより、一方の側からの撮影だけでは捉えられない対象物の3次元形状を取得することができる。
 また、第2の工程では、撮影をカラーカメラで行う場合は白色光の照射と撮影とを行い、撮影をモノクロカメラで行う場合は赤色光、青色光および緑色光のそれぞれの照射と撮影とを行う。これにより、カラーカメラとモノクロカメラとに柔軟に対応することができる。
 また、第1の実施形態に係る対象物3次元データ測定装置は、可視光よりも波長の短い光の照射を受けると第1の可視光による発光を行い、可視光に対しては無色透明の塗料が塗布された第1の対象物に対し、所定のパターンによる可視光よりも波長の短い光の照射を行って、第1の対象物を撮影し、撮影された画像から第1の対象物の3次元形状を測定する第1の処理を処理回路が実行する。これにより、上記の対象物3次元データ測定方法を装置として実現することができる。
 また、第1の実施形態に係る学習データ生成方法は、上記の対象物3次元データ測定方法により得られた対象物3次元データに基づき、画像生成ソフトウェアによりバラ積みされたワークの画像を生成し、機械学習の学習データとする。これにより、学習データの準備に要するコストを低減させることができる。
 また、第1の実施形態に係る学習データ生成装置は、上記の対象物3次元データ測定方法により得られた対象物3次元データに基づき、画像生成ソフトウェアによりバラ積みされたワークの画像を生成し、機械学習の学習データとする処理を処理回路が実行する。これにより、上記の学習データ生成方法を装置として実現することができる。
(第2の実施形態)
 また、実施形態に係る対象物3次元データ測定方法は、複数の対象物に対しても実行することができる。以下、複数の対象物を含む対象群の3次元データを取得する構成、および取得したデータを用いて対象群の3次元データを生成する構成について説明する。図24は、第2の実施形態に係る対象群3次元データの取得(測定)および対象群の3次元モデル生成のためのシステムの構成の一例を示すブロック図である。図24において、処理装置110と3次元データ測定装置140とは、ネットワークNWを通じて通信可能に接続されている。また、処理装置110は、通信I/F(インターフェース)111と、入力I/F112と、ディスプレイ113と、記憶回路114と、処理回路115とを備える。
 3次元データ測定装置140は、プロジェクタ120、ステレオカメラ131および132、並びに3Dスキャナ用カメラ150と接続されている。3次元データ測定装置140は、通信I/F146と、入力I/F142と、ディスプレイ143と、記憶回路144と、処理回路145とを備える。なお、以下において、ステレオカメラ131および132を区別せずに表現する場合に、単にカメラ130と表記する場合がある。
 プロジェクタ120は、可視光よりも波長の短い光(例えば、UV(紫外線)光)による所定のパターンの照射(投影)が可能であるとともに、可視光による照明が可能となっている。可視光による照明は、白色光による照明で行っても良いし、赤色光、青色光、及び緑色光のそれぞれによる照明や、想定される室内灯の色味に合わせた照明でもよい。プロジェクタ120とは別に、可視光の照明装置が設けられるのでもよい。カメラ130は、可視光を撮影可能なカラーカメラまたはモノクロカメラである。
 ステレオカメラ131、132は、可視光を撮影可能なカラーカメラまたはモノクロカメラである。3Dスキャナ用カメラ150により、対象群との間の距離情報を取得する。3Dスキャナ用カメラ150は、プロジェクタ120により、可視光よりも波長の短い光の照射を受けた対象群を撮像するカラーカメラである。なお、3Dスキャナ用カメラ150が、ステレオカメラ130の一部を構成してもよく、またカメラ131および132のうち少なくともいずれかが、可視光よりも波長の短い光の照射を受けた対象群を撮像するような構成であってもよい。
 第2の実施形態において、3Dスキャナ用カメラ150は、プロジェクタ120により可視光よりも波長の短い光を照射された複数の対象物(ワーク)を含む対象群を撮像する。同様に、ステレオカメラ131および132は、プロジェクタ120により可視光を照射された対象群を撮像する。図25は、第2の実施形態に係る測定処理の一例を示す図である。図25に示すように、ステレオカメラ131および132は、複数の対象物W1およびW2を含む対象群を撮影する。同様に、3Dスキャナ用カメラ150は、複数の対象物W1およびW2を撮像することにより、各対象物W1およびW2までの距離を示す点群データを取得する。
 処理装置110において、通信I/F111は、ネットワークNWを通じた外部装置とのデータ入出力の通信を制御する。例えば、通信I/F111は、ネットワークカードやネットワークアダプタ、NIC(Network Interface Controller)等によって実現される。
 入力I/F112は、処理回路115に接続され、処理装置110の管理者(不図示)から受け付けた入力操作を電気信号に変換して処理回路115に出力する。例えば、入力I/F112は、スイッチボタン、マウス、キーボード、タッチパネル等である。
 ディスプレイ113は、処理回路115に接続され、処理回路115から出力される各種情報および各種画像データを表示する。例えば、ディスプレイ113は、液晶モニタやCRT(Cathode Ray Tube)モニタ、タッチパネル等によって実現される。
 記憶回路114は、例えば、メモリ等の記憶装置により実現される。記憶回路114には、処理回路115により実行される各種のプログラムが記憶されている。また、記憶回路114には、処理回路115により各種のプログラムが実行される際に用いられる各種のデータが一時的に記憶される。記憶回路114は、対象群の画像・位置・姿勢データ1141と機械(深層)学習モデル1142とを有する。
 さらに、機械(深層)学習モデル1142はニューラルネットワーク構造1142aと学習パラメータ1142bを備えている。ニューラルネットワーク構造1142aは、例えば、図5の畳み込みニューラルネットワークb1のような公知のネットワークを応用したもので、図12に示されるネットワーク構造である。学習パラメータ1142bは、例えば、畳み込みニューラルネットワークの畳み込みフィルタの重みであり、対象群に含まれる各対象物の位置および姿勢を推定するために学習され、最適化されるパラメータである。
 機械(深層)学習モデル1142は、物体把持システム1(図1、図2)において、カメラ20(図1、図2)から出力された画像から、ワークの位置および姿勢を推定する処理に用いられる。機械(深層)学習モデル1142は、例えば、複数のワークの位置および姿勢と、当該複数のワークを撮影した画像とを教師データして学習することにより生成される。なお、ここでは、機械(深層)学習モデル1142が、例えば、処理回路115により生成されるが、これに限られず、外部のコンピュータにより生成されてもよい。
 処理回路115は、CPU(Central Processing Unit)等のプロセッサにより実現される。処理回路115は、処理装置110全体を制御する。処理回路115は、記憶回路114に記憶された各種のプログラムを読み取り、読み取ったプログラムを実行することで、各種の処理を実行する。例えば、処理回路115は、学習部1151と、データ出力部1152とを有することとなる。
 学習部1151は、対象群の画像・位置・姿勢データ1141(新たに3次元データ測定装置140により測定されて蓄積されたものと、過去に蓄積されたものとの両者を含む)に基づいて、機械(深層)学習モデル1142の機械学習を行い、学習パラメータ1142bの更新を行う。
 データ出力部1152は、操作者の指示または外部からの要求に応じ、記憶回路114に記憶された対象群の画像・位置・姿勢データ1141や機械(深層)学習モデル1142のデータを出力する。
 3次元データ測定装置140において、通信I/F146は、ネットワークNWを通じた外部装置とのデータ入出力の通信を制御する。例えば、通信I/F146は、ネットワークカードやネットワークアダプタ、NIC等によって実現される。また、通信I/F146は、HDMI(登録商標)(High-Definition Multimedia Interface)等の規格に従ってプロジェクタ120に出力する制御信号を送信し、プロジェクタ120から状態信号を受信する。また、通信I/F146は、カメラ130に制御信号を送信し、カメラ130から出力される画像のデータを受信する。
 入力I/F142は、処理回路145に接続され、3次元データ測定装置140の管理者(不図示)から受け付けた入力操作を電気信号に変換して処理回路145に出力する。例えば、入力I/F142は、スイッチボタン、マウス、キーボード、タッチパネル等である。
 ディスプレイ143は、処理回路145に接続され、処理回路145から出力される各種情報および各種画像データを表示する。例えば、ディスプレイ143は、液晶モニタやCRTモニタ、タッチパネル等によって実現される。
 記憶回路144は、例えば、メモリ等の記憶装置により実現される。記憶回路144には、処理回路145により実行される各種のプログラムが記憶されている。また、記憶回路144には、処理回路145により各種のプログラムが実行される際に用いられる各種のデータが一時的に記憶される。記憶回路144は、対象群3次元データ1441、対象群の画像・位置・姿勢データ1442を有する。対象群の画像・位置・姿勢データ1442は、処理装置110の記憶回路114に記憶される対象群の画像・位置・姿勢データ1141の一部についての元データであり、通信I/F146、ネットワークNW、処理装置110の通信I/F111を介して記憶回路114に蓄積される。
 なお、第2の実施形態において、対象群に含まれる個別の対象物の3次元データは、例えば既に記憶回路144に格納されていてもよい。図26は、第2の実施形態に係る対象物の3次元データの一例を示す図である。この場合、対象群3次元データ測定部1451は、例えば、カメラ130又は3Dスキャナ用カメラ150により撮影された画像と、図26に示す、既に記憶回路144に格納された対象物3次元モデルMとをマッチングさせることにより、対象群に含まれる各対象物W1およびW2を検出してもよい。
 3次元データ測定装置140の処理回路145は、CPU等のプロセッサにより実現される。処理回路145は、3次元データ測定装置140全体を制御する。処理回路145は、記憶回路144に記憶された各種のプログラムを読み取り、読み取ったプログラムを実行することで、各種の処理を実行する。例えば、処理回路145は、対象群3次元データ測定部1451を有することとなる。
 対象群3次元データ測定部1451は、通信I/F146を通じて、プロジェクタ120およびカメラ130を制御し、カメラ130により撮影された対象群の画像を撮影し、3Dスキャナ用カメラ150により取得された対象群の画像から各対象群の3次元形状を示す点群データを取得する。対象群に含まれる各対象物の3次元形状の測定は、例えば、公知の格子法等により、各対象物への所定のパターンの照射および撮影により得られた画像に基づいて行われる。各対象物の3次元形状の測定は、各対象物の撮影方向を変更しながら行われる。このように、カメラ130及び3Dスキャナ用カメラ150による撮影方向を変更することにより、各対象物がバラ積みされているために、ある角度からは見えない部分があったとしても、他の角度から撮影することで対象物のデータを広範囲で取得しやすくなり、後述する点群データと3次元データとのマッチングの際の精度を向上することができる。その際、3Dスキャナ用カメラ150は、以下に示す可視光の違いに基づいて、対象群に含まれる各対象物を判別する。
 処理に際しての事前の準備として、各ステレオカメラ131および132、並びに3Dスキャナ用カメラ150のキャリブレーション(較正)を行うとともに、各対象物に所定の塗料を塗布しておく。所定の塗料としては、可視光よりも波長の短い光(例えば、UV(紫外線)光)の照射を受けると可視光による発光を行い、可視光に対しては無色透明となる蛍光塗料である。これは、インビジブル塗料と呼ぶこともできる。なお、第2の実施形態において、各対象物には、それぞれ異なる可視光による発光を行うインビジブル塗料が塗布される。例えば、対象物W1には、第1の可視光による発光を行う第1のインビジブル塗料が塗布されるとともに、対象物W2には、第2の可視光による発光を行う第2のインビジブル塗料が塗布される。また、以下では可視光よりも波長の短い光をUV光として説明するが、それに限られない。例えば、2光子励起により可視光よりも波長の短い光と同じように蛍光塗料を励起することができ、それをパターン光の照射に用いることができる。
 図27は、第2の実施形態に係る事前処理の一例を示すフローチャートである。図27に示すように、3次元データ測定装置140の対象群3次元データ測定部1451は、ステレオカメラ131および132のキャリブレーション(較正)処理を行う(ステップS201)。なお、以下において、ステレオカメラを構成するカメラ131および132を、ステレオセットと表記する場合がある。図28は、第2の実施形態に係るキャリブレーション処理の一例を示す図である。図28に示すように、ステレオセットのキャリブレーション処理は、例えば、ステレオカメラ131および132が、可視光下において公知のキャリブレーションボードCBを撮影することにより行われる。キャリブレーション処理は、一般的に知られた公知の手法により実行される。
 次に、対象群3次元データ測定部1451は、可視光よりも波長の短い光を照射するプロジェクタ120と、点群データを取得する3Dスキャナ用カメラ150とのキャリブレーション処理を行う(ステップS202)。なお、以下において、プロジェクタ120と、3Dスキャナ用カメラ150との組み合わせを、3Dスキャンセットと表記する場合がある。さらに、対象群3次元データ測定部1451は、ステレオセットと3Dスキャンセットとの間でも、キャリブレーション処理を行う(ステップS203)。なお、ステップS202およびS203における3Dスキャンセットのキャリブレーション処理および3Dスキャンセットとステレオセットとの間のキャリブレーション処理も、可視光で行っても良いし、蛍光塗料で印刷されたキャリブレーションボードを用いて、可視光よりも短い光で行っても良い。
 次に、測定対象となる対象群に含まれる個別の対象物にインビジブル塗料が塗布される(ステップS211)。第2の実施形態において、対象群に含まれる各対象物には、それぞれ異なる可視光による発光を行うインビジブル塗料が塗布される。インビジブル塗料が塗布された各対象物は、3次元データ測定を行う位置に配置される(ステップS212)。ステップS211およびS212の処理は、対象群に含まれる全ての対象物が配置されるまで繰り返される(ステップS213)。図29は、第2の実施形態に係る塗料が塗布された複数の対象物の一例を示す図である。図29に示すように、対象群に含まれる複数の対象物(ワーク)W1とW2とには、それぞれ異なるインビジブル塗料が塗布される。第2の実施形態において、対象物W1およびW2は、例えば図26に示すように、ステレオカメラ131および132から撮影すると相互に重複して見える位置など、任意の位置に配置される。
 事前処理の後に、3次元データ測定装置140の対象群3次元データ測定部1451は、配置された対象群の3次元データを取得するための処理を行う。図30は、第2の実施形態に係る対象群3次元データの取得の処理の一例を示すフローチャートであり、撮影がカラーのカメラ150により行われる場合の処理例である。
 図30において、3次元データ測定装置140は、処理を開始すると、プロジェクタ120により対象物に向けてUVパターンを照射する。そして、プロジェクタ120と所定の位置関係にある3Dスキャナ用カメラ150により対象群に含まれる各対象物の撮影を行う(ステップS301)。図31は、第2の実施形態に係る対象群にプロジェクタからUVパターンが照射された状態の例を示す図であり、プロジェクタ120からのUV光の照射により対象物W1、W2がインビジブル塗料により所定のパターンで発光し、その状態が3Dスキャナ用カメラ150により撮影される。可視光での発光はインビジブル塗料によるものであるため、対象物Wが光沢物であったり黒色物体であったりしても問題はない。また、ステップS301においては、第1のインビジブル塗料が塗布され、第1の可視光を発光する対象物W1と、第2のインビジブル塗料が塗布され、第2の可視光を発光する対象物W2とが、同時に撮影される。
 図30に戻り、対象物の撮影(ステップS301)は、プロジェクタ120から照射されるUVパターンを変更し(ステップS303)、所定のUVパターンについて完了するまで繰り返し行われる(ステップS302:No)。そして、3次元データ測定装置140は、各UVパターンについて撮影された複数の画像に基づいて、各対象物群の3次元形状を算出し、記憶回路に記憶する(ステップS304)。
 所定のUVパターンについての処理が完了すると(ステップS302:Yes)、3次元データ測定装置140は、次の処理として、プロジェクタ120または外部光源により対象物に向けて白色光を照射し、カメラ130により撮影を行う(ステップS311)。そして、3次元データ測定装置140は、撮影された画像を記憶回路に記憶する(ステップS312)。図32は、第2の実施形態に係る対象群に可視光が照射された状態の例を示す図であり、プロジェクタ120からの白色光の照射により対象物W1の第1のインビジブル塗料および対象物W2の第2のインビジブル塗料はいずれも無色透明となり、対象物W1およびW2本来の状態と同様の機械学習用データを生成することができるため、実際にロボットアームでワークを把持する際のワークの位置・姿勢の認識精度を向上させることが期待できる。
 次いで、図30に戻り、3次元データ測定装置140は、所定の方向からの処理が完了したか否か判断し(ステップS321)、完了していないと判断した場合(ステップS321:No)は、対象群に対する撮影方向を変更し(ステップS322)、UVパターンの照射等(ステップS301)から繰り返す。対象物の姿勢変更は操作者の手動によるものであってもよいし、駆動機構によるものであってもよい。3次元データ測定装置140は、所定の方向からの処理が完了したと判断した場合(ステップS321:Yes)は、ステップS323に移行する。なお、1つの方向からの撮影だけで、対象群に含まれる全ての対象物の位置及び姿勢を特定できる場合は、ステップS322以降の処理を繰り返さなくてもよい。
 次いで、3次元データ測定装置140は、異なる方向から測定した点群データ間で点群データマッチングを行い、データ更新を行う(ステップS323)。その際、3次元データ測定装置140は、第1の可視光に基づいて取得された対象物W1の点群データと、第2の可視光に基づいて取得された対象物W2の点群データとについて、それぞれ個別に点群データマッチングを行っても良いし、対象群全体で点群データマッチングを行っても良い。次に、第1の可視光に基づいて取得した点群データと、事前に記憶しておいた3次元データの点群マッチングを行う。この時の3次元モデルの位置と姿勢から、画像撮影時のステレオカメラとの相対位置を計算し、対象物の位置および姿勢のデータを取得する  (S324)。次に、第2の可視光に基づいて取得した点群データと3Dモデルとの点群マッチングを同様に行い、さらに発光色毎に分離したデータが他にある場合は、発光色毎に3Dモデルとのマッチングを繰り返す(S331、S332)。
 そして、3次元データ測定装置140は、データを生成するための所定の枚数の画像を撮影したか否かを判定する(ステップS341)。3次元データ測定装置140は、所定の枚数の画像を撮影していないと判定した場合(ステップS341:No)、対象物のバラ積み状態が変更された後に(ステップS342)、UVパターンの照射等(ステップS301)から繰り返す。ステップS342においては、例えば、図27に示すステップS112~S113における処理が行われる。一方、3次元データ測定装置140は、所定の枚数の画像を撮影したと判定した場合(ステップS341:Yes)、処理を終了する。
 以上のように、第2の実施形態に係る機械学習用データ生成方法は、可視光よりも波長の短い光の照射を受けると第1の可視光による発光を行い、可視光に対しては無色透明の第1の塗料が塗布された第1の対象物と、前記可視光よりも波長の短い光の照射を受けると第2の可視光による発光を行い、前記可視光に対しては無色透明の第2の塗料が塗布された第2の対象物に対し、所定のパターンによる前記可視光よりも波長の短い光の照射を行って、前記第1の対象物及び前記第2の対象物を撮影する第1の工程を備える。これにより、複数の対象物を含む実際の対象群から、個別の対象物ごとの3次元形状を含む対象群の3次元データを容易に測定することができる。
 また、機械学習用データ生成方法は、前記第1の対象物及び前記第2の対象物に対し、可視光の照射を行って、前記第1の対象物及び前記第2の対象物を撮影する第2の工程を備える。また、前記第1の工程では、前記第1の可視光を検出することにより前記第1の対象物の位置及び3次元形状を測定し、前記第2の可視光を検出することにより前記第2の対象物の位置及び3次元形状を測定する。また、機械学習用データ生成方法は、前記第1の工程で測定した3次元形状から、前記第1の可視光と前記第2の可視光の違いにより、前記第1の対象物と前記第2の対象物の3次元形状に分離し、あらかじめ保持している前記第1の対象物の3次元データおよび前記第2の対象物の3次元データとマッチングを行う第3の工程を備えてもよい。これにより、個別の対象物ごとの3次元形状を含む対象群の3次元データを容易に測定することができる。
 また、第1の工程では、前記第1の対象物及び前記第2の対象物の一つの姿勢に対して所定のパターンを複数切り替えて、前記第1の対象物及び前記第2の対象物の3次元形状を測定する。これにより、3次元形状の測定の精度を高めることができる。
 また、機械学習用データ生成方法は、前記第1の対象物及び前記第2の対象物を撮影する方向を変更し、前記第1の工程による前記第1の対象物及び前記第2の対象物の3次元形状の測定と前記第2の工程による前記第1の対象物及び前記第2の対象物の撮影とを繰り返し、点群データマッチングによりデータを連結して更新してもよい。また、機械学習用データ生成方法は、第1の工程による前記第1の対象物及び前記第2の対象物の3次元形状の測定と第2の工程による前記第1の対象物及び前記第2の対象物の撮影とを繰り返し、対象物ごとに分離した点群データと3次元データとのマッチングによりデータを連結して更新してもよい。また、する。これにより、一方の側からの撮影だけでは捉えられない各対象物の3次元形状を取得することができる。
 また、第2の実施形態に係る対象物機械学習用データ測定装置は、可視光よりも波長の短い光の照射を受けると第1の可視光による発光を行い、可視光に対しては無色透明の第1の塗料が塗布された第1の対象物と、前記可視光よりも波長の短い光の照射を受けると第2の可視光による発光を行い、前記可視光に対しては無色透明の第2の塗料が塗布された第2の対象物に対し、所定のパターンによる前記可視光よりも波長の短い光の照射を行って、前記第1の対象物及び前記第2の対象物を撮影し、撮影された画像から前記第1の対象物の位置及び3次元形状、並びに前記第2の対象物の位置及び3次元形状を測定する第1の処理部を備える。これにより、上記の対象物3次元データ測定方法を装置として実現することができる。
 以上、本発明の各実施形態について説明したが、本発明は上記の各実施形態に限定されるものではなく、その趣旨を逸脱しない限りにおいて種々の変更が可能である。例えば、対象群に含まれる対象物の数は説明したものに限られず、3つ以上の対象物を含む対象群であってもよい。
 ところで、各実施形態で説明した各種の処理は、予め用意されたプログラムを情報処理装置で実行することで実現できる。そこで、以下では、上記各実施形態におけるモータ制御装置100と同様の機能を有するプログラムを実行する情報処理装置900の一例を説明する。図33は、測定プログラムを実行する情報処理装置の一例を示すブロック図である。
 図33に示す測定プログラムを実行する情報処理装置900では、通信装置910と、入力装置920と、出力装置930と、ROM940と、RAM950と、CPU960と、バス970とを有する。例えば、通信装置910は、図24に示す通信I/F146として、入力装置920は、図24に示す入力I/F142として、出力装置930は、図24に示すディスプレイ143として、それぞれ機能する。
 そして、ROM940には、上記の各実施形態と同様の機能を発揮する測定プログラムが予め記憶されている。尚、測定プログラムは、ROM940ではなく、コンピュータシステムに内蔵されるハードディスク等の記憶装置や、図示せぬドライブで読取可能な記録媒体に記録されていても良い。また、記録媒体としては、例えば、CD-ROM、DVDディスク、USBメモリ、SDカード等の可搬型記録媒体、フラッシュメモリ等の半導体メモリ等でも良い。測定プログラムとしては、図33に示すように、測定プログラム940Aである。尚、測定プログラム940Aについては、適宜統合又は分散しても良い。
 そして、CPU960は、測定プログラム940AをROM940から読み出し、これら読み出されたプログラムをRAM950のワークエリア上に展開する。そして、CPU960は、図33に示すように、RAM950上に展開した測定プログラム940Aを、測定プロセス950Aとして機能する。
 CPU960は、保守装置200から受信した設定変更情報に含まれる識別情報が、当該モータ制御装置のものであるか否かを判定する。CPU960は、当該モータ制御装置のものであると判定された識別情報に対応する前記設定変更情報を用いて、設定を変更する。CPU960は、当該モータ制御装置以外の識別情報を含む前記設定変更情報を、他のモータ制御装置に転送する。
 なお、図33では、3次元データ測定装置140と同様の機能を有する測定プログラムを実行する情報処理装置900について説明したが、処理装置110および画像処理装置10についても同様に、予め用意されたプログラムを情報処理装置で実行することで実現できる。また、情報処理装置900は、例えばスタンドアロンのコンピュータであるが、これに限られず、相互に通信可能な複数のコンピュータにより実現されてもよく、またクラウド上の仮想マシンにおいて実現されてもよい。また、情報処理装置900の全部又は一部の機能が、例えば、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)等の集積回路により実現されるようにしてもよい。
 また、上記実施の形態により本発明が限定されるものではない。上述した各構成素を適宜組み合わせて構成したものも本発明に含まれる。また、さらなる効果や変形例は、当業者によって容易に導き出すことができる。よって、本発明のより広範な態様は、上記の実施の形態に限定されるものではなく、様々な変更が可能である。
 110 処理装置,114 記憶回路,1141 対象物3次元データ,1142 機械(深層)学習モデル,1142a ニューラルネットワーク構造,1142b 学習パラメータ,115 処理回路,1151 学習部,1152 データ出力部,120 プロジェクタ,130 カメラ,140 3次元データ測定装置,144 記憶回路,1441 対象物3次元データ,145 処理回路,1451 対象物3次元データ測定部,W 対象物

Claims (16)

  1.  可視光よりも波長の短い光の照射を受けると第1の可視光による発光を行い、可視光に対しては無色透明の塗料が塗布された第1の対象物に対し、所定のパターンによる前記可視光よりも波長の短い光の照射を行って、前記第1の対象物を撮影し、撮影された画像から前記第1の対象物の3次元形状を測定する第1の工程を備える対象物3次元データ測定方法。
  2.  前記第1の対象物に対し、可視光の照射を行って、前記第1の対象物を撮影し、撮影された画像から前記第1の対象物のテクスチャを測定する第2の工程をさらに備える、請求項1に記載の対象物3次元データ測定方法。
  3.  前記第1の工程では、前記第1の対象物の一つの姿勢に対して前記所定のパターンを複数切り替えて前記第1の対象物の3次元形状を測定する、
    請求項2に記載の対象物3次元データ測定方法。
  4.  前記第1の対象物の姿勢を変更し、前記第1の工程による前記第1の対象物の3次元形状の測定と前記第2の工程による前記第1の対象物のテクスチャの測定とを繰り返し、点群データマッチングによりデータを連結して更新する、
    請求項2または3に記載の対象物3次元データ測定方法。
  5.  前記第2の工程では、撮影をカラーカメラで行う場合は白色光の照射と撮影とを行い、撮影をモノクロカメラで行う場合は赤色光、青色光および緑色光のそれぞれの照射と撮影とを行う、
    請求項2~4のいずれか一つに記載の対象物3次元データ測定方法。
  6.  可視光よりも波長の短い光の照射を受けると第1の可視光による発光を行い、可視光に対しては無色透明の塗料が塗布された第1の対象物に対し、所定のパターンによる前記可視光よりも波長の短い光の照射を行って、前記第1の対象物を撮影し、撮影された画像から前記第1の対象物の3次元形状を測定する第1の処理と、
     前記第1の対象物に対し、可視光の照射を行って、前記第1の対象物を撮影し、撮影された画像から前記第1の対象物のテクスチャを測定する第2の処理と、
    を処理回路が実行する、
     対象物3次元データ測定装置。
  7.  請求項2に記載の対象物3次元データ測定方法により得られた対象物3次元データに基づき、画像生成ソフトウェアによりバラ積みされたワークの画像を生成し、機械学習の学習データとする、
    学習データ生成方法。
  8.  請求項2に記載の対象物3次元データ測定方法により得られた対象物3次元データに基づき、画像生成ソフトウェアによりバラ積みされたワークの画像を生成し、機械学習の学習データとする処理を処理回路が実行する、
    学習データ生成装置。
  9.  前記第1の工程において、前記所定のパターンによる前記可視光よりも波長の短い光の照射を、前記第1の対象物と、前記可視光よりも波長の短い光の照射を受けると第2の可視光による発光を行い、前記可視光に対しては無色透明の第2の塗料が塗布された第2の対象物とに対して行い、前記第1の対象物及び前記第2の対象物を撮影し、撮影された画像から前記第1の対象物の位置及び3次元形状、並びに前記第2の対象物の位置及び3次元形状を測定する、請求項1に記載の対象物3次元データ測定方法。
  10.  前記第1の対象物及び前記第2の対象物に対し、可視光の照射を行って、前記第1の対象物及び前記第2の対象物を撮影する第2の工程をさらに備える、請求項9に記載の対象物3次元データ測定方法。
  11.  前記第1の対象物及び前記第2の対象物を撮影する方向を変更し、前記第1の工程による前記第1の対象物及び前記第2の対象物の3次元形状の測定と前記第2の工程による前記第1の対象物及び前記第2の対象物の撮影とを繰り返し、点群データマッチングによりデータを連結して更新する、請求項10に記載の対象物3次元データ測定方法。
  12.  前記第1の工程で測定した3次元形状から、前記第1の可視光と前記第2の可視光の違いにより、前記第1の対象物と前記第2の対象物の3次元形状に分離し、あらかじめ保持している前記第1の対象物の3次元データおよび前記第2の対象物の3次元データとマッチングを行う第3の工程を備える請求項11に記載の対象物3次元データ測定方法。
  13.  前記第1の工程による前記第1の対象物及び前記第2の対象物の3次元形状の測定と、前記第2の工程による前記第1の対象物及び前記第2の対象物の撮影と、前記第1の対象物及び前記第2の対象物の点群データを分離して対象物の3次元データとの点群データマッチングを行う前記第3の工程により対象物の位置または姿勢を算出する、請求項12に記載の対象物3次元データ測定方法。
  14.  前記第1の工程では、前記第1の可視光を検出することにより前記第1の対象物及び3次元形状を測定し、前記第2の可視光を検出することにより前記第2の対象物及び3次元形状を測定する、請求項9乃至13のいずれか1つに記載の対象物3次元データ測定方法。
  15.  前記第1の工程では、前記第1の対象物及び前記第2の対象物の一つの姿勢に対して前記所定のパターンを複数切り替えて前記第1の対象物及び前記第2の対象物の位置及び3次元形状を測定する、請求項9乃至14のいずれか一つに記載の対象物3次元データ測定方法。
  16.  前記第1の処理において、前記所定のパターンによる前記可視光よりも波長の短い光の照射を、前記第1の対象物と、前記可視光よりも波長の短い光の照射を受けると第2の可視光による発光を行い、前記可視光に対しては無色透明の第2の塗料が塗布された第2の対象物に対して行って、前記第1の対象物及び前記第2の対象物を撮影し、撮影された画像から前記第1の対象物の位置及び3次元形状、並びに前記第2の対象物の位置及び3次元形状を測定する第1測定部を備える、請求項6に記載の対象物3次元データ測定装置。
PCT/JP2021/009821 2020-03-17 2021-03-11 対象物3次元データ測定方法、対象物3次元データ測定装置、学習データ生成方法および学習データ生成装置 WO2021187316A1 (ja)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2020046409A JP7474083B2 (ja) 2020-03-17 2020-03-17 対象物3次元データ測定方法、学習データ生成方法および学習データ生成装置
JP2020-046409 2020-03-17
JP2020-188150 2020-11-11
JP2020188150A JP2022077338A (ja) 2020-11-11 2020-11-11 機械学習用データ生成方法及び機械学習用データ生成装置

Publications (1)

Publication Number Publication Date
WO2021187316A1 true WO2021187316A1 (ja) 2021-09-23

Family

ID=77772025

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/009821 WO2021187316A1 (ja) 2020-03-17 2021-03-11 対象物3次元データ測定方法、対象物3次元データ測定装置、学習データ生成方法および学習データ生成装置

Country Status (1)

Country Link
WO (1) WO2021187316A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6063404A (ja) * 1983-09-17 1985-04-11 Nuclear Fuel Ind Ltd 形状検査装置
JP2002027501A (ja) * 2000-07-10 2002-01-25 Fuji Xerox Co Ltd 3次元画像撮像装置および3次元画像撮像方法
JP2021043092A (ja) * 2019-09-12 2021-03-18 株式会社東芝 物体の距離、形状計測装置及び計測方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6063404A (ja) * 1983-09-17 1985-04-11 Nuclear Fuel Ind Ltd 形状検査装置
JP2002027501A (ja) * 2000-07-10 2002-01-25 Fuji Xerox Co Ltd 3次元画像撮像装置および3次元画像撮像方法
JP2021043092A (ja) * 2019-09-12 2021-03-18 株式会社東芝 物体の距離、形状計測装置及び計測方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KUNIYUKI TAKAHASHI; KENTA YONEKURA: "Invisible Marker: Automatic Annotation of Segmentation Masks for Object Manipulation", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 27 September 2019 (2019-09-27), 201 Olin Library Cornell University Ithaca, NY 14853 , XP081616541 *

Similar Documents

Publication Publication Date Title
JP3624353B2 (ja) 3次元形状計測方法およびその装置
US9895131B2 (en) Method and system of scanner automation for X-ray tube with 3D camera
US9117281B2 (en) Surface segmentation from RGB and depth images
JP4492654B2 (ja) 3次元計測方法および3次元計測装置
CN103649674B (zh) 测量设备以及信息处理设备
CN109938837B (zh) 光学跟踪系统及光学跟踪方法
JP4885584B2 (ja) レンジファインダ校正方法及び装置
US20100328308A1 (en) Three Dimensional Mesh Modeling
JP2017010327A (ja) 情報処理装置、情報処理方法及びプログラム
CN108926355A (zh) 用于站立对象的x射线系统和方法
CN107025663A (zh) 视觉系统中用于3d点云匹配的杂波评分系统及方法
CN106104198A (zh) 信息处理设备、信息处理方法和程序
WO2010041584A1 (en) Imaging system and method
CN106471523B (zh) 使用红外成像的颜色标识
EP2476999B1 (en) Method for measuring displacement, device for measuring displacement, and program for measuring displacement
JP2009175012A (ja) 計測装置および計測方法
WO2021187316A1 (ja) 対象物3次元データ測定方法、対象物3次元データ測定装置、学習データ生成方法および学習データ生成装置
WO2021085560A1 (ja) 画像処理装置及び画像処理方法
JP7474083B2 (ja) 対象物3次元データ測定方法、学習データ生成方法および学習データ生成装置
JP4382430B2 (ja) 頭部の三次元形状計測システム
JP2022077338A (ja) 機械学習用データ生成方法及び機械学習用データ生成装置
CN114979618A (zh) 计测系统及记录有计测程序的记录介质
WO2021085562A1 (ja) 把持装置
JP4623320B2 (ja) 三次元形状推定システム及び画像生成システム
KR20180088306A (ko) 센서 좌표계를 게임 존에 캘리브레이션하는 방법 및 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21770454

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21770454

Country of ref document: EP

Kind code of ref document: A1