JP4043692B2 - Digital image forming device - Google Patents
Digital image forming device Download PDFInfo
- Publication number
- JP4043692B2 JP4043692B2 JP2000134711A JP2000134711A JP4043692B2 JP 4043692 B2 JP4043692 B2 JP 4043692B2 JP 2000134711 A JP2000134711 A JP 2000134711A JP 2000134711 A JP2000134711 A JP 2000134711A JP 4043692 B2 JP4043692 B2 JP 4043692B2
- Authority
- JP
- Japan
- Prior art keywords
- points
- point
- data
- coordinate
- area
- 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
Landscapes
- Record Information Processing For Printing (AREA)
- Image Analysis (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、記憶手段上にエリアのデータを指定座標点により形成する形状加工機能を有し、原稿読み取り手段等からの画像データにより画像を形成するデジタル複写機等のデジタル画像形成装置に関する。
【0002】
【従来の技術】
従来、ビットマップメモリ上にエリアのデータを指定座標点により形成する形状加工機能を有するデジタル画像形成装置においては、エリア加工のある幅を持ったラインを形成のためのデータ内には、エリアのグループ番号データだけで(トグル方式で)エリアの開始・終了データはなかった。このため、ラインが同一エリア(グループ)で重なった場合、エリアの開始、開始、終了、終了と設定されなければならないのがエリアの開始、終了、開始、終了となるので、重なり部が白く抜ける(エリア外という判定)状態になっていた。この不具合を防ぐために上記エリアデータにエリアの開始、終了を識別するビットデータが追加になり、エリアの開始・終了判定を指定座標点間の接続部(3図で示されるBまたはE)で誤らないために接続部での形状変更が必要となる。
【0003】
エリアの開始、終了の判定では、ある幅を持ったラインで指定座標転が2点(A,B)の場合には、図2に示すようにラインが4辺の長方形になり、その4辺で囲まれたエリアの開始、終了を図2の点線で示すように各点(A1,A2,B1,B2)の近辺で判定していた。ある幅を持ったラインで指定座標転が3点以上の場合には、ラインは図5にB1,B3,B5で示すように面取り部B1B3と交点B5を接続部としてつなげていく形状となる。
【0004】
図2に示す直線A1A2がエリアの開始、終了のいずれであるかの判定では、
点A1を(A1_X,A1_Y)、点A2を(A2_X,A2_Y)、
直線A1A2をY=a_A1A2X+b_A1A2、
直線B1A1をY=a_B1A1X+b_B1A1
とすると、
点線のY座標はA1_Y+1であり、これと交わる直線A1A2との交点のX座標X_A1A2は
X_A1A2=((A1_Y+1)−b_A1A2)/a_A1A2
であり、点線と直線B1A1との交点のX座標X_B1A1は
X_B1A1=((A1_Y+1)− b_B1A1)/ a_B1A1
であり、このX_A1A2とX_B1A1の大小で直線A1A2がエリアの開始、終了のいずれであるかを判定する。
【0005】
特許第2802132号公報には、原稿を光学的に読み取り、それを光電変換して2値の画像データを得る原稿読み取り手段と、その原稿データの連続した黒画素の集合の輪郭を追跡して輪郭の大きさを出力する輪郭追跡手段と、この輪郭追跡手段により得られた黒画素集合の輪郭の大きさにより、黒画素集合を図形、文字、ノイズに分類する画像判定手段と、この画像判定手段による画像判定データに基づき図形画像を抽出し、ベクトル化するベクトル化手段と、このベクトル化手段によりベクトル化されたデータより図形要素を認識するとともに、図形要素間の接続関係をも認識する図形認識手段と、この図形認識手段により認識された図形のうちの直線要素を、図形要素間の接続関係を保持したまま、コピー開始時に設定された直線の配列方向のうちの角度誤差の小さい方向に修正し、又は前記図形認識手段により認識された図形要素のうち、3つ以上の直線要素が略平行で、それらの間隔の差があるしきい値内であれば、それらの間隔の平均値で等間隔となるように図形の接続関係を保持したまま直線要素を修正する図形修正手段と、この図形修正手段により修正された図形要素を記憶手段に作画する作画手段と、記憶手段に書き込まれた出力画像を転写紙に像形成して出力する出力手段とを備えたデジタル画像形成装置が記載されている。
【0006】
【発明が解決しようとする課題】
上記デジタル画像形成装置の図形加工手段では、X_A1A2とX_B1A1の大小で直線A1A2がエリアの開始、終了のいずれであるかを判定し、X_A1A2>X_B1A1なら直線A1A2はエリアの終了とする。この場合、直線A1A2がY=固定値やX=固定値に近いと、図5で示されるように点A1,点A2を求めるところや上記のX_A1A2、X_B1A1をもとめるところで誤差が発生した場合、もともと求められるべきスタートエンド判定(エリア各辺の開始、終了の判定)ができなくなる場合があった。
また、上述のようにエリア加工のある幅を持ったラインを形成のためのデータ内にはエリアのグループ番号データだけでエリアの開始・終了データはなかったため、ラインが同一エリア(グループ)で重なった場合、エリアの開始、開始、終了、終了と設定されなければならないのがエリアの開始、終了、開始、終了となり、重なり部が白く抜ける(エリア外という判定)状態になっていた。この不具合を防ぐために上記エリアデータにエリアの開始、終了を識別するビットデータが追加になり、上述のようにエリアの開始・終了判定を指定座標点間の接続部(3図で示されるBまたはE)で誤らないために接続部での形状変更が必要であった。
【0007】
本発明は、幅を持ったライン形状のデータを記憶手段上に形成する際に正確にエリアのスタート、エンド判定を行うことができるデジタル画像形成装置を提供することを目的とする。
【0008】
【課題を解決するための手段】
上記目的を達成するため、請求項1に係る発明は、少なくともデータ及び制御プログラムを記憶する第1の記憶手段と、前記制御プログラムにより演算処理を行なう演算処理手段と、画像データが格納される第2の記憶手段と、この第2の記憶手段上の画像データに基づく画像表示及び指定座標点の入力を行う表示・操作手段と、前記第2の記憶手段上にエリアのデータを前記指定座標点により形成する形状加工手段とを有し、前記第2の記憶手段上に格納されるエリアのデータ内にエリアの開始データかエリアの終了データかを判別するビットを有するデジタル画像形成装置において、幅を持ったライン形状のデータを前記第2の記憶手段上に形成する際に前記指定座標点としての2点の位置座標のうちの1点の位置座標が、前記2点の位置座標のうちの他の1点の位置座標を中心とする座標系における4つの象限、該4つの象限の境界のいずれにあるかということと、前記2点の位置座標の各主走査座標値の大小関係、及び各副走査座標値の大小関係により前記ライン形状の4辺のスタート、エンドを判定するものである。
【0009】
請求項2に係る発明は、請求項1記載のデジタル画像形成装置において、前記指定座標点が2点の場合に該2点を結ぶ直線上にもう1点を仮想的にとって指定座標点を3点として扱うものである。
【0017】
【発明の実施の形態】
図1は本発明の第1実施例を示す。この第1実施例は、デジィタル複写機からなるデジタル画像形成装置の一例である。この第1実施例は、演算処理手段としてのCPU1と、原稿画像の表示及び指定された座標点の入力を行う表示・操作手段としてのディスプレイエディタ2と、スキャナ・CCD・ビットマップメモリ等からなる原稿読み取り手段3と、少なくともデータ及び制御プログラムを記憶する記憶手段としてのRAM(揮発・不揮発)及びROMからなるデータ記憶手段4と、図示しない画像形成部とを有する。
【0018】
CPU1はデータ記憶手段4に記憶されている制御プログラムにより演算処理を行う。原稿読み取り手段3内の記憶手段としてのビットマップメモリは画像データが格納され、表示・操作手段2はビットマップメモリ上の画像データに基づく画像表示及び指定座標点の入力を行う。CPU1はビットマップメモリ上にエリアのデータを指定座標点により形成する形状加工手段手段を兼ね、ビットマップメモリ上に格納されるエリアデータはエリアの開始データかエリアの終了データかを判別するビットを有する。
【0019】
ここで、原稿読み取り手段3は、原稿台に置かれた原稿をスキャナ、CCDにより主走査400dpi(dot/インチ)、副走査200dpiの画素密度で、且つ濃度は2値化(0or1)で読み取り、ビットマップメモリ(1画素を8ビットのデータとして保存するメモリ(揮発)の集合ASIC)に格納する。また、この時の1画素8ビットのデータ内容は、
0〜4bit:エリアのグループ番号(各エリアの識別用)
5bit:エリアの開始・終了(1:開始、0:終了)
6bit:閉ループ追跡用bit
7bit:原稿画像データ(上記濃度で1:画像有り、0:画像無し)
である。
【0020】
また、表示・操作手段2は、原稿読み取り手段3で読み取った原稿画像を表示するディスプレイ(100dpi*100dpi)と、その画像表示されたディスプレイ上よりタッチペン等で各形状(四角形、直角多角形、多角形、ライン等)の指定やその形状を表示された原稿画像のどこらへんに配置するかを指定する座標点入力等の操作がなされるものである。
【0021】
図4は表示・操作手段2により入力された指定座標と上記ビットマップメモリとの関係を表したものである。座標原点(主走査方向0dot〜4677dot、副走査方向0line〜6800lineの座標の原点)をビットマップメモリ上の所定の番地(800000h)とし、
座標点 アドレス
(0,0) 800000hの下位8bit
(1,0) 800000hの上位8bit
(2,0) 800002hの下位8bit
(3,0) 800002hの上位8bit
のように座標点とビットマップメモリを対応させてビットマップメモリにデータを格納する。
【0022】
図4において、P1,P2は表示・操作手段2のディスプレイ上で指定された座標点を表している。指定された座標点P1,P2よりある幅を持たせたライン形状のエリアLは図4のように形成され、このエリアLの各辺のうちで主走査側原点に近い直線がスタート(エリアの開始)S、その次に主走査側原点に近い直線がエンド(エリアの終了)Eの設定となる。
【0023】
図5は3点指定のライン形状を表している。多角形A1,B1,B3,C1,C2,B5,A2のライン形状は、指定座標点ABCを結ぶ直線のなす角度が鋭角であり、B点の片側が2点B1,B3を接続した面取り部で、B点のもう片方が1点(交点B5)接続である。
【0024】
図6は図2の輪郭点A1,A2,B1,B2等の求め方を表したものであり、
A1点、B点:図2と同様な指定座標点
AX:A点の主走査成分
AY:A点の副走査成分
BX:B点の主走査成分
BY:B点の副走査成分
A1,A2,B1,B2:図2と同様な指定座標点A,Bにおける輪郭点
W:ラインの幅/2
a:A1点からA点までの主走査座標値
b:A1点からA点までの副走査座標値
である。
【0025】
図7は指定座標点2点(A,B)の位置関係より各辺A1A2,A2B2,B1B2,B1A1のスタートS、エンドEを表した図である。CPU1は、表示・操作手段2により最初に指定されたA点を中心に考え、次に表示・操作手段2により指定されたB点が図7のI,II,III,IVのどの領域にあるかで各辺のスタート、エンドを判定する。
【0026】
つまり、CPU1は、点Aを(A_X,A_Y)、点Bを(B_X,B_Y)とすると、
点B点がIの領域にあってA_X>B_X &A_Y>B_Yであれば、
辺A1A2⇒E,辺A2B2⇒S,辺B1B2⇒S,辺A1B1⇒Eと判定し、
点B点がIIの領域にあってA_X>B_X &A_Y<B_Yであれば、
辺A1A2⇒E,辺A2B2⇒E.辺B1B2⇒S,辺A1B1⇒Sと判定し、
点B点がIIIの領域にあってA_X<B_X &A_Y<B_Yであれば、
辺A1A2⇒S,辺A2B2⇒E,辺B1B2⇒E,辺A1B1⇒Sと判定し、
点B点がIVの領域にあってA_X<B_X &A_Y>B_Yであれば、
辺A1A2⇒S,辺A2B2⇒S,辺B1B2⇒E,辺A1B1⇒Eと判定する。
【0027】
また、CPU1は、点B点が境界上の場合には、
点B点がIとIIの境界にあってA_X>B_X &A_Y=B_Yであれば、
辺A1A2⇒E,辺A2B2⇒なし,辺B1B2⇒S,辺A1B1⇒なしと判定し、
点B点がIIとIIIの境界にあってA_X=B_X &A_Y<B_Yであれば、
辺A1A2⇒なし,辺A2B2⇒E,辺B1B2⇒なし,辺A1B1⇒Sと判定し、
点B点がIIIとIVの境界にあってA_X<B_X &A_Y=B_Yであれば、
辺A1A2⇒S,辺A2B2⇒なし,辺B1B2⇒E,辺A1B1⇒なしと判定し、
点B点がIVとIの境界にあってA_X=B_X &A_Y>B_Yであれば、
辺A1A2⇒なし,辺A2B2⇒S,辺B1B2⇒なし,辺A1B1⇒Eと判定する。
【0028】
図8は指定座標点が3点ABCの時の面取り部B1,B3のスタートS、エンドE判定を表した図である。CPU1は、3点A,B,CのうちのB点を中心にしてA点,C点がI,II,III,IVのどの領域にあるかで各辺のスタートS、エンドEを以下のように判定する。
【0029】
図9は第1実施例におけるエリア加工のライン形成ソフトフローを示す図である。CPU1は、初めにエリア加工開始入力を待ち、表示・操作手段2のエリア加工開始キーが押されて該エリア加工開始キーからエリア加工開始入力が入ったら、原稿読み取り手段3に原稿を読み込ませて表示・操作手段2のディスプレイに表示させると共に、原稿読み取り手段3に原稿画像データを2値化してビットマップメモリ上(7bit)にASIC的に格納させる。
【0030】
次に、CPU1は、表示・操作手段2からの形状(ライン)指定・指定座標点の入力及び編集データ(ライン幅やエリア内を塗りつぶす等のデータ)の入力を待つ。次に、CPU1は、表示・操作手段2からの形状(ライン)指定・指定座標点の入力により、指定された座標点、例えばA,B2点などから長方形となる輪郭点A1,A2,B1,B2などを算出する。
【0031】
A1,A2とB1,B2は指定座標A,Bによる直線ABに対し垂直であり、A1A2、B1B2の長さは指定されたライン幅である。従って、CPU1は、図6に示すように
a2 + b2 = w2
b/a =−(BX−AX)/(BY−AY)
からa,bをもとめ、A1座標を(AX+a,AY+b)、A2座標を(AX−a,AY−b)とする。CPU1は、同様にB1座標、B2座標等の各輪郭点の座標をもとめる。
【0032】
次に、CPU1は、図7を用いて説明したようにA点、B点の座標位置関係より各辺A1A2,A2B2,B1B2,B1A1のスタートS、エンドEを判定し、また、図8を用いて説明したように、A点、B点、C点の座標位置関係より面取り部B1,B3のスタートS、エンドEを判定し、その各辺(直線)のスタートS、エンドEのデータを記憶しておく。次に、CPU1は、上記各輪郭点の座標と各辺のスタートS、エンドEのデータを用いビットマップメモリ上に図4に示すようなラインLを形成(設定)する。
その後、CPU1はビットマップメモリ上のデータを画像形成部に転送し、画像形成部はそのデータにより転写紙などの転写材上に画像を形成する。
【0033】
この第1実施例によれば、幅を持ったライン形状のデータを記憶手段としてのビットマップメモリ上に形成する際に指定座標点の位置座標のみによってライン形状の各辺のスタート、エンドを判定するので、幅を持ったライン形状のデータを記憶手段上に形成する際に正確にエリアのスタート、エンド判定を行うことができる。
【0034】
また、第1実施例によれば、指定座標点が3点以上である場合に発生するライン形状の面取り部のスタート、エンドの判定を該面取り部の両端の2点の座標位置で行うので、ライン形状の面取り部のスタート、エンドの判定は座標位置のみの判定となり、誤判定が起きなくなる。
【0035】
また、第1実施例によれば、幅を持ったライン形状のデータを記憶手段としてのビットマップメモリ上に形成する際に前記指定座標点としての2点の位置座標により前記ライン形状の4辺のスタート、エンドを判定するので、座標指定点が2点の場合にライン形状の4辺のスタート、エンドを正しく判定することができる。
【0036】
本発明の参考例(以下第2実施例という)では、上記第1実施例において、CPU1は各辺のスタートS、エンドEの判定を2点(図7に示すA点、B点)または3点ずつ原点付近に移動して行う。各辺のスタートS、エンドEの判定を3点ずつ行うとは、指定座標が4点以上、例えば5点ABCDEの場合ABCとBCDとCDEの各3点ずつ各辺のスタートS、エンドEの判定を行うことを言う。
【0037】
また、原点付近への移動とは、3つの指定座標点を例えばA(4000,5000),B(4200,4900),C(4000,4800)とした場合、この3つの指定座標点点について
X座標のミニマム値X_MIN:4000
Y座標のミニマム値Y_MIN:4800
最低間隔値ADD:100
としてA点を
A'のX座標=4000-X_MIN+ADD=100
A'のY座標=5000-Y_MIN+ADD=300
なるA'(100,300)へ移動し、B点,C点も同様にB'(300,200),C'(100,100)に移動することを言う。
【0038】
CPU1は、移動後のA'点、B'点の座標位置関係より図7を用いて説明したように各辺のスタートS、エンドEを判定し、また、移動後のA'点、B'点、C'点の座標位置関係より図8を用いて説明したように面取り部のスタートS、エンドEを判定し、その各辺のスタートS、エンドEのデータを記憶し、上記各輪郭点の座標と各辺のスタートS、エンドEのデータを用いてビットマップメモリ上に図4に示すようなラインLを形成(設定)する。
【0039】
この第2実施例によれば、第1実施例において、指定座標点を複数点ずつ(2点または3点ずつ)原点付近に移動させてエリア各辺のスタート、エンドを判定するので、各座標を小さく抑えることができ、演算の簡略化(桁あふれの防止)を図ることができる。
【0040】
次に、本発明の他の参考例(以下第3実施例という)について説明する。この第3実施例では、上記第1実施例において、CPU1は、指定座標点が2点(A,B)の場合には、エリアの開始、終了を、2点(A,B)の座標位置関係ではなく、図2を用いて前述したように点A1を(A1_X,A1_Y)、点A2を(A2_X,A2_Y)、
直線A1A2をY=a_A1A2X+b_A1A2、
直線B1A1をY=a_B1A1X+b_B1A1
とすると、
点線のY座標はA1_Y+1であり、これと交わる直線A1A2との交点のX座標X_A1A2は
X_A1A2=((A1_Y+1)−b_A1A2)/a_A1A2
であり、点線と直線B1A1との交点のX座標X_B1A1は
X_B1A1=((A1_Y+1)− b_B1A1)/ a_B1A1
であり、このX_A1A2とX_B1A1の大小で直線A1A2がエリアの開始、終了のいずれであるかを判定する。
【0041】
この場合、CPU1は、エリアの開始、終了の誤判定が起こりそうなところ(Y=固定値、X=固定値の付近)では、つまり、図7のI,II,III,IVの各領域の境界線付近にB点が指定された場合には、強制的にB点の座標を、Y=固定値、X=固定値としてエリアの開始、終了の誤判定が起こらないところに変更する。すなわち、CPU1は、B点がI,II,III,IVの各領域の境界線付近なら、例えばA_Y−10<B_Y<A_Y+10なら、B_Y=A_Yとし、また、II,III又はI,IVの境界付近(A_X−10<B_X<A_X+10)ならB_X=A_Xとする。
【0042】
この第3実施例によれば、ライン形状のスタート、エンドの判定を行う領域からライン形状のスタート、エンドの誤判定が発生しやすい所定の領域を外すので、演算をより簡単にできる。
【0043】
次に、本発明の他の実施例(以下第4実施例という)について説明する。図3(a)に示す多角形A1,B5,C1,C2,B6,A2は、指定座標ABCが鈍角で、B点の両側とも1点接続(B5点は直線A1B1と直線C1B3との交点、B6点は直線A2B2と直線C2B4との交点)である。図3(b)に示す多角形D1,E1,E3,F1,F2,E6,D2は、指定座標DEFが鋭角で、E点の片側が2点(E1点とE3点)接続である。
【0044】
通常、エリアのライン形成は図3(b)のE1E3で示すように面取り作業をするために指定座標点の3点ずつ処理を行っているが、指定座標点が2点の場合には図3(a)に示すように面取り部がないために別処理になってしまう。そこで、第4実施例では、上記第1実施例又は第3実施例において、指定座標点が2点の場合にはすぐに中点を仮想点とし、この中点と2つの指定座標点を3点の指定座標点として扱うことで、指定座標点が2点の場合の別処理を簡略化する。
【0045】
すなわち、CPU1は、指定座標点が2点の場合に座標点が表示・操作手段2により2点指定された時点で2点の中点を仮想点とし、この中点と2つの指定座標点を3点の指定座標点として3図に示すA,B,Cのような形状(A,Cが指定点、Bが仮想点でA、B、Cが直線となる形状)とし、後の計算を上記第1実施例又は第3実施例と同様に行なってライン形状のスタート、エンドの判定を行い、そのスタートS、エンドEのデータを記憶しておく。次に、CPU1は、上記各輪郭点の座標と各辺のスタートS、エンドEのデータを用いてビットマップメモリ上にラインを形成(設定)する。
【0046】
この第4実施例によれば、指定座標点が2点の場合に該2点を結ぶ直線上にもう1点を仮想的にとって指定座標点を3点として扱うので、処理を簡略化できる。
【0047】
次に、本発明の他の参考例(以下第5実施例という)について説明する。図10はライン形状の指定座標ABCが鈍角になる場合と、ライン形状の指定座標DEFが鋭角になる場合をあらわしたものである。A1,A2とB1,B2,等は指定座標A,Bによる直線ABに対して垂直であり、A1A2、B1B2の長さは指定されたライン幅である。
【0048】
図3は図4に示すライン形状からB点、E点付近の接続を終えた後の最終的な多角形形状及び1点(B5)接続部、2点(E1,E3)接続部を示している。図3(a)に示す多角形A1,B5,C1,C2,B6,A2は、指定座標ABCが鈍角で、B点の両側とも1点(B5点は直線A1B1と直線C1B3との交点、B6点は直線A2B2と直線C2B4との交点)接続である。図3(b)に示す多角形D1,E1,E3,F1,F2,E6,D2は、指定座標DEFが鋭角で、E点の片側が2点(E1点とE3点)接続である。
【0049】
この第5実施例では、上記第1実施例において、CPU1は、図9に示すエリア加工ライン形成フローに示すように、初めに表示・操作手段2からのエリア加工開始入力を待ち、表示・操作手段2のエリア加工開始キーが押されて該エリア加工開始キーからエリア加工開始入力が入ったら、原稿読み取り手段3に原稿を読み込ませて表示・操作手段2のディスプレイに表示させると共に、原稿読み取り手段3に原稿画像データを2値化してビットマップメモリ上(7bit)にASIC的に格納させる。
【0050】
次に、CPU1は、表示・操作手段2からの形状(ライン)指定・指定座標点の入力及び編集データ(ライン幅やエリア内を塗りつぶす等のデータ)の入力を待つ。次に、CPU1は、表示・操作手段2からの形状(ライン)指定・指定座標点の入力により、表示・操作手段2で指定された座標点、例えば座標点ABCから多角形となる輪郭点A1,A2,B1,B2,B3,B4,C1,C2を算出する。
【0051】
図10に示すように、A1,A2とB1,B2は指定座標A,Bによる直線ABに対して垂直であり、A1A2、B1B2の長さは表示・操作手段2で指定されたライン幅である。従って、CPU1は、図6に示すように
a2+b2 =w2
b/a =−(BX−AX)/(BY−AY)
からa,bをもとめ、A1座標は(AX+a,AY+b)、A2座標は(AX−a,AY−b)とする。CPU1は、同様にB1座標B2座標等をもとめる。
【0052】
次に、CPU1は、表示・操作手段2で指定された各座標点ABC,DEFの各間を結ぶ直線の角度が図10に示すように鈍角か鋭角かを判定する。CPU1は、この判定を直線B1B2に対してA点とC点が同じ側にある(鋭角)か否(鈍角)かで判定する。CPU1は、直線B1B2をy= a_b1b2*X + b_b1b2とし、
a_b1b2:直線B1B2の傾き
b_b1b2:直線B1B2の切片
A点の座標:(AX,AY),C点の座標:(CX,CY)、
X:主走査座標
Y:副走査座標
とし、
AY>a_b1b2*AX+b_b1b2
CY>a_b1b2*CX+b_b1b2
または
AY<a_b1b2*AX+b_b1b2
CY<a_b1b2*CX+b_b1b2
ならばA点とC点が同じ側にあるので、上記角度が鋭角であり、
AY>a_b1b2*AX+b_b1b2
CY<a_b1b2*CX+b_b1b2
または
AY<a_b1b2*AX+b_b1b2
CY>a_b1b2*CX+b_b1b2
ならばA点とC点が異なる側にあるので、上記鈍角であると判定する。
【0053】
これにより、CPU1は、上記角度が鈍角ならばB点の両側が1点接続であるので、図3に示すB5点を直線A1B1と直線C1B3の交点、
B6点を直線A2B2と直線C2B4の交点としてもとめる。また、CPU1は、上記角度が鋭角ならばB点の片側が2点接続であるので、図3に示すE6点を直線D2E2と直線E4F2の交点、
E1E3を図3に示すE1,E3を直接結んだ直線とする。これにより、CPU1は、指定座標点ABCより多角形A1,B5,C1,C2,B6,A2をもとめ、DEFより多角形D1,E1,E3,F1,F2,E6,D2をもとめる。
【0054】
次に、CPU1は、上記各直線のスタート、エンドを上記第1実施例と同様に判定する。このスタート、エンドの判定は各直線の中央近辺で図2に示す点線と各直線の交点で、主走査座標原点に近い方をスタート、遠い方をエンドとすることになる。CPU1は、このようにして得た各直線のスタートエンドのデータをビットマップに格納し、上記各輪郭点の座標と各辺のスタート、エンドのデータを用いてビットマップメモリ上に図4に示すようなラインLを形成(設定)する。
【0055】
この第5実施例によれば、幅を持ったライン形状のデータを記憶手段としてのビットマップ上に形成する際に指定座標点の各間を結ぶ直線の角度に応じて各指定座標点の接続部の形状を変更するので、エリアの開始・終了判定を各座標点間の接続部で正しく行う事が出来る。
【0056】
また、3つの指定座標点が直線に近い場合(例えば図10に示す座標A、B、Cのような場合)には面取り部(図3に示す直線E1,E3)が小さくなってしまってB5のところも面取りをしてしまうことにより接続部が限りなく小さくなってしまい、その面取り部の直線の開始・終了判定が出来ずにライン形状が異常画像になる。しかし、第5実施例によれば、指定座標点の3点が直線に近い場合に上記接続部の形状をその片側を1点、他の片側を2点として接続した形状とするので、そういった場合(指定座標点の各間を結ぶ直線の角度が鈍角である場合)には面取りを行わず、両側1点接続(図3に示すB5,B6)にすることにより異常画像を防ぐことができる。
【0057】
また、第5実施例によれば、指定座標点の3点が鋭角である場合には上記接続部の形状をその片側を1点、他の片側を2点として接続した形状とするので、指定された3つの座標点の各間を結ぶ直線の角度が鋭角で面取りを行なわなかった場合図3に示す直線D1,E1と直線F1,E3との交点ではかなり突起してしまうといった事態を防ぐことが出来る。
【0058】
なお、本発明は、上記実施例に限定されるものではなく、例えば原稿読み取り手段からの画像データ以外の画像データにより表示・操作手段に画像表示を行ない、エリアデータを指定座標点により形成するデジタル画像形成装置や、転写紙以外の表示画像等に画像形成を行うデジタル画像形成装置にも適用することができる。
【0059】
【発明の効果】
以上のように請求項1に係る発明によれば、座標指定点が2点の場合にライン形状の4辺のスタート、エンドを正しく判定することができる。
請求項2に係る発明によれば、処理を簡略化できる。
【図面の簡単な説明】
【図1】本発明の第1実施例を示すブロック図である。
【図2】従来のエリア開始、終了判定を説明するための図である。
【図3】3座標点指定のライン形状の例を示す図である。
【図4】上記第1実施例の座標とビットマップメモリとの対応関係を示す図である。
【図5】3座標点指定のライン形状の例を示す図である。
【図6】ライン形状の輪郭点を示す図である。
【図7】2つの指定座標点の位置によるエリア各辺のスタート、エンド関係を示す図である。
【図8】3つの指定座標点の面取り部のスタート、エンド関係を示す図である。
【図9】上記第1実施例のエリア加工形成ラインフローを示すフローチャートである。
【図10】指定座標が鈍角になるライン形状と、指定座標が鋭角になるライン形状を表す図である。
【符号の説明】
1 CPU
2 表示・操作手段
3 原稿読み取り手段
4 データ記憶手段[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a digital image forming apparatus, such as a digital copying machine, which has a shape processing function for forming area data on a storage unit using designated coordinate points and forms an image using image data from a document reading unit or the like.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, in a digital image forming apparatus having a shape processing function for forming area data on a bitmap memory with designated coordinate points, the data for forming a line having a width with area processing is included in the data of the area. There was no start / end data of the area only with the group number data (toggle method). For this reason, when lines overlap in the same area (group), the start, end, start, and end of the area must be set as the start, end, start, and end of the area, so that the overlapped portion appears white. It was in a (determined out-of-area) state. In order to prevent this problem, bit data for identifying the start and end of the area is added to the area data, and the start / end determination of the area is mistaken at the connection part (B or E shown in Fig. 3) between the designated coordinate points. Therefore, it is necessary to change the shape at the connecting portion.
[0003]
When determining the start and end of an area, if the specified coordinate shift is 2 points (A, B) on a line with a certain width, the line becomes a rectangle of 4 sides as shown in FIG. The start and end of the area surrounded by are determined in the vicinity of each point (A1, A2, B1, B2) as shown by the dotted line in FIG. When the designated coordinate shift is 3 points or more in a line having a certain width, the line has a shape that connects the chamfered portion B1B3 and the intersection B5 as a connecting portion as indicated by B1, B3, and B5 in FIG.
[0004]
In determining whether the straight line A1A2 shown in FIG. 2 is the start or end of an area,
Point A1 is (A1_X, A1_Y), point A2 is (A2_X, A2_Y),
Straight line A1A2 is Y = a_A1A2X + b_A1A2,
Straight line B1A1 is Y = a_B1A1X + b_B1A1
Then,
The Y coordinate of the dotted line is A1_Y + 1, and the X coordinate X_A1A2 of the intersection with the straight line A1A2 intersecting this is
X_A1A2 = ((A1_Y + 1) −b_A1A2) / a_A1A2
The X coordinate X_B1A1 of the intersection of the dotted line and the straight line B1A1 is
X_B1A1 = ((A1_Y + 1) −b_B1A1) / a_B1A1
It is determined whether the straight line A1A2 is the start or end of the area depending on the magnitude of X_A1A2 and X_B1A1.
[0005]
Japanese Patent No. 2802132 discloses a document reading unit that optically reads a document and photoelectrically converts the document to obtain binary image data, and tracks the contour of a set of continuous black pixels of the document data. A contour tracking unit that outputs the size of the black pixel set, an image determination unit that classifies the black pixel set into a figure, a character, and a noise according to the contour size of the black pixel set obtained by the contour tracking unit, and the image determination unit Graphical recognition that recognizes the graphic elements from the vectorized means that extracts and vectorizes the graphic image based on the image determination data by the vector and the data vectorized by the vectorizing means and also recognizes the connection relationship between the graphic elements And the straight line element of the graphic recognized by the graphic recognition means with the straight line set at the start of copying while maintaining the connection relationship between the graphic elements. Correct in the direction of small angle error in the column direction, or among the graphic elements recognized by the graphic recognition means, three or more linear elements are substantially parallel and within a threshold value with a difference in their interval If so, the graphic correction means for correcting the linear elements while maintaining the graphic connection relationship so that the average value of the intervals is equal, and the graphic elements corrected by the graphic correction means are drawn on the storage means. There is described a digital image forming apparatus that includes an image creating unit and an output unit that forms an output image written in a storage unit on a transfer sheet and outputs the image.
[0006]
[Problems to be solved by the invention]
The graphic processing means of the digital image forming apparatus determines whether the straight line A1A2 is the start or end of the area depending on the magnitude of X_A1A2 and X_B1A1, and if X_A1A2> X_B1A1, the straight line A1A2 is the end of the area. In this case, if the straight line A1A2 is close to Y = fixed value or X = fixed value, if an error occurs when the points A1 and A2 are obtained as shown in FIG. 5 or the above X_A1A2 and X_B1A1 are found, In some cases, the start / end determination (start / end determination of each side of the area) to be obtained cannot be performed.
In addition, as described above, the data for forming a line having a certain width for area processing includes only area group number data, and no area start / end data. Therefore, the lines overlap in the same area (group). In this case, the start, start, end, and end of the area must be set as the start, end, start, and end of the area, and the overlapped portion is white (determined to be out of area). In order to prevent this problem, bit data for identifying the start and end of the area is added to the area data. As described above, the start / end determination of the area is performed by connecting the designated coordinate points (B or 3 shown in FIG. 3). In order to avoid mistakes in E), it was necessary to change the shape at the connection.
[0007]
An object of the present invention is to provide a digital image forming apparatus capable of accurately determining the start and end of an area when forming line-shaped data having a width on a storage means.
[0008]
[Means for Solving the Problems]
In order to achieve the above object, the invention according to claim 1First storage means for storing at least data and a control program, arithmetic processing means for performing arithmetic processing by the control program, second storage means for storing image data, and an image on the second storage means Display / operation means for performing image display based on data and input of designated coordinate points; and shape processing means for forming area data with the designated coordinate points on the second storage means; In a digital image forming apparatus having a bit for discriminating between area start data and area end data in the area data stored on the storage means, the line shape data having a width is stored on the second storage means. The position coordinate of one of the two position coordinates as the designated coordinate point is the center of the position coordinate of the other one of the two position coordinates. The line shape is determined by the four quadrants in the system, the boundary between the four quadrants, the magnitude relationship between the main scanning coordinate values of the position coordinates of the two points, and the magnitude relationship between the sub-scanning coordinate values. Judge the start and end of the four sides ofIs.
[0009]
The invention according to claim 22. The digital image forming apparatus according to claim 1, wherein when there are two designated coordinate points, another designated point is virtually assumed on a straight line connecting the two points and the designated coordinate points are treated as three points.Is.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 shows a first embodiment of the present invention. This first embodimentDesi1 is an example of a digital image forming apparatus including a digital copying machine. This first embodiment comprises a CPU 1 as arithmetic processing means, a
[0018]
The CPU 1 performs arithmetic processing according to a control program stored in the data storage unit 4. Image data is stored in the bitmap memory as a storage means in the document reading means 3, and the display / operation means 2 performs image display based on the image data on the bitmap memory and input of designated coordinate points. The CPU 1 also serves as a shape processing means for forming area data on the bitmap memory with designated coordinate points, and a bit for determining whether the area data stored on the bitmap memory is the start data of the area or the end data of the area. Have.
[0019]
Here, the document reading means 3 reads the document placed on the document table with a scanner and a CCD with a pixel density of 400 dpi (dot / inch) of main scanning and 200 dpi of sub scanning and binarization (0or1). It is stored in a bitmap memory (a memory (volatile) set ASIC that stores one pixel as 8-bit data). The data content of 8 bits per pixel at this time is
0 to 4 bits: Area group number (for identifying each area)
5bit: Area start / end (1: Start, 0: End)
6bit: closed loop tracking bit
7bit: Original image data (1: With image at above density, 0: No image)
It is.
[0020]
The display /
[0021]
FIG. 4 shows the relationship between the designated coordinates input by the display / operation means 2 and the bitmap memory. The coordinate origin (the origin of coordinates in the main scanning direction 0dot to 4677dot, sub-scanning direction 0line to 6800line) is set to a predetermined address (800000h) in the bitmap memory,
Coordinate point address
(0,0) 800000h lower 8bit
(1,0) 800000h upper 8bit
(2,0) Lower 8 bits of 800002h
(3,0) Upper 8 bits of 800002h
As described above, the coordinate points are associated with the bitmap memory, and the data is stored in the bitmap memory.
[0022]
In FIG. 4, P1 and P2 represent coordinate points designated on the display of the display / operation means 2. A line-shaped area L having a certain width from the designated coordinate points P1 and P2 is formed as shown in FIG. 4, and a straight line close to the origin on the main scanning side of each side of the area L starts (the area The start (S) and then the straight line close to the origin on the main scanning side is the end (end of area) E setting.
[0023]
FIG. 5 shows a line shape designated by three points. The polygons A1, B1, B3, C1, C2, B5, and A2 have a chamfered portion where the angle formed by the straight line connecting the specified coordinate points ABC is an acute angle and one side of point B connects two points B1 and B3 Then, the other point B is one point (intersection B5) connection.
[0024]
FIG. 6 shows how to obtain the contour points A1, A2, B1, B2, etc. of FIG.
A1 point, B point: specified coordinate point similar to Fig. 2
AX: Main scan component at point A
AY: Subscan component of point A
BX: Main scanning component of point B
BY: Sub-scan component of point B
A1, A2, B1, B2: Contour points at specified coordinate points A and B as in FIG.
W: Line width / 2
a: Main scanning coordinate value from point A1 to point A
b: Sub-scanning coordinate value from point A1 to point A
It is.
[0025]
FIG. 7 is a diagram showing the start S and end E of each side A1A2, A2B2, B1B2, B1A1 based on the positional relationship between the two designated coordinate points (A, B). The CPU 1 considers the point A first designated by the display / operation means 2 as the center, and then the B point designated by the display / operation means 2 is located in any region of I, II, III, IV in FIG. Determine the start and end of each side.
[0026]
That is, the CPU 1 sets the point A as (A_X, A_Y) and the point B as (B_X, B_Y).
If point B is in the area of I and A_X> B_X & A_Y> B_Y,
Judge as side A1A2⇒E, side A2B2⇒S, side B1B2⇒S, side A1B1⇒E,
If point B is in the region II and A_X> B_X & A_Y <B_Y,
Side A1A2⇒E, side A2B2⇒E. Judge as side B1B2⇒S, side A1B1⇒S,
If point B is in the region III and A_X <B_X & A_Y <B_Y,
Judge as side A1A2⇒S, side A2B2⇒E, side B1B2⇒E, side A1B1⇒S,
If point B is in the IV region and A_X <B_X & A_Y> B_Y,
It is determined that side A1A2⇒S, side A2B2⇒S, side B1B2⇒E, side A1B1⇒E.
[0027]
In addition, when the point B is on the boundary, the CPU 1
If point B is at the boundary between I and II and A_X> B_X & A_Y = B_Y,
Side A1A2⇒E, Side A2B2⇒None, Side B1B2⇒S, Side A1B1⇒None,
If point B is at the boundary between II and III and A_X = B_X & A_Y <B_Y,
Side A1A2⇒None, Side A2B2⇒E, Side B1B2⇒None, Side A1B1⇒S,
If point B is at the boundary between III and IV and A_X <B_X & A_Y = B_Y,
Side A1A2⇒S, Side A2B2⇒None, Side B1B2⇒E, Side A1B1⇒None,
If point B is at the boundary between IV and I and A_X = B_X & A_Y> B_Y,
Side A1A2⇒None, side A2B2⇒S, side B1B2⇒None, side A1B1⇒E are judged.
[0028]
FIG. 8 is a diagram showing start S and end E determination of the chamfered portions B1 and B3 when the designated coordinate point is three points ABC. The CPU 1 determines the start S and end E of each side as follows depending on the region A, C, I, II, III, or IV around the point B out of the three points A, B, and C. Judge as follows.
[0029]
FIG. 9 is a diagram showing a line forming soft flow for area processing in the first embodiment. The CPU 1 first waits for an area processing start input, and when the area processing start key of the display /
[0030]
Next, the CPU 1 waits for input of shape (line) designation / designated coordinate points and edit data (data such as line width and area filling) from the display / operation means 2. Next, by inputting shape (line) designation / designated coordinate points from the display / operation means 2, the CPU 1 has contour points A 1, A 2, B 1, which are rectangular from designated coordinate points, for example, A 2 and
[0031]
A1, A2 and B1, B2 are perpendicular to the straight line AB by the designated coordinates A, B, and the lengths of A1A2, B1B2 are designated line widths. Therefore, as shown in FIG.
a2 + B2 = w2
b / a =-(BX-AX) / (BY-AY)
Then, a and b are obtained, and the A1 coordinate is (AX + a, AY + b) and the A2 coordinate is (AX−a, AY−b). Similarly, the CPU 1 determines the coordinates of each contour point such as the B1 coordinate and the B2 coordinate.
[0032]
Next, as described with reference to FIG. 7, the CPU 1 determines the start S and end E of each side A1A2, A2B2, B1B2, B1A1 from the coordinate position relationship of the points A and B, and uses FIG. As described above, start S and end E of chamfered parts B1 and B3 are determined from the coordinate position relationship of points A, B, and C, and data of start S and end E for each side (straight line) is stored. Keep it. Next, the CPU 1 forms (sets) a line L as shown in FIG. 4 on the bitmap memory using the coordinates of the contour points and the data of the start S and end E of each side.
Thereafter, the CPU 1 transfers the data on the bitmap memory to the image forming unit, and the image forming unit forms an image on a transfer material such as a transfer sheet by using the data.
[0033]
According to the first embodiment, when forming line shape data having a width on a bit map memory as a storage means, the start and end of each side of the line shape is determined only by the position coordinates of the designated coordinate point. Therefore, when the line shape data having a width is formed on the storage means, it is possible to accurately determine the start and end of the area.
[0034]
Further, according to the first embodiment, the start and end of the chamfered portion of the line shape that occurs when the designated coordinate points are 3 or more are determined at the coordinate positions of the two points at both ends of the chamfered portion. The determination of the start and end of the chamfered portion of the line shape is a determination of only the coordinate position, and no erroneous determination occurs.
[0035]
Further, according to the first embodiment, when forming line-shaped data having a width on the bit map memory as the storage means, the four sides of the line shape are determined by the position coordinates of the two points as the designated coordinate points. Since the start and end are determined, the start and end of the four sides of the line shape can be correctly determined when there are two coordinate designation points.
[0036]
Of the present inventionReference example (belowSecond embodimentCalled)Then, in the first embodiment, the CPU 1 performs the determination of the start S and end E of each side by moving two points (points A and B shown in FIG. 7) or three points near the origin. The determination of the start S and end E of each side is 3 points each. The specified coordinates are 4 points or more. For example, in the case of 5 points ABCDE, 3 points each of ABC, BCD, and CDE are used. Say to make a decision.
[0037]
In addition, when moving to the vicinity of the origin, for example, if the three specified coordinate points are A (4000, 5000), B (4200, 4900), C (4000, 4800),
Minimum value of X coordinate X_MIN: 4000
Y coordinate minimum value Y_MIN: 4800
Minimum interval value ADD: 100
As point A
X coordinate of A '= 4000-X_MIN + ADD = 100
Y coordinate of A '= 5000-Y_MIN + ADD = 300
It moves to A ′ (100, 300), and points B and C move to B ′ (300, 200) and C ′ (100, 100) as well.
[0038]
The CPU 1 determines the start S and end E of each side from the coordinate position relationship between the A ′ point and the B ′ point after the movement as described with reference to FIG. 7, and also the A ′ point and the B ′ after the movement. As described with reference to FIG. 8, the start S and end E of the chamfer are determined from the coordinate position relationship of the point and C ′ point, and the data of the start S and end E of each side are stored. A line L as shown in FIG. 4 is formed (set) on the bit map memory using the coordinates of S and the start S and end E data of each side.
[0039]
According to the second embodiment, in the first embodiment, the designated coordinate points are moved to the vicinity of the origin by a plurality of points (two or three points) to determine the start and end of each side of the area. Can be kept small, and the calculation can be simplified (prevention of overflow).
[0040]
Next, the present inventionOther reference examples (belowThird embodimentCalled)Explain aboutThe thisIn the third embodiment, in the first embodiment, when the designated coordinate point is two points (A, B), the CPU 1 determines the start and end of the area as the coordinate position relationship between the two points (A, B). Instead, as described above with reference to FIG. 2, the point A1 is (A1_X, A1_Y), the point A2 is (A2_X, A2_Y),
Straight line A1A2 is Y = a_A1A2X + b_A1A2,
Straight line B1A1 is Y = a_B1A1X + b_B1A1
Then,
The Y coordinate of the dotted line is A1_Y + 1, and the X coordinate X_A1A2 of the intersection with the straight line A1A2 intersecting this is
X_A1A2 = ((A1_Y + 1) −b_A1A2) / a_A1A2
The X coordinate X_B1A1 of the intersection of the dotted line and the straight line B1A1 is
X_B1A1 = ((A1_Y + 1) −b_B1A1) / a_B1A1
It is determined whether the straight line A1A2 is the start or end of the area depending on the magnitude of X_A1A2 and X_B1A1.
[0041]
In this case, the CPU 1 is a place where an erroneous determination of the start and end of the area is likely to occur (Y = fixed value, X = near the fixed value), that is, in each of the areas I, II, III, and IV in FIG. If point B is specified near the boundary line, the coordinates of point B are forcibly changed to a place where Y = fixed value and X = fixed value so that erroneous determination of area start and end does not occur. That is, the CPU 1 sets B_Y = A_Y if the point B is near the boundary line of each of the regions I, II, III, and IV, for example, if A_Y-10 <B_Y <A_Y + 10, and II, III or I, IV In the vicinity of the boundary (A_X−10 <B_X <A_X + 10), B_X = A_X.
[0042]
According to the third embodiment, since a predetermined area where line shape start / end is likely to be erroneously determined is excluded from the line shape start / end determination area, the calculation can be simplified.
[0043]
Next, the present inventionOther examples (belowFourth embodimentCalled)Explain aboutThe FIG.Polygons A1, B5, C1, C2, B6, and A2 shown in (a) have an obtuse angle of designated coordinates ABC and one point connection on both sides of point B (point B5 is the intersection of line A1B1 and line C1B3, point B6 Is the intersection of the straight line A2B2 and the straight line C2B4). Polygons D1, E1, E3, F1, F2, E6, and D2 shown in FIG. 3B have a specified coordinate DEF having an acute angle, and one side of point E is connected at two points (points E1 and E3).
[0044]
Normally, the line formation of the area is performed for each of the three designated coordinate points for chamfering as shown by E1E3 in FIG. 3B. However, when there are two designated coordinate points, FIG. Since there is no chamfered portion as shown in FIG. Therefore, in the fourth embodiment, when there are two designated coordinate points in the first or third embodiment, the middle point is immediately set as a virtual point, and the middle point and the two designated coordinate points are set to 3 points. By treating the point as a designated coordinate point, another process when the designated coordinate point is two points is simplified.
[0045]
That is, when two designated coordinate points are specified, the CPU 1 sets the middle point of the two points as a virtual point when the two coordinate points are designated by the display / operation means 2, and the middle point and the two designated coordinate points are used. As the designated coordinate points of 3 points, the shape like A, B, C shown in Fig. 3 (A, C is a designated point, B is a virtual point, A, B, C is a straight line), and later calculation Similar to the first embodiment or the third embodiment, the start and end of the line shape are determined, and the data of the start S and end E are stored. Next, the CPU 1 forms (sets) a line on the bitmap memory using the coordinates of each contour point and the data of the start S and end E of each side.
[0046]
According to the fourth embodiment, when there are two designated coordinate points, the other point is virtually assumed on the straight line connecting the two points and the designated coordinate points are handled as three points, so that the processing can be simplified.
[0047]
Next, the present inventionOther reference examples (belowExample 5Called)Explain aboutThe FIG.0 indicates the case where the specified ABC of the line shape is an obtuse angle and the case where the specified coordinate DEF of the line shape is an acute anglesois there. A1, A2, B1, B2, etc. are perpendicular to the straight line AB by the designated coordinates A, B, and the lengths of A1A2, B1B2 are the designated line widths.
[0048]
3 shows the final polygonal shape after connection near the point B and E from the line shape shown in FIG. 4, and the 1 point (B5) connection part and the 2 point (E1, E3) connection part. Yes. Polygons A1, B5, C1, C2, B6, and A2 shown in FIG. 3 (a) have an obtuse angle of designated coordinates ABC and one point on both sides of point B (point B5 is the intersection of line A1B1 and line C1B3, B6 The point is the connection) of the straight line A2B2 and the straight line C2B4. Polygons D1, E1, E3, F1, F2, E6, and D2 shown in FIG. 3B have a specified coordinate DEF having an acute angle, and one side of point E is connected at two points (points E1 and E3).
[0049]
In the fifth embodiment, in the first embodiment, as shown in the area processing line formation flow shown in FIG. 9, the CPU 1 first waits for an area processing start input from the display / operation means 2 and then displays / operates. When the area processing start key of the
[0050]
Next, the CPU 1 waits for input of shape (line) designation / designated coordinate points and edit data (data such as line width and area filling) from the display / operation means 2. Next, the CPU 1 inputs a shape (line) designation / designated coordinate point from the display / operation means 2, and the coordinate point designated by the display / operation means 2, for example, a contour point A 1 that becomes a polygon from the coordinate point ABC. , A2, B1, B2, B3, B4, C1, C2 are calculated.
[0051]
As shown in FIG. 10, A1, A2 and B1, B2 are perpendicular to the straight line AB by the designated coordinates A, B, and the lengths of A1A2, B1B2 are the line widths specified by the display / operation means 2. . Therefore, as shown in FIG.
a2+ B2 = w2
b / a =-(BX-AX) / (BY-AY)
From the above, a and b are obtained, and the A1 coordinate is (AX + a, AY + b) and the A2 coordinate is (AX−a, AY−b). The CPU 1 similarly obtains the B1 coordinate B2 coordinate and the like.
[0052]
Next, the CPU 1 determines whether the angle of the straight line connecting the coordinate points ABC and DEF designated by the display / operation means 2 is an obtuse angle or an acute angle as shown in FIG. The CPU 1 determines this determination based on whether the points A and C are on the same side (acute angle) or an obtuse angle with respect to the straight line B1B2. CPU1 sets straight line B1B2 as y = a_b1b2 * X + b_b1b2,
a_b1b2: slope of straight line B1B2
b_b1b2: intercept of straight line B1B2
Point A coordinates: (AX, AY), C point coordinates: (CX, CY),
X: Main scan coordinate
Y: Sub-scanning coordinate
age,
AY> a_b1b2 * AX + b_b1b2
CY> a_b1b2 * CX + b_b1b2
Or
AY <a_b1b2 * AX + b_b1b2
CY <a_b1b2 * CX + b_b1b2
Then point A and point C are on the same side, so the angle is acute,
AY> a_b1b2 * AX + b_b1b2
CY <a_b1b2 * CX + b_b1b2
Or
AY <a_b1b2 * AX + b_b1b2
CY> a_b1b2 * CX + b_b1b2
Then, since the point A and the point C are on different sides, the obtuse angle is determined.
[0053]
As a result, if the angle is an obtuse angle, the CPU 1 is connected at one point on both sides of the point B, so the point B5 shown in FIG. 3 is the intersection of the straight line A1B1 and the straight line C1B3
Find point B6 as the intersection of line A2B2 and line C2B4. If the above angle is an acute angle, the CPU 1 is connected at two points on one side of the point B, so the point E6 shown in FIG. 3 is the intersection of the straight line D2E2 and the straight line E4F2,
Let E1E3 be a straight line directly connecting E1 and E3 shown in FIG. Thereby, the CPU 1 obtains the polygons A1, B5, C1, C2, B6, A2 from the designated coordinate point ABC, and obtains the polygons D1, E1, E3, F1, F2, E6, D2 from the DEF.
[0054]
Next, the CPU 1 determines the start and end of each straight line in the same manner as in the first embodiment. This start / end determination is made at the intersection of the dotted line and each straight line shown in FIG. 2 in the vicinity of the center of each straight line, and the one near the main scanning coordinate origin is started and the far one is regarded as the end. The CPU 1 stores the start / end data of each straight line thus obtained in a bitmap, and the coordinates of each contour point and the start / end data of each side are used in the bitmap memory as shown in FIG. Such a line L is formed (set).
[0055]
According to the fifth embodiment, when the line shape data having a width is formed on the bitmap as the storage means, the connection of the designated coordinate points according to the angle of the straight line connecting the designated coordinate points. Since the shape of the part is changed, the start / end determination of the area can be correctly performed at the connection part between the coordinate points.
[0056]
In addition, when the three designated coordinate points are close to a straight line (for example, in the case of coordinates A, B, and C shown in FIG. 10), the chamfered portions (straight lines E1 and E3 shown in FIG. 3) become small and B5 However, since the chamfering causes the connecting portion to become extremely small, the start / end determination of the straight line of the chamfering portion cannot be performed, and the line shape becomes an abnormal image. However, according to the fifth embodiment, when three designated coordinate points are close to a straight line, the shape of the connecting portion is a shape in which one side is connected to one point and the other side is connected to two points. When the angle of the straight line connecting between the designated coordinate points is an obtuse angle, the abnormal image can be prevented by not performing chamfering and connecting one point on both sides (B5, B6 shown in FIG. 3).
[0057]
Further, according to the fifth embodiment, when three designated coordinate points are acute angles, the shape of the connecting portion is a shape in which one side is connected to one point and the other side is connected to two points. If the angle of the straight line connecting each of the three coordinate points is an acute angle and chamfering is not performed, the situation where the line D1, E1 and the straight line F1, E3 shown in FIG. I can do it.
[0058]
The present invention is not limited to the above-described embodiment. For example, a digital display that displays image on the display / operation unit with image data other than image data from the document reading unit and forms area data with designated coordinate points. The present invention can also be applied to an image forming apparatus or a digital image forming apparatus that forms an image on a display image other than transfer paper.
[0059]
【The invention's effect】
As described above, according to the invention of claim 1,When there are two coordinate designation points, the start and end of the four sides of the line shape can be correctly determined.
According to the invention of
[Brief description of the drawings]
FIG. 1 is a block diagram showing a first embodiment of the present invention.
FIG. 2 is a diagram for explaining conventional area start / end determination.
FIG. 3 is a diagram illustrating an example of a line shape designating three coordinate points.
FIG. 4 is a diagram showing a correspondence relationship between the coordinates of the first embodiment and a bitmap memory.
FIG. 5 is a diagram illustrating an example of a line shape with three coordinate points specified.
FIG. 6 is a diagram showing contour points of a line shape.
FIG. 7 is a diagram showing a start / end relationship of each side of an area according to the positions of two designated coordinate points.
FIG. 8 is a diagram showing a start / end relationship of a chamfered portion at three designated coordinate points.
FIG. 9 is a flowchart showing an area processing formation line flow of the first embodiment.
FIG. 10 is a diagram illustrating a line shape with designated coordinates having an obtuse angle and a line shape with designated coordinates having an acute angle.
[Explanation of symbols]
1 CPU
2 Display and operation means
3 Document reading means
4 Data storage means
Claims (2)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000134711A JP4043692B2 (en) | 2000-05-08 | 2000-05-08 | Digital image forming device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000134711A JP4043692B2 (en) | 2000-05-08 | 2000-05-08 | Digital image forming device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2001319237A JP2001319237A (en) | 2001-11-16 |
| JP4043692B2 true JP4043692B2 (en) | 2008-02-06 |
Family
ID=18642943
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000134711A Expired - Fee Related JP4043692B2 (en) | 2000-05-08 | 2000-05-08 | Digital image forming device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4043692B2 (en) |
-
2000
- 2000-05-08 JP JP2000134711A patent/JP4043692B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2001319237A (en) | 2001-11-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2930612B2 (en) | Image forming device | |
| US5448376A (en) | Image processing apparatus for deleting undesired image from image of document | |
| JP3883696B2 (en) | Method for scanning and detecting multiple photos and removing artificial edges | |
| JP3670571B2 (en) | Image reading device | |
| JPH08123900A (en) | Position determination method and apparatus for line scan image | |
| JP4095947B2 (en) | Method for determining skew angle and position of a document in an overscanned image | |
| US6268935B1 (en) | Image processor | |
| US6771842B1 (en) | Document image skew detection method | |
| US20060228044A1 (en) | Method for automatically cropping image objects | |
| JPH0418351B2 (en) | ||
| JP4043692B2 (en) | Digital image forming device | |
| EP0766193B1 (en) | Optical character reader with skew correction | |
| JP3378439B2 (en) | Form image creation device | |
| JP3443141B2 (en) | Image tilt detection method and table processing method | |
| JP4329226B2 (en) | Reference mark detection method, reference mark detection device, and optical character reader | |
| JP3354629B2 (en) | Image processing device | |
| JP2786044B2 (en) | Optical character reader | |
| JPH11288453A (en) | Method and system for detecting skew angle and black boundary line of original image in scan environment for reproduction | |
| JPH05233798A (en) | Image processing method | |
| JP2721415B2 (en) | Character image extraction method | |
| JPH0758927A (en) | Picture data creation device | |
| JPH02254574A (en) | Noise removing system | |
| JP3355234B2 (en) | Image binarization device | |
| JPH04195274A (en) | Document terminal detecting method for optical character reader | |
| JP2002314786A (en) | Image forming device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040420 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070821 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071019 |
|
| 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: 20071113 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20071114 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101122 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111122 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111122 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121122 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131122 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |