JP2013196373A - Image processing apparatus, image processing program and image processing method - Google Patents

Image processing apparatus, image processing program and image processing method Download PDF

Info

Publication number
JP2013196373A
JP2013196373A JP2012062757A JP2012062757A JP2013196373A JP 2013196373 A JP2013196373 A JP 2013196373A JP 2012062757 A JP2012062757 A JP 2012062757A JP 2012062757 A JP2012062757 A JP 2012062757A JP 2013196373 A JP2013196373 A JP 2013196373A
Authority
JP
Japan
Prior art keywords
region
area
color
contour
measurement
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.)
Granted
Application number
JP2012062757A
Other languages
Japanese (ja)
Other versions
JP5811915B2 (en
Inventor
Satoru Ushijima
悟 牛嶋
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2012062757A priority Critical patent/JP5811915B2/en
Publication of JP2013196373A publication Critical patent/JP2013196373A/en
Application granted granted Critical
Publication of JP5811915B2 publication Critical patent/JP5811915B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To easily extract the order of arrangement of sign areas of a color chip without losing the design property of the color chip.SOLUTION: An image processing apparatus 10 searches for contour points of a measurement area of a color patch on an image, and obtains the total value of the number of contour points and contour point numbers for each proximity area in proximity to the measurement area. The image processing apparatus 10 uses a representative value calculated from the total value of the number of the contour points and the contour point numbers held in each proximity area to associate the proximity area with the order of arrangement of the sign areas of the color patch, that is, the clockwise or anti-clockwise order of arrangement revolving around the measurement area.

Description

本発明は、画像処理装置、画像処理プログラム及び画像処理方法に関する。   The present invention relates to an image processing apparatus, an image processing program, and an image processing method.

肌の診断やデザイン等を目的として、色を計測する技術が知られている。かかる色の計測を行う場合には、光電色度計や分光光度計などの専用の測色計を用いることもできるが、専用の測色計は高価な機器であるので、エンドユーザが手軽に使用するのは困難である。   Techniques for measuring colors are known for the purpose of skin diagnosis and design. When performing such color measurement, a dedicated colorimeter such as a photoelectric colorimeter or a spectrophotometer can be used. However, since the dedicated colorimeter is an expensive device, it is easy for the end user. It is difficult to use.

このため、携帯端末に搭載されたカメラやデジタルカメラが専用の測色計の代わりに使用される場合がある。このように、カメラを用いて撮影を行う場合には、色の計測対象とする対象物の計測部位が日光や照明等の光源による影響を受けるので、計測部位が持つ色と撮影された画像に写る計測部位の色との間に明暗差が生じる。   For this reason, a camera or a digital camera mounted on a portable terminal may be used instead of a dedicated colorimeter. In this way, when taking a picture using a camera, the measurement part of the object to be measured for color is affected by the light source such as sunlight or illumination. There is a light / dark difference between the color of the measurement site.

このことから、中央に計測部位である肌を露出させるための貫通孔を肌の計測領域とし、その周りを複数の色の標示領域が取り囲むように配列されたカラーパッチを用いて、カメラによって撮影された画像に写る計測部位の色を補正する手法が考えられる。かかる手法では、カラーパッチが計測部位の近傍に貼付された状態で撮影を行うことによって計測部位と同様に光源の影響を受けたカラーパッチが画像に写り込むことを利用する。すなわち、上記の手法では、予め保存しておいたカラーパッチの色と画像に写ったカラーパッチの色との変化量をもとに、画像に写る計測部位の色を計測部位が本来有する色へ補正するための補正量を算出する。   For this reason, a through-hole for exposing the skin that is the measurement site in the center is used as the skin measurement area, and the image is photographed with a camera using a color patch that is arranged so that multiple color marking areas surround it. A method of correcting the color of the measurement site shown in the captured image is conceivable. Such a technique utilizes the fact that the color patch affected by the light source is reflected in the image in the same manner as the measurement part by performing imaging while the color patch is attached in the vicinity of the measurement part. That is, in the above method, based on the amount of change between the color patch color stored in advance and the color patch color that appears in the image, the color of the measurement site that appears in the image is changed to the color that the measurement site originally has. A correction amount for correction is calculated.

このように上記の補正において変化量を得る前段階には、計測領域の周囲に配置された標示領域を周回順に取り出す必要がある。かかる標示領域の並び順を取り出す技術としては、リングターゲットに埋め込まれた位置マークを検出し、予め定められた形状の三角形の頂点に位置マークが一致するように撮影画像を探索し、そこからリングを構成する各領域を判別する測定方式が提案されている。   Thus, before obtaining the amount of change in the above correction, it is necessary to take out the sign areas arranged around the measurement area in order of circulation. As a technique for extracting the arrangement order of the marking areas, a position mark embedded in a ring target is detected, a photographed image is searched so that the position mark coincides with a vertex of a triangle having a predetermined shape, and a ring is obtained therefrom. A measurement method has been proposed for discriminating each of the regions constituting the.

特開2011−50504号公報JP 2011-50504 A

しかしながら、上記の従来技術では、カラーパッチ等の色標のデザイン性を損なうことなく、色標の標示領域の並び順を簡易に抽出することができないという問題がある。   However, the above-described prior art has a problem in that the order of arrangement of the marking areas of the color targets cannot be easily extracted without impairing the design of the color targets such as color patches.

すなわち、上記の測定方法では、リングターゲットに位置マークを付けねばならず、デザイン性が損なわれる。その上、上記の測定方法では、位置マークを付けたとしても、リングターゲットが正面ではなく斜め方向から撮影された場合には、三角形が変形することによって識別が困難になり、さらに、リングターゲット上の領域の数が変更される度に三角形を設定し直す必要がある。また、位置マーク等を設けずに領域の並び順を抽出するために、領域ごとの接合関係を組合せによって判断することも考えられるが、その場合には、組合せの判断によって処理が煩雑化してしまう。   That is, in the measurement method described above, a position mark must be attached to the ring target, and design is impaired. In addition, in the measurement method described above, even if a position mark is attached, if the ring target is photographed from an oblique direction instead of the front, it becomes difficult to identify because the triangle is deformed. It is necessary to reset the triangle every time the number of areas is changed. In addition, in order to extract the arrangement order of regions without providing a position mark or the like, it is conceivable to determine the joining relationship for each region by a combination, but in that case, the processing becomes complicated due to the determination of the combination. .

開示の技術は、上記に鑑みてなされたものであって、色標のデザイン性を損なうことなく、色標の標示領域の並び順を簡易に抽出できる画像処理装置、画像処理プログラム及び画像処理方法を提供することを目的とする。   The disclosed technology has been made in view of the above, and an image processing apparatus, an image processing program, and an image processing method capable of easily extracting the order of arrangement of the marking areas of the color targets without impairing the design of the color targets The purpose is to provide.

本願の開示する画像処理装置は、画像を取得する取得部と、前記画像に含まれる画素のうち隣接する画素間で画素値が類似する画素同士をグルーピングするグルーピング部とを有する。さらに、前記画像処理装置は、グルーピングされた領域のうち、前記画像に含まれる色標であって、色の標示領域が形成される表示面および前記表示面の裏面を貫通する貫通孔が形成されるとともに同一色の標示領域が前記貫通孔を挟んで前記表示面の両側にそれぞれ形成された色標の貫通孔によって形成される色の計測領域を選択する選択部を有する。さらに、前記画像処理装置は、前記画像上で前記計測領域の輪郭を形成する各輪郭画素に番号を採番する採番部を有する。さらに、前記画像処理装置は、前記計測領域の輪郭画素ごとに、各領域の輪郭を形成する輪郭画素のうち当該計測領域の輪郭画素との間で最も距離が近い対応輪郭画素を抽出する抽出部を有する。さらに、前記画像処理装置は、前記対応輪郭画素に前記計測領域の輪郭画素の番号を付与する付与部を有する。さらに、前記画像処理装置は、前記対応輪郭画素が抽出される度に、前記領域のうち前記対応輪郭画素が抽出された領域を対象に当該領域が持つ対応輪郭画素の個数と、当該領域が持つ対応輪郭画素に付与された前記計測領域の輪郭画素の番号の合計値を更新する更新部を有する。さらに、前記画像処理装置は、前記対応輪郭画素に付与された前記計測領域の輪郭画素の番号の合計値および前記対応輪郭画素の個数を用いて、前記領域別に当該領域の代表値を算出する算出部を有する。さらに、前記画像処理装置は、前記領域別に算出された代表値を用いて、前記色標の標示領域の並び順であって前記計測領域を周回する時計回りまたは反時計回りの並び順に前記領域を対応付ける対応付け部を有する。   An image processing apparatus disclosed in the present application includes an acquisition unit that acquires an image, and a grouping unit that groups pixels having similar pixel values between adjacent pixels among the pixels included in the image. Further, the image processing device includes a color plane included in the image among the grouped areas, and a display surface on which the color marking area is formed and a through-hole penetrating the back surface of the display surface. And a selection unit for selecting a color measurement region formed by the through holes of the color targets respectively formed on the both sides of the display surface with the through holes interposed therebetween. Furthermore, the image processing apparatus includes a numbering unit that numbers each contour pixel that forms the contour of the measurement region on the image. Further, the image processing apparatus extracts, for each contour pixel of the measurement region, a corresponding contour pixel that is closest to the contour pixel of the measurement region from the contour pixels that form the contour of each region. Have Furthermore, the image processing apparatus includes an assigning unit that assigns a contour pixel number of the measurement region to the corresponding contour pixel. Further, each time the corresponding contour pixel is extracted, the image processing apparatus has the number of corresponding contour pixels that the region has in the region from which the corresponding contour pixel is extracted, and the region has The update unit updates the total value of the contour pixel numbers of the measurement region assigned to the corresponding contour pixels. Further, the image processing device calculates a representative value of the region for each region by using a total value of the contour pixel numbers of the measurement region and the number of the corresponding contour pixels assigned to the corresponding contour pixel. Part. Further, the image processing apparatus uses the representative value calculated for each area to arrange the areas in the order of arrangement of the marking areas of the color targets in the clockwise or counterclockwise arrangement around the measurement area. It has the matching part matched.

本願の開示する画像処理装置の一つの態様によれば、色標のデザイン性を損なうことなく、色標の標示領域の並び順を簡易に抽出できるという効果を奏する。   According to one aspect of the image processing apparatus disclosed in the present application, there is an effect that the arrangement order of the marking areas of the color targets can be easily extracted without impairing the design of the color targets.

図1は、実施例1に係るカラーパッチの上面図である。FIG. 1 is a top view of the color patch according to the first embodiment. 図2は、実施例1に係る画像処理装置の機能的構成を示すブロック図である。FIG. 2 is a block diagram illustrating a functional configuration of the image processing apparatus according to the first embodiment. 図3は、カラーパッチが写る画像の一例を示す図である。FIG. 3 is a diagram illustrating an example of an image in which a color patch is captured. 図4は、グルーピング結果の一例を示す図である。FIG. 4 is a diagram illustrating an example of the grouping result. 図5は、対応輪郭点の一例を示す図である。FIG. 5 is a diagram illustrating an example of corresponding contour points. 図6は、並び順データの一例を示す図である。FIG. 6 is a diagram illustrating an example of arrangement order data. 図7は、カラーパッチ上における並び順を表す図である。FIG. 7 is a diagram illustrating the arrangement order on the color patches. 図8は、並び順データの一例を示す図である。FIG. 8 is a diagram illustrating an example of the arrangement order data. 図9は、計測領域の中心座標から近接領域の外縁部までの距離を示す図である。FIG. 9 is a diagram illustrating the distance from the center coordinate of the measurement region to the outer edge of the proximity region. 図10は、図9に示した距離の数値例を示す図である。FIG. 10 is a diagram illustrating a numerical example of the distance illustrated in FIG. 図11は、マッピングの一例を示す図である。FIG. 11 is a diagram illustrating an example of mapping. 図12は、マッピング出力の一例を示す図である。FIG. 12 is a diagram illustrating an example of the mapping output. 図13は、実施例1に係る画像処理装置の全体処理の手順を示すフローチャートである。FIG. 13 is a flowchart of an overall process procedure of the image processing apparatus according to the first embodiment. 図14は、実施例1に係る第1対応付け処理の手順を示すフローチャートである。FIG. 14 is a flowchart illustrating the procedure of the first association process according to the first embodiment. 図15は、実施例1に係る第2対応付け処理の手順を示すフローチャート(1)である。FIG. 15 is a flowchart (1) illustrating the procedure of the second association process according to the first embodiment. 図16は、実施例1に係る第2対応付け処理の手順を示すフローチャート(2)である。FIG. 16 is a flowchart (2) illustrating the procedure of the second association process according to the first embodiment. 図17は、変形例を説明するための図である。FIG. 17 is a diagram for explaining a modification. 図18は、実施例1及び実施例2に係る画像処理プログラムを実行するコンピュータの一例について説明するための図である。FIG. 18 is a schematic diagram illustrating an example of a computer that executes an image processing program according to the first and second embodiments.

以下に、本願の開示する画像処理装置、画像処理プログラム及び画像処理方法の実施例を図面に基づいて詳細に説明する。なお、この実施例は開示の技術を限定するものではない。そして、各実施例は、処理内容を矛盾させない範囲で適宜組み合わせることが可能である。   Embodiments of an image processing apparatus, an image processing program, and an image processing method disclosed in the present application will be described below in detail with reference to the drawings. Note that this embodiment does not limit the disclosed technology. Each embodiment can be appropriately combined within a range in which processing contents are not contradictory.

[カラーパッチ1の構造]
まず、本実施例に係るカラーパッチの構造について説明する。図1は、実施例1に係るカラーパッチ1の上面図である。図1の例では、色の標示領域が形成された表示面を上とし、色を計測する対象物に接する表示面の裏面を下としてカラーパッチ1の表示面を上から見た場合の上面図を示す。なお、以下では、肌の診断サービスを提供するために、人の肌の色をカラーパッチ1を用いて計測する場合を想定する。
[Structure of color patch 1]
First, the structure of the color patch according to the present embodiment will be described. FIG. 1 is a top view of the color patch 1 according to the first embodiment. In the example of FIG. 1, a top view when the display surface of the color patch 1 is viewed from the top with the display surface on which the color marking area is formed as the top and the back surface of the display surface in contact with the object whose color is to be measured as the bottom. Indicates. In the following, it is assumed that the color of a person's skin is measured using the color patch 1 in order to provide a skin diagnosis service.

図1に示すように、カラーパッチ1は、色を計測する対象者に貼付または載置された上で計測部位とともに撮像されることによって、撮影が行われた画像に計測部位と同様に光源の影響を受けたカラーパッチ1を写り込ませるためのものである。   As shown in FIG. 1, the color patch 1 is attached to or placed on a subject whose color is to be measured, and then is imaged together with the measurement region. This is for reflecting the affected color patch 1.

ここで、本実施例に係るカラーパッチ1は、カラーパッチ1の表示面及び裏面を貫通する貫通孔3が形成される。このように、カラーパッチ1の中央部に貫通孔3を形成するのは、色を計測する対象者にカラーパッチ1が貼付された場合に、貫通孔3から計測部位である対象者の肌を計測領域として露出させるためである。このように、貫通孔3から対象者の肌が露出すると、カラーパッチ1の表示面に形成された標示領域C1〜C16は、対象者の肌を取り囲むように配置されることになる。   Here, in the color patch 1 according to the present embodiment, a through hole 3 penetrating the display surface and the back surface of the color patch 1 is formed. Thus, the through-hole 3 is formed in the central portion of the color patch 1 when the color patch 1 is affixed to the subject whose color is to be measured. This is for exposing as a measurement region. Thus, when the subject's skin is exposed from the through-hole 3, the marking areas C1 to C16 formed on the display surface of the color patch 1 are arranged so as to surround the subject's skin.

このため、本実施例に係るカラーパッチ1では、互いに貫通孔3を中心に円環状に配置された各々の標示領域を、漏れなく計測部位に近接させることが可能になる。それゆえ、本実施例に係るカラーパッチ1は、色の標示をマトリクス状に二次元配列された従来のカラーパッチよりも、計測部位に近接する部分を大きくすることができる。   For this reason, in the color patch 1 according to the present embodiment, it is possible to bring the respective marking areas arranged in an annular shape around the through hole 3 to be close to the measurement site without omission. Therefore, the color patch 1 according to the present embodiment can make the portion closer to the measurement site larger than the conventional color patch in which the color markings are two-dimensionally arranged in a matrix.

さらに、本実施例に係るカラーパッチ1では、同一色の標示領域C1、C6、C9及びC14が貫通孔3を挟んで表示面の両側に夫々形成される。さらに、同一の標示領域C2、C5、C10及びC13についても貫通孔3を挟んで表示面の両側に夫々形成される。また、同一の標示領域C3、C8、C11及びC16についても貫通孔3を挟んで表示面の両側に夫々形成される。さらに、同一の標示領域C4、C7、C12及びC15についても貫通孔3を挟んで表示面の両側に夫々形成される。   Furthermore, in the color patch 1 according to the present embodiment, the marking areas C1, C6, C9, and C14 of the same color are formed on both sides of the display surface with the through hole 3 interposed therebetween. Furthermore, the same marking areas C2, C5, C10, and C13 are also formed on both sides of the display surface with the through hole 3 interposed therebetween. Further, the same marking areas C3, C8, C11, and C16 are also formed on both sides of the display surface with the through hole 3 interposed therebetween. Furthermore, the same marking areas C4, C7, C12 and C15 are also formed on both sides of the display surface with the through hole 3 interposed therebetween.

図1に示す標示領域C1、C6、C9及びC14と、標示領域C2、C5、C10及びC13と、標示領域C3、C8、C11及びC16と、標示領域C4、C7、C12及びC15とは、各々が同一色の標示がなされた表示面上の領域である。このうち、標示領域C1と標示領域C9は、互いに向かい合わせのペアで配置される。さらに、標示領域C6と標示領域C14も、互いに向かい合わせのペアで配置される。また、標示領域C2、C5、C10及びC13、標示領域C3、C8、C11及びC16及び標示領域C4、C7、C12及びC15についても、標示領域C1、C6、C9及びC14と比べて、色の種類が異なるものの、互いの位置関係は同様である。   The marking areas C1, C6, C9 and C14, the marking areas C2, C5, C10 and C13, the marking areas C3, C8, C11 and C16, and the marking areas C4, C7, C12 and C15 shown in FIG. Is an area on the display surface on which the same color is marked. Among these, the marking area C1 and the marking area C9 are arranged in pairs facing each other. Furthermore, the marking area C6 and the marking area C14 are also arranged in pairs facing each other. In addition, the marking areas C2, C5, C10 and C13, the marking areas C3, C8, C11 and C16 and the marking areas C4, C7, C12 and C15 are also different from the marking areas C1, C6, C9 and C14. Are different, but the mutual positional relationship is the same.

このように、同一色の標示領域を互いに向かわせの状態で配置するのは、カラーパッチ1の標示領域が本来有する色と、計測部位とともに画像に写るカラーパッチ1の標示領域の色との変化量を用いて画像に写る対象者の肌の色を後述の画像処理装置10に補正させる場合に正確な変化量を算出させるためである。   As described above, the marking areas of the same color are arranged so as to face each other because the color of the marking area of the color patch 1 originally changes and the color of the marking area of the color patch 1 that appears in the image together with the measurement site. This is because an accurate change amount is calculated when the image processing apparatus 10 described later corrects the skin color of the subject appearing in the image using the amount.

すなわち、一箇所の標示領域における変化量を観測しただけでは、補正によって対象者の肌の色を再現するには不十分な場合がある。なぜなら、対象者の肌が光源によって受ける影響は、必ずしも計測領域全体にわたって一様ではないからである。このことから、本実施例に係るカラーパッチ1では、一様でない変化を変化量へ反映させるために、計測領域を象る輪郭の両端に近接するペアの位置もしくはそれに準ずるペアの位置に同一色の標示領域をペアで配置することとした。これによって、同一色の標示領域のうちペアとされた標示領域は、互いに計測領域を象る輪郭の両端に近接する位置もしくはそれに準ずる位置において光源による影響を受けることなる。それゆえ、同一色の標示領域のうちペアとされた標示領域に挟み込まれた部分の色の変化量を正確に算出させることができる。さらに、本実施例に係るカラーパッチ1では、4種類の色、加えて、同一色につき2組にわたるペアの標示領域を画像に写り込ませることができる。よって、計測領域全体にわたって光源による影響が反映された変化量を後述の画像処理装置10に算出させることができる。   That is, it may be insufficient to reproduce the color of the subject's skin simply by observing the amount of change in one marking area. This is because the influence on the subject's skin by the light source is not necessarily uniform over the entire measurement region. Therefore, in the color patch 1 according to the present embodiment, in order to reflect a non-uniform change in the amount of change, the same color is used at the position of the pair close to both ends of the contour representing the measurement region or the position of the pair equivalent thereto. The marking areas were arranged in pairs. As a result, the paired marking areas among the marking areas of the same color are affected by the light source at positions close to or opposite to the ends of the contour that represents the measurement area. Therefore, it is possible to accurately calculate the amount of change in the color of the portion sandwiched between the paired marking areas among the marking areas of the same color. Furthermore, in the color patch 1 according to the present embodiment, four types of colors and two pairs of marking areas for the same color can be reflected in the image. Therefore, it is possible to cause the image processing apparatus 10 described later to calculate the amount of change reflecting the influence of the light source over the entire measurement region.

さらに、同一色の標示領域をペアにして配置する場合には、貫通孔3の中心を基準に点対称に配置されるのが好ましい。例えば、図1に示すように、標示領域C1と標示領域C9のペア、さらには、標示領域C6と標示領域C14のペアのごとく、互いに同じ大きさ、かつ同じ形状の標示領域を正対して配置する。さらに、標示領域C2、C5、C10及びC13と、標示領域C3、C8、C11及びC16と、標示領域C4、C7、C12及びC15とについても、C1、C6、C9及びC14と同様に、2組のペアが点対称に配置される。これによって、計測領域に近接する標示領域の変化量を計測領域の対角線上で算出させるとともに、同じ大きさ及び同じ形状の標示領域が光源によって受けた影響を等分に反映した変化量を算出させることが可能となる。   Furthermore, when arranging the marking area | region of the same color as a pair, it is preferable to arrange | position symmetrically about the center of the through-hole 3 as a reference | standard. For example, as shown in FIG. 1, a pair of a marking area C1 and a marking area C9, or a pair of a marking area C6 and a marking area C14 are arranged facing each other with the same size and the same shape. To do. Further, the marking areas C2, C5, C10 and C13, the marking areas C3, C8, C11 and C16, and the marking areas C4, C7, C12 and C15, as well as C1, C6, C9 and C14, are two sets. Are arranged symmetrically. As a result, the amount of change in the marking area adjacent to the measurement area is calculated on the diagonal line of the measurement area, and the amount of change that equally reflects the influence of the label area of the same size and shape on the light source is calculated. It becomes possible.

このように、本実施例に係るカラーパッチ1では、互いに貫通孔3を中心に円環状に配置された各々の標示領域を、漏れなく計測部位に近接させることが可能になる。さらに、本実施例に係るカラーパッチ1が計測部位とともに撮影された場合には、当該撮影された画像から同一色の標示領域のうちペアとされた標示領域に挟み込まれた部分の色の変化量を正確に算出させることができる。それゆえ、カラーパッチ1に配置された標示領域の色の変化量を用いて画像に写った計測部位の色を補正させる場合に、計測部位が本来有する色もしくはそれに近い色を再現する確率を高めることができる。したがって、本実施例に係るカラーパッチ1によれば、色の計測精度を向上させることができる。   As described above, in the color patch 1 according to the present embodiment, it is possible to bring the respective marking areas arranged in an annular shape around the through hole 3 to be close to the measurement site without omission. Further, when the color patch 1 according to the present embodiment is photographed together with the measurement site, the amount of change in the color of the portion sandwiched between the paired labeling areas among the labeling areas of the same color from the photographed image. Can be calculated accurately. Therefore, when correcting the color of the measurement region shown in the image using the amount of change in the color of the marking area arranged in the color patch 1, the probability of reproducing the original color of the measurement region or a color close thereto is increased. be able to. Therefore, according to the color patch 1 according to the present embodiment, the color measurement accuracy can be improved.

また、本実施例に係るカラーパッチ1には、白色の標示領域W1〜W4が所定の間隔、例えば90度間隔で配置される。このため、計測領域に近接する4つの白色の標示領域W1〜W4が画像に写った際の画素値を用いてホワイトバランスを補正させることができる。   Further, in the color patch 1 according to the present embodiment, white marking areas W1 to W4 are arranged at a predetermined interval, for example, an interval of 90 degrees. For this reason, it is possible to correct the white balance by using the pixel values when the four white marking areas W1 to W4 adjacent to the measurement area appear in the image.

さらに、本実施例に係るカラーパッチ1は、表示面の外周および表示面の内周を形成する貫通孔3の形状を円形に形成することによってカラーパッチ1の外形を円環状に形成する。これによって、後述のカメラ11によって計測部位とともに撮影される計測領域を円形にするとともに、カラーパッチ1の外形を円環状にすることができる。このため、カラーパッチ1の表示面が正面から撮影されずに正面以外の多角的な向きから撮影されたとしても、撮影された画像には、対象者の肌における計測領域やカラーパッチ1の表示面の変形を楕円形に抑えることができる。よって、撮影された画像から計測領域や表示面を検出させやすくできる。   Furthermore, in the color patch 1 according to the present embodiment, the outer shape of the color patch 1 is formed in an annular shape by forming the shape of the through hole 3 forming the outer periphery of the display surface and the inner periphery of the display surface in a circular shape. As a result, the measurement area photographed together with the measurement site by the camera 11 to be described later can be circular, and the outer shape of the color patch 1 can be circular. For this reason, even if the display surface of the color patch 1 is not photographed from the front but photographed from various directions other than the front, the photographed image displays the measurement area and the color patch 1 on the subject's skin. Surface deformation can be suppressed to an elliptical shape. Therefore, it is possible to easily detect the measurement region and the display surface from the captured image.

加えて、本実施例に係るカラーパッチ1では、表示面を外周側の円環と内周側の円環の二層に分けて、標示領域C1、C6、C9及びC14と、標示領域C2、C5、C10及びC13と、標示領域C3、C8、C11及びC16と、標示領域C4、C7、C12及びC15とを配置する。このため、外周側の円環と内周側の円環に分けずに標示領域を配置する場合に比べて、より多くの標示領域を効率的に配置することができる。   In addition, in the color patch 1 according to the present embodiment, the display surface is divided into two layers of an outer ring and an inner ring, and the marking areas C1, C6, C9, and C14, the marking area C2, C5, C10, and C13, marking areas C3, C8, C11, and C16, and marking areas C4, C7, C12, and C15 are arranged. For this reason, it is possible to efficiently arrange a larger number of marking areas as compared with the case where the marking areas are arranged without being divided into an outer ring and an inner ring.

なお、標示領域C1、C6、C9及びC14と、標示領域C2、C5、C10及びC13と、標示領域C3、C8、C11及びC16と、標示領域C4、C7、C12及びC15とに標示させる色には、任意の色を採用することができる。好ましくは、肌色に類する色を採用するのがよい。例えば、4色の標示領域を配置する場合には、RGB(Red-Green-Blue color model)空間上で一般に人の肌色が分布すると想定される領域の外延を囲む位置に分布する色、例えば肌色よりも赤みがかった色や黄みがかった色などを採用することができる。なお、カラーパッチ1の表示面上で表示される標示領域の色は、印刷によって着色されたものあってもよいし、その他の方法によって着色されたものであってもよい。   Note that the colors to be displayed in the marking areas C1, C6, C9 and C14, the marking areas C2, C5, C10 and C13, the marking areas C3, C8, C11 and C16, and the marking areas C4, C7, C12 and C15. Any color can be adopted. Preferably, a color similar to skin color is employed. For example, in the case where four color marking areas are arranged, a color distributed in a position surrounding an extension of an area where human skin color is generally distributed in RGB (Red-Green-Blue color model) space, for example, skin color A reddish or yellowish color can be used. In addition, the color of the marking area displayed on the display surface of the color patch 1 may be colored by printing, or may be colored by other methods.

[画像処理装置]
続いて、本実施例に係る画像処理装置の機能的構成について説明する。図2は、実施例1に係る画像処理装置の機能的構成を示すブロック図である。図2に示す画像処理装置10は、カメラ11等によって撮影された画像中に含まれるカラーパッチ1の貫通孔3によって形成された計測領域の色を計測するために、計測領域を取り囲む標示領域の並び順を特定する画像処理を実行するものである。
[Image processing device]
Subsequently, a functional configuration of the image processing apparatus according to the present embodiment will be described. FIG. 2 is a block diagram illustrating a functional configuration of the image processing apparatus according to the first embodiment. 2 measures the color of the measurement area formed by the through hole 3 of the color patch 1 included in the image photographed by the camera 11 or the like, the marking area that surrounds the measurement area. Image processing for specifying the arrangement order is executed.

かかる画像処理装置10の一態様としては、デジタルカメラが接続されたパーソナルコンピュータやカメラ機能を搭載するスマートフォン等の携帯端末に上記の画像処理サービスを提供する画像処理プログラムをインストールさせることにより実装できる。他の一態様としては、上記の画像処理プログラムを実行するWebサーバとして実装することとしてもよいし、また、画像処理サービスをアウトソーシングにより提供するクラウドとして実装することもできる。   As an aspect of the image processing apparatus 10, the image processing apparatus 10 can be implemented by installing an image processing program for providing the image processing service on a personal computer connected with a digital camera or a mobile terminal such as a smartphone equipped with a camera function. As another aspect, it may be implemented as a Web server that executes the above-described image processing program, or may be implemented as a cloud that provides image processing services through outsourcing.

図2に示すように、画像処理装置10は、カメラ11と、記憶部13と、制御部15とを有する。なお、画像処理装置10は、図2に示した機能部以外にも既知のコンピュータが有する各種の機能部、例えば各種の入力デバイス、音声出力デバイスや外部の装置と通信を行うための通信インタフェースなどの機能部を有することとしてもかまわない。   As illustrated in FIG. 2, the image processing apparatus 10 includes a camera 11, a storage unit 13, and a control unit 15. Note that the image processing apparatus 10 includes various functional units included in known computers other than the functional units illustrated in FIG. 2, such as various input devices, audio output devices, and communication interfaces for communicating with external devices. It does not matter as having the functional part.

カメラ11は、CCD(Charge Coupled Device)やCMOS(Complementary Metal Oxide Semiconductor)などを用いた撮像装置である。かかるカメラ11の実装例としては、デジタルカメラを接続することとしてもよいし、携帯端末のように、カメラが予め搭載されている場合にはそのカメラを使用することができる。なお、ここでは、画像処理装置10がカメラ11を有する場合を例示したが、ネットワーク経由または記憶デバイス経由で画像を取得できる場合には、必ずしもカメラ11を有する必要はない。   The camera 11 is an imaging device using a CCD (Charge Coupled Device), a CMOS (Complementary Metal Oxide Semiconductor), or the like. As an implementation example of the camera 11, a digital camera may be connected, or the camera can be used when the camera is mounted in advance, such as a mobile terminal. Although the case where the image processing apparatus 10 includes the camera 11 is illustrated here, the image does not necessarily need to include the camera 11 when an image can be acquired via a network or a storage device.

記憶部13は、制御部15で実行されるOS(Operating System)や画像処理プログラムなどの各種プログラムを記憶する記憶デバイスである。記憶部13の一態様としては、フラッシュメモリなどの半導体メモリ素子、ハードディスク、光ディスクなどの記憶装置が挙げられる。なお、記憶部13は、上記の種類の記憶装置に限定されるものではなく、RAM(Random Access Memory)、ROM(Read Only Memory)であってもよい。   The storage unit 13 is a storage device that stores various programs such as an OS (Operating System) executed by the control unit 15 and an image processing program. As one aspect of the storage unit 13, a storage device such as a semiconductor memory element such as a flash memory, a hard disk, or an optical disk is given. The storage unit 13 is not limited to the type of storage device described above, and may be a RAM (Random Access Memory) or a ROM (Read Only Memory).

記憶部13は、制御部15で実行されるプログラムに用いられるデータの一例として、計測領域データ13aと、対応輪郭点データ13bと、並び順データ13cとを記憶する。なお、記憶部13は、計測領域データ13aや対応輪郭点データ13b以外にも、カラーパッチ1の標示領域のRGB値が定義されたマスタデータ等を記憶することもできる。   The storage unit 13 stores measurement area data 13a, corresponding contour point data 13b, and arrangement order data 13c as an example of data used in a program executed by the control unit 15. In addition to the measurement area data 13a and the corresponding contour point data 13b, the storage unit 13 can also store master data in which the RGB values of the marking area of the color patch 1 are defined.

計測領域データ13aは、計測領域に関するデータである。以下では、領域の輪郭を形成する画素のことを「輪郭点」と記載するとともに、計測領域の輪郭点へ採番される番号のことを「輪郭点番号」と記載する場合がある。かかる計測領域データ13aの一態様としては、計測領域に付与された領域番号、計測領域の各輪郭点の輪郭点番号および各輪郭点の位置情報が対応付けられたデータが挙げられる。一例として、計測領域データ13aは、計測領域の各輪郭点に輪郭点番号が採番された場合に、採番部15dによって登録される。   The measurement area data 13a is data related to the measurement area. Hereinafter, the pixels forming the contour of the region are referred to as “contour points”, and the numbers assigned to the contour points of the measurement region may be referred to as “contour point numbers”. As one aspect of the measurement region data 13a, there is data in which the region number assigned to the measurement region, the contour point number of each contour point in the measurement region, and the position information of each contour point are associated with each other. As an example, the measurement area data 13a is registered by the numbering unit 15d when the outline point number is assigned to each outline point of the measurement area.

対応輪郭点データ13bは、計測領域の輪郭点と最も距離が近い領域の輪郭点に関するデータである。以下では、計測領域の輪郭点と最も近い距離を持つ領域の輪郭点のことを、計測領域の輪郭点に対応する域の輪郭点という意味合いから「対応輪郭点」と記載する場合がある。かかる対応輪郭点データ13bの一態様としては、領域に付与された領域番号ごとに当該領域が持つ対応輪郭点の個数と、当該領域が持つ対応輪郭点に付与された輪郭点番号の合計値とが対応付けられたデータが挙げられる。一例として、対応輪郭点データ13bは、対応輪郭点が抽出された場合に、対応輪郭点が抽出された領域の領域番号に対応付けられた対応輪郭点の個数及び対応輪郭点に付与された輪郭点番号の合計値が後述の更新部15gによって更新される。   Corresponding contour point data 13b is data relating to the contour point of the region closest to the contour point of the measurement region. Hereinafter, the contour point of the region having the closest distance to the contour point of the measurement region may be referred to as “corresponding contour point” in the sense of the contour point of the region corresponding to the contour point of the measurement region. As one mode of the corresponding contour point data 13b, for each region number assigned to the region, the number of corresponding contour points that the region has, and the total value of the contour point numbers assigned to the corresponding contour points that the region has, Are associated with each other. As an example, when the corresponding contour point is extracted, the corresponding contour point data 13b includes the number of corresponding contour points associated with the region number of the region from which the corresponding contour point is extracted and the contour given to the corresponding contour point. The total value of the point numbers is updated by the update unit 15g described later.

並び順データ13cは、カラーパッチ1の並び順に関するデータである。ここで言う「並び順」には、カラーパッチ1の計測領域に近接する領域の並び順と、計測領域を起点として近接領域よりも外側に配置された領域の並び順とが含まれる。以下では、計測領域に近接する領域のことを「近接領域」と記載する場合がある。さらに、以下では、計測領域を起点として近接領域よりも外側に配置された領域のことを「外側領域」と記載する場合がある。   The arrangement order data 13 c is data relating to the arrangement order of the color patches 1. The “arrangement order” referred to here includes the arrangement order of areas close to the measurement area of the color patch 1 and the arrangement order of areas arranged outside the proximity area starting from the measurement area. Hereinafter, an area close to the measurement area may be referred to as “proximity area”. Furthermore, in the following, a region arranged outside the adjacent region starting from the measurement region may be referred to as an “outer region”.

かかる並び順データ13cの一態様としては、計測領域の輪郭を時計回りに周回する場合の並び順と、近接領域の領域番号と、外側領域の領域番号とが対応付けられたデータを採用できる。一例として、並び順データ13cは、近接領域の領域番号と並び順との対応付けがなされた場合に、2つの並び順のうち近接領域の領域番号の並び順が後述の第1対応付け部15jによって登録される。他の一例として、並び順データ13cは、外側領域の領域番号と並び順との対応付けがなされた場合に、残りの外側領域の領域番号の並び順が後述の第2対応付け部15kによって登録される。   As one aspect of the arrangement order data 13c, data in which the arrangement order in the case where the outline of the measurement area is rotated clockwise, the area number of the proximity area, and the area number of the outer area can be used. As an example, when the order number data 13c is associated with the area number of the adjacent area and the arrangement order, the arrangement order of the area numbers of the adjacent areas of the two arrangement orders is the first association unit 15j described later. Registered by As another example, the arrangement order data 13c is registered in the second association unit 15k, which will be described later, when the area numbers of the outer area and the arrangement order are associated with each other. Is done.

制御部15は、各種の処理手順を規定したプログラムや制御データを格納するための内部メモリを有し、これらによって種々の処理を実行する。制御部15は、図2に示すように、取得部15aと、グルーピング部15bと、選択部15cと、採番部15dと、抽出部15eと、付与部15fと、更新部15gと、算出部15hと、第1対応付け部15jとを有する。さらに、制御部15は、第2対応付け部15kと、貫通領域判別部15mと、出力部15nとを有する。   The control unit 15 has an internal memory for storing programs defining various processing procedures and control data, and executes various processes using these. As shown in FIG. 2, the control unit 15 includes an acquisition unit 15a, a grouping unit 15b, a selection unit 15c, a numbering unit 15d, an extraction unit 15e, an assignment unit 15f, an update unit 15g, and a calculation unit. 15h and a first association unit 15j. Furthermore, the control unit 15 includes a second association unit 15k, a penetrating region determination unit 15m, and an output unit 15n.

取得部15aは、画像を取得する処理部である。一態様としては、取得部15aは、カメラ11によって撮影される画像を取得する。他の一様としては、取得部15aは、インターネットやLAN(Local Area Network)などのネットワークを介して画像を取得することもできる。更なる一態様としては、取得部15aは、メモリカードやUSB(Universal Serial Bus)メモリなどの記憶装置から画像を取得することもできる。   The acquisition unit 15a is a processing unit that acquires an image. As one aspect, the acquisition unit 15a acquires an image photographed by the camera 11. As another uniformity, the acquisition unit 15a can also acquire an image via a network such as the Internet or a LAN (Local Area Network). As a further aspect, the acquisition unit 15a can also acquire an image from a storage device such as a memory card or a USB (Universal Serial Bus) memory.

グルーピング部15bは、画像に含まれる画素のうち隣接する画素間で画素値が類似する画素同士をグルーピングする処理部である。一態様としては、グルーピング部15bは、取得部15aによって取得された画像に含まれる画素のうち輝度が所定の閾値、例えば100以上である画素を対象に、隣接する画素間でR成分、G成分及びB成分が類似する画素同士をグルーピングする。このように、閾値以上の画素に絞ってグルーピングするのは、カラーパッチ1の標示領域および計測領域に露出すると想定される肌に対応する画素以外の画素をグルーピングの対象から除外することによって処理の精度および効率を向上させるためである。その後、グルーピング部15bは、グルーピングの結果として得られた領域に当該領域を識別する領域番号を付与する。   The grouping unit 15b is a processing unit that groups pixels having similar pixel values between adjacent pixels among the pixels included in the image. As one aspect, the grouping unit 15b is configured such that, among pixels included in the image acquired by the acquisition unit 15a, a pixel whose luminance is a predetermined threshold, for example, 100 or more, is an R component and a G component between adjacent pixels. And pixels having similar B components are grouped. As described above, the grouping is performed by narrowing down to pixels that are equal to or greater than the threshold value by excluding the pixels other than the pixels corresponding to the skin that are assumed to be exposed in the indication area and the measurement area of the color patch 1 from the grouping target. This is to improve accuracy and efficiency. Thereafter, the grouping unit 15b assigns an area number for identifying the area to the area obtained as a result of the grouping.

ここで、図3及び図4を用いて、グルーピングの具体例について説明する。図3は、カラーパッチ1が写る画像の一例を示す図である。図4は、グルーピング結果の一例を示す図である。図3に示す画像にグルーピングが実行された場合には、図4に示す領域番号1〜23の23個の領域が抽出される。図3に示すように、対象者の肌にカラーパッチ1が貼付された上で画像が撮像される場合には、図4に示すように、色の計測に有用な領域と色の計測には無関係な領域とが混在した状態でグルーピング結果が得られる。図4の例で言えば、貫通孔3から露出する肌の計測領域やカラーパッチ1の標示領域などの色の計測に有用な領域が領域番号2〜23(領域番号12を除く)として抽出される。これとともに、カラーパッチ1とは無関係な背景等の領域が領域番号1や領域番号12として抽出される。   Here, a specific example of grouping will be described with reference to FIGS. 3 and 4. FIG. 3 is a diagram illustrating an example of an image in which the color patch 1 is captured. FIG. 4 is a diagram illustrating an example of the grouping result. When grouping is performed on the image shown in FIG. 3, 23 areas of area numbers 1 to 23 shown in FIG. 4 are extracted. As shown in FIG. 3, when an image is picked up after the color patch 1 is applied to the skin of the subject person, as shown in FIG. The grouping result can be obtained in a state where irrelevant areas are mixed. In the example of FIG. 4, regions useful for color measurement such as the skin measurement region exposed from the through hole 3 and the marking region of the color patch 1 are extracted as region numbers 2 to 23 (excluding region number 12). The At the same time, an area such as a background that is not related to the color patch 1 is extracted as area number 1 or area number 12.

選択部15cは、グルーピング部15bによってグルーピングされた領域のうち、カラーパッチ1の貫通孔3によって形成される計測領域に対応するものを選択する処理部である。一態様としては、選択部15cは、カラーパッチ1の貫通孔3の形状に対応する形状の領域を選択する。例えば、図1に示すカラーパッチ1のように、貫通孔3の形状が円形に形成されている場合には、図4に示した領域番号1〜23のうち形状が円形である領域番号11を計測領域として選択すればよい。このとき、カラーパッチ1の表示面が正面から撮影されていない場合には、貫通孔3の形状が変形する場合がある。この場合には、楕円形状を持つ領域番号のものを計測領域として選択すればよい。なお、カラーパッチ1の貫通孔の形状が円形でなく、多角形である場合には、形状が先の多角形である領域番号の領域を計測領域として選択すればよい。   The selection unit 15c is a processing unit that selects a region corresponding to the measurement region formed by the through hole 3 of the color patch 1 from the regions grouped by the grouping unit 15b. As an aspect, the selection unit 15 c selects a region having a shape corresponding to the shape of the through hole 3 of the color patch 1. For example, when the shape of the through hole 3 is circular as in the color patch 1 shown in FIG. 1, the region number 11 having a circular shape among the region numbers 1 to 23 shown in FIG. What is necessary is just to select as a measurement area | region. At this time, when the display surface of the color patch 1 is not photographed from the front, the shape of the through hole 3 may be deformed. In this case, an area number having an elliptical shape may be selected as the measurement area. In addition, when the shape of the through hole of the color patch 1 is not a circle but a polygon, an area having an area number whose shape is the previous polygon may be selected as the measurement area.

採番部15dは、画像上で計測領域の輪郭を形成する各輪郭点に番号を採番する処理部である。一態様としては、採番部15dは、画像の左上の点を原点とし、画像の幅方向をX軸、高さ方向をY軸とした場合に、計測領域の輪郭点のうちY座標が最も小さい値を持つ画素を起点とし、起点から時計回りに計測領域の輪郭点を探索する。その上で、採番部15dは、計測領域の輪郭点へ輪郭点番号を探索順に採番する。その後、採番部15dは、計測領域の領域番号、各輪郭点の輪郭点番号および各輪郭点の位置情報を対応付けて計測領域データ13aとして記憶部13へ登録する。なお、ここでは、計測領域の輪郭点のうちY座標が最も小さい値を持つ画素を起点とする場合を例示したが、計測領域の任意の輪郭点を起点とすることができる。また、ここでは、計測領域の輪郭点へ昇順に番号を採番する場合を想定するが、開示の装置はこれに限定されず、降順に番号を付与することもできる。   The numbering unit 15d is a processing unit that numbers each contour point that forms the contour of the measurement region on the image. As one aspect, the numbering unit 15d uses the upper left point of the image as the origin, the X direction is the width direction of the image, and the Y axis is the height direction. A pixel having a small value is set as a starting point, and a contour point in the measurement region is searched clockwise from the starting point. Then, the numbering unit 15d assigns contour point numbers to the contour points of the measurement region in the search order. Thereafter, the numbering unit 15d associates the region number of the measurement region, the contour point number of each contour point, and the position information of each contour point, and registers them in the storage unit 13 as the measurement region data 13a. Here, the case where the pixel having the smallest Y coordinate among the contour points in the measurement region is exemplified as the starting point, but any contour point in the measurement region can be used as the starting point. Here, it is assumed that numbers are assigned in ascending order to the contour points of the measurement region. However, the disclosed apparatus is not limited to this, and numbers can be assigned in descending order.

抽出部15eは、計測領域データ13aを用いて、計測領域の輪郭点ごとに、各領域の輪郭点のうち当該計測領域の輪郭点と最も距離が近い対応輪郭点を抽出する処理部である。一態様としては、領域ごとに当該領域の輪郭点のうち最も計測領域に近い位置にある輪郭点と計測領域の輪郭点との間で両者の輪郭点間の距離を算出する。その上で、抽出部15eは、最も計測領域の輪郭点との間で距離が短い輪郭点を対応輪郭点として抽出する。このようにして、抽出部15eは、計測領域の全輪郭点を対象に、対応輪郭点を抽出する処理を繰り返し実行する。   The extraction unit 15e is a processing unit that extracts, for each contour point in the measurement region, a corresponding contour point that is closest to the contour point in the measurement region, for each contour point in the measurement region, using the measurement region data 13a. As one aspect, the distance between the contour points between the contour point closest to the measurement region and the contour point of the measurement region is calculated for each region. Then, the extracting unit 15e extracts a contour point having a short distance from the contour point of the measurement region as a corresponding contour point. In this way, the extraction unit 15e repeatedly executes a process of extracting corresponding contour points for all contour points in the measurement region.

付与部15fは、対応輪郭点に計測領域の輪郭点の輪郭点番号を付与する処理部である。一態様としては、付与部15fは、抽出部15eによって対応輪郭点が抽出された場合に、当該対応輪郭点に対し、計測領域の輪郭点の輪郭点番号を付与する。   The assigning unit 15f is a processing unit that assigns the contour point number of the contour point of the measurement region to the corresponding contour point. As one aspect, when the corresponding contour point is extracted by the extraction unit 15e, the assigning unit 15f assigns the contour point number of the contour point of the measurement region to the corresponding contour point.

更新部15gは、対応輪郭点データ13bを更新する処理部である。一態様としては、更新部15gは、抽出部15eによって対応輪郭点が抽出される度に、記憶部13に記憶された対応輪郭点データ13bのうち対応輪郭点が抽出された領域の領域番号を持つ対応輪郭点データを対象に、次のような処理を実行する。すなわち、更新部15gは、当該領域が持つ対応輪郭点の個数を1つインクリメントするとともに、当該領域が持つ対応輪郭点に付与された輪郭点番号の合計値に今回抽出された対応輪郭点へ付与された輪郭点番号を加算する更新を実行する。   The update unit 15g is a processing unit that updates the corresponding contour point data 13b. As an aspect, the update unit 15g obtains the region number of the region from which the corresponding contour point is extracted from the corresponding contour point data 13b stored in the storage unit 13 every time the corresponding contour point is extracted by the extraction unit 15e. The following processing is executed for the corresponding contour point data. That is, the updating unit 15g increments the number of corresponding contour points of the area by one, and adds the total value of the contour point numbers assigned to the corresponding contour points of the area to the corresponding contour points extracted this time. The update is performed to add the contour point numbers.

算出部15hは、対応輪郭点データ13bを用いて、領域別に当該領域の代表値を算出する処理部である。一態様としては、算出部15hは、計測領域の全ての輪郭点にわたって対応輪郭点が抽出されると、対応輪郭点データ13bを参照して、最大の対応輪郭点の個数を取得する。そして、算出部15hは、最大の対応輪郭点の個数に所定の係数、例えば5%を乗算することによって標示領域の並び順に含めるにあたって不適正な領域をフィルタリングする閾値を算出する。続いて、算出部15hは、対応輪郭点データ13bのうち対応輪郭点の個数が先に算出した閾値を超える対応輪郭点データ13bを読み出す。これによって、対応輪郭点の個数が閾値以下である対応輪郭点データ13bを除外する。その上で、算出部15hは、先に読み出した対応輪郭点データ13bごとに対応輪郭点へ付与された輪郭点番号の合計値を対応輪郭点の個数で除算する計算を実行することによって領域番号別の輪郭点番号の平均値を各領域の代表値として算出する。なお、ここでは、対応輪郭点の個数の最大値からフィルタリングの閾値を算出する場合を例示したが、対応輪郭点の個数がゼロである対応輪郭点データ13bだけを除外して読み出すこととしてもかまわない。   The calculation unit 15h is a processing unit that calculates the representative value of each region by using the corresponding contour point data 13b. As one aspect, when the corresponding contour points are extracted over all the contour points in the measurement region, the calculation unit 15h refers to the corresponding contour point data 13b and acquires the maximum number of corresponding contour points. Then, the calculation unit 15h calculates a threshold value for filtering an inappropriate area for inclusion in the order of arrangement of the marking areas by multiplying the maximum number of corresponding contour points by a predetermined coefficient, for example, 5%. Subsequently, the calculation unit 15h reads the corresponding contour point data 13b in which the number of corresponding contour points exceeds the previously calculated threshold value in the corresponding contour point data 13b. As a result, the corresponding contour point data 13b in which the number of corresponding contour points is equal to or less than the threshold value is excluded. After that, the calculation unit 15h performs a calculation to divide the total value of the contour point numbers assigned to the corresponding contour points for each corresponding contour point data 13b read out earlier by the number of corresponding contour points. An average value of different contour point numbers is calculated as a representative value of each region. In this example, the filtering threshold is calculated from the maximum number of corresponding contour points. However, only the corresponding contour point data 13b in which the number of corresponding contour points is zero may be excluded and read. Absent.

このように、算出部15hは、最大の対応輪郭点の個数から導出される閾値を用いて、近接領域として並び順に対応付けるのに使用する対応輪郭点データ13bをフィルタリングする。これによって、対応輪郭点を持たない外側領域や対応輪郭点を持っていてもノイズとなる微少な領域等の領域番号が並び順位対応付けられるのを防止することができる。   In this way, the calculation unit 15h filters the corresponding contour point data 13b used for associating the adjacent regions in the order of arrangement using the threshold derived from the maximum number of corresponding contour points. As a result, it is possible to prevent the region numbers such as the outer region that does not have the corresponding contour point or the minute region that causes noise even if it has the corresponding contour point from being arranged and correlated.

図5は、対応輪郭点の一例を示す図である。図5の例では、各々の四角のマスが対応輪郭点を指す。この四角のマスの中の数字は、計測領域の輪郭点から各々の領域の対応輪郭点に付与された輪郭点番号を指す。これら対応輪郭点のうち、同一の領域に属する対応輪郭点には、同一の塗りつぶしがなされている。図5に示すように、輪郭点番号1〜7まで連続した後に輪郭点番号8〜9を跳ばして輪郭点番号10〜11は、同一の領域が持つ対応輪郭点であり、対応輪郭点の個数は9個となる。この場合には、対応輪郭点の輪郭点番号の合計である「49=1+2+3+4+5+6+7+10+11」を対応輪郭点の個数「9」で除算することによって代表値が「5」と算出される。また、輪郭点番号8〜9まで連続した後に輪郭点番号10〜11を跳ばして輪郭点番号12〜17は、同一の領域が持つ対応輪郭点であり、対応輪郭点の個数は8個となる。この場合には、対応輪郭点の輪郭点番号の合計である「104=8+9+12+13+14+15+16+17」を対応輪郭点の個数「8」で除算することによって代表値が「13」と算出される。さらに、輪郭点番号18〜20は、同一の領域が持つ対応輪郭点であり、対応輪郭点の個数は3個となる。この場合には、対応輪郭点の輪郭点番号の合計である「57=18+19+20」を対応輪郭点の個数「3」で除算することによって代表値が「19」と算出される。   FIG. 5 is a diagram illustrating an example of corresponding contour points. In the example of FIG. 5, each square cell indicates a corresponding contour point. The numbers in the squares indicate the contour point numbers assigned to the corresponding contour points in each region from the contour points in the measurement region. Among these corresponding contour points, corresponding contour points belonging to the same region are filled with the same color. As shown in FIG. 5, after the contour point numbers 1 to 7 are continued, the contour point numbers 8 to 9 are skipped, and the contour point numbers 10 to 11 are the corresponding contour points of the same region. The number is nine. In this case, divide “49 = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 10 + 11”, which is the sum of the contour point numbers of the corresponding contour points, by the number of corresponding contour points “9”. The representative value is calculated as “5”. Further, after the contour point numbers 8 to 9 are continued, the contour point numbers 10 to 11 are skipped, and the contour point numbers 12 to 17 are corresponding contour points in the same region, and the number of corresponding contour points is eight. Become. In this case, “104 = 8 + 9 + 12 + 13 + 14 + 15 + 16 + 17”, which is the sum of the contour point numbers of the corresponding contour points, is divided by the number of corresponding contour points “8”. The value is calculated as “13”. Further, contour point numbers 18 to 20 are corresponding contour points in the same region, and the number of corresponding contour points is three. In this case, the representative value is calculated as “19” by dividing “57 = 18 + 19 + 20”, which is the sum of the contour point numbers of the corresponding contour points, by the number of corresponding contour points “3”.

第1対応付け部15jは、カラーパッチ1の計測領域に近接する近接領域の領域番号と、計測領域の輪郭を時計回りに周回する場合の並び順とを対応付ける処理部である。ここでは、一例として、計測領域の輪郭を時計回りに周回する場合の並び順に領域番号を対応付ける場合を想定する。この場合、第1対応付け部15jは、算出部15hによって算出された代表値が小さい領域の領域番号から順番に領域番号を並び順に対応付ける。その後、第1対応付け部15jは、近接領域の領域番号の並び順を並び順データ13cとして記憶部13へ登録する。   The first associating unit 15j is a processing unit that associates the region number of the adjacent region close to the measurement region of the color patch 1 with the arrangement order when the contour of the measurement region is rotated clockwise. Here, as an example, a case is assumed in which region numbers are associated with each other in the arrangement order when the contour of the measurement region is rotated clockwise. In this case, the first association unit 15j associates the region numbers in order from the region number of the region with the small representative value calculated by the calculation unit 15h. Thereafter, the first association unit 15j registers the arrangement order of the area numbers of the adjacent areas in the storage unit 13 as the arrangement order data 13c.

これによって、グルーピングされた領域のうちカラーパッチ1の計測領域に近接する近接領域の並び順が特定されることになる。かかる近接領域には、カラーパッチ1の標示領域の中でも内周に配置された白色以外の標示領域以外にも、カラーパッチ1の内周および外周を貫通する白色の標示領域が含まれる。   As a result, the arrangement order of the adjacent areas close to the measurement area of the color patch 1 among the grouped areas is specified. The proximity area includes a white marking area penetrating the inner circumference and the outer circumference of the color patch 1 in addition to the non-white marking area arranged on the inner circumference among the marking areas of the color patch 1.

図6は、並び順データ13cの一例を示す図である。図7は、カラーパッチ1上における並び順を表す図である。図6に示す並び順データ13cは、2つの並び順のうち近接領域の領域番号の並び順が対応付けされた時点のものである。図6に示すように、図4に示した領域番号1〜23の領域のうち領域番号2、6、10、14、17、20、21、19、15、13、9及び5が近接領域として特定されたことを示す。図6に示す並び順データ13cは、図7に示す並び順1に図4に示した領域番号2の領域が近接領域として対応付けられたことを示す。さらに、図6に示す並び順データ13cは、図7に示す並び順2に図4に示した領域番号6の領域が近接領域として対応付けられたことを示す。さらに、図6に示す並び順データ13cは、図7に示す並び順3に図4に示した領域番号10の領域が近接領域として対応付けられたことを示す。同様に、図6に示す並び順データ13cは、図7に示す並び順4〜12に、図4に示した領域番号14、17、20、21、19、15、13、9、5の領域が近接領域として対応付けられたことを示す。   FIG. 6 is a diagram illustrating an example of the arrangement order data 13c. FIG. 7 is a diagram illustrating the arrangement order on the color patch 1. Arrangement order data 13c shown in FIG. 6 is the one at the time when the arrangement order of the area numbers of the adjacent areas is associated with one of the two arrangement orders. As shown in FIG. 6, region numbers 2, 6, 10, 14, 17, 20, 21, 19, 15, 13, 9, and 5 among the regions of region numbers 1 to 23 shown in FIG. Indicates that it has been identified. The arrangement order data 13c shown in FIG. 6 indicates that the area of area number 2 shown in FIG. 4 is associated with the arrangement order 1 shown in FIG. Furthermore, the arrangement order data 13c shown in FIG. 6 indicates that the area of area number 6 shown in FIG. 4 is associated with the arrangement order 2 shown in FIG. Furthermore, the arrangement order data 13c shown in FIG. 6 indicates that the area of area number 10 shown in FIG. 4 is associated with the arrangement order 3 shown in FIG. Similarly, the arrangement order data 13c shown in FIG. 6 includes the area numbers 14, 17, 20, 21, 19, 15, 13, 9, 5, and 5 shown in FIG. 4 in the arrangement orders 4 to 12 shown in FIG. Is associated as a proximity region.

第2対応付け部15kは、近接領域の領域番号の並び順にしたがって、近接領域よりも外側に存在する外側領域の並び順と、領域の領域番号とを対応付ける処理部である。一態様としては、第2対応付け部15kは、計測領域の中心座標(CX,CY)を起点とし、近接領域の中心座標(AX,AY)を経由して当該近接領域の外側に存在する外側領域まで画素を探索する。そして、第2対応付け部15kは、画素の探索が近接領域の外側に存在する領域に至った場合に、当該近接領域の外側領域の領域番号の並び順を並び順データ13cへ追加登録する。   The second association unit 15k is a processing unit that associates the arrangement order of the outer areas existing outside the proximity area with the area numbers of the areas in accordance with the arrangement order of the area numbers of the proximity areas. As an aspect, the second association unit 15k starts from the center coordinates (CX, CY) of the measurement area, and is located outside the proximity area via the center coordinates (AX, AY) of the proximity area. Search for pixels up to the region. Then, when the pixel search reaches an area existing outside the proximity area, the second association unit 15k additionally registers the arrangement order of the area numbers of the outside area of the proximity area in the arrangement data 13c.

これによって、グルーピングされた領域のうち近接領域よりも外側に存在する外側領域の並び順が特定されることになる。かかる外側領域には、カラーパッチ1の標示領域の中でも外周に配置された白色以外の標示領域以外にも、カラーパッチ1の内周および外周を貫通する白色の標示領域が含まれる。なお、以下では、カラーパッチ1の内周および外周を貫通する白色の標示領域のことを「貫通領域」と記載する場合がある。   As a result, the arrangement order of the outer areas existing outside the adjacent area in the grouped areas is specified. The outer area includes a white marking area penetrating the inner and outer circumferences of the color patch 1 in addition to the non-white marking areas arranged on the outer circumference in the marking areas of the color patch 1. In the following, the white marking area that penetrates the inner and outer circumferences of the color patch 1 may be referred to as a “penetrating area”.

図8は、並び順データ13cの一例を示す図である。図8に示す並び順データ13cは、残りの外側領域の領域番号の並び順が対応付けされた時点のものである。図8に示すように、図4に示した領域番号1〜23の領域のうち領域番号1、4、8、18、23、22、16、7及び3が外側領域として特定されたことを示す。図8に示す並び順データ13cは、並び順1、4、7及び10に図4に示した領域番号1の領域が外側領域として対応付けられたことを示す。これらの並び順は、実際には貫通領域である白色の標示領域に対応するが、外側領域が対応付けられた時点では並び順が貫通領域であること、すなわち外側領域1が標示領域でない背景領域であることは判別されていない。これは、後述の貫通領域判別部15mによって判別される。   FIG. 8 is a diagram illustrating an example of the arrangement order data 13c. The arrangement order data 13c shown in FIG. 8 is the data when the arrangement order of the area numbers of the remaining outer areas is associated. As shown in FIG. 8, the region numbers 1, 4, 8, 18, 23, 22, 16, 7, and 3 among the regions of region numbers 1 to 23 shown in FIG. 4 are identified as outer regions. . The arrangement order data 13c shown in FIG. 8 indicates that the area of area number 1 shown in FIG. 4 is associated with the arrangement orders 1, 4, 7, and 10 as the outer area. These arrangement order actually corresponds to the white marking area that is the penetration area, but when the outer area is associated, the arrangement order is the penetration area, that is, the background area where the outer area 1 is not the marking area. It has not been determined. This is discriminated by a penetrating region discriminating unit 15m described later.

貫通領域判別部15mは、貫通領域を判別する処理部である。一態様としては、貫通領域判別部15mは、第2対応付け部15kによって全ての近接領域について外側領域が探索されると、計測領域の中心座標(CX,CY)から近接領域の外縁部までの距離が最長である並び順が貫通領域であると判別する。ここで、カラーパッチ1の例で言えば、貫通領域である白色の標示領域は、2つの並び順を跳ばして配置されるという規則性がある。したがって、貫通領域判別部15は、先に貫通領域であると判別した並び順Lに加え、並び順L+3、並び順L+6及び並び順L+9をさらに貫通領域であると判別する。   The penetration region determination unit 15m is a processing unit that determines a penetration region. As one aspect, when the outer area is searched for all the adjacent areas by the second associating section 15k, the penetrating area determining section 15m extends from the center coordinates (CX, CY) of the measurement area to the outer edge of the adjacent area. It is determined that the arrangement order with the longest distance is the penetrating region. Here, in the example of the color patch 1, there is a regularity that the white marking area that is the penetrating area is arranged so as to skip two arrangement orders. Therefore, the penetration area determination unit 15 further determines that the arrangement order L + 3, the arrangement order L + 6, and the arrangement order L + 9 are further penetration areas in addition to the arrangement order L that is previously determined to be the penetration area.

図9は、計測領域の中心座標から近接領域の外縁部までの距離を示す図である。図10は、図9に示した距離の数値例を示す図である。図9に示すように、計測領域の中心座標(CX,CY)を起点とし、各近接領域の中心座標(AX,AY)を経由して当該近接領域の外側に存在する外側領域まで画素を探索する過程で、計測領域の中心座標(CX,CY)から各近接領域の外縁部までの距離が測定される。この距離の測定結果が図10のものであるとしたとき、最大値「185」の距離を持つ並び順1が貫通領域であると判別される。かかる判別を行うのは、カラーパッチ1の内周および外周の二層に分けて配置された白色以外の色の標示領域の外縁部までの距離よりもカラーパッチ1の内周および外周を貫通する白色の標示領域までの距離が長いという規則性を利用するためである。そして、距離の中でも最大値に着目するのは、貫通領域である並び順をより確度よく判別するためである。このように、貫通領域がある並び順が1つ判別されると、貫通領域である白色の標示領域が2つの並び順を跳ばして配置されるという規則性をさらに利用して、残りの貫通領域がある並び順4、7及び10をさらに判別できる。   FIG. 9 is a diagram illustrating the distance from the center coordinate of the measurement region to the outer edge of the proximity region. FIG. 10 is a diagram illustrating a numerical example of the distance illustrated in FIG. As shown in FIG. 9, the search is performed from the center coordinates (CX, CY) of the measurement area to the outer area existing outside the proximity area via the center coordinates (AX, AY) of each proximity area. In the process, the distance from the center coordinates (CX, CY) of the measurement area to the outer edge of each adjacent area is measured. Assuming that the measurement result of this distance is that of FIG. 10, it is determined that the arrangement order 1 having the distance of the maximum value “185” is the through region. Such determination is made by penetrating the inner and outer peripheries of the color patch 1 rather than the distance to the outer edge of the marking region of a color other than white arranged in two layers, the inner and outer peripheries of the color patch 1. This is because the regularity that the distance to the white marking area is long is used. The reason for paying attention to the maximum value among the distances is to more accurately determine the arrangement order of the through regions. In this way, when one arrangement order with a penetrating area is determined, the remaining markings are further utilized by further utilizing the regularity that the white marking area that is the penetrating area is arranged by jumping two arrangement orders. It is possible to further determine the arrangement order 4, 7, and 10 in which the areas are present.

出力部15nは、並び順データ13c及び貫通領域の判別結果を用いて、カラーパッチ1の各標示領域のRGB値を所定の出力先へ出力する処理部である。ここで、以下では、出力先へのデータの出力形式が白色の標示領域W1〜W4のRGB値および白色以外の色の標示領域C1〜C16のRGB値を出力する形式である場合を想定する。さらに、標示領域C1の輝度が標示領域C2の輝度よりも高い場合を想定する。なお、上記のRGB値は、各々の標示領域を構成する画素のRGB値の平均値であるものとする。   The output unit 15n is a processing unit that outputs the RGB value of each marking area of the color patch 1 to a predetermined output destination using the arrangement order data 13c and the discrimination result of the penetrating area. Here, in the following, it is assumed that the output format of the data to the output destination is a format that outputs the RGB values of the white marking areas W1 to W4 and the RGB values of the marking areas C1 to C16 of colors other than white. Furthermore, it is assumed that the luminance of the marking area C1 is higher than the luminance of the marking area C2. Note that the above RGB values are average values of the RGB values of the pixels constituting each marking area.

かかる出力部15nは、並び順と対応付けられた領域番号と、白色の標示領域W1〜W4および白色以外の色の標示領域C1〜C16との間でマッピングを行うために、並び順データ13cの並び順のうちマッピング出力の起点とする並び順を特定する。   The output unit 15n performs mapping between the area number associated with the arrangement order, the white marking areas W1 to W4, and the marking areas C1 to C16 of colors other than white. Specify the order of mapping output from the mapping output.

これを説明すると、カラーパッチ1には、カラーパッチ1の貫通領域とその90度隣の貫通領域との間に挟まれる内側および外側の標示領域は、90度ごとに内側の標示領域の色と外側の標示領域の色が入れ替わるように配置されると規則性がある。これを利用して、出力部15nは、並び順データ13cの並び順のうち貫通領域と判別された並び順Lよりも1つ並び順が大きい近接領域、すなわち貫通領域よりも1つ右側にある近接領域の輝度がその外側領域の輝度よりも大きいか否かを判定する。このように、互いに隣接する近接領域及び外側領域を比較するのは、局所的に見れば、光源による影響が少ないからである。さらに、輝度を比較するのは、光源による影響がRGB値よりも輝度の方が光源によって受ける影響が小さく、撮影によって近接領域と外側領域の輝度の大小関係が逆転するケースは想定しなくてよいからである。   Explaining this, the color patch 1 includes the inner and outer marking areas sandwiched between the penetrating area of the color patch 1 and the penetrating area adjacent to the 90-degree area with the color of the inner marking area every 90 degrees. If it is arranged so that the colors of the outer marking areas are switched, there is regularity. By utilizing this, the output unit 15n is one adjacent to the adjacent region having a larger arrangement order than the arrangement order L determined as the through region in the arrangement order of the arrangement order data 13c, that is, one right side of the through region. It is determined whether the brightness of the adjacent area is greater than the brightness of the outer area. The reason why the adjacent area and the outer area adjacent to each other are compared in this manner is that the influence of the light source is small when viewed locally. Furthermore, the luminance is compared because the influence of the light source is less influenced by the light source than the RGB value, and it is not necessary to assume a case where the magnitude relationship between the luminance of the adjacent area and the outer area is reversed by shooting. Because.

そして、近接領域の輝度がその外側領域の輝度よりも高い場合には、近接領域及び外側領域の並び順がデータの出力形式で定められている標示領域の整列順と対応すると判別できる。この場合には、出力部15nは、並び順をシフトさせずに、当該貫通領域の並び順Lを起点とし、各々の並び順と対応付けられた領域番号を白色の標示領域W1〜W4および白色以外の色の標示領域C1〜C16とマッピングする。一方、近接領域の輝度がその外側領域の輝度以下である場合には、近接領域及び外側領域の並び順がデータの出力形式で定められている標示領域の整列順とズレていると判別できる。この場合には、出力部15nは、貫通領域の並び順Lよりも1つの先の貫通領域の並び順L+3が並び順Lとなるように並び順をシフトする。これによって、出力部15nは、元の並び順L+3を並び順Lへシフトさせ、元の並び順L+6を並び順L+3へシフトさせ、元の並び順L+9を並び順L+6へシフトさせ、元の並び順Lを並び順L+9へシフトさせる。このようにして、画像に写るカラーパッチ1を90度回転させた場合の並び順にシフトさせる。その後、出力部15nは、シフト後の貫通領域の並び順Lを起点とし、各々の並び順と対応付けられた領域番号を白色の標示領域W1〜W4および白色以外の色の標示領域C1〜C16とマッピングする。   When the brightness of the proximity area is higher than the brightness of the outside area, it can be determined that the order of arrangement of the proximity area and the outside area corresponds to the order of arrangement of the marking areas defined in the data output format. In this case, the output unit 15n starts from the arrangement order L of the penetrating areas without shifting the arrangement order, and uses the area numbers associated with each arrangement order as the white marking areas W1 to W4 and the white color. It maps with the marking area | regions C1-C16 of colors other than. On the other hand, when the brightness of the proximity area is less than or equal to the brightness of the outside area, it can be determined that the order of arrangement of the proximity area and the outside area deviates from the order of alignment of the marking areas defined in the data output format. In this case, the output unit 15n shifts the arrangement order so that the arrangement order L + 3 of the penetrating area one prior to the arrangement order L of the through areas becomes the arrangement order L. Accordingly, the output unit 15n shifts the original arrangement order L + 3 to the arrangement order L, shifts the original arrangement order L + 6 to the arrangement order L + 3, shifts the original arrangement order L + 9 to the arrangement order L + 6, and restores the original arrangement order. The order L is shifted to the order L + 9. In this way, the color patches 1 appearing in the image are shifted in the arrangement order when they are rotated 90 degrees. Thereafter, the output unit 15n starts from the arrangement order L of the through areas after the shift, and uses the area numbers associated with each arrangement order as the white indication areas W1 to W4 and the indication areas C1 to C16 of colors other than white. And mapping.

例えば、標示領域W1には、貫通領域の第1要素である並び順Lの領域番号がマッピングされる。また、標示領域W2には、貫通領域の第2要素である並び順L+3の領域番号がマッピングされる。また、標示領域W3には、貫通領域の第3要素である並び順L+6の領域番号がマッピングされる。また、標示領域W4には、貫通領域の第4要素である並び順L+9の領域番号がマッピングされる。これら標示領域W1〜W4は、貫通領域である白色の標示領域である。このため、標示領域W1〜W4には、外側領域は存在しないので、並び順L、並び順L+3、並び順L+6、並び順L+9の近接領域の領域番号がマッピングされる。   For example, an area number in the arrangement order L that is the first element of the penetrating area is mapped to the marking area W1. In addition, the area number of the arrangement order L + 3 which is the second element of the penetrating area is mapped to the marking area W2. In addition, the area number of the arrangement order L + 6 that is the third element of the penetrating area is mapped to the marking area W3. Further, the area number of the arrangement order L + 9, which is the fourth element of the penetrating area, is mapped to the marking area W4. These marking areas W1 to W4 are white marking areas that are penetration areas. For this reason, since there are no outer areas in the marking areas W1 to W4, the area numbers of the adjacent areas of the arrangement order L, the arrangement order L + 3, the arrangement order L + 6, and the arrangement order L + 9 are mapped.

さらに、標示領域C1には、貫通領域の第1要素である並び順Lよりも1つ先の並び順L+1の近接領域の領域番号がマッピングされる。また、標示領域C2には、標示領域C1の外側領域の領域番号がマッピングされる。また、標示領域C3には、標示領域C1の並び順よりも1つ先の並び順の近接領域の領域番号がマッピングされる。また、標示領域C4には、標示領域C3の外側領域の領域番号がマッピングされる。ここで、標示領域C5には、標示領域C3との間に標示領域W2が挟まれるので、標示領域C3の並び順よりも2つ先の並び順の近接領域の領域番号がマッピングされる。また、標示領域C6には、標示領域C5の外側領域の領域番号がマッピングされる。また、標示領域C7には、標示領域C6の並び順よりも1つ先の並び順の近接領域の領域番号がマッピングされる。また、標示領域C8には、標示領域C7の外側領域の領域番号がマッピングされる。ここで、標示領域C9には、標示領域C7との間に標示領域W3が挟まれるので、標示領域C7の並び順よりも2つ先の並び順の近接領域の領域番号がマッピングされる。また、標示領域C10には、標示領域C9の外側領域の領域番号がマッピングされる。また、標示領域C11には、標示領域C9の並び順よりも1つ先の並び順の近接領域の領域番号がマッピングされる。また、標示領域C12には、標示領域C11の外側領域の領域番号がマッピングされる。ここで、標示領域C13には、標示領域C11との間に標示領域W4が挟まれるので、標示領域C11の並び順よりも2つ先の並び順の近接領域の領域番号がマッピングされる。また、標示領域C14には、標示領域C13の外側領域の領域番号がマッピングされる。また、標示領域C15には、標示領域C13の並び順よりも1つ先の並び順の近接領域の領域番号がマッピングされる。また、標示領域C16には、標示領域C15の外側領域の領域番号がマッピングされる。   Furthermore, the area number of the adjacent area of the arrangement order L + 1 that is one order ahead of the arrangement order L that is the first element of the penetrating area is mapped to the marking area C1. Further, the area number of the outer area of the marking area C1 is mapped to the marking area C2. In addition, the area number of the adjacent area in the arrangement order that is one order ahead of the arrangement order of the indication area C1 is mapped to the indication area C3. Further, the area number of the outer area of the marking area C3 is mapped to the marking area C4. Here, since the labeling area W2 is sandwiched between the labeling area C5 and the labeling area C3, the area numbers of the adjacent areas that are two orders ahead of the ordering order of the labeling area C3 are mapped. Further, the area number of the outer area of the marking area C5 is mapped to the marking area C6. In addition, the area number of the adjacent area in the arrangement order that is one order ahead of the arrangement order of the indication area C6 is mapped to the indication area C7. Further, the area number of the outer area of the marking area C7 is mapped to the marking area C8. Here, since the labeling area W3 is sandwiched between the labeling area C9 and the labeling area C7, the area numbers of the adjacent areas that are two orders ahead of the ordering order of the labeling area C7 are mapped. Further, the area number of the outer area of the marking area C9 is mapped to the marking area C10. In addition, the area number of the adjacent area in the arrangement order one order ahead of the arrangement order of the indication area C9 is mapped to the indication area C11. Further, the area number of the outer area of the marking area C11 is mapped to the marking area C12. Here, since the marking area W4 is sandwiched between the marking area C13 and the marking area C11, the area numbers of the adjacent areas in the order of arrangement two orders ahead of the order of the marking area C11 are mapped. Further, the area number of the outer area of the marking area C13 is mapped to the marking area C14. In addition, the area number of the adjacent area in the arrangement order that is one order ahead of the arrangement order of the indication area C13 is mapped to the indication area C15. Further, the area number of the outer area of the marking area C15 is mapped to the marking area C16.

ここで、図11を用いて、マッピングの具体例を説明する。図11は、マッピングの一例を示す図である。図11に示すように、図4に示した領域番号2の領域がカラーマップ1の白色の標示領域W1にマッピングされる。さらに、図4に示した領域番号14の領域がカラーマップ1の白色の標示領域W2にマッピングされる。さらに、図4に示した領域番号21の領域がカラーマップ1の白色の標示領域W3にマッピングされる。さらに、図4に示した領域番号13の領域がカラーマップ1の白色の標示領域W4にマッピングされる。また、図4に示した領域番号6の領域がカラーマップ1の色の標示領域C1にマッピングされる。さらに、図4に示した領域番号4の領域がカラーマップ1の色の標示領域C2にマッピングされる。さらに、図4に示した領域番号10の領域がカラーマップ1の色の標示領域C3にマッピングされる。さらに、図4に示した領域番号8の領域がカラーマップ1の色の標示領域C4にマッピングされる。さらに、図4に示した領域番号17の領域がカラーマップ1の色の標示領域C5にマッピングされる。さらに、図4に示した領域番号18の領域がカラーマップ1の色の標示領域C6にマッピングされる。さらに、図4に示した領域番号20の領域がカラーマップ1の色の標示領域C7にマッピングされる。さらに、図4に示した領域番号23の領域がカラーマップ1の色の標示領域C8にマッピングされる。さらに、図4に示した領域番号19の領域がカラーマップ1の色の標示領域C9にマッピングされる。さらに、図4に示した領域番号22の領域がカラーマップ1の色の標示領域C10にマッピングされる。さらに、図4に示した領域番号15の領域がカラーマップ1の色の標示領域C11にマッピングされる。さらに、図4に示した領域番号16の領域がカラーマップ1の色の標示領域C12にマッピングされる。さらに、図4に示した領域番号9の領域がカラーマップ1の色の標示領域C13にマッピングされる。さらに、図4に示した領域番号7の領域がカラーマップ1の色の標示領域C14にマッピングされる。さらに、図4に示した領域番号5の領域がカラーマップ1の色の標示領域C15にマッピングされる。さらに、図4に示した領域番号3の領域がカラーマップ1の色の標示領域C16にマッピングされる。   Here, a specific example of mapping will be described with reference to FIG. FIG. 11 is a diagram illustrating an example of mapping. As shown in FIG. 11, the area of area number 2 shown in FIG. 4 is mapped to the white marking area W <b> 1 of the color map 1. Further, the area of area number 14 shown in FIG. 4 is mapped to the white marking area W2 of the color map 1. Further, the area of area number 21 shown in FIG. 4 is mapped to the white marking area W3 of the color map 1. Further, the area of area number 13 shown in FIG. 4 is mapped to the white marking area W4 of the color map 1. 4 is mapped to the color marking area C1 of the color map 1. Further, the area of area number 4 shown in FIG. Further, the area number 10 shown in FIG. 4 is mapped to the color marking area C3 of the color map 1. Further, the area number 8 shown in FIG. 4 is mapped to the color marking area C4 of the color map 1. Further, the area number 17 shown in FIG. 4 is mapped to the color marking area C5 of the color map 1. Furthermore, the area of area number 18 shown in FIG. Furthermore, the area of area number 20 shown in FIG. Further, the area of area number 23 shown in FIG. Furthermore, the area of area number 19 shown in FIG. Further, the area of area number 22 shown in FIG. Further, the area of area number 15 shown in FIG. Further, the area of area number 16 shown in FIG. Further, the area number 9 shown in FIG. 4 is mapped to the color marking area C13 of the color map 1. Furthermore, the area of area number 7 shown in FIG. Furthermore, the area of area number 5 shown in FIG. Further, the area of area number 3 shown in FIG. 4 is mapped to the color marking area C16 of the color map 1.

その後、出力部15nは、白色の標示領域W1〜W4および白色以外の色の標示領域C1〜C16の各々の標示領域ごとに当該標示領域に含まれる画素のRGB値の平均値を算出する。その上で、出力部15nは、白色の標示領域W1〜W4および白色以外の色の標示領域C1〜C16の各々の標示領域別に算出されたRGB値を所定の出力先へ出力する。このとき、出力部15nは、各々の標示領域のRGB値とともに、各々の標示領域の色が本来有するRGB値を併せて出力することもできる。   Thereafter, the output unit 15n calculates an average value of the RGB values of the pixels included in the marking area for each of the white marking areas W1 to W4 and the marking areas C1 to C16 of colors other than white. In addition, the output unit 15n outputs the RGB values calculated for each of the white marking areas W1 to W4 and the marking areas C1 to C16 of colors other than white to a predetermined output destination. At this time, the output unit 15n can also output the RGB values inherent in the colors of the respective marking areas together with the RGB values of the respective marking areas.

図12は、マッピング出力の一例を示す図である。図12に示すように、図11に示したマッピングされた白色の標示領域W1〜W4および白色以外の色の標示領域C1〜C16の各々の標示領域ごとに当該標示領域に含まれる画素のRGB値の平均値が算出される。その上で、白色の標示領域W1〜W4および白色以外の色の標示領域C1〜C16の各々の標示領域別に算出されたRGB値の平均値とともに、各々の標示領域の色が本来有するRGB値が出力される。   FIG. 12 is a diagram illustrating an example of the mapping output. As shown in FIG. 12, the RGB values of the pixels included in each of the marking areas of the mapped white marking areas W1 to W4 and the marking areas C1 to C16 of colors other than white shown in FIG. The average value of is calculated. In addition, together with the average value of the RGB values calculated for each of the white marking areas W1 to W4 and the marking areas C1 to C16 of colors other than white, the RGB values inherent in the colors of each marking area are Is output.

上記の出力先の一例としては、カラーパッチ1の標示領域の色が本来有するRGB値と画像に写った標示領域の色のRGB値の変化量とを用いて画像に写る計測領域のRGB値を補正する色計測プログラムが挙げられる。かかる色計測プログラムは、必ずしも画像処理装置10内で実行される必要はなく、色計測プログラムが実行される外部装置へ出力することとしてもかまわない。   As an example of the output destination, the RGB value of the measurement region that appears in the image using the RGB value inherent in the color of the indication region of the color patch 1 and the amount of change in the RGB value of the color of the indication region that appears in the image is used. There is a color measurement program to be corrected. Such a color measurement program does not necessarily need to be executed in the image processing apparatus 10, and may be output to an external device in which the color measurement program is executed.

なお、制御部15には、各種の集積回路や電子回路を採用できる。また、制御部15が有する機能部の一部を別の集積回路や電子回路とすることもできる。例えば、集積回路としては、ASIC(Application Specific Integrated Circuit)が挙げられる。また、電子回路としては、CPU(Central Processing Unit)やMPU(Micro Processing Unit)などが挙げられる。   Note that various integrated circuits and electronic circuits can be employed for the control unit 15. In addition, a part of the functional unit included in the control unit 15 may be another integrated circuit or an electronic circuit. For example, an ASIC (Application Specific Integrated Circuit) is an example of the integrated circuit. Examples of the electronic circuit include a central processing unit (CPU) and a micro processing unit (MPU).

[処理の流れ]
次に、本実施例に係る画像処理装置10の処理の流れについて説明する。なお、ここでは、画像処理装置10によって実行される(1)全体処理を説明した後に、全体処理のサブフローとして実行される(2)第1対応付け処理および(3)第2対応付け処理を説明する。
[Process flow]
Next, a processing flow of the image processing apparatus 10 according to the present embodiment will be described. Here, after (1) overall processing executed by the image processing apparatus 10 is described, (2) first association processing and (3) second association processing executed as a sub-flow of the overall processing are described. To do.

(1)全体処理
図13は、実施例1に係る画像処理装置10の全体処理の手順を示すフローチャートである。この全体処理は、取得部15aによって画像が取得された場合に処理が起動される。図13に示すように、画像が取得されると(ステップS101)、画像処理装置10は、画像に含まれる画素のうち隣接する画素間で画素値が類似する画素同士をグルーピングする(ステップS102)。
(1) Overall Processing FIG. 13 is a flowchart illustrating a procedure of overall processing of the image processing apparatus 10 according to the first embodiment. The entire process is started when an image is acquired by the acquisition unit 15a. As shown in FIG. 13, when an image is acquired (step S101), the image processing apparatus 10 groups pixels having similar pixel values between adjacent pixels among the pixels included in the image (step S102). .

そして、画像処理装置10は、グルーピングされた領域のうち、カラーパッチ1の貫通孔3によって形成される計測領域に対応する領域を選択する(ステップS103)。   Then, the image processing apparatus 10 selects an area corresponding to the measurement area formed by the through hole 3 of the color patch 1 from the grouped areas (step S103).

その後、画像処理装置10は、カラーパッチ1の計測領域に近接する近接領域の領域番号と、計測領域の輪郭を時計回りに周回する場合の並び順とを対応付ける「第1対応付け処理」を実行する(ステップS104)。   Thereafter, the image processing apparatus 10 executes “first association processing” that associates the region number of the proximity region close to the measurement region of the color patch 1 with the arrangement order when the contour of the measurement region is rotated clockwise. (Step S104).

続いて、画像処理装置10は、近接領域の領域番号の並び順にしたがって、近接領域よりも外側に存在する外側領域の並び順と、領域の領域番号とを対応付ける「第2対応付け処理」を実行する(ステップS105)。   Subsequently, the image processing apparatus 10 executes “second association processing” that associates the arrangement order of the outer areas existing outside the proximity area with the area numbers of the areas in accordance with the arrangement order of the area numbers of the proximity areas. (Step S105).

そして、画像処理装置10は、計測領域の中心座標(CX,CY)から近接領域の外縁部までの距離が最長である並び順Lと、その並び順と一定の規則にある並び順L+3、L+6及びL+9とを貫通領域であると判別する(ステップS106)。   The image processing apparatus 10 then arranges the arrangement order L having the longest distance from the center coordinates (CX, CY) of the measurement area to the outer edge of the proximity area, and the arrangement orders L + 3 and L + 6 in the arrangement order and a certain rule. And L + 9 are determined to be through regions (step S106).

続いて、画像処理装置10は、並び順データ13cの並び順のうち貫通領域と判別された並び順Lよりも1つ並び順が大きい近接領域の輝度がその外側領域の輝度よりも大きいか否かを判定する(ステップS107)。   Subsequently, the image processing apparatus 10 determines whether or not the luminance of the adjacent region having a larger arrangement order than the arrangement order L determined as the through region in the arrangement order of the arrangement order data 13c is larger than the luminance of the outer area. Is determined (step S107).

このとき、近接領域の輝度がその外側領域の輝度以下である場合(ステップS107否定)には、近接領域及び外側領域の並び順がデータの出力形式で定められている標示領域の整列順とズレていると判別できる。この場合には、画像処理装置10は、貫通領域の並び順Lよりも1つの先の貫通領域の並び順L+3が並び順Lとなるように並び順をシフトする(ステップS108)。その上で、画像処理装置10は、シフト後の貫通領域の並び順Lを起点とし、各々の並び順と対応付けられた領域番号を白色の標示領域W1〜W4および白色以外の色の標示領域C1〜C16とマッピングする(ステップS109)。   At this time, if the brightness of the proximity area is equal to or less than the brightness of the outside area (No in step S107), the arrangement order of the proximity area and the outside area is different from the alignment order of the marking area defined in the data output format. Can be determined. In this case, the image processing apparatus 10 shifts the arrangement order so that the arrangement order L + 3 of the penetrating area one prior to the arrangement order L of the penetration areas becomes the arrangement order L (step S108). In addition, the image processing apparatus 10 starts from the arrangement order L of the through areas after the shift, and uses the area numbers associated with each arrangement order as the white indication areas W1 to W4 and the indication areas of colors other than white. Mapping is performed with C1 to C16 (step S109).

一方、近接領域の輝度がその外側領域の輝度よりも高い場合(ステップS107肯定)には、近接領域及び外側領域の並び順がデータの出力形式で定められている標示領域の整列順と対応すると判別できる。この場合には、画像処理装置10は、並び順をシフトさせずに、当該貫通領域の並び順Lを起点とし、各々の並び順と対応付けられた領域番号を白色の標示領域W1〜W4および白色以外の色の標示領域C1〜C16とマッピングする(ステップS109)。   On the other hand, when the brightness of the proximity area is higher than the brightness of the outside area (Yes in step S107), the arrangement order of the proximity area and the outside area corresponds to the order of arrangement of the marking areas defined in the data output format. Can be determined. In this case, the image processing apparatus 10 does not shift the arrangement order, but uses the arrangement order L of the penetrating areas as a starting point, and assigns the area numbers associated with each arrangement order to the white marking areas W1 to W4 and Mapping is performed with the marking areas C1 to C16 of colors other than white (step S109).

その後、画像処理装置10は、各々の標示領域W1〜W4およびC1〜C16のRGB値とともに、各々の標示領域W1〜W4およびC1〜C16のRGBの色が本来有するRGB値を併せて所定の出力先へ出力し(ステップS110)、処理を終了する。   Thereafter, the image processing apparatus 10 outputs a predetermined output together with the RGB values of the respective marking areas W1 to W4 and C1 to C16 together with the RGB values of the respective marking areas W1 to W4 and C1 to C16. The data is output first (step S110), and the process is terminated.

(2)第1対応付け処理
図14は、実施例1に係る第1対応付け処理の手順を示すフローチャートである。この第1対応付け処理は、図13に示したステップS104に対応する処理であり、計測領域が選択された後に実行される。
(2) First Association Processing FIG. 14 is a flowchart illustrating a procedure of first association processing according to the first embodiment. This first association process is a process corresponding to step S104 shown in FIG. 13, and is executed after the measurement region is selected.

図14に示すように、まず、画像処理装置10は、各領域別に対応輪郭点の個数及び輪郭点番号の合計値を保持する代表値算出用のレジスタの値をゼロにそれぞれ初期化する(ステップS301)。続いて、画像処理装置10は、計測領域の各輪郭点に輪郭点番号を採番する(ステップS302)。その後、画像処理装置10は、計測領域の輪郭点番号をカウントするカウンタAに初期値、例えば輪郭点番号が開始する番号を設定する初期化を実行する(ステップS303)。   As shown in FIG. 14, first, the image processing apparatus 10 initializes the value of the register for representative value calculation, which holds the total number of the corresponding contour points and the contour point numbers for each region, to zero (step S301). Subsequently, the image processing apparatus 10 assigns a contour point number to each contour point in the measurement region (step S302). Thereafter, the image processing apparatus 10 executes initialization for setting an initial value, for example, a number at which the contour point number starts, to the counter A that counts the contour point number of the measurement region (step S303).

そして、輪郭点番号のカウンタAの値が計測領域の全輪郭点の数、すなわち最後の輪郭点番号を超えるまで(ステップS304否定)、下記に説明するステップS305〜ステップS315までの処理を繰り返し実行する。   Then, until the value of the contour point number counter A exceeds the number of all contour points in the measurement region, that is, the last contour point number (No in step S304), the processing from step S305 to step S315 described below is repeatedly executed. To do.

すなわち、画像処理装置10は、領域番号及び最短距離の対を保持する最短距離用のレジスタの値を初期化する(ステップS305)。例えば、領域番号の値がゼロへ初期化されるとともに、最短距離の値が計測領域の輪郭点および領域の輪郭点間の距離よりも大きいとみなすことができる距離、例えば画像の幅のピクセル数+画像の高さのピクセル数へ初期化される。そして、画像処理装置10は、領域番号をカウントするカウンタBに初期値、例えば領域番号が開始する番号を設定する初期化を実行する(ステップS306)。   In other words, the image processing apparatus 10 initializes the value of the register for the shortest distance that holds the pair of the area number and the shortest distance (step S305). For example, the region number value is initialized to zero, and the distance at which the shortest distance value can be considered larger than the distance between the contour point of the measurement region and the contour point of the region, for example, the number of pixels in the width of the image + Initialized to the number of pixels at the height of the image. Then, the image processing apparatus 10 executes initialization for setting an initial value, for example, a number at which the region number starts, to the counter B that counts the region number (step S306).

その上で、画像処理装置10は、領域番号のカウンタBの値が全領域数以下であるか否かを判定する(ステップS307)。このとき、領域番号のカウンタBの値が全領域数以下である場合(ステップS307肯定)には、画像処理装置10は、領域番号のカウンタBの値が計測領域の領域番号でないかどうかをさらに判定する(ステップS308)。なお、領域番号のカウンタBの値が計測領域の領域番号である場合(ステップS308否定)には、ステップS312の処理へ移行する。   Then, the image processing apparatus 10 determines whether the value of the area number counter B is equal to or smaller than the total number of areas (step S307). At this time, if the value of the area number counter B is equal to or less than the total number of areas (Yes in step S307), the image processing apparatus 10 further determines whether the value of the area number counter B is not the area number of the measurement area. Determination is made (step S308). If the value of the area number counter B is the area number of the measurement area (No at step S308), the process proceeds to step S312.

そして、領域番号のカウンタBの値が計測領域の領域番号ではない場合(ステップS308肯定)には、画像処理装置10は、次のような処理を実行する。すなわち、画像処理装置10は、カウンタBの領域番号に対応する領域の輪郭点のうち最も計測領域に近い位置にある輪郭点と計測領域の輪郭点Aとの間で両者の輪郭点間の距離dを算出する(ステップS309)。   If the value of the area number counter B is not the area number of the measurement area (Yes at step S308), the image processing apparatus 10 executes the following process. In other words, the image processing apparatus 10 determines the distance between the contour point between the contour point closest to the measurement region and the contour point A of the measurement region among the contour points of the region corresponding to the region number of the counter B. d is calculated (step S309).

このとき、輪郭点間の距離dが最短距離用のレジスタの値よりも小さい場合(ステップS310肯定)には、画像処理装置10は、最短距離用のレジスタの値をカウンタBに保持された領域番号および距離dへ更新する(ステップS311)。そして、画像処理装置10は、領域番号のカウンタBの値を1つインクリメントし(ステップS312)、ステップS307の処理へ移行する。なお、輪郭点間の距離dが最短距離用のレジスタの値以上である場合(ステップS310否定)には、最短距離用のレジスタの値を更新せずに、ステップS312の処理へ移行する。   At this time, when the distance d between the contour points is smaller than the value of the register for the shortest distance (Yes in step S310), the image processing apparatus 10 stores the value of the register for the shortest distance in the counter B. The number and distance d are updated (step S311). Then, the image processing apparatus 10 increments the value of the area number counter B by one (step S312), and proceeds to the process of step S307. If the distance d between contour points is equal to or greater than the value of the register for the shortest distance (No at Step S310), the process proceeds to Step S312 without updating the value of the register for the shortest distance.

その後、領域番号のカウンタBの値が全領域数を超えた場合(ステップS307否定)には、画像処理装置10は、次のような処理を実行する。すなわち、画像処理装置10は、代表値算出用のレジスタに保持された対応輪郭点の個数のうち最短距離用のレジスタに保持された領域番号に対応する対応輪郭点の個数の値を1つインクリメントする(ステップS313)。   Thereafter, when the value of the region number counter B exceeds the total number of regions (No in step S307), the image processing apparatus 10 executes the following processing. In other words, the image processing apparatus 10 increments the value of the number of corresponding contour points corresponding to the region number held in the shortest distance register among the number of corresponding contour points held in the representative value calculation register. (Step S313).

続いて、画像処理装置10は、代表値算出用のレジスタに保持された輪郭点番号の合計値のうち最短距離用のレジスタに保持された領域番号に対応する輪郭点番号の合計値に輪郭点番号のカウンタAの値を加算する(ステップS314)。そして、画像処理装置10は、輪郭点番号のカウンタAの値を1つインクリメントし(ステップS315)、ステップS304の処理へ移行する。   Subsequently, the image processing apparatus 10 sets the contour point to the total value of the contour point numbers corresponding to the area number held in the shortest distance register among the total values of the contour point numbers held in the representative value calculation register. The value of the number counter A is added (step S314). Then, the image processing apparatus 10 increments the value of the contour point number counter A by one (step S315), and proceeds to the processing of step S304.

その後、輪郭点番号のカウンタAの値が計測領域の全輪郭点の数、すなわち最後の輪郭点番号を超えると(ステップS304否定)、画像処理装置10は、次のような処理を実行する。すなわち、画像処理装置10は、代表値算出用のレジスタに保持された対応輪郭点の個数のうち最大の対応輪郭点の個数に所定の係数を乗算することによって標示領域の並び順に含めるのに不適正な領域をフィルタリングする閾値を算出する(ステップS316)。   Thereafter, when the value of the contour point number counter A exceeds the number of all contour points in the measurement area, that is, the last contour point number (No in step S304), the image processing apparatus 10 executes the following processing. In other words, the image processing apparatus 10 is inconvenient to include in the order of arrangement of the marking areas by multiplying the maximum number of corresponding contour points among the number of corresponding contour points held in the representative value calculation register by a predetermined coefficient. A threshold value for filtering an appropriate region is calculated (step S316).

続いて、画像処理装置10は、代表値算出用のレジスタに保持された対応輪郭点の個数がステップS316で算出した閾値以下である領域番号の対応輪郭点の個数および輪郭点番号の合計値を代表値の算出対象から除外する(ステップS317)。   Subsequently, the image processing apparatus 10 calculates the total number of the contour point numbers and the number of corresponding contour points of the region number whose number of corresponding contour points held in the representative value calculation register is equal to or less than the threshold value calculated in step S316. It excludes from the calculation object of a representative value (step S317).

その上で、画像処理装置10は、代表値算出用のレジスタに保持された輪郭点番号の合計値を対応輪郭点の個数で除算する計算を領域番号別に実行することによって領域番号別の輪郭点番号の平均値を各領域の代表値として算出する(ステップS318)。   After that, the image processing apparatus 10 performs the calculation for dividing the total value of the contour point numbers held in the representative value calculation register by the number of corresponding contour points, by the region number, thereby performing the contour point by region number. The average value of the numbers is calculated as a representative value for each region (step S318).

その後、画像処理装置10は、ステップS318で算出された代表値が小さい領域の領域番号から順番に領域番号を並び順に対応付け(ステップS319)、処理を終了する。   Thereafter, the image processing apparatus 10 associates the region numbers in order from the region number of the region with the small representative value calculated in step S318 (step S319), and ends the processing.

(3)第2対応付け処理
図15及び図16は、実施例1に係る第2対応付け処理の手順を示すフローチャートである。この第2対応付け処理は、図13に示したステップS105に対応する処理であり、図14に示した第1対応付け処理が実行された後に実行される。
(3) Second Association Processing FIGS. 15 and 16 are flowcharts illustrating the procedure of the second association processing according to the first embodiment. This second association process is a process corresponding to step S105 shown in FIG. 13, and is executed after the first association process shown in FIG. 14 is executed.

図15に示すように、画像処理装置10は、計測領域の中心から近接領域の外縁部までの最長外縁距離および最長外縁距離を持つ領域番号である最長外縁領域を保持する最長外縁距離用のレジスタに初期値、例えばゼロを設定する初期化を実行する(ステップS501)。   As shown in FIG. 15, the image processing apparatus 10 includes a longest outer edge distance register that holds the longest outer edge distance that is the area number having the longest outer edge distance and the longest outer edge distance from the center of the measurement area to the outer edge of the adjacent area. Initialization is set to set an initial value, for example, zero (step S501).

続いて、画像処理装置10は、計測領域の中心の座標(CX,CY)を計算する(ステップS502)。そして、画像処理装置10は、近接領域の領域番号をカウントするカウンタAに初期値、例えば最初の並び順に対応する近接領域の領域番号を設定する初期化を実行する(ステップS503)。   Subsequently, the image processing apparatus 10 calculates the coordinates (CX, CY) of the center of the measurement region (step S502). Then, the image processing apparatus 10 performs initialization to set an initial value, for example, the region number of the adjacent region corresponding to the first arrangement order, in the counter A that counts the region number of the adjacent region (step S503).

このとき、近接領域の領域番号のカウンタAに全ての近接領域の領域番号がカウントされるまで(ステップS504否定)、下記のステップS506〜ステップS516までの処理を繰り返し実行する。   At this time, the following steps S506 to S516 are repeatedly executed until the area numbers of all adjacent areas are counted by the area number counter A of the adjacent areas (No in step S504).

すなわち、画像処理装置10は、カウンタAに保持された領域番号に対応する近接領域の中心の座標(AX,AY)を計算する(ステップS505)。そして、画像処理装置10は、計測領域の中心から近接領域の中心へ向かう直線のXY増分を算出する(ステップS506)。   That is, the image processing apparatus 10 calculates the coordinates (AX, AY) of the center of the proximity area corresponding to the area number held in the counter A (step S505). Then, the image processing apparatus 10 calculates the XY increment of a straight line from the center of the measurement region to the center of the proximity region (step S506).

例えば、上記のXY増分の算出は、次のようにして算出できる。すなわち、画像処理装置10は、近接領域の中心の座標(AX,AY)と計測領域の中心の座標(CX,CY)の間でX差分とY差分を算出する。このとき、X差分の絶対値がY差分の絶対値よりも小さい場合には、画像処理装置10は、X差分をY差分の絶対値で除算することによってX増分を算出する。その上で、画像処理装置10は、Y差分が正であるならばY増分を「1」とし、Y差分が負であるならばY増分を「−1」に定める。一方、Y差分の絶対値がX差分の絶対値以下である場合には、画像処理装置10は、Y差分をX差分の絶対値で除算することによってY増分を算出する。その上で、画像処理装置10は、X差分が正であるならばX増分を「1」とし、X差分が負であるならばX増分を「−1」に定める。かかるXY増分によって、画素を1ピクセルずつ探索することが可能になる。   For example, the above XY increment can be calculated as follows. That is, the image processing apparatus 10 calculates the X difference and the Y difference between the coordinates (AX, AY) of the center of the proximity area and the coordinates (CX, CY) of the center of the measurement area. At this time, if the absolute value of the X difference is smaller than the absolute value of the Y difference, the image processing apparatus 10 calculates the X increment by dividing the X difference by the absolute value of the Y difference. In addition, the image processing apparatus 10 sets the Y increment to “1” if the Y difference is positive, and sets the Y increment to “−1” if the Y difference is negative. On the other hand, when the absolute value of the Y difference is equal to or smaller than the absolute value of the X difference, the image processing apparatus 10 calculates the Y increment by dividing the Y difference by the absolute value of the X difference. In addition, the image processing apparatus 10 sets the X increment to “1” if the X difference is positive, and sets the X increment to “−1” if the X difference is negative. Such an XY increment makes it possible to search for pixels one by one.

続いて、画像処理装置10は、計測領域の中心の座標(CX,CY)から近接領域の中心の座標(AX,AY)を経由して外側領域まで探索する探索画素の座標カウンタ(X,Y)に初期値、例えば計測領域の中心の座標(CX,CY)を設定する初期化を実行する(ステップS507)。   Subsequently, the image processing apparatus 10 searches the coordinate counter (X, Y) of the search pixel that searches from the center coordinate (CX, CY) of the measurement region to the outer region via the center coordinate (AX, AY) of the proximity region. ) Is initialized to set an initial value, for example, the coordinates (CX, CY) of the center of the measurement region (step S507).

そして、画像処理装置10は、探索画素の座標(X,Y)が画像内であるか否かを判定する(ステップS508)。このとき、探索画素の座標(X,Y)が画像内である場合(ステップS508肯定)には、画像処理装置10は、探索画素の座標(X,Y)が近接領域内であるか否かをさらに判定する(ステップS509)。   Then, the image processing apparatus 10 determines whether or not the coordinates (X, Y) of the search pixel are within the image (step S508). At this time, if the coordinates (X, Y) of the search pixel are in the image (Yes in step S508), the image processing apparatus 10 determines whether the coordinates (X, Y) of the search pixel is in the proximity region. Is further determined (step S509).

ここで、探索画素の座標(X,Y)が近接領域内である場合(ステップS509肯定)には、画像処理装置10は、計測領域の中心の座標(CX,CY)から探索画素の座標(X,Y)までの距離dを算出する(ステップS510)。   Here, when the coordinates (X, Y) of the search pixel are within the proximity region (Yes in step S509), the image processing apparatus 10 determines the coordinates (CX, CY) of the search pixel from the coordinates (CX, CY) of the measurement region. A distance d to (X, Y) is calculated (step S510).

このとき、探索画素までの距離dが最長外縁距離用のレジスタに保持された最長外縁距離よりも大きい場合(ステップS511肯定)には、画像処理装置10は、次のような処理を実行する。すなわち、画像処理装置10は、最長外縁距離用のレジスタに保持された最長外縁距離の値をステップS510で算出された距離dに更新するとともに、最長外縁領域の値をカウンタAに保持された近接領域の領域番号に更新する(ステップS512)。その後、画像処理装置10は、探索画素の座標カウンタ(X,Y)にステップS506で算出したXY増分を加算し(ステップS513)、ステップS508の処理へ移行する。   At this time, when the distance d to the search pixel is larger than the longest outer edge distance held in the register for the longest outer edge distance (Yes in step S511), the image processing apparatus 10 executes the following process. That is, the image processing apparatus 10 updates the value of the longest outer edge distance held in the register for the longest outer edge distance to the distance d calculated in step S510, and the proximity of the value of the longest outer edge area held in the counter A. The region number is updated to the region number (step S512). Thereafter, the image processing apparatus 10 adds the XY increment calculated in step S506 to the coordinate counter (X, Y) of the search pixel (step S513), and proceeds to the process of step S508.

一方、探索画素までの距離dが最長外縁距離用のレジスタに保持された最長外縁距離以下である場合(ステップS511否定)には、画像処理装置10は、次のような処理を実行する。すなわち、画像処理装置10は、最長外縁距離用のレジスタの更新を実行せずに、探索画素の座標カウンタ(X,Y)にステップS506で算出したXY増分を加算し(ステップS513)、ステップS508の処理へ移行する。   On the other hand, when the distance d to the search pixel is less than or equal to the longest outer edge distance held in the longest outer edge distance register (No in step S511), the image processing apparatus 10 executes the following process. That is, the image processing apparatus 10 adds the XY increment calculated in step S506 to the coordinate counter (X, Y) of the search pixel without executing the update of the register for the longest outer edge distance (step S513), and step S508. Move on to processing.

また、探索画素の座標(X,Y)が近接領域外である場合(ステップS509否定)には、画像処理装置10は、探索画素の座標(X,Y)が計測領域外であるか否かを判定する(ステップS514)。   When the coordinates (X, Y) of the search pixel are outside the proximity region (No in step S509), the image processing apparatus 10 determines whether the coordinates (X, Y) of the search pixel is outside the measurement region. Is determined (step S514).

このとき、探索画素の座標(X,Y)が計測領域内である場合(ステップS514否定)には、画像処理装置10は、探索画素の座標カウンタ(X,Y)にステップS506で算出したXY増分を加算し(ステップS513)、ステップS508の処理へ移行する。   At this time, if the coordinates (X, Y) of the search pixel are within the measurement region (No in step S514), the image processing apparatus 10 adds the XY calculated in step S506 to the coordinate counter (X, Y) of the search pixel. The increment is added (step S513), and the process proceeds to step S508.

一方、探索画素の座標(X,Y)が計測領域外である場合(ステップS514肯定)には、探索画素が近接領域および計測領域にも所在せず、近接領域の外縁部に到達したことがわかる。この場合には、画像処理装置10は、カウンタAに保持された領域番号を持つ近接領域の並び順に探索画素の座標(X,Y)を内包する外側領域の領域番号を対応付ける(ステップS515)。その後、画像処理装置10は、近接領域の領域番号のカウンタAの値を次の並び順の近接領域の領域番号へ更新し(ステップS516)、ステップS504へ移行する。   On the other hand, when the coordinates (X, Y) of the search pixel are outside the measurement region (Yes in step S514), the search pixel is not located in the proximity region and the measurement region, but has reached the outer edge of the proximity region. Recognize. In this case, the image processing apparatus 10 associates the region numbers of the outer regions that include the coordinates (X, Y) of the search pixels in the order of the adjacent regions having the region numbers held in the counter A (step S515). After that, the image processing apparatus 10 updates the value of the area number counter A of the adjacent area to the area number of the adjacent area in the next arrangement order (step S516), and proceeds to step S504.

また、探索画素の座標(X,Y)が画像内でない場合(ステップS508否定)にも、画像処理装置10は、近接領域の領域番号のカウンタAの値を次の並び順の近接領域の領域番号へ更新し(ステップS516)、ステップS504へ移行する。   Even when the coordinates (X, Y) of the search pixel are not in the image (No in step S508), the image processing apparatus 10 sets the value of the counter number of the area number of the adjacent area to the area of the adjacent area in the next arrangement order. The number is updated (step S516), and the process proceeds to step S504.

その後、近接領域の領域番号のカウンタAに全ての近接領域の領域番号がカウントされた場合(ステップS504肯定)には、画像処理装置10は、処理を終了する。   Thereafter, when the area numbers of all adjacent areas are counted by the area number counter A of the adjacent areas (Yes in step S504), the image processing apparatus 10 ends the process.

[実施例1の効果]
上述してきたように、本実施例に係る画像処理装置10は、画像上でカラーパッチ1の計測領域の輪郭点を探索して得た各近接領域が持つ輪郭点数と輪郭点番号の合計値から代表値を求めて領域を並び順に対応付ける。このため、本実施例に係る画像処理装置10では、カラーパッチ1にマーク等を付加せずとも並び順を特定できる。さらに、本実施例に係る画像処理装置10では、標示領域の接合関係を組合せにより判断せずとも、四則演算を中心にした処理で標示領域の並び順を得ることができる。
[Effect of Example 1]
As described above, the image processing apparatus 10 according to the present embodiment uses the sum of the number of contour points and the contour point number of each adjacent region obtained by searching the contour points of the measurement region of the color patch 1 on the image. The representative values are obtained and the areas are associated in the order of arrangement. Therefore, in the image processing apparatus 10 according to the present embodiment, the arrangement order can be specified without adding a mark or the like to the color patch 1. Furthermore, in the image processing apparatus 10 according to the present embodiment, the order of arrangement of the marking areas can be obtained by processing centering on the four arithmetic operations without determining the joining relation of the marking areas by combination.

したがって、本実施例に係る画像処理装置10によれば、カラーパッチ1のデザイン性を損なわず、カラーパッチ1の標示領域の並び順を簡易に抽出できる。さらに、本実施例に係る画像処理装置10では、標示領域を区切る境界線の有無とは無関係にカラーパッチ1の標示領域の並び順を抽出できるので、汎用性も高めることができる。   Therefore, according to the image processing apparatus 10 according to the present embodiment, the arrangement order of the marking areas of the color patch 1 can be easily extracted without impairing the design of the color patch 1. Furthermore, in the image processing apparatus 10 according to the present embodiment, the arrangement order of the marking areas of the color patch 1 can be extracted regardless of the presence / absence of a boundary line that divides the marking areas, so that versatility can be improved.

さて、これまで開示の装置に関する実施例について説明したが、本発明は上述した実施例以外にも、種々の異なる形態にて実施されてよいものである。そこで、以下では、本発明に含まれる他の実施例を説明する。   Although the embodiments related to the disclosed apparatus have been described above, the present invention may be implemented in various different forms other than the above-described embodiments. Therefore, another embodiment included in the present invention will be described below.

[応用例]
例えば、上記の実施例1では、外側領域の領域番号を並び順に対応付けるにあたって探索画素が近接領域から離脱した段階でその画素を含む領域を外側領域としてみなす場合を例示したが、必ずしも近接領域から離脱した段階で外側領域と判断する必要はない。
[Application example]
For example, in the first embodiment, the case where the area including the pixel is regarded as the outer area when the search pixel leaves the adjacent area when the area numbers of the outer areas are associated with each other in order is illustrated. At this stage, it is not necessary to determine the outer region.

すなわち、開示の装置は、外側領域でも小さい領域を除く処理を追加することができる。例えば、計測領域の中心から各近接領域の中心の向きで探索する場合に、近接領域の始まりと終わりの座標を記録し、近接領域の外側領域の候補を探索する時にも当該領域の始まりと終わりの座標を記録し、これらの座標から近接領域及び外側領域候補の幅を算出する。そして、開示の装置は、近接領域と外側領域候補の幅が同等である場合は、当該外側領域候補を、当該近接領域に対応する外側領域と記録する。一方、開示の装置は、近接領域と外側領域候補の幅が同等でなかった場合は、当該外側領域候補は対応する外側領域ではないと判断し、次の領域を探索する処理を続ける。かかる手順によって、近接領域と外側領域の間にある非常に小さい領域を除外し、正規の領域による外側領域を取り出すことが可能になる。   In other words, the disclosed apparatus can add processing for excluding a small region even in the outer region. For example, when searching in the direction from the center of the measurement area to the center of each proximity area, the coordinates of the start and end of the proximity area are recorded, and the start and end of the area are also searched when searching for candidates for the outer area of the proximity area. Are recorded, and the widths of the proximity region and the outside region candidate are calculated from these coordinates. Then, when the widths of the proximity area and the outside area candidate are equal, the disclosed apparatus records the outside area candidate as the outside area corresponding to the proximity area. On the other hand, when the widths of the proximity area and the outside area candidate are not equal, the disclosed apparatus determines that the outside area candidate is not a corresponding outside area, and continues the process of searching for the next area. Such a procedure makes it possible to exclude a very small area between the adjacent area and the outer area, and to take out the outer area of the regular area.

[変形例]
上記の実施例1では、図1に示したカラーパッチ1に対応する画像処理について例示したが、カラーパッチ1と同様の規則性を有するカラーパッチであれば、領域数や領域の大きさが異なっても標示領域の並び順を同様に特定することが可能である。図17は、変形例を説明するための図である。図17に示すカラーパッチ5のように、90度ごとに近接領域と外側領域が2つずつでなく、1つずつであり、各々の領域の大きさが異なる場合でも、同様にして、各々の標示領域の並び順を特定できる。
[Modification]
In the first embodiment, the image processing corresponding to the color patch 1 shown in FIG. 1 is illustrated, but the number of areas and the size of the areas are different if the color patch has the same regularity as the color patch 1. However, it is possible to similarly specify the order of arrangement of the marking areas. FIG. 17 is a diagram for explaining a modification. As in the color patch 5 shown in FIG. 17, the adjacent region and the outer region are not two at every 90 degrees, but one each, and even when the size of each region is different, The arrangement order of the marking areas can be specified.

[分散および統合]
また、図示した各装置の各構成要素は、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。例えば、制御部15内の機能部15a〜15nの一部を画像処理装置10の外部装置としてネットワーク経由で接続するようにしてもよい。また、制御部15内の機能部15a〜15nの一部を別の装置がそれぞれ有し、ネットワーク接続されて協働することで、上記の画像処理装置10の機能を実現するようにしてもよい。
[Distribution and integration]
In addition, each component of each illustrated apparatus does not necessarily need to be physically configured as illustrated. In other words, the specific form of distribution / integration of each device is not limited to that shown in the figure, and all or a part thereof may be functionally or physically distributed or arbitrarily distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. For example, a part of the function units 15a to 15n in the control unit 15 may be connected as an external device of the image processing apparatus 10 via a network. Further, the functions of the image processing apparatus 10 described above may be realized by another apparatus having a part of the function units 15a to 15n in the control unit 15 and connected through a network to cooperate. .

[画像処理プログラム]
また、上記の実施例で説明した各種の処理は、予め用意されたプログラムをパーソナルコンピュータやワークステーションなどのコンピュータで実行することによって実現することができる。そこで、以下では、図18を用いて、上記の実施例と同様の機能を有する画像処理プログラムを実行するコンピュータの一例について説明する。
[Image processing program]
The various processes described in the above embodiments can be realized by executing a prepared program on a computer such as a personal computer or a workstation. In the following, an example of a computer that executes an image processing program having the same function as that of the above-described embodiment will be described with reference to FIG.

図18は、実施例1及び実施例2に係る画像処理プログラムを実行するコンピュータの一例について説明するための図である。図18に示すように、コンピュータ100は、操作部110aと、スピーカ110bと、カメラ110cと、ディスプレイ120と、通信部130とを有する。さらに、このコンピュータ100は、CPU150と、ROM160と、HDD170と、RAM180とを有する。これら110〜180の各部はバス140を介して接続される。   FIG. 18 is a schematic diagram illustrating an example of a computer that executes an image processing program according to the first and second embodiments. As illustrated in FIG. 18, the computer 100 includes an operation unit 110a, a speaker 110b, a camera 110c, a display 120, and a communication unit 130. Further, the computer 100 includes a CPU 150, a ROM 160, an HDD 170, and a RAM 180. These units 110 to 180 are connected via a bus 140.

HDD170には、図18に示すように、上記の実施例1で示した制御部15内の機能部15a〜15nと同様の機能を発揮する画像処理プログラム170aが予め記憶される。この画像処理プログラム170aについては、図2に示した制御部15内の機能部15a〜15nの各構成要素と同様、適宜統合又は分離しても良い。すなわち、HDD170に格納される各データは、常に全てのデータがHDD170に格納される必要はなく、処理に必要なデータのみがHDD170に格納されれば良い。   As shown in FIG. 18, the HDD 170 stores in advance an image processing program 170a that exhibits the same functions as the function units 15a to 15n in the control unit 15 shown in the first embodiment. The image processing program 170a may be appropriately integrated or separated as in the case of the components of the functional units 15a to 15n in the control unit 15 shown in FIG. In other words, all data stored in the HDD 170 need not always be stored in the HDD 170, and only data necessary for processing may be stored in the HDD 170.

そして、CPU150が、画像処理プログラム170aをHDD170から読み出してRAM180に展開する。これによって、図18に示すように、画像処理プログラム170aは、画像処理プロセス180aとして機能する。この画像処理プロセス180aは、HDD170から読み出した各種データを適宜RAM180上の自身に割り当てられた領域に展開し、この展開した各種データに基づいて各種処理を実行する。なお、画像処理プロセス180aは、図2に示した制御部15内の機能部15a〜15nにて実行される処理、例えば図13〜図16に示す処理を含む。また、CPU150上で仮想的に実現される各処理部は、常に全ての処理部がCPU150上で動作する必要はなく、処理に必要な処理部のみが仮想的に実現されれば良い。   Then, the CPU 150 reads the image processing program 170 a from the HDD 170 and develops it in the RAM 180. As a result, as shown in FIG. 18, the image processing program 170a functions as an image processing process 180a. The image processing process 180a expands various data read from the HDD 170 in an area allocated to itself on the RAM 180 as appropriate, and executes various processes based on the expanded data. Note that the image processing process 180a includes processing executed by the functional units 15a to 15n in the control unit 15 shown in FIG. 2, for example, processing shown in FIG. 13 to FIG. In addition, each processing unit virtually realized on the CPU 150 does not always require that all processing units operate on the CPU 150, and only a processing unit necessary for the processing needs to be virtually realized.

なお、上記の画像処理プログラム170aについては、必ずしも最初からHDD170やROM160に記憶させておく必要はない。例えば、コンピュータ100に挿入されるフレキシブルディスク、いわゆるFD、CD−ROM、DVDディスク、光磁気ディスク、ICカードなどの「可搬用の物理媒体」に各プログラムを記憶させる。そして、コンピュータ100がこれらの可搬用の物理媒体から各プログラムを取得して実行するようにしてもよい。また、公衆回線、インターネット、LAN、WANなどを介してコンピュータ100に接続される他のコンピュータまたはサーバ装置などに各プログラムを記憶させておき、コンピュータ100がこれらから各プログラムを取得して実行するようにしてもよい。   Note that the image processing program 170a is not necessarily stored in the HDD 170 or the ROM 160 from the beginning. For example, each program is stored in a “portable physical medium” such as a flexible disk inserted into the computer 100, so-called FD, CD-ROM, DVD disk, magneto-optical disk, or IC card. Then, the computer 100 may acquire and execute each program from these portable physical media. In addition, each program is stored in another computer or server device connected to the computer 100 via a public line, the Internet, a LAN, a WAN, etc., and the computer 100 acquires and executes each program from these. It may be.

1 カラーパッチ
3 貫通孔
C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 標示領域
W1,W2,W3,W4 白色の標示領域
10 画像処理装置
11 カメラ
13 記憶部
13a 計測領域データ
13b 対応輪郭点データ
13c 並び順データ
15 制御部
15a 取得部
15b グルーピング部
15c 選択部
15d 採番部
15e 抽出部
15f 付与部
15g 更新部
15h 算出部
15j 第1対応付け部
15k 第2対応付け部
15m 貫通領域判別部
15n 出力部
1 Color patch 3 Through hole C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 Marking area W1, W2, W3, W4 White marking area DESCRIPTION OF SYMBOLS 10 Image processing apparatus 11 Camera 13 Memory | storage part 13a Measurement area data 13b Corresponding outline point data 13c Arrangement order data 15 Control part 15a Acquisition part 15b Grouping part 15c Selection part 15d Numbering part 15e Extraction part 15f Assignment part 15g Update part 15h Calculation part 15j 1st matching part 15k 2nd matching part 15m Penetrating area discrimination | determination part 15n Output part

Claims (4)

画像を取得する取得部と、
前記画像に含まれる画素のうち隣接する画素間で画素値が類似する画素同士をグルーピングするグルーピング部と、
グルーピングされた領域のうち、前記画像に含まれる色標であって、色の標示領域が形成される表示面および前記表示面の裏面を貫通する貫通孔が形成されるとともに同一色の標示領域が前記貫通孔を挟んで前記表示面の両側にそれぞれ形成された色標の貫通孔によって形成される色の計測領域を選択する選択部と、
前記画像上で前記計測領域の輪郭を形成する各輪郭画素に番号を採番する採番部と、
前記計測領域の輪郭画素ごとに、各領域の輪郭を形成する輪郭画素のうち当該計測領域の輪郭画素との間で最も距離が近い対応輪郭画素を抽出する抽出部と、
前記対応輪郭画素に前記計測領域の輪郭画素の番号を付与する付与部と、
前記対応輪郭画素が抽出される度に、前記領域のうち前記対応輪郭画素が抽出された領域を対象に当該領域が持つ対応輪郭画素の個数と、当該領域が持つ対応輪郭画素に付与された前記計測領域の輪郭画素の番号の合計値を更新する更新部と、
前記対応輪郭画素に付与された前記計測領域の輪郭画素の番号の合計値および前記対応輪郭画素の個数を用いて、前記領域別に当該領域の代表値を算出する算出部と、
前記領域別に算出された代表値を用いて、前記色標の標示領域の並び順であって前記計測領域を周回する時計回りまたは反時計回りの並び順に前記領域を対応付ける対応付け部と
を有することを特徴とする画像処理装置。
An acquisition unit for acquiring images;
A grouping unit that groups pixels having similar pixel values between adjacent pixels among the pixels included in the image;
Among the grouped areas, the color markers included in the image, the display surface on which the color marking region is formed, and the through hole penetrating the back surface of the display surface are formed, and the marking region of the same color is formed A selection unit for selecting a color measurement region formed by through holes of color targets respectively formed on both sides of the display surface across the through hole;
A numbering unit for numbering each contour pixel forming the contour of the measurement region on the image;
For each contour pixel of the measurement region, an extraction unit that extracts a corresponding contour pixel that is the closest to the contour pixel of the measurement region out of the contour pixels that form the contour of each region;
An assigning unit for assigning a contour pixel number of the measurement region to the corresponding contour pixel;
Each time the corresponding contour pixel is extracted, the number of corresponding contour pixels that the region has for the region from which the corresponding contour pixel is extracted, and the corresponding contour pixel that the region has An update unit for updating the total number of contour pixel numbers in the measurement region;
Using a total value of the number of contour pixels of the measurement region assigned to the corresponding contour pixel and the number of the corresponding contour pixels, a calculation unit that calculates a representative value of the region for each region;
Using a representative value calculated for each area, and an association unit that associates the areas in the clockwise or counterclockwise order around the measurement area, which is the order of the color target marking areas. An image processing apparatus.
前記算出部は、前記対応輪郭画素の個数が最大の対応輪郭画素の個数から設定される閾値よりも多い領域を対象に前記代表値を算出することを特徴とする請求項1に記載の画像処理装置。   2. The image processing according to claim 1, wherein the calculation unit calculates the representative value for a region where the number of the corresponding contour pixels is larger than a threshold set from the number of the corresponding contour pixels having the maximum number. apparatus. コンピュータに、
画像を取得し、
前記画像に含まれる画素のうち隣接する画素間で画素値が類似する画素同士をグルーピングし、
グルーピングされた領域のうち、前記画像に含まれる色標であって、色の標示領域が形成される表示面および前記表示面の裏面を貫通する貫通孔が形成されるとともに同一色の標示領域が前記貫通孔を挟んで前記表示面の両側にそれぞれ形成された色標の貫通孔によって形成される色の計測領域を選択し、
前記画像上で前記計測領域の輪郭を形成する各輪郭画素に番号を採番し、
前記計測領域の輪郭画素ごとに、各領域の輪郭を形成する輪郭画素のうち当該計測領域の輪郭画素との間で最も距離が近い対応輪郭画素を抽出し、
前記対応輪郭画素に前記計測領域の輪郭画素の番号を付与し、
前記対応輪郭画素が抽出される度に、前記領域のうち前記対応輪郭画素が抽出された領域を対象に当該領域が持つ対応輪郭画素の個数と、当該領域が持つ対応輪郭画素に付与された前記計測領域の輪郭画素の番号の合計値を更新し、
前記対応輪郭画素に付与された前記計測領域の輪郭画素の番号の合計値および前記対応輪郭画素の個数を用いて、前記領域別に当該領域の代表値を算出し、
前記領域別に算出された代表値を用いて、前記色標の標示領域の並び順であって前記計測領域を周回する時計回りまたは反時計回りの並び順に前記領域を対応付ける
処理を実行させることを特徴とする画像処理プログラム。
On the computer,
Get an image,
Grouping pixels having similar pixel values between adjacent pixels among the pixels included in the image;
Among the grouped areas, the color markers included in the image, the display surface on which the color marking region is formed, and the through hole penetrating the back surface of the display surface are formed, and the marking region of the same color is formed Select a color measurement area formed by the through holes of the color targets formed on both sides of the display surface across the through hole,
Number each contour pixel that forms the contour of the measurement area on the image,
For each contour pixel of the measurement region, extract the corresponding contour pixel that is the closest to the contour pixel of the measurement region from the contour pixels that form the contour of each region,
Giving a contour pixel number of the measurement region to the corresponding contour pixel,
Each time the corresponding contour pixel is extracted, the number of corresponding contour pixels that the region has for the region from which the corresponding contour pixel is extracted, and the corresponding contour pixel that the region has Update the total number of contour pixel numbers in the measurement area,
Using the total value of the contour pixel numbers of the measurement region assigned to the corresponding contour pixel and the number of the corresponding contour pixels, a representative value of the region is calculated for each region,
Using the representative value calculated for each area, the process of associating the areas with the order of the marking areas of the color targets in the clockwise or counterclockwise order of circulating around the measurement area is performed. An image processing program.
コンピュータが、
画像を取得し、
前記画像に含まれる画素のうち隣接する画素間で画素値が類似する画素同士をグルーピングし、
グルーピングされた領域のうち、前記画像に含まれる色標であって、色の標示領域が形成される表示面および前記表示面の裏面を貫通する貫通孔が形成されるとともに同一色の標示領域が前記貫通孔を挟んで前記表示面の両側にそれぞれ形成された色標の貫通孔によって形成される色の計測領域を選択し、
前記画像上で前記計測領域の輪郭を形成する各輪郭画素に番号を採番し、
前記計測領域の輪郭画素ごとに、各領域の輪郭を形成する輪郭画素のうち当該計測領域の輪郭画素との間で最も距離が近い対応輪郭画素を抽出し、
前記対応輪郭画素に前記計測領域の輪郭画素の番号を付与し、
前記対応輪郭画素が抽出される度に、前記領域のうち前記対応輪郭画素が抽出された領域を対象に当該領域が持つ対応輪郭画素の個数と、当該領域が持つ対応輪郭画素に付与された前記計測領域の輪郭画素の番号の合計値を更新し、
前記対応輪郭画素に付与された前記計測領域の輪郭画素の番号の合計値および前記対応輪郭画素の個数を用いて、前記領域別に当該領域の代表値を算出し、
前記領域別に算出された代表値を用いて、前記色標の標示領域の並び順であって前記計測領域を周回する時計回りまたは反時計回りの並び順に前記領域を対応付ける
処理を実行することを特徴とする画像処理方法。
Computer
Get an image,
Grouping pixels having similar pixel values between adjacent pixels among the pixels included in the image;
Among the grouped areas, the color markers included in the image, the display surface on which the color marking region is formed, and the through hole penetrating the back surface of the display surface are formed, and the marking region of the same color is formed Select a color measurement area formed by the through holes of the color targets formed on both sides of the display surface across the through hole,
Number each contour pixel that forms the contour of the measurement area on the image,
For each contour pixel of the measurement region, extract the corresponding contour pixel that is the closest to the contour pixel of the measurement region from the contour pixels that form the contour of each region,
Giving a contour pixel number of the measurement region to the corresponding contour pixel,
Each time the corresponding contour pixel is extracted, the number of corresponding contour pixels that the region has for the region from which the corresponding contour pixel is extracted, and the corresponding contour pixel that the region has Update the total number of contour pixel numbers in the measurement area,
Using the total value of the contour pixel numbers of the measurement region assigned to the corresponding contour pixel and the number of the corresponding contour pixels, a representative value of the region is calculated for each region,
Using the representative value calculated for each area, the process of associating the areas in the clockwise or counterclockwise order that circulates around the measurement area, which is the order of the marking areas of the color targets, is performed. An image processing method.
JP2012062757A 2012-03-19 2012-03-19 Image processing apparatus, image processing program, and image processing method Active JP5811915B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012062757A JP5811915B2 (en) 2012-03-19 2012-03-19 Image processing apparatus, image processing program, and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012062757A JP5811915B2 (en) 2012-03-19 2012-03-19 Image processing apparatus, image processing program, and image processing method

Publications (2)

Publication Number Publication Date
JP2013196373A true JP2013196373A (en) 2013-09-30
JP5811915B2 JP5811915B2 (en) 2015-11-11

Family

ID=49395234

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012062757A Active JP5811915B2 (en) 2012-03-19 2012-03-19 Image processing apparatus, image processing program, and image processing method

Country Status (1)

Country Link
JP (1) JP5811915B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049822A (en) * 2014-04-18 2015-11-11 富士通株式会社 Image processing device and image processing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049822A (en) * 2014-04-18 2015-11-11 富士通株式会社 Image processing device and image processing method
US9378429B2 (en) 2014-04-18 2016-06-28 Fujitsu Limited Image processing device and image processing method

Also Published As

Publication number Publication date
JP5811915B2 (en) 2015-11-11

Similar Documents

Publication Publication Date Title
US10083522B2 (en) Image based measurement system
JP6260620B2 (en) Image processing apparatus, image processing method, and image processing program
JP5880184B2 (en) Color measurement program and color measurement method
EP2339292A1 (en) Three-dimensional measurement apparatus and method thereof
JP2017520050A (en) Local adaptive histogram flattening
JPWO2013145295A1 (en) Color chart detection apparatus, color chart detection method, and computer program for color chart detection
US10560686B2 (en) Photographing device and method for obtaining depth information
KR101165415B1 (en) Method for recognizing human face and recognizing apparatus
CN110794955B (en) Positioning tracking method, device, terminal equipment and computer readable storage medium
CN112614085A (en) Object detection method and device and terminal equipment
JP2016151955A (en) Image processing apparatus, imaging device, distance measuring device, and image processing method
US20130170756A1 (en) Edge detection apparatus, program and method for edge detection
JP2017032335A (en) Information processing device, information processing method, and program
US20180197006A1 (en) Imaging support system, device and method, and imaging terminal
JP2015127668A (en) Measurement device, system and program
KR101462473B1 (en) Search Method by Object Recognition on Image and Search Server thereof
JP2011019177A (en) Program for specify subject position, and camera
CN117333928B (en) Face feature point detection method and device, electronic equipment and storage medium
JP2024033803A (en) Angle measurement device, method for measuring angle, and angle measurement program
JP5811915B2 (en) Image processing apparatus, image processing program, and image processing method
KR20170010826A (en) Picture processing method and electronic device
JP5853848B2 (en) Image processing apparatus, image processing program, and image processing method
JP3919722B2 (en) Skin shape measuring method and skin shape measuring apparatus
CN107734324B (en) Method and system for measuring illumination uniformity of flash lamp and terminal equipment
EP2541469B1 (en) Image recognition device, image recognition method and image recognition program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141204

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150814

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150825

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150907

R150 Certificate of patent or registration of utility model

Ref document number: 5811915

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150