This application claims priority to Japanese Patent Application No. 2021-102933, filed on Jun. 22, 2021, the entire disclosure of which is incorporated herein by reference in its entirety.
The present disclosure relates to recognizing of an object, using an image.
Conventionally, an image captured of an object is used to recognize the object. Various types of techniques are also proposed for recognizing an object using an image.
For example, Japanese Laid-Open Patent Publication No. H09-245177 discloses techniques for selecting optimal image recognition conditions for each part. More specifically, Japanese Laid-Open Patent Publication No. H09-245177 discloses setting, as recognition conditions, multiple types of workpiece imaging conditions (the angle and lighting intensity) and multiple types of processing conditions (pre-process and recognition process approaches for captured images) Image recognition process is then performed for each of the combinations of the types of imaging conditions and the types of processing conditions, and a combination having a minimum error is set as final recognition conditions.
Improvement in accuracy is constantly demanded for object recognition using an image, as described above.
According to a certain aspect of the present disclosure, an object recognition apparatus is provided for recognizing a state of an object, the object recognition apparatus including: a storage device; and one or more processors that execute a program stored in the storage device. The one or more processors: recognizes an external shape of the object, based on an image captured of the object, recognizes an internal shape of the object, based on the image captured of the object; and determines a state of the object, using a result of recognition of the external shape and a result of recognition of the internal shape.
According to another aspect of the present disclosure, a non-transitory recording medium storing a computer readable program is provided. The computer readable program, when executed by a computer, causes the computer to perform steps, including: recognizing an external shape of an object, based on an image captured of the object; recognizing an internal shape of the object, based on the image captured of the object; and determining a state of the object, using a result of recognition of the external shape and a result of recognition of the internal shape.
The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.
The advantages and features provided by one or more embodiments of the invention will become more fully understood from the detailed description given herein below and the appended drawings which are given by way of illustration only, and thus are not intended as a definition of the limits of the present invention.
Hereinafter, one or more embodiments of the present invention will be described with reference to the drawings. However, the scope of the invention is not limited to the disclosed embodiments.
In the following, one embodiment of a parts recognition system will be described, with reference to the accompanying drawings. The parts recognition system is one example of a system which includes an object recognition apparatus. In the description below, the same reference sign is used to refer to like parts and components, which are assigned the same name and have the same function. Thus, descriptions of these will not be repeated.
[1. Parts Recognition System]
The parts recognition system 1000 includes a robot arm 200 having a recognition apparatus 100 attached thereto. The recognition apparatus 100 is one example of an object recognition apparatus, and capable of communications with the robot arm 200.
The recognition apparatus 100 includes a main unit 110 and a camera 120. The main unit 110 determines a state of the part 400 placed on the tray 300, using an image captured by the camera 120. The part 400 is one example of an object. The image captured of the part 400 on the tray 300 is one example of an image captured of the object.
The recognition apparatus 100 may not include the camera 120. In other words, the recognition apparatus 100 may use an image captured of the part 400 on the tray 300 by an external device for the determination of the state of the part 400.
[2. Hardware Configuration]
The CPU 101 executes a given program, thereby controlling the recognition apparatus 100. The RAM 102 functions as a work area for the CPU 101. The storage 103 is one example of a storage device. The storage 103 stores programs and/or data used to execute the programs. Note that the CPU 101 may execute programs stored in a memory device external to the recognition apparatus 100 or use data stored in a memory device external to the recognition apparatus 100.
The display 104 shows a result of operation by the CPU 101. The input device 105 is, for example, a keyboard and/or a mouse. The interface 106 is a communication interface and allows the recognition apparatus 100 to communicate with external devices.
[3. Functional Configuration]
The image acquisition unit 151 obtains an image of the part 400. In one implementation, the camera 120 captures an image of the part 400 placed on the tray 300, thereby generating image data. The image acquisition unit 151 reads the image data generated by the camera 120, thereby obtaining the image.
The external-shape recognizing unit 152 recognizes the external shape of the part 400 from the image captured by the camera 120. In one implementation, the external-shape recognizing unit 152 determines whether the outer edge of an element recognized from the image matches an image pattern which is previously registered as the outer edge of a part. If there is a match, the external-shape recognizing unit 152 determines that the element captured in the image is that part.
The internal-shape recognizing unit 153 recognizes the internal shape of the part 400 from the image captured by the camera 120. In one implementation, the external-shape recognizing unit 152 determines whether the shape (structure) of a portion at an inner side of the outer edge of an element recognized from the image matches an image pattern previously registered as the internal structure of a part. If there is a match, the external-shape recognizing unit 152 determines that the element captured in the image is that part.
Using the result of recognition by the external-shape recognizing unit 152 and/or the internal-shape recognizing unit 153, the determination unit 154 determines parts information of the element in the image captured by the camera 120. In one implementation, the parts information includes the orientation and the angle of rotation of the part.
The orientation of the part refers to an orientation of the part 400 on the tray 300 relative to the camera 120. In one implementation, the orientation of the part is represented by a surface facing the camera 120 (front, rear, right, or left) among two or more surfaces of the part. The orientation of the part can be defined as a rotary position of the part 400 on the tray 300 about X axis and/or Y axis of
The angle of rotation of the part can be defined as a rotary position of the part 400 on the tray 300 about Z axis of
[4. External-shape Library]
As shown in
The external-shape library includes information for each “PART ID.” The external-shape library includes image patterns representing the outer edge of a part. Each image pattern is associated with a combination of a value of “ORIENTATION” and a value of “ANGLE OF ROTATION”.
For example, the external-shape library includes an image pattern associated with a combination of the part ID “0001,” the orientation “FRONT,” and the angle of rotation “zero degree.” The external-shape library includes an image pattern associated with a combination of the part ID “0001,” the orientation “FRONT,” and the angle of rotation “15 degrees.” The image pattern registered with the external-shape library primarily represents the outer edge of a part.
[5. Internal-Shape Library]
Similarly to the external-shape library, the internal-shape library also includes an image pattern representing the outer edge of a part for each “PART ID” in which the outer edge is associated with a combination of a value of “ORIENTATION” and a value of “ANGLE OF ROTATION.” The image pattern registered with the internal-shape library primarily represents the internal structure of a part.
[6. Process Flow]
In step S100, the recognition apparatus 100 obtains the image captured by the camera 120. In one implementation, the captured image is generated by the camera 120 capturing an image of the part 400 on the tray 300, and stored in the RAM 102 or the storage 103.
In step S110, the recognition apparatus 100 refers to the external-shape library and determines a combination of the orientation and the angle of rotation of the part.
More specifically, the recognition apparatus 100 extracts an element corresponding to a part from the image captured in step S100. The recognition apparatus 100 then matches the shape of the extract element with image patterns registered with the external-shape library and determines an image pattern that matches the extracted element. If the match rate is greater than or equal to a given value between the element extracted as noted above and an image pattern registered with the external-shape library, the recognition apparatus 100 may determine that the element corresponds to that image pattern. The recognition apparatus 100 then determines a combination of the orientation and the angle of rotation associated with the determined image pattern, as a combination of the orientation and the angle of rotation of the part captured in the captured image.
The recognition apparatus 100 may determine two or more combinations. For example, assume that a match rate is “80%” between the part and the image pattern corresponding to a combination of the orientation “FRONT” and the angle of rotation “15 degrees,” a match rate is “82%” between the part and the image pattern corresponding to a combination of the orientation “REAR” and the angle of rotation “15 degrees,” and the given value is “75%.” In this case, the recognition apparatus 100 determines that the part matches these two image patterns. The recognition apparatus 100 then determines the combinations of the orientation and the angle of rotation associated with these two image patterns, that is, two combinations, as combinations of the orientation and the angle of rotation of the part captured in the captured image.
In the following description, the combination determined in step S110 may also be referred to as a “first result.”
In step S120, the recognition apparatus 100 determines whether one combination is determined in step S110. If one combination is determined (YES in step S120), the recognition apparatus 100 passes the control to step S130. Otherwise, (NO in step S120), the recognition apparatus 100 passes the control to step S140.
In step S130, the recognition apparatus 100 outputs the combination determined in step S110, as the final result of the parts information, and ends the process of
In step S140, the recognition apparatus 100 performs image processing on the image read in step S100. In one implementation, the image processing converts the image captured for the purpose of recognition of the outer edge of the part into an image for the purpose of recognition the internal structure of the part. The image processing is applying gamma correction to the image, for example.
In step S150, the recognition apparatus 100 refers to the internal-shape library and determines a combination of the orientation and the angle of rotation of the part.
More specifically, the recognition apparatus 100 extracts an element corresponding to the part from the image having through the image processing performed in step S140. The recognition apparatus 100 matches the shape of the extract element with image patterns registered with the internal-shape library to determine an image pattern that matches the extracted element. The recognition apparatus 100 then determines a combination of the orientation and the angle of rotation associated with the determined image pattern, and a combination of the orientation and the angle of rotation of the part captured in the image. In the following description, the combination determined in step S150 may also be referred to as a “second result.”
In step S160, using the first result and the second result, the recognition apparatus 100 determines the final result of the parts information. In one implementation, the recognition apparatus 100 determines the image pattern having the highest match between the first result and the second result, and determines the combination of the orientation and the angle of rotation associated with that image pattern, as a final result.
For example, assume that the first result shows that the match rate is 80% between the element extracted from the captured image and the image pattern associated with “ANGLE OF ROTATION: ZERO DEGREE, ORIENTATION: FRONT,” and the match rate is 82% between the element extracted from the captured image and the image pattern associated with “ANGLE OF ROTATION: ZERO DEGREE, ORIENTATION: REAR.” In contrast, assume that the second result shows that the match rate is 10% between the element extracted from the captured image and the image pattern associated with “ANGLE OF ROTATION: ZERO DEGREE, ORIENTATION: FRONT,” the match rate is 90% between the element extracted from the captured image and the image pattern associated with “ANGLE OF ROTATION: ZERO DEGREE, ORIENTATION: REAR.” In this case, the image pattern associated with “ANGLE OF ROTATION: ZERO DEGREE, ORIENTATION: REAR” has the highest match rate between the first result and the second result. Accordingly, a combination of the angle of rotation “zero degree” and the orientation “REAR” is determined as the final result.
In step S170, similarly to step S130, the recognition apparatus 100 outputs the final result determined in step S160 and ends the process of
[7. Variation (1)]
More specifically, in step S102, the recognition apparatus 100 reads a captured image for external shape. In step S110, the recognition apparatus 100 uses the captured image read in step S102.
In step S142, the recognition apparatus 100 reads a captured image for internal shape. In step S150, the recognition apparatus 100 uses the captured image read in step S142.
The camera 120 may capture the image (captured image for external shape) read in step S102 and the image (captured image for internal shape) read in step S142 under different imaging conditions. In one implementation, the camera 120 captures the captured image for internal shape under a longer exposure time, a higher gain, and/or higher lighting illuminance (brighter environment) than the captured image for external shape. This can definitize both the contour of an element corresponding to a part in the captured image for external shape, and the internal structure of a part in the captured image for internal shape.
[8. Variation (2)]
Note that, in step S150, the recognition apparatus 100 may determine “ORIENTATION” among the parts information items. If the outer edge of the front of the part is the same or very similar to the outer edge of the rear of the part, the first result determined in step S110 can be two combinations, including a combination defining a certain angle of rotation of the part and a combination defining the rear of the part at that angle of rotation. In such a case, insofar as the recognition apparatus 100 determines at least “ORIENTATION” in the parts information in step S150, the recognition apparatus 100 can determine the final combination by selecting one of the two combinations that includes the determined “ORIENTATION.”
[9. Variation (3)]
If a match rate is high between the element in the captured image and the image pattern associated with the front and the rear in the external-shape library, the recognition apparatus 100 determines two combinations that are associated with that image pattern. For example, the two combinations are “ANGLE OF ROTATION: ZERO DEGREE, ORIENTATION: FRONT” and “ANGLE OF ROTATION: ZERO DEGREE, ORIENTATION: REAR.” In step S150, the recognition apparatus 100 selects a combination having a higher match rate in the second result between the two combinations, as the final result.
Although embodiments of the present invention have been described and illustrated in detail, the disclosed embodiments are made for purposes of illustration and example only and not limitation. The scope of the present invention should be interpreted by terms of the appended claims
Number | Date | Country | Kind |
---|---|---|---|
2021-102933 | Jun 2021 | JP | national |