JP4523200B2 - Image processing device - Google Patents
Image processing device Download PDFInfo
- Publication number
- JP4523200B2 JP4523200B2 JP2001182228A JP2001182228A JP4523200B2 JP 4523200 B2 JP4523200 B2 JP 4523200B2 JP 2001182228 A JP2001182228 A JP 2001182228A JP 2001182228 A JP2001182228 A JP 2001182228A JP 4523200 B2 JP4523200 B2 JP 4523200B2
- Authority
- JP
- Japan
- Prior art keywords
- interpolation
- pixel
- natural number
- generated
- address
- 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 - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4007—Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Studio Circuits (AREA)
- Editing Of Facsimile Originals (AREA)
- Studio Devices (AREA)
- Image Processing (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、補間フィルタを用いた画像処理装置に関する。
【0002】
【従来の技術】
デジタルカメラなどデジタル画像を扱う分野において、補間フィルタ等を用いて画像を補間処理し、拡大、縮小する電子ズーム装置が知られている。
【0003】
その補間演算は、補間関数としてサンプリングの定理で現れるsin(πx)/(πx)を用いて、無制限個の画素に基づき補間することが望ましいが、そのためにメモリが無制限に必要となり不可能である。そこで、実際には簡単化した補間方法として、線形補間方式や3次畳み込み内挿方式などが用いられている。
【0004】
まず、線形補間方式は、補間画素を、それに隣接した2画素を用いた補間により生成していく方式である。線形補間方式の補間関数S(x)は、
(数1)
S(x)=1−|x| (0≦|x|<1)
S(x)=0 (|x|≧1)
で表され、補間画素をy、その前後の画素をxi、xi+1とし、生成されるアドレス位置をuとすると、
(数2)
y=S(u)xi+S(1−u)xi+1
となる。
【0005】
図2は、線形補間方式で4/5倍に画像を縮小した時の例を示す模式図である。図2において、白丸が原画素(OP)、黒丸が補間画素(IP)、その下の数値は生成されるアドレス位置uを示している。画像を縮小する前の画素間を1とすると、縮小後の画素間は5/4になる。よって生成されるアドレス位置はu=0、1/4、1/2、3/4と発生していく。この生成されるアドレス位置uから矢印のように隣接2画素を補間演算し補間画素を求めていく。また、上記(数1)からも分かるように、生成される画素と原画素が一致した場合は、図2の太い矢印のように、原画素をそのまま生成画素としている。
【0006】
次に、3次畳み込み内挿方式は、補間画素を、その近傍にある4画素を用いた補間により生成していく方式である。3次畳み込み内挿方式の補間関数T(x)は、
(数3)
T(x)=1−2|x|2+|x|3 (0≦|x|<1)
T(x)=4−8|x|+5|x|2−|x|3 (1≦|x|<2)
T(x)=0 (|x|≧2)
で表され、補間画素をy、その前後の画素をxi-1、xi、xi+1、xi+2とし、生成されるアドレス位置をuとすると、
(数4)
となる。
【0007】
図3は、3次畳み込み内挿方式で4/5倍に画像を縮小した時の例を示す模式図である。図3において、白丸が原画素(OP)、黒丸が補間画素(IP)、その下の数値は生成されるアドレス位置uを示している。図2と同じように、画像を縮小する前の画素間を1とすると、縮小後の画素間は5/4になる。よって生成されるアドレス位置はu=0、1/4、1/2、3/4と発生していく。この生成されるアドレス位置uから矢印のように隣接する4画素を補間演算し補間画素を求めていく。また、この補間方式も、上記(数3)から分かるように、生成される画素と原画素が一致した場合は、図3の太い矢印のように、原画素をそのまま生成画素としている。
【0008】
【発明が解決しようとする課題】
しかしながら、上記の補間方式には、次のような問題がある。
【0009】
図4に、線形補間方式における周波数特性、図5に、3次畳み込み内挿方式における周波数特性を示す。図4および図5において、縦軸は正規化レベルを、横軸は周波数を表し、fsはサンプリング周波数を示す。これらの図から分かるように、生成されるアドレス位置uによって、周波数特性の、特に高域の部分(fs/2部分)がばらついており、周波数特性のうねりが原理的に発生する。
【0010】
本発明は、かかる問題点に鑑みてなされたものであり、その目的は、補間処理を行って画像を拡大/縮小した時に、生成するアドレス位置による周波数特性のばらつきを抑え、良質な画像が得られる画像処理装置を提供することにある。
【0011】
【課題を解決するための手段】
前記の目的を達成するため、本発明に係る第1の画像処理装置は、入力される画像データに対して補間処理を施し、画像サイズを変換する画像処理装置であって、原画像の画素と画素の間をn(nは自然数)分割したn個のアドレス位置のそれぞれに対応して、隣接するm(mは自然数)画素に乗じて補間処理を行なうためのm個の補間係数が予め格納された参照テーブルと、設定された倍率に応じて、生成するアドレス位置を設定する生成アドレス設定部と、生成アドレス設定部により設定されたアドレス位置に基づいて、参照テーブルに格納されている補間係数を選択する係数発生部とを備え、K1、K2、…、Kmを補間係数、X1、X2、…、Xmを前記補間処理に用いる画素データ、SKをiが1からmまでの前記補間係数の和とした場合、前記補間処理され生成された画素データYは、Y=(K1・X1+K2・X2+…+Km・Xm)/SKで表され、前記補間係数の和SKが2のq乗(qは整数)であり、前記補間処理に用いる画素データXr(rは自然数で、1≦r≦m)と生成される画素データの前記アドレス位置が一致した場合、前記画素データXrに乗じられる補間係数Krについて、Kr=SKとならないように設定し、且つ他の補間係数が0以外の値であり、前記補間係数列の重心位置をgとした場合、g=(K1×1+K2×2+……Km×m)/SK)を、それぞれ分割した前記アドレス位置に一致させたことを特徴とする。
【0012】
前記の目的を達成するため、本発明に係る第2の画像処理装置は、上記構成の第1の画像処理装置において、入力される画像データに対して施される前記補間処理は、補間処理前と同一のサンプリングレートで施されることを特徴とする。
【0013】
第1および第2の画像処理装置において、自然数nは2のp乗(pは自然数)であることを特徴とする。
【0014】
また、第1および第2の画像処理装置において、自然数nは32であることを特徴とする。
【0015】
また、第1および第2の画像処理装置において、自然数mは5であることを特徴とする。
【0016】
また、第1および第2の画像処理装置において、自然数nは32であり、且つ自然数mは5であることを特徴とする。
【0020】
上記の構成によれば、生成されるアドレス位置における周波数特性のばらつきを抑えることが出来るので、画像サイズを変換しても、画質の劣化が抑えられ、良質な画像を得ることが可能になる。
【0021】
【発明の実施の形態】
以下、本発明の好適な実施の形態について、図面を参照しながら説明する。
【0022】
図1は、本発明の一実施の形態による画像処理装置の構成例を示すブロック図である。なお、本実施形態においては、補間に用いる画素数mとして、m=5画素を使用して補間処理を行なう例について説明する。
【0023】
図1において、101は入力画像データを記憶するフィールドメモリ、102a、102b、102c、102dは入力信号をそれぞれ1H期間(1水平走査期間)遅延させる遅延手段としてのラインメモリ、103は垂直5点補間を行う垂直補間回路、104は水平5点補間を行う水平補間回路である。
【0024】
105aは、垂直補間回路103から信号S4と信号選択回路105bからの信号S18、S19を受けて、倍率設定回路109からの信号S9の状態に基づいて、水平補間回路104への信号S6とラインメモリ106への信号S5とを選択出力する信号選択回路である。
【0025】
105bは、ラインメモリ106からの信号S7と水平補間回路104からの信号S8を受けて、倍率設定回路109からの信号S9の状態に基づいて、信号選択回路105aへの信号S18、S19と出力画像データS20とを選択出力する信号選択回路である。
【0026】
106は、信号選択回路105aからの信号S5を記憶するラインメモリである。107は、生成アドレス設定回路110からの信号S12に応じて、ルック・アップ・テーブル(LUT)108から補間係数S15を選択し、それを垂直補間回路103および水平補間回路104に供給する係数発生器である。
【0027】
108は、画素と画素の間をn分割してn個のアドレスに分割し、生成するアドレス位置による周波数特性のばらつきを抑えられるように、それぞれのアドレスごとに補間係数値が格納されているLUTである。
【0028】
109は倍率設定回路であり、110は、倍率設定回路109で設定された倍率(信号S10)から生成されるアドレスS11を決定する生成アドレス設定回路、111は、生成アドレスS11に応じて、フィールドメモリ101、ラインメモリ102a〜102d、106に対するデータ書き込みおよび読み出しを制御するメモリ制御回路である。
【0029】
次に、本実施形態の補間アルゴリズムについて説明する。なお、本アルゴリズムにおいては、水平および垂直方向とも同一のアルゴリズムである。
【0030】
図6は、画素Cと画素Dの間に補間画素が生成される場合において、その画素Cと画素Dの間のアドレスを分割した時の模式図である。本実施形態においては、32個にアドレスを分割し、生成された画素が分割したアドレスのどの位置に相当するかを求め、そのアドレス位置に相当する補間係数値をLUT108から読み出し、補間処理を行なう。
【0031】
補間に用いる画素は、分割したアドレス位置をhとすると、補間画素が生成されるアドレスがh=0〜15の場合は、画素A、画素B、画素C、画素D、画素Eの5画素で補間し、h=16〜31の場合は、画素B、画素C、画素D、画素E、画素Fの5画素で補間する。
【0032】
次に、補間処理に用いる補間係数値について説明する。図6に示すように、アドレスを32分割しているので、アドレスh=0〜31とし、それぞれどのアドレスに生成されても周波数特性のばらつきを抑えるように補間係数値をLUT108に記憶させる。本実施形態では、補間に使用する画素を5画素としているので、図7のような補間係数値の表になる。図7のA、B、C、D、E、Fは補間する原画像の画素を表し、Kが補間係数値を表す。
【0033】
ここで、係数値Kについて説明する。それぞれのアドレス位置に定義される補間係数値の和は2のq乗になるように定義する。このことによって、回路規模の増大を抑えることが出来る。
【0034】
また、補間係数値Kは、それぞれの分割した位置とそれに対応した補間係数列の重心位置が一致するように定義しておく。図8に、分割したアドレス位置をhとした時の重心位置を示し、またアドレスh<16の場合を表したものである。そして、その分割したアドレス位置hに相当する補間係数列の重心位置をgとすると、
(数5)
となる。ここで、補間係数値Kh0、Kh1、Kh2、Kh3、Kh4は、図7に示すように、それぞれ、h=1〜15の場合の画素A、B、C、D、Eに対応する補間係数値K00〜K150、K01〜K151、K02〜K152、K03〜K153、K04〜K154に相当する。
【0035】
この重心gと、補間する5画素からみる分割したアドレス位置2+h/32とが等しくなるように補間係数値を設定する。n≧16の場合も同じようにして、補間係数値を設定する。
【0036】
このようにして補間係数値Kを設定していくと、画素と画素の間を分割する数nを2のp乗(本実施形態では、p=5)とすると、図7でも分かるように、h=16を境に補間係数値Kが逆転しているような形になる。このことから、実際にLUT108に記憶させる補間係数値としては、h=0からh=16に対応する補間係数値を記憶しておけば良いことになり、回路規模を縮小することができる。
【0037】
このように、重心の位置を一致させるように補間係数値を決めてLUT108に設定することで、アドレスのひずみを抑えることが出来る。そして、生成されたアドレス位置が分割したアドレス位置に一致しない場合は、近似を行い、分割したアドレス位置に生成されたものとして処理を行う。このことから、画素間を分割する数nが多いほど精度の良い補間処理を行うことができる。
【0038】
また、原画素と補間画素の位置が一致した、つまりh=0の時において、原画素をそのまま補間画素としないように係数値Kを設定する。つまり、図7において、補間係数K02の値を補間係数値の和としないように設定し、係数値K00、係数値K01、係数値K03、係数値K04をすべて「0」以外の値に設定して、原画素Cがそのまま補間画素とならないように補間係数値Kを設定する。このように、本実施形態によれば、図4および図5に示す従来の周波数特性とは異なり、分割したアドレス位置h=0に画素が生成されても周波数特性が平坦にならないようにすることで、生成されるアドレスによる特性のばらつきを抑えることが出来る。
【0039】
以上、これらの考え方をもとに補間係数値を求めて、あらかじめLUT108に記憶させることにより、補間係数値を求める複雑な演算回路を設ける必要がなく、小規模な回路で高精細な補間処理を行うことが出来る。図9に、この補間アルゴリズムで処理を行った場合の周波数特性の一例を示す。図9に示すように、本実施形態は、分割したアドレス位置h=0に画素が生成されても、周波数特性を平坦化させないようにしていることに特徴があり、高域の部分でも、補間係数の値による周波数特性のばらつきが抑えられている。
【0040】
また、補間に用いる画素については、生成アドレス位置がh=0〜15とh=16〜31とで補間に用いる画素が1画素ずれることを説明した。その様子を図10に示す。図10において、生成されたアドレス位置が▲1▼の範囲にある場合、画素A、画素B、画素C、画素D、画素Eを使って補間し、生成されたアドレス位置が▲2▼の範囲にある場合、画素B、画素C、画素D、画素E、画素Fを使って補間する。h=16を境いに補間する画素を1ずつずらしていく。このことから、メモリ制御回路111は、生成されるアドレス位置がh=16を境いにして画素データの書き込み及び読み出しの制御を行う。
【0041】
次に、図1を用いて本実施形態による画像処理装置における各部の動作について順を追って説明する。
【0042】
まず、垂直補間回路103について説明する。垂直補間回路103は、フィールドメモリ101から読み出されたラインデータS2と、その1H期間前のラインデータS3a、2H期間前のラインデータS3b、3H期間前のデータS3c、4H期間前のデータS3dから1画素ずつ垂直5点補間を行う。なお、フィールドメモリ101、ラインメモリ102a、102b、102c、102dはメモリ制御回路111により制御されている。
【0043】
図11は、垂直補間回路103の具体的な構成を示すブロック図である。図11において、1101a、1101b、1101c、1101d、1101eは、ラインデータS2、S3a、S3b、S3c、S3dそれぞれに、係数発生器107からの、前記の補間アルゴリズムに基づき求められた5つの係数k0、k1、k2、k3、k4(信号S13)を乗ずる乗算器である。1102はそれぞれの乗算器1101a、1101b、1101c、1101d、1101eからの出力信号を加算する加算器であり、1103は加算器1102からの出力信号を1/(係数の和)倍して信号S4として出力する乗算器である。
【0044】
次に、水平補間回路104について説明する。水平補間回路104は、信号選択回路105aからの信号S6に対して水平5点補間を行う。図12は、水平補間回路104の具体的な構成を示すブロック図である。図12において、1201a、1201b、1201c、1201dは1画素分データを遅延させる遅延素子であり、1202a、1202b、1202c、1202d、1202eはそれぞれ、各遅延素子により遅延された画像データに対して、係数発生器107からの、前記の補間アルゴリズムに基づき求められた5つの係数k0、k1、k2、k3、k4を乗ずる乗算器であり、1203はそれぞれの乗算器1202a、1202b、1202c、1202d、1202eからの出力信号を加算する加算器であり、1204は加算器1203からの出力を1/(係数の和)倍して信号S8として出力する乗算器である。
【0045】
次に、信号選択回路105a、105bについて説明する。図13は、信号選択回路105aの具体的な構成を示すブロック図である。図13において、倍率設定回路109からの信号S9が拡大時は0、縮小時は1であるとして、1301aは、拡大時には垂直補間回路103からの信号S4を、縮小時には信号選択回路105bからの信号S18を、信号S5として選択出力するセレクタであり、1301bは、拡大時には信号選択回路105bからの信号S19を、縮小時には垂直補間回路103からの信号S4を、信号S6として選択出力するセレクタである。
【0046】
図14は、信号選択回路105bの具体的な構成を示すブロック図である。図14において、倍率設定回路109からの信号S9が拡大時は0、縮小時は1であるとして、1401aは、ラインメモリ106からの信号S7を、拡大時にはS19として、縮小時には信号S1400として選択出力するセレクタであり、1401bは、水平補間回路104からの信号S8を、拡大時には信号S1401として、縮小時には信号S18として選択出力するセレクタであり、1401cは、拡大時にはセレクタ1401bからの信号S1401を、縮小時にはセレクタ1401aからの信号S1400を、信号S20として選択出力するセレクタである。
【0047】
図15および図16は、それぞれ、拡大時および縮小時における水平補間の信号の流れに着目した場合の構成を示す。拡大時は、図15に示すように、垂直補間された信号S4を、初めにラインメモリ106に記憶させ、メモリ制御回路111からの信号S16に従ってデータを読み出し、水平補間回路104に送って補間処理を行い、出力画像データS20として出力させる。縮小時は、図16に示すように、初めに水平補間回路104において補間処理を行い、メモリ制御回路からの信号S16に従って必要なデータだけラインメモリ106に記憶させ、その後ラインメモリ106から順次読み出して、出力画像データS20として出力させる。
【0048】
このことから、メモリの読み出しレートを原画像のサンプリングレートと同じにすることにより、原画像データと補間後のデータを同じサンプリングレートにしている。
【0049】
以下、本実施形態による画像処理装置の具体例について、拡大時と縮小時に分けて説明する。
【0050】
まず、水平および垂直4/3倍の拡大時の場合について説明する。
【0051】
初めに、生成アドレス回路110において生成されるアドレス位置を求める。図17は、白丸が原画素(OP)の画素位置、黒丸が倍率4/3の場合に生成される画素(IP(4/3))の画素位置を示している。図17において、原画素の画素間を1とすると、補間され生成される画素間は3/4になる。図6に示すように、アドレスを32分割しているので、相当するアドレス位置を求めると、図17に示すように、h=0、24、16、8の繰り返しになる。この生成されるアドレス位置h(信号S12)を係数発生器107に送る。係数発生器107は、アドレス位置hをもとにLUT108から相当するアドレス位置hでの係数値(信号S15)を読み込み、垂直補間回路103および水平補間回路104へ送る。
【0052】
図18は、それぞれ生成されるアドレス位置において補間する画素を示している。図18において、白丸が原画素、つまり補間に用いる画素を示している。黒丸は、補間されて生成された画素位置を示している。図18に示すように、4/3倍に拡大の場合、4回に1回同じ画素で補間を行うことになる。よって、メモリ制御回路111は、垂直の場合には、4ラインに一度同じラインデータを、フィールドメモリ101、ラインメモリ102a、102b、102c、102dから読み出すなどして、対応する補間画素を読み出し、垂直補間回路103で係数発生器107からの係数値をもとに補間処理を行い、水平の場合には、4画素に1度同じ画素データをラインメモリ106から読み出すなどして、対応する補間画素を読み出し、水平補間回路104で係数発生器107からの係数値をもとに補間処理を行う。
【0053】
次に、水平および垂直4/5倍の縮小時について説明する。
【0054】
初めに、生成アドレス回路110において生成されるアドレス位置を求める。図19は、白丸が原画素(OP)の画素位置、黒丸が倍率4/5の場合に生成される画素(IP(4/5))の画素位置を示している。図19において、原画素の画素間を1とすると、生成される画素間は5/4になる。図6に示すように、アドレスを32分割しているので、相当するアドレス位置を求めると、図19に示すように、h=0、8、16、24の繰り返しになる。この生成されるアドレス位置h(信号S12)を係数発生器107に送る。係数発生器107は、アドレス位置hをもとにLUT108から相当するアドレス位置hでの係数値(信号S15)を読み込み、垂直補間回路103および水平補間回路104へ送る。
【0055】
図20は、それぞれ生成されるアドレス位置において補間する画素を示している。白丸が原画素、つまり補間に用いる画素を示している。黒丸は補間されて生成された画素位置を示している。図20に示すように、4/5倍に縮小の場合、5回に1回補間に用いる原画素を一つ飛ばして補間を行うことになる。よって、メモリ制御回路111は、垂直の場合には、通常通りにフィールドメモリ101、ラインメモリ102a、102b、102c、102dからラインデータを読み出し、垂直補間回路103で係数発生器107からの係数値をもとに補間処理を行い、水平補間回路104で係数発生器107からの係数値をもとに補間処理を行った後、垂直方向に対しては5ラインに1ラインを間引き、水平方向に対しては5画素に1画素を間引くなどしてラインメモリ106に記憶させて、必要なデータだけ取り込むことで、縮小処理を実現する。
【0056】
なお、本実施形態では、水平と垂直を同倍率としたが、水平と垂直に対して別々の生成アドレス回路を設けることで、水平、垂直それぞれ異なる倍率で補間処理することも出来る。
【0057】
【発明の効果】
以上説明したように、本発明によれば、生成されるアドレス位置における周波数特性のばらつきを抑えることが出来るので、画像サイズを変換しても、画質の劣化が抑えられ、良質な画像を得ることが可能になる。
【図面の簡単な説明】
【図1】 本発明の一実施形態に係る画像処理装置の構成例を示すブロック図
【図2】 従来の線形補間方式で4/5倍に画像を縮小した時の例を示す模式図
【図3】 従来の3次畳み込み方式で4/5倍に画像を縮小した時の例を示す模式図
【図4】 従来の線形補間方式における生成アドレス位置uをパラメータとした補間処理による周波数特性を示す図
【図5】 従来の3次畳み込み方式における生成アドレス位置uをパラメータとした補間処理による周波数特性を示す図
【図6】 本発明の一実施形態における画素Cと画素Dの間に補間画素が生成される場合に、画素Cと画素Dの間のアドレスを分割した時の模式図
【図7】 図1のLUT108に記憶させる補間係数を示す図
【図8】 本発明の一実施形態における補間係数列の重心位置とアドレス位置との関係を示す図
【図9】 本発明の一実施形態における補間処理による周波数特性を示す図
【図10】 本発明の一実施形態における生成されたアドレス位置での補間画素を示す模式図
【図11】 図1の垂直補間回路103の構成を示すブロック図
【図12】 図1の水平補間回路104の構成を示すブロック図
【図13】 図1の信号選択回路105aの構成を示すブロック図
【図14】 図1の信号選択回路105bの構成を示すブロック図
【図15】 図1において拡大時の水平補間の信号流れに着目した場合の構成示すブロック図
【図16】 図1において縮小時の水平補間の信号流れに着目した場合の構成示すブロック図
【図17】 本発明の一実施形態における具体例として倍率4/3時の生成アドレス位置を示す模式図
【図18】 本発明の一実施形態における具体例として倍率4/3時の補間に用いる画素を示す模式図
【図19】 本発明の一実施形態における具体例として倍率4/5時の生成アドレス位置を示す模式図
【図20】 本発明の一実施形態における具体例として倍率4/5時の補間に用いる画素を示す模式図
【符号の説明】
101 フィールドメモリ
102a〜102d ラインメモリ
103 垂直補間回路
104 水平補間回路
105a、105b 信号選択回路
106 ラインメモリ
107 係数発生器
108 LUT
109 倍率設定回路
110 生成アドレス設定回路
111 メモリ制御回路
1101a〜1101e 乗算器
1102 加算器
1103 乗算器
1201a〜1201d 遅延素子
1202a〜1202e 乗算器
1203 加算器
1204 乗算器
1301a、1301b セレクタ
1401a〜1401c セレクタ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus using an interpolation filter.
[0002]
[Prior art]
2. Description of the Related Art In the field of handling digital images such as digital cameras, electronic zoom devices that perform interpolation processing on an image using an interpolation filter or the like to enlarge or reduce the image are known.
[0003]
The interpolation operation is desirably performed by using sin (πx) / (πx) appearing in the sampling theorem as an interpolation function, based on an unlimited number of pixels. . Therefore, in practice, a linear interpolation method, a cubic convolution interpolation method, or the like is used as a simplified interpolation method.
[0004]
First, the linear interpolation method is a method of generating an interpolation pixel by interpolation using two adjacent pixels. The interpolation function S (x) of the linear interpolation method is
(Equation 1)
S (x) = 1− | x | (0 ≦ | x | <1)
S (x) = 0 (| x | ≧ 1)
Where y is an interpolation pixel, x i and x i + 1 are pixels before and after the interpolation pixel, and u is a generated address position.
(Equation 2)
y = S (u) x i + S (1−u) x i + 1
It becomes.
[0005]
FIG. 2 is a schematic diagram showing an example when the image is reduced to 4/5 times by the linear interpolation method. In FIG. 2, the white circle is the original pixel (OP), the black circle is the interpolation pixel (IP), and the numerical value below it indicates the address position u to be generated. If the pixel interval before image reduction is 1, the pixel interval after reduction is 5/4. Therefore, the generated address positions are generated as u = 0, 1/4, 1/2, 3/4. From the generated address position u, the adjacent two pixels are interpolated as indicated by the arrows to obtain the interpolated pixels. Further, as can be seen from the above (Equation 1), when the generated pixel matches the original pixel, the original pixel is directly used as the generated pixel as indicated by the thick arrow in FIG.
[0006]
Next, the cubic convolution interpolation method is a method of generating an interpolation pixel by interpolation using four pixels in the vicinity thereof. The interpolation function T (x) of the cubic convolution interpolation method is
(Equation 3)
T (x) = 1−2 | x | 2 + | x | 3 (0 ≦ | x | <1)
T (x) = 4-8 | x | +5 | x | 2 − | x | 3 (1 ≦ | x | <2)
T (x) = 0 (| x | ≧ 2)
Where y is an interpolation pixel, x i-1 , x i , x i + 1 , x i + 2 are pixels before and after the interpolation pixel, and u is a generated address position.
(Equation 4)
It becomes.
[0007]
FIG. 3 is a schematic diagram showing an example when the image is reduced to 4/5 times by the cubic convolution interpolation method. In FIG. 3, the white circle is the original pixel (OP), the black circle is the interpolation pixel (IP), and the numerical value below it indicates the address position u to be generated. As in FIG. 2, if the pixel interval before reducing the image is 1, the pixel interval after reduction is 5/4. Therefore, the generated address positions are generated as u = 0, 1/4, 1/2, 3/4. From the generated address position u, four adjacent pixels are interpolated as indicated by arrows to obtain an interpolated pixel. In addition, as can be seen from the above (Equation 3), this interpolation method also uses the original pixel as it is as the generated pixel as shown by the thick arrow in FIG. 3 when the generated pixel matches the original pixel.
[0008]
[Problems to be solved by the invention]
However, the above interpolation method has the following problems.
[0009]
FIG. 4 shows frequency characteristics in the linear interpolation method, and FIG. 5 shows frequency characteristics in the third-order convolution interpolation method. 4 and 5, the vertical axis represents the normalization level, the horizontal axis represents the frequency, and fs represents the sampling frequency. As can be seen from these figures, the frequency characteristic, particularly the high frequency part (fs / 2 part), varies depending on the generated address position u, and the undulation of the frequency characteristic occurs in principle.
[0010]
The present invention has been made in view of such a problem, and an object of the present invention is to suppress variation in frequency characteristics depending on an address position to be generated and to obtain a high-quality image when an image is enlarged / reduced by performing an interpolation process. An image processing apparatus is provided.
[0011]
[Means for Solving the Problems]
In order to achieve the above object, a first image processing apparatus according to the present invention is an image processing apparatus that performs interpolation processing on input image data and converts an image size. In correspondence with each of n address positions obtained by dividing n (n is a natural number) between pixels, m interpolation coefficients for performing interpolation processing by multiplying adjacent m (m is a natural number) pixels are stored in advance. The generated reference table, the generated address setting unit for setting the address position to be generated according to the set magnification, and the interpolation coefficient stored in the reference table based on the address position set by the generated address setting unit , Km are interpolation coefficients, X1, X2,..., Xm are pixel data used for the interpolation processing, and SK is the interpolation coefficient for i from 1 to m. Sum and In this case, the pixel data Y generated by the interpolation processing is represented by Y = (K1 · X1 + K2 · X2 +... + Km · Xm) / SK, and the sum SK of the interpolation coefficients is 2 to the qth power (q is an integer). When the pixel data Xr (r is a natural number, 1 ≦ r ≦ m) used for the interpolation process and the address position of the generated pixel data match, the interpolation coefficient Kr multiplied by the pixel data Xr is If Kr = SK is set so that the other interpolation coefficient is a value other than 0, and the gravity center position of the interpolation coefficient sequence is g, g = (K1 × 1 + K2 × 2 +... Km × m) / SK) is made to coincide with the divided address positions .
[0012]
In order to achieve the above object, according to the second image processing apparatus of the present invention, in the first image processing apparatus configured as described above, the interpolation process performed on input image data is performed before the interpolation process. It is characterized by being applied at the same sampling rate.
[0013]
In the first and second image processing apparatuses, the natural number n is 2 to the power of p (p is a natural number).
[0014]
In the first and second image processing apparatuses, the natural number n is 32.
[0015]
In the first and second image processing apparatuses, the natural number m is 5.
[0016]
In the first and second image processing apparatuses, the natural number n is 32 and the natural number m is 5.
[0020]
According to the above configuration, variation in frequency characteristics at the generated address position can be suppressed, so that even when the image size is converted, deterioration in image quality is suppressed, and a high-quality image can be obtained.
[0021]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.
[0022]
FIG. 1 is a block diagram showing a configuration example of an image processing apparatus according to an embodiment of the present invention. In the present embodiment, an example in which interpolation processing is performed using m = 5 pixels as the number of pixels m used for interpolation will be described.
[0023]
In FIG. 1, 101 is a field memory for storing input image data, 102a, 102b, 102c, and 102d are line memories as delay means for delaying the input signal for 1H period (one horizontal scanning period), and 103 is 5-point vertical interpolation. A
[0024]
105a receives the signal S4 from the
[0025]
105b receives the signal S7 from the
[0026]
A
[0027]
108 is an LUT in which interpolation coefficient values are stored for each address so as to divide the pixel into n and divide the pixel into n addresses and suppress variation in frequency characteristics due to the generated address position. It is.
[0028]
109 is a magnification setting circuit, 110 is a generation address setting circuit for determining an address S11 generated from the magnification (signal S10) set by the
[0029]
Next, the interpolation algorithm of this embodiment will be described. In this algorithm, the same algorithm is used in both the horizontal and vertical directions.
[0030]
FIG. 6 is a schematic diagram when an address between the pixel C and the pixel D is divided when an interpolation pixel is generated between the pixel C and the pixel D. In the present embodiment, the address is divided into 32, the position where the generated pixel corresponds to the divided address is obtained, the interpolation coefficient value corresponding to the address position is read from the
[0031]
Assuming that the divided address position is h, the pixels used for interpolation are pixel A, pixel B, pixel C, pixel D, and pixel E when the address where the interpolation pixel is generated is h = 0-15. When h = 16 to 31, interpolation is performed with five pixels of pixel B, pixel C, pixel D, pixel E, and pixel F.
[0032]
Next, the interpolation coefficient value used for the interpolation process will be described. As shown in FIG. 6, since the address is divided into 32, the address h is set to 0 to 31 and the interpolation coefficient value is stored in the
[0033]
Here, the coefficient value K will be described. The sum of interpolation coefficient values defined at each address position is defined to be 2 to the power of q. As a result, an increase in circuit scale can be suppressed.
[0034]
Further, the interpolation coefficient value K is defined so that the respective divided positions coincide with the barycentric positions of the corresponding interpolation coefficient sequences. FIG. 8 shows the position of the center of gravity when the divided address position is h, and shows the case where the address h <16. Then, assuming that the center of gravity position of the interpolation coefficient sequence corresponding to the divided address position h is g,
(Equation 5)
It becomes. Here, the interpolation coefficient values Kh0, Kh1, Kh2, Kh3, and Kh4 are interpolation coefficient values corresponding to the pixels A, B, C, D, and E when h = 1 to 15, respectively, as shown in FIG. These correspond to K00 to K150, K01 to K151, K02 to K152, K03 to K153, and K04 to K154.
[0035]
The interpolation coefficient value is set so that the center of gravity g is equal to the divided
[0036]
When the interpolation coefficient value K is set in this way, if the number n to be divided between pixels is 2 to the power of p (in this embodiment, p = 5), as can be seen from FIG. The interpolation coefficient value K is reversed from h = 16. For this reason, as interpolation coefficient values actually stored in the
[0037]
In this way, by determining the interpolation coefficient value so as to match the position of the center of gravity and setting it in the
[0038]
Further, when the positions of the original pixel and the interpolation pixel coincide, that is, when h = 0, the coefficient value K is set so that the original pixel is not used as the interpolation pixel as it is. That is, in FIG. 7, the value of the interpolation coefficient K02 is set not to be the sum of the interpolation coefficient values, and the coefficient value K00, the coefficient value K01, the coefficient value K03, and the coefficient value K04 are all set to values other than “0”. Thus, the interpolation coefficient value K is set so that the original pixel C does not become an interpolation pixel as it is. Thus, according to the present embodiment, unlike the conventional frequency characteristics shown in FIGS. 4 and 5, the frequency characteristics are not flattened even if a pixel is generated at the divided address position h = 0. Thus, variation in characteristics due to generated addresses can be suppressed.
[0039]
As described above, the interpolation coefficient value is obtained based on these ideas and stored in the
[0040]
As for the pixels used for interpolation, it has been described that the pixels used for interpolation are shifted by one pixel when the generation address positions are h = 0 to 15 and h = 16 to 31. This is shown in FIG. In FIG. 10, when the generated address position is in the range (1), interpolation is performed using the pixel A, pixel B, pixel C, pixel D, and pixel E, and the generated address position is in the range (2). , Interpolation is performed using pixel B, pixel C, pixel D, pixel E, and pixel F. The pixels to be interpolated are shifted one by one with h = 16 as a boundary. Therefore, the
[0041]
Next, the operation of each unit in the image processing apparatus according to the present embodiment will be described in order with reference to FIG.
[0042]
First, the
[0043]
FIG. 11 is a block diagram showing a specific configuration of the
[0044]
Next, the
[0045]
Next, the
[0046]
FIG. 14 is a block diagram showing a specific configuration of the
[0047]
FIG. 15 and FIG. 16 show configurations when attention is paid to the flow of a signal for horizontal interpolation at the time of enlargement and reduction, respectively. At the time of enlargement, as shown in FIG. 15, the vertically interpolated signal S4 is first stored in the
[0048]
Therefore, by making the memory read rate the same as the sampling rate of the original image, the original image data and the interpolated data are set to the same sampling rate.
[0049]
Hereinafter, a specific example of the image processing apparatus according to the present embodiment will be described separately for enlargement and reduction.
[0050]
First, the case of horizontal and vertical 4/3 times enlargement will be described.
[0051]
First, an address position generated in the
[0052]
FIG. 18 shows pixels to be interpolated at each generated address position. In FIG. 18, white circles indicate original pixels, that is, pixels used for interpolation. Black circles indicate pixel positions generated by interpolation. As shown in FIG. 18, in the case of enlarging to 4/3 times, interpolation is performed with the same pixel once every four times. Therefore, in the case of the vertical, the
[0053]
Next, the horizontal and vertical 4/5 times reduction will be described.
[0054]
First, an address position generated in the
[0055]
FIG. 20 shows pixels to be interpolated at each generated address position. White circles indicate original pixels, that is, pixels used for interpolation. Black circles indicate pixel positions generated by interpolation. As shown in FIG. 20, in the case of reduction to 4/5, interpolation is performed by skipping one original pixel used for interpolation once every five times. Therefore, the
[0056]
In the present embodiment, the horizontal and vertical have the same magnification, but by providing separate generation address circuits for horizontal and vertical, interpolation processing can be performed at different horizontal and vertical magnifications.
[0057]
【The invention's effect】
As described above, according to the present invention, it is possible to suppress variation in frequency characteristics at the generated address position, so that even when the image size is converted, deterioration in image quality can be suppressed, and a high-quality image can be obtained. Is possible.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration example of an image processing apparatus according to an embodiment of the present invention. FIG. 2 is a schematic diagram illustrating an example when an image is reduced to 4/5 times by a conventional linear interpolation method. 3 is a schematic diagram showing an example when an image is reduced to 4/5 times by a conventional cubic convolution method. FIG. 4 shows frequency characteristics by interpolation processing using a generated address position u as a parameter in a conventional linear interpolation method. FIG. 5 is a diagram showing frequency characteristics by interpolation processing using a generated address position u as a parameter in a conventional cubic convolution method. FIG. 6 shows an interpolation pixel between pixel C and pixel D in one embodiment of the present invention. FIG. 7 is a schematic diagram when the addresses between the pixel C and the pixel D are divided when generated. FIG. 7 is a diagram showing interpolation coefficients to be stored in the
101 Field memories 102a to
109
Claims (6)
原画像の画素と画素の間をn(nは自然数)分割したn個のアドレス位置のそれぞれに対応して、隣接するm(mは自然数)画素に乗じて補間処理を行なうためのm個の補間係数が予め格納された参照テーブルと、
設定された倍率に応じて、生成するアドレス位置を設定する生成アドレス設定部と、
前記生成アドレス設定部により設定された前記アドレス位置に基づいて、前記参照テーブルに格納されている前記補間係数を選択する係数発生部とを備え、
K1、K2、…、Kmを補間係数、X1、X2、…、Xmを前記補間処理に用いる画素データ、SKをiが1からmまでの前記補間係数の和とした場合、前記補間処理され生成された画素データYは、
Y=(K1・X1+K2・X2+…+Km・Xm)/SK
で表され、前記補間係数の和SKが2のq乗(qは整数)であり、
前記補間処理に用いる画素データXr(rは自然数で、1≦r≦m)と生成される画素データの前記アドレス位置が一致した場合、前記画素データXrに乗じられる補間係数Krについて、Kr=SKとならないように設定し、且つ他の補間係数が0以外の値であり、
前記補間係数列の重心位置をgとした場合、
g=(K1×1+K2×2+……Km×m)/SK)を、それぞれ分割した前記アドレス位置に一致させたことを特徴とする画像処理装置。An image processing device that performs interpolation processing on input image data and converts an image size,
In correspondence with each of n address positions obtained by dividing n (n is a natural number) between pixels of the original image, m pixels for performing an interpolation process by multiplying adjacent m (m is a natural number) pixels. A reference table in which interpolation coefficients are stored in advance;
A generation address setting unit for setting an address position to be generated according to the set magnification;
A coefficient generation unit that selects the interpolation coefficient stored in the reference table based on the address position set by the generation address setting unit ;
When K1, K2,..., Km are interpolation coefficients, X1, X2,..., Xm are pixel data used for the interpolation processing, and SK is the sum of the interpolation coefficients from i to 1 to m, the interpolation processing is generated. The obtained pixel data Y is
Y = (K1 · X1 + K2 · X2 + ... + Km · Xm) / SK
The sum SK of the interpolation coefficients is 2 to the qth power (q is an integer),
When the pixel data Xr (r is a natural number, 1 ≦ r ≦ m) used for the interpolation processing and the address position of the generated pixel data match, the interpolation coefficient Kr multiplied by the pixel data Xr is expressed as Kr = SK And other interpolation coefficients are non-zero values,
When the gravity center position of the interpolation coefficient sequence is g,
An image processing apparatus characterized in that g = (K1 × 1 + K2 × 2 +... Km × m) / SK) is matched with each of the divided address positions .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001182228A JP4523200B2 (en) | 2001-06-15 | 2001-06-15 | Image processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001182228A JP4523200B2 (en) | 2001-06-15 | 2001-06-15 | Image processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2002374407A JP2002374407A (en) | 2002-12-26 |
| JP4523200B2 true JP4523200B2 (en) | 2010-08-11 |
Family
ID=19022372
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001182228A Expired - Fee Related JP4523200B2 (en) | 2001-06-15 | 2001-06-15 | Image processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4523200B2 (en) |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005109994A (en) * | 2003-09-30 | 2005-04-21 | Matsushita Electric Ind Co Ltd | Imaging device |
| JP4500707B2 (en) | 2004-03-24 | 2010-07-14 | キヤノン株式会社 | Image data processing device |
| JP2006019950A (en) | 2004-06-30 | 2006-01-19 | Toshiba Corp | Video signal processing apparatus and video signal processing method |
| US8086073B2 (en) * | 2008-02-07 | 2011-12-27 | Seiko Epson Corporation | Non-uniform image resizer |
| US20100054621A1 (en) * | 2008-08-26 | 2010-03-04 | Qualcomm Incorporated | Dual lookup table design for edge-directed image scaling |
| JP5202225B2 (en) * | 2008-10-17 | 2013-06-05 | キヤノン株式会社 | Imaging apparatus and control method thereof |
| CN112508790B (en) * | 2020-12-16 | 2023-11-14 | 上海联影医疗科技股份有限公司 | Image interpolation method, device, equipment and medium |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH11298727A (en) * | 1998-02-16 | 1999-10-29 | Sumitomo Metal Ind Ltd | Digital image scaling method and circuit |
| JP2000023031A (en) * | 1998-06-30 | 2000-01-21 | Matsushita Electric Ind Co Ltd | Electronic zoom device |
| JP4317619B2 (en) * | 1999-07-22 | 2009-08-19 | メディア・テック・ユーエスエイ・インコーポレーテッド | Image processing device |
| JP2001094858A (en) * | 1999-09-22 | 2001-04-06 | Olympus Optical Co Ltd | Digital camera |
-
2001
- 2001-06-15 JP JP2001182228A patent/JP4523200B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2002374407A (en) | 2002-12-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7881563B2 (en) | Distortion correction of images using hybrid interpolation technique | |
| US4672463A (en) | Method for emphasizing sharpness in picture scanning recording time in a picture reproducing machine | |
| US6339479B1 (en) | Video processing apparatus for processing pixel for generating high-picture-quality image, method thereof, and video printer to which they are applied | |
| JPH1011009A (en) | Video signal processing device and display device using the same | |
| JP4523200B2 (en) | Image processing device | |
| EP0554836B1 (en) | Parabolic waveform generating apparatus | |
| WO2000064158A1 (en) | Image processing circuit | |
| JP4377622B2 (en) | Shading correction device | |
| JPH06261238A (en) | Imaging device | |
| US7693352B2 (en) | Sectional image scaling circuit with quadratic function scaling factor | |
| JP2002041000A (en) | Liquid crystal display device and color correction method thereof | |
| JP3035992B2 (en) | Video signal processing device | |
| JP4265363B2 (en) | Image processing device | |
| JP2008228251A (en) | Image processor, image processing method, and image processing program | |
| KR100463552B1 (en) | Cubic convolution interpolation apparatus and method | |
| JP5603414B2 (en) | Content Adaptive Scaler Based on Fallow Structure | |
| US20040215682A1 (en) | Apparatus for removing aliasing of inverse mapping algorithm | |
| JPH07177407A (en) | Imaging device | |
| JPH07123335A (en) | Double screen display television receiver | |
| JP2006238188A (en) | Interpolation filter and video signal processing apparatus | |
| JPH0738805A (en) | Image magnifier | |
| JPH10233942A (en) | Image display control device and method | |
| JP4265362B2 (en) | Image processing device | |
| JP4257650B2 (en) | Image signal processing circuit | |
| EP0665695A2 (en) | Digital convergence apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080418 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100125 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100225 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100420 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100518 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100527 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4523200 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130604 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees | ||
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |