JP3633689B2 - Image processing method - Google Patents
Image processing method Download PDFInfo
- Publication number
- JP3633689B2 JP3633689B2 JP27830095A JP27830095A JP3633689B2 JP 3633689 B2 JP3633689 B2 JP 3633689B2 JP 27830095 A JP27830095 A JP 27830095A JP 27830095 A JP27830095 A JP 27830095A JP 3633689 B2 JP3633689 B2 JP 3633689B2
- Authority
- JP
- Japan
- Prior art keywords
- original
- density
- pixels
- pixel
- original pixel
- 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
- 238000003672 processing method Methods 0.000 title claims description 12
- 238000010586 diagram Methods 0.000 description 26
- 238000000034 method Methods 0.000 description 25
- 230000000694 effects Effects 0.000 description 2
- 230000007423 decrease Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Landscapes
- Color, Gradation (AREA)
- Laser Beam Printer (AREA)
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は画像処理方法に係り、特に、拡大倍率に応じて既存の各原画素間に生じる空間を拡大画素で補間する際に、その濃度を最適な値に設定できるようにした画像処理方法に関する。
【0002】
【従来の技術】
従来の画像処理装置における拡大処理では、拡大倍率に応じて既存の各原画素間に生じる空間を拡大画素で補間する際に、同一画素を拡大倍率に応じた回数だけ繰り返し用いる単純拡大方式が採用されていた。しかしながら、このような単純拡大方式では解像度が劣化するばかりか、斜線部分ではジャギーが発生して画質の劣化が大きいという問題があった。そこで、例えば特開昭62−145482号公報では、マトリックス状に配置された4つの原画素を頂点とする四角形領域内において、新たに発生する各拡大画素の位置に関する内分比を前記4つの原画素の位置を基準にして求め、当該内分比と各4つの頂点画素の濃度とに基づいて、各拡大画素の濃度を決定する4点補間処理が提案されている。
【0003】
【発明が解決しようとする課題】
図21は、前記4点補間処理の問題点を明らかにするための図である。今、図中左側に示した4つの原画素A1 ,A2 ,A3 ,A4 に着目すると、長さに関する3倍拡大(以下、同様)では、図中右側に示したように“△”で示した12個の画素(拡大画素)が新たに発生することになる。ここで、上記した従来の4点補間処理では、各拡大画素“△”は全ての原画素A1 〜A4 の影響を受けるため、高濃度の原画素A1 ,A2 ,A3 に近い領域21a内の各拡大画素の濃度は比較的高濃度に設定されるが、低濃度の原画素A4 に近い領域21b内の各拡大画素は、原画素A4 の影響を強く受けるので比較的低濃度に設定される。すなわち、図中破線矢印で示したように、拡大画素“△”の濃度は原画素A1 からA4 へ向かって徐々に薄くなる。
【0004】
したがって、原画素A2 およびA3 が文字アウトラインの斜線部分を構成している場合には、拡大像では領域21aの画素濃度が薄いためにアウトラインがボケてしまうことになる。同様に、原画素A1 ,A2 ,A3 が文字アウトラインの直角部分を構成している場合には、直角部分が鈍ってしまうことになる。
【0005】
本発明の目的は、上記した従来技術の問題点を解決し、拡大像における文字アウトラインの斜線部でのボケや直角部での鈍りが防止されるようにした画像処理方法を提供することにある。
【0006】
【課題を解決するための手段】
上記した目的を達成するために、本発明では、処理対象の画像を任意の倍率で拡大し、拡大倍率に応じて各原画素間に生じた空間を拡大画素で補間する画像処理方法において、拡大対象画像を2原画素×2原画素に相当する大きさのウインドウで走査し、各走査位置におけるウインドウ内での4つの原画素の濃度分布を検出し、3つの原画素の濃度のみが予定値以上であると、当該3つの原画素を頂点とする三角形内に発生する拡大画素の濃度を前記予定値以上に設定するようにした点に特徴がある。
【0007】
上記した構成によれば、濃度が予定値以上である3つの原画素のうち、相互に対向する2つの画素を結ぶライン上に発生して拡大画像のアウトラインとなる拡大画素の濃度が全て予定値以上の濃度に設定されるので、文字アウトラインのボケが防止されるようになる。
【0008】
【発明の実施の形態】
以下、図面を参照して本発明を詳細に説明する。図1、2は本発明の一実施形態の動作を模式的に示した図である。本実施形態では、図2に示したように、入力された拡大対象画像1(22画素×22画素)の少なくとも主要部を2原画素×2原画素に相当する大きさのウインドウ20で左上隅から右下隅に向かって走査し、各走査位置におけるウインドウ20内での原画素の濃度分布を検出する。そして、例えばウインドウが符号20aで示した走査位置にあり、図1に示したように、ウインドウ20a内の4つの原画素A、B、C、Dのうちいずれか3つの原画素(本実施形態では、原画素A、B、C)の濃度が予定値以上であると、当該3つの原画素A、B、Cを頂点とする三角形ABC内に発生する各拡大画素“△”の濃度のみを全て前記予定値以上に設定するようにした点に特徴がある。
【0009】
本実施形態によれば、原画素B、Cを結ぶ文字アウトライン上に発生した拡大画素の濃度が全て予定値以上の濃度に設定されるので、文字アウトラインのボケが防止されるようになる。
【0010】
図3は、本発明の他の実施形態の動作を示したフローチャートである。ステップS1では、図4(a) に実線枠で示したように、入力された拡大対象画像1(22画素×22画素)の左上隅に4画素×4画素に相当する大きさの第2ウインドウを設定する。ステップS2では、同図(b) に示したように、当該位置において第2ウインドウ10内に収まる16個の画素に、それぞれの位置に応じて符号A11〜A44を割り付け、各原画素A11〜A44の濃度データa11〜a44を読み出す。本実施形態では、各原画素Aijの濃度データaijが0(白色)〜255(黒色)の256階調(8ビットのデジタルデータ)で表されるものとして説明する。
【0011】
ステップS3では、後に詳述するように、各濃度データa11〜a44に基づいて、第2ウインドウ10の中心部に確保した2画素×2画素の第1ウインドウ20内の4つの原画素A22、A23、A32およびA33のいずれか3つが、拡大対象画像1において文字アウトラインの直角部分を構成しているか否かが以下のようにして判定される。
【0012】
図5は、前記第1ウインドウ20内の4つの原画素A22、A23、A32およびA33のいずれか3つが、文字アウトラインの直角部分を構成していると判定される4つの条件を模式的に表現した図であり、各条件は以下の通りである。
(1) 第1条件
図5(a) に示したように、原画素A12の濃度と、原画素A22、A32、A33およびA34の濃度とが一致し、かつ原画素A23の濃度と原画素A32の濃度とが一致しなければ、原画素A22、A32、A33は文字アウトラインの直角部分を構成していると判定される。なお、本実施形態で言う“濃度の一致”とは、8ビットのデジタルデータが完全に一致している場合のみならず、上位の数ビット(例えば、上位4ビット)が一致している場合も含むものとする。
(2) 第2条件
図5(b) に示したように、原画素A13の濃度と、原画素A23、A33、A32およびA31の濃度とが一致し、かつ原画素A22の濃度と原画素A33の濃度とが一致しなければ、原画素A23、A33、A32は文字アウトラインの直角部分を構成していると判定される。
(3) 第3条件
図5(c) に示したように、原画素A21の濃度と、原画素A22、A23、A33およびA43の濃度とが一致し、かつ原画素A23の濃度と原画素A32の濃度とが一致しなければ、原画素A22、A23、A33は文字アウトラインの直角部分を構成していると判定される。
(4) 第4条件
図5(d) に示したように、原画素A42の濃度と、原画素A32、A22、A23およびA24の濃度とが一致し、かつ原画素A22の濃度と原画素A33の濃度とが一致しなければ、原画素A23、A22、A32は文字アウトラインの直角部分を構成していると判定される。
【0013】
例えば、第2ウインドウが図6(a) に符号10で示した走査位置にあれば、第2ウインドウ10内での各原画素の濃度分布は同図(b) に示したようになる。このため、原画素A33、A34、A43およびA44以外の濃度が予定の基準値以上となって前記図5(d) に示した条件を満足するので、第1ウインドウ20内の3つの原画素A22、A23、A32は文字アウトラインの直角部を構成していると判定されることになる。なお、第2ウインドウが符号10a、10b、10cで示した走査位置にある場合も、それぞれ前記図5(a) に示した第1条件、図5(b) に示した第2条件、図5(c) に示した第3条件を満足するので、前記と同様に文字アウトラインの直角部を構成していると判定される。
【0014】
そして、上記した4つの条件のいずれかが満足されると、当該処理はステップS3からS12へ進み、いずれの条件も満足されないとステップS4へ進む。図7は、前記4つの条件のいずれかが満足された場合、すなわち第1ウインドウ20内の3つの原画素が文字アウトラインの直角部分を構成していると判定された場合にステップS12で実行される最近隣内挿法による補間方法を模式的に表現した図であり、ここでは、第1ウインドウ20内の3つの原画素A22、A23、A32が直角部分を構成していると判定された場合を例にして説明する。
【0015】
本実施形態では、第2ウインドウ10内に発生する各拡大画素の濃度を、それぞれ最近隣原画素の濃度に設定するために、拡大後の領域を主走査方向および副走査方向のそれぞれに2分割することで4つの領域E1 〜E4 に分け、各領域内で新たに発生した画素は当該領域に含まれる原画素の濃度に設定するようにした点に特徴がある。
【0016】
すなわち、原画素A22を含む第1領域E1 内に発生した3つの拡大画素は、全て最近隣の原画素A22の濃度に設定する。同様に、原画素A23を含む第2領域E2 内の拡大画素は全て原画素A23の濃度に設定し、原画素A32を含む第3領域E3 内の拡大画素は全て原画素A32の濃度に設定し、原画素A33を含む第3領域E4 内の拡大画素は全て原画素A33の濃度に設定するようにした。
【0017】
上記した最近隣内挿法による補間方法を採用すれば、領域E1 ,E2 ,E3 内の画素は全て高濃度となり、領域E4 内の画素は全て低濃度となるので、文字アウトラインの直角部分と判定された領域では拡大後も直角になり、当該部分での“鈍り”が防止される。
【0018】
一方、前記ステップS3の判定が否定になると、ステップS4では、今度は第1ウインドウ20内の4つの原画素A22、A23、A32およびA33のうち、対向する画素同士(原画素A22とA33、または原画素A23とA32)が拡大対象画像1において文字アウトラインの斜線部分を構成しているか否かが判定される。
【0019】
図8は対向する画素同士のいずれかが文字アウトラインの斜線部分を構成していると判定される4つの条件を示した図であり、各条件は以下の通りである。
(1) 第1条件
図8(a) に示したように、原画素A22の濃度が予定値以上であり、かつ原画素A22、A32、およびA33の濃度が等しく、原画素A23およびA32の濃度が等しくない場合、原画素A22およびA33は文字アウトラインの斜線部分を構成していると判定される。
(2) 第2条件
図8(b) に示したように、原画素A23の濃度が予定値以上であり、かつ原画素A23、A32、およびA33の濃度が等しく、原画素A22およびA33の濃度が等しくない場合、原画素A23およびA32は文字アウトラインの斜線部分を構成していると判定される。
(3) 第3条件
図8(c) に示したように、原画素A22の濃度が予定値以上であり、かつ原画素A22、A23、およびA33の濃度が等しく、原画素A32およびA23の濃度が等しくない場合、原画素A22およびA33は文字アウトラインの斜線部分を構成していると判定される。
(4) 第4条件
図8(d) に示したように、原画素A23の濃度が予定値以上であり、かつ原画素A23、A22、およびA32の濃度が等しく、原画素A33およびA22の濃度が等しくない場合、原画素A23およびA32は文字アウトラインの斜線部分を構成していると判定される。
【0020】
例えば、第2ウインドウ10が図9(a) に示した走査位置にあれば、第2ウインドウ10内での各原画素の濃度分布は同図(b) に示したようになり、原画素A23の濃度が予定値以上で、原画素A23、A32、およびA33の濃度が等しいので、原画素A23およびA32は文字アウトラインの斜線部分を構成していると判定されることになる。そして、上記した4つの条件のいずれかが満足されると、当該処理はステップS11へ進み、いずれの条件も満足されないとステップS5へ進む。
【0021】
図10は、ステップS11で実行される斜線専用の補間方法を模式的に表現した図であり、ここでは、3つの原画素A22、A23、A32が文字アウトラインの斜線部分を構成していると判定された場合を例にして説明する。
【0022】
本実施形態では、新たに発生する12個の拡大画素のうち、濃度が予定値以上である3つの原画素A22、A23、A32を結んで得られる三角形内に含まれる全ての画素の濃度を前記予定値以上の濃度に設定するようにしている。この結果、図10の右側に示したように、原画素A32、A23を結ぶライン上に発生した拡大画素の濃度も全て予定値以上の濃度に設定されるので、文字アウトラインのボケが防止されるようになる。
【0023】
一方、前記ステップS4の判定も否定になると、ステップS5では、再び各濃度データa11〜a44に基づいて、第1ウインドウ20内の4つの原画素A22、A23、A32およびA33が、拡大対象画像において直角あるいは斜線以外の文字アウトラインを構成しているか否かが判定される。
【0024】
図11、12は、各原画素が直角あるいは斜線以外の文字アウトラインを構成していると判定される8つの条件を示した図であり、特に図11(a) 〜(d) は、原画素A22、A23、A32およびA33のいずれか1つの原画素が文字アウトラインを構成していると判定(続くステップS9の判定が肯定)される4つの条件であり、図12(a) 〜(d) は、原画素A22、A23、A32およびA33のうち、各走査方向に関して隣接する2つの原画素が文字アウトラインを構成していると判定(ステップS9の判定が否定)される4つの条件である。
(1) 第1条件
図11(a) に示したように、原画素A22、A32およびA33の濃度が共に予定値未満であり、かつ原画素A23の濃度が予定値以上であって、その値が主走査方向に関して隣り合う原画素A24および副走査方向に関して隣り合う原画素A13のいずれか一方と等しい場合、原画素A23は文字アウトラインを構成していると判定される。
(2) 第2条件
図11(b) に示したように、原画素A23、A33およびA32の濃度が共に予定値未満であり、かつ原画素A22の濃度が予定値以上であって、その値が主走査方向に関して隣り合う原画素A21および副走査方向に関して隣り合う原画素A12のいずれか一方と等しい場合、原画素A22は文字アウトラインを構成していると判定される。
(3) 第3条件
図11(c) に示したように、原画素A22、A23およびA33の濃度が共に予定値未満であり、かつ原画素A32の濃度が予定値以上であって、その値が主走査方向に関して隣り合う原画素A31および副走査方向に関して隣り合う原画素A42のいずれか一方と等しい場合、原画素A32は文字アウトラインを構成していると判定される。
(4) 第4条件
図11(d) に示したように、原画素A23、A22およびA32の濃度が共に予定値未満であり、かつ原画素A33の濃度が予定値以上であって、その値が主走査方向に関して隣り合う原画素A34および副走査方向に関して隣り合う原画素A43のいずれか一方と等しい場合、原画素A33は文字アウトラインを構成していると判定される。
(5) 第5条件
図12(a) に示したように、原画素A22の濃度が予定値以上であり、かつ原画素A22の濃度と原画素A32の濃度とが一致し、かつ原画素A23の濃度と原画素A33の濃度とが共に予定値未満の場合、原画素A22およびA32は文字のアウトラインを構成していると判定される。
(6) 第6条件
図12(b) に示したように、原画素A22の濃度が予定値以上であり、かつ原画素A22の濃度と原画素A23の濃度とが一致し、かつ原画素A32の濃度と原画素A33の濃度とが共に予定値未満の場合、原画素A22およびA23は文字のアウトラインを構成していると判定される。
(7) 第7条件
図12(c) に示したように、原画素A23の濃度が予定値以上であり、かつ原画素A23の濃度と原画素A33の濃度とが一致し、かつ原画素A22の濃度と原画素A32の濃度とが共に予定値未満の場合、原画素A23およびA33は文字のアウトラインを構成していると判定される。
(8) 第8条件
図12(d) に示したように、原画素A32の濃度が予定値以上であり、かつ原画素A32の濃度と原画素A33の濃度とが一致し、かつ原画素A22の濃度と原画素A23の濃度とが共に予定値未満の場合、原画素A32およびA33は文字のアウトラインを構成していると判定される。
【0025】
例えば、第2ウインドウ10が図13(a) に示した走査位置にあれば、第2ウインドウ10内での各原画素の濃度分布は同図(b) に示したようになり、当該位置では、原画素A22、A23およびA33の濃度が共に予定値未満であり、かつ原画素A32の濃度が予定値以上であって、その値が副走査方向に関して隣り合う原画素A42と等しい。したがって、原画素A32は前記図11(c) に関して説明した条件を満足するので、文字アウトラインを構成していると判定されてステップS10へ進む。
【0026】
図14は、ステップS10で実行される補間方法を模式的に表現した図であり、ここでは原画素A32のみが文字アウトラインを構成している場合を例にして説明する。
【0027】
本実施形態の補間方法は、前記図7に関して説明した最近隣内挿法を変形したもので、前記と同様に拡大後の領域を4つの領域E1 〜E4 に分割する。そして、文字アウトラインを構成していないと判定された3つの原画素A22、A23、A33を含む第1、第2および第4領域内に発生した原画素は、それぞれ原画素A22、A23、A33の濃度に設定するが、文字アウトラインを構成していると判定された原画素A32を含む第3領域E3 内に発生した原画素は、原画素A32を除く他の原画素A22、A23、A33を使用して最近隣内挿法により濃度を設定する。この結果、第3領域E3 内では、原画素A32を除く他の3つの拡大画素の濃度は、いずれも予定の濃度以下となる。
【0028】
一方、第2ウインドウが図16(a) に符号10で示した走査位置にあれば、第2ウインドウ10内での各原画素の濃度分布は同図(b) に示したようになり、当該位置での濃度分布は前記図12(a) に関して説明した条件を満足する。したがって、第1ウインドウ20内で隣接する2つの原画素A22、A32は直角および斜線以外の文字アウトラインを構成していると判定されて当該処理はステップS12へ進む。なお、第2ウインドウが、図16(a) において符号10a、10b、10cで示した位置に設定された場合も、前記と同様に第1ウインドウ20内で予定値以上の濃度の原画素は直角および斜線以外の文字アウトラインを構成していると判定される。
【0029】
図15は前記ステップS9において、文字アウトラインを構成している原画素が1つではないと判定された場合に前記ステップS12で実行される補間方法を模式的に表現した図である。
【0030】
本実施形態でも、新たに発生する12個の拡大画素のうち、濃度が予定値以上である2つの原画素A32、A33を含む領域E3 、E4 は、それぞれ原画素A32およびA33の濃度に設定され、濃度が予定値未満である2つの原画素A22、A23を含む領域E1 、E2 は、それぞれ原画素A22およびA23の濃度に設定される。なお、第1ウインドウ20内の原画素の濃度が全て予定値以上または予定値未満である場合のように、前記ステップS5の判定も否定になると、ステップS6では従来の4点間線形拡大による補間処理が実行される。
【0031】
以上のようにして、いずれかの補間処理が完了すると、ステップS7では、現在の第2ウインドウ10が右下隅に位置しているか否か判定され、図17に示したように右下隅に位置していれば当該処理を終了し、それ以外に位置していれば、ステップS8において、当該位置に応じて第2ウインドウ10の位置を移動する。例えば、図4(a) に破線枠で示したように、第2ウインドウ10が右端に位置していないと主走査方向へ一画素分だけ移動される。また、図18に実線枠で示したように右端に位置していると、縦方向へ一画素分だけシフトすると共に、横方向に関しては左端へ移動させる。以下同様にして、第2ウインドウを主走査方向および副走査方向へ順次走査させながら上記した各判定を繰り返す。
【0032】
ところで、上記した実施形態では、図19に“●”または“○”で表現した原画素に対して長さで4倍の拡大処理を実行すると、例えば原画素A22、A23、A32、A33で囲まれた第1ウインドウ20では前記図12(d) の条件が満足されるので、ステップS12において最近隣内挿法が適用される。このため、領域19内の拡大画素は全て予定値以上の濃度に設定されてしまう。しかしながら、当該領域19内の拡大画素は全て予定値以下に設定されるようにすることが望ましい。そこで、このような場合には原画素A32、A33を除いた残りの画素(原画素A22、A23)のみに基づいて最近隣内挿法を適用しても良い。このようにすれば、図20に示したように領域19内の拡大画素が全て予定値未満の濃度に設定される。
【0033】
なお、上記した各実施形態では濃度が予定値以上の画素を文字画素とみなして補間処理する場合を例にして説明したが、白抜き文字のように濃度が予定値以下の画素を文字画素とみなす場合の補間処理にも同様に適用することができる。
【0034】
【発明の効果】
上記したように、本発明によれば以下のような効果が達成される。
(1) 請求項1によれば、2原画素×2原画素のウインドウ内で濃度が予定値以上である3つの原画素のうち、対向する2つの原画素を結ぶ文字アウトライン上に新たに発生する拡大画素の濃度は全て予定値以上に設定されるので、文字アウトラインのボケが防止され、原画に忠実な拡大画像を得られるようになる。
(2) 請求項2によれば、2原画素×2原画素のウインドウ内で濃度が予定値以上である3つの原画素が文字アウトラインの直角部分を構成していると、各拡大画素の濃度が最近隣原画素の濃度に設定されるので、文字アウトラインの直角部分での鈍りが防止され、原画に忠実な拡大画像を得られるようになる。
(3) 請求項3によれば、2原画素×2原画素のウインドウ内で濃度が予定値以上である3つの原画素のうち、対向する2つの原画素が文字アウトラインの斜線部 分を構成していると、3つの原画素を頂点とする三角形内に発生する各拡大画素の濃度が全て予定値以上に設定されるので、文字アウトラインのボケが防止されて原画に忠実な拡大画像を得られるようになる。
(4) 請求項4によれば、2原画素×2原画素のウインドウ内で走査方向に隣接する2つの原画素が文字アウトラインを構成していると、各拡大画素の濃度が最近隣原画素の濃度に設定されるので、文字アウトラインのボケが防止されて原画に忠実な拡大画像を得られるようになる。
(5) 請求項5によれば、2原画素×2原画素のウインドウ内で1つの原画素のみが文字アウトラインを構成していると、各拡大画素の濃度が最近隣原画素の濃度に設定されるので、文字アウトラインのボケが防止されて原画に忠実な拡大画像を得られるようになる。
【図面の簡単な説明】
【図1】本発明の一実施形態の動作を説明するための図である。
【図2】本発明の一実施形態の動作を説明するための図である。
【図3】本発明の他の実施形態の動作を示したフローチャートである。
【図4】ウインドウの構成を説明するための図である。
【図5】原画素が文字アウトラインの直角部分を構成していると判定される条件を模式的に示した図である。
【図6】原画素が文字アウトラインの直角部分を構成していると判定される場合を示した図である。
【図7】原画素が文字アウトラインの直角部分を構成していると判定された場合に実行される補間処理方法を模式的に示した図である。
【図8】原画素が文字アウトラインの斜線部分を構成していると判定される条件を模式的に示した図である。
【図9】原画素が文字アウトラインの斜線部分を構成していると判定される場合を示した図である。
【図10】3つの原画素が文字アウトラインの斜線部分を構成していると判定された場合に実行される補間処理方法を模式的に示した図である。
【図11】1つの原画素が文字アウトラインを構成していると判定される条件を模式的に示した図である。
【図12】2つの原画素が文字アウトラインを構成していると判定される条件を模式的に示した図である。
【図13】1つの原画素が文字アウトラインの斜線部分を構成していると判定される場合を示した図である。
【図14】1つの原画素が文字アウトラインを構成していると判定された場合に実行される補間処理方法を模式的に示した図である。
【図15】2つの原画素が文字アウトラインを構成していると判定された場合に実行される補間処理方法を模式的に示した図である。
【図16】2つの原画素が文字アウトラインを構成していると判定される場合を示した図である。
【図17】ウインドウの走査方法を示した図である。
【図18】ウインドウの走査方法を示した図である。
【図19】他の実施形態による補間結果を示した図である。
【図20】さらに他の実施形態による補間結果を示した図である。
【図21】従来の4点補間方法を示した図である。
【符号の説明】
1…拡大対象画像、10…第1ウインドウ、20…第1ウインドウ [0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method, and more particularly, to an image processing method in which the density can be set to an optimum value when a space generated between each original pixel is interpolated with an enlarged pixel in accordance with an enlargement magnification. .
[0002]
[Prior art]
In the enlargement processing in the conventional image processing apparatus, a simple enlargement method that repeatedly uses the same pixel the number of times corresponding to the enlargement magnification when interpolating the space created between each original pixel according to the enlargement magnification with the enlargement pixel is adopted. It had been. However, in such a simple enlargement method, there is a problem that not only the resolution is deteriorated but also the image quality is greatly deteriorated due to jaggy in the shaded portion. Therefore, for example, in Japanese Patent Application Laid-Open No. 62-145482, the internal division ratio relating to the position of each newly generated enlarged pixel in the quadrangular region having the four original pixels arranged in a matrix as the apexes is calculated. A four-point interpolation process has been proposed in which a pixel position is obtained as a reference and the density of each enlarged pixel is determined based on the internal ratio and the density of each of the four vertex pixels.
[0003]
[Problems to be solved by the invention]
FIG. 21 is a diagram for clarifying the problems of the four-point interpolation process. Now, paying attention to the four original pixels A1, A2, A3, A4 shown on the left side of the figure,About length3x magnification(Hereinafter the same)Then, as shown in the right side of the figure, 12 pixels (enlarged pixels) indicated by “Δ” are newly generated. Here, in the above-described conventional four-point interpolation processing, each enlarged pixel “Δ” is affected by all the original pixels A1 to A4, so each of the enlarged pixels “1”, A2 and A3 in the region 21a close to the high density original pixels A1, A2 and A3. The density of the enlarged pixel is set to a relatively high density, but each enlarged pixel in the
[0004]
Therefore, when the original pixels A2 and A3 constitute the shaded portion of the character outline, the outline is blurred because the pixel density of the region 21a is low in the enlarged image. Similarly, when the original pixels A1, A2, and A3 constitute a right-angle portion of the character outline, the right-angle portion becomes dull.
[0005]
SUMMARY OF THE INVENTION An object of the present invention is to provide an image processing method that solves the above-described problems of the prior art and prevents blurring in a hatched portion of a character outline and blunting in a right angle portion in an enlarged image. .
[0006]
[Means for Solving the Problems]
In order to achieve the above object, in the present invention, in an image processing method for enlarging a processing target image at an arbitrary magnification, and interpolating a space generated between each original pixel with an enlarged pixel according to the enlargement magnification, The target image has a size corresponding to 2 original pixels × 2 original pixels.WindowsAt each scanning position.WindowsIf the density distribution of the four original pixels is detected and only the density of the three original pixels is equal to or higher than the predetermined value, the density of the enlarged pixel generated in the triangle having the three original pixels as vertices is determined as the predetermined density. It is characterized in that it is set to be higher than the value.
[0007]
According to the above-described configuration, the density of all the enlarged pixels that are generated on the line connecting two pixels facing each other and are the outline of the enlarged image among the three original pixels having the density equal to or higher than the predetermined value are all the predetermined values. Since the above density is set, blurring of the character outline is prevented.
[0008]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present invention will be described in detail with reference to the drawings. 1 and 2 are diagrams schematically showing the operation of one embodiment of the present invention. In the present embodiment, as shown in FIG. 2, at least the main part of the input enlargement target image 1 (22 pixels × 22 pixels) has a size corresponding to 2 original pixels × 2 original pixels.Windows20 to scan from the upper left corner to the lower right corner.WindowsThe density distribution of the original pixel in 20 is detected. And for exampleWindowsIs at the scanning position indicated by reference numeral 20a, and as shown in FIG.WindowsIf the density of any three of the four original pixels A, B, C, and D in 20a (in this embodiment, the original pixels A, B, and C) is greater than or equal to a predetermined value, the three original pixels Only the density of each enlarged pixel “Δ” generated in the triangle ABC having the vertices of the pixels A, B, and C is all set to the predetermined value or more.
[0009]
According to the present embodiment, since the density of all the enlarged pixels generated on the character outline connecting the original pixels B and C is set to a density equal to or higher than the predetermined value, blurring of the character outline is prevented.
[0010]
FIG. 3 is a flowchart showing the operation of another embodiment of the present invention. In step S1, as shown by the solid line frame in FIG. 4A, a second image having a size corresponding to 4 pixels × 4 pixels at the upper left corner of the input enlargement target image 1 (22 pixels × 22 pixels).WindowsSet. In step S2, as shown in FIG.WindowsCodes A11 to A44 are assigned to the 16 pixels that fall within 10 according to their positions, and the density data a11 to a44 of the original pixels A11 to A44 are read out. In the present embodiment, it is assumed that the density data aij of each original pixel Aij is represented by 256 gradations (8-bit digital data) from 0 (white) to 255 (black).
[0011]
In step S3, as will be described in detail later, based on the respective density data a11 to a44, the secondWindowsFirst of 2 pixels × 2 pixels secured in the center of 10WindowsWhether any three of the four original pixels A22, A23, A32, and A33 in 20 form a right-angle portion of the character outline in the
[0012]
FIG. 5 shows the firstWindows20 is a diagram schematically representing four conditions in which any three of the four original pixels A22, A23, A32, and A33 in 20 are determined to constitute a right-angle portion of the character outline. It is as follows.
(1) First condition
As shown in FIG. 5A, the density of the original pixel A12 matches the density of the original pixels A22, A32, A33 and A34, and the density of the original pixel A23 and the density of the original pixel A32 match. Otherwise, it is determined that the original pixels A22, A32, A33 constitute a right-angle portion of the character outline. The “density match” referred to in this embodiment is not only when the 8-bit digital data is completely matched, but also when the upper several bits (for example, the upper 4 bits) are matched. Shall be included.
(2) Second condition
As shown in FIG. 5B, the density of the original pixel A13 matches the density of the original pixels A23, A33, A32, and A31, and the density of the original pixel A22 matches the density of the original pixel A33. Otherwise, it is determined that the original pixels A23, A33, A32 constitute a right-angle portion of the character outline.
(3) Third condition
As shown in FIG. 5C, the density of the original pixel A21 matches the density of the original pixels A22, A23, A33, and A43, and the density of the original pixel A23 and the density of the original pixel A32 match. Otherwise, it is determined that the original pixels A22, A23, A33 constitute a right-angle portion of the character outline.
(4) Fourth condition
As shown in FIG. 5D, the density of the original pixel A42 and the densities of the original pixels A32, A22, A23 and A24 match, and the density of the original pixel A22 and the density of the original pixel A33 match. Otherwise, it is determined that the original pixels A23, A22, A32 constitute a right-angle portion of the character outline.
[0013]
For example, the secondWindowsIs at the scanning position indicated by
[0014]
If any of the above four conditions is satisfied, the process proceeds from step S3 to step S12. If any of the conditions is not satisfied, the process proceeds to step S4. FIG. 7 shows the case where any one of the four conditions is satisfied, that is, the firstWindows20 is a diagram schematically representing an interpolation method by nearest neighbor interpolation executed in step S12 when it is determined that three original pixels in 20 form a right-angle portion of a character outline. , FirstWindowsAn example will be described in which it is determined that the three original pixels A22, A23, and A32 in 20 form a right-angle portion.
[0015]
In this embodiment, the secondWindowsIn order to set the density of each enlarged pixel generated in 10 to the density of the nearest neighbor original pixel, the area after enlargement is divided into two parts in each of the main scanning direction and the sub-scanning direction, so that four areas E1 to E1. E4 is characterized in that the newly generated pixel in each area is set to the density of the original pixel included in the area.
[0016]
That is, the three enlarged pixels generated in the first area E1 including the original pixel A22 are all set to the density of the nearest original pixel A22. Similarly, all the enlarged pixels in the second area E2 including the original pixel A23 are set to the density of the original pixel A23, and all the enlarged pixels in the third area E3 including the original pixel A32 are set to the density of the original pixel A32. All the enlarged pixels in the third region E4 including the original pixel A33 are set to the density of the original pixel A33.
[0017]
If the above-mentioned interpolation method by nearest neighbor interpolation is adopted, the pixels in the areas E1, E2, and E3 all have high density, and all the pixels in the area E4 have low density. The enlarged area becomes a right angle even after enlargement, and “blunting” in that part is prevented.
[0018]
On the other hand, if the determination in step S3 is negative, in step S4, the first timeWindowsAmong the four original pixels A22, A23, A32 and A33 in 20, the opposing pixels (original pixels A22 and A33 or original pixels A23 and A32) constitute the shaded portion of the character outline in the
[0019]
FIG. 8 is a diagram showing four conditions in which it is determined that any of the opposing pixels constitutes the shaded portion of the character outline. Each condition is as follows.
(1) First condition
As shown in FIG. 8A, when the density of the original pixel A22 is equal to or higher than the predetermined value, the densities of the original pixels A22, A32, and A33 are equal, and the densities of the original pixels A23 and A32 are not equal, It is determined that the pixels A22 and A33 constitute the shaded portion of the character outline.
(2) Second condition
As shown in FIG. 8B, when the density of the original pixel A23 is equal to or higher than the predetermined value, the densities of the original pixels A23, A32, and A33 are equal and the densities of the original pixels A22 and A33 are not equal, It is determined that the pixels A23 and A32 constitute the shaded portion of the character outline.
(3) Third condition
As shown in FIG. 8C, when the density of the original pixel A22 is not less than the predetermined value, the densities of the original pixels A22, A23, and A33 are equal, and the densities of the original pixels A32 and A23 are not equal, It is determined that the pixels A22 and A33 constitute the shaded portion of the character outline.
(4) Fourth condition
As shown in FIG. 8D, when the density of the original pixel A23 is not less than the predetermined value, the densities of the original pixels A23, A22, and A32 are equal, and the densities of the original pixels A33 and A22 are not equal, It is determined that the pixels A23 and A32 constitute the shaded portion of the character outline.
[0020]
For example, the
[0021]
FIG. 10 is a diagram schematically illustrating the interpolation method dedicated to the oblique line executed in step S11. Here, it is determined that the three original pixels A22, A23, and A32 constitute the shaded part of the character outline. This will be described as an example.
[0022]
In the present embodiment, among the 12 newly generated enlarged pixels, the density of all the pixels included in the triangle obtained by connecting the three original pixels A22, A23, A32 whose density is equal to or higher than the predetermined value is calculated as described above. The density is set higher than the planned value. As a result, as shown on the right side of FIG. 10, the density of the enlarged pixels generated on the line connecting the original pixels A32 and A23 is also set to a density equal to or higher than a predetermined value, so that blurring of the character outline is prevented. It becomes like this.
[0023]
On the other hand, if the determination in step S4 is also negative, in step S5, the first is again based on the density data a11 to a44.WindowsIt is determined whether or not the four original pixels A22, A23, A32, and A33 in 20 form a character outline other than a right angle or diagonal line in the enlargement target image.
[0024]
FIGS. 11 and 12 are diagrams showing eight conditions for determining that each original pixel constitutes a character outline other than a right angle or diagonal line. In particular, FIGS. 11A to 11D show the original pixel. There are four conditions for determining that any one of the original pixels A22, A23, A32, and A33 constitutes a character outline (the determination in the subsequent step S9 is affirmative), and FIGS. Are four conditions in which it is determined that two original pixels adjacent to each other in the scanning direction among the original pixels A22, A23, A32, and A33 form a character outline (determination in step S9 is negative).
(1) First condition
As shown in FIG. 11A, the densities of the original pixels A22, A32, and A33 are all less than the predetermined value, and the density of the original pixel A23 is equal to or higher than the predetermined value, and the value is adjacent to the main scanning direction. When it is equal to one of the matching original pixel A24 and the adjacent original pixel A13 in the sub-scanning direction, it is determined that the original pixel A23 forms a character outline.
(2) Second condition
As shown in FIG. 11B, the densities of the original pixels A23, A33 and A32 are all less than the predetermined value, and the density of the original pixel A22 is equal to or higher than the predetermined value, and the values are adjacent in the main scanning direction. If the matching original pixel A21 is equal to either the adjacent original pixel A12 or the adjacent original pixel A12 in the sub-scanning direction, it is determined that the original pixel A22 forms a character outline.
(3) Third condition
As shown in FIG. 11C, the densities of the original pixels A22, A23, and A33 are all less than the predetermined value, and the density of the original pixel A32 is equal to or higher than the predetermined value, and the value is adjacent to the main scanning direction. If the matching original pixel A31 is equal to one of the adjacent original pixel A42 in the sub-scanning direction, it is determined that the original pixel A32 forms a character outline.
(4) Fourth condition
As shown in FIG. 11D, the densities of the original pixels A23, A22, and A32 are all less than the predetermined value, and the density of the original pixel A33 is equal to or higher than the predetermined value, and the value is adjacent to the main scanning direction. When it is equal to one of the matching original pixel A34 and the adjacent original pixel A43 in the sub-scanning direction, it is determined that the original pixel A33 forms a character outline.
(5) Fifth condition
As shown in FIG. 12A, the density of the original pixel A22 is equal to or higher than a predetermined value, the density of the original pixel A22 and the density of the original pixel A32 match, and the density of the original pixel A23 and the original pixel A33. If the density of both is less than the predetermined value, it is determined that the original pixels A22 and A32 constitute a character outline.
(6) Sixth condition
As shown in FIG. 12B, the density of the original pixel A22 is equal to or higher than a predetermined value, the density of the original pixel A22 and the density of the original pixel A23 match, and the density of the original pixel A32 and the original pixel A33 If both the density and the density are less than the predetermined value, it is determined that the original pixels A22 and A23 constitute a character outline.
(7) Seventh condition
As shown in FIG. 12C, the density of the original pixel A23 is equal to or higher than a predetermined value, the density of the original pixel A23 and the density of the original pixel A33 match, and the density of the original pixel A22 and the original pixel A32 When both the density and the density are less than the predetermined value, it is determined that the original pixels A23 and A33 constitute a character outline.
(8) Eighth condition
As shown in FIG. 12D, the density of the original pixel A32 is equal to or higher than a predetermined value, the density of the original pixel A32 and the density of the original pixel A33 match, and the density of the original pixel A22 and the original pixel A23. If the density of both is less than the predetermined value, it is determined that the original pixels A32 and A33 constitute a character outline.
[0025]
For example, the
[0026]
FIG. 14 is a diagram schematically illustrating the interpolation method executed in step S10. Here, a case where only the original pixel A32 forms a character outline will be described as an example.
[0027]
The interpolation method of this embodiment is a modification of the nearest neighbor interpolation method described with reference to FIG. 7 and divides the enlarged region into four regions E1 to E4 as described above. The original pixels generated in the first, second, and fourth regions including the three original pixels A22, A23, A33 determined not to constitute the character outline are the original pixels A22, A23, A33, respectively. Although the density is set, the original pixels generated in the third area E3 including the original pixel A32 determined to constitute the character outline use the other original pixels A22, A23, and A33 except the original pixel A32. Then, the concentration is set by nearest neighbor interpolation. As a result, in the third region E3, the density of the other three enlarged pixels excluding the original pixel A32 is less than the planned density.
[0028]
On the other hand, the secondWindowsIs at the scanning position indicated by
[0029]
FIG. 15 is a diagram schematically representing the interpolation method executed in step S12 when it is determined in step S9 that there is not one original pixel constituting the character outline.
[0030]
Also in this embodiment, among the 12 newly generated enlarged pixels, the regions E3 and E4 including the two original pixels A32 and A33 whose density is equal to or higher than the predetermined value are set to the densities of the original pixels A32 and A33, respectively. The regions E1 and E2 including the two original pixels A22 and A23 whose density is less than the predetermined value are set to the densities of the original pixels A22 and A23, respectively. The firstWindowsIf the determination of step S5 is negative as in the case where the density of all the original pixels in 20 is equal to or higher than the predetermined value or less than the predetermined value, the interpolation process by the conventional linear expansion between four points is executed in step S6. .
[0031]
When any of the interpolation processes is completed as described above, in step S7, the current secondWindows10 is determined whether it is located in the lower right corner. If it is located in the lower right corner as shown in FIG. 17, the process is terminated. If it is located in any other position, the position is determined in step S8. Depending on the
[0032]
By the way, in the above-described embodiment, the original pixel represented by “●” or “◯” in FIG.In lengthWhen the enlargement process of 4 times is executed, for example, the first surrounded by the original pixels A22, A23, A32, A33WindowsSince the condition shown in FIG. 12D is satisfied at 20, the nearest neighbor interpolation method is applied at step S12. For this reason, all the enlarged pixels in the
[0033]
In each of the embodiments described above, an example in which interpolation processing is performed by regarding a pixel having a density equal to or higher than a predetermined value as a character pixel is described. The same can be applied to the interpolation processing in the case of viewing.
[0034]
【The invention's effect】
As described above, according to the present invention, the following effects are achieved.
(1) According to
(2) According to
(3) According to
(4) According to
(5) According to
[Brief description of the drawings]
FIG. 1 is a diagram for explaining an operation of an embodiment of the present invention.
FIG. 2 is a diagram for explaining the operation of an embodiment of the present invention.
FIG. 3 is a flowchart showing the operation of another embodiment of the present invention.
[Fig. 4]WindowsIt is a figure for demonstrating the structure of these.
FIG. 5 is a diagram schematically showing conditions for determining that the original pixel constitutes a right-angle portion of the character outline.
FIG. 6 is a diagram illustrating a case where it is determined that an original pixel constitutes a right-angle portion of a character outline.
FIG. 7 is a diagram schematically showing an interpolation processing method executed when it is determined that the original pixel constitutes a right-angle portion of the character outline.
FIG. 8 is a diagram schematically showing a condition for determining that an original pixel constitutes a hatched portion of a character outline.
FIG. 9 is a diagram illustrating a case where it is determined that an original pixel constitutes a shaded portion of a character outline.
FIG. 10 is a diagram schematically illustrating an interpolation processing method that is executed when it is determined that three original pixels constitute a shaded portion of a character outline.
FIG. 11 is a diagram schematically illustrating a condition for determining that one original pixel constitutes a character outline.
FIG. 12 is a diagram schematically showing a condition for determining that two original pixels constitute a character outline.
FIG. 13 is a diagram showing a case where it is determined that one original pixel constitutes a shaded portion of a character outline.
FIG. 14 is a diagram schematically illustrating an interpolation processing method executed when it is determined that one original pixel constitutes a character outline.
FIG. 15 is a diagram schematically illustrating an interpolation processing method executed when it is determined that two original pixels form a character outline.
FIG. 16 is a diagram illustrating a case where it is determined that two original pixels constitute a character outline.
FIG. 17WindowsIt is the figure which showed this scanning method.
FIG. 18WindowsIt is the figure which showed this scanning method.
FIG. 19 is a diagram illustrating an interpolation result according to another embodiment.
FIG. 20 is a diagram illustrating an interpolation result according to another embodiment.
FIG. 21 is a diagram showing a conventional four-point interpolation method.
[Explanation of symbols]
1 ... enlargement target image, 10 ... firstWindows20 ... 1stWindows
Claims (1)
拡大対象画像を2原画素×2原画素に相当するウインドウで走査し、
各走査位置におけるウインドウ内での4つの原画素の濃度分布を検出し、
3つの原画素の濃度のみが予定値以上であると、当該3つの原画素を頂点とする三角形内および前記3つの原画素を結ぶアウトラインを含む各ライン上に発生する拡大画素の濃度を前記予定値以上に設定することを特徴とする画像処理方法。In an image processing method for enlarging a processing target image at an arbitrary magnification, and interpolating a space generated between each original pixel according to the enlargement magnification with an enlarged pixel,
Scan the image to be enlarged in a window corresponding to 2 original pixels × 2 original pixels,
Detecting the density distribution of the four original pixels in the window at each scanning position;
If only the density of the three original pixels is equal to or higher than the predetermined value, the density of the enlarged pixel generated on each line including the outline connecting the three original pixels in the triangle having the three original pixels as vertices An image processing method, wherein the image processing method is set to be equal to or greater than a value.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP27830095A JP3633689B2 (en) | 1995-10-03 | 1995-10-03 | Image processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP27830095A JP3633689B2 (en) | 1995-10-03 | 1995-10-03 | Image processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH09102867A JPH09102867A (en) | 1997-04-15 |
| JP3633689B2 true JP3633689B2 (en) | 2005-03-30 |
Family
ID=17595435
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP27830095A Expired - Fee Related JP3633689B2 (en) | 1995-10-03 | 1995-10-03 | Image processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3633689B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6523638B2 (en) | 2014-09-11 | 2019-06-05 | シナプティクス・ジャパン合同会社 | Display panel driver, display device, image processing apparatus and image processing method |
-
1995
- 1995-10-03 JP JP27830095A patent/JP3633689B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH09102867A (en) | 1997-04-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5282057A (en) | Bit-map image resolution converter | |
| US20070122061A1 (en) | Image processing device, image processing program, and computer-readable recording medium | |
| US20010048771A1 (en) | Image processing method and system for interpolation of resolution | |
| JPH06245056A (en) | Extending and smoothing processor of picture data | |
| JP3633689B2 (en) | Image processing method | |
| JP3026706B2 (en) | Image processing device | |
| US6891968B2 (en) | Method to upscale single-pixel wide text without loss of image sharpness | |
| JPH05233794A (en) | Enlarging method and apparatus for enlarging multi-valued natural image digital image | |
| US7298928B2 (en) | Method for converting image from low resolution into high resolution | |
| JP3760531B2 (en) | Image interpolation apparatus and image interpolation method | |
| JP2000270208A (en) | Image processor and image processing method | |
| JP3262425B2 (en) | Image processing device | |
| JPH1132209A (en) | Resolution conversion method | |
| JP2885996B2 (en) | Image processing method and apparatus | |
| JP3255549B2 (en) | Figure processing method | |
| JPH0687261B2 (en) | Image reduction method | |
| JPH07182503A (en) | Image processing method and apparatus | |
| JP2906717B2 (en) | Image scaling method | |
| JP2525768B2 (en) | Image reduction conversion method | |
| JP3054315B2 (en) | Image processing method and apparatus | |
| JP3065855B2 (en) | Image processing device | |
| JP2788554B2 (en) | Image processing method and apparatus | |
| JPS59195759A (en) | Enlarging and contracting method of picture | |
| JPH0696197A (en) | Image data magnifying device | |
| JP5013243B2 (en) | Image processing apparatus, image processing method, image processing program, and recording medium recording the same |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040706 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040906 |
|
| 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: 20041208 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20041221 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |