JP2718784B2 - Drawing method of contour and / or edge - Google Patents

Drawing method of contour and / or edge

Info

Publication number
JP2718784B2
JP2718784B2 JP26187089A JP26187089A JP2718784B2 JP 2718784 B2 JP2718784 B2 JP 2718784B2 JP 26187089 A JP26187089 A JP 26187089A JP 26187089 A JP26187089 A JP 26187089A JP 2718784 B2 JP2718784 B2 JP 2718784B2
Authority
JP
Japan
Prior art keywords
image
line
distance
contour
processing
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.)
Expired - Lifetime
Application number
JP26187089A
Other languages
Japanese (ja)
Other versions
JPH03123985A (en
Inventor
隆文 斎藤
時市郎 ▲高▼橋
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP26187089A priority Critical patent/JP2718784B2/en
Publication of JPH03123985A publication Critical patent/JPH03123985A/en
Application granted granted Critical
Publication of JP2718784B2 publication Critical patent/JP2718784B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、計算機を用いた画像生成方法に係り,特に
線画による輪郭線および/または稜線の描画方法(ワイ
ヤーフレーム表示)に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image generation method using a computer, and more particularly to a method for drawing contour lines and / or ridge lines using a line drawing (wire frame display).

〔従来の技術〕[Conventional technology]

3次元形状を2次元の画像として描画する場合,物体
と輪郭線だけをワイヤーフレームで描画する方法(線画
による描画法−描線法ともいう)と,物体表面を濃淡や
色を変えて塗りつぶして描画する方法(画面による描画
法)とがある。なお,ここで輪郭線とは,物体の可視面
と不可視面との境界線を,稜線とは,物体の輪郭線以外
の角ばった部分を表す内形線を,それぞれ指すものとす
る。
When drawing a three-dimensional shape as a two-dimensional image, a method of drawing only the object and the outline with a wire frame (drawing method by line drawing-also called a drawing method), or drawing by painting the surface of the object with different shades and colors (Drawing method using a screen). Here, the contour line indicates a boundary line between the visible surface and the invisible surface of the object, and the ridge line indicates an inner shape line representing an angular portion other than the contour line of the object.

写実的な画像を生成することが目的の場合,光源の位
置や物体表面の反射率などに基づいて物体表面上の各点
の輝度を計算し,陰影づけされた面画として描画する方
法が,通常用いられている。一方,物体をわかりやすく
表示することが目的の場合には,線画として描画するこ
とも多く,また,面画と線画とを合成することもある。
When the purpose is to create a realistic image, a method of calculating the brightness of each point on the object surface based on the position of the light source and the reflectance of the object surface and drawing it as a shaded face drawing, Usually used. On the other hand, when the purpose is to display an object in an easy-to-understand manner, the object is often drawn as a line drawing, or the face drawing and the line drawing are sometimes combined.

線画による描線法では、わかりやすく見せるために,
視点から可視である線だけを描画すること,すなわち隠
線消去を施すことが,しばしば行われている。公知の隠
線消去方法がいくつかあるが,それらはいずれも (1) 輪郭線と稜線とのすべてについて,それぞれが
手前の面によって隠されるか否かを判定し,隠されない
線のみを描画する方法; (2) 線を描く処理と,手前の面を背景色で塗りつぶ
して先に描いた線を消す処理とを組み合わせた方法; の二つのどちらかに属する。
In the line drawing method, in order to make it easy to understand,
Often, only lines that are visible from the viewpoint are drawn, that is, hidden line elimination is performed. There are several known hidden line elimination methods. All of them are as follows: (1) For all contour lines and ridge lines, determine whether or not each is hidden by the front surface, and draw only non-hidden lines (2) a method combining a process of drawing a line and a process of painting a front surface with a background color and erasing the previously drawn line.

また,金属などの光沢のある物体や,ガラスなどの透
明物体を描画する場合,物体表面で反射して見える像
や,物体内を透過し表面で屈折して見える像をも描くこ
とが,しばしば必要になる。このような反射,屈折像を
含めて描画する方法として,光線追跡法が広く使われて
いる。光線追跡法とは,各画素方向から視点に到達する
光線を,視点から逆向きに追跡することによって,それ
ぞれの画素の輝度値を決定し,画像を生成する方法であ
る。ある画素の輝度値を定めるには,まず視点から画素
方向にのびる半直線が最初に交わる物体と,その交点を
求める。もし交わる物体がない場合には,背景色をその
画素の輝度値とする。交わった物体表面での反射,屈折
が無い場合には,表面属性と光源との関係から,輝度値
を求める。表面での反射がある場合には,表面属性と光
源との関係から得られる物体自身の輝度と,反射角から
来る光線を再帰的に追跡することによって得られる反射
像の輝度とを合成し,その画素の輝度とする。表面での
屈折がある場合には,上記の場合に加えて,屈折角から
来る光線を再帰的に追跡することによって、得られる屈
折像の輝度をも合成して,その画素の輝度とする。以上
の処理によって,物体の反射,屈折像も描画することが
できる。
Also, when drawing a glossy object such as a metal or a transparent object such as a glass, it is often necessary to draw an image that is reflected on the surface of the object or an image that is transmitted through the object and refracted on the surface. Will be needed. A ray tracing method is widely used as a method for drawing including such reflection and refraction images. The ray tracing method is a method of tracing a light beam reaching a viewpoint from each pixel direction in the opposite direction from the viewpoint to determine a luminance value of each pixel and generate an image. In order to determine the luminance value of a certain pixel, first, an object where a half line extending from the viewpoint to the pixel direction intersects first, and the intersection thereof are obtained. If there is no intersecting object, the background color is taken as the luminance value of the pixel. If there is no reflection or refraction on the intersecting object surface, a luminance value is obtained from the relationship between the surface attribute and the light source. When there is reflection on the surface, the luminance of the object itself obtained from the relationship between the surface attribute and the light source is combined with the luminance of the reflection image obtained by recursively tracing the ray coming from the reflection angle, The brightness of the pixel is used. In the case where there is refraction on the surface, in addition to the above-described case, by tracing light rays coming from the refraction angle recursively, the luminance of the obtained refraction image is also synthesized to be the luminance of the pixel. By the above processing, the reflection and refraction images of the object can be drawn.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

上記従来技術による隠線消去方法を用いて線画を生成
する場合,以下の三つの問題点が存在する: (1) 複雑な曲面(例えば,3次以上の高次曲面や,山
岳のようなフラクタル形状など)においては,輪郭線を
安定にかつ効率よく求め,また隠線消去を行うことは,
きわめて困難である。
When a line drawing is generated using the above-described hidden line elimination method according to the prior art, there are the following three problems: (1) a complicated surface (for example, a tertiary or higher-order surface or a fractal such as a mountain); Shape, etc.), it is necessary to obtain the outline stably and efficiently, and to perform hidden line elimination.
Extremely difficult.

(2) 画面と線画とを合成する場合,面画の隠面消去
と線画の隠線消去とを同時に矛盾なく行うことが必要で
ある。これらの二つの処理は,互いに類似の処理である
ために全く独立に行うには無駄が多い。しかしながら,
一つの処理で隠線と隠面の双方を消去する場合,隠面消
去方法の選択が制約される。例えば,光線追跡法を線画
にも適用することは実際上きわめて困難である。
(2) When combining a screen and a line drawing, it is necessary to simultaneously erase the hidden surface of the face drawing and the hidden line of the line drawing without inconsistency. Since these two processes are similar to each other, it is wasteful to perform them completely independently. However,
When both the hidden line and the hidden surface are erased by one process, the selection of the hidden surface erasing method is restricted. For example, it is practically very difficult to apply ray tracing to line drawings.

(3) 画面を作成する場合,物体表面の陰影は,ある
物理モデルに基づいてこれをシミュレートすることが多
く,この場合,物理モデルを定めれば,作成されるべき
画像は一意に決定する。これに対して,線画の作成は,
常に人為的な強調の手段として行うものであり,適切な
線の色,濃さ,太さなどは,目的ごとに異なる。従来技
術で面画と線画とを合成する場合,このような物理モデ
ルと人為的な要因とを処理の過程で分離することが難し
い。
(3) When creating a screen, the shadow on the object surface is often simulated based on a certain physical model. In this case, if the physical model is determined, the image to be created is uniquely determined. . In contrast, line drawing
It is always performed as a means of artificial emphasis, and the appropriate color, depth, thickness, etc. of the line differ for each purpose. In the case of combining a face image and a line image by a conventional technique, it is difficult to separate such a physical model and an artificial factor in a process of processing.

なお従来技術による隠線消去方法あるいは光線追跡法
では,反射,屈折像中の物体の輪郭線ならびに稜線を描
画することは,極めて困難である。平面での反射だけを
扱うなど,状況を限定すれば,従来技術による隠線消去
方法に座標変換を組み合わせることによって比較的容易
に実現できるが,傾きの不連続線を含んだ一般の曲面で
の反射や屈折を扱うことは,この方法では不可能であ
る。また,光線追跡法で太さを持たない線を捉えるに
は,光線を例えば円錐形などの光束として追跡するなど
の複雑な処理が必要で,実用上困難である。
With the hidden line elimination method or the ray tracing method according to the prior art, it is extremely difficult to draw the contour lines and ridge lines of the object in the reflection and refraction images. If the situation is limited, for example, if only reflection on a plane is used, it can be realized relatively easily by combining coordinate transformation with the conventional hidden line elimination method. Handling reflection and refraction is not possible with this method. Further, capturing a line having no thickness by the ray tracing method requires complicated processing such as tracing a ray as a light beam such as a cone, which is practically difficult.

本発明の目的は,3次元物体の輪郭線ならびに稜線を,
物体形状の複雑さや面画の生成方向に依存することな
く,安定にかつ効率的に描画するための手段を提供する
ことにある。また3次元物体の輪郭線ならびに稜線を,
反射や屈折像中のものを含めて効率良く描画することを
目的としている。
An object of the present invention is to create a contour line and a ridge line of a three-dimensional object.
It is an object of the present invention to provide a means for stably and efficiently drawing without depending on the complexity of an object shape and the direction in which a face image is generated. Also, the contours and ridges of the three-dimensional object are
The purpose is to efficiently draw images including those in reflection and refraction images.

〔課題を解決するための手段〕[Means for solving the problem]

本発明においては,各画素における視点から物体まで
の距離情報を要素とする2次元データ配列(距離画像)
を前処理によって作成し、これに微分オペレータを作用
させ,それらの出力画像に対し近傍の微分値を考慮した
後処理を施すようにされる。
In the present invention, a two-dimensional data array (distance image) having, as an element, distance information from a viewpoint to an object at each pixel
Is generated by pre-processing, a differential operator is operated on the pre-processing, and post-processing is performed on those output images in consideration of nearby differential values.

また,各画素に最終的に映り込んで見える物体(もし
くは背景)から視点までの光路の長さの情報を要素とす
る2次元データ配列(光路長画像)を光線追跡法によっ
て作成し,これに微分オペレータを作用させ,適当な補
正を行うようにされる。
In addition, a two-dimensional data array (optical path length image) is created by ray tracing, which uses the information on the optical path length from the object (or background) that is finally reflected on each pixel to the viewpoint, as an element. The differential operator is operated to make an appropriate correction.

第1図は本発明の原理説明図を示す。3次元の物体41
に対応して,距離画像1が得られる。当該距離画像1に
対して微分処理102がほどこされ,輪郭線画像および/
または稜線画像103が得られる。
FIG. 1 is a diagram illustrating the principle of the present invention. Three-dimensional object 41
, A distance image 1 is obtained. Differential processing 102 is performed on the distance image 1 to obtain an outline image and / or
Alternatively, a ridge image 103 is obtained.

〔作 用〕(Operation)

輪郭線は,視点からの距離が不連続に変化する点の集
合である。したがって,距離画像1に1次微分オペレー
タを作用させると,輪郭線はピーク値となって現れる。
一方,稜線は,物体表面の法線方向が不連続に変化す
る。即ち,視点からの距離の1次微分値が不連続に変化
する点の集合である。したがって,距離画像1に2次微
分オペレータを作用させると,稜線はピーク値となって
現れる。
The contour is a set of points at which the distance from the viewpoint changes discontinuously. Therefore, when the first derivative operator is applied to the distance image 1, the contour appears as a peak value.
On the other hand, in the ridge line, the normal direction of the object surface changes discontinuously. That is, it is a set of points at which the first derivative of the distance from the viewpoint changes discontinuously. Therefore, when a second derivative operator is applied to the distance image 1, the ridgeline appears as a peak value.

しかしながら,これらの微分オペレータを作用させた
だけでは, (1) 物体間の距離差によって,1次微分画像上での輪
郭線の濃度が変化する; (2) 視線に平行に近いような物体面では,輪郭線と
同様に1次微分値が大きくなる; (3) 輪郭線は,2次微分画像上では正負の二種線とな
って現れる; などの現象が生じるため,そのままでは輪郭線あるいは
稜線画像として用いることはできない。上記の現象は,
微分値の局所的なふるまいを観測することにより,かな
りの部分を補正することができる。
However, simply by using these differential operators, (1) the density of the contour line on the primary differential image changes depending on the distance difference between the objects; (2) the object plane close to the line of sight , The primary differential value increases like the outline; (3) The outline appears as a positive / negative type line on the second derivative image; It cannot be used as a ridgeline image. The above phenomenon is
By observing the local behavior of the derivative, a significant portion can be corrected.

またここで,視点からの距離のかわりに,視点から最
終的に映り込む物体までの光路長に着目すると,反射,
屈折像中の稜線,輪郭線についても,同様の不連続性を
有する。したがって,光路長画像に1次あるいは2次微
分オペレータを作用させると,反射,屈折像中の輪郭線
ならびに稜線も,一般の輪郭線,稜線と同様にピーク値
となって現れる。
Also, when focusing on the optical path length from the viewpoint to the object finally reflected instead of the distance from the viewpoint, reflection,
Edges and contours in the refraction image have the same discontinuity. Therefore, when a first-order or second-order differential operator is applied to the optical path length image, the contour lines and ridge lines in the reflection and refraction images appear as peak values similarly to general contour lines and ridge lines.

〔実施例〕〔Example〕

以下,本発明の実施例について説明する。 Hereinafter, embodiments of the present invention will be described.

第2図に,本発明の一実施例処理の流れを示す。ま
ず,前処理として距離画像1を準備する。これには,物
体の3次元形状データ11とカメラパラメータ12(視点,
参照点,視野角,解像度など)とをもとに計算によって
作成する方法と,既存物体41を距離測定装置を用いて既
存物体を直接測定して得る方法とがある。ここで,距離
測定装置とは,光(レンジファインダー装置等の三角測
量または干渉の測定),超音波,磁力,機械的な接触,
などの手段を用いて,ある点から3次元物体表面上の各
点までの距離を測定し,距離画像を得る装置のことを指
す。前者の方法による場合,距離画像1は,画面を描画
するときに施される隠面消去処理31を用いて,得ること
ができる。隠面消去処理31とは,重なりあって見える3
次元物体面の中から,可視であるもの,すなわち視点に
最も近い面を,画素ごとに求める処理であり,スキャン
ライン法,z−バッファ法,光線追跡法などが広く用いら
れている。このうち,z−バッファ法と光線追跡法とで
は,視点から各物体表面までの距離を画素ごとに計算し
比較するとによって最も近い物体を決定する。この時に
計算した距離値は,距離画像1としてそのまま利用でき
る。スキャンライン法でも,処理中でスキャンライン上
のセグメントの両端での距離値を求めているから,その
間を補間処理すれば,各画素の距離値は容易に得られ
る。
FIG. 2 shows the flow of the processing of one embodiment of the present invention. First, distance image 1 is prepared as preprocessing. This includes three-dimensional shape data 11 of the object and camera parameters 12 (viewpoint,
(A reference point, a viewing angle, a resolution, etc.) and a method of obtaining the existing object 41 by directly measuring the existing object 41 using a distance measuring device. Here, the distance measuring device means light (triangulation or interference measurement using a range finder or the like), ultrasonic waves, magnetic force, mechanical contact,
It refers to a device that measures the distance from a point to each point on the surface of a three-dimensional object by using such means, and obtains a distance image. In the case of the former method, the distance image 1 can be obtained by using the hidden surface removal processing 31 performed when drawing the screen. Hidden surface removal processing 31 appears to overlap 3
In this process, a visible line, that is, a plane closest to the viewpoint, is obtained for each pixel from the three-dimensional object plane, and a scan line method, a z-buffer method, a ray tracing method, and the like are widely used. Among these, in the z-buffer method and the ray tracing method, the closest object is determined by calculating and comparing the distance from the viewpoint to the surface of each object for each pixel. The distance value calculated at this time can be used as it is as the distance image 1. Even in the scan line method, distance values at both ends of a segment on a scan line are obtained during processing. Therefore, if interpolation processing is performed between them, the distance value of each pixel can be easily obtained.

距離値は,第3図に示すように,視点61から物体41ま
での実距離(ただし,スクリーンに垂直な方向の成分)
を用いることができるが,透視投影法で作画する場合に
は,射影距離すなわち実距離の逆数に比例した値を用い
る方がよい。その理由は,線形補間で求めるときに容易
であるため,および,なめらかな物体表面上での距離の
1次微分値の物体面の傾きとの関係を,物体までの距離
に依存しないようにするため,の2点による。また,輝
度値をアンチエリアシング処理して求めるのと同様に,1
画素を複数個の点でサンプリングするか,1画素に占める
各面の割合を計算し,画素内で距離値の平均値をもって
その画素の距離値とすれば,後述の処理で得られる線画
は,ジャギーのないなめらかなものとなる。
The distance value is the actual distance from the viewpoint 61 to the object 41 as shown in Fig. 3 (however, the component in the direction perpendicular to the screen)
Can be used, but when drawing by the perspective projection method, it is better to use a value proportional to the projection distance, that is, the reciprocal of the actual distance. The reason is that it is easy to obtain by linear interpolation, and the relationship between the first derivative of the distance on the smooth object surface and the inclination of the object surface does not depend on the distance to the object. Therefore, it depends on two points. In addition, as in the case where the luminance value is obtained by performing the anti-aliasing process, 1
If a pixel is sampled at a plurality of points or the ratio of each surface to one pixel is calculated and the average value of the distance values within the pixel is used as the distance value of the pixel, the line drawing obtained by the processing described below is It will be smooth without jaggy.

距離画像1に対し,1次微分処理21および2次微分処理
22を施し,それぞれ1次微分画像2,2次微分画像3を得
る。1次微分処理21には,Sobelオペレータ g=|A+2B+C−F−2G−H|+|C+ 2E+H−A−2D−F| ……(1) あるいは,Prewittオペレータ g=|A+B+C−F−G−H|+|C+E+ H−A−D−F| ……(2) など,種々の1次微分オペレータの中から選択して使用
する。2次微分処理22には,ラプラシアン ι=4X−B−D−E−G ……(3) あるいは,これを変形したオペレータ ι=8X−A−B−C−D−E−F−G−H …(4) などの,種々の2次微分オペレータの中から選択して使
用する。ここに,A〜H,Xは,第4図に示した近傍画素の
値である。即ち,3×3の窓63を用意し,中心の画素Xが
着目される画素,A〜Hが近傍画素を表している。
For the distance image 1, primary differential processing 21 and secondary differential processing
22 to obtain primary differential image 2 and secondary differential image 3, respectively. In the first derivative processing 21, the Sobel operator g = | A + 2B + CF-2G-H | + | C + 2E + HA-2D-F | (1) Alternatively, the Prewitt operator g = | A + B + CFFG- H | + | C + E + H−A−D−F | (2) Used by selecting from various primary differential operators. The second derivative processing 22 includes a Laplacian ι = 4X-B-D-EG (3) or a modified operator ι = 8X-A-B-C-C-D-E-F-G- H ... (4) Select and use from various secondary differential operators such as (4). Here, A to H, X are the values of the neighboring pixels shown in FIG. That is, a 3 × 3 window 63 is prepared, and the center pixel X represents the pixel of interest, and A to H represent neighboring pixels.

次に,輪郭線画素と稜線画素との補正処理について,
それぞれの一例を説明する。
Next, regarding the correction processing of the contour pixel and the edge pixel,
An example of each will be described.

まず,各画素について,近傍(例えば第4図に示した
9画素)の中での1次微分の最大値(処理23)最小値
(処理24)を求め,それぞれ1次微分最大画像4,1次微
分最小画像5とする。
First, for each pixel, the maximum value (process 23) and the minimum value (process 24) of the first derivative in the vicinity (for example, the nine pixels shown in FIG. 4) are obtained, and the first-order maximum differential image 4, 1 The next differential minimum image 5 is set.

輪郭線画像6は,1次微分画像2,1次微分最大画像4,お
よび1次微分最小画像5を用いて,輪郭線補正処理25を
行うことによって得られる。ある画素での1次微分値を
g,この画素の近傍での1次微分最大値をgmax,1次微分最
小値をgminとすると,輪郭線画像6におけるこの画素の
値pは, で与えられる。ここで,g0は,スクリーンに対して45度
傾いた面におけるgの値であり,例えばSobelオペレー
タを用いた場合では「8」である。κpは,輪郭線と傾
斜変化とを判別するための定数である。適切なκpの値
は,対象形状や描画目的によって異なるが,例えば
「4」〜「16」程度の値とする。
The contour image 6 is obtained by performing a contour correction process 25 using the primary differential image 2, the primary differential maximum image 4, and the primary differential minimum image 5. First derivative value at a certain pixel
g, the maximum value of the first derivative near this pixel is g max , and the minimum value of the first derivative is g min , the value p of this pixel in the contour image 6 is Given by Here, g 0 is the value of g on a plane inclined 45 degrees with respect to the screen, and is “8” when, for example, a Sobel operator is used. κp is a constant for discriminating between a contour line and a change in inclination. An appropriate value of κp varies depending on the target shape and the drawing purpose, but is, for example, a value of about “4” to “16”.

稜線画像7は,2次微分画像3および1次微分最大画像
4を用いて,稜線補正処理26を行うことによって得られ
る。ある画素での2次微分値をι,この画素の近傍での
1次微分最大値をgmaxとすると,稜線画像7におけるこ
の画素の値eは, で与えられる。ここでιは,スクリーンに対して45度
傾いた2つの平面が直交してできる稜線でのιの値であ
り,例えば(4)式に示した2次微分オペレータを用い
た場合では「6」である。κは,輪郭線消去などの例
外処理を行うための1次微分の限界値である。適切なκ
の値は,対象形状や描画目的によって異なるが,例え
ば「2」〜「4」程度の値とする。なお,(6)式を用
いた場合,鋭角の稜線ほどeの絶対値を大きくなり濃い
線が描かれるが,2次微分値の近傍での最大値および最小
値をも用いて補正を行えば,稜線における二面角の大き
さにかかわらず,一定の濃さの稜線を描くこともでき
る。
The ridge line image 7 is obtained by performing the ridge line correction processing 26 using the second-order differential image 3 and the first-order maximum differential image 4. Assuming that the secondary differential value at a certain pixel is ι and the maximum primary differential value near this pixel is g max , the value e of this pixel in the edge image 7 is Given by Here, ι 0 is the value of ι at an edge formed by two planes inclined at 45 degrees to the screen at right angles. For example, when the second derivative operator shown in the equation (4) is used, “6” ". kappa l is the limit value of the first derivative for performing exception processing such as contour erased. Appropriate κ
The value of 1 varies depending on the target shape and the purpose of drawing, but is, for example, about “2” to “4”. Note that when equation (6) is used, the sharper the ridgeline, the greater the absolute value of e and the darker the line, but if the correction is performed using the maximum and minimum values near the second derivative, Regardless of the dihedral angle of the ridge line, it is possible to draw a ridge line with a certain depth.

上記の方法で得られる輪郭線画像6の画素値は,背景
が0,輪郭線部分が最大1である。また,稜線画像7の画
素値は,背景が0,凸稜線部分が正,凹稜線部分が負であ
る。これらの画素値に適当な演算(絶対値,線形演算,
最大・最小の打ち切りなどの組み合わせ)を施して輝度
値を算出(処理27)すれば、目的に応じた画像9が得ら
れる。このとき,必要に応じて陰影づけされた画面8と
合成することも容易である。
The pixel value of the outline image 6 obtained by the above method is 0 for the background and 1 at the maximum for the outline portion. The pixel value of the ridge image 7 is 0 for the background, positive for the convex ridge, and negative for the concave ridge. Operations appropriate for these pixel values (absolute value, linear operation,
If the luminance value is calculated (processing 27) by applying the maximum / minimum truncation, etc., an image 9 suitable for the purpose can be obtained. At this time, it is also easy to combine with the shaded screen 8 if necessary.

第5図は本発明の他の実施例の場合の処理の流れを示
す。まず,物体の3次元形状データ11とカメラパラメー
タ12(視点,参照点,視野角,解像度など)とを入力デ
ータとして,光線追跡処理131および光路長計算133を行
い,光路長画像101を作成する。光路長画像101に対して
微分オペレータを作用させ(微分処理102),補正処理1
02を施すことによって,反射,屈折像中を含んだ輪郭
線,稜線画像103が得られる。さらに,シェーディング
処理32により陰影づけされ,当該陰影づけされた面画10
4とを合成すれば(処理23),合成画像105が得られる。
FIG. 5 shows a flow of processing in another embodiment of the present invention. First, a ray tracing process 131 and an optical path length calculation 133 are performed using the three-dimensional shape data 11 of the object and camera parameters 12 (viewpoint, reference point, viewing angle, resolution, etc.) as input data, and an optical path length image 101 is created. . A differential operator is operated on the optical path length image 101 (differential processing 102), and correction processing 1 is performed.
By applying 02, a contour line and a ridge line image 103 including the inside of the reflection and refraction images can be obtained. Further, the shaded face image 10 is shaded by the shading process 32.
4 and (Step 23), a combined image 105 is obtained.

次に,光路長計算133の具体的方法について説明す
る。光線追跡法では,処理の過程で視点もしくは物体表
面から次の物体までの距離を計算する。これらの距離
を,視点から最終的に映り込む物体まで加算することに
よって,光路長は得られる。ただし,場合によっては,
実距離を単純に加算するのではなく,以下に示すような
補正処理を適宜組み込むことが必要である。なお,以下
でいう距離とは,視点もしくは物体から,次の物体もし
くは背景までの距離のことを指す。
Next, a specific method of the optical path length calculation 133 will be described. In the ray tracing method, the distance from the viewpoint or the object surface to the next object is calculated in the process of processing. By adding these distances from the viewpoint to the object finally reflected, the optical path length can be obtained. However, in some cases,
Instead of simply adding the actual distance, it is necessary to appropriately incorporate the following correction processing. Note that the distance referred to below refers to a distance from a viewpoint or an object to the next object or background.

(1′)背景までの距離をある有限値で抑える。これを
行わないと,視点から直接背景に至る光路と,反射また
は屈折によって背景に至る光路とが,ともに長さが無限
大となるため,鏡の縁などが輪郭線として抽出できない
こととなる。
(1 ′) The distance to the background is suppressed by a certain finite value. If this is not performed, the optical path directly from the viewpoint to the background and the optical path to the background due to reflection or refraction both have infinite lengths, so that the edge of the mirror cannot be extracted as a contour line.

(2′)距離を加算する際に,反射率や透過率に応じた
重みづけをする。
(2 ′) When adding the distance, weighting is performed according to the reflectance and the transmittance.

(3′)視点からの距離について,実距離のスクリーン
に垂直な成分を用いる。
(3 ') For the distance from the viewpoint, a component perpendicular to the screen at the actual distance is used.

(4′)視点からの距離または全体の光路長について,
その逆数値を用いる。この処理によって,視点からの直
接見えるなめらかな物体表面において,1次微分値と物体
面の傾きとの関係は,物体までの距離に依存しなくな
る。
(4 ′) For the distance from the viewpoint or the entire optical path length,
Use the reciprocal value. By this processing, on a smooth object surface directly visible from the viewpoint, the relationship between the first derivative and the inclination of the object surface does not depend on the distance to the object.

(5′)輝度値をアンチエリアシング処理して求めるの
と同様に,1画素を複数個の点でサンプリングし,各点の
光路長の平均値をもってその画素の光路長とする。これ
によって,輪郭線・稜線画像は,ジャギーのないなめら
かなものとなる。
(5 ') One pixel is sampled at a plurality of points, and the average value of the optical path length at each point is used as the optical path length of the pixel in the same manner as in the case where the luminance value is obtained by performing anti-aliasing processing. As a result, the contour / ridge image becomes smooth without jaggies.

〔発明の効果〕〔The invention's effect〕

以上説明した如く,本発明によれば,3次元物体の輪郭
線ならびに稜線を,物体形状の複雑さにかかわらず,安
定にかつ効率的に描画することができる。面画と合成す
る場合においても,既存の隠面消去アルゴリズムをわず
かに変更して距離画像を作成しておけば,あとの処理は
面画の作成とは全く独立に行うことができる。線画のア
ンチエリアシング処理は,面画に対する処理を距離画像
に反映されるだけで実現できる。さらに,レンジファイ
ンダー装置を用いれば,同じ処理によって既存物体をも
とに描画を行うことも可能である。
As described above, according to the present invention, a contour line and a ridge line of a three-dimensional object can be stably and efficiently drawn regardless of the complexity of the object shape. Even in the case of combining with a face image, if a distance image is created by slightly changing the existing hidden surface elimination algorithm, the subsequent processing can be performed completely independently of the creation of the face image. The anti-aliasing processing of a line drawing can be realized only by reflecting the processing for a plane image on a distance image. Furthermore, if a range finder device is used, it is possible to perform drawing based on an existing object by the same processing.

また,本発明により,3次元物体の輪郭線ならびに稜線
を,反射,屈折像中のものも含めて,効率的に描画する
ことができる。陰影づけされた面画との合成も容易であ
る。この場合,輪郭線,稜線の強調効果(線の濃さな
ど)の変更は,面画の作成とは全く独立に行うことがで
きる。線画のアンチエリアシング処理は,面画に対する
処理を光路長画像に反映させるだけで実現できる。
Further, according to the present invention, the contour lines and ridge lines of the three-dimensional object, including those in the reflection and refraction images, can be efficiently drawn. It is easy to combine with a shaded drawing. In this case, the change of the enhancement effect (such as the density of the line) of the contour line and the ridge line can be performed completely independently of the creation of the face image. The anti-aliasing processing of a line drawing can be realized only by reflecting the processing for the plane drawing on the optical path length image.

本発明は,工業デザイン,建築設計など,多くの分野
のイラスト画の作成に応用できる。
INDUSTRIAL APPLICABILITY The present invention can be applied to creation of illustration images in many fields such as industrial design and architectural design.

【図面の簡単な説明】[Brief description of the drawings]

第1図は本発明の原理説明図,第2図は本発明の実施例
における処理の流れ,第3図は距離値についての説明
図,第4図は近傍画素についての説明図,第5図は本発
明の他の実施例の場合の処理の流れ図を示す。 1〜9……2次元データ配列(画像), 11……3次元形状データ, 12……カメラパラメータ, 21〜27……2次元データ配列に対する処理(画像処
理), 31……隠面消去処理, 32……シェーディング処理, 41……既存物体, 51……距離測定, 101……光路長画像, 102……微分処理, 102′……補正処理, 103……輪郭線画像および/または稜線画像, 104……陰影づけされた画面, 105……合成画像,
FIG. 1 is an explanatory view of the principle of the present invention, FIG. 2 is a processing flow in an embodiment of the present invention, FIG. 3 is an explanatory view of distance values, FIG. 4 is an explanatory view of neighboring pixels, FIG. Shows a flow chart of processing in the case of another embodiment of the present invention. 1 to 9: two-dimensional data array (image), 11: three-dimensional shape data, 12: camera parameters, 21 to 27: processing for two-dimensional data array (image processing), 31: hidden surface removal processing 32, shading processing, 41, existing object, 51, distance measurement, 101, optical path length image, 102, differentiation processing, 102 ', correction processing, 103, contour line image and / or ridge line image , 104 …… shaded screen, 105 …… composite image,

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】3次元物体の輪郭線および/または稜線の
うちの,可視であるものを2次元画像として描画する方
法であって, 各画素における視点から物体までの距離情報を要素とす
る2次元データ配列を入力データとして準備し,これに
微分オペレータを作用させて輪郭線および/または稜線
の画像を出力として得ること, を特徴とする輪郭線および/または稜線の描画方法。
1. A method of drawing a visible one of a contour line and / or a ridge line of a three-dimensional object as a two-dimensional image, wherein distance information from a viewpoint to an object at each pixel is used as an element. Preparing a dimensional data array as input data and applying a differential operator thereto to obtain an image of a contour line and / or an edge line as an output, wherein a contour line and / or a ridge line is drawn.
【請求項2】3次元形状データに対し,隠面消去処理を
施すことによって距離画像を生成することを特徴とする
請求項(1)記載の輪郭線および/または稜線の描画方
法。
2. The contour and / or ridge line drawing method according to claim 1, wherein a distance image is generated by performing a hidden surface elimination process on the three-dimensional shape data.
【請求項3】3次元物体の輪郭線および/または稜線の
うちの,可視であるものを2次元画像として描画する方
法であって, 各画素に最終的に映り込んで見える物体もしくは背景か
ら視点までの光路の長さの情報を要素とする2次元デー
タ配列を光線追跡法によって作成し,これに微分オペレ
ータを作用させて輪郭線および/または稜線の画像を出
力として得ること, を特徴とする輪郭線および/または稜線の描画方法。
3. A method of drawing a visible one of a contour line and / or a ridge line of a three-dimensional object as a two-dimensional image, the method comprising: Creating a two-dimensional data array having information on the length of the optical path up to the element by a ray tracing method and applying a differential operator to the array to obtain an image of a contour line and / or a ridge line as an output. How to draw contours and / or edges.
JP26187089A 1989-10-06 1989-10-06 Drawing method of contour and / or edge Expired - Lifetime JP2718784B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26187089A JP2718784B2 (en) 1989-10-06 1989-10-06 Drawing method of contour and / or edge

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26187089A JP2718784B2 (en) 1989-10-06 1989-10-06 Drawing method of contour and / or edge

Publications (2)

Publication Number Publication Date
JPH03123985A JPH03123985A (en) 1991-05-27
JP2718784B2 true JP2718784B2 (en) 1998-02-25

Family

ID=17367902

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26187089A Expired - Lifetime JP2718784B2 (en) 1989-10-06 1989-10-06 Drawing method of contour and / or edge

Country Status (1)

Country Link
JP (1) JP2718784B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4616167B2 (en) * 2005-12-28 2011-01-19 株式会社日立製作所 Drawing method, image data generation system, CAD system, and viewer system
JP5236214B2 (en) * 2007-06-11 2013-07-17 任天堂株式会社 Image processing program
JP2016168828A (en) * 2015-03-12 2016-09-23 キヤノン株式会社 Print data dividing device and program
JP6962242B2 (en) * 2018-03-07 2021-11-05 富士通株式会社 Information processing device, superimposition display program, superimposition display method

Also Published As

Publication number Publication date
JPH03123985A (en) 1991-05-27

Similar Documents

Publication Publication Date Title
US8432435B2 (en) Ray image modeling for fast catadioptric light field rendering
US6278460B1 (en) Creating a three-dimensional model from two-dimensional images
CN107945267B (en) Method and equipment for fusing textures of three-dimensional model of human face
Greene et al. Creating raster omnimax images from multiple perspective views using the elliptical weighted average filter
US7199793B2 (en) Image-based modeling and photo editing
EP1303839B1 (en) System and method for median fusion of depth maps
US6529206B1 (en) Image processing apparatus and method, and medium therefor
EP1780678B1 (en) Determining appearance of points in point cloud based on normal vectors of points
US6937235B2 (en) Three-dimensional object surface shape modeling apparatus, method and program
US6621925B1 (en) Image processing apparatus and method and information providing medium
US20030034976A1 (en) System and method for registering multiple images with three-dimensional objects
US20030043152A1 (en) Simulating motion of static objects in scenes
US6157387A (en) Image generating apparatus and method
JPH0581438A (en) Device and method of generating indicative information displaying three-dimensional solid object
US20070103466A1 (en) System and Computer-Implemented Method for Modeling the Three-Dimensional Shape of An Object by Shading of a Two-Dimensional Image of the Object
Lindner et al. Sub-pixel data fusion and edge-enhanced distance refinement for 2d/3d images
US6724383B1 (en) System and computer-implemented method for modeling the three-dimensional shape of an object by shading of a two-dimensional image of the object
US6654013B1 (en) Apparatus for and method of enhancing shape perception with parametric texture maps
CN111369661B (en) Three-dimensional volume data visualization parallel rendering method based on OpenCL
JP2001067463A (en) Device and method for generating facial picture from new viewpoint based on plural facial pictures different in viewpoint, its application device and recording medium
JP2718784B2 (en) Drawing method of contour and / or edge
JP2692783B2 (en) System and method for generating a two-dimensional representation of a three-dimensional object
JP3629243B2 (en) Image processing apparatus and method for rendering shading process using distance component in modeling
CN114972612B (en) Image texture generation method based on three-dimensional simplified model and related equipment
Levene A framework for non-realistic projections

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071114

Year of fee payment: 10

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081114

Year of fee payment: 11

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091114

Year of fee payment: 12

EXPY Cancellation because of completion of term