WO2006135040A1 - 3次元計測を行う画像処理装置および画像処理方法 - Google Patents

3次元計測を行う画像処理装置および画像処理方法 Download PDF

Info

Publication number
WO2006135040A1
WO2006135040A1 PCT/JP2006/312099 JP2006312099W WO2006135040A1 WO 2006135040 A1 WO2006135040 A1 WO 2006135040A1 JP 2006312099 W JP2006312099 W JP 2006312099W WO 2006135040 A1 WO2006135040 A1 WO 2006135040A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
view
camera
height
setting
Prior art date
Application number
PCT/JP2006/312099
Other languages
English (en)
French (fr)
Inventor
Yasuyuki Ikeda
Shiro Fujieda
Original Assignee
Omron Corporation
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 Omron Corporation filed Critical Omron Corporation
Priority to EP06757383.2A priority Critical patent/EP1788345B1/en
Priority to KR1020097024679A priority patent/KR101155816B1/ko
Priority to US11/630,631 priority patent/US8233041B2/en
Priority to JP2006541746A priority patent/JP4811272B2/ja
Publication of WO2006135040A1 publication Critical patent/WO2006135040A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • G01B11/03Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness by measuring coordinates of points
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/245Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures using a plurality of fixed, simultaneously operating transducers
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/25Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object
    • G01B11/2545Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object with one projection direction and several detection directions, e.g. stereo
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B21/00Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant
    • G01B21/02Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring length, width, or thickness
    • G01B21/04Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring length, width, or thickness by measuring coordinates of points
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S5/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S5/16Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using electromagnetic waves other than radio waves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/593Depth or shape recovery from multiple images from stereo images
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/06Systems determining position data of a target
    • G01S17/46Indirect determination of position data
    • G01S17/48Active triangulation systems, i.e. using the transmission and reflection of electromagnetic waves other than radio waves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/04Indexing scheme for image data processing or generation, in general involving 3D image data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/24Indexing scheme for image data processing or generation, in general involving graphical user interfaces [GUIs]
    • 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/10004Still image; Photographic image
    • G06T2207/10012Stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]
    • 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
    • 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/30148Semiconductor; IC; Wafer

Definitions

  • the present invention relates to an apparatus that performs three-dimensional measurement based on images captured by a plurality of cameras arranged so as to photograph an object from different directions.
  • Measurement in this specification includes measurement for the purpose of screening. In other words, in general, based on the fact that some measurement is performed in the course of an inspection, the term “measurement” includes the case where the final output is, for example, a pass / fail test and no measurement value is output. And
  • an apparatus for measuring the shape and surface pattern of an object by two-dimensional image processing has been widely used at various product manufacturing sites.
  • the surface representing the object for example, the bottom surface of the object
  • the measurement object surface of the object is photographed from the direction perpendicular to the surface, that is, the direction in which the surface is viewed from the front. Measurement is performed based on the obtained image.
  • Patent Document 1 discloses a printed circuit board inspection apparatus using such a technique.
  • 3D measurement devices limit the types and properties of objects, and are configured as specialized devices for the purpose of printed circuit board inspection, for example. It has not been realized as a device with versatility that can be applied in the field, and operability that can be used and handled without specialized knowledge of 3D measurement.
  • Patent Document 1 Japanese Patent Publication No. 2003-522347
  • the inventors are as versatile as the conventional two-dimensional image processing apparatus, and are provided with a three-dimensional measurement function that is easy to use and manage by the user. Decided to develop processing equipment. Under such a policy, the inventors set the object of 3D measurement on the image of the captured object, using objects of various shapes as the object of measurement. It was set as an issue to make it easy for the user to specify the settings for identifying them.
  • the first image processing apparatus proposed in this specification is a front-view image obtained based on an image obtained by capturing an object with the first camera. Processing using a first image and a second image based on an image taken by a second camera arranged to shoot an object from a direction different from the direction taken by the first camera
  • the first image which is a front view image obtained based on an image obtained by photographing the object to be measured by the first camera, a designated area is determined based on the setting and the designated image is designated.
  • a position specifying means for specifying a position on the object in the area, and a first image;
  • a position in the second image corresponding to the position specified in the image is specified, and a three-dimensional coordinate is calculated using the specified position on the first image and the position on the second image.
  • 3D measuring means for measuring the position on the first image and the position on the second image.
  • the first camera when the first camera is arranged so as to shoot the object from the direction in which the object is viewed from the front, and the image itself captured by the first camera is a front-view image, the first camera An image obtained by photographing the object to be measured by the camera may be used as the first image as it is. Further, for example, an image for correcting misalignment may be applied to the image taken by the first camera. An image that has undergone processing such as movement may be used as the first image.
  • the image captured by the first camera is a perspective image
  • at least an image that has been subjected to processing for converting the perspective image into a front-view image is used as the first image.
  • the user can set the designated area for specifying the position on the object with respect to the front-view image. It is possible to easily make settings for identifying.
  • the image processing apparatus further includes a conversion operation for converting a perspective image captured by a first camera arranged to capture an object from a perspective direction into a front-view image.
  • a conversion means for In this case, the first camera uses the first camera for setting.
  • the first image is obtained by converting the captured image by the conversion means, and the first image is an image captured from the direction in which the first camera squints the object to be measured. Is obtained by the conversion means converting.
  • the direction of front view relative to the object (for example, vertically above the object)
  • the area can be set for the front view image.
  • scale information relating the dimensions in the converted front view image and the actual dimensions of the measurement target portion are available.
  • the 2D image processing means for performing the 2D image processing using the scale information for the first image, and the front view height indicated by the 3D coordinates calculated by the 3D measurement means is the allowable level. Judgment means for judging whether or not it is included in the range is provided.
  • the image is converted by the conversion means using the front view height indicated by the three-dimensional coordinates calculated by the three-dimensional measurement means.
  • Scale information calculation means for calculating scale information that correlates the dimensions in the front-view image and the actual dimensions of the measurement target part, and two-dimensional image processing using the scale information for the first image Image processing means is further provided.
  • the scale information relating the dimension in the converted front view image and the actual dimension of the measurement target portion is matched with the scale information.
  • the scale reference height value that is the height of the front view to be used can be used, and an adjustment unit that changes the scale reference height and the scale information consistently based on an operation by the user is further provided.
  • the scale reference height is adjusted so as to substantially match the actual front view height of the target portion of the three-dimensional measurement based on the operation by the user, The range in which the measurement target location may appear is reduced.
  • the position corresponding to the position specified on the first image is specified for such a small range, the correspondence of the measurement target position between the first image and the second image is determined. The possibility of incorrect attachment is reduced, and the time required for the calculation for identifying the corresponding position is also shortened.
  • the display image includes a scale figure indicating an actual dimension on a plane at a scale reference height with respect to the first image.
  • Image editing means for editing the image may be provided.
  • the user can perform an adjustment operation so that the size relationship between the displayed scale figure and the image of the measurement target portion is correct.
  • An image processing apparatus that solves the problem of enabling a user to easily perform settings for specifying a target portion of three-dimensional measurement on an image in which a captured target object appears.
  • a first image that is a front view image obtained based on an image photographed from a direction in which the first camera squints an object, and a direction in which the first camera photographs
  • An image processing apparatus that performs processing using a second image based on an image captured by a second camera arranged to capture an object from a different direction from the direction in which the object is obliquely viewed
  • the position specifying means for specifying the position on the object based on the setting and the position in the second image corresponding to the position specified in the first image are specified. 3D coordinates are determined using the specified position on the first image and the position on the second image.
  • the user can set the setting for specifying the position on the object with respect to the front view image even though the image captured by the camera is a perspective image. Therefore, it is easy to make settings for specifying the target location for 3D measurement. Furthermore, even when the camera is not installed in the direction of the front view with respect to the object or when it cannot be installed, the setting can be easily performed.
  • the value of the scale reference height which is the height of the front view that matches the information, and the value of the allowable range of the front view height that is determined to include the scale reference height are available.
  • 2D image processing means for performing 2D image processing using scale information for the image of the image, and the front view height indicated by the 3D coordinates calculated by the 3D measurement means are included in the allowable range.
  • determining means for determining whether or not
  • the scale indicated by the scale information used by the two-dimensional image processing means and the actual first image are displayed. It can be seen that there is a larger difference than the expected level.
  • the scale reference height value which is the height of the matching front view, can be used, and the scale reference height and scale information are aligned based on user operations. Adjustment means for changing the position is further provided.
  • the second image when the scale reference height is adjusted so as to substantially match the actual front view height of the target part of the three-dimensional measurement based on the operation by the user, the second image
  • the range in which the measurement target location may appear is reduced. Therefore, if the position corresponding to the position specified on the first image is specified for such a small range, the position of the measurement target position between the first image and the second image is determined. The possibility of erroneous association is reduced, and the time required for calculation for identifying the correspondence position is also shortened.
  • a display image in which a scale figure indicating an actual dimension on a plane at a scale reference height is added to the first image is displayed.
  • Image editing means for editing may be further provided. In this way, when the edited image is displayed, the user can perform an adjustment operation so that the size relationship between the displayed scale graphic and the image of the measurement target portion is correct.
  • the first image processing method proposed in this specification includes a first image that is a front-view image obtained based on an image obtained by capturing an object with the first camera, A second image based on an image photographed by a second camera arranged to photograph an object from a direction different from the direction photographed by the first camera, and A setting step for displaying a setting image that is a front-view image obtained based on an image obtained by capturing an object for setting by the camera, and allowing a user to set a specified area using the setting image; For the first image, which is a front-view image obtained based on an image obtained by photographing the object to be measured by the first camera, a designated area is determined based on the setting, and within the designated area.
  • a position identifying step for identifying a position on the object in The position in the second image corresponding to the position specified in the first image is specified, and the specified position on the first image and the position on the second image are used. It is equipped with a 3D measurement step that calculates dimensional coordinates.
  • an image is taken from a direction in which the object is obliquely viewed.
  • the first image which is a front-view image obtained based on the image obtained by capturing the object with the first camera arranged so as to be shadowed, and the direction from which the first camera captures the target.
  • This is a process that uses a second image based on an image taken by a second camera arranged to shoot an object, and converts the perspective image taken by the first camera into a front view image.
  • the first camera converts the image obtained by photographing the setting object into the setting image, and the setting step for allowing the user to set the measurement target position using the setting image.
  • FIG. 1 is a perspective view showing a configuration of an imaging unit of an inspection apparatus to which the present invention is applied together with an installation example.
  • FIG. 2 is an explanatory diagram showing an example of an image captured by each camera.
  • FIG. 3 is a block diagram of a screening device.
  • FIG. 4 is a flowchart showing a procedure for performing an IC inspection.
  • FIG. 5 is an explanatory diagram showing an example of setting a detection area.
  • FIG. 6 is a flowchart showing the procedure of teaching processing.
  • FIG. 7 is an explanatory diagram showing a setting example of a positioning area.
  • FIG. 8 is a flowchart showing a detailed procedure of lead inspection.
  • FIG. 9 is an explanatory diagram showing a relationship between a positioning area and a detection area for a work in a front view image at the time of inspection.
  • FIG. 10 is an explanatory diagram showing the relationship of corresponding points between images.
  • FIG. 11 is an explanatory diagram showing a search area setting method.
  • FIG. 12 is an explanatory diagram showing a relationship between a height range and a search area.
  • FIG. 13 is an explanatory diagram showing an example of model registration for an inspection target part on a workpiece.
  • FIG. 14 is a flowchart showing a procedure for checking a character key.
  • FIG. 15 is an explanatory diagram showing an example in which a region to be inspected and a search region are set for an image at the time of inspection.
  • FIG. 16 is an explanatory view showing a front view image and a perspective image of a work having a circular display area.
  • FIG. 17 is an explanatory diagram showing the result of specifying the display area and the measurement target area for a non-defective work.
  • FIG. 18 is a flowchart showing a procedure in the case where the workpiece height inspection of FIG. 16 is performed.
  • FIG. 19 is an explanatory diagram showing an example in which the measurement target area and the search area follow a change in the position of the workpiece.
  • FIG. 20 is an explanatory diagram showing an example of setting a virtual camera for front view.
  • FIG. 21 is an explanatory diagram showing a method for converting a perspective image into a front view image.
  • FIG. 22 is a flowchart showing a setting procedure performed prior to inspection.
  • FIG. 23 is a flowchart showing an example of an inspection procedure accompanied by a conversion process into a front-view image.
  • FIG. 24 is a flowchart showing an example of an inspection procedure accompanied by a conversion process into a front-view image.
  • FIG. 25 is a flowchart showing an example of an inspection procedure accompanied by a conversion process into a front-view image.
  • FIG. 26 is a flowchart showing a setting procedure including changing the scale reference height and scale information.
  • FIG. 27 is an explanatory diagram showing a shooting state of a workpiece by a perspective camera.
  • FIG. 28 is an explanatory diagram showing the contents of a window displayed on the monitor.
  • FIG. 29 is an explanatory diagram showing a change in the display content of the edited image accompanying a change in the scale reference height.
  • FIG. 1 shows the configuration of the imaging unit of an inspection apparatus (image processing apparatus) to which the present invention is applied. Shown with installation examples.
  • This inspection apparatus has both three-dimensional and two-dimensional measurement processing functions.
  • An inspection object W (hereinafter referred to as “work W”) conveyed on the inspection line L in the factory is transferred to the imaging unit 1. Images are taken in order, and measurement processing and discrimination processing according to various inspection purposes are executed.
  • the imaging unit 1 has a configuration in which two cameras C0 and C1 are incorporated in a casing 15, and is installed above the inspection line L.
  • One camera CO is installed with its optical axis oriented vertically (when viewed from the front with respect to the workpiece W).
  • the other camera C1 is installed with the optical axis tilted so that the camera CO and the field of view overlap.
  • the imaging plane that defines the field of view of camera CO and camera C1 is rectangular, and camera C1 corresponds to camera CO in the lateral direction of the field of view of camera CO (corresponding to the X-axis direction of image AO in Fig. 2). ) Are arranged along the line.
  • FIG. 2 shows an example of an image of the work W generated by each camera C0, C1.
  • AO in the figure is the image from camera CO
  • A1 is the image from camera C1.
  • the workpiece in each of the images AO and A1 is also shown by using W as in FIG.
  • the horizontal direction (horizontal direction) of image AO is the X-axis direction
  • the vertical direction (vertical direction) is the y-axis direction.
  • the image AO shows a state where the upper surface of the workpiece W is viewed from the front.
  • the camera C1 since the camera C1 is installed with its optical axis inclined, the work W as seen from the diagonal appears in the image A1.
  • the image AO from the camera CO is referred to as “front-view image AO”
  • the image A1 from the camera C1 is referred to as “perspective image Al”.
  • the front-view image AO corresponds to the “first image”
  • the perspective image A1 corresponds to the “second image”.
  • the measurement target position is specified using the front-view image AO with a small image distortion (close to the plan view of the workpiece W), and then on the perspective image A1 and on the front-view image AO.
  • a position corresponding to the measurement target position is specified.
  • FIG. 3 is a block diagram showing the overall configuration of the screening apparatus.
  • this inspection device includes a main unit 2, a monitor 3, a console 4, and the like.
  • the main body 2 is provided with image input units 10 and 11, a camera drive unit 12, an arithmetic processing unit 20, an output unit 28, and the like for the cameras CO and C1.
  • the camera drive unit 12 receives detection signals from a workpiece detection sensor (not shown) and simultaneously drives the power lenses CO and C1.
  • the image signals generated by the cameras CO and C1 are input to the respective image input units 10 and 11 and digitally converted. As a result, a digital image (front-view image AO and perspective image A1) for measurement processing is generated for each camera.
  • the arithmetic processing unit 20 is configured by a computer, and after performing measurement processing using the images of the cameras CO and C1, the suitability of the workpiece W is determined from the processing result.
  • the output unit 28 is an output interface for outputting the results of measurement processing and judgment processing to an external device such as a PLC.
  • a parameter storage unit 27 is provided.
  • Each unit other than the image memory 21 and the parameter storage unit 27 is a function set in the computer as the arithmetic processing unit 20 by a dedicated program.
  • the image memory 21 and the parameter storage unit 27 are set in the memory (RAM, etc.) of this computer.
  • the arithmetic processing unit 20 is also provided with a memory for registering information necessary for the inspection (inspection area setting conditions, model images, etc.). Setting or changing the registration processing in the registration memory and the processing executed by each processing unit of the arithmetic processing unit 20 can be appropriately performed according to the operation of the console 4.
  • the image processing unit 22 identifies the inspection target part of the workpiece W by binarization, edge extraction, pattern matching, and the like.
  • the measurement processing unit 23 executes processing for measuring the position, size, and the like of the examination target part specified by the image processing unit 22.
  • the image processing unit 22 and the measurement processing unit 23 can execute 2D measurement and 3D measurement processing.
  • the determination unit 24 determines the quality of the work W by, for example, comparing the measurement result of the measurement processing unit 23 with a predetermined threshold value.
  • the measurement results and determination results are output to the output unit 28 and the display control unit 25.
  • the display control unit 25 controls the display operation of the monitor 3 and can display the front view image A0 and the perspective image A1 generated by the image input units 10 and 11 in parallel on one screen. Furthermore, the processing results of the image processing unit 22, the measurement processing unit 23, and the determination unit 24 are appropriately received. And can be displayed with the image.
  • the parameter storage unit 27 stores various coefficients used for computation for three-dimensional measurement. These coefficient values are the relationship between the stereo coordinate system composed of the cameras CO and C1 and the spatial coordinate system representing the position in the actual space (the distance between the origins of each coordinate system, the stereo coordinates for the spatial coordinate system). (These coefficients are called “parameters”). These parameters are calculated by the image processing unit 22 and the parameter calculation unit 26 and stored in the parameter storage unit 27 prior to the inspection. In the process of calculating this parameter, a calibration work having a plurality of feature points is used.
  • parameter storage unit 27 also registers parameters constituting the homography matrix of the arithmetic expression (1) described later.
  • This inspection device can assemble an inspection algorithm by presenting a plurality of types of inspection menus to a user and accepting a selection operation.
  • pattern matching processing, binarization processing, edge extraction processing, etc. are performed on the front-view image AO from the camera CO, and the entire workpiece or the inspection target part in the workpiece is determined. Identify.
  • this inspection apparatus speeds up the three-dimensional measurement process by effectively using the front-view image AO from the camera CO for the inspection by the three-dimensional measurement process. This point will be described in detail later.
  • FIG. 4 shows an inspection procedure performed when the workpiece W is an IC. This procedure is started upon receiving a detection signal from the workpiece detection sensor.
  • ST1 ST is an abbreviation for “step”. The same applies to the following), the cameras CO and C1 are simultaneously driven by the camera driving unit 12 to generate the front-view image AO and the perspective image A1.
  • the verification is performed on the characters printed on the IC package.
  • two-dimensional image processing using only the front-view image AO is executed. For example, a character printing area is extracted by pattern matching processing, and the suitability of the character printing state is determined from the correlation degree and matching position at the time of matching.
  • the coordinates of the tip position of each lead in the front-view image AO are obtained by the edge detection method, and then the coordinates of the tip position of each corresponding lead in the perspective image A1 are used for edge detection. It is required by the method.
  • the three-dimensional coordinates of the tip of each lead are obtained from the coordinates of the tip position of each lead in both images, and it is determined from the calculated values whether there is an abnormality such as a float or bend in each lead.
  • the corresponding measurement target points are identified between the front-view image AO and the perspective image A1, and the coordinates of each identified point are based on the principle of triangulation. 3D coordinates are calculated by applying the calculation formula.
  • FIG. 5 shows a setting example of the detection area (designated area set by the user) in the front view image AO and the detection area in the perspective image A1.
  • the vertical direction of the image (in the front view image A 0 is the direction along the lead arrangement) 3 ⁇ 4ry direction, and the horizontal direction (in the front view image AO is the direction along the lead length) is the X direction.
  • an individual detection area 7 is set for each lead 6, and one edge point corresponding to the tip of the lead is specified for each detection area 7.
  • the X axis is the horizontal axis and the number of projected “bright” pixels or “ ⁇ ” pixels. Create a histogram with the number on the vertical axis. Then, the X coordinate of the point where the histogram value changes suddenly is taken as the X coordinate of the tip of Lead 6. On the other hand, the y coordinate of the midpoint of the detection area 7 in the y direction is assigned to the y coordinate of the tip of the lead 6.
  • the points indicated by the X and y coordinates obtained in this way are called edge points.
  • the power obtained by binarizing the image in the detection area 7 is not limited to this, and the density of each pixel is integrated in the y direction while the image in the detection area 7 is kept as a grayscale image, and thus obtained.
  • the X-coordinate of a point that suddenly changes along the value 1 ⁇ 2 direction of the integrated concentration distribution may be obtained.
  • the position of the edge is detected along one specific direction.
  • the X direction is the edge detection direction.
  • the edge detection direction is designated for the detection area 7.
  • the present invention is not limited to this, and the detection area 7 that originally has a unique edge detection direction may be set.
  • the edge detection direction of the detection area 7 is first specified, and then the front-view image AO is displayed. Even if you set the detection area 7.
  • a detection region 8 is set for each lead 6. These detection areas 8 are specified in each detection area 7 of the front-view image AO based on an arithmetic expression for converting one point on one image to one point on the other image (Equation (1) described later). It is set using the coordinates of the edge points and the height range specified by the user (the range that the height of the target part of 3D measurement can take).
  • the height here is the height in the vertical direction with respect to the mounting surface of the workpiece W, that is, the height in the front view direction, and is also referred to as the front view height.
  • the height reference is not limited to the surface on which the workpiece W is placed, but can be taken at the position of the camera CO or any other position.
  • the height range specified by the user is the target range for 3D measurement along the optical axis of the camera CO.
  • FIG. 6 shows a procedure of teaching processing (setting processing) for IC lead inspection. This procedure is performed before starting the IC inspection in Figure 4.
  • a non-defective workpiece is set as an object for setting at the imaging target position, and this is imaged by the cameras CO and C1.
  • the cameras CO and C1 are simultaneously driven during the teaching process, and the generated two images are displayed side by side on the monitor 3.
  • FIG. 7 shows a display example of the front-view image AO at the time of this designation operation, and 9 in the figure is a positioning area.
  • This positioning area 9 is used to extract the end of the leads 6 arranged in a row (the lead 6a at the top end in the illustrated example, hereinafter referred to as the “lead 6a”). It is done.
  • a square-shaped area 9 that includes only the top lead 6a is set.
  • the size of the positioning area 9 is adjusted so that the head lead 6a can be imaged in the positioning area 9 even if the workpiece W is displaced to the extent possible.
  • the positioning area 9 is set so that the top lead 6a is imaged in the lower half of the positioning area 9. As a result, it can be confirmed that the first lead 6a is imaged in the lower half of the positioning area 9 because the lead is not imaged in the upper half of the positioning area 9.
  • the next lead 14a is extracted from the positioning area 9 in the next ST14.
  • this extraction process for example, by binarizing the image in the positioning area 9 and projecting the binarized image along the y-axis direction and the X-axis direction, the X coordinate and y Find the coordinates.
  • the contour of the lead 6a may be extracted by extracting the edge in the positioning region 9 and the concentration gradient direction thereof, and the X and y coordinates of the tip of the lead 6a may be obtained.
  • a detection area 7 is set for each lead 6 based on the X and y coordinates of the tip of the lead 6a and the data input in ST11. Specifically, using the data input in ST11, the number of pixels of camera CO, the magnification, etc., the length of lead 6 on the image is calculated as the pitch between leads 6, and the calculated value is used as the calculated value. Based on this, the size of each detection region 7 and the interval between the regions are determined. In this manner, data necessary for setting the detection area 7 for each lead 6 including the lead 6a, that is, setting conditions, is created based on the position of the head lead 6a.
  • Such a method can be taken by using a front-view image AO that directly reflects the characteristics of the inspection target part of the workpiece W (the length of each lead is equal, the pitch between leads is equal, etc.). It is because it uses. Therefore, if the tip lead 6a can be extracted in the positioning area 9 set by the user, it is possible to set the detection area 7 for all the leads 6 without extracting other leads 6, greatly increasing the processing efficiency. Can be improved.
  • a series of processing from ST11 to ST17 is specified to the user using a setting image that is a front view image obtained based on an image obtained by photographing the setting object by the first camera. This corresponds to setting the area (more generally speaking, allowing the user to set the measurement target position).
  • the arithmetic processing unit 20 in which the teaching processing program operates serves as setting means for executing this series of processing.
  • FIG. 8 shows a detailed procedure for the IC lead inspection (ST3 in FIG. 4).
  • the processing from ST21 to ST24 in this procedure is performed on the front-view image AO that is an image obtained by photographing the object to be measured.
  • the positioning area 9 is set in the front-view image AO based on the setting conditions registered in teaching.
  • the image in this positioning area 9 is compared with the model registered in ST17 of the teaching process, and the amount of deviation from the model is extracted (for example, a pattern matching technique is applied to this process). be able to. ).
  • the setting condition of the detection area 7 registered at teaching is adjusted based on the deviation amount extracted in ST22, and the detection area 7 of each lead is set as the designated area by the setting condition after the adjustment.
  • the distortion of the work W on the image should not be considered. Therefore, the displacement amount of the positioning area 9 can be applied to each detection area 7 as it is, and the detection area 7 can be set for each lead 6 with the same positional relationship as in the teaching process. become.
  • FIG. 9 shows an example of a front-view image AO at the time of examination. Since the workpiece W in this example is shifted to the right side from the image AO at the time of teaching shown in FIG. 7, the tip of the lead 6 protrudes from the positioning area 9. However, since the adjustment process described above is performed for the detection region 7, the detection region 7 is set for each lead 6 under the same conditions as shown in FIG.
  • the position in the image of the detection area 7 (position with respect to the image frame) is adjusted according to the misaligned work W.
  • the work W is misaligned.
  • the entire contents of the image may be moved so that W always has a fixed positional relationship with the image frame, and the detection region 7 may always be set at a fixed position with respect to the image frame.
  • the series of processing from ST21 to ST24 is based on the settings for the first image, which is a front view image obtained based on the image captured by the first camera of the object to be measured. This is equivalent to defining a designated area and specifying a position on the object in the designated area (more generally, specifying a position on the object based on the setting).
  • the arithmetic processing unit 20 in which a program combined so as to execute the procedure for the lead inspection process operates as a position specifying means for executing this series of processes.
  • a detection area 8 for detecting the tip position of each lead is set on the perspective image A1.
  • the same processing as ST24 is executed in the set detection area 8, and the x and y coordinates of the lead tip are calculated.
  • the process of setting the detection region 8 and calculating the X and y coordinates corresponds to specifying a position in the second image corresponding to the position specified in the first image.
  • the quality of each lead tip is determined by comparing the calculated three-dimensional coordinates with a reference value registered in advance. For example, if there is a float at the tip of one of the leads, the Z coordinate representing the height of that tip will exceed the reference value, and the lead will be judged to be defective.
  • FIG. 10 shows a state where a point P on the plane D at an arbitrary height in the space forms an image on the points ⁇ and pi on the imaging planes F0 and F1 of the cameras CO and C1, respectively.
  • X, ⁇ , and Z are coordinate axes representing a three-dimensional space
  • plane D is parallel to the XY plane.
  • a two-dimensional coordinate system force based on the xO and yO axes is set on the imaging plane F0
  • a two-dimensional coordinate system based on the xl and yl axes is set on the imaging plane F1, respectively.
  • the point on the plane D that is imaged at the origin of both imaging planes is the force S, and not limited to this, the position of the point P is arbitrary on the plane D.
  • the coordinates of the imaging position (point ⁇ ) of the point P on the imaging surface F0 are (X, y) and the imaging surface F1
  • Equation 1 HZ is a 3 X 3 homography that represents the relationship between the imaging position on the imaging surface F0 and the imaging position on the imaging surface F1 for a point on the plane D having a height Z. Is a matrix and ⁇ is a constant. The matrix ⁇ can be obtained in advance by calibration using known coordinates on the plane D (refer to Non-Patent Document 1 below for details of calibration).
  • Non-Patent Document 1 Nobuhiro Mitomi, Toshikazu Wada, Takashi Matsuyama "Projector 'Camera of Projector-Camera System”"[Search June 1, 2005], Internet URL: http : ⁇ vision.kuee.Kyoto-u.ac.jp/Resea rch / Thesis / Thesis_PDF / Miichi_2002_P_147.pdf>
  • the line segment gh and the line segment obtained by translating the line segment ef to each side perpendicular to the line segment ef by the half-value width k of the detection area 7 on the front image A0 side are shown.
  • g 'h' is set, and the rectangular region ghh'g 'connecting these four points is set as the detection region 8.
  • FIG. 12 is a perspective view of the same perspective image A1 as in FIG. 5, when the height range that the lead 6 can take is 0 to 5 mm and when the height range is 15 to 15 mm.
  • the size of region 8 is shown in contrast.
  • the detection area 8 becomes smaller as the fluctuation width force M in the height range increases.
  • each detection region 8 is simplified and drawn in parallel with each other, but in reality, the perspective image A1 is distorted so that a rectangular object is imaged as a trapezoid due to the effect of perspective.
  • Each detection region 8 is arranged in a non-parallel manner such that the distance between the center lines (line segment ef) is increased toward the right in the figure.
  • the binarized image for determining the edge tip position is projected in a direction perpendicular to the center line of the detection region 8.
  • the detection region 7 corresponding to each lead 6 is set in order to identify the lead tip position in the reference image A0. Instead, the detection region 7 is included so as to include the tip of each lead. Set a long detection area in the y-axis direction, and set the tip position of each lead in this area. You may make it ask
  • the front view image AO obtained by imaging the non-defective work W, which is a setting object, is used for each key 60.
  • the area 70 including the character drawn in 60 is designated, and the image in the area 70 is registered as a model.
  • This process allows the user to set the measurement target position using a setting image that is a front-view image obtained based on an image obtained by photographing the setting object with the first camera. It corresponds to that.
  • the model image is only registered here, and the measurement target position is not directly specified, but the area that matches the model image is taken as the measurement target area at the time of inspection.
  • the measurement target position is set indirectly.
  • FIG. 14 shows an inspection procedure.
  • images are generated by simultaneously driving the cameras CO and C1.
  • pattern matching processing using a model registered before inspection is executed for the front-view image AO, and the region that best matches the model is identified and set as the measurement target region.
  • the search of the measurement target area is performed only within the specified area when the specified area is set.
  • the process of specifying the measurement target area is performed for each model corresponding to each key 60, but for the sake of simplicity, the description is limited to one model.
  • the coordinates of the representative point of this region (for example, the center point of the region) are specified. This corresponds to specifying the position on the object based on the setting made using the setting image.
  • a plurality of representative points can be specified (for example, points corresponding to a plurality of feature points on a predetermined model).
  • a search area is set on the perspective image A1 based on the coordinates of the representative point.
  • the homography matrix HZ is set with the upper limit value and the lower limit value of the height range specified in advance as the height Z, By executing the calculation twice using the coordinates of the representative point and the upper and lower limits of the height range, the range where the representative point can exist on the image A1 is obtained, and the size of the model is in that range. A region that takes into account the search region.
  • step35 pattern matching processing with the model is executed in the search area, and the measurement target area and the position of the representative point in the area are specified. Furthermore, in ST36, the three-dimensional coordinates are calculated using the coordinates of the representative points of the measurement target area in the frontal and perspective images AO and A1. Next, in ST37, the suitability of the key height is determined by comparing the Z coordinate of the calculated three-dimensional coordinates with a predetermined threshold value. In ST38, the discrimination result is output and the process is terminated.
  • the corresponding point on the model can be similarly specified in ST36.
  • a model is captured by the perspective camera C1 using a homography matrix corresponding to a predetermined height within a specified height range (for example, a standard height when the workpiece is normal). It is also possible to convert to the expected shape and specify the measurement target area using the converted model. Conversely, you can convert the perspective image A1 to a front-view image and identify the area that matches the model on the converted image.
  • FIG. 15 shows a measurement object area 71 identified with respect to the key 60 on the front-view image AO in the above-described inspection, and a search on the perspective image A1 side set based on the position and size of this area 71. Indicates the measurement target area 81 specified in area 80 and search area 80
  • the front view is A method is used in which a part of the image AO is extracted as a model image, and a portion that matches the model image in the perspective image Al is searched.
  • FIG. 16 shows images AO and Al of the workpiece W generated by the cameras CO and C1.
  • S is a display (printing) area of characters to be verified.
  • the outline 72 of the display area S is also circular.
  • the shape of the outline 72 of the display area S, the arrangement state of characters in the display area S, and the like are distorted.
  • a non-defective model of the workpiece W which is a setting object, is imaged, and the user is allowed to specify the radius of the display area S and the measurement target area on the obtained front-view image AO.
  • the image processing unit 22 executes processing for obtaining the position of the center point of the display area S from the front-view image AO, and registers the relative position of the measurement target area with respect to the center point in the registration memory. This process allows the user to set the measurement target position using a setting image that is a front-view image obtained based on an image obtained by photographing the setting object with the first camera. It corresponds to that.
  • FIG. 17 shows an enlarged display region S in the front view image AO.
  • reference numeral 73 denotes a measurement target area designated by the user
  • 74 denotes a center point of the display area S.
  • the position of the center point 74 is obtained by performing a process of extracting a circular pattern from the front-view image AO, and best fits a circle (position correction model) of the size specified by the user from the extraction result.
  • the contour line 72 to be matched is specified and obtained.
  • FIG. 18 shows the procedure of height inspection for the workpiece W of FIG.
  • the cameras CO and C1 are simultaneously driven to generate a front-view image AO and a perspective image A1.
  • the position of the center point 74 of the display area S is obtained from the front-view image AO by the above processing.
  • the measurement target region 73 is set based on the registered relative position with reference to the coordinates of the center point 74 obtained in ST42.
  • the image of the measurement target region 73 is registered as a model image for search, and the representative point position of the measurement target region 73 (for example, the center point position in the region) is also registered. This corresponds to specifying the position on the object based on the setting performed using the setting image.
  • a search area 82 (shown in FIG. 19) is set on the perspective image Al. For the position and size of the search area 82, substitute the coordinates of the representative point registered in ST44 into equation (1), and homography according to the upper and lower limits of the height range specified in advance. This is determined by executing equation (1) using the matrix HZ.
  • FIGS. 19 (1) and 19 (2) show the measurement target region 73 in the front view image AO, the search region 82 in the perspective image A1, and the measurement target region 83 for one set of the front view image AO and the perspective image A1, respectively. Indicates. Further, in the front-view image AO, the outline 72 of the display area S is shown as a bold line, and the obtained position of the center point 74 of the display area S is shown. In the images of (1) and (2) in Fig. 19, the force in which the position of the work W is different in both cases, the measurement target area 73 is correctly set so that the target character is contained in it. Les.
  • the center point 74 extraction processing and the region 73 position adjustment processing are performed using the front-view image AO, and therefore it is necessary to consider image distortion.
  • the force S for setting the measurement target region 73 to an appropriate position can be obtained by the relative positional relationship with respect to the center point 74.
  • the position of the workpiece W is different between the image of the example of (1) and the image of the example of (2), but the measurement target region 73 is set under the same conditions.
  • the surface pattern such as characters to be subjected to three-dimensional measurement is changed to the workpiece. Even if it is different for each W, the same procedure can be applied to perform 3D measurement.
  • the surface pattern has a different force depending on the workpiece W, but the shape of the workpiece W and the position of the measurement target area based on the shape of the workpiece W are common to any workpiece W.
  • a measurement target area is set by using a certain thing.
  • the registered model image for search is converted to the homography matrix Hz. It may be converted into a shape that should be captured by the perspective camera CI, and the measurement target region 83 may be specified using the converted image. Conversely, the perspective image A1 may be converted into a front view image, and the measurement target region 83 matching the model may be specified on the converted image.
  • the procedure of FIG. 18 can also incorporate processing for detecting the printing state of characters in the display area S using the front-view image AO.
  • FIG. 20 shows a calibration method for performing the above conversion processing.
  • the calibration work 75 is placed on a plane with an arbitrary height parallel to the mounting surface of the work W, and the calibration work 75 is imaged from the cameras CO and C1 obliquely from above. Deploy.
  • a planar work having a configuration in which a plurality of circular patterns 76 are arranged at equal intervals on the upper surface is used as the calibration work 75.
  • a virtual camera C2 installed with the optical axis oriented in the vertical direction is assumed, and a virtual image obtained when the calibration work 75 is imaged by the camera C2 is assumed.
  • a homography matrix for converting the image AO generated by the camera CO into the image B0 by the virtual camera C2 is obtained.
  • the center coordinates of each circular pattern are obtained on the images AO and B0.
  • the front view height is expressed with reference to an arbitrary plane (for example, the mounting surface of the workpiece W) orthogonal to the optical axis direction of the camera C2.
  • the reference plane is generally a horizontal plane, but is not limited to this, and a plane or a vertical plane inclined with respect to the horizontal plane may be used as the reference plane.
  • the scale is determined by the conversion process using the image AO from the camera CO for the plane at the front view height equivalent to the calibration work 75.
  • a front view image can be generated.
  • a front view image can be obtained by the same conversion calculation.
  • the plane to be imaged is closer to the camera C2 than the calibration work 75, compared to the front view image when the plane at the same height as the calibration work 75 is converted, The image is converted into an enlarged front view image.
  • the imaging target plane is located farther from the calibration work 75 when viewed from the camera C2, the imaging target plane is reduced than when the imaging target plane is at the same frontal height as the calibration work 75. Converted to a front view image.
  • the computer as the force calculation processing unit 20 has a function for performing a conversion operation for converting a perspective image generated by the camera CO into a front-view image (conversion means). ) Is set.
  • Factors that determine the size of a front view image obtained by conversion include a virtual imaging magnification and a display magnification.
  • the front view conversion image for the setting work W corresponds to the setting image
  • the front view conversion image for the measurement target work W corresponds to the first image.
  • the virtual imaging magnification is the actual distance between two points on the workpiece W at the same front view height and the distance between the two points imaged on the virtual imaging plane of the virtual camera C2. It is expressed as the distance on the virtual imaging plane when the actual distance is 1.
  • the virtual imaging magnification varies depending on the front view height of the imaging target so that the imaging target becomes smaller as the imaging target moves away from the virtual camera C2.
  • the virtual imaging magnification can also be changed by adjusting the parameters for the front view conversion calculation, assuming that the focal length of the virtual camera C2 has been changed, but here the focal length of the virtual camera C2 Is fixed.
  • the display magnification is a ratio between the distance between two points on the virtual imaging plane and the distance between the two points displayed on the monitor.
  • the display magnification can be changed by performing operations to enlarge or reduce the image.
  • the display magnification does not affect the scale used for measurement, nor does it affect the ratio between the size of the scale figure, which will be described later, and the size of the displayed front view conversion image, so that the image can be easily observed on the display screen. Choose an appropriate value for. For example, if the display magnification of the front view conversion image is selected so that the size of the image of the work W does not change between the perspective image captured by the camera CO and the front view conversion image, one of these images will be displayed. It is easy to grasp the image content when the display content is switched from one to the other.
  • the virtual imaging magnification used at the time of calibration can be applied to the plane at the same front view height as the calibration work 75 as it is. If the front view height is specified, the corresponding virtual imaging magnification can be calculated. If the virtual imaging magnification is known, the dimensional measurement of the measurement target portion at the front view height can be correctly performed using the front view conversion image.
  • the front view height which is the premise for this dimension measurement and virtual imaging magnification, is called the scale reference height. That is, the scale reference height can be regarded as the front view height of the measurement target location that is assumed when the actual dimensions of the measurement target location are obtained from the dimensions in the front view conversion image.
  • scale information Information relating the dimensions in the front view conversion image and the actual dimensions of the measurement target portion is referred to as scale information.
  • the actual dimension corresponding to one pixel of the front view conversion image can be set as the scale information.
  • Scale reference height and scale information The information must be consistent with each other, and if one is changed, the other must be changed.
  • FIG. 22 shows a procedure of setting processing performed prior to the inspection.
  • the setting work W target object for setting
  • the captured perspective image is converted into a front view image.
  • the arithmetic processing unit 20 in which the conversion calculation program operates serves as a conversion means. The same applies to the conversion from a perspective image to a front view image in a later-described examination.
  • the front view conversion image obtained by the conversion process is used as a setting image.
  • scale reference height and scale information are set. Specifically, the user's input is accepted for the frontal view height of the measurement target part of the setting work, and the input value is used as the scale reference height. Further, the scale information is calculated from the scale reference height, and the scale reference height and the scale information are stored in the arithmetic processing unit 20.
  • the setting image is used to cause the user to make settings necessary for the measurement process.
  • Examples of specific setting contents are the same as those for the lead inspection, the character key inspection, and the workpiece height inspection when the camera CO is arranged in front view.
  • the force to perform what processing in any order at the time of measurement is set.
  • a dimension representing the height of the measurement target position with respect to the mounting surface of the workpiece W is input as the scale reference height.
  • the values of the front view height and scale reference height do not necessarily have to be expressed with reference to the mounting surface of the workpiece W inside the device. For example, they are expressed as Z coordinate values in the coordinate system of FIG. Moyore. Or, it can be expressed in any other coordinate system that can be coordinated with each other.
  • the scale reference height to be input by the user is a height that the user can naturally recognize as the height of the measurement target portion.
  • this step of ST53 is omitted, and instead, some predetermined value such as the height of the calibration work 75 in front view is used as the scale reference height. May be possible.
  • the value of the virtual imaging magnification is often small.
  • the scale error is relatively small even if the front view height of the measurement target location is different from the scale reference height. Therefore, when high-precision measurement of dimensions and area is not required, for example, when performing two-dimensional image processing for the purpose of determining the presence or absence of dirt, chipping detection in outlines, character type determination, etc. ⁇
  • the default value is used as the scale reference height without inputting the scale reference height each time depending on the difference in frontal height of the target part.
  • FIG. 23 shows an example of an inspection procedure executed after the above setting process is completed.
  • a workpiece (object to be measured) W is photographed by cameras CO and C1 in accordance with a detection signal from a workpiece detection sensor.
  • the first image is obtained by converting the perspective image captured by the camera CO into a front view image.
  • the position to be subjected to 3D measurement is specified on the first image. Examples of this position specifying method are the same as those described above for various inspections when the camera CO is in the front view arrangement.
  • a position corresponding to the position specified earlier on the first image is specified on the second image taken by camera C1.
  • ST65 three-dimensional coordinates are calculated using the specified position on the first image and the position on the second image.
  • 2D measurement is performed using the first image. Since the first image is a front-view conversion image, various two-dimensional image processing techniques that have been developed on the premise that the front-view image is the processing target can be applied.
  • the scale information set in the setting process of Fig.22 use the scale information set in the setting process of Fig.22. At this time, it functions as a two-dimensional image processing means for the arithmetic processing unit 20 on which the two-dimensional measurement program operates.
  • ST67 the process for determining the quality of the measurement results obtained in ST65, 66 is executed. After this, return to ST61 and wait for the next work W to come.
  • ST63 to ST66 in Fig. 23 can have various settings for the force S corresponding to the steps for measurement processing, and the processing contents and order of these steps. For example, multiple points And you can make 3D measurements. In that case, it is possible to specify multiple positions in each of ST63 and ST64, and calculate the 3D coordinates of multiple points in ST65, or specify the position and calculate 3D coordinates for one point. It is also possible to calculate 3D coordinates one place at a time by repeating the steps from ST63 to ST65 several times. Any number of 2D ST66 2D measurements can be set, and any time after ST62 may be set to execute 2D measurements.
  • FIG. 24 is another example of the inspection procedure.
  • the allowable range of the front view height is set by the user and stored in the arithmetic processing unit 20 in ST54 of FIG.
  • the permissible range for the height in front view is determined so that the scale reference height is included in the range.
  • the permissible range of the front view height is determined from the viewpoint that if the front view height of the measurement target location is within that range, the scale error of the front view conversion image will be within the expected range. Different from the criteria for W
  • Each of ST61 to ST67 has the same contents as the process of the same symbol in FIG.
  • the processing of ST71 is to determine whether or not the three-dimensional coordinates calculated in ST65 are within the allowable range set for the frontal view height force.
  • An arithmetic processing unit 20 in which a program for performing this determination operates serves as a determination means.
  • the process returns to ST61 through the notification process of ST72, and if within the allowable range, the process returns to ST61 without performing the notification process.
  • a notice is made that there is a difference larger than the expected level between the scale indicated by the scale information used in the two-dimensional measurement and the actual scale of the first image. For example, a display to that effect or a warning sound is generated.
  • a display indicating that an error caused by processing based on the first image having a scale error is included in the measurement value is added to the display of the result of the two-dimensional measurement. Motole.
  • FIG. 25 is still another example of the inspection procedure.
  • the processing contents of ST61 force ST65 and ST67 are the same as the processing of the same reference numerals in FIG.
  • the scale information of the first image is calculated using the front view height indicated by the three-dimensional coordinates obtained in ST65 as the scale reference height. Calculations that run programs that calculate this scale information
  • the processing unit 20 functions as a scale information calculation unit.
  • two-dimensional measurement is performed on the first image using the calculated scale information.
  • FIG. 26 is a modification of the procedure of the setting process shown in FIG. 22 so that the user can adjust the set value while confirming whether the scale reference height and the scale information are set properly. is there.
  • the work W for setting is shot with the camera CO in ST91.
  • ST92 the captured perspective image is converted into a front view image.
  • the obtained front view conversion image is used as a setting image.
  • the monitor 3 displays a setting window 90 (shown in FIG. 28) including the front-view converted image and the original image before conversion.
  • the front view height of the calibration work 75 input at the time of calibration is set as the initial value of the scale reference height.
  • the user is caused to perform an operation of changing the value of the scale reference height using the setting window 90, and the scale reference height and the scale information are changed according to the operation. This change operation is repeated until the user determines that the scale reference height is appropriate.
  • the process proceeds to ST95, and the user performs the settings necessary for the measurement process using the setting image, as in ST54 of FIG.
  • FIG. 27 shows the shooting situation of the setting work W by the camera CO during the above setting process (the camera C1 is also provided, but not shown).
  • the setting work W is assumed to be a non-defective product selected from the workpieces W to be measured.
  • the work W here has a cubic overall shape.
  • the symbol T is the upper surface of the workpiece W.
  • Figure 27 shows the virtual planes R0, Rl, R2, and R3.
  • R0 is a surface on which the workpiece W is placed, for example, the surface of a belt conveyor on which the workpiece W is placed.
  • the planes Rl, R2, and R3 are parallel to R0, and the height forces from R0 are 3 ⁇ 4il, h2, and h3 (hl ⁇ h2 ⁇ h3), respectively, and the height h2 of the plane R2 is the height of the upper surface T of the workpiece W. Match.
  • the calibration is performed by placing the calibration work 75 at the height of the plane R1, and the height hi of the plane R1 is set as the initial value of the scale reference height.
  • FIG. 28 shows the contents of the setting window 90 displayed on the monitor 3 in the imaging state of FIG.
  • the setting work W taken by the camera CO is displayed.
  • Image 91, Edit image 92, Scale reference height adjustment bar 93 and adjustment handle 94, Scale reference height value display section 95, Scale reference height confirmation button 96, Scale figure dimension input section 97, Scale A figure type selection section 98 is displayed.
  • a scale figure 99 is also displayed in addition to the front view converted image of the workpiece W.
  • the arithmetic processing unit 20 in which a program for creating the contents of the edited image 92 operates serves as an image editing means.
  • the upper surface T of the workpiece W is displayed in the force-edited image 92 displayed as a trapezoid, converted into an original square.
  • the initial value of the scale reference height is set to hi, which is the front view height of the calibration work 75, whereas the actual front view height of the upper surface T is h2, so it is converted and displayed.
  • the scale figure 99 is a figure showing the actual dimensions on the plane at the scale reference height on the display screen of the monitor 3 based on the virtual imaging magnification at the scale reference height.
  • the selection unit 98 can select any one of square, circle, and grid.
  • the dimension input to the dimension input unit 97 means the length of one side when the scale figure 99 is a square, the diameter when it is a circle, and the interval between grid lines when it is a grid.
  • the scale figure 99 can be moved to an arbitrary position in the edited image 92 by a drag operation so that the comparison with the front view conversion image of the workpiece W is smooth.
  • a figure that is easy to compare with the shape of the upper surface T of the workpiece W is selected as the scale image 99 (here, a square having the same shape as the upper surface T is selected), and the upper surface of the workpiece W is input to the dimension input unit 97.
  • the scale image 99 here, a square having the same shape as the upper surface T is selected
  • the actual height of the top surface T (measurement target location) of the workpiece W is the scale reference. If it is higher than the height (closer to the virtual camera C2), the size of the upper surface T recognized in contrast to the scale figure 99 is larger than the actual size, and vice versa.
  • the scale image 99 is selected for easy comparison with the shape of the work W observed on the monitor 3, and its dimensions are measured.
  • the workpiece W If the ratio between the size of the area to be measured and the size of the scale figure 99 in the face-to-face conversion image is correct, the scale reference height at that time is the front view of the area to be measured on the workpiece W (in this case, the top surface T). Match the height.
  • the initial value of the scale information is calculated from the initial value of the scale reference height, and then the scale figure 99 selected by the user is input to the dimension input unit 97.
  • a size corresponding to the initial size and scale information is displayed on the edited image 92, and the user adjusts the scale reference height. In each adjustment, the scale information is calculated from the adjusted scale reference height, and the size of the scale figure 99 is changed based on the calculation result.
  • the scale reference height can be adjusted by dragging the adjustment handle 94 along the adjustment bar 93.
  • the current adjustment reference height is displayed in the scale reference height numerical display 95.
  • the process proceeds from ST94 to ST95 in FIG. 26 by pressing the confirm button 96.
  • the scale information is also determined. In this way, the scale reference height and scale information are changed consistently.
  • An arithmetic processing unit 20 in which a program for performing this series of processing operates serves as an adjusting means.
  • FIG. 29 shows a change in the display content of the edited image 92 shown in FIG. 28 accompanying a change in the scale reference height.
  • the scale reference height is set to the initial value hi.
  • the upper surface T is assumed to be a square with a side of 100 mm, and a square with a side of 100 mm is displayed as the scale figure 99.
  • the scale figure 99 displayed is a square with a side of 100 mm at the scale reference height (in this case, height hi). This corresponds to the figure that should be displayed when the front view is converted. Since the actual top surface T is at the height of h2, it is displayed larger than the scale figure 99.
  • the user adjusts the scale reference height until the ratio of the measurement target location in the edited image and the scale image 99 is correct, thereby adjusting the scale reference height to the front of the measurement target location. It can be adjusted correctly to the visual height. As a result, scale information can also be set correctly.
  • the user can directly confirm by the display of the edited image 92 that the front view height of the measurement target portion of the setting work W and the scale reference height are approximately the same. it can. If the error in matching the height is small, the corresponding position can be found even if the corresponding position search range in the height direction on the second image is small. In addition, if the error about the coincidence of height is small, the error of the measurement result is small when two-dimensional measurement including dimension measurement and area measurement is performed using the first image.
  • the force of adjusting the scale reference height to the front view height of the measurement target portion while viewing the edited image 92 the user does not necessarily have the concept of the scale reference height. Therefore, it is not always necessary to indicate to the user that the adjustment target force is the S scale reference height. For example, it may appear to the user to adjust the scale of the front view conversion image, and the reference height may actually be adjusted. In practice, the scale adjustment processing of the scale of the front-view converted image may be performed, and the scale reference height corresponding to the scale adjustment result force may be calculated.
  • the scale figure 99 is adjusted so that the ratio of the size of the measurement target part to the size of the scale figure 99 in the front view conversion image of the workpiece W is correct. And enlarge or reduce one of the front-view converted images of work W, or enlarge or reduce both at different ratios, obtain scale information, scale information, and the corresponding scale reference height. You may calculate the length.
  • the method of obtaining the other from one of the scale reference height and the scale information is not limited to the case where the front-view image converted from the perspective image is the target of the two-dimensional measurement.
  • This method can also be applied to the case where a frontal image obtained by arranging the images so as to perform a frontal view is the target of two-dimensional measurement. In this case as well, the advantage of ease of setting can be obtained.
  • the scale information is compared by comparing the front view height indicated by the result of the three-dimensional measurement with the scale reference height. An assessment can be made as to whether the value is appropriate. In this way
  • 3D measurement contributes to verifying the accuracy of 2D measurement.
  • the scale reference height used when calculating the scale information from the scale reference height a value input by the user may be used, or a front view in which the apparatus itself actually measures the workpiece W is used. Height may be used.
  • the front view height may be measured using the first and second cameras using a three-dimensional measurement function, but a front view height measurement sensor is provided and measured using this sensor. You may do it.
  • a sensor for measuring the height of the frontal view various known sensors such as a laser displacement meter of a triangulation method based on projection of a laser beam and reception of reflected light and a probe contact type displacement meter are used. Can be used.
  • the first image which is a front view image obtained based on the image obtained by photographing the object by the first camera and the object photographed from a direction different from the direction photographed by the first camera.
  • An image processing apparatus that performs processing using a second image based on an image captured by a second camera disposed,
  • a setting means for allowing a user to set a measurement target position using a setting image that is a front-view image obtained based on an image obtained by photographing a setting object by a first camera;
  • Position specifying means for specifying a position on the object based on the setting with respect to the first image that is a front view image obtained based on an image obtained by photographing the object to be measured by the first camera
  • the position in the second image corresponding to the position specified in the first image is specified, and the three-dimensional coordinates are obtained using the specified position on the first image and the position on the second image.
  • Scale information that associates the dimensions in the front view image with the actual dimensions of the measurement target area and the scale reference height that is the front view height that matches the scale information are available.
  • two-dimensional image processing means for performing two-dimensional image processing on the first image using scale information
  • An image processing apparatus An image processing apparatus.
  • the image processing apparatus further comprising a determining unit that determines whether or not a front view height indicated by the three-dimensional coordinates calculated by the three-dimensional measuring unit is included in the allowable range.
  • (C) The image processing apparatus according to (A), further comprising scale information calculation means for calculating scale information using the height of the front view indicated by the three-dimensional coordinates calculated by the three-dimensional measurement means. .
  • (D) The image processing apparatus according to (A), further including an adjustment unit that consistently changes the scale reference height and the scale information based on an operation by a user.
  • (E) Shows the actual dimensions on the plane at the scale reference height for the first image.
  • the front view image used by the image processing apparatus of (A) may be an image taken with a front-view camera, or may be an image obtained by front-view conversion of an image taken with a perspective camera.
  • scale information and scale reference height that are consistent with each other can be used, 2D image processing using scale information is performed on an object to be measured, and 3D measurement is also performed. Is called. Therefore, when the difference between the front view height obtained by 3D measurement and the scale reference height is large, it can be seen that there is an error in the results of 2D image processing using scale information.
  • the scale information can be easily set.
  • the front view height for determining the scale information may be specified by the user or measured by the image processing apparatus itself.
  • the image processing apparatus of (D) when the scale reference height is adjusted so as to substantially match the actual front view height of the target portion of the three-dimensional measurement based on the operation by the user, The range in which the measurement target location may appear on the second image becomes smaller. Therefore, if the position corresponding to the position specified on the first image is specified for such a small range, the measurement target between the first image and the second image is determined. The possibility of incorrect position correspondence is reduced, and the time required for calculation for identifying the corresponding position is shortened. In addition, when the scale information is correctly adjusted based on user operations, the first image is displayed. On the other hand, when various 2D image processing with measurement of dimensions and area is applied, the error contained in the results is reduced.
  • the user when an edited image is displayed, the user performs an adjustment operation so that the relationship between the displayed scale figure and the image of the measurement target portion is correct. Can do.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Electromagnetism (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)

Abstract

 撮影された対象物が現れた画像上で3次元計測の対象箇所の特定をするための設定を、ユーザが容易に実行できるようにした画像処理装置であって、光軸を鉛直方向に向けて設置され、ワークWの正面視画像を生成する第1のカメラ(C0)と、光軸を斜め方向に向けて設置され、ワークWの斜視画像を生成する第2のカメラ(C1)とを含む撮像部(1)を有する。計測に先立つ設定時には、設定用の対象物を各カメラ(C0,C1)により撮影し、第1のカメラC0からの正面視画像を用いて、ユーザに計測対象位置を特定するための指定領域についての設定を行わせる。計測時には、設定に基づいて第1のカメラ(C0)からの正面視画像に指定領域を定め、この領域内において計測対象位置を特定する処理が行われる。さらに、第2のカメラ(C1)からの斜め画像について、正面視画像で特定された位置に対応する位置が特定され、3次元座標を算出する処理が行われる。

Description

明 細 書
3次元計測を行う画像処理装置および画像処理方法
技術分野
[0001] この発明は、対象物を互いに異なる方向から撮影するように配置された複数のカメ ラによってそれぞれ撮影された画像に基づいて 3次元計測を行う装置に関する。 この明細書でいう「計測」には、検查を目的とする計測を含む。すなわち、一般に、 検査の過程で何らかの計測が行われることを踏まえ、単に「計測」という場合には、最 終的な出力がたとえば検査の合否だけであって計測値が出力されない場合を含むも のとする。
背景技術
[0002] 従来より、対象物の形状や表面パターンについて、 2次元画像処理による計測を行 う装置が、種々の製品の製造現場において広く用いられている。これら 2次元の画像 処理装置では、対象物を代表する面(たとえば対象物の底面)または対象物の計測 対象面を対象に、その面に垂直な方向、すなわちその面を正面視する方向から撮影 した画像に基づき、計測を行うようにしている。
[0003] 一方、複数のカメラを用いた立体視の原理に基づく三次元計測の手法が知られて おり、たとえば特許文献 1には、そのような手法を用いたプリント回路基板の検查装置 が記載されている。しかし、従来の 3次元計測を行う装置は、対象物の種類や性質を 限定し、たとえばプリント回路基板検査が目的であればそれに専用化された装置とし て構成されており、種々の製品の製造現場に適用することができる汎用性と、 3次元 計測の専門知識がなくても使レ、こなせる操作性とを備えた装置としては実現されてい なかった。
[0004] 特許文献 1 :日本国公表特許公報 2003— 522347号
[0005] このような状況において、発明者らは、従来の 2次元画像処理装置と同様に汎用性 に富み、ユーザによる使レ、こなしが容易であるような、 3次元計測機能を備えた画像 処理装置を開発することにした。このような方針のもと、発明者らは、種々の形状の対 象物を計測対象として、撮影された対象物が表れた画像上で 3次元計測の対象箇所 の特定をするための設定をユーザが容易にできるようにすることを、課題として設定し た。
発明の開示
[0006] (1)上記の課題を解決するために、この明細書で提案する第 1の画像処理装置は、 第 1のカメラが対象物を撮影した画像に基づいて得られる正面視画像である第 1の画 像と、第 1のカメラが撮影する方向とは異なる方向から対象物を撮影するように配置さ れた第 2のカメラが撮影した画像に基づく第 2の画像とを用いた処理を行うもので、第 1のカメラが設定用の対象物を撮影した画像に基づいて得られた正面視画像である ところの設定用画像を用いて、ユーザに指定領域についての設定をさせる設定手段 と、第 1のカメラが計測対象の対象物を撮影した画像に基づいて得られた正面視画 像であるところの第 1の画像に対し、前記設定に基づいて指定領域を定め、当該指 定領域内において対象物上の位置を特定する位置特定手段と、第 1の画像におい て特定された前記位置に対応する、第 2の画像における位置を特定し、特定された 第 1の画像上の位置と第 2の画像上の位置とを用いて 3次元座標を算出する 3次元 計測手段とを、備えている。
[0007] ここで、第 1のカメラが対象物を正面視する方向から撮影するように配置されていて 、第 1のカメラが撮影した画像自体が正面視画像である場合には、第 1のカメラが計 測対象の対象物を撮影した画像をそのまま第 1の画像として用レ、てもよいし、さらに、 第 1のカメラが撮影した画像に対して、たとえば位置ずれ修正のための画像の移動の ような処理を施した画像を第 1の画像として用いてもよい。第 1のカメラが対象物を撮 影した画像が斜視画像である場合には、少なくともその斜視画像を正面視画像に変 換する処理を施した画像が第 1の画像として用いられる。
[0008] このような画像処理装置によれば、ユーザは、対象物上の位置を特定するための 指定領域の設定を正面視画像に対して行えばょレ、ので、 3次元計測の対象箇所を 特定するための設定を容易に行うことができる。
[0009] (2)上記の画像処理装置には、さらに、対象物を斜視する方向から撮影するように配 置されている第 1のカメラが撮影した斜視画像を正面視画像に変換する変換演算を 行う変換手段を備けてもよい。この場合の設定用画像は、第 1のカメラが設定用の対 象物を斜視する方向力 撮影した画像を変換手段が変換することにより得られたもの であり、第 1の画像は、第 1のカメラが計測対象の対象物を斜視する方向から撮影し た画像を変換手段が変換することにより得られたものである。
[0010] 上記の構成によれば、対象物に対して正面視の方向(たとえば対象物の鉛直上方
)にカメラを設置しない場合や設置することができない場合でも、正面視画像に対す る領域設定を行うことができる。
[0011] (3)さらに、上記の変換手段が設けられた画像処理装置の一実施態様では、変換さ れた正面視画像における寸法と計測対象箇所の実際の寸法とを関係付けるスケー ル情報と、スケール情報と整合する正面視高さであるスケール基準高さの値と、スケ ール基準高さを含むように定められた正面視高さの許容範囲の値とが利用可能とさ れる。さらに、第 1の画像を対象に、スケール情報を用いて 2次元画像処理を行う 2次 元画像処理手段と、 3次元計測手段により算出された前記 3次元座標が示す正面視 高さが前記許容範囲に含まれているかどうかを判定する判定手段とが、設けられる。
[0012] 上記の態様によれば、算出された 3次元座標が正面視高さの許容範囲になければ 、 2次元画像処理手段が利用するスケール情報が示すスケールと、第 1の画像の実 際のスケールとの間に、想定される程度よりも大きな差異があることがわかる。
[0013] (4)変換手段が設けられた画像処理装置の他の態様では、 3次元計測手段により算 出された前記 3次元座標が示す正面視高さを用いて、変換手段により変換された正 面視画像における寸法と計測対象箇所の実際の寸法とを関係付けるスケール情報 を算出するスケール情報算出手段と、第 1の画像を対象に、スケール情報を用いて 2 次元画像処理を行う 2次元画像処理手段とが、さらに設けられる。
[0014] 上記の態様によれば、正面視高さの実測値により算出されたスケール情報を用い て 2次元画像処理を行うので、対象物についてのより正確な計測を行うことができる。
[0015] (5)変換手段が設けられた画像処理装置の他の態様では、変換された正面視画像 における寸法と計測対象箇所の実際の寸法とを関係付けるスケール情報と、スケー ル情報と整合する正面視高さであるスケール基準高さの値とが利用可能とされており 、ユーザによる操作に基づきスケール基準高さおよびスケール情報を整合的に変更 する調整手段とが、さらに設けられる。 [0016] 上記の態様によれば、ユーザによる操作に基づき、スケール基準高さが 3次元計測 の対象箇所の実際の正面視高さにほぼ一致するように調整されると、第 2の画像上 において計測対象箇所が現れる可能性のある範囲が小さくなる。したがって、そのよ うな小さい範囲を対象として、第 1の画像上で特定された位置に対応する位置を特定 するようにすれば、第 1の画像、第 2の画像間での計測対象位置の対応付けを誤る 可能性が低くなり、対応位置を特定する演算に要する時間も短くなる。
また、ユーザによる操作に基づきスケール情報が正しく調整されると、第 1の画像に 対して寸法や面積の計測を伴う種々の 2次元画像処理を適用したときに、その結果 に含まれる誤差が少なくなる。
[0017] (6)上記(5)の態様の画像処理装置には、第 1の画像に対してスケール基準高さに ある平面上における実際の寸法を示すスケール図形をカ卩えた表示用の画像を編集 する画像編集手段を設けてもよい。この場合、編集された画像が表示されると、ユー ザは表示されたスケール図形と計測対象箇所の像との大きさの関係が正しくなるよう に調整操作を行うことができる。
[0018] (7)撮影された対象物が現れた画像上で 3次元計測の対象箇所を特定するための 設定をユーザが容易に実行できるようにする、という課題を解決する画像処理装置の 第 2の構成として、この明細書では、第 1のカメラが対象物を斜視する方向から撮影し た画像に基づいて得られる正面視画像である第 1の画像と、第 1のカメラが撮影する 方向とは異なる方向から対象物を撮影するように配置された第 2のカメラが撮影した 画像に基づく第 2の画像とを用いた処理を行う画像処理装置であって、対象物を斜 視する方向から撮影するように配置されている第 1のカメラが撮影した斜視画像を正 面視画像に変換する変換演算を行う変換手段と、第 1のカメラが設定用の対象物を 撮影した画像を前記変換手段が変換することにより得られた設定用画像を用いて、 ユーザに計測対象位置についての設定をさせる設定手段と、第 1のカメラが計測対 象の対象物を撮影した画像を前記変換手段が変換することにより得られた第 1の画 像上にぉレ、て、前記設定に基づレ、て対象物上の位置を特定する位置特定手段と、 第 1の画像において特定された前記位置に対応する、第 2の画像における位置を特 定し、特定された第 1の画像上の位置と第 2の画像上の位置とを用いて 3次元座標を 算出する 3次元計測手段とを備えた画像処理装置を、提案する。
[0019] このような画像処理装置によれば、カメラが撮影する画像が斜視画像であるにもか かわらず、ユーザは、対象物上の位置を特定するための設定を正面視画像に対して 行えばよいので、 3次元計測の対象箇所を特定するための設定を容易に行うことが できる。さらに、対象物に対して正面視の方向にカメラを設置しない場合や設置する ことができなレ、場合でも、設定を容易に行うことができる。
[0020] (8)上記第 2の構成の画像処理装置に力かる一態様では、変換手段により変換され た正面視画像における寸法と計測対象箇所の実際の寸法とを関係付けるスケール 情報と、スケール情報と整合する正面視高さであるスケール基準高さの値と、スケー ル基準高さを含むように定められた正面視高さの許容範囲の値とが利用可能とされ ており、第 1の画像を対象に、スケール情報を用いて 2次元画像処理を行う 2次元画 像処理手段と、 3次元計測手段により算出された前記 3次元座標が示す正面視高さ が前記許容範囲に含まれているかどうかを判定する判定手段とが、さらに設けられる
[0021] 上記の態様によれば、算出された 3次元座標が正面視高さの許容範囲になければ 、 2次元画像処理手段が利用するスケール情報が示すスケールと、第 1の画像の実 際のスケールとの間に、想定される程度よりも大きな差異があることがわかる。
[0022] (9)第 2の構成の画像処理装置の他の態様では、 3次元計測手段により算出された 3 次元座標が示す正面視高さを用いて、変換手段により変換された正面視画像におけ る寸法と計測対象箇所の実際の寸法とを関係付けるスケール情報を算出するスケー ル情報算出手段と、第 1の画像を対象に、スケール情報を用いて 2次元画像処理を 行う 2次元画像処理手段とが、さらに設けられる。
[0023] 上記の態様によれば、正面視高さの実測値により算出されたスケール情報を用い て 2次元画像処理を行うので、対象物についてのより正確な計測を行うことができる。
[0024] (10)第 2の構成の画像処理装置の他の態様では、変換手段により変換された正面 視画像における寸法と計測対象箇所の実際の寸法とを関係付けるスケール情報と、 スケール情報と整合する正面視高さであるスケール基準高さの値とが利用可能とさ れており、ユーザによる操作に基づきスケール基準高さおよびスケール情報を整合 的に変更する調整手段が、さらに設けられる。
[0025] 上記の態様においては、ユーザによる操作に基づき、スケール基準高さが 3次元計 測の対象箇所の実際の正面視高さにほぼ一致するように調整されると、第 2の画像 上において計測対象箇所が現れる可能性のある範囲が小さくなる。したがって、その ような小さい範囲を対象として、第 1の画像上で特定された位置に対応する位置を特 定するようにすれば、第 1の画像、第 2の画像間での計測対象位置の対応付けを誤 る可能性が低くなり、対応位置を特定する演算に要する時間も短くなる。
また、ユーザによる操作に基づきスケール情報が正しく調整されると、第 1の画像に 対して寸法や面積の計測を伴う種々の 2次元画像処理を適用したときに、その結果 に含まれる誤差が少なくなる。
[0026] (11)上記(10)の態様の画像処理装置には、第 1の画像に対してスケール基準高さ にある平面上における実際の寸法を示すスケール図形を加えた表示用の画像を編 集する画像編集手段を、さらに設けてもよい。このようにすれば、編集された画像が 表示されると、ユーザは表示されたスケール図形と計測対象箇所の像との大きさの関 係が正しくなるように調整操作を行うことができる。
[0027] (12)この明細書で提案する第 1の画像処理方法は、第 1のカメラが対象物を撮影し た画像に基づいて得られる正面視画像である第 1の画像と、第 1のカメラが撮影する 方向とは異なる方向から対象物を撮影するように配置された第 2のカメラが撮影した 画像に基づく第 2の画像とを用いた処理を行うものであって、第 1のカメラが設定用の 対象物を撮影した画像に基づいて得られた正面視画像であるところの設定用画像を 表示し、ユーザに当該設定用画像を用いて指定領域についての設定をさせる設定 ステップと、第 1のカメラが計測対象の対象物を撮影した画像に基づいて得られた正 面視画像であるところの第 1の画像に対し、前記設定に基づいて指定領域を定め、 当該指定領域内において対象物上の位置を特定する位置特定ステップと、第 1の画 像において特定された前記位置に対応する、第 2の画像における位置を特定し、特 定された第 1の画像上の位置と第 2の画像上の位置とを用いて 3次元座標を算出す る 3次元計測ステップとを備えてレ、る。
[0028] (13)この明細書で提案する第 2の画像処理方法は、対象物を斜視する方向から撮 影するように配置されている第 1のカメラが対象物を撮影した画像に基づいて得られ る正面視画像である第 1の画像と、第 1のカメラが撮影する方向とは異なる方向から 対象物を撮影するように配置された第 2のカメラが撮影した画像に基づく第 2の画像 とを用いた処理を行うもので、第 1のカメラが撮影した斜視画像を正面視画像に変換 する変換演算により、第 1のカメラが設定用の対象物を撮影した画像を設定用画像に 変換し、ユーザに当該設定用画像を用いて計測対象位置についての設定をさせる 設定ステップと、前記変換演算により、第 1のカメラが計測対象の対象物を撮影した 画像を第 1の画像に変換し、第 1の画像上において、前記設定に基づき対象物上の 位置を特定する位置特定ステップと、第 1の画像において特定された前記位置に対 応する、第 2の画像における位置を特定し、特定された第 1の画像上の位置と第 2の 画像上の位置とを用いて 3次元座標を算出する 3次元計測ステップとを備えている。
[0029] 上記第 1 ,第 2の画像処理方法によれば、ユーザは、撮影された対象物が表れた画 像上で 3次元計測の対象箇所を特定するための設定を容易に行うことができる。 図面の簡単な説明
[0030] [図 1]この発明が適用された検査装置の撮像部の構成を設置例ともに示す斜視図で ある。
[図 2]各カメラで撮像された画像の例を示す説明図である。
[図 3]検查装置のブロック図である。
[図 4]ICの検査に力、かる手順を示すフローチャートである。
[図 5]検出領域の設定例を示す説明図である。
[図 6]ティーチング処理の手順を示すフローチャートである。
[図 7]位置決め領域の設定例を示す説明図である。
[図 8]リード検査の詳細な手順を示すフローチャートである。
[図 9]検查時の正面視画像中のワークに対する位置決め領域および検出領域の関 係を示す説明図である。
[図 10]各画像間の対応点の関係を示す説明図である。
[図 11]サーチ領域の設定方法を示す説明図である。
[図 12]高さの範囲とサーチ領域との関係を示す説明図である。 [図 13]ワーク上の検査対象部位に対するモデル登録例を示す説明図である。
[図 14]文字キーの検査に力かる手順を示すフローチャートである、
[図 15]検査時の画像に対し、検査対象の領域およびサーチ領域を設定した例を示 す説明図である。
[図 16]円形の表示領域を有するワークにかかる正面視画像および斜視画像を示す 説明図である。
[図 17]良品ワークに対する表示領域および計測対象領域の指定結果を示す説明図 である。
[図 18]図 16のワークの高さ検查を行う場合の手順を示すフローチャートである。
[図 19]計測対象領域およびサーチ領域がワークの位置変化に追随する例を示す説 明図である。
[図 20]正面視用の仮想のカメラを設定する例を示した説明図である。
[図 21]斜視画像を正面視画像に変換するための方法を示す説明図である。
[図 22]検査に先立って行われる設定の手順を示すフローチャートである。
[図 23]正面視画像への変換処理を伴う検査の手順の一例を示すフローチャートであ る。
[図 24]正面視画像への変換処理を伴う検査の手順の一例を示すフローチャートであ る。
[図 25]正面視画像への変換処理を伴う検査の手順の一例を示すフローチャートであ る。
[図 26]スケール基準高さおよびスケール情報の変更を含む設定の手順を示すフロー チャートである。
[図 27]斜視カメラによるワークの撮影状況を示す説明図である。
[図 28]モニタに表示されるウィンドウの内容を示す説明図である。
[図 29]スケール基準高さの変更に伴う編集画像の表示内容の変化を示す説明図で ある。
発明を実施するための最良の形態
図 1は、この発明が適用された検査装置 (画像処理装置)の撮像部の構成を、その 設置例とともに示す。
この検査装置は、 3次元および 2次元の双方の計測処理機能を有するもので、工場 の検査ライン Lを搬送される検査対象物 W (以下、「ワーク W」という。)を、撮像部 1に より順に撮像して、種々の検查目的に応じた計測処理や判別処理を実行する。
撮像部 1は、筐体 15内に 2台のカメラ C0, C1を組み込んだ構成のもので、検查ラ イン Lの上方に設置される。一方のカメラ COは、その光軸を鉛直方向に向けた状態( ワーク Wに対して正面視の状態)で設置される。他方のカメラ C1は、カメラ COと視野 が重なるようにして、光軸を傾斜させた状態で設置される。カメラ COおよびカメラ C1 の視野の範囲を規定する撮像面は矩形であり、カメラ C1はカメラ COに対して、カメラ COの視野の範囲の横方向(図 2の画像 AOの X軸方向に対応する。 )に沿って並ぶよ うに配置されている。
[0032] 図 2は、各カメラ C0, C1により生成されたワーク Wの画像の例を示す。図中の AOが カメラ COからの画像であり、 A1がカメラ C1からの画像である。この図 2および後記す る図 5等のワーク Wの画像を例示する図では、各画像 AO, A1中のワークについても 、図 1と同様に Wを用いて示す。また、画像 AOの横方向(水平方向)を X軸方向、縦 方向(垂直方向)を y軸方向とする。
[0033] カメラ COは光軸を 方向に向けて設置されているので、画像 AOは、ワーク Wの 上面を正面から見た状態を示すものとなる。これに対し、カメラ C1は光軸を斜めに向 けて設置されているので、画像 A1には、斜めから見た状態のワーク Wが現れる。以 下では、カメラ COからの画像 AOを「正面視画像 AO」といい、カメラ C1からの画像 A1 を「斜視画像 Al」という。正面視画像 AOは「第 1の画像」、斜視画像 A1は「第 2の画 像」に相当する。この検查装置では、まず画像の歪みが小さい(ワーク Wの平面図に 近い)正面視画像 AOを用いて計測対象位置を特定し、つぎに斜視画像 A1上で、正 面視画像 AO上の計測対象位置に対応する位置を特定するようにしている。
[0034] 図 3は、検查装置の全体構成を示すブロック図である。この検查装置は、撮像部 1 のほか、本体部 2、モニタ 3、コンソール 4などにより構成される。本体部 2には、各カメ ラ CO, C1に対する画像入力部 10, 11、カメラ駆動部 12、演算処理部 20、出力部 2 8などが設けられる。 [0035] カメラ駆動部 12は、図示しないワーク検出用のセンサからの検知信号を受けて各力 メラ CO, C1を同時に駆動する。各カメラ CO, C1により生成された画像信号は、それ ぞれの画像入力部 10, 11に入力され、ディジタル変換される。これにより、カメラ毎に 計測処理用のディジタル画像(正面視画像 AOおよび斜視画像 A1)が生成される。
[0036] 演算処理部 20は、コンピュータにより構成されるもので、カメラ CO, C1の画像を用 いた計測処理を実行した後、その処理結果からワーク Wの適否を判定する。出力部 28は、計測処理や判定処理の結果を、 PLCなどの外部機器に出力するための出力 用インターフェースである。
[0037] 演算処理部 20には、画像 A0, A1を格納するための画像メモリ 21のほカ 画像処 理部 22、計測処理部 23、判定部 24、表示制御部 25、パラメータ算出部 26、パラメ ータ記憶部 27などが設けられる。画像メモリ 21およびパラメータ記憶部 27以外の各 部は、専用のプログラムにより演算処理部 20としてのコンピュータに設定された機能 である。画像メモリ 21やパラメータ記憶部 27は、このコンピュータのメモリ(RAMなど )に設定される。
図 3には示していないが、演算処理部 20には、検査に必要な情報 (検査領域の設 定条件やモデルの画像など)を登録するためのメモリも設けられる。この登録用メモリ への登録処理や、演算処理部 20の各処理部が実行する処理の設定または変更は、 適宜、コンソール 4の操作に応じて行うことができる。
[0038] 画像処理部 22は、 2値化、エッジ抽出、パターンマッチングなどにより、ワーク Wの 検査対象部位を特定する。計測処理部 23は、画像処理部 22により特定された検査 対象部位につき、位置や大きさなどを計測する処理を実行する。画像処理部 22およ び計測処理部 23は、 2次元計測および 3次元計測の処理を実行することができる。
[0039] 判定部 24は、計測処理部 23の計測結果を所定のしきい値と比較するなどして、ヮ ーク Wの良否を判定する。この計測結果や判定結果は出力部 28および表示制御部 25に出力される。
表示制御部 25は、モニタ 3の表示動作を制御するためのもので、画像入力部 10, 11で生成された正面視画像 A0,斜視画像 A1を一画面内に並列表示させることが できる。さらに、適宜、画像処理部 22、計測処理部 23、判定部 24の処理結果を受け 取って、画像とともに表示させることができる。
[0040] パラメータ記憶部 27には、 3次元計測のための演算に用いる各種係数が保存され る。これらの係数の値は、各カメラ CO, C1により構成されるステレオ座標系と実際の 空間における位置を表す空間座標系との関係 (各座標系の原点間の距離、空間座 標系に対するステレオ座標系の回転ずれ量など)に応じて変動する(以下、これらの 係数を「パラメータ」という。)。これらのパラメータは、検査に先立ち、画像処理部 22 およびパラメータ算出部 26により算出され、パラメータ記憶部 27に格納される。この パラメータを算出する処理では、複数の特徴点を有するキャリブレーション用ワークが 使用される。
さらに、パラメータ記憶部 27には、後記する演算式(1)のホモグラフィ行列を構成 するパラメータも登録される。
[0041] この検查装置は、ユーザーに複数種の検查メニューを提示して選択操作を受け付 けることにより、検査のアルゴリズムを組み立てることが可能である。また、検査対象の 部位に応じて、 2次元の計測処理による検査と 3次元の計測処理による検査とを、選 択して実行することができる。 2次元の計測処理による検査では、カメラ COからの正 面視画像 AOを対象として、パターンマッチング処理、 2値化処理、エッジ抽出処理な どを実行し、ワーク全体またはワーク中の検査対象部位を特定する。
[0042] さらに、この検査装置は、 3次元の計測処理による検査にも、カメラ COからの正面視 画像 AOを有効活用することにより、 3次元計測処理を高速化している。この点につい ては、後で詳細に説明する。
[0043] 図 4は、ワーク Wが ICである場合に実施される検査の手順を示すものである。この 手順は、ワーク検出用のセンサからの検知信号を受けて開始される。最初の ST1 (S Tは「ステップ」の略である。以下も同じ。)では、カメラ駆動部 12により、カメラ CO, C1 を同時に駆動して、正面視画像 AO,斜視画像 A1を生成する。
[0044] つぎの ST2では、 ICのパッケージ部分に印刷された文字を対象とした検查を実行 する。この検查では、正面視画像 AOのみを用いた 2次元の画像処理を実行する。た とえば、パターンマッチング処理により文字の印刷領域を抽出し、そのマッチング時 の相関度やマッチング位置から文字の印刷状態の適否を判別する。 [0045] つぎの ST3では、正面視画像 AOにおいて各リードの先端位置の座標がエッジ検 出の手法により求められ、次いで、斜視画像 A1において対応する各リードの先端位 置の座標がエッジ検出の手法により求められる。そして、両画像における各リードの 先端位置の座標から、各リードの先端の 3次元座標を求め、その算出値から各リード に浮きや曲がりなどの異常がないかどうかを判別する。
[0046] ST2, 3の検査が終了すると、 ST4では、各検査の結果を外部機器やモニタ 3に出 力する。さらに、ワーク検出用のセンサによりつぎの ICが検出されると、 ST1に戻り、 上記と同様の手順を実行する。
[0047] このように、 2台のカメラ CO, C1によりそれぞれワーク Wを 1回撮像することにより、 2 次元計測による検査と 3次元計測による検査とを連続で実行することができる。 2次元 の計測処理では正面視画像 AOを使用するから、文字の歪みのない画像を用いて精 度の良い計測処理を行うことが可能になる。
[0048] 3次元計測処理を行う際には、正面視画像 AOと斜視画像 A1との間で対応する計 測対象の点を特定し、特定された各点の座標を三角測量の原理に基づく演算式に あてはめることにより、 3次元座標を算出する。
[0049] 図 5は、正面視画像 AOにおける検出領域(ユーザによって設定される指定領域)お よび斜視画像 A1における検出領域の設定例を示す。画像の縦方向(正面視画像 A 0ではリードの配列に沿う方向となる。)¾ry方向とし、横方向(正面視画像 AOではリー ドの長さに沿う方向となる。)を X方向とする。正面視画像 AOには、リード 6毎に個別 の検出領域 7が設定され、検出領域 7毎に、リードの先端に該当するエッジ点が 1点 特定される。
[0050] すなわち、ここではカメラ CO、 C1が X方向に並んでいるので、視差は主に X方向に 発生する。そこで、検出領域 7内の画像を 2値化し、得られた 2値画像を y方向に沿つ て投影することによって、 X方向を横軸、投影された「明」画素数または「喑」画素数を 縦軸とするヒストグラムを作る。そして、ヒストグラムの値が急変する箇所の X座標をリー ド 6の先端の X座標とする。一方、リード 6の先端の y座標については、検出領域 7の y 方向の中点の y座標をあてる。このようにして求めた X座標および y座標で示される点 をエッジ点とよぶ。 [0051] ここでは検出領域 7内の画像を 2値化した力 これに限らず、検出領域 7内の画像 を濃淡画像のまま各画素の濃度を y方向に積分し、そのようにして得られた積分濃度 分布の値力 ½方向に沿って急変する箇所 (たとえばしきい値を横切る箇所)の X座標 を求めるようにしてもよい。
[0052] このように、エッジの位置は特定の一方向に沿って検出される。図 5の例では、 X方 向がエッジの検出方向である。ここでは、正面視画像 AOに検出領域 7を設定した後 に、その検出領域 7に対してエッジの検出方向を指定するようにしている。しかし、こ れに限らず、もともと固有のエッジの検出方向を備える検出領域 7を設定するようにし てもよいし、先に検出領域 7のエッジ検出方向を指定し、その後、正面視画像 AOに 検出領域 7を設定するようにしてもょレ、。
[0053] 斜視画像 A1でも、リード 6毎に検出領域 8が設定される。これらの検出領域 8は一 方の画像上の一点を他方の画像上の一点に変換するための演算式 (後記する(1) 式)に基づき、正面視画像 AOの各検出領域 7で特定されたエッジ点の座標およびュ 一ザ一により指定された高さ範囲(3次元計測の対象箇所の高さの取り得る範囲)を 用いて設定される。ここでいう高さは、ワーク Wの載置面を基準とした鉛直方向、すな わち正面視方向における高さであり、正面視高さともいう。高さの基準は、ワーク Wの 載置面に限らず、カメラ COの位置や、その他任意の位置に取ることが可能である。ュ 一ザにより指定される高さ範囲は、カメラ COの光軸に沿った 3次元計測の対象範囲 である。
[0054] 図 5では、ワーク Wの右側のリードに対する領域設定のみを示している力 S、左側のリ ードに対しても同様の設定が行われる(以下の図でも同様である。)。
[0055] 図 6は、 ICのリード検査のためのティーチング処理(設定処理)の手順を示す。この 手順は、図 4の IC検查を始める前に実行される。
この手順の最初のステップである ST11では、検查対象のワーク W (この例では IC) について、リード 6の長さやリード 6間のピッチなどを入力する。ここで入力されたデー タは、作業用のメモリに登録され、後記する ST15で使用される。
[0056] つぎの ST12では、撮像対象位置に設定用の対象物として良品のワークを設置し て、これをカメラ CO, C1により撮像する。なお、ティーチング処理では、カメラ COから の正面視画像 AOが生成されれば足りるが、ここでは、ティーチング処理時にも各カメ ラ CO, C1を同時駆動し、生成された 2枚の画像をモニタ 3に並べて表示するようにし ている。
[0057] つぎの ST13では、設定用画像としての正面視画像 AOを用いて位置決め領域の 指定操作を受け付ける。図 7はこの指定操作時の正面視画像 AOの表示例を示すも ので、図中の 9が位置決め領域である。
この位置決め領域 9は、一列に並んだリード 6のうちの一番端のリード(図示例では 最上端のリード 6aである。以下、これを「先頭リード 6a」という。)を抽出するのに用い られる。図 7の例では、先頭リード 6aのみが含まれるような正方形状の領域 9を設定し ている。位置決め領域 9は、ワーク Wが想定される程度に位置ずれしても、位置決め 領域 9の中に先頭リード 6aを撮像することができるように、その大きさが調整される。ま た、位置決め領域 9は、その下半分の範囲に先頭リード 6aが撮像されるように設定さ れる。これにより、位置決め領域 9の上半分の範囲にはリードが撮像されていないこと をもって、位置決め領域 9の下半分の範囲に撮像されているのが先頭リード 6aである と確認できる。
[0058] 図 6に戻って、位置決め領域 9が指定されると、つぎの ST14では、この位置決め領 域 9から先頭リード 6aを抽出する。この抽出処理では、たとえば、位置決め領域 9内 の画像を 2値化し、 2値化後の画像を y軸方向および X軸方向に沿って投影する方法 により、先頭リード 6aの先端の X座標および y座標を求める。または、位置決め領域 9 内のエッジやその濃度勾配方向を抽出することにより、リード 6aの輪郭線を抽出し、 さらにリード 6aの先端の X座標および y座標を求めるようにしてもよい。
[0059] ST15では、先頭リード 6aの先端の X座標、 y座標および ST11で入力されたデータ に基づき、各リード 6に検出領域 7を設定する。具体的には、 ST11で入力されたデ ータ、カメラ COのピクセル数、倍率などを用いて、画像上におけるリード 6の長さゃリ ード 6間のピッチを算出し、その算出値に基づき、各検出領域 7の大きさや領域間の 間隔を決定する。このようにして、先頭リード 6aの位置を基準に、このリード 6aを含む 各リード 6に対し検出領域 7を設定するために必要なデータ、すなわち設定条件を作 成する。 [0060] このような方法をとることができるのは、ワーク Wの検査対象部位の特性(各リードの 長さが等しい、リード間のピッチが等しいなど)がそのまま反映された正面視画像 AO を使用するからである。したがって、ユーザにより設定された位置決め領域 9におい て先端リード 6aが抽出できれば、他のリード 6を抽出しなくとも、全てのリード 6に検出 領域 7を設定することが可能になり、処理効率を大幅に向上することができる。
[0061] ST16では、 ST13で指定された位置決め領域 9の設定条件 (領域の位置および大 きさ)と、 ST15で設定された検出領域 7の設定条件を登録用メモリに登録する。さら に、 ST17では、位置決め領域 9内の画像をモデルとして登録用メモリに登録する。こ れにより一連のティーチング処理は終了となる。
[0062] ST11から ST17までの一連の処理は、第 1のカメラが設定用の対象物を撮影した 画像に基づいて得られた正面視画像であるところの設定用画像を用いて、ユーザに 指定領域についての設定をさせること(より一般的にいうと、ユーザに計測対象位置 についての設定をさせること)に相当する。また、ティーチング処理用のプログラムが 動作する演算処理部 20が、この一連の処理を実行する設定手段として働く。
[0063] なお、 ST16を実行する前には、作成された設定条件によって設定される検出領域
7を正面視画像 AOに重ねて示す画像をモニタ 3に表示し、ユーザーの確認操作に 応じて登録を行うのが望ましい。また、この際に、検出領域 7の位置や大きさを微調整 できるようにしてもよい。
[0064] 図 8は、 ICのリード検査(図 4の ST3)に力かる詳細な手順を示す。
この手順の ST21から ST24までの処理は、計測対象の対象物を撮影した画像で ある正面視画像 AOに対して行われるものである。まず、 ST21では、ティーチングで 登録された設定条件に基づき、正面視画像 AOに位置決め領域 9を設定する。つぎ の ST22では、この位置決め領域 9内の画像とティーチング処理の ST17において登 録したモデルとを照合して、モデルに対するずれ量を抽出する(この処理には、たと えばパターンマッチングの手法を応用することができる。 )。
[0065] ST23では、ティーチング時に登録した検出領域 7の設定条件を ST22で抽出され たずれ量に基づき調整し、その調整後の設定条件により指定領域として各リードの検 出領域 7を設定する。正面視画像 AOによれば、画像上のワーク Wの歪みを考慮しな くてよいから、位置決め領域 9のずれ量をそのまま各検出領域 7に適用することがで き、各リード 6に対し、ティーチング処理時と同様の位置関係をもって検出領域 7を設 定することが可能になる。
[0066] 図 9は、検查時の正面視画像 AOの一例を示す。この例でのワーク Wは、図 7に示し たティーチング時の画像 AOより右側にずれているため、リード 6の先端が位置決め領 域 9からはみ出した状態になっている。しかし、検出領域 7については、上記した調整 処理が行われるため、いずれのリード 6にも図 4に示したのと同様の条件で検出領域 7が設定されている。
この例では、位置ずれしたワーク Wに合わせて検出領域 7の画像内での位置(画像 の枠に対する位置)を調整したが、これに代えて、ワーク Wに位置ずれがあってもヮ ーク Wが常に画像の枠に対して一定の位置関係になるように画像の内容全体を移動 させ、検出領域 7は常に画像の枠に対して一定の位置に設定するようにしてもよい。
[0067] このようにしてリード毎に検出領域 7が設定されると、つぎの ST24では、各検出領 域 7毎に、リードの先端の X, y座標を取得する。
ST21から ST24までの一連の処理は、第 1のカメラが計測対象の対象物を撮影し た画像に基づいて得られた正面視画像であるところの第 1の画像に対し、設定に基 づいて指定領域を定め、当該指定領域内において対象物上の位置を特定すること( より一般的にいうと、設定に基づいて対象物上の位置を特定すること)に相当する。ま た、リード検査処理のための手順を実行するように組み合わせられたプログラムが動 作する演算処理部 20が、この一連の処理を実行する位置特定手段として働く。
[0068] つぎの ST25では、斜視画像 A1上に、各リードの先端位置を検出するための検出 領域 8を設定する。さらに ST26では、設定された検出領域 8において ST24と同様 の処理を実行し、リードの先端の x, y座標を算出する。この、検出領域 8を設定し、 X , y座標を算出する処理は、第 1の画像において特定された位置に対応する、第 2の 画像における位置を特定することに相当する。
[0069] この後、 ST27では、各先端につき、それぞれ ST24, 26で算出された座標を用い て 3次元座標を算出する。この処理は、特定された第 1の画像上の位置と第 2の画像 上の位置とを用いて 3次元座標を算出することに相当する。第 2の画像における位置 を特定し、 3次元座標を算出するための手順を実行するように組み合わせられたプロ グラムが動作する演算処理部 20が、この一連の処理を実行する 3次元計測手段とし て働く。
さらに、 ST28では、算出された 3次元座標をあらかじめ登録された基準値と比較す るなどして、各リード先端部の良否を判別する。たとえば、いずれかのリードの先端部 に浮きがあれば、その先端部の高さを表す Z座標が基準値を超える値となり、そのリ ードは不良であると判定されることになる。
[0070] つぎに、 ST25での検出領域 8の設定について、詳細に説明する。
図 10は、空間内の任意の高さ位置にある平面 D上の一点 Pがカメラ CO, C1の撮像 面 F0, F1上の点 ρθ, piにそれぞれ結像した状態を示している。図 10において、 X, Υ, Zは 3次元空間を表す座標軸であり、平面 Dは、 XY平面に平行である。また撮像 面 F0には、 xO, yOの軸による 2次元座標系力 撮像面 F1には、 xl , ylの軸による 2 次元座標系が、それぞれ設定されている。図 10では、たまたま、両撮像面の原点に 結像される平面 D上の点が Pとされている力 S、これに限らず、点 Pの位置は平面 D上 で任 である。
[0071] 撮像面 F0における点 Pの結像位置(点 ρθ)の座標を (X , y )、撮像面 F1にお
camO camO
ける点 Pの結像位置(点 p )の座標を (X , y )とすると、点 , p間の関係は、つ
1 cam caml 0 1
ぎの(1)式のようになる。
[0072] [数 1]
Figure imgf000019_0001
なお、(1)式において、 HZは、高さ Zの平面 D上の点について、撮像面 F0上の結 像位置と撮像面 F1上の結像位置との関係を表す 3 X 3のホモグラフィ行列であり、 λ は定数である。行列 ΗΖは、あらかじめ平面 D上の既知の座標を用いたキヤリブレー シヨンにより求めることができる(キャリブレーションの詳細については、下記の非特許 文献 1を参照されたい。)。 非特許文献 1 :見巿 伸裕,和田 俊和,松山 隆司 「プロジェクタ 'カメラシステムの キャリブレーションに関する研究(Calibration of Projector-Camera System)」、 [平成 17年 6月 1日検索]、インターネットく URL : http:〃 vision.kuee.Kyoto-u.ac.jp/Resea rch/Thesis/Thesis_PDF/Miichi_2002_P_147.pdf>
[0075] よって、正面視画像 A0の各検出領域 7で抽出されたリードのエッジ点を点 pと考え て、その座標を(1)式の , y )に代入した場合、算出された (X , y )は camO camO caml caml
、斜視画像 Alにおけるリード先端の位置に相当すると考えることができる。しかし、リ ード先端の高さが変動すると考えると、平面 Dの高さ Zもそれに応じて変動し、それに 応じてホモグラフィー行列 HZが変化し、(X , y )の値も変化することになる。
caml caml
[0076] ST25では、この原理に基づき、想定される高さ範囲(カメラ C0の光軸に沿った 3次 元計測の対象範囲)の上限値を平面 Dの高さ Zとしたときと、下限値を高さ Zとしたとき とについて、それぞれその高さ Zに応じたホモグラフィー行列 HZを用いて(1)式を実 行することにより、(X , y )として図 11に示す 2点 e, fの座標を得る。そして、斜 caml caml
視画像 Alにおいて、図 11に示すように、線分 efを正面視画像 A0側の検出領域 7の 半値幅 kだけ線分 efと垂直方向の各側に平行移動させた線分 ghおよび線分 g ' h'を 設定し、これら 4点を結ぶ矩形領域 ghh' g'を検出領域 8とする。
[0077] 図 12は、図 5と同様の斜視画像 A1について、リード 6の取り得る高さ範囲を 0〜5m mとした場合と、高さ範囲を一 15〜15mmとした場合とでの検出領域 8の大きさを対比 させて示したものである。この例から明らかなように、検出領域 8は、高さ範囲の変動 幅力 M、さレ、ほど小さくなる。図 12では簡略化して各検出領域 8を互いに平行に描い ているが、実際には、斜視画像 A1には遠近法の効果によって矩形の対象物が台形 に撮像されるような歪みが生じるため、各検出領域 8は、それらの中心線 (線分 ef)同 士の間隔が図の右方ほど大きくなるような非平行の配置となる。各検出領域 8におい て、エッジ先端位置を求めるための 2値化画像の投影は、検出領域 8の中心線と垂 直な方向に行う。
[0078] 上記の検査装置では、基準画像 A0においてリードの先端位置を特定するために、 各リード 6に対応する検出領域 7を設定したが、これに代えて、各リードの先端を含む ように y軸方向に長レ、 1つの検出領域を設定し、この領域内で各リードの先端位置を 個別に求めるようにしてもよい。
[0079] つぎに、押釦式の文字キーが配設されたワーク(リモコン、電話機など)を検査対象 として、各キーの高さを検査する場合について、説明する。この検査では、検査の準 備段階でモデル画像を登録し、正面視画像 AOおよび斜視画像 A1におレ、てこのモ デル画像と一致する領域を探索する手法が用レ、られる。
[0080] 検査の準備段階では、図 13に示すように、設定用の対象物である良品のワーク W を撮像して得られた正面視画像 AOを用いて、各キー 60毎に、そのキー 60に描かれ た文字を含む領域 70を指定し、その領域 70内の画像をモデルとして登録しておく。 この処理は、第 1のカメラが設定用の対象物を撮影した画像に基づいて得られた正 面視画像であるところの設定用画像を用いて、ユーザに計測対象位置についての設 定をさせることに相当する。すなわち、ここではモデル画像を登録しているだけで、計 測対象位置を直接指定してレ、るわけではないが、検查時にはモデル画像に一致す る領域が計測対象領域とされるので、モデル画像を登録することにより間接的に計測 対象位置についての設定をしていることになる。図示は省略するが、検査時のワーク Wの想定される位置ずれ量を考慮して、検査時にモデル画像と一致する領域を探索 すべき領域を指定させるようにしてもょレ、。この探索すべき領域は指定領域に相当す る。
[0081] 図 14は、検査の手順を示す。まず ST31において、各カメラ CO, C1を同時駆動し て画像を生成する。つぎの ST32では、正面視画像 AOについて、検査前に登録され たモデルを用いたパターンマッチング処理を実行し、モデルと最もよく一致する領域 を特定して計測対象領域とする。計測対象領域の探索は、指定領域が設定されてい る場合には指定領域内においてのみ行う。計測対象領域の特定処理は各キー 60に 対応するモデル毎に行われるが、ここでは説明を簡単にするため、一つのモデルに 限定して説明する。
[0082] 計測対象領域が特定されると、つぎの ST33では、この領域の代表点(たとえば領 域の中心点)の座標を特定する。これは、設定用画像を用いて行われた設定に基づ レ、て対象物上の位置を特定することに相当する。代表点は複数特定することもできる (たとえば、あらかじめ定めたモデル上の複数の特徴点に対応する点)。 ST34では、代表点の座標に基づき、斜視画像 A1上にサーチ領域を設定する。こ の場合にも、前述のリード検査で検出領域 8を設定した場合と同様に、あらかじめ指 定された高さ範囲の上限値および下限値を高さ Zとしてホモグラフィー行列 HZを設 定し、代表点の座標と高さ範囲の上限値および下限値を用いて 2回の演算を実行す ることにより、画像 A1上で代表点の存在し得る範囲を求め、その範囲にモデルの大 きさを加味した領域をサーチ領域としてレ、る。
[0083] ST35では、サーチ領域において、モデルとの間のパターンマッチング処理を実行 して、計測対象領域とその領域内の代表点の位置とを特定する。さらに ST36では、 正面視、斜視の各画像 AO, A1における計測対象領域の代表点の座標を用いて 3 次元座標を算出する。ついで、 ST37では、算出された 3次元座標のうちの Z座標を 所定のしきい値と比較することにより、キーの高さの適否を判別する。そして、 ST38 において、判別結果を出力し、処理を終了する。
[0084] 基準画像 AO上で、モデルに定めた特徴点に対応する点を代表点として特定した 場合には、 ST36においても、同様に、モデル上の対応点を特定することができる。 また、 ST35では、指定された高さ範囲内の所定高さ(たとえばワークが正常であると きの標準となる高さ)に対応するホモグラフィ行列を用いてモデルを斜視カメラ C1に 撮像されるはずの形状に変換し、その変換後のモデルを用いて計測対象領域を特 定するようにしてもよレ、。逆に、斜視画像 A1を正面視画像に変換し、変換された画像 上でモデルに一致する領域を特定するようにしてもょレ、。
[0085] 図 15は、上記の検査において、正面視画像 AO上でキー 60に関して特定された計 測対象領域 71、この領域 71の位置と大きさに基づいて設定された斜視画像 A1側の サーチ領域 80、およびサーチ領域 80において特定された計測対象領域 81を示す
[0086] 図 14に示した手順では、 3次元計測処理による検查のみを行っている力 この検查 でも、正面視画像 AOを用いた 2次元計測処理により、各キーの文字の印刷状態など の検查を行うことができる。
[0087] つぎに、中央部に円形状の表示領域を有するワークについて、その表示領域内の 高さの適否を検査する場合について説明する。この検査では、撮影の都度、正面視 画像 AOの一部をモデル画像として抽出し、斜視画像 Alにおいてモデル画像と一致 する部分を探索する手法が用いられる。
図 16は、各カメラ CO, C1により生成されたワーク Wの画像 AO, Alを示す。図中、 Sが検查対象である文字の表示(印刷)領域である。正面視画像 AOでは、ワーク Wの 正面像が現れているため、表示領域 Sの輪郭線 72も円形状になっている。これに対 し、斜視画像 A1では、表示領域 Sの輪郭線 72の形状、表示領域 S内の文字の配置 状態などが歪んでいる。
[0088] この検査に先立ち、設定用の対象物であるワーク Wの良品モデルを撮像し、得られ た正面視画像 AO上で、ユーザーに表示領域 Sの半径や計測対象領域を指定させる 。このとき、画像処理部 22では、正面視画像 AOから表示領域 Sの中心点の位置を求 める処理を実行し、この中心点に対する計測対象領域の相対位置を登録用メモリに 登録する。この処理は、第 1のカメラが設定用の対象物を撮影した画像に基づいて得 られた正面視画像であるところの設定用画像を用いて、ユーザに計測対象位置につ いての設定をさせることに相当する。
[0089] 図 17は、正面視画像 AO中の表示領域 Sを拡大して示す。図中、 73がユーザーに より指定された計測対象領域であり、 74が表示領域 Sの中心点である。この中心点 7 4の位置は、正面視画像 AOから円形パターンを抽出する処理を実行し、その抽出結 果の中からユーザーにより指定された大きさの円(位置修正用モデル)に最もよく合 致する輪郭線 72を特定して、求めたものである。
[0090] 図 18は、図 16のワーク Wに対する高さ検査の手順を示す。
ST41では、各カメラ CO, C1を同時駆動して、正面視画像 AOおよび斜視画像 A1 を生成する。 ST42では、正面視画像 AOから上記の処理により、表示領域 Sの中心 点 74の位置を求める。
[0091] つぎの ST43では、 ST42で求められた中心点 74の座標を基準に、あらかじめ登録 された相対位置に基づき計測対象領域 73を設定する。そして、続く ST44において、 計測対象領域 73の画像をサーチ用のモデル画像として登録し、さらに計測対象領 域 73の代表点位置 (たとえば、領域内の中心点位置)も登録する。これは、設定用画 像を用いて行われた設定に基づいて対象物上の位置を特定することに相当する。 [0092] ST45では、斜視画像 Al上にサーチ領域 82 (図 19に示す。)を設定する。サーチ 領域 82の位置や大きさは、 ST44で登録された代表点の座標を(1)式に代入し、あ らカじめ指定された高さ範囲の上限値および下限値に応じたホモグラフィー行列 HZ を用いて(1)式を実行することにより決定する。
[0093] ST46では、 ST44で登録したモデル画像を用いて、サーチ領域 82において相関 マッチング処理を実行する。そして、登録した画像に最も類似する領域を特定し、こ れを斜視画像 A1側の計測対象領域とする。 ST47では、斜視画像 A1側の計測対 象領域について、代表点の座標を求め、この座標と正面視画像 AO側の代表点の座 標とを用いて 3次元座標を算出する。続く ST48では、求められた Z座標の適否を判 定する。そして、 ST49においての判定結果を出力し、しかる後に処理を終了する。
[0094] 図 19 (1) (2)は、それぞれ 1組の正面視画像 AOと斜視画像 A1について、正面視 画像 AOにおける計測対象領域 73、斜視画像 A1におけるサーチ領域 82および計 測対象領域 83を示す。また、正面視画像 AOにおいては、表示領域 Sの輪郭線 72を 太線にして示すとともに、表示領域 Sの中心点 74の求められた位置を示してある。図 19の(1)の画像と(2)の画像とでは、ワーク Wの位置が異なる力 どちらの場合も計 測対象領域 73は、その中に目標とする文字が収まるように正しく設定されてレ、る。
[0095] 上記図 18に示した検査の手順によれば、中心点 74の抽出処理や領域 73の位置 調整処理は、正面視画像 AOを用いて行われるので、画像の歪みを考慮する必要が なぐ中心点 74に対する相対位置関係により計測対象領域 73を適切な位置に設定 すること力 Sできる。図 19の例でも、 (1)の例の画像と(2)の例の画像とでは、ワーク W の位置が異なるが、計測対象領域 73は同じ条件で設定されてレ、る。
さらに、図 18に示した検査の手順によれば、検查対象のワーク Wごとにそのワーク Wからサーチ用のモデル画像を取得するので、 3次元計測の対象とする文字などの 表面パターンがワーク Wごとに異なる場合でも、同一の手順を適用して 3次元計測を 行うことができる。ここでは、表面パターンはワーク Wごとに異なる力、もしれなレ、が、ヮ ーク Wの形状とワーク Wの形状を基準とした計測対象領域の位置はどのワーク Wに おいても共通であることを利用して計測対象領域を設定している。
[0096] 図 18の手順においても、登録したサーチ用のモデル画像をホモグラフィ行列 Hzを 用いて斜視カメラ CIに撮像されるはずの形状に変換し、変換後の画像を用いて計 測対象領域 83を特定するようにしてもよい。逆に、斜視画像 A1を正面視画像に変換 し、変換された画像上でモデルに一致する計測対象領域領域 83を特定するようにし てもよい。
さらに、図 18の手順にも、正面視画像 AOを用いて表示領域 S内の文字の印刷状 態を検查する処理を組み込むことができる。
[0097] ところで、上記した検查装置では、正面視画像の生成のために、一方のカメラ COを 光軸を鉛直方向にして設置した力 このカメラ COの光軸が斜めに設定されている場 合でも、カメラ COで生成された画像を変換することによって、正面視画像を生成する こと力 Sできる。
[0098] 図 20は、上記の変換処理を行うためのキャリブレーション方法を示す。この方法で は、ワーク Wの戴置面に平行な任意高さの平面上にキャリブレーションワーク 75を設 置し、カメラ CO, C1を、それぞれ斜め上方からキャリブレーションワーク 75を撮像す るように配置する。
この例では、キャリブレーションワーク 75として、上面に複数の円形のパターン 76を 等間隔に配置した構成の平面状のワークを使用している。
[0099] キャリブレーション処理では、光軸を鉛直方向に向けて設置された仮想のカメラ C2 を想定し、このカメラ C2によりキャリブレーションワーク 75を撮像した場合に得られる 仮想の画像を想定する。そして、図 21に示すように、カメラ COにより生成された画像 AOを仮想のカメラ C2による画像 B0に変換するためのホモグラフィー行列を求める。 そのために、まず、画像 AOおよび B0上で各円形パターンの中心座標を求める。画 像 AOについては、実際の画像から楕円状に歪んでいる円形パターンの中心の座標 (重心座標など)を求める。画像 B0については、仮想カメラ C2に任意の撮像倍率を 設定し、キャリブレーションワーク 75上の円形パターンの実際の間隔を、仮想カメラ C 2に設定した倍率を用いて画像上の間隔 dに変換することにより、画像上の円形パタ ーンの中心の座標を算出する。そして各円形パターンの配列順序に基づき、画像 A 0、 BO間で対応する円の中心位置の組み合わせを特定し、これらの円の中心の座標 を用いた最小自乗法により、ホモグラフィー行列を求めることができる。 [0100] 図 20のカメラ配置によれば、ワーク Wに対して正面視を行う仮想のカメラ C2の光軸 方向における撮像対象箇所の高さが「正面視高さ」となる。正面視高さは、カメラ C2 の光軸方向に直交する任意の平面(たとえばワーク Wの戴置面)を基準に表される。 この基準の平面は、一般に水平面であるが、これに限らず、水平面に対して傾きを持 つ面や垂直面を基準面としてもよい。
[0101] 上記のキャリブレーション処理によりホモグラフィー行列が定まると、キヤリブレーショ ンワーク 75と同等の正面視高さにある平面について、カメラ COからの画像 AOを用い た変換処理によって、スケールが判明している正面視画像を生成することができる。
[0102] もっとも、キャリブレーションワーク 75と平行であるが正面視高さがキヤリブレーショ ンワーク 75とは異なる平面を撮像対象とする場合にも、同じ変換演算によって正面 視画像を得ることができる。ただし、キャリブレーションワーク 75と同じ正面視高さにあ る平面が変換されたときの正面視画像と比べると、撮像対象平面がキヤリブレーショ ンワーク 75よりもカメラ C2の近くに位置する場合には、拡大された正面視画像に変 換される。また、カメラ C2から見て、撮像対象平面の方がキャリブレーションワーク 75 よりも遠くに位置する場合には、撮像対象平面がキャリブレーションワーク 75と同じ正 面視高さにある場合よりも縮小された正面視画像に変換される。
[0103] したがって、撮像対象平面の正面視高さがわかっていれば、正面視画像に変換し たときの画像の拡大縮小の程度は計算で求めることができる。したがって、正面視高 さがわかってレ、る撮像対象平面にっレ、ては、変換された正面視画像上で寸法計測 をすることが可能である。
[0104] 以下、図 20のようにカメラ CO, C1をともに斜視配置とした検査装置について説明 する。全体のブロック構成は図 3に示したものと同じである力 演算処理部 20としての コンピュータには、カメラ COにより生成された斜視画像を正面視画像に変換する変 換演算を行う機能 (変換手段)が設定される。変換により得られた正面視画像 (以下、 正面視変換画像という。 )がモニタ 3の画面上に表示されるときの大きさを決める要因 には、仮想結像倍率と表示倍率とがある。また、設定用のワーク Wについての正面視 変換画像は設定用画像に相当し、計測対象のワーク Wについての正面視変換画像 は第 1の画像に相当する。 [0105] 仮想結像倍率は、同一の正面視高さにあるワーク W上の 2点間の実際の距離と仮 想のカメラ C2の仮想結像面に結像された当該 2点間の距離との比率であり、実際の 距離を 1としたときの仮想結像面上の距離で表す。仮想結像倍率は、撮像対象が仮 想カメラ C2から遠ざかると小さくなるというように、撮像対象の正面視高さによって変 化する。
仮想結像倍率は、仮想カメラ C2の焦点距離が変更されたと仮定して、正面視変換 演算のパラメータを調整することによつても変更可能であるが、ここでは、仮想カメラ C 2の焦点距離は固定であるとする。
[0106] 表示倍率は、仮想結像面上の 2点間の距離とモニタに表示された当該 2点間の距 離との比率である。表示倍率は画像を拡大または縮小する演算を行うことにより変更 すること力 Sできる。表示倍率は、計測に用いるスケールに影響せず、後述するスケー ル図形の大きさと表示される正面視変換画像の大きさとの比率にも影響しないので、 画像が表示画面上で観察しやすくなるように適当な値に選べばよい。たとえば、カメ ラ COで撮影された斜視画像と正面視変換画像との間でワーク Wの像の大きさがあま り変化しないように正面視変換画像の表示倍率を選択すると、これらの画像の一方か ら他方へ表示内容を切り替えたときに画像内容を把握しやすい。
[0107] 上述のとおり、キャリブレーションワーク 75と同じ正面視高さにある平面については キャリブレーションのときに用いた仮想結像倍率をそのまま適用することができる。 正面視高さを指定すれば、それに対応する仮想結像倍率を計算で求めることがで きる。仮想結像倍率がわかれば、その正面視高さにある計測対象箇所についての寸 法計測を、正面視変換画像を用いて正しく行うことができる。
この寸法計測および仮想結像倍率の前提となる正面視高さをスケール基準高さと よぶ。すなわち、スケール基準高さとは、正面視変換画像における寸法から計測対 象箇所の実際の寸法を求めるときに前提とされる計測対象箇所の正面視高さである とレ、うことができる。
[0108] また、正面視変換画像における寸法と計測対象箇所の実際の寸法とを関係付ける 情報をスケール情報とよぶ。たとえば、正面視変換画像の 1ピクセルに対応する実際 の寸法を、スケール情報として設定することができる。スケール基準高さとスケール情 報とは互いに整合していなければならず、一方を変更すれば他方も変更されなけれ ばならない関係にある。
[0109] 図 22は、検査に先立って行われる設定処理の手順を示す。まず、 ST51において 、カメラ COで設定用のワーク W (設定用の対象物)を撮影する。つぎに、 ST52では、 撮影された斜視画像を正面視画像に変換する。この変換演算用のプログラムが動作 する演算処理部 20が変換手段として働く。後述の検查における斜視画像から正面 視画像への変換にっレ、ても同様である。
変換処理により得られた正面視変換画像は設定用画像として利用される。
[0110] ST53では、スケール基準高さおよびスケール情報を設定する。具体的には、設定 用ワークの計測対象部位の正面視高さについて、ユーザの入力を受け付け、入力さ れた値をスケール基準高さとする。さらに、スケール基準高さからスケール情報を算 出し、スケール基準高さおよびスケール情報を演算処理部 20に記憶する。
[0111] ST54では、設定用画像を用いてユーザに計測処理に必要な設定をさせる。具体 的な設定内容の例は、先にカメラ COが正面視配置の場合のリード検査、文字キーの 検査、ワークの高さ検査について行われるのと同様である。また、計測時にどのような 処理をどのような順序で行うの力も設定させる。
[0112] 上記の ST53では、スケール基準高さとして、たとえば、ワーク Wの戴置面に対する 計測対象箇所の高さを表す寸法を入力させる。正面視高さやスケール基準高さの値 は、装置の内部では、必ずしもワーク Wの戴置面を基準として表現されている必要は なぐたとえば図 10の座標系における Z座標の値として表現されていてもよレ、。あるい は、互いに座標変換が可能な他の任意の座標系によって表現されてレ、てもよレ、。
[0113] しかし、ユーザに入力させるスケール基準高さは、ユーザが計測対象箇所の高さと して自然に認識できる高さであることが好ましい。ワーク Wの戴置面を基準とした計測 対象箇所の高さをスケール基準高さとすることにより、装置の内部処理の詳細を理解 していないユーザであっても、スケール基準高さとして入力を要求されているのがど の寸法であるのかを容易に理解することができる。
[0114] ただし、この ST53のステップを省略して、その代わりに、たとえばキャリブレーション ワーク 75の正面視高さのような、何らかの既定値をスケール基準高さとして用いること ができる場合がある。一般に仮想結像倍率は、その値が小さいことが多い。そのよう な場合には、計測対象箇所の正面視高さがスケール基準高さと異なっていてもスケ ールの誤差は比較的小さい。したがって、寸法や面積の高精度の計測を必要としな い場合、たとえば汚れの有無判別、外形輪郭における欠け検出、文字の種類判別な どを目的とする 2次元画像処理を行う場合には、検查対象箇所の正面視高さの違い に応じて都度スケール基準高さを入力することなぐスケール基準高さとして既定値 を用いても支障のない場合が多い。また、 3次元計測のための計測対象位置を特定 する場合にも、同様にスケール基準高さとして既定値を支障なく用レ、ることができる 場合が多い。
[0115] 図 23は、上記の設定処理が終了した後に実行される検査の手順の一例を示す。
まず、 ST61では、ワーク検出用のセンサからの検知信号に応じてカメラ COおよび C1でワーク(計測対象の対象物) Wを撮影する。 ST62では、カメラ COで撮影された 斜視画像を正面視画像に変換することにより、第 1の画像を得る。 ST63では、第 1の 画像上で 3次元計測の対象とする位置を特定する。この位置特定の手法の例は、先 にカメラ COが正面視配置の場合の各種検査について説明したのと同様である。 ST6 4では、カメラ C 1で撮影された第 2の画像上で、第 1の画像上の先に特定された位置 に対応する位置を特定する。
[0116] ST65では、特定された第 1の画像上の位置と第 2の画像上の位置とを用いて 3次 元座標を算出する。 ST66では、第 1の画像を用いて 2次元計測を行う。第 1の画像 は正面視変換画像であるので、従来より、正面視画像を処理対象とすることを前提と して開発された種々の 2次元画像処理の手法を適用することができる。寸法または面 積の計測を伴う 2次元計測を行う場合は、図 22の設定処理において設定されたスケ ール情報を利用する。このとき、 2次元計測用のプログラムが動作する演算処理部 20 力 ¾次元画像処理手段として働く。 ST66の計測が終了すると、 ST67において、 ST 65, 66で得た計測結果の良否の判定処理を実行する。この後は、 ST61に戻り、次 のワーク Wが来るのを待つ。
[0117] 図 23の ST63〜66は、計測処理のためのステップに相当する力 S、これらのステップ の処理内容と順序については、レ、ろいろな設定がありうる。たとえば、複数の点につ いて 3次元計測するようにしてもよレ、。その場合、 ST63、 ST64のそれぞれの中で複 数の位置を特定し、 ST65の中で複数の点の 3次元座標を算出することも考えられる し、 1つの点について位置特定と 3次元座標算出をする ST63から ST65までのステツ プを複数回繰り返すことによって、繰り返しの 1回につき 1箇所ずつ 3次元座標を算出 するようにしてもよレ、。 ST66の 2次元計測は何種類でも設定可能であるし、 ST62以 降であればどのタイミングで 2次元計測を実行するように設定してもよい。
[0118] 図 24は、検査の手順の他の例である。この検查を行う場合には、図 22の ST54に おいて正面視高さの許容範囲がユーザにより設定され、演算処理部 20に記憶され てレ、るものとする。正面視高さの許容範囲は、スケール基準高さをその範囲の中に含 むように定められている。正面視高さの許容範囲は、計測対象箇所の正面視高さが その範囲内にあれば、正面視変換画像のスケールの誤差が想定の範囲内に収まる という観点から定められるものであり、ワーク Wの良否についての判定基準とは異なる
[0119] ST61から ST67まではそれぞれ図 23の同じ符号の処理と同じ内容である。 ST71 の処理は、 ST65で算出された 3次元座標が示す正面視高さ力 設定されている許 容範囲に含まれているかどうかを判定するものである。この判定を行うプログラムが動 作する演算処理部 20が判定手段として働く。
[0120] 算出された 3次元座標が正面視高さの許容範囲になければ、 ST72の報知処理を 経て ST61に戻り、許容範囲内であれば報知処理を行わずに ST61に戻る。 ST72 に進んだときには、 2次元計測において利用されるスケール情報が示すスケールと、 第 1の画像の実際のスケールとの間に、想定される程度よりも大きな差異があることに ついて報知する。たとえば、その旨の表示をしたり、警告音を発する。報知の他の例 として、スケール誤差のある第 1の画像に基づいて処理したことによる誤差が計測値 に含まれてレ、る旨の表示を、 2次元計測の結果の表示に付記するようにしてもょレ、。
[0121] 図 25は、検査の手順のさらに他の例である。 ST61力 ST65まで、および ST67の 処理内容は、それぞれ図 23の同じ符号の処理と同じ内容である。 ST81では、 ST6 5で求められた 3次元座標が示す正面視高さをスケール基準高さとして第 1の画像の スケール情報を算出する。このスケール情報の算出を行うプログラムが動作する演算 処理部 20がスケール情報算出手段として働く。 ST82では、算出されたスケール情 報を用いて、第 1の画像についての 2次元計測を行う。
[0122] つぎに、図 26は、図 22に示した設定処理の手順を、ユーザがスケール基準高さお よびスケール情報の設定の適否を確認しながら設定値を調整できるように変更したも のである。この手順では、まず、 ST91においてカメラ COで設定用のワーク Wを撮影 する。つぎに、 ST92では、撮影された斜視画像を正面視画像に変換する。得られた 正面視変換画像は設定用画像として利用される。また、このとき、モニタ 3には、正面 視変換画像および変換前の原画像を含む設定用のウィンドウ 90 (図 28に示す。)が 表示される。
[0123] 詳細は後記するが、この段階では、スケール基準高さの初期値として、キヤリブレー シヨン時に入力されたキャリブレーションワーク 75の正面視高さが設定されている。つ ぎの ST94では、ユーザに、設定用ウィンドウ 90を用いてスケール基準高さの値を変 更する操作を行わせ、その操作に応じてスケール基準高さおよびスケール情報を変 更する。この変更操作は、ユーザがスケール基準高さが適切になったと判断するまで 繰り返し実行される。変更処理が終了すると ST95に進み、図 22の ST54の場合と同 様に、設定用画像を用いてユーザに計測処理に必要な設定を行わせる。
[0124] 図 27は、上記の設定処理の際のカメラ COによる設定用のワーク Wの撮影状況を示 す (カメラ C1も設けられているが図示を省略する。)。設定用ワーク Wは計測対象のヮ ーク Wの中から選ばれた良品であるとする。ここでのワーク Wは、全体形状が立方体 である。符号 Tはワーク Wの上面である。図 27には仮想的な平面 R0、 Rl、 R2、 R3 が示されている。 R0はワーク Wの載置面であり、たとえばワーク Wが載置されるベル トコンベアの表面である。平面 Rl、 R2、 R3は R0に平行で、それぞれ R0からの高さ 力 ¾il、 h2、 h3 (hl <h2<h3)であり、平面 R2の高さ h2がワーク Wの上面 Tの高さに 一致している。また、キャリブレーションは、キャリブレーションワーク 75を平面 R1の高 さに置いて行われ、スケール基準高さの初期値として、平面 R1の高さ hiが設定され ている。
[0125] 図 28は、図 27の撮像状態下においてモニタ 3に表示される設定用ウィンドウ 90の 内容を示す。このウィンドウ 90には、カメラ COによって撮影された設定用ワーク Wの 画像 91、編集画像 92、スケール基準高さの調整バー 93および調整ハンドル 94、ス ケール基準高さの数値表示部 95、スケール基準高さの確定ボタン 96、スケール図 形の寸法入力部 97、スケール図形の種類の選択部 98が表示されている。編集画像 92にはワーク Wの正面視変換画像に加えて、スケール図形 99も表示されている。編 集画像 92の内容を作成するプログラムが動作する演算処理部 20が画像編集手段と して働く。
[0126] カメラ COによって撮影された画像 91においては、ワーク Wの上面 Tは台形に表示 されている力 編集画像 92においては本来の正方形に変換されて表示されている。 しかし、スケール基準高さの初期値がキャリブレーションワーク 75の正面視高さであ る hiに設定されているのに対し、実際の上面 Tの正面視高さが h2であるため、変換 表示されている上面 Tのスケールには誤差が生じている。すなわち、上面 Tは、それ 力 Sスケール基準高さにあつたとした場合よりも大きく表示されている。
[0127] スケール図形 99は、スケール基準高さにおける仮想結像倍率に基づき、スケール 基準高さにある平面上における実際の寸法をモニタ 3の表示画面上で示す図形であ る。スケール図形 99の種類は、選択部 98において、正方形、円、グリッドのいずれか を選択することができる。寸法入力部 97に入力する寸法は、スケール図形 99が正方 形の場合は 1辺の長さ、円の場合は直径、グリッドの場合はグリッド線の間隔を意味 する。スケール図形 99は、ワーク Wの正面視変換画像との比較がしゃすいように、ド ラッグ操作により、編集画像 92内の任意の位置に移動させることができる。
[0128] ここで、スケール画像 99としてワーク Wの上面 Tの形状と比較しやすい図形を選択 し (ここでは上面 Tと同じ形状である正方形を選択した)、寸法入力部 97にワーク Wの 上面 Tの大きさと比較するのに適した値を入力すると(ここでは上面 Tの辺の長さと同 じ寸法を入力した)、ワーク Wの上面 T (計測対象箇所)の実際の高さがスケール基準 高さよりも高ければ (仮想カメラ C2に近ければ)、スケール図形 99と対比して認識さ れる上面 Tの大きさは実際よりも大きくなり、逆の場合は実際よりも小さくなる。
[0129] したがって、設定用ワーク Wの計測対象箇所の大きさが既知であれば、モニタ 3上 で観察されるワーク Wの形状と比較しやすレ、スケール画像 99を選択し、その寸法を 計測対象箇所の既知の大きさと比較するのに適した値に設定したとき、ワーク Wの正 面視変換画像における計測対象箇所の大きさとスケール図形 99の大きさとの比率が 正しくなつていれば、そのときのスケール基準高さはワーク Wの計測対象箇所(この 場合は上面 T)の正面視高さと一致する。
[0130] 図 26で ST93を最初に実行する際には、スケール基準高さの初期値からスケール 情報の初期値を算出した後に、ユーザーの選択したスケール図形 99を、寸法入力 部 97に入力された寸法およびスケール情報の初期値に応じた大きさをもって編集画 像 92上に表し、ユーザにスケール基準高さの調整を行わせる。また、調整の都度、 その調整されたスケール基準高さからスケール情報を算出し、その算出結果に基づ いてスケール図形 99の大きさを変化させる。
[0131] スケール基準高さは、調整ハンドル 94を調整バー 93に沿ってドラッグ操作すること により調整すること力 Sできる。現時点での調整基準高さはスケール基準高さの数値表 示部 95に表示される。スケール基準高さの調整が終了すると、確定ボタン 96を押す ことにより、図 26の ST94から ST95に進む処理が行われる。このときにスケール情報 も確定される。このようにして、スケール基準高さおよびスケール情報が整合的に変 更される。この一連の処理を行うためのプログラムが動作する演算処理部 20が調整 手段として働く。
[0132] 図 29は、図 28に示した編集画像 92について、スケール基準高さの変更に伴う表 示内容の変化を示す。編集画像 92aは、スケール基準高さを初期値の hiとした場合 である。いま、上面 Tは 1辺 100mmの正方形であるとし、スケール図形 99として 1辺 1 00mmの正方形を表示してレ、るものとする。この場合に表示されてレ、るスケール図形 99は、スケール基準高さ(この場合は高さ hi)に 1辺 100mmの正方形があつたとし て、これを撮影した場合に、この撮影された正方形を正面視変換した場合に表示さ れるはずの図形に相当する。実際の上面 Tは h2の高さにあるから、スケール図形 99 よりも大きく表示されている。
[0133] スケール基準高さを h2に調整すると、編集画像 92bに示すように、上面 Tの大きさ とスケール図形の大きさとがー致した編集画像が得られる。さらに、スケール基準高さ を h3まで大きくすると、編集画像 92cに示すように、スケール図形 99が上面 Tの正面 視変換画像よりも大きく表示されるようになる。 [0134] 上記の操作により、ユーザは、スケール基準高さを h2に設定したときに、その設定 値が上面 Tの正面視高さに一致すると判断することができる。ドラッグ操作によりスケ ール図形 99を上面 Tの正面視変換画像に重ねると、より正確に大きさを対比すること ができる。
[0135] このように、ユーザは、編集画像中の計測対象箇所とスケール画像 99との比率が 正しい状態になるまでスケール基準高さを調整することにより、スケール基準高さを 計測対象箇所の正面視高さに正しく合わせることができる。これにより、スケール情報 も正しく設定することができる。
[0136] 上記の表示によれば、ユーザは、設定用ワーク Wの計測対象箇所の正面視高さと スケール基準高さとがおよそ一致していることを編集画像 92の表示により直接確認 すること力 Sできる。この高さの一致についての誤差が小さいと、第 2の画像上における 高さ方向の対応位置探索範囲が小さくても対応位置を見つけることができる。また、 この高さの一致についての誤差が小さいと、第 1の画像を用いて寸法計測や面積計 測を含む 2次元計測をした場合に計測結果の誤差が小さくなる。
[0137] このように、上記の例では、編集画像 92を見ながらスケール基準高さを計測対象箇 所の正面視高さに合わせるような調整を行った力 ユーザは必ずしもスケール基準 高さの概念を理解する必要はないので、ユーザに対して調整対象力 Sスケール基準高 さであることを示すことも、必ずしも必要ではない。たとえば、ユーザに対しては正面 視変換画像のスケールの調整であるように見せ、実際には基準高さの調整がされる ようにしてもよい。また、実際にも正面視変換画像のスケールの調整処理を行レ、、ス ケールの調整結果力 対応するスケール基準高さを算出するようにしてもよい。
[0138] たとえば、スケール基準高さを直接調整するのに代えて、ワーク Wの正面視変換画 像における計測対象箇所の大きさとスケール図形 99の大きさとの比率が正しくなるよ うに、スケール図形 99およびワーク Wの正面視変換画像のいずれか一方を拡大また は縮小し、または両方を互いに異なる比率で拡大または縮小し、これらの拡大縮小 率力、らスケール情報を求めるとともに、対応するスケール基準高さを計算するようにし てもよい。
[0139] このような、ワーク Wの正面視変換画像における計測対象箇所の大きさとスケール 図形 99の大きさとの比率を参照しつつ最終的にスケール基準高さを求める手法は、 ワーク Wの計測対象箇所の正面視高さを知らずに、モニタ 3に表示される画像を見な 力 Sらスケール基準高さを設定する場合に活用することができる。
[0140] ところで、スケール基準高さおよびスケール情報の一方から他方を求める手法は、 斜視画像から変換した正面視画像を 2次元計測の対象とする場合に限らず、図 1の ように、カメラ COを正面視を行うように配置して撮影した場合の正面視画像を 2次元 計測の対象とする場合にも、適用することが可能である。この場合にも同様に設定の 容易さの利点が得られる。
[0141] また、第 1のカメラが斜視配置、正面視配置のいずれの場合にも、 3次元計測の結 果によって示される正面視高さとスケール基準高さとを比較することによって、スケー ル情報の値が適正であるかどうかについての評価を行うことができる。このようにして
、 3次元計測を行うことが 2次元計測の正確性を検証することに寄与する。
[0142] レ、うまでもなぐ図 24を用いて説明した、算出された 3次元座標が示す正面視高さ が許容範囲に含まれているかどうかを判定する手法、図 25を用いて説明した、算出 された 3次元座標が示す正面視高さを用いてスケール情報を算出する手法、図 26か ら図 29までを用いて説明した、ユーザによる操作に基づきスケール基準高さを調整 する手法は、いずれも第 1のカメラ COが正面視の方向を向けて配置されている場合 にも適用することができる。
[0143] スケール基準高さからスケール情報を算出する場合に用いるスケール基準高さとし ては、ユーザによって入力された値を用いてもよいし、装置自身が実際にワーク Wを 対象に計測した正面視高さを用いてもよい。この正面視高さの計測は、第 1、第 2の カメラを用レ、る 3次元計測機能により計測してもよいが、正面視高さ計測用のセンサ を設けて、このセンサにより計測するようにしてもよい。正面視高さ計測用のセンサと しては、レーザビームの投射とその反射光の受光に基づく三角測距方式のレーザ変 位計や、プローブ接触式の変位計など、周知の種々のセンサを用いることができる。
[0144] 以上の開示に基づき、以下に述べる画像処理装置も認識される。
(A) 第 1のカメラが対象物を撮影した画像に基づいて得られる正面視画像である第 1の画像と、第 1のカメラが撮影する方向とは異なる方向から対象物を撮影するように 配置された第 2のカメラが撮影した画像に基づく第 2の画像とを用いた処理を行う画 像処理装置であって、
第 1のカメラが設定用の対象物を撮影した画像に基づいて得られた正面視画像で あるところの設定用画像を用いて、ユーザに計測対象位置についての設定をさせる 設定手段と、
第 1のカメラが計測対象の対象物を撮影した画像に基づいて得られた正面視画像 であるところの第 1の画像に対し、前記設定に基づいて対象物上の位置を特定する 位置特定手段と、
第 1の画像において特定された前記位置に対応する、第 2の画像における位置を 特定し、特定された第 1の画像上の位置と第 2の画像上の位置とを用いて 3次元座標 を算出する 3次元計測手段とを備え、
正面視画像における寸法と計測対象箇所の実際の寸法とを関係付けるスケール情 報およびスケール情報と整合する正面視高さであるスケール基準高さが利用可能と されており、
さらに、第 1の画像を対象に、スケール情報を用いて 2次元画像処理を行う 2次元画 像処理手段と、
を備えた画像処理装置。
[0145] (B) さらに、スケール基準高さを含むように定められた正面視高さの許容範囲の値 が利用可能とされており、
前記 3次元計測手段により算出された前記 3次元座標が示す正面視高さが前記許 容範囲に含まれているかどうかを判定する判定手段をさらに備えた (A)の画像処理 装置。
[0146] (C) 前記 3次元計測手段により算出された前記 3次元座標が示す正面視高さを用 レ、てスケール情報を算出するスケール情報算出手段をさらに備えた (A)の画像処理 装置。
[0147] (D) ユーザによる操作に基づきスケール基準高さおよびスケール情報を整合的に 変更する調整手段をさらに備えた (A)の画像処理装置。
[0148] (E) 第 1の画像に対してスケール基準高さにある平面上における実際の寸法を示 すスケール図形を加えた表示用の画像を編集する画像編集手段をさらに備えた(D) の画像処理装置。
[0149] (A)の画像処理装置が用いる正面視画像は、正面視配置のカメラで撮影した画像 でもよいし、斜視配置のカメラで撮影した画像を正面視変換したものでもよい。この画 像処理装置によれば、互いに整合するスケール情報およびスケール基準高さが利用 可能であり、計測対象の対象物についてスケール情報を用いた 2次元画像処理が行 われるとともに、 3次元計測も行われる。したがって、 3次元計測により求めた正面視 高さとスケール基準高さとの間の差が大きい場合には、スケール情報を用いた 2次元 画像処理の結果に誤差が生じていることがわかる。
また、計測対象箇所の正面視高さをスケール基準高さとして、スケール情報をスケ ール基準高さから算出するようにすれば、対象物の種類が変更されて計測対象箇所 の高さが変わるような場合にも、スケール情報を容易に設定することができる。スケー ル情報を定めるための正面視高さは、ユーザが指定したものでも画像処理装置自身 が計測したものでもよい。
[0150] (B)の画像処理装置によれば、算出された 3次元座標が正面視高さの許容範囲に ない場合に、 2次元画像処理手段が利用するスケール情報が示すスケールと、第 1 の画像の実際のスケールとの間に、想定される程度よりも大きな差異があることがわ かる。
[0151] (C)の画像処理装置によれば、正面視高さの実測値により算出されたスケール情 報を用いて 2次元画像処理を行うので、対象物についてのより正確な計測を行うこと ができる。
[0152] (D)の画像処理装置によれば、ユーザによる操作に基づき、スケール基準高さが 3 次元計測の対象箇所の実際の正面視高さにほぼ一致するように調整されると、第 2 の画像上において計測対象箇所が現れる可能性のある範囲が小さくなる。したがつ て、そのような小さい範囲を対象として、第 1の画像上で特定された位置に対応する 位置を特定するようにすれば、第 1の画像、第 2の画像間での計測対象位置の対応 付けを誤る可能性が低くなり、対応位置を特定する演算に要する時間も短くなる。 また、ユーザによる操作に基づきスケール情報が正しく調整されると、第 1の画像に 対して寸法や面積の計測を伴う種々の 2次元画像処理を適用したときに、その結果 に含まれる誤差が少なくなる。
(E)の画像処理装置によれば、編集された画像が表示されると、ユーザは表示され たスケール図形と計測対象箇所の像との大きさの関係が正しくなるように調整操作を 行うことができる。

Claims

請求の範囲
[1] 第 1のカメラが対象物を撮影した画像に基づいて得られる正面視画像である第 1の 画像と、第 1のカメラが撮影する方向とは異なる方向力 対象物を撮影するように配 置された第 2のカメラが撮影した画像に基づく第 2の画像とを用いた処理を行う画像 処理装置であって、
第 1のカメラが設定用の対象物を撮影した画像に基づいて得られた正面視画像で あるところの設定用画像を用いて、ユーザに指定領域についての設定をさせる設定 手段と、
第 1のカメラが計測対象の対象物を撮影した画像に基づいて得られた正面視画像 であるところの第 1の画像に対し、前記設定に基づいて指定領域を定め、当該指定 領域内において対象物上の位置を特定する位置特定手段と、
第 1の画像において特定された前記位置に対応する、第 2の画像における位置を 特定し、特定された第 1の画像上の位置と第 2の画像上の位置とを用いて 3次元座標 を算出する 3次元計測手段と、
を備えた画像処理装置。
[2] 対象物を斜視する方向から撮影するように配置されている第 1のカメラが撮影した 斜視画像を正面視画像に変換する変換演算を行う変換手段をさらに備え、
前記設定用画像は、第 1のカメラが設定用の対象物を斜視する方向から撮影した 画像を前記変換手段が変換することにより得られたものであり、
第 1の画像は、第 1のカメラが計測対象の対象物を斜視する方向から撮影した画像 を前記変換手段が変換することにより得られたものである、請求項 1に記載の画像処 理装置。
[3] 前記変換手段により変換された正面視画像における寸法と計測対象箇所の実際の 寸法とを関係付けるスケール情報と、スケール情報と整合する正面視高さであるスケ ール基準高さの値と、スケール基準高さを含むように定められた正面視高さの許容 範囲の値とが利用可能とされており、
第 1の画像を対象に、スケール情報を用いて 2次元画像処理を行う 2次元画像処理 手段と、 前記 3次元計測手段により算出された前記 3次元座標が示す正面視高さが前記許 容範囲に含まれているかどうかを判定する判定手段とをさらに備えた請求項 2に記載 の画像処理装置。
[4] 前記 3次元計測手段により算出された前記 3次元座標が示す正面視高さを用いて
、変換手段により変換された正面視画像における寸法と計測対象箇所の実際の寸法 とを関係付けるスケール情報を算出するスケール情報算出手段と、
第 1の画像を対象に、スケール情報を用いて 2次元画像処理を行う 2次元画像処理 手段とをさらに備えた、請求項 2に記載の画像処理装置。
[5] 前記変換手段により変換された正面視画像における寸法と計測対象箇所の実際の 寸法とを関係付けるスケール情報と、スケール情報と整合する正面視高さであるスケ ール基準高さの値とが利用可能とされており、
ユーザによる操作に基づきスケール基準高さおよびスケール情報を整合的に変更 する調整手段をさらに備えた、請求項 2に記載の画像処理装置。
[6] 第 1の画像に対してスケール基準高さにある平面上における実際の寸法を示すス ケール図形をカ卩えた表示用の画像を編集する画像編集手段をさらに備えた、請求項
5に記載の画像処理装置。
[7] 第 1のカメラが対象物を斜視する方向から撮影した画像に基づいて得られる正面視 画像である第 1の画像と、第 1のカメラが撮影する方向とは異なる方向から対象物を 撮影するように配置された第 2のカメラが撮影した画像に基づく第 2の画像とを用いた 処理を行う画像処理装置であって、
対象物を斜視する方向から撮影するように配置されている第 1のカメラが撮影した 斜視画像を正面視画像に変換する変換演算を行う変換手段と、
第 1のカメラが設定用の対象物を撮影した画像を前記変換手段が変換することによ り得られた設定用画像を用いて、ユーザに計測対象位置についての設定をさせる設 定手段と、
第 1のカメラが計測対象の対象物を撮影した画像を前記変換手段が変換すること により得られた第 1の画像上において、前記設定に基づいて対象物上の位置を特定 する位置特定手段と、 第 1の画像において特定された前記位置に対応する、第 2の画像における位置を 特定し、特定された第 1の画像上の位置と第 2の画像上の位置とを用いて 3次元座標 を算出する 3次元計測手段と、
を備えた画像処理装置。
[8] 前記変換手段により変換された正面視画像における寸法と計測対象箇所の実際の 寸法とを関係付けるスケール情報と、スケール情報と整合する正面視高さであるスケ ール基準高さの値と、スケール基準高さを含むように定められた正面視高さの許容 範囲の値とが利用可能とされており、
第 1の画像を対象に、スケール情報を用いて 2次元画像処理を行う 2次元画像処理 手段と、
前記 3次元計測手段により算出された前記 3次元座標が示す正面視高さが前記許 容範囲に含まれているかどうかを判定する判定手段とを、さらに備えた請求項 7に記 載の画像処理装置。
[9] 前記 3次元計測手段により算出された前記 3次元座標が示す正面視高さを用いて 、変換手段により変換された正面視画像における寸法と計測対象箇所の実際の寸法 とを関係付けるスケール情報を算出するスケール情報算出手段と、
第 1の画像を対象に、スケール情報を用いて 2次元画像処理を行う 2次元画像処理 手段とをさらに備えた、請求項 7に記載の画像処理装置。
[10] 前記変換手段により変換された正面視画像における寸法と計測対象箇所の実際の 寸法とを関係付けるスケール情報と、スケール情報と整合する正面視高さであるスケ ール基準高さの値とが利用可能とされており、
ユーザによる操作に基づきスケール基準高さおよびスケール情報を整合的に変更 する調整手段をさらに備えた、請求項 7に記載の画像処理装置。
[11] 第 1の画像に対してスケール基準高さにある平面上における実際の寸法を示すス ケール図形を加えた表示用の画像を編集する画像編集手段をさらに備えた、請求項
10に記載の画像処理装置。
[12] 第 1のカメラが対象物を撮影した画像に基づいて得られる正面視画像である第 1の 画像と、第 1のカメラが撮影する方向とは異なる方向力 対象物を撮影するように配 置された第 2のカメラが撮影した画像に基づく第 2の画像とを用いた処理を行う画像 処理方法であって、
第 1のカメラが設定用の対象物を撮影した画像に基づいて得られた正面視画像で あるところの設定用画像を表示し、ユーザに当該設定用画像を用いて指定領域につ いての設定をさせる設定ステップと、
第 1のカメラが計測対象の対象物を撮影した画像に基づいて得られた正面視画像 であるところの第 1の画像に対し、前記設定に基づいて指定領域を定め、当該指定 領域内において対象物上の位置を特定する位置特定ステップと、
第 1の画像において特定された前記位置に対応する、第 2の画像における位置を 特定し、特定された第 1の画像上の位置と第 2の画像上の位置とを用いて 3次元座標 を算出する 3次元計測ステップと、
を備えた画像処理方法。
対象物を斜視する方向から撮影するように配置されてレ、る第 1のカメラが対象物を 撮影した画像に基づいて得られる正面視画像である第 1の画像と、第 1のカメラが撮 影する方向とは異なる方向から対象物を撮影するように配置された第 2のカメラが撮 影した画像に基づく第 2の画像とを用いた処理を行う画像処理方法であって、 第 1のカメラが撮影した斜視画像を正面視画像に変換する変換演算により、第 1の カメラが設定用の対象物を撮影した画像を設定用画像に変換し、ユーザに当該設定 用画像を用いて計測対象位置についての設定をさせる設定ステップと、
前記変換演算により、第 1のカメラが計測対象の対象物を撮影した画像を第 1の画 像に変換し、第 1の画像上において、前記設定に基づき対象物上の位置を特定する 位置特定ステップと、
第 1の画像において特定された前記位置に対応する、第 2の画像における位置を 特定し、特定された第 1の画像上の位置と第 2の画像上の位置とを用いて 3次元座標 を算出する 3次元計測ステップと、
を備えた画像処理方法。
PCT/JP2006/312099 2005-06-17 2006-06-16 3次元計測を行う画像処理装置および画像処理方法 WO2006135040A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP06757383.2A EP1788345B1 (en) 2005-06-17 2006-06-16 Image processing device and image processing method performing 3d measurement
KR1020097024679A KR101155816B1 (ko) 2005-06-17 2006-06-16 3차원 계측을 행하는 화상 처리 장치 및 화상 처리 방법
US11/630,631 US8233041B2 (en) 2005-06-17 2006-06-16 Image processing device and image processing method for performing three dimensional measurements
JP2006541746A JP4811272B2 (ja) 2005-06-17 2006-06-16 3次元計測を行う画像処理装置および画像処理方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005177616 2005-06-17
JP2005-177616 2005-06-17

Publications (1)

Publication Number Publication Date
WO2006135040A1 true WO2006135040A1 (ja) 2006-12-21

Family

ID=37532393

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/312099 WO2006135040A1 (ja) 2005-06-17 2006-06-16 3次元計測を行う画像処理装置および画像処理方法

Country Status (6)

Country Link
US (1) US8233041B2 (ja)
EP (1) EP1788345B1 (ja)
JP (1) JP4811272B2 (ja)
KR (2) KR20070088318A (ja)
CN (1) CN100460807C (ja)
WO (1) WO2006135040A1 (ja)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006349586A (ja) * 2005-06-17 2006-12-28 Omron Corp 3次元計測方法および3次元計測装置
JP2009088881A (ja) * 2007-09-28 2009-04-23 Omron Corp 撮像システム
JP2010081228A (ja) * 2008-09-25 2010-04-08 Omron Corp 画像処理装置およびそれにおける画像処理方法
JP2011107083A (ja) * 2009-11-20 2011-06-02 Omron Corp 姿勢認識方法およびこの方法を用いた3次元視覚センサ
JP2011112402A (ja) * 2009-11-24 2011-06-09 Omron Corp 3次元視覚センサにおける計測有効領域の表示方法および3次元視覚センサ
JP2012528395A (ja) * 2009-05-29 2012-11-12 コグネックス・テクノロジー・アンド・インベストメント・コーポレーション 実用型3dビジョンシステム装置およびその方法
CN103196375A (zh) * 2013-04-03 2013-07-10 江南大学 一种电池正负极耳胶高度的自动检测方法
DE112011104727B4 (de) * 2011-01-17 2016-07-14 Omron Corporation Leiterplatteninspektionsvorrichtung, Leiterplatteninspektionssystem und Verfahren zur Anzeige eines Bildschirms zum Prüfen eines Leiterplatteninspektionsergebnisses
CN107328331A (zh) * 2017-08-25 2017-11-07 郑州市质量技术监督检验测试中心 基于视觉的分布式钢直尺检定装置及其方法
WO2020067168A1 (ja) * 2018-09-28 2020-04-02 パナソニックIpマネジメント株式会社 採寸装置及び採寸方法
CN112082481A (zh) * 2020-09-09 2020-12-15 易思维(杭州)科技有限公司 用于检测螺纹特征的视觉检测系统的精度评价方法
JP2021113805A (ja) * 2020-01-20 2021-08-05 カール ツァイス マイクロスコピー ゲーエムベーハーCarl Zeiss Microscopy Gmbh 顕微鏡および顕微鏡の測定位置を決定する方法

Families Citing this family (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4888013B2 (ja) * 2006-09-28 2012-02-29 富士通株式会社 高さ制限算出装置、高さ制限算出方法および高さ制限算出プログラム
US8497901B2 (en) * 2007-04-03 2013-07-30 Hexagon Metrology Ab Method and device for exact measurement of objects
JP4492654B2 (ja) * 2007-08-29 2010-06-30 オムロン株式会社 3次元計測方法および3次元計測装置
US8854610B2 (en) 2008-02-26 2014-10-07 Koh Young Technology Inc. Apparatus and method for measuring a three-dimensional shape
KR100941978B1 (ko) * 2008-02-26 2010-02-11 울산대학교 산학협력단 씨씨디 카메라와 레이저 빔을 이용한 물체의 3차원위치정보 측정방법 및 장치
ES2622485T3 (es) * 2008-05-22 2017-07-06 Matrix Electronic Measuring Properties, Llc Sistema y método de medición estereoscópicos
DE102009040649A1 (de) * 2008-09-11 2010-05-20 Schott Ag Verfahren und Vorrichtung zur Erzeugung von digitalen Einzelbildern von scheibenförmigen Elementen in einem Herstellungsprozess
CN101729737B (zh) * 2008-10-29 2012-06-20 鸿富锦精密工业(深圳)有限公司 影像校正系统及方法
JP2010210585A (ja) * 2009-03-12 2010-09-24 Omron Corp 3次元視覚センサにおけるモデル表示方法および3次元視覚センサ
JP5257375B2 (ja) * 2009-03-13 2013-08-07 オムロン株式会社 画像処理装置および画像処理方法
CN101887030A (zh) * 2009-05-15 2010-11-17 圣戈本玻璃法国公司 用于检测透明基板表面和/或其内部的缺陷的方法及系统
US8934703B2 (en) 2009-10-05 2015-01-13 Kawasaki Jukogyo Kabushiki Kaisha Determination assist system of ultrasonic testing, determination assist method of ultrasonic testing, determination assist program of ultrasonic testing, and computer-readable storage medium for storing determination assist program of ultrasonic testing
JP5713159B2 (ja) * 2010-03-24 2015-05-07 独立行政法人産業技術総合研究所 ステレオ画像による3次元位置姿勢計測装置、方法およびプログラム
JP5018980B2 (ja) * 2010-04-08 2012-09-05 カシオ計算機株式会社 撮像装置、長さ測定方法、及びプログラム
US8799769B2 (en) * 2011-02-08 2014-08-05 Ebay Inc. Application above-the-fold rendering measurements
JP2012187651A (ja) * 2011-03-09 2012-10-04 Omron Corp 画像処理装置および画像処理システム、ならびにそれらに向けられたガイダンス装置
KR101340555B1 (ko) * 2011-09-23 2013-12-11 광주과학기술원 기준 시점 영상 생성 장치 및 방법
CN102628693A (zh) * 2012-04-16 2012-08-08 中国航空无线电电子研究所 一种用于摄像机主轴与激光束进行平行配准的方法
JP6198312B2 (ja) * 2013-09-30 2017-09-20 Jukiオートメーションシステムズ株式会社 3次元測定装置、3次元測定方法および基板の製造方法
JP6303867B2 (ja) * 2014-06-27 2018-04-04 オムロン株式会社 基板検査装置及びその制御方法
US9885563B2 (en) 2014-10-10 2018-02-06 Georgia Tech Research Corporation Dynamic digital fringe projection techniques for measuring warpage
US10334209B2 (en) * 2015-12-17 2019-06-25 Nike, Inc. Image stitching for footwear component processing
DE102017009153B4 (de) * 2017-09-29 2021-12-09 Baumer Inspection Gmbh Anordnung und Verfahren zur Inspektion von bewegten plattenförmigen Objekten
CN109118480B (zh) * 2018-07-26 2021-01-05 北京东软医疗设备有限公司 一种调节方法及装置

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4972494A (en) 1988-02-26 1990-11-20 R. J. Reynolds Tobacco Company Package inspection system
JPH1054709A (ja) * 1996-08-09 1998-02-24 Techno Horon:Kk 顕微鏡を用いた3次元画像認識装置
JPH10148517A (ja) * 1996-09-17 1998-06-02 Komatsu Ltd 被検査物の撮像装置および半導体パッケージの検査装置
JP2000269700A (ja) * 1999-03-16 2000-09-29 Matsushita Electric Ind Co Ltd パターンマッチング認識方法
JP2001033236A (ja) * 1999-07-23 2001-02-09 Mitsubishi Heavy Ind Ltd ステレオ画像計測装置およびステレオ画像計測方法
EP1089229A2 (en) 1999-09-30 2001-04-04 Omron Corporation Image processing apparatus, image processing method and visual inspection system
JP2002063580A (ja) * 2000-08-22 2002-02-28 Asia Air Survey Co Ltd 不定形窓を用いた画像間拡張イメージマッチング方法
JP2002245438A (ja) * 2001-02-20 2002-08-30 Shigenori Tanaka 3次元コンピュータグラフィックス作成支援装置、3次元コンピュータグラフィックス作成支援方法、及び3次元コンピュータグラフィックス作成支援プログラム
JP2003522347A (ja) 1998-12-19 2003-07-22 サイバーオプティクス コーポレーション ステレオ画像による自動検査システム

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NO178909C (no) * 1993-04-19 1996-06-26 Toni Rydningen Måleanordning
US6064759A (en) * 1996-11-08 2000-05-16 Buckley; B. Shawn Computer aided inspection machine
JPH10143660A (ja) * 1996-11-11 1998-05-29 Hitachi Ltd 欠陥判定処理方法およびその装置
US6084663A (en) * 1997-04-07 2000-07-04 Hewlett-Packard Company Method and an apparatus for inspection of a printed circuit board assembly
JP3712847B2 (ja) 1997-05-20 2005-11-02 株式会社リコー 3次元形状計測方法と3次元形状計測装置及び撮像手段の姿勢検出装置
US6118540A (en) * 1997-07-11 2000-09-12 Semiconductor Technologies & Instruments, Inc. Method and apparatus for inspecting a workpiece
US5978521A (en) * 1997-09-25 1999-11-02 Cognex Corporation Machine vision methods using feedback to determine calibration locations of multiple cameras that image a common object
US6915006B2 (en) * 1998-01-16 2005-07-05 Elwin M. Beaty Method and apparatus for three dimensional inspection of electronic components
US6072898A (en) * 1998-01-16 2000-06-06 Beaty; Elwin M. Method and apparatus for three dimensional inspection of electronic components
JPH11237210A (ja) * 1998-02-19 1999-08-31 Komatsu Ltd 半導体パッケージの検査装置
JPH11259658A (ja) 1998-03-11 1999-09-24 Omron Corp 物体認識方法およびその方法を用いた物体認識装置,車輌認識方法,車輌認識装置
CN1115546C (zh) * 1999-12-29 2003-07-23 宝山钢铁股份有限公司 表面三维形貌检测方法和装置
US7075565B1 (en) * 2000-06-14 2006-07-11 Landrex Technologies Co., Ltd. Optical inspection system
US6445518B1 (en) * 2000-11-28 2002-09-03 Semiconductor Technologies & Instruments, Inc. Three dimensional lead inspection system
EP1402230A1 (en) * 2001-06-29 2004-03-31 Square D Company Overhead dimensioning system and method
JP2004046772A (ja) 2002-05-13 2004-02-12 3D Media Co Ltd 画像処理方法、画像処理システム、及び画像処理装置
US7133560B2 (en) 2002-07-09 2006-11-07 Lee Shih-Jong J Generating processing sequences for image-based decision systems
WO2005010495A2 (en) * 2003-07-22 2005-02-03 Trestle Corporation System and method for generating digital images of a microscope slide
US7015492B2 (en) * 2003-08-15 2006-03-21 Asm International N.V. Method and apparatus for mapping of wafers located inside a closed wafer cassette

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4972494A (en) 1988-02-26 1990-11-20 R. J. Reynolds Tobacco Company Package inspection system
JPH1054709A (ja) * 1996-08-09 1998-02-24 Techno Horon:Kk 顕微鏡を用いた3次元画像認識装置
JPH10148517A (ja) * 1996-09-17 1998-06-02 Komatsu Ltd 被検査物の撮像装置および半導体パッケージの検査装置
JP2003522347A (ja) 1998-12-19 2003-07-22 サイバーオプティクス コーポレーション ステレオ画像による自動検査システム
JP2000269700A (ja) * 1999-03-16 2000-09-29 Matsushita Electric Ind Co Ltd パターンマッチング認識方法
JP2001033236A (ja) * 1999-07-23 2001-02-09 Mitsubishi Heavy Ind Ltd ステレオ画像計測装置およびステレオ画像計測方法
EP1089229A2 (en) 1999-09-30 2001-04-04 Omron Corporation Image processing apparatus, image processing method and visual inspection system
JP2002063580A (ja) * 2000-08-22 2002-02-28 Asia Air Survey Co Ltd 不定形窓を用いた画像間拡張イメージマッチング方法
JP2002245438A (ja) * 2001-02-20 2002-08-30 Shigenori Tanaka 3次元コンピュータグラフィックス作成支援装置、3次元コンピュータグラフィックス作成支援方法、及び3次元コンピュータグラフィックス作成支援プログラム

Non-Patent Citations (1)

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

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006349586A (ja) * 2005-06-17 2006-12-28 Omron Corp 3次元計測方法および3次元計測装置
JP2009088881A (ja) * 2007-09-28 2009-04-23 Omron Corp 撮像システム
JP2010081228A (ja) * 2008-09-25 2010-04-08 Omron Corp 画像処理装置およびそれにおける画像処理方法
JP2012528395A (ja) * 2009-05-29 2012-11-12 コグネックス・テクノロジー・アンド・インベストメント・コーポレーション 実用型3dビジョンシステム装置およびその方法
JP2015135331A (ja) * 2009-05-29 2015-07-27 コグネックス・コーポレイション 実用型3dビジョンシステム装置およびその方法
JP2011107083A (ja) * 2009-11-20 2011-06-02 Omron Corp 姿勢認識方法およびこの方法を用いた3次元視覚センサ
JP2011112402A (ja) * 2009-11-24 2011-06-09 Omron Corp 3次元視覚センサにおける計測有効領域の表示方法および3次元視覚センサ
DE112011104727B4 (de) * 2011-01-17 2016-07-14 Omron Corporation Leiterplatteninspektionsvorrichtung, Leiterplatteninspektionssystem und Verfahren zur Anzeige eines Bildschirms zum Prüfen eines Leiterplatteninspektionsergebnisses
CN103196375A (zh) * 2013-04-03 2013-07-10 江南大学 一种电池正负极耳胶高度的自动检测方法
CN103196375B (zh) * 2013-04-03 2015-09-30 江南大学 一种电池正负极耳胶高度的自动检测方法
CN107328331A (zh) * 2017-08-25 2017-11-07 郑州市质量技术监督检验测试中心 基于视觉的分布式钢直尺检定装置及其方法
CN107328331B (zh) * 2017-08-25 2023-05-23 郑州市质量技术监督检验测试中心 基于视觉的分布式钢直尺检定装置及其方法
WO2020067168A1 (ja) * 2018-09-28 2020-04-02 パナソニックIpマネジメント株式会社 採寸装置及び採寸方法
JPWO2020067168A1 (ja) * 2018-09-28 2021-08-30 パナソニックIpマネジメント株式会社 採寸装置及び採寸方法
US11733032B2 (en) 2018-09-28 2023-08-22 Panasonic Intellectual Property Management Co., Ltd. Measurement device and measurement method
JP7361251B2 (ja) 2018-09-28 2023-10-16 パナソニックIpマネジメント株式会社 採寸装置及び採寸方法
JP2021113805A (ja) * 2020-01-20 2021-08-05 カール ツァイス マイクロスコピー ゲーエムベーハーCarl Zeiss Microscopy Gmbh 顕微鏡および顕微鏡の測定位置を決定する方法
JP7153258B2 (ja) 2020-01-20 2022-10-14 カール ツァイス マイクロスコピー ゲーエムベーハー 顕微鏡および顕微鏡の測定位置を決定する方法
US11830215B2 (en) 2020-01-20 2023-11-28 Carl Zeiss Microscopy Gmbh Microscope and method for determining a measuring location of a microscope
CN112082481A (zh) * 2020-09-09 2020-12-15 易思维(杭州)科技有限公司 用于检测螺纹特征的视觉检测系统的精度评价方法

Also Published As

Publication number Publication date
JPWO2006135040A1 (ja) 2009-01-08
EP1788345B1 (en) 2014-03-05
KR20070088318A (ko) 2007-08-29
CN100460807C (zh) 2009-02-11
EP1788345A4 (en) 2010-09-01
KR101155816B1 (ko) 2012-06-12
KR20100017396A (ko) 2010-02-16
JP4811272B2 (ja) 2011-11-09
US20090128648A1 (en) 2009-05-21
US8233041B2 (en) 2012-07-31
CN101010559A (zh) 2007-08-01
EP1788345A1 (en) 2007-05-23

Similar Documents

Publication Publication Date Title
WO2006135040A1 (ja) 3次元計測を行う画像処理装置および画像処理方法
JP5273196B2 (ja) 画像処理装置
US8229208B2 (en) Transprojection of geometry data
JP4492654B2 (ja) 3次元計測方法および3次元計測装置
EP3496035B1 (en) Using 3d vision for automated industrial inspection
CN112161619B (zh) 位姿检测方法、三维扫描路径规划方法和检测系统
US20160086343A1 (en) Contour line measurement apparatus and robot system
US7409152B2 (en) Three-dimensional image processing apparatus, optical axis adjusting method, and optical axis adjustment supporting method
JP5430138B2 (ja) 形状測定装置およびプログラム
WO2006098258A1 (ja) 3次元計測のためのキャリブレーション方法およびその方法を用いた3次元計測システム
JP5156601B2 (ja) 形状測定装置およびプログラム
JP5438475B2 (ja) 隙間段差計測装置、隙間段差計測方法、及びそのプログラム
CN108472706B (zh) 变形加工支持系统以及变形加工支持方法
JP2020126590A (ja) 情報処理装置、情報処理方法、及びプログラム
JP2009002761A (ja) 測距装置およびその測距方法
JP3842988B2 (ja) 両眼立体視によって物体の3次元情報を計測する画像処理装置およびその方法又は計測のプログラムを記録した記録媒体
JP4788475B2 (ja) 画像処理装置および画像処理方法
Breier et al. Accurate laser triangulation using a perpendicular camera setup to assess the height profile of PCBs
JP5967470B2 (ja) 検査装置
JP2010025803A (ja) 位置決め機能を有する検査装置、位置決め機能を有する検査装置用プログラム、位置決め機能を有する検査装置の検査方法
JP3218889B2 (ja) 立体物の形状検査装置
JP2022120664A (ja) ワーク検出装置、ワーク検出方法、ワーク検出システム及びワーク検出プログラム

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2006541746

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 1020067026852

Country of ref document: KR

WWE Wipo information: entry into national phase

Ref document number: 2006757383

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 200680000698.0

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWP Wipo information: published in national office

Ref document number: 2006757383

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 11630631

Country of ref document: US