JPH11339044A - Method for inputting three dimensional shape and recording medium for recording three dimensional shape input program - Google Patents

Method for inputting three dimensional shape and recording medium for recording three dimensional shape input program

Info

Publication number
JPH11339044A
JPH11339044A JP10144125A JP14412598A JPH11339044A JP H11339044 A JPH11339044 A JP H11339044A JP 10144125 A JP10144125 A JP 10144125A JP 14412598 A JP14412598 A JP 14412598A JP H11339044 A JPH11339044 A JP H11339044A
Authority
JP
Japan
Prior art keywords
image
feature point
evaluation function
trajectory
input
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
JP10144125A
Other languages
Japanese (ja)
Inventor
Mikio Shintani
幹夫 新谷
Ken Tsutsuguchi
けん 筒口
Masakatsu Aoki
政勝 青木
Tatsuki Matsuda
達樹 松田
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 JP10144125A priority Critical patent/JPH11339044A/en
Publication of JPH11339044A publication Critical patent/JPH11339044A/en
Pending legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To stably input a three dimensional shape by reducing influence of each kind of fluctuation, and to efficiently input a three dimensional shape by considering spatial connection between featured points. SOLUTION: An image string photographed in an image input step 11 is stored in a memory for each frame, and a spatiotemporal image is prepared in an image storage step 12. The image is sliced in a scan line facial direction, and an epi-polar image is prepared in a featured point extraction step 13. Then, the epi-polar image whose luminance is largely changed is extracted as a featured point in a filter processing. A featured point locus is calculated in a featured point locus extraction step 14. Weight is calculated in a weighting factor calculation step 15. An evaluation function is calculated by using a previously known method in an evaluation function calculation step 16. The sum of the evaluation functions is minimized by using the previously known method, and the connection of featured lines is decided in an evaluation function minimization step 17. The three dimensional coordinate of the featured point is calculated from the featured point locus in a three dimensional coordinate calculation step 18.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、実画像から高臨場
感画像を生成するのに必要な3次元構造を推定する方法
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for estimating a three-dimensional structure required to generate a highly realistic image from a real image.

【0002】[0002]

【従来の技術】時空間画像を対象とする3次元形状入力
方法で、再構成画像と入力画像の差が最小とする機能を
具備する処理としては、特徴点軌跡の対に対して誤差を
計算し、動的計画法により最小化処理を施すことにより
特徴点間の接続関係を決定する方法が知られている(特
願平8−338388、以下方法Aと呼ぶ)。方法Aを
図5を用いて説明する。
2. Description of the Related Art In a three-dimensional shape input method for a spatiotemporal image, a process having a function of minimizing a difference between a reconstructed image and an input image includes calculating an error for a pair of feature point trajectories. A method of determining a connection relationship between feature points by performing a minimization process by a dynamic programming method is known (Japanese Patent Application No. 8-338388, hereinafter referred to as method A). Method A will be described with reference to FIG.

【0003】図5で51はカメラを移動させながら撮影
した画像系列f0 (x,y;t)である。簡単のため、
カメラの移動は視線方向に垂直かつx軸に平行であると
する。このとき、同一物点の像点、すなわち特徴点軌跡
は、画像系列51においてy=一定の面上に拘束される
(例:Bolles R. C., Baker H. H. and Marimont D.H.:
“Epipolar-plane image analysis: an approach to d
etermining structure from motion ”, IJCV, Vol, 1,
No. 1, pp.7-55, 1987,以下文献Bと称す)。
In FIG. 5, reference numeral 51 denotes an image sequence f 0 (x, y; t) photographed while moving the camera. For simplicity,
It is assumed that the movement of the camera is perpendicular to the line of sight and parallel to the x-axis. At this time, the image points of the same object point, that is, the feature point trajectories are constrained on the y = constant plane in the image sequence 51 (for example, Bolles RC, Baker HH and Marimont DH:
“Epipolar-plane image analysis: an approach to d
etermining structure from motion ”, IJCV, Vol, 1,
No. 1, pp. 7-55, 1987, hereinafter referred to as Document B).

【0004】y=一定の画像52、Y = constant image 52,

【0005】[0005]

【数1】 はエピポーラ画像と呼ばれる。特徴点軌跡53は同一エ
ピポーラ画像上においてのみ存在するので、特徴点軌跡
の処理はエピポーラ画像上で行えばよい。そこで方法A
では、まず画像を蓄積し、次いでエピポーラ画像を作
り、特徴点軌跡{l i }を抽出する。次いで、任意の特
徴点軌跡の対(l1 (t),l2 (t))に対し、接続
した場合に発生する誤差h(l1 ,l2 )を
(Equation 1)Are called epipolar images. The feature point trajectory 53 is the same
Since it exists only on the polar image,
May be performed on the epipolar image. So method A
Let's first accumulate images and then create epipolar images.
And the feature point locus {l i Extract}. Then, any features
The pair of loci (l1 (T), lTwo (T))
Error (h (l)1 , LTwo )

【0006】[0006]

【数2】 により計算する。ここで、fsyn はl1 とl2 を接続し
たときに生成される画像であり、既知の手法(方法A)
により計算できる。この誤差の和
(Equation 2) Is calculated by Here, f syn is an image generated when l 1 and l 2 are connected, and is a known method (method A).
Can be calculated by Sum of this error

【0007】[0007]

【数3】 が最小になるように特徴点軌跡の接続を決定する。(Equation 3) Is determined so that is minimized.

【0008】[0008]

【発明が解決しようとする課題】上述した従来方法は、
カメラの移動方向、視線方向、移動速度が変動する場合
には、特徴点軌跡53は同一エピポーラ画像上において
のみ存在するという仮定が成り立たず、処理の精度が著
しく低下するという問題点があり、また各エピポーラ画
像を独立に処理しているため、同一の滑らかなエッジの
上にある特徴点の接続がスキャンライン毎に異なってし
まい、再生画像のエッジが滑らかにならず、画像の品質
が低下してしまうことがあるという欠点がある。
SUMMARY OF THE INVENTION The above-mentioned conventional method has the following problems.
When the moving direction, the line-of-sight direction, and the moving speed of the camera fluctuate, the assumption that the feature point trajectory 53 exists only on the same epipolar image does not hold, and there is a problem that the accuracy of the processing is significantly reduced. Since each epipolar image is processed independently, the connection of feature points on the same smooth edge differs for each scan line, and the edge of the reproduced image is not smooth and the image quality is reduced. There is a disadvantage that it may be.

【0009】本発明の目的は、カメラの移動方向、視線
方向、移動速度の変動に対してラバストな3次元形状入
力方法を提供することにある。
An object of the present invention is to provide a three-dimensional shape input method that is robust against fluctuations in the moving direction, line-of-sight direction, and moving speed of a camera.

【0010】本発明の他の目的は、特徴点間の空間的な
接続を考慮した効率のよい3次元形状入力方法を提供す
ることにある。
Another object of the present invention is to provide an efficient three-dimensional shape input method in consideration of spatial connection between feature points.

【0011】[0011]

【課題を解決するための手段】本発明の第1は、カメラ
の姿勢、移動速度の変動などにより発生するデータの信
頼性を推定し、該信頼性に基づく重みを用いて特徴点接
続線分決定ステップにおける評価関数を計算する。
A first aspect of the present invention is to estimate the reliability of data generated due to fluctuations in the attitude and moving speed of a camera, and to use feature point connection line segments using weights based on the reliability. Calculate the evaluation function in the decision step.

【0012】特徴点軌跡を{xij}とし、この軌跡を近
似する直線をli =ai t+bi (tは時間、a,bは
定数)とする。この直線は、例えば最小自乗法や既知の
ラバスト推定法(例:Z. Zhang, et, al, A robust tec
hnique for matching two uncalibrated images throug
h therecovery of the unknown epipolar geometry,Art
ificial Intelligence, vol. 78, (1995) 87-119.)など
を求める。カメラの姿勢の変動などが大きいフレームj
では直線li と特徴点xijとの差が大きいと考えられ
る。そこで、変動の影響を
A feature point trajectory is {x ij }, and a straight line approximating this trajectory is l i = a i t + b i (t is time, a and b are constants). This straight line is formed by, for example, a least squares method or a known robust estimation method (eg, Z. Zhang, et, al, A robust tec
hnique for matching two uncalibrated images throug
h therecovery of the unknown epipolar geometry, Art
ificial Intelligence, vol. 78, (1995) 87-119.) Frame j with large fluctuations in camera posture
It is considered that the difference between the straight line l i and the feature point x ij is large. Therefore, the effect of fluctuation

【0013】[0013]

【数4】 と評価する。適当な単調減少関数s(E)を用いて、各
フレームの重みwj
(Equation 4) Evaluate. Using an appropriate monotone decreasing function s (E), the weight w j of each frame is calculated as

【0014】[0014]

【数5】 とすれば、変動の影響を大きく受けているフレームの重
みwが小さくなるようにできる。この重みを用いて、誤
差関数(式(1))を修正し、
(Equation 5) Then, the weight w of the frame that is greatly affected by the fluctuation can be reduced. Using this weight, the error function (Equation (1)) is modified,

【0015】[0015]

【数6】 と定義する。hw はhと比較して、変動の影響を大きく
受けているフレームの重みwが小さいので、これらのフ
レームの影響を軽減することができ、安定な3次元形状
入力を実現できる。
(Equation 6) Is defined. h w is compared is h, since the weight w of frames greatly influenced by the variation is small, it is possible to reduce the effect of these frames can be realized a stable three-dimensional shape input.

【0016】本発明の第2では、特徴点の空間的な接続
および入力画像と画像生成処理により再構成される生成
画像との差に基づく評価関数を近似的に最小化すること
により特徴点間の接続関係を決定する。
According to a second aspect of the present invention, the evaluation function based on the spatial connection of the feature points and the difference between the input image and the generated image reconstructed by the image generation processing is approximately minimized, so that the feature points are reduced. Determine the connection relationship.

【0017】まず、方法Aにおける最小化方法を説明す
る。各スキャンラインyにおける全ての特徴線を左側か
ら順番に番号をつけ、{lk,y }=Lと表わす。エピポ
ーラの左端、右端をそれぞれl0,ye,y とする。便宜
上、不等号 ly <l’y が、特徴線ly はl’y の左側に存在することを示すも
のとすれば、 l0,y <l1,y <l2,y <・・・・・le,y が成り立つ。方法Aでは、以下の評価関数を最小にする
ことにより、特徴線の接続を決定する。
First, the minimizing method in the method A will be described. All feature lines in each scan line y are numbered in order from the left, and are expressed as {l k, y } = L. Let the left end and the right end of the epipolar be l 0, y le , y , respectively. For convenience, if the inequality l y <l 'y is the characteristic line l y is l' as indicating that there on the left side of the y, l 0, y <l 1, y <l 2, y <··· .. L e, y holds. In the method A, the connection of the characteristic line is determined by minimizing the following evaluation function.

【0018】[0018]

【数7】 ここで、h(λi,y +λi+1,y )は特徴線λi,y とλ
i+1,y とを接続した際に発生する誤差である。
(Equation 7) Here, h (λ i, y + λ i + 1, y ) is the characteristic line λ i, y and λ
This error occurs when i + 1 and y are connected.

【0019】ただし、However,

【0020】[0020]

【数8】 また、最初の特徴線λ0,y は画面の左端l0,e 、最後の
特徴線は画面の右端l e,y である。
(Equation 8)Also, the first feature line λ0, y Is the left edge of the screen0, e ,Last
The characteristic line is at the right end of the screen. e, y It is.

【0021】式(6)のように、評価関数が以下の条
件、 ・変数が順序付けられている。
As shown in equation (6), the evaluation function has the following conditions, and the variables are ordered.

【0022】・評価関数が、隣りあった変数だけの関数
の和で与えられる。を満足する場合には、評価関数Hの
最小化を動的計画法を用いて効率よく実現する。すなわ
ち、
The evaluation function is given by the sum of functions of only adjacent variables. Is satisfied, the evaluation function H is minimized efficiently using the dynamic programming. That is,

【0023】[0023]

【数9】 とおけば、式(6)は(Equation 9) Then, equation (6) becomes

【0024】[0024]

【数10】 と書き換えられる。動的計画法を用いる利点は計算量の
削減である。簡単のため、スキャンライン数をny 、各
スキャンラインでの特徴線数をmとする。式(6)の最
小化を直接行うと、その計算量は
(Equation 10) Is rewritten as The advantage of using dynamic programming is reduced computational complexity. For simplicity, the number of scan lines n y, the number of characteristic lines for each scan line to m. When directly minimizing equation (6), the amount of calculation is

【0025】[0025]

【外1】 となり、莫大な計算量が必要とされる。他方、動的計画
法では、ρを1つ計算するのに
[Outside 1] And an enormous amount of calculation is required. On the other hand, in dynamic programming, it is necessary to calculate one ρ

【0026】[0026]

【外2】 これをny ×m回計算するので、全体で[Outside 2] Since this is calculated n y × m times,

【0027】[0027]

【外3】 の計算量で効率よく処理を行うことが可能となる。[Outside 3] It is possible to perform the processing efficiently with the calculation amount of.

【0028】しかし前述のように、処理Aのようにスキ
ャンライン毎に独立に処理を行うと以下のような問題が
生じる。多くの場合、関数h(l’y ,ly )は図6に
示すように、最小値に近い値を複数の点でもつ。図7の
ように、縦方向のエッジが複数存在する場合、スキャン
ライン61毎に独立に処理すると、エッジ63上の点6
2が採用されたり、飛ばされたりして、一貫性がなく、
再生されるエッジが途切れてしまうという問題がある。
However, as described above, if processing is performed independently for each scan line as in processing A, the following problem occurs. Often, the function h (l 'y, l y ) , as shown in FIG. 6, has a value close to the minimum value at a plurality of points. As shown in FIG. 7, when there are a plurality of edges in the vertical direction, when processing is performed independently for each scan line 61, a point 6 on the edge 63 is obtained.
2 was adopted or skipped, inconsistent,
There is a problem that the reproduced edge is interrupted.

【0029】この問題を解決するには、例えば、評価関
数に、隣接するスキャンラインにおける特徴線λi,y
λj,y-1 の接続を表す関数w(λi,y ,λj,y-1 )を導
入し、評価関数を
In order to solve this problem, for example, the evaluation function is added to the characteristic lines λ i, y ,
lambda j, the function w that represents the connection y-1 (λ i, y , λ j, y-1) was introduced and the evaluation function

【0030】[0030]

【数11】 と定義し、この最小化、[Equation 11] And this minimization,

【0031】[0031]

【数12】 を行うことで可能である。ここで、wの値が小さいほど
λi,j とλj,y-1 の接続性がよい。しかし、評価関数で
は、w()に関する項が、隣りあった変数でないので、
動的計画法を用いることができない。したがって、この
ままでは大幅な計算量増大が必要となる。
(Equation 12) Is possible. Here, the smaller the value of w, the better the connectivity between λ i, j and λ j, y-1 . However, in the evaluation function, the term related to w () is not a neighboring variable, so
Dynamic programming cannot be used. Therefore, a large increase in the amount of calculation is required as it is.

【0032】しかしながら、以下のような近似処理を行
うことで、動的計画法で処理できる形に変形し、効率的
な処理が可能である。Hの最小化を実現する特徴線を
However, by performing the following approximation processing, it is transformed into a form that can be processed by dynamic programming, and efficient processing is possible. The characteristic line that minimizes H

【0033】[0033]

【外4】 と表す。これらの特徴線間の関数値が、図6のように最
小値にほぼ等しい場合、すなわち、
[Outside 4] It expresses. When the function value between these feature lines is almost equal to the minimum value as shown in FIG.

【0034】[0034]

【数13】 が常に成り立てば、(Equation 13) Always holds,

【0035】[0035]

【数14】 が成り立つ。[Equation 14] Holds.

【0036】スキャンラインyにおいて、最後から2番
目の特徴線として選択される特徴線をly とし、式(1
4)を変形すると、
In the scan line y, the characteristic line selected as the penultimate characteristic line is l y , and the expression (1)
By transforming 4),

【0037】[0037]

【数15】 とできる。この最小値は式(15)を用いて、(Equation 15) And can be. This minimum value is calculated using equation (15).

【0038】[0038]

【数16】 と近似できる。右辺第1項がly に依存しないと仮定で
きれば、式(17)の最小値は、右辺第2項
(Equation 16) Can be approximated. If assumed that the first term on the right-hand side does not depend on l y, the minimum value of formula (17), the second term on the right side

【0039】[0039]

【数17】 を与えるly を求めることで、Hを最小化するly を近
似的に求めることができる。この最小化は、{ly }に
関する動的計画法により解くことができる。
[Equation 17] By obtaining a l y giving, it can be obtained l y to minimize H to approximate. This minimization can be solved by dynamic programming for {l y }.

【0040】このようにして求まったly を画像の右辺
境界le,y に置き換え、式(18)の最小化を、ly
0,y となるまで繰り返すことにより、式(14)の最
小化を近似的に解くことができる。
[0040] In this way the right-hand side boundary with been obtained was l y pictures l e, replaced by y, the minimization of Equation (18), l y =
By iterating until l 0, y , the minimization of Expression (14) can be approximately solved.

【0041】本発明では、式(14)のようにスキャン
間の接続性を考慮した評価関数の最小化を、式(17)
の最小化問題で近似し、動的計画法により効率的に解
く。これにより、同一の滑らかなエッジの上にある特徴
点の接続がスキャンライン毎に異ならないようにし、再
生画像の画質向上が実現するとともに、計算量の増加を
押えることが可能となる。
In the present invention, the minimization of the evaluation function in consideration of the connectivity between scans as in the equation (14) is performed by the equation (17).
Approximate by minimization problem of, and solve it efficiently by dynamic programming. This prevents the connection of feature points on the same smooth edge from being different for each scan line, thereby improving the quality of a reproduced image and suppressing an increase in the amount of calculation.

【0042】[0042]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面を参照して説明する。
Next, embodiments of the present invention will be described with reference to the drawings.

【0043】図1を参照すると、本発明の第1の実施形
態の3次元形状入力方法は、画像入力ステップ11と画
像蓄積ステップ12と特徴点抽出ステップ13と特徴点
軌跡抽出ステップ14と重み係数計算ステップ15と評
価関数計算ステップ16と評価関数最小化ステップ17
と3次元座標計算ステップ18で構成されている。な
お、重み係数計算ステップ15と評価関数計算ステップ
16と評価関数最小化ステップ17が請求項1の特徴点
接続線分決定ステップを構成している。
Referring to FIG. 1, the three-dimensional shape input method according to the first embodiment of the present invention comprises an image input step 11, an image storage step 12, a feature point extraction step 13, a feature point trajectory extraction step 14, a weight coefficient Calculation step 15, evaluation function calculation step 16, evaluation function minimization step 17
And a three-dimensional coordinate calculation step 18. The weight coefficient calculation step 15, the evaluation function calculation step 16, and the evaluation function minimization step 17 constitute a feature point connection line segment determination step.

【0044】画像入力ステップ11において、カメラが
光軸に垂直かつ水平方向に等速直線移動しながら撮影す
る。画像蓄積ステップ12において、画像入力ステップ
11で撮影された画像列がフレーム毎にメモリに蓄積さ
れ、時空間画像11が形成される。
In the image input step 11, an image is taken while the camera moves linearly at a constant speed in the vertical and horizontal directions to the optical axis. In the image storage step 12, the image sequence shot in the image input step 11 is stored in the memory for each frame, and the spatiotemporal image 11 is formed.

【0045】特徴点抽出ステップ13では、図5に示す
ようにまず時空間画像51をスキャンラインy=y0
方向でスライスし、エピポーラ画像52を作る。次に、
該エピポーラ画像52に対し、フィルタ処理(例:ラプ
ラシャンフィルタ)で輝度変化の激しいところを特徴点
54として抽出する。エピポーラ画像52上の特徴点軌
跡53は直線になる特性があるため、多数の特徴点もし
くはその近傍を通過するような直線は特徴点軌跡である
可能性が高いといえる。特徴点軌跡抽出ステップ14で
は、このような直線を、特徴点に対してハフ変換(P.V.
C. Hough: “Method and means for recognizing compl
ex patterns ”, U.S. patent 3069654,Dec. 18, 1962)
を施すことにより求める。
[0045] In the feature point extraction step 13, is sliced along the first spatio-temporal image 51 scan lines y = y 0 plane direction as shown in FIG. 5, making epipolar image 52. next,
The epipolar image 52 is extracted as a feature point 54 by a filtering process (for example, a Laplacian filter) at a location where the luminance changes sharply. Since the feature point trajectory 53 on the epipolar image 52 has a characteristic of being a straight line, it can be said that a straight line passing through a number of feature points or its vicinity is likely to be a feature point trajectory. In the feature point trajectory extraction step 14, such a straight line is subjected to Hough transform (PV
C. Hough: “Method and means for recognizing compl
ex patterns ”, US patent 3069654, Dec. 18, 1962)
To obtain.

【0046】重み係数計算ステップ15では、式
(3),(4)を用いて重みwt を計算する。
In the weight coefficient calculating step 15, the weight w t is calculated using the equations (3) and (4).

【0047】評価関数計算ステップ16では、既知の手
法(方法A)を用いて、評価関数h w を式(5)に基づ
き計算し、結果をメモリに格納する。
In the evaluation function calculating step 16, the known hand
Function (method A), the evaluation function h w Based on equation (5)
Calculation and store the result in the memory.

【0048】評価関数最小化ステップ17では既知の手
法(方法A)を用いて、評価関数の和を最小化して、特
徴線の接続を決定する。
In the evaluation function minimizing step 17, the connection of the characteristic lines is determined by minimizing the sum of the evaluation functions using a known method (method A).

【0049】最後に、3次元座標計算ステップ18で
は、特徴点軌跡から特徴点の3次元座標を計算する。
Finally, in a three-dimensional coordinate calculation step 18, the three-dimensional coordinates of the characteristic point are calculated from the characteristic point trajectory.

【0050】本実施形態では、カメラ姿勢などの変動に
よる影響に応じた重みを計算し、これを用いた評価関数
に基づいて3次元形状抽出を行うので、従来の技術に比
べて、変動の影響を受けにくくする。
In the present embodiment, a weight is calculated in accordance with the influence of a change in the camera attitude and the like, and a three-dimensional shape is extracted based on an evaluation function using the weight. Hard to receive.

【0051】図2を参照すると、本発明の第1の実施形
態の3次元形状入力プログラムを記録した記録媒体はそ
れぞれ図1中の画像入力ステップ11、画像蓄積ステッ
プ12、特徴点抽出ステップ13、特徴点軌跡抽出ステ
ップ14、重み係数計算ステップ15、評価関数計算ス
テップ16、評価関数最小化ステップ17、3次元座標
計算ステップ18の各処理21〜28からなる3次元画
像入力プログラムを記録した、FD(フロッピーディス
ク)、CD−ROM、MO(光磁気ディスク)、半導体
メモリなどの記録媒体で、CPUにより3次元形状入力
プログラムが読み出され、実行される。
Referring to FIG. 2, the recording media on which the three-dimensional shape input program according to the first embodiment of the present invention has been recorded are the image input step 11, the image storage step 12, the feature point extraction step 13, FD recording a three-dimensional image input program consisting of feature point trajectory extraction step 14, weight coefficient calculation step 15, evaluation function calculation step 16, evaluation function minimization step 17, and three-dimensional coordinate calculation step 18 of respective processes 21 to 28 (Floppy disk), CD-ROM, MO (magneto-optical disk), recording medium such as semiconductor memory, etc., the CPU reads and executes the three-dimensional shape input program.

【0052】図3を参照すると、本発明の第2の実施形
態の3次元形状入力方法は、画像入力ステップ31と、
画像蓄積ステップ32と、特徴線抽出ステップ33と、
評価値計算ステップ34と、初期値設定ステップ35
と、接続に基づく評価値計算ステップ37と、評価関数
近似的最小化ステップ36と、データ更新ステップ38
と、終了判定ステップ39と、3次元座標計算ステップ
40で構成されている。なお、特徴線抽出ステップ33
が請求項3の特徴点抽出ステップと特徴点軌跡抽出ステ
ップを構成し、評価値計算ステップ34から終了判定ス
テップ39までが請求項3の特徴点接続線分決定ステッ
プを構成している。
Referring to FIG. 3, a three-dimensional shape input method according to a second embodiment of the present invention comprises an image input step 31 and
An image accumulation step 32, a feature line extraction step 33,
Evaluation value calculation step 34 and initial value setting step 35
A connection-based evaluation value calculation step 37, an evaluation function approximate minimization step 36, and a data update step 38
, An end determination step 39, and a three-dimensional coordinate calculation step 40. Note that the feature line extraction step 33
Constitute the feature point extraction step and the feature point trajectory extraction step of the third aspect, and the steps from the evaluation value calculation step 34 to the end determination step 39 constitute the feature point connection line segment determination step of the third aspect.

【0053】画像入力ステップ31において、カメラが
光軸に垂直かつ水平方向に等速直線移動しながら撮影す
る。画像蓄積ステップ32において、画像入力ステップ
31で撮影された画像列がフレーム毎にメモリに蓄積さ
れ、時空間画像51が形成される。
In the image input step 31, an image is taken while the camera moves linearly at a constant speed in a direction perpendicular and horizontally to the optical axis. In the image storage step 32, the image sequence photographed in the image input step 31 is stored in the memory for each frame, and a spatiotemporal image 51 is formed.

【0054】特徴線抽出ステップ33では、図5に示す
ように、まず時空間画像51をスキャンラインy=y0
面方向でスライスし、エピポーラ画像52を作る。次
に、該エピポーラ画像52に対し、フィルタ処理(例:
ラプラシャンフィルタ)で輝度変化の激しいところを特
徴点54として抽出する。エピポーラ画像52上の特徴
点軌跡53は直線になる特性があるため、多数の特徴点
もしくはその近傍を通過するような直線は特徴点軌跡で
ある可能性が高いといえる。特徴点抽出ステップ33で
は、このような直線を、特徴点に対してハフ変換(P.V.
C. Hough: “Method and means for recognizing compl
ex patterns ”, U.S. patent 3069654, Dec. 18, 196
2) を施すことにより求める。
In the characteristic line extraction step 33, first, as shown in FIG. 5, the spatiotemporal image 51 is scanned with a scan line y = y 0.
An epipolar image 52 is created by slicing in the plane direction. Next, the epipolar image 52 is subjected to a filtering process (eg,
Laplacian filter) is used to extract a portion where luminance changes sharply as a feature point 54. Since the feature point trajectory 53 on the epipolar image 52 has a characteristic of being a straight line, it can be said that a straight line passing through a number of feature points or its vicinity is likely to be a feature point trajectory. In the feature point extraction step 33, such a straight line is subjected to Hough transform (PV
C. Hough: “Method and means for recognizing compl
ex patterns ”, US patent 3069654, Dec. 18, 196
2) Determined by applying.

【0055】評価値計算ステップ34では、既知の手法
(手法A)を用いて式(14)におけるh(ly ,l’
y )を計算し、結果をメモリに格納しておく。また、式
(10)によりDP関数ρを計算し、メモリに格納す
る。
In the evaluation value calculation step 34, h (l y , l ′) in the equation (14) is calculated using a known method (method A).
y ) and store the result in memory. Further, the DP function ρ is calculated by the equation (10) and stored in the memory.

【0056】初期値設定ステップ35では、終端特徴線
e,y にエピポーラ画像の右端x=nx −1を設定す
る。
In the initial value setting step 35, the right end x = n x -1 of the epipolar image is set to the terminal feature line le , y .

【0057】接続に基づく評価値計算ステップ37で
は、式(14)におけるw(ly ,l y-1 )を、特徴点
の接続のよさを基に計算する。この処理としては、例え
ば、既知のエッジ追跡処理(例えば、田村監修、コンピ
ュータ画像処理入門、pp.126−127、総研出
版)を用いて特徴点の追跡を行い、ly とly-1 が接続
する場合にはw=0とし、それ以外の場合はwに一定値
を入れる、などの処理が可能である。
In the evaluation value calculating step 37 based on the connection,
Is w (l) in equation (14).y , L y-1 )
Calculate based on good connection. For example, this process
For example, if there is a known edge tracking process (for example,
Introduction to Computer Image Processing, pp. 126-127, Research Institute
Feature points are tracked usingy And ly-1 Is connected
If so, set w = 0, otherwise set w to a constant value
, And so on.

【0058】評価関数近似的最小化ステップ36では、
評価値計算ステップ34で計算されたρ,hおよび接続
に基づく評価値計算ステップ37で計算するwを用い
て、式(18)に示される最小化を行う。
In the evaluation function approximate minimization step 36,
Using ρ and h calculated in the evaluation value calculation step 34 and w calculated in the evaluation value calculation step 37 based on the connection, the minimization represented by the equation (18) is performed.

【0059】データ更新ステップ38では、評価関数近
似的最小化ステップ36で求められた{ly }をメモリ
に格納するとともに、終端特徴線le,y に設定する。
In the data updating step 38, {l y } obtained in the evaluation function approximation minimizing step 36 is stored in the memory and set to the terminal feature line le , y .

【0060】終了判定ステップ39では、終端特徴線l
e,y が全て画像の左端lo,y に等しければ、処理を終了
する。それ以外の場合は、ステップ37に戻り、処理を
続ける。
In the end judgment step 39, the terminal feature line l
If e and y are all equal to the left end l o, y of the image, the processing is terminated. Otherwise, the process returns to step 37 to continue the processing.

【0061】最後に、3次元座標計算ステップ40で特
徴点軌跡から特徴点の3次元座標を計算する。
Finally, in a three-dimensional coordinate calculation step 40, the three-dimensional coordinates of the characteristic point are calculated from the characteristic point trajectory.

【0062】本実施形態によれば、同一の滑らかなエッ
ジの上にある特徴点の接続がスキャンライン毎に異なら
ないようにすることで、再生画像の画質向上を実現で
き、また、近似的最小化を行うことにより、計算量の増
加を抑えることができる。
According to the present embodiment, the connection of feature points on the same smooth edge is prevented from being different for each scan line, so that the image quality of a reproduced image can be improved. By performing the conversion, an increase in the amount of calculation can be suppressed.

【0063】図4を参照すると、本発明の第2の実施形
態の3次元形状入力プログラムを記録した記録媒体はそ
れぞれ図3中の画像入力ステップ31、画像蓄積ステッ
プ32、特徴線抽出ステップ33、評価値計算ステップ
34、初期値設定ステップ35、接続に基づく評価値計
算ステップ37、評価関数近似的最小化ステップ36、
データ更新ステップ38、終了判定ステップ39、3次
元座標計算ステップ40の各処理41〜50からなる3
次元画像入力プログラムを記録した、FD(フロッピー
ディスク)、CD−ROM、MO(光ディスク)、半導
体メモリなどの記録媒体で、CPUにより3次元形状入
力プログラムが読み出され、実行される。
Referring to FIG. 4, the recording media on which the three-dimensional shape input program according to the second embodiment of the present invention has been recorded are the image input step 31, the image storage step 32, the characteristic line extraction step 33, Evaluation value calculation step 34, initial value setting step 35, evaluation value calculation step 37 based on connection, evaluation function approximate minimization step 36,
The data update step 38, the end determination step 39, and the three-dimensional coordinate calculation step 40 are each composed of processes 41 to 50.
The CPU reads out and executes the three-dimensional shape input program on a recording medium, such as an FD (floppy disk), CD-ROM, MO (optical disk), or semiconductor memory, on which the three-dimensional image input program is recorded.

【0064】[0064]

【発明の効果】以上説明したように、本発明は下記のよ
うな効果がある。
As described above, the present invention has the following effects.

【0065】1)請求項1,5の発明は、カメラ姿勢な
どの変動による影響を評価し、この評価に基づいて入力
画像フレームの重みを算出し、重みを用いた評価関数の
最小化により3次元形状を抽出するので、変動による影
響を軽減させ、安定な3次元形状入力が可能となる。
1) According to the first and fifth aspects of the present invention, the influence of a change in the camera posture or the like is evaluated, the weight of the input image frame is calculated based on the evaluation, and the evaluation function is minimized by using the weight. Since the three-dimensional shape is extracted, the influence of the fluctuation is reduced, and a stable three-dimensional shape input becomes possible.

【0066】2)請求項3,7の発明は、特徴点間の空
間的な接続を考慮した評価関数を近似的に最小化するこ
とにより、特徴点の空間的な接続を考慮した効率のよい
3次元画像入力が可能となる。
2) According to the third and seventh aspects of the present invention, the evaluation function in consideration of the spatial connection between feature points is approximately minimized, so that the efficiency in consideration of the spatial connection of feature points is improved. Three-dimensional image input becomes possible.

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

【図1】本発明の第1の実施形態の3次元形状入力方法
を示すフローチャートである。
FIG. 1 is a flowchart illustrating a three-dimensional shape input method according to a first embodiment of the present invention.

【図2】本発明の第1の実施形態の3次元形状入力プロ
グラムを記録した記録媒体の構成図である。
FIG. 2 is a configuration diagram of a recording medium that records a three-dimensional shape input program according to the first embodiment of the present invention.

【図3】本発明の第2の実施形態の3次元形状入力方法
を示すフローチャートである。
FIG. 3 is a flowchart illustrating a three-dimensional shape input method according to a second embodiment of the present invention.

【図4】本発明の第2の実施形態の、3次元形状入力プ
ログラムを記録した記録媒体の構成図である。
FIG. 4 is a configuration diagram of a recording medium that records a three-dimensional shape input program according to a second embodiment of the present invention.

【図5】従来技術の説明図である。FIG. 5 is an explanatory diagram of a conventional technique.

【図6】誤差関数h(l’,l)の特性を説明する図で
ある。
FIG. 6 is a diagram illustrating characteristics of an error function h (l ′, l).

【図7】スキャンライン間の相関を説明する図である。FIG. 7 is a diagram illustrating a correlation between scan lines.

【符号の説明】[Explanation of symbols]

11 画像入力ステップ 12 画像蓄積ステップ 13 特徴点抽出ステップ 14 特徴点軌跡抽出ステップ 15 重み係数計算ステップ 16 評価関数計算ステップ 17 評価関数最小化ステップ 18 3次元座標計算ステップ 21 画像入力処理 22 画像蓄積処理 23 特徴点抽出処理 24 特徴点軌跡抽出処理 25 重み係数計算処理 26 評価関数計算処理 27 評価関数最小化処理 28 3次元座標計算処理 31 画像入力ステップ 32 画像蓄積ステップ 33 特徴線抽出ステップ 34 評価値計算ステップ 35 初期値設定ステップ 36 評価関数近似的最小化ステップ 37 接続に基づく評価値計算ステップ 38 データ更新ステップ 39 終了判定ステップ 40 3次元座標計算ステップ 41 画像入力処理 42 画像蓄積処理 43 特徴線抽出処理 44 評価値計算処理 45 初期値設定処理 46 評価関数近似的最小化処理 47 接続に基づく評価値計算処理 48 データ更新処理 49 終了判定処理 50 3次元座標計算処理 51 時空間画像 52 エピポーラ画像 53 特徴点軌跡 54 特徴点 55 特徴点間画素 Reference Signs List 11 image input step 12 image storage step 13 feature point extraction step 14 feature point trajectory extraction step 15 weight coefficient calculation step 16 evaluation function calculation step 17 evaluation function minimization step 18 three-dimensional coordinate calculation step 21 image input processing 22 image storage processing 23 Feature point extraction processing 24 Feature point trajectory extraction processing 25 Weight coefficient calculation processing 26 Evaluation function calculation processing 27 Evaluation function minimization processing 28 Three-dimensional coordinate calculation processing 31 Image input step 32 Image storage step 33 Feature line extraction step 34 Evaluation value calculation step 35 Initial value setting step 36 Evaluation function approximate minimization step 37 Evaluation value calculation step based on connection 38 Data update step 39 End judgment step 40 Three-dimensional coordinate calculation step 41 Image input processing 42 Image storage processing 43 Feature line extraction Processing 44 evaluation value calculation processing 45 initial value setting processing 46 evaluation function approximate minimization processing 47 evaluation value calculation processing based on connection 48 data update processing 49 end determination processing 50 three-dimensional coordinate calculation processing 51 spatiotemporal image 52 epipolar image 53 Point locus 54 feature point 55 pixel between feature points

───────────────────────────────────────────────────── フロントページの続き (72)発明者 松田 達樹 東京都新宿区西新宿三丁目19番2号 日本 電信電話株式会社内 ────────────────────────────────────────────────── ─── Continuing on the front page (72) Inventor Tatsuki Matsuda Nippon Telegraph and Telephone Corporation, 3-19-2 Nishishinjuku, Shinjuku-ku, Tokyo

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 カメラを移動させながら画像を入力する
画像入力ステップと、入力された画像列を蓄積し、時空
間画像を形成する画像蓄積ステップと、前記時空間画像
中の特徴点を抽出する特徴点抽出ステップと、該特徴点
の軌跡を抽出する特徴点軌跡抽出ステップと、該特徴点
軌跡から特徴点の3次元座標を計算する3次元座標計算
ステップと、該入力画像と画像生成処理により再構成さ
れる生成画像との差に基づく評価関数を最小になるよう
に該特徴点間の接続関係を決定する特徴点接続線分決定
ステップを有する3次元形状入力方法において、カメラ
の姿勢、移動速度の変動などにより発生するデータの信
頼性を推定し、該信頼性に基づく重みを用いて特徴点接
続線分決定ステップにおける評価関数を計算するステッ
プを有することを特徴とする3次元形状入力方法。
1. An image inputting step of inputting an image while moving a camera, an image storing step of storing an input image sequence to form a spatiotemporal image, and extracting a feature point in the spatiotemporal image. A feature point extraction step, a feature point trajectory extraction step of extracting a trajectory of the feature point, a three-dimensional coordinate calculation step of calculating three-dimensional coordinates of the feature point from the feature point trajectory, and the input image and image generation processing In a three-dimensional shape input method having a feature point connection line segment determining step of determining a connection relationship between feature points so as to minimize an evaluation function based on a difference from a reconstructed generated image, A step of estimating the reliability of data generated due to speed fluctuations and calculating an evaluation function in a feature point connection line segment determining step using a weight based on the reliability. 3D shape input method.
【請求項2】 前記評価関数を計算するステップが、特
徴点軌跡と、該軌跡を近似する直線の差分の自乗和の単
調減少関数で表わされる重みを用いて、任意の特徴点軌
跡の対を接続した場合に発生する誤差を表わす誤差関数
を修正するステップを含む、請求項1記載の3次元形状
入力方法。
2. The method according to claim 1, wherein the step of calculating the evaluation function includes the step of calculating an arbitrary pair of feature point trajectories using a feature point trajectory and a weight represented by a monotone decreasing function of a sum of squares of a difference between straight lines approximating the trajectory. 2. The three-dimensional shape input method according to claim 1, further comprising the step of correcting an error function representing an error generated when the connection is made.
【請求項3】 カメラを移動させながら画像を入力する
画像入力ステップと、入力された画像列を蓄積し、時空
間画像を形成する画像蓄積ステップと、時空間画像中の
特徴点を抽出する特徴点抽出ステップと、該特徴点の軌
跡を抽出する特徴点軌跡抽出ステップと、該特徴点軌跡
から特徴点の3次元座標を計算する3次元座標計算ステ
ップと、該特徴点間の接続関係を決定する特徴点接続線
分決定ステップを有する3次元形状入力方法において、
該特徴点の空間的な接続および該入力画像と画像生成処
理により再構成される生成画像との差に基づく評価関数
を近似的に最小化することにより該特徴点間の接続関係
を決定するステップを有することを特徴とする3次元形
状入力方法。
3. An image input step of inputting an image while moving a camera, an image storing step of storing an input image sequence to form a spatio-temporal image, and a feature of extracting a feature point in the spatio-temporal image. A point extraction step, a feature point trajectory extraction step of extracting a trajectory of the feature point, a three-dimensional coordinate calculation step of calculating three-dimensional coordinates of the feature point from the feature point trajectory, and determining a connection relationship between the feature points A three-dimensional shape input method having a feature point connection line segment determining step
Determining a connection relationship between the feature points by approximately minimizing an evaluation function based on a spatial connection of the feature points and a difference between the input image and a generated image reconstructed by image generation processing. A three-dimensional shape input method, comprising:
【請求項4】 前記評価関数として、隣接するスキャン
ラインにおける2つの特徴線の接続を表わす関数を導入
した評価関数を用いる、請求項3記載の3次元形状入力
方法。
4. The three-dimensional shape input method according to claim 3, wherein an evaluation function introducing a function representing a connection between two characteristic lines in adjacent scan lines is used as the evaluation function.
【請求項5】 カメラを移動させながら画像を入力する
画像入力処理と、入力された画像列を蓄積し、時空間画
像を形成する画像蓄積処理と、前記時空間画像中の特徴
点を抽出する特徴点抽出処理と、該特徴点の軌跡を抽出
する特徴点軌跡抽出処理と、該特徴点軌跡から特徴点の
3次元座標を計算する3次元座標計算処理と、該入力画
像と画像生成処理により再構成される生成画像との差に
基づく評価関数を最小になるように該特徴点間の接続関
係を決定する特徴点接続線分決定処理と、カメラの姿
勢、移動速度の変動などにより発生するデータの信頼性
を推定し、該信頼性に基づく重みを用いて特徴点接続線
分決定処理における評価関数を計算する処理をコンピュ
ータに実行させるための3次元形状入力プログラムを記
録した記録媒体。
5. An image input process for inputting an image while moving a camera, an image storing process for storing an input image sequence to form a spatio-temporal image, and extracting a feature point in the spatio-temporal image. A feature point extraction process, a feature point trajectory extraction process of extracting a trajectory of the feature point, a three-dimensional coordinate calculation process of calculating three-dimensional coordinates of a feature point from the feature point trajectory, and the input image and image generation process The feature point connection line segment determination processing for determining the connection relationship between the feature points so as to minimize the evaluation function based on the difference from the reconstructed generated image, and a change in the posture and moving speed of the camera. A recording medium recording a three-dimensional shape input program for causing a computer to execute a process of estimating data reliability and calculating an evaluation function in a feature point connection line segment determination process using a weight based on the reliability.
【請求項6】 前記評価関数を計算する処理が、特徴点
軌跡と、該軌跡を近似する直線の差分の自乗和の単調減
少関数で表わされる重みを用いて、任意の特徴点軌跡の
対を接続した場合に発生する誤差を表わす誤差関数を修
正する処理を含む、請求項5記載の記録媒体。
6. The process of calculating the evaluation function includes the steps of: using a feature point trajectory and a weight represented by a monotone decreasing function of a sum of squares of a difference between straight lines approximating the trajectory, to obtain an arbitrary pair of feature point trajectories. 6. The recording medium according to claim 5, including a process of correcting an error function representing an error generated when the connection is made.
【請求項7】 カメラを移動させながら画像を入力する
画像入力処理と、入力された画像列を蓄積し時空間画像
を形成する画像蓄積処理と、時空間画像中の特徴点を抽
出する特徴点抽出処理と、該特徴点の軌跡を抽出する特
徴点軌跡抽出処理と、該特徴点軌跡から特徴点の3次元
座標を計算する3次元座標計算処理と、該特徴点の空間
的な接続および該入力画像と画像生成処理により再構成
される生成画像との差に基づく評価関数を近似的に最小
化することにより該特徴点間の接続関係を決定する特徴
点接続線分決定処理をコンピュータに実行させるための
3次元形状入力プログラムを記録した記録媒体。
7. An image input process for inputting an image while moving a camera, an image storage process for storing an input image sequence to form a spatio-temporal image, and a feature point for extracting a feature point in the spatio-temporal image. Extraction processing, feature point trajectory extraction processing for extracting the trajectory of the feature point, three-dimensional coordinate calculation processing for calculating the three-dimensional coordinates of the feature point from the feature point trajectory, spatial connection of the feature point, and A computer executes a feature point connection line segment determination process of determining a connection relationship between the feature points by approximately minimizing an evaluation function based on a difference between an input image and a generated image reconstructed by the image generation process. A recording medium on which a three-dimensional shape input program for causing a computer to execute is input.
【請求項8】 前記評価関数として、隣接するスキャン
ラインにおける2つの特徴線の接続を表わす関数を導入
した評価関数を用いる、請求項6記載の記録媒体。
8. The recording medium according to claim 6, wherein, as said evaluation function, an evaluation function in which a function representing a connection between two characteristic lines in adjacent scan lines is introduced.
JP10144125A 1998-05-26 1998-05-26 Method for inputting three dimensional shape and recording medium for recording three dimensional shape input program Pending JPH11339044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10144125A JPH11339044A (en) 1998-05-26 1998-05-26 Method for inputting three dimensional shape and recording medium for recording three dimensional shape input program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10144125A JPH11339044A (en) 1998-05-26 1998-05-26 Method for inputting three dimensional shape and recording medium for recording three dimensional shape input program

Publications (1)

Publication Number Publication Date
JPH11339044A true JPH11339044A (en) 1999-12-10

Family

ID=15354790

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10144125A Pending JPH11339044A (en) 1998-05-26 1998-05-26 Method for inputting three dimensional shape and recording medium for recording three dimensional shape input program

Country Status (1)

Country Link
JP (1) JPH11339044A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100474837B1 (en) * 2000-09-25 2005-03-08 삼성전자주식회사 Apparatus and method for normalization and feature extraction of 3-Dimension facial data
US10133256B2 (en) 2013-07-19 2018-11-20 Fujitsu Limited Information processing apparatus and method for calculating inspection ranges

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100474837B1 (en) * 2000-09-25 2005-03-08 삼성전자주식회사 Apparatus and method for normalization and feature extraction of 3-Dimension facial data
US10133256B2 (en) 2013-07-19 2018-11-20 Fujitsu Limited Information processing apparatus and method for calculating inspection ranges

Similar Documents

Publication Publication Date Title
JP4074062B2 (en) Semantic object tracking in vector image sequences
JP3576987B2 (en) Image template matching method and image processing apparatus
JP6489551B2 (en) Method and system for separating foreground from background in a sequence of images
JP3679426B2 (en) A system that encodes image data into multiple layers, each representing a coherent region of motion, and motion parameters associated with the layers.
KR100985805B1 (en) Apparatus and method for image stabilization using adaptive Kalman filter
CN108765317B (en) Joint optimization method for space-time consistency and feature center EMD self-adaptive video stabilization
US10818018B2 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
US8711938B2 (en) Methods and systems for motion estimation with nonlinear motion-field smoothing
JP2007000205A (en) Image processing apparatus, image processing method, and image processing program
US20130027775A1 (en) Image stabilization
US20210256299A1 (en) System and method for correspondence map determination
JP2001520781A (en) Motion or depth estimation
US7477769B2 (en) Data processing method usable for estimation of transformed signals
Zucchelli et al. Multiple Plane Segmentation Using Optical Flow.
JP3914973B2 (en) Image motion detection device
JP2003203237A (en) Image matching method and device, and image coding method and device
JP7312026B2 (en) Image processing device, image processing method and program
JP2005339535A (en) Calculation of dissimilarity measure
JP2019507934A (en) 3D motion evaluation apparatus, 3D motion evaluation method, and program
JPH11339044A (en) Method for inputting three dimensional shape and recording medium for recording three dimensional shape input program
JP2000088523A (en) Recognition equipment and method of object using feature vector
KR101544156B1 (en) Video retargeting method
JP3523064B2 (en) Three-dimensional shape input method and recording medium storing three-dimensional shape input program
CN116684748B (en) Photographic composition frame generation method and device and photographic equipment
JP4392288B2 (en) Image processing method, image processing program, and image processing apparatus