WO2013065332A1 - 画像処理装置および画像処理プログラム記録媒体 - Google Patents

画像処理装置および画像処理プログラム記録媒体 Download PDF

Info

Publication number
WO2013065332A1
WO2013065332A1 PCT/JP2012/055689 JP2012055689W WO2013065332A1 WO 2013065332 A1 WO2013065332 A1 WO 2013065332A1 JP 2012055689 W JP2012055689 W JP 2012055689W WO 2013065332 A1 WO2013065332 A1 WO 2013065332A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
unit
imaging
captured
measurement
Prior art date
Application number
PCT/JP2012/055689
Other languages
English (en)
French (fr)
Inventor
正寛 藤川
浩二 嶋田
角人 白根
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Priority to EP12846316.3A priority Critical patent/EP2793183B1/en
Priority to CN201280065421.1A priority patent/CN104169964B/zh
Publication of WO2013065332A1 publication Critical patent/WO2013065332A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/0093Programme-controlled manipulators co-operating with conveyor means
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1694Programme controls characterised by use of sensors other than normal servo-feedback from position, speed or acceleration sensors, perception control, multi-sensor controlled systems, sensor fusion
    • B25J9/1697Vision controlled systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/74Determining position or orientation of objects or cameras using feature-based methods involving reference images or patches
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/39Robotics, robotics to robotics hand
    • G05B2219/39102Manipulator cooperating with conveyor
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/40Robotics, robotics mapping to robotics vision
    • G05B2219/40022Snatching, dynamic pick, effector contacts object, moves with object
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/40Robotics, robotics mapping to robotics vision
    • G05B2219/40554Object recognition to track object on conveyor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component

Definitions

  • the present invention relates to an image processing apparatus and an image processing program recording medium directed to conveyor tracking and the like.
  • FA factory automation
  • a technique for controlling various processes using image processing is frequently used for labor saving.
  • a workpiece is transferred by a transfer device such as a belt conveyor, and the workpiece being transferred is also referred to as a moving machine (hereinafter referred to as “industrial robot” or simply “robot”). )
  • a transfer device such as a belt conveyor
  • robot moving machine
  • work steps such as tracking and gripping.
  • Such a work process is called conveyor tracking or the like.
  • an image of a workpiece on a transfer device is imaged using an imaging device, and an image obtained by the imaging is subjected to measurement processing such as pattern matching or binarization processing using an image processing device.
  • measurement processing such as pattern matching or binarization processing using an image processing device.
  • the robot tracks and grips each workpiece based on the identified location of each workpiece.
  • Patent Document 1 Japanese Patent Laid-Open No. 2002-113679
  • images a plurality of workpieces conveyed by a conveyance body and handles the plurality of workpieces based on the position coordinates of each workpiece recognized from the imaging result.
  • a tracking method to control is disclosed. More specifically, according to the tracking method described in Patent Document 1 (Japanese Patent Laid-Open No. 2002-113679), the traveling direction of the imaging region by the imaging unit and the imaging region immediately after the imaging region with a constant width within which the entire shape of the workpiece is accommodated.
  • a configuration is adopted in which images are continuously captured so as to overlap with each other, and only the workpiece including the entire shape is recognized in the position coordinates.
  • JP 2002-113679 A Japanese Patent Laid-Open No. 5-260264
  • the panoramic image generated using the image processing apparatus disclosed in Patent Document 2 is not an image of the work on the transport apparatus, and is not associated with measurement information on the work.
  • An object of the present invention is to provide an image processing apparatus and an image processing program recording medium that output information for supporting state grasping on a route for conveying a workpiece using a captured image.
  • an image processing device connected to an imaging unit having an overlapping area in an imaging range before and after continuous imaging, an interface for receiving a plurality of captured images obtained by the imaging unit, and measurement for the captured image
  • the measurement unit that acquires the measurement result of the subject in the captured image and the plurality of captured images are combined so as to overlap in the imaging order in the overlapping range corresponding to the overlapping region, and the subject in the overlapping range
  • a combining unit that generates a combined image in which the measurement results are superimposed in the overlapping range, and an output unit that outputs a combined image and information indicating the overlapping range in association with the combined image.
  • the measurement result is a graphic correlating with the subject in the captured image
  • the combining unit includes a determination unit that determines whether at least a part of the graphic is included in the overlapping range, and includes at least the graphic
  • a composite image is generated by superimposing the measurement result image of the subject on the overlapping range.
  • the synthesizing unit determines the output mode from the moving amount of the image per unit time in a plurality of captured images obtained by continuous imaging.
  • the output unit outputs a composite image based on the determined output mode.
  • the image processing apparatus detects an error related to generation and processes the detected error.
  • the image processing apparatus detects a shortage of captured images for generating a composite image in the above-described error detection.
  • the output unit changes the output mode of each captured image in the composite image.
  • the image processing apparatus further includes an operation input unit that receives an operation from the outside. The output unit enlarges and outputs the captured image selected by the operation input unit in the composite image.
  • the image processing apparatus selects a measurement result indicated by an operation received by the operation input unit from measurement results corresponding to each captured image.
  • the output unit outputs a composite image including a captured image corresponding to the selected measurement result and captured images captured before and after the captured image.
  • the output unit selects and outputs a captured image instructing a value for which a corresponding measurement result is designated in advance from among the captured images in the composite image.
  • the output unit changes the output mode of the measurement result corresponding to the odd-numbered captured image in the composite image and the measurement result corresponding to the even-numbered captured image.
  • the image processing apparatus outputs information related to the time required for measurement processing by the measurement unit.
  • the information on the required time is a ratio of the required time for the measurement processing of the captured image to the time interval before and after the continuous imaging.
  • a ratio is obtained for each captured image of the composite image, and the ratio is output in association with the composite image and each captured image of the composite image.
  • a machine-readable recording medium in which an image processing program executed by a computer connected to an imaging unit having an overlapping area in the imaging range is recorded before and after continuous imaging.
  • the image processing program includes an interface that receives a plurality of captured images obtained by the imaging unit, a measurement unit that acquires a measurement result of a subject in the captured image by performing measurement processing on the captured image, and Combining a plurality of captured images so as to overlap in the imaging order in the overlapping range corresponding to the overlapping region, and generating a combined image in which the measurement results of the subject in the overlapping range are superimposed in the overlapping range; It functions as an output unit that outputs an image and information indicating an overlapping range in association with the composite image.
  • the operator can acquire information for grasping the state on the route for conveying the workpiece.
  • FIG. 1 It is a schematic diagram for demonstrating the panoramic image of Embodiment 1 of this invention. It is a figure explaining the other example of the display mode of the panoramic image which concerns on Embodiment 1 of this invention. It is a figure explaining the scroll of the panoramic image which concerns on Embodiment 1 of this invention. It is a main flowchart of the process which concerns on Embodiment 2 of this invention. It is a figure explaining the display mode of the panoramic image which concerns on Embodiment 2 of this invention. It is a figure explaining the display mode of the panoramic image which concerns on Embodiment 2 of this invention. It is a figure explaining the display mode of the panoramic image which concerns on Embodiment 2 of this invention. It is a figure explaining the display mode of the panoramic image which concerns on Embodiment 2 of this invention.
  • Embodiment 4 of the present invention It is a figure for demonstrating the procedure of the calibration which concerns on Embodiment 3 of this invention. It is a figure for demonstrating the procedure of the calibration which concerns on Embodiment 3 of this invention. It is a figure for demonstrating the procedure of the calibration which concerns on Embodiment 3 of this invention. It is a processing flowchart concerning Embodiment 4 of the present invention. It is a schematic diagram shown about the function structure for the captured image process which concerns on Embodiment 4 of this invention. It is a figure explaining the process outline
  • FIG. 1 is a schematic diagram showing a configuration of a conveyor tracking system using a visual sensor according to Embodiment 1 of the present invention.
  • the conveyor tracking system shown in FIG. 1 includes two conveying devices (conveyors) 10 and 20.
  • the conveyors 10 and 20 are rotationally driven by drive rollers 12 and 22, respectively.
  • the conveyors 10 and 20 are also referred to as line 1 and line 2, respectively.
  • the line 1 moves to the right side of the page, and the line 2 moves to the left side of the page.
  • the work W is randomly provided on the line 1 from the left side of the drawing by the carry-out device 30 or the like.
  • the workpiece W on the line 1 moves from the left side to the right side.
  • As the work W typically, foods such as sweets and various tablets are assumed.
  • the visual sensor 100 is provided at a predetermined position on the line 1.
  • the visual sensor 100 is configured integrally with an imaging unit for imaging a subject such as a work and a captured image processing unit for processing an image captured by the imaging unit.
  • the imaging unit and the captured image processing unit may be configured separately.
  • the visual sensor 100 is set so that the imaging field of view includes the entire width direction of the line 1 (direction orthogonal to the transport direction).
  • the imaging field of view can be determined using the setting of the angle of view (or viewing angle) of the imaging unit (camera).
  • the imaging field of view corresponds to a range that can be imaged by the imaging unit, and may be referred to as an “imaging range”.
  • the visual sensor 100 installed so as to be in the above-described imaging range continuously captures images in a predetermined cycle, so that the workpiece W flowing randomly on the line 1 can be sequentially imaged.
  • the visual sensor 100 performs positioning processing and tracking processing of each workpiece by performing measurement processing such as pattern matching on the sequentially captured images.
  • the imaging unit imaging unit 110 shown in FIG. 2 described later
  • the image capturing unit 110 is connected to a captured image processing unit 120 (see FIG. 2 described later) for processing a captured image.
  • a robot 300 that holds the workpiece W and moves it to the line 2 is disposed on the downstream side of the visual sensor 100.
  • the robot 300 has an arm for gripping the workpiece W, and grips the workpiece on the line 1 by moving the arm to a target position. That is, the robot 300 corresponds to a mobile machine that is disposed on the downstream side of the imaging range of the imaging unit of the visual sensor 100 and handles the workpiece W in the conveyance path of the conveyor 10 (line 1) that is a conveyance device. More specifically, the robot 300 positions its arm on the target workpiece W, picks it up, and aligns it on the line 2.
  • the robot 300 is arranged on a moving mechanism (not shown) for moving along the line 1 and moves over a predetermined range.
  • This movement range of the robot 300 is also referred to as a tracking range.
  • the tracking process and positioning process of the robot 300 are controlled by using the detection result by the encoder 14 provided in the line 1.
  • the encoder 14 typically employs a rotary encoder, and generates a pulse signal as it rotates. By counting the number of pulses of the generated pulse signal, the number of rotations of the rollers connected to the conveyor 10 (line 1), that is, the pulse signal generated by the encoder 14 is obtained in the conveyance path of the conveyor 10 which is a conveyance device. It corresponds to a signal indicating the amount of movement, and the amount of movement of the conveyor 10 is calculated based on this pulse signal.
  • the robot 300 operates in accordance with instructions from the robot control device 200. That is, the robot control apparatus 200 is a control apparatus for controlling the robot 300 that is a mobile machine.
  • the robot control apparatus 200 is connected to the visual sensor 100 via the network NW, and based on the position of each workpiece W detected by the visual sensor 100, instructions necessary for the gripping operation of the workpiece W to the robot 300. give.
  • the operation display device 500 and a support device 600 having a function corresponding to a personal computer are connected to the network NW.
  • the operation display device 500 displays a processing result from the visual sensor 100, an operation state of the robot 300 from the robot control device 200, and the like, and in response to an operation from the user, the visual sensor 100 and / or the robot control device 200. Give various instructions to.
  • the conveyor tracking system employs a configuration in which the pulse signal generated by the encoder 14 is input not only to the robot controller 200 but also to the visual sensor 100.
  • the visual sensor 100 and the robot control device 200 synchronize with each other to acquire the position information of the target transfer device (conveyor), whereby communication between the robot control device 200 and the visual sensor 100 via the network NW. It is possible to operate in synchronization with Here, the details regarding the motion control synchronized with the robot controller 200 and the visual sensor 100 are omitted.
  • the visual sensor 100 images the line 1.
  • the imaging operation of the visual sensor 100 is started in response to an imaging instruction from the robot control device 200.
  • This imaging instruction is conveyed via a network NW that connects the visual sensor 100 and the robot control device 200.
  • a general-purpose network such as Ethernet (registered trademark) can be adopted as this network NW.
  • the visual sensor 100 is configured to receive an imaging instruction from the robot control device 200, and starts imaging in response to the imaging instruction. As a result, the visual sensor 100 sequentially acquires images that capture the imaging field of view. Then, the visual sensor 100 performs a measurement process on the image. Furthermore, the visual sensor 100 transmits position information at the time of imaging of each workpiece W obtained by this measurement process to the robot control device 200. As described above, the visual sensor 100 performs the measurement process on the image obtained by the imaging of the imaging unit, and thereby acquires the position information of the area corresponding to the workpiece registered in advance in the image.
  • the robot controller 200 counts the number of pulses included in the pulse signal from the encoder 14, and passes through the network NW at a timing when a number of pulses equal to or greater than a predetermined value is input.
  • An imaging instruction is sent to the visual sensor 100.
  • the position information of each workpiece W from the visual sensor 100 is transmitted to the robot control device 200 via the network NW.
  • the robot control device 200 gives an instruction necessary for the gripping operation to the robot 300 using the received position information.
  • details regarding the gripping operation of the robot 300 are omitted.
  • the pulse signal generated according to the detection result of the encoder 14 provided in the line 1 is configured to be input to the visual sensor 100 and the robot control device 200.
  • the visual sensor 100 and the robot control device 200 each have an encoder counter for counting the number of pulses included in the pulse signal. Since the pulse signal from the encoder 14 is input in parallel to the visual sensor 100 and the robot control device 200, if each encoder counter is initialized (counter reset) at the same timing, it is input thereafter.
  • the counter values for the pulse signals can be the same as each other, that is, the counter values can be synchronized.
  • the amount of movement of the conveyor per pulse included in the pulse signal from the encoder 14 is set in advance. Further, the same parameters (maximum counter value, minimum counter value, increment value for one pulse, etc.) are set for the encoder counters of the visual sensor 100 and the robot control apparatus 200, respectively. That is, the encoder counter of the visual sensor 100 is set with the same parameter regarding the count with the encoder counter of the robot controller 200.
  • the counter value by these encoder counters is initialized to 0 before the production line is operated. That is, the encoder counter of the visual sensor 100 is reset together with the encoder counter of the robot control device 200 before the start of counting the number of pulses included in the pulse signal.
  • a means for synchronizing and holding the amount of movement of the conveyor 10 in the transport path between the visual sensor 100 and the robot controller 200 is realized.
  • FIG. 2 is a schematic diagram showing a hardware configuration of the conveyor tracking system using the visual sensor according to Embodiment 1 of the present invention.
  • visual sensor 100 includes an imaging unit 110 and a captured image processing unit 120.
  • the captured image processing unit 120 communicates with the operation display device 500.
  • illustration of the robot control device 200 and the support device 600 is omitted.
  • an image processing apparatus that receives and processes a captured image obtained by imaging from the imaging unit 110 includes a captured image processing unit 120 and an operation display device 500.
  • the support device 600 may include the function of the operation display device 500.
  • the image processing apparatus includes the function of the captured image processing unit 120 and the function of the support apparatus 600.
  • the imaging unit 110 is a device that images a subject existing in an imaging field.
  • an optical system such as a lens and a diaphragm, a CCD (Charge Coupled Device) image sensor, and a CMOS (Complementary Metal Oxide Semiconductor) image.
  • a light receiving element such as a sensor.
  • the imaging unit 110 captures an image in accordance with a command from the captured image processing unit 120 and outputs image data obtained by the imaging to the captured image processing unit 120.
  • the captured image processing unit 120 includes a CPU (Central Processing Unit) 122, a memory 124, an imaging control unit 126, a communication interface (I / F) 128, an input / output interface (I / F) 130, and an encoder counter 132. And a memory interface (I / F) 135 to which a CD-ROM (Compact Disk-Read Only Memory) 136, which is an example of a removable recording medium, is mounted. These components are connected to each other via a bus 134 so as to be able to perform data communication with each other.
  • the CPU 122 is a processor that performs main calculations in the captured image processing unit 120.
  • the memory 124 stores various programs executed by the CPU 122, image data captured by the imaging unit 110, various parameters, and the like.
  • the memory 124 includes a volatile storage device such as a DRAM (Dynamic Random Access Memory) and a non-volatile storage device such as a FLASH memory.
  • the imaging control unit 126 controls the imaging operation in the connected imaging unit 110 according to an internal command from the CPU 122 or the like.
  • the imaging control unit 126 has an interface that transmits various commands to the imaging unit 110 and an interface that receives image data from the imaging unit 110.
  • the communication interface 128 exchanges various data with the operation display device 500.
  • the visual sensor 100 and the operation display device 500 are connected via Ethernet (registered trademark), and the communication interface 128 is hardware conforming to such Ethernet (registered trademark).
  • the input / output interface 130 outputs various signals from the captured image processing unit 120 to the outside, or inputs various signals from the outside.
  • the input / output interface 130 receives a pulse signal generated by the encoder 14, converts the signal into a digital signal, and outputs the digital signal to the encoder counter 132.
  • Encoder counter 132 counts the number of pulses included in the pulse signal from encoder 14 and outputs a count value. Since the encoder counter 132 basically operates independently of the calculation cycle of the CPU 122, the number of pulses included in the pulse signal from the encoder 14 is not missed.
  • the operation display device 500 includes an arithmetic processing unit 510 including a memory 520, a communication interface (I / F) 528, a display controller 540 for controlling the display operation of an external display 502 made of liquid crystal, and the like.
  • An input interface (I / F) 550 that accepts an operation from the operation unit 503 including buttons, switches, and the like, and a memory interface (I / F) 529 to which a memory card 531 that is an example of a detachable recording medium is mounted including.
  • Each of these units is configured using various processors such as a display DSP (Digital Signal Processor).
  • the memory 20 stores a panoramic image 332 described later.
  • the display 502 and the operation unit 503 are separately provided, but they may be provided as a so-called touch panel in which both are integrally formed.
  • the arithmetic processing unit 510 receives the image data from the visual sensor 100, controls the display controller 540 using the received image data, displays an image on the display 502, and instructs the operation unit 503 to operate the operator. Is input via the input interface 550.
  • the memory 220 stores image data received from the visual sensor 100. In addition, information such as the measurement result of each workpiece W detected by the measurement process of the visual sensor 100 is stored.
  • the communication interface (I / F) 528 exchanges various data with the captured image processing unit 120 of the visual sensor 100.
  • the visual sensor 100 and the operation display device 500 are connected via Ethernet (registered trademark), and the communication interface 528 is hardware conforming to such Ethernet (registered trademark).
  • FIG. 3 is a schematic diagram showing a functional configuration for captured image processing according to Embodiment 1 of the present invention.
  • FIG. 4 is a schematic diagram showing stored contents of data for captured image processing according to Embodiment 1 of the present invention.
  • Each function shown in FIG. 3 is assumed to be realized by the CPU 122 of the captured image processing unit 120 executing a program stored in advance in the memory 124.
  • each function is not only a program but also a program and a circuit. It may be realized in combination.
  • Various programs executed by the captured image processing unit 120 are stored in the CD-ROM 136 and distributed.
  • the program stored in the CD-ROM 136 is read by a memory interface 135 having a CD-ROM (Compact Disk-Read Only Memory) drive function and stored in the memory 124 or the like.
  • the program may be downloaded from a host computer or the like via a network NW.
  • the imaging unit 110 connects the image data acquired by continuously imaging the imaging range while overlapping each other, thereby connecting the line 1 on the line 1.
  • An image corresponding to the entire view from upstream to downstream is generated.
  • An image corresponding to this whole view is referred to as a panoramic image.
  • CPU 122 has a processing function for panoramic images. Specifically, a measurement processing unit 221 that performs workpiece measurement processing on a captured image, an overlap acquisition unit 222 for acquiring an overlapping range of panoramic image images, and a panoramic image in which images overlap in the overlapping range. An image generation unit 223 for generating, a ratio acquisition unit 225 for acquiring the ratio of the time required for the measurement processing with respect to the imaging interval, and a parameter update unit 226 for updating various parameters (parameter types and / or values). And an image dividing unit 229 that divides the panoramic image into each captured image.
  • the parameter update unit 226 includes a measurement parameter update unit 227 for updating parameters related to the measurement process and an imaging parameter update unit 228 for updating parameters related to the imaging interval.
  • the above-described measurement process typically includes a search process using pattern matching based on a model image for a workpiece W registered in advance.
  • a characteristic part of the workpiece W is registered in advance as an image pattern (model), and a part of the input image that is most similar to the model registered in advance is searched from the input image.
  • the position / tilt / rotation angle of the portion most similar to the model, a correlation value indicating how similar to the model, and the like are calculated.
  • labeling processing is applied, a part that matches a pre-registered model or display attribute (color, etc.) is searched from the input image, and a label (number) is assigned to the searched part. By using these numbers, the area and the center of gravity position of the designated part are calculated in response to the designation of the number.
  • the measurement processing unit 221 outputs the position of the workpiece W calculated by pattern matching and the correlation value as a measurement result, and the parameters (type and value) of the measurement process are used to calculate the correlation value. Assume to refer to the type or value of the correlation coefficient.
  • the memory 124 stores image data 333 of a captured image output from the imaging unit 110, a table 331 storing related data corresponding to each image data 333, panoramic image data 332, and the like. , Data including the imaging parameter 350 is stored.
  • related data corresponding to the image data 333 of the captured image acquired for each image capture includes a measurement result 334 by the measurement process for the image data 333, a shift amount 335, and an encoder counter that inputs the image data at the time of image capture.
  • the measurement result 334 includes a correlation value acquired when the corresponding image data 333 is subjected to measurement processing by the measurement processing unit 221, an image coordinate position, and the like.
  • the parameter 337 indicates the type or value of a correlation coefficient for calculating a correlation value or the like.
  • FIG. 5 is a diagram for explaining a panoramic image generation procedure according to Embodiment 1 of the present invention. With reference to FIG. 5, the panorama image generation processing by the image generation unit 223 will be described.
  • the panorama image may be generated using a known panorama synthesis technique, but here, a panorama image generation process using the counter value 336 by the encoder counter will be described.
  • the overlap acquisition unit 222 acquires the shift amount 335 for each image data 333 and stores it in the table 331. Specifically, the overlap acquisition unit 222 acquires the counter value 336 from the encoder counter 132 at the time of imaging, and stores it in the table 331 in association with the image data 333 of the captured image. Thus, every time a captured image is acquired, image data 333 and a counter value 336 are acquired and stored in the table 331.
  • the counter value 336 at the time of imaging of the Nth image data 333 is T (n)
  • the counter value 336 at the time of imaging of the (N + 1) th image data 333 is T (n).
  • M (T (n + 1) ⁇ T (n)) ⁇ Epp.
  • the overlap acquisition unit 222 can calculate the shift amount M between the Nth and (N + 1) th image data 333 using the counter value 336 read from the table 331.
  • the calculated deviation amount M is stored in the table 331 as the deviation amount 335.
  • the shift amount 335 corresponding to the image data D (i) corresponds to the shift amount M with respect to the image data D (i + 1).
  • ⁇ Panorama image generation> The generation of a panoramic image by the image generation unit 223 will be described. Each time the CPU 122 receives a monitor instruction from the operation display device 500, the image generation unit 223 generates a panoramic image.
  • image data 333 acquired by being imaged by the imaging unit 110 is sequentially stored according to the imaging order.
  • the number of image data 333 necessary for generating a panoramic image is stored in the table 331.
  • the image generation unit 223 Upon receiving the monitor instruction, the image generation unit 223 sequentially reads out the Nth and (N + 1) th image data 333 from the table 331, that is, reads out the image data 333 according to the imaging order, and stores the image data 333 according to the read order in the memory 124. Are arranged in a predetermined area. By repeating this process, panoramic image data 332 composed of a plurality (specifically, two or more) of image data 333 captured continuously is generated.
  • the panorama image data 332 includes a plurality of image data 333 used to generate a panorama image, a measurement result 334 related to each image data 333 read from the table 331, and a shift amount 335. Further, the image Data of the position 338 and the ratio 340 in the panoramic image of the image. Details of the ratio 340 will be described later.
  • the image generation unit 223 determines the position 338 as follows. That is, here, the size of the panoramic image is determined in advance according to the size of the display 502, and the size of the image data 333 is also determined in advance. Therefore, when the number of image data 333 constituting the panorama image is determined, the position of each image data 333 in the panorama image is uniquely determined by the shift amount 335.
  • the image generating unit 223 displays a pointer 360 that points to the image data 333 that has been read last, that is, the image data 333 that has been captured most recently, among the plurality of image data 333 used for generation. Set to.
  • the image generation unit 223 When the monitor instruction is input next time, the image generation unit 223 generates the next new panoramic image data using the image data 333 stored after the next position of the image data 333 indicated by the pointer 360.
  • FIG. 6 is a main flowchart of processing according to Embodiment 1 of the present invention.
  • FIG. 7 is a schematic diagram for explaining a panoramic image according to the first embodiment of the present invention.
  • the lower panorama image is generated by superimposing the image data 333 of the upper captured image in accordance with the corresponding shift amount 335 in the captured order.
  • Each image data 333 includes an image 60 of the workpiece conveyed on the line 1.
  • an image 61 of a measurement processing result for each image data and an image 62 in an overlapping area are overlaid (superimposed) and simultaneously displayed.
  • the measurement processing result is displayed as the image 61.
  • the measurement processing result is not limited to the superimposed image and may be displayed as an individual graph or numerical value.
  • the overlapping area is displayed by being superimposed on the image 62, but is not limited to the superimposing aspect, and may be any aspect that is displayed in association with the panoramic image. The procedure for generating and displaying the panoramic image of FIG. 7 will be described with reference to the flowchart of FIG.
  • the table 331 stores a plurality of image data 333 acquired by imaging by the imaging unit 110 and related data corresponding to each image data 333.
  • the CPU 122 reads the panorama image data 332 generated by the image generation unit 223 from the table 331 and transmits it to the operation display device 500. Accordingly, the arithmetic processing unit 510 of the operation display device 500 receives the panorama image data 332 via the communication interface 528 (step S1). The received panorama image data 332 is stored in the memory 520.
  • the arithmetic processing unit 510 displays each image data 333 of the panorama image data 332 from the memory 520 in a superimposed manner on the display 502 in accordance with the associated shift amount 335 and position 338 (step S2). As a result, a panoramic image is displayed on the display 502.
  • the arithmetic processing unit 510 reads the measurement result 334 associated with each image data 333 from the memory 520, and displays the image 61 based on the measurement result 334 on the panoramic image of the display 502 (step S3).
  • the display position of the image 61 can be determined by the image coordinate position included in the measurement result 334.
  • the image 62 representing the overlapping region of the image data 333 is simultaneously displayed on the panoramic image (step S3).
  • the operator uses the operation unit 503 to perform the operation to continue or stop the monitor.
  • the input interface 550 accepts and outputs an instruction to continue or stop monitoring according to the operation.
  • the arithmetic processing unit 510 determines whether to continue monitoring or instruct based on the input instruction (step S4).
  • step S4 If it is determined that the process is to be canceled (YES in step S4), the series of processes ends. If it is determined that the process is to be continued (NO in step S4), the process returns to step S1. As a result, the arithmetic processing unit 510 transmits a monitor instruction to the captured image processing unit 120 via the communication interface 528.
  • the image generation unit 223 of the captured image processing unit 120 generates the next panoramic image data 332 in response to the received monitor instruction. Thereafter, the processing from step S1 is similarly performed on the newly generated panorama image data 332, so that the operator can monitor the line 1 using the new panorama image displayed on the display 502.
  • the operator can simultaneously check the image 61 of the measurement processing result and the image 62 of the overlapping area. By confirming the images 60 and 61, it can be confirmed whether or not the visual sensor 100 can detect the workpiece.
  • the operator can confirm the imaging interval by confirming the image 62 in the overlapping area, it is possible to determine whether the cause that the workpiece cannot be detected is due to the measurement process or the imaging interval. it can.
  • the display mode of the panoramic image in the first embodiment is not limited to that shown in FIG. 7, and may be the following display mode.
  • FIG. 8 is a diagram for explaining another example of a panoramic image display mode according to Embodiment 1 of the present invention.
  • the panoramic image display mode may display the image 61 based on the measurement processing result in association with the workpiece image 60 and surround the image 62 in the overlapping region with a thick line frame.
  • the image 61 may be displayed in different colors according to the value (correlation value) of the measurement processing result.
  • the overlapping region image 62 may display the region in a predetermined color 63.
  • the Nth and (N + 1) th images in other words, the odd-numbered image and the even-numbered image of the series of images superimposed with the shift amount M in the panoramic image.
  • the display mode may be different.
  • the background color 64 may be displayed differently.
  • FIG. 9 is a diagram illustrating panorama image scrolling according to Embodiment 1 of the present invention.
  • the display area of the display 502 includes a panoramic image display area 72, a slide bar 70 display area, and a selection image 73 display area.
  • a panoramic image in which a plurality of images are arranged in a row in the horizontal direction on the paper surface is displayed, and the extending direction of the slide bar 70 coincides with the extending direction of the image row.
  • the operator slides the slider 71 on the slide bar 70.
  • the movement amount (movement direction, movement distance) of the slider 71 is detected by the arithmetic processing unit 510 via the input interface 550, and the arithmetic processing unit 510 outputs a scroll instruction related to the detected movement amount to the display controller 540.
  • the display controller 540 moves the image (panoramic image) in the area 72 according to the movement amount according to the scroll instruction, that is, scrolls and displays the image.
  • panoramic image data 332 made up of a sufficient number of image data 333 is stored in the memory 529 so that scrolling is possible.
  • the operator can select a desired image from a plurality of images in the panoramic image displayed in the area 72 by a click operation via the operation unit 503 or the like.
  • the arithmetic processing unit 510 detects the click position by the click operation via the input interface 550. Then, based on the detected click position and the position 338 of the panorama image data 332, the image data 333 corresponding to the selected image is enlarged and displayed as the selected image 73.
  • FIG. 10 is a main flowchart of processing according to Embodiment 2 of the present invention. In the process of FIG. 10, parameters related to the measurement process are changed.
  • the CPU 122 reads the panorama image data 332 generated by the image generation unit 223 from the table 331 and transmits it to the operation display device 500.
  • the arithmetic processing unit 510 of the operation display device 500 receives the panoramic image data 332 via the communication interface 528 (step S1a).
  • the received panorama image data 332 is stored in the memory 520.
  • next steps S2 and S3 as in the first embodiment, a panoramic image is displayed on the display 502, and the image 61 of the measurement processing result and the image 62 of the overlapping area are overlaid on the panoramic image and displayed simultaneously. .
  • the operator When changing the parameter of the measurement process, the operator operates the operation unit 503 and inputs information for changing the parameter (step S4a). Specifically, information indicating the type of parameter and the changed value is input.
  • Information for changing the parameters is transmitted from the arithmetic processing unit 510 to the captured image processing unit 120 via the communication interface 528.
  • the captured image processing unit 120 receives information for changing parameters.
  • the measurement parameter update unit 227 updates the parameters (type, value, etc.) for measurement processing using the received information, and outputs the updated parameters to the measurement processing unit 221.
  • the measurement processing unit 221 performs measurement processing on each image data 333 of the displayed panoramic image using the updated parameters. Then, using the measurement result, the measurement result 334 related to each image data 333 of the panorama image data 332 in the memory 124 is updated (step S5). Thereby, the panoramic image data 332 in the memory 124 is in a state of being edited (updated) to data having the measurement result 334 by the measurement process using the updated parameter.
  • the operator When the operator wishes to confirm the panoramic image after editing, the operator operates an editing result confirmation request via the operation unit 503.
  • the arithmetic processing unit 510 inputs a confirmation instruction according to the operation.
  • the arithmetic processing unit 510 determines that no confirmation instruction is input (YES in step S6), the arithmetic processing unit 510 ends the series of processes. On the other hand, when determining that the input has been made (NO in step S6), the arithmetic processing unit 510 transmits a confirmation instruction to the captured image processing unit 120.
  • the CPU 122 when the CPU 122 receives the confirmation instruction, the CPU 122 reads the edited panoramic image data 332 from the memory 124 and transmits it to the operation display device 500. Thereby, the process after step S1 is performed using the panorama image data 332 after editing. Therefore, the operator can confirm the measurement processing result using the updated parameter using the panoramic image.
  • the panoramic image after the parameter update is acquired by editing the panoramic image data 332 that has already been generated and stored in the memory 124, but the acquisition method is not limited to this.
  • image data 333 newly captured and acquired may be used.
  • the image data 333 stored after the image data 333 indicated by the pointer 360 is subjected to measurement processing with updated parameters to generate new panoramic image data 332. You may do that.
  • the parameter 337 of the table 331 may be updated using the updated parameter.
  • the parameter 337 of the table 331 may be updated as necessary, more specifically, when an operator inputs an update instruction via the operation unit 503.
  • FIGS. 11 to 13 are diagrams for explaining a display mode of a panoramic image according to Embodiment 2 of the present invention.
  • the value of the measurement result 334 is extracted and displayed so that the operator can easily grasp the guideline of the updated value.
  • the display 502 displays a vertical axis to which the value of the measurement result 334 is assigned and a horizontal axis orthogonal to the vertical axis.
  • a value representing the position of each image data 333 in the panoramic image is assigned to the horizontal axis.
  • the position is acquired based on the position 338.
  • the value assigned to the vertical axis indicates, for example, a correlation value.
  • the graph 91 indicates a graph generated by connecting correlation values corresponding to the respective image data 333 with line segments. The operator can quickly grasp from the graph 91 whether or not the image data 333 having a low or high value of the measurement result 334 exists.
  • FIG. 12 shows a state in which the portion 92 of the graph 91 is selectively designated according to the operation of the operator.
  • the portion 92 is displayed in a manner that can be distinguished from the graph 91. For example, the enclosing frame of the portion 92 is displayed in red.
  • the arithmetic processing unit 510 extracts the value on the horizontal axis corresponding to the portion 92 via the input interface 550. Then, the image data 333, the measurement result 334, and the shift amount 335 associated with the position 338 corresponding to the extracted value are read from the memory 520, and an image based on the read data is displayed on the display 502 (FIG. 13). See).
  • FIG. 13 shows a state in which the image corresponding to the portion 92 is enlarged and displayed.
  • a panoramic image 93 is displayed on the upper stage, and a graph 911 corresponding to the panoramic image 93 is displayed on the lower stage.
  • the panoramic image 93 on the upper stage is a panoramic image including image data 333 corresponding to the selected measurement result portion 92 and image data 333 acquired by capturing before and after the image data.
  • the slide bar 94 is displayed according to the direction that coincides with the direction in which the horizontal axis of the graph 911 extends. The operator can slide the slider 95 on the slide bar 94.
  • the arithmetic processing unit 510 moves and displays the portion 92. Further, the image data 333, the measurement result 334, and the shift amount 335 associated with the position of the moved portion 92 are read from the panoramic image data 332 in the memory 520, and an image based on the read data is enlarged on the display 502. indicate. Thereby, the panoramic image and the graph 911 in FIG. 13 can be scroll-displayed in conjunction with the slide operation.
  • a counter value 336 may be assigned instead of the position 338.
  • the graph 911 and the panoramic image 93 may be displayed as shown in FIGS.
  • FIG. 16 instead of the graph 911 in FIG. 11, only the correlation value of the measurement result of each work W is displayed as a point 912 plotted in association with the image 60 of the upper work W.
  • the image 62 is deleted from the panoramic image 93 of FIG. 16, and only the workpiece image 60 is displayed.
  • the plotted points 912 may be connected by a line.
  • the operator can switch the image displayed on the display 502 to any of the images shown in FIGS. 13 and 14 to 17 by operating the operation unit 503.
  • the arithmetic processing unit 510 compares the value (specifically, the correlation value) of each measurement result 334 in the graph 91 with the threshold value 97, and based on the comparison result.
  • an image 96 representing a portion corresponding to the range of the threshold value 97 is displayed superimposed on the graph 91 (see FIG. 18).
  • the image 96 is displayed, for example, in a frame box, and the frame is displayed in a manner distinguishable from the graph 91. For example, the frame and the graph 91 are displayed in different colors.
  • the arithmetic processing unit 510 displays the image 96 in another part of the graph 91 (part corresponding to the threshold value 97 in the graph 91). Are moved and displayed in sequence.
  • the image 96 in FIG. 18 indicates a portion that falls within the range of the threshold 97, the portion that falls outside the range of the threshold 97 may be indicated as shown in FIG.
  • ⁇ Display example for eliminating duplicate measurement> In order for the robot 300 to accurately grip the workpiece W, it is necessary to eliminate a situation where the measurement process is performed twice or more for the same workpiece W on the line 1 (hereinafter referred to as duplicate measurement). In the second embodiment, information for supporting the elimination of duplicate measurement is displayed.
  • FIG. 20 is a diagram showing an example of a panoramic image for eliminating duplicate measurement according to Embodiment 2 of the present invention.
  • the arithmetic processing unit 510 sets the even-numbered image in the panoramic image.
  • the image 61 based on the measurement result 334 is displayed in a different manner between the odd-numbered image and the odd-numbered image. For example, in FIG. 20, the image 61A based on the measurement result in the even-numbered image and the image 61B based on the measurement result in the odd-numbered image are displayed in different colors.
  • FIG. 21 is a diagram showing an example of a screen that displays the ratio of the measurement processing time to the imaging interval according to Embodiment 2 of the present invention.
  • the extent of the measurement processing time is indicated by the ratio of the measurement processing time to the imaging interval.
  • an imaging interval and a measurement processing time are acquired as follows.
  • CPU 122 first calculates the imaging interval by ((It ⁇ a) / v).
  • It [pulse] indicates the interval at which the imaging instruction is input
  • a [mm / pulse] indicates the amount of conveyor movement per pulse
  • v [mm / sec] indicates the conveyor speed. It is assumed that these values are stored in advance in the memory 124 as the imaging parameter 350.
  • the calculated imaging interval is stored in the table 331 as data of the imaging interval 339 in association with the image data 333 acquired by the imaging operation.
  • the measurement processing time refers to the time required from when the measurement processing unit 221 starts the measurement processing for the image data 333 acquired by one imaging operation until it ends. From the start to the end of the measurement process refers to, for example, the period from when the measurement processing unit 221 inputs image data from the imaging unit 110 to the output of the measurement process result. This time can be obtained by the CPU 122 using a timer (not shown) to measure, but here, the measurement processing time T [sec] is used to simplify the explanation.
  • the ratio acquisition unit 225 acquires data of the ratio 340. That is, for each image data 333 of the panoramic image data 332 in the memory 520, using the imaging interval 339 associated with the image data 333 and the measurement processing time T, (measurement processing time (T) ⁇ imaging interval) The ratio of the measurement processing time to the imaging interval is calculated. In this way, the ratio calculated for each image data 333 is registered as a ratio 340 in association with each image data 333 of the panorama image data 332.
  • the arithmetic processing unit 510 displays information based on the ratio 340. Specifically, a graph 133 (see FIG. 21) is obtained by using the data of the ratio 340 associated with each image data 333 of the panoramic image data 332 received from the captured image processing unit 120 and stored in the memory 520. And the generated graph 133 is displayed on the display 502 via the display controller 540.
  • a value of ratio 340 is assigned to the vertical axis, and a value indicating the position 338 of each image data 333 of the panoramic image is assigned to the horizontal axis orthogonal to the vertical axis.
  • the value of the ratio 340 associated with each image data 333 is displayed as a bar graph, but the display mode is not limited to the bar graph.
  • the ratio 340 when the ratio 340 is greater than the value “1”, it indicates that the measurement processing of the corresponding image data 333 has not ended within the imaging interval, and is less than the value “1”. In this case, it is indicated that there is a margin in the measurement processing time. Therefore, the operator can quickly grasp from the graph 133 whether or not there is image data 333 whose measurement processing has not ended within the imaging interval in the panoramic image.
  • the operator can obtain support information for determining the value of the variable It [pulse] or the appropriateness of the conveyor speed from the graph 133. Specifically, it is possible to obtain information for assisting in determining whether to change the setting so as to reduce the value of the variable It [pulse] or increase the conveyor speed.
  • the display mode is changed for the portion where the ratio 340 is larger than the value “1”.
  • the frame 131 is highlighted by surrounding the portion.
  • the color of the bar graph corresponding to each image data 333 may be changed according to the margin of the measurement processing time.
  • arithmetic processing unit 510 inputs the movement amount (movement direction, movement distance) of slider 95, and scrolls the panoramic image in conjunction with the input movement amount.
  • the display controller 540 is controlled so that the graph 133 is scrolled.
  • the margin of the measurement processing time can be presented. Therefore, after changing the parameter of the measurement process in step S5 of FIG. 10, information for assisting the determination when the operator determines whether or not the measurement process time using the changed parameter has a margin. Can be presented.
  • the measurement processing time itself may be displayed, not limited to the ratio of the measurement processing time to the imaging interval.
  • FIG. 22 shows a screen example for changing parameters in step S5.
  • the operator can input a parameter change instruction for measurement processing by operating a button 171 on the screen.
  • the arithmetic processing unit 510 switches the screen of the display 502 to another screen (not shown) for adjusting parameters.
  • On the screen for adjusting parameters for example, parameter types and value range (range) candidates are displayed.
  • FIG. 23 is a flowchart of the imaging parameter changing process according to the second embodiment of the present invention. Although the parameters of the measurement process are changed in FIG. 10, the parameters related to the imaging operation can be changed in the same manner.
  • steps S1a to S3 are performed in the same manner as in FIG. Thereby, a panoramic image or a graph of measurement results is displayed on the display 502.
  • the operator can input information for changing parameters related to the imaging operation by operating the operation unit 503 (step S4b). Specifically, the parameter type and the changed value are input.
  • the arithmetic processing unit 510 transmits information for changing parameters to the captured image processing unit 120 via the communication interface 528.
  • the imaging parameter update unit 228 updates the imaging parameter 350 of the memory 124 using the received information (step S5a). For example, it is possible to update the parameter for determining the deviation amount M described in FIG.
  • step S6 If a confirmation instruction for the measurement result using the changed parameter is not input via the operation unit 503 (YES in step S6), the process ends.
  • a confirmation instruction is input (NO in step S6), processing using the updated parameters is performed (step S7).
  • step S7 measurement processing using the updated parameters is performed.
  • panoramic image data is acquired by simulating (simulating) the imaging operation of the imaging unit 110 at the timing according to T (n) and T (n + 1) after the parameter update.
  • the image dividing unit 229 inputs the changed T (n) and T (n + 1) from the imaging parameter update unit 228, and uses these input values according to the procedure of FIG. Is calculated.
  • the deviation amount thus calculated is referred to as a post-change deviation amount MM.
  • the image dividing unit 229 extracts panorama images according to the panorama image data 332 in the memory 124 in order from the first image data 333 to the last image data 333 using the post-change deviation amount MM.
  • the panorama image data 332 can be divided into a plurality of image data 333 constituting the panorama image.
  • Each image data 333 acquired by the division indicates image data acquired when it is assumed that the imaging unit 110 has performed an imaging operation at a timing according to T (n) and T (n + 1) after the change. Acquiring the image data 333 in this way is equivalent to simulating (simulating) the imaging operation of the imaging unit 110 at a timing according to T (n) and T (n + 1) after the change.
  • the measurement processing unit 221 performs a measurement process on each image data 333 acquired by the image dividing unit 229 and outputs a measurement result 334.
  • Panorama image data 332 is generated using the output measurement result 334 and the post-change deviation amount MM. Thereby, the panorama image data after update is acquired, and the process of step S7 ends.
  • step S ⁇ b> 2 the updated panoramic image data is transmitted from the captured image processing unit 120 to the operation display device 500.
  • the arithmetic processing unit 510 of the operation display device 500 displays the updated panoramic image on the display 502 using the received updated panoramic image data, and displays the overlapping area image and the measurement result image together (step S3). ).
  • the operator can confirm the measurement result in association with the updated panoramic image displayed on the display 502. Thereby, support information for determining whether or not the updated imaging parameter value is appropriate can be obtained.
  • FIG. 24 is a diagram for explaining calibration according to the embodiment of the present invention.
  • FIG. 25 is a diagram illustrating an example of a parameter set acquired by the calibration illustrated in FIG. 26 to 28 are diagrams for explaining a calibration procedure according to the embodiment of the present invention.
  • the robot 300 is mounted on the bar 400 so as to be slidable in the same direction as the direction in which the bar 400 extends.
  • the bar 400 extends in the same direction as the direction in which the conveyor 10 moves.
  • position information robot coordinate values
  • these positions are sent from the robot controller 200 to the visual sensor 100 via the network NW. Information is transferred.
  • the calibration procedure will be described in more detail.
  • the user can easily perform calibration only by operating according to a designated procedure without understanding the meaning of calibration as described above. More specifically, the calibration according to the present embodiment is realized by a three-step procedure shown in FIGS.
  • a calibration sheet S on which the target pattern shown in the uppermost stage of FIG. 25 is drawn is used.
  • the target pattern shown on the calibration sheet S includes five circles (marks) whose insides are separated by about 90 °.
  • the calibration is basically performed using four marks. However, in the additionally arranged one mark, the arrangement direction of the calibration sheet S is unified in a predetermined direction. Used to do.
  • the user places the calibration sheet S on which the target pattern is drawn in the visual field of the visual sensor 100 (imaging unit 110). Then, the user gives an imaging instruction (“mark designation” in FIG. 26) to the visual sensor 100. Then, the visual sensor 100 performs a measurement process on an image obtained by imaging (an image in which the target pattern is included as a subject), and each center point for the four marks arranged at the four corners included in the target pattern. Determine the coordinate value of. As a result, the coordinate values [pixel] of the image coordinate system for the four marks included in the target pattern are acquired. The four coordinate values acquired correspond to (xi1, yi1), (xi2, yi2), (xi3, yi3), and (xi4, yi4) shown in the uppermost part of FIG.
  • the user moves the conveyor 10 to place the calibration sheet S on which the target pattern is drawn within the tracking range (operating range) of the robot 300, and To associate the positional relationship between the four marks included in the target pattern and the robot 300.
  • the user moves the conveyor 10 and arranges the calibration sheet S within the tracking range (operating range) of the robot 300. It is assumed that the count value before the movement of the conveyor 10 (at the start of calibration) is acquired in advance. This count value corresponds to the encoder count value E1 (at the start of calibration) shown in the second row from the top in FIG.
  • the user operates a teaching pendant (not shown) attached to the robot controller 200 to position the hand tip of the robot 300 so as to correspond to one mark on the calibration sheet S.
  • a teaching pendant (not shown) attached to the robot controller 200 to position the hand tip of the robot 300 so as to correspond to one mark on the calibration sheet S.
  • the position information of the robot 300 (coordinate value in the robot coordinate system indicating the position of the hand tip of the robot 300) grasped by the robot control device 200 is detected by the visual sensor. 100.
  • the process of positioning the tip of the hand of the robot 300 and transmitting the position information of the robot 300 in the positioning state to the visual sensor 100 is repeatedly executed for all four marks included in the target pattern.
  • Position information of the robot 300 corresponding to the four marks included in the target pattern is acquired.
  • Position information of the robot 300 corresponding to the four marks acquired is shown in the third row from the top of FIG. 25 (X1, Y1), (X2, Y2), (X3, Y3), (X4, This corresponds to Y4).
  • the position information of the robot 300 corresponding to all four marks is sent to the visual sensor 100. Maintained until sent.
  • the visual sensor 100 also stores the count value in the state shown in FIG. This count value corresponds to the encoder count value E2 (when the conveyor is moved to the robot operating range (upstream)) shown in the second row from the top in FIG.
  • the user further moves the conveyor 10 to place the calibration sheet S at the most downstream position in the tracking range (operating range) of the robot 300 and also moves the robot 300.
  • the positional relationship between one mark included in the target pattern and the robot 300 is associated.
  • the user moves the conveyor 10 to place the calibration sheet S at the downstream end position of the tracking range (operating range) of the robot 300.
  • the user operates the teaching pendant (not shown) to obtain the first mark (the coordinate value (X1, Y1) at the second stage) on the calibration sheet S with the hand tip of the robot 300. Position so that it corresponds to the mark).
  • the position information of the robot 300 (coordinate value in the robot coordinate system indicating the position of the hand tip of the robot 300) grasped by the robot control device 200 is detected by the visual sensor. 100.
  • the position information of the robot 300 corresponding to the first mark included in the target pattern is acquired.
  • the position information of the robot 300 corresponding to the acquired first mark corresponds to (X5, Y5) shown in the fourth row from the top in FIG.
  • the visual sensor 100 also stores the count value in the state shown in FIG. This count value corresponds to the encoder count value E3 (when the conveyor is moved to the robot operating range (downstream)) shown in the second row from the top in FIG.
  • the six parameters A to F of the conversion formula relating to the conversion of the coordinate system are determined. Is done. That is, parameters A to F that satisfy the following expression (or that minimize the error) are determined using a known method.
  • the CPU 122 may convert the panoramic image of the camera coordinate system into the coordinate values of the robot coordinate system using the parameters A to F and display them. Thereby, it is possible to present the arrangement of the work W on the conveyance path at the time when the robot 300 grips the operator.
  • the position (coordinate value) of each workpiece indicated by the measurement result 334 of the panoramic image data 332 is converted into the coordinate value of the robot coordinate system using the parameters A to F, and the panorama is converted according to the converted coordinate value.
  • the image 60 of each work is displayed on the image. Thereby, the arrangement
  • grips can be shown.
  • a panorama image is generated by superimposing the measurement result 334 of the image data 333 captured immediately before as the measurement result of the image data 333 captured this time, and the generated panorama image is displayed. Thereby, a measurement result can be displayed even in a portion where the images overlap.
  • FIG. 29 is a process flowchart according to the fourth embodiment of the present invention.
  • FIG. 30 is a schematic diagram showing a functional configuration for captured image processing according to Embodiment 4 of the present invention. Each function shown in FIG. 30 is assumed to be realized by the CPU 122 of the captured image processing unit 120 executing a program stored in advance in the memory 124. However, each function is not only a program but also a program and a circuit. It may be realized in combination.
  • Various programs executed by the captured image processing unit 120 are stored in the CD-ROM 136 and distributed.
  • the program stored in the CD-ROM 136 is read by a memory interface 135 having a CD-ROM (Compact Disk-Read Only Memory) drive function and stored in the memory 124 or the like.
  • the program may be downloaded from a host computer or the like via a network NW.
  • CPU 122 has a processing function for panoramic images. Specifically, a measurement processing unit 221 that executes workpiece measurement processing on a captured image, an overlap acquisition unit 222 that acquires an overlapping range of panoramic image images, and a panorama that executes processing related to panoramic image generation and display An image processing unit 223A is provided.
  • the measurement processing unit 221 and the overlap acquisition unit 222 are the same as those described with reference to FIG.
  • the panorama image processing unit 223A includes an image generation unit 223B for generating a panoramic image in which images overlap each other in an overlapping range, a drawing determination unit 223C that determines whether or not a measurement result should be drawn on the image, and a panorama image A display-related processing unit 225A for processing errors related to generation or display is included.
  • the display related processing unit 225A includes an image drop processing unit 225B, an encoder error processing unit 225C, and an over / underflow processing unit 225D. Details of these parts will be described later.
  • the image generation unit 223B reads the image data 333 indicated by the value of the variable N from the table 331 (step T5), and superimposes the image data of the corresponding measurement result 334 on the read image data 333 (step S5). T7).
  • the image data 333 indicated by the value of (N + 1) is read from the table 331 (step T9), and the corresponding image data of the measurement result 334 is superimposed on the read image data 333 (step T11).
  • the image generation unit 223B performs a superimposition process on the measurement result 334 of the Nth image data 333 in order to superimpose and display both image data 333 subjected to the superimposition process as described above in order to generate a panoramic image. Further, processing is performed so as to overlap as a measurement result of the (N + 1) th image data 333 (step T13). For example, the measurement result 334 of the first image data 333 is processed so as to overlap as the measurement result of the second image data 333.
  • the panorama image processing unit 223A determines whether or not the generation of the panorama image data 332 using the predetermined number of image data 333 has been completed (step T15). If it is determined that the generation has not ended (NO in step T15), the process returns to step T3, and the value of the variable N is updated to (N + 1).
  • step T13 the measurement result 334 of the second image data 333 is processed so as to overlap as the measurement result of the third image data 333.
  • the measurement result 334 of the Nth image data 333 is converted into the (N + 1) th image data 333.
  • Panorama image data 332 A is generated and stored in the memory 124 so as to overlap as a measurement result.
  • step T15 the generation of the panoramic image ends.
  • the generated panorama image data 332A is read from the memory 124 and transmitted to the operation display device 500.
  • the arithmetic processing unit 510 displays the received panoramic image data 332A on the display 502.
  • the detailed description of the display of the overlapping area is omitted.
  • the overlapping area is not displayed as shown in FIGS. 8A to 8C, for example. Can be displayed.
  • step T13 a process (step T13) performed by the image generation unit 223B to superimpose the measurement result 334 of the Nth image data 333 as the measurement result of the superimposed N + 1th image data 333 will be described.
  • the image generation unit 223B superimposes the measurement result 334N of the Nth image data 333 as the measurement result of the N + 1th image data 333.
  • the image generation unit 223B first calculates necessary data (value) for creating a panoramic image when superimposing measurement results.
  • the movement amount of the image from the Nth image to the (N + 1) th image can be calculated as follows using the calculated value by the calibration related to the robot coordinate system.
  • the moving amount of the image from the Nth sheet to the (N + 1) th sheet can be defined by ⁇ Tr ( ⁇ X, ⁇ Y) [mm]
  • To the robot coordinates (X ′ (n), Y ′ (n)) of the (N + 1) th sheet can be converted as follows.
  • F′x ⁇ E (X ′ (n) ⁇ C) ⁇ B (Y ′ (n) ⁇ F) ⁇ / (AE ⁇ BD)
  • F′y ⁇ A (Y ′ (n) ⁇ F) -D (X '(n) -C) ⁇ / (AE-BD).
  • the image generation unit 223B sets the coordinates of the measurement result 334N of the Nth image as (F′x, F′y), and converts the image of the measurement result 334N into the (N + 1) th image data 333. (See FIG. 32). As a result, the (N + 1) th image data 333 on which the Nth measurement result 334N is superimposed is generated.
  • the panorama image data 332A can be generated so that each image data 333 includes the measurement result 334N.
  • a part of the measurement result does not disappear (is not displayed) at the portion where the images overlap, and the Nth image and the (N + 1) th image are not displayed. All of the measurement results can be displayed. Therefore, it is not necessary to manage the panoramic image and the measurement result separately, data management is facilitated, and the processing from the start of the panorama image display to the end can be completed within a short period of time.
  • the image generation unit 223B superimposes the Nth measurement result 334N on the assumption that the coordinates of the Nth measurement result 334N are located within the range of the (N + 1) th image data 333.
  • the obtained N + 1th image data was generated.
  • the coordinates of the figure of the Nth measurement result 334N may be out of the range of the (N + 1) th image data 333.
  • the drawing determination unit 223C determines whether or not the coordinates (F′x, F′y) of the graphic of the Nth measurement result are out of the range of the N + 1th image. To do. When it is determined that the image is not included, the image generation unit 223B determines that the Nth measurement result according to the coordinates (F′x, F′y) is not drawn on the N + 1th image data, and the drawing is performed. Omitted.
  • the determination process of the drawing determination unit 223C can be different for each type of figure represented by the measurement result image 61.
  • the figure represented by the image 61 of the measurement result 334N will be described as an example of a circle with a width in which a line segment of a rectangle, an ellipse, and a circle has a predetermined width. Note that the image size of one piece of image data 333 is assumed to be 480 pixels ⁇ 752 pixels.
  • the upper left coordinates and lower right coordinates of the rectangle represented by the image 61 of the Nth measurement result 334N are converted into pixels using the robot coordinates of the (N + 1) th image, whereby the upper left coordinates (xa, ya) and lower right coordinates (xb, yb), when it is determined that the coordinates (xa, ya) and coordinates (xb, yb) do not satisfy all of the following four inequalities:
  • the generation unit 223B determines not to draw, and determines to draw when it is determined that at least one condition is satisfied.
  • the drawing determination unit 223C determines that (0 ⁇ xb ⁇ 752) and (0 ⁇ yb ⁇ 480) are satisfied among the above four conditions for the coordinates (xb, yb). According to the determination result, the image generation unit 223B determines to draw the Nth measurement result according to the coordinates (F′x, F′y) on the N + 1th image data, and the coordinates (F′x, F′y). The measurement result 334N of the Nth image according to () is drawn on the (N + 1) th image.
  • the coordinates of the ellipse image indicating the Nth measurement result 334N are converted into pixels using the robot coordinates of the (N + 1) th image, so that the center coordinates (Cx, Cy), When acquired as the radius rx and the radius ry in the Y direction, when it is determined that these values do not satisfy all of the following two inequalities, the image generation unit 223B determines not to draw, and at least one condition When it is determined that the condition is satisfied, the drawing is determined.
  • the panorama image processing unit 223A switches the display mode of the panorama image corresponding to the count mode of the encoder counter 132. Specifically, it is displayed in any of the display modes of FIGS.
  • the count mode of the encoder counter 132 is set in advance to either up-count or down-count, and the set mode value is, for example, the memory 124.
  • the panoramic image processing unit 223A determines the display mode of the panoramic image from the movement amounts ⁇ x and ⁇ y on the image per unit time, that is, per pulse.
  • the movement amount (calibration data) of one pulse is set to ( ⁇ Ex, ⁇ Ey) [mm / count], and the movement amount is converted into a pixel according to the following inverse conversion formula for conversion from [mm] to [pixel]. .
  • x [pixel] ⁇ E (X ⁇ C) ⁇ B (Y ⁇ F) ⁇ / (AE ⁇ BD)
  • y [pixel] ⁇ A (YF) -D (XC) ⁇ / (AE-BD)
  • the movement amount at the time of 0 pulse is calculated as follows.
  • x0 [pixel] ⁇ E ( ⁇ Ex ⁇ 0 ⁇ C) ⁇ B ( ⁇ Ey ⁇ 0 ⁇ F) ⁇ / (AE ⁇ BD)
  • y0 [pixel] ⁇ A ( ⁇ Ey ⁇ 0 ⁇ F) ⁇ D ( ⁇ Ex ⁇ 0 ⁇ C) ⁇ / (AE ⁇ BD)
  • the movement amount for one pulse is calculated as follows.
  • x1 [pixel] ⁇ E ( ⁇ Ex ⁇ 1 ⁇ C) ⁇ B ( ⁇ Ey ⁇ 1 ⁇ F) ⁇ / (AE ⁇ BD)
  • y1 [pixel] ⁇ A ( ⁇ Ey ⁇ 1-F) ⁇ D ( ⁇ Ex ⁇ 1-C) ⁇ / (AE-BD)
  • the panoramic image processing unit 223A uses the calculated movement amounts ⁇ x and ⁇ y in units of pixels to set a value indicating the panoramic image display mode in any of FIGS. 34 to 37 in the display mode data 332B.
  • the display mode data 332B is stored in the memory 124.
  • the movement amount ⁇ X in the direction in which the X axis extends (referred to as the X direction) among the axes of the robot coordinate system is greater than or equal to the movement amount ⁇ Y in the direction in which the Y axis extends (referred to as the Y direction).
  • the display mode data 332B is set with a value indicating a display mode in which the panoramic image extends in the horizontal direction of the display 502 (FIGS. 34 and 35).
  • the display mode data 332B is set with a value indicating the display mode on the display 502 such that the images are arranged in accordance with the imaging order from the right direction, for example (FIG. 34) and ( ⁇ x ⁇ 0), a value indicating the display mode of the display 502 is set so that images are arranged in accordance with the imaging order from the left direction, for example (see FIG. 35).
  • the panorama image processing unit 223A determines that the movement amount ⁇ X in the X direction is smaller than the movement amount ⁇ Y in the Y direction, the panorama image is extended in the vertical direction of the display 502 in the display mode data 332B.
  • a value indicating an appropriate display mode is set (FIGS. 36 and 37).
  • the display mode data 332B is set with a value indicating the display mode of the display 502 such that images are arranged according to the imaging order from the downward direction, for example (see FIG. 36) and ( ⁇ y ⁇ 0), a value indicating the display mode of the display 502 is set so that images are arranged in accordance with the imaging order from the upper direction, for example (see FIG. 37).
  • the display mode data 332B for which values are set by the panorama image processing unit 223A is read from the memory 124 together with the panorama image data 332A and transmitted to the operation display device 500.
  • the arithmetic processing unit 510 displays the received panorama image data 332A on the display 502 in a manner according to the display manner data 332B received in association with the panorama image data 332A.
  • the panoramic image can be displayed in any of the modes shown in FIGS. 34 to 37 according to the moving direction and moving amount of the workpiece W in the robot coordinate system.
  • the numerical values with circles indicate the imaging order of the images constituting the panoramic image
  • the arrow AR indicates the direction in which the images are arranged in the panoramic image, and both are shown for explanation. It is not displayed on the display 502.
  • the display-related processing unit 225A processes an error that occurs when generating or displaying a panoramic image as described above.
  • an error an error that an image to be used for generating a panoramic image is insufficient and an error caused by the encoder counter 132 are illustrated.
  • the image drop processing unit 225B uses the image data 333 of the missing image in the panoramic image data 332A, or The measurement result 334 is omitted. Missing images occur, for example, when the visual sensor 100 fails to receive an imaging instruction.
  • the visual sensor 100 captures an image in response to the received imaging instruction every time an imaging instruction is received from the robot control device 200.
  • the robot control apparatus 200 counts the number of pulses included in the pulse signal from the encoder 14 and transmits an imaging instruction to the visual sensor 100 at a timing when a number of pulses equal to or greater than a predetermined value is input. Accordingly, the visual sensor 100 is controlled to capture images at a predetermined interval, whereby the image data 333 is repeatedly acquired at the interval. Thereby, a series of image data 333 constituting a panoramic image can be obtained.
  • the visual sensor 100 cannot receive the imaging instruction, and as a result, the imaging instruction
  • the image data 333 corresponding to the image data 333 cannot be acquired, and the image data 333 is missing from the series of image data 333 constituting the panoramic image.
  • the image drop processing unit 225B determines that the movement amount ( ⁇ x, ⁇ y) in units of pixels calculated as described above indicates the size of one or more images, it detects that the image is missing. That is, when it is determined that the movement amount ( ⁇ x, ⁇ y) satisfies either of the conditions (
  • the image drop processing unit 225B processes the panorama image data 332A so as to omit the missing image data 333.
  • information using the count value is inserted into the encoder counter 132 in place of the missing image data 333 in the panoramic image data 332A.
  • the display of the image 61 of the measurement result 334N of the missing image is omitted. That is, assuming that the Nth image is missing in FIG. 32, the image 61 of the Nth measurement result 334N is not displayed and the image 61 of the (N ⁇ 1) th measurement result 334N is displayed as the (N + 1) th image. Panorama image data 332A is generated without being superimposed on the image.
  • the encoder error processing unit 225C detects that the encoder counter 132 is not counting when it is determined that the same value is input three times or more from the encoder counter 132 during imaging. When it is detected that the counting operation is not performed, the operation display device 500 is notified to output an error message to the display 502, and the panoramic image display process is terminated.
  • the overflow / underflow processing unit 225D determines whether overflow or underflow has occurred using the difference between the counter values of the encoder counter 132.
  • the imaging trigger interval ⁇ Tr is corrected according to the following arithmetic expression. Note that the value of the encoder counter 132 is not rewritten.
  • Trc (N) Trc (N) ⁇ Sgn ⁇ Trc (N) ⁇ ⁇ Max_count + 1
  • the variable Max_count is a maximum count value of the encoder counter 132 and indicates a predetermined value. The value of this variable Max_count is stored in advance in a predetermined area of the memory 124.
  • the encoder counter value Trc (N) is corrected to a value that excludes errors due to overflow or underflow, and the corrected encoder counter value Trc (N) is used.
  • the imaging trigger interval ⁇ Tr is calculated. Thereby, it is possible to obtain the movement amounts ⁇ x and ⁇ y from which errors due to overflow or underflow are eliminated.
  • FIG. 38 shows a panoramic image display example according to FIG. 36 or 37 on the display 502
  • FIG. 39 shows a panoramic image display example according to FIG. 34 or 35 on the display 502.
  • the display 502 displays the data of the average imaging time 381 and the processing time 391 measured by the CPU 122 together with the panoramic image.
  • the CPU 122 calculates the average imaging time 381 as an average value ( ⁇ / 10) of 10 times of the imaging trigger interval time ⁇ .
  • the CPU 122 measures the maximum processing time and the average processing time as the processing time 391.
  • the maximum processing time indicates the maximum time taken for the measurement processing by the measurement processing unit 221, and the average processing time indicates the average time required for the measurement processing.
  • the CPU 122 measures processing time using an internal timer (not shown).
  • the operator compares the maximum processing time indicated by the processing time 391 with the average imaging time 381. Based on the comparison result, it can be determined how much time is available for the measurement process.
  • the parameter value related to the measurement process can be adjusted with reference to the determined margin.
  • FIG. 40 is a schematic diagram showing a hardware configuration of a support device 600 according to Embodiment 5 of the present invention.
  • the support device 600 is typically composed of a general-purpose computer. From the viewpoint of maintainability, a notebook personal computer with excellent portability is preferable.
  • the support device 600 executes a program in the CPU 610 that executes various programs including an OS (Operating System), a ROM (Read Only Memory) 620 that stores BIOS and various data, and the CPU 61. It includes a memory RAM 630 that provides a work area for storing necessary data, and a hard disk (HDD) 640 that stores programs executed by the CPU 61 in a nonvolatile manner.
  • OS Operating System
  • ROM Read Only Memory
  • BIOS Basic-only Memory
  • the support device 600 further includes a keyboard 650 and a mouse 660 that receive an operation from the user, and a monitor 670 for presenting information to the user.
  • various programs executed by the support device 600 are stored in the CD-ROM 690 and distributed.
  • the program recorded non-temporarily on the CD-ROM 690 is read by a CD-ROM (Compact Disk-Read Only Memory) drive 680 and stored in a hard disk (HDD) 640 or the like.
  • the program may be downloaded from a host computer or the like via a network.
  • the support device 600 is realized using a general-purpose computer, no further detailed description will be given.
  • Such a support device 600 is capable of data communication with both the visual sensor 100 and the robot control device 200, and thus can collect various data. Therefore, the support device 600 may include the above-described functions related to the panoramic image display of the operation display device 500.
  • a table 331 that stores measurement results for each image data 333 can be used. That is, in the robot 300, by recording the robot operation in association with the counter value, the robot operation can be associated with the image measurement result 334 corresponding to the robot operation.
  • the gripping operation fails, in order to pursue the cause of the failure, the image of the workpiece that was the gripping object and the measurement result 334 can be reproduced on the support device 600 or the operation display device 500. Therefore, the cause of the failure can be analyzed more easily, or information that supports the analysis can be presented.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)
  • Manipulator (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

 画像処理装置は、連続する撮像の前後で撮像範囲に重複領域を有する撮像部(110)に接続される画像処理装置であって、撮像部(110)によって得られる複数枚の撮像画像を受け付けるインターフェイスと、撮像画像に対する計測処理を行うことにより、当該撮像画像中の被写体の計測結果を取得する計測部と、複数枚の撮像画像を、前記重複領域に対応する重なり範囲で撮像順に重なり合うように合成し、且つ前記重なり範囲における前記被写体の計測結果を当該重なり範囲において重畳させた合成画像を生成する合成部と、合成画像と、当該合成画像に関連付けて重なり範囲を示す情報とを出力する出力部と、を備える。

Description

画像処理装置および画像処理プログラム記録媒体
 本発明は、コンベアトラッキング等に向けられた画像処理装置および画像処理プログラム記録媒体に関する。
 ファクトリーオートメーション(FA)分野においては、省力化のため、画像処理を用いて各種の工程を制御する技術が多用されている。このような画像処理技術の適用例の一つとして、ベルトコンベア等の搬送装置によってワークを搬送するとともに、その搬送中のワークを移動機械(以下、「産業用ロボット」あるいは単に「ロボット」とも称す。)を用いて、追跡(トラッキング)および把持するような作業工程がある。このような作業工程は、コンベアトラッキング等と称される。
 このコンベアトラッキングの技術においては、撮像装置を用いて搬送装置上のワークを撮像し、その撮像によって得られた画像に対して、画像処理装置を用いてパターンマッチングあるいは2値化処理などの計測処理を行うことで、各ワークの存在位置(座標値)を特定する。そして、この特定された各ワークの存在位置に基づいて、ロボットが各ワークを追跡および把持する。
 例えば、特許文献1(特開2002-113679号公報)は、搬送体によって搬送される複数のワークを撮像し、当該撮像結果から認識された各ワークの位置座標に基づいて複数のワークのハンドリングを制御するトラッキング方法を開示している。より具体的には、特許文献1(特開2002-113679号公報)に記載のトラッキング方法は、撮像手段による撮像領域とその直後の撮像領域とがワークの全形が収まる一定の幅で進行方向に重なるように連続的に撮像し、撮像領域内に全形を含むワークのみ位置座標を認識するという構成を採用する。
 このように連続的に撮像された画像を用いて搬送経路上の全体の状態を俯瞰するためには、撮像領域の重なり部分を利用して合成したパノラマ画像を用いることが有効であると考えられる。
 コンベアトラッキングに向けられたものではないが、オペレータが手に持ったカメラをパンしながら連続撮像した複数のフレームを繋ぎ合わせることにより、オペレータが撮像した範囲のパノラマ画像を生成する画像処理装置が特許文献2(特開平5-260264号公報)に開示されている。
特開2002-113679号公報 特開平5-260264号公報
 特許文献2(特開平5-260264号公報)の画像処理装置を用いて生成されるパノラマ画像は搬送装置上のワークを撮像したものではなく、ワークの計測情報とは何ら関連付されていない。
 この発明の目的は、撮像画像を用いてワークを搬送する経路上の状態把握を支援するための情報を出力する画像処理装置および画像処理プログラム記録媒体を提供することである。
 この発明のある局面に従う、連続する撮像の前後で撮像範囲に重複領域を有する撮像部に接続される画像処理装置は、撮像部によって得られる複数枚の撮像画像を受け付けるインターフェイスと、撮像画像に対する計測処理を行うことにより、当該撮像画像中の被写体の計測結果を取得する計測部と、複数枚の撮像画像を、重複領域に対応する重なり範囲で撮像順に重なり合うように合成し、且つ重なり範囲における被写体の計測結果を当該重なり範囲において重畳させた合成画像を生成する合成部と、合成画像と、当該合成画像に関連付けて重なり範囲を示す情報とを出力する出力部と、を備える。
 好ましくは、計測結果は、撮像画像における被写体に相関する図形であって、合成部は、図形の少なくとも一部が、重なり範囲に含まれるか否かを判定する判定部を、含み、図形の少なくとも一部が、重なり範囲に含まれると判定されたとき、被写体の計測結果の画像を当該重なり範囲に重畳させた合成画像を生成する。
 好ましくは、合成部は、連続する撮像によって得られる複数枚の撮像画像における、単位時間当たりの画像の移動量から、出力態様を決定する。出力部は、決定された出力態様に基づき、合成画像を出力する。
 好ましくは、画像処理装置は、合成画像を生成する場合に、生成に関するエラーを検出し、検出したエラーを処理する。
 好ましくは、画像処理装置は、上述のエラーの検出では、合成画像を生成するための撮像画像の不足を検出する。
 好ましくは、出力部は、合成画像における各撮像画像の出力態様を相違させる。
 好ましくは、画像処理装置は、外部からの操作を受け付ける操作入力部を、さらに備える。出力部は、合成画像における操作入力部によって選択された撮像画像を拡大して出力する。
 好ましくは、画像処理装置は、操作入力部が受け付ける操作によって指示される計測結果を、各撮像画像に対応する計測結果のうちから選択する。出力部は、選択された計測結果に対応する撮像画像と、当該撮像画像の前後で撮像された撮像画像とから成る合成画像を出力する。
 好ましくは、出力部は、合成画像における撮像画像のうちから、対応する計測結果が予め指定された値を指示する撮像画像を選択して出力する。
 好ましくは、出力部は、合成画像における撮像画像のうち、撮像順が奇数番目の撮像画像に対応する計測結果と、偶数番目の撮像画像に対応する計測結果との出力態様を異ならせる。
 好ましくは、画像処理装置は、計測部による計測処理の所要時間に関する情報を出力する。
 好ましくは、所要時間に関する情報は、連続する撮像の前後の時間間隔に対する、撮像画像の計測処理の所要時間の比である。
 好ましくは、合成画像の各撮像画像について比を取得し、合成画像と、当該合成画像の各撮像画像に関連付けて比を出力する。
 この発明の他の局面に従えば、連続する撮像の前後で撮像範囲に重複領域を有する撮像部に接続されるコンピュータで実行される画像処理プログラムを非一時的に記録した機械読取可能な記録媒体が提供される。
 上記の画像処理プログラムは、コンピュータを、撮像部によって得られる複数枚の撮像画像を受け付けるインターフェイスと、撮像画像に対する計測処理を行うことにより、当該撮像画像中の被写体の計測結果を取得する計測部と、複数枚の撮像画像を、重複領域に対応する重なり範囲で撮像順に重なり合うように合成し、且つ重なり範囲における被写体の計測結果を当該重なり範囲において重畳させた合成画像を生成する合成部と、合成画像と、当該合成画像に関連付けて重なり範囲を示す情報とを出力する出力部、として機能させる。
 本発明によれば、オペレータは、ワークを搬送する経路上の状態把握をするための情報を取得できる。
本発明の実施の形態1に係る視覚センサを利用したコンベアトラッキングシステムの構成を示す模式図である。 本発明の実施の形態1に係る視覚センサを利用したコンベアトラッキングシステムのハードウェア構成について示す模式図である。 本発明の実施の形態1に係る撮像画像処理のための機能構成について示す模式図である。 本発明の実施の形態1に係る撮像画像処理のためのデータの記憶内容示す模式図である。 本発明の実施の形態1に係るパノラマ画像の生成手順を説明するための図である。 本発明の実施の形態1に係る処理のメインフローチャートである。 本発明の実施の形態1のパノラマ画像を説明するための模式図である。 本発明の実施の形態1に係るパノラマ画像の表示態様の他の例を説明する図である。 本発明の実施の形態1に係るパノラマ画像のスクロールを説明する図である。 本発明の実施の形態2に係る処理のメインフローチャートである。 本発明の実施の形態2に係るパノラマ画像の表示態様を説明する図である。 本発明の実施の形態2に係るパノラマ画像の表示態様を説明する図である。 本発明の実施の形態2に係るパノラマ画像の表示態様を説明する図である。 本発明の実施の形態2に係るパノラマ画像の表示態様を説明する図である。 本発明の実施の形態2に係るパノラマ画像の表示態様を説明する図である。 本発明の実施の形態2に係るパノラマ画像の表示態様を説明する図である。 本発明の実施の形態2に係るパノラマ画像の表示態様を説明する図である。 本発明の実施の形態2に係る計測結果を閾値を用いて表示するための画面を例示する図である。 本発明の実施の形態2に係る計測結果を閾値を用いて表示するための画面を例示する図である。 本発明の実施の形態2に係る重複計測排除のためのパノラマ画像の例を示す図である。 本発明の実施の形態2に係る撮像間隔に対する計測処理時間の比を表示する画面例を示す図である。 本発明の実施の形態2に係るパラメータ変更のための画面例を示す図である。 本発明の実施の形態2に係る撮像パラメータの変更処理のフローチャートである。 本発明の実施の形態3に係るキャリブレーションを説明するための図である。 本発明の実施の形態3に係るキャリブレーションによって取得されるパラメータセットの一例を示す図である。 本発明の実施の形態3に係るキャリブレーションの手順を説明するための図である。 本発明の実施の形態3に係るキャリブレーションの手順を説明するための図である。 本発明の実施の形態3に係るキャリブレーションの手順を説明するための図である。 本発明の実施の形態4に係る処理フローチャートである。 本発明の実施の形態4に係る撮像画像処理のための機能構成について示す模式図である。 本発明の実施の形態4に係る画像に計測結果を重ね合わせる処理概要を説明する図である。 本発明の実施の形態4に係る画像に計測結果を重ね合わせる処理を説明する図である。 本発明の実施の形態4に係る画像に計測結果を描画するか否かの判定を説明する図である。 本発明の実施の形態4に係るパノラマ画像の表示態様を説明する図である。 本発明の実施の形態4に係るパノラマ画像の表示態様を説明する図である。 本発明の実施の形態4に係るパノラマ画像の表示態様を説明する図である。 本発明の実施の形態4に係るパノラマ画像の表示態様を説明する図である。 本発明の実施の形態4に係るパノラマ画像の表示の一例を示す図である。 本発明の実施の形態4に係るパノラマ画像の表示の他の例を示す図である。 本発明の実施の形態5に係るサポート装置のハードウェア構成を示す模式図である。
 本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰り返さない。
 [実施の形態1]
 図1は、本発明の実施の形態1に係る視覚センサを利用したコンベアトラッキングシステムの構成を示す模式図である。図1に示すコンベアトラッキングシステムは、2つの搬送装置(コンベア)10および20を含む。コンベア10および20は、それぞれ駆動ローラ12および22によって回転駆動される。以下では、コンベア10および20をそれぞれライン1およびライン2とも称す。図1に示す例では、ライン1は、紙面右側に移動し、ライン2は、紙面左側に移動する。ライン1には、搬出装置30等によって紙面左側からワークWがランダムに提供される。このライン1上のワークWは、紙面左側から紙面右側へ移動する。ワークWとしては、典型的には、お菓子等の食品や各種の錠剤等が想定される。
 本実施の形態に係る視覚センサ100は、ライン1上の予め定められた位置に設けられる。視覚センサ100は、ワークなどの被写体を撮像するための撮像部と当該撮像部によって撮像された画像を処理するための撮像画像処理部とを一体的に構成したものである。ただし、撮像部と撮像画像処理部とを別体として構成してもよい。
 視覚センサ100は、その撮像視野がライン1の幅方向(搬送方向とは直交する方向)の全体を含むように設定されている。撮像視野は、撮像部(カメラ)の画角(または視野角)の設定を用いて決定することができる。本明細書では、撮像視野は、撮像部で撮像され得る範囲に相当し『撮像範囲』と呼ぶこともある。
 上述の撮像範囲となるように設置された視覚センサ100が、予め定められた周期で連続的に撮像を行うことで、ライン1上をランダムに流れてくるワークWを順次撮像できる。視覚センサ100は、この順次撮像される画像に対してパターンマッチング等の計測処理を行うことで、各ワークの位置決めおよびトラッキング処理を行う。このように、視覚センサ100の撮像部(後述の図2に示す撮像部110)は、搬送装置であるコンベア10上を搬送されるワークWを撮像するように配置されている。そして、この撮像部110には、撮像画像を処理するための撮像画像処理部120(後述の図2を参照)が接続される。
 ライン1の搬送方向には、視覚センサ100の下流側に、ワークWを把持してライン2へ移動させるロボット300が配置されている。このロボット300は、ワークWを把持するためのアームを有しており、このアームを目的位置に移動させることで、ライン1上のワークを把持する。すなわち、ロボット300は、搬送装置であるコンベア10(ライン1)の搬送経路において、視覚センサ100の撮像部の撮像範囲より下流側に配置されるとともにワークWを取り扱う移動機械に相当する。より具体的には、ロボット300は、そのアームを目的のワークWに位置決めして、ピックアップしてライン2上に整列する。
 さらに、ロボット300は、ライン1に沿って移動するための移動機構(図示せず)上に配置されており、所定の範囲に亘って移動する。このロボット300の移動範囲をトラッキング範囲とも称す。
 ロボット300のトラッキング処理および位置決め処理については、ライン1に設けられたエンコーダ14による検出結果を用いて制御される。このエンコーダ14は、典型的には、ロータリーエンコーダが採用され、回転に伴ってパルス信号を発生する。この発生するパルス信号のパルス数をカウントすることで、コンベア10(ライン1)と連結されたローラの回転数、すなわち、エンコーダ14が発生するパルス信号は、搬送装置であるコンベア10の搬送経路における移動量を示す信号に相当し、このパルス信号に基づいて、コンベア10の移動量が算出される。
 ロボット300は、ロボット制御装置200からの指示に従って動作する。すなわち、ロボット制御装置200は、移動機械であるロボット300を制御するための制御装置である。ロボット制御装置200は、視覚センサ100とネットワークNWを介して接続されており、視覚センサ100によって検出された各ワークWの位置に基づいて、ロボット300に対してワークWの把持動作に必要な指示を与える。
 ネットワークNWには、視覚センサ100およびロボット制御装置200に加えて、操作表示装置500、およびパーソナルコンピュータに相当する機能を有するサポート装置600が接続されている。操作表示装置500は、視覚センサ100からの処理結果やロボット制御装置200からのロボット300の動作状態などを表示するとともに、ユーザからの操作に応答して、視覚センサ100および/またはロボット制御装置200へ各種の指示を与える。
 図1に示すコンベアトラッキングシステムにおいては、生産性を向上するために、ライン速度(搬送速度)をより高めたいという潜在的なニーズが存在する。このようなニーズに対処するため、本実施の形態に係るコンベアトラッキングシステムにおいては、エンコーダ14が発生するパルス信号をロボット制御装置200だけではなく、視覚センサ100にも入力するという構成を採用する。このように、視覚センサ100およびロボット制御装置200が同期して対象の搬送装置(コンベア)の位置情報を取得することで、ロボット制御装置200と視覚センサ100との間のネットワークNWを介した通信による同期をとった動作が可能となる。ここでは、ロボット制御装置200と視覚センサ100との間での同期をとった動作制御に関する詳細は略す。
 <撮像動作と移動量>
 次に、図1に示すコンベアシステムにおける視覚センサ100の撮像動作と移動量の関係について説明する。
 視覚センサ100は、ライン1を撮像する。視覚センサ100の撮像動作は、ロボット制御装置200からの撮像指示に応じて開始される。この撮像指示は、視覚センサ100とロボット制御装置200とを接続するネットワークNW経由で搬送される。このネットワークNWは、典型的には、イーサネット(登録商標)などの汎用的なネットワークを採用することができる。
 視覚センサ100は、撮像指示をロボット制御装置200から受信するように構成されており、この撮像指示に応答して撮像を開始する。これにより、視覚センサ100は、撮像視野を写した画像を順次取得する。そして、視覚センサ100は、当該画像に対して計測処理を実行する。さらに、視覚センサ100は、この計測処理によって得られた各ワークWの撮像時の位置情報をロボット制御装置200へ送信する。このように、視覚センサ100は、撮像部の撮像によって得られた画像に対して計測処理を行うことで、画像中の予め登録されたワークに対応する領域の位置情報を取得する。
 より具体的には、ロボット制御装置200は、エンコーダ14からのパルス信号に含まれるパルス数をカウントし、予め定められた値以上の数のパルスが入力されたタイミングで、ネットワークNWを経由して視覚センサ100に対して撮像指示を送出する。
 視覚センサ100からの各ワークWの位置情報は、ネットワークNWを介してロボット制御装置200へ送信される。ロボット制御装置200は受信する位置情報を用いて、ロボット300に対して把持動作に必要な指示を与える。ここでは、ロボット300の把持動作に関する詳細は略す。
 ライン1に設けられたエンコーダ14の検出結果に応じて生成されるパルス信号は、視覚センサ100およびロボット制御装置200へ入力されるように構成されている。視覚センサ100およびロボット制御装置200は、パルス信号に含まれるパルス数をカウントするためのエンコーダカウンタをそれぞれ有している。エンコーダ14からのパルス信号は、並列的に、視覚センサ100およびロボット制御装置200に入力されるので、それぞれのエンコーダカウンタを同じタイミングで初期化(カウンタリセット)しておけば、その後に入力されるパルス信号についてのカウンタ値は、互いに同じ値、すなわち、カウンタ値についての同期をとることができる。
 より具体的には、視覚センサ100およびロボット制御装置200には、いずれも、エンコーダ14からのパルス信号に含まれる1パルスあたりのコンベアの移動量が予め設定されている。さらに、視覚センサ100およびロボット制御装置200のそれぞれのエンコーダカウンタについても、互いに同一のパラメータ(カウンタ最大値、カウンタ最小値、1パルスに対する増加値など)が設定されている。すなわち、視覚センサ100のエンコーダカウンタは、ロボット制御装置200のエンコーダカウンタとの間で、カウントに関して同一のパラメータが設定されている。
 また、これらのエンコーダカウンタによるカウンタ値は、生産ラインの稼動前に0に初期化される。すなわち、視覚センサ100のエンコーダカウンタは、パルス信号に含まれるパルス数のカウント開始前に、ロボット制御装置200のエンコーダカウンタとともに、リセットされる。
 このように本実施の形態においては、視覚センサ100とロボット制御装置200との間でコンベア10の搬送経路における移動量を同期して保持する手段が実現される。
 <ハードウェア構成>
 図2は、本発明の実施の形態1に係る視覚センサを利用したコンベアトラッキングシステムのハードウェア構成について示す模式図である。図2を参照して、視覚センサ100は、撮像部110と、撮像画像処理部120とを含む。撮像画像処理部120は操作表示装置500と通信する。ここでは、ロボット制御装置200およびサポート装置600の図示を略している。
 図2では、撮像部110から、撮像によって得られた撮像画像を受理して処理する画像処理装置は、撮像画像処理部120と操作表示装置500とを含んで構成される。なお、操作表示装置500の機能をサポート装置600が備えてもよい。この場合には、画像処理装置は、撮像画像処理部120の機能とサポート装置600の機能とを含んで構成される。
 撮像部110は、撮像視野に存在する被写体を撮像する装置であり、主体たる構成要素として、レンズや絞りなどの光学系と、CCD(Charge Coupled Device)イメージセンサやCMOS(Complementary Metal Oxide Semiconductor)イメージセンサなどの受光素子とを含む。撮像部110は、撮像画像処理部120からの指令に従って撮像するとともに、その撮像によって得られた画像データを撮像画像処理部120へ出力する。
 撮像画像処理部120は、CPU(Central Processing Unit)122と、メモリ124と、撮像制御部126と、通信インターフェイス(I/F)128と、入出力インターフェイス(I/F)130と、エンコーダカウンタ132と、着脱自在の記録媒体の一例であるCD-ROM(Compact Disk-Read Only Memory)136が装着されるメモリインターフェイス(I/F)135とを含む。これらのコンポーネントは、バス134を介して互いにデータ通信可能に接続されている。
 CPU122は、撮像画像処理部120において主たる演算を行うプロセッサである。メモリ124は、CPU122によって実行される各種プログラム、撮像部110によって撮像された画像データ、各種パラメータなどを格納する。典型的には、メモリ124は、DRAM(Dynamic Random Access Memory)などの揮発性記憶装置と、FLASHメモリなどの不揮発性記憶装置とからなる。
 撮像制御部126は、CPU122などからの内部コマンドに従って、接続されている撮像部110における撮像動作を制御する。撮像制御部126は、撮像部110に対して各種コマンドを送信するインターフェイスと、撮像部110からの画像データを受信するインターフェイスとを有している。
 通信インターフェイス128は、操作表示装置500との間で各種データをやり取りする。典型的には、視覚センサ100および操作表示装置500とはイーサネット(登録商標)を介して接続されており、通信インターフェイス128は、このようなイーサネット(登録商標)に準拠したハードウェアである。
 入出力インターフェイス130は、撮像画像処理部120から外部へ各種信号を出力し、あるいは、外部からの各種信号を入力する。特に、入出力インターフェイス130は、エンコーダ14で生成されるパルス信号を受け入れ、その信号をデジタル信号に変換してエンコーダカウンタ132へ出力する。
 エンコーダカウンタ132は、エンコーダ14からのパルス信号に含まれるパルス数をカウントし、カウント値を出力する。このエンコーダカウンタ132は、基本的には、CPU122の演算サイクルとは独立して動作するため、エンコーダ14からのパルス信号に含まれるパルス数を取り逃すことがない。
 一方、操作表示装置500は、メモリ520を含む演算処理部510と、通信インターフェイス(I/F)528と、液晶などからなる外部のディスプレイ502の表示動作を制御する表示コントローラ540と、オペレータが操作するボタン,スイッチなどからなる操作部503からの操作を受付ける入力インターフェイス(I/F)550と、着脱自在の記録媒体の一例であるメモリカード531が装着されるメモリインターフェイス(I/F)529とを含む。これら各部は、表示用DSP(Digital Signal Processor)など各種プロセッサを用いて構成される。メモリ20には、後述するパノラマ画像332が格納される。
 ここでは、ディスプレイ502と操作部503を個別にしているが、両者が一体的に構成された、いわゆるタッチパネルで提供されてもよい。
 演算処理部510は、視覚センサ100からの画像データを受信し、受信した画像データを用いて表示コントローラ540を制御することにより、ディスプレイ502に画像を表示させ、また操作部503のオペレータ操作による指示を入力インターフェイス550を介して入力する。メモリ220には、視覚センサ100から受信する画像データが格納される。また、視覚センサ100の計測処理によって検出されたそれぞれのワークWの計測結果などの情報が格納される。
 通信インターフェイス(I/F)528は、視覚センサ100の撮像画像処理部120との間で各種データをやり取りする。典型的には、視覚センサ100および操作表示装置500とはイーサネット(登録商標)を介して接続されており、通信インターフェイス528は、このようなイーサネット(登録商標)に準拠したハードウェアである。
 <機能構成>
 図3は、本発明の実施の形態1に係る撮像画像処理のための機能構成について示す模式図である。図4は、本発明の実施の形態1に係る撮像画像処理のためのデータの記憶内容示す模式図である。
 図3に示す各機能は、撮像画像処理部120のCPU122がメモリ124に予め格納されたプログラムを実行することにより実現されると想定するが、各機能は、プログラムのみならず、プログラムと回路の組合せで実現されてもよい。
 撮像画像処理部120で実行される各種プログラムは、CD-ROM136に格納されて流通する。このCD-ROM136に格納されたプログラムは、CD-ROM(Compact Disk-Read Only Memory)ドライブ機能を有するメモリインターフェイス135によって読取られ、メモリ124などへ格納される。あるいは、上位のホストコンピュータなどからネットワークNWを通じてプログラムをダウンロードするように構成してもよい。
 本実施の形態では、ライン1上をワークWが搬送される状態において、撮像部110が撮像範囲を連続的に撮像して取得される各画像データを重なり合わせながら繋げることにより、ライン1上の上流から下流までの全景に対応する画像を生成する。この全景に対応する画像を、パノラマ画像と称する。
 CPU122は、パノラマ画像のための処理機能を有する。具体的には、撮像画像についてワークの計測処理を実行する計測処理部221、パノラマ画像の画像どうしの重なり範囲を取得するための重なり取得部222、重なり範囲で画像どうしが重なり合うようなパノラマ画像を生成するための画像生成部223、撮像間隔に対する計測処理の所要時間の比を取得するための比取得部225、各種のパラメータ(パラメータの種類および/または値)を更新するためのパラメータ更新部226、およびパノラマ画像を各撮像画像に分割する画像分割部229を備える。
 パラメータ更新部226は、計測処理に係るパラメータを更新するための計測パラメータ更新部227、および撮像間隔に係るパラメータを更新するための撮像パラメータ更新部228を含む。
 上述の計測処理には、典型的には、予め登録されたワークWについてのモデル画像に基づくパターンマッチングを用いたサーチ処理がある。サーチ処理では、ワークWの特徴部分を画像パターン(モデル)として予め登録しておき、入力画像のうち、当該予め登録されているモデルと最も似ている部分を入力画像から探し出す処理である。このとき、モデルと最も似ている部分の位置・傾き・回転角度や、モデルに対してどの程度似ているかを示す相関値などが算出される。また、ラベリング処理を適用するとした場合には、予め登録したモデルまたは表示属性(色など)と一致している部分を入力画像から探し出し、当該探し出した部分にラベル(番号)を付与する。これらの番号を利用することで、番号の指定に応答して、指定された部分の面積や重心位置を算出したりする。
 ここでは、計測処理部221は、パターンマッチングによって算出されるワークWの位置と相関値を、計測結果として出力し、また、計測処理のパラメータ(種類,値)は、相関値を算出するための相関係数の種類または値を指すと、想定する。
 図4を参照して、メモリ124には、撮像部110から出力される撮像画像の画像データ333と、各画像データ333に対応して関連データが格納されるテーブル331と、パノラマ画像データ332と、撮像パラメータ350とを含むデータが格納される。
 テーブル331は、撮像毎に取得される撮像画像の画像データ333に対応する関連データは、当該画像データ333についての計測処理による計測結果334、ずれ量335、当該画像データを撮像時に入力するエンコーダカウンタによるカウンタ値336、当該画像データについての計測処理のパラメータ(種類および値)337、および後述する撮像間隔339を含む。計測結果334は、対応する画像データ333を計測処理部221によって計測処理した場合に取得される相関値および画像座標位置などを含む。パラメータ337は、相関値等を算出するための相関係数の種類または値を指す。
 <パノラマ画像の生成処理>
 図5は、本発明の実施の形態1に係るパノラマ画像の生成手順を説明するための図である。図5を参照して、画像生成部223によるパノラマ画像の生成処理について説明する。
 パノラマ画像は、公知のパノラマ合成技術を使用して生成してもよいが、ここでは、エンコーダカウンタによるカウンタ値336を用いたパノラマ画像の生成処理を説明する。
 パノラマ画像の生成に先立って、重なり取得部222により、各画像データ333についてずれ量335が取得されて、テーブル331に格納される。具体的には、重なり取得部222は、撮像時のエンコーダカウンタ132からカウンタ値336を取得し、撮像画像の画像データ333と関連付けてテーブル331に格納する。このように、撮像画像が取得される毎に、画像データ333とカウンタ値336が取得されてテーブル331に格納される。
 重なり取得部222によるずれ量335の取得手順について説明する。エンコーダカウンタ132によるカウンタ値1パルス当りのコンベアのライン1上での移動量を表す移動量ベクトルをEpc=(Xp,Yp)とする。また、撮像画像の画像データ333の1ピクセル当りの変換係数:R[mm/pix]は予め決定されて、メモリ124に格納されているとする。この場合、カウンタ値336の1パルス当りの画像上での移動量ベクトルはEpp=(Xp/R,Yp/R)と規定することができる。なお、本実施の形態では、説明を簡単にするために、Epc=(Xp,0)とする。
 ここで、図5を参照して、N枚目の画像データ333の撮像時のカウンタ値336をT(n)とし、(N+1)枚目の画像データ333の撮像時のカウンタ値336をT(n+1)とすると、N枚目と(N+1)枚目の画像のずれ量Mは、M=(T(n+1)-T(n))×Eppと算出することができる。
 したがって、重なり取得部222は、テーブル331から読出したカウンタ値336を用いてN枚目と(N+1)枚目の画像データ333のずれ量Mを算出することができる。算出されたずれ量Mは、ずれ量335としてテーブル331に格納される。テーブル331の画像データ333について、画像データD(i)に対応するずれ量335は、画像データD(i+1)とのずれ量Mに相当する。
 <パノラマ画像の生成>
 画像生成部223による、パノラマ画像の生成について説明する。CPU122が操作表示装置500からモニタ指示を受信する都度、画像生成部223はパノラマ画像を生成する。
 テーブル331には、撮像部110により撮像されて取得される画像データ333が、撮像の順番に従って順次に格納される。パノラマ画像生成時には、テーブル331にパノラマ画像を生成するために必要な数の画像データ333が格納されていると想定する。
 画像生成部223は、モニタ指示を受信すると、テーブル331からN枚目と(N+1)枚目の画像データ333とを順に読出し、すなわち撮像順に従って読出し、読出した順に従って画像データ333を、メモリ124の予め定められた領域に配列する。この処理を繰返すことにより、連続して撮像された複数枚(具体的には2枚以上)の画像データ333からなるパノラマ画像データ332が生成される。
 パノラマ画像データ332は、パノラマ画像を生成するのに用いた複数の画像データ333とともに、テーブル331から読出された各画像データ333に関連する計測結果334および、ずれ量335を含み、さらに、当該画像のパノラマ画像における位置338、および比340のデータを含む。なお、比340の詳細は後述する。
 画像生成部223は位置338を次のように決定する。つまり、ここでは、パノラマ画像のサイズは、ディスプレイ502のサイズに応じたサイズに予め決められており、また、画像データ333のサイズも予め決められている。したがって、パノラマ画像を構成する画像データ333の枚数が決まると、各画像データ333のパノラマ画像における位置は、ずれ量335により一意に決定される。
 画像生成部223は、パノラマ画像データ332を生成する都度、生成に用いた複数の画像データ333のうち、最後に読出した、すなわち最も最近に撮像された画像データ333を指示するポインタ360をテーブル331に設定する。
 画像生成部223は、次回にモニタ指示を入力すると、ポインタ360が指示する画像データ333の次位以降に格納される画像データ333を用いて、次の新たなパノラマ画像のデータを生成する。
 <メインフローチャート>
 図6は、本発明の実施の形態1に係る処理のメインフローチャートである。図7は、本発明の実施の形態1のパノラマ画像を説明するための模式図である。図7では、上段の撮像画像の画像データ333それぞれを、撮像された順番で対応するずれ量335に従って重ね合わせることにより、下段のパノラマ画像が生成される。各画像データ333には、ライン1上を搬送されるワークの画像60が含まれている。パノラマ画像には、各画像データとともに、各画像データについての計測処理結果の画像61と、重ね合わせ領域の画像62がオーバーレイ(重畳)されて同時表示される。
 ここでは、計測処理結果は画像61で表示したが、パノラマ画像と関連付けて表示する場合には、重畳される画像に限定されず個別のグラフ,数値などで表示してもよい。また、重ね合わせ領域は画像62で重畳して表示するとしたが、重畳する態様に限定されず、パノラマ画像に関連付けて表示する態様であればよい。図7のパノラマ画像の生成および表示手順については、図6のフローチャートを参照して説明する。
 ここでは、テーブル331には、撮像部110の撮像により取得された複数の画像データ333と、各画像データ333に対応して関連データが格納されていると想定する。
 まず、CPU122は、テーブル331から、画像生成部223によって生成されたパノラマ画像データ332を読出し、操作表示装置500に送信する。これにより、操作表示装置500の演算処理部510は、通信インターフェイス528を介してパノラマ画像データ332を受信する(ステップS1)。受信したパノラマ画像データ332は、メモリ520に格納される。
 演算処理部510は、メモリ520から、パノラマ画像データ332の各画像データ333を、関連付けされたずれ量335と位置338に従って、ディスプレイ502に重ね合わせて表示する(ステップS2)。これにより、ディスプレイ502にはパノラマ画像が表示される。
 次に、演算処理部510は、メモリ520から各画像データ333に関連付けされた計測結果334を読出し、計測結果334に基づく画像61をディスプレイ502のパノラマ画像上に表示する(ステップS3)。画像61の表示位置は、計測結果334に含まれる画像座標位置により決定することができる。また、パノラマ画像上に、画像データ333どうしの重ね合わせ領域を表す画像62を同時表示する(ステップS3)。
 オペレータは、操作部503を用いてモニタ継続の操作または中止の操作をする。入力インターフェイス550は当該操作に応じてモニタ継続または中止の指示を受付けて出力する。演算処理部510は、入力した指示に基づき、モニタ継続または指示を判定する(ステップS4)。
 中止と判定すると(ステップS4でYES)、一連の処理は終了するが、継続と判定すると(ステップS4でNO)、処理はステップS1に戻る。これにより、演算処理部510は、通信インターフェイス528を介して、撮像画像処理部120にモニタ指示を送信する。
 撮像画像処理部120の画像生成部223は、受信したモニタ指示に応答して、次のパノラマ画像データ332を生成する。以降は、新たに生成されたパノラマ画像データ332について、ステップS1以降の処理が同様に行われるので、オペレータはディスプレイ502に表示される新たなパノラマ画像を用いてライン1をモニタすることができる。
 ディスプレイ502には、図7の下段のようなパノラマ画像が表示されることから、オペレータは計測処理結果の画像61と、重ね合わせ領域の画像62を同時に確認することができる。画像60,61を確認することで、ワークを視覚センサ100により検出することができているかを確認することができる。
 また、オペレータは、重ね合わせ領域の画像62を確認することで、撮像間隔を確認することができるため、ワークを検出できない原因が計測処理に拠るのか、または撮像間隔に拠るのかを判断することができる。
 <他の表示態様>
 本実施の形態1におけるパノラマ画像の表示態様は、図7に示すものに限定されず、次のような表示態様であってもよい。
 図8は、本発明の実施の形態1に係るパノラマ画像の表示態様の他の例を説明する図である。パノラマ画像の表示態様は、図8(A)に示すようにワークの画像60に関連付けて計測処理結果に基づく画像61を表示するとともに、重ね合わせ領域の画像62を太線枠で囲むものとしてもよい。また、画像61は計測処理結果の値(相関値)に応じて色分けして表示してもよい。
 また、図8(B)に示すように、重ね合わせ領域の画像62は当該領域を予め定められた色63で表示してもよい。また、図8(C)に示すように、パノラマ画像においてずれ量Mで重ね合わされた一連の画像について、N枚目と(N+1)枚目、換言すると奇数番目の画像と偶数番目の画像とは、表示態様を相違させてもよい。たとえば、背景色64を異ならせて表示してもよい。
 <スクロール表示>
 図9は、本発明の実施の形態1に係るパノラマ画像のスクロールを説明する図である。図9では、ディスプレイ502の表示領域は、パノラマ画像の表示領域72と、スライドバー70の表示領域と、選択画像73の表示領域とを含む。
 領域72では、紙面横方向に複数枚の画像が一列に並んだパノラマ画像が表示されており、スライドバー70の延びる方向は、当該画像列が延びる方向に一致する。オペレータは、スライドバー70上のスライダ71をスライド操作する。スライダ71の移動量(移動方向、移動距離)は入力インターフェイス550を介して演算処理部510により検出されて、演算処理部510は、検出した移動量に係るスクロール指示を表示コントローラ540に出力する。表示コントローラ540は、スクロール指示に係る移動量に従って、領域72の画像(パノラマ画像)を移動させて、すなわちスクロールさせて表示する。
 ここでは、スクロール可能なように、メモリ529には、十分な枚数の画像データ333からなるパノラマ画像データ332が格納されているものと想定する。
 また、オペレータは、領域72に表示されたパノラマ画像における複数の画像のうちから所望の画像を、操作部503を介したクリック操作などで選択することができる。選択操作がされると、演算処理部510は、入力インターフェイス550を介してクリック操作によるクリック位置を検出する。そして、検出したクリック位置とパノラマ画像データ332の位置338とに基づき、選択された画像に対応する画像データ333を、選択画像73として拡大して表示する。
 [実施の形態2]
 次に、実施の形態2について説明する。本実施の形態では、オペレータが画像処理における各種パラメータを変更するのに好適な例を説明する。
 図10は、本発明の実施の形態2に係る処理のメインフローチャートである。図10の処理では、計測処理に係るパラメータが変更される。
 まず、CPU122は、テーブル331から、画像生成部223によって生成されたパノラマ画像データ332を読出し、操作表示装置500に送信する。これにより、操作表示装置500の演算処理部510は、通信インターフェイス528を介してパノラマ画像データ332を受信する(ステップS1a)。受信したパノラマ画像データ332は、メモリ520に格納される。
 次のステップS2およびS3では、実施の形態1と同様に、ディスプレイ502にパノラマ画像が表示され、パノラマ画像に計測処理結果の画像61と、重ね合わせ領域の画像62がオーバーレイされて同時表示される。
 オペレータは、計測処理のパラメータを変更する場合には、操作部503を操作して、パラメータを変更するための情報を入力する(ステップS4a)。具体的には、パラメータの種類と、変更後の値とを指示する情報を入力する。
 パラメータを変更するための情報は、演算処理部510から、通信インターフェイス528を介して撮像画像処理部120に送信される。
 撮像画像処理部120はパラメータを変更するための情報を受信する。計測パラメータ更新部227は受信した情報を用いて、計測処理のためのパラメータ(種類,値など)を更新し、更新後のパラメータを計測処理部221に出力する。
 計測処理部221は、更新後のパラメータを用いて、表示中のパノラマ画像の各画像データ333について計測処理を行う。そして、その計測結果を用いて、メモリ124のパノラマ画像データ332の各画像データ333に関連する計測結果334を更新する(ステップS5)。これにより、メモリ124のパノラマ画像データ332は、更新後のパラメータを用いた計測処理による計測結果334を有するデータに編集(更新)された状態となる。
 オペレータは、編集後のパノラマ画像の確認を希望する場合には、操作部503を介して編集結果の確認要求の操作をする。確認の操作がされると、演算処理部510は、操作に応じて確認指示を入力する。
 演算処理部510は、確認指示が入力されないと判定すると(ステップS6でYES)、一連の処理を終了させる。一方、入力したと判定すると(ステップS6でNO)、演算処理部510は、撮像画像処理部120に対して確認指示を送信する。
 撮像画像処理部120では、CPU122は確認指示を受信すると、編集後のパノラマ画像データ332をメモリ124から読出し、操作表示装置500に送信する。これにより、編集後のパノラマ画像データ332を用いて、ステップS1以降の処理が行われる。したがって、オペレータは、更新後のパラメータを用いた計測処理結果をパノラマ画像を用いて確認することができる。
 ここでは、パラメータ更新後のパノラマ画像は、メモリ124に既に生成されて格納されているパノラマ画像データ332を編集することで取得するとしたが、取得方法は、これに限定されない。たとえば、新たに撮像されて取得された画像データ333を用いてもよい。
 具体的には、実施の形態1で説明したように、ポインタ360が指示する画像データ333以降に格納されている画像データ333について更新後のパラメータで計測処理を行い新たなパノラマ画像データ332を生成するとしてもよい。
 また、更新後のパラメータを用いて、テーブル331のパラメータ337を更新しても良い。たとえば、必要に応じて、より特定的にはオペレータが操作部503を介して更新指示を入力したときに、テーブル331のパラメータ337を更新するようにしてもよい。
 <表示態様>
 図11~図13は、本発明の実施の形態2に係るパノラマ画像の表示態様を説明する図である。上述のように計測処理のパラメータを更新する場合には、オペレータが更新後の値の目安を把握し易いように、計測結果334の値を抽出して表示する。
 図11を参照して、ディスプレイ502には、計測結果334の値が割当てされる縦軸と、縦軸に直交する横軸が表示される。横軸には、パノラマ画像における各画像データ333の位置を表す値が割当てられる。当該位置は、位置338に基づき取得される。ここでは、縦軸に割当てされる値は、たとえば相関値を指す。
 グラフ91は、各画像データ333に対応する相関値を線分で繋ぐことにより生成されるグラフを指す。オペレータは、グラフ91から、計測結果334の値が低いまたは高い画像データ333が存在するか否かを速やかに把握することができる。
 図12では、オペレータの操作に応じて、グラフ91の部分92が選択的に指定された状態が示される。部分92はグラフ91と区別し得るような態様で表示される。たとえば、部分92の囲み枠を赤色で表示する。
 演算処理部510は、入力インターフェイス550を介して部分92に対応する横軸の値を抽出する。そして、抽出した値に対応する位置338に関連付けされた画像データ333と計測結果334とずれ量335とのデータを、メモリ520から読出し、読出したデータに基づく画像をディスプレイ502に表示する(図13を参照)。
 図13には、部分92に対応する画像を拡大表示した状態が示される。図13のディスプレイ502では、上段にパノラマ画像93が表示されて、下段にはパノラマ画像93に対応してグラフ911が表示される。上段にパノラマ画像93は、選択された計測結果の部分92に対応する画像データ333と、当該画像データの前後で撮像して取得された画像データ333を含んで構成されるパノラマ画像である。
 また、グラフ911の横軸が延びる方向と一致する方向に従ってスライドバー94が表示される。オペレータはスライドバー94上のスライダ95をスライド操作することができる。
 スライド操作によるスライダ95の移動量(移動方向、移動距離)に基づき、演算処理部510は、部分92を移動させて表示する。また、移動後の部分92の位置に関連付けされた画像データ333と計測結果334とずれ量335とのデータを、メモリ520のパノラマ画像データ332から読出し、読出したデータに基づく画像をディスプレイ502に拡大表示する。これにより、スライド操作に連動して、図13のパノラマ画像とグラフ911をスクロール表示することができる。
 なお、グラフ91の横軸には位置338の値を割当てたが、位置338に代替してカウンタ値336を割当ててもよい。
 <表示態様の他の例>
 グラフ911とパノラマ画像93とは、図14~図17のような表示態様であってもよい。
 図14では、図13のパノラマ画像93において計測結果の画像61の表示が略されており、図15では、パノラマ画像93のみが表示されている。
 図16では、図11のグラフ911に代替して、各ワークWの計測結果の相関値のみが、上段のワークWの画像60に対応付けてプロットされた点912で表示されている。図17では、図16のパノラマ画像93から画像62を消去して、ワークの画像60のみが表示される。なお、図16や図17において、プロットされた点912どうしを線で結んでもよい。
 オペレータは、操作部503を操作することにより、ディスプレイ502に表示される画像を、図13および図14~図17の画像のいずれかに切替えることができる。
 <閾値を用いた表示例>
 図18と図19には、計測結果を閾値を用いて表示するための画面が例示される。
 計測結果334について閾値97が設定された場合には、演算処理部510は、グラフ91の各計測結果334の値(特定的には、相関値)と閾値97とを比較し、比較結果に基づき、グラフ91のうち、閾値97の範囲内に該当する部分を表す画像96を、グラフ91に重畳して表示する(図18を参照)。画像96は、たとえば枠囲みにて表示されて、枠はグラフ91と識別可能な態様で表示される。たとえば、枠とグラフ91の色を異ならせて表示する。
 画像96が表示されている状態で、オペレータが操作部503を操作すると、演算処理部510は、画像96をグラフ91の他の部分(グラフ91のうち、閾値97の範囲内に該当する部分)に順次に移動させて表示する。
 図18の画像96は、閾値97の範囲内に該当する部分を指示するとしたが、図19に示すように閾値97の範囲外に該当する部分を指示するとしてもよい。
 <重複計測を排除するための表示例>
 ロボット300がワークWを正確に把持するためには、ライン1上の同一ワークWについて計測処理が2回以上行われる事態(以下、重複計測という)を排除する必要がある。本実施の形態2では、重複計測の排除を支援するための情報が表示される。
 図20は、本発明の実施の形態2に係る重複計測排除のためのパノラマ画像の例を示す図である。オペレータが、表示されるパノラマ画像から、各ワークWについて重複して計測処理が行われているか否かの確認が容易となるように、演算処理部510は、パノラマ画像中の偶数枚目の画像と奇数枚目の画像とで、計測結果334に基づく画像61を異なる態様で表示する。たとえば、図20では、偶数枚目の画像における計測結果に基づく画像61Aと、奇数枚目の画像における計測結果に基づく画像61Bとは、異なる色で表示される。
 <計測処理時間の余裕度の表示例>
 図21は、本発明の実施の形態2に係る撮像間隔に対する計測処理時間の比を表示する画面例を示す図である。本実施の形態では、撮像間隔に対する計測処理時間の比によって、計測処理時間の余裕の程度を示す。この比を取得するために、以下のように撮像間隔と、計測処理時間とが取得される。
 CPU122は、まず、撮像間隔を((It×a)/v)により算出する。ここで、It[パルス]は、撮像指示を入力する間隔を指し、a[mm/パルス]は1パルス当たりのコンベア移動量を指し、およびv[mm/sec]はコンベア速度を指す。これらの値は、予めメモリ124に撮像パラメータ350として格納されていると想定する。
 算出される撮像間隔は、撮像動作により取得される画像データ333に関連付けて、テーブル331に撮像間隔339のデータとして格納される。
 また、計測処理時間とは、計測処理部221が、1回の撮像動作によって取得された画像データ333について計測処理を開始してから、終了するまでに要する時間を指す。計測処理の開始から終了までは、たとえば、計測処理部221が撮像部110から画像データを入力してから、計測処理の結果を出力するまでを指す。この時間は、CPU122が、図示のないタイマを用いて計測することにより取得することができるが、ここでは、説明を簡単にするために計測処理時間T[sec]を用いる。
 比取得部225は、比340のデータを取得する。つまり、メモリ520のパノラマ画像データ332の各画像データ333について、当該画像データ333に関連付けされた撮像間隔339と、計測処理時間Tを用いて、(計測処理時間(T)÷撮像間隔)により、撮像間隔に対する計測処理時間の比を算出する。このようにして、各画像データ333について算出した比を、比340として、パノラマ画像データ332の各画像データ333に関連付けて登録する。
 操作表示装置500では、演算処理部510は比340に基づく情報を表示する。具体的には、撮像画像処理部120から受信して、メモリ520に格納されているパノラマ画像データ332の各画像データ333に関連付けされた比340のデータを用いて、グラフ133(図21参照)の画像を生成し、生成したグラフ133を表示コントローラ540を介してディスプレイ502に表示する。
 図21を参照して、グラフ133では、縦軸には比340の値が割当てられ、縦軸に直交する横軸にはパノラマ画像の各画像データ333の位置338を指す値が割当てられる。グラフ133では、各画像データ333に関連付けされた比340の値は、棒グラフで表示されるが、表示態様は棒グラフに限定されない。
 上述の算出式に従えば、比340が値“1”よりも大きい場合には、対応する画像データ333の計測処理は撮像間隔内に終了していないことが示されて、値“1”未満である場合には、計測処理時間に余裕があることが示される。したがって、オペレータは、グラフ133から、パノラマ画像において、計測処理が撮像間隔内に終了していない画像データ333が存在するか否かを速やかに把握することができる。
 オペレータは、グラフ133から、変数It[パルス]の値、またはコンベア速度の適否を判断するための支援情報を得ることができる。具体的には、変数It[パルス]の値を小さくする、またはコンベア速度を速くするように、設定を変更するか否かの判断を支援するための情報を得ることができる。
 グラフ133では、比340が値“1”よりも大きい部分については表示態様が変更される。たとえば、枠131を用いて当該部分を囲むことにより強調表示する。また、計測処理時間の余裕の程度に応じて、各画像データ333に対応する棒グラフの色を変更してもよい。
 図21を参照して、オペレータがスライダ95をスライド操作すると、演算処理部510は、スライダ95の移動量(移動方向、移動距離)を入力し、入力した移動量に連動してパノラマ画像をスクロールし、同時に、グラフ133もスクロールするように、表示コントローラ540を制御する。
 このように図21の画面によれば、計測処理時間の余裕の程度を提示することができる。したがって、図10のステップS5において計測処理のパラメータを変更した後において、変更後のパラメータを用いた計測処理時間に余裕が有るか否かをオペレータが判断する場合に、判断を支援するための情報を提示することができる。なお、計測処理時間の余裕の程度を示すためには、撮像間隔に対する計測処理時間の比に限らず、計測処理時間そのものを表示してもよい。
 ステップS5でのパラメータ変更のための画面例が、図22に示される。図22では、オペレータは、画面のボタン171を操作することにより、計測処理のパラメータ変更指示を入力することができる。演算処理部510は変更指示を入力すると、ディスプレイ502の画面を、パラメータを調整するための別の画面(図示せず)に切替える。パラメータを調整するための画面には、たとえば、パラメータの種類、値の範囲(レンジ)の候補が表示される。
 <撮像パラメータの変更>
 図23は、本発明の実施の形態2に係る撮像パラメータの変更処理のフローチャートである。図10では計測処理のパラメータを変更したが、同様にして撮像動作に係るパラメータを変更することができる。
 図23を参照して、ステップS1a~S3の処理が図10と同様に行われる。これにより、ディスプレイ502にはパノラマ画像または計測結果のグラフが表示される。
 表示後、オペレータは操作部503を操作して、撮像動作に係るパラメータを変更するための情報を入力することができる(ステップS4b)。具体的には、パラメータの種類と、変更後の値とを入力する。
 演算処理部510は、パラメータを変更するための情報を、通信インターフェイス528を介して撮像画像処理部120に送信する。
 撮像画像処理部120では、撮像パラメータ更新部228は、受信した情報を用いて、メモリ124の撮像パラメータ350を更新する(ステップS5a)。たとえば、図5で説明したずれ量Mを決定するパラメータを更新することが可能である。
 操作部503を介して、変更後のパラメータを用いた計測結果の確認指示が入力されないと(ステップS6でYES)、処理は終了する。確認指示が入力されると(ステップS6でNO)、更新後のパラメータを用いた処理が行われる(ステップS7)。
 ステップS7においては、更新後のパラメータを用いた計測処理が行われる。たとえば、パラメータ更新後のT(n)とT(n+1)に従うタイミングで撮像部110の撮像動作を模擬(シミュレート)することによる、パノラマ画像のデータを取得する。
 具体的には、画像分割部229は、撮像パラメータ更新部228から変更後のT(n)とT(n+1)を入力し、入力したこれら値を用いて、図5の手順に従って、ずれ量Mを算出する。このようにして算出されたずれ量を、変更後ずれ量MMと称する。
 画像分割部229は、メモリ124のパノラマ画像データ332に従うパノラマ画像を、先頭の画像データ333から最終の画像データ333まで、順番に、変更後ずれ量MMを用いて抽出する。これにより、パノラマ画像データ332を、当該パノラマ画像を構成する複数の画像データ333に分割することができる。分割により取得される各画像データ333は、変更後のT(n)とT(n+1)に従うタイミングで撮像部110が撮像動作したと想定した場合に取得される画像データを指す。このようにして画像データ333を取得することは、変更後のT(n)とT(n+1)に従うタイミングで撮像部110の撮像動作を模擬(シミュレート)することに相当する。
 次に、計測処理部221は、画像分割部229により取得された各画像データ333について計測処理を行い、計測結果334を出力する。出力された計測結果334および変更後ずれ量MMなどを用いて、パノラマ画像データ332が生成される。これにより、更新後パノラマ画像データが取得されて、ステップS7の処理は終了する。
 その後、処理はステップS2に移行する。ステップS2では、更新後パノラマ画像データは、撮像画像処理部120から操作表示装置500に送信される。操作表示装置500の演算処理部510は、受信した更新後パノラマ画像データを用いてディスプレイ502に更新後のパノラマ画像を表示し、重なり領域の画像および計測結果の画像を併せて表示する(ステップS3)。
 オペレータは、ディスプレイ502に表示される更新後パノラマ画像に関連付けて計測結果を確認することができる。これにより、更新後の撮像パラメータの値が適切であったか否かを判断するための支援情報を得ることができる。
 [実施の形態3]
 本実施の形態では、キャリブレーションによるロボット座標系に従うパノラマ画像の表示について説明する。
 <キャリブレーション>
 まず、視覚センサ100による画像座標系を、ロボット300によるロボット座標系に変換するためのキャリブレーションについて説明する。
 図24は、本発明の実施の形態に係るキャリブレーションを説明するための図である。図25は、図24に示すキャリブレーションによって取得されるパラメータセットの一例を示す図である。図26~図28は、本発明の実施の形態に係るキャリブレーションの手順を説明するための図である。
 図24を参照して、本実施の形態に係るキャリブレーションにおいては、主として、以下の2つの観点でキャリブレーションが行われる。図24では、ロボット300はバー400上を、バー400が延びる方向と同一の方向にスライド移動可能なように取り付けられる。バー400は、コンベア10が移動する方向と同一方向に延びている。
 (1) ロボット-コンベア間のキャリブレーション:
 このキャリブレーションにおいては、エンコーダ14からのパルス信号に含まれる1パルスあたりのコンベアの移動量が取得される。このコンベアの移動量は、図25の下から2段目に示されるdXおよびdYに相当する。図25に示すように、コンベアの移動量はベクトル量であるので、ロボット座標系のそれぞれの軸について値が取得されることになる。このコンベアの移動量は、ロボット300がエンコーダ14からのパルス信号を受けて、コンベア10上のワーク位置を追跡(トラッキング)するために必要なパラメータである。
 (2) 視覚センサ-ロボット間のキャリブレーション:
 視覚センサ100によって計測されたワークの位置情報(画像座標系の座標値(xi,yi)[pixel])を、ロボット座標系の座標値(X,Y)[mm]に変換するための関係式が取得される。この関係式は、図25の最下段に示される6個のパラメータA~Fによって定義される。
 なお、図24に示すように、キャリブレーションを行うためには、ロボット300の位置情報(ロボット座標値)が必要であるので、ロボット制御装置200からネットワークNWを介して視覚センサ100にこれらの位置情報が転送される。
 次に、キャリブレーションの手順についてより詳細に説明する。なお、本実施の形態に従うコンベアシステムにおいては、ユーザは、上述したようなキャリブレーションの意味を理解せずとも、指定された手順に従って操作するだけで、容易にキャリブレーションを行うことができる。より具体的には、本実施の形態に係るキャリブレーションは、図26~図28に示す3段階の手順によって実現される。
 なお、本実施の形態に係るキャリブレーションにおいては、図25の最上段に示すターゲットパターンが描画されたキャリブレーション用シートSが用いられる。このキャリブレーション用シートSに示されたターゲットパターンは、その内部が約90°ずつに塗り分けられた5個の円(マーク)を含む。なお、後述するように、基本的には4個のマークを用いてキャリブレーションが行われるが、追加的に配置された1個のマークは、キャリブレーション用シートSの配置向きを所定方向に統一するために用いられる。
 (第1段階)
 第1段階としては、図26に示すように、ユーザは、ターゲットパターンが描画されたキャリブレーション用シートSを視覚センサ100(撮像部110)の視野内に配置する。そして、ユーザは、視覚センサ100に対して撮像指示(図26の“マーク指定”)を与える。すると、視覚センサ100は、撮像によって得られた画像(ターゲットパターンが被写体として含まれる画像)に対して計測処理を行い、ターゲットパターンに含まれる四隅に配置された4個のマークについての各中心点の座標値を決定する。これによって、ターゲットパターンに含まれる4個のマークについての画像座標系の座標値[pixel]がそれぞれ取得される。この取得される4個の座標値が、図25の最上段に示される(xi1,yi1)、(xi2,yi2)、(xi3,yi3)、(xi4,yi4)に相当する。
 (第2段階)
 第2段階としては、図27に示すように、ユーザは、コンベア10を動かしてターゲットパターンが描画されたキャリブレーション用シートSをロボット300のトラッキング範囲(稼動範囲)内に配置するとともに、ロボット300を操作して、ターゲットパターンに含まれる4個のマークとロボット300との位置関係を対応付ける。
 より具体的には、まず、ユーザは、コンベア10を動かして、キャリブレーション用シートSをロボット300のトラッキング範囲(稼動範囲)内に配置する。なお、このコンベア10の移動前(キャリブレーション開始時)のカウント値が、予め取得されているものとする。このカウント値が図25の上から2段目に示されるエンコーダカウント値E1(キャリブレーション開始時)に相当する。
 続いて、ユーザは、ロボット制御装置200に付属しているティーチングペンダント(図示せず)を操作するなどによって、ロボット300のハンド先端をキャリブレーション用シートS上の1つのマークと対応するように位置決めする。ユーザは、この位置決めされた状態で指示を与えることで、ロボット制御装置200が把握しているロボット300の位置情報(ロボット300のハンド先端の位置を示すロボット座標系での座標値)が視覚センサ100へ送信される。このロボット300のハンド先端の位置決めして、および、位置決め状態におけるロボット300の位置情報の視覚センサ100へ送信する処理は、ターゲットパターンに含まれる4個のマークのすべてに対して繰り返し実行される。
 このような手順によって、ターゲットパターンに含まれる4個のマークに対応するロボット300の位置情報がそれぞれ取得される。この取得される4個のマークに対応するロボット300の位置情報が、図25の上から3段目に示される(X1,Y1)、(X2,Y2)、(X3,Y3)、(X4,Y4)に相当する。
 なお、図27に示すように、キャリブレーション用シートSがロボット300のトラッキング範囲(稼動範囲)内に配置された状態は、4個のマークすべてに対応するロボット300の位置情報が視覚センサ100へ送信されるまで維持される。
 また、視覚センサ100は、図27に示す状態におけるカウント値についても格納する。このカウント値が、図25の上から2段目に示されるエンコーダカウント値E2(コンベアをロボット稼動範囲(上流)まで移動させたとき)に相当する。
 (第3段階)
 第3段階としては、図28に示すように、ユーザは、コンベア10をさらに動かしてキャリブレーション用シートSをロボット300のトラッキング範囲(稼動範囲)の最下流の位置に配置するとともに、ロボット300を操作して、ターゲットパターンに含まれる1個のマークとロボット300との位置関係を対応付ける。
 より具体的には、まず、ユーザは、コンベア10を動かして、キャリブレーション用シートSをロボット300のトラッキング範囲(稼動範囲)の下流側端部の位置に配置する。
 続いて、ユーザは、ティーチングペンダント(図示せず)を操作するなどによって、ロボット300のハンド先端をキャリブレーション用シートS上の1番目のマーク(第2段階で座標値(X1,Y1)を取得したマーク)と対応するように位置決めする。ユーザは、この位置決めされた状態で指示を与えることで、ロボット制御装置200が把握しているロボット300の位置情報(ロボット300のハンド先端の位置を示すロボット座標系での座標値)が視覚センサ100へ送信される。
 このような手順によって、ターゲットパターンに含まれる1番目のマークに対応するロボット300の位置情報がそれぞれ取得される。この取得される1番目のマークに対応するロボット300の位置情報が、図25の上から4段目に示される(X5,Y5)に相当する。
 また、視覚センサ100は、図28に示す状態におけるカウント値についても格納する。このカウント値が、図25の上から2段目に示されるエンコーダカウント値E3(コンベアをロボット稼動範囲(下流)まで移動させたとき)に相当する。
 (パラメータ算出処理)
 上述したような第1~第3段階の処理によって取得されたパラメータを用いて、まず、エンコーダ14からの1カウントあたりのワークの移動量dXおよびdYが算出される。より具体的には、以下の式に従って算出される。
  dX=(X5-X1)/(E3-E2)
  dY=(Y5-Y1)/(E3-E2)
 これらの式は、図27に示す状態と図28に示す状態との間で、ロボット300のハンド先端がキャリブレーション用シートS内の同一のマークに位置決めされた場合に生じる、カウント値の変化量に対するロボット300の位置情報の変化量を算出することを意味する。これらの演算式によって、1カウントあたりのワークの移動量dXおよびdYが決定される。すなわち、ロボット-コンベア間のキャリブレーションが実現される。
 また、図26において取得されるカメラ座標系の座標値(xi1,yi1),(xi2,yi2),(xi3,yi3),(xi4,yi4)と、図27において取得されるロボット座標系の座標値(X1,Y1),(X2,Y2),(X3,Y3),(X4,Y4)との対応関係に基づいて、座標系の変換に係る変換式の6個のパラメータA~Fが決定される。すなわち、公知の手法を用いて、以下の式を満たす(あるいは、誤差が最小となる)パラメータA~Fが決定される。
  X=A・xi+B・yi+C
  Y=D・xi+E・yi+F
 これにより、視覚センサ-ロボット間のキャリブレーションが実現される。
 パラメータA~Fが決定されると、CPU122は、カメラ座標系のパノラマ画像を、パラメータA~Fを用いてロボット座標系の座標値に変換して表示してもよい。これにより、オペレータに対して、ロボット300が把持する時点における搬送路上のワークWの配置を提示することができる。
 より具体的には、パノラマ画像データ332の計測結果334が示す各ワークの位置(座標値)を、パラメータA~Fを用いてロボット座標系の座標値に変換し、変換後の座標値に従ってパノラマ画像に各ワークの画像60を表示する。これにより、ロボット300が把持する時点における搬送路上のワークWの配置を提示することができる。
 [実施の形態4]
 本実施の形態では、一つ前に撮像した画像データ333の計測結果334を、今回の撮像した画像データ333の計測結果として重ねることによりパノラマ画像を生成し、生成したパノラマ画像を表示する。これにより、画像どうしが重なった部分においても計測結果を表示することができる。
 図29は、本発明の実施の形態4に係る処理フローチャートである。図30は、本発明の実施の形態4に係る撮像画像処理のための機能構成について示す模式図である。図30に示す各機能は、撮像画像処理部120のCPU122がメモリ124に予め格納されたプログラムを実行することにより実現されると想定するが、各機能は、プログラムのみならず、プログラムと回路の組合せで実現されてもよい。
 撮像画像処理部120で実行される各種プログラムは、CD-ROM136に格納されて流通する。このCD-ROM136に格納されたプログラムは、CD-ROM(Compact Disk-Read Only Memory)ドライブ機能を有するメモリインターフェイス135によって読取られ、メモリ124などへ格納される。あるいは、上位のホストコンピュータなどからネットワークNWを通じてプログラムをダウンロードするように構成してもよい。
 CPU122は、パノラマ画像のための処理機能を有する。具体的には、撮像画像についてワークの計測処理を実行する計測処理部221、パノラマ画像の画像どうしの重なり範囲を取得するための重なり取得部222、パノラマ画像の生成および表示に関する処理を実行するパノラマ画像処理部223Aを備える。計測処理部221と重なり取得部222は、図3で説明したものと同様であり説明は略す。
 パノラマ画像処理部223Aは、重なり範囲で画像どうしが重なり合うようなパノラマ画像を生成するための画像生成部223B、計測結果を画像に描画すべきか否かを判定する描画判定部223C、およびパノラマ画の生成または表示に関連したエラーを処理するための表示関連処理部225Aを含む。
 表示関連処理部225Aは、画像落ち処理部225B、エンコーダエラー処理部225Cおよびオーバ/アンダーフロー処理部225Dを含む。これら各部の詳細は後述する。
 <パノラマ画像の生成>
 パノラマ画像処理部223Aは、モニタ指示を受信すると、表示するためのパノラマ画像を図29のフローチャートに従って生成する。このフローチャートでは、説明のために、パノラマ画像を構成する画像データ333をカウントするための変数Nを用いる。なお、テーブル331には、図4に示すようにデータが格納されていると想定する。
 図29を参照して、パノラマ画像処理部223Aは、まず変数Nに値0を初期設定し(ステップT1)、その後、変数Nを(N=N+1)と更新する(ステップT3)。
 その後、画像生成部223Bは、テーブル331から変数Nの値により指示される画像データ333を読出し(ステップT5)、読出した画像データ333に、対応する計測結果334の画像データを重畳処理する(ステップT7)。次に、テーブル331から(N+1)の値により指示される画像データ333を読出し(ステップT9)、読出した画像データ333に、対応する計測結果334の画像データを重畳処理する(ステップT11)。
 その後、画像生成部223Bは、パノラマ画像を生成するために上述のように重畳処理された両画像データ333を重ねて表示するために、N番目の画像データ333の計測結果334を、重畳処理されたN+1番目の画像データ333の計測結果として重ねるように処理する(ステップT13)。たとえば、1番目の画像データ333の計測結果334を、2番目の画像データ333の計測結果として重ねるように処理する。
 その後、パノラマ画像処理部223Aは、変数Nの値に基づき、予め決められた枚数分の画像データ333を用いたパノラマ画像データ332の生成が終了したか否かを判定する(ステップT15)。生成が終了していないと判定すると(ステップT15でNO)、処理はステップT3に戻り、変数Nの値が(N+1)に更新される。
 その後、以降の処理を同様に行うことにより、ステップT13では、たとえば、2番目の画像データ333の計測結果334を、3番目の画像データ333の計測結果として重ねるように処理する。
 このようにして、変数Nが指示する1番目、2番目、3番目、・・・の画像データ333にを用いて、N番目の画像データ333の計測結果334を、N+1番目の画像データ333の計測結果として重ねるようにしてパノラマ画像データ332Aが生成されて、メモリ124に格納される。
 生成が終了したと判定されると(ステップT15でYES)、パノラマ画像の生成は終了しする。
 その後、生成されたパノラマ画像データ332Aは、メモリ124から読出されて操作表示装置500に送信される。操作表示装置500では、演算処理部510は、受信したパノラマ画像データ332Aをディスプレイ502に表示する。
 なお、本実施の形態では、説明を簡単にするために、重ね合わせ領域の表示については詳細説明を略しているが、前述した例えば図8(A)~(C)のように重ね合わせ領域を表示することができる。
 ここで、画像生成部223Bによる、N番目の画像データ333の計測結果334を、重畳処理されたN+1番目の画像データ333の計測結果として重ねる処理(ステップT13)について説明する。
 図31を参照して、画像生成部223Bは、N枚目の画像データ333の計測結果334NをN+1枚目の画像データ333の計測結果として重ねる。
 具体的には、画像生成部223Bは、計測結果の重ね合わせに際して、まず、パノラマ画像を作成するための必要なデータ(値)を算出する。
 算出のために、撮像時のエンコーダカウンタ132のカウンタ値Trc[カウント]、1パルスの移動量(キャリブレーションデータ):(ΔX、ΔY)[mm/カウント]、キャリブレーションパラメータ:X[mm]=Ax+By+C・・・式(1)およびY[mm]=Dx+Ey+F・・・式(2)を用いる。
 また、キャリブレーションパラメータより、[mm]→[ピクセル]に逆変換する下記の式(3)と(4)を、式(1)と(2)から以下のように作成する。
 x[ピクセル]={E(X-C)-B(Y-F)}/(AE-BD)・・・(3)
 y[ピクセル]={A(Y-F)-D(X-C)}/(AE-BD)・・・(4)
 また、撮像指示が入力する間隔である撮像トリガ間隔ΔTrを算出する。つまり、N枚目撮像時のエンコーダカウンタ値:Trc(N)[カウント]、およびN+1枚目撮像時のエンコーダカウンタ値:Trc(N+1)[カウント]として、撮像トリガ間隔ΔTrを、ΔTr=Trc(N+1)-Trc(N)と算出する。
 したがって、上述したロボット座標系に係るキャリブレーションによる算出値を用いて、N枚目の画像からN+1枚目の画像までの画像の移動量は、以下にように算出できる。
 つまり、N枚目からN+1枚目までの画像の移動量は、ΔTr(ΔX、ΔY)[mm]で規定することができるから、N枚目の計測結果(X(n)、Y(n))をN+1枚目でのロボット座標(X’(n)、Y’(n))に変換するには、以下のように変換することができる。
 X’(n)=X(n)+ΔTr×ΔXおよびY’(n)=Y(n)+ΔTr×ΔY。
 このロボット座標の値を、ピクセル単位に変換するには、式(3)と(4)より、以下のように変換することができる。
 F’x={E(X’(n)-C)-B(Y’(n)-F)}/(AE-BD)、および
 F’y={A(Y’(n)-F)-D(X’(n)-C)}/(AE-BD)。
 上述の算出結果に従って、画像生成部223Bは、N枚目の画像の計測結果334Nの座標を、(F’x、F’y)として、当該計測結果334Nの画像をN+1枚目の画像データ333に描画する(図32を参照)。これにより、N枚目の計測結果334Nが重ねられたN+1枚目の画像データ333が生成される。
 これにより、パノラマ画像データ332Aを、各画像データ333が計測結果334Nを含むように生成することができる。そして、パノラマ画像データ332Aに従って表示される当該パノラマ画像においては、画像どうしが重なった部分で計測結果の一部が消える(表示されない)ことはなく、N枚目の画像およびN+1枚目の画像についての計測結果の全てを表示することができる。したがって、パノラマ画像と計測結果を個別に管理する必要はなくデータ管理が容易となり、また、パノラマ画像を表示開始してから終了するまでの処理を短期間のうちに済ませることが可能となる。
 <計測結果の描画判定>
 上述の処理では、画像生成部223Bは、N枚目の計測結果334Nの座標は、N+1枚目の画像データ333の範囲内に位置するとの前提の下に、N枚目の計測結果334Nが重ねられたN+1枚目の画像データを生成した。しかし、N枚目の計測結果334Nの図形の座標が、N+1枚目の画像データ333の範囲から外れる場合もある。
 そこで、本実施の形態では、描画判定部223Cは、N枚目の計測結果の図形の座標(F’x、F’y)が、N+1枚目の画像の範囲内から外れるか否かを判定する。外れると判定された場合には、画像生成部223Bは、座標(F’x、F’y)に従うN枚目の計測結果を、N+1枚目の画像データに描画しないと決定し、当該描画を省略する。
 描画判定部223Cの判定処理は、計測結果の画像61が表す図形の種類毎に異ならせることができる。計測結果334Nの画像61が表す図形が、矩形、楕円、および円の線分が所定幅を有した幅あり円を例示して説明する。なお、1枚の画像データ333の画像サイズは、480ピクセル×752ピクセルであると想定する。
 ・矩形の場合
 N枚目の計測結果334Nの画像61が表す矩形の左上座標および右下座標が、N+1枚目の画像のロボット座標を用いて、ピクセルに変換することにより、左上座標(xa、ya)および右下座標(xb、yb)として取得されるとき、座標(xa、ya)および座標(xb、yb)が下記の4つの不等式の条件の全てを満たさないと判定されたとき、画像生成部223Bは描画しないと決定し、少なくとも1つの条件を満たすと判定されたとき描画すると決定する。
 0≦xa≦752、0≦xb≦752、0≦ya≦480、0≦yb≦480
 たとえば、図33の場合には、描画判定部223Cは、座標(xb、yb)について上記の4つの条件のうち(0≦xb≦752)と(0≦yb≦480)とを満たすと判定し、判定結果に従って、画像生成部223Bは、座標(F’x、F’y)に従うN枚目の計測結果をN+1枚目の画像データに描画すると決定し、座標(F’x、F’y)に従うN枚目の画像の計測結果334Nを、N+1枚目の画像に描画する。
 ・楕円の場合
 N枚目の計測結果334Nを示す楕円の画像の座標が、N+1枚目の画像のロボット座標を用いて、ピクセルに変換することにより、中心座標(Cx、Cy)、X方向の半径rx、およびY方向の半径ryとして取得されるとき、これら値が下記2つの不等式の条件の全てを満たさないと判定されたとき、画像生成部223Bは描画しないと決定し、少なくとも1つの条件を満たすと判定されたとき描画すると決定する。
 0≦Cx±rx≦752、0≦Cy±ry≦480
 ・幅あり円の場合
 N枚目の画像61が表す円の画像の座標が、N+1枚目のロボット座標を用いて、ピクセルに変換することにより、中心座標が(Cx、Cy)、半径rおよび所定の線幅wとして取得されるとき、これら値が下記2つの不等式の条件の全てを満たさないと判定されたとき、画像生成部223Bは描画しないと決定し、少なくとも1つの条件を満たすと判定されたとき描画すると決定する。
 0≦Cx±(r+w)≦752、0≦Cy±(r+w)≦480
 (パノラマ画像の表示処理)
 本実施の形態に係るパノラマ画像処理部223Aは、エンコーダカウンタ132のカウントモードに対応して、パノラマ画像の表示態様を切替える。具体的には、図34~図37のいずれかの表示態様で表示する。
 なお、コンベアのライン1の搬送方向にワークWが移動していくとき、エンコーダカウンタ132のカウントモードは、予めアップカウントおよびダウンカウントのいずれかに設定され、設定されたモード値は、たとえばメモリ124に格納される。
 パノラマ画像処理部223Aは、単位時間当たり、すなわち1パルス当たりの画像上での移動量ΔxおよびΔyから、パノラマ画像の表示態様を決定する。
 まず、移動量ΔxとΔyの算出について説明する。
 まず、1パルスの移動量(キャリブレーションデータ)を(ΔEx、ΔEy)[mm/カウント]として、[mm]→[ピクセル]に変換する以下の逆変換式に従って、当該移動量をピクセルに変換する。
 x[ピクセル]={E(X-C)-B(Y-F)}/(AE-BD)、
 y[ピクセル]={A(Y-F)-D(X-C)}/(AE-BD)
 次に、上述の逆変換式を用いて固定パルス(たとえば0パルス、1パルス)のときの画像上での位置を算出する。
 0パルスのときの移動量は、次のように算出する。
 x0[ピクセル]={E(ΔEx×0-C)-B(ΔEy×0-F)}/(AE-BD)、
 y0[ピクセル]={A(ΔEy×0-F)-D(ΔEx×0-C)}/(AE-BD)
 1パルスのときの移動量は、次のように算出する。
 x1[ピクセル]={E(ΔEx×1-C)-B(ΔEy×1-F)}/(AE-BD)、
 y1[ピクセル]={A(ΔEy×1-F)-D(ΔEx×1-C)}/(AE-BD)
 上述の固定パルスについて算出した移動量から、1パルスあたりの画像上でのピクセル単位の移動量ΔxとΔyを算出する。つまり、パノラマ画像処理部223Aは、メモリ124のモード値が“アップカウント”を指示するときはΔx=x1-x0およびΔy=y1-y0と算出し、“ダウンカウント”を指示するときはΔx=x0-x1およびΔy=y0-y1と算出する。
 パノラマ画像処理部223Aは、算出した上述のピクセル単位の移動量ΔxとΔyを用いて、パノラマ画像の表示態様を図34~図37のいずれかに指示する値を表示態様データ332Bに設定し、表示態様データ332Bをメモリ124に格納する。
 つまり、パノラマ画像処理部223Aは、ロボット座標系の軸のうち、X軸が延びる方向(X方向という)の移動量ΔXが、Y軸が延びる方向(Y方向という)の移動量ΔY以上であると判定した場合には、表示態様データ332Bに、パノラマ画像をディスプレイ502の横方向に延びるような表示態様を指示する値を設定する(図34、図35)。この場合において、(Δx≧0)であるときは、表示態様データ332Bには、ディスプレイ502の、たとえば向かって右方向から撮像順番に従って画像が並ぶような表示態様を指示する値が設定され(図34参照)、(Δx<0)であるときは、ディスプレイ502の、たとえば向かって左方向から撮像順番に従って画像が並ぶような表示態様を指示する値が設定される(図35参照)。
 一方、パノラマ画像処理部223Aは、X方向の移動量ΔXが、Y方向の移動量ΔYよりも小さいと判定した場合には、表示態様データ332Bに、パノラマ画像をディスプレイ502の縦方向に延びるような表示態様を指示する値を設定する(図36、図37)。この場合において、(Δy≧0)であるときは、表示態様データ332Bには、ディスプレイ502の、たとえば向かって下方向から撮像順番に従って画像が並ぶような表示態様を指示する値が設定され(図36参照)、(Δy<0)であるときは、ディスプレイ502の、たとえば向かって上方向から撮像順番に従って画像が並ぶような表示態様を指示する値が設定される(図37参照)。
 パノラマ画像処理部223Aにより値が設定された表示態様データ332Bは、パノラマ画像データ332Aとともには、メモリ124から読出されて操作表示装置500に送信される。操作表示装置500では、演算処理部510は、受信したパノラマ画像データ332Aを、当該パノラマ画像データ332Aに関連して受信した表示態様データ332Bに従う態様で、ディスプレイ502に表示する。これにより、パノラマ画像を、ロボット座標系におけるワークWの移動方向および移動量に従った図34~図37のいずれかの態様で表示することができる。
 なお、図34~図37における丸付き数値は、パノラマ画像を構成する各画像の撮像順序を示し、矢印ARは、パノラマ画像において画像が並ぶ向きを指すものであり、いずれも説明のために示すものであり、ディスプレイ502には表示されない。
 <エラー処理>
 本実施の形態では、表示関連処理部225Aは、上述のようにパノラマ画像を生成または表示する際に生じるエラーを処理する。ここでは、エラーとして、パノラマ画像の生成に用いるべき画像が不足しているエラー、およびエンコーダカウンタ132に起因するエラーを例示する。
 (画像落ち処理)
 パノラマ画像を構成するべき複数枚の画像から1枚以上の画像が欠落して不足している場合には、画像落ち処理部225Bは、パノラマ画像データ332Aにおいて、欠落した画像の画像データ333、またはその計測結果334を省略する。画像の欠落は、たとえば、視覚センサ100が撮像指示を受信できなかった場合に発生する。
 本実施の形態では、視覚センサ100は、ロボット制御装置200から撮像指示を受信する毎に、受信した撮像指示に応答して撮像する。ロボット制御装置200は、エンコーダ14からのパルス信号に含まれるパルス数をカウントし、予め定められた値以上の数のパルスが入力されたタイミングで、撮像指示を視覚センサ100に対して送信する。したがって、視覚センサ100は予め定められた間隔で撮像するように制御されることにより、画像データ333は当該間隔で繰返し取得される。これにより、パノラマ画像を構成する一連の画像データ333を得ることができる。
 ここで、視覚センサ100のCPU122がBUSY(ビジー)状態において、ロボット制御装置200から撮像指示が送信されると、視覚センサ100は当該撮像指示を受信することができず、その結果、当該撮像指示に対応した画像データ333を取得できず、パノラマ画像を構成する一連の画像データ333についてが画像データ333が欠落する。
 画像落ち処理部225Bは、上述のように算出したピクセル単位での移動量(Δx、Δy)が、画像1枚以上の大きさを指すと判定すると、画像が欠落したこと検出する。つまり、移動量(Δx、Δy)が(|Δx|≧752)および(|Δy|≧480)のいずれかの条件を満たすと判定したとき、画像が欠落したことを検出する。
 画像が欠落したことを検出した場合に、画像落ち処理部225Bは、パノラマ画像データ332Aを、欠落した画像データ333を省略するように処理する。または、パノラマ画像データ332Aに、欠落した画像データ333に代替してエンコーダカウンタ132にカウント値を用いた情報を挿入する。
 また、欠落した画像の計測結果334Nの画像61の表示が省略される。つまり、図32においてN枚目の画像が欠落したと想定すると、N枚目の計測結果334Nの画像61を表示せず、且つN-1枚目の計測結果334Nの画像61をN+1枚目の画像に重ねずにパノラマ画像データ332Aを生成する。
 (エンコーダエラー処理)
 移動量(Δx、Δy)は、上述したようにエンコーダカウンタ132のカウント値を用いて算出されることから、エンコーダカウンタ132が正常に動作しない場合には、パノラマ画像の生成に関するエラー処理が実行される。
 エンコーダエラー処理部225Cは、撮像時にエンコーダカウンタ132から3回以上同じ値を入力したと判定した場合には、エンコーダカウンタ132がカウント動作していないことを検出する。カウント動作していないことを検出すると、エラーメッセージをディスプレイ502に出力するように、操作表示装置500に通知し、パノラマ画像表示処理を終了させる。
 (カウンタ値のオーバフロー/アンダーフロー)
 移動量(Δx、Δy)は、上述したようにエンコーダカウンタ132のカウント値を用いて算出することから、エンコーダカウンタ132のカウンタ値がオーバーフローまたはアンダーフローした場合には、オーバ/アンダーフロー処理部225Dは、パノラマ画像の生成に関するエラー処理を実行する。なお、エンコーダカウンタ132は、アップカウント時に、オーバーフローし、ダウンカウント時に、アンダーフローする可能性がある。
 オーバ/アンダーフロー処理部225Dは、エンコーダカウンタ132のカウンタ値の差分を用いてオーバフローまたはアンダーフローが発生しているか否かを判定する。
 具体的には、撮像時のカウンタ値をTrc(N)およびTrc(N-1)とすると、差分ΔTrc(N)=Trc(N)-Trc(N-1)を求めることができる。
 アップカウント時は、差分ΔTrc(N)が(ΔTrc(N)<0)の条件を満足するときオーバフロー発生と判定し、ダウンカウント時は(ΔTrc(N)>0)の条件を満足するときアンダーフロー発生と判定する。
 オーバ/アンダーフロー処理部225Dはオーバフローまたはアンダーフローが発生したことを判定すると、撮像トリガ間隔ΔTrを以下の演算式に従って補正する。なお、エンコーダカウンタ132の値は書き換えない。
 Trc(N)=Trc(N)-Sgn{ΔTrc(N)}×Max_count+1
 ただし、上記の変数Max_countは、エンコーダカウンタ132の最大カウント値であって、予め定められた値を指す。この変数Max_countの値は、メモリ124の所定領域に予め格納される。
 このように、オーバフローまたはアンダーフローが発生した場合は、エンコーダカウンタ値Trc(N)を、オーバフローまたはアンダーフローによる誤差を排除した値に補正し、その補正後のエンコーダカウンタ値Trc(N)を用いて、撮像トリガ間隔ΔTrを算出する。これにより、オーバフローまたはアンダーフローに起因した誤差が排除されたた移動量ΔxおよびΔyを取得することができる。
 <パノラマ画像の表示例>
 図38には、ディスプレイ502における図36または図37に従うパノラマ画像の表示例が示され、図39には、ディスプレイ502における図34または図35に従うパノラマ画像の表示例が示される。
 図38と図39を参照して、ディスプレイ502には、パノラマ画像とともにCPU122により計測された平均撮像時間381と処理時間391のデータが表示される。
 CPU122は、平均撮像時間381を、撮像トリガの間隔時間τの10回の平均値(Στ/10)として算出する。
 ここで、撮像トリガの間隔時間τは、撮像トリガの間隔:ΔTr[カウント]、1パルスの移動量(キャリブレーションデータ):(ΔX、ΔY)[mm/カウント]、コンベアスピード:v[mm/sec]を用いて、
 τ={(ΔTr×ΔX)^2+(ΔTr×ΔY)^2}^0.5/v、と算出することができる。
 CPU122は、処理時間391として、最大処理時間と平均処理時間とを計測する。最大処理時間は、計測処理部221による計測処理にかかった最大時間を指し、平均処理時間は、計測処理にかかった平均時間を指す。なお、CPU122は、図示しない内部タイマを用いて処理時間を計測する。
 本実施の形態では、撮像トリガの間隔時間τ内で計測処理が開始されて終了されるべきであることから、オペレータは、処理時間391が指す最大処理時間と、平均撮像時間381とを比較し、比較結果に基づき、計測処理にかける時間にどのくらいの余裕があるかを判定することができる。そして判定された余裕を参考にして、計測処理に係るパラメータ値を調整することができる。
 なお、上述した各実施の形態に説明した各種の機能は、撮像画像処理部120と操作表示装置500において、全て搭載することもできるが、必要とする種類の機能を選択して搭載するようにしてもよい。
 [実施の形態5]
 次に、視覚センサ100およびロボット制御装置200とネットワークNWを介して接続されるサポート装置600について説明する。
 図40は、本発明の実施の形態5に係るサポート装置600のハードウェア構成を示す模式図である。サポート装置600は、典型的には、汎用のコンピュータで構成される。なお、メンテナンス性の観点からは、可搬性に優れたノート型のパーソナルコンピュータが好ましい。
 図40を参照して、サポート装置600は、OS(オペレーティングシステム)を含む各種プログラムを実行するCPU610と、BIOSや各種データを格納するROM(Read Only Memory)620と、CPU61でのプログラムの実行に必要なデータを格納するための作業領域を提供するメモリRAM630と、CPU61で実行されるプログラムなどを不揮発的に格納するハードディスク(HDD)640とを含む。
 サポート装置600は、さらに、ユーザからの操作を受付けるキーボード650およびマウス660と、情報をユーザに提示するためのモニタ670とを含む。
 後述するように、サポート装置600で実行される各種プログラムは、CD-ROM690に格納されて流通する。このCD-ROM690に非一時的に記録されたプログラムは、CD-ROM(Compact Disk-Read Only Memory)ドライブ680によって読取られ、ハードディスク(HDD)640などへ格納される。あるいは、上位のホストコンピュータなどからネットワークを通じてプログラムをダウンロードするように構成してもよい。
 上述したように、サポート装置600は、汎用的なコンピュータを用いて実現されるので、これ以上の詳細な説明は行わない。
 このようなサポート装置600は、視覚センサ100およびロボット制御装置200のいずれともデータ通信可能であるので、各種のデータを収集することができる。そこで、上述した操作表示装置500のパノラマ画像表示に関する機能は、サポート装置600が備えるとしてもよい。
 ロボット300の動作を解析するために、各画像データ333についての計測結果を格納するテーブル331を利用することができる。つまり、ロボット300において、ロボット動作をカウンタ値と関連付けて記録しておくことで、ロボット動作と対応する画像の計測結果334と関連付けることができる。これにより、たとえば、把持動作が失敗した場合などに、その失敗した原因を追求するために、把持対象であったワークの画像および計測結果334をサポート装置600または操作表示装置500上で再現できる。そのため、不具合原因をより容易に解析することができ、または解析を支援する情報を提示することができる。
 今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
 10,20 コンベア、100 視覚センサ、110 撮像部、120 撮像画像処理部、126 撮像制御部、132 エンコーダカウンタ、200 ロボット制御装置、510 演算処理部、221 計測処理部、222 重なり取得部、223,223B 画像生成部、225 比取得部、226 パラメータ更新部、227 計測パラメータ更新部、228 撮像パラメータ更新部、229 画像分割部、300 ロボット、500 操作表示装置、600 サポート装置、NW ネットワーク、S キャリブレーション用シート、W ワーク、223A パノラマ画像処理部、223C 描画判定部、225A 表示関連処理部、225B 画像落ち処理部、225C エンコーダエラー処理部、225D アンダーフロー処理部。

Claims (14)

  1.  連続する撮像の前後で撮像範囲に重複領域を有する撮像部(110)に接続される画像処理装置であって、
     前記撮像部によって得られる複数枚の撮像画像を受け付けるインターフェイス(126)と、
     前記撮像画像に対する計測処理を行うことにより、当該撮像画像中の被写体の計測結果を取得する計測部(221)と、
     前記複数枚の撮像画像を、前記重複領域に対応する重なり範囲で撮像順に重なり合うように合成し、且つ前記重なり範囲における前記被写体の計測結果を当該重なり範囲において重畳させた合成画像を生成する合成部(223A)と、
     前記合成画像と、当該合成画像に関連付けて前記重なり範囲を示す情報とを出力する出力部(502)と、を備える、画像処理装置。
  2.  前記計測結果は、前記撮像画像における前記被写体に相関する図形であって、
     前記合成部は、
     前記図形の少なくとも一部が、前記重なり範囲に含まれるか否かを判定する判定部(223C)を、含み、
     前記図形の少なくとも一部が、前記重なり範囲に含まれると判定されたとき、前記被写体の計測結果の画像を当該重なり範囲に重畳させた合成画像を生成する、請求項1に記載の画像処理装置。
  3.  前記合成部は、
     連続する撮像によって得られる複数枚の撮像画像における、単位時間当たりの画像の移動量から、出力態様を決定し、
     前記出力部は、
     決定された前記出力態様に基づき、前記合成画像の出力する、請求項1に記載の画像処理装置。
  4.  前記合成画像を生成する場合に、生成に関するエラーを検出し、検出したエラーを処理する、請求項1に記載の画像処理装置。
  5.  前記エラーとして、前記合成画像を生成するための撮像画像の不足を検出する、請求項4に記載の画像処理装置。
  6.  前記出力部は、前記合成画像における各撮像画像の出力態様を相違させる、請求項1に記載の画像処理装置。
  7.  外部からの操作を受け付ける操作入力部を、さらに備え、
     前記出力部は、
     前記合成画像における前記操作入力部によって選択された撮像画像を拡大して出力する、請求項1に記載の画像処理装置。
  8.  前記操作入力部が受け付ける操作によって指示される計測結果を、各撮像画像に対応する前記計測結果のうちから選択し、
     前記出力部は、選択された計測結果に対応する前記撮像画像と、当該撮像画像の前後で撮像された撮像画像とから成る合成画像を出力する、請求項7に記載の画像処理装置。
  9.  前記出力部は、
     前記合成画像における撮像画像のうちから、対応する前記計測結果が予め指定された値を指示する撮像画像を選択して出力する、請求項1に記載の画像処理装置。
  10.  前記出力部は、
     前記合成画像における撮像画像のうち、撮像順が奇数番目の撮像画像に対応する前記計測結果と、偶数番目の撮像画像に対応する前記計測結果との出力態様を異ならせる、請求項1に記載の画像処理装置。
  11.  前記計測部による計測処理の所要時間に関する情報を出力する、請求項1に記載の画像処理装置。
  12.  前記所要時間に関する情報は、前記連続する撮像の前後の時間間隔に対する、撮像画像の計測処理の所要時間の比(340)である、請求項11に記載の画像処理装置。
  13.  前記合成画像の各撮像画像について前記比を取得し、
     前記合成画像と、当該合成画像の各撮像画像に関連付けて前記比を出力する、請求項12に記載の画像処理装置。
  14.  連続する撮像の前後で撮像範囲に重複領域を有する撮像部に接続されるコンピュータ(120)で実行される画像処理プログラムを非一時的に記録した機械読取可能な記録媒体であって、
     前記画像処理プログラムは、前記コンピュータを、
     前記撮像部によって得られる複数枚の撮像画像を受け付けるインターフェイス(126)と、
     前記撮像画像に対する計測処理を行うことにより、当該撮像画像中の被写体の計測結果を取得する計測部(221)と、
     前記複数枚の撮像画像を、前記重複領域に対応する重なり範囲で撮像順に重なり合うように合成し、且つ前記重なり範囲における前記被写体の計測結果を当該重なり範囲において重畳させた合成画像を生成する合成部(223A)と、
     前記合成画像と、当該合成画像に関連付けて前記重なり範囲を示す情報とを出力する出力部、として機能させる、画像処理プログラムを非一時的に記録した機械読取可能な記録媒体。
PCT/JP2012/055689 2011-10-31 2012-03-06 画像処理装置および画像処理プログラム記録媒体 WO2013065332A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP12846316.3A EP2793183B1 (en) 2011-10-31 2012-03-06 Image processing device and recording medium for image processing program
CN201280065421.1A CN104169964B (zh) 2011-10-31 2012-03-06 图像处理装置及图像处理程序记录介质

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011-238791 2011-10-31
JP2011238791A JP5003840B1 (ja) 2011-10-31 2011-10-31 画像処理装置および画像処理プログラム

Publications (1)

Publication Number Publication Date
WO2013065332A1 true WO2013065332A1 (ja) 2013-05-10

Family

ID=46794009

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/055689 WO2013065332A1 (ja) 2011-10-31 2012-03-06 画像処理装置および画像処理プログラム記録媒体

Country Status (4)

Country Link
EP (1) EP2793183B1 (ja)
JP (1) JP5003840B1 (ja)
CN (1) CN104169964B (ja)
WO (1) WO2013065332A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2915634A1 (en) * 2014-03-05 2015-09-09 Kabushiki Kaisha Yaskawa Denki Robot system, robot monitoring device, and robot monitoring method
JP2017223459A (ja) * 2016-06-13 2017-12-21 株式会社キーエンス 画像処理センサ、画像処理方法
CN111095351A (zh) * 2017-09-14 2020-05-01 株式会社日立高新技术 电荷粒子显微镜装置和广角图像生成方法

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6004354B2 (ja) * 2012-06-15 2016-10-05 パナソニックIpマネジメント株式会社 画像データ処理装置及び画像データ処理方法
JP5670416B2 (ja) 2012-12-28 2015-02-18 ファナック株式会社 ロボットシステム表示装置
JP6601179B2 (ja) 2015-11-18 2019-11-06 オムロン株式会社 シミュレーション装置、シミュレーション方法、およびシミュレーションプログラム
JP6834232B2 (ja) 2016-08-09 2021-02-24 オムロン株式会社 情報処理システム、情報処理装置、ワークの位置特定方法、およびワークの位置特定プログラム
JP2018024044A (ja) * 2016-08-09 2018-02-15 オムロン株式会社 情報処理システム、情報処理装置、ワークの位置特定方法、およびワークの位置特定プログラム
JP2018034242A (ja) * 2016-08-31 2018-03-08 セイコーエプソン株式会社 ロボット制御装置、ロボット、及びロボットシステム
JP7047249B2 (ja) * 2017-01-10 2022-04-05 オムロン株式会社 画像処理システム、画像処理装置、ワークのピックアップ方法、および、ワークのピックアッププログラム
JP6902369B2 (ja) * 2017-03-15 2021-07-14 株式会社オカムラ 提示装置、提示方法およびプログラム、ならびに作業システム
JP6331178B1 (ja) * 2017-05-12 2018-05-30 パナソニックIpマネジメント株式会社 画像処理装置、及び、画像処理方法
CN107175662A (zh) * 2017-06-02 2017-09-19 成都福莫斯智能系统集成服务有限公司 机器人手臂的位置校准方法
CN108818536B (zh) * 2018-07-12 2021-05-14 武汉库柏特科技有限公司 一种机器人手眼标定的在线偏移修正方法及装置
JP7124509B2 (ja) * 2018-07-19 2022-08-24 オムロン株式会社 シミュレーション装置、シミュレーションプログラムおよびシミュレーション方法
JP7067410B2 (ja) * 2018-10-15 2022-05-16 トヨタ自動車株式会社 ラベル読取システム
JP2022061700A (ja) * 2020-10-07 2022-04-19 セイコーエプソン株式会社 ベルトコンベアキャリブレーション方法、ロボット制御方法、ロボットシステム、プログラム

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5260264A (en) 1975-11-12 1977-05-18 Sumitomo Metal Ind Apparatus to control plate width for hot roll mill
JP2002113679A (ja) 2000-10-06 2002-04-16 Seiko Instruments Inc トラッキング方法、トラッキングシステム、及びトラッキング装置
JP2009291895A (ja) * 2008-06-05 2009-12-17 Toshiba Mach Co Ltd ハンドリング装置、制御装置及び制御方法
JP2010081229A (ja) * 2008-09-25 2010-04-08 Omron Corp 画像合成方法および画像処理システム

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9092841B2 (en) * 2004-06-09 2015-07-28 Cognex Technology And Investment Llc Method and apparatus for visual detection and inspection of objects
IL188825A0 (en) * 2008-01-16 2008-11-03 Orbotech Ltd Inspection of a substrate using multiple cameras
EP2683156A3 (en) * 2008-12-12 2015-02-11 Testo AG Thermal imaging camera
JP5235798B2 (ja) * 2009-06-22 2013-07-10 富士フイルム株式会社 撮影装置及びその制御方法
JP5561214B2 (ja) * 2011-03-15 2014-07-30 オムロン株式会社 画像処理装置および画像処理プログラム

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5260264A (en) 1975-11-12 1977-05-18 Sumitomo Metal Ind Apparatus to control plate width for hot roll mill
JP2002113679A (ja) 2000-10-06 2002-04-16 Seiko Instruments Inc トラッキング方法、トラッキングシステム、及びトラッキング装置
JP2009291895A (ja) * 2008-06-05 2009-12-17 Toshiba Mach Co Ltd ハンドリング装置、制御装置及び制御方法
JP2010081229A (ja) * 2008-09-25 2010-04-08 Omron Corp 画像合成方法および画像処理システム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2793183A4 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2915634A1 (en) * 2014-03-05 2015-09-09 Kabushiki Kaisha Yaskawa Denki Robot system, robot monitoring device, and robot monitoring method
US9545722B2 (en) 2014-03-05 2017-01-17 Kabushiki Kaisha Yaskawa Denki Robot system, robot monitoring device, and robot monitoring method
JP2017223459A (ja) * 2016-06-13 2017-12-21 株式会社キーエンス 画像処理センサ、画像処理方法
CN111095351A (zh) * 2017-09-14 2020-05-01 株式会社日立高新技术 电荷粒子显微镜装置和广角图像生成方法
CN111095351B (zh) * 2017-09-14 2023-06-20 株式会社日立高新技术 电荷粒子显微镜装置和广角图像生成方法

Also Published As

Publication number Publication date
JP2013097514A (ja) 2013-05-20
CN104169964B (zh) 2017-08-22
JP5003840B1 (ja) 2012-08-15
EP2793183B1 (en) 2020-10-07
EP2793183A4 (en) 2015-10-14
EP2793183A1 (en) 2014-10-22
CN104169964A (zh) 2014-11-26

Similar Documents

Publication Publication Date Title
JP5003840B1 (ja) 画像処理装置および画像処理プログラム
JP5561214B2 (ja) 画像処理装置および画像処理プログラム
US20120236140A1 (en) User support apparatus for an image processing system, program thereof and image processing apparatus
CN110154017B (zh) 输送机跟踪系统以及校准方法
JP5370398B2 (ja) 画像処理装置および画像処理プログラム
JP6308248B2 (ja) コンベアトラッキング等に向けられたガイダンス装置
JP2012187651A (ja) 画像処理装置および画像処理システム、ならびにそれらに向けられたガイダンス装置
KR101485722B1 (ko) 화상 처리 장치 및 화상 처리 시스템
JP2007079028A (ja) 投射型画像表示装置およびマルチプロジェクションシステム
JPWO2020039605A1 (ja) ガス検出装置、情報処理装置およびプログラム
JP2020082274A (ja) 画像処理装置およびその制御方法、プログラム
JP5416082B2 (ja) ひずみ測定装置およびひずみ測定方法
JP6220514B2 (ja) ロボット制御システムおよびロボット制御方法
JP5862382B2 (ja) 作業支援装置
JP2020159965A (ja) 3次元計測装置、3次元計測システムおよび3次元計測方法
JP4696826B2 (ja) X線検査装置
JP2020075354A (ja) 外部入力装置、ロボットシステム、ロボットシステムの制御方法、制御プログラム、及び記録媒体
JPH10307617A (ja) 自動機の作業支援装置
JP2007306247A (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: 12846316

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2012846316

Country of ref document: EP