WO2023199572A1 - テンプレート登録装置、テンプレート登録方法およびテンプレート登録システム - Google Patents

テンプレート登録装置、テンプレート登録方法およびテンプレート登録システム Download PDF

Info

Publication number
WO2023199572A1
WO2023199572A1 PCT/JP2023/003002 JP2023003002W WO2023199572A1 WO 2023199572 A1 WO2023199572 A1 WO 2023199572A1 JP 2023003002 W JP2023003002 W JP 2023003002W WO 2023199572 A1 WO2023199572 A1 WO 2023199572A1
Authority
WO
WIPO (PCT)
Prior art keywords
template
registration
input image
matching
imaging device
Prior art date
Application number
PCT/JP2023/003002
Other languages
English (en)
French (fr)
Inventor
テイテイ 虎
竜司 渕上
康治 井村
Original Assignee
パナソニックIpマネジメント株式会社
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 JP2022065264A external-priority patent/JP2023155753A/ja
Priority claimed from JP2022065263A external-priority patent/JP2023155752A/ja
Application filed by パナソニックIpマネジメント株式会社 filed Critical パナソニックIpマネジメント株式会社
Publication of WO2023199572A1 publication Critical patent/WO2023199572A1/ja

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/02Programme-controlled manipulators characterised by movement of the arms, e.g. cartesian coordinate type
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/695Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects

Definitions

  • the present disclosure relates to a template registration device, a template registration method, and a template registration system.
  • an end effector such as a robot hand may determine whether a part to be picked is the correct part (for example, a part used in the production of an industrial product).
  • a part to be picked is the correct part (for example, a part used in the production of an industrial product).
  • it is required to perform the determination process as quickly as possible so as not to reduce the takt time of the production process.
  • a template matching method is known in which, for example, a template (for example, an image) of a part prepared in advance is compared with an image of the part taken by a camera installed in a factory.
  • Patent Document 1 discloses a template creation device that creates a set of templates used in an object recognition device that recognizes objects by template matching.
  • a template creation device obtains a plurality of templates from each of a plurality of images for different postures of one object, calculates the degree of similarity of image features between two templates selected from the plurality of templates, and generates a plurality of images based on the similarity. Perform clustering to divide the templates into multiple groups.
  • the template creation device integrates all templates in the group into one integrated template for each of the plurality of groups, and generates a template set having an integrated template for each group.
  • an object recognition device including a template creation device recognizes an object on a conveyor using an image captured from a camera, and the camera itself is installed at a fixed location that cannot be moved with respect to a production line or the like. It is assumed that Furthermore, when the object recognition device actually performs matching processing, the template set consisting of integrated templates for each group is used as is.
  • the present disclosure was devised in view of the conventional circumstances, and provides a highly accurate template of an object that can be used for template matching even in a situation where the orientation of the object from the imaging device changes as the imaging device moves.
  • the present invention aims to provide a template registration device, a template registration method, and a template registration system.
  • the present disclosure includes an acquisition unit that acquires an input image of the object captured by an imaging device that can image and move the object and position information of the imaging device;
  • a template registration device comprising a control unit that associates position information of the imaging device and information based on an input image of the object and registers the same in a storage unit as a template used for template matching.
  • the present disclosure also provides a template registration method executed by a template registration device, which includes an input image of an object captured by an imaging device capable of imaging and moving the object, and position information of the imaging device. acquiring the information based on the input image of the target object, and registering the position information of the imaging device and the information based on the input image of the target object in a storage unit in association with each other as a template to be used for template matching; A template registration method is provided.
  • the present disclosure includes an imaging device that can image and move a target object, and a template registration device that is communicably connected to the imaging device, and the template registration device is configured to an acquisition unit that acquires an input image of the imaged object and positional information of the imaging device; and an acquisition unit that acquires an input image of the imaged object and positional information of the imaging device;
  • a template registration system is provided, including a control unit that registers information based on an input image of an object in a storage unit in association with the information.
  • Diagram showing a simple configuration example of a picking system A block diagram showing a detailed internal configuration example of the picking system according to Embodiment 1.
  • Flowchart illustrating an example of an operation procedure for registering a template by the image processing apparatus according to the first embodiment A diagram showing an example of a template registration screen displayed on a display in Embodiment 1.
  • Block diagram showing a detailed internal configuration example of a picking system according to Embodiment 2 Flowchart illustrating an example of the operation procedure of template matching by the image processing device according to the second embodiment A diagram showing an example of a matching result screen displayed on a display in Embodiment 2
  • an object recognition device equipped with a template creation device recognizes an object on a conveyor using an image captured from a camera, and the camera itself is fixed and immovable with respect to a production line, etc. It is assumed that it will be installed at the location. Furthermore, when the object recognition device actually performs matching processing, the template set consisting of integrated templates for each group is used as is.
  • template registration is performed to register a highly accurate template of a target that can be used for template matching even in a situation where the orientation of the target from the imaging device changes as the imaging device moves.
  • An example of a device, a template registration method, and a template registration system will be described.
  • a template registration device for example, an image processing device
  • the information based on the input image of the target object (see below) is used as a template for template matching, and the position information of the imaging device and the information based on the input image of the target object (see below) are associated and registered in the storage unit. .
  • FIG. 1 is a diagram schematically showing a configuration example of a picking system 100.
  • FIG. 2 is a block diagram showing a detailed internal configuration example of the picking system 100 according to the first embodiment.
  • the picking system 100 (an example of a template registration system) includes an actuator ACT1, a camera CAM1, an image processing device 10, an operating device 20, a display 30, and a template registration device 40. Between the actuator ACT1 and the image processing device 10, between the camera CAM1 and the image processing device 10, between the image processing device 10 and the operation device 20, between the image processing device 10 and the display 30, and between the image processing device 10 and the image processing device 10.
  • the template registration device 40 is connected to each other so that input/output (transmission/reception) of data signals is possible.
  • FIG. 1 The positional relationship between the camera CAM1 and the object OB1 based on the control of the actuator ACT1 will be explained with reference to FIG. 1. Note that the explanation of FIG. 1 is applicable not only to the first embodiment but also to the second embodiment described later.
  • the object OB1 is an object picked by the end effector EF1 of the picking system 100 installed in a factory, and is, for example, an industrial part or an industrial product.
  • industrial parts for example, after they are picked, they are moved to another lane (production line) to assemble the finished product. If it is an industrial product, for example, after being picked, it is stored in a box such as a cardboard box.
  • production line production line
  • the type of object OB1 is not limited to the above-mentioned industrial parts and industrial products.
  • the actuator ACT1 controls the camera CAM1 to be movable three-dimensionally, so that the object OB1 fixedly placed at a predetermined location in the factory (for example, the surface plate FL1) and the camera CAM1 can be moved.
  • control the positional relationship between FIG. 1 shows an orthogonal coordinate system consisting of an X-axis, a Y-axis, and a Z-axis in order to define a three-dimensional position (coordinates). Note that the origin of this orthogonal coordinate system is not shown in FIG.
  • the X-axis and the Y-axis constitute a horizontal plane in real space, and the Z-axis indicates a direction parallel to the direction of gravity perpendicular to the horizontal plane.
  • the X-axis is the left-right direction in the plane of FIG. 1, and the Y-axis is the direction perpendicular to the X-axis (in other words, the depth direction of the orthogonal coordinate system in FIG. 1).
  • the type of surface plate FL1 is not particularly limited as long as it represents a horizontal surface such as a floor surface.
  • the object OB1 which is the subject of the camera CAM1, is fixedly placed on the surface plate FL1, and is picked by an end effector EF1 (for example, a robot hand) that moves together with the camera CAM1.
  • the actuator ACT1 includes an X-arm XDR1 that is movable along an X-rail XRL1 extending in the X-axis direction, and Y-arms YDR1 and Z that are movable along a Y-rail (not shown) that extends in the Y-axis direction.
  • Each of the Z arms ZDR1 movable along the Z rail ZRL1 extending in the axial direction is individually controlled to be movable.
  • the actuator ACT1 can recognize, maintain, and control the three-dimensional positions (coordinates) of the end effector EF1 and the camera CAM1 based on control commands sent from the image processing device 10, and can control the three-dimensional positions (coordinates) of the end effector EF1 and the camera CAM1. Coordinates (an example of position information) indicating the respective three-dimensional positions of the cameras CAM1 are sent to the image processing device 10 constantly or periodically.
  • the end effector EF1 is, for example, a robot hand provided at the tip of a robot arm (not shown) deployed in correspondence with the picking system 100, and moves to approach the target object OB1 under the control of the actuator ACT1.
  • the object OB1 can be picked.
  • the camera CAM1 (an example of an imaging device) is arranged in the immediate vicinity of the end effector EF1, and moves in a pair with the end effector EF1 so as to approach the object OB1 under the control of the actuator ACT1.
  • the object OB1 included within the visual field range FV1) can be imaged.
  • the camera CAM1 images the object OB1, which is a subject within the field of view FV1, at a predetermined frame rate, and the captured image (an example of an input image) of the object OB1 obtained each time is sent to the image processing device. Send to 10.
  • the image processing device 10 (an example of a template registration device) is capable of executing a predetermined process (see FIG. 3) using the position information from the actuator ACT1 and the captured image (input image) of the object OB1 from the camera CAM1. Constructed by computer.
  • the image processing device 10 may be a PC (Personal Computer), or may be a dedicated hardware device specialized for the above-mentioned predetermined processing.
  • the image processing device 10 converts some of the captured images input from the camera CAM1 into templates used for template matching of the object OB1 (see Embodiment 2). It is registered (saved) in the template registration device 40 as a template.
  • the image processing device 10 generates a template registration screen WD1 (see FIG. 4) regarding template registration and displays it on the display 30 in order to leave the decision on whether or not to register a template to the user (for example, a person who performs operations related to template registration). to be displayed. Therefore, the image processing device 10 may decide to register a template scheduled for registration (see FIG. 4) or may discard the template based on the user's operation on the template registration screen WD1. Further, the image processing device 10 generates a control command for instructing the movement of the end effector EF1 and the camera CAM1 according to the template matching result and a predetermined movement route map (see FIG. 4), and sends it to the actuator ACT1. Good too.
  • the operating device 20 is an interface that detects user operation input, and is configured with, for example, a mouse, a keyboard, or a touch panel.
  • the operation device 20 receives a user operation, it generates a signal based on the operation and sends it to the image processing apparatus 10.
  • the display 30 is a device that outputs (displays) the display screen (see FIG. 4) generated by the image processing device 10, and is configured by, for example, an LCD (Liquid Crystal Display) or an organic EL (Electroluminescence) device.
  • LCD Liquid Crystal Display
  • organic EL Electrode
  • the template registration device 40 (an example of a storage unit) is, for example, a flash memory, an HDD (Hard Disk Drive), or an SSD (Solid State Drive).
  • the template registration device 40 non-temporarily associates the data of the template (image) determined to be registered by the image processing device 10 with the position information (three-dimensional position) of the camera CAM1 that captured the captured image corresponding to the template. Save to.
  • the data of each template stored in the template registration device 40 includes template (image) data or compressed data of the template, position information of the camera CAM1 that captured the captured image corresponding to the template, and the It has at least position information and feature amounts of a plurality of feature points extracted from the template by the feature extraction unit 121 (see below).
  • the data of the template (image) or data obtained by compressing the template (for example, thumbnails, etc.) and the feature amounts of a plurality of feature points extracted from the template by the feature extraction unit 121 are examples of information based on the input image. be. Note that the feature points of the template and their feature amounts may be registered, or may be recalculated and obtained each time they are referenced.
  • the image processing device 10 includes at least a communication interface 11, a processor 12, and a memory 13.
  • the communication interface 11, processor 12, and memory 13 are connected via a data transmission bus (not shown) so that data signals can be input and output to each other.
  • the communication interface 11 (an example of an acquisition unit or a communication unit) is provided between the actuator ACT1 and the image processing device 10, between the camera CAM1 and the image processing device 10, between the image processing device 10 and the operation device 20, and between the image processing device 10 and the operation device 20.
  • This is a communication circuit that performs input/output (transmission/reception) of data signals between the device 10 and the display 30 and between the image processing device 10 and the template registration device 40.
  • the interface is abbreviated as "I/F.”
  • the communication interface 11 constantly or periodically receives position information from the actuator ACT1 and temporarily stores it in the processor 12 or memory 13.
  • the communication interface 11 receives a captured image (for example, an image showing the object OB1) that is input each time from the camera CAM1, and temporarily stores it in the memory 13.
  • the communication interface 11 outputs a template registration screen (see FIG. 4) generated by the processor 12 to the display 30.
  • the communication interface 11 sends control commands generated by the processor 12 regarding the movement of the end effector EF1 and the camera CAM1 to the actuator ACT1.
  • the processor 12 is, for example, a CPU (Central Processing Unit), a GPU (Graphical Processing Unit), a DSP (Digital Signal Processor), or an FGPA (Field Processor). d Programmable Gate Array).
  • the processor 12 functions as a controller that controls the overall operation of the image processing device 10 , performs control processing to oversee the operations of each section of the image processing device 10 , and performs data input/output between each section of the image processing device 10 . Performs processing, data calculation processing, and data storage processing.
  • the processor 12 operates according to programs and control data stored in the memory 13, or uses the memory 13 during operation to temporarily store data or information generated or acquired by the processor 12 in the memory 13, or to communicate.
  • the processor 12 operates the feature extraction unit 121, feature matching unit 122, MoS calculation unit 123, MaS calculation unit 124, template registration determination unit 125, and control unit 126 according to the program and control data stored in the memory 13. It can be realized functionally.
  • the feature extraction unit 121 targets the captured images inputted from the camera CAM1, and extracts a plurality of feature points related to the object OB1 from the captured image (that is, a plurality of feature points in the captured image in which the object OB1 appears) for each captured image. , for example, a feature point position on the image where the rotational change, scale change, or brightness change is maximum.
  • a known algorithm such as SIFT (Scale-Invariant Feature Transform) can be used.
  • SIFT Scale-Invariant Feature Transform
  • the feature extraction unit 121 extracts a plurality of feature points from one input captured image, and extracts the extraction results (for example, point cloud data indicating the positions of each of the plurality of feature points in the captured image and each feature point). (hereinafter the same applies) is temporarily stored in the processor 12 or memory 13.
  • the extraction results of feature points may be collectively referred to as "features.”
  • the feature matching unit 122 acquires a template corresponding to the position information from the actuator ACT1 from the template registration device 40 via the communication interface 11.
  • the feature matching unit 122 performs template matching of the object OB1 using the extraction results of feature points on the captured image by the feature extraction unit 121 and the template obtained from the template registration device 40.
  • the feature matching unit 122 combines the extraction results of feature points on the captured image with the feature points and feature amounts on the template from the template registration device 40 and the newly extracted feature points and feature amounts on the captured image. Distinguishably separate.
  • the MoS calculation unit 123 calculates the difference (in other words, the position MoS (Moving Score) is calculated as an example of a first index indicating the degree of similarity of
  • the template registration determination unit 125 determines whether or not to register the captured image (input image) captured by the camera CAM1 when the camera CAM1 is present at the scheduled registration position (see FIG. 4) as a template. used for That is, even if a captured image having a high degree of similarity to an already registered template is input, the image processing device 10 calculates the MoS in order to avoid registering such a captured image as a template as much as possible.
  • the MoS calculation unit 123 calculates MoS using, for example, the calculation formula (1).
  • pt f is the three-dimensional coordinate (x f , y f , z f ).
  • f indicates the number of the position (scheduled registration position) at which the f-th frame (that is, the captured image) is scheduled to be registered as a template, and corresponds to position P6 shown in FIG. 4, for example.
  • pt tm are three-dimensional coordinates (x tm , y tm , z tm ) indicating the position of the camera CAM1 or the end effector EF1 when the tm-th template frame (that is, the captured image) is captured.
  • tm indicates the number at which the template was registered immediately before (for example, a number indicating the order of registration), and corresponds to position P5 shown in FIG. 4, for example. That is, the MoS is calculated by the reciprocal of the difference between the scheduled registration position and the immediately preceding template registration position (see FIG. 4). Therefore, if the difference between the immediately previous template registration position of the end effector EF1 and camera CMA1 and the current scheduled registration position is large, the MoS is small, and the template registration determination unit 125 uses the captured image of the current scheduled registration position as a template. It is judged (determined) that it is registered.
  • the template registration determination unit 125 uses the captured image of the current scheduled registration position as a template. It is determined (determined) not to register.
  • the MaS calculation unit 124 calculates a second image that indicates the image correlation (in other words, image similarity) between the features of the object OB1 in the template and the features of the object OB1 in the captured image.
  • MaS Machine Registration Score
  • the template registration determination unit 125 determines whether or not to register the captured image (input image) captured by the camera CAM1 when the camera CAM1 is present at the scheduled registration position (see FIG. 4) as a template.
  • the MaS calculation unit 124 calculates MaS using, for example, the calculation formula (2).
  • M j in equation (2) follows the condition in equation (3).
  • FS j indicates the matching score of the j-th feature.
  • MaS is based on the features on the template registered corresponding to the immediately previous template registration position (see FIG. 4) and the captured image input from the camera CAM1 corresponding to the current scheduled registration position (see FIG. 4). shows the matching rate with the features of Therefore, if the difference between the features of the template at the template registration position immediately before the end effector EF1 and camera CMA1 and the features of the input captured image at the current scheduled registration position is large, the number of matching features Since MaS tends to be small because of the small number of images (in other words, there are many cases where M j is 0), the template registration determination unit 125 determines (determines) that the captured image at the current scheduled registration position is to be registered as a template.
  • the template registration determination unit 125 determines (determines) that the captured image at the current scheduled registration position is not to be registered as a template.
  • the template registration determination unit 125 (an example of a registration determination unit) compares the MoS calculation result by the MoS calculation unit 123 with the threshold Th1 stored in the memory 13, or the MaS calculation result by the MaS calculation unit 124 and the memory. Based on the comparison result with the threshold value Th2 stored in 13, it is determined (determined) whether or not the captured image at the current scheduled registration position is to be registered as a template.
  • the template registration determination unit 125 (an example of a control unit) determines (determines) that a captured image at the current scheduled registration position is to be registered as a template
  • the template registration determination unit 125 (an example of a control unit) stores the data of the captured image and the position information of the camera CAM1 that captured the captured image.
  • the template registration determination unit 125 may further register (save) in the template registration device 40 the distance difference value between the immediately previous template registration position and the current scheduled registration position and the movement direction of the camera CAM1 in association with each other.
  • the control unit 126 is in charge of integrated control and management of various processes executed by the processor 12.
  • the control unit 126 generates a control command regarding the movement of the end effector EF1 and the camera CAM1 by the amount of movement according to the movement route map MP1 (see FIG. 4) stored in advance in the memory 13, and sends the control command via the communication interface 11.
  • Actuator ACT1 controls end effector EF1 and camera CAM1 to move three-dimensionally based on a control command sent from image processing device 10.
  • the control unit 126 generates a template registration screen WD1 regarding template registration, and displays it on the display 30 via the communication interface 11.
  • the memory 13 includes, for example, at least a RAM (Random Access Memory) and a ROM (Read Only Memory), and stores programs and control data necessary for executing the operations of the image processing device 10, as well as each part of the image processing device 10. Temporarily retains data generated or obtained during processing.
  • the RAM is, for example, a work memory used by each part of the image processing apparatus 10 while executing processing.
  • the ROM previously stores, for example, programs and control data that define the processing of each part of the image processing device 10.
  • the memory 13 may further include, for example, a flash memory, an HDD (Hard Disk Drive), or an SSD (Solid State Drive), and the same template as that registered (saved) in the template registration device 40 (see FIG. 4) Data may be saved.
  • FIG. 3 is a flowchart illustrating an example of an operation procedure for registering a template by the image processing apparatus 10 according to the first embodiment.
  • the processing shown in FIG. 3 is mainly executed by the processor 12 of the image processing device 10.
  • the processor 12 initializes i as a variable (step St1).
  • i is a variable indicating the number of a registered template, and is an integer greater than or equal to 0 and takes a value up to tm. In other words, tm indicates the number of the template registered immediately before.
  • the processor 12 inputs and acquires a captured image (input image) from the camera CAM1 (step St2), and further inputs and acquires at least position information of the camera CAM1 from the actuator ACT1 (step St3).
  • the processor 12 extracts feature points of the captured image (input image) acquired in step St2 (step St4).
  • step St5 if i is larger than zero (0) (step St5, YES), the processor 12 selects the captured image (input image) of the camera CAM1 acquired in step St2 and the captured image immediately before that (that is, the tmth) captured image. Template matching of the object OB1 is performed with the template (Step St6). The processor 12 calculates MaS as an example of an index indicating the image correlation (in other words, image similarity) between the features of the object OB1 in the template and the features of the object OB1 in the captured image (step St7).
  • the processor 12 also generates a second index indicating the difference between the position of the camera CAM1 when the template was imaged and the position of the camera CAM1 when the captured image inputted from the camera CAM1 was imaged (in other words, the degree of positional similarity). MoS as an example of one index is calculated (Step St8). Note that the steps St7 and St8 are executed in any order.
  • the processor 12 determines whether at least one of the conditions that the MaS calculated in step St7 is smaller than the threshold Th2 and the condition that the MoS calculated in the step St8 is smaller than the threshold Th1 is satisfied (step St9). If it is determined that MaS is larger than the threshold Th2 and MoS is larger than the threshold Th1 (step St9, NO), the process of the processor 12 proceeds to step St12.
  • step St10 determines that MaS is smaller than the threshold Th2 or MoS is smaller than the threshold Th1 (step St9, YES)
  • it increments i step St10
  • the captured image (input image) is registered in the template registration device 40 as the i-th (i.e., i before increment) template (step St11).
  • the processing of the processor 12 returns to step St2.
  • the processor 12 determines that the end effector EF1 is not continuing to operate (for example, move) by the actuator ACT1 (step St12, NO), the processor 12 moves the end effector EF1 along the movement path map MP1 (see FIG. 4).
  • the processing of the processor 12 shown in FIG. 3 ends.
  • the processor 12 may display the template registration screen WD1 shown in FIG. 4 on the display 30, thereby leaving it up to the user's operation to decide whether or not to register the template for the current scheduled registration point.
  • FIG. 4 is a diagram showing an example of the template registration screen WD1 displayed on the display 30 in the first embodiment.
  • the template registration screen WD1 is generated, for example, by the control unit 126 of the processor 12.
  • the template registration screen WD1 includes a movement route map display area SD1, a template display area SD2 to be registered, a registered template display area SD3, a register button BT1, and a discard button BT2.
  • the movement route map display area SD1 displays a movement route map MP1 indicating the movement route (movement history) of the pair of end effector EF1 and camera CAM1.
  • Each of positions p1, p2, p3, p4, and p5 indicates a position where template registration was executed when the pair of end effector EF1 and camera CAM1 was located in the past.
  • the position p6 indicates whether or not to register the image captured by the camera CAM1 at the position p6 as a template in relation to the template registered at the scheduled registration position (that is, the immediately previous registration position (for example, position p5)). (position subject to judgment).
  • Position p7 indicates the current (latest) position of the pair of end effector EF1 and camera CAM1. Coordinates indicating the three-dimensional positions of positions p1 to p7 are input to the image processing device 10 from the actuator ACT1.
  • the template display area SD2 to be registered displays the captured image IMG6 to be registered as a template showing the captured image (input image) captured by the camera CAM1 at the scheduled registration position (see above) together with the product number (for example, "XX38YZ1X”).
  • This captured image IMG6 to be registered includes newly extracted feature points (see circles) obtained by the feature matching unit 122 among all the feature points extracted by the feature extraction unit 121 of the processor 12, and the immediately preceding feature points (see circles).
  • the feature points extracted using the template are shown in a distinguishable manner. Therefore, by viewing the template display area SD2 to be registered, the user can visually determine the number or proportion of newly extracted feature points in the captured image IMG6 to be registered. It is possible to easily decide whether or not the image IMG6 should be registered as a template.
  • the registered template display area SD3 displays template registration images TPL1, TPL2, . . . when template registration was executed at past registration positions (positions p1 to p5 in the example of FIG. 4).
  • Each of the template registration images TPL1, TPL2, ... displays each of the corresponding templates IMG1, IMG2, ... in association with the position of the camera CAM1 that captured the template (that is, the three-dimensional coordinates of the corresponding registered position).
  • a template registration image TPL1 including a template IMG1 in which a captured image captured by camera CAM1 is registered at three-dimensional coordinates P1Z (0, 0, 0) corresponding to position p1, corresponds to position p2.
  • a template IMG2 in which a captured image captured by the camera CAM1 at three-dimensional coordinates P2Z (1, 0, 0) is registered are shown.
  • the user can display other registered template images by dragging the scroll bars SCB1 and SCB2 as appropriate to scroll.
  • the registration button BT1 is a button that is pressed by a user operation when registering the captured image IMG6 scheduled for registration displayed in the template display area SD2 scheduled for registration as a template. That is, the processor 12 of the image processing device 10 can register the captured image IMG6 to be registered as a template by detecting that the registration button BT1 has been pressed by a user operation.
  • the discard button BT2 is a button that is pressed by a user operation when not registering the captured image IMG6 scheduled for registration displayed in the template display area SD2 scheduled for registration as a template. That is, by detecting that the discard button BT2 has been pressed by the user's operation, the processor 12 of the image processing device 10 can avoid registering the captured image IMG6 scheduled for registration as a template.
  • the image processing device 10 uses the input image of the object OB1 captured by the camera CAM1, which is capable of capturing and moving the object OB1, and the position information of the camera CAM1.
  • Information based on the input image of the object OB1 and the communication interface 11 to be acquired are used as a template for template matching, and the position information of the camera CAM1 and information based on the input image of the object OB1 are associated and registered in the template registration device 40.
  • a control unit 126 is provided.
  • the information based on the input image is, for example, data of a template (image) or data in which the template is compressed (for example, thumbnails, etc.) and feature amounts of a plurality of feature points extracted from the template by the feature extraction unit 121. be.
  • the image processing device 10 can register a highly accurate template of the object that can be used for template matching even under a situation where the attitude of the object OB1 from the camera CAM1 changes as the camera CAM1 moves.
  • control unit 126 associates the positional information on the movement route map MP1 along which the camera CAM1 moves with information based on the input image of the object OB1 and registers them in the template registration device 40.
  • the image processing device 10 can register as a template the positional information of the camera CAM1, which can change by moving on the predetermined movement route map MP1, and the information based on the input image of the object OB1 in association with each other.
  • the image processing device 10 further includes a template registration determination unit 125 that determines whether or not a template can be registered.
  • the template registration determination unit 125 determines whether a template can be registered for each position information of the camera CAM1.
  • the image processing device 10 can register many types of templates with different postures, taking into account that the appearance (in other words, posture) of the object OB1 changes every time the camera CAM1 moves. It can contribute to improving accuracy.
  • the image processing device 10 also includes a feature extraction unit 121 that extracts the features of the object OB1 from the input image, and a feature extraction unit 121 that extracts the features of the object OB1 from the input image, and a feature extraction unit 121 that extracts the features of the object OB1 from the input image.
  • a feature matching unit 122 that performs matching processing with the feature point extraction results;
  • a template registration determining unit 125 that determines whether or not a template can be registered based on the matching results of the feature matching unit 122 and the position information of the camera CAM1; Furthermore, it is equipped with. Thereby, the image processing device 10 can determine with high accuracy whether or not the template can be registered by comparing the characteristics of the object OB1 appearing in each of the input image and the template.
  • the image processing device 10 also generates a first index (for example, MoS) indicating the difference between the position of the camera CAM1 when the template was imaged and the position of the camera CAM1 when the input image was imaged, and the object OB1 in the template.
  • the image forming apparatus further includes an index calculation unit that calculates a second index (for example, MaS) indicating the image correlation between the features of the object OB1 in the input image and the features of the object OB1 in the input image.
  • the index calculation unit corresponds to, for example, the MoS calculation unit 123 and the MaS calculation unit 124.
  • the template registration determination unit 125 determines the template based on the relationship between at least one of the calculation results of the first index and the second index and a threshold value (for example, threshold Th1 or threshold Th2) stored in advance in the memory 13. Determine whether registration is possible. Thereby, the image processing device 10 can appropriately determine whether or not the input image may be registered as a template using at least one of MoS and MaS.
  • a threshold value for example, threshold Th1 or threshold Th2
  • the template registration determination unit 125 determines that at least one of the calculation results of the first index and the second index (for example, at least one of MoS and MaS) is less than a threshold value (for example, threshold Th1 or threshold Th2). If it is determined that the input image is to be registered as a template in the template registration device 40. Thereby, when the index is MoS, for example, if MoS is less than the threshold Th1, the difference between the template registration position immediately before the camera CMA1 and the current scheduled registration position is large, so the image processing device 10 converts the input image into the template. By registering a new template as , it is possible to avoid deterioration in accuracy due to the use of previously registered templates for template matching.
  • a threshold value for example, threshold Th1 or threshold Th2
  • the image processing device 10 uses the input image as a template. By newly registering, it is possible to avoid deterioration in accuracy due to the use of previously registered templates for template matching.
  • the template registration determination unit 125 determines that at least one of the calculation results of the first index and the second index (for example, at least one of MoS and MaS) is equal to or greater than a threshold value (for example, threshold Th1 or threshold Th2). If it is determined that the input image is not to be registered as a template in the template registration device 40. Thereby, for example, when the index is MoS, if MoS is equal to or greater than the threshold Th2, the difference between the immediately previous template registration position of camera CMA1 and the current scheduled registration position is small, so the image processing device 10 determines that the template has not been registered in the past. Template matching can be performed with high accuracy by reusing existing templates.
  • the index is MaS
  • the threshold Th2 the difference between the template registration position immediately before the camera CMA1 and the current scheduled registration position is small, so the image processing device 10 determines that the index has not been registered in the past.
  • Template matching can be performed with high accuracy by reusing existing templates.
  • the template is an input image of the object OB1 captured by the camera CAM1 at the immediately previous registered position.
  • the image processing device 10 can use as a template the input image of the object OB1 that was imaged at the immediately previous registered position where it can be considered that the amount of movement of the camera CAM1 is not large. It is possible to appropriately determine whether or not the captured input image may be registered as a template.
  • the image processing device 10 further includes a feature extraction unit 121 that extracts features of the object OB1 from the input image.
  • the template registration determination unit 125 displays the input image in such a way that the features of the object OB1 extracted in the template and the features of the object OB1 newly extracted in the input image can be distinguished (for example, colored in different colors). 30. With this, the user can visually check the newly extracted feature points by comparing them with the feature points in the template among the feature points extracted in the input image of the planned registration position, so the user can input the planned registration position. It is possible to appropriately judge whether or not an image should be registered as a template.
  • the template registration determination unit 125 displays on the display 30 a movement route map MP1 of the camera CAM1 indicating the registered position of at least one template. Thereby, the user can visually confirm the moving route of the camera CAM1 along the moving route map MP1 and the position information of the point where the template was registered in order to register the template.
  • the template registration determination unit 125 displays the template on the display 30 in association with the position information of the camera CAM1 indicating the registration position of the template. Thereby, the user can visually check not only the list of templates registered in the past but also the posture of the object OB1 reflected in each template.
  • an object recognition device creates hierarchical template sets, performs rough recognition using a low-resolution template set, and uses the results to perform detailed recognition using a high-resolution template set. Performs hierarchical search such as recognition.
  • Embodiment 2 a template matching device and a template matching method that realize highly accurate template matching of an object even in a situation where the orientation of the object from the imaging device changes as the imaging device moves, will be described. and an example of a template matching system.
  • a part an example of an object OB1 to be picked by an end effector EF1 such as a robot hand is selected using a template registered by the method described in the first embodiment.
  • a correct part for example, a part used in the production of an industrial product or not is determined by template matching.
  • a template matching device communicates with a storage unit that stores a plurality of templates of an object in association with position information of an imaging device that can image and move a target object, and stores position information of the imaging device.
  • a prediction process is performed to predict the template to be used for template matching of the object from among the plurality of templates stored in the storage unit, and the image of the object imaged by the imaging device is Template matching is performed using the input image and template prediction results.
  • FIG. 5 is a block diagram showing a detailed internal configuration example of the picking system 100A according to the second embodiment.
  • the picking system 100A (an example of a template matching system) includes an actuator ACT1, a camera CAM1, an image processing device 10A, an operating device 20, a display 30, and a template registration device 40.
  • the actuator ACT1 and the image processing device 10A between the camera CAM1 and the image processing device 10A, between the image processing device 10A and the operation device 20, and between the image processing device 10A and the display 30.
  • the image processing device 10A and the template registration device 40 are connected to each other so that data signals can be input and output (transmission and reception).
  • the image processing device 10A (an example of a template matching device) is capable of executing a predetermined process (see FIG. 6) using the position information from the actuator ACT1 and the captured image (input image) of the object OB1 from the camera CAM1. Constructed by computer.
  • the image processing device 10 may be a PC (Personal Computer), or may be a dedicated hardware device specialized for the above-mentioned predetermined processing.
  • the image processing device 10A performs the above-described predetermined processing to predict a template to be used for template matching of the captured image input from the camera CAM1, and uses the predicted template and the input captured image to create a template. Perform matching. Further, the image processing device 10 generates a matching result screen WD2 (see FIG.
  • the image processing device 10A generates a control command for instructing the movement of the end effector EF1 and the camera CAM1 according to the template matching result and a predetermined movement route map (see FIG. 7), and sends it to the actuator ACT1. Good too.
  • the template registration device 40 (an example of a storage unit) is, for example, a flash memory, an HDD, or an SSD.
  • the template registration device 40 stores the data of the template (image) registered to be used for template matching by the method described in the first embodiment, and the position information (3) of the camera CAM1 that captured the captured image corresponding to the template. dimensional position) and stored non-temporarily.
  • the data of each template stored in the template registration device 40 includes template (image) data or compressed data of the template, and position information and feature amount of the camera CAM1 that captured the captured image corresponding to the template. and position information of a plurality of feature points extracted by the feature extraction unit 121 for the template.
  • the image processing device 10A includes at least a communication interface 11, a processor 12A, and a memory 13.
  • the communication interface 11, the processor 12A, and the memory 13 are connected via a data transmission bus (not shown) so that data signals can be input and output to each other.
  • the processor 12A is, for example, a CPU, GPU, DSP, or FGPA.
  • the processor 12A functions as a controller that controls the overall operation of the image processing device 10A, and performs control processing to oversee the operations of each part of the image processing device 10A, and input/output of data between each part of the image processing device 10A. Performs processing, data calculation processing, and data storage processing.
  • the processor 12A operates according to programs and control data stored in the memory 13, uses the memory 13 during operation, temporarily stores data or information generated or acquired by the processor 12A in the memory 13, and performs communication. It is sent to an external device (for example, display 30, template registration device 40, actuator ACT1) via the interface 11.
  • the processor 12A operates the feature extraction unit 121, feature matching unit 122, control unit 126, position fitting unit 127, template prediction unit 128, and template update determination unit 129 according to the program and control data stored in the memory 13. It can be realized functionally.
  • the position fitting unit 127 determines the position of the object OB1 reflected in the captured image (input image) captured at the current position of the camera CAM1 (see FIG. 7) based on the matching result by the feature matching unit 122 (see FIG. 7). Perform a fitting process to approximate.
  • the position of the object OB1 is, for example, a circular range having a predetermined diameter around the center position of the object OB1.
  • the result of this fitting process is referred to, for example, when the control unit 126 generates the matching result screen WD2.
  • the template prediction unit 128 uses position information (that is, the amount of movement of the camera CAM1) consisting of three-dimensional coordinates of the camera CAM1 that is constantly or periodically sent from the actuator ACT1 and the previous (immediately) feature matching unit. Based on one or both of the results of the matching process performed by the feature matching unit 122, a template for template matching to be used by the feature matching unit 122 is predicted from among the plurality of templates registered in the template registration device 40. For example, the template prediction unit 128 predicts a registered template corresponding to the position information as a template for template matching based on position information consisting of three-dimensional coordinates of the camera CAM1.
  • the template prediction unit 128 calculates MaS (see Embodiment 1) using the result of the previous (immediate) matching process, and determines that this MaS is equal to or greater than the threshold Th3 stored in the memory 13, for example.
  • the feature matching unit 122 predicts the template used for template matching as a template for template matching. Note that the template prediction method by the template prediction unit 128 does not need to be limited to the method described above.
  • the template update determination unit 129 selects a template specified by the operation device 20 based on a user's operation as a template to be used for the next matching process by the feature matching unit 122, or a template prediction unit 128. It is determined whether to use the template predicted by . For example, in the case of a frame from the first camera CAM1, the template update determination unit 129 determines that the template specified by the operating device 20 based on the user's operation is the template to be used for the next matching process by the feature matching unit 122. It is determined that a template is used. In the case of frames from the second and subsequent cameras CAM1, the template update determination unit 129 determines whether to use the template predicted by the template prediction unit 128 as the template to be used in the next matching process by the feature matching unit 122. do.
  • FIG. 6 is a flowchart illustrating an example of a template matching operation procedure performed by the image processing apparatus 10A according to the second embodiment.
  • the processing shown in FIG. 6 is mainly executed by the processor 12A of the image processing device 10A.
  • the processor 12A inputs and acquires a captured image (input image) from the camera CAM1 (step St21), and further inputs and acquires at least the position information of the camera CAM1 from the actuator ACT1 (step St22).
  • the processor 12A extracts the features of the captured image (input image) acquired in step St21 (step St23).
  • step St24 If the frame is from the first camera CAM1 (step St24, YES), the processor 12A selects the user's operation from among the registered templates at the registered position on the movement route map MP2 displayed on the matching result screen WD2. The selected template is obtained (step St25). After step St25, the process of the processor 12A proceeds to step St27.
  • the processor 12A determines the three-dimensional coordinates of the camera CAM1 (that is, The feature matching unit 122 selects one of the plurality of templates registered in the template registration device 40 based on the amount of movement (the amount of change in position information) and the result of the previous (immediate) matching process by the feature matching unit 122.
  • a template for template matching to be used is predicted (Step St26).
  • the processor 12A reads out and acquires the predicted template (that is, the registered template) from the template registration device 40 (Step St26).
  • the processor 12A performs template matching of the object OB1 using the captured image (input image) acquired in step St23 and the template prediction result (that is, registered template) acquired in step St26 (step St27).
  • the processor 12A performs a fitting process to approximate the position of the object OB1 based on the template matching process result (matching result) in step St27 (step St28).
  • the processor 12A displays the template matching processing results and the fitting processing results on the matching result screen WD2.
  • the processor 12A adjusts and determines the amount of movement of the end effector EF1 and the camera CAM1 based on the results of the fitting process in step St28 (step St29). Furthermore, the processor 12A generates a control command for controlling the movement of the end effector EF1 and the camera CAM1, and sends it to the actuator ACT1 via the communication interface 11 (Step St29). Based on a control command from the image processing device 10, the actuator ACT1 controls the movement of the end effector EF1 and the camera CAM1 by a movement amount determined by the control command.
  • step St30, YES If the processor 12A determines that the moving operation of the end effector EF1 and the camera CAM1 is continuing by the actuator ACT1 (step St30, YES), the processing of the processor 12 returns to step St21. On the other hand, if the processor 12A determines that the moving operation of the end effector EF1 and the camera CAM1 by the actuator ACT1 is not continuing (step St30, NO), the processing of the processor 12A shown in FIG. 6 ends.
  • step St28 or step St29 the processor 12A visually informs the user of the matching result at the current position of the camera CAM1 by displaying the matching result screen WD2 shown in FIG. 7 on the display 30. Good too.
  • FIG. 7 is a diagram showing an example of the matching result screen WD2 displayed on the display in the second embodiment.
  • the matching result screen WD2 is generated, for example, by the control unit 126 of the processor 12A.
  • the matching result screen WD2 includes a travel route map display area SD1A, a matching result display area SD4, a registered template display area SD3A, and a use button BT3.
  • the movement route map display area SD1A displays a movement route map MP2 indicating the movement route (movement history) of the pair of end effector EF1 and camera CAM1.
  • Each of the positions p1, p2, p3, p4, p5, p7, p8, p9, p10, p11, p12, p13, p14, and p15 indicates that the template was registered in the past when the pair of end effector EF1 and camera CAM1 was located. indicates the position executed.
  • the position p6 is the current position of the end effector EF1 and the camera CAM1 on the moving route RL1, and is the current position of the end effector EF1 and the camera CAM1 when the matching result screen WD2 of FIG.
  • Coordinates indicating the three-dimensional positions of positions p1 to p5 and p7 to p15 are input to the image processing apparatus 10 from the template registration device 40 in which template data (see above) is registered.
  • the coordinates indicating the current position p6 are input to the image processing device 10 from the actuator ACT1.
  • the matching result display area SD4 displays a captured image IMG6 of an object with a product number (for example, "XX38YZ1X”) captured by the camera CAM1 at the current position (for example, position p6) and a template TPL5 used for template matching (for example, at the current position). (template corresponding to the previous position p5).
  • the registered template display area SD3A includes template registration images TPL1, TPL2, ..., TPL7, TPL8 when template registration was executed at past registration positions (positions p1 to p5, p7 to p15 in the example of FIG. 4). , TPL9, TPL10,... are displayed.
  • Each of the template registration images TPL1, TPL2, ..., TPL7, TPL8, TPL9, TPL10, ... corresponds to each of the corresponding templates IMG1, IMG2, ..., IMG7, IMG8, IMG9, IMG10, ... by the camera that imaged the template. It is displayed in association with the position of CAM1 (that is, the three-dimensional coordinates of the corresponding registered position).
  • CAM1 that is, the three-dimensional coordinates of the corresponding registered position.
  • Template registration image TPL8 including template IMG8 in which the image is registered, template registration including template IMG9 in which the captured image captured by camera CAM1 at three-dimensional coordinates P9Z (0, 0, 2) corresponding to position p9 is registered.
  • Template registration images TPL2, . . . including an image TPL9, a template IMG10 in which a captured image captured by the camera CAM1 at three-dimensional coordinates P10Z (1, 0, 2) corresponding to the position p10 are registered are shown.
  • the user can display other registered template images by dragging the scroll bars SCB1 and SCB2 as appropriate to scroll.
  • the use button BT3 is a button that is pressed when a template registered image selected by a user operation from among the template registered images displayed in the registered template display area SD3A is used for template matching. That is, the processor 12 of the image processing device 10 performs template matching on the selected template image by detecting that one of the template images is selected by the user's operation and the use button BT3 is pressed. Can be used.
  • the image processing device 10A performs template registration that stores a plurality of templates of the object OB1 in association with position information of the camera CAM1 that can image and move the object OB1.
  • a communication unit (for example, communication interface 11) that communicates with the device 40, an acquisition unit (for example, communication interface 11) that acquires the position information of the camera CAM1, and a template registration device 40 based on the position information of the camera CAM1.
  • a template prediction unit 128 performs a prediction process to predict a template to be used for template matching of the object OB1 from among a plurality of stored templates, and a template prediction unit 128 performs a prediction process of predicting the template and the input image of the object OB1 captured by the camera CAM1. and a matching unit (eg, feature matching unit 122) that performs template matching using the results.
  • a matching unit eg, feature matching unit 122
  • the feature matching unit 122 performs template matching using the template specified by the operating device 20. Thereby, the image processing apparatus 10A can efficiently perform template matching using the template selected by the user using the operating device 20, for example, even when performing template matching for the first time.
  • the template prediction unit 128 acquires position information of the camera CAM1 every time the camera CAM1 moves, and performs template prediction processing using the acquired position information. Thereby, the image processing device 10A can predict and select an appropriate template to be used for template matching every time the camera CAM1 moves.
  • the image processing device 10A further includes a feature extraction unit 121 that extracts features of the object OB1 from the input image.
  • the feature matching unit 122 performs template matching, which is a matching process between the features of the object OB1 appearing in the result of the template prediction process and the extraction result of the features of the object OB1 appearing in the input image. Thereby, the image processing device 10A can predict an appropriate template to be used for template matching by comparing the features of the object OB1 appearing in each of the input image and the template.
  • the image processing device 10A also performs a template update determination to determine whether or not to update the template used for template matching based on either the moving direction based on the position information of the camera CAM1 or the result of the matching comparison process.
  • the apparatus further includes a section 129. Thereby, the image processing device 10A can appropriately determine whether or not it is necessary to update the template used for template matching (in other words, switch to another template).
  • the feature matching unit 122 performs template matching using the same template while the camera CAM1 is moving in a certain range.
  • the image processing device 10A can consider that the appearance (in other words, the posture) of the object OB1 as seen from the camera CAM1 is almost unchanged if the camera CAM1 is moving over a certain range such as a minute distance. This makes it possible to use the template currently in use as is, thereby suppressing an increase in the processing load required to determine whether or not to update the template or to update the template.
  • the image processing device 10A further includes a feature extraction unit 121 that extracts the features of the object OB1 from the input image, and a control unit 126 that displays the input image and the result of the template prediction process in contrast. Be prepared.
  • the control unit 126 identifiably connects and displays the same feature points of the features of the object OB1 extracted in the result of the template prediction process and the features of the object OB1 extracted in the input image. .
  • the user can visually judge the matching status of the feature points (for example, the number and proportion of matching feature points) contrastively displayed on the display 30, and can compare the captured image of the current position of the camera CAM1 with the template. It is possible to visually determine which feature points match the template used for matching and to what extent they match.
  • the image processing device 10A further includes a control unit 126 that displays the moving route map MP2 of the camera CAM1 on the display 30. Thereby, the user can visually determine what route the end effector EF1 is moving to pick the object OB1 in the picking system 100A.
  • the image processing apparatus 10A further includes a control unit 126 that displays, for each template registered in the template registration device 40, the position information of the camera CAM1 indicating the registration position of the template in association with the template on the display 30. Thereby, the user can visually check not only the list of templates registered in the past but also the posture of the object OB1 reflected in each template.
  • the present disclosure provides a template registration device, a template registration method, and a template registration device that registers a highly accurate template of a target that can be used for template matching even in a situation where the posture of the target from the imaging device changes as the imaging device moves. It is useful as a template registration system.
  • Template registration device 100, 100A Picking system 121 Feature extraction unit 122 Feature matching unit 123 MoS calculation unit 124 MaS calculation unit 125 Template registration determination unit 126 Control unit 127 Position fitting unit 128 Template prediction unit 129 Template update determination unit ACT1 Actuator CAM1 Camera

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Mechanical Engineering (AREA)
  • Robotics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

テンプレート登録装置は、対象物を撮像かつ移動が可能な撮像装置により撮像された対象物の入力画像と撮像装置の位置情報とを取得する取得部と、対象物の入力画像に基づく情報をテンプレートマッチングに用いるテンプレートとして、撮像装置の位置情報と対象物の入力画像に基づく情報とを関連付けて記憶部に登録する制御部と、を備える。

Description

テンプレート登録装置、テンプレート登録方法およびテンプレート登録システム
 本開示は、テンプレート登録装置、テンプレート登録方法およびテンプレート登録システムに関する。
 工場内の生産工程では、ロボットハンド等のエンドエフェクタによりピッキングしようとする部品が正しい部品(例えば工業製品の生産に使用する部品)であるか否かを判定することがある。このような判定の際には、判定処理をできるだけ高速に行うことにより生産工程のタクトタイムを低下させないことが求められる。従来の判定処理として、例えば予め用意された部品のテンプレート(例えば画像)と工場内に設置されたカメラにより撮像された部品の画像とを比較してマッチング処理するテンプレートマッチング法が知られている。
 特許文献1は、テンプレートマッチングにより物体の認識を行う物体認識装置で用いられるテンプレートのセットを作成するテンプレート作成装置を開示している。テンプレート作成装置は、一つの物体の異なる姿勢に対する複数の画像のそれぞれから複数のテンプレートを取得し、複数のテンプレートから選ばれる2つのテンプレート間の画像特徴の類似度を計算し、類似度に基づき複数のテンプレートを複数のグループに分けるクラスタリングを行う。テンプレート作成装置は、複数のグループのそれぞれについてグループ内の全てのテンプレートを1つの統合テンプレートへ統合し、グループごとに統合テンプレートを有したテンプレートセットを生成する。
日本国特開2016-207147号公報
 特許文献1では、テンプレート作成装置を備える物体認識装置がカメラから取り込まれた画像を用いてコンベア上の物体を認識し、カメラ自体は生産ライン等に対して移動不能な固定箇所に設置されていることが想定されている。また、物体認識装置が実際にマッチング処理を行う際、グループごとの統合テンプレートからなるテンプレートセットがそのまま使用される。
 ところが、上述した工場内の生産工程においてエンドエフェクタによりピッキングしようとする部品が正しい部品であるかを判定するためにエンドエフェクタおよびカメラを移動させてピッキングしようとする部品をカメラで撮像する際に、特許文献1の技術を適用しようとすると次のような課題が生じる。具体的には、エンドエフェクタの移動に伴ってカメラも移動するとなると、エンドエフェクタの位置変化に伴ってカメラからの部品の見え方(言い換えると、部品の姿勢)が変化する。このため、テンプレートマッチングの際に、エンドエフェクタの位置(言うなれば、カメラの位置)を考慮しなければ、予め生成されたテンプレートセットを使っても効率的なテンプレートマッチングを行うことができず、テンプレートマッチングの信頼性も向上しない。
 本開示は、従来の事情に鑑みて案出され、撮像装置の移動に伴って撮像装置からの対象物の姿勢が可変となる状況下でもテンプレートマッチングに使用可能な対象物の高精度なテンプレートを登録するテンプレート登録装置、テンプレート登録方法およびテンプレート登録システムを提供することを目的とする。
 本開示は、対象物を撮像かつ移動が可能な撮像装置により撮像された前記対象物の入力画像と前記撮像装置の位置情報とを取得する取得部と、前記対象物の入力画像に基づく情報をテンプレートマッチングに用いるテンプレートとして、前記撮像装置の位置情報と前記対象物の入力画像に基づく情報とを関連付けて記憶部に登録する制御部と、を備える、テンプレート登録装置を提供する。
 また、本開示は、テンプレート登録装置により実行されるテンプレート登録方法であって、対象物を撮像かつ移動が可能な撮像装置により撮像された前記対象物の入力画像と前記撮像装置の位置情報とを取得するステップと、前記対象物の入力画像に基づく情報をテンプレートマッチングに用いるテンプレートとして、前記撮像装置の位置情報と前記対象物の入力画像に基づく情報とを関連付けて記憶部に登録するステップと、を有する、テンプレート登録方法を提供する。
 また、本開示は、対象物を撮像かつ移動が可能な撮像装置と、前記撮像装置との間で通信可能に接続されるテンプレート登録装置と、を備え、前記テンプレート登録装置は、前記撮像装置により撮像された前記対象物の入力画像と前記撮像装置の位置情報とを取得する取得部と、前記対象物の入力画像に基づく情報をテンプレートマッチングに用いるテンプレートとして、前記撮像装置の位置情報と前記対象物の入力画像に基づく情報とを関連付けて記憶部に登録する制御部と、を備える、テンプレート登録システムを提供する。
 本開示によれば、撮像装置の移動に伴って撮像装置からの対象物の姿勢が可変となる状況下でもテンプレートマッチングに使用可能な対象物の高精度なテンプレートを登録できる。
ピッキングシステムの構成例を簡易的に示す図 実施の形態1に係るピッキングシステムの詳細な内部構成例を示すブロック図 実施の形態1に係る画像処理装置によるテンプレートの登録の動作手順例を示すフローチャート 実施の形態1においてディスプレイに表示されるテンプレート登録画面の一例を示す図 実施の形態2に係るピッキングシステムの詳細な内部構成例を示すブロック図 実施の形態2に係る画像処理装置によるテンプレートマッチングの動作手順例を示すフローチャート 実施の形態2においてディスプレイに表示されるマッチング結果画面の一例を示す図
(実施の形態1に至る経緯)
 日本国特開2016-207147号公報では、テンプレート作成装置を備える物体認識装置がカメラから取り込まれた画像を用いてコンベア上の物体を認識し、カメラ自体は生産ライン等に対して移動不能な固定箇所に設置されていることが想定されている。また、物体認識装置が実際にマッチング処理を行う際、グループごとの統合テンプレートからなるテンプレートセットがそのまま使用される。
 ところが、上述した工場内の生産工程においてエンドエフェクタによりピッキングしようとする部品が正しい部品であるかを判定するためにエンドエフェクタおよびカメラを移動させてピッキングしようとする部品をカメラで撮像する際に、日本国特開2016-207147号公報の技術を適用しようとすると次のような課題が生じる。具体的には、エンドエフェクタの移動に伴ってカメラも移動するとなると、エンドエフェクタの位置変化に伴ってカメラからの部品の見え方(言い換えると、部品の姿勢)が変化する。このため、テンプレートマッチングの際に、エンドエフェクタの位置(言うなれば、カメラの位置)を考慮しなければ、予め生成されたテンプレートセットを使っても効率的なテンプレートマッチングを行うことができず、テンプレートマッチングの信頼性も向上しない。
 そこで、以下の実施の形態1では、撮像装置の移動に伴って撮像装置からの対象物の姿勢が可変となる状況下でもテンプレートマッチングに使用可能な対象物の高精度なテンプレートを登録するテンプレート登録装置、テンプレート登録方法およびテンプレート登録システムの例を説明する。
 以下、添付図面を適宜参照しながら、本開示に係るテンプレート登録装置、テンプレート登録方法およびテンプレート登録システムを具体的に開示した実施の形態を詳細に説明する。但し、必要以上に詳細な説明は省略する場合がある。例えば、既によく知られた事項の詳細説明や実質的に同一の構成に対する重複説明を省略する場合がある。これは、以下の説明が不必要に冗長になるのを避け、当業者の理解を容易にするためである。なお、添付図面及び以下の説明は、当業者が本開示を十分に理解するために提供されるのであって、これらにより特許請求の範囲に記載の主題を限定することは意図されていない。
(実施の形態1:概要)
 実施の形態1では、例えば工場内の生産工程において、ロボットハンド等のエンドエフェクタによりピッキングしようとする部品(例えば工業製品の生産に使用する部品)を正しく認識するか否かをテンプレートマッチングによって判定するに際して、テンプレートマッチングに必要となるテンプレートを登録するユースケースを例示して説明する。本開示に係るテンプレート登録装置(例えば画像処理装置)は、対象物を撮像かつ移動が可能な撮像装置により撮像された対象物の入力画像に基づく情報(後述参照)と撮像装置の位置情報とを取得し、対象物の入力画像に基づく情報(後述参照)をテンプレートマッチングに用いるテンプレートとして、撮像装置の位置情報と対象物の入力画像に基づく情報(後述参照)とを関連付けて記憶部に登録する。
(実施の形態1:詳細)
 図1は、ピッキングシステム100の構成例を簡易的に示す図である。図2は、実施の形態1に係るピッキングシステム100の詳細な内部構成例を示すブロック図である。図2に示すように、ピッキングシステム100(テンプレート登録システムの一例)は、アクチュエータACT1と、カメラCAM1と、画像処理装置10と、操作デバイス20と、ディスプレイ30と、テンプレート登録デバイス40とを含む。アクチュエータACT1と画像処理装置10との間、カメラCAM1と画像処理装置10との間、画像処理装置10と操作デバイス20との間、画像処理装置10とディスプレイ30との間、画像処理装置10とテンプレート登録デバイス40との間は、それぞれデータ信号の入出力(送受信)が可能となるように接続されている。
 アクチュエータACT1の制御に基づくカメラCAM1と対象物OB1との間の位置関係について、図1を参照して説明する。なお、図1の説明は、実施の形態1だけでなく後述する実施の形態2にも同様に適用可能である。
 以下の説明において、対象物OB1は、工場内に配備されるピッキングシステム100のエンドエフェクタEF1によりピッキングされる対象物であり、例えば工業部品、工業製品である。工業部品であれば、例えばピッキングされた後に完成品を組み立てるために別のレーン(生産ライン)に移動される。工業製品であれば、例えばピッキングされた後に段ボール等の箱に収納される。なお、対象物OB1の種類は上述した工業部品、工業製品に限定されないことは言うまでもない。
 図1に示すように、アクチュエータACT1は、カメラCAM1を3次元的に移動可能に制御することにより、工場内の所定場所(例えば定盤FL1)に固定載置されている対象物OB1とカメラCAM1との間の位置関係を制御する。図1には、3次元位置(座標)を規定するため、X軸、Y軸およびZ軸からなる直交座標系が図示されている。なお、この直交座標系の原点は図1には図示が省略されている。X軸およびY軸が実空間上の水平面を構成し、Z軸は水平面に垂直な重力方向と平行な方向を示す。X軸は図1の紙面左右方向であり、Y軸はX軸に垂直な方向(言い換えると、図1の直交座標系の奥行き方向)である。
 定盤FL1は、例えば床面等の水平な面を示すものであれば、その種類は特に限定されない。カメラCAM1の被写体である対象物OB1は、この定盤FL1上に固定載置されており、カメラCAM1とともに移動するエンドエフェクタEF1(例えばロボットハンド)によりピッキングされる。
 アクチュエータACT1は、X軸方向に延伸しているXレールXRL1に沿って移動可能なXアームXDR1、Y軸方向に延伸しているYレール(図示略)に沿って移動可能なYアームYDR1、Z軸方向に延伸しているZレールZRL1に沿って移動可能なZアームZDR1のそれぞれを個別に移動可能に制御する。つまり、アクチュエータACT1は、画像処理装置10から送られる制御指令を基にしてエンドエフェクタEF1およびカメラCAM1のそれぞれの3次元位置(座標)を認識、維持、変更を制御可能であり、エンドエフェクタEF1およびカメラCAM1のそれぞれの3次元位置を示す座標(位置情報の一例)を画像処理装置10に常時あるいは周期的に送る。
 エンドエフェクタEF1は、例えばピッキングシステム100に対応して配備されたロボットアーム(図示略)の先端部に設けられているロボットハンドであり、アクチュエータACT1の制御によって対象物OB1に近づくように移動し、対象物OB1をピッキングすることができる。
 カメラCAM1(撮像装置の一例)は、エンドエフェクタEF1のすぐ近傍に配置され、アクチュエータACT1の制御によって対象物OB1に近づくようにエンドエフェクタEF1とペアを構成して移動し、画角(言い換えると、視野範囲FV1)内に含まれる対象物OB1を撮像することができる。カメラCAM1は、視野範囲FV1内の被写体である対象物OB1を所定のフレームレートで撮像し、この撮像の度に得られた対象物OB1の撮像画像(入力画像の一例)を都度、画像処理装置10に送る。
 画像処理装置10(テンプレート登録装置の一例)は、アクチュエータACT1からの位置情報とカメラCAM1からの対象物OB1の撮像画像(入力画像)とを用いて所定の処理(図3参照)を実行可能なコンピュータにより構成される。例えば、画像処理装置10は、PC(Personal Computer)でもよいし、上述した所定の処理に特化した専用のハードウェア機器でもよい。画像処理装置10は、上述した所定の処理を行うことにより、カメラCAM1から入力されてくる撮像画像のうち一部の撮像画像を、対象物OB1のテンプレートマッチング(実施の形態2参照)に用いるテンプレートとしてテンプレート登録デバイス40に登録(保存)する。また、画像処理装置10は、テンプレートの登録の可否をユーザ(例えばテンプレートの登録に関する操作を行う人物)に委ねるために、テンプレートの登録に関するテンプレート登録画面WD1(図4参照)を生成してディスプレイ30に表示する。このため、画像処理装置10は、テンプレート登録画面WD1へのユーザ操作に基づいて、登録予定のテンプレート(図4参照)の登録を決定してもよいし、そのテンプレートを破棄してもよい。また、画像処理装置10は、テンプレートマッチング結果と所定の移動経路マップ(図4参照)とにしたがって、エンドエフェクタEF1およびカメラCAM1の移動を指令するための制御指令を生成してアクチュエータACT1に送ってもよい。
 操作デバイス20は、ユーザ操作の入力を検知するインターフェースであり、例えばマウス、キーボードあるいはタッチパネルにより構成される。操作デバイス20は、ユーザ操作を受け付けると、その操作に基づく信号を生成して画像処理装置10に送る。
 ディスプレイ30は、画像処理装置10により生成された表示用画面(図4参照)を出力(表示)するデバイスであり、例えばLCD(Liquid Crystal Display)あるいは有機EL(Electroluminescence)デバイスにより構成される。
 テンプレート登録デバイス40(記憶部の一例)は、例えばフラッシュメモリ、HDD(Hard Disk Drive)あるいはSSD(Solid State Drive)である。テンプレート登録デバイス40は、画像処理装置10により登録すると決定されたテンプレート(画像)のデータを、そのテンプレートに相当する撮像画像を撮像したカメラCAM1の位置情報(3次元位置)と関連付けて非一時的に保存する。テンプレート登録デバイス40に保存される、それぞれのテンプレートのデータは、テンプレート(画像)のデータあるいはそのテンプレートが圧縮されたデータと、そのテンプレートに相当する撮像画像を撮像したカメラCAM1の位置情報と、そのテンプレートに対して特徴抽出部121(後述参照)によって抽出された複数の特徴点の位置情報および特徴量とを少なくとも有する。テンプレート(画像)のデータ、あるいは、テンプレートが圧縮されたデータ(例えばサムネイル等)とテンプレートに対して特徴抽出部121によって抽出された複数の特徴点の特徴量は、入力画像に基づく情報の一例である。なお、テンプレートの特徴点およびその特徴量は、登録されたものを使ってもよいし、都度参照する時に再計算して取得してもよい。
 ここで、画像処理装置10の内部構成について詳細に説明する。
 画像処理装置10は、通信インターフェース11と、プロセッサ12と、メモリ13とを少なくとも含む。通信インターフェース11と、プロセッサ12と、メモリ13とは、互いにデータ信号の入出力が可能となるようにデータ伝送バス(図示略)を介して接続されている。
 通信インターフェース11(取得部あるいは通信部の一例)は、アクチュエータACT1と画像処理装置10との間、カメラCAM1と画像処理装置10との間、画像処理装置10と操作デバイス20との間、画像処理装置10とディスプレイ30との間、画像処理装置10とテンプレート登録デバイス40との間のデータ信号の入出力(送受信)を行う通信回路である。添付図面では、インターフェースを「I/F」と略記している。通信インターフェース11は、アクチュエータACT1からの位置情報を常時あるいは周期的に受信してプロセッサ12あるいはメモリ13に一時的に保存する。通信インターフェース11は、カメラCAM1から都度入力されてくる撮像画像(例えば対象物OB1が映る画像)を受信してメモリ13に一時的に保存する。通信インターフェース11は、プロセッサ12により生成されるテンプレート登録画面(図4参照)をディスプレイ30に出力する。通信インターフェース11は、プロセッサ12により生成されるエンドエフェクタEF1およびカメラCAM1の移動に関する制御指令をアクチュエータACT1に送る。
 プロセッサ12は、例えばCPU(Central Processing Unit)、GPU(Graphical Processing Unit)、DSP(Digital Signal Processor)、あるいはFGPA(Field Programmable Gate Array)である。プロセッサ12は、画像処理装置10の全体的な動作を司るコントローラとして機能し、画像処理装置10の各部の動作を統括するための制御処理、画像処理装置10の各部との間のデータの入出力処理、データの演算処理およびデータの記憶処理を行う。プロセッサ12は、メモリ13に記憶されたプログラムおよび制御用データにしたがって動作したり、動作時にメモリ13を使用し、プロセッサ12が生成または取得したデータもしくは情報をメモリ13に一時的に保存したり通信インターフェース11を介して外部装置(例えばディスプレイ30、テンプレート登録デバイス40、アクチュエータACT1)に送ったりする。例えば、プロセッサ12は、メモリ13に記憶されたプログラムおよび制御用データにしたがって、特徴抽出部121、特徴マッチング部122、MoS計算部123、MaS計算部124、テンプレート登録判定部125およびコントロール部126を機能的に実現することができる。
 特徴抽出部121は、カメラCAM1から入力されてくる撮像画像を対象として、その撮像画像ごとに、その撮像画像から対象物OB1に関する複数の特徴点(つまり、対象物OB1が映る撮像画像の中で、例えば回転変化、スケール変化、輝度変化が最大となる等の画像上の特徴点的な位置)を抽出する。この抽出方法は、例えばSIFT(Scale-Invariant Feature Transform)等の公知のアルゴリズムを利用可能である。特徴抽出部121は、入力された1枚の撮像画像から複数個の特徴点を抽出し、その抽出結果(例えば撮像画像中における複数の特徴点のそれぞれの位置を示す点群データならびに特徴点ごとの特徴量。以下同様。)をプロセッサ12あるいはメモリ13に一時的に保存する。以下、特徴点の抽出結果(つまり、特徴点の位置情報および特徴量)を「特徴」と総称する場合がある。
 特徴マッチング部122は、アクチュエータACT1からの位置情報に対応するテンプレートをテンプレート登録デバイス40から通信インターフェース11を介して取得する。特徴マッチング部122は、特徴抽出部121による撮像画像上の特徴点の抽出結果とテンプレート登録デバイス40から得られたテンプレートとを用いて、対象物OB1のテンプレートマッチングを行う。例えば、特徴マッチング部122は、撮像画像上の特徴点の抽出結果を、テンプレート登録デバイス40からのテンプレート上の特徴点および特徴量と撮像画像上で新たに抽出された特徴点および特徴量とに区別可能に分離する。
 MoS計算部123(指標算出部の一例)は、テンプレートを撮像した時のカメラCAM1の位置とカメラCAM1から入力されてくる撮像画像を撮像した時のカメラCAM1の位置との差分(言い換えると、位置の類似度)を示す第1指標の一例としてのMoS(Moving Score)を算出する。このMoSは、カメラCAM1が登録予定位置(図4参照)に存在している時にカメラCAM1により撮像された撮像画像(入力画像)をテンプレートとしてテンプレート登録判定部125が登録するべきか否かを判定するために用いられる。つまり、既に登録されているテンプレートと類似度が高い撮像画像が入力されてもそのような撮像画像をテンプレートとして登録することを極力避けるために、画像処理装置10はMoSを算出する。MoS計算部123は、例えば式(1)の計算式によってMoSを算出する。
Figure JPOXMLDOC01-appb-M000001
 式(1)において、ptは、f番目のテンプレートになり得るフレーム(つまり撮像画像)を撮像した時のカメラCAM1もしくはエンドエフェクタEF1の位置を示す3次元の座標(x,y,z)である。fは、そのf番目のフレーム(つまり撮像画像)をテンプレートとして登録する予定の位置(登録予定位置)の番号を示し、例えば図4に示す位置P6に相当する。pttmは、tm番目のテンプレートであるフレーム(つまり撮像画像)を撮像した時のカメラCAM1もしくはエンドエフェクタEF1の位置を示す3次元の座標(xtm,ytm,ztm)である。tmは、直前にテンプレートが登録された時の番号(例えば登録順を示す番号)を示し、例えば図4に示す位置P5に相当する。つまり、MoSは、登録予定位置とその直前のテンプレート登録位置(図4参照)との差分の逆数により算出される。したがって、エンドエフェクタEF1およびカメラCMA1の直前のテンプレート登録位置と現在の登録予定位置との差分が大きい場合には、MoSが小さく、テンプレート登録判定部125は現在の登録予定位置の撮像画像をテンプレートとして登録すると判定(決定)する。一方、エンドエフェクタEF1およびカメラCMA1の直前のテンプレート登録位置と現在の登録予定位置との差分が小さい場合には、MoSが大きく、テンプレート登録判定部125は現在の登録予定位置の撮像画像をテンプレートとして登録しないと判定(決定)する。
 MaS計算部124(指標算出部の一例)は、テンプレート中の対象物OB1の特徴と撮像画像中の対象物OB1の特徴との間の画像相関(言い換えると、画像の類似度)を示す第2指標の一例としてのMaS(Matching Score)を算出する。このMaSは、カメラCAM1が登録予定位置(図4参照)に存在している時にカメラCAM1により撮像された撮像画像(入力画像)をテンプレートとしてテンプレート登録判定部125が登録するべきか否かを判定するために用いられる。MaS計算部124は、例えば式(2)の計算式によってMaSを算出する。式(2)のMは式(3)の条件にしたがう。式(2)において、FSは、j番目の特徴のマッチングスコアを示す。
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000003
 つまり、MaSは、直前のテンプレート登録位置(図4参照)に対応して登録されたテンプレート上の特徴と現在の登録予定位置(図4参照)に対応してカメラCAM1から入力された撮像画像上の特徴とのマッチング割合を示す。したがって、エンドエフェクタEF1およびカメラCMA1の直前のテンプレート登録位置のテンプレートの特徴と現在の登録予定位置の入力された撮像画像の特徴との差分が大きい場合には、マッチ(整合)する特徴同士の数が少ないためMaSが小さくなりやすいため(言い換えると、Mが0になるものが多い)、テンプレート登録判定部125は現在の登録予定位置の撮像画像をテンプレートとして登録すると判定(決定)する。一方、エンドエフェクタEF1およびカメラCMA1の直前のテンプレート登録位置のテンプレートの特徴と現在の登録予定位置のテンプレートの特徴との差分が小さい場合には、マッチ(整合)する特徴同士の数が多いためMaSが大きくなりやすいため(言い換えると、Mが0にならないものが多い)、テンプレート登録判定部125は現在の登録予定位置の撮像画像をテンプレートとして登録しないと判定(決定)する。
 テンプレート登録判定部125(登録判定部の一例)は、MoS計算部123によるMoSの算出結果とメモリ13に保存されている閾値Th1との比較結果、またはMaS計算部124によるMaSの算出結果とメモリ13に保存されている閾値Th2との比較結果を基に、現在の登録予定位置の撮像画像をテンプレートとして登録するか否かを判定(決定)する。テンプレート登録判定部125(制御部の一例)は、現在の登録予定位置の撮像画像をテンプレートとして登録すると判定(決定)した場合、その撮像画像のデータとその撮像画像を撮像したカメラCAM1の位置情報(登録予定位置)とその撮像画像に対して抽出された複数の特徴点の位置および特徴量を含む抽出結果とを少なくとも関連付けてテンプレート登録デバイス40に登録(保存)する。なお、テンプレート登録判定部125は、さらに直前のテンプレート登録位置と現在の登録予定位置との距離差分値とカメラCAM1の移動方向とを関連付けてテンプレート登録デバイス40に登録(保存)してもよい。
 コントロール部126は、プロセッサ12により実行される各種の処理の統合的な制御管理を司る。コントロール部126は、メモリ13に予め保存されている移動経路マップMP1(図4参照)にしたがって、エンドエフェクタEF1およびカメラCAM1の移動量分の移動に関する制御指令を生成し、通信インターフェース11を介してアクチュエータACT1に送る。アクチュエータACT1は、画像処理装置10から送られた制御指令を基に、エンドエフェクタEF1およびカメラCAM1を3次元的に移動するように制御する。コントロール部126は、テンプレートの登録に関するテンプレート登録画面WD1を生成し、通信インターフェース11を介してディスプレイ30に表示する。
 メモリ13は、例えばRAM(Random Access Memory)とROM(Read Only Memory)とを少なくとも含み、画像処理装置10の動作の実行に必要なプログラムおよび制御用データ、さらには、画像処理装置10の各部が処理の実行中に生成あるいは取得したデータを一時的に保持する。RAMは、例えば画像処理装置10の各部が処理の実行中に使用されるワークメモリである。ROMは、例えば画像処理装置10の各部の処理を規定するプログラムおよび制御用データを予め保持する。なお、メモリ13は、例えばフラッシュメモリ、HDD(Hard Disk Drive)あるいはSSD(Solid State Drive)をさらに備えてもよく、テンプレート登録デバイス40に登録(保存)されているテンプレート(図4参照)と同じデータを保存してもよい。
 次に、実施の形態1に係る画像処理装置10によるテンプレートの登録の動作手順例について、図3を参照して説明する。図3は、実施の形態1に係る画像処理装置10によるテンプレートの登録の動作手順例を示すフローチャートである。図3に示す処理は、主に画像処理装置10のプロセッサ12によって実行される。
 図3において、プロセッサ12は、変数としてiを初期化する(ステップSt1)。iは、登録されたテンプレートの番号を示す変数であって、0以上の整数であってtmまでの値をとる。つまり、tmは直前に登録されたテンプレートの番号を示す。プロセッサ12は、カメラCAM1からの撮像画像(入力画像)を入力して取得し(ステップSt2)、さらに、アクチュエータACT1から少なくともカメラCAM1の位置情報を入力して取得する(ステップSt3)。プロセッサ12は、ステップSt2で取得された撮像画像(入力画像)の特徴点を抽出する(ステップSt4)。
 iがゼロ(0)より大きくない場合(ステップSt5、NO)、つまりi=0である場合(まだ1つのテンプレートも登録されていない場合)、プロセッサ12は、iをインクリメントし(ステップSt10)、ステップSt2で取得された撮像画像(入力画像)をテンプレートとしてテンプレート登録デバイス40に登録する(ステップSt11)。
 一方、iがゼロ(0)より大きい場合(ステップSt5、YES)、プロセッサ12は、ステップSt2で取得されたカメラCAM1の撮像画像(入力画像)とその直前(つまり、第tm番目)の撮像画像であるテンプレートとの間で対象物OB1のテンプレートマッチングを行う(ステップSt6)。プロセッサ12は、テンプレート中の対象物OB1の特徴と撮像画像中の対象物OB1の特徴との間の画像相関(言い換えると、画像の類似度)を示す指標の一例としてのMaSを算出する(ステップSt7)。また、プロセッサ12は、テンプレートを撮像した時のカメラCAM1の位置とカメラCAM1から入力されてくる撮像画像を撮像した時のカメラCAM1の位置との差分(言い換えると、位置の類似度)を示す第1指標の一例としてのMoSを算出する(ステップSt8)。なお、ステップSt7,St8の処理の実行順序は順不同である。
 プロセッサ12は、ステップSt7で算出されたMaSが閾値Th2より小さいという条件、および、ステップSt8で算出されたMoSが閾値Th1より小さいという条件のうち少なくとも1つを満たすか否かを判定する(ステップSt9)。MaSが閾値Th2より大きくかつMoSが閾値Th1より大きいと判定された場合(ステップSt9、NO)、プロセッサ12の処理はステップSt12に進む。
 一方、プロセッサ12は、MaSが閾値Th2より小さい、もしくは、MoSが閾値Th1より小さいと判定した場合(ステップSt9、YES)、iをインクリメントし(ステップSt10)、ステップSt2で取得されたカメラCAM1の撮像画像(入力画像)を第i番目(つまりインクリメント前のi)のテンプレートとしてテンプレート登録デバイス40に登録する(ステップSt11)。アクチュエータACT1によってエンドエフェクタEF1が動作(例えば移動)継続中であるとプロセッサ12により判定された場合には(ステップSt12、YES)、プロセッサ12の処理はステップSt2に戻る。一方、アクチュエータACT1によってエンドエフェクタEF1が動作(例えば移動)継続中ではないとプロセッサ12により判定された場合には(ステップSt12、NO)、プロセッサ12は、移動経路マップMP1(図4参照)に沿った巡回が終了したらテンプレートの登録処理を終了する。これにより、図3に示すプロセッサ12の処理は終了する。
 なお、ステップSt11の時点で、プロセッサ12は、図4に示すテンプレート登録画面WD1をディスプレイ30に表示することにより、現在の登録予定地点のテンプレートの登録の可否をユーザ操作に委ねてもよい。
 図4は、実施の形態1においてディスプレイ30に表示されるテンプレート登録画面WD1の一例を示す図である。テンプレート登録画面WD1は、例えばプロセッサ12のコントロール部126により生成される。テンプレート登録画面WD1は、移動経路マップ表示領域SD1と、登録予定のテンプレート表示領域SD2と、登録済みのテンプレート表示領域SD3と、登録ボタンBT1と、破棄ボタンBT2とを有する。
 移動経路マップ表示領域SD1は、エンドエフェクタEF1およびカメラCAM1のペアの移動経路(移動履歴)を示す移動経路マップMP1を表示する。位置p1,p2,p3,p4,p5のそれぞれは、過去にエンドエフェクタEF1およびカメラCAM1のペアが位置した際にテンプレートの登録が実行された位置を示す。位置p6は、登録予定位置(つまり、直前の登録位置(例えば位置p5)で登録されたテンプレートとの関係において、位置p6でカメラCAM1により撮像された撮像画像をテンプレートとして登録を行うか否かの判断対象となっている位置)を示す。位置p7は、エンドエフェクタEF1およびカメラCAM1のペアの現在(最新)の位置を示す。位置p1~p7のそれぞれの3次元の位置を示す座標は、アクチュエータACT1から画像処理装置10に入力されている。
 登録予定のテンプレート表示領域SD2は、登録予定位置(上述参照)でカメラCAM1により撮像された撮像画像(入力画像)を品番(例えば「XX38YZ1X」)とともに示すテンプレートとして登録予定の撮像画像IMG6を表示する。この登録予定の撮像画像IMG6は、プロセッサ12の特徴抽出部121において抽出された全ての特徴点のうち、特徴マッチング部122により得られた新たに抽出された特徴点(丸印参照)と直前のテンプレートで抽出された特徴点(三角印参照)とを区別可能に示す。したがって、ユーザは、この登録予定のテンプレート表示領域SD2を閲覧することにより、登録予定の撮像画像IMG6には新たに抽出された特徴点の数あるいはその割合を視覚的に判別でき、登録予定の撮像画像IMG6をテンプレートとして登録するべきか否かを分かりやすく決めることができる。
 登録済みのテンプレート表示領域SD3は、過去の登録位置(図4の例では位置p1~p5)においてテンプレートの登録が実行された時のテンプレート登録画像TPL1,TPL2,…を表示する。テンプレート登録画像TPL1,TPL2,…のそれぞれは、対応するテンプレートIMG1,IMG2,…のそれぞれを、そのテンプレートを撮像したカメラCAM1の位置(つまり、該当する登録位置の3次元座標)と関連付けて表示する。図4の例では、位置p1に相当する3次元の座標P1Z(0,0,0)でカメラCAM1により撮像された撮像画像が登録されたテンプレートIMG1を含むテンプレート登録画像TPL1、位置p2に相当する3次元の座標P2Z(1,0,0)でカメラCAM1により撮像された撮像画像が登録されたテンプレートIMG2を含むテンプレート登録画像TPL2、…が示されている。なお、図4では図示が省略されているが、ユーザは、スクロールバーSCB1,SCB2を適宜ドラッグ操作してスクロール等することにより、他に登録されているテンプレート登録画像を表示できる。
 登録ボタンBT1は、登録予定のテンプレート表示領域SD2に表示されている登録予定の撮像画像IMG6をテンプレートとして登録する際にユーザ操作により押下されるボタンである。つまり、画像処理装置10のプロセッサ12は、ユーザ操作により登録ボタンBT1が押下されたことを検知することにより、登録予定の撮像画像IMG6をテンプレートとして登録できる。
 破棄ボタンBT2は、登録予定のテンプレート表示領域SD2に表示されている登録予定の撮像画像IMG6をテンプレートとして登録しない際にユーザ操作により押下されるボタンである。つまり、画像処理装置10のプロセッサ12は、ユーザ操作により破棄ボタンBT2が押下されたことを検知することにより、登録予定の撮像画像IMG6をテンプレートとして登録せずに済むことができる。
 以上により、実施の形態1に係るピッキングシステム100では、画像処理装置10は、対象物OB1を撮像かつ移動が可能なカメラCAM1により撮像された対象物OB1の入力画像とカメラCAM1の位置情報とを取得する通信インターフェース11と、対象物OB1の入力画像に基づく情報をテンプレートマッチングに用いるテンプレートとして、カメラCAM1の位置情報と対象物OB1の入力画像に基づく情報とを関連付けてテンプレート登録デバイス40に登録するコントロール部126と、を備える。入力画像に基づく情報は、例えば、テンプレート(画像)のデータ、あるいは、テンプレートが圧縮されたデータ(例えばサムネイル等)とテンプレートに対して特徴抽出部121によって抽出された複数の特徴点の特徴量である。これにより、画像処理装置10は、カメラCAM1の移動に伴ってカメラCAM1からの対象物OB1の姿勢が可変となる状況下でも、テンプレートマッチングに使用可能な対象物の高精度なテンプレートを登録できる。
 また、コントロール部126は、カメラCAM1が移動する移動経路マップMP1上の位置情報と対象物OB1の入力画像に基づく情報とを関連付けてテンプレート登録デバイス40に登録する。これにより、画像処理装置10は、所定の移動経路マップMP1上を移動することにより変化し得るカメラCAM1の位置情報と対象物OB1の入力画像に基づく情報とを対応付けてテンプレートとして登録できる。
 また、画像処理装置10は、テンプレートの登録の可否を判定するテンプレート登録判定部125、をさらに備える。テンプレート登録判定部125は、カメラCAM1の位置情報ごとにテンプレートの登録の可否を判定する。これにより、画像処理装置10は、カメラCAM1が移動する度に対象物OB1の見え方(言い換えると、姿勢)が変化することに鑑みて、姿勢の異なる多種類のテンプレートを登録でき、テンプレートマッチングの精度向上に貢献できる。
 また、画像処理装置10は、入力画像から対象物OB1の特徴を抽出する特徴抽出部121と、テンプレート登録デバイス40に記憶されたテンプレートに映る対象物OB1の特徴と入力画像に映る対象物OB1の特徴点の抽出結果とのマッチング処理を行う特徴マッチング部122と、特徴マッチング部122のマッチング結果とカメラCAM1の位置情報とを基に、テンプレートの登録の可否を判定するテンプレート登録判定部125と、をさらに備える。これにより、画像処理装置10は、入力画像およびテンプレートのそれぞれに出現する対象物OB1の特徴を比較することにより、テンプレートの登録の可否を高精度に判定できる。
 また、画像処理装置10は、テンプレートを撮像した時のカメラCAM1の位置と入力画像を撮像した時のカメラCAM1の位置との差分を示す第1指標(例えばMoS)と、テンプレート中の対象物OB1の特徴と入力画像中の対象物OB1の特徴との間の画像相関を示す第2指標(例えばMaS)を算出する指標算出部をさらに備える。ここで、指標算出部は、例えばMoS計算部123、MaS計算部124に相当する。テンプレート登録判定部125は、第1指標および第2指標のそれぞれの算出結果のうち少なくとも1つとメモリ13に予め保存されている閾値(例えば閾値Th1あるいは閾値Th2)との関係を基に、テンプレートの登録の可否を判定する。これにより、画像処理装置10は、MoSおよびMaSのうち少なくとも1つを用いて、入力画像をテンプレートとして登録してよいか否かを適切に判定できる。
 また、テンプレート登録判定部125は、第1指標および第2指標のそれぞれの算出結果のうち少なくとも1つ(例えばMoSおよびMaSのうち少なくとも1つ)が閾値(例えば閾値Th1あるいは閾値Th2)未満であると判定された場合、入力画像をテンプレートとしてテンプレート登録デバイス40に登録すると判定する。これにより、画像処理装置10は、例えば指標がMoSである場合、MoSが閾値Th1未満であればカメラCMA1の直前のテンプレート登録位置と現在の登録予定位置との差分が大きいので、入力画像をテンプレートとして新たに登録することにより、過去に登録されているテンプレートのテンプレートマッチングへの使用に起因する精度劣化を避けることができる。また、画像処理装置10は、例えば指標がMaSである場合、MaSが閾値Th2未満であればカメラCMA1の直前のテンプレート登録位置と現在の登録予定位置との差分が大きいので、入力画像をテンプレートとして新たに登録することにより、過去に登録されているテンプレートのテンプレートマッチングへの使用に起因する精度劣化を避けることができる。
 また、テンプレート登録判定部125は、第1指標および第2指標のそれぞれの算出結果のうち少なくとも1つ(例えばMoSおよびMaSのうち少なくとも1つ)が閾値(例えば閾値Th1あるいは閾値Th2)以上であると判定された場合、入力画像をテンプレートとしてテンプレート登録デバイス40に登録しないと判定する。これにより、画像処理装置10は、例えば指標がMoSである場合、MoSが閾値Th2以上であればカメラCMA1の直前のテンプレート登録位置と現在の登録予定位置との差分が小さいので、過去に登録されているテンプレートを流用してテンプレートマッチングを高精度に行える。また、画像処理装置10は、例えば指標がMaSである場合、MaSが閾値Th2以上であればカメラCMA1の直前のテンプレート登録位置と現在の登録予定位置との差分が小さいので、過去に登録されているテンプレートを流用してテンプレートマッチングを高精度に行える。
 また、テンプレートは、カメラCAM1により直前の登録位置で撮像された対象物OB1の入力画像である。これにより、画像処理装置10は、カメラCAM1の移動量が多くないと考えることができる直前の登録位置で撮像された対象物OB1の入力画像をテンプレートとして使用できるので、今のカメラCAM1の位置で撮像された入力画像をテンプレートとして登録してよいか否かを適切に判定できる。
 また、画像処理装置10は、入力画像から対象物OB1の特徴を抽出する特徴抽出部121をさらに備える。テンプレート登録判定部125は、テンプレート中で抽出された対象物OB1の特徴と入力画像中で新たに抽出された対象物OB1の特徴とを区別可能に(例えば異なる色で着色した)入力画像をディスプレイ30に表示する。これにより、ユーザは、登録予定位置の入力画像において抽出された特徴点のうちテンプレート中の特徴点との比較により新たに抽出された特徴点を視覚的に確認できるので、その登録予定位置の入力画像をテンプレートとして登録するべきか否かを適切に判断できる。
 また、テンプレート登録判定部125は、少なくとも1つのテンプレートの登録位置を示すカメラCAM1の移動経路マップMP1をディスプレイ30に表示する。これにより、ユーザは、テンプレートを登録するためにカメラCAM1の移動経路マップMP1に沿った移動経路およびテンプレートの登録を行った地点の位置情報を視覚的に確認できる。
 また、テンプレート登録判定部125は、テンプレート登録デバイス40に登録されたテンプレートごとに、テンプレートの登録位置を示すカメラCAM1の位置情報とテンプレートとを関連付けてディスプレイ30に表示する。これにより、ユーザは、過去に登録されたテンプレートの一覧だけでなく、一つ一つのテンプレートに映る対象物OB1の姿勢を視覚的に確認できる。
(実施の形態2に至る経緯)
 日本国特開2016-207147号公報では、物体認識装置は、階層的なテンプレートセットを作成し、解像度の低いテンプレートセットによるラフな認識を行い、その結果を用いて解像度の高いテンプレートセットによる詳細な認識を行う、といった階層的探索を行う。ところが、解像度の低いテンプレートセットを用いた認識処理、解像度の高いテンプレートセットを用いた認識処理のように少なくとも二段階でマッチング処理を行う必要があり、物体認識装置の処理負荷の増大を免れない。
 また、上述した工場内の生産工程においてエンドエフェクタによりピッキングしようとする部品が正しい部品であるかを判定するためにエンドエフェクタおよびカメラを移動させてピッキングしようとする部品をカメラで撮像する際に、日本国特開2016-207147号公報の技術を適用しようとすると次のような課題が生じる。具体的には、エンドエフェクタの移動に伴ってカメラも移動するとなると、エンドエフェクタの位置変化に伴ってカメラからの部品の見え方(言い換えると、部品の姿勢)が変化する。このため、テンプレートマッチングの際に、エンドエフェクタの位置(言うなれば、カメラの位置)を考慮しなければ、予め生成されたテンプレートセットを使っても効率的なテンプレートマッチングを行うことができず、テンプレートマッチングの信頼性も向上しない。
 そこで、以下の実施の形態2では、撮像装置の移動に伴って撮像装置からの対象物の姿勢が可変となる状況下でも対象物の高精度なテンプレートマッチングを実現するテンプレートマッチング装置、テンプレートマッチング方法およびテンプレートマッチングシステムの例を説明する。
(実施の形態2:概要)
 実施の形態2では、例えば工場内の生産工程において、実施の形態1で説明した方法で登録されたテンプレートを用いて、ロボットハンド等のエンドエフェクタEF1によりピッキングしようとする部品(対象物OB1の一例)が正しい部品(例えば工業製品の生産に使用する部品)であるか否かをテンプレートマッチングで判定する例を説明する。本開示に係るテンプレートマッチング装置は、対象物を撮像かつ移動が可能な撮像装置の位置情報と対象物のテンプレートとを関連付けて複数記憶する記憶部との間で通信し、撮像装置の位置情報を取得し、撮像装置の位置情報を基に、記憶部に記憶されている複数のテンプレートの中から対象物のテンプレートマッチングに用いるテンプレートを予測する予測処理を行い、撮像装置により撮像された対象物の入力画像とテンプレートの予測結果とを用いて、テンプレートマッチングを行う。
(実施の形態2:詳細)
 図5は、実施の形態2に係るピッキングシステム100Aの詳細な内部構成例を示すブロック図である。図5に示すように、ピッキングシステム100A(テンプレートマッチングシステムの一例)は、アクチュエータACT1と、カメラCAM1と、画像処理装置10Aと、操作デバイス20と、ディスプレイ30と、テンプレート登録デバイス40とを含む。実施の形態1と同様に、アクチュエータACT1と画像処理装置10Aとの間、カメラCAM1と画像処理装置10Aとの間、画像処理装置10Aと操作デバイス20との間、画像処理装置10Aとディスプレイ30との間、画像処理装置10Aとテンプレート登録デバイス40との間は、それぞれデータ信号の入出力(送受信)が可能となるように接続されている。
 実施の形態2の説明において、実施の形態1に係るピッキングシステム100の構成と同一の構成には同一の符号を付与して説明を簡略化あるいは省略し、異なる内容について説明する。
 画像処理装置10A(テンプレートマッチング装置の一例)は、アクチュエータACT1からの位置情報とカメラCAM1からの対象物OB1の撮像画像(入力画像)とを用いて所定の処理(図6参照)を実行可能なコンピュータにより構成される。例えば、画像処理装置10は、PC(Personal Computer)でもよいし、上述した所定の処理に特化した専用のハードウェア機器でもよい。画像処理装置10Aは、上述した所定の処理を行うことにより、カメラCAM1から入力されてくる撮像画像のテンプレートマッチングに用いるテンプレートを予測し、予測されたテンプレートと入力された撮像画像とを用いてテンプレートマッチングを行う。また、画像処理装置10は、テンプレートマッチングの処理結果を示すマッチング結果画面WD2(図7参照)を生成してディスプレイ30に表示する。また、画像処理装置10Aは、テンプレートマッチング結果と所定の移動経路マップ(図7参照)とにしたがって、エンドエフェクタEF1およびカメラCAM1の移動を指令するための制御指令を生成してアクチュエータACT1に送ってもよい。
 テンプレート登録デバイス40(記憶部の一例)は、例えばフラッシュメモリ、HDDあるいはSSDである。テンプレート登録デバイス40は、実施の形態1で説明した方法によってテンプレートマッチングに使用するように登録されたテンプレート(画像)のデータを、そのテンプレートに相当する撮像画像を撮像したカメラCAM1の位置情報(3次元位置)と関連付けて非一時的に保存する。テンプレート登録デバイス40に保存される、それぞれのテンプレートのデータは、テンプレート(画像)のデータあるいはそのテンプレートが圧縮されたデータと、そのテンプレートに相当する撮像画像を撮像したカメラCAM1の位置情報および特徴量と、そのテンプレートに対して特徴抽出部121によって抽出された複数の特徴点の位置情報とを少なくとも有する。
 ここで、画像処理装置10Aの内部構成について詳細に説明する。
 画像処理装置10Aは、通信インターフェース11と、プロセッサ12Aと、メモリ13とを少なくとも含む。通信インターフェース11と、プロセッサ12Aと、メモリ13とは、互いにデータ信号の入出力が可能となるようにデータ伝送バス(図示略)を介して接続されている。
 プロセッサ12Aは、例えばCPU、GPU、DSP、あるいはFGPAである。プロセッサ12Aは、画像処理装置10Aの全体的な動作を司るコントローラとして機能し、画像処理装置10Aの各部の動作を統括するための制御処理、画像処理装置10Aの各部との間のデータの入出力処理、データの演算処理およびデータの記憶処理を行う。プロセッサ12Aは、メモリ13に記憶されたプログラムおよび制御用データにしたがって動作したり、動作時にメモリ13を使用し、プロセッサ12Aが生成または取得したデータもしくは情報をメモリ13に一時的に保存したり通信インターフェース11を介して外部装置(例えばディスプレイ30、テンプレート登録デバイス40、アクチュエータACT1)に送ったりする。例えば、プロセッサ12Aは、メモリ13に記憶されたプログラムおよび制御用データにしたがって、特徴抽出部121、特徴マッチング部122、コントロール部126、位置フィッティング部127、テンプレート予測部128およびテンプレート更新判定部129を機能的に実現することができる。
 位置フィッティング部127は、特徴マッチング部122によるマッチング結果(図7参照)を基に、カメラCAM1の現在位置(図7参照)にて撮像された撮像画像(入力画像)に映る対象物OB1の位置を近似するフィッティング処理を行う。対象物OB1の位置は、例えば対象物OB1の中心位置を中心とした所定径の長さを有する円形状の範囲である。このフィッティング処理の結果は、例えばコントロール部126によるマッチング結果画面WD2の生成時に参照される。
 テンプレート予測部128(予測部の一例)は、アクチュエータACT1から常時あるいは周期的に送られるカメラCAM1の3次元座標からなる位置情報(つまり、カメラCAM1の移動量)と前回(直前)の特徴マッチング部122によるマッチング処理の結果とのうちいずれか1つまたはその両方を基に、テンプレート登録デバイス40に登録されている複数のテンプレートの中で特徴マッチング部122が用いるテンプレートマッチング用のテンプレートを予測する。例えば、テンプレート予測部128は、カメラCAM1の3次元座標からなる位置情報を基に、その位置情報に対応する登録済みのテンプレートをテンプレートマッチング用のテンプレートとして予測する。また、テンプレート予測部128は、前回(直前)のマッチング処理の結果を用いてMaS(実施の形態1参照)を算出し、このMaSが例えばメモリ13に保存されている閾値Th3以上であると判定した場合、特徴マッチング部122がテンプレートマッチングに用いたテンプレートをテンプレートマッチング用のテンプレートとして予測する。なお、テンプレート予測部128によるテンプレートの予測方法は上述した方法に限定されなくてもよい。
 テンプレート更新判定部129(更新判定部の一例)は、次の特徴マッチング部122によるマッチング処理に用いるテンプレートとして、ユーザの操作に基づいて操作デバイス20により指定されたテンプレートか、あるいは、テンプレート予測部128により予測されたテンプレートを用いるかを判定する。例えば、第1番目のカメラCAM1からのフレームの場合には、テンプレート更新判定部129は、次の特徴マッチング部122によるマッチング処理に用いるテンプレートとして、ユーザの操作に基づいて操作デバイス20により指定されたテンプレートを用いると判定する。第2番目以降のカメラCAM1からのフレームの場合には、テンプレート更新判定部129は、次の特徴マッチング部122によるマッチング処理に用いるテンプレートとして、テンプレート予測部128により予測されたテンプレートを用いるかを判定する。
 次に、実施の形態2に係る画像処理装置10Aによるテンプレートマッチングの動作手順例について、図6を参照して説明する。図6は、実施の形態2に係る画像処理装置10Aによるテンプレートマッチングの動作手順例を示すフローチャートである。図6に示す処理は、主に画像処理装置10Aのプロセッサ12Aによって実行される。
 図6において、プロセッサ12Aは、カメラCAM1から撮像画像(入力画像)を入力して取得し(ステップSt21)、さらに、アクチュエータACT1から少なくともカメラCAM1の位置情報を入力して取得する(ステップSt22)。プロセッサ12Aは、ステップSt21で取得された撮像画像(入力画像)の特徴を抽出する(ステップSt23)。
 第1番目のカメラCAM1からのフレームである場合(ステップSt24、YES)、プロセッサ12Aは、マッチング結果画面WD2に表示されている移動経路マップMP2上の登録位置における登録済みのテンプレートの中からユーザ操作により選択されたテンプレートを取得する(ステップSt25)。ステップSt25の後、プロセッサ12Aの処理はステップSt27に進む。
 一方、第1番目のカメラCAM1からのフレームではない(つまり、第2番目以降のカメラCAM1からのフレームである)場合(ステップSt24、NO)、プロセッサ12Aは、カメラCAM1の3次元座標(つまり、位置情報の変化量である移動量)と前回(直前)の特徴マッチング部122によるマッチング処理の結果とを基に、テンプレート登録デバイス40に登録されている複数のテンプレートの中で特徴マッチング部122が用いるテンプレートマッチング用のテンプレートを予測する(ステップSt26)。プロセッサ12Aは、予測されたテンプレート(つまり、登録済みのテンプレート)をテンプレート登録デバイス40から読み出して取得する(ステップSt26)。
 プロセッサ12Aは、ステップSt23で取得された撮像画像(入力画像)とステップSt26で取得されたテンプレートの予測結果(つまり、登録済みのテンプレート)とを用いて、対象物OB1のテンプレートマッチングを行う(ステップSt27)。プロセッサ12Aは、ステップSt27のテンプレートマッチングの処理結果(マッチング結果)を基に、対象物OB1の位置を近似するフィッティング処理を行う(ステップSt28)。プロセッサ12Aは、テンプレートマッチングの処理結果およびフィッティング処理の結果をマッチング結果画面WD2に表示する。
 プロセッサ12Aは、ステップSt28のフィッティング処理の結果を基に、エンドエフェクタEF1およびカメラCAM1の移動量を調整および決定する(ステップSt29)。さらに、プロセッサ12Aは、エンドエフェクタEF1およびカメラCAM1の移動を制御するための制御指令を生成し、通信インターフェース11を介してアクチュエータACT1に送る(ステップSt29)。アクチュエータACT1は、画像処理装置10からの制御指令を基に、その制御指令で定められる移動量分、エンドエフェクタEF1およびカメラCAM1の移動を制御する。
 アクチュエータACT1によってエンドエフェクタEF1およびカメラCAM1の移動動作が継続中であるとプロセッサ12Aにより判定された場合には(ステップSt30、YES)、プロセッサ12の処理はステップSt21に戻る。一方、アクチュエータACT1によってエンドエフェクタEF1およびカメラCAM1の移動動作が継続中ではないとプロセッサ12Aにより判定された場合には(ステップSt30、NO)、図6に示すプロセッサ12Aの処理は終了する。
 なお、ステップSt28あるいはステップSt29の時点で、プロセッサ12Aは、図7に示すマッチング結果画面WD2をディスプレイ30に表示することにより、カメラCAM1の現在位置でのマッチング結果をユーザに視覚的に報知してもよい。
 図7は、実施の形態2においてディスプレイに表示されるマッチング結果画面WD2の一例を示す図である。マッチング結果画面WD2は、例えばプロセッサ12Aのコントロール部126により生成される。マッチング結果画面WD2は、移動経路マップ表示領域SD1Aと、マッチング結果表示領域SD4と、登録済みのテンプレート表示領域SD3Aと、使用ボタンBT3とを有する。
 移動経路マップ表示領域SD1Aは、エンドエフェクタEF1およびカメラCAM1のペアの移動経路(移動履歴)を示す移動経路マップMP2を表示する。位置p1,p2,p3,p4,p5,p7,p8,p9,p10,p11,p12,p13,p14,p15のそれぞれは、エンドエフェクタEF1およびカメラCAM1のペアが位置した際にテンプレートの登録が過去に実行された位置を示す。位置p6は、エンドエフェクタEF1およびカメラCAM1の移動経路RL1上の現在の位置であり、図7のマッチング結果画面WD2が生成された時にエンドエフェクタEF1およびカメラCAM1が現在存在している位置(つまり、現在位置)である。位置p1~p5,p7~p15のそれぞれの3次元の位置を示す座標は、テンプレートのデータ(上述参照)が登録されているテンプレート登録デバイス40から画像処理装置10に入力されている。一方、現在位置である位置p6を示す座標は、アクチュエータACT1から画像処理装置10に入力される。
 マッチング結果表示領域SD4は、現在位置(例えば位置p6)でカメラCAM1により撮像された品番(例えば「XX38YZ1X」)の対象物が映る撮像画像IMG6とテンプレートマッチングに用いたテンプレートTPL5(例えば現在位置の一つ前の位置p5に対応するテンプレート)との間のマッチング結果を示す。例えばマッチング結果表示領域SD4は、撮像画像IMG6中で抽出された13個の特徴点のうちテンプレートTPL5を用いたテンプレートマッチングにおいて9個の特徴点がマッチ(つまり整合)したことを示している。つまり、マッチングレートは9/13=69.2%となる。したがって、ユーザは、このマッチング結果表示領域SD4を閲覧することにより、カメラCAM1の現在位置の撮像画像IMG6とテンプレートマッチングに用いたテンプレートTPL5との間でどの特徴点が整合してどの程度マッチしているかを視覚的に判別できる。
 登録済みのテンプレート表示領域SD3Aは、過去の登録位置(図4の例では位置p1~p5,p7~p15)においてテンプレートの登録が実行された時のテンプレート登録画像TPL1,TPL2,…,TPL7,TPL8,TPL9,TPL10,…を表示する。テンプレート登録画像TPL1,TPL2,…,TPL7,TPL8,TPL9,TPL10,…のそれぞれは、対応するテンプレートIMG1,IMG2,…,IMG7,IMG8,IMG9,IMG10,…のそれぞれを、そのテンプレートを撮像したカメラCAM1の位置(つまり、該当する登録位置の3次元座標)と関連付けて表示する。図7の例では、位置p1に相当する3次元の座標P1Z(0,0,0)でカメラCAM1により撮像された撮像画像が登録されたテンプレートIMG1を含むテンプレート登録画像TPL1、位置p2に相当する3次元の座標P2Z(1,0,0)でカメラCAM1により撮像された撮像画像が登録されたテンプレートIMG2を含むテンプレート登録画像TPL2、…、位置p7に相当する3次元の座標P7Z(1,0,1)でカメラCAM1により撮像された撮像画像が登録されたテンプレートIMG7を含むテンプレート登録画像TPL7、位置p8に相当する3次元の座標P8Z(0,0,1)でカメラCAM1により撮像された撮像画像が登録されたテンプレートIMG8を含むテンプレート登録画像TPL8、位置p9に相当する3次元の座標P9Z(0,0,2)でカメラCAM1により撮像された撮像画像が登録されたテンプレートIMG9を含むテンプレート登録画像TPL9、位置p10に相当する3次元の座標P10Z(1,0,2)でカメラCAM1により撮像された撮像画像が登録されたテンプレートIMG10を含むテンプレート登録画像TPL2、…が示されている。なお、図7では図示が省略されているが、ユーザは、スクロールバーSCB1,SCB2を適宜ドラッグ操作してスクロール等することにより、他に登録されているテンプレート登録画像を表示できる。
 使用ボタンBT3は、登録済みのテンプレート表示領域SD3Aに表示されているテンプレート登録画像の中からユーザ操作により選択されたテンプレート登録画像がテンプレートマッチングに使用される際に押下されるボタンである。つまり、画像処理装置10のプロセッサ12は、ユーザ操作によりいずれか一つのテンプレート画像が選択された上で使用ボタンBT3が押下されたことを検知することにより、その選択されたテンプレート画像をテンプレートマッチングに使用できる。
 以上により、実施の形態2に係るピッキングシステム100Aでは、画像処理装置10Aは、対象物OB1を撮像かつ移動が可能なカメラCAM1の位置情報と対象物OB1のテンプレートとを関連付けて複数記憶するテンプレート登録デバイス40との間で通信する通信部(例えば通信インターフェース11)と、カメラCAM1の位置情報を取得する取得部(例えば通信インターフェース11)と、カメラCAM1の位置情報を基に、テンプレート登録デバイス40に記憶されている複数のテンプレートの中から対象物OB1のテンプレートマッチングに用いるテンプレートを予測する予測処理を行うテンプレート予測部128と、カメラCAM1により撮像された対象物OB1の入力画像とテンプレートの予測処理の結果とを用いて、テンプレートマッチングを行うマッチング部(例えば特徴マッチング部122)と、を備える。これにより、画像処理装置10Aは、カメラCAM1の移動に伴ってカメラCAM1からの対象物OB1の姿勢が可変となる状況下でも、対象物OB1の高精度なテンプレートマッチングを実現できる。
 また、特徴マッチング部122は、操作デバイス20により指定されたテンプレートを用いてテンプレートマッチングを行う。これにより、画像処理装置10Aは、例えば初めてテンプレートマッチングを行う場合でも、ユーザが操作デバイス20を用いて選択したテンプレートを用いて効率的にテンプレートマッチングを行える。
 また、テンプレート予測部128は、カメラCAM1が移動する度に、カメラCAM1の位置情報を取得し、かつ、その取得された位置情報を用いてテンプレートの予測処理を行う。これにより、画像処理装置10Aは、カメラCAM1が移動する度にテンプレートマッチングに使用する適切なテンプレートを予測して選択できる。
 また、画像処理装置10Aは、入力画像から対象物OB1の特徴を抽出する特徴抽出部121をさらに備える。特徴マッチング部122は、テンプレートの予測処理の結果に映る対象物OB1の特徴と入力画像に映る対象物OB1の特徴の抽出結果とのマッチング処理であるテンプレートマッチングを行う。これにより、画像処理装置10Aは、入力画像およびテンプレートのそれぞれに出現する対象物OB1の特徴を比較することにより、テンプレートマッチングに使用する適切なテンプレートを予測できる。
 また、画像処理装置10Aは、カメラCAM1の位置情報に基づく移動方向とマッチング比較処理の結果とのうちいずれか一方を基に、テンプレートマッチングに用いるテンプレートを更新するか否かを決定するテンプレート更新判定部129をさらに備える。これにより、画像処理装置10Aは、テンプレートマッチングに使用するテンプレートの更新(言い換えると、他のテンプレートへの切り替え)の要否を適切に判定できる。
 また、特徴マッチング部122は、カメラCAM1の一定区間の移動中、同一のテンプレートを用いてテンプレートマッチングを行う。これにより、画像処理装置10Aは、例えばカメラCAM1が微小距離等の一定区間の移動中であれば、カメラCAM1から見た対象物OB1の見え方(言い換えると、姿勢)がほぼ不変とみなすことができ、現在使用中のテンプレートをそのまま使用してテンプレートの更新の要否判定もしくはその更新に要する処理負荷の増大を抑制できる。
 また、画像処理装置10Aは、入力画像から対象物OB1の特徴を抽出する特徴抽出部121と、テンプレートの予測処理の結果と入力画像とを対比的にディスプレイ30に表示するコントロール部126とをさらに備える。コントロール部126は、テンプレートの予測処理の結果中で抽出された対象物OB1の特徴と入力画像中で抽出された対象物OB1の特徴とのうち同一の特徴点を識別可能に結線して表示する。これにより、ユーザは、ディスプレイ30に対比的に表示された特徴点のマッチング状況(例えばマッチしている特徴点の数、割合)を視覚的に判断でき、カメラCAM1の現在位置の撮像画像とテンプレートマッチングに用いたテンプレートとの間でどの特徴点が整合してどの程度マッチしているかを視覚的に判別できる。
 また、画像処理装置10Aは、カメラCAM1の移動経路マップMP2をディスプレイ30に表示するコントロール部126をさらに備える。これにより、ユーザは、ピッキングシステム100AにおいてエンドエフェクタEF1が対象物OB1をピッキングするためにどのような経路で移動しているかを視覚的に判別できる。
 また、画像処理装置10Aは、テンプレート登録デバイス40に登録されたテンプレートごとに、テンプレートの登録位置を示すカメラCAM1の位置情報とテンプレートとを関連付けてディスプレイ30に表示するコントロール部126をさらに備える。これにより、ユーザは、過去に登録されたテンプレートの一覧だけでなく、一つ一つのテンプレートに映る対象物OB1の姿勢を視覚的に確認できる。
 以上、添付図面を参照しながら各種の実施の形態について説明したが、本開示はかかる例に限定されない。当業者であれば、特許請求の範囲に記載された範疇内において、各種の変更例、修正例、置換例、付加例、削除例、均等例に想到し得ることは明らかであり、それらについても本開示の技術的範囲に属すると了解される。また、発明の趣旨を逸脱しない範囲において、上述した各種の実施の形態における各構成要素を任意に組み合わせてもよい。
 なお、本出願は、2022年4月11日出願の日本特許出願(特願2022-065263および特願2022-065264)に基づくものであり、それらの内容は本出願の中に参照として援用される。
 本開示は、撮像装置の移動に伴って撮像装置からの対象物の姿勢が可変となる状況下でもテンプレートマッチングに使用可能な対象物の高精度なテンプレートを登録するテンプレート登録装置、テンプレート登録方法およびテンプレート登録システムとして有用である。
10、10A 画像処理装置
11 通信インターフェース
12、12A プロセッサ
13 メモリ
20 操作デバイス
30 ディスプレイ
40 テンプレート登録デバイス
100、100A ピッキングシステム
121 特徴抽出部
122 特徴マッチング部
123 MoS計算部
124 MaS計算部
125 テンプレート登録判定部
126 コントロール部
127 位置フィッティング部
128 テンプレート予測部
129 テンプレート更新判定部
ACT1 アクチュエータ
CAM1 カメラ

Claims (13)

  1.  対象物を撮像かつ移動が可能な撮像装置により撮像された前記対象物の入力画像と前記撮像装置の位置情報とを取得する取得部と、
     前記対象物の入力画像に基づく情報をテンプレートマッチングに用いるテンプレートとして、前記撮像装置の位置情報と前記対象物の入力画像に基づく情報とを関連付けて記憶部に登録する制御部と、を備える、
     テンプレート登録装置。
  2.  前記制御部は、前記撮像装置が移動する移動経路マップ上の位置情報と前記対象物の入力画像に基づく情報とを関連付けて前記記憶部に登録する、
     請求項1に記載のテンプレート登録装置。
  3.  前記テンプレートの登録の可否を判定する登録判定部、をさらに備え、
     前記登録判定部は、前記撮像装置の位置情報ごとに前記テンプレートの登録の可否を判定する、
     請求項1に記載のテンプレート登録装置。
  4.  前記入力画像から前記対象物の特徴を抽出する特徴抽出部と、
     前記記憶部に記憶された前記テンプレートに映る前記対象物の特徴と前記入力画像に映る前記対象物の特徴の抽出結果とのマッチング処理を行う特徴マッチング部と、
     前記特徴マッチング部のマッチング結果と前記撮像装置の位置情報とを基に、前記テンプレートの登録の可否を判定する登録判定部と、をさらに備える、
     請求項1に記載のテンプレート登録装置。
  5.  前記テンプレートを撮像した時の前記撮像装置の位置と前記入力画像を撮像した時の前記撮像装置の位置との差分を示す第1指標と、前記テンプレート中の前記対象物の特徴と前記入力画像中の前記対象物の特徴との間の画像相関を示す第2指標とを算出する指標算出部、をさらに備え、
     前記登録判定部は、前記第1指標および前記第2指標のそれぞれの算出結果のうち少なくとも1つと閾値との関係を基に、前記テンプレートの登録の可否を判定する、
     請求項4に記載のテンプレート登録装置。
  6.  前記登録判定部は、前記第1指標および前記第2指標のそれぞれの算出結果のうち少なくとも1つが前記閾値未満であると判定された場合、前記入力画像を前記テンプレートとして前記記憶部に登録すると判定する、
     請求項5に記載のテンプレート登録装置。
  7.  前記登録判定部は、前記第1指標および前記第2指標のそれぞれの算出結果のうち少なくとも1つが前記閾値以上であると判定された場合、前記入力画像を前記テンプレートとして前記記憶部に登録しないと判定する、
     請求項5に記載のテンプレート登録装置。
  8.  前記テンプレートは、前記撮像装置により直前の登録位置で撮像された前記対象物の入力画像である、
     請求項1に記載のテンプレート登録装置。
  9.  前記入力画像から前記対象物の特徴を抽出する特徴抽出部、をさらに備え、
     前記制御部は、前記テンプレート中で抽出された前記対象物の特徴点と前記入力画像中で新たに抽出された前記対象物の特徴点とを区別可能に前記入力画像をディスプレイに表示する、
     請求項8に記載のテンプレート登録装置。
  10.  前記制御部は、少なくとも1つの前記テンプレートの登録位置を示す前記撮像装置の移動経路マップをディスプレイに表示する、
     請求項1に記載のテンプレート登録装置。
  11.  前記制御部は、前記記憶部に登録された前記テンプレートごとに、前記テンプレートの登録位置を示す前記撮像装置の位置情報と前記テンプレートとを関連付けてディスプレイに表示する、
     請求項1に記載のテンプレート登録装置。
  12.  テンプレート登録装置により実行されるテンプレート登録方法であって、
     対象物を撮像かつ移動が可能な撮像装置により撮像された前記対象物の入力画像と前記撮像装置の位置情報とを取得するステップと、
     前記対象物の入力画像に基づく情報をテンプレートマッチングに用いるテンプレートとして、前記撮像装置の位置情報と前記対象物の入力画像に基づく情報とを関連付けて記憶部に登録するステップと、を有する、
     テンプレート登録方法。
  13.  対象物を撮像かつ移動が可能な撮像装置と、
     前記撮像装置との間で通信可能に接続されるテンプレート登録装置と、を備え、
     前記テンプレート登録装置は、
     前記撮像装置により撮像された前記対象物の入力画像と前記撮像装置の位置情報とを取得する取得部と、
     前記対象物の入力画像に基づく情報をテンプレートマッチングに用いるテンプレートとして、前記撮像装置の位置情報と前記対象物の入力画像に基づく情報とを関連付けて記憶部に登録する制御部と、を備える、
     テンプレート登録システム。
PCT/JP2023/003002 2022-04-11 2023-01-31 テンプレート登録装置、テンプレート登録方法およびテンプレート登録システム WO2023199572A1 (ja)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2022-065263 2022-04-11
JP2022065264A JP2023155753A (ja) 2022-04-11 2022-04-11 テンプレートマッチング装置、テンプレートマッチング方法およびテンプレートマッチングシステム
JP2022-065264 2022-04-11
JP2022065263A JP2023155752A (ja) 2022-04-11 2022-04-11 テンプレート登録装置、テンプレート登録方法およびテンプレート登録システム

Publications (1)

Publication Number Publication Date
WO2023199572A1 true WO2023199572A1 (ja) 2023-10-19

Family

ID=88329579

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2023/003002 WO2023199572A1 (ja) 2022-04-11 2023-01-31 テンプレート登録装置、テンプレート登録方法およびテンプレート登録システム

Country Status (1)

Country Link
WO (1) WO2023199572A1 (ja)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002208010A (ja) * 2001-01-11 2002-07-26 Shinkawa Ltd 画像処理方法および装置
JP2006099758A (ja) * 2004-09-06 2006-04-13 Omron Corp 基板検査方法および基板検査装置
JP2006224291A (ja) * 2005-01-19 2006-08-31 Yaskawa Electric Corp ロボットシステム
WO2020144776A1 (ja) * 2019-01-09 2020-07-16 三菱電機株式会社 制御装置および制御方法
JP2020181582A (ja) * 2020-05-25 2020-11-05 株式会社日立ハイテク テンプレートマッチングを用いた検査装置および検査方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002208010A (ja) * 2001-01-11 2002-07-26 Shinkawa Ltd 画像処理方法および装置
JP2006099758A (ja) * 2004-09-06 2006-04-13 Omron Corp 基板検査方法および基板検査装置
JP2006224291A (ja) * 2005-01-19 2006-08-31 Yaskawa Electric Corp ロボットシステム
WO2020144776A1 (ja) * 2019-01-09 2020-07-16 三菱電機株式会社 制御装置および制御方法
JP2020181582A (ja) * 2020-05-25 2020-11-05 株式会社日立ハイテク テンプレートマッチングを用いた検査装置および検査方法

Similar Documents

Publication Publication Date Title
CN107914272B (zh) 一种七自由度机械臂组件抓取目标物体的方法
EP1905548B1 (en) Workpiece picking apparatus
CN104936748B (zh) 徒手机器人路径教导
JP6978454B2 (ja) 物体検出装置、制御装置及び物体検出用コンピュータプログラム
US11654571B2 (en) Three-dimensional data generation device and robot control system
US9595095B2 (en) Robot system
JP2008000884A (ja) ロボットの相互作用のためのビジュアル・プロト−オブジェクトの評価
CN111745640B (zh) 物体检测方法、物体检测装置以及机器人系统
JP6902369B2 (ja) 提示装置、提示方法およびプログラム、ならびに作業システム
US20210162600A1 (en) Method of programming an industrial robot
US20210283782A1 (en) Measurement parameter optimization method and device, and computer control program stored on computer-readable storage medium
CN112775967A (zh) 基于机器视觉的机械臂抓取方法、装置及设备
JP2016143414A (ja) インタラクティブシステム、リモコン及びその操作方法
JP2022160363A (ja) ロボットシステム、制御方法、画像処理装置、画像処理方法、物品の製造方法、プログラム、及び記録媒体
WO2023199572A1 (ja) テンプレート登録装置、テンプレート登録方法およびテンプレート登録システム
JP2023155752A (ja) テンプレート登録装置、テンプレート登録方法およびテンプレート登録システム
JP2023155753A (ja) テンプレートマッチング装置、テンプレートマッチング方法およびテンプレートマッチングシステム
CN116460846A (zh) 机械臂控制方法、装置、设备和存储介质
Liu et al. Vision-based excavator pose estimation for automatic control
WO2021171839A1 (ja) 画像表示装置、画像表示方法、及びプログラム
CN111862218B (zh) 计算机设备定位方法、装置、计算机设备和存储介质
JP7376318B2 (ja) アノテーション装置
Gietler et al. Forestry Crane Automation using Learning-based Visual Grasping Point Prediction
KR20070121601A (ko) 로봇 상호작용을 위한 시각적 원시 객체 평가
WO2024042619A1 (ja) 装置、ロボットの制御装置、ロボットシステム、方法

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: 23787995

Country of ref document: EP

Kind code of ref document: A1