JP2018116645A - Image processing system, image processing method and program - Google Patents

Image processing system, image processing method and program Download PDF

Info

Publication number
JP2018116645A
JP2018116645A JP2017008756A JP2017008756A JP2018116645A JP 2018116645 A JP2018116645 A JP 2018116645A JP 2017008756 A JP2017008756 A JP 2017008756A JP 2017008756 A JP2017008756 A JP 2017008756A JP 2018116645 A JP2018116645 A JP 2018116645A
Authority
JP
Japan
Prior art keywords
vertex
correction target
peripheral
target vertex
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2017008756A
Other languages
Japanese (ja)
Inventor
磊 顧
Lei Gu
磊 顧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2017008756A priority Critical patent/JP2018116645A/en
Publication of JP2018116645A publication Critical patent/JP2018116645A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an image processing system capable of curtailing generation of noise in a fine shape of an edge part in a shape expressed by three-dimensional shape data.SOLUTION: The image processing system includes: selection means for selecting a correction object vertex to be corrected in each vertex in a shape expressed by three-dimensional shape data including normal information and a peripheral vertex near the correction object vertex; rotation means for rotating a normal vector in the peripheral vertex; calculation means for calculating an inner product between a vector from the peripheral vertex towards a candidate position of the movement destination of the correction object vertex and the rotated vector; determination means for determining the position of the movement destination of the correction object vertex on the basis of the calculated inner product; and correction means for moving the correction object vertex to the determined position of the movement destination.SELECTED DRAWING: Figure 10

Description

本発明は、3次元形状を表す形状データの最適化技術に関する。   The present invention relates to a technique for optimizing shape data representing a three-dimensional shape.

同一の被写体を異なる視点から見た複数の画像(多視点画像)から、被写体の3次元表面形状(以下単に「形状」とも記す)を再現する多視点ステレオ法などの技術が知られている。また、異なる光源方向から照射される同一の被写体を同一の視点から視た複数の画像から、被写体の表面形状における法線情報を取得し、取得した法線情報に基づいて被写体の形状を再現するフォトメトリックステレオ法などの技術も知られている。近年、被写体の表面形状における法線情報を高精度に取得することができるようになり、例えば細かいレリーフ模様のように、より細かいスケールの微細形状を再現できるようになった。   A technique such as a multi-view stereo method for reproducing a three-dimensional surface shape (hereinafter also simply referred to as “shape”) of a subject from a plurality of images (multi-view images) obtained by viewing the same subject from different viewpoints is known. In addition, normal information on the surface shape of the subject is acquired from a plurality of images obtained by viewing the same subject irradiated from different light source directions from the same viewpoint, and the shape of the subject is reproduced based on the acquired normal information. Techniques such as the photometric stereo method are also known. In recent years, it has become possible to acquire normal information on the surface shape of an object with high accuracy, and to reproduce a fine shape with a finer scale, such as a fine relief pattern.

特許文献1では、被写体の形状を表す形状データを最適化する技術が開示されている。具体的には、入力形状データが表す形状について、各頂点における法線情報と位置情報との整合性を評価し、当該評価結果に基づいて各頂点の移動先を順次探索することにより、形状の修正が実行される。   Patent Document 1 discloses a technique for optimizing shape data representing the shape of a subject. Specifically, for the shape represented by the input shape data, the consistency between the normal information and the position information at each vertex is evaluated, and the movement destination of each vertex is sequentially searched based on the evaluation result. Correction is performed.

米国特許出願公開第2012/0268571号明細書US Patent Application Publication No. 2012/0268571

特許文献1の技術では、着目頂点と着目頂点に隣接する周辺頂点との位置関係を示すベクトルと、周辺頂点における法線ベクトルとの内積が算出され、算出された内積が大きいほど、着目頂点の位置が理想位置から離れていると評価される。つまり、算出された内積が大きい程、着目頂点近傍の形状にノイズが発生する可能性が高いと推測され、着目頂点の位置が理想位置に近付く方向に移動されるわけである。   In the technique of Patent Document 1, an inner product of a vector indicating the positional relationship between a target vertex and a peripheral vertex adjacent to the target vertex and a normal vector at the peripheral vertex is calculated, and the larger the calculated inner product is, the larger the calculated vertex product is. It is evaluated that the position is away from the ideal position. That is, it is estimated that the larger the calculated inner product is, the higher the possibility of noise occurring in the shape near the target vertex, and the position of the target vertex is moved in a direction closer to the ideal position.

しかしながら、特許文献1の技術では、入力形状データが表す形状のうち、角度変化の境界であるエッジ部における微細形状の修正が困難な場合があった。これは、着目頂点の位置が理想位置から離れているにもかかわらず、算出された内積が小さくなる場合があったからである。そのため、微細形状の修正が適切に実行されず、出力形状データが表す形状にノイズが発生してしまう場合があった。   However, in the technique of Patent Document 1, it is sometimes difficult to correct the fine shape at the edge portion that is the boundary of the angle change among the shapes represented by the input shape data. This is because the calculated inner product may be small even though the position of the target vertex is far from the ideal position. For this reason, the fine shape is not properly corrected, and noise may occur in the shape represented by the output shape data.

上記課題に鑑み、本発明の形状修正手法は、エッジ部の微細形状におけるノイズの発生を抑制することを目的とする。   In view of the above problems, the shape correction method of the present invention aims to suppress the occurrence of noise in the fine shape of the edge portion.

本発明の画像処理装置は、法線情報を含む3次元形状データが表す形状における各頂点において修正対象となる修正対象頂点と当該修正対象頂点に隣接する周辺頂点とを選択する選択手段と、前記周辺頂点における法線ベクトルを回転させる回転手段と、前記周辺頂点から前記修正対象頂点の移動先の候補位置に向かうベクトルと、前記回転させたベクトルとの内積を算出する算出手段と、前記算出された内積に基づいて前記修正対象頂点の移動先の位置を決定する決定手段と、前記修正対象頂点を前記決定した移動先の位置に移動する修正手段と、を備えることを特徴とする。   The image processing apparatus of the present invention includes a selection unit that selects a correction target vertex to be corrected at each vertex in the shape represented by the three-dimensional shape data including normal line information and a peripheral vertex adjacent to the correction target vertex; Rotating means for rotating normal vectors at peripheral vertices, calculating means for calculating an inner product of the vector directed from the peripheral vertices to a candidate position to which the correction target vertex is moved, and the rotated vector, the calculated And determining means for determining the movement destination position of the correction target vertex based on the inner product, and correction means for moving the correction target vertex to the determined movement destination position.

本発明の形状修正手法は、エッジ部の微細形状におけるノイズの発生を抑制することができる、という効果を奏する。   The shape correction method of the present invention has an effect that generation of noise in the fine shape of the edge portion can be suppressed.

実施形態における画像処理装置のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of the image processing apparatus in embodiment. 実施形態における画像処理装置のソフトウェア機能構成を示す図である。It is a figure which shows the software function structure of the image processing apparatus in embodiment. 実施形態における形状修正処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the shape correction process in embodiment. 実施形態において修正対象頂点sと周辺頂点tとの位置関係の一例を示す模式図である。It is a schematic diagram which shows an example of the positional relationship between the correction target vertex s and the peripheral vertex t in the embodiment. 従来の評価値算出手法の原理を説明する図である。It is a figure explaining the principle of the conventional evaluation value calculation method. 本実施形態の評価値算出手法の原理を説明する図である。It is a figure explaining the principle of the evaluation value calculation method of this embodiment. 図7(a)は、従来の評価値算出手法によって算出される評価値の分布図である。図7(b)は、図7(a)の分布の傾斜をXY平面上で表した勾配図である。FIG. 7A is a distribution diagram of evaluation values calculated by a conventional evaluation value calculation method. FIG. 7B is a gradient diagram showing the slope of the distribution of FIG. 7A on the XY plane. 図8(a)は、本実施形態の評価値算出手法によって算出される評価値の分布図である。図8(b)は、図8(a)の分布の傾斜をXY平面上で表した勾配図である。FIG. 8A is a distribution diagram of evaluation values calculated by the evaluation value calculation method of the present embodiment. FIG. 8B is a gradient diagram showing the slope of the distribution of FIG. 8A on the XY plane. 本実施形態において、入力形状データが表す形状の断面図の一例である。In this embodiment, it is an example of sectional drawing of the shape which input shape data represents. 本実施形態の形状修正手法を適用した場合の効果を示す図である。It is a figure which shows the effect at the time of applying the shape correction method of this embodiment.

以下、本発明の実施形態について、図面を参照して説明する。なお、以下の実施形態は本発明を限定するものではなく、また、本実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。なお、同一の構成については、同じ符号を付して説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. The following embodiments do not limit the present invention, and all the combinations of features described in the present embodiment are not necessarily essential to the solution means of the present invention. In addition, about the same structure, the same code | symbol is attached | subjected and demonstrated.

[実施形態1]
本実施形態では、画像処理装置100に入力される3次元形状データ(以下単に「形状データ」とも記す)に含まれる法線情報を用いて、入力形状データが表す形状(特に微細形状)を修正する実施例について説明する。
[Embodiment 1]
In the present embodiment, the shape (particularly the fine shape) represented by the input shape data is corrected using normal line information included in the three-dimensional shape data (hereinafter also simply referred to as “shape data”) input to the image processing apparatus 100. An embodiment to be described will be described.

(ハードウェア構成)
図1は、本実施形態における画像処理装置100のハードウェア構成を示すブロック図である。画像処理装置100は、CPU101と、RAM102と、ROM103と、記憶部104と、入力インターフェース105と、出力インターフェース106と、システムバス107とから構成される。CPU101はプロセッサーであり、ROM103に格納されたプログラムをRAM102に読み出して実行する。CPU101がプログラムを実行することにより、後述する画像処理装置100における様々な処理が実行される。記憶部104は記憶デバイスであり、画像処理装置100における処理に用いられる画像データや、処理に用いられるパラメータなどを記憶する。記憶部104は、例えばHDD(Hard Disk Drive)や光ディスクドライブ、フラッシュメモリなどの二次記憶装置が適用される。
(Hardware configuration)
FIG. 1 is a block diagram illustrating a hardware configuration of the image processing apparatus 100 according to the present embodiment. The image processing apparatus 100 includes a CPU 101, a RAM 102, a ROM 103, a storage unit 104, an input interface 105, an output interface 106, and a system bus 107. The CPU 101 is a processor, and reads a program stored in the ROM 103 into the RAM 102 and executes it. When the CPU 101 executes the program, various processes in the image processing apparatus 100 described later are executed. The storage unit 104 is a storage device, and stores image data used for processing in the image processing apparatus 100, parameters used for processing, and the like. As the storage unit 104, for example, a secondary storage device such as an HDD (Hard Disk Drive), an optical disk drive, or a flash memory is applied.

入力インターフェース105は、例えばUSBやIEEE1394などのシリアルバスインターフェースである。画像処理装置100は、入力インターフェース105を介して、外部メモリ108(例えば、メモリカード、CFカード、SDカード、USBメモリ)から処理対象となる形状データや法線マップ(法線情報)などを取得することができる。あるいはまた、入力インターフェース105は、イーサネット(登録商標)などのネットワークインターフェースの機能を有していてもよい。この場合、画像処理装置100は、ネットワークを介して通信可能に接続される外部装置(PCなど)から、処理対象となる形状データや法線マップなどを受信することができる。出力インターフェース106は、例えばUSBやIEEE1394などのシリアルバスインターフェースである。画像処理装置100は、出力インターフェース106を介して、外部メモリ109に所定の処理を施した形状データを出力することができる。あるいはまた、出力インターフェース106は、イーサネットなどのネットワークインターフェースの機能を有していてもよい。この場合、画像処理装置100は、ネットワークを介して外部装置に所定の処理を施した形状データを送信することができる。なお、画像処理装置100の構成要素は上記のもの以外にも存在するが、本実施形態の主眼ではないため、説明を省略する。   The input interface 105 is a serial bus interface such as USB or IEEE1394. The image processing apparatus 100 acquires shape data, normal map (normal information), and the like to be processed from an external memory 108 (for example, a memory card, CF card, SD card, USB memory) via the input interface 105. can do. Alternatively, the input interface 105 may have a network interface function such as Ethernet (registered trademark). In this case, the image processing apparatus 100 can receive shape data, a normal map, and the like to be processed from an external apparatus (such as a PC) that is communicably connected via a network. The output interface 106 is a serial bus interface such as USB or IEEE1394. The image processing apparatus 100 can output shape data subjected to predetermined processing to the external memory 109 via the output interface 106. Alternatively, the output interface 106 may have a network interface function such as Ethernet. In this case, the image processing apparatus 100 can transmit shape data that has been subjected to predetermined processing to an external apparatus via a network. Note that the components of the image processing apparatus 100 exist in addition to those described above.

(ソフトウェア機能構成)
図2は、本実施形態における画像処理装置100のソフトウェア機能構成を示すブロック図である。図2のブロックの機能は、CPU101がROM103に格納されたプログラムコードをRAM102に読み出して実行することにより実現される。あるいはまた、図2におけるブロックの一部または全部の機能をASICや電子回路等のハードウェアで実現するようにしてもよい。
(Software function configuration)
FIG. 2 is a block diagram illustrating a software functional configuration of the image processing apparatus 100 according to the present embodiment. The functions of the blocks in FIG. 2 are realized by the CPU 101 reading out the program code stored in the ROM 103 to the RAM 102 and executing it. Alternatively, some or all of the blocks in FIG. 2 may be realized by hardware such as an ASIC or an electronic circuit.

本実施形態における画像処理装置100において、データ取得部201は、形状情報と法線情報とを記憶部104などから読み出す。修正対象頂点選択部202は、読み出した形状情報および法線情報から、修正処理の対象となる着目頂点s(以下「修正対象頂点s」とも記す)を選択する。周辺頂点選択部203は、頂点群の隣接関係を示す情報に基づいて、修正対象頂点sと辺で隣接する周辺頂点tを選択する。法線回転部204は、周辺頂点tから法線方向に延びる法線ベクトルを、周辺頂点の位置を中心に所定の角度回転させる。評価値算出部205は、修正頂点tから修正対象頂点sの移動先の候補位置に向かうベクトルと、回転させた回転ベクトルとに基づいて、候補位置に対応する評価値を算出する。評価値比較部206は、候補位置に対応する評価値を比較し、算出された評価値のうち最も小さい値を抽出する。移動先決定部207は、抽出された最も小さい値の評価値に基づき、修正対象頂点sの移動先の位置を決定する。形状修正部208は、修正対象頂点sを移動先の位置に移動する。データ出力部209は、すべての頂点が移動(修正)された形状データを、出力形状データとして出力する。   In the image processing apparatus 100 according to the present embodiment, the data acquisition unit 201 reads shape information and normal information from the storage unit 104 or the like. The correction target vertex selection unit 202 selects a target vertex s (hereinafter also referred to as “correction target vertex s”) to be corrected from the read shape information and normal line information. The peripheral vertex selection unit 203 selects a peripheral vertex t adjacent to the correction target vertex s on the side based on information indicating the adjacent relationship of the vertex group. The normal rotation unit 204 rotates a normal vector extending in the normal direction from the peripheral vertex t by a predetermined angle around the position of the peripheral vertex. The evaluation value calculation unit 205 calculates an evaluation value corresponding to the candidate position based on the vector from the corrected vertex t toward the candidate position to which the correction target vertex s is moved and the rotated rotation vector. The evaluation value comparison unit 206 compares the evaluation values corresponding to the candidate positions, and extracts the smallest value among the calculated evaluation values. The movement destination determination unit 207 determines the position of the movement destination of the correction target vertex s based on the extracted evaluation value having the smallest value. The shape correcting unit 208 moves the correction target vertex s to the destination position. The data output unit 209 outputs the shape data in which all the vertices are moved (corrected) as output shape data.

(形状修正処理の手順を示すフローチャート)
図3は、本実施形態における形状修正処理の手順を示すフローチャートである。図3のフローチャートによる処理は、CPU101がROM103に格納されたプログラムコードをRAM102に読み出して実行することにより行われる。また、図3の説明における各記号Sは、フローチャートにおけるステップであることを意味する。
(Flowchart showing the procedure of shape correction processing)
FIG. 3 is a flowchart showing the procedure of the shape correction process in this embodiment. 3 is performed by the CPU 101 reading out the program code stored in the ROM 103 to the RAM 102 and executing it. Each symbol S in the description of FIG. 3 means a step in the flowchart.

S301において、データ取得部201は、形状情報と法線情報とを取得する。具体的には、データ取得部201は、3次元空間における所定の形状を表す3次元形状データと、当該形状の各頂点、各辺、各面における法線を示す法線データとを、記憶部104から読み出す。あるいはまた、データ取得部201は、3次元形状データと法線データとを、入力インターフェース105を介して外部メモリ108から読み出してもよい。本実施形態では、形状データと法線データとを含み、画像処理装置100で処理可能なデータであるメッシュデータが記憶部104から読み出される。メッシュデータは、頂点、辺、面の集合を表すデータであり、各頂点、各辺、各面は、長さ1のベクトルである法線ベクトルを有する。さらにCPU101は、メッシュデータを解析することにより、ある頂点がどの頂点に隣接しているかを示す頂点群の隣接関係を示すデータを取得することができる。例えば、本実施形態のメッシュデータは、点群データから表面再構築技術によって生成され、テクスチャマッピングによって各頂点、各辺、各面に法線ベクトルが付与されたデータとすることができる。本実施形態では、被写体の表面形状を表す格子状ポリゴンデータに法線ベクトルが付与されたデータを、3次元形状データとしている。   In S301, the data acquisition unit 201 acquires shape information and normal information. Specifically, the data acquisition unit 201 stores three-dimensional shape data representing a predetermined shape in a three-dimensional space, and normal data indicating normals at each vertex, each side, and each surface of the shape. Read from 104. Alternatively, the data acquisition unit 201 may read the three-dimensional shape data and normal data from the external memory 108 via the input interface 105. In the present embodiment, mesh data that is shape data and normal line data and that can be processed by the image processing apparatus 100 is read from the storage unit 104. The mesh data is data representing a set of vertices, sides, and faces, and each vertex, each side, and each face has a normal vector that is a vector of length one. Further, the CPU 101 can acquire data indicating the adjacency relationship of the vertex group indicating which vertex a certain vertex is adjacent to by analyzing the mesh data. For example, the mesh data according to the present embodiment can be data in which a normal vector is assigned to each vertex, each side, and each surface by texture mapping, which is generated from point cloud data by a surface reconstruction technique. In the present embodiment, data obtained by adding a normal vector to lattice polygon data representing the surface shape of a subject is used as three-dimensional shape data.

S302において、修正対象頂点選択部202は、読み出したメッシュデータのなかから、修正処理の対象となる着目頂点sを選択する。修正対象頂点選択部202は、S302において、着目頂点sの位置情報と、着目頂点sから法線方向に延びる法線ベクトルも取得する。なお、S302が初回に実行される初期状態では、読み出したメッシュデータが表す形状のうち最も左上の頂点の位置情報と、当該左上の頂点における法線ベクトルとが選択される。本実施形態の修正対象頂点選択部202は、メッシュデータに含まれる各修正対象頂点sを、主走査方向に順次選択する。   In S302, the correction target vertex selection unit 202 selects the target vertex s to be corrected from the read mesh data. In S302, the correction target vertex selection unit 202 also acquires the position information of the target vertex s and the normal vector extending in the normal direction from the target vertex s. In the initial state in which S302 is executed for the first time, the position information of the top left vertex and the normal vector at the top left vertex of the shape represented by the read mesh data are selected. The correction target vertex selection unit 202 of this embodiment sequentially selects each correction target vertex s included in the mesh data in the main scanning direction.

S303において、周辺頂点選択部203は、S302で取得した着目頂点sと、頂点群の隣接関係を示すデータとに基づいて、修正対象頂点sが辺で隣接する頂点tを選択する。本明細書において、このように修正対象頂点sと辺で隣接する頂点tを「周辺頂点」と記す。そして、周辺頂点選択部203は、メッシュデータを解析することにより、周辺頂点tの位置情報と、周辺頂点tから法線方向に延びる法線ベクトルとを取得する。本実施形態において、形状データ(メッシュデータ)は、全ての頂点から伸びる辺の数が統一され、かつ、頂点から伸びる辺によって形成される四辺形は所定の規則に従って構成されている。そのため、周辺頂点選択部203は、着目頂点sを中心として上下左右に隣接する4頂点を周辺頂点に選択する。このように、本実施形態では、着目頂点sを中心として上下左右に隣接する4頂点が周辺頂点に選択されるが、周辺頂点tの数は形状データにおけるポリゴンの定義により異なる。   In S303, the peripheral vertex selection unit 203 selects the vertex t where the correction target vertex s is adjacent on the side based on the target vertex s acquired in S302 and the data indicating the adjacent relationship of the vertex group. In this specification, the vertex t adjacent to the correction target vertex s in this way is referred to as a “peripheral vertex”. Then, the peripheral vertex selection unit 203 analyzes the mesh data to acquire position information of the peripheral vertex t and a normal vector extending in the normal direction from the peripheral vertex t. In the present embodiment, in the shape data (mesh data), the number of sides extending from all vertices is unified, and the quadrilateral formed by the sides extending from the vertices is configured according to a predetermined rule. Therefore, the peripheral vertex selection unit 203 selects, as peripheral vertices, four vertices that are adjacent vertically and horizontally around the target vertex s. As described above, in this embodiment, four vertices that are adjacent in the vertical and horizontal directions around the target vertex s are selected as peripheral vertices, but the number of peripheral vertices t varies depending on the definition of the polygon in the shape data.

S304において、法線回転部204は、修正対象頂点sの位置情報と、周辺頂点tの位置情報および法線ベクトルとに基づいて、周辺頂点tにおける法線ベクトルをθ回転させた場合の回転行列Rtを算出する。この時、周辺頂点tにおける法線ベクトルの回転行列Rtを算出する際に用いられる回転軸vtは、次式により定まる。   In S304, the normal rotation unit 204 rotates the normal vector at the peripheral vertex t by θ based on the position information of the correction target vertex s and the position information and normal vector of the peripheral vertex t. Rt is calculated. At this time, the rotation axis vt used when calculating the rotation matrix Rt of the normal vector at the peripheral vertex t is determined by the following equation.

ここで、psは3次元空間中における修正対象頂点sの位置を、ptは周辺頂点tの位置を、dtは周辺頂点tから修正対象頂点sに向かう正規化されたベクトルをそれぞれ表す。また、nsは修正対象頂点sから法線方向に延びる正規化された法線ベクトルを、ntは周辺頂点tから法線方向に延びる正規化された法線ベクトルをそれぞれ表す。   Here, ps represents the position of the correction target vertex s in the three-dimensional space, pt represents the position of the peripheral vertex t, and dt represents a normalized vector from the peripheral vertex t toward the correction target vertex s. Further, ns represents a normalized normal vector extending from the correction target vertex s in the normal direction, and nt represents a normalized normal vector extending from the peripheral vertex t in the normal direction.

図4は、本実施形態において、修正対象頂点sと、修正対象頂点sに隣接する2つの周辺頂点t1,t2との位置関係の一例を模式的に示す図である。図4において、形状401は、3次元形状データ(メッシュデータ)が表す形状の一例である。形状401は、修正対象頂点sと、修正対象頂点sに隣接する2つの周辺頂点t1,t2とを有する。修正対象頂点sの位置psからは法線ベクトルnsが延びている。そして、周辺頂点t1の位置pt1からは法線ベクトルnt1と、修正対象頂点sの位置psに向かうベクトルdt1とが延びている。同様に、周辺頂点t2の位置pt2からも法線ベクトルnt2と、修正対象頂点sの位置Psに向かうベクトルdt2とが延びている。本実施形態の形状修正手法は、これら形状情報(各頂点の位置および各頂点間の位置関係を示すベクトル)と、法線情報(各頂点における法線ベクトル)とに基づいて、入力形状データが表す形状を修正することができる。なお、図4の例ではY軸を中心としてXZ平面方向を視た場合の形状401が示されている。   FIG. 4 is a diagram schematically illustrating an example of a positional relationship between the correction target vertex s and two peripheral vertices t1 and t2 adjacent to the correction target vertex s in the present embodiment. In FIG. 4, a shape 401 is an example of a shape represented by three-dimensional shape data (mesh data). The shape 401 includes a correction target vertex s and two peripheral vertices t1 and t2 adjacent to the correction target vertex s. A normal vector ns extends from the position ps of the correction target vertex s. A normal vector nt1 and a vector dt1 extending to the position ps of the correction target vertex s extend from the position pt1 of the peripheral vertex t1. Similarly, a normal vector nt2 and a vector dt2 toward the position Ps of the correction target vertex s extend from the position pt2 of the peripheral vertex t2. The shape correction method of the present embodiment is based on the shape information (vectors indicating the positions of the vertices and the positional relationship between the vertices) and the normal information (normal vectors at the vertices). The shape to represent can be modified. In the example of FIG. 4, a shape 401 when the XZ plane direction is viewed around the Y axis is shown.

法線ベクトルntを、式1で算出した回転軸vtのまわりにθ回転させる場合、回転行列Rt(θ)は次式により定まる(ロドリゲスの公式)。   When the normal vector nt is rotated θ around the rotation axis vt calculated by Equation 1, the rotation matrix Rt (θ) is determined by the following equation (Rodriguez formula).

本実施形態において、法線ベクトルntを正方向に90度回転させる場合、回転行列Rt(θ)は次式の通りとなる。   In the present embodiment, when the normal vector nt is rotated 90 degrees in the positive direction, the rotation matrix Rt (θ) is as follows.

式5を用いた演算により、法線ベクトルntを90度回転させたベクトルn’tを算出することができる。   A vector n′t obtained by rotating the normal vector nt by 90 degrees can be calculated by the calculation using Expression 5.

式5を用いた演算により、法線ベクトルntを90度回転させたベクトルn’tを算出する手法について、図6を参照して説明する。図6において、修正対象頂点sと、修正対象頂点sに隣接する2つの周辺頂点t1,t2との位置関係は、図4と同様である。そして、図6の例では、周辺頂点t2の位置pt2における法線ベクトルnt2が、式5を用いた演算により90度回転され、回転ベクトルn’t2となっている。   A method of calculating a vector n′t obtained by rotating the normal vector nt by 90 degrees by calculation using Expression 5 will be described with reference to FIG. In FIG. 6, the positional relationship between the correction target vertex s and two peripheral vertices t1 and t2 adjacent to the correction target vertex s is the same as in FIG. In the example of FIG. 6, the normal vector nt2 at the position pt2 of the peripheral vertex t2 is rotated 90 degrees by the calculation using Expression 5, and becomes the rotation vector n′t2.

なお、本実施形態において、周辺頂点tにおける法線ベクトルntが回転される回転方向は、修正対象頂点sの位置psと周辺頂点tの位置ptとの位置関係に応じて定まる。具体的には、周辺頂点t2における法線ベクトルnt2は、法線ベクトルnt2と周辺頂点t2から修正対象頂点sに向かうベクトルdt2とによって定められる平面において、周辺頂点t2の位置pt2を中心に回転される。本実施形態の法線回転部204は、修正対象頂点sが選択される方向である主走査方向に法線ベクトルnt2を90度回転させる。しかしながら、法線ベクトルntの回転方向は、上記の実施例に限定されない。図6の通り、例えばY軸を中心としてXZ平面を基準としたとき、主走査方向において最も先に位置している周辺頂点tについては法線ベクトルntを正方向に回転させ、最も後に位置している周辺頂点tについては法線ベクトルntを負方向に回転させてもよい。   In the present embodiment, the rotation direction in which the normal vector nt at the peripheral vertex t is rotated is determined according to the positional relationship between the position ps of the correction target vertex s and the position pt of the peripheral vertex t. Specifically, the normal vector nt2 at the peripheral vertex t2 is rotated around the position pt2 of the peripheral vertex t2 on the plane defined by the normal vector nt2 and the vector dt2 from the peripheral vertex t2 toward the correction target vertex s. The The normal rotation unit 204 of the present embodiment rotates the normal vector nt2 by 90 degrees in the main scanning direction, which is the direction in which the correction target vertex s is selected. However, the rotation direction of the normal vector nt is not limited to the above embodiment. As shown in FIG. 6, for example, when the XZ plane is centered on the Y axis, the normal vector nt is rotated in the positive direction for the peripheral vertex t positioned first in the main scanning direction, and is positioned last. For the peripheral vertex t, the normal vector nt may be rotated in the negative direction.

S305において、評価値算出部205は、回転ベクトルn’tと、周辺頂点tの位置ptと、修正対象頂点sの位置psとに基づき、修正対象頂点sの修正後の候補位置ps+σ,ps,ps−σそれぞれについて評価値χ1,χ2,χ3を算出する。修正対象頂点sの修正後の候補位置pに対応する評価値χは、以下の式で表わされる。   In S305, the evaluation value calculation unit 205 determines the candidate position ps + σ, ps, corrected for the correction target vertex s based on the rotation vector n′t, the position pt of the peripheral vertex t, and the position ps of the correction target vertex s. Evaluation values χ1, χ2, and χ3 are calculated for each of ps−σ. The evaluation value χ corresponding to the corrected candidate position p of the correction target vertex s is expressed by the following equation.

ここで、式7においてAとBとはそれぞれ定数を表す。実用上は、AとBとはそれぞれ「1」としてよい。AとBとにそれぞれ「1」を適用してうまくいかない場合は、式7の出力を参考にして、AとBとの値をそれぞれ調整すればよい。   Here, in Expression 7, A and B each represent a constant. In practice, A and B may each be “1”. If “1” is not applied to A and B, the values of A and B can be adjusted with reference to the output of Expression 7.

S306において、評価値比較部206は、S305で算出された修正対象頂点sの修正後の候補位置ps+σ,ps,ps−σそれぞれに対応する評価値χ1,χ2,χ3を比較し、評価値χ1,χ2,χ3のなかから最小値を抽出する。   In S306, the evaluation value comparison unit 206 compares the evaluation values χ1, χ2, and χ3 corresponding to the corrected candidate positions ps + σ, ps, and ps−σ calculated in S305, and the evaluation value χ1. , Χ2, χ3, the minimum value is extracted.

S307において、移動先決定部207は、S306で抽出された評価値に基づき、修正対象頂点sの移動先を決定する。修正対象点sの移動先位置ps’は以下の式により算出することができる。   In S307, the movement destination determination unit 207 determines the movement destination of the correction target vertex s based on the evaluation value extracted in S306. The movement destination position ps ′ of the correction target point s can be calculated by the following equation.

S308において、形状修正部208は、修正対象頂点sを移動先位置ps’に移動する。   In S308, the shape correcting unit 208 moves the correction target vertex s to the movement destination position ps'.

S309において、形状データに含まれるすべての頂点に対して修正が行われたか否かが判定される。すべての頂点に対して修正が行われた場合(S309:YES)、データ出力部209は、移動先位置ps’の各位置座標を頂点とする、修正後の3次元形状データを出力する。一方、形状データに含まれるすべての頂点に対して修正が行われていない場合(S309:NO)、ふたたびS302に戻り次の着目頂点sについての形状修正処理が繰り返される。   In S309, it is determined whether or not all the vertices included in the shape data have been corrected. If all the vertices have been corrected (S309: YES), the data output unit 209 outputs corrected three-dimensional shape data with the position coordinates of the movement destination position ps' as vertices. On the other hand, when all the vertices included in the shape data have not been corrected (S309: NO), the process returns to S302 and the shape correction process for the next target vertex s is repeated.

(評価値算出手法の原理)
図5は、従来の形状修正処理における評価値算出手法の原理を説明する図である。従来の評価値算出部205は、周辺頂点tにおける法線ベクトルntと、周辺頂点tの位置ptから修正対象頂点sの位置psに向かうベクトルdtとの内積を評価値として算出していた。図5において、修正対象頂点sと、修正対象頂点sに隣接する2つの周辺頂点t1,t2との位置関係は、図4と同様である。図5に示される通り、周辺頂点t2における法線ベクトルnt2と、周辺頂点t2の位置pt2から修正対象頂点sの位置psに向かうベクトルdt2との内積は「0.25」であり、この値が評価値に用いられる。そして、従来の移動先決定部207は、修正対象頂点sの修正後の候補位置ps+σ,ps,ps−σそれぞれに対応する評価値χ1,χ2,χ3のなかから、最も小さい評価値に対応する候補位置を移動先に決定する。例えば、図5の位置関係において、最も小さい評価値が「0.2」の場合、従来の移動先決定部207は、修正対象頂点sの位置を探索軸上の理想位置(図5)方向に移動させ、nt2とdt2との内積が「0.2」となる位置を移動先の頂点に決定する。なお、図5および図6の実施例において、「探索軸」とは、理想位置と修正対象頂点sの位置psとによって定まる軸であり、本実施形態の評価値算出部205は、候補位置ps+σ,ps,ps−σを探索軸上の位置から取得する。そして、図5および図6の実施例において、「理想位置」は、修正対象頂点sの位置psと周辺頂点tの位置ptとの位置関係に応じて定まる。具体的には、法線ベクトルnt2と周辺頂点t2から修正対象頂点sに向かうベクトルdt2とによって定められる平面において、nt2とdt2との内積が「0」となる位置である。
(Principle of evaluation value calculation method)
FIG. 5 is a diagram for explaining the principle of the evaluation value calculation method in the conventional shape correction processing. The conventional evaluation value calculation unit 205 calculates the inner product of the normal vector nt at the peripheral vertex t and the vector dt from the position pt of the peripheral vertex t toward the position ps of the correction target vertex s as the evaluation value. In FIG. 5, the positional relationship between the correction target vertex s and the two peripheral vertices t1 and t2 adjacent to the correction target vertex s is the same as in FIG. As shown in FIG. 5, the inner product of the normal vector nt2 at the peripheral vertex t2 and the vector dt2 from the position pt2 of the peripheral vertex t2 to the position ps of the correction target vertex s is “0.25”, and this value is Used for evaluation value. Then, the conventional destination determination unit 207 corresponds to the smallest evaluation value among the evaluation values χ1, χ2, and χ3 corresponding to the candidate positions ps + σ, ps, and ps−σ after the correction of the correction target vertex s. The candidate position is determined as the movement destination. For example, in the positional relationship of FIG. 5, when the smallest evaluation value is “0.2”, the conventional movement destination determination unit 207 moves the position of the correction target vertex s in the ideal position (FIG. 5) direction on the search axis. The position where the inner product of nt2 and dt2 is “0.2” is determined as the destination vertex. 5 and 6, the “search axis” is an axis determined by the ideal position and the position ps of the correction target vertex s, and the evaluation value calculation unit 205 of the present embodiment uses the candidate position ps + σ. , Ps, ps-σ are acquired from the position on the search axis. 5 and FIG. 6, the “ideal position” is determined according to the positional relationship between the position ps of the correction target vertex s and the position pt of the peripheral vertex t. Specifically, in the plane defined by the normal vector nt2 and the vector dt2 from the peripheral vertex t2 toward the correction target vertex s, the inner product of nt2 and dt2 is “0”.

しかしながら、従来の評価値算出手法では、角度変化の境界であるエッジ部における微細形状の修正が困難な場合があった。エッジ部の修正ができない場合の例を図5に示す。エッジ部における微細形状の修正を行う場合、選択された修正対象頂点s’と、修正対象頂点s’に隣接する周辺頂点t1,t2とが図5に示される通りに位置する場合がある。より詳細には、理想位置を基準として、修正対象頂点s’が、周辺頂点t2(または周辺頂点t1)の法線を越えて位置する場合がある。図5の例では、理想位置を基準として、修正対象頂点s’が、周辺頂点t2の法線ベクトルnt2方向を越えて位置している様子が示されている。この場合、法線ベクトルnt2と、周辺頂点t2の位置pt2から修正対象頂点s’の位置ps’に向かうベクトルd’t2との内積は「0.75」であり、この値が評価値に用いられる。そして、修正対象頂点s’の位置ps’が理想位置から離れるほど評価値は低くなる。この結果、修正対象頂点s’の位置ps’は、理想位置から離れる方向(例えば、nt2とd’t2との内積が「0.5」となる位置など)に移動されることになる。修正対象頂点s’が理想位置から離れる方向に移動すると、入力形状データが表す形状に含まれていたノイズが除去されず、出力形状データが表す形状にも発生してしまうなどの不具合が生じてしまう場合がある。   However, in the conventional evaluation value calculation method, there is a case where it is difficult to correct the fine shape at the edge portion that is the boundary of the angle change. An example in the case where the edge portion cannot be corrected is shown in FIG. When the fine shape is corrected in the edge portion, the selected correction target vertex s 'and the peripheral vertices t1 and t2 adjacent to the correction target vertex s' may be positioned as shown in FIG. More specifically, the correction target vertex s ′ may be located beyond the normal line of the peripheral vertex t2 (or the peripheral vertex t1) with the ideal position as a reference. The example of FIG. 5 shows that the correction target vertex s ′ is located beyond the normal vector nt2 direction of the peripheral vertex t2 with the ideal position as a reference. In this case, the inner product of the normal vector nt2 and the vector d′ t2 from the position pt2 of the peripheral vertex t2 toward the position ps ′ of the correction target vertex s ′ is “0.75”, and this value is used as the evaluation value. It is done. The evaluation value becomes lower as the position ps ′ of the correction target vertex s ′ is farther from the ideal position. As a result, the position ps 'of the correction target vertex s' is moved in a direction away from the ideal position (for example, a position where the inner product of nt2 and d't2 is "0.5"). If the correction target vertex s ′ moves in a direction away from the ideal position, the noise included in the shape represented by the input shape data is not removed, and a problem such as occurrence in the shape represented by the output shape data occurs. May end up.

図6は、本実施形態における評価値算出手法の原理を説明する図である。図6において、修正対象頂点sと、修正対象頂点sに隣接する2つの周辺頂点t1,t2との位置関係は、図4と同様である。同様に、修正対象頂点s’と、修正対象頂点s’に隣接する2つの周辺頂点t1,t2との位置関係も、図5と同様である。本実施形態の評価値算出部205は、法線ベクトルnt2を正方向に90度回転させた回転ベクトルn’t2と、周辺頂点t2の位置pt2から修正対象頂点sの位置psに向かうベクトルdt2との内積を算出する。図6に示される通り、n’t2とdt2との内積は「0.14」であり、この値が評価値に用いられる。なお、n’t2とdt2との内積を評価値に用いる実施例について説明したが、例えばn’t1とdt1との内積およびn’t2とdt2との内積の合算値のように、修正対象頂点sの各周辺頂点tについて算出した内積の合算値を評価値に用いてもよい。   FIG. 6 is a diagram for explaining the principle of the evaluation value calculation method in the present embodiment. In FIG. 6, the positional relationship between the correction target vertex s and two peripheral vertices t1 and t2 adjacent to the correction target vertex s is the same as in FIG. Similarly, the positional relationship between the correction target vertex s 'and the two peripheral vertices t1 and t2 adjacent to the correction target vertex s' is the same as in FIG. The evaluation value calculation unit 205 of the present embodiment includes a rotation vector n′t2 obtained by rotating the normal vector nt2 by 90 degrees in the positive direction, and a vector dt2 from the position pt2 of the peripheral vertex t2 toward the position ps of the correction target vertex s. The inner product of is calculated. As shown in FIG. 6, the inner product of n′t2 and dt2 is “0.14”, and this value is used as the evaluation value. Although the embodiment using the inner product of n′t2 and dt2 as the evaluation value has been described, the correction target vertex, such as the sum of the inner product of n′t1 and dt1 and the inner product of n′t2 and dt2, is described. The sum of inner products calculated for each peripheral vertex t of s may be used as the evaluation value.

一方、理想位置を基準として、修正対象頂点s’が、周辺頂点t2の法線方向を越えて位置している場合、算出される評価値は以下の通りとなる。本実施形態の評価値算出部205は、回転ベクトルn’t2と、周辺頂点t2の位置pt2から修正対象頂点s’の位置ps’に向かうベクトルd’t2との内積を算出する。図6に示される通り、回転ベクトルn’t2とベクトルd’t2との内積は「1.5」であり、この値が評価値に用いられる。このように、本実施形態では、回転ベクトルn’t2を用いて評価値を算出するため、修正対象頂点sの位置が理想位置に近付くほど評価値は小さくなり、修正対象頂点sの位置が理想位置から離れるほど評価値は大きくなる。この結果、本実施形態の移動先決定部207は、理想位置方向に近い候補位置を、修正対象頂点sの移動先の頂点の位置に決定することができる。   On the other hand, when the correction target vertex s ′ is located beyond the normal direction of the peripheral vertex t2 with respect to the ideal position, the calculated evaluation value is as follows. The evaluation value calculation unit 205 of the present embodiment calculates the inner product of the rotation vector n′t2 and the vector d′ t2 from the position pt2 of the peripheral vertex t2 toward the position ps ′ of the correction target vertex s ′. As shown in FIG. 6, the inner product of the rotation vector n′t2 and the vector d′ t2 is “1.5”, and this value is used as the evaluation value. Thus, in this embodiment, since the evaluation value is calculated using the rotation vector n′t2, the evaluation value decreases as the position of the correction target vertex s approaches the ideal position, and the position of the correction target vertex s is ideal. The evaluation value increases as the distance from the position increases. As a result, the movement destination determination unit 207 of this embodiment can determine a candidate position close to the ideal position direction as the position of the movement destination vertex of the correction target vertex s.

図7(a)は、従来の評価値算出手法によって算出される評価値の分布図である。図7(a)のXYZ座標系において、X軸、Y軸、Z軸はそれぞれ修正対象頂点sの位置psのX座標、Y座標、Z座標をそれぞれ示す座標軸である。分布701は、上記XYZ座標系内に示されている。図7(a)では、周辺頂点t1の位置pt1が(−1,0,0)に、周辺頂点t2の位置pt2が(1,0,0)に固定され、理想位置が(0,0,0)である場合の例が示されている。そして、位置psをZ座標≧0の任意の位置に配置した場合に、それぞれに対応する評価値(ベクトルntとベクトルdtとの内積)の点群が、分布701を構成している。   FIG. 7A is a distribution diagram of evaluation values calculated by a conventional evaluation value calculation method. In the XYZ coordinate system of FIG. 7A, the X axis, the Y axis, and the Z axis are coordinate axes respectively indicating the X coordinate, the Y coordinate, and the Z coordinate of the position ps of the correction target vertex s. The distribution 701 is shown in the XYZ coordinate system. In FIG. 7A, the position pt1 of the peripheral vertex t1 is fixed at (-1, 0, 0), the position pt2 of the peripheral vertex t2 is fixed at (1, 0, 0), and the ideal position is (0, 0, 0). An example in the case of 0) is shown. When the position ps is arranged at an arbitrary position with Z coordinates ≧ 0, a point group of evaluation values (inner product of the vector nt and the vector dt) corresponding to each of them constitutes the distribution 701.

分布701の傾斜は、評価値が増加または減少することを表している。分布701の傾斜のうち、矢印702は、分布701における原点方向への下り傾斜であることを示している。これは、矢印702が示す下り傾斜を構成する評価値は、XYZ座標系の原点に近付くほど減少することを示している。つまり、矢印702は、下り傾斜を構成する評価値に対応する修正対象頂点の位置ps(例えば、図5で評価値が「0.25」となる位置ps)が、従来の形状修正処理によって、理想位置に近付く方向に移動されることを意味する。   The slope of the distribution 701 indicates that the evaluation value increases or decreases. Of the slopes of the distribution 701, an arrow 702 indicates a downward slope toward the origin in the distribution 701. This indicates that the evaluation value constituting the downward slope indicated by the arrow 702 decreases as the origin approaches the XYZ coordinate system. That is, the arrow 702 indicates that the position ps of the correction target vertex corresponding to the evaluation value constituting the downward slope (for example, the position ps where the evaluation value is “0.25” in FIG. 5) is obtained by the conventional shape correction processing. It means moving in the direction approaching the ideal position.

しかしながら、従来の評価値算出手法によって算出される評価値の分布では、原点方向とは異なる方向への下り傾斜が形成されてしまう場合がある。矢印703は、分布701において原点方向とは異なる方向への下り傾斜であることを示している。原点方向とは異なる方向への下り傾斜を構成する評価値は、XYZ座標系の原点から離れるほど減少する。つまり、矢印703は、上記評価値に対応する修正対象頂点の位置ps(例えば、図5で評価値が「0.75」となる位置ps’)が、従来の形状修正処理によって、理想位置から離れる方向に移動されることを意味する。   However, in the distribution of evaluation values calculated by the conventional evaluation value calculation method, a downward slope in a direction different from the origin direction may be formed. An arrow 703 indicates a downward slope in the distribution 701 in a direction different from the origin direction. The evaluation value constituting the downward inclination in the direction different from the origin direction decreases as the distance from the origin of the XYZ coordinate system increases. That is, the arrow 703 indicates that the position ps of the correction target vertex corresponding to the evaluation value (for example, the position ps ′ where the evaluation value is “0.75” in FIG. 5) is changed from the ideal position by the conventional shape correction processing. It means moving in the direction of leaving.

図7(b)は、図7(a)における分布701の傾斜を、Z軸を中心としたXY平面上で表した勾配図である。図7(b)の勾配図に含まれる各細線矢印は、分布701における傾きの方向と、傾きの緩急とを表している。座標点704は、位置座標が(0,1,1)となる修正対象頂点の位置psを表している。従来の形状修正処理では、座標点704は、細線矢印で表される傾きに従って、原点方向に近付くように移動される。座標点705は、位置座標が(2,2,2)となる修正対象頂点の位置psを表している。従来の形状修正処理では、座標点705は、細線矢印で表される傾きに従って、原点方向から離れる方向に移動されることが分かる。分布701の下り傾斜が原点から離れる方向に形成される領域は、図7(b)において斜線部分で表されている。   FIG. 7B is a gradient diagram showing the slope of the distribution 701 in FIG. 7A on the XY plane with the Z axis as the center. Each thin line arrow included in the gradient diagram of FIG. 7B represents the direction of inclination in the distribution 701 and the inclination of the inclination. A coordinate point 704 represents the position ps of the correction target vertex whose position coordinates are (0, 1, 1). In the conventional shape correction process, the coordinate point 704 is moved so as to approach the origin direction according to the inclination represented by the thin line arrow. A coordinate point 705 represents the position ps of the correction target vertex whose position coordinates are (2, 2, 2). In the conventional shape correction process, it can be seen that the coordinate point 705 is moved in a direction away from the origin direction according to the inclination represented by the thin line arrow. A region where the downward slope of the distribution 701 is formed in a direction away from the origin is represented by a hatched portion in FIG.

図8(a)は、本実施形態の評価値算出手法によって算出される評価値の分布図である。図8(a)のXYZ座標系において、X軸、Y軸、Z軸それぞれの座標軸の意味と、位置psに対応する評価値の点群が分布を構成していることは、図7(a)と同様である。従来手法とは異なり、本実施形態の評価値算出手法によって算出される評価値の分布801では、すべての下り傾斜が原点方向に向かっている。図8(a)に示される通り、いずれの矢印802も、分布801における原点方向への下り傾斜であることを示している。つまり、修正対象頂点の位置psは、修正前の位置(例えば、図6で評価値が「0.14」となる位置psや、評価値が「1.5」となる位置ps’など)にかかわらず、本実施形態の形状修正処理によって、理想位置に近付く方向に移動されることを意味する。   FIG. 8A is a distribution diagram of evaluation values calculated by the evaluation value calculation method of the present embodiment. In the XYZ coordinate system of FIG. 8A, the meanings of the coordinate axes of the X axis, the Y axis, and the Z axis, and the point group of evaluation values corresponding to the position ps constitute a distribution. ). Unlike the conventional method, in the evaluation value distribution 801 calculated by the evaluation value calculation method of the present embodiment, all the downward inclinations are directed toward the origin. As shown in FIG. 8A, any arrow 802 indicates a downward slope toward the origin in the distribution 801. That is, the position ps of the correction target vertex is the position before correction (for example, the position ps where the evaluation value is “0.14” in FIG. 6 or the position ps ′ where the evaluation value is “1.5”). Regardless, this means that the shape is moved in a direction approaching the ideal position by the shape correction processing of the present embodiment.

図8(b)は、図8(a)における分布801の傾斜を、Z軸を中心としたXY平面上で表した勾配図である。図8(b)の勾配図に含まれる細線矢印は、分布801における傾斜の方向と、傾斜の緩急とを表している。座標点803は、座標点704と同じ位置座標(0,1,1)となる修正対象頂点の位置psを表している。従来の形状修正処理と同様に、座標点803は、細線矢印で表される傾斜に従って、原点方向に近付くように移動される。座標点804は、座標点705と同じ位置座標(2,2,2)となる修正対象頂点の位置psを表している。本実施形態の形状修正処理では、座標点804についても、細線矢印で表される傾斜に従って、原点方向に近付くように移動される。以上説明した通り、本実施形態の形状修正手法によれば、修正対象頂点の位置psは、修正前の位置にかかわらず、理想位置に近付く方向に移動される。この結果、本実施形態の画像処理装置100は、エッジ部における微細形状の修正を適切に実行することができ、出力形状データが表す形状にノイズが発生してしまうことを抑制することができる。   FIG. 8B is a gradient diagram showing the slope of the distribution 801 in FIG. 8A on the XY plane with the Z axis as the center. The thin line arrows included in the gradient diagram of FIG. 8B represent the direction of inclination in the distribution 801 and the steepness of the inclination. A coordinate point 803 represents the position ps of the correction target vertex having the same position coordinate (0, 1, 1) as the coordinate point 704. Similar to the conventional shape correction processing, the coordinate point 803 is moved so as to approach the origin direction according to the inclination represented by the thin line arrow. A coordinate point 804 represents the position ps of the correction target vertex having the same position coordinate (2, 2, 2) as the coordinate point 705. In the shape correction process of the present embodiment, the coordinate point 804 is also moved so as to approach the origin direction according to the inclination represented by the thin line arrow. As described above, according to the shape correction method of the present embodiment, the position ps of the correction target vertex is moved in the direction approaching the ideal position regardless of the position before the correction. As a result, the image processing apparatus 100 of the present embodiment can appropriately execute the fine shape correction in the edge portion, and can suppress the occurrence of noise in the shape represented by the output shape data.

本実施形態の形状修正手法を適用した場合の効果について、図9および図10を参照して説明する。図9は、本実施形態において、入力形状データが表す形状の断面図の一例である。図9に示される形状は、同一の被写体を異なる視点から見た複数の画像(多視点画像)を、多視点ステレオ法などにより再現した形状である。図9の例は、被写体から再現された「人の顔」の形状の断面図を示している。また、上記「人の顔」の形状を構成する頂点、辺、面に対応する法線情報が、図9のグラフ内において矢印で表されている。   The effect when the shape correction method of this embodiment is applied will be described with reference to FIGS. FIG. 9 is an example of a sectional view of the shape represented by the input shape data in the present embodiment. The shape shown in FIG. 9 is a shape in which a plurality of images (multi-view images) obtained by viewing the same subject from different viewpoints are reproduced by a multi-view stereo method or the like. The example of FIG. 9 shows a cross-sectional view of the shape of a “human face” reproduced from a subject. Further, normal line information corresponding to vertices, sides, and faces constituting the shape of the “human face” is represented by arrows in the graph of FIG. 9.

図10は、入力形状データから取得した法線情報を用いて、微細形状を修正した結果を示す図であり、図10(a)は従来の形状修正手法を適用した場合の修正結果を、図10(b)は本実施形態の形状修正手法を適用した場合の修正結果をそれぞれ示している。図10(a)において、修正後の形状の断面を示す実線には、急峻な角度変化が生じていることが分かる。このように、微細形状において急峻な角度変化を含む領域は、ノイズとして視認されてしまう。一方、図10(b)では、修正後の形状の断面を示す実線には、急峻な角度変化が生じていない。つまり、微細形状においてノイズの発生を抑制していることが分かる。   FIG. 10 is a diagram illustrating a result of correcting a fine shape using normal line information acquired from input shape data. FIG. 10A illustrates a correction result when a conventional shape correcting method is applied. 10 (b) shows the correction results when the shape correction method of this embodiment is applied. In FIG. 10A, it can be seen that a steep angle change occurs in the solid line showing the cross section of the corrected shape. Thus, a region including a steep angle change in a fine shape is visually recognized as noise. On the other hand, in FIG. 10B, a steep angle change does not occur in the solid line indicating the cross section of the corrected shape. That is, it can be seen that the generation of noise is suppressed in the fine shape.

[実施形態2]
実施形態1の形状修正手法では、回転ベクトルn’tと、修正頂点tから修正対象頂点sの移動先の候補位置に向かうベクトルdtとの内積が算出され、算出された内積が評価値に用いられていた。しかしながら、CPU101が所定のプログラムに基づき形状修正処理を実行する場合、内積以外の評価値も用いられることが多い。本実施形態では、位置情報および法線情報から算出した内積と、内積以外の他の評価値とを用いて形状の修正を行う手法について説明する。なお、本実施形態の説明において、実施形態1と同一の構成については、同一符号を付し、重複する内容については説明を省略する。
[Embodiment 2]
In the shape correction method according to the first embodiment, the inner product of the rotation vector n′t and the vector dt from the correction vertex t toward the candidate position of the correction target vertex s is calculated, and the calculated inner product is used as the evaluation value. It was done. However, when the CPU 101 executes shape correction processing based on a predetermined program, evaluation values other than the inner product are often used. In the present embodiment, a method for correcting a shape using an inner product calculated from position information and normal information and an evaluation value other than the inner product will be described. In the description of the present embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and description of overlapping contents is omitted.

S305において、評価値算出部205は、回転ベクトルn’tと、周辺頂点tの位置ptと、修正対象頂点sの位置psとに基づき、修正対象頂点sの修正後の候補位置ps+σ,ps,ps−σそれぞれについて評価値χ1,χ2,χ3を算出する。修正対象頂点sの修正後の候補位置pに対応する評価値χは、χ(p)(式7)で表わされる。   In S305, the evaluation value calculation unit 205 determines the candidate position ps + σ, ps, corrected for the correction target vertex s based on the rotation vector n′t, the position pt of the peripheral vertex t, and the position ps of the correction target vertex s. Evaluation values χ1, χ2, and χ3 are calculated for each of ps−σ. The evaluation value χ corresponding to the corrected candidate position p of the correction target vertex s is expressed by χ (p) (Equation 7).

次いで、評価値算出部205は、修正対象頂点と、修正対象頂点近傍の頂点群との位置関係に基づき算出可能な、形状データが表す形状の平滑度について評価値φ(p)を取得する。なお、画像処理の技術分野において、着目頂点と着目頂点近傍の頂点群との位置関係に基づいて平滑度を算出する手法は周知であるので、説明を省略する。   Next, the evaluation value calculation unit 205 acquires an evaluation value φ (p) for the smoothness of the shape represented by the shape data, which can be calculated based on the positional relationship between the correction target vertex and the vertex group near the correction target vertex. In the technical field of image processing, a technique for calculating the smoothness based on the positional relationship between the target vertex and a group of vertices near the target vertex is well known, and thus the description thereof is omitted.

修正対象頂点sの修正後の候補位置pに対応する総合評価値ψ(p)は、次式に従い算出することができる。   The comprehensive evaluation value ψ (p) corresponding to the candidate position p after the correction of the correction target vertex s can be calculated according to the following equation.

ここで、ω1とω2とは重み係数をそれぞれ表す。このように、本実施形態の評価値算出部205は、回転ベクトルn’tとベクトルdtとの内積と、形状の平滑度についての評価値とのそれぞれに重み係数をかけた値の組み合わせによって得られる総合評価値を算出する。   Here, ω1 and ω2 represent weighting factors, respectively. As described above, the evaluation value calculation unit 205 according to this embodiment is obtained by a combination of values obtained by multiplying the inner product of the rotation vector n′t and the vector dt and the evaluation value for the smoothness of the shape by the weight coefficient. A comprehensive evaluation value is calculated.

以上説明した通り、本実施形態によれば、実施形態1による効果に加えて、形状の平滑度も考慮して入力形状データが表す形状を修正することができる。   As described above, according to the present embodiment, in addition to the effects of the first embodiment, the shape represented by the input shape data can be corrected in consideration of the smoothness of the shape.

[変形例]
上述の実施形態では、周辺頂点tにおける法線ベクトルntを回転させて得られる回転ベクトルn’tを用いて内積(評価値)を算出する評価値算出手法について説明した。変形例では、3次元形状データが表す形状のうち、必要な領域に対してのみ、法線ベクトルntを回転させる処理を実行してもよい。例えば、修正対象頂点sの位置psと、周辺頂点tの位置ptとが、エッジ部を構成する位置関係にある場合にのみ、法線回転部204が法線ベクトルntを回転させる処理を実行してもよい。あるいはまた、理想位置を基準として、修正対象頂点sが、周辺頂点tの法線ベクトルnt方向を越えて位置している場合にのみ、法線回転部204が法線ベクトルntを回転させる処理を実行してもよい。このように、必要な領域に対してのみ法線ベクトルntを回転させ、非エッジ部などの領域に対しては法線ベクトルntを回転させることなく評価値算出処理を行うことにより、画像処理装置100の処理速度の向上や処理負担の軽減を図ることができる。
[Modification]
In the above-described embodiment, the evaluation value calculation method for calculating the inner product (evaluation value) using the rotation vector n′t obtained by rotating the normal vector nt at the peripheral vertex t has been described. In the modification, the normal vector nt may be rotated only for a necessary region in the shape represented by the three-dimensional shape data. For example, the normal line rotation unit 204 executes the process of rotating the normal vector nt only when the position ps of the correction target vertex s and the position pt of the peripheral vertex t are in the positional relationship constituting the edge part. May be. Alternatively, the normal rotation unit 204 rotates the normal vector nt only when the correction target vertex s is located beyond the normal vector nt direction of the peripheral vertex t with reference to the ideal position. May be executed. As described above, the normal value vector nt is rotated only for a necessary region, and the evaluation value calculation process is performed for a region such as a non-edge portion without rotating the normal vector nt. 100 processing speed can be improved and the processing load can be reduced.

[その他の実施例]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other Examples]
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

100・・画像処理装置
202・・修正対象頂点選択部
203・・周辺頂点選択部
204・・法線回転部
205・・評価値算出部
207・・移動先決定部
208・・形状修正部
DESCRIPTION OF SYMBOLS 100 ... Image processing apparatus 202 ... Correction target vertex selection part 203 ... Peripheral vertex selection part 204 ... Normal rotation part 205 ... Evaluation value calculation part 207 ... Destination determination part 208 ... Shape correction part

Claims (11)

法線情報を含む3次元形状データが表す形状における各頂点において修正対象となる修正対象頂点と当該修正対象頂点に隣接する周辺頂点とを選択する選択手段と、
前記周辺頂点における法線ベクトルを回転させる回転手段と、
前記周辺頂点から前記修正対象頂点の移動先の候補位置に向かうベクトルと、前記回転させたベクトルとの内積を算出する算出手段と、
前記算出された内積に基づいて前記修正対象頂点の移動先の位置を決定する決定手段と、
前記修正対象頂点を前記決定した移動先の位置に移動する修正手段と、を備える
ことを特徴とする画像処理装置。
Selection means for selecting a correction target vertex to be corrected at each vertex in the shape represented by the three-dimensional shape data including normal line information and a peripheral vertex adjacent to the correction target vertex;
A rotating means for rotating a normal vector at the peripheral vertex;
A calculating means for calculating an inner product of a vector from the peripheral vertex toward the candidate position of the correction target vertex and the rotated vector;
Determining means for determining a position of a movement destination of the correction target vertex based on the calculated inner product;
An image processing apparatus comprising: correction means for moving the correction target vertex to the determined movement destination position.
前記回転手段は、前記法線ベクトルと前記周辺頂点から前記修正対象頂点に向かうベクトルとによって定められる平面において、前記法線ベクトルを回転させる
ことを特徴とする請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the rotation unit rotates the normal vector in a plane defined by the normal vector and a vector from the peripheral vertex toward the correction target vertex.
前記回転手段は、前記選択手段が前記修正対象頂点を選択する方向である主走査方向に前記法線ベクトルを回転させる
ことを特徴とする請求項2に記載の画像処理装置。
The image processing apparatus according to claim 2, wherein the rotation unit rotates the normal vector in a main scanning direction that is a direction in which the selection unit selects the correction target vertex.
前記回転手段は、前記周辺頂点の位置を中心に前記法線ベクトルを90度回転させる
ことを特徴とする請求項2または3に記載の画像処理装置。
The image processing apparatus according to claim 2, wherein the rotation unit rotates the normal vector by 90 degrees around the position of the peripheral vertex.
前記修正対象頂点と前記周辺頂点とが所定の位置関係にあるか否かを判定する判定手段をさらに備え、
前記回転手段は、前記修正対象頂点と前記周辺頂点とが前記所定の位置関係にあると判定された場合に、前記周辺頂点における法線ベクトルを回転させる
ことを特徴とする請求項1から4のいずれか1項に記載の画像処理装置。
A determination means for determining whether or not the correction target vertex and the peripheral vertex are in a predetermined positional relationship;
5. The rotation unit according to claim 1, wherein the rotation unit rotates a normal vector at the peripheral vertex when it is determined that the correction target vertex and the peripheral vertex are in the predetermined positional relationship. The image processing apparatus according to any one of the above.
前記算出手段は、前記周辺頂点から前記修正対象頂点の移動先の候補位置に向かうベクトルを正規化する演算を行い、前記正規化されたベクトルを用いて前記内積を算出する
ことを特徴とする請求項1から5のいずれか1項に記載の画像処理装置。
The calculation means performs an operation of normalizing a vector from the peripheral vertex toward a candidate position of a movement destination of the correction target vertex, and calculates the inner product using the normalized vector. Item 6. The image processing apparatus according to any one of Items 1 to 5.
前記算出手段は、複数の前記候補位置に対応する複数の前記内積をそれぞれ算出し、
前記決定手段は、前記算出された複数の前記内積のうち最も小さい値が算出される前記候補位置を前記修正対象頂点の移動先に決定する
ことを特徴とする請求項1から6のいずれか1項に記載の画像処理装置。
The calculation means calculates a plurality of inner products corresponding to a plurality of candidate positions,
7. The determination unit according to claim 1, wherein the determination unit determines the candidate position where the smallest value among the plurality of calculated inner products is calculated as a movement destination of the correction target vertex. The image processing apparatus according to item.
前記算出手段は、前記内積以外の評価値をさらに少なくとも1つ算出し、前記内積と前記評価値とのそれぞれに重み係数をかけた値の組み合わせによって得られる総合評価値を算出し、
前記決定手段は、前記総合評価値に基づいて前記修正対象頂点の移動先を決定する
ことを特徴とする請求項1から7のいずれか1項に記載の画像処理装置。
The calculation means calculates at least one evaluation value other than the inner product, calculates a comprehensive evaluation value obtained by a combination of values obtained by multiplying each of the inner product and the evaluation value by a weighting factor,
The image processing apparatus according to claim 1, wherein the determination unit determines a movement destination of the correction target vertex based on the comprehensive evaluation value.
前記内積以外の評価値は、前記修正対象頂点と前記修正対象頂点近傍の頂点群との位置関係から算出可能な前記3次元形状データが表す形状の平滑度である
ことを特徴とする請求項8に記載の画像処理装置。
The evaluation value other than the inner product is a smoothness of a shape represented by the three-dimensional shape data that can be calculated from a positional relationship between the correction target vertex and a vertex group near the correction target vertex. An image processing apparatus according to 1.
法線情報を含む3次元形状データが表す形状における各頂点において修正対象となる修正対象頂点と当該修正対象頂点に隣接する周辺頂点とを選択する選択ステップと、
前記周辺頂点における法線ベクトルを回転させる回転ステップと、
前記周辺頂点から前記修正対象頂点の移動先の候補位置に向かうベクトルと、前記回転させた法線ベクトルとの内積を算出する算出ステップと、
前記算出された内積に基づいて前記修正対象頂点の移動先の位置を決定する決定ステップと、
前記修正対象頂点を前記決定した移動先の位置に移動する修正ステップと、を備える
ことを特徴とする画像処理方法。
A selection step of selecting a correction target vertex to be corrected at each vertex in the shape represented by the three-dimensional shape data including normal line information and a peripheral vertex adjacent to the correction target vertex;
A rotation step of rotating a normal vector at the peripheral vertex;
A calculation step of calculating an inner product of a vector from the peripheral vertex toward a candidate position of the movement destination of the correction target vertex and the rotated normal vector;
A determination step of determining a position of a movement destination of the correction target vertex based on the calculated inner product;
And a correction step of moving the correction target vertex to the determined position of the destination.
コンピュータを、請求項1から請求項9のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。   The program for functioning a computer as each means of the image processing apparatus of any one of Claims 1-9.
JP2017008756A 2017-01-20 2017-01-20 Image processing system, image processing method and program Pending JP2018116645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017008756A JP2018116645A (en) 2017-01-20 2017-01-20 Image processing system, image processing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017008756A JP2018116645A (en) 2017-01-20 2017-01-20 Image processing system, image processing method and program

Publications (1)

Publication Number Publication Date
JP2018116645A true JP2018116645A (en) 2018-07-26

Family

ID=62985569

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017008756A Pending JP2018116645A (en) 2017-01-20 2017-01-20 Image processing system, image processing method and program

Country Status (1)

Country Link
JP (1) JP2018116645A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020077423A (en) * 2013-02-22 2020-05-21 カンター フューチャーズ エクスチェンジ,エル.ピー.Cantor Futures Exchange,L.P. Detection system and method of operation in binary option transaction

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020077423A (en) * 2013-02-22 2020-05-21 カンター フューチャーズ エクスチェンジ,エル.ピー.Cantor Futures Exchange,L.P. Detection system and method of operation in binary option transaction
US11727486B2 (en) 2013-02-22 2023-08-15 Cfph, Llc Systems and methods of detecting manipulations on a binary options exchange

Similar Documents

Publication Publication Date Title
US10388018B2 (en) Image processing apparatus, image processing method, and storage medium
WO2019169635A1 (en) Object recognition
US20110227922A1 (en) Apparatus and method extracting light and texture, and rendering apparatus using light and texture
US20150278589A1 (en) Image Processor with Static Hand Pose Recognition Utilizing Contour Triangulation and Flattening
TW201616451A (en) System and method for selecting point clouds using a free selection tool
US10803615B2 (en) Object recognition processing apparatus, object recognition processing method, and program
CN108573471B (en) Image processing apparatus, image processing method, and recording medium
US20160283792A1 (en) Information processing apparatus, information processing method, and storage medium
US9280830B2 (en) Image processing apparatus and segmentation method
EP3633606A1 (en) Information processing device, information processing method, and program
JP2017182785A (en) System and method for efficiently scoring probes in image with vision system
US20190333221A1 (en) Image processing apparatus, image processing method, and storage medium
CN110546687B (en) Image processing device and two-dimensional image generation program
US11468609B2 (en) Methods and apparatus for generating point cloud histograms
KR20150077184A (en) Apparatus and Method for determining similarity between lesions in medical image
JP2018116645A (en) Image processing system, image processing method and program
KR20240013085A (en) Methods and apparatus for processing image data for machine vision
CN110692065A (en) Surface-based object recognition
JP7298687B2 (en) Object recognition device and object recognition method
JP6278757B2 (en) Feature value generation device, feature value generation method, and program
JP2017167671A (en) Information processing device, information processing method, and program
US20240054676A1 (en) Methods and apparatus for determining orientations of an object in three-dimensional data
JP2007156954A (en) Reliability table creation method, optical flow estimation method, reliability table creation device, optical flow estimation device, and program
JP6453618B2 (en) Calculation apparatus, method and program
EP4310784A1 (en) Image processing apparatus, image processing method, and program