JP2018088146A - Drawing program, drawing method and drawing apparatus - Google Patents

Drawing program, drawing method and drawing apparatus Download PDF

Info

Publication number
JP2018088146A
JP2018088146A JP2016231374A JP2016231374A JP2018088146A JP 2018088146 A JP2018088146 A JP 2018088146A JP 2016231374 A JP2016231374 A JP 2016231374A JP 2016231374 A JP2016231374 A JP 2016231374A JP 2018088146 A JP2018088146 A JP 2018088146A
Authority
JP
Japan
Prior art keywords
point
color
screen
viewpoint
distance
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
JP2016231374A
Other languages
Japanese (ja)
Inventor
和弥 鶴田
Kazuya Tsuruta
和弥 鶴田
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 JP2016231374A priority Critical patent/JP2018088146A/en
Publication of JP2018088146A publication Critical patent/JP2018088146A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To do drawing based on a point group according to a distance from a look-from point.SOLUTION: A drawing apparatus comprises: a first setting unit for setting a fourth point between a first point and a second point and setting a fifth point between the first point and a third point among a point group including the first point, the second point, and the third point displayed on a screen when the point group specified in coordinates of a three-dimensional space is displayed on the screen on the basis of a specific look-from point; a second setting unit for setting a distance from the specific look-from point of each of the first point, the second point and the third point and setting respective colors of the fourth point and the fifth point in accordance with each color; and a drawing unit for drawing, on the screen, an area including the first point, the fourth point and the fifth point on the basis of the color of the first point, the color of the fourth point and the color of the fifth point.SELECTED DRAWING: Figure 1

Description

本発明は、描画プログラム、描画方法および描画装置に関する。   The present invention relates to a drawing program, a drawing method, and a drawing apparatus.

点群データに基づいて、画面上に画像を描画する技術が用いられている。関連する技術として、三角形群を用いた3次元画像表示に関する技術が提案されている(例えば、特許文献1を参照)。   A technique for drawing an image on a screen based on point cloud data is used. As a related technique, a technique related to three-dimensional image display using a triangle group has been proposed (see, for example, Patent Document 1).

また、画像平面に投影されるための複数の三角形の画像基本要素からの二次元のピクセル画像をレンダリングする画像処理方法が提案されている(例えば、特許文献2を参照)。   An image processing method for rendering a two-dimensional pixel image from a plurality of triangular image basic elements to be projected onto an image plane has been proposed (see, for example, Patent Document 2).

特開2015−50551号公報Japanese Patent Laying-Open No. 2015-50551 特開2012−14714号公報JP 2012-14714 A

点群データに基づいて、三角形群で作成された三角形の内側の画素の色(RGBの階調値)を線形補間により求める場合、視点から点群データの各点までの距離が考慮されていないため、画面上に描画される画像で遠近を表すことは難しい。   When the color (RGB gradation value) of the pixel inside the triangle created by the triangle group is obtained by linear interpolation based on the point cloud data, the distance from the viewpoint to each point of the point cloud data is not considered. For this reason, it is difficult to represent perspective in an image drawn on the screen.

1つの側面として、本発明は、視点からの距離に応じて点群に基づく描画を行うことを目的とする。   As one aspect, an object of the present invention is to perform drawing based on a point cloud according to a distance from a viewpoint.

1つの態様では、描画プログラムは、3次元空間の座標において特定される点群を、特定の視点に基づいて画面上に表示させた場合に前記画面上に表示される第1の点と第2の点と第3の点を含む点群のうち、前記第1の点と前記第2の点との間に第4の点を設定し、前記第1の点と前記第3の点との間に第5の点を設定し、前記第1の点と前記第2の点と前記第3の点とのそれぞれの前記特定の視点からの距離と、それぞれの色とに応じて、前記第4の点と前記第5の点のそれぞれの色を設定し、前記第1の点の色と前記第4の点の色と前記第5の点の色とに基づいて、前記第1の点と前記第4の点と前記第5の点とを含む領域を、前記画面上に描画する、処理をコンピュータに実行させる。   In one aspect, the drawing program displays the first point and the second point displayed on the screen when the point group specified in the coordinates of the three-dimensional space is displayed on the screen based on the specific viewpoint. A fourth point is set between the first point and the second point in the point group including the point and the third point, and the first point and the third point A fifth point is set between them, and the first point, the second point, and the third point are distanced from the specific viewpoint, and the first point, the second point, and the third point. 4 and the fifth point are set, and the first point is based on the color of the first point, the color of the fourth point, and the color of the fifth point. And the computer executes a process of drawing an area including the fourth point and the fifth point on the screen.

1つの側面によれば、視点からの距離に応じて点群に基づく描画を行うことができる。   According to one aspect, it is possible to perform drawing based on a point group according to the distance from the viewpoint.

描画装置の一例を示す図である。It is a figure which shows an example of a drawing apparatus. 点群データから2次元座標で表される各点を特定する一例を示す図である。It is a figure which shows an example which specifies each point represented by a two-dimensional coordinate from point cloud data. 三角形群の一例を示す図である。It is a figure which shows an example of a triangle group. 実施形態における設定点の設定の一例を示す図である。It is a figure which shows an example of the setting of the setting point in embodiment. 実施形態における位置に応じた色を示すグラフの一例を示す図である。It is a figure which shows an example of the graph which shows the color according to the position in embodiment. 描画された画像データの一例を示す図(その1)である。FIG. 6 is a diagram (part 1) illustrating an example of drawn image data. 描画された画像データの一例を示す図(その2)である。FIG. 6 is a second diagram illustrating an example of drawn image data. 実施形態の処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the process of embodiment. 変形例における設定点の設定の一例を示す図である。It is a figure which shows an example of the setting of the setting point in a modification. 変形例における位置に応じた色を示すグラフの一例を示す図である。It is a figure which shows an example of the graph which shows the color according to the position in a modification. 実施形態の処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the process of embodiment. 描画装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of a drawing apparatus.

<実施形態の描画装置の一例>
以下、図面を参照して、実施形態について説明する。図1は、実施形態の描画装置1の一例を示す。描画装置1は、表示装置2および入力装置3と接続される。描画装置1は、例えば、所定の画像処理を行い、該画像処理が行われた画像を表示装置2の画面に表示するコンピュータであってもよい。
<Example of Drawing Device of Embodiment>
Hereinafter, embodiments will be described with reference to the drawings. FIG. 1 shows an example of a drawing apparatus 1 according to the embodiment. The drawing device 1 is connected to the display device 2 and the input device 3. The drawing device 1 may be, for example, a computer that performs predetermined image processing and displays the image subjected to the image processing on the screen of the display device 2.

表示装置2は、例えば、ディスプレイである。描画装置1が描画した画像(画像データ)は、表示装置2に表示される。入力装置3は、例えば、マウスやキーボード等であってもよい。   The display device 2 is a display, for example. An image (image data) drawn by the drawing device 1 is displayed on the display device 2. The input device 3 may be, for example, a mouse or a keyboard.

描画装置1は、制御部11と記憶部12と座標特定部13と三角形群生成部14と第1設定部15と第2設定部16と描画部17とを含む。制御部11は、各種の制御を行う。例えば、表示装置2に画像データを表示させる制御や、入力装置3からの操作を受け付ける制御を行う。   The drawing apparatus 1 includes a control unit 11, a storage unit 12, a coordinate specifying unit 13, a triangle group generation unit 14, a first setting unit 15, a second setting unit 16, and a drawing unit 17. The control unit 11 performs various controls. For example, control for displaying image data on the display device 2 and control for receiving an operation from the input device 3 are performed.

記憶部12は、各種のデータを記憶する。実施形態では、記憶部12は、点群データを記憶する。点群データは、3次元空間の座標において特定される点が集まったデータであり、該点群データを用いて、所定の画像が描画される。   The storage unit 12 stores various data. In the embodiment, the storage unit 12 stores point cloud data. The point cloud data is data in which points specified in the coordinates of the three-dimensional space are collected, and a predetermined image is drawn using the point cloud data.

描画装置1は、例えば、所定のセンサ(3次元センサ等)が計測したセンサデータに基づく点群データを取得し、取得された点群データを記憶部12に記憶してもよい。描画装置1は、例えば、インターネットを介して、点群データを取得し、取得された点群データを記憶部12に記憶してもよい。また、記憶部12に、予め点群データが記憶されていてもよい。   For example, the drawing apparatus 1 may acquire point cloud data based on sensor data measured by a predetermined sensor (such as a three-dimensional sensor), and store the acquired point cloud data in the storage unit 12. For example, the drawing apparatus 1 may acquire point cloud data via the Internet, and store the acquired point cloud data in the storage unit 12. Further, the point cloud data may be stored in the storage unit 12 in advance.

座標特定部13は、3次元空間の座標で表される点群データに含まれる各点を、表示装置2の画面上に投射する。従って、座標特定部13は、点群データに含まれる各点を表示装置2の画面上に表示した場合における各点の2次元座標が特定される。   The coordinate specifying unit 13 projects each point included in the point cloud data represented by the coordinates of the three-dimensional space on the screen of the display device 2. Therefore, the coordinate specifying unit 13 specifies the two-dimensional coordinates of each point when each point included in the point cloud data is displayed on the screen of the display device 2.

三角形群生成部14は、2次元座標で表される各点について、相互に隣接する3点を結んで三角形を生成する。実施形態では、点群データは、4つ以上の点を含んでいるものとする。従って、上記の三角形が複数生成される。以下、複数の三角形を三角形群とする。該三角形群は、ドロネー図と称されることもある。   The triangle group generation unit 14 generates a triangle by connecting three points adjacent to each other represented by two-dimensional coordinates. In the embodiment, it is assumed that the point cloud data includes four or more points. Therefore, a plurality of the above triangles are generated. Hereinafter, a plurality of triangles are defined as a triangle group. The triangle group is sometimes referred to as a Delaunay diagram.

第1設定部15は、生成された三角形群の各三角形のそれぞれに対して、3辺に所定の点(以下、設定点と称する)を設定する。第2設定部16は、第1設定部15が設定した設定点に色を設定する。実施形態では、第2設定部16は、三角形の3つの頂点のうち、2つの頂点を結ぶ辺に設定された設定点に対して、2つの頂点の色の中間色を設定する。   The first setting unit 15 sets predetermined points (hereinafter referred to as setting points) on three sides for each triangle of the generated triangle group. The second setting unit 16 sets a color at the set point set by the first setting unit 15. In the embodiment, the second setting unit 16 sets an intermediate color between the colors of the two vertices with respect to the set point set on the side connecting the two vertices among the three vertices of the triangle.

描画部17は、各三角形のそれぞれについて、3つの設定点を結んだ直線により分割される4つの三角形(以下、分割三角形と称する)のそれぞれについて、色の線形補間を行う。描画部17は、分割三角形の頂点の色に基づいて、色の線形補間を行い、点群データに基づく2次元の画像を描画する。なお、描画部17は、線形補間処理ではなく、新手からの距離に応じた任意の補間処理を行ってもよい。   The drawing unit 17 performs color linear interpolation on each of the four triangles (hereinafter referred to as divided triangles) divided by the straight line connecting the three set points. The drawing unit 17 performs linear interpolation of colors based on the colors of the vertices of the divided triangles, and draws a two-dimensional image based on the point cloud data. Note that the drawing unit 17 may perform arbitrary interpolation processing according to the distance from the new hand, instead of linear interpolation processing.

<三角形群の生成の一例>
図2は、3次元空間の座標で表される点群データから、2次元座標で表される各点を特定する一例を示す。図2における3次元空間21は、視点22を基準とした所定の3次元空間であることを示す。
<Example of triangle group generation>
FIG. 2 shows an example of specifying each point represented by two-dimensional coordinates from point group data represented by coordinates in a three-dimensional space. A three-dimensional space 21 in FIG. 2 indicates a predetermined three-dimensional space based on the viewpoint 22.

視点22は、仮想的な視点である。例えば、視点22がカメラである場合、3次元空間21は、該カメラの位置や向き、画角等に応じて定められる。3次元空間21には、点群が含まれる。   The viewpoint 22 is a virtual viewpoint. For example, when the viewpoint 22 is a camera, the three-dimensional space 21 is determined according to the position, orientation, angle of view, and the like of the camera. The three-dimensional space 21 includes a point group.

座標特定部13は、3次元座標で表される点群に含まれる各点のそれぞれについて、画面23上における2次元座標を特定する。これにより、3次元座標で表される点群データに含まれる各点が、画面23に投射される。画面23は、表示装置2の画面であるものとする。該画面23の形状は、矩形である。   The coordinate specifying unit 13 specifies the two-dimensional coordinates on the screen 23 for each point included in the point group represented by the three-dimensional coordinates. Thereby, each point included in the point cloud data represented by the three-dimensional coordinates is projected on the screen 23. The screen 23 is a screen of the display device 2. The shape of the screen 23 is a rectangle.

図3は、三角形群生成部14が生成する三角形群の一例を示す。図3に示されるように、三角形群生成部14は、相互に隣接する3つの点Pを結び、複数の三角形を生成する。点Pは、2次元座標で表される。   FIG. 3 shows an example of a triangle group generated by the triangle group generation unit 14. As illustrated in FIG. 3, the triangle group generation unit 14 connects three points P adjacent to each other to generate a plurality of triangles. The point P is represented by two-dimensional coordinates.

三角形群生成部14は、複数の点Pのうち、最も外側に位置する複数の点Pを結ぶことにより形成される領域(最外周領域)が、画面23の一部の領域を含まない場合、画面23の頂点に新たな点を設定する。図3の例の場合、点P1が新たな点である。該点P1は、三角形群生成部14が生成した点であるため、点群データに基づく点ではない。該点P1は、第6の点の一例である。   The triangle group generation unit 14, when a region (outermost peripheral region) formed by connecting a plurality of points P located on the outermost side among the plurality of points P does not include a partial region of the screen 23, A new point is set at the vertex of the screen 23. In the example of FIG. 3, the point P1 is a new point. Since the point P1 is a point generated by the triangle group generation unit 14, it is not a point based on the point group data. The point P1 is an example of a sixth point.

点P1を設定しないと、三角形群の最外周領域が、画面23の領域のうち一部を含まなくなる。この場合、点群データに基づく画像の一部が、表示装置2の画面23に表示されなくなる。   If the point P1 is not set, the outermost peripheral area of the triangle group does not include a part of the area of the screen 23. In this case, a part of the image based on the point cloud data is not displayed on the screen 23 of the display device 2.

点P1が設定されることにより、三角形群生成部14は、三角形群の最外周領域が、画面23の領域のうち一部を含まない場合、最外周領域が画面23の全ての領域を含むように、画面23の頂点に点P1を設定する。   By setting the point P1, the triangle group generation unit 14 causes the outermost peripheral area to include the entire area of the screen 23 when the outermost peripheral area of the triangle group does not include a part of the area of the screen 23. Then, a point P1 is set at the vertex of the screen 23.

点P1が設定されると新たな最外周領域が形成される。この場合、点P1を含む新たな最外周領域は、画面23の全ての領域を含む。従って、点群データに基づく画像の一部が、表示装置2の画面23に表示されなくなることが回避される。   When the point P1 is set, a new outermost peripheral region is formed. In this case, the new outermost peripheral area including the point P <b> 1 includes all areas of the screen 23. Therefore, it is avoided that a part of the image based on the point cloud data is not displayed on the screen 23 of the display device 2.

点P1は、画面23の頂点以外の位置に設定されてもよい。例えば、画面23の境界または該境界の外側の領域の何れかの位置に点P1が設定されてもよい。かかる位置に点P1が設定されると、点P1を含む新たな最外周領域は、画面23の全ての領域を含む。点P1が画面23の頂点に設定される場合、点P1の位置の特定が容易になる。   The point P1 may be set at a position other than the vertex of the screen 23. For example, the point P1 may be set at any position of the boundary of the screen 23 or the region outside the boundary. When the point P1 is set at such a position, the new outermost peripheral area including the point P1 includes the entire area of the screen 23. When the point P1 is set at the vertex of the screen 23, the position of the point P1 can be easily specified.

三角形群生成部14は、上述の点P1に、任意の色を設定する。例えば、三角形群生成部14は、点P1に画面23の背景色を設定してもよい。また、三角形群の最外周領域が画面23の領域のうち複数の部分を含まない場合、三角形群生成部14は、複数の点P1を設定してもよい。   The triangle group generation unit 14 sets an arbitrary color at the above-described point P1. For example, the triangle group generation unit 14 may set the background color of the screen 23 to the point P1. When the outermost peripheral area of the triangle group does not include a plurality of portions of the area of the screen 23, the triangle group generation unit 14 may set a plurality of points P1.

<補間処理の一例>
次に、補間処理の一例について説明する。図4(A)および(B)に示される三角形Tは、三角形群生成部14が生成した三角形群に含まれる複数の三角形のうち1つの三角形を示す。三角形Tは、任意の三角形であってよい。
<Example of interpolation processing>
Next, an example of interpolation processing will be described. A triangle T shown in FIGS. 4A and 4B represents one triangle among a plurality of triangles included in the triangle group generated by the triangle group generation unit 14. The triangle T may be any triangle.

三角形Tの頂点を点A、点Bおよび点Cとする。図4の例において、点Aは、第1の点の一例である。点Bは、第2の点の一例である。点Cは、第3の点の一例である。点Aが、第2の点または第3の点であってもよい。点Bが、第1の点または第3の点であってもよい。点Cが、第2の点または第3の点であってもよい。   The vertices of the triangle T are point A, point B, and point C. In the example of FIG. 4, the point A is an example of a first point. Point B is an example of a second point. Point C is an example of a third point. The point A may be the second point or the third point. The point B may be the first point or the third point. The point C may be the second point or the third point.

3つの点A、点Bおよび点Cは、3次元空間の座標で表される点群データに含まれる点を、画面23の2次元座標で特定した点であり、画面23に表示される点である。従って、点A、点Bおよび点Cは、点群データの点に対応する。   The three points A, B, and C are points specified by the two-dimensional coordinates on the screen 23 that are included in the point cloud data represented by the coordinates in the three-dimensional space, and are displayed on the screen 23. It is. Therefore, the points A, B, and C correspond to the points of the point group data.

図4(A)の例に示されるように、点Aは、視点22からの距離が「La」である点であるものとする。点Bは、視点22からの距離が「Lb」である点であるものとする。また、「La>Lb」であるものとする。   As shown in the example of FIG. 4A, it is assumed that the point A is a point whose distance from the viewpoint 22 is “La”. Point B is a point whose distance from the viewpoint 22 is “Lb”. Further, it is assumed that “La> Lb”.

従って、視点22を基準とすると、点Aは点Bよりも遠い位置にある。第1設定部15は、点Aと点Bとの間に点Dを設定する。例えば、第1設定部15は、点Aと点Bとを結ぶ辺AB上に点Dを設定する。   Therefore, when the viewpoint 22 is used as a reference, the point A is farther than the point B. The first setting unit 15 sets a point D between the points A and B. For example, the first setting unit 15 sets the point D on the side AB connecting the point A and the point B.

点Dは、点Aと点Bとの間にあれば、辺AB上からずれた位置に設定されてもよい。点Dは、第4の点の一例である。   If the point D is between the points A and B, the point D may be set at a position shifted from the side AB. Point D is an example of a fourth point.

第1設定部15は、視点22から点Aまでの距離Laと該視点22から点Bまでの距離Lbとの比に応じて、点Dを設定する。実施形態では、第1設定部15は、上記の距離Laの逆数「1/La」と、距離Lbの逆数「1/Lb」とで辺ABを内分し、内分された点を点Dとして辺AB上に設定する。   The first setting unit 15 sets the point D according to the ratio of the distance La from the viewpoint 22 to the point A and the distance Lb from the viewpoint 22 to the point B. In the embodiment, the first setting unit 15 internally divides the side AB by the reciprocal number “1 / La” of the distance La and the reciprocal number “1 / Lb” of the distance Lb, and sets the internally divided point as a point D. Is set on the side AB.

点Dは、辺ABを距離の逆数で内分した位置からずれた位置に設定されてもよい。例えば、点Dは、辺ABを距離の逆数で内分した位置から少し、点A寄りまたは点B寄りにずれた位置に設定されてもよい。   The point D may be set at a position shifted from a position obtained by internally dividing the side AB by the reciprocal of the distance. For example, the point D may be set to a position slightly shifted toward the point A or the point B from the position obtained by internally dividing the side AB by the reciprocal of the distance.

上述したように、距離Laと距離Lbとは、「La>Lb」の関係にあるため、辺ABにおいて、点Dは、点Aに近い位置に設定され、点Bから遠い位置に設定される。   As described above, since the distance La and the distance Lb have a relationship of “La> Lb”, the point D is set at a position near the point A and at a position far from the point B on the side AB. .

第1設定部15は、同様に、点Aと点Cとの間に点Eを設定し、点Aと点Bとの間に点Fを設定する。点Eは、第5の点の一例である。点Dが、第5の点であってもよい。点Fが、第5の点であってもよい。点Eまたは点Fが、第4の点であってもよい。点D、点Eおよび点Fは、上述した設定点である。   Similarly, the first setting unit 15 sets a point E between the points A and C and sets a point F between the points A and B. Point E is an example of a fifth point. The point D may be a fifth point. The point F may be a fifth point. The point E or the point F may be a fourth point. Point D, point E, and point F are the set points described above.

以下、点Dを設定点D、点Eを設定点E、点Fを設定点Fと称する。設定点D、EおよびFは、第1設定部15が設定した点であり、点群データの画面23上の表示に対応する点(例えば、点A、点Bおよび点F)とは異なる点である。   Hereinafter, the point D is referred to as a set point D, the point E is referred to as a set point E, and the point F is referred to as a set point F. The set points D, E, and F are points set by the first setting unit 15 and are different from points corresponding to the display of the point cloud data on the screen 23 (for example, point A, point B, and point F). It is.

視点22から点Cまでの距離が「Lc」であり、該距離Lcと距離Laとの関係は、「La>Lc」であるものとする。第1設定部15は、上記の距離Lcの逆数「1/Lc」と、距離Laの逆数「1/La」とで辺ACを内分し、内分された点を点Eとして辺AC上に設定する。   The distance from the viewpoint 22 to the point C is “Lc”, and the relationship between the distance Lc and the distance La is “La> Lc”. The first setting unit 15 internally divides the side AC by the reciprocal number “1 / Lc” of the distance Lc and the reciprocal number “1 / La” of the distance La, and uses the internally divided point as a point E on the side AC. Set to.

上述したように、「La>Lc」であるため、点Eは、点Aに近い位置に設定され、点Cから遠い位置に設定される。   As described above, since “La> Lc”, the point E is set to a position close to the point A and set to a position far from the point C.

また、距離Lbと距離Lcとの間の差が少ないものとする。この場合、第1設定部15は、視点22から点Bまでの距離Lbと該視点22から点Cまでの距離Lcとの比に応じて、点Fを設定するため、該点Fは、辺BC上の中点近傍に設定される。   Further, it is assumed that the difference between the distance Lb and the distance Lc is small. In this case, the first setting unit 15 sets the point F according to the ratio of the distance Lb from the viewpoint 22 to the point B and the distance Lc from the viewpoint 22 to the point C. It is set near the midpoint on BC.

第2設定部16は、3つの設定点D、EおよびFに色を設定する。第2設定部16は、点Aの色と点Bの色との中間色を点Dに設定し、点Aの色と点Cの色との中間色を点Eに設定し、点Bの色と点Cの色との中間色を点Fに設定する。   The second setting unit 16 sets colors at the three set points D, E, and F. The second setting unit 16 sets an intermediate color between the color of point A and the color of point B to point D, sets an intermediate color between the color of point A and the color of point C to point E, An intermediate color with the color of point C is set to point F.

実施形態では、色は、R(赤)とG(緑)とB(青)との3原色のベクトルで表されるものとする。例えば、点Aの色のベクトルが(R、G、B)=(255、0、0)で表される場合、点Aの色は赤色になる。   In the embodiment, the color is expressed by a vector of three primary colors of R (red), G (green), and B (blue). For example, when the color vector of the point A is represented by (R, G, B) = (255, 0, 0), the color of the point A is red.

また、点Bの色のベクトルが(R、G、B)=(0、255、0)で表される場合、点Aの色は緑色になる。   Further, when the color vector of the point B is represented by (R, G, B) = (0, 255, 0), the color of the point A is green.

上述の場合、点Aと点Bとの間に設定された点Dに対して、第2設定部16は、点Aの色のベクトルと点Bの色のベクトルとの平均値の色のベクトル(R、G、B)=(128、128、0)を設定する。これにより、点Dには、赤色と緑色との中間色が設定される。   In the above case, for the point D set between the point A and the point B, the second setting unit 16 calculates the color vector of the average value of the color vector of the point A and the color vector of the point B. Set (R, G, B) = (128, 128, 0). Thereby, an intermediate color between red and green is set at the point D.

中間色のベクトルの値は、2点の色のベクトルの平均値からずれた値であってもよい。また、第2設定部16が設定する設定点の色はRGBの3原色のベクトル値以外の情報により特定されてもよい。   The value of the intermediate color vector may be a value deviated from the average value of the two color vectors. Further, the color of the set point set by the second setting unit 16 may be specified by information other than the vector values of the three primary colors of RGB.

描画部17は、三角形Tの3つの設定点を結んだ直線により、該三角形Tを分割する。これにより、4つの三角形(以下、分割三角形と称する)が生成される。図4(B)の例では、分割三角形T1、T2、T3およびT4が生成される。例えば、分割三角形T1は、点Aと点Dと点Eとを含む領域である。   The drawing unit 17 divides the triangle T by a straight line connecting the three set points of the triangle T. As a result, four triangles (hereinafter referred to as divided triangles) are generated. In the example of FIG. 4B, divided triangles T1, T2, T3, and T4 are generated. For example, the divided triangle T1 is a region including the point A, the point D, and the point E.

描画部17は、分割三角形T1について、点Aの色と点Dの色(中間色)と点Eの色(中間色)とに基づいて、色の線形補間を行う。これにより、分割三角形T1の領域に色情報が設定される。   The drawing unit 17 performs linear interpolation on the divided triangle T1 based on the color of the point A, the color of the point D (intermediate color), and the color of the point E (intermediate color). Thereby, color information is set in the area of the divided triangle T1.

描画部17は、分割三角形T2、T3およびT4についても、同様に、色の線形補間を行う。これにより、分割三角形T2、T3およびT4の各領域についても、色情報が設定される。   The drawing unit 17 similarly performs linear color interpolation for the divided triangles T2, T3, and T4. Thereby, the color information is also set for each of the divided triangles T2, T3, and T4.

例えば、上述したように、点Aは赤色であり、点Bは緑色であるとする。また、点Cは青色(色のベクトル(R、G、B)=(0、0、255))であるとする。この場合、分割三角形T1の領域において、点Aの近傍の領域の色は赤色になる。   For example, as described above, it is assumed that the point A is red and the point B is green. Point C is blue (color vector (R, G, B) = (0, 0, 255)). In this case, in the area of the divided triangle T1, the color of the area near the point A is red.

上述したように、描画部17は、色の線形補間を行う。また、設定点Dの色は、赤色と緑色との中間色に設定されるため、設定点Dの近傍の領域の色は、赤色または緑色から、設定された中間色に徐々に近づく。   As described above, the drawing unit 17 performs linear color interpolation. Further, since the color of the set point D is set to an intermediate color between red and green, the color of the area in the vicinity of the set point D gradually approaches the set intermediate color from red or green.

同様に、設定点Eの色は、赤色と青色との中間色に設定されるため、設定点Eの近傍の領域の色は、赤色または青色から、設定された中間色に徐々に近づく。設定点Fの色は、青色と緑色との中間色に設定されるため、設定点Fの近傍の領域の色は、青色または緑色から、設定された中間色に近づく。   Similarly, since the color of the set point E is set to an intermediate color between red and blue, the color in the area near the set point E gradually approaches the set intermediate color from red or blue. Since the color of the set point F is set to an intermediate color between blue and green, the color of the area near the set point F approaches the set intermediate color from blue or green.

従って、分割三角形T4の境界近傍は、グラデーションになる。描画部17は、設定点Dの色(中間色)と設定点Eの色(中間色)と設定点Fの色(中間色)とに基づいて、色の線形補間を行う。これにより、上述したように、分割三角形T4の領域に色情報が設定される。   Accordingly, the vicinity of the boundary of the divided triangle T4 has gradation. The drawing unit 17 performs linear interpolation of colors based on the color of the set point D (intermediate color), the color of the set point E (intermediate color), and the color of the set point F (intermediate color). Thereby, as described above, color information is set in the area of the divided triangle T4.

分割三角形T4の3つの頂点(設定点D、設定点Eおよび設定点F)の色は、中間色に設定される。従って、分割三角形T4の中心近傍の色は、点A、点Bおよび点Fの色の影響の度合いが少ない。   The colors of the three vertices (set point D, set point E, and set point F) of the divided triangle T4 are set to intermediate colors. Therefore, the color in the vicinity of the center of the divided triangle T4 is less affected by the colors of the points A, B, and F.

上述したように、第1設定部15は、上記の距離Laの逆数「1/La」と、距離Lbの逆数「1/Lb」とで辺ABを内分し、内分された点を設定点Dとして辺AB上に設定する。   As described above, the first setting unit 15 internally divides the side AB by the reciprocal number “1 / La” of the distance La and the reciprocal number “1 / Lb” of the distance Lb, and sets the internally divided points. A point D is set on the side AB.

また、点Aは、視点22からの距離がLaであり、点Bは、視点22からの距離がLb(La>Lb)であるため、視点22を基準とすると、点Bより点Aが遠い位置にある。従って、設定点Dは、辺AB上で、点Aに近く、点Bから遠い位置に設定される。   Further, since the distance from the viewpoint 22 is La and the distance from the viewpoint B is Lb (La> Lb), the point A is farther than the point B when the viewpoint 22 is used as a reference. In position. Accordingly, the set point D is set at a position close to the point A and far from the point B on the side AB.

従って、辺ABに着目すると、点Aから設定点Dまでが、点Aの色の影響が大きい範囲であり、点Bから設定点Dまでが、点Bの色の影響が大きい範囲である。点Aから設定点Dまでの距離は、点Bから設定点Dまでの距離よりも短い。   Therefore, focusing on the side AB, the range from the point A to the set point D is a range where the influence of the color of the point A is large, and the range from the point B to the set point D is a range where the influence of the color of the point B is large. The distance from the point A to the set point D is shorter than the distance from the point B to the set point D.

従って、点Aと点Bとのうち、視点22からの距離が短い方の点Bの色が三角形Tに対して与える影響度は、視点22からの距離が長い方の点Aの色が三角形Tに対して与える影響度よりも、高い。   Therefore, of the points A and B, the influence of the color of the point B having the shorter distance from the viewpoint 22 on the triangle T is that the color of the point A having the longer distance from the viewpoint 22 is the triangle. It is higher than the degree of influence on T.

このため、視点22を基準として、遠い位置にある点Aの色の影響は少なくなり、近い位置にある点Bの色の影響は大きくなる。   For this reason, the influence of the color of the point A located at a far position with respect to the viewpoint 22 is reduced, and the influence of the color of the point B located at a close position is increased.

同様に、設定点Eは、辺ACにおいて、視点22からの距離が短い点Cよりも、視点22からの距離が長い点Aに近い位置に設定される。従って、視点22を基準として、遠い位置にある点Aの色の影響は少なくなり、近い位置にある点Cの色の影響は大きくなる。   Similarly, the set point E is set at a position closer to the point A having a longer distance from the viewpoint 22 than the point C having a shorter distance from the viewpoint 22 in the side AC. Therefore, with the viewpoint 22 as a reference, the influence of the color of the point A at a distant position is reduced, and the influence of the color of the point C at a close position is increased.

また、設定点Fは、辺BCにおいて、中点近傍に設定される。従って、視点22を基準として、点Bの色の影響と点Cの色の影響とは、同程度である。   Further, the set point F is set near the middle point on the side BC. Therefore, with the viewpoint 22 as a reference, the influence of the color of the point B and the influence of the color of the point C are approximately the same.

以上より、図4(B)の例に示される三角形Tにおいて、視点22から遠い点Aの色が該三角形Tに与える影響は少なく、視点22から近い点Bの色および視点22から近い点Cの色が三角形Tに与える影響は大きい。このため、三角形Tの画像は、視点22からの遠近が表された画像になる。   From the above, in the triangle T shown in the example of FIG. 4B, the color of the point A far from the viewpoint 22 has little influence on the triangle T, and the color of the point B close to the viewpoint 22 and the point C close to the viewpoint 22 The influence of the color of on the triangle T is large. For this reason, the image of the triangle T is an image representing the perspective from the viewpoint 22.

図5は、辺ABにおける位置に応じた色を示すグラフの一例である。上述したように、設定点Dは、点Aよりも点Bに近い位置に設定される。従って、設定点Dは、辺AB上の中点(点Aと点Bとの中点)と点Aとの間に設定される。   FIG. 5 is an example of a graph showing colors according to positions on the side AB. As described above, the set point D is set at a position closer to the point B than the point A. Accordingly, the set point D is set between the midpoint on the side AB (the midpoint between the points A and B) and the point A.

図5のグラフの例に示されるように、辺ABにおいて、点Bの色が影響を与える範囲は、点Aの色が影響を与える範囲よりも広い。点Aよりも点Bの方が視点22に近い位置にあるため、辺ABにおいて、点Aの色より点Bの色が与える影響が大きくなることから、視点22からの距離に応じて、色の影響度が画像に反映される。他の辺についても同様である。   As shown in the example of the graph of FIG. 5, the range in which the color of the point B affects the side AB is wider than the range in which the color of the point A affects. Since the point B is closer to the viewpoint 22 than the point A, the influence of the color of the point B is larger than the color of the point A on the side AB. Therefore, the color depends on the distance from the viewpoint 22. The influence degree of is reflected in the image. The same applies to the other sides.

描画部17は、三角形群に含まれる全ての三角形Tに対して、上述した処理を行い、画像を描画する。各三角形Tについて、視点22からの距離に応じて、色の影響度が画像に反映されるため、描画部17が描画する画像は、視点22からの遠近が反映された画像になる。   The drawing unit 17 performs the above-described processing on all the triangles T included in the triangle group, and draws an image. For each triangle T, the color influence is reflected in the image according to the distance from the viewpoint 22, so the image drawn by the drawing unit 17 is an image reflecting the perspective from the viewpoint 22.

制御部11は、描画部17が描画した画像を表示装置2に表示させる制御を行う。該制御により、表示装置2の画面23には、上記の画像が描画される。   The control unit 11 performs control to display the image drawn by the drawing unit 17 on the display device 2. By the control, the above image is drawn on the screen 23 of the display device 2.

図6(A)は、上述した設定点を設定することなく描画された画像の一例を示す。図6(A)の例において、画像データには、木23Aと立体物23Bとが含まれる。視点22を基準として、木23Aは立体物23Bより近い位置にあるものとする。   FIG. 6A shows an example of an image drawn without setting the set points described above. In the example of FIG. 6A, the image data includes a tree 23A and a three-dimensional object 23B. It is assumed that the tree 23A is located closer to the three-dimensional object 23B with the viewpoint 22 as a reference.

図6(A)の例の画像は、視点22からの距離が考慮されていないため、視点22に近い木23Aと視点22から遠い立体物23Bとに対する、色の影響度の差が小さい。従って、図6(A)の例の画像は、木23Aと立体物23Bとで遠近が表現されにくい。   Since the distance from the viewpoint 22 is not considered in the image in the example of FIG. 6A, the difference in color influence between the tree 23A near the viewpoint 22 and the three-dimensional object 23B far from the viewpoint 22 is small. Therefore, the perspective of the image in the example of FIG. 6A is not easily expressed by the tree 23A and the three-dimensional object 23B.

図6(B)は、上述した設定点を設定し、実施形態の各種の処理を行った場合の画像の一例を示す。図6(B)の例の画像は、視点22からの距離が考慮された画像であるため、視点22に近い木23Aと視点22から遠い立体物23Bとに対する、色の影響度の差が大きい。従って、図6(B)の例の画像は、木23Aと立体物23Bとで遠近が表現された画像になる。   FIG. 6B shows an example of an image when the above-described set points are set and various processes of the embodiment are performed. Since the image in the example of FIG. 6B is an image in which the distance from the viewpoint 22 is taken into consideration, the difference in color influence between the tree 23A close to the viewpoint 22 and the three-dimensional object 23B far from the viewpoint 22 is large. . Accordingly, the image in the example of FIG. 6B is an image in which perspective is expressed by the tree 23A and the three-dimensional object 23B.

図7(A)は、上述した設定点を設定することなく描画された画像の他の例を示す。図7(B)は、上述した設定点を設定し、実施形態の各種の処理を行った場合の画像の他の例を示す。   FIG. 7A shows another example of an image drawn without setting the above-described set points. FIG. 7B shows another example of an image when the above-described set points are set and various processes of the embodiment are performed.

図7(A)の例の画像と比べて、図7(B)の例の画像は、立体物23Cと立体物23Dとで遠近が表現された画像になる。従って、点群データに基づいて、視点22からの距離に応じた描画を行うことができる。   Compared to the image in the example in FIG. 7A, the image in the example in FIG. 7B is an image in which perspective is expressed by the three-dimensional object 23C and the three-dimensional object 23D. Therefore, drawing according to the distance from the viewpoint 22 can be performed based on the point cloud data.

また、実施形態では、描画部17が、上述した三角形群の各三角形Tに対して、色の線形補間処理を行い、点群データに基づく画像を描画する。例えば、点群データに基づく2次元座標上の各点に所定の領域(例えば、円の領域)を仮想的に設定し、設定された領域に着色して、画像データを描画することが考えられる。   In the embodiment, the drawing unit 17 performs linear color interpolation processing on each triangle T of the triangle group described above, and draws an image based on the point cloud data. For example, a predetermined area (for example, a circle area) is virtually set at each point on the two-dimensional coordinates based on the point cloud data, and the set area is colored to draw image data. .

ただし、この場合、点群データにない仮想的な領域の情報(偽の情報)を反映して、画像が描画される。従って、偽の情報が画像に反映されることに起因して、点群データに基づく画像の再現度が低くなる。   However, in this case, an image is drawn reflecting information (false information) of a virtual area not included in the point cloud data. Therefore, due to the fact that false information is reflected in the image, the reproducibility of the image based on the point cloud data is lowered.

実施形態では、上述したように、描画部17が、上述した三角形群の各三角形Tに対して、色の線形補間処理を行い、点群データに基づく画像を描画する。従って、偽の情報が反映されることがないため、点群データに基づく画像の再現度は高くなる。また、実施形態では、偽の情報の処理が行われないため、偽の情報を画像に反映させる場合と比較して、計算量が少なくなる。   In the embodiment, as described above, the drawing unit 17 performs linear color interpolation processing on each triangle T of the above-described triangle group, and draws an image based on the point group data. Therefore, since false information is not reflected, the reproducibility of the image based on the point cloud data is increased. Further, in the embodiment, since processing of false information is not performed, the amount of calculation is reduced as compared with the case where false information is reflected in an image.

なお、上述したように、点P1(例えば、画面23の頂点に設定された点)は、点群データに基づかない点であるが、点P1は、点A、点Bまたは点Cと同様の処理が行われる。例えば、三角形Tが、点Aと点Bと点P1とにより形成される場合、点P1については、該点P1を点Cと仮定した場合に、上述した処理と同様の処理が行われる。   As described above, the point P1 (for example, a point set at the vertex of the screen 23) is a point that is not based on the point group data, but the point P1 is the same as the point A, the point B, or the point C. Processing is performed. For example, when the triangle T is formed by the point A, the point B, and the point P1, when the point P1 is assumed to be the point C, the same process as described above is performed.

従って、点Aと点P1との間に設定点が設定される。該設定点は、第7の点の一例である。また、点Bと点P1との間に設定点が設定される。該設定点は、第8の点の一例である。   Accordingly, a set point is set between the point A and the point P1. The set point is an example of a seventh point. A set point is set between the point B and the point P1. The set point is an example of an eighth point.

<実施形態の処理の流れの一例を示すフローチャート>
図8を参照して、描画装置1は、点群データを入力する(ステップS1)。入力した点群データは、記憶部12に記憶される。描画装置1は、視点22を設定する(ステップS2)。例えば、入力装置3から視点22を設定する操作を、描画装置1の制御部11が受け付けると、該描画装置1は、該操作に基づいて、視点22を設定する。
<Flowchart showing an example of processing flow of embodiment>
With reference to FIG. 8, the drawing apparatus 1 inputs point cloud data (step S1). The input point cloud data is stored in the storage unit 12. The drawing apparatus 1 sets the viewpoint 22 (step S2). For example, when the control unit 11 of the drawing apparatus 1 accepts an operation for setting the viewpoint 22 from the input device 3, the drawing apparatus 1 sets the viewpoint 22 based on the operation.

また、入力装置3から視点22を変更する操作を、描画装置1の制御部11が受け付けると、該描画装置1は、該操作に基づいて、設定された視点22を変更する。これにより、任意の視点22からの点群データに基づく画像の描画が行われる。   When the control unit 11 of the drawing apparatus 1 accepts an operation for changing the viewpoint 22 from the input device 3, the drawing apparatus 1 changes the set viewpoint 22 based on the operation. Thereby, an image is drawn based on point cloud data from an arbitrary viewpoint 22.

座標特定部13は、3次元空間の座標で表される点群データに含まれる各点を、表示装置2の画面23上に投射する(ステップS3)。これにより、点群データに含まれる各点を表示装置2の画面23上に表示した場合における各点の2次元座標が特定される。   The coordinate specifying unit 13 projects each point included in the point cloud data represented by the coordinates of the three-dimensional space onto the screen 23 of the display device 2 (step S3). Thereby, the two-dimensional coordinate of each point when each point included in the point cloud data is displayed on the screen 23 of the display device 2 is specified.

三角形群生成部14は、最外周領域が、画面23の領域の一部を含まない場合、最外周領域が画面23の全ての領域を含むように、画面23の頂点に点P1を設定する(ステップS4)。   When the outermost peripheral area does not include a part of the area of the screen 23, the triangle group generation unit 14 sets the point P1 at the vertex of the screen 23 so that the outermost peripheral area includes all areas of the screen 23 ( Step S4).

これにより、点群データに基づく画像の一部が、表示装置2の画面23に表示されなくなることが回避される。三角形群生成部14は、上述の点P1に、画面23の背景色を設定する。   Thereby, it is avoided that a part of the image based on the point cloud data is not displayed on the screen 23 of the display device 2. The triangle group generation unit 14 sets the background color of the screen 23 at the above-described point P1.

画面の頂点に点P1が設定された場合、三角形群生成部14は、該点P1を含む三角形群を生成する(ステップS5)。第1設定部15は、各三角形に対して、3辺に設定点を設定する処理を行う(ステップS6)。   When the point P1 is set at the vertex of the screen, the triangle group generation unit 14 generates a triangle group including the point P1 (step S5). The first setting unit 15 performs a process of setting set points on three sides for each triangle (step S6).

第1設定部15は、三角形Tの2つの頂点について、視点22からのそれぞれの距離の比に応じて、設定点を設定する。例えば、第1設定部15は、視点22から点Aまでの距離の逆数と視点22から点Bまでの距離の逆数とで辺ABを内分し、内分された点を設定点Dとして辺AB上に設定する。   The first setting unit 15 sets set points for the two vertices of the triangle T according to the ratio of the distances from the viewpoint 22. For example, the first setting unit 15 internally divides the side AB by the reciprocal of the distance from the viewpoint 22 to the point A and the reciprocal of the distance from the viewpoint 22 to the point B, and sets the internally divided point as a set point D as an edge. Set on AB.

第2設定部16は、第1設定部15が設定した設定点の色に中間色を設定する(ステップS7)。例えば、第2設定部16は、上述した設定点Dに、点Aの色と点Bの色との中間色を設定する。第2設定部16は、各三角形について、設定点の色を設定する。   The second setting unit 16 sets an intermediate color as the set point color set by the first setting unit 15 (step S7). For example, the second setting unit 16 sets an intermediate color between the color of the point A and the color of the point B at the set point D described above. The second setting unit 16 sets the color of the set point for each triangle.

描画部17は、三角形Tの3つの設定点を結んだ直線により、該三角形Tを分割する。これにより、4つの分割三角形T1、T2、T3およびT4が生成される(ステップS8)。   The drawing unit 17 divides the triangle T by a straight line connecting the three set points of the triangle T. As a result, four divided triangles T1, T2, T3, and T4 are generated (step S8).

描画部17は、各分割三角形T1、T2、T3およびT4に対して、色の線形補間処理を行う(ステップS9)。これにより、三角形Tに設定される色情報は、視点22を基準とした遠近が反映された色情報になる。   The drawing unit 17 performs color linear interpolation processing on each of the divided triangles T1, T2, T3, and T4 (step S9). As a result, the color information set for the triangle T becomes color information reflecting the perspective with the viewpoint 22 as a reference.

描画部17は、全ての三角形Tに対して、ステップS9の処理を行う。これにより、描画された画像は、視点22からの距離に応じた画像になり、視点22を基準とした遠近を反映した画像になる。   The drawing unit 17 performs the process of step S9 for all the triangles T. As a result, the drawn image becomes an image corresponding to the distance from the viewpoint 22 and becomes an image reflecting the perspective based on the viewpoint 22.

<変形例>
以下、変形例について、説明する。図9(A)は、変形例における、三角形Tの各辺に設定される設定点D、EおよびFの一例を示す。第1設定部15は、点Aと点Bとの中点に設定点Dを設定し、点Aと点Cとの中点に設定点Eを設定し、点Bと点Cとの中点に設定点Fを設定する。
<Modification>
Hereinafter, modifications will be described. FIG. 9A shows an example of set points D, E, and F set on each side of the triangle T in the modification. The first setting unit 15 sets the set point D at the midpoint between the points A and B, sets the setpoint E at the midpoint between the points A and C, and the midpoint between the points B and C. Set the set point F to.

第2設定部16は、設定点Dに対して、視点22から点Aまでの距離Laと該視点22から点Bまでの距離Lbとの比に応じて、設定点Dの色を設定する。変形例では、第2設定部16は、上記の距離Laの逆数「1/La」と、距離Lbの逆数「1/Lb」とで点Aの色および点Bの色を内分する。   The second setting unit 16 sets the color of the set point D for the set point D according to the ratio of the distance La from the viewpoint 22 to the point A and the distance Lb from the viewpoint 22 to the point B. In the modification, the second setting unit 16 internally divides the color of the point A and the color of the point B by the reciprocal “1 / La” of the distance La and the reciprocal “1 / Lb” of the distance Lb.

上述したように、点Aの色は赤色であり、該点Aの色のベクトルは、(R、G、B)=(255、0、0)で表される。また、点Bの色は緑色であり、該点Bの色のベクトルは(R、G、B)=(0、255、0)で表される。   As described above, the color of the point A is red, and the color vector of the point A is represented by (R, G, B) = (255, 0, 0). The color of the point B is green, and the color vector of the point B is represented by (R, G, B) = (0, 255, 0).

上述したように、距離Laと距離Lbとの関係は、「La>Lb」であるとする。この場合、距離Laの逆数「1/La」と、距離Lbの逆数「1/Lb」とで点Aの色および点Bの色を内分すると、点Aの色の比率が低くなり、点Bの色の比率が高くなる。   As described above, it is assumed that the relationship between the distance La and the distance Lb is “La> Lb”. In this case, if the color of the point A and the color of the point B are internally divided by the reciprocal number “1 / La” of the distance La and the reciprocal number “1 / Lb” of the distance Lb, the ratio of the color of the point A becomes low. The ratio of B color is increased.

例えば、距離Laが距離Lbの2倍(La=2×Lb)の場合、設定点Dの色のベクトルは(R、G、B)=(85、170、0)となる。従って、設定点Dの色は、点Aの色の影響度よりも点Bの色の影響度が高くなる。   For example, when the distance La is twice the distance Lb (La = 2 × Lb), the color vector of the set point D is (R, G, B) = (85, 170, 0). Accordingly, the color of the set point D has a higher influence of the color of the point B than the influence of the color of the point A.

図10は、辺ABにおける位置に応じた色を示す変形例のグラフの一例である。設定点Dの位置は、点Aと点Bとの中点である。「内分した色」は、距離Laの逆数「1/La」と、距離Lbの逆数「1/Lb」とで点Aの色および点Bの色を内分した色を示す。   FIG. 10 is an example of a graph of a modified example showing colors according to positions on the side AB. The position of the set point D is the midpoint between the points A and B. The “internally divided color” indicates a color obtained by internally dividing the color of the point A and the color of the point B by the reciprocal number “1 / La” of the distance La and the reciprocal number “1 / Lb” of the distance Lb.

図10の例に示されるように、辺ABにおいて、点Aから設定点D(点Aと点Bとの中点)までの範囲に対する点Aの色の影響度は低い。一方、点Bから設定点Dまでの範囲に対する点Bの色の影響度は高い。   As shown in the example of FIG. 10, the influence of the color of the point A on the range from the point A to the set point D (the midpoint between the points A and B) is low on the side AB. On the other hand, the degree of influence of the color of point B on the range from point B to set point D is high.

視点22を基準とすると、点Aは点Bより近い位置にある。そして、辺ABにおいて、点Bの色の影響度よりも点Aの色の影響度の方が高い。従って、三角形Tの辺ABにおいて、点Aと点Bとの間で遠近に差を与えることができる。   With the viewpoint 22 as a reference, the point A is closer to the point B. In the side AB, the influence degree of the color of the point A is higher than the influence degree of the color of the point B. Therefore, in the side AB of the triangle T, a difference in perspective can be given between the points A and B.

第2設定部16は、設定点Eおよび設定点Fについても、設定点Dと同様、視点22からの距離の逆数で2つの点の色を内分する。そして、第2設定部16は、内分された色を設定点Eおよび設定点Fに設定する。   The second setting unit 16 also internally divides the colors of the two points by the reciprocal of the distance from the viewpoint 22 for the set point E and the set point F as in the set point D. Then, the second setting unit 16 sets the internally divided colors as the set point E and the set point F.

描画部17は、各三角形Tについて、分割三角形T1、T2、T3およびT4に対して、色の線形補間を行う。これにより、描画された画像データは、視点22から各点までの遠近を反映した画像になる。   For each triangle T, the drawing unit 17 performs linear color interpolation on the divided triangles T1, T2, T3, and T4. Thereby, the rendered image data becomes an image reflecting the perspective from the viewpoint 22 to each point.

次に、図11のフローチャートを参照して、変形例の処理の流れについて説明する。図11のフローチャートは、図8のフローチャートと、ステップS6およびステップS7が異なる。ステップS6およびステップS7以外の各ステップは、図8と同様であるため、説明を省略する。   Next, a processing flow of the modification will be described with reference to the flowchart of FIG. The flowchart of FIG. 11 differs from the flowchart of FIG. 8 in steps S6 and S7. Since each step other than step S6 and step S7 is the same as that of FIG. 8, description is abbreviate | omitted.

第1設定部15は、三角形Tの3辺の中点に設定点を設定する(ステップS6−1)。第2設定部16は、視点22からの距離の逆数で2つの色を内分し、内分された色を設定点に設定する(ステップS7−1)。   The first setting unit 15 sets a set point at the midpoint of the three sides of the triangle T (step S6-1). The second setting unit 16 internally divides the two colors by the reciprocal of the distance from the viewpoint 22, and sets the internally divided color as a set point (step S7-1).

以上により、変形例の場合も、視点22からの距離を考慮した処理が行われるため、描画部17が描画する画像に遠近を反映することができる。   As described above, also in the modified example, since the process considering the distance from the viewpoint 22 is performed, the perspective can be reflected in the image drawn by the drawing unit 17.

<描画装置のハードウェア構成の一例>
次に、図12の例を参照して、描画装置1のハードウェア構成の一例を説明する。図12の例に示すように、バス100に対して、プロセッサ111とRandom Access Memory(RAM)112とRead Only Memory(ROM)113とが接続される。また、該バス100に対して、補助記憶装置114と媒体接続部115と入出力インタフェース116とが接続される。
<Example of hardware configuration of drawing apparatus>
Next, an example of the hardware configuration of the drawing apparatus 1 will be described with reference to the example of FIG. As shown in the example of FIG. 12, a processor 111, a random access memory (RAM) 112, and a read only memory (ROM) 113 are connected to the bus 100. An auxiliary storage device 114, a medium connection unit 115, and an input / output interface 116 are connected to the bus 100.

プロセッサ111はRAM112に展開されたプログラムを実行する。実行されるプログラムとしては、実施形態における処理を行うプログラムが適用されてもよい。   The processor 111 executes a program expanded in the RAM 112. As a program to be executed, a program for performing processing in the embodiment may be applied.

ROM113はRAM112に展開されるプログラムを記憶する不揮発性の記憶装置である。補助記憶装置114は、種々の情報を記憶する記憶装置であり、例えばハードディスクドライブや半導体メモリ等が適用されてもよい。媒体接続部115は、可搬型記録媒体120と接続可能に設けられている。   The ROM 113 is a non-volatile storage device that stores programs developed in the RAM 112. The auxiliary storage device 114 is a storage device that stores various information, and for example, a hard disk drive, a semiconductor memory, or the like may be applied. The medium connection unit 115 is provided so as to be connectable to the portable recording medium 120.

可搬型記録媒体120としては、可搬型のメモリ(例えば、半導体メモリ)や光学式ディスク(例えば、Compact Disc(CD)やDigital Versatile Disc(DVD))等が適用されてもよい。この可搬型記録媒体120に実施形態の処理を行うプログラムが記録されていてもよい。   As the portable recording medium 120, a portable memory (for example, a semiconductor memory), an optical disk (for example, a Compact Disc (CD), a Digital Versatile Disc (DVD)), or the like may be applied. A program for performing the processing of the embodiment may be recorded on the portable recording medium 120.

入出力インタフェース116には、例えば、表示装置2や入力装置3等が接続される。描画装置1のうち、制御部11と座標特定部13と三角形群生成部14と第1設定部15と第2設定部16と描画部17とは、与えられたプログラムをプロセッサ111が実行することにより実現されてもよい。記憶部12は、RAM112や補助記憶装置114等により実現されてもよい。   For example, the display device 2 and the input device 3 are connected to the input / output interface 116. In the drawing apparatus 1, the control unit 11, the coordinate specifying unit 13, the triangle group generation unit 14, the first setting unit 15, the second setting unit 16, and the drawing unit 17 execute a given program by the processor 111. May be realized. The storage unit 12 may be realized by the RAM 112, the auxiliary storage device 114, or the like.

RAM112、ROM113、補助記憶装置114および可搬型記録媒体120は、何れもコンピュータ読み取り可能な有形の記憶媒体の一例である。これらの有形な記憶媒体は、信号搬送波のような一時的な媒体ではない。   The RAM 112, the ROM 113, the auxiliary storage device 114, and the portable recording medium 120 are all examples of a tangible storage medium that can be read by a computer. These tangible storage media are not temporary media such as signal carriers.

<その他>
本実施形態および変形例は、以上に述べた実施の形態に限定されるものではなく、本実施形態および変形例の要旨を逸脱しない範囲内で種々の構成または実施形態を取ることができる。
<Others>
The present embodiment and modification examples are not limited to the above-described embodiment, and various configurations or embodiments can be employed without departing from the gist of the present embodiment and modification examples.

1 描画装置
2 表示装置
3 入力装置
11 制御部
12 記憶部
13 座標特定部
14 三角形群生成部
15 第1設定部
16 第2設定部
17 描画部
111 プロセッサ
112 RAM
113 ROM
DESCRIPTION OF SYMBOLS 1 Drawing apparatus 2 Display apparatus 3 Input device 11 Control part 12 Memory | storage part 13 Coordinate specific | specification part 14 Triangle group production | generation part 15 1st setting part 16 2nd setting part 17 Drawing part 111 Processor 112 RAM
113 ROM

Claims (10)

3次元空間の座標において特定される点群を、特定の視点に基づいて画面上に表示させた場合に前記画面上に表示される第1の点と第2の点と第3の点を含む点群のうち、前記第1の点と前記第2の点との間に第4の点を設定し、前記第1の点と前記第3の点との間に第5の点を設定し、
前記第1の点と前記第2の点と前記第3の点とのそれぞれの前記特定の視点からの距離と、それぞれの色とに応じて、前記第4の点と前記第5の点のそれぞれの色を設定し、
前記第1の点の色と前記第4の点の色と前記第5の点の色とに基づいて、前記第1の点と前記第4の点と前記第5の点とを含む領域を、前記画面上に描画する、
処理をコンピュータに実行させることを特徴とする描画プログラム。
When the point group specified in the coordinates of the three-dimensional space is displayed on the screen based on the specific viewpoint, the first point, the second point, and the third point displayed on the screen are included. In the point group, a fourth point is set between the first point and the second point, and a fifth point is set between the first point and the third point. ,
According to the distance from the specific viewpoint of each of the first point, the second point, and the third point, and the respective colors, the fourth point and the fifth point Set each color,
An area including the first point, the fourth point, and the fifth point based on the color of the first point, the color of the fourth point, and the color of the fifth point Drawing on the screen,
A drawing program for causing a computer to execute processing.
前記第4の点、前記第5の点は、前記3次元空間の座標において特定される前記点群の画面上の表示に対応する点群とは異なる点である、
ことを特徴とする請求項1記載の描画プログラム。
The fourth point and the fifth point are points different from the point group corresponding to the display on the screen of the point group specified in the coordinates of the three-dimensional space.
The drawing program according to claim 1.
前記画面上における前記第4の点の位置は、前記3次元空間の座標における前記視点から前記第1の点までの距離と前記視点から前記第2の点までの距離との比に応じて決定される、
ことを特徴とする請求項1記載の描画プログラム。
The position of the fourth point on the screen is determined according to the ratio of the distance from the viewpoint to the first point and the distance from the viewpoint to the second point in the coordinates of the three-dimensional space. To be
The drawing program according to claim 1.
設定される前記第4の点の色は、前記第1の点の色と前記第2の点の色との中間色である、
ことを特徴とすることを特徴とする請求項3記載の描画プログラム。
The color of the fourth point to be set is an intermediate color between the color of the first point and the color of the second point.
The drawing program according to claim 3, characterized in that:
前記第4の点は、前記画面上における前記第1の点と前記第2の点との中点であって、前記第4の点の色は、前記3次元空間の座標における前記視点から前記第1の点までの距離と前記視点から前記第2の点までの距離との比に応じて決定される、
ことを特徴とする請求項1記載の描画プログラム。
The fourth point is a midpoint between the first point and the second point on the screen, and the color of the fourth point is determined from the viewpoint in the coordinates of the three-dimensional space. Determined according to the ratio of the distance to the first point and the distance from the viewpoint to the second point;
The drawing program according to claim 1.
前記領域を描画する処理は、前記第1の点の色と前記第4の点の色と前記第5の点の色とに基づいて、線形補間により前記領域内の色を特定する処理を含む、
ことを特徴とする請求項1記載の描画プログラム。
The process of drawing the area includes a process of specifying a color in the area by linear interpolation based on the color of the first point, the color of the fourth point, and the color of the fifth point. ,
The drawing program according to claim 1.
前記画面の境界または該境界より外側の領域に第6の点を設定し、
前記第1の点と前記第6の点との間に第7の点を設定し、前記第2の点と前記第6の点との間に第8の点を設定し、
前記第1の点と前記第2の点とのそれぞれの前記特定の視点からの距離と、前記第1の点と前記第2の点と前記第6の点のそれぞれの色とに応じて、前記第7の点と前記第8の点のそれぞれの色を設定し、
前記第1の点の色と前記第7の点の色と前記第8の点の色とに基づいて、前記第1の点と前記第7の点と前記第8の点とを含む領域を、前記画面上に描画する、
処理をコンピュータに実行させることを特徴とする請求項1記載の描画プログラム。
Set a sixth point on the boundary of the screen or outside the boundary,
A seventh point is set between the first point and the sixth point; an eighth point is set between the second point and the sixth point;
According to the distance from the specific viewpoint of each of the first point and the second point, and the respective colors of the first point, the second point, and the sixth point, Set the colors of the seventh point and the eighth point,
An area including the first point, the seventh point, and the eighth point based on the color of the first point, the color of the seventh point, and the color of the eighth point Drawing on the screen,
The drawing program according to claim 1, wherein the processing is executed by a computer.
前記第6の点は、前記画面の頂点に設定される、
ことを特徴とする請求項7記載の描画プログラム。
The sixth point is set to the vertex of the screen;
The drawing program according to claim 7.
3次元空間の座標において特定される点群を、特定の視点に基づいて画面上に表示させた場合に前記画面上に表示される第1の点と第2の点と第3の点を含む点群のうち、前記第1の点と前記第2の点との間に第4の点を設定し、前記第1の点と前記第3の点との間に第5の点を設定し、
前記第1の点と前記第2の点と前記第3の点とのそれぞれの前記特定の視点からの距離と、それぞれの色とに応じて、前記第4の点と前記第5の点のそれぞれの色を設定し、
前記第1の点の色と前記第4の点の色と前記第5の点の色とに基づいて、前記第1の点と前記第4の点と前記第5の点とを含む領域を、前記画面上に描画する、
処理をコンピュータが実行することを特徴とする描画方法。
When the point group specified in the coordinates of the three-dimensional space is displayed on the screen based on the specific viewpoint, the first point, the second point, and the third point displayed on the screen are included. In the point group, a fourth point is set between the first point and the second point, and a fifth point is set between the first point and the third point. ,
According to the distance from the specific viewpoint of each of the first point, the second point, and the third point, and the respective colors, the fourth point and the fifth point Set each color,
An area including the first point, the fourth point, and the fifth point based on the color of the first point, the color of the fourth point, and the color of the fifth point Drawing on the screen,
A drawing method, wherein a computer executes a process.
3次元空間の座標において特定される点群を、特定の視点に基づいて画面上に表示させた場合に前記画面上に表示される第1の点と第2の点と第3の点を含む点群のうち、前記第1の点と前記第2の点との間に第4の点を設定し、前記第1の点と前記第3の点との間に第5の点を設定する第1設定部と、
前記第1の点と前記第2の点と前記第3の点とのそれぞれの前記特定の視点からの距離と、それぞれの色とに応じて、前記第4の点と前記第5の点のそれぞれの色を設定する第2設定部と、
前記第1の点の色と前記第4の点の色と前記第5の点の色とに基づいて、前記第1の点と前記第4の点と前記第5の点とを含む領域を、前記画面上に描画する描画部と、
を備えることを特徴とする描画装置。
When the point group specified in the coordinates of the three-dimensional space is displayed on the screen based on the specific viewpoint, the first point, the second point, and the third point displayed on the screen are included. In the point group, a fourth point is set between the first point and the second point, and a fifth point is set between the first point and the third point. A first setting unit;
According to the distance from the specific viewpoint of each of the first point, the second point, and the third point, and the respective colors, the fourth point and the fifth point A second setting unit for setting each color;
An area including the first point, the fourth point, and the fifth point based on the color of the first point, the color of the fourth point, and the color of the fifth point A drawing unit for drawing on the screen;
A drawing apparatus comprising:
JP2016231374A 2016-11-29 2016-11-29 Drawing program, drawing method and drawing apparatus Pending JP2018088146A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016231374A JP2018088146A (en) 2016-11-29 2016-11-29 Drawing program, drawing method and drawing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016231374A JP2018088146A (en) 2016-11-29 2016-11-29 Drawing program, drawing method and drawing apparatus

Publications (1)

Publication Number Publication Date
JP2018088146A true JP2018088146A (en) 2018-06-07

Family

ID=62493666

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016231374A Pending JP2018088146A (en) 2016-11-29 2016-11-29 Drawing program, drawing method and drawing apparatus

Country Status (1)

Country Link
JP (1) JP2018088146A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210121093A (en) 2019-01-22 2021-10-07 세이프 어프로치 메디칼 인크. Procedure support system, processing device and plate

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210121093A (en) 2019-01-22 2021-10-07 세이프 어프로치 메디칼 인크. Procedure support system, processing device and plate

Similar Documents

Publication Publication Date Title
US9865032B2 (en) Focal length warping
US7596468B2 (en) Method for measuring a selected portion of a curved surface of an object
JP7265639B2 (en) Point cloud merging method that identifies and retains preferred points
JP6749151B2 (en) Method and apparatus for performing a graphics pipeline
WO2015132817A1 (en) Edge detection device, edge detection method, and program
US9224238B2 (en) Seamless texturing of 3D meshes of objects from multiple views
JP2017182302A (en) Image processing program, image processing apparatus, and image processing method
US20220044439A1 (en) Real-Time Pose Estimation for Unseen Objects
WO2017050083A1 (en) Element identification method and device
JPH0771936A (en) Device and method for processing image
JP2007317204A (en) Method and apparatus for three-dimensional graphic processing performing far and near correction
US8311320B2 (en) Computer readable recording medium storing difference emphasizing program, difference emphasizing method, and difference emphasizing apparatus
EP2618312A2 (en) System and method for snapping normals to create fair 3D surfaces from edge curves
JP2018088146A (en) Drawing program, drawing method and drawing apparatus
US20170289493A1 (en) Projection apparatus, image processing apparatus, and image processing method
JP5473096B2 (en) Modeling concave surfaces in image-based visual hulls
US9595122B2 (en) Drawing apparatus and drawing method
JPWO2019049457A1 (en) Image generating apparatus and image generating method
JP2016072691A (en) Image processing system, control method of the same, and program
US9734579B1 (en) Three-dimensional models visual differential
Patel et al. Adaptive multiple-pixel wide seam carving
JP2021108222A (en) Image processing device, image processing method, and image processing program
US10410394B2 (en) Methods and systems for 3D animation utilizing UVN transformation
US10026216B2 (en) Graphics data processing method and apparatus
US20100141649A1 (en) Drawing device