JPH0561972A - Gradation converter - Google Patents

Gradation converter

Info

Publication number
JPH0561972A
JPH0561972A JP3220553A JP22055391A JPH0561972A JP H0561972 A JPH0561972 A JP H0561972A JP 3220553 A JP3220553 A JP 3220553A JP 22055391 A JP22055391 A JP 22055391A JP H0561972 A JPH0561972 A JP H0561972A
Authority
JP
Japan
Prior art keywords
gradation
input
function
limit value
conversion
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
JP3220553A
Other languages
Japanese (ja)
Inventor
Masayuki Aoki
政之 青木
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 JP3220553A priority Critical patent/JPH0561972A/en
Publication of JPH0561972A publication Critical patent/JPH0561972A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

PURPOSE:To decide desired transfer characteristic uniquely as keeping the smoothness of gradation in the neighborhood of the boundary of a processing targeted gradation area. CONSTITUTION:The gradation of a digital input image stored in input image memory 3 is converted to desired gradation and is outputted to output image memory 4 by inputting an input data point consisting of processing targeted input gradation and transfer output gradation for the input gradation from an input means 1 with a value between the lower limit value and the upper limit value of an input gradation area. finding the coefficient of a natural spline interpolation function to satisfy the input data point, and generating a transfer function by a function generating means 2.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、デジタル画像処理装置
の階調変換装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a gradation conversion device for a digital image processing device.

【0002】近年のディジタル画像処理システムの多様
化の要求に伴い、処理対象画像の任意の階調域を柔軟に
操作できるシステムが要求されている。このため、階調
変換処理または濃度変換処理などの技術が提供されてい
るが、所望の変換テーブルを発生するにあたり、階調域
固定の変換特性テーブル、あるいは、階調域固定の変換
関数を圧縮・伸張および加算・減算しており、発生でき
る変換特性に制限がある。また、処理対象階調域に所望
の変換特性をかけた場合、処理対象階調域と処理対象外
階調域との境界で階調の滑らかさが失われるため、これ
を補正する必要がある。
With the recent demand for diversification of digital image processing systems, there is a demand for a system capable of flexibly operating an arbitrary gradation range of an image to be processed. For this reason, technologies such as gradation conversion processing or density conversion processing have been provided. However, when generating a desired conversion table, a conversion characteristic table with a fixed gradation range or a conversion function with a fixed gradation range is compressed. -Expansion and addition / subtraction are performed, so there are restrictions on the conversion characteristics that can be generated. Further, when a desired conversion characteristic is applied to the processing target gradation range, the smoothness of gradation is lost at the boundary between the processing target gradation range and the non-processing target gradation range, which needs to be corrected. ..

【0003】[0003]

【従来の技術】従来の階調変換処理においては、所望の
変換テーブルを発生するにあたり、階調域固定の変換特
性テーブル、あるいは、階調域固定の変換関数を圧縮・
伸張および加算・減算していた。ところが、処理対象階
調域を自由に変動させた場合、発生できる変換特性に制
限があり、かつ、処理対象階調域と処理対象外階調域と
の境界で階調の滑らかさが失われるため、所望の画像特
性を得るために変換特性をさらに微調整する必要があ
る。
2. Description of the Related Art In the conventional gradation conversion processing, when generating a desired conversion table, a conversion characteristic table with a fixed gradation range or a conversion function with a fixed gradation range is compressed.
It was expanding and adding / subtracting. However, when the to-be-processed tone range is freely changed, the conversion characteristics that can be generated are limited, and the tone smoothness is lost at the boundary between the to-be-processed tone range and the non-to-be-processed tone range. Therefore, it is necessary to further finely adjust the conversion characteristics in order to obtain desired image characteristics.

【0004】[0004]

【発明が解決しようとする課題】従って、所望の画像特
性を得ようとする場合、所要の変換特性テーブルを一義
的に決定できず、作成した変換テーブルをさらに調整す
るか、あるいは僅かな階調変換を行うための変換テーブ
ルを何度も使用することによって所望の画像特性に近似
させなければならないといった問題を生じていた。
Therefore, in order to obtain a desired image characteristic, the required conversion characteristic table cannot be uniquely determined, and the generated conversion table is further adjusted or a slight gradation is obtained. There has been a problem that a desired image characteristic must be approximated by using a conversion table for converting many times.

【0005】本発明は、このような従来の問題点を解決
するため、処理対象階調域の境界付近における階調の滑
らかさを保持しつつ、所望の変換特性テーブルを一義的
に決定できる関数発生手段を備えた階調変換装置を提供
することを目的とする。
In order to solve such a conventional problem, the present invention is a function that can uniquely determine a desired conversion characteristic table while maintaining the smoothness of gradation near the boundary of the gradation range to be processed. It is an object of the present invention to provide a gradation conversion device equipped with a generating means.

【0006】[0006]

【課題を解決するための手段】図1は本発明の原理図で
ある。同図において、1は入力階調域の下限値と上限値
との間の値で処理対象入力階調とこれに対する変換出力
階調からなる入力データ点を入力する入力手段、2は前
記入力データ点を満す自然スプライン補間関数の係数を
求め変換関数を発生する関数発生手段、3は変換処理対
象のデジタル画像を格納する入力画像メモリ、4は変換
された画像を格納する出力画像メモリである。
FIG. 1 shows the principle of the present invention. In the figure, reference numeral 1 is a value between the lower limit value and the upper limit value of the input gradation range, and input means for inputting an input data point composed of an input gradation to be processed and a conversion output gradation corresponding thereto, 2 is the input data Function generating means for obtaining the coefficient of the natural spline interpolation function satisfying the points and generating the conversion function, 3 is an input image memory for storing the digital image to be converted, and 4 is an output image memory for storing the converted image. ..

【0007】また、前記関数発生手段2は、入力階調域
の下限値と処理対象入力階調の下限値間および入力階調
域の上限値と処理対象入力階調の上限値間にも前記変換
関数を外延するようにする。
The function generating means 2 also operates between the lower limit value of the input gradation range and the lower limit value of the processing target input gradation and between the upper limit value of the input gradation range and the upper limit value of the processing target input gradation. Extend the conversion function.

【0008】また、外延した前記変換関数の値が、入力
階調域の下限値と処理対象入力階調の下限値間で出力階
調域の下限値以下となるときは出力階調域の下限値と
し、入力階調域の上限値と処理対象入力階調の上限値間
で出力階調域の上限値以上となるときは出力階調域の上
限値とするようにする。
When the value of the extended conversion function is less than or equal to the lower limit value of the output gradation range between the lower limit value of the input gradation range and the lower limit value of the input gradation to be processed, the lower limit of the output gradation range is obtained. When the value is equal to or more than the upper limit value of the output gradation range between the upper limit value of the input gradation range and the upper limit value of the input gradation to be processed, the upper limit value of the output gradation range is set.

【0009】また、前記入力手段1より、処理対象入力
階調と変換出力階調の各下限値および上限値と変換関数
のパターンとこのパターンからの変形の度合を示す重み
値とを入力するようにする。
Further, the input means 1 inputs the respective lower and upper limit values of the input gradation to be processed and the converted output gradation, the pattern of the conversion function, and the weight value indicating the degree of deformation from this pattern. To

【0010】[0010]

【作用】関数発生手段2で生成する自然スプライン補間
関数の性質について説明する。入力階調域は0〜M階調
とし、変換出力階調域は0〜N階調とする。処理対象入
力階調のデータは0≦x1 <x2 <…<xn ≦M,変換
出力階調のデータは0≦y1 <y2 <…<yn ≦N,と
し、データ点を(xk ,yk )で表わす。
The nature of the natural spline interpolation function generated by the function generating means 2 will be described. The input gradation range is 0 to M gradations, and the conversion output gradation range is 0 to N gradations. The data of the input gradation to be processed is 0 ≦ x 1 <x 2 <... <x n ≦ M, and the data of the conversion output gradation is 0 ≦ y 1 <y 2 <... <y n ≦ N. It is represented by (x k , y k ).

【0011】x1 ,x2 …xn を連結点とする2m−1
次(m=2,3,…)の自然スプライン補間関数s
(x)は次式で与えられる。
2m-1 with x 1 , x 2 ... X n as connection points
Next (m = 2, 3, ...) Natural spline interpolation function s
(X) is given by the following equation.

【数1】 ここでpm-1 (x)はm−1次の多項式であり、ci
定数係数で次の条件を満す。
[Equation 1] Here, p m-1 (x) is a polynomial of degree m-1, and c i is a constant coefficient that satisfies the following condition.

【数2】 また、(x−xi + 2m-1は切断べき関数で、[Equation 2] Also, (x−x i ) + 2m−1 is a cutting power function,

【数3】 である。[Equation 3] Is.

【0012】次に(1)式で示す自然スプライン補間関
数が各連結点x1 ,x2 ,…xn で滑らかに接続するこ
とを説明する。説明を理解しやすくするため3次の場
合、つまり(1)式において2m−1=3、つまりm=
2の場合で説明する。すると(1)式は次のようにな
る。
Next, it will be explained that the natural spline interpolation function represented by the equation (1) is smoothly connected at the respective connection points x 1 , x 2 , ... X n . In order to make the explanation easier to understand, in the case of the third order, that is, 2m-1 = 3 in the formula (1), that is, m =
The case of 2 will be described. Then, the equation (1) becomes as follows.

【数4】 ここでp1 (x)は1次式であるのでa,bを任意の定
数として p1 (x)=ax+b (5) とすれば(4)式は
[Equation 4] Here, since p 1 (x) is a linear equation, if a 1 and b are arbitrary constants and p 1 (x) = ax + b (5), then equation (4) becomes

【数5】 となる。またci は定数係数で次式の条件を満たす。[Equation 5] Becomes Further, c i is a constant coefficient that satisfies the following condition.

【数6】 ここで(x−xi + 3 は次式で表わされる。[Equation 6] Here (x-x i) + 3 is represented by the following equation.

【数7】 即ち、(6)式は、区間[−∞,∞]において、前記、
1 ,x2 …,xn を連結点とするn+1個の多項式の
線形結合を一義的に表したものといえる。次に、(6)
式によって、これらn+1個の多項式が連結点x1 、x
2 …,x n において滑らかに連結することを示す。
[Equation 7]That is, the equation (6) is expressed by the above in the interval [−∞, ∞]
x1, X2…, XnOf n + 1 polynomials with
It can be said that the linear combination is uniquely expressed. Next, (6)
According to the formula, these n + 1 polynomials are connected points x1, X
2…, X nIndicates that the connection is smooth at.

【0013】データ点(x1 ,y1 )における左側関数
L (x)および、右側関数sR (x)は(6)式よ
り、 sL (x)=ax+b (9) sR (x)=ax+b+c1 (x−x1 3 ……(10) となる。また、これらの1階微分はそれぞれ、 sL ’(x)=a (11) sR ’(x)=a+3・c1 (x−x1 2 ……(12) となる。よって、(9)〜(12)式からx=x1 におい
て、sL (x1 )=sR(x1 )=ax1 +bであり、
かつ、sL ’(x1 )=sR ’(x1 )=aとなる。即
ち、前記左側関数と右側関数は、連結点x1 において共
に関数値ax1 +bを持ち、かつ、傾きaを持つ。
The left-side function s L (x) and the right-side function s R (x) at the data point (x 1 , y 1 ) are expressed by the equation (6) as follows: s L (x) = ax + b (9) s R (x ) = Ax + b + c 1 (x−x 1 ) 3 (10) The first-order differentials of these are respectively s L '(x) = a (11) s R ' (x) = a + 3 · c 1 (x-x 1 ) 2 (12). Therefore, from equations (9) to (12), at x = x 1 , s L (x 1 ) = s R (x 1 ) = ax 1 + b,
And, s L ′ (x 1 ) = s R ′ (x 1 ) = a. That is, the left-side function and the right-side function both have the function value ax 1 + b at the connecting point x 1 and have the slope a.

【0014】同様に、データ点(xk ,yk )(k=
2,3,…,n)における左側関数s L (x)および、
右側関数sR (x)は、次のように表わされる。
Similarly, the data points (xk, Yk) (K =
Left side function s in 2, 3, ..., N) L(X) and
Right-hand side function sR(X) is expressed as follows.

【数8】 また、これらの1階微分はそれぞれ次式で表わされる。[Equation 8] Further, each of these first-order differentials is expressed by the following equation.

【数9】 これにより(13)〜(16)式からx=xk において次式
となる。
[Equation 9] As a result, the following equation is obtained when x = x k from the equations (13) to (16).

【数10】 すなわち、上述の左側関数と右側関数は連結点xk にお
いて共に次式に示す関数値を持ち、
[Equation 10] That is, the above-mentioned left-hand side function and right-hand side function both have the function value shown in the following equation at the connection point x k ,

【数11】 かつ、次式の傾きを有する。[Equation 11] And, it has the slope of the following equation.

【数12】 [Equation 12]

【0015】以上により、n+1個の多項式が連結点x
1 ,x2,…,xn において滑らかに連結することがわ
かる。即ち、本発明の実現するところは、区間[−∞,
1 ],[x1 ,x2 ],…,[xn ,∞]におけるn
+1個の多項式を求め、入力画像の有効階調域[0,
M]における処理対象階調域[x1 ,xn ](x1
0,xn ≦M)および処理対象外階調域[0,x1 ],
[xn ,M]において、前記n+1個の多項式を適用す
ることにある。
From the above, n + 1 polynomials are connected points x
It can be seen that the connection is smooth at 1 , x 2 , ..., X n . That is, the realization of the present invention is that the interval [−∞,
n in x 1 ], [x 1 , x 2 ], ..., [x n , ∞]
+1 polynomial is obtained, and the effective gradation range [0,
Processing target gradation range [x 1 , x n ] (x 1
0, x n ≤ M) and the gradation range not to be processed [0, x 1 ],
In [x n , M], the n + 1 polynomials are applied.

【0016】次に、前記n+1個の多項式の求めかたに
ついて説明する。n+1個の多項式は、(6)式より、
次式となる。
Next, how to obtain the n + 1 polynomials will be described. From the equation (6), the n + 1 polynomials are
It becomes the following formula.

【数13】 また、ci は(7)式より[Equation 13] Also, c i is calculated from equation (7)

【数14】 および[Numerical equation 14] and

【数15】 を満たす。ここで、連結点x1 ,x2 …,xn は、関数
値y1 ,y2 ,…,ynを持つため、(17) 式から、
[Equation 15] Meet Here, since the connection points x 1 , x 2, ..., X n have function values y 1 , y 2 , ..., Y n , from equation (17),

【数16】 となる。即ち、(18)〜(20)式はa,b,c1 ,c2
…cn を未定係数とするn+2元連立1次方程式であ
る。よって、これをガウスの消去法などで解くことによ
り未定係数を求めることができる。
[Equation 16] Becomes That is, equations (18) to (20) are a, b, c 1 , c 2
... is an n + 2-way simultaneous linear equations for the unknown coefficients a c n. Therefore, the undetermined coefficient can be obtained by solving this with the Gaussian elimination method or the like.

【0017】このようにして、関数発生手段2は、n個
のデータ点(x1 ,y1 ),(x2,y2 ),…,(x
n ,yn )(ただし、0≦x1 <x2 <…<xn ≦M)
から、区間[0,x1 ],[x1 ,x2 ],…,[x
n-1 ,xn ],[xn ,M]に対応するn+1個の関数
を発生する。これにより処理対象入力階調の下限値x1
と入力階調域の下限値0との間の[0,x1 ]の区間、
および入力階調域の上限値Mと処理対象入力階調の上限
値xnとの間の[xn ,M]の区間にも滑らかに接続す
る変換関数が外延される。
In this way, the function generating means 2 has n data points (x 1 , y 1 ), (x 2 , y 2 ), ..., (x
n , y n ) (where 0 ≦ x 1 <x 2 <... <x n ≦ M)
From the interval [0, x 1 ], [x 1 , x 2 ], ..., [x
Generate n + 1 functions corresponding to n-1 , xn ], [ xn , M]. As a result, the lower limit value x 1
Between [0, x 1 ] and the lower limit value 0 of the input gradation range,
Also, the conversion function that smoothly connects to the section of [x n , M] between the upper limit value M of the input gradation range and the upper limit value x n of the processing target input gradation is extended.

【0018】処理対象入力階調の上限,下限は目視によ
って定められる場合が多い。このようなとき、これら上
限,下限を越えた範囲にも必要な画像が存在することが
ある。このため、入力階調全域にわたり関数を外延する
ことが必要となる。
The upper and lower limits of the input tone to be processed are often determined visually. In such a case, a necessary image may exist in a range exceeding these upper and lower limits. Therefore, it is necessary to extend the function over the entire input gradation.

【0019】変換関数のとりうる範囲は変換出力階調全
域の[0,N]の範囲である。故に変換関数が下限の0
以下となるときは、0とし、上限のNを越えるときはN
とする必要がある。
The range that can be taken by the conversion function is the range of [0, N] of the entire converted output gradation. Therefore, the conversion function has a lower limit of 0.
When it is less than or equal to 0, it is set to 0, and when it exceeds the upper limit N, N
And need to.

【0020】変換関数の形状を予めいくつかのパターン
に分類しておき、処理対象入力階調とこの変換出力階調
の各下限値(x1 ,y1 )と上限値(xn ,yn )およ
びパターンとこのパターンからの変形の度合を示す重み
値を入力することにより変換関数の係数を決めることが
できる。これにより各データ点(x1 ,y1 ),
(x 2 ,y2 ),…(xn ,yn )を入力するよりも入
力が簡易化されることが多くなる。
The shape of the conversion function is preset in several patterns.
The input target gradation and this conversion output gradation are classified into
Each lower limit of (x1, Y1) And the upper limit (xn, Yn) And
And the weight that indicates the pattern and the degree of deformation from this pattern
You can determine the coefficient of the conversion function by entering the value.
it can. This gives each data point (x1, Y1),
(X 2, Y2),… (Xn, Yn) Rather than typing
The force is often simplified.

【0021】[0021]

【実施例】以下、本発明の実施例を図面を参照して説明
する。図2は本発明の第1実施例に係わる階調変換テー
ブル作成装置のブロックダイヤグラムである。本実施例
に係わる階調変換テーブル作成装置18は、関数発生手段
16とテーブル作成手段17からなる。また、関数発生手段
16は、係数算出手段12と関数定義手段13とからなり、テ
ーブル作成手段17は、関数値算出手段14と階調有効領域
まるめ手段15とからなる。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 2 is a block diagram of the gradation conversion table creating apparatus according to the first embodiment of the present invention. The gradation conversion table creating device 18 according to the present embodiment is a function generating unit.
16 and table creating means 17. Also, the function generating means
16 comprises a coefficient calculating means 12 and a function defining means 13, and the table creating means 17 comprises a function value calculating means 14 and a gradation effective area rounding means 15.

【0022】本実施例では、階調として入力階調域、変
換後の出力階調域を共8ビットを用い0〜255 の256 階
調とする。しかし、入力階調域を256 階調、出力階調域
を16ビットの65536 階調としてもよい。つまり入力階調
域をM階調、出力階調域をN階調としてよい。
In the present embodiment, the input gradation area is used as the gradation and the output gradation area after the conversion is set to 256 gradations of 0 to 255 by using 8 bits. However, the input gradation range may be 256 gradations and the output gradation range may be 16536-bit 65536 gradations. That is, the input gradation range may be M gradations and the output gradation range may be N gradations.

【0023】n個のデータ点(x1 ,y1 ),(x2
2 ),…,(xn ,yn )(ただし、0≦x1 <x2
<…<xn ≦255 )は、データ点入力手段11から入さ
れ、係数算出手段12へと渡される。係数算出手段12で
は、n個のデータ点からn+2個(a,b,c1
2 ,…,cn )の未定係数を算出し、この未定係数を
関数定義手段13へ渡す。関数定義手段13では、n+2個
の未定係数から、区間[0,x 1 ],[x1 ,x2 ],
…,[xn-1 ,xn ],[xn ,255 ]に対応するn+
1個の関数を定義する。以上により、関数発生手段13に
おいて、n+1個の関数を発生できる。
N data points (x1, Y1), (X2
y2), ..., (xn, Yn) (Where 0 ≦ x1<X2
<... <xn≤255) is entered from the data point input means 11.
And is passed to the coefficient calculation means 12. With coefficient calculation means 12
Is n + 2 (a, b, c from n data points1
c2, ..., cn), The undetermined coefficient of
It is passed to the function definition means 13. In the function definition means 13, n + 2
From the undetermined coefficient of, the interval [0, x 1], [X1, X2],
…, [Xn-1, Xn], [Xn, 255] corresponding to n +
Define a function. From the above, the function generating means 13
In this case, n + 1 functions can be generated.

【0024】図3は関数発生手段16で発生した関数
1 ,s2 ,…sn ,sn+1 を示す。関数sk は区間
[xk-1 ,xk ]で発生し、s1 は区間[0,x1 ],
n+1 は区間[xn ,255 ]で発生する。
FIG. 3 shows the functions s 1 , s 2 , ... S n , s n + 1 generated by the function generating means 16. The function s k occurs in the interval [x k-1 , x k ], and s 1 is in the interval [0, x 1 ],
s n + 1 occurs in the interval [x n , 255].

【0025】関数値算出手段14では、関数発生手段16で
発生した区間[0,x1 ],[x1,x2 ],…,[x
n-1 ,xn ],[xn ,255 ]に対応する関数により、
入力値[0,255 ]に対する関数値を求め、階調有効領
域まるめ手段15へ渡す。階調有効領域まるめ手段15で
は、関数値の少数点以下を四捨五入し、かつ、0より小
さい関数値は0に、255 より大きい関数値は255 にし、
この関数値を入力に対する出力値とする。以上により、
テーブル作成手段17において、入力値に対する出力値が
決定され、階調変換テーブルが作成される。
In the function value calculating means 14, sections [0, x 1 ], [x 1 , x 2 ], ..., [x generated by the function generating means 16 are generated.
By the function corresponding to [ n-1 , x n ], [x n , 255],
A function value for the input value [0, 255] is obtained and passed to the gradation effective area rounding means 15. The gradation effective area rounding means 15 rounds off the decimal point of the function value and below, and sets the function value smaller than 0 to 0 and the function value larger than 255 to 255.
This function value is the output value for the input. From the above,
The table creating means 17 determines the output value for the input value and creates the gradation conversion table.

【0026】階調変換手段20では、入力画像メモリ装置
19から、任意のアドレスにおける1画素の濃度値[0,
255 ]を入力し、階調変換テーブル作成装置18で作成さ
れたテーブルにより出力値[0,255 ]を決定し、これ
を出力画像メモリ装置21の同アドレスの濃度値とする。
In the gradation converting means 20, the input image memory device
From 19, the density value of one pixel at an arbitrary address [0,
255] is input, the output value [0, 255] is determined by the table created by the gradation conversion table creating device 18, and this is set as the density value at the same address of the output image memory device 21.

【0027】次に、3個のデータ点(n=3)における
関数発生手段16の動作を説明する。3個のデータ点(x
1 ,y1 ),(x2 ,y2 ),(x3 ,y3 )(ただ
し、0≦x1 <x2 <x3 ≦255 )は、データ点入力手
段11から入力され、係数算出手段12へと渡される。係数
算出手段12では、3個のデータ点から5個(a,b,c
1 ,c2 ,c3 )の未定係数を算出する。具体的な算出
方法は、(18)式〜(20)式より、次の5元連立1次方
程式をガウスの消去法などで解けばよい。
Next, the operation of the function generating means 16 at three data points (n = 3) will be described. 3 data points (x
1 , y 1 ), (x 2 , y 2 ), (x 3 , y 3 ) (where 0 ≦ x 1 <x 2 <x 3 ≦ 255) are input from the data point input means 11 to calculate coefficients. Passed to means 12. In the coefficient calculating means 12, five data points (a, b, c) from three data points
The undetermined coefficient of 1 , c 2 , c 3 ) is calculated. As a specific calculation method, the following five-element simultaneous linear equations may be solved by the Gauss elimination method or the like from the equations (18) to (20).

【数17】 [Numerical equation 17]

【0028】関数定義手段13では、上記で求めた5個の
未定係数を受け取り、(17)式より、区間[0,
1 ],[x1 ,x2 ],[x2 ,x3 ],[x3 ,25
5 ]に対応する以下の4個の関数を定義する。4の
1 ,s2 ,s3 ,s4 はこの4個の関数を示す。
The function defining means 13 receives the five undetermined coefficients obtained above, and from the equation (17), the interval [0,
x 1 ], [x 1 , x 2 ], [x 2 , x 3 ], [x 3 , 25
The following four functions corresponding to [5] are defined. S 1 , s 2 , s 3 , and s 4 of 4 indicate these four functions.

【数18】 [Equation 18]

【0029】関数値算出手段14では、関数発生手段16で
発生した区間[0,x1 ],[x1,x2 ],[x2
3 ],[x3 ,255 ]に対応する関数により、入力値
[0,255 ]に対する関数値を求め、階調有効領域まる
め手段15へ渡す。階調有効領域まるめ手段15では、関数
値の少数点以下を四捨五入し、かつ、0より小さい関数
値は0に、255 より大きい関数値は255 にし、この関数
値を入力に対する出力値とする。
In the function value calculating means 14, the sections [0, x 1 ], [x 1 , x 2 ], [x 2 ,
x 3], the function corresponding to [x 3, 255], obtains a function value for an input value [0,255], and passes to the tone effective area rounding means 15. The gradation effective area rounding means 15 rounds off the decimal points of the function value and below, and sets the function value smaller than 0 to 0 and the function value larger than 255 to 255, and makes this function value the output value for the input.

【0030】図5は図4に示した関数s1 を丸めた状態
を示す。図6は同様にして4個のデータ点(n=4)に
おける関数発生手段16による関数発生を示し、図7は
[0,x1 ]および[x4 ,255 ]の区間におけるデー
タの丸めの状態を示す。すなわち[0,x1 ]区間では
0以下は0とし、[x4 ,255 ]区間では255 以上を25
5 にしている。
FIG. 5 shows a state in which the function s 1 shown in FIG. 4 is rounded. FIG. 6 similarly shows the function generation by the function generating means 16 at four data points (n = 4), and FIG. 7 shows the rounding of the data in the interval [0, x 1 ] and [x 4 , 255]. Indicates the state. That is, 0 or less is set to 0 in the [0, x 1 ] section, and 255 or more is set to 25 in the [x 4 , 255] section.
I am at 5.

【0031】次に第2実施例を説明する。図8は第2実
施例の構成を示すブロック図である。図2と同一符号は
同一の機能を有するブロックを表わす。本実施例は第1
実施例が入力データとしてデータ点を入力したのに対し
て、最初基準となるデータ点と変換曲線のパターンとそ
のパターンを変形させる重みを入力することにより入力
データを少くし、使いやすくしたものである。入力手段
22はこのようなデータを入力するものであり、データ点
算出手段23はこのようなデータを第1実施例のデータ点
に変換して以降の処理を第1実施例と同じにしたもので
ある。
Next, a second embodiment will be described. FIG. 8 is a block diagram showing the configuration of the second embodiment. The same reference numerals as those in FIG. 2 represent blocks having the same functions. This embodiment is the first
In contrast to the data point input as the input data in the embodiment, the input data is reduced by inputting the data point serving as the reference, the pattern of the conversion curve, and the weight for deforming the pattern, which is easy to use. is there. Input means
22 is for inputting such data, and the data point calculating means 23 is for converting such data into data points of the first embodiment and making the subsequent processing the same as in the first embodiment. ..

【0032】図9は変換曲線のパターンを示す図であ
る。本発明では変換曲線は任意の形状にすることができ
るが、通常使用する形状はいくつかのパターンに分類す
ることができる。そしてこのパターンを、使用するケー
スに合せて変形するようにする。このようにすると、入
力データを少くすることができ、使い易くなる。
FIG. 9 is a diagram showing a pattern of a conversion curve. In the present invention, the conversion curve can have any shape, but the shape that is normally used can be classified into several patterns. Then, this pattern is deformed according to the case to be used. In this way, the input data can be reduced and it becomes easy to use.

【0033】処理対象階調の始点をx1 ,終点をx2
処理対象階調に対する出力階調の始点をy1 ,終点をy
2 とする。始点(x1 ,y1 )をa,終点(x2
2 )をbとし、直線abの中点をd、aより1/4の
点をc、3/4点をeとする。パターンの曲線は全て
a,b点を通るようにする。Aタイプ曲線は点hを通る
曲線である。ここでhは(x1 ,y1 ),(x2
2 )より表わすことのできる点とし(xm ’yn ’)
とする。同様にBタイプ曲線はa,b点とi 点を通る曲
線であり、Cタイプ曲線はa,b点、d点,f点,k点
を通る曲線、Dタイプ曲線はa,b点、d点,g点,j
点を通る曲線である。
The starting point of the gradation to be processed is x 1 , the ending point is x 2 ,
The start point of the output gradation with respect to the processing target gradation is y 1 , and the end point is y.
Set to 2 . The start point (x 1 , y 1 ) is a and the end point (x 2 , y 1 ) is
Let y 2 ) be b, the middle point of the straight line ab be d, the quarter point from a is c, and the 3/4 point is e. All the curves of the pattern should pass through points a and b. The A type curve is a curve that passes through the point h. Where h is (x 1 , y 1 ), (x 2 ,
y 2 ) as a point that can be represented (x m 'y n ')
And Similarly, a B type curve is a curve that passes points a, b and i, a C type curve is a curve that passes points a, b, d, f and k, and a D type curve is a, b point, d. Point, g point, j
It is a curve that passes through points.

【0034】図10はAタイプ曲線を表わす図である。 d点は(x1 +x2 )/2,(y1 +y2)/2 h点は(3x1 +x2 )/2,(y1 +3y2 )/2 で表わされる。直線dhをベクトルwaとし、waの量
を指定することにより、dh間の任意の点を指定するこ
とができる。これにより曲線Aの形状を可変とすること
ができる。この場合、入力手段22からは(x1
1 ),(x2 ,y2 ),Aタイプ曲線,および重みw
aの値を入れればよく入力データを少くすることができ
る。
FIG. 10 is a diagram showing an A type curve. The d point is represented by (x 1 + x 2 ) / 2, (y 1 + y 2 ) / 2, and the h point is represented by (3x 1 + x 2 ) / 2, (y 1 + 3y 2 ) / 2. An arbitrary point between dh can be designated by setting the straight line dh as the vector wa and designating the amount of wa. Thereby, the shape of the curve A can be changed. In this case, (x 1 ,
y 1 ), (x 2 , y 2 ), A type curve, and weight w
By inputting the value of a, the input data can be reduced.

【0035】図11はBタイプ曲線を表わす図である。 i 点は(x1 +3x2 )/2,(3y1 +y2 )/2 で表わされる。直線di をベクトルwbとし、wbの値
を変えることにより曲線形状を変形することができる。
FIG. 11 is a diagram showing a B type curve. The i point is represented by (x 1 + 3x 2 ) / 2, (3y 1 + y 2 ) / 2. The straight line di can be used as the vector wb, and the curve shape can be transformed by changing the value of wb.

【0036】図12はCタイプ曲線を表わす図である。 c点は(3x1 +x2 )/4,(3y1 +y2 )/4 f点は(7x1 +x2 )/8,(5y1 +3y2 )/8 e点は(x1 +3x2 )/4,(y1 +3y2 )/4 k点は(x1 +7x2 )/8,(3y1 +5y2 )/8 で表わすことができ、直線cfをベクトルwc,直線e
kをベクトルwdとする。この場合はベクトルwc,w
dの2つを指示することになる。
FIG. 12 is a diagram showing a C type curve. c point is (3x 1 + x 2 ) / 4, (3y 1 + y 2 ) / 4 f point is (7x 1 + x 2 ) / 8, (5y 1 + 3y 2 ) / 8 e point is (x 1 + 3x 2 ) / 4, (y 1 + 3y 2 ) / 4 k points can be represented by (x 1 + 7x 2 ) / 8, (3y 1 + 5y 2 ) / 8, and the straight line cf is the vector wc and the straight line e.
Let k be the vector wd. In this case, the vectors wc, w
Two of d will be instructed.

【0037】図13はDタイプ曲線を表す図である。 c点は(3x1 +x2 )/4,(3y1 +y2 )/4 g点は(5x1 +3x2 )/8,(7y1 +y2 )/8 e点は(x1 +3x2 )/4,(y1 +3y2 )/4 j点は(3x1 +5x2 )/8,(y1 +7y2 )/8 で表わすことができ、直線cgをベクトルwe,直線e
jをベクトルwfとする。この場合もベクトルwe,w
fの2つを指示することになる。
FIG. 13 is a diagram showing a D-type curve. c point is (3x 1 + x 2 ) / 4, (3y 1 + y 2 ) / 4 g point is (5x 1 + 3x 2 ) / 8, (7y 1 + y 2 ) / 8 e point is (x 1 + 3x 2 ) / 4, (y 1 + 3y 2 ) / 4 j points can be represented by (3x 1 + 5x 2 ) / 8, (y 1 + 7y 2 ) / 8, and the straight line cg is the vector we and the straight line e.
Let j be the vector wf. Also in this case, the vectors we and w
Two of f will be instructed.

【0038】以上のように(x1 ,y1 ),(x2 ,y
2 )と曲線タイプおよびベクトルの値を指定すれば曲線
を指定することができるので、入力操作が簡易化され、
使い易い装置となる。
As described above, (x 1 , y 1 ), (x 2 , y
2 ) and the curve type and vector value can be specified to specify the curve, which simplifies the input operation.
It becomes an easy-to-use device.

【0039】[0039]

【発明の効果】以上説明したように、本発明の階調変換
テーブル作成装置によれば、入力されたn個のデータ点
または、処理対象階調および処理対象階調に対する出力
階調および重み値の入力から発生したn個のデータ点
を、一義的に表現された関数により滑らかに結ばれるこ
とにより、実運用上、階調変換テーブル数はほぼ無数通
り可能であり、かつ、処理対象階調領域と処理対象外階
調領域との境界で、階調の滑らかさが失われることはな
い。つまり、処理対象画像の任意の階調域を操作しよう
とする場合、処理対象階調領域を所望の画像特性にする
ための所要の階調変換特性を決定すれば、処理対象外階
調領域の変換特性も、互いの境界で階調の滑らかさが失
われないような関数を同時に発生することができる。さ
らに、所要の変換特性は実運用上ほぼ無数通り可能であ
るため、本発明によって得られる出力画像特性もほぼ無
数通り可能である。また、曲線の形状をパターン化する
ことにより、入力データを少くし、使い易くすることが
できる。
As described above, according to the gradation conversion table creating apparatus of the present invention, the input n data points or the processing target gradation and the output gradation and the weight value for the processing target gradation. By smoothly connecting the n number of data points generated from the input by the function that is uniquely expressed, the number of gradation conversion tables is practically infinite, and the gradations to be processed are practically possible. The smoothness of the gradation is not lost at the boundary between the area and the non-processing gradation area. In other words, when trying to operate an arbitrary gradation region of the processing target image, by determining the necessary gradation conversion characteristics for making the processing target gradation region the desired image characteristic, The conversion characteristics can simultaneously generate a function such that the smoothness of gradation is not lost at the boundary between them. Further, since the required conversion characteristics can be almost infinite in practical use, the output image characteristics obtained by the present invention can be infinitely different. Further, by patterning the shape of the curve, it is possible to reduce the input data and make it easier to use.

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

【図1】本発明の原理図である。FIG. 1 is a principle diagram of the present invention.

【図2】第1実施例の構成を示すブロック図である。FIG. 2 is a block diagram showing the configuration of the first embodiment.

【図3】関数発生手段により発生した関数を示す図であ
る。
FIG. 3 is a diagram showing a function generated by a function generating means.

【図4】3個のデータを用いて関数発生手段により発生
した関数を示す図である。
FIG. 4 is a diagram showing a function generated by a function generating means using three pieces of data.

【図5】図4を用いて曲線の原点側を丸め処理し、テー
ブル発生手段によりテーブルを発生させる説明図であ
る。
FIG. 5 is an explanatory diagram in which the origin side of the curve is rounded using FIG. 4 and a table is generated by the table generating means.

【図6】4点のデータを用いて関数発生手段により発生
した関数を示す図である。
FIG. 6 is a diagram showing a function generated by a function generating means using data of four points.

【図7】図6を用いて、曲線の両端を丸め処理し、テー
ブルを発生手段によりテーブルを発生させる説明図であ
る。
FIG. 7 is an explanatory diagram of rounding both ends of a curve using FIG. 6 and generating a table by a table generating means.

【図8】第2実施例の構成を示すブロック図である。FIG. 8 is a block diagram showing a configuration of a second embodiment.

【図9】曲線パターンを説明する図である。FIG. 9 is a diagram illustrating a curve pattern.

【図10】Aタイプ曲線を用いてデータを入力する説明
図である。
FIG. 10 is an explanatory diagram for inputting data using an A type curve.

【図11】Bタイプ曲線を用いてデータを入力する説明
図である。
FIG. 11 is an explanatory diagram for inputting data using a B type curve.

【図12】Cタイプ曲線を用いてデータを入力する説明
図である。
FIG. 12 is an explanatory diagram of inputting data using a C type curve.

【図13】Dタイプ曲線を用いてデータを入力する説明
図である。
FIG. 13 is an explanatory diagram of inputting data using a D type curve.

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

11 データ点入力手段 12 係数算出手段 13 関数定義手段 14 関数値算出手段 15 階調有効領域まるめ手段 16 関数発生手段 17 テーブル作成手段 18 階調変換テーブル作成装置 19 入力画像メモリ装置 20 階調変換手段 21 出力画像メモリ装置 22 入力手段 23 データ点算出手段 11 data point input means 12 coefficient calculation means 13 function definition means 14 function value calculation means 15 gradation effective area rounding means 16 function generation means 17 table creation means 18 gradation conversion table creation device 19 input image memory device 20 gradation conversion means 21 Output image memory device 22 Input means 23 Data point calculation means

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 入力画像メモリ(3)に格納されたデジ
タル入力画像の階調を所望の階調に変換して出力画像メ
モリ(4)に出力する階調変換装置において、入力階調
域の下限値と上限値との間の値で処理対象入力階調とこ
れに対する変換出力階調からなる入力データ点を入力す
る入力手段(1)と、前記入力データ点を満す自然スプ
ライン補間関数の係数を求め変換関数を発生する関数発
生手段(2)とを備えたことを特徴とする階調変換装
置。
1. A gradation conversion device for converting a gradation of a digital input image stored in an input image memory (3) into a desired gradation and outputting the converted gradation to an output image memory (4). An input means (1) for inputting an input data point consisting of an input gray level to be processed and a converted output gray level corresponding to the input gray level between a lower limit value and an upper limit value; and a natural spline interpolation function that fills the input data point. A gradation conversion device comprising a function generating means (2) for obtaining a coefficient and generating a conversion function.
【請求項2】 前記関数発生手段(2)が、入力階調域
の下限値と処理対象入力階調の下限値間および入力階調
域の上限値と処理対象入力階調の上限値間にも前記変換
関数を外延するようにしたことを特徴とする請求項1記
載の階調変換装置。
2. The function generating means (2) is arranged between the lower limit value of the input gradation range and the lower limit value of the processing target input gradation and between the upper limit value of the input gradation range and the upper limit value of the processing target input gradation. The gradation conversion device according to claim 1, wherein the conversion function is also extended.
【請求項3】 外延した前記変換関数の値が、入力階調
域の下限値と処理対象入力階調の下限値間で出力階調域
の下限値以下となるときは出力階調域の下限値とし、入
力階調域の上限値と処理対象入力階調の上限値間で出力
階調域の上限値以上となるときは出力階調域の上限値と
するようにしたことを特徴とする請求項2記載の階調変
換装置。
3. The lower limit of the output gradation range when the value of the extended conversion function is less than or equal to the lower limit value of the output gradation range between the lower limit value of the input gradation range and the lower limit value of the processing target input gradation range. It is characterized in that the value is set as an upper limit value of the output gradation range when it is equal to or more than the upper limit value of the output gradation range between the upper limit value of the input gradation range and the upper limit value of the processing target input gradation. The gradation conversion device according to claim 2.
【請求項4】 前記入力手段(1)より、処理対象入力
階調と変換出力階調の各下限値および上限値と変換関数
のパターンとこのパターンからの変形の度合を示す重み
値とを入力するようにしたことを特徴とする請求項1〜
3のいずれかに記載の階調変換装置。
4. The input means (1) inputs the respective lower and upper limit values of a processing target input gradation and a conversion output gradation, a pattern of a conversion function, and a weight value indicating a degree of deformation from this pattern. The method according to claim 1, wherein
3. The gradation conversion device according to any one of 3 above.
JP3220553A 1991-08-30 1991-08-30 Gradation converter Pending JPH0561972A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3220553A JPH0561972A (en) 1991-08-30 1991-08-30 Gradation converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3220553A JPH0561972A (en) 1991-08-30 1991-08-30 Gradation converter

Publications (1)

Publication Number Publication Date
JPH0561972A true JPH0561972A (en) 1993-03-12

Family

ID=16752799

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3220553A Pending JPH0561972A (en) 1991-08-30 1991-08-30 Gradation converter

Country Status (1)

Country Link
JP (1) JPH0561972A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0583898A2 (en) * 1992-08-04 1994-02-23 International Business Machines Corporation Data processing system and method for greyscale adjustment
US5715330A (en) * 1993-11-05 1998-02-03 Sharp Kabushiki Kaisha Density modification device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6014571A (en) * 1983-07-05 1985-01-25 Fuji Photo Film Co Ltd Gradation setting device in picture input and output system
JPS63225872A (en) * 1987-03-13 1988-09-20 Fujitsu Ltd Picture data display system
JPH0292159A (en) * 1988-09-29 1990-03-30 Dainippon Printing Co Ltd Tone corrector for picture data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6014571A (en) * 1983-07-05 1985-01-25 Fuji Photo Film Co Ltd Gradation setting device in picture input and output system
JPS63225872A (en) * 1987-03-13 1988-09-20 Fujitsu Ltd Picture data display system
JPH0292159A (en) * 1988-09-29 1990-03-30 Dainippon Printing Co Ltd Tone corrector for picture data

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0583898A2 (en) * 1992-08-04 1994-02-23 International Business Machines Corporation Data processing system and method for greyscale adjustment
EP0583898A3 (en) * 1992-08-04 1994-06-08 Ibm Data processing system and method for greyscale adjustment
JPH06282648A (en) * 1992-08-04 1994-10-07 Internatl Business Mach Corp <Ibm> Method and apparatus for adjustment of gray-scale spline as well as data- processing system
US5469275A (en) * 1992-08-04 1995-11-21 International Business Machines Corporation Method and apparatus for grayscale adjustment
US5715330A (en) * 1993-11-05 1998-02-03 Sharp Kabushiki Kaisha Density modification device

Similar Documents

Publication Publication Date Title
JP2903807B2 (en) Color signal conversion method and apparatus
US5473372A (en) Gamma correction circuit approximating non-linear digital conversion
JPH05314165A (en) Pseudo movement averaging circuit
JP3796432B2 (en) Filter processing apparatus and filter processing method
US6317063B1 (en) Inverse quantization using table with reduced size
JPH0561972A (en) Gradation converter
US5801974A (en) Calculation method and circuit for obtaining a logarithmic approximation value
JP6833643B2 (en) Compression processing device, decompression processing device, compression processing program, decompression processing program
JPH06297775A (en) Method and apparatus for converting gradation of image data
EP0279419B1 (en) Image signal binary encoder
JP2779080B2 (en) Gradation correction device
JP3446497B2 (en) Color conversion method
JP3937463B2 (en) Huffman coding apparatus and method
EP1098507A2 (en) Image processing apparatus
JP2531187B2 (en) Function generator
JP3164363B2 (en) Method and apparatus for performing approximate arithmetic division
JP2586032B2 (en) Address calculation device
JP3766250B2 (en) Product operation device and program recording medium thereof
JPH07184073A (en) Color converter
JP3099449B2 (en) Fuzzy inference equipment
JP3680912B2 (en) Color conversion device
JPH06168130A (en) Fuzzy inference device
JPH07115371A (en) Adrc encoder
JP2792742B2 (en) Bit allocation method in orthogonal transform coding
KR100615770B1 (en) Digital interpolating system and method

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19980317