WO2015136716A1 - 画像処理装置、画像センサ、画像処理方法 - Google Patents

画像処理装置、画像センサ、画像処理方法 Download PDF

Info

Publication number
WO2015136716A1
WO2015136716A1 PCT/JP2014/057005 JP2014057005W WO2015136716A1 WO 2015136716 A1 WO2015136716 A1 WO 2015136716A1 JP 2014057005 W JP2014057005 W JP 2014057005W WO 2015136716 A1 WO2015136716 A1 WO 2015136716A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
registered
feature
feature amount
weight
Prior art date
Application number
PCT/JP2014/057005
Other languages
English (en)
French (fr)
Inventor
嘉典 小西
善久 湊
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Priority to PCT/JP2014/057005 priority Critical patent/WO2015136716A1/ja
Publication of WO2015136716A1 publication Critical patent/WO2015136716A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/24Character recognition characterised by the processing or recognition method
    • G06V30/248Character recognition characterised by the processing or recognition method involving plural approaches, e.g. verification by template match; Resolving confusion among similar patterns, e.g. "O" versus "Q"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/06Recognition of objects for industrial automation

Definitions

  • the present invention relates to a technique for evaluating similarity between images based on image characteristics.
  • a sensor device called an image sensor (visual sensor) is widely used to measure and monitor a measurement object (hereinafter also referred to as “work”) flowing through a line.
  • the image sensor is composed of a camera and an image processing apparatus, detects a workpiece in an image by matching processing with a pre-registered teacher object (hereinafter also referred to as “model” or “pattern”), and extracts necessary information.
  • model a pre-registered teacher object
  • pattern has a function to perform measurement.
  • the output of the image sensor is used for various purposes such as workpiece identification, inspection, and sorting.
  • the type of workpiece is accurately determined by an image sensor. Is required.
  • the type of workpiece can be determined using an element technology called image recognition or object recognition. That is, feature types of a plurality of types of models are registered in the image sensor in advance, and the type of workpiece is estimated by evaluating the similarity between the feature amount extracted from the workpiece image and the feature amount of each model. .
  • feature values obtained from an image which can be broadly classified into feature values related to color (including light and shade), feature values related to shape, feature values related to size, and feature values related to texture (pattern) (hereinafter referred to as feature values).
  • color feature amount a feature value related to color
  • shape feature amount a feature value related to shape
  • size feature amount a feature value related to texture
  • pattern feature amount a feature value related to texture
  • feature category a classification of image features such as color, shape, etc.
  • model 1 to model 3 have the same external shape, model 1 and model 2 differ only in internal figures, and model 1 and model 3 differ only in color. In such a case, it is impossible to distinguish between the model 1 and the model 2 with the color feature amount. Similarly, it is impossible to identify the model 1 and the model 3 with the pattern feature quantity, and all models with the shape feature quantity. Therefore, it is difficult to clearly identify the models 1 to 3 even if the three types of feature quantities of color, pattern, and shape are combined.
  • the above-described problem occurs not only in object recognition but also in a similar image search for extracting an image similar to an input image (query image) from a large number of registered images registered in the image database.
  • object recognition and similar image search only the registered image (model) that is most similar to the input image (recognition target) is selected, or the registered image (image database) that is similar to the input image (query image) is selected.
  • image database the registered image
  • Patent Document 1 proposes a method of calculating suitability of a plurality of feature amounts in a query image and using only feature features having high suitability at the time of matching.
  • neither method solves the above-described problems.
  • the present invention has been made in view of the above circumstances, and provides a technique capable of accurately evaluating the similarity between an input image and each of a plurality of registered images using a plurality of types of feature amounts. Objective.
  • the present invention employs a configuration in which weights for each of a plurality of types of feature values can be set individually (to different values) for each registered image.
  • the image processing apparatus includes, for each of a plurality of registered images, a storage unit in which N types (N is an integer of 2 or more) of feature values are registered, and N types of input images. Based on the feature quantity extracted from the feature quantity extraction unit, the feature quantity extracted by the feature quantity extraction unit, and the feature quantity of each registered image registered in the storage unit, the input image and each registered image An integrated score obtained by weighting and combining N similarities obtained for each of N types of feature amounts for each combination of the input image and the registered image. And the integrated score is used to determine whether or not the input image is similar to the registered image, and the weight for each feature value can be set to a different value for each registered image. It is characterized by.
  • the weight when calculating the integrated score can be individually set for each registered image. Therefore, for example, an appropriate weight is assigned to each registered image in accordance with the image features of the individual registered images (features that are different from other registered images), such as increasing the weight of the color feature amount in a registered image having color characteristics.
  • an appropriate weight is assigned to each registered image in accordance with the image features of the individual registered images (features that are different from other registered images), such as increasing the weight of the color feature amount in a registered image having color characteristics.
  • a weight for each feature amount is registered in the storage unit together with N types of feature amounts for each of the plurality of registered images. As described above, if the feature amount and weight of each registered image are registered in the storage unit in advance, the calculation of the integrated score and the similarity determination can be performed at high speed.
  • the setting / change of the weight of each registered image may be performed using any method or means.
  • the image processing apparatus may include a manual setting unit that allows the user to set a weight for each feature amount for each registered image, or the image processing apparatus may identify each registered image between other registered images. It may be configured to have an automatic setting unit that sets weights for each feature amount so as to increase performance.
  • the weight for each feature amount can be set in accordance with the difference in the feature recognized by the user by looking at the actual object (or its image), so that a discrimination result that closely matches the user's intention can be obtained. Can be expected.
  • the reliability considering the line-specific conditions such as large individual differences in the shape, fluctuations in lighting (brightness), camera distortion, etc. (this is given as user experience and knowledge), the reliability There is also an advantage that the weight of the low feature quantity can be reduced or excluded from the calculation of the integrated score (that is, the weight is made zero).
  • an operation of manually setting the weight can be omitted, so that convenience and operability can be improved.
  • the weight for each feature amount may be determined by any standard or algorithm. For example, when setting the weight for a certain registered image, the automatic setting unit calculates the similarity between the registered image and another registered image for each of N types of feature amounts, and the feature amount having a low similarity degree It is preferable to determine a weight for each feature amount so that the weight becomes larger as the weight increases. As a result, the feature amount similar to the other registered images has a small weight, and the feature amount significantly different from the other registered images has a large weight, so that the discriminability between the registered images can be improved.
  • the weight determined by automatic setting may not always be appropriate.
  • a manual setting unit that presents the weight set by the automatic setting unit to the user and causes the user to correct the weight.
  • the weight for each feature amount can be adjusted in consideration of the user's experience and knowledge, so that flexible customization according to the user's intention is possible.
  • the present invention can be applied to various image processing applications.
  • an object discriminating device that discriminates the type of an object
  • a similar image searching device that searches for similar images
  • the plurality of registered images correspond to model images of different types of objects
  • the input image corresponds to an image of an object to be discriminated (an object whose type is unknown).
  • the integrated score between the input image and each registered image (model image) is calculated, and the registered image (model image) having the highest integrated score is identified to determine the type of object appearing in the input image (object recognition) )can do.
  • the plurality of registered images correspond to an image group registered in an image database
  • the input image corresponds to a query image.
  • An integrated score between the input image and each registered image is calculated, and one or more registered images having an integrated score greater than a predetermined value may be extracted as similar images of the input image.
  • the image (input image, registered image) handled by the present invention may be a two-dimensional image or a three-dimensional image.
  • the 3D image includes data including a plurality of 2D images, 3D data including voxels, an image including depth information such as a depth map (distance map), and information regarding 3D points and surfaces. Any format data such as an image may be used.
  • the present invention can be understood as an image processing device, an object discrimination device, or a similar image search device having at least a part of the above configuration.
  • the present invention can also be understood as an image sensor having a camera that captures an object and an object discrimination device or an image processing device.
  • the present invention stores an image processing method, an object discrimination method, or a similar image search method including at least a part of the above processing, or a program for causing a computer to execute such a method and a program therefor stored temporarily. It can also be understood as a computer-readable recording medium.
  • the figure which shows the whole structure of an image sensor The figure which shows the hardware constitutions of an image sensor.
  • determination process in operation mode. (A) The image which was taken in, (b) The detection result of a workpiece
  • the flowchart which shows the flow of the automatic setting process of a weight.
  • the figure which shows an example of the weight setting of a feature-value.
  • the figure which shows an example of an effect.
  • an image similar to the input image (the most similar image or a plurality of images having a high degree of similarity) is selected from a plurality of registered images registered in advance.
  • the present invention relates to an image similarity evaluation technique to be extracted. This technology can be applied to object discrimination in an image sensor for FA, computer vision, machine vision, and the like, or a similar image search for detecting an image similar to a query image from a group of images in an image database.
  • the present invention is implemented in an FA image sensor that detects and discriminates each workpiece in a mixed flow line in which a plurality of types of workpieces flow. An example will be described.
  • the image sensor 1 is a system that is installed in a production line or the like and performs type discrimination of the workpiece 2 using an input image obtained by imaging a product (work 2).
  • the image sensor 1 can be mounted with various image processing functions as necessary, such as edge detection, scratch / dirt detection, and area / length / centroid measurement.
  • a PLC Programmable Logic Controller 4 is a device that controls a manufacturing apparatus (not shown) such as the image sensor 1, the conveyor 3, and a robot.
  • the image sensor 1 generally includes a camera 11 and an image processing device 10.
  • the camera 11 is a device for capturing the image of the workpiece 2 into the image processing apparatus 10, and for example, a CMOS (Complementary Metal-Oxide-Semiconductor) camera or a CCD (Charge-Coupled Device) camera can be suitably used.
  • the format of the input image (resolution, color / monochrome, still image / moving image, gradation, data format, etc.) is arbitrary, and may be appropriately selected according to the type of workpiece 2 and the purpose of sensing.
  • a special image other than a visible light image such as an X-ray image or a thermo image
  • the image processing apparatus 10 includes a CPU (Central Processing Unit) 110, a main memory 112 and a hard disk 114 as a storage unit, a camera interface 116, an input interface 118, a display controller 120, a PLC interface 122, and a communication interface. 124 and a data reader / writer 126. These units are connected to each other via a bus 128 so that data communication is possible.
  • the camera interface 116 is a part that mediates data transmission between the CPU 110 and the camera 11, and has an image buffer 116 a for temporarily storing image data from the camera 11.
  • the input interface 118 mediates data transmission between the CPU 110 and an input unit (mouse 13, keyboard, touch panel, jog controller, etc.).
  • the display controller 120 is connected to a display 12 such as a liquid crystal monitor, and controls display on the display 12.
  • the PLC interface 122 mediates data transmission between the CPU 110 and the PLC 4.
  • the communication interface 124 mediates data transmission between the CPU 110 and a console (or a personal computer or a server device).
  • the data reader / writer 126 mediates data transmission between the CPU 110 and the memory card 14 as a storage medium.
  • the image processing apparatus 10 can be configured by a computer having a general-purpose architecture, and the CPU 110 reads and executes a program (instruction code) stored in the hard disk 114 or the memory card 14 to provide various functions. .
  • a program instruction code
  • Such a program is distributed while being stored in a computer-readable recording medium such as the memory card 14 or an optical disk.
  • an OS operation for providing a basic function of the computer
  • the program according to the present embodiment may realize a target function by using a program module provided by the OS.
  • the program according to the present embodiment may be provided as a single application program, or may be provided as a module incorporated in a part of another program. Further, a part or all of the functions may be replaced with a dedicated logic circuit.
  • FIG. 3 shows a functional configuration related to type discrimination (object discrimination) provided by the image processing apparatus.
  • the image processing apparatus 10 includes an image input unit 130, a detection unit 131, a feature amount extraction unit 132, a determination unit 133, an output unit 134, a storage unit 135, and a setting unit 136 as functions related to type determination. These functional blocks are realized by the CPU 110 of the image processing apparatus 10 executing a computer program.
  • FIG. 4 is an example of a feature amount database stored in the storage unit 135. For each of a plurality of types of objects (models) to be discriminated, a feature amount extracted from the image and a weight for each feature amount used when calculating an integrated score described later are registered.
  • image features there are various image features that can be used for object discrimination.
  • image characteristics of four categories of “color”, “shape”, “size”, and “pattern” are used.
  • a feature amount such as a color histogram, representative color, hue, saturation, color descriptor (C-SIFT, etc.), and a color moment can be used.
  • a feature amount such as HOG (Histograms of Oriented Gradients) feature, circularity, Fourier descriptor, aspect ratio, contour unevenness, and the like can be used.
  • the three-dimensional information of the object (for example, the depth in the depth direction of the object surface) can be used as the shape feature amount.
  • the three-dimensional information of the object is acquired by using, for example, a stereo camera, a camera capable of generating a depth map (distance map), or using a distance sensor such as a laser displacement meter in addition to the camera. Can do.
  • an index representing the “size” feature for example, feature quantities such as an area, a perimeter, and a radius can be used.
  • a feature amount such as Haar-like feature amount, Local Binary Pattern, descriptor (SIFT, SURF, etc.), spatial frequency, or the like can be used.
  • the feature category and the feature amount of each category mentioned here are examples, and other than these may be used.
  • a plurality of feature amounts may be used for one feature category.
  • the feature amounts of the above four categories are registered for each of the five types of models.
  • the image processing apparatus 10 captures an image of the workpiece 2 flowing on the conveyor 3 and executes “operation mode” for executing processing such as detection and type discrimination of the workpiece 2, and various types of image processing apparatus 10 prior to the operation mode. It has a “setting mode” for setting. The user can arbitrarily switch the mode. Registration of models and setting of weights in the feature amount database shown in FIG. 4 are operations performed in the “setting mode”. Hereinafter, the operation in the “operation mode” will be described on the assumption that the setting shown in FIG. 4 has already been performed, and then the model registration and weight setting operations in the “setting mode” will be described.
  • the image input unit 130 captures an image from the camera 11 (step S100).
  • FIG. 6A is an example of the captured image, and shows a state where five types of objects (eg, assorted chocolate) are mixed on the conveyor.
  • the detection unit 131 detects each workpiece 2 from the input image (step S101). Any algorithm may be used for the detection process. For example, after cutting the background by binarization, a method of detecting a region (pixel group) larger than a predetermined area as the work 2 or a method of searching for a region that seems to be a work by pattern matching can be used.
  • the detection unit 131 may perform preprocessing such as smoothing and noise removal on the input image as necessary.
  • FIG. 6B is an example of the detection result, and each work area detected from the image is indicated by a dotted rectangle.
  • the feature quantity extraction unit 132 analyzes the detected workpiece image and extracts a necessary feature quantity (step S102). As described above, in this embodiment, the feature amounts of the four categories of color, shape, size, and pattern are extracted from the image of the workpiece.
  • the determination unit 133 compares the feature amount of the workpiece with the feature amounts of each of the five types of models registered in the feature amount database (FIG. 4A) to determine the type of workpiece (step S103). .
  • FIG. 7 shows details of the processing in step S103.
  • Wi is a weight for the feature quantity Xi
  • Ci is the feature quantity Xi.
  • the discriminating unit 133 refers to the feature quantity database to check whether the weight Wi is larger than “0” for each feature quantity Xi (step S121). Is input (step S122). When the weight Wi is “0”, the calculation by the discriminator Ci is skipped.
  • the overall similarity (integrated score) between the workpiece and each model can be obtained.
  • the determination unit 133 determines that the workpiece with the maximum integrated score among the five types of models is the same type of object (step S125). If the maximum score is less than the predetermined lower limit, the workpiece may be an unknown object (not applicable to any of the five types of models), so it is determined as an error (unknown type). That's fine.
  • the type of each work can be determined by repeating the processes in steps S102 and S103 for all the works detected in step S101.
  • FIG. 6C is an example of the discrimination result, and the discrimination result (type) of each workpiece is indicated by a number from 1 to 5.
  • the determination result is output to the display 12 or the PLC 4 by the output unit 134 (step S104).
  • FIG. 9A is an example of a user interface of a setting screen displayed on the display 12 by the setting unit 136. In the image window 20 on the right side of the setting screen, an image captured from the camera 11 via the image input unit 130 is displayed.
  • each model area can be taught by operating the input unit such as the mouse 13 to individually surround each model area in the image displayed in the image window 20.
  • a dotted rectangle in the image window 20 indicates an area of each model designated by the user.
  • the setting unit 136 cuts out an image of each model in accordance with the area designation (step S202).
  • the obtained five types of model images 22 are displayed side by side in the image window 20 as shown in FIG. 9B.
  • a model name can be input for each model image 22.
  • all five types of models are photographed at once, and each model image is cut out from the image.
  • the region designation and image cutting are omitted or simplified. May be.
  • the setting unit 136 uses the feature amount extraction unit 132 to extract feature amounts from each model image 22 (step S203).
  • the extracted feature quantities (generally expressed by multidimensional vectors) are registered in the feature quantity database in the storage unit 135 for each model (see FIG. 4). This completes model registration.
  • the weight setting methods can be broadly classified into two methods: manual setting performed by the user based on his / her judgment and automatic setting automatically selected by the setting unit 136.
  • manual setting performed by the user based on his / her judgment
  • automatic setting automatically selected by the setting unit 136.
  • a configuration is adopted in which automatic setting is first performed by the setting unit 136, and the user manually changes as necessary.
  • the setting unit 136 determines the weight for each feature amount for each model so that the distinguishability between the model and other models is high. This is because an improvement in discrimination accuracy (discrimination ability) can be expected by setting weights so that the discrimination between models becomes high.
  • FIG. 10 shows an example of automatic weight setting processing.
  • Sij is the similarity between the model of interest for the i-th feature and the model Rj
  • SSi is the total similarity for the i-th feature Represents degrees.
  • the setting unit 136 selects a target model for which a weight is set (step S131). Then, the setting unit 136 performs a process of calculating the similarity Sij between the model of interest and the model Rj for the feature amount Xi with respect to the combinations with all the models R1 to RM, and the obtained similarities Si1 to SiM. Are added together to calculate the total similarity SSi (steps S132 and S132). In this embodiment, the similarity calculation is performed even when the model of interest and the model Rj are the same model. However, when the model of interest and the model Rj are the same, step S132 may be skipped. . If there is a possibility that the models are deformed at the time of recognition, the similarity between the models may be calculated in consideration of assumed deformations (affine transformation, projective transformation, etc.).
  • the setting unit 136 sets the weight so that the feature amount having a lower total similarity has a larger weight and the feature amount having a higher total similarity has a smaller weight.
  • the weights W1 to WN for the feature amounts X1 to XN are determined (step S134).
  • the high total similarity is because the similarity calculated using the feature amount is not very useful for discrimination between models (the discrimination ability is low).
  • the specific calculation of the weight may be any method, but the weight may be defined by a monotonic decreasing function of the total similarity.
  • the value obtained by subtracting the total similarity from the maximum value, the reciprocal of the total similarity, or the like can be used as the weight.
  • the values of the respective weights W1 to WN are normalized so that the sum of the weights W1 to WN of all the feature values becomes 1.
  • the setting unit 136 can determine the weight for each feature amount for each model by applying the processing in FIG. 10 to all models.
  • the determined weight is registered in the feature amount database of the storage unit 135 by the setting unit 136.
  • FIG. 11A when any model image is selected on the setting screen, the weight setting of the model is displayed in the information window 21 on the left side. By viewing this screen, the user can confirm the weight of the feature amount set for each model (the weight recommended by the image processing apparatus 10).
  • the setting unit 136 prepares an option of manual setting, and enables customization (setting-up) based on user experience and knowledge.
  • the user can arbitrarily change the weight for each feature amount by operating the input unit such as the mouse 13 (step S206).
  • FIG. 11B shows an example in which the user changes the weight in the first model (chocolate A).
  • the setting unit 136 updates the feature database weight setting in the storage unit 135 and ends the process.
  • the weight is set according to the difference in characteristics (for example, “the difference in color is conspicuous”, “I want to distinguish by the difference in shape”) recognized by the user looking at the actual object (or its image) Therefore, it can be expected that a discrimination result that closely matches the user's intention is obtained.
  • the weight of low-reliability feature quantities feature quantities that vary greatly from individual to individual or due to environmental changes
  • it is possible to flexibly customize according to the user's intention such as increasing the weight of highly reliable feature quantities (feature quantities with small variations due to individual variations or environmental variations), and better discrimination accuracy is expected. it can.
  • a list of feature categories is presented, and weights are set in units of feature categories, so feature names (histograms, HOG feature values, Haar-like feature values, etc.) are presented as they are. This makes it easier to understand the meaning and is more convenient for the operator and easier to operate.
  • the weight for calculating the integrated score can be individually set for each model. Therefore, set an appropriate weight for each model according to the image features of the individual models (features different from other models), such as increasing the weight of the color feature amount for models with color features.
  • an improvement in identification accuracy can be expected.
  • FIG. 12 shows an example of the effect when the weight is individually set for each model.
  • Model 1 to model 3 in FIG. 12 are the same as those in FIG. That is, models 1 to 3 have the same outer shape, model 1 and model 2 differ only in internal figures, and model 1 and model 3 differ only in color.
  • As the input image an image in which a part of the model 3 is hidden is used.
  • the models 1 to 3 as candidates the total similarity obtained by simply summing up the similarity in each feature amount and the result of calculating the weighted similarity are shown. When the total similarity (no weight) is used, it is erroneously recognized as the model 1, but when the weighted similarity is used, it is correctly recognized as the model 3.
  • FIG. 13 shows an example in which the model 3 image is recognized as an input image.
  • the model 3 is correctly recognized by using either the total similarity or the weighted similarity.
  • the discriminability between the models the similarity to the model 3 and It can be seen that the difference in similarity to other models increases. This means that high recognition performance can be maintained even when fluctuations are applied to the input image due to noise, illumination fluctuations, object deformation, etc. in an actual application.
  • the setting unit 136 allows the user to designate a range from which the feature amount is extracted from the entire object.
  • FIG. 14 shows series products with different contents of labels attached to packages, and discrimination based on color feature amounts and pattern feature amounts is effective. As shown in this example, when it is known that the difference between products is limited to only a part (only the label), by specifying (limited) the range for extracting the feature amount in advance, identification between products Therefore, further improvement in discrimination accuracy can be expected. In the case of an object with a complicated pattern or design, it may be more effective to extract the feature value from only a part of the region (for example, the product name) than to extract the feature value from the entire object. .
  • a method of drawing the feature amount extraction range 27 on the model image 22 using an input unit such as the mouse 13 may be employed.
  • the designated range is registered in the feature amount database together with the feature amount in the form of image coordinates, for example. It is preferable that a different range can be designated for each feature amount.
  • weights are set in units of feature categories. However, when a plurality of types of feature amounts are used in the same category, weights may be set for each feature amount. In the above embodiment, the weights are normalized so that the sum of the weights is 1. However, the weights are not normalized, and after calculating the weighted similarity (integrated score), the weighted similarity is calculated. Normalization may be performed.
  • the camera and the image processing device are configured separately, but an image sensor having a configuration in which the camera and the image processing device are integrated can also be used. It is also possible to connect a plurality of cameras to the image processing apparatus and measure and monitor a plurality of lines with a single image sensor. In addition, a technique such as grid computing, a client server system, or cloud computing may be applied so that part or all of the functions of the image processing apparatus are executed by another computer.

Abstract

 画像処理装置は、複数の登録画像のそれぞれについて、N種類(Nは2以上の整数)の特徴量が登録されている記憶部と、入力画像からN種類の特徴量を抽出する特徴量抽出部と、前記特徴量抽出部で抽出された特徴量と前記記憶部に登録されている各登録画像の特徴量に基づいて、前記入力画像と各登録画像との類否を評価する判別部と、を有する。前記判別部は、前記入力画像と登録画像の組み合わせごとに、N種類の特徴量のそれぞれについて求めたN個の類似度を重み付け合成した統合スコアを計算し、該統合スコアを用いて前記入力画像が当該登録画像に類似しているか否かを判別する。各特徴量に対する重みが、登録画像ごとに異なる値に設定可能である。

Description

画像処理装置、画像センサ、画像処理方法
 本発明は、画像特徴に基づき画像同士の類否を評価する技術に関する。
 FA(Factory Automation)分野においては、ラインを流れる計測対象物(以下、「ワーク」とも呼ぶ)を計測・監視するために、画像センサ(視覚センサ)と呼ばれるセンサデバイスが広く用いられている。画像センサは、カメラと画像処理装置から構成され、予め登録された教師物体(以下、「モデル」または「パターン」とも呼ぶ)とのマッチング処理によって画像内のワークを検出し、必要な情報の抽出・計測などを行う機能を有している。画像センサの出力は、例えば、ワークの識別、検査、仕分けなどの様々な用途に利用される。
 ところで、FA分野における最近の傾向として、一つのラインに複数種類のワークを混在して流し、種類別に異なる処理を適用する、という生産形態が増えている。例えば、アソート商品の箱詰めラインにおいては、コンベヤ上に異なる種類のワークをランダムに流し、ピックアップロボットで種類別にピックアップし正しい位置に箱詰めするという作業を行う。また、多品種少量生産のラインでは、形、色、サイズなどの仕様が少しずつ異なるシリーズ商品が同一のラインで製造され、仕様ごとに加工方法や検査内容などを違える場合がある。
 このように複数種類のワークが混在するライン(以下、「混流ライン」とも呼ぶ)において、ワークの種類別に異なる処理を実施するには、その前提として、画像センサでワークの種類を正確に判別することが要求される。ワークの種類判別は、画像認識や物体認識と呼ばれる要素技術を用いて実現できる。すなわち、複数種類のモデルの特徴量を予め画像センサに登録しておき、ワーク画像から抽出した特徴量と各モデルの特徴量との類似度を評価することで、ワークの種類を推定するのである。
 画像から得られる特徴量には様々なものがあり、大きく分類すると、色(濃淡含む)に関する特徴量、形状に関する特徴量、大きさに関する特徴量、テクスチャ(模様)に関する特徴量などがある(以下、それぞれ「色特徴量」、「形状特徴量」、「サイズ特徴量」、「模様特徴量」と呼び、色、形状…などの画像特徴の分類を「特徴カテゴリ」又は単に「カテゴリ」と呼ぶ。)。汎用品として販売される画像センサに上記のような種類判別機能を実装する場合には、判別の対象となる物体の特徴は未知であり、どのような画像特徴に注目すれば種類判別できるかわからないため、複数のカテゴリの特徴量を複合的に用いた判別アルゴリズムが採用されることがある。例えば、それぞれの特徴量について類似度を求め、それらを合計した合計類似度により種類判別を行うなどのアルゴリズムが知られている。
 しかしながら、複数カテゴリの特徴量を組み合わせるアルゴリズムであっても、シリーズ商品のようなよく似た物体同士を識別することは容易ではない。例えば、図15の例のように、入力画像がモデル1~モデル3のいずれに該当するか(いずれに類似しているか)を判別するアプリケーションを考える。画像特徴量としては、色特徴量(色分布)、模様特徴量(内部に描画された図形)、形状特徴量(外形の輪郭)の3つを用いる。なお、モデル1~モデル3は外形が同じであり、モデル1とモデル2は内部の図形のみ異なり、モデル1とモデル3は色のみ異なるものとする。このようなケースにおいては、色特徴量ではモデル1とモデル2の識別は不可能である。同様に、模様特徴量ではモデル1とモデル3の識別が、形状特徴量ではすべてのモデルの識別が不可能である。したがって、色・模様・形状の3種類の特徴量を組み合わせたとしても、モデル1~モデル3を明確に識別することは難しい。
 また、複数のカテゴリの特徴量を組み合わせることで、逆に判別精度の低下を招く可能性もある。例えば、形状のみが異なるシリーズ商品を形状特徴量のみで判別するケースと、形状・色・サイズの3つ特徴量を組み合わせて判別するケースを考える。形状特徴量ではシリーズ毎に有意な差がでるが、色特徴量とサイズ特徴量ではほとんど差がでない。それゆえ、形状・色・サイズそれぞれの類似度を単純に合計すると、形状特徴量の差が1/3に弱められてしまい、有意な差として検出できないおそれがある。これが、判別精度の低下を招くのである。
 上記のような課題は、物体認識のみならず、画像データベースに登録された多数の登録画像の中から入力画像(クエリ画像)に類似する画像を抽出する類似画像検索においても同様に発生する。物体認識と類似画像検索とは、入力画像(認識対象)に最も類似している登録画像(モデル)のみを選択するか、入力画像(クエリ画像)に類似している登録画像(画像データベース)を複数選択するかの違いはあるが、各種の画像特徴を基に入力画像と登録画像の類否を評価する点では共通しているからである
 類似画像検索の従来例としては、例えば、特許文献1、2のものが知られている。特許文献1の画像検索システムでは、クエリ画像を3種類(色が似ている画像、構造が似ている画像、テクスチャが似ている画像)指定し、検索実行時には、各クエリ画像に対して算出された類似度を重み付け加算して総合類似度を算出し、総合類似度に基づいて類似画像を抽出する。また、特許文献2では、クエリ画像において複数特徴量の適合性を算出し、適合性の高い特徴量のみを照合時に使用するという方法が提案されている。しかしいずれの方法も上述した課題を解決するものではない。
特開2000-285141号公報 国際公開第2004/047026号
 本発明は、上記実情に鑑みてなされたものであり、複数種類の特徴量を用いて、入力画像と複数の登録画像それぞれとの類否を精度よく評価することのできる技術を提供することを目的とする。
 上記目的を達成するために本発明では、複数種類の特徴量のそれぞれに対する重みを、登録画像ごとに個別に(異なる値に)設定できるようにする、という構成を採用する。
 具体的には、本発明に係る画像処理装置は、複数の登録画像のそれぞれについて、N種類(Nは2以上の整数)の特徴量が登録されている記憶部と、入力画像からN種類の特徴量を抽出する特徴量抽出部と、前記特徴量抽出部で抽出された特徴量と前記記憶部に登録されている各登録画像の特徴量に基づいて、前記入力画像と各登録画像との類否を評価する判別部と、を有し、前記判別部は、前記入力画像と登録画像の組み合わせごとに、N種類の特徴量のそれぞれについて求めたN個の類似度を重み付け合成した統合スコアを計算し、該統合スコアを用いて前記入力画像が当該登録画像に類似しているか否かを判別するものであり、各特徴量に対する重みが、登録画像ごとに異なる値に設定可能であることを特徴とする。
 この構成によれば、統合スコアを計算するときの重みを登録画像ごとに個別に設定することができる。したがって、例えば、色に特徴のある登録画像では色特徴量の重みを大きくするなど、個々の登録画像の画像特徴(他の登録画像と異なる特徴)に合わせて、各登録画像に対し適切な重みを設定しておくことで、従来のように単純に類似度を合計する方法(重み無し)や、すべての登録画像に一律の重みを適用する方法に比べて、識別精度(登録画像同士の識別能力)の向上を期待できる。
 ここで、前記記憶部に、前記複数の登録画像のそれぞれについて、N種類の特徴量とともに、各特徴量に対する重みが登録されていることが好ましい。このように予め記憶部に各登録画像の特徴量と重みを登録しておけば、統合スコアの計算及び類否判定を高速に行うことができる。
 各登録画像の重みの設定・変更は、いかなる方法ないし手段を用いて行ってもよい。例えば、画像処理装置が、登録画像ごとに各特徴量に対する重みをユーザに設定させる手動設定部を有する構成でもよいし、画像処理装置が、登録画像ごとに、他の登録画像とのあいだの識別性が高くなるように、各特徴量に対する重みを設定する自動設定部を有する構成でもよい。
 手動設定の構成の場合は、ユーザが実物(またはその画像)を見て認識した特徴上の相違に合わせて特徴量ごとの重みを設定できるため、ユーザの意図によく合致した判別結果が得られると期待できる。また、形状の個体差が大きい、照明(明るさ)の変動がある、カメラ歪がある、などといったライン特有の条件(これは、ユーザの経験や知識として与えられる)を考慮して、信頼度の低い特徴量の重みを小さくしたり、統合スコアの計算から除外(つまり重みをゼロにする)できるという利点もある。一方、自動設定の構成の場合は、手動で重みを設定するという操作が省略できるため、利便性および操作性の向上を図ることができる。
 自動設定の構成においては、登録画像同士の識別性が高くなる限り、各特徴量に対する重みはどのような基準ないしアルゴリズムにより決定してもよい。例えば、前記自動設定部は、ある登録画像について重みを設定する際に、当該登録画像と他の登録画像のあいだの類似度をN種類の特徴量のそれぞれについて計算し、類似度が低い特徴量ほど重みが大きくなるように、各特徴量に対する重みを決定するとよい。これにより、他の登録画像と似た特徴量については重みが小さく、他の登録画像に比べて顕著に異なる特徴量については重みが大きくなるので、登録画像同士の識別性を高めることができる。
 なお、自動設定により決定される重みが必ずしも適当でない場合もある。例えば、上記のように、信頼度の低い特徴量もあるからである。したがって、前記自動設定部によって設定された重みをユーザに提示するとともに、重みの修正をユーザに行わせる手動設定部をさらに有することが好ましい。これにより、ユーザの経験や知識を考慮して、各特徴量に対する重みを調整できるので、ユーザの意図に合わせた柔軟なカスタマイズが可能となる。
 本発明(画像の類否評価)は、様々な画像処理アプリケーションに応用可能である。例えば、物体の種類を判別する物体判別装置、類似画像を検索する類似画像検索装置などである。物体判別装置の場合、前記複数の登録画像が、異なる種類の物体のモデル画像に該当し、前記入力画像が判別すべき物体(種類が未知の物体)の画像に該当する。入力画像と各登録画像(モデル画像)との統合スコアを計算し、統合スコアが最も大きい登録画像(モデル画像)を特定することにより、前記入力画像に写っている物体の種類を判別(物体認識)することができる。一方、類似画像検索装置の場合、前記複数の登録画像が、画像データベースに登録された画像群に該当し、前記入力画像がクエリ画像に該当する。入力画像と各登録画像との統合スコアを計算し、統合スコアが所定値よりも大きい1つ以上の登録画像を、前記入力画像の類似画像として抽出すればよい。
 本発明が取り扱う画像(入力画像、登録画像)は2次元画像でもよいし3次元画像でもよい。3次元画像は、複数の2次元画像から構成されるデータ、ボクセルで構成される3次元データ、デプスマップ(距離マップ)のような奥行情報を含む画像、3次元の点や面に関する情報を含む画像など、どのような形式のデータでもよい。
 なお、本発明は、上記構成の少なくとも一部を有する画像処理装置、物体判別装置、もしくは類似画像検索装置として捉えることができる。また、本発明は、物体を撮影するカメラと、物体判別装置もしくは画像処理装置とを有する画像センサとして捉えることもできる。また、本発明は、上記処理の少なくとも一部を含む画像処理方法、物体判別方法、もしくは類似画像検索方法、または、かかる方法をコンピュータに実行させるためのプログラムやそのプログラムを非一時的に記憶したコンピュータ読取可能な記録媒体として捉えることもできる。上記構成および処理の各々は技術的な矛盾が生じない限り互いに組み合わせて本発明を構成することができる。
 本発明によれば、複数種類の特徴量を用いて、入力画像と複数の登録画像それぞれとの類否を精度よく評価することができる。
画像センサの全体構成を示す図。 画像センサのハードウェア構成を示す図。 画像処理装置の種類判別にかかわる機能構成を示す図。 特徴量データベースを示す図。 稼働モードにおける種類判別処理の流れを示すフローチャート。 (a)取り込まれた画像、(b)ワークの検出結果、(c)種類判別結果の一例を示す図。 図5のステップS103の処理の詳細を示すフローチャート。 設定モードにおけるモデル登録および特徴量選択の流れを示すフローチャート。 設定画面に取り込まれた画像と切り出されたモデル画像の一例を示す図。 重みの自動設定処理の流れを示すフローチャート。 特徴量の重み設定の一例を示す図。 効果の一例を示す図。 効果の一例を示す図。 範囲選択の例を示す図。 識別が困難な物体の例を示す図。
 本発明は、入力画像が与えられたときに、予め登録された複数の登録画像のなかから、入力画像に類似するもの(最も類似している画像、又は、類似度の高い複数の画像)を抽出する、画像の類否評価技術に関するものである。この技術は、FA用の画像センサ、コンピュータビジョン、マシンビジョンなどにおける物体判別や、画像データベース内の画像群のなかからクエリ画像に類似する画像を検出する類似画像検索などに応用することができる。以下に述べる実施形態では、本発明の好ましい応用例の一つとして、複数種類のワークが混在して流れる混流ラインにおいて各ワークの検出および種類判別を行うFA用の画像センサに本発明を実装した例を説明する。
 (画像センサ)
 図1を参照して、本発明の実施形態に係る画像センサの全体構成および適用場面について説明する。
 画像センサ1は、生産ラインなどに設置され、製造物(ワーク2)を撮像することで得られる入力画像を用いてワーク2の種類判別などを行うシステムである。なお、画像センサ1には、種類判別のほかにも、エッジ検出、キズ・汚れ検出、面積・長さ・重心の計測など、必要に応じて様々な画像処理機能を実装可能である。
 図1に示すように、コンベヤ3上には複数種類のワーク2が混在して流れている。画像センサ1は、カメラ11から定期的に画像を取り込み、画像処理装置10によって画像に含まれる各ワーク2の検出、種類判別などの処理を実行し、その結果をディスプレイ12に表示したり、外部装置(PLC4など)へと出力する。PLC(Programmable Logic Controller)4は、画像センサ1、コンベヤ3、ロボット等の製造装置(不図示)の制御を司るデバイスである。
 (画像センサのハードウェア構成)
 図2を参照して、画像センサ1のハードウェア構成を説明する。画像センサ1は、概略、カメラ11と画像処理装置10から構成される。
 カメラ11は、ワーク2の画像を画像処理装置10に取り込むためのデバイスであり、例えばCMOS(Complementary Metal-Oxide-Semiconductor)カメラやCCD(Charge-Coupled Device)カメラを好適に用いることができる。入力画像の形式(解像度、カラー/モノクロ、静止画像/動画、階調、データ形式など)は任意であり、ワーク2の種類やセンシングの目的に合わせて適宜選択すればよい。可視光像以外の特殊な画像(X線画像、サーモ画像など)を検査に利用する場合には、その画像に合わせたカメラを用いてもよい。また、複数のカメラを用いたり、距離センサと組み合わせたりすることで、ワーク2の3次元情報を含む画像を取得してもよい。
 画像処理装置10は、CPU(中央演算処理装置)110と、記憶部としてのメインメモリ112およびハードディスク114と、カメラインターフェイス116と、入力インターフェイス118と、表示コントローラ120と、PLCインターフェイス122と、通信インターフェイス124と、データリーダ/ライタ126とを含む。これらの各部は、バス128を介して、互いにデータ通信可能に接続される。
 カメラインターフェイス116は、CPU110とカメラ11とのあいだのデータ伝送を仲介する部分であり、カメラ11からの画像データを一時的に蓄積するための画像バッファ116aを有している。入力インターフェイス118は、CPU110と入力部(マウス13、キーボード、タッチパネル、ジョグコントローラなど)とのあいだのデータ伝送を仲介する。表示コントローラ120は、液晶モニタなどのディスプレイ12に接続され、当該ディスプレイ12での表示を制御する。PLCインターフェイス122は、CPU110とPLC4のあいだのデータ伝送を仲介する。通信インターフェイス124は、CPU110とコンソール(あるいは、パーソナルコンピュータやサーバ装置)などとのあいだのデータ伝送を仲介する。データリーダ/ライタ126は、CPU110と記憶媒体であるメモリカード14との間のデータ伝送を仲介する。
 画像処理装置10は、汎用的なアーキテクチャを有するコンピュータで構成可能であり、CPU110が、ハードディスク114またはメモリカード14に格納されたプログラム(命令コード)を読み込み、実行することで、各種機能を提供する。このようなプログラムは、メモリカード14や光ディスクなどのコンピュータ読取可能な記録媒体に格納された状態で流通する。
 汎用的なパーソナルコンピュータを画像処理装置10として利用する場合には、本実施形態で述べる物体判別機能を提供するためのアプリケーションプログラムに加えて、コンピュータの基本的な機能を提供するためのOS(オペレーション・システム)がインストールされていてもよい。この場合には、本実施形態に係るプログラムは、OSが提供するプログラムモジュールを利用することで、目的とする機能を実現してもよい。なお、本実施形態に係るプログラムは単体のアプリケーションプログラムとして提供されてもよいし、他のプログラムの一部に組み込まれるモジュールとして提供されてもよい。また、その機能の一部または全部が専用のロジック回路で代替されてもよい。
 (画像処理装置の機能構成)
 図3に、画像処理装置が提供する種類判別(物体判別)にかかわる機能構成を示す。画像処理装置10は、種類判別にかかわる機能として、画像入力部130、検出部131、特徴量抽出部132、判別部133、出力部134、記憶部135、設定部136を有している。これらの機能ブロックは、画像処理装置10のCPU110がコンピュータプログラムを実行することにより実現される。
 図4は、記憶部135に格納されている特徴量データベースの一例である。判別の対象となる複数種類の物体(モデル)ごとに、画像から抽出された特徴量と、後述する統合スコアを計算するときに用いる特徴量ごとの重みが登録されている。
 物体判別に利用可能な画像特徴には様々なものがある。本実施形態では、一例として、「色」、「形状」、「サイズ」、「模様」の4つのカテゴリの画像特徴を用いる。「色」特徴を表す指標としては、例えば、色ヒストグラム、代表色、色相、彩度、色記述子(C-SIFTなど)、色モーメントなどの特徴量を用いることができる。「形状」特徴を表す指標としては、例えば、HOG(Histograms of Oriented Gradients)特徴量、円形度、フーリエ記述子、アスペクト比、輪郭の凹凸度などの特徴量を用いることができる。また、物体の3次元情報(例えば、物体表面の奥行方向の高さ(depth)など)を形状特徴量として利用することもできる。なお物体の3次元情報は、例えば、ステレオカメラを用いたり、デプスマップ(距離マップ)を生成可能なカメラを用いたり、カメラの他にレーザ変位計などの距離センサを用いることで、取得することができる。「サイズ」特徴を表す指標としては、例えば、面積、周囲長、半径などの特徴量を用いることができる。「模様」特徴を表す指標としては、例えば、Haar-like特徴量、Local Binary Pattern、記述子(SIFT、SURFなど)、空間周波数などの特徴量を用いることができる。ここで挙げた特徴カテゴリ及び各カテゴリの特徴量は一例であり、これら以外のものを用いても構わない。また、一つの特徴カテゴリに対し複数の特徴量を用いてもよい。特徴量データベースには、5種類のモデルのそれぞれについて、上記4つのカテゴリの特徴量が登録されている。
 (画像処理装置の動作)
 画像処理装置10は、コンベヤ3上を流れるワーク2の画像を取り込み、ワーク2の検出や種類判別などの処理を実行する「稼働モード」と、稼働モードに先立ち、画像処理装置10に対して各種設定を行うための「設定モード」とを有している。モードの切り替えはユーザが任意に行うことができる。図4に示した特徴量データベースに対するモデルの登録および重みの設定は、「設定モード」で行われる作業である。
 以下、すでに図4に示す設定が行われているという前提で「稼働モード」の動作について説明をしたのち、「設定モード」におけるモデル登録および重み設定の動作について説明する。
 (1)稼働モード
 図5のフローチャートに沿って、稼働モードにおける各機能ブロックの動作、および、種類判別処理の全体の流れについて説明する。
 PLC4からのトリガー信号が入力されると、画像入力部130がカメラ11から画像を取り込む(ステップS100)。図6(a)は取り込まれた画像の一例であり、コンベヤ上に5種類の物体(例:アソートチョコレート)が混在している状態を示している。
 次に、検出部131が、入力画像から個々のワーク2を検出する(ステップS101)。検出処理にはどのようなアルゴリズムを用いてもよい。例えば、2値化により背景をカットした後、所定の面積よりも大きい領域(ピクセル群)をワーク2として検出する方法、パターンマッチングによりワークらしい領域を探索する方法などを利用することができる。なお、検出部131は、必要に応じて入力画像に対し平滑化やノイズ除去などの前処理を行うとよい。図6(b)は検出結果の一例であり、画像から検出された個々のワークの領域を点線矩形で示している。
 次に、特徴量抽出部132が、検出されたワークの画像を解析して、必要な特徴量を抽出する(ステップS102)。前述のように、本実施形態ではワークの画像から、色・形状・サイズ・模様の4つのカテゴリの特徴量がそれぞれ抽出される。
 続いて、判別部133が、ワークの特徴量を特徴量データベース(図4(a))に登録されている5種類のモデルそれぞれの特徴量と比較し、ワークの種類を判別する(ステップS103)。
 図7は、ステップS103の処理の詳細を示している。ここで、Nは用いる特徴量の種類数(本実施形態ではN=4)、Xiはi番目(i=1~N)の特徴量、Wiは特徴量Xiに対する重み、Ciは特徴量Xiに対応した識別器を表す。判別部133は、特徴量データベースを参照し、それぞれの特徴量Xiについて重みWiが「0」より大きいかを調べ(ステップS121)、重みWiが「0」より大きい場合は識別器Ciに対しワークの特徴量Xiを入力する(ステップS122)。重みWiが「0」である場合は識別器Ciによる計算をスキップする。識別器Ciは、特徴量データベースを参照し、ワークの特徴量Xiとモデルの特徴量Xiのあいだの類似度(ワークとモデルが同種の物体である確率)を計算し、スコアSiを出力する(ステップS123)。ステップS121~S123をN種類の特徴量X1~XNについて繰り返したのち、識別器C1~CNの出力スコアS1~SNを統合して最終的な統合スコアISを求める(ステップS124)。具体的には、判別部133は、下記式により、N個のスコアS1~SNの重み付き加算を行い、統合スコアISを計算する。
 IS=Σ(Wi×Si)
 なお、ステップS122およびS123をスキップした特徴量Xi(つまり、重みWi=0の特徴量)のスコアSiはゼロとするか無視すればよい。
 ステップS121~S124を5種類のモデルのそれぞれについて繰り返すことで、ワークと各モデルとのあいだの総合的な類似度(統合スコア)が得られる。判別部133は、5種類のモデルのうちで最大の統合スコアが得られたものとワークとが同種の物体であると判定する(ステップS125)。なお、最大のスコアが所定の下限値に満たない場合には、ワークが未知の物体である(5種類のモデルのいずれにも該当しない)可能性があるため、エラー(種類不明)と判定すればよい。
 ステップS101で検出されたすべてのワークに対し、ステップS102およびS103の処理を繰り返すことで、各ワークの種類を判別することができる。図6(c)は判別結果の一例であり、個々のワークの判別結果(種類)を1~5の数字で示している。この判別結果は、出力部134によってディスプレイ12またはPLC4に出力される(ステップS104)。
 (2)設定モード
 次に、図8のフローチャートに沿って、設定モードにおけるモデル登録および重み設定の動作について説明する。なお、図8に示す処理は、例えば、画像センサ1を新たに設置したとき、ラインに流すワークの種類が変更になったとき、製造条件や環境条件などが変化したとき、判別精度の改善を行うとき、などに実行される。
 (a)モデル登録
 まず、判別の対象となる5種類の物体(モデル)を用意し、それらを稼働時と同じ条件でカメラ11で撮影し、画像を取り込む(ステップS200)。図9(a)は、設定部136によりディスプレイ12に表示される設定画面のユーザインターフェイスの一例である。設定画面右側の画像ウィンドウ20には、カメラ11から画像入力部130を介して取り込まれた画像が表示される。
 次に、ユーザが、登録するモデルを指定する(ステップS201)。例えば、マウス13などの入力部を操作して、画像ウィンドウ20に表示された画像内の各モデルの領域を個別に囲むことで、各モデルの領域を教示することができる。画像ウィンドウ20内の点線矩形はユーザにより指定された各モデルの領域を示している。
 モデルの領域指定が完了すると、設定部136は、領域指定に従って各モデルの画像の切り出しを行う(ステップS202)。得られた5種類のモデル画像22は、図9(b)に示すように画像ウィンドウ20内に並べて表示される。モデル画像22それぞれに対し、モデル名称の入力が可能である。なお、ここでは、5種類すべてのモデルを一回で撮影し、画像から各モデル画像を切り出しているが、モデルを一つずつ個別に撮影することで、領域指定および画像切り出しを省略ないし簡略化してもよい。
 次に、設定部136は、特徴量抽出部132を利用して、各モデル画像22から特徴量の抽出を行う(ステップS203)。抽出された特徴量(一般に、多次元のベクトルで表現される)は、モデル別に、記憶部135内の特徴量データベースに登録される(図4参照)。以上でモデル登録が完了である。
 (b)重みの設定
 続いて、各特徴量に対する重みの設定処理に移る。重みの設定方法には、大きく分けて、ユーザが自己の判断に基づき行う手動設定と、設定部136が自動で選択する自動設定の2つの方法がある。本実施形態では、最初に設定部136による自動設定を行い、必要に応じてユーザが手動で変更する、という構成を採用する。
 (b-1)自動設定
 本実施形態の設定部136は、モデルごとの各特徴量に対する重みを、当該モデルと他のモデルとのあいだの識別性が高くなるように、決めていく。モデル同士の識別性が高くなるように重みを設定することで、判別精度(判別能力)の向上を期待できるからである。
 図10に、重みの自動設定処理の一例を示す。ここで、Nは用いる特徴量の種類数(本実施形態ではN=4)、Mは登録されているモデルの数(本実施形態ではM=5)、Xiはi番目(i=1~N)の特徴量、Rjはj番目(j=1~M)のモデル、Sijはi番目の特徴量についての注目モデルとモデルRjのあいだの類似度、SSiはi番目の特徴量についての合計類似度を表す。
 まず、設定部136は、重みを設定する対象となる注目モデルを選択する(ステップS131)。そして、設定部136は、特徴量Xiについて注目モデルとモデルRjとのあいだの類似度Sijを計算する処理を、すべてのモデルR1~RMとの組み合わせに対し行い、得られた類似度Si1~SiMを足し合わせて合計類似度SSiを計算する(ステップS132,S132)。なお本実施形態では、注目モデルとモデルRjとが同じモデルである場合も類似度計算を行っているが、注目モデルとモデルRjとが同じである場合にステップS132をスキップするようにしてもよい。また、認識時にモデルが変形する可能性がある場合には、想定される変形(アフィン変換や射影変換など)を考慮に入れて、モデル間の類似度を計算するとよい。
 すべての特徴量X1~XNについて合計類似度SS1~SSNを計算したら、設定部136は、合計類似度が低い特徴量ほど重みが大きく、合計類似度が高い特徴量ほど重みが小さくなるように、各特徴量X1~XNに対する重みW1~WNを決定する(ステップS134)。合計類似度が高いということは、その特徴量を使用して算出した類似度はモデル間の識別にはあまり役に立たない(識別能力が低い)からである。重みの具体的な計算はどのような方法でもよいが、重みを合計類似度の単調減少関数で定義するとよい。例えば、合計類似度を最大値から引いた値、合計類似度の逆数などを重みとすることができる。ただし、すべての特徴量の重みW1~WNの合計が1になるように、各重みW1~WNの値を正規化する。本実施形態では、下記式のように合計類似度の逆数に比例するよう各特徴量の重みを決定する。
 重みWi=α×(1/合計類似度SSi)
 (α:ΣWiが1となるように正規化するための係数)
 図8のステップS204において、設定部136が、すべてのモデルに対して図10の処理を適用することで、モデルごとの各特徴量に対する重みを決定することができる。決定した重みは、設定部136により、記憶部135の特徴量データベースに登録される。なお、図11(a)に示すように、設定画面上でいずれかのモデル画像を選択すると、そのモデルの重み設定が左側の情報ウィンドウ21に表示される。ユーザは、この画面をみることで、モデルごとに設定された特徴量の重み(画像処理装置10が推奨する重み)を確認することができる。
 (b-2)手動設定
 上述した自動設定は、ユーザによる操作が不要となるため、利便性および操作性の向上を図ることができるという利点がある。しかし、自動設定により決定される重みが必ずしも適当でない場合も想定される。例えば、形状やサイズの個体差が大きい物体に対して「形状」や「サイズ」の重みを大きくするのは妥当でないし、照明(明るさ)の変動がある環境では「色」に関する特徴量は信頼度が低い可能性もある。また、カメラ歪がある場合には、ワークの画像内での位置に依存して形状が歪むため、「形状」に関する特徴量は信頼度が低い可能性がある。ここで例示したようなライン特有の条件や事情は、モデル登録に用いた画像からでは知ることができないので、自動設定では考慮することが難しい。そこで、本実施形態の設定部136は、手動設定というオプションを用意し、ユーザの経験や知識に基づくカスタマイズ(設定の追い込み)を可能とする。
 具体的には、ユーザが、マウス13などの入力部を操作して、各特徴量に対する重みを任意に変更することができる(ステップS206)。図11(b)は、ユーザが1番目のモデル(チョコレートA)における重みを変更した例である。最後に、OKボタン25が押下されると、設定部136が記憶部135内の特徴量データベースの重み設定を更新し、処理を終了する。
 手動設定の場合は、ユーザが実物(またはその画像)を見て認識した特徴上の相違(例えば、「色の違いが目立つ」、「形状の違いで区別したい」など)に合わせて重みを設定できるため、ユーザの意図によく合致した判別結果が得られると期待できる。また、前述のように、ユーザの経験や知識を考慮して、信頼度の低い特徴量(個体ごとのばらつきや環境変動によるばらつきが大きい特徴量)の重みを小さくしたり(ゼロでもよい)、逆に、信頼度の高い特徴量(個体ごとのばらつきや環境変動によるばらつきが小さい特徴量)の重みを大きくするなど、ユーザの意図に合わせた柔軟なカスタマイズが可能となり、より良い判別精度が期待できる。なお、本実施形態では、特徴カテゴリのリストを提示し、特徴カテゴリの単位で重みを設定するようにしたので、特徴量の名称(ヒストグラム、HOG特徴量、Haar-like特徴量など)をそのまま提示するよりも、意味を理解しやすく、作業者の利便性や操作容易性に優れる。
 (効果)
 以上述べた本実施形態の画像処理装置10によれば、統合スコアを計算するときの重みをモデルごとに個別に設定することができる。したがって、色に特徴のあるモデルでは色特徴量の重みを大きくするなど、個々のモデルの画像特徴(他のモデルと異なる特徴)に合わせて、各モデルに対し適切な重みを設定しておくことで、従来のように単純に類似度を合計する方法(重み無し)や、すべてのモデルに一律の重みを適用する方法に比べて、識別精度の向上を期待できる。
 図12に、モデルごとに重みを個別設定したときの効果の一例を示す。図12のモデル1~モデル3は、図15のものと同じである。すなわち、モデル1~モデル3は外形が同じであり、モデル1とモデル2は内部の図形のみ異なり、モデル1とモデル3は色のみ異なる。入力画像としては、モデル3の一部を隠した画像を用いる。候補となるモデル1~3に対して、各特徴量における類似度を単純に合計した合計した類似度と、重み付き類似度を算出した結果を示している。合計類似度(重み無し)を用いた場合では、誤ってモデル1と認識してしまうが、重み付き類似度を用いた場合は正しくモデル3と認識される。
 図13は、モデル3の画像を入力画像として認識を行った例である。この場合は、合計類似度、重み付き類似度のどちらを用いてもモデル3と正しく認識されるが、重み付き類似度を用いた場合の方がモデル間の識別性(モデル3に対する類似度と他のモデルに対する類似度の差)が高まることが分かる。このことは、実際のアプリケーションにおいてノイズや照明変動、物体の変形などにより入力画像に変動が加わった場合においても、高い認識性能を維持できること意味している。
 (変形例)
 上述した実施形態の構成は本発明の一具体例を示したものにすぎず、本発明の範囲を限定する趣旨のものではない。本発明はその技術思想を逸脱しない範囲において、種々の具体的構成を採り得るものである。例えば上記実施形態では、本発明を物体判別装置に適用した例を説明したが、本発明の適用範囲はこれに限らず、類似画像検索装置などへ適用することも好ましい。
 図14に示すように、設定部136が、物体全体のうちのどの範囲から特徴量を抽出するかをユーザに範囲指定させることも好ましい。図14に示したのは、パッケージに付されたラベルの内容が異なるシリーズ商品であり、色特徴量や模様特徴量による判別が有効である。この例のように、商品間の相違が一部分(ラベルのみ)に限られていることが分かっている場合には、予め特徴量を抽出する範囲を指定(限定)することで、商品間の識別性をより高めることができ、判別精度のさらなる向上を期待できる。また、模様やデザインが複雑な物体の場合も、物体全体から特徴量を抽出するよりも、一部の領域(例えば商品名の部分など)のみから特徴量を抽出するほうが有効である場合もある。範囲指定の具体的な操作法としては、例えば、マウス13などの入力部を用いて、モデル画像22上に特徴量抽出範囲27を描画する方法などを採用すればよい。指定された範囲は、例えば、画像座標などの形式で特徴量とともに特徴量データベースに登録される。なお、特徴量ごとに異なる範囲を指定できることが好ましい。
 上述した実施形態では、自動設定と手動設定を併用したが、自動設定のみ、あるいは、手動設定のみの構成としてもよい。なお、上述した実施形態では、特徴カテゴリの単位で重みを設定したが、同じカテゴリで複数種類の特徴量を用いる場合には、その特徴量ごとに重みを設定できるようにしてもよい。また上記実施形態では、重みの合計が1になるように重みを正規化したが、重みは正規化しておかずに、重み付き類似度(統合スコア)を計算した後で重み付き類似度に対して正規化を行っても構わない。
 図1では、カメラと画像処理装置が別体で構成されているが、カメラと画像処理装置が一体となった構成の画像センサを用いることもできる。また、画像処理装置に複数台のカメラを接続し、一つの画像センサで複数のラインの計測・監視を行うこともできる。また、グリッドコンピューティング、クライアントサーバシステム、クラウドコンピューティングなどの技術を適用し、画像処理装置の機能の一部または全部を別のコンピュータで実行するようにしてもよい。
1:画像センサ、2:ワーク、3:コンベヤ、4:PLC
10:画像処理装置、11:カメラ、12:ディスプレイ
20:画像ウィンドウ、21:情報ウィンドウ、22:モデル画像、25:OKボタン、27:特徴量抽出範囲
130:画像入力部、131:検出部、132:特徴量抽出部、133:判別部、134:出力部、135:記憶部、136:設定部

Claims (11)

  1.  複数の登録画像のそれぞれについて、N種類(Nは2以上の整数)の特徴量が登録されている記憶部と、
     入力画像からN種類の特徴量を抽出する特徴量抽出部と、
     前記特徴量抽出部で抽出された特徴量と前記記憶部に登録されている各登録画像の特徴量に基づいて、前記入力画像と各登録画像との類否を評価する判別部と、
    を有し、
     前記判別部は、前記入力画像と登録画像の組み合わせごとに、N種類の特徴量のそれぞれについて求めたN個の類似度を重み付け合成した統合スコアを計算し、該統合スコアを用いて前記入力画像が当該登録画像に類似しているか否かを判別するものであり、
     各特徴量に対する重みが、登録画像ごとに異なる値に設定可能である
    ことを特徴とする画像処理装置。
  2.  前記記憶部に、前記複数の登録画像のそれぞれについて、N種類の特徴量とともに、各特徴量に対する重みが登録されている
    ことを特徴とする請求項1に記載の画像処理装置。
  3.  登録画像ごとに各特徴量に対する重みをユーザに設定させる手動設定部をさらに有する
    ことを特徴とする請求項1又は2に記載の画像処理装置。
  4.  登録画像ごとに、他の登録画像とのあいだの識別性が高くなるように、各特徴量に対する重みを設定する自動設定部をさらに有する
    ことを特徴とする請求項1又は2に記載の画像処理装置。
  5.  前記自動設定部は、ある登録画像について重みを設定する際に、当該登録画像と他の登録画像のあいだの類似度をN種類の特徴量のそれぞれについて計算し、類似度が低い特徴量ほど重みが大きくなるように、各特徴量に対する重みを決定する
    ことを特徴とする請求項4に記載の画像処理装置。
  6.  前記複数の登録画像は、それぞれ異なる種類の物体のモデル画像であり、
     前記画像処理装置は、前記入力画像との統合スコアが最も大きい登録画像を特定することにより、前記入力画像に写っている物体の種類を判別する物体判別装置である
    ことを特徴とする請求項1~5のうちいずれか1項に記載の画像処理装置。
  7.  前記画像処理装置は、前記入力画像との統合スコアが所定値よりも大きい1つ以上の登録画像を、前記入力画像の類似画像として抽出する類似画像検索装置である
    ことを特徴とする請求項1~5のうちいずれか1項に記載の画像処理装置。
  8.  物体を撮影するカメラと、
     前記カメラから入力された画像から前記物体の種類を判別し、その結果を出力する、請求項6に記載の画像処理装置と、を有する
    ことを特徴とする画像センサ。
  9.  コンピュータが、複数の登録画像のそれぞれについて、N種類(Nは2以上の整数)の特徴量を記憶部に登録するステップと、
     コンピュータが、入力画像からN種類の特徴量を抽出するステップと、
     コンピュータが、前記抽出された特徴量と前記記憶部に登録されている各登録画像の特徴量に基づいて、前記入力画像と各登録画像との類否を評価する判別ステップと、
    を有し、
     前記判別ステップでは、前記入力画像と登録画像の組み合わせごとに、N種類の特徴量のそれぞれについて求めたN個の類似度を重み付け合成した統合スコアを計算し、該統合スコアを用いて前記入力画像が当該登録画像に類似しているか否かを判別するものであり、
     各特徴量に対する重みが、登録画像ごとに異なる値に設定可能である
    ことを特徴とする画像処理方法。
  10.  請求項9に記載の画像処理方法の各ステップをコンピュータに実行させる
    ことを特徴とするプログラム。
  11.  請求項10に記載のプログラムを非一時的に記憶する
    ことを特徴とするコンピュータ読取可能な記録媒体。
PCT/JP2014/057005 2014-03-14 2014-03-14 画像処理装置、画像センサ、画像処理方法 WO2015136716A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/057005 WO2015136716A1 (ja) 2014-03-14 2014-03-14 画像処理装置、画像センサ、画像処理方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/057005 WO2015136716A1 (ja) 2014-03-14 2014-03-14 画像処理装置、画像センサ、画像処理方法

Publications (1)

Publication Number Publication Date
WO2015136716A1 true WO2015136716A1 (ja) 2015-09-17

Family

ID=54071193

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/057005 WO2015136716A1 (ja) 2014-03-14 2014-03-14 画像処理装置、画像センサ、画像処理方法

Country Status (1)

Country Link
WO (1) WO2015136716A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111325250A (zh) * 2019-12-31 2020-06-23 深圳云天励飞技术有限公司 图像处理方法及相关设备
CN115078662A (zh) * 2022-07-22 2022-09-20 广东省农业科学院蚕业与农产品加工研究所 一种蔬果保鲜状态的智能分析方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000285141A (ja) * 1999-01-27 2000-10-13 Ricoh Co Ltd 画像検索装置,画像分類装置およびそれらの装置としてコンピュータを機能させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体
JP2003006645A (ja) * 2001-06-20 2003-01-10 Secom Co Ltd 本人認証用の顔画像照合装置
JP2003058888A (ja) * 2001-08-15 2003-02-28 Secom Co Ltd 個人照合装置
JP2005284973A (ja) * 2004-03-30 2005-10-13 Fujitsu Ltd 生体情報照合装置並びに生体特徴情報絞込み装置,生体特徴情報絞込みプログラムおよび同プログラムを記録したコンピュータ読取可能な記録媒体

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000285141A (ja) * 1999-01-27 2000-10-13 Ricoh Co Ltd 画像検索装置,画像分類装置およびそれらの装置としてコンピュータを機能させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体
JP2003006645A (ja) * 2001-06-20 2003-01-10 Secom Co Ltd 本人認証用の顔画像照合装置
JP2003058888A (ja) * 2001-08-15 2003-02-28 Secom Co Ltd 個人照合装置
JP2005284973A (ja) * 2004-03-30 2005-10-13 Fujitsu Ltd 生体情報照合装置並びに生体特徴情報絞込み装置,生体特徴情報絞込みプログラムおよび同プログラムを記録したコンピュータ読取可能な記録媒体

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111325250A (zh) * 2019-12-31 2020-06-23 深圳云天励飞技术有限公司 图像处理方法及相关设备
CN115078662A (zh) * 2022-07-22 2022-09-20 广东省农业科学院蚕业与农产品加工研究所 一种蔬果保鲜状态的智能分析方法及系统

Similar Documents

Publication Publication Date Title
US10055670B2 (en) Image recognition device, image sensor, and image recognition method using feature
WO2015115274A1 (ja) 物体判別装置、画像センサ、物体判別方法
US9483707B2 (en) Method and device for recognizing a known object in a field of view of a three-dimensional machine vision system
US11232589B2 (en) Object recognition device and object recognition method
CN109961082B (zh) 物体识别处理装置、物体识别处理方法以及存储介质
US8526679B2 (en) Image processing apparatus and image processing method
CN108573471B (zh) 图像处理装置、图像处理方法以及记录介质
Quadros et al. An occlusion-aware feature for range images
CN113111844B (zh) 一种作业姿态评估方法、装置、本地终端及可读存储介质
CN105426901A (zh) 用于对摄像头视野中的已知物体进行分类的方法
US10311564B2 (en) Image processing device, image sensor, and image processing method
JP7377159B2 (ja) 個体識別システム、個体識別プログラム、及び記録媒体
WO2015136716A1 (ja) 画像処理装置、画像センサ、画像処理方法
JP6855175B2 (ja) 画像処理装置、画像処理方法およびプログラム
JP6350018B2 (ja) 対象物検出装置及び要素選択装置
KR20220083347A (ko) 영상을 이용한 물건 부피의 측정 장치, 방법, 및 컴퓨터 프로그램
WO2021220825A1 (ja) 個体識別システム
WO2021220827A1 (ja) 個体識別システム
WO2021220828A1 (ja) 個体識別システム
JP7377161B2 (ja) 個体識別システム
JP7035357B2 (ja) 画像判定用コンピュータプログラム、画像判定装置及び画像判定方法
Malyadri et al. Quality Testing of Rice Grains using SVM
Madani et al. Machine-awareness in indoor environment: A pseudo-3D vision-based approach combining multi-resolution visual information
JP6535605B2 (ja) 物体領域選択方法、装置、及びプログラム

Legal Events

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

Ref document number: 14885475

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14885475

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP