JP2017194352A - Image processing device, image processing method and program - Google Patents

Image processing device, image processing method and program Download PDF

Info

Publication number
JP2017194352A
JP2017194352A JP2016084732A JP2016084732A JP2017194352A JP 2017194352 A JP2017194352 A JP 2017194352A JP 2016084732 A JP2016084732 A JP 2016084732A JP 2016084732 A JP2016084732 A JP 2016084732A JP 2017194352 A JP2017194352 A JP 2017194352A
Authority
JP
Japan
Prior art keywords
image
light source
bright spot
captured image
subject
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2016084732A
Other languages
Japanese (ja)
Inventor
秀康 田代
Hideyasu Tashiro
秀康 田代
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2016084732A priority Critical patent/JP2017194352A/en
Publication of JP2017194352A publication Critical patent/JP2017194352A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To determine an appropriate geometric condition for measuring a sense of luminosity.SOLUTION: Provided is an image processing device comprising: first image input means for inputting a first captured image in which a subject irradiated by a first light source is imaged; surface normal calculation means for calculating, for each pixel in the first captured image, a surface normal when it constitutes a luminescent spot and calculating a surface normal image; division means for dividing the captured image into a plurality of regions for each of prescribed angle ranges; luminescent spot probability calculation means for quantizing the first captured image and generating a luminescent spot image, and calculating, for each region, the ratio of a total area of luminescent spots included in the region to a total area of the region on the basis of the captured image and the luminescent spot image, and calculating luminescent spot probability that corresponds to the prescribed angle range; and geometric condition determination means for determining, upon imaging the subject illuminated by a second light source, a geometric condition for the second light source that allows each of luminescent spots in the obtained captured image to be separated, on the basis of the luminescent spot probability.SELECTED DRAWING: Figure 3

Description

本発明は、被写体の光輝感を測定するための画像処理技術に関する。   The present invention relates to an image processing technique for measuring the brightness of a subject.

従来、メタリック材など光輝感を有する塗板の光輝感を計測する方法が知られている。特許文献1には、光輝感をキラキラ感と粒子感のそれぞれを分けて定量的に評価する方法を開示している。特許文献1に開示された方法ではまず光輝材含有塗膜面を光照射し、正反射光が入射しない角度で塗膜面をカメラで撮影する。そして撮影した画像を解析して得られる区画ごとの輝度に基づいて、キラキラ感と粒子感を表す評価値を算出する。   Conventionally, a method for measuring the glitter feeling of a coated plate having a glitter feeling such as a metallic material is known. Patent Document 1 discloses a method for quantitatively evaluating the glitter feeling by dividing each of the glitter feeling and the particle feeling. In the method disclosed in Patent Document 1, first, the glittering material-containing coating film surface is irradiated with light, and the coating film surface is photographed with a camera at an angle at which regular reflection light does not enter. Then, based on the luminance for each section obtained by analyzing the photographed image, an evaluation value representing the glitter feeling and the particle feeling is calculated.

特開2000−304696号公報JP 2000-304696 A

光輝材含有塗膜面は、観察角度に応じて光輝度となる位置や数が異なる。従って光輝感を計測するために、光輝度となる位置や数が適切に撮像可能な幾何条件で、照射する光源や撮影するカメラを配置する必要がある。しかしながら特許文献1に開示された方法では、必ずしも光輝度を評価するのに適した画像を得ることができない。そこで本発明は、光輝感を計測するために適切な幾何条件で、被写体を撮影することを目的とする。   The position and number of the glittering material-containing coating film surface are different depending on the observation angle. Therefore, in order to measure the glitter feeling, it is necessary to arrange the light source to irradiate and the camera to shoot under the geometric conditions that allow the position and number of light brightness to be appropriately imaged. However, the method disclosed in Patent Document 1 cannot always obtain an image suitable for evaluating the light luminance. SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to photograph a subject under an appropriate geometric condition for measuring glitter.

上記課題を解決するため本発明は、被写体の輝点からなる光輝感を計測する計測装置のための画像処理装置であって、第1の光源が照射した被写体を撮像することにより得られる第1の撮像画像を入力する第1の画像入力手段と、前記第1の撮像画像における各画素について、輝点となる場合の面法線を算出して面法線画像を算出する面法線算出手段と、前記撮像画像を、所定の角度範囲ごとの複数の領域に分割する分割手段と、前記第1の撮像画像を量子化することにより輝点を表す輝点画像を生成し、前記撮像画像および前記輝点画像に基づいて、前記領域ごとに、該領域の総面積に対する該領域に含まれる輝点の総面積の比率を算出し、前記領域ごとの比率を用いて、前記所定の角度範囲に対応する輝点確率を算出する輝点確率算出手段と、前記輝点確率に基づいて、前記第1の光源よりも指向性が強い配光特性を有する第2の光源が照明した前記被写体を撮像した場合に、得られる撮像画像において輝点それぞれが分離可能となる前記第2の光源の幾何条件を決定する幾何条件決定手段と、を有することを特徴とする。   In order to solve the above-described problems, the present invention is an image processing apparatus for a measuring apparatus that measures the brightness of a subject's bright spots, and is obtained by imaging a subject irradiated with a first light source. First image input means for inputting the captured image, and surface normal calculation means for calculating a surface normal image for each pixel in the first captured image by calculating a surface normal when it becomes a bright spot. And dividing means for dividing the captured image into a plurality of regions for each predetermined angle range; and generating a bright spot image representing a bright spot by quantizing the first captured image; and Based on the bright spot image, the ratio of the total area of bright spots included in the area to the total area of the area is calculated for each area, and the ratio for each area is used to calculate the ratio within the predetermined angle range. Bright spot probability calculator that calculates the corresponding bright spot probability And each of the bright spots in the captured image obtained when the subject illuminated by the second light source having a light distribution characteristic having higher directivity than the first light source is captured based on the bright spot probability. Geometric condition determining means for determining a geometric condition of the second light source that can be separated.

本発明によれば、光輝感を計測するために適切な幾何条件で、被写体を撮影できる。   According to the present invention, it is possible to photograph a subject under an appropriate geometric condition for measuring glitter.

被写体および被写体を計測する計測装置。Measuring device that measures the subject and the subject. 計測装置の構成を示す図。The figure which shows the structure of a measuring device. 画像処理部215の詳細な論理構成を示すブロック図。FIG. 2 is a block diagram showing a detailed logical configuration of an image processing unit 215. 画像処理部215が実行する処理のフローチャート。The flowchart of the process which the image process part 215 performs. 面法線画像を説明する図。The figure explaining a surface normal image. 面法線画像の分割方法を説明する図。The figure explaining the division | segmentation method of a surface normal image. 輝点確率算出処理のフローチャート。The flowchart of a bright spot probability calculation process. 幾何条件決定処理のフローチャート。The flowchart of a geometric condition determination process. 輝点特徴量算出を説明する図。The figure explaining a bright spot feature-value calculation. 輝点画像を説明する図。The figure explaining a bright spot image. 平均仰角に対応する輝点面積率を示す図。The figure which shows the bright spot area ratio corresponding to an average elevation angle. 第2の照明部203の位置を示す図。The figure which shows the position of the 2nd illumination part 203. FIG. 撮像画像の一例を示す図。The figure which shows an example of a captured image. 輝点確率算出312が実行する処理のフローチャート。The flowchart of the process which the bright spot probability calculation 312 performs. 第2の照明部の位置を説明する図。The figure explaining the position of a 2nd illumination part. 面法線範囲の概念を示す図。The figure which shows the concept of a surface normal range. 輝点確率算出に用いる領域の概念図。The conceptual diagram of the area | region used for a bright spot probability calculation.

以下、添付図面を参照し、本発明の実施形態について説明する。なお、以下の実施形態において示す構成は、一例に過ぎず、本発明は図示された構成に限定するものではない。   Embodiments of the present invention will be described below with reference to the accompanying drawings. Note that the configurations shown in the following embodiments are merely examples, and the present invention is not limited to the illustrated configurations.

<第1実施形態>
第1実施形態では、点光源と平行光源を用いて被写体を照射し、撮影した画像に基づいて光輝感を計測する方法について説明する。図1(a)は、被写体101である金属片を表面に塗装した塗板を模式的に示す。被写体101の表面には、複数の金属片が含まれている。撮像部102が例えば被写体101と正対する方向に配置されているとする。図1(a)に示すように、一部の金属片は、ある照射角度から照射された反射光が、撮像装置102の角度に反射する。このとき撮像部102が被写体101を撮影すると、複数の輝点を有する撮影画像103が得られる。本実施形態では、計測対象となる被写体の輝点の数、大きさ、強度を、光輝感を示す特徴量として計測する。ただし、被写体に対して適切な位置で照射、撮影しないと、本来別の輝点として撮影画像に記録されるべき複数の輝点が集合し、1つの輝点として撮像されてしまう。そこで本実施形態ではまず、点光源が照射した被写体プレ撮像した画像に基づいて、平行光源を用いて照射した被写体を撮像する際に、撮像画像において被写体の各々の輝点が分離可能となる平行光源の入射角条件を算出する。
<First Embodiment>
In the first embodiment, a method of irradiating a subject using a point light source and a parallel light source and measuring the glitter feeling based on the captured image will be described. FIG. 1A schematically shows a coated plate having a metal piece as the subject 101 coated on the surface. The surface of the subject 101 includes a plurality of metal pieces. Assume that the imaging unit 102 is arranged in a direction facing the subject 101, for example. As shown in FIG. 1A, in some metal pieces, reflected light irradiated from a certain irradiation angle reflects to the angle of the imaging device 102. At this time, when the imaging unit 102 captures the subject 101, a captured image 103 having a plurality of bright spots is obtained. In the present embodiment, the number, size, and intensity of the bright spots of the subject to be measured are measured as feature quantities indicating glitter. However, if the subject is not irradiated and photographed at an appropriate position, a plurality of bright spots that should be recorded in the photographed image as separate bright spots are collected and imaged as one bright spot. Therefore, in this embodiment, first, when imaging a subject irradiated with a parallel light source based on a pre-photographed image of a subject irradiated with a point light source, each of the bright spots of the subject can be separated in the captured image. The incident angle condition of the light source is calculated.

図2は、第1実施形態に適用可能な計測装置の構成を示す図である。撮像部201は、レンズ、絞り、シャッタ、光学ローパスフィルタ、カラーフィルタ、及び、CMOSやCCDなどのセンサを有する。撮像部201は、被写体から反射される反射光の光量を検知し、A/D変換を経てデータ転送経路であるバス215にデジタル画像を出力する。図1(b)は、第1実施形態の計測装置における、撮像部201、光源、被写体の位置関係を示す。被写体101におけるある点を原点(0,0、0)とする。撮像部201は、被写体101の上部C(0,0、d)の位置に配置されている。第1の照明部202と第2の照明部203は、被写体に光を照射する。前記第2の照明部203は、第1の照明部202よりも指向性が強い配光特性を有する。ここでは第1の照明部202は、点光源であり、図1(b)に示す通りL(dsinθ,0,dcosθ)の位置に配置されている。第2の照明部203は、2つの平行光源であり、図1(b)に示すように点L(dsinθ,0,dcosθ)の位置と点L(dsinθ,0,dcosθ)との配置されている。 FIG. 2 is a diagram illustrating a configuration of a measurement apparatus applicable to the first embodiment. The imaging unit 201 includes a lens, a diaphragm, a shutter, an optical low-pass filter, a color filter, and a sensor such as a CMOS or a CCD. The imaging unit 201 detects the amount of reflected light reflected from the subject, and outputs a digital image to the bus 215 that is a data transfer path through A / D conversion. FIG. 1B shows the positional relationship between the imaging unit 201, the light source, and the subject in the measurement apparatus of the first embodiment. A point on the subject 101 is set as the origin (0, 0, 0). The imaging unit 201 is arranged at the position of the upper part C (0, 0, d) of the subject 101. The first illumination unit 202 and the second illumination unit 203 irradiate the subject with light. The second illumination unit 203 has a light distribution characteristic that is more directional than the first illumination unit 202. Here, the first illumination unit 202 is a point light source, and is arranged at a position of L 1 (dsin θ 1 , 0, dcos θ 1 ) as shown in FIG. The second illumination unit 203 is two parallel light sources, and as shown in FIG. 1B, the position of the point L 2 (dsin θ 2 , 0, dcos θ 2 ) and the point L 3 (dsin θ 3 , 0, dcos θ 3). ) And is arranged.

ROM204とRAM205は、撮像や画像処理に必要なプログラム、データ、作業領域などをCPU206に提供する。CPU206はRAM205をワークメモリとして、ROM204やRAM205に格納されたプログラムを読み出して実行し、バス215を介して各構成を制御する。これにより、後述する様々な処理が実行される。   The ROM 204 and RAM 205 provide the CPU 206 with programs, data, work areas, and the like necessary for imaging and image processing. The CPU 206 reads out and executes a program stored in the ROM 204 or RAM 205 using the RAM 205 as a work memory, and controls each component via the bus 215. Thereby, various processes described later are executed.

撮像制御部207は、撮像部201に対してフォーカスを合わせたり、シャッタを開いたり、絞りを調節するなどを制御する。操作部208は、ボタンやモードダイヤルなどが該当する。撮像制御部207はCPU206から指示を受けると、撮像部201にプレ撮像画像または撮像画像を取得させ、取得した画像を所定のメモリに記憶させる。操作部208を介して、ユーザは電源の起動や処理パラメータの設定など各種の指示を入力することができる。表示部210は、画像処理部215から受け取った撮像画像や文字を表示する。また表示部210が、タッチスクリーン機能を有していても良く、その場合は、ユーザ指示を入力する操作部208としても機能する。本実施形態では、表示部210は液晶ディスプレイを用いる。外部メモリ制御部213は、PC(パーソナルコンピュータ)やその他メディア214(例えば、ハードディスク、メモリーカード、CFカード、SDカード、USBメモリ)と接続するためのインターフェースである。   The imaging control unit 207 controls focusing on the imaging unit 201, opening a shutter, adjusting a diaphragm, and the like. The operation unit 208 corresponds to a button, a mode dial, or the like. Upon receiving an instruction from the CPU 206, the imaging control unit 207 causes the imaging unit 201 to acquire a pre-captured image or a captured image and store the acquired image in a predetermined memory. Via the operation unit 208, the user can input various instructions such as power activation and processing parameter setting. The display unit 210 displays captured images and characters received from the image processing unit 215. The display unit 210 may have a touch screen function. In that case, the display unit 210 also functions as an operation unit 208 for inputting a user instruction. In the present embodiment, the display unit 210 uses a liquid crystal display. The external memory control unit 213 is an interface for connecting to a PC (personal computer) and other media 214 (for example, hard disk, memory card, CF card, SD card, USB memory).

画像処理部215は、撮像部201から得られたデジタル画像に基づいて、被写体101の光輝感を示す光輝感特徴量を算出する。なお本実施形態において画像処理部215は、CPU206が所定のプログラムを実行することで実現する構成である。画像処理部215は、算出した光輝感特徴量を示す情報をバス215へ出力する。   The image processing unit 215 calculates a glitter feature amount indicating the glitter feeling of the subject 101 based on the digital image obtained from the imaging unit 201. In the present embodiment, the image processing unit 215 is configured to be realized by the CPU 206 executing a predetermined program. The image processing unit 215 outputs information indicating the calculated glitter feature quantity to the bus 215.

図3は、画像処理部215の詳細な論理構成を示すブロック図である。プレ撮像画像入力部306は、点光源下である第1の照明部202が照明する被写体を撮像したプレ撮像画像を入力する。入力したプレ撮像画像は、被写体の輝点特徴量を算出するためではなく、被写体を照射する照明の位置を決定するために用いられる。なお、以降プレ撮像画像の撮像をプレ撮像と呼ぶ。光源位置情報入力部307は、プレ撮像時の第1の照明部202の位置を示す情報を入力する。撮像部位置情報入力部308は、プレ撮像時の撮像部201の位置を示す撮像部位置情報を入力する。撮像パラメータ入力部309は、プレ撮像時の撮像部201の撮像パラメータを入力する。   FIG. 3 is a block diagram illustrating a detailed logical configuration of the image processing unit 215. The pre-captured image input unit 306 inputs a pre-captured image obtained by capturing an image of the subject illuminated by the first illumination unit 202 under the point light source. The input pre-captured image is used not for calculating the bright spot feature quantity of the subject but for determining the position of the illumination that irradiates the subject. Hereinafter, the imaging of the pre-captured image is referred to as pre-imaging. The light source position information input unit 307 inputs information indicating the position of the first illumination unit 202 during pre-imaging. The imaging unit position information input unit 308 inputs imaging unit position information indicating the position of the imaging unit 201 at the time of pre-imaging. The imaging parameter input unit 309 inputs imaging parameters of the imaging unit 201 during pre-imaging.

面法線算出部310は、光源位置情報、撮像部位置情報、撮像パラメータとに基づいて、プレ撮像画像において輝点となる場合の面法線を算出し、画素毎に面法線方向を示す面法線画像を算出する。算出した面法線画像は領域分割部311へ出力する。領域分割部311は、面法線画像に基づいて、プレ撮像画像を輝点の面法線方向の仰角θについて所定の閾値Δθごとに分割する。領域分割部311は、分割した各領域のみを抽出することで得られる複数の画像を、分割画像として出力する。輝点確率算出部312は、プレ撮像画像と、各分割領域データから、各分割領域において輝点が生じる確率を算出する。算出した輝点確率は幾何条件決定部313へ出力する。幾何条件決定部313は、輝点確率に基づいて第2の照明部203(平行光源)が照射した被写体を撮像して得られる画像において、各々の輝点が分離可能となる平行光源の入射角条件を決定する。撮像画像入力部314は、第2の照明部203を、幾何条件を満たす位置に配置して照射した被写体を撮像した画像を入力する。入力した撮像画は輝点特徴量算出部315へ出力する。輝点特徴量算出部315は、撮像画像に写る輝点の強度、数、大きさを輝点特徴量として算出する。   The surface normal calculation unit 310 calculates a surface normal in the case of a bright spot in the pre-captured image based on the light source position information, the imaging unit position information, and the imaging parameters, and indicates the surface normal direction for each pixel. A surface normal image is calculated. The calculated surface normal image is output to the region dividing unit 311. The area dividing unit 311 divides the pre-captured image for each predetermined threshold Δθ with respect to the elevation angle θ of the bright spot in the surface normal direction based on the surface normal image. The area dividing unit 311 outputs a plurality of images obtained by extracting only the divided areas as divided images. The bright spot probability calculation unit 312 calculates the probability that a bright spot will occur in each divided area from the pre-captured image and each divided area data. The calculated bright spot probability is output to the geometric condition determination unit 313. The geometric condition determination unit 313 is configured to capture the subject irradiated by the second illumination unit 203 (parallel light source) based on the bright spot probability. In the image obtained by separating each bright spot, the incident angle of the parallel light source can be obtained. Determine the conditions. The picked-up image input unit 314 inputs an image obtained by picking up an image of a subject irradiated with the second illumination unit 203 arranged at a position that satisfies the geometric condition. The input captured image is output to the bright spot feature amount calculation unit 315. The bright spot feature quantity calculation unit 315 calculates the intensity, number, and size of bright spots in the captured image as the bright spot feature quantity.

図4は、第1実施形態における画像処理部215が実行する処理のフローチャートである。図4に示すフローチャートを記述したコンピュータで実行可能なプログラムを、CPU206がROM204から読み出してRAM205上に書き込み、該プログラムを実行することによって当該処理が実施される。ステップS401においてプレ撮像画像入力部306は、第1の照明部202が照射した被写体を撮像部201が撮影した画像を、プレ撮影画像として入力する。入力したプレ撮像画像はROM204またはRAM205の記憶領域に記憶する。ステップS402において光源位置情報入力部307は、プレ撮像時に被写体を照射していた第1の照明部202(点光源)が配置された位置を示す光源位置情報を入力する。ここでは前述の通り、第1の照明部202の光源位置情報として、点L(dsinθ,0,dcosθ)が入力される。光源位置情報入力部207は、光源位置情報を所定の記憶領域に記憶する。 FIG. 4 is a flowchart of processing executed by the image processing unit 215 in the first embodiment. The CPU 206 reads out a program executable by the computer describing the flowchart shown in FIG. 4 from the ROM 204, writes the program on the RAM 205, and executes the program to execute the processing. In step S401, the pre-captured image input unit 306 inputs, as a pre-captured image, an image captured by the imaging unit 201 of the subject irradiated by the first illumination unit 202. The input pre-captured image is stored in the storage area of the ROM 204 or RAM 205. In step S <b> 402, the light source position information input unit 307 inputs light source position information indicating the position where the first illumination unit 202 (point light source) that has irradiated the subject at the time of pre-imaging is disposed. Here, as described above, the point L 1 (dsin θ 1 , 0, dcos θ 1 ) is input as the light source position information of the first illumination unit 202. The light source position information input unit 207 stores the light source position information in a predetermined storage area.

ステップS403において撮像部位置情報入力部308は、プレ撮像時の撮像部202が配置された位置を示す撮像部位置情報を入力する。本実施形態では、点C(0,0,d)が撮像部位置情報として入力される。撮像部位置情報入力部308は、入力した撮像部位置情報を所定の記憶領域に記憶する。ステップS404において撮像パラメータ入力部309は、プレ撮像時の撮像部202のレンズ焦点距離を示す撮像パラメータを入力する。撮像パラメータ入寮部209は、入力した撮像パラメータを所定の記憶領域に記憶する。   In step S403, the imaging unit position information input unit 308 inputs imaging unit position information indicating a position where the imaging unit 202 is arranged at the time of pre-imaging. In the present embodiment, the point C (0, 0, d) is input as the imaging unit position information. The imaging unit position information input unit 308 stores the input imaging unit position information in a predetermined storage area. In step S404, the imaging parameter input unit 309 inputs imaging parameters indicating the lens focal length of the imaging unit 202 during pre-imaging. The imaging parameter dormitory unit 209 stores the input imaging parameters in a predetermined storage area.

ステップS405において面法線幾何条件算出部310が、光源位置情報、撮像部位置情報、撮像パラメータに基づいて、プレ撮像画像における輝点の面法線の幾何条件を示す面法線画像を算出する。図5(a)に示すように、点光源の入射角と撮像部201方向への反射角が等しくなる向きの面法線の金属片が、プレ撮像画像において輝点として写る。プレ撮影画像における画素kについて、点光源(第1の照明部202)の入射角と反射角が等しくなる面法線の向きnを、以下の式(1)に従い算出する。 In step S405, the surface normal geometric condition calculation unit 310 calculates a surface normal image indicating the geometric condition of the surface normal of the bright spot in the pre-captured image based on the light source position information, the imaging unit position information, and the imaging parameters. . As shown in FIG. 5A, a metal piece having a surface normal in the direction in which the incident angle of the point light source and the reflection angle in the direction of the imaging unit 201 are equal appears as a bright spot in the pre-captured image. For the pixel k in the pre-photographed image, the surface normal direction nk where the incident angle and the reflection angle of the point light source (first illumination unit 202) are equal is calculated according to the following equation (1).


は撮像部位置情報と撮像パラメータから算出されるプレ撮像画像データにおける画素kの三次元座標である。画素kの三次元座標Wkは、ステップS403で入力した撮像部位置情報と、ステップS404において入力した撮像パラメータを用いて、公知の射影変換処理により算出する。iは画素kの3次元座標が示す位置における点光源方向を表す大きさ1のベクトルである。vは画素kの3次元座標が示す位置における撮像部201方向を表す大きさ1のベクトルである。本実施形態では、光輝材の配向特性が方位角に対して等方的であるとみなし、以下の式(2)を用いて、画素kに対応する仰角θを算出する。ここで算出する仰角θは、プレ撮像画像における各画素について、輝点となる場合に、金属片が取り得る面法線方向の幾何条件となる。

W k is the three-dimensional coordinate of the pixel k in the pre-captured image data calculated from the imaging unit position information and the imaging parameters. The three-dimensional coordinate Wk of the pixel k is calculated by a well-known projective transformation process using the imaging unit position information input in step S403 and the imaging parameter input in step S404. i k is a vector of size 1 representing the point light source direction at the position indicated by the three-dimensional coordinates of the pixel k. v k is a vector of size 1 representing the direction of the imaging unit 201 at the position indicated by the three-dimensional coordinates of the pixel k. In the present embodiment, it is assumed that the alignment characteristic of the glitter material is isotropic with respect to the azimuth angle, and the elevation angle θ corresponding to the pixel k is calculated using the following equation (2). The elevation angle θ calculated here is a geometric condition in the surface normal direction that the metal piece can take when it becomes a bright spot for each pixel in the pre-captured image.


撮影画像における各画素について、仰角θを算出した結果を、面法線画像とする。図5(b)は、面法線画像を示す図である。面法線画像は8bitのグレースケールで表される画像である。図5(b)は、画素値0を黒、画素値255を白で表している。面法線画像において、X軸上かつ点光源(第1の照明部202)と撮像部201からの距離が等しい画素位置Wk0では仰角θ=0であるため、画素値0である。これは、画素位置Wk0の面法線nk0=(0,0,1)となることを意味する。面法線算出部310は、算出した面法線画像を所定の記憶領域に記憶する。

The result of calculating the elevation angle θ for each pixel in the captured image is defined as a surface normal image. FIG. 5B is a diagram illustrating a surface normal image. The surface normal image is an image represented by an 8-bit gray scale. FIG. 5B shows a pixel value 0 in black and a pixel value 255 in white. In the surface normal image, since the elevation angle θ = 0 at the pixel position W k0 on the X axis and at the same distance from the point light source (first illumination unit 202) and the imaging unit 201, the pixel value is zero. This means that the surface normal n k0 = (0, 0, 1) of the pixel position W k0 . The surface normal calculation unit 310 stores the calculated surface normal image in a predetermined storage area.

ステップS406において領域分割部311は、面法線画像を、輝点の面法線の所定の角度範囲Δθごとにm個の領域に分割する。図6は、面法線画像の分割方法を説明する図である。まずステップS405において算出した面法線画像における各画素を、Δθ間隔で量子化する。例えば、Δθ=1°とする。図6(a)は、面法線画像を量子化した結果を模式的に示している。量子化した面法線画像に基づいて、図6(b)に示すように量子化値ごとの画像に分離する。なお、各分割画像における画素の画素値は、量子化値ではなく、量子化前の仰角を用いることとする。複数の分割画像を出力する。領域分割部311は、算出した複数の分割画像を所定の記憶領域に記憶する。   In step S406, the region dividing unit 311 divides the surface normal image into m regions for each predetermined angular range Δθ of the surface normal of the bright spot. FIG. 6 is a diagram for explaining a method for dividing a surface normal image. First, each pixel in the surface normal image calculated in step S405 is quantized at intervals of Δθ. For example, Δθ = 1 °. FIG. 6A schematically shows the result of quantizing the surface normal image. Based on the quantized surface normal image, the image is separated into images for each quantized value as shown in FIG. Note that the pixel values of the pixels in each divided image are not the quantized values but the elevation angles before the quantization. Output multiple divided images. The area dividing unit 311 stores the calculated plurality of divided images in a predetermined storage area.

ステップS407において輝点確率算出部312は、分割画像ごとに輝点が生じる確率を算出する。輝点確率算出処理の詳細は、後述する。輝点確率算出部312は、算出した分割画像ごとの輝点確率を所定の記憶領域に記憶する。ステップS408において幾何条件決定部313は、分割画像毎の輝点確率に基づいて、撮影画像において各々の輝点が分離可能となる第2の照明部203の入射角条件を幾何条件として決定する。幾何条件決定処理の詳細は、後述する。幾何条件決定部313は、算出した幾何条件を第2の照明部203へ出力する。   In step S407, the bright spot probability calculation unit 312 calculates the probability that a bright spot will occur for each divided image. Details of the bright spot probability calculation processing will be described later. The bright spot probability calculation unit 312 stores the calculated bright spot probability for each divided image in a predetermined storage area. In step S408, the geometric condition determination unit 313 determines, as the geometric condition, the incident angle condition of the second illumination unit 203 that allows each bright spot to be separated in the captured image, based on the bright spot probability for each divided image. Details of the geometric condition determination processing will be described later. The geometric condition determination unit 313 outputs the calculated geometric condition to the second illumination unit 203.

ステップS409において撮像画像入力部314が、ステップS408で出力した幾何条件を満たす位置に配置した第2の照明部203で照射した被写体を撮像部201が撮像した撮像画像を入力する。本実施形態では、図1に示すように算出した幾何条件を満たす点Lに位置に配置した第2の署名部203(平行光源)が照射した被写体を撮像した撮像画像を入力する。入力した撮像画像は所定の記憶領域に記憶する。 In step S409, the captured image input unit 314 inputs a captured image obtained by the imaging unit 201 capturing the subject irradiated by the second illumination unit 203 arranged at a position that satisfies the geometric condition output in step S408. In this embodiment, inputs the second signature portion 203 (parallel light) captured image obtained by capturing an image of a subject and irradiated disposed at a position on the geometrical conditions are satisfied point L 3 calculated as shown in FIG. The input captured image is stored in a predetermined storage area.

ステップS410において輝点特徴量算出部315は、ステップS409において取得した撮像画像に基づいて、被写体の輝点の強度、数、大きさを輝点特徴量として算出する。図9は、輝点特徴量算出を説明する図である。図9(a)は、ステップS409において取得した撮像画像を示す。輝点特徴量算出部315はまず、撮影画像を所定の閾値を用いて2値化し、図9(b)に示すように2値化画像を生成する。なおここでは、閾値は128であるとする。図9(b)に示す2値化画像において輝点をラベリング処理する。具体的には、2値化画像において画素値255の画素が連結している領域を検出し、検出した領域に対して順に番号を付与する。図9(c)は、各輝点をラベリングした結果を示す。輝点特徴量算出部315は、撮影画像における輝点数及び各輝点の面積の平均値を算出する。更に、図9(a)に示す撮像画像と図9(b)に示す2値化画像とに基づいて、図9(d)に示すように、輝点でない領域の画素の画素値を0にした画像を生成し、画素値の総和を輝点数で除算することで、輝点の平均強度を算出する。輝点特徴量315は、算出した輝点の平均強度、数、平均面積を輝点特徴量として所定の記憶領域に記憶し、処理を終了する。   In step S410, the bright spot feature amount calculation unit 315 calculates the intensity, the number, and the size of the bright spot of the subject as the bright spot feature amount based on the captured image acquired in step S409. FIG. 9 is a diagram for explaining the calculation of the bright spot feature quantity. FIG. 9A shows the captured image acquired in step S409. First, the bright spot feature quantity calculation unit 315 binarizes the captured image using a predetermined threshold value, and generates a binarized image as shown in FIG. 9B. Here, the threshold is assumed to be 128. A bright spot is labeled in the binarized image shown in FIG. Specifically, a region where pixels having a pixel value of 255 are connected in the binarized image is detected, and numbers are sequentially assigned to the detected regions. FIG. 9C shows the result of labeling each bright spot. The bright spot feature quantity calculation unit 315 calculates the average number of bright spots in the captured image and the area of each bright spot. Further, based on the captured image shown in FIG. 9A and the binarized image shown in FIG. 9B, the pixel value of the pixel in the region that is not a bright spot is set to 0 as shown in FIG. 9D. The average intensity of the bright spots is calculated by generating the image and dividing the sum of the pixel values by the number of bright spots. The bright spot feature amount 315 stores the calculated average intensity, number, and average area of bright spots as a bright spot feature amount in a predetermined storage area, and ends the process.

次に、ステップS407において輝点確率算出部312が実行する輝点確率算出処理の詳細を説明する。図7は、輝点確率算出処理のフローチャートである。ステップS701において輝点確率算出部312は、図6(b)に示す各分割画像において、所定の仰角範囲の画素値を有する領域の面積R(θ)を算出する。ステップS406において領域分割部311が、所定の仰角範囲の画素値を有する画素群毎に分離した。輝点確率算出部312は、各分割画像において、対応する所定の仰角範囲の画素値を有する画素群の面積を算出する。具体的には、対応する所定の仰角範囲の画素値を有する画素をカウントし、画素数を面積とみなす。分割領域がN個の場合、mは1〜Nの自然数である。角度θは、各分割領域に含まれる各画素の仰角の平均値によって算出された平均仰角である。ここでは輝点確率算出部312は算出した領域面積を所定の記憶領域に記憶する。 Next, details of the bright spot probability calculation process executed by the bright spot probability calculation unit 312 in step S407 will be described. FIG. 7 is a flowchart of the bright spot probability calculation process. In step S701, the bright spot probability calculation unit 312 calculates an area R (θ m ) of a region having a pixel value in a predetermined elevation angle range in each divided image shown in FIG. In step S <b> 406, the region dividing unit 311 separates each pixel group having pixel values in a predetermined elevation angle range. The bright spot probability calculation unit 312 calculates the area of a pixel group having pixel values in a corresponding predetermined elevation angle range in each divided image. Specifically, pixels having pixel values in a corresponding predetermined elevation angle range are counted, and the number of pixels is regarded as an area. When the number of divided areas is N, m is a natural number of 1 to N. The angle θ m is an average elevation angle calculated by the average value of the elevation angles of each pixel included in each divided region. Here, the bright spot probability calculation unit 312 stores the calculated area area in a predetermined storage area.

ステップS702において輝点確率算出部312は、図10(a)に示すプレ撮像画像を所定の閾値(ここでは128とする)で2値化処理することで、輝点の位置が明瞭な輝点画像を生成する。図10(b)は、輝点画像の一例示す。更に、各分割画像において対応する所定の仰角範囲の画素値を有する画素群と同様に、図10(c)に示すように輝点画像を分割する。輝点の面積の総和を輝点総面積S(θ)として算出する。具体的には、2値化画像において画素値255の画素を輝点として検出し、画素値255の画素の画素数をカウントすることで、輝点総面積を算出する。輝点確率算出部312は、算出した平均仰角毎の輝点総面積S(θ)を所定の記憶領域に記憶する。 In step S702, the bright spot probability calculation unit 312 binarizes the pre-captured image shown in FIG. 10A with a predetermined threshold (128 here), so that the bright spot has a clear bright spot position. Generate an image. FIG. 10B shows an example of a bright spot image. Further, the bright spot image is divided as shown in FIG. 10C in the same manner as the pixel group having a pixel value in a predetermined elevation angle range corresponding to each divided image. The total area of the bright spots is calculated as the bright spot total area S (θ m ). Specifically, a pixel having a pixel value of 255 is detected as a bright spot in the binarized image, and the total number of bright spots is calculated by counting the number of pixels having a pixel value of 255. The bright spot probability calculation unit 312 stores the calculated bright spot total area S (θ m ) for each average elevation angle in a predetermined storage area.

ステップS703において輝点確率算出部312は、各面積R(θ)と輝点総面積S(θ)との比率に基づいて、以下の式(3)を用いて、輝点面積率P(θ)を算出する。 In step S703, the bright spot probability calculation unit 312 uses the following formula (3) based on the ratio between each area R (θ m ) and the bright spot total area S (θ m ) to obtain the bright spot area ratio P (Θ m ) is calculated.


図11は、平均仰角に対応する輝点面積率を示すグラフである。横軸は仰角を、縦軸は輝点面積率である。本実施形態では、図11に示すように仰角θについてΔθ間隔で輝点面積率がプロットされる。プロットした結果を関数近似することにより、輝点面積率を示す関数P(θ)を算出する。輝点確率算出部312は、輝点面積率関数P(θ)を所定の記憶領域に記憶する。

FIG. 11 is a graph showing the bright spot area ratio corresponding to the average elevation angle. The horizontal axis represents the elevation angle, and the vertical axis represents the bright spot area ratio. In the present embodiment, as shown in FIG. 11, the bright spot area ratios are plotted at intervals of Δθ with respect to the elevation angle θ. A function P (θ m ) indicating the bright spot area ratio is calculated by approximating the plotted results as a function. The bright spot probability calculation unit 312 stores the bright spot area ratio function P (θ m ) in a predetermined storage area.

ステップS704において輝点確率算出部312は、被写体101表面の粗さを表す微小面法線の分布をモデル化したベックマン分布モデルD(θ)を以下の式(4)を入力する。   In step S <b> 704, the bright spot probability calculation unit 312 inputs the following expression (4) as a Beckman distribution model D (θ) that models the distribution of the minute surface normal representing the roughness of the surface of the subject 101.


αは微小面の平均的な傾きであり、表面粗さを表すパラメータである。なお以下の式(5)に示すように、ベックマン分布は被写体のマクロ的な面法線方向N=(0,0,1)を天頂方向とした上半球領域Ωで積分すると1となるように規格化されている。

α is an average inclination of the minute surface and is a parameter representing the surface roughness. As shown in the following equation (5), the Beckmann distribution is 1 when integrated in the upper hemisphere region Ω N with the subject's macroscopic surface normal direction N = (0, 0, 1) as the zenith direction. Has been standardized.


従って、ベックマン分布モデルD(θ)は仰角θの面法線を有する輝点が生じる確率とみなすことができる。輝点確率算出部312は、入力したベックマン分布モデルD(θ)を所定の記憶領域に記憶する。

Therefore, the Beckman distribution model D (θ) can be regarded as a probability that a bright spot having a surface normal of the elevation angle θ is generated. The bright spot probability calculation unit 312 stores the input Beckman distribution model D (θ) in a predetermined storage area.

ステップS705において輝点確率算出部312は、以下の式(6)を用いて、輝点面積率関数P(θ)をベックマン分布モデルデータD(θ)でフィッティングしたときの表面粗さパラメータαを算出する。 In step S705, the bright spot probability calculation unit 312 uses the following equation (6) to calculate the surface roughness parameter α when fitting the bright spot area ratio function P (θ m ) with the Beckman distribution model data D (θ). Is calculated.


tは輝点面積率関数P(θ)を規格化する係数である。輝点確率算出部312は、算出した表面粗さパラメータαを輝点確率を示す情報として所定の記憶領域に記憶し、処理を終了する。

t is a coefficient that normalizes the bright spot area ratio function P (θ m ). The bright spot probability calculation unit 312 stores the calculated surface roughness parameter α as information indicating the bright spot probability in a predetermined storage area, and ends the process.

以下では、ステップS408において幾何条件決定部313が実行する幾何条件決定処理の詳細を説明する。図8は、幾何条件決定処理のフローチャートである。ステップS801において幾何条件決定部313は、撮影画像において各々の輝点が分離可能となる輝点の面法線方向を決定する。具体的には、以下の式(7)を用いて、各輝点の8連接近傍で同じ面法線を有する輝点が存在する確率が所定の閾値以下となる面法線nの仰角θの範囲を算出する。なおここでは、閾値Pthは0.1とする。 Hereinafter, the details of the geometric condition determination process executed by the geometric condition determination unit 313 in step S408 will be described. FIG. 8 is a flowchart of the geometric condition determination process. In step S <b> 801, the geometric condition determination unit 313 determines the surface normal direction of the bright spot where each bright spot can be separated in the captured image. Specifically, the following equation (7) is used to calculate the elevation angle θ of the surface normal n where the probability that a bright spot having the same surface normal exists in the vicinity of the eight connected points of each bright spot is equal to or less than a predetermined threshold. Calculate the range. Here, the threshold value P th is assumed to be 0.1.


本実施形態では、輝点確率を表す関数として、ステップS407において算出した表面粗さパラメータがαのときのベックマン分布モデルDα(θ)を用いている。図11の斜線部で示すように所定の閾値Pth以下の輝点確率を有する仰角θの範囲はθ>θthが、各々の輝点が分離可能となる面法線nの範囲となる。幾何条件決定部313は、算出した面法線nの仰角θの範囲を所定の記憶領域に記憶する。

In the present embodiment, the Beckman distribution model D α (θ) when the surface roughness parameter calculated in step S407 is α is used as a function representing the bright spot probability. As shown by the hatched portion in FIG. 11, the range of the elevation angle θ having the bright spot probability equal to or less than the predetermined threshold value P th is θ> θ th, which is the range of the surface normal n where each bright spot can be separated. The geometric condition determination unit 313 stores the calculated range of the elevation angle θ of the surface normal n in a predetermined storage area.

ステップS802において幾何条件決定部313は、平行光源が照明した被写体を撮像した撮影画像において、各々の輝点が分離可能となる幾何条件を決定する。具体的には、ステップS801で算出した面法線nの仰角θの範囲のうち、以下の式(8)を用いて、平行光源の入射角θの範囲を算出する。 In step S <b> 802, the geometric condition determination unit 313 determines a geometric condition that enables each bright spot to be separated in a captured image obtained by capturing an image of a subject illuminated by a parallel light source. Specifically, the range of the incident angle θ L of the parallel light source is calculated using the following formula (8) in the range of the elevation angle θ of the surface normal n calculated in step S801.


本実施形態では、撮像画像における各画素位置に対応する3次元座標が示す位置におけるカメラ方向は画角中央におけるカメラ方向vk1=(0,0,1)の一定値であるとする。式(8)、vk1=(0,0,1)より、θ=2θとなるので、第2の照明部203は、入射角θの範囲はθ>2θthが幾何条件となる。前述の通り第2の照明部203は、仰角θかである点Lと仰角θの点Lとに配置された2つの平行光源を有する。図12に示す通り、仰角2θは、θ<2θth<θを満たす。そこで第2の照明部203を2θthより角度の大きい点Lの位置に配置した平行光源に被写体101を照射させて、被写体101を撮像することで、輝点を適切に撮影画像に移すことができる。幾何条件決定部313は、算出した平行光源の入射角θの範囲を示す幾何条件情報を所定の記憶領域に記憶し、処理を終了する。

In the present embodiment, it is assumed that the camera direction at the position indicated by the three-dimensional coordinate corresponding to each pixel position in the captured image is a constant value of the camera direction v k1 = (0, 0, 1) at the center of the angle of view. From Equation (8), v k1 = (0, 0, 1), θ L = 2θ. Therefore, the second illumination unit 203 has a geometric condition where θ L > 2θ th in the range of the incident angle θ L. . As described above the second illumination unit 203 has two parallel light sources arranged in a point L 3 of elevation theta 2 or in a point L 2 and elevation theta 3. As shown in FIG. 12, the elevation angle 2θ t satisfies θ 2 <2θ th3 . So by irradiating the subject 101 and the second illumination unit 203 into a parallel light source disposed in the position of the big points L 3 angles from 2 [Theta] th, by imaging an object 101, transferring the bright spots properly photographed image Can do. Geometric-condition determination section 313, the calculated geometric condition information indicating a range of the incident angle theta L parallel light source and stored in a predetermined storage area, the process ends.

図13(a)は、第2の照明部203のうち点Lの位置に配置し平行光源が照明した被写体を撮像した結果得られる撮影画像である。点L2の位置に配置した平行光源の入射θ2が小さいため、一部の輝点が隣接する輝点とつながって撮像され、輝点の数及び面積の計測精度が低下する。図13(b)は、第2の照明部203のうち点Lの位置に配置された平行光源が照明した被写体を撮像した撮影画像である。各々の輝点が分離可能となる配置から照射するため、輝点の数及び面積を精度よく取得することができる。以上の通り本実施形態によれば、点光源(第1の照明部202)を用いたプレ撮影の結果に基づいて、平行光源(第2の照明部203)を配置すべき幾何条件を決定することにより、被写体の光輝感を高精度に取得することができる。 FIG. 13A is a captured image obtained as a result of imaging a subject that is arranged at the position of the point L 2 in the second illumination unit 203 and is illuminated by a parallel light source. Since the incident θ2 of the parallel light source arranged at the position of the point L2 is small, some of the bright spots are connected to the adjacent bright spots, and the measurement accuracy of the number and area of the bright spots is lowered. FIG. 13B is a captured image obtained by capturing an image of a subject illuminated by the parallel light source arranged at the position of the point L 3 in the second illumination unit 203. Since irradiation is performed from an arrangement where each bright spot is separable, the number and area of bright spots can be obtained with high accuracy. As described above, according to the present embodiment, the geometric condition for arranging the parallel light source (second illumination unit 203) is determined based on the result of pre-imaging using the point light source (first illumination unit 202). This makes it possible to acquire the brightness of the subject with high accuracy.

なお、第1実施形態では、光輝材の配向特性が方位角に対して等方的であるとみなし、面法線画像を仰角についてΔθ間隔で分割した領域を算出した。しかしながら仰角、方位角の両方について分割した領域を算出しても良い。例えば、面法線画像をブロック状に分割すれば良い。   In the first embodiment, it is assumed that the orientation characteristics of the glittering material are isotropic with respect to the azimuth angle, and the region obtained by dividing the surface normal image with respect to the elevation angle at Δθ intervals is calculated. However, a region divided for both the elevation angle and the azimuth angle may be calculated. For example, the surface normal image may be divided into blocks.

本実施形態では、輝点面積率関数にベックマン分布モデルデータをフィッティングすることで輝点確率を算出したが、特にモデルをベックマン分布モデルに限定するものではない。例えば、輝点面積率を多項式関数でフィッティングし、仰角θについて0°〜90°の範囲で積分すると1となるように規格化した関数を輝点確率関数として算出しても良い。   In this embodiment, the bright spot probability is calculated by fitting the Beckman distribution model data to the bright spot area ratio function, but the model is not particularly limited to the Beckman distribution model. For example, a function normalized by fitting the luminous spot area ratio with a polynomial function and integrating the elevation angle θ in the range of 0 ° to 90 ° to 1 may be calculated as the bright spot probability function.

本実施形態では、幾何条件情報として、撮像画像の画角中央の画素におけるカメラ方向に対して各々の輝点が分離可能となる平行光源方向を算出したが、各画素におけるカメラ方向に対する平行光源方向を算出しても良い。また、算出した各画素に対する平行光源方向の共通範囲を幾何条件情報として算出しても良い。   In the present embodiment, as the geometric condition information, the parallel light source direction in which each bright spot is separable with respect to the camera direction at the pixel at the center of the angle of view of the captured image is calculated. May be calculated. In addition, a common range in the parallel light source direction for each calculated pixel may be calculated as geometric condition information.

また本実施形態では、点光源である第1の照明部202を1個、平行光源である第2の照明203を2個配置した計測装置を用いて被写体の光輝感を取得したが、特に光源の数や配置する位置を限定するものではない。例えば、1個の点光源と3以上の多数の平行光源を配置した計測装置において、幾何条件を満たす複数の平行光源それぞれが照射した被写体を複数枚撮像し、複数の光源方向に応じた被写体の光輝感を計測しても良い。また、第2の照明部203として1個の平行光源を駆動ステージ上に配置し、幾何条件を満たす位置に移動させて被写体の光輝感を計測しても良い。   In the present embodiment, the brightness of the subject is acquired using a measuring device in which one first illumination unit 202 that is a point light source and two second illuminations 203 that are parallel light sources are arranged. There is no limitation on the number or position of the positions. For example, in a measuring device in which one point light source and three or more parallel light sources are arranged, a plurality of subjects irradiated by each of a plurality of parallel light sources satisfying the geometric condition are imaged, and the subject corresponding to the plurality of light source directions The brightness may be measured. Alternatively, one parallel light source may be arranged on the drive stage as the second illumination unit 203 and moved to a position that satisfies the geometric condition to measure the glitter of the subject.

また本実施形態では、1台の撮像部201を用いて被写体の光輝感を計測したが、プレ撮像用の撮像部と撮像用の撮像部2つのカメラを用いて被写体の光輝感を計測しても良い。例えば、プレ撮像時には輝点確率を算出する面法線範囲を広くするために、広角のレンズを備えたカメラで撮像し、撮像時には数十μm程度の小さい輝点でも高精度に輝点の面積を取得するために、望遠のレンズを備えたカメラで撮像しても良い。また、1台の撮像部201にズームレンズを装着し、プレ撮像時と撮像時に倍率を変更して撮像しても良い。   In this embodiment, the brightness of the subject is measured using one imaging unit 201. However, the brightness of the subject is measured using two cameras, the pre-imaging imaging unit and the imaging unit. Also good. For example, in order to widen the surface normal range for calculating the probability of bright spots during pre-imaging, images are taken with a camera equipped with a wide-angle lens. In order to obtain the image, the image may be captured by a camera equipped with a telephoto lens. Alternatively, a zoom lens may be attached to one imaging unit 201, and imaging may be performed by changing the magnification during pre-imaging and imaging.

また本実施形態では、輝点の面法線方向に応じて分割した各領域内の輝点面積率から輝点確率を算出した。しかしながら例えば、分割領域内の各輝点の面積のヒストグラムを算出し、予め算出しておいた分散値と輝点確率とのルックアップテーブルを用いて、ヒストグラムの分散値から輝点確率を算出することもできる。   In this embodiment, the bright spot probability is calculated from the bright spot area ratio in each region divided according to the surface normal direction of the bright spot. However, for example, the histogram of the area of each bright spot in the divided region is calculated, and the bright spot probability is calculated from the variance value of the histogram using a pre-calculated dispersion value and bright spot probability lookup table. You can also.

<第2実施形態>
第1実施形態では、点光源は、照射する光の大きさが無い理想的な拡散光源とみなして被写体の光輝感を計測する方法を説明した。第2実施形態では、有限の大きさを有する点光源を第1の照明部202として用いる場合について説明する。なお、第1の実施形態と同様の構成については、同一の記号を付し、詳細な説明を省略する。第2実施形態では、ステップS407における輝点確率算出処理が第1実施形態と異なっている。図14は、第2実施形態に適用可能な輝点確率算出312が実行する処理のフローチャートである。
Second Embodiment
In the first embodiment, a method has been described in which the point light source is regarded as an ideal diffused light source that does not have the size of light to be irradiated, and the brightness of the subject is measured. In the second embodiment, a case where a point light source having a finite size is used as the first illumination unit 202 will be described. In addition, about the structure similar to 1st Embodiment, the same symbol is attached | subjected and detailed description is abbreviate | omitted. In the second embodiment, the bright spot probability calculation process in step S407 is different from the first embodiment. FIG. 14 is a flowchart of processing executed by the bright spot probability calculation 312 applicable to the second embodiment.

ステップS1401において輝点確率算出部312は、第1の照明部202として用いる点光源の光の大きさを示す情報を入力する。第2実施形態では、図15に示すようにXY平面に平行な半径rの円状の光源を点光源として用いているものとする。輝点確率算出部312は、入力した点光源の大きさを示す情報を所定の記憶領域に記憶する。ステップS1402において輝点確率算出部312は、プレ撮像画像を構成する各画素について、点光源から照射された光が被写体上101で正反射方向に反射した正反射光が撮像される面法線範囲を算出する。具体的には、余弦定理により以下の式(9)用いて、面法線範囲Δθを算出する。 In step S1401, the bright spot probability calculation unit 312 inputs information indicating the light intensity of the point light source used as the first illumination unit 202. In the second embodiment, as shown in FIG. 15, a circular light source having a radius r parallel to the XY plane is used as a point light source. The bright spot probability calculation unit 312 stores information indicating the size of the input point light source in a predetermined storage area. In step S <b> 1402, the bright spot probability calculation unit 312 captures, for each pixel constituting the pre-captured image, a surface normal range in which specular reflection light in which the light emitted from the point light source is reflected in the specular reflection direction on the subject 101 is imaged. Is calculated. Specifically, the surface normal range Δθ S is calculated using the following equation (9) by the cosine theorem.


1−,L1+は、図15に示すXY平面に垂直かつ画素kの三次元座標Wと光源中心位置Lを通る平面αと半径rの円状の点光源Lとの交点である。従って、点Wk−点L1−,点Wk−点L1+間の距離|W1−,|,|W1+|は以下の式(10)、(11)により算出できる。

L 1− and L 1+ are intersection points of a circular point light source L 1 having a radius r and a plane α perpendicular to the XY plane shown in FIG. 15 and passing through the three-dimensional coordinates W k of the pixel k and the light source center position L 1. is there. Therefore, the distances | W k L 1− , |, | W k L 1+ | between the point Wk−the point L 1− and the point Wk−the point L 1+ can be calculated by the following equations (10) and (11).


kx,Wkyは画素kの三次元座標WのX座標、Y座標である。式(9)〜(11)を用いて、図16に示す面法線範囲Δθを算出する。面法線範囲Δθは、8bitのグレースケールで表される画像である。面法線範囲において、点光源から照射される光の正反射光が、撮像部201に写り込む面法線範囲が大きくなる光源位置L近傍で画素値が大きくなる画像となっている。輝点確率算出部312は、算出した正反射が生じる面法線範囲Δθを所定の記憶領域に記憶する。

W kx and W ky are the X coordinate and Y coordinate of the three-dimensional coordinate W k of the pixel k. A surface normal range Δθ S shown in FIG. 16 is calculated using the equations (9) to (11). The surface normal range Δθ S is an image represented by an 8-bit gray scale. In the surface normal range, the specularly reflected light of the light emitted from the point light source is an image in which the pixel value increases in the vicinity of the light source position L 1 where the surface normal range reflected in the imaging unit 201 increases. The bright spot probability calculation unit 312 stores the calculated surface normal range Δθ S in which regular reflection occurs in a predetermined storage area.

ステップS1403において輝点確率算出部312は、面法線範囲Δθに対してステップS406で仰角θを分割した所定の角度範囲Δθより小さい領域を、輝点確率算出に用いる領域として算出する。本実施形態では、図17に示す光源位置Lから離れた領域でΔθS<Δθを満たし、輝点確率算出に用いる領域として算出されている。算出した領域は所定の記憶領域に記憶する。以上の通り、有限の大きさを有する点光源が照射した被写体をプレ撮像する際に、光源の大きさにより輝点面積率の算出精度が低下する領域を除外する。これにより、適切に被写体の輝点を計測できる幾何条件を高精度に算出することができる。本実施例では、半径rの円状の面光源を有限の大きさを有する点光源として用いたが、四角形や球状の光源でも良く、特に光源の形状や大きさを限定するものではない。 In step S1403, the bright spot probability calculation unit 312 calculates a region smaller than the predetermined angle range Δθ obtained by dividing the elevation angle θ in step S406 with respect to the surface normal range Δθ S as a region used for the bright spot probability calculation. In the present embodiment, it satisfies the .DELTA..theta.s <[Delta] [theta] in the region distant from the light source position L 1 shown in FIG. 17, and is calculated as the area used for calculating bright spot probability. The calculated area is stored in a predetermined storage area. As described above, when pre-imaging a subject irradiated with a point light source having a finite size, a region where the calculation accuracy of the bright spot area ratio is reduced due to the size of the light source is excluded. This makes it possible to calculate with high accuracy a geometric condition that can appropriately measure the bright spot of the subject. In this embodiment, a circular surface light source having a radius r is used as a point light source having a finite size. However, a square or spherical light source may be used, and the shape and size of the light source are not particularly limited.

<その他の実施形態>
上述の実施形態では、画像処理部215の各構成をCPUにより実行されるソフトウェア処理を例に説明したが、処理部の一部またはすべての専用の処理回路によってハードウェア化することもできる。
<Other embodiments>
In the above-described embodiment, each configuration of the image processing unit 215 has been described by taking a software process executed by the CPU as an example. However, the image processing unit 215 may be realized by hardware by a part of the processing unit or all the dedicated processing circuits.

306 プレ撮像画像入力部
310 面法線幾何条件算出部
311 領域分割部
312 輝点確率算出部
313 幾何条件決定部
314 撮像画像入力部
315 輝点特徴量算出部
306 Pre-captured image input unit 310 Surface normal geometric condition calculation unit 311 Region division unit 312 Bright spot probability calculation unit 313 Geometric condition determination unit 314 Captured image input unit 315 Bright spot feature amount calculation unit

Claims (8)

被写体の輝点からなる光輝感を計測する計測装置のための画像処理装置であって、
第1の光源が照射した被写体を撮像することにより得られる第1の撮像画像を入力する第1の画像入力手段と、
前記第1の撮像画像における各画素について、輝点となる場合の面法線を算出して面法線画像を算出する面法線算出手段と、
前記撮像画像を、所定の角度範囲ごとの複数の領域に分割する分割手段と、
前記第1の撮像画像を量子化することにより輝点を表す輝点画像を生成し、前記撮像画像および前記輝点画像に基づいて、前記領域ごとに、該領域の総面積に対する該領域に含まれる輝点の総面積の比率を算出し、前記領域ごとの比率を用いて、前記所定の角度範囲に対応する輝点確率を算出する輝点確率算出手段と、
前記輝点確率に基づいて、前記第1の光源よりも指向性が強い配光特性を有する第2の光源が照明した前記被写体を撮像した場合に、得られる撮像画像において輝点それぞれが分離可能となる前記第2の光源の幾何条件を決定する幾何条件決定手段と、を有することを特徴とする画像処理装置。
An image processing device for a measuring device that measures the radiance of a luminescent spot of a subject,
First image input means for inputting a first captured image obtained by imaging a subject irradiated with a first light source;
Surface normal calculation means for calculating a surface normal image by calculating a surface normal for each pixel in the first captured image,
Dividing means for dividing the captured image into a plurality of regions for each predetermined angle range;
A bright spot image representing a bright spot is generated by quantizing the first captured image, and each area is included in the area with respect to the total area of the area based on the captured image and the bright spot image. A bright spot probability calculating means for calculating a bright spot probability corresponding to the predetermined angle range using a ratio for each region,
Based on the probability of bright spots, each of the bright spots can be separated in the obtained captured image when the subject illuminated by the second light source having a light distribution characteristic having higher directivity than the first light source is captured. An image processing apparatus comprising: geometric condition determining means for determining a geometric condition of the second light source.
前記幾何条件決定手段が決定した前記幾何条件に基づいて配置された前記第2の光源が照明した前記被写体を撮像することにより得られた第2の撮像画像を入力する第2の入力手段と、
前記第2の撮像画像に基づいて、前記被写体の光輝感の特徴を示す輝点特徴量を算出する特徴量算出手段と、
を有することを特徴とする請求項1に記載の画像処理装置。
Second input means for inputting a second captured image obtained by imaging the subject illuminated by the second light source arranged based on the geometric condition determined by the geometric condition determining means;
Feature amount calculating means for calculating a bright spot feature amount indicating the feature of the subject's glitter feeling based on the second captured image;
The image processing apparatus according to claim 1, further comprising:
前記第1の光源は、点光源であり、前記第2の光源は、平行光源であることを特徴とする請求項1または2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the first light source is a point light source, and the second light source is a parallel light source. 前記幾何条件決定手段は、各輝点の8連接近傍で同じ面法線を有する輝点が存在する確率が所定の閾値以下となる面法線nの仰角θの範囲を算出することにより、前記幾何条件を決定することを特徴とする請求項1乃至3の何れか一項に記載の画像処理装置。   The geometric condition determination means calculates the range of the elevation angle θ of the surface normal n where the probability that a bright point having the same surface normal exists in the vicinity of the eight connected points of each bright point is equal to or less than a predetermined threshold value. The image processing apparatus according to claim 1, wherein a geometric condition is determined. 前記輝点確率算出手段は、前記被写体における面法線の分布を表すベックマン分布モデルを用いて、前記輝点確率を算出することを特徴とする請求項1乃至4の何れか一項に記載の画像処理装置。   The said bright spot probability calculation means calculates the said bright spot probability using the Beckman distribution model showing distribution of the surface normal in the said subject | subject. Image processing device. コンピュータに読み込ませ実行させることで、前記コンピュータを請求項1乃至5の何れか一項に記載された画像処理装置として機能させることを特徴とするプログラム。   A program that causes a computer to function as the image processing apparatus according to claim 1 by being read and executed by a computer. 請求項1乃至4の何れか一項に記載の画像処理装置と、
被写体を所定の位置から撮像する撮像部、
第1の光源および、前記第1の光源とは異なる第2の光源とを有する計測装置。
An image processing apparatus according to any one of claims 1 to 4,
An imaging unit for imaging a subject from a predetermined position;
A measuring device having a first light source and a second light source different from the first light source.
被写体の輝点からなる光輝感を計測する計測装置のための画像処理方法であって、
第1の光源が照射した被写体を撮像することにより得られる第1の撮像画像を入力し、
前記第1の撮像画像における各画素について、輝点となる場合の面法線を算出して面法線画像を算出し、
前記撮像画像を、所定の角度範囲ごとの複数の領域に分割し、
前記第1の撮像画像を量子化することにより輝点を表す輝点画像を生成し、前記撮像画像および前記輝点画像に基づいて、前記領域ごとに、該領域の総面積に対する該領域に含まれる輝点の総面積の比率を算出し、前記領域ごとの比率を用いて、前記所定の角度範囲に対応する輝点確率を算出し、
前記輝点確率に基づいて、前記第1の光源よりも指向性が強い配光特性を有する第2の光源が照明した前記被写体を撮像した場合に、得られる撮像画像において輝点それぞれが分離可能となる前記第2の光源の幾何条件を決定することを特徴とする画像処理方法。
An image processing method for a measuring device for measuring a glitter feeling composed of a bright spot of a subject,
Inputting a first captured image obtained by imaging a subject irradiated with a first light source;
For each pixel in the first captured image, calculate a surface normal when it becomes a bright spot, calculate a surface normal image,
The captured image is divided into a plurality of regions for each predetermined angle range;
A bright spot image representing a bright spot is generated by quantizing the first captured image, and each area is included in the area with respect to the total area of the area based on the captured image and the bright spot image. Calculating the ratio of the total area of the bright spots to be calculated, using the ratio for each region, calculating the bright spot probability corresponding to the predetermined angle range,
Based on the probability of bright spots, each of the bright spots can be separated in the obtained captured image when the subject illuminated by the second light source having a light distribution characteristic having higher directivity than the first light source is captured. An image processing method comprising: determining a geometric condition of the second light source.
JP2016084732A 2016-04-20 2016-04-20 Image processing device, image processing method and program Pending JP2017194352A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016084732A JP2017194352A (en) 2016-04-20 2016-04-20 Image processing device, image processing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016084732A JP2017194352A (en) 2016-04-20 2016-04-20 Image processing device, image processing method and program

Publications (1)

Publication Number Publication Date
JP2017194352A true JP2017194352A (en) 2017-10-26

Family

ID=60155975

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016084732A Pending JP2017194352A (en) 2016-04-20 2016-04-20 Image processing device, image processing method and program

Country Status (1)

Country Link
JP (1) JP2017194352A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116767610A (en) * 2023-07-04 2023-09-19 河北省自动化研究所有限公司 Round bottom test tube boxing quantity detecting system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116767610A (en) * 2023-07-04 2023-09-19 河北省自动化研究所有限公司 Round bottom test tube boxing quantity detecting system
CN116767610B (en) * 2023-07-04 2023-12-01 河北省自动化研究所有限公司 Round bottom test tube boxing quantity detecting system

Similar Documents

Publication Publication Date Title
JP6363863B2 (en) Information processing apparatus and information processing method
JP3793100B2 (en) Information processing method, apparatus, and recording medium
JP6685827B2 (en) Image processing apparatus, image processing method and program
JP5567922B2 (en) Image processing apparatus and control method thereof
US10181202B2 (en) Control apparatus, robot, and control method
JP6519265B2 (en) Image processing method
CN110915193B (en) Image processing system, server device, image processing method, and recording medium
JP6237032B2 (en) Color and three-dimensional shape measuring method and apparatus
JP5336325B2 (en) Image processing method
JP2009236696A (en) Three-dimensional image measurement method, measurement system, and measurement program for subject
JP2017194352A (en) Image processing device, image processing method and program
JP2014041074A (en) Image processing apparatus and inspection apparatus
KR101314101B1 (en) System for three-dimensional measurement and method therefor
CN106101542B (en) A kind of image processing method and terminal
JP7251631B2 (en) Template creation device, object recognition processing device, template creation method, object recognition processing method, and program
JP2019022147A (en) Light source direction estimation device
CN115830131A (en) Method, device and equipment for determining fixed phase deviation
JP7040627B2 (en) Calculator, information processing method and program
JP2006338167A (en) Image data creation method
JP5967470B2 (en) Inspection device
WO2020174596A1 (en) Imaging apparatus
JP3519296B2 (en) Automatic measurement method and automatic measurement device for thermal image
JP2020129187A (en) Contour recognition device, contour recognition system and contour recognition method
JP7262800B2 (en) 3D image generation system, 3D image generation method, 3D image generation program, and recording medium
JP2019197002A (en) Image processing device, image processing method, and program