JP2002354248A - Method, device and program for binarizing image - Google Patents

Method, device and program for binarizing image

Info

Publication number
JP2002354248A
JP2002354248A JP2001154087A JP2001154087A JP2002354248A JP 2002354248 A JP2002354248 A JP 2002354248A JP 2001154087 A JP2001154087 A JP 2001154087A JP 2001154087 A JP2001154087 A JP 2001154087A JP 2002354248 A JP2002354248 A JP 2002354248A
Authority
JP
Japan
Prior art keywords
value
image
binarization
binarization threshold
average
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.)
Granted
Application number
JP2001154087A
Other languages
Japanese (ja)
Other versions
JP4132725B2 (en
Inventor
Sadao Takahashi
禎郎 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2001154087A priority Critical patent/JP4132725B2/en
Publication of JP2002354248A publication Critical patent/JP2002354248A/en
Application granted granted Critical
Publication of JP4132725B2 publication Critical patent/JP4132725B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To binarize a multilevel image with a high quality. SOLUTION: A digital camera 100 is provided with a CCD 101 which inputs the luminance value of each of pixels constituting a multi-valued image, an average luminance value calculator 120 which calculates a local average luminance value including a pixel to be binarized on the basis of the luminance value inputted from the CCD 101, a binarization threshold setting circuit 122 which sets a binarization threshold to a value lower than the local average luminance value in accordance with the local average luminance value calculated by the average luminance value calculator 120, and a binarizing device 123 which binarizes the pixel to be binarized by the binarization threshold set by the binarization threshold setting circuit 122.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像二値化装置、
画像二値化方法および画像二値化プログラムに関し、特
に、光源の一定しない画像入力装置等で入力された多値
画像から表面反射によるコントラスト低下の影響や輝度
ムラを取り除いて二値化する画像二値化装置、画像二値
化方法および画像二値化プログラムに関する。
The present invention relates to an image binarizing device,
In particular, the present invention relates to an image binarization method and an image binarization program, and more particularly to an image binarization method that removes the influence of contrast reduction and uneven brightness due to surface reflection from a multivalued image input by an image input device or the like having an irregular light source. The present invention relates to a binarization device, an image binarization method, and an image binarization program.

【0002】[0002]

【従来の技術】従来、文書を電子化して保存する場合、
専ら画像入力装置としてスキャナ、または、複写機もし
くはファクシミリ装置のスキャナ部を使用していた。こ
の様なスキャナ(スキャナ部)は、光源を装置内に備
え、光源から出た光の文書(原稿)による反射光をCC
Dなどで読み取るものであった。また、読み取られた画
像は必要に応じて二値化して保存されていた。このよう
にして読み取られた画像については、光源および光学系
が一定であるので、輝度ムラや影の発生は一定したもの
となり、容易に補正を行うことができた。従って、高品
質の画像を出力することができ、デジタル画像を高品
質、かつ、容易に二値化することができた。
2. Description of the Related Art Conventionally, when electronically storing a document,
A scanner or a scanner unit of a copier or a facsimile machine is exclusively used as an image input device. Such a scanner (scanner unit) includes a light source in the apparatus, and reflects reflected light of a document (document) of light emitted from the light source into a CC.
It was read by D or the like. Further, the read image is binarized and stored as needed. As for the image read in this way, since the light source and the optical system were constant, the occurrence of luminance unevenness and shadow was constant, and correction could be easily performed. Therefore, a high-quality image can be output, and the digital image can be binarized with high quality and easily.

【0003】一方、近年は、ビデオカメラやデジタルカ
メラが発達し、この様な機器から入力した画像を文字認
識したいという要求も高まっている。特にデジタルカメ
ラは、高画素化と小型化が著しく、携帯情報収集ツール
として様々な用途に使用され始めている。たとえば文
書、看板、広告などの文字情報は二値画像で十分な情報
が得られ、しかも保存に必要な記憶容量も多値画像に比
して小さいので、二値画像として保存することが有利で
ある。また、二値化した画像をファクシミリ送信した
り、文字認識をして再利用することもできる。
On the other hand, in recent years, video cameras and digital cameras have been developed, and demands for character recognition of images input from such devices have been increasing. In particular, digital cameras have remarkably increased pixels and miniaturized, and have begun to be used for various purposes as portable information collection tools. For example, text information such as documents, signboards, and advertisements can be obtained as a binary image because sufficient information can be obtained with a binary image and the storage capacity required for storage is smaller than that of a multi-valued image. is there. Further, the binarized image can be transmitted by facsimile or can be subjected to character recognition for reuse.

【0004】なお、この様な、デジタル画像を適切に二
値化する従来技術としては、特開平3−237571号
公報の「画像の2値化しきい値算出装置」や、特開平7
−212591号公報の「画像二値化装置」が知られて
いる。
As a conventional technique for appropriately binarizing a digital image, Japanese Patent Application Laid-Open No. Hei 3-237571 discloses an "image binarization threshold value calculating apparatus".
An "image binarizing device" disclosed in Japanese Patent Application Laid-Open No. 2-12591 is known.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、従来の
技術では以下の問題点があった。デジタルカメラで撮影
した画像は、光源の数、位置、強さ等が様々であり、影
や輝度ムラが発生しやすい。しかも影や輝度ムラが一定
しないため、複写機等のスキャナ部のように一定の補正
を適用することができない。従って、デジタルカメラで
撮像した画像は、高品質に二値化出来ないという問題点
があった。
However, the prior art has the following problems. Images taken with a digital camera vary in the number, position, intensity, etc. of light sources, and are liable to produce shadows and uneven brightness. Moreover, since the shadow and the uneven brightness are not constant, it is not possible to apply a constant correction unlike a scanner unit of a copying machine or the like. Therefore, there is a problem that an image captured by a digital camera cannot be binarized with high quality.

【0006】特に、フラッシュを使用した場合には、光
源からの光のあたり具合によっては、原稿表面で正反射
が起こり、この表面反射により文字と背景の間のコント
ラストが低下してしまう。すなわち、表面反射が発生し
た領域は、表面反射が発生しない領域と比較して平均輝
度が高くなり(もしくは平均濃度が低くなり)、いわゆ
る白飛びが生じてしまう。
[0006] In particular, when a flash is used, specular reflection occurs on the surface of the original depending on how light from the light source hits, and the contrast between the character and the background is reduced by the surface reflection. That is, the area where surface reflection occurs has higher average brightness (or lower average density) than the area where surface reflection does not occur, and so-called overexposure occurs.

【0007】従って、従来技術のように、二値化閾値が
平均輝度(もしくは平均濃度)に関係なく常に同じ演算
である場合には、表面反射の起こっている領域では文字
が正しく二値化できなくなるという問題点があった。換
言すると表面反射が発生している画像を高品質に二値化
できないという問題点があった。
Accordingly, when the binarization threshold is always the same operation regardless of the average luminance (or average density) as in the prior art, characters can be correctly binarized in the area where surface reflection occurs. There was a problem that it disappeared. In other words, there is a problem that an image having surface reflection cannot be binarized with high quality.

【0008】本発明は上記に鑑みてなされたものであっ
て、多値画像を高品質に二値化することを目的とする。
The present invention has been made in view of the above, and has as its object to binarize a multi-valued image with high quality.

【0009】[0009]

【課題を解決するための手段】上記の目的を達成するた
めに、請求項1に記載の画像二値化装置は、多値画像を
構成する各画素の輝度値を入力する輝度値入力手段と、
前記輝度値入力手段により入力された輝度値に基づい
て、二値化すべき画素を含んだ局所的な平均輝度値を算
出する平均輝度値算出手段と、前記平均輝度値算出手段
により算出された局所的な平均輝度値の大きさに応じて
二値化閾値を当該局所的な平均輝度値より低く設定する
二値化閾値設定手段と、前記二値化閾値設定手段により
設定された二値化閾値により前記二値化すべき画素を二
値化する二値化手段と、を備えたことを特徴とする。
According to another aspect of the present invention, there is provided an image binarizing apparatus, comprising: a luminance value input means for inputting a luminance value of each pixel constituting a multi-valued image; ,
An average brightness value calculation unit that calculates a local average brightness value including a pixel to be binarized based on the brightness value input by the brightness value input unit; and a local brightness value calculated by the average brightness value calculation unit. Threshold value setting means for setting a binarization threshold value lower than the local average luminance value in accordance with the magnitude of a typical average luminance value, and a binarization threshold value set by the binarization threshold value setting means And a binarizing means for binarizing the pixel to be binarized.

【0010】すなわち、請求項1にかかる発明は、平均
輝度値に応じて値の異なる二値化閾値を用い、表面反射
が発生しているような領域に対して適切な二値化閾値を
採用する。
That is, the invention according to claim 1 uses a binarization threshold having a different value according to the average luminance value, and employs an appropriate binarization threshold for an area where surface reflection occurs. I do.

【0011】また、請求項2に記載の画像二値化装置
は、請求項1に記載の画像二値化装置において、前記二
値化閾値設定手段が、前記平均輝度値算出手段により算
出された局所的な平均輝度値に応じた補正量であって、
平均輝度値が所定の中間レンジにある場合には当該中間
レンジ外にある場合よりも大きな値である補正量を当該
局所的な平均輝度値から減算することにより二値化閾値
を設定することを特徴とする。
According to a second aspect of the present invention, in the image binarization apparatus according to the first aspect, the binarization threshold value setting means is calculated by the average luminance value calculation means. The correction amount according to the local average luminance value,
When the average luminance value is in a predetermined intermediate range, a binarization threshold is set by subtracting a correction amount that is a larger value than when the average luminance value is outside the intermediate range from the local average luminance value. Features.

【0012】すなわち、請求項2にかかる発明は、表面
反射が生じる輝度レンジでは平均輝度値と二値化閾値と
の差を小さくするような補正量により適切な二値化閾値
を採用しつつ、中間レンジではある程度大きな補正量に
より適切な二値化閾値を採用する。また、低輝度側での
平均輝度値と二値化閾値との差を大きくしないようにし
て、低輝度側でのノイズの発生を抑制する。
In other words, the invention according to claim 2 employs an appropriate binarization threshold with a correction amount that reduces the difference between the average luminance value and the binarization threshold in a luminance range in which surface reflection occurs, In the intermediate range, an appropriate binarization threshold value is adopted with a relatively large correction amount. Further, the difference between the average luminance value on the low luminance side and the binarization threshold is not increased, thereby suppressing the generation of noise on the low luminance side.

【0013】また、請求項3に記載の画像二値化装置
は、請求項1に記載の画像二値化装置において、前記二
値化閾値設定手段が、前記平均輝度値算出手段により算
出された局所的な平均輝度値に対して、平均輝度値が大
きな値となるほどに大きな値の補正量を用いて乗算する
ことにより二値化閾値を設定することを特徴とする。
According to a third aspect of the present invention, in the image binarization apparatus according to the first aspect, the binarization threshold value setting means is calculated by the average luminance value calculation means. The binarization threshold is set by multiplying a local average luminance value by using a correction value of a larger value as the average luminance value becomes larger.

【0014】すなわち、請求項3にかかる発明は、表面
反射が生じる輝度レンジにおいて、平均輝度値と二値化
閾値との差を小さくするような補正量により適切な二値
化閾値を採用する。
That is, the invention according to claim 3 employs an appropriate binarization threshold value in a luminance range in which surface reflection occurs, with a correction amount that reduces the difference between the average luminance value and the binarization threshold value.

【0015】また、請求項4に記載の画像二値化装置
は、多値画像を構成する各画素の輝度値を入力する輝度
値入力手段と、前記輝度値入力手段により入力された輝
度値に基づいて、二値化すべき画素を含んだ局所的な平
均輝度値を算出する平均輝度値算出手段と、前記平均輝
度値算出手段により算出された局所的な平均輝度値に第
1の補正量を減算して第1の二値化閾値を算出する減算
閾値算出手段と、前記平均輝度値算出手段により算出さ
れた局所的な平均輝度値に1未満の値である第2の補正
量を乗じて第2の二値化閾値を算出する乗算閾値算出手
段と、前記平均輝度値算出手段により算出された局所的
な平均輝度値の大きさが、所定の比較値より大であるか
小であるかを判定する比較判定手段と、前記比較判定手
段により前記局所的な平均輝度値の大きさが前記比較値
より大であると判定された場合には、前記減算閾値算出
手段により算出される前記第1の二値化閾値を採用する
ことを決定し、前記比較判定手段により前記局所的な平
均輝度値の大きさが前記比較値より小であると判定され
た場合には、前記乗算閾値算出手段により算出される前
記第2の二値化閾値を採用することを決定する二値化閾
値決定手段と、前記二値化閾値決定手段により決定され
た二値化閾値により前記二値化すべき画素を二値化する
二値化手段と、を備えたことを特徴とする。
The image binarizing device according to a fourth aspect of the present invention includes a luminance value input means for inputting a luminance value of each pixel constituting a multi-valued image, and a luminance value input means for inputting the luminance value. Average brightness value calculating means for calculating a local average brightness value including a pixel to be binarized based on the first brightness value, and a first correction amount for the local average brightness value calculated by the average brightness value calculating means. Subtraction threshold value calculation means for calculating a first binarization threshold value by subtraction, and multiplying the local average brightness value calculated by the average brightness value calculation means by a second correction amount less than 1 Multiplication threshold value calculation means for calculating a second binarization threshold value, and whether the magnitude of the local average brightness value calculated by the average brightness value calculation means is larger or smaller than a predetermined comparison value Comparing and judging, and comparing the local When it is determined that the average luminance value is larger than the comparison value, it is determined that the first binarization threshold value calculated by the subtraction threshold value calculation means is to be used, and the comparison determination is performed. When the local average luminance value is determined to be smaller than the comparison value by the means, the second binarization threshold calculated by the multiplication threshold calculation means is adopted. A binarization threshold determining unit for determining, and a binarization unit for binarizing the pixel to be binarized by the binarization threshold determined by the binarization threshold determining unit, I do.

【0016】すなわち、請求項4にかかる発明は、表面
反射が生じている様な領域に対する二値化閾値と、通常
の領域に対する二値化閾値を使い分け、表面反射が生じ
ている様な領域に対しては、平均輝度値が大きくなるに
つれて平均輝度値との差が相対的に小さくなる二値化閾
値を採用し、通常の領域に対しては、二値化後の全体的
な調子が滑らかとなる二値化閾値を採用する。
That is, the invention according to claim 4 uses a binarization threshold value for an area where surface reflection occurs and a binarization threshold value for an ordinary area to selectively apply the threshold to an area where surface reflection occurs. On the other hand, the binarization threshold value, in which the difference from the average luminance value becomes relatively small as the average luminance value increases, is adopted. For a normal region, the overall tone after the binarization is smooth. Is adopted.

【0017】また、請求項5に記載の画像二値化装置
は、請求項4に記載の画像二値化装置において、前記減
算閾値算出手段が、前記平均輝度値算出手段により算出
された局所的な平均輝度値に対して、当該輝度値の大き
さに応じた補正量を減算することにより前記第1の二値
化閾値を算出することを特徴とする。
According to a fifth aspect of the present invention, there is provided the image binarization apparatus according to the fourth aspect, wherein the subtraction threshold value calculation means is configured to calculate the local brightness calculated by the average luminance value calculation means. The first binarization threshold is calculated by subtracting a correction amount corresponding to the magnitude of the luminance value from the average luminance value.

【0018】すなわち、請求項5にかかる発明は、表面
反射が生じる輝度レンジでより適切な二値化閾値を採用
できる。
That is, the invention according to claim 5 can employ a more appropriate binarization threshold value in a luminance range in which surface reflection occurs.

【0019】また、請求項6に記載の画像二値化装置
は、請求項4または5に記載の画像二値化装置におい
て、前記乗算閾値設定手段が、前記平均輝度値算出手段
により算出された局所的な平均輝度値に対して、当該輝
度値の大きさに応じた補正量で乗算することにより前記
第2の二値化閾値を算出することを特徴とする。
According to a sixth aspect of the present invention, in the image binarizing apparatus according to the fourth or fifth aspect, the multiplying threshold setting means is calculated by the average luminance value calculating means. The second binarization threshold is calculated by multiplying a local average luminance value by a correction amount corresponding to the magnitude of the luminance value.

【0020】すなわち、請求項6にかかる発明は、表面
反射が生じていない領域において、境界が発生せず滑ら
かな二値画像が得られる二値化閾値を採用する。
That is, the invention according to claim 6 employs a binarization threshold value in which a boundary is not generated and a smooth binary image is obtained in an area where surface reflection does not occur.

【0021】また、請求項7に記載の画像二値化装置
は、請求項1〜6のいずれか一つに記載の画像二値化装
置において、多値画像をブロックに分割するブロック分
割手段を備え、前記平均輝度値算出手段が、前記ブロッ
ク分割手段により分割されたブロックを単位として前記
局所的な平均輝度値を算出することを特徴とする。
According to a seventh aspect of the present invention, there is provided the image binarizing apparatus according to any one of the first to sixth aspects, wherein the block dividing means for dividing the multi-valued image into blocks is provided. The average brightness value calculating means calculates the local average brightness value in units of blocks divided by the block dividing means.

【0022】すなわち、請求項7にかかる発明は、ブロ
ック毎に適正な二値化閾値を設定する。
That is, in the invention according to claim 7, an appropriate binarization threshold value is set for each block.

【0023】また、請求項8に記載の画像二値化装置
は、請求項7に記載の画像二値化装置において、前記局
所的な平均輝度値を算出するブロックに隣接するブロッ
クの平均輝度値に基づいて前記比較値を決定する比較値
決定手段を備えたことを特徴とする。
The image binarizing device according to claim 8 is the image binarizing device according to claim 7, wherein the average luminance value of a block adjacent to the block for calculating the local average luminance value is used. And a comparison value determining unit that determines the comparison value based on the comparison value.

【0024】すなわち、請求項8にかかる発明は、多値
画像の白飛びをより的確に判断して二値化閾値を設定す
る。
That is, in the invention according to claim 8, the binarization threshold is set by more accurately determining the whiteout of the multi-valued image.

【0025】また、請求項9に記載の画像二値化装置
は、多値画像を構成する各画素の濃度値を入力する濃度
値入力手段と、前記濃度値入力手段により入力された濃
度値に基づいて、二値化すべき画素を含んだ局所的な平
均濃度値を算出する平均濃度値算出手段と、前記平均濃
度値算出手段により算出された局所的な平均濃度値の大
きさに応じて二値化閾値を当該局所的な平均濃度値より
高く設定する二値化閾値設定手段と、前記二値化閾値設
定手段により設定された二値化閾値により前記二値化す
べき画素を二値化する二値化手段と、を備えたことを特
徴とする。
According to a ninth aspect of the present invention, there is provided an image binarizing apparatus, comprising: a density value input means for inputting a density value of each pixel constituting a multi-valued image; Average density value calculating means for calculating a local average density value including the pixel to be binarized based on the average density value calculated by the average density value calculating means. A binarization threshold setting unit that sets a binarization threshold higher than the local average density value; and a binarization threshold set by the binarization threshold setting unit, and binarizes the pixel to be binarized. And binarizing means.

【0026】すなわち、請求項9にかかる発明は、平均
濃度値に応じて値の異なる二値化閾値を用い、表面反射
が発生しているような領域に対して適切な二値化閾値を
採用する。
That is, according to the ninth aspect of the present invention, a binarization threshold having a different value according to the average density value is used, and an appropriate binarization threshold is used for an area where surface reflection occurs. I do.

【0027】また、請求項10に記載の画像二値化装置
は、請求項9に記載の画像二値化装置において、前記二
値化閾値設定手段が、前記平均濃度値算出手段により算
出された局所的な平均濃度値に応じた補正量であって、
平均濃度値が所定の中間レンジにある場合には当該中間
レンジ外にある場合よりも大きな値である補正量を当該
局所的な平均濃度値に加算することにより二値化閾値を
設定することを特徴とする。
According to a tenth aspect of the present invention, in the image binarization apparatus according to the ninth aspect, the binarization threshold value setting means is calculated by the average density value calculation means. A correction amount according to the local average density value,
When the average density value is in a predetermined intermediate range, a binarization threshold is set by adding a correction amount that is a larger value than when the average density value is outside the intermediate range to the local average density value. Features.

【0028】すなわち、請求項10にかかる発明は、表
面反射が生じる濃度レンジでは平均濃度値と二値化閾値
との差を小さくするような補正量により適切な二値化閾
値を採用しつつ、中間レンジではある程度大きな補正量
により適切な二値化閾値を採用する。また、高濃度側で
の平均濃度値と二値化閾値との差を大きくしないように
して、高濃度側でのノイズの発生を抑制する。
That is, according to the tenth aspect of the present invention, in a density range in which surface reflection occurs, an appropriate binarization threshold value is adopted while using a correction amount that reduces the difference between the average density value and the binarization threshold value. In the intermediate range, an appropriate binarization threshold value is adopted with a relatively large correction amount. In addition, the difference between the average density value on the high density side and the binarization threshold is not increased, thereby suppressing the generation of noise on the high density side.

【0029】また、請求項11に記載の画像二値化装置
は、請求項9に記載の画像二値化装置において、前記二
値化閾値設定手段が、前記平均濃度値算出手段により算
出された局所的な平均濃度値に対して、平均濃度値が大
きな値となるほどに小さな値の補正量を用いて乗算する
ことにより二値化閾値を設定することを特徴とする。
The image binarizing device according to claim 11 is the image binarizing device according to claim 9, wherein the binarization threshold value setting means is calculated by the average density value calculating means. The binarization threshold is set by multiplying the local average density value by using a smaller correction amount as the average density value increases.

【0030】すなわち、請求項11にかかる発明は、表
面反射が生じている濃度レンジにおいて、平均濃度値と
二値化閾値との差を小さくするような補正量により適切
な二値化閾値を採用する。
That is, in the invention according to the eleventh aspect, in the density range where surface reflection occurs, an appropriate binarization threshold is adopted by a correction amount that reduces the difference between the average density value and the binarization threshold. I do.

【0031】また、請求項12に記載の画像二値化装置
は、多値画像を構成する各画素の濃度値を入力する濃度
値入力手段と、前記濃度値入力手段により入力された濃
度値に基づいて、二値化すべき画素を含んだ局所的な平
均濃度値を算出する平均濃度値算出手段と、前記平均濃
度値算出手段により算出された局所的な平均濃度値に第
1の補正量を加算して第1の二値化閾値を算出する加算
閾値算出手段と、前記平均濃度値算出手段により算出さ
れた局所的な平均濃度値に1以上の値である第2の補正
量を乗じて第2の二値化閾値を算出する乗算閾値算出手
段と、前記平均濃度値算出手段により算出された局所的
な平均濃度値の大きさが、所定の比較値より大であるか
小であるかを判定する比較判定手段と、前記比較判定手
段により前記局所的な平均濃度値の大きさが前記比較値
より小であると判定された場合には、前記加算閾値算出
手段により算出される前記第1の二値化閾値を採用する
ことを決定し、前記比較判定手段により前記局所的な平
均濃度値の大きさが前記比較値より大であると判定され
た場合には、前記乗算閾値算出手段により算出される前
記第2の二値化閾値を採用することを決定する二値化閾
値決定手段と、前記二値化閾値決定手段により決定され
た二値化閾値により前記二値化すべき画素を二値化する
二値化手段と、を備えたことを特徴とする。
According to a twelfth aspect of the present invention, there is provided an image binarization device, comprising: a density value input means for inputting a density value of each pixel constituting a multi-valued image; and a density value input by the density value input means. Average density value calculating means for calculating a local average density value including a pixel to be binarized based on the first density value, and a first correction amount for the local average density value calculated by the average density value calculation means. An addition threshold value calculating means for calculating a first binarization threshold value by adding, and a local average density value calculated by the average density value calculating means multiplied by a second correction amount which is one or more. Multiplication threshold value calculation means for calculating a second binarization threshold value, and whether the magnitude of the local average density value calculated by the average density value calculation means is larger or smaller than a predetermined comparison value Comparing and judging the local area by the comparing and judging means. If it is determined that the magnitude of the average density value is smaller than the comparison value, it is determined that the first binarization threshold calculated by the addition threshold calculation means is to be used, and the comparison is performed. When the determination unit determines that the local average density value is larger than the comparison value, the second binarization threshold calculated by the multiplication threshold calculation unit is employed. And a binarization unit for binarizing the pixel to be binarized by the binarization threshold determined by the binarization threshold determination unit. And

【0032】すなわち、請求項12にかかる発明は、表
面反射が生じている様な領域に対する二値化閾値と、通
常の領域に対する二値化閾値を使い分け、表面反射が生
じている様な領域に対しては、平均濃度値が小さくなる
につれて平均濃度値との差が相対的に小さくなる二値化
閾値を採用し、通常の領域に対しては、二値化後の全体
的な調子が滑らかとなる二値化閾値を採用する。
That is, according to the twelfth aspect of the present invention, a binarization threshold value for an area where surface reflection occurs and a binarization threshold value for an ordinary area are selectively used so that an area where surface reflection occurs is used. On the other hand, a binarization threshold value, in which the difference from the average density value becomes relatively smaller as the average density value becomes smaller, is adopted, and for a normal region, the overall tone after the binarization is smooth. Is adopted.

【0033】また、請求項13に記載の画像二値化装置
は、請求項12に記載の画像二値化装置において、前記
加算閾値算出手段が、前記平均濃度値算出手段により算
出された局所的な平均濃度値に対して、当該濃度値の大
きさに応じた補正量を加算することにより前記第1の二
値化閾値を算出することを特徴とする。
According to a thirteenth aspect of the present invention, in the image binarization device according to the twelfth aspect, the adding threshold value calculating means is configured to calculate the local value calculated by the average density value calculating means. The first binarization threshold is calculated by adding a correction amount corresponding to the magnitude of the density value to the average density value.

【0034】すなわち、請求項13にかかる発明は、表
面反射が生じている濃度レンジでより適切な二値化閾値
を採用できる。
That is, the invention according to claim 13 can employ a more appropriate binarization threshold value in the density range in which surface reflection occurs.

【0035】また、請求項14に記載の画像二値化装置
は、請求項12または13に記載の画像二値化装置にお
いて、前記乗算閾値設定手段が、前記平均濃度値算出手
段により算出された局所的な平均濃度値に対して、当該
濃度値の大きさに応じた補正量で乗算することにより前
記第2の二値化閾値を算出することを特徴とする。
According to a fourteenth aspect of the present invention, in the image binarization apparatus according to the twelfth or thirteenth aspect, the multiplication threshold value setting means is calculated by the average density value calculation means. The second binarization threshold is calculated by multiplying a local average density value by a correction amount corresponding to the magnitude of the density value.

【0036】すなわち、請求項14にかかる発明は、表
面反射が生じていない領域において、境界が発生せず滑
らかな二値画像が得られる二値化閾値を採用する。
That is, the invention according to claim 14 employs a binarization threshold value that can obtain a smooth binary image without generating a boundary in an area where surface reflection does not occur.

【0037】また、請求項15に記載の画像二値化装置
は、請求項9〜14のいずれか一つに記載の画像二値化
装置において、多値画像をブロックに分割するブロック
分割手段を備え、前記平均濃度値算出手段が、前記ブロ
ック分割手段により分割されたブロックに基づいて前記
局所的な平均濃度値を算出することを特徴とする。
According to a fifteenth aspect of the present invention, in the image binarization apparatus according to any one of the ninth to fourteenth aspects, a block dividing means for dividing the multi-valued image into blocks is provided. The average density value calculation means calculates the local average density value based on the blocks divided by the block division means.

【0038】すなわち、請求項15にかかる発明は、ブ
ロック毎に適正な二値化閾値を設定する。
That is, in the invention according to claim 15, an appropriate binarization threshold is set for each block.

【0039】また、請求項16に記載の画像二値化装置
は、請求項15に記載の画像二値化装置において、前記
局所的な平均濃度値を算出するブロックに隣接するブロ
ックの平均濃度値に基づいて前記比較値を決定する比較
値決定手段を備えたことを特徴とする。
According to a sixteenth aspect of the present invention, in the image binarization apparatus according to the fifteenth aspect, the average density value of a block adjacent to the block for calculating the local average density value is set. And a comparison value determining unit that determines the comparison value based on the comparison value.

【0040】すなわち、請求項16にかかる発明は、多
値画像の白飛びをより的確に判断して二値化閾値を設定
する。
That is, the invention according to claim 16 sets the binarization threshold value by more accurately determining the whiteout of the multi-valued image.

【0041】また、請求項17に記載の画像二値化方法
は、多値画像を構成する画素の輝度値を入力し、二値化
すべき画素を含んだ局所的な画素集合の平均輝度値より
低い値の二値化閾値であって白飛びしている画素集合に
対しては白飛びしていない画素集合に対してよりも平均
輝度値との差が小さな二値化閾値を決定し、当該局所的
な画素集合の画像を前記二値化閾値を用いて二値化して
出力することを特徴とする。
In the image binarizing method according to the seventeenth aspect, a luminance value of a pixel forming a multi-valued image is input, and a luminance value of a local pixel set including a pixel to be binarized is calculated. For a pixel set that is a low-valued binarization threshold and is overexposed, a binarization threshold having a smaller difference from the average luminance value than for a pixel set that is not overexposed is determined. The image of the local pixel set is binarized using the binarization threshold and output.

【0042】すなわち、請求項17にかかる発明は、表
面反射が生じている画像に対しても適正な二値化閾値を
設定する。
That is, according to the seventeenth aspect of the present invention, an appropriate binarization threshold is set for an image having surface reflection.

【0043】また、請求項18に記載の画像二値化方法
は、多値画像を構成する画素の濃度値を入力し、二値化
すべき画素を含んだ局所的な画素集合の平均濃度値より
高い値の二値化閾値であって白飛びしている画素集合に
対しては白飛びしていない画素集合に対してよりも平均
濃度値との差が小さな二値化閾値を決定し、当該局所的
な画素集合の画像を前記二値化閾値を用いて二値化して
出力することを特徴とする。
In the image binarizing method according to the eighteenth aspect, a density value of a pixel constituting a multi-valued image is input, and the average density value of a local pixel set including a pixel to be binarized is obtained. For a pixel set that is a high-valued binarization threshold and is overexposed, a binarization threshold having a smaller difference from the average density value than for a pixel set that is not overexposed is determined. The image of the local pixel set is binarized using the binarization threshold and output.

【0044】すなわち、請求項18にかかる発明は、表
面反射が生じている画像に対しても適正な二値化閾値を
設定する。
That is, the invention according to claim 18 sets an appropriate binarization threshold even for an image having surface reflection.

【0045】また、請求項19に記載の画像二値化プロ
グラムは、コンピュータに、多値画像を構成する画素の
輝度値を入力させ、二値化すべき画素を含んだ局所的な
画素集合の平均輝度値より低い値の二値化閾値であって
白飛びしている画素集合に対しては白飛びしていない画
素集合に対してよりも平均輝度値との差が小さくなるよ
うな二値化閾値を決定させ、当該局所的な画素集合の画
像を前記二値化閾値を用いて二値化して出力させること
を特徴とする。
An image binarization program according to a nineteenth aspect causes a computer to input a luminance value of a pixel constituting a multi-valued image and calculate an average of a local pixel set including a pixel to be binarized. A binarization threshold value lower than the luminance value, such that the difference from the average luminance value is smaller for a pixel set that is overexposed than for a pixel set that is not overexposed. A threshold is determined, and the image of the local pixel set is binarized using the binarization threshold and output.

【0046】すなわち、請求項19にかかる発明は、表
面反射が生じている画像に対しても適正な二値化閾値を
設定する。
That is, the invention according to claim 19 sets an appropriate binarization threshold value even for an image having surface reflection.

【0047】また、請求項20に記載の画像二値化プロ
グラムは、コンピュータに、多値画像を構成する画素の
濃度値を入力させ、二値化すべき画素を含んだ局所的な
画素集合の平均濃度値より高い値の二値化閾値であって
白飛びしている画素集合に対しては白飛びしていない画
素集合に対してよりも平均濃度値との差が小さくなるよ
うな二値化閾値を決定させ、当該局所的な画素集合の画
像を前記二値化閾値を用いて二値化して出力させること
を特徴とする。
According to a twentieth aspect of the present invention, there is provided an image binarization program, wherein a computer inputs a density value of a pixel forming a multi-valued image, and averages a local pixel set including a pixel to be binarized. A binarization threshold value that is higher than the density value and has a smaller difference from the average density value for a pixel set that is overexposed than for a pixel set that is not overexposed. A threshold is determined, and the image of the local pixel set is binarized using the binarization threshold and output.

【0048】すなわち、請求項20にかかる発明は、表
面反射が生じている画像に対しても適正な二値化閾値を
設定する。
That is, according to the twentieth aspect of the present invention, an appropriate binarization threshold is set for an image having surface reflection.

【0049】[0049]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照しながら詳細に説明する。 (実施の形態1)実施の形態1では、本発明の画像二値
化装置をデジタルカメラに適用した場合について説明す
る。図1は本発明の画像二値化装置をデジタルカメラに
適用した場合の、画像データの入力から、二値化処理し
た画像(二値化データ)を記録するまでの装置構成の一
例を示したブロック図である。なお、本実施例を含めて
以降の実施例では主として輝度値に基づいて二値化閾値
を設定する例を説明するが、濃度値に基づいて二値化閾
値を設定してもよい。濃度値に基づいて二値化閾値を設
定する場合については適宜説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings. (Embodiment 1) In Embodiment 1, a case will be described in which the image binarizing apparatus of the present invention is applied to a digital camera. FIG. 1 shows an example of an apparatus configuration from input of image data to recording of a binarized image (binary data) when the image binarizing apparatus of the present invention is applied to a digital camera. It is a block diagram. In the following embodiments including this embodiment, an example in which the binarization threshold is set mainly based on the luminance value will be described. However, the binarization threshold may be set based on the density value. The case where the binarization threshold is set based on the density value will be described as appropriate.

【0050】デジタルカメラ100は、CCD101
と、A/D変換器102と、ホワイトバランス調整器1
03と、画素補間器104と、輝度生成器105と、ア
パーチャ補正器106と、フレームメモリ107と、C
PU108と、ブロックバッファ109と、後述する平
均輝度値算出器120、低輝度閾値設定器121および
二値化閾値設定回路122と、二値化器123と、圧縮
器124と、画像記憶メモリ125と、から構成され
る。
The digital camera 100 includes a CCD 101
, A / D converter 102 and white balance adjuster 1
03, a pixel interpolator 104, a luminance generator 105, an aperture corrector 106, a frame memory 107,
PU 108, block buffer 109, average brightness value calculator 120, low brightness threshold value setting device 121, and binarization threshold value setting circuit 122, which will be described later, binarization device 123, compressor 124, image storage memory 125, , Consisting of

【0051】CCD101は、デジタルカメラ100の
光学系(図示せず)により集光された光を電気信号に変
換し、画像データとして多値画像を構成する各画素のR
GBアナログ信号を出力する。出力されたアナログ信号
は、A/D変換器102でデジタル信号に変換される。
デジタル信号は、ホワイトバランス調整器103でホワ
イトバランスが調整される。ホワイトバランスが調整さ
れた画像データは画素補間器104において各画素で情
報のないR、GまたはB信号の補間を行う。以降におい
てR、G、Bはそれぞれ赤色、緑色、青色または赤色の
信号値、緑色の信号値、青色の信号値をそれぞれ示すも
のとする。
The CCD 101 converts the light condensed by the optical system (not shown) of the digital camera 100 into an electric signal, and converts the R of each pixel constituting a multi-valued image as image data.
Outputs a GB analog signal. The output analog signal is converted into a digital signal by the A / D converter 102.
The white balance of the digital signal is adjusted by the white balance adjuster 103. For the image data whose white balance has been adjusted, the pixel interpolator 104 interpolates an R, G or B signal having no information at each pixel. Hereinafter, R, G, and B represent red, green, blue, or red signal values, green signal values, and blue signal values, respectively.

【0052】ここで、CCD101のフィルタと画素補
間器104の補間との関係について説明する。図2は、
CCD101の受光部の概念を示した概念図である。受
光部には一定のパタンでR、GおよびBのフィルタがか
けられており、このフィルタによって色の違いが識別さ
れる。なお、人間の目の感度が高い緑色Gの画素につい
ては、他の色のフィルタより多く配置する構成とするこ
とが通常である。添え字は位置(フィルタ番号)を識別
する識別子として使用している。なお、図では中心部分
のみフィルタ番号を付している。
Here, the relationship between the filter of the CCD 101 and the interpolation of the pixel interpolator 104 will be described. FIG.
FIG. 3 is a conceptual diagram illustrating a concept of a light receiving unit of the CCD 101. The R, G, and B filters are applied to the light receiving unit in a fixed pattern, and a difference between colors is identified by the filters. It should be noted that, in general, pixels of green G, which have high sensitivity to human eyes, are arranged more than filters of other colors. The subscript is used as an identifier for identifying the position (filter number). In the drawing, filter numbers are assigned only to the central part.

【0053】図2において、G0の位置における赤色R
の補間信号値R(G0)および青色Bの補間信号値B
(G0)は次式(1)のように算出される。 R(G0)=(R0+R2)/2 B(G0)=(B0+B1)/2 ‥‥(1)
In FIG. 2, the red R at the position G0
Interpolation signal value R (G0) and blue B interpolation signal value B
(G0) is calculated as in the following equation (1). R (G0) = (R0 + R2) / 2 B (G0) = (B0 + B1) / 2 {(1)

【0054】また、R0、B0の位置における緑色Gの
補間信号値G(R0)、B(R0)、G(B0)、R
(B0)は次式(2)のように算出される。 G(R0)=(G0+G1+G2+G5)/4 B(R0)=(B0+B1+B4+B5)/4 G(B0)=(G0+G1+G3+G6)/4 R(B0)=(R0+R2+R4+R5)/4‥‥(2) 画素補間器104は以上に表される補間を全画素位置で
行い、各画素について補間されたRGB信号値を出力す
る。
Further, the interpolation signal values G (R0), B (R0), G (B0), and R of the green G at the positions of R0 and B0.
(B0) is calculated as in the following equation (2). G (R0) = (G0 + G1 + G2 + G5) / 4 B (R0) = (B0 + B1 + B4 + B5) / 4 G (B0) = (G0 + G1 + G3 + G6) / 4 R (B0) = (R0 + R2 + R4 + R5) / 4 ‥‥ (2) Pixel interpolator 104 The above interpolation is performed at all pixel positions, and the interpolated RGB signal values are output for each pixel.

【0055】輝度生成器105は、補間された各画素か
ら輝度信号値Yを次式(3)により生成する。 Y=0.34R+0.55G+0.11B ‥‥(3) 式(3)を用いてデジタル値である輝度信号値を計算す
るには乗算器および加算器を必要とするが、式(3)を
次式(4)で近似することにより、輝度生成器105
は、加算器のみで構成することが可能となる。 Y=(2/8)R+(5/8)G+(1/8)B ‥‥(4) 従って、近似式(4)を用い輝度信号値を算出する場合
は、簡易な回路構成で輝度値Yを算出することが可能と
なり、回路コスト、演算速度、および消費電力において
優れたデジタルカメラの提供が可能となる。
The luminance generator 105 generates a luminance signal value Y from each interpolated pixel by the following equation (3). Y = 0.34R + 0.55G + 0.11B (3) A multiplier and an adder are required to calculate a luminance signal value which is a digital value using Expression (3). By approximating by equation (4), the luminance generator 105
Can be configured with only an adder. Y = (2/8) R + (5/8) G + (1/8) B (4) Therefore, when calculating the luminance signal value using the approximate expression (4), the luminance value is calculated using a simple circuit configuration. Y can be calculated, and a digital camera excellent in circuit cost, calculation speed, and power consumption can be provided.

【0056】なお、濃度値に基づいて二値化閾値を設定
する場合は、輝度信号の反転値(すなわち、階調レンジ
数−輝度値)を採用することができる。たとえば、A/
D変換器102で256値(0〜255)を出力する場
合に輝度信号値が200である場合には、濃度値は55
(255−200)となる。なお、この様な反転値を用
いることなく、別途RGB信号から濃度値を算出しても
よい。
When the binarization threshold is set based on the density value, an inverted value of the luminance signal (that is, the number of gradation ranges-luminance value) can be adopted. For example, A /
When the D converter 102 outputs 256 values (0 to 255) and the luminance signal value is 200, the density value is 55.
(255-200). The density value may be separately calculated from the RGB signals without using such an inverted value.

【0057】輝度信号値Yは、アパーチャ補正器106
により、画像データの高域部分が強調される。アパーチ
ャ補正は公知の5×5サイズの高域強調フィルタを使用
することにより行う。高域強調された輝度値信号はフレ
ームメモリ107に一時記憶される。
The luminance signal value Y is calculated by the aperture corrector 106
Thereby, the high-frequency portion of the image data is emphasized. The aperture correction is performed by using a well-known 5 × 5 size high-frequency emphasis filter. The high-frequency emphasized luminance value signal is temporarily stored in the frame memory 107.

【0058】CPU108は、ブロックサイズとサンプ
リング間隔(サンプリング周期)を計算し、また、以下
に説明するブロックバッファ109、平均輝度値算出器
120、その他のデジタルカメラ100の各回路、各部
位を制御する。多値画像はCCDの大きさ(画素数)に
より画像サイズが決まるので、CPU108は、画像サ
イズを基に多値画像を二値化するのに必要なブロックサ
イズと、サンプリング間隔(サンプリング周期)を計算
する。
The CPU 108 calculates a block size and a sampling interval (sampling cycle), and controls a block buffer 109, an average luminance value calculator 120, and other circuits and parts of the digital camera 100 described below. . Since the image size of the multi-valued image is determined by the size of the CCD (the number of pixels), the CPU 108 determines the block size necessary for binarizing the multi-valued image based on the image size and the sampling interval (sampling period). calculate.

【0059】デジタルカメラ100のレンズ等の光学系
に起因する輝度値ムラは、光源の位置や強さにより異な
るが、概して画像の中心付近が明るく、周辺にいくに従
って暗くなる傾向がある。従って、CPU108は、光
学系の周辺減光を考慮して画像の分割パタンを計算す
る。なお、記憶部(図示せず)などに設定されている一
定のブロック分割パタンから分割パタンを選択すること
もできる。
The unevenness of the luminance value due to the optical system such as the lens of the digital camera 100 differs depending on the position and the intensity of the light source, but generally, there is a tendency that the image is bright near the center of the image and darker toward the periphery. Therefore, the CPU 108 calculates the image division pattern in consideration of the vignetting of the optical system. Note that a division pattern can be selected from a certain block division pattern set in a storage unit (not shown) or the like.

【0060】図3は、多値画像をブロックに分割する分
割例を示した図である。通常の正方形分割に加え、図3
(a)は、正方形、長方形、三角形の組み合わせにより
画像の中心(レンズの中心)を点対称として多値画像を
分割した例を示している。一方、図3(b)は、画像の
中心から同心円に基づいて多値画像を分割した例であ
る。光学系を考慮してブロック分割することにより、ブ
ロック内の明るさが、より均一なものとなり、後述する
ようにブロック単位で二値化閾値を設定するので、高画
質な多値画像の二値化が可能となる。
FIG. 3 is a diagram showing an example of division of a multivalued image into blocks. In addition to the usual square division,
(A) shows an example in which a multivalued image is divided by a combination of a square, a rectangle, and a triangle with the center of the image (the center of the lens) being point-symmetric. On the other hand, FIG. 3B shows an example in which a multivalued image is divided from the center of the image based on concentric circles. By dividing the block in consideration of the optical system, the brightness in the block becomes more uniform, and the binarization threshold is set for each block as described later. Is possible.

【0061】なお、以下では説明の簡単のため正方形に
分割されたブロックを用いることとするが、あるブロッ
クの平均輝度値が隣接ブロックに比して異常に高い場合
には、白飛びが発生している可能性があるので、隣接ブ
ロックも含めて、ブロックの細分化を図り、白飛びの発
生している領域を適切に切り分けてブロックの再構築を
行ってもよい。以上のようなブロックを用いて画像を局
所的な画素集合に分割することにより高品質な二値画像
を得ることが可能となる。
In the following, for the sake of simplicity, a block divided into squares will be used. However, if the average luminance value of a certain block is abnormally high compared to that of an adjacent block, whiteout occurs. Since there is a possibility that the blocks may be divided, the blocks including the adjacent blocks may be subdivided, and the area where the whiteout occurs may be appropriately divided to reconstruct the blocks. By dividing an image into local pixel sets using the above blocks, a high-quality binary image can be obtained.

【0062】ブロックバッファ109は、CPU108
により決定されたブロックの分割パタンに基づいてブロ
ック単位で画像をフレームメモリ107から読み出し、
一時記憶する。なお、ブロックバッファ109に蓄えら
れたブロックを処理対象ブロックと称することとする。
The block buffer 109 includes a CPU 108
The image is read from the frame memory 107 in block units based on the block division pattern determined by
Remember temporarily. Note that the block stored in the block buffer 109 is referred to as a processing target block.

【0063】平均輝度値算出器120は、ブロックバッ
ファ109に蓄えられた画像から、予め設定されたサン
プリング周期で画素をサンプリングして、平均輝度値を
算出する。図4は、ブロック内の画素をサンプリングす
るサンプリング間隔の例を示した図である。図4(a)
は、CPU108が、画像サイズが1280×960画
素の画像に対して、ブロックサイズを64×64画素と
設定し、サンプリング周期を2とした様子を示す(図で
は1ブロック中の9×8画素のみを表示している)。一
方、図4(b)は、CPU108が、画像サイズが25
60×1920画素の画像に対して、ブロックサイズを
128×128画素と設定し、サンプリング周期を4と
した様子を示す(図では1ブロック中の9×8画素のみ
を表示している)。
The average luminance value calculator 120 samples pixels from the image stored in the block buffer 109 at a preset sampling period, and calculates an average luminance value. FIG. 4 is a diagram illustrating an example of a sampling interval for sampling pixels in a block. FIG. 4 (a)
Shows that the CPU 108 sets the block size to 64 × 64 pixels and sets the sampling period to 2 for an image having an image size of 1280 × 960 pixels (in the figure, only 9 × 8 pixels in one block). Is displayed). On the other hand, FIG. 4B shows that the CPU 108
A state in which the block size is set to 128 × 128 pixels and the sampling period is set to 4 for an image of 60 × 1920 pixels is shown (only 9 × 8 pixels in one block are shown in the figure).

【0064】CPU108は、消費電力を考慮した処理
能力に応じて、二値化する画像サイズに対するブロック
の総数あるいはブロック内のサンプリング間隔を一定に
設定することが可能である。従って、画像サイズが大き
くなっても(全画素数が多くなっても)、サンプリング
数を一定とすることができ、二値化閾値の決定までの処
理時間が短縮され、低消費電力で二値化処理が可能とな
る。なお、CPU108は、ブロック毎にサンプリング
間隔を設定してもよい。また、白飛びが発生しているよ
うなブロックに対しては、細かくサンプリングし直すよ
うにしてもよい。
The CPU 108 can set the total number of blocks or the sampling interval within a block to a binarized image size in accordance with the processing capacity in consideration of power consumption. Therefore, even if the image size is large (even if the number of all pixels is large), the number of samplings can be kept constant, the processing time until the determination of the binarization threshold is reduced, and the binary Conversion processing becomes possible. Note that the CPU 108 may set a sampling interval for each block. In addition, a block in which whiteout occurs may be finely resampled.

【0065】図5は、平均輝度値算出器120の構成の
一例を示したブロック図である。CPU108によりサ
ンプリングされた画素の輝度値(vとする)は、比較器
501において、後述する低輝度閾値(低輝度閾値th
l(i,j)とする((i,j)はブロックの番号を表
すインデックス、このブロックをB(i,j)とす
る))と比較される。比較器501は、サンプリングさ
れた画素の輝度値vが低輝度閾値thl(i,j)より
大きい場合は信号値1を、小さい場合は信号値0を出力
する。
FIG. 5 is a block diagram showing an example of the configuration of the average luminance value calculator 120. The luminance value (v) of the pixel sampled by the CPU 108 is output to a comparator 501 by a low luminance threshold (low luminance threshold th) described later.
1 (i, j) ((i, j) is an index indicating a block number, and this block is B (i, j)). The comparator 501 outputs a signal value 1 when the luminance value v of the sampled pixel is larger than the low luminance threshold thl (i, j), and outputs a signal value 0 when the luminance value v is smaller.

【0066】信号値1が出力された場合は、ゲート50
7が開き輝度値vが加算器506に入力する。加算器5
06は、加算結果レジスタ502の値(sumvとす
る)と、入力した画素の輝度値vとを加算し、加算結果
レジスタ502は新たな加算結果を記憶する。一方、比
較器501の信号1はカウンタ503へも伝達され、ゲ
ート507を通過した輝度値vの数(numとする)を
計数する。
When the signal value 1 is output, the gate 50
7 is opened and the luminance value v is input to the adder 506. Adder 5
In step 06, the value (sumv) of the addition result register 502 is added to the luminance value v of the input pixel, and the addition result register 502 stores a new addition result. On the other hand, the signal 1 of the comparator 501 is also transmitted to the counter 503, and counts the number of luminosity values v (referred to as num) passing through the gate 507.

【0067】以上に述べた処理をアルゴリズムとして数
式で表すと次式(5)のようになる。 if v>thl(i,j) then sumv=sumv+v num=num+1 else sumv=sumv num=num ・・・・(5)
When the above-described processing is expressed by an equation as an algorithm, the following equation (5) is obtained. if v> thl (i, j) then sumv = sumv + v num = num + 1 else sumv = sumv num = num (5)

【0068】ここで、カウンタ503が、インクリメン
トの結果、ケタが繰り上がる状態(カウンタが2のべき
乗を示す状態)になると、ゲート508が開き、加算結
果レジスタ502に保持されている輝度値vの和(su
mv)をシフトレジスタ504に伝達し、カウンタ50
3において‘1’がたっているビット位置−1だけ右に
シフトする。ブロック内の全画素について処理した後、
シフトレジスタ504に記憶された値が平均輝度値av
e(i,j)として出力される。すなわち、平均輝度値
は次式(6)で計算される。 ave(i,j)=sumv’/num’ ‥‥(6)
Here, when the counter 503 is incremented as a result of the increment (state where the counter indicates a power of 2), the gate 508 is opened and the luminance value v held in the addition result register 502 is read. Sum (su
mv) is transmitted to the shift register 504 and the counter 50
3 shifts to the right by the bit position -1 at which "1" is set. After processing all pixels in the block,
The value stored in the shift register 504 is the average luminance value av
Output as e (i, j). That is, the average luminance value is calculated by the following equation (6). ave (i, j) = sumv '/ num' (6)

【0069】ここで、num’はブロックB(i,j)
でサンプリングされたサンプル数以下の数値であって、
2のべき乗で表される数で最も大きな値を表し、sum
v’はnum’が計数されたときの加算結果レジスタ5
02に保持されている値を表す。
Here, num 'is the block B (i, j)
Is less than or equal to the number of samples sampled at
The largest value represented by a power of 2
v 'is the addition result register 5 when num' is counted.
02 represents the value held.

【0070】低輝度閾値設定器121は、隣接する前の
ブロック(現ブロックがB(i,j)であれば、たとえ
ば、B(i−1,j))の平均輝度値ave(i−1,
j)に所定の係数を乗算して平均輝度値算出器120で
使用する低輝度閾値thl(i,j)を算出する。所定
の係数をCa=1/4(2のべき乗分の1)とすると、
低輝度閾値設定器121は、ave(i,j)の下位2
ビットを除いた値となるので特別な回路が不要となり、
回路構成が単純となり、高速、低消費電力で処理を行う
ことが可能となる。以上に述べた計算式は次式(7)で
表すことができる。 thl(i,j)=ave(i−1,j)*Ca ‥‥(7)
The low-luminance threshold setting unit 121 outputs the average luminance value ave (i−1) of the immediately preceding block (if the current block is B (i, j), for example, B (i−1, j)). ,
j) is multiplied by a predetermined coefficient to calculate a low luminance threshold thl (i, j) used by the average luminance value calculator 120. Assuming that the predetermined coefficient is Ca = 1/4 (one power of 2),
The low-luminance threshold setting unit 121 determines the lower two levels of ave (i, j).
No special circuit is required because the value is the value excluding the bit,
The circuit configuration becomes simple, and processing can be performed at high speed and with low power consumption. The calculation formula described above can be represented by the following formula (7). thl (i, j) = ave (i-1, j) * CaCa (7)

【0071】ここでは、低輝度閾値thlを算出する際
に、隣接する1ブロックのみの平均輝度値aveを使用
したが、ブロック分割の仕方によっては、隣接するすべ
て(たとえば上下左右)のブロックの平均輝度値ave
を使用する態様であってもよい。
Here, when calculating the low luminance threshold thl, the average luminance value ave of only one adjacent block is used. However, depending on how the blocks are divided, the average of all adjacent (for example, up, down, left, and right) blocks is used. Luminance value ave
May be used.

【0072】二値化閾値設定回路122は、平均輝度値
算出器120で算出された平均輝度値ave(i,j)
を用いて、多値画像の二値化に使用する二値化閾値TH
(i,j)を設定する。図6は、二値化閾値設定回路の
一構成例を示した説明図である。二値化閾値設定回路1
22は、加算減算器601と、乗算除算器602と、比
較器603と、セレクタ604とを有する。
The binarization threshold value setting circuit 122 calculates the average luminance value ave (i, j) calculated by the average luminance value calculator 120.
Is used for binarization of a multi-valued image,
(I, j) is set. FIG. 6 is an explanatory diagram showing one configuration example of the binarization threshold setting circuit. Binary threshold setting circuit 1
22 includes an addition / subtraction unit 601, a multiplication / division unit 602, a comparator 603, and a selector 604.

【0073】加算減算器601は、ave(i,j)か
ら定数Cm(但しCmは正の値とする)を減算する。こ
こでは、Cm>0としたので減算を行うが、使用の態様
によっては定数Cmを負の値として加算減算器601で
加算を行ってもよい。
The addition / subtraction unit 601 subtracts a constant Cm (Cm is a positive value) from ave (i, j). Here, the subtraction is performed because Cm> 0, but the addition and subtraction unit 601 may add the constant Cm as a negative value depending on the use mode.

【0074】乗算除算器602は、ave(i,j)と
定数Cb(但しCbは正の値であって1未満とする)の
乗算が行われる。ここでは1>Cb>0としたので乗算
を行うが、使用の態様によっては定数Cb>1として乗
算除算器602で除算を行ってもよい。
The multiplication / divider 602 multiplies ave (i, j) by a constant Cb (where Cb is a positive value and less than 1). Here, since 1>Cb> 0, the multiplication is performed. However, depending on the mode of use, the division may be performed by the multiplier / divider 602 with the constant Cb> 1.

【0075】比較器603は、ave(i,j)と所定
の値(比較値)Athとの比較を行い、ave(i,
j)がAthより大きければ、セレクタ604が加算減
算器601の結果を選択しTH(i,j)を出力する。
反対に、ave(i,j)がAthより小さければ、セ
レクタ604が乗算除算器602の結果を選択しTH
(i,j)を出力する。
The comparator 603 compares ave (i, j) with a predetermined value (comparison value) Ath, and outputs ave (i, j).
If j) is greater than Ath, selector 604 selects the result of addition / subtraction unit 601 and outputs TH (i, j).
Conversely, if ave (i, j) is smaller than Ath, selector 604 selects the result of multiplication / divider 602 and sets TH
(I, j) is output.

【0076】比較値Athは定数としてもよいが、周囲
のブロックに基づいて決定してもよい。たとえば、隣接
するブロックBの輝度値の平均の1.5倍をAthに設
定してもよい。この様に周囲のブロックの輝度値に基づ
いてAthを決定することにより、着目しているブロッ
クBの輝度値が突出しているか、すなわち、着目してい
るブロックBに白飛びが発生しているか否かの判定が容
易となり、高品質な二値化が可能となる。
The comparison value Ath may be a constant or may be determined based on surrounding blocks. For example, 1.5 times the average of the luminance values of adjacent blocks B may be set as Ath. By determining Ath based on the luminance values of the surrounding blocks in this way, it is determined whether the luminance value of the block B of interest is prominent, that is, whether or not whiteout has occurred in the block B of interest. This makes it easy to determine whether or not the binarization is of high quality.

【0077】以上説明したように、二値化閾値設定回路
122では、白飛びしているような領域に対しては定数
Cmをもちいてave(i,j)を減算してTHが算出
され、白飛びのない通常の領域に対してはCbが乗算さ
れてTHが算出される。この様な2つの処理を切り替え
る理由は白飛びのコントラストが変化することに基づ
く。すなわち、通常の画像では文字と背景のコントラス
トの比は、信号レベルによらず略一定である。従って、
通常の画像に対しては乗算除算器602だけで二値化閾
値設定回路122を構成することができる。
As described above, in the binarization threshold value setting circuit 122, TH is calculated by subtracting ave (i, j) using the constant Cm for an area that is overexposed. TH is calculated by multiplying Cb with respect to a normal area without overexposure. The reason for switching between these two processes is based on the change in the contrast of overexposed areas. That is, in a normal image, the contrast ratio between the character and the background is substantially constant regardless of the signal level. Therefore,
For a normal image, the binarization threshold value setting circuit 122 can be constituted only by the multiplier / divider 602.

【0078】一方、白飛びが起こっているような画像で
は文字と背景のコントラストの比が小さくなると同時に
平均輝度値aveが大きくなるという特徴がある。従っ
て、このような領域では、適切に二値化するためには平
均輝度値aveに近い二値化閾値THを採用ないし設定
する必要がある。しかしながら、aveにCbを単に乗
算するだけでは、平均輝度値aveが大きくなるにした
がって、二値化閾値THと平均輝度値aveとの差が広
がってしまうこととなる。すなわち、乗算除算器602
のみでは、表面反射がある場合には、画像が正しく二値
化されなくなるという結果になる。
On the other hand, an image in which whiteout occurs is characterized in that the ratio of the contrast between the character and the background is reduced and, at the same time, the average luminance value ave is increased. Therefore, in such a region, it is necessary to adopt or set a binarization threshold TH close to the average luminance value ave in order to appropriately binarize. However, simply multiplying ave by Cb will increase the difference between the binarization threshold TH and the average luminance value ave as the average luminance value ave increases. That is, the multiplier / divider 602
If only the surface reflection occurs, the image will not be correctly binarized.

【0079】これを避けるために、実施の形態1の二値
化閾値設定回路122では、表面反射がある場合(つま
り、平均輝度値aveが大きい場合)に対応すべく、二
値化閾値THと平均輝度値aveの差が相対的に小さく
なるように加算減算器601を備え、平均輝度値ave
の大きさにより閾値THを選択できるようにしているの
である。
In order to avoid this, the binarization threshold value setting circuit 122 of the first embodiment sets the binarization threshold value TH so as to cope with the case where there is surface reflection (that is, the case where the average luminance value ave is large). An adder / subtractor 601 is provided so that the difference between the average luminance values ave is relatively small.
The threshold value TH can be selected according to the magnitude of the threshold value.

【0080】なお、画像信号の属性が濃度信号の場合に
は、平均濃度値(便宜上aveと表記する)が所定の比
較値(便宜上Athとする)より大きければ、加算減算
器601が選択される。ここでは、aveに所定係数C
mが加算されて二値化閾値(便宜上THとする)が決定
される。反対に、aveがAthより小さければ、乗算
除算器602が選択され、aveに所定係数Cb(1>
Cb)が乗算された二値化閾値THが決定される。
When the attribute of the image signal is a density signal, if the average density value (denoted as ave for convenience) is larger than a predetermined comparison value (Ath for convenience), the addition / subtraction unit 601 is selected. . Here, ave is a predetermined coefficient C
m is added to determine a binarization threshold (TH for convenience). Conversely, if ave is smaller than Ath, the multiplier / divider 602 is selected, and the predetermined coefficient Cb (1>
The binarization threshold TH multiplied by Cb) is determined.

【0081】なお、所定の係数CbをCb=x/16、
あるいはCb=x/8(xは分母を超えない自然数を表
す既定値)とすれば、乗算除算器602の回路構成が単
純となり、高速、低消費電力で処理を行うことが可能と
なる。
Note that the predetermined coefficient Cb is represented by Cb = x / 16,
Alternatively, if Cb = x / 8 (x is a default value representing a natural number not exceeding the denominator), the circuit configuration of the multiplier / divider 602 becomes simple, and processing can be performed at high speed and with low power consumption.

【0082】二値化器123は、ブロックバッファ10
9の各画素を二値化閾値THと比較し二値化する。二値
化された画像は、圧縮器124でMH、MR等の二値画
像に適した画像圧縮がなされる。圧縮された画像は、画
像記憶メモリ125に記憶される。
The binarizer 123 is provided in the block buffer 10
Each of the nine pixels is compared with a binarization threshold value TH and binarized. The binarized image is subjected to image compression suitable for a binary image such as MH or MR by the compressor 124. The compressed image is stored in the image storage memory 125.

【0083】次に、多値画像が二値化されるまでの処理
の流れを説明する。図7は、多値画像が二値化されるま
での画像データの処理流れを示したフローチャートであ
る。CPU108は、フレームメモリ107に格納され
ている多値画像のサイズを読み出す(ステップS70
1)。なお、フレームメモリ107からでなく、デジタ
ルカメラ100で予め設定された画素数もしくはCCD
101からの情報等を用いてもよい。続いて、CPU1
08は画像サイズに従って、サンプリング周期を設定す
る(ステップS702)。
Next, the flow of processing until a multi-valued image is binarized will be described. FIG. 7 is a flowchart showing a processing flow of image data until a multi-value image is binarized. The CPU 108 reads out the size of the multi-valued image stored in the frame memory 107 (step S70).
1). Note that the number of pixels or CCD set in advance in the digital camera 100, not from the frame memory 107,
The information from 101 may be used. Then, CPU1
08 sets the sampling period according to the image size (step S702).

【0084】ステップS701で読み出した画像サイズ
やステップS702で設定したサンプリング周期をもと
に、CPU108はブロックサイズ、形状、分割パタン
を設定する(ステップS703)。CCD101で出力
される画素数は通常一定であるか、モード切替により指
定される640×480画素や800×600画素等の
定格画素数であるので、CPU108は、サンプリング
周期やブロック形状を予め決定しておいたものを選択す
ることもできる。
Based on the image size read in step S701 and the sampling period set in step S702, the CPU 108 sets the block size, shape, and division pattern (step S703). Since the number of pixels output from the CCD 101 is usually constant or a rated number of pixels such as 640 × 480 pixels or 800 × 600 pixels specified by mode switching, the CPU 108 determines a sampling period and a block shape in advance. You can also select what you have saved.

【0085】続いて、複数に分割されたブロックから一
つのブロックB(i,j)を設定し、ブロックバッファ
109に画像情報を転写する(ステップS704)。ブ
ロックB(i,j)のなかから、ステップS702で設
定したサンプリング周期に従って、画素(輝度値)をサ
ンプリングする(ステップS705)。続いて、以前の
ルーチンで算出されている隣接するブロックB(i−
1,j)の平均輝度値ave(i−1,j)に基づい
て、ブロックB(i,j)についての低輝度閾値thl
(i,j)を算出し、サンプリングした画素の輝度値の
うち低輝度閾値thl(i,j)に満たない輝度値を除
外する(ステップS706)。ステップS706で低輝
度値を除外することは、高品質な二値化処理に資するこ
とになる。
Subsequently, one block B (i, j) is set from the plurality of divided blocks, and the image information is transferred to the block buffer 109 (step S704). Pixels (luminance values) are sampled from the block B (i, j) in accordance with the sampling period set in step S702 (step S705). Subsequently, the adjacent block B (i-
Based on the average luminance value ave (i−1, j) of (1, j), the low luminance threshold thl for the block B (i, j)
(I, j) is calculated, and a luminance value less than the low luminance threshold thl (i, j) is excluded from the luminance values of the sampled pixels (step S706). Excluding low luminance values in step S706 contributes to high-quality binarization processing.

【0086】低輝度値が除外された輝度値を用いて、ブ
ロックB(i,j)の平均輝度値ave(i,j)を算
出する(ステップS707)。この平均輝度値ave
(i,j)に基づいてブロックB(i,j)に対する二
値化閾値TH(i,j)を算出するルーチンに移行する
(ステップS708)。このルーチンの内容については
後述する。ステップS708で算出された二値化閾値T
H(i,j)を用いて、ブロックバッファ109に格納
されているブロックB(i,j)の全画素(g(x,
y)とする)を二値化する(ステップS709)。な
お、x、yはブロック内の各画素の位置を表す自然数で
ある。
The average luminance value ave (i, j) of the block B (i, j) is calculated using the luminance value from which the low luminance value has been excluded (step S707). This average luminance value ave
The process proceeds to a routine for calculating the binarization threshold value TH (i, j) for the block B (i, j) based on (i, j) (step S708). The contents of this routine will be described later. The binarization threshold T calculated in step S708
Using H (i, j), all pixels (g (x, j) of block B (i, j) stored in block buffer 109
y)) is binarized (step S709). Note that x and y are natural numbers indicating the position of each pixel in the block.

【0087】最後に、すべてのブロックについて二値化
処理を行ったか否かを判定し(ステップS710)、す
べてのブロックの二値化が終了した場合(ステップS7
10:YES)は処理を終了し、すべてのブロックの二
値化が終了していない場合(ステップS710:NO)
は、B(i,j)に隣接するブロックを設定し(たとえ
ばB(i+1,j))、ステップS704からステップ
S710までを繰り返す。
Finally, it is determined whether or not the binarization processing has been performed for all the blocks (step S710), and when the binarization of all the blocks has been completed (step S7).
10: YES), the process ends, and when the binarization of all blocks has not ended (step S710: NO)
Sets a block adjacent to B (i, j) (for example, B (i + 1, j)) and repeats steps S704 to S710.

【0088】ここで、ステップS708の二値化閾値算
出ルーチンについて説明する。図8は、二値化閾値算出
ルーチンの処理流れの一例を示したフローチャートであ
る。まず、比較器603は、平均輝度値ave(i,
j)を比較値Athと比較する(ステップS801)。
平均輝度値ave(i,j)が比較値Athより大きけ
れば(ステップS801:YES)、加算減算器601
で二値化閾値TH(i,j)=ave(i,j)−Cm
を計算する(ステップS802)。
Here, the binarization threshold value calculation routine of step S708 will be described. FIG. 8 is a flowchart illustrating an example of the processing flow of the binarization threshold value calculation routine. First, the comparator 603 outputs the average luminance value ave (i,
j) is compared with the comparison value Ath (step S801).
If the average luminance value ave (i, j) is larger than the comparison value Ath (step S801: YES), the addition / subtraction unit 601 is used.
And the binarization threshold TH (i, j) = ave (i, j) -Cm
Is calculated (step S802).

【0089】一方、平均輝度値ave(i,j)がAt
hより大きくなければ(ステップS801:NO)、乗
算除算器602で二値化閾値TH(i,j)=ave
(i,j)*Cbを計算する(ステップS803)。な
お、ここでは、画像信号の属性が輝度信号であることを
前提としたので−Cm(Cm>0)、Cbは1未満とし
たが、画像信号の属性が濃度信号である場合には+Cm
(Cm>0)、Cbは1より大きな値とする。
On the other hand, if the average luminance value ave (i, j) is At
If h is not larger than h (step S801: NO), the multiplication / division unit 602 sets the binarization threshold value TH (i, j) = ave.
(I, j) * Cb is calculated (step S803). Here, since it is assumed that the attribute of the image signal is a luminance signal, −Cm (Cm> 0) and Cb are less than 1. However, when the attribute of the image signal is a density signal, + Cm is set.
(Cm> 0), Cb is a value larger than 1.

【0090】なお、以上の例では主として輝度値を用い
て説明したが、輝度値と相関の強い物理量も輝度値と同
様に扱うことができる。この様な物理量として、たとえ
ば、光量、測光値、露出値、明度、彩度等が挙げられ
る。
In the above example, description has been made mainly using luminance values. However, physical quantities having a strong correlation with luminance values can be handled in the same manner as luminance values. Such physical quantities include, for example, light quantity, photometric value, exposure value, lightness, saturation, and the like.

【0091】実施の形態1では、本発明の画像二値化装
置をデジタルカメラに適用した例について説明した。こ
のデジタルカメラは、白飛びのない領域では通常の二値
化閾値設定処理を行い、白飛びが起こる高輝度領域で
は、輝度が高くなるにしたがって相対的に平均輝度値と
の差が小さくなるような二値化閾値を設定するので、高
品質に画像を二値化することが可能となる。また、二値
化閾値THを算出する際に使用する平均輝度値算出器の
処理を高速かつ低消費電力でできるので、実施の形態1
のデジタルカメラは、高速・低消費電力で高品質な二値
化処理が可能となる。
In the first embodiment, an example in which the image binarizing device of the present invention is applied to a digital camera has been described. This digital camera performs a normal binarization threshold setting process in an area where there is no overexposure, and in a high luminance area where overexposure occurs, the difference from the average luminance value becomes relatively smaller as the luminance increases. Since such a binarization threshold is set, it is possible to binarize an image with high quality. In addition, the processing of the average luminance value calculator used when calculating the binarization threshold value TH can be performed at high speed and with low power consumption.
Digital cameras can perform high-quality binarization processing with high speed and low power consumption.

【0092】(実施の形態2)実施の形態2では、CM
OSセンサを使用した画像二値化装置をデジタルカメラ
に適用した場合について説明する。図9は、画像入力部
分にCMOSセンサを使用したデジタルカメラにおい
て、画像入力から二値化処理をした画像を記録するまで
の装置構成の一例を示したブロック図である。なお、本
実施の形態では、実施の形態1と同様な部分については
同一の符号を付してその詳細な説明を省略するものと
し、実施の形態1と異なる部分を主として説明する。
(Embodiment 2) In Embodiment 2, the CM
A case where an image binarizing device using an OS sensor is applied to a digital camera will be described. FIG. 9 is a block diagram showing an example of a device configuration from the input of an image to the recording of a binarized image in a digital camera using a CMOS sensor for an image input portion. In the present embodiment, the same parts as those in the first embodiment are denoted by the same reference numerals, and detailed description thereof will be omitted. The different parts from the first embodiment will mainly be described.

【0093】デジタルカメラ900は画像入力部にCM
OSセンサ901を有する。従って、ラスター走査しか
できないCCD101(図1参照)と異なり、CMOS
センサ901はランダムアクセスが可能で、ブロック単
位での読み出しができるので、フレームメモリ107が
不要となり、回路構成が簡単となる。さらに、CCD1
01はデジタルカメラ900の他の回路を成すCMOS
集積回路とは別の電源を必要とするのに対し、CMOS
センサ901はCMOS集積回路と同じ電源を使用で
き、消費電力も小さくなる。従って、デジタルカメラ9
00としての回路規模も小さくなるため、消費電力、処
理速度、コストなどにおいて、CCDを使用したシステ
ムより利便性が高い。なお、本実施の形態ではCMOS
センサを用いたが、その他のブロックアクセス可能な画
像入力部を有する画像二値化装置であってもよい。
The digital camera 900 has a CM
An OS sensor 901 is provided. Therefore, unlike the CCD 101 (see FIG. 1) that can only perform raster scanning,
Since the sensor 901 can perform random access and can perform reading in block units, the frame memory 107 becomes unnecessary, and the circuit configuration is simplified. Furthermore, CCD1
01 is a CMOS which forms another circuit of the digital camera 900.
In addition to requiring a separate power supply from the integrated circuit, CMOS
The sensor 901 can use the same power supply as that of the CMOS integrated circuit, and consumes less power. Therefore, the digital camera 9
Since the circuit scale as 00 is small, the power consumption, processing speed, cost, and the like are more convenient than a system using a CCD. In this embodiment, the CMOS
Although a sensor is used, an image binarizing device having an image input unit capable of accessing other blocks may be used.

【0094】(実施の形態3)実施の形態3では、所定
ブロック内の画素毎に適用される二値化閾値を算出し、
画素毎に画像データの二値化を行う画像二値化装置をデ
ジタルカメラに適用した場合について説明する。図10
は、画素毎に適用される二値化閾値を算出し、画素毎に
画像データの二値化を行うデジタルカメラの装置構成の
一例を示したブロック図である。なお、本実施の形態で
は、実施の形態1と同一の構成部分については同一の符
合を付してその説明を省略し、実施の形態1と異なる部
分を主として説明する。
(Embodiment 3) In Embodiment 3, a binarization threshold applied to each pixel in a predetermined block is calculated.
A case will be described in which an image binarization device that binarizes image data for each pixel is applied to a digital camera. FIG.
FIG. 2 is a block diagram showing an example of a device configuration of a digital camera that calculates a binarization threshold applied to each pixel and binarizes image data for each pixel. In the present embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and description thereof will be omitted, and portions different from the first embodiment will be mainly described.

【0095】デジタルカメラ1000は、平均輝度値算
出器120から出力された平均輝度値を入力し、ブロッ
ク毎に適用する二値化閾値(以降においてブロック二値
化閾値と称する)を出力するブロック二値化閾値設定回
路1001と、ブロック二値化閾値を格納するメモリ1
002と、ブロック二値化閾値に基づいて、所定ブロッ
ク内の個々の画素に適用する二値化閾値を設定する二値
化閾値補間器1003と、を備え、それ以外の構成部分
については、実施の形態1のデジタルカメラ100と、
同様の構成を有する。なお、色差信号を生成する部分は
省略してある。
The digital camera 1000 receives the average luminance value output from the average luminance value calculator 120 and outputs a binary threshold value (hereinafter, referred to as a block binary threshold value) applied to each block. A threshold value setting circuit 1001 and a memory 1 for storing a block threshold value
002, and a binarization threshold interpolator 1003 for setting a binarization threshold to be applied to each pixel in a predetermined block based on the block binarization threshold. A digital camera 100 according to the first aspect,
It has a similar configuration. Note that a portion for generating a color difference signal is omitted.

【0096】図11は、ブロック二値化閾値設定回路1
001の一構成例を示した説明図である。ブロック二値
化閾値設定回路1001は、乗算除算器1011と、係
数メモリ1012とを有する。ブロック二値化閾値設定
回路1001は、処理対象ブロックのブロック二値化閾
値をメモリ1002に出力する。
FIG. 11 shows a block binarization threshold setting circuit 1.
001 is an explanatory diagram showing one configuration example. FIG. The block binarization threshold setting circuit 1001 includes a multiplication / divider 1011 and a coefficient memory 1012. The block binarization threshold setting circuit 1001 outputs the block binarization threshold of the processing target block to the memory 1002.

【0097】乗算除算器1011は、平均輝度値ave
(i,j)に係数Cbを乗算する。係数メモリ1012
は、乗算除算器1011で使用する係数を格納する。こ
の係数Cbは、平均輝度値aveの大きさに従って値が
異なっている。図12(a)は、係数メモリ1012に
格納されている係数例を示した説明図である。図示した
ように、Cbは、平均輝度値aveが大きくなるにした
がって1に近づくように大きくなっている。
The multiplier / divider 1011 calculates the average luminance value ave
(I, j) is multiplied by a coefficient Cb. Coefficient memory 1012
Stores the coefficient used in the multiplication / division unit 1011. The value of the coefficient Cb differs according to the magnitude of the average luminance value ave. FIG. 12A is an explanatory diagram showing an example of coefficients stored in the coefficient memory 1012. As illustrated, Cb increases so as to approach 1 as the average luminance value ave increases.

【0098】この様な係数Cbを用いることにより、高
輝度領域でのブロック二値化閾値THを平均輝度値av
eから大きくずれないようにすることができ、白飛びが
発生しているような領域でも、高品質な二値化が可能と
なる。なお、ここでは1>Cb>0としたので乗算を行
うが、使用の態様によっては定数Cbを>1として乗算
除算器1011で除算を行ってもよい。
By using such a coefficient Cb, the block binarization threshold value TH in the high-luminance area is set to the average luminance value av
e can be prevented from greatly deviating from e, and high-quality binarization can be performed even in an area where whiteout occurs. Here, since 1>Cb> 0, the multiplication is performed. However, depending on the use mode, the division may be performed by the multiplication / divider 1011 with the constant Cb being> 1.

【0099】なお、ブロック二値化閾値の設定に際し、
濃度値を用いる場合には、図12(b)に示したような
係数Cbテーブルを用いればよい。図示したように、係
数Cbは、濃度値(便宜的にaveとする)が小さなほ
ど1以上の大きな値となっている。この係数Cbを用い
ることにより、低濃度領域でのブロック二値化閾値TH
を平均濃度値aveから大きくずれないようにすること
ができ、白飛びが発生しているような領域でも、高品質
な二値化が可能となる。
When setting the block binarization threshold,
When a density value is used, a coefficient Cb table as shown in FIG. 12B may be used. As shown in the figure, the coefficient Cb has a larger value of 1 or more as the density value (ave for convenience) is smaller. By using this coefficient Cb, the block binarization threshold value TH in the low density region is obtained.
Can be prevented from greatly deviating from the average density value ave, and high-quality binarization can be performed even in an area where whiteout occurs.

【0100】なお、ブロック二値化閾値設定回路100
1では、加算減算器を設けていないため、回路構成が単
純となるが、使用の態様によっては、ブロック二値化閾
値設定回路1001として実施の形態1に示した二値化
閾値設定回路122(図1参照)を採用してもよい。ま
た、後述する実施の形態(たとえば、実施の形態7)よ
うにブロック二値化閾値設定回路1001として加算減
算器のみを採用し、乗算除算器を用いないような構成と
してもよい。
The block binarization threshold setting circuit 100
In No. 1, the addition / subtraction unit is not provided, so that the circuit configuration is simple. However, depending on the use mode, the binarization threshold setting circuit 122 (shown in Embodiment 1 as the block binarization threshold setting circuit 1001) 1 (see FIG. 1). Further, as in an embodiment to be described later (for example, Embodiment 7), a configuration may be adopted in which only an addition / subtraction unit is used as the block binarization threshold value setting circuit 1001 and no multiplication / division unit is used.

【0101】メモリ1002は、ブロック二値化閾値設
定回路1001から出力されたすべてのブロック二値化
閾値を順次格納する。
The memory 1002 sequentially stores all block binarization thresholds output from the block binarization threshold setting circuit 1001.

【0102】二値化閾値補間器1003は、メモリ10
02に格納された全ブロックのブロック二値化閾値をも
ちいて、所定領域の各画素毎に適用する二値化閾値を設
定する。なお、以降の説明では、補間ブロックとは、そ
の構成画素それぞれに二値化閾値を設定する所定領域を
いうものとする。ここで、補間ブロック内の各画素に適
用する二値化閾値の算出の概要を説明する。図13は、
補間ブロック内の各画素に適用する二値化閾値を算出す
る概要を説明する説明図であり、同図(a)は、処理対
象ブロックと補間ブロックとの関係を示した図であり、
同図(b)は、補間ブロック内の各画素に適用する二値
化閾値を算出する説明図である。
The binary threshold value interpolator 1003 is
A binarization threshold to be applied to each pixel in a predetermined area is set using the block binarization thresholds of all the blocks stored in 02. In the following description, an interpolation block refers to a predetermined region in which a binarization threshold is set for each of its constituent pixels. Here, the outline of the calculation of the binarization threshold applied to each pixel in the interpolation block will be described. FIG.
It is an explanatory view for explaining an outline of calculating a binarization threshold applied to each pixel in an interpolation block, and FIG. 12A is a diagram showing a relationship between a processing target block and an interpolation block;
FIG. 7B is an explanatory diagram for calculating a binarization threshold value applied to each pixel in the interpolation block.

【0103】図13(a)から明らかなように、補間ブ
ロックBHは、隣接する4つの処理対象ブロックBa、
Bb、BcおよびBdにまたがっている。処理対象ブロ
ックBa、Bb、Bc、Bdのブロック二値化閾値をそ
れぞれa、b、c、dとする。二値化閾値補間器100
3は、ブロック二値化閾値a、b、cおよびdをもちい
て、補間ブロックBH内の各画素に適用する二値化閾値
を計算する。
As is clear from FIG. 13A, the interpolation block BH is composed of four adjacent processing target blocks Ba,
It spans Bb, Bc and Bd. Let the block binarization thresholds of the processing target blocks Ba, Bb, Bc, Bd be a, b, c, d, respectively. Binarization threshold interpolator 100
3 calculates a binarization threshold applied to each pixel in the interpolation block BH using the block binarization thresholds a, b, c, and d.

【0104】図13(b)を参照して、補間ブロックB
H内の画素bpに適用する二値化閾値の算出方法を説明
する。補間ブロックBHは長方形であるとして、その大
きさ(画素数)を水平方向にxbnum、垂直方向にy
bnumとする。また、画素bpの位置を(m,l)と
する。このとき、補間ブロックBHの(0,0)点に値
a、(xbnum,0)点に値b、(0,ybnum)
点に値c、(xbnum,ybnum)点に値dがある
と考え、この間を線形に近似する。
Referring to FIG. 13B, interpolation block B
A method of calculating a binarization threshold applied to the pixel bp in H will be described. Assuming that the interpolation block BH is a rectangle, its size (the number of pixels) is xbnum in the horizontal direction and y in the vertical direction.
bnum. Further, the position of the pixel bp is (m, l). At this time, the value a at the (0,0) point, the value b at the (xbnum, 0) point, and (0, ybnum) of the interpolation block BH.
It is assumed that there is a value c at the point and a value d at the (xbnum, ybnum) point, and the interval is linearly approximated.

【0105】まず、補間ブロックBHの左側の境界線上
の暫定的な閾値をleftth、右側の境界線上の暫定
的な閾値をrightthとすると、下式(9) leftth =(a(ybnum−l)+cl)/ybnum rightth=(b(ybnum−l)+dl)/ybnum‥‥(9) と計算される。次に、(0,l)点に値leftth、
(xbnum,l)点に値rightthがあると考
え、画素bpに適用する二値化閾値th(m,l)を下
式(10)の様に線形に近似する。 th(m,l)=(leftth(xbnum−m) +rightth×m)/xbnum ‥‥(10)
First, assuming that the provisional threshold value on the left boundary line of the interpolation block BH is leftth and the provisional threshold value on the right boundary line is rightth, the following equation (9) leftth = (a (ybnum−1) + cl) ) / Ybnum rightth = (b (ybnum−1) + dl) / ybnum ‥‥ (9) Next, at the (0, l) point, the value leftth,
Considering that the value rightth is at the (xbnum, l) point, the binarization threshold th (m, l) applied to the pixel bp is linearly approximated as in the following equation (10). th (m, l) = (left (xbnum-m) + rightth × m) / xbnum {(10)

【0106】なお、補間ブロックBHが画像全体の端部
にある場合には、隣接する処理対象ブロックが2つもし
くは1つであるので、この場合は、得られたブロック二
値化閾値を足りないブロック二値化閾値に代入して使用
することにより、式(9)および(10)が使用でき
る。たとえば、画像の左上端では、得られるブロック二
値化閾値はdのみで、a、b、cに該当するブロック二
値化閾値は得られない。従って、この場合は、a、b、
cの値をdで代用する。
When the interpolation block BH is located at the end of the entire image, the number of adjacent blocks to be processed is two or one. In this case, the obtained block binarization threshold value is not sufficient. Equations (9) and (10) can be used by substituting and using the block binarization threshold. For example, at the upper left corner of the image, the obtained block binarization threshold is only d, and the block binarization threshold corresponding to a, b, and c cannot be obtained. Therefore, in this case, a, b,
Substitute the value of c with d.

【0107】二値化器123では、フレームメモリ10
7もしくはブロックバッファ109から補間ブロックに
おける画素bpの輝度値と、二値化閾値補間器1003
で算出した画素bpに対する二値化閾値とを比較して、
補間ブロックBHの輝度値の二値化を行う。二値化され
た画像データは、実施の形態1と同様に、圧縮器124
でMH、MMRなどの二値化画像に適した画像圧縮がほ
どこされる。
In the binarizer 123, the frame memory 10
7 or the luminance value of the pixel bp in the interpolation block from the block buffer 109 and the binarization threshold value interpolator 1003
Is compared with the binarization threshold value for the pixel bp calculated in
The luminance value of the interpolation block BH is binarized. The binarized image data is supplied to the compressor 124 as in the first embodiment.
Then, image compression suitable for binarized images such as MH and MMR is performed.

【0108】次に、本実施の形態において、多値画像が
二値化されるまでの処理の流れについて説明する。図1
4は、多値画像が二値化されるまでの画像データの処理
流れを示したフローチャートである。CPU108は、
フレームメモリ107に格納されている多値画像のサイ
ズを読み出す(ステップS1401)。なお、フレーム
メモリ107からでなく、デジタルカメラ1000で予
め設定された画素数もしくはCCD101からの情報等
を用いてもよい。続いて、CPU108は画像サイズに
従って、サンプリング周期を設定する(ステップS14
02)。
Next, a description will be given of a flow of processing until a multi-value image is binarized in the present embodiment. FIG.
FIG. 4 is a flowchart showing a processing flow of image data until a multi-value image is binarized. The CPU 108
The size of the multi-valued image stored in the frame memory 107 is read (step S1401). Instead of using the frame memory 107, the number of pixels preset in the digital camera 1000 or information from the CCD 101 may be used. Subsequently, the CPU 108 sets a sampling period according to the image size (step S14).
02).

【0109】ステップS1401で読み出した画像サイ
ズやステップS1402で設定したサンプリング周期を
もとに、CPU108はブロックサイズ、形状、分割パ
タンを設定する(ステップS1403)。CCD101
で出力される画素数は通常一定であるか、モード切替に
より指定される640×480画素や800×600画
素等の定格画素数であるので、CPU108は、サンプ
リング周期やブロック形状を予め決定しておいたものを
選択することもできる。
Based on the image size read in step S1401 and the sampling period set in step S1402, the CPU 108 sets the block size, shape, and division pattern (step S1403). CCD101
Since the number of pixels output in is normally constant or the rated number of pixels such as 640 × 480 pixels or 800 × 600 pixels specified by mode switching, the CPU 108 determines the sampling period and block shape in advance. You can also choose what you put.

【0110】続いて、複数に分割されたブロックから一
つのブロックB(i,j)を設定し、ブロックバッファ
109に画像情報を転写する(ステップS1404)。
ブロックB(i,j)のなかから、ステップS1402
で設定したサンプリング周期に従って、画素(輝度値)
をサンプリングする(ステップS1405)。続いて、
以前のルーチンで算出されている隣接するブロックB
(i−1,j)の平均輝度値ave(i−1,j)に基
づいて、ブロックB(i,j)についての低輝度閾値t
hl(i,j)を算出し、サンプリングした画素の輝度
値のうち低輝度閾値thl(i,j)に満たない輝度値
を除外する(ステップS1406)。ステップS140
6で低輝度値を除外することは、高品質な二値化処理に
資することになる。
Subsequently, one block B (i, j) is set from the plurality of divided blocks, and the image information is transferred to the block buffer 109 (step S1404).
Step S1402 from block B (i, j)
Pixel (brightness value) according to the sampling cycle set in
Is sampled (step S1405). continue,
The adjacent block B calculated in the previous routine
Based on the average luminance value ave (i−1, j) of (i−1, j), the low luminance threshold t for the block B (i, j)
hl (i, j) is calculated, and a luminance value less than the low luminance threshold thl (i, j) is excluded from the luminance values of the sampled pixels (step S1406). Step S140
Excluding low luminance values in 6 contributes to high quality binarization processing.

【0111】低輝度値が除外された輝度値を用いて、ブ
ロックB(i,j)の平均輝度値ave(i,j)を算
出する(ステップS1407)。この平均輝度値ave
(i,j)に基づいてブロックB(i,j)のブロック
二値化閾値TH(i,j)を算出するルーチンに移行す
る(ステップS1408)。
The average luminance value ave (i, j) of the block B (i, j) is calculated using the luminance value from which the low luminance value has been excluded (step S1407). This average luminance value ave
The process proceeds to a routine for calculating a block binarization threshold value TH (i, j) of the block B (i, j) based on (i, j) (step S1408).

【0112】図15は、ブロック二値化閾値算出ルーチ
ンの処理流れの一例を示したフローチャートである。ブ
ロック二値化閾値設定回路1001は、まず、入力した
平均輝度値ave(i,j)の値に応じて、使用する係
数Cbを決定する(ステップS1501)。続いて、乗
算除算器1011は、平均輝度値ave(i,j)にス
テップS1501で決定された係数を乗算しブロック二
値化閾値TH(i,j)を出力する(ステップS150
2)。
FIG. 15 is a flowchart showing an example of the processing flow of the block binarization threshold value calculation routine. The block binarization threshold setting circuit 1001 first determines a coefficient Cb to be used according to the value of the input average luminance value ave (i, j) (step S1501). Subsequently, the multiplication / divider 1011 multiplies the average luminance value ave (i, j) by the coefficient determined in step S1501, and outputs a block binarization threshold TH (i, j) (step S150).
2).

【0113】図14に戻り、ステップS1502で算出
されたブロック二値化閾値THをメモリ1002に格納
する(ステップS1409)。すべてのブロックについ
てブロック二値化閾値が計算されたか否かを判定し(ス
テップS1410)、計算が終了していない場合(ステ
ップS1410:NO)は、B(i,j)に隣接するブ
ロックを設定し(たとえばB(i+1,j))、ステッ
プS1404からステップS1410までを繰り返す。
Returning to FIG. 14, the block binarization threshold value TH calculated in step S1502 is stored in the memory 1002 (step S1409). It is determined whether the block binarization threshold has been calculated for all blocks (step S1410). If the calculation has not been completed (step S1410: NO), a block adjacent to B (i, j) is set. (For example, B (i + 1, j)), and repeat steps S1404 to S1410.

【0114】すべてのブロックについてブロック二値化
閾値が計算された場合(ステップS1410:YE
S)、補間ブロックを設定する(ステップS141
1)。この補間ブロックは、部分的に高品質な二値化を
行う場合などに適しており、ユーザが予め設定しておい
てもよいし、適当なモード切替により、画像中心部分を
設定する態様であってもよい。二値化閾値補間器100
3は、ステップS1411で設定された補間ブロックが
またがる処理対象ブロックのブロック二値化閾値THを
用いて、補間ブロック内の画素単位の二値化閾値th
(x,y)を設定する(ステップS1412)。なお、
図14における関数fは、式(9)および(10)を概
念的に示したものであり、x、yは画像の各画素の位置
を表す自然数である。
When the block binarization threshold has been calculated for all the blocks (step S1410: YE)
S), an interpolation block is set (step S141)
1). This interpolation block is suitable for partially performing high-quality binarization or the like, and may be set in advance by the user, or may be a mode in which an image center portion is set by appropriate mode switching. You may. Binarization threshold interpolator 100
3 is a pixel-based binarization threshold th in the interpolation block using the block binarization threshold TH of the processing target block that spans the interpolation block set in step S1411.
(X, y) is set (step S1412). In addition,
The function f in FIG. 14 conceptually shows Expressions (9) and (10), and x and y are natural numbers representing the positions of the respective pixels of the image.

【0115】二値化器123でフレームメモリ107か
ら読み出した画素(g(x,y)とする)を、ステップ
S1412で算出した二値化閾値を用いて二値化する
(ステップS1413)。次に、すべての画素について
二値化処理を行ったか否かを判定し(ステップS141
4)、すべての画素の二値化が終了していない場合(ス
テップS1414:NO)は、g(x,y)に隣接する
画素を設定し(たとえば,g(x+1,y))、ステッ
プS1412からステップS1414までを繰り返す。
すべての画素に対して二値化が終了した場合は(ステッ
プS1414:YES)、すべての補間ブロックに対し
て二値化が終了したか否かを判定し(ステップS141
5)、終了していなければ(ステップS1415:N
O)、ステップS1411からステップS1415まで
を繰り返し、終了していれば(ステップS1415:Y
ES)、処理を終了する。
The pixels read out from the frame memory 107 by the binarizer 123 (g (x, y)) are binarized using the binarization threshold calculated in step S1412 (step S1413). Next, it is determined whether or not the binarization processing has been performed on all the pixels (step S141).
4) If binarization of all pixels is not completed (step S1414: NO), a pixel adjacent to g (x, y) is set (for example, g (x + 1, y)), and step S1412 is performed. To step S1414 are repeated.
If binarization has been completed for all pixels (step S1414: YES), it is determined whether or not binarization has been completed for all interpolation blocks (step S141).
5) If not completed (step S1415: N)
O): Steps S1411 to S1415 are repeated, and if the processing is completed (step S1415: Y
ES), and terminate the process.

【0116】実施の形態3のデジタルカメラでは、画像
サイズおよび光学系に対応させたブロック分割を行い、
当該ブロックから輝度値をサンプリング抽出するととも
に、周囲のブロックを考慮して低輝度閾値を設定し、こ
れに基づいてブロック二値化閾値を行い、さらに、この
ブロック二値化閾値を用いて、補間ブロック内の個々の
画素に適用する二値化閾値を設定して二値化するので、
実施の形態1のデジタルカメラより、高品質な画像処理
が可能となる。特に、掲示板を撮影する場合など、個々
の文字が小さい場合や、一部の領域の文字が小さい場合
などに、当該箇所を部分的に高品質に二値化することが
可能となる。
The digital camera according to the third embodiment performs block division corresponding to the image size and the optical system.
A luminance value is sampled and extracted from the block, a low luminance threshold is set in consideration of surrounding blocks, a block binarization threshold is performed based on the threshold, and further, interpolation is performed using the block binarization threshold. Since the binarization is set by setting the binarization threshold applied to each pixel in the block,
Higher quality image processing can be performed than the digital camera according to the first embodiment. In particular, when individual characters are small, such as when photographing a bulletin board, or when characters in a part of the region are small, it is possible to partially binarize the portion with high quality.

【0117】また、実施の形態3のデジタルカメラは、
ブロック二値化閾値設定回路を乗算除算器のみで構成し
たので、回路構成が単純となり高速な二値化が可能とな
る。また、分母と分子を2のべき乗を用いた係数Cbで
調整しておくことにより、シフトレジスタのみで回路を
構築することができ、高速省電力のデジタルカメラを提
供可能となる。
The digital camera according to the third embodiment is
Since the block binarization threshold value setting circuit is composed of only the multiplier / divider, the circuit configuration is simple and high-speed binarization is possible. In addition, by adjusting the denominator and the numerator with the coefficient Cb using a power of 2, a circuit can be constructed using only the shift register, and a high-speed and power-saving digital camera can be provided.

【0118】(実施の形態4)実施の形態4では、所定
ブロック内の画素毎に適用される二値化閾値を算出し、
画素毎に画像データの二値化を行うCMOSセンサを使
用した画像二値化装置をデジタルカメラに適用した場合
について説明する。図16は、画像入力部分にCMOS
センサを使用し、画素毎に適用される二値化閾値を算出
して画素毎に画像データの二値化を行うデジタルカメラ
の装置構成の一例を示したブロック図である。なお、本
実施の形態では、実施の形態3と同一な構成部分につい
ては同一の符号を付して詳細な説明を省略するものと
し、実施の形態3と異なる部分を主として説明する。
(Embodiment 4) In Embodiment 4, a binarization threshold value applied to each pixel in a predetermined block is calculated.
A case in which an image binarization device using a CMOS sensor for binarizing image data for each pixel is applied to a digital camera will be described. FIG. 16 shows a CMOS image input portion.
FIG. 2 is a block diagram illustrating an example of a device configuration of a digital camera that uses a sensor to calculate a binarization threshold applied to each pixel and binarizes image data for each pixel. In the present embodiment, the same components as those in the third embodiment will be denoted by the same reference numerals, and detailed description thereof will be omitted. The different portions from the third embodiment will be mainly described.

【0119】デジタルカメラ1600は画像入力部にC
MOSセンサ1601を有する。従って、ラスター走査
しかできないCCD101(図10参照)と異なり、C
MOSセンサ1601はランダムアクセスが可能で、ブ
ロック単位での読み出しができ、ブロック毎に画素値を
読み出し、ブロック二値化閾値を算出し、メモリ100
2に記憶することができるので、ブロックバッファ10
9(図10参照)が不要となり、回路構成が簡単とな
る。
The digital camera 1600 has a C
It has a MOS sensor 1601. Therefore, unlike the CCD 101 (see FIG. 10) that can only perform raster scanning,
The MOS sensor 1601 is capable of random access, is capable of reading in block units, reads pixel values for each block, calculates a block binarization threshold value,
2 can be stored in the block buffer 10
9 (see FIG. 10) becomes unnecessary, and the circuit configuration is simplified.

【0120】同時に、ブロック毎に読み出した画素値は
輝度信号に変換されアパーチャ補正されてフレームメモ
リ107に記憶される。さらに、CCD101はデジタ
ルカメラ1000の他の回路を成すCMOS集積回路と
は別の電源を必要とするのに対し、CMOSセンサ16
01はCMOS集積回路と同じ電源を使用でき、消費電
力も小さくなる。従って、デジタルカメラ1600とし
ての回路規模も小さくなるため、消費電力、処理速度、
コストなどにおいて、CCDを使用したシステムより利
便性が高い。なお、本実施の形態ではCMOSセンサを
用いたが、その他のブロックアクセス可能な画像入力部
を有する画像二値化装置であってもよい。
At the same time, the pixel values read for each block are converted into luminance signals, subjected to aperture correction, and stored in the frame memory 107. Further, the CCD 101 requires a separate power supply from a CMOS integrated circuit that forms another circuit of the digital camera 1000, while the CMOS sensor 16
01 can use the same power supply as the CMOS integrated circuit and consumes less power. Therefore, the circuit size of the digital camera 1600 is also reduced, so that power consumption, processing speed,
In terms of cost and the like, it is more convenient than a system using a CCD. Although the CMOS sensor is used in the present embodiment, an image binarizing device having an image input unit that can access other blocks may be used.

【0121】(実施の形態5)実施の形態5では、平均
輝度値を所定レンジ内の値に収まるように範囲制限する
画像二値化装置をデジタルカメラに適用した場合につい
て説明する。図17は、平均輝度値を所定レンジ内の値
に収まるように範囲制限するデジタルカメラの装置構成
の一例を示したブロック図である。なお、本実施の形態
では、実施の形態1と同一の構成部分については同一の
符合を付し、その説明を省略する。
(Fifth Embodiment) In a fifth embodiment, a case will be described in which an image binarization device that limits the average luminance value to a value within a predetermined range is applied to a digital camera. FIG. 17 is a block diagram showing an example of a device configuration of a digital camera that limits the range of the average luminance value so as to fall within a value within a predetermined range. Note that, in the present embodiment, the same components as those in Embodiment 1 are denoted by the same reference numerals, and description thereof will be omitted.

【0122】デジタルカメラ1700は、平均輝度値算
出器120から出力される平均輝度値を予め設定した下
限値で制限して、低すぎる平均輝度値が出力されるのを
防ぐ制限器1701を有する。たとえば、暗い画像のな
かの相対的に明るい文字、より具体的には黒板に描かれ
た白墨の描画像を考える。黒板面積に比して、白墨の字
の面積は非常に少ないが、この場合に重要な情報は白墨
の描画像である。ここで通常の二値化を行うと、白墨の
描画像以外の黒板の画像データが支配的になるので、黒
板の黒い部分の濃淡の境目に二値化閾値が設定されてし
まう。従って、白墨像は当然に白と判断されるが、白墨
カス(たとえば、黒板消しの軌跡)も、白と判断され、
結果として、ノイズが多くなる。
The digital camera 1700 has a limiter 1701 that limits the average luminance value output from the average luminance value calculator 120 by a preset lower limit value to prevent the average luminance value that is too low from being output. For example, consider a relatively bright character in a dark image, more specifically, an image of black ink drawn on a blackboard. Although the area of the black ink characters is very small compared to the area of the blackboard, the important information in this case is the drawn image of the black ink. Here, if normal binarization is performed, image data of the blackboard other than the black and white drawing image becomes dominant, so that the binarization threshold value is set at the boundary of shading of the black portion of the blackboard. Therefore, the black ink image is naturally determined to be white, but the black ink residue (for example, the locus of blackboard eraser) is also determined to be white.
As a result, noise increases.

【0123】制限器1701は、この様なノイズが再現
されないように平均輝度値を調整するものである。具体
的には、予め定められた所定レンジ内に平均輝度値があ
るかないかを判断し、ない場合は当該レンジ幅の下限値
に平均値を置き換える。この制限器1701により平均
輝度値の下限を設定し、コントラストの高い二値化画像
を得ることが可能となる。
The limiter 1701 adjusts the average luminance value so that such noise is not reproduced. Specifically, it is determined whether or not there is an average luminance value within a predetermined range. If not, the average value is replaced with the lower limit of the range width. This limiter 1701 sets the lower limit of the average luminance value, and it is possible to obtain a binarized image with high contrast.

【0124】使用の態様によっては、平均輝度値を予め
設定した上限値で制限して、高すぎる平均輝度値が出力
されないようにすることもできる。たとえば、ホワイト
ボードにマーカー書きした画像に適用することができ
る。この場合は、平均輝度値が高くなるので、上述した
例とは反対に、制限器1701により高すぎる平均輝度
値が出力されないようにする。
Depending on the mode of use, it is possible to limit the average luminance value to a preset upper limit value so that an excessively high average luminance value is not output. For example, it can be applied to an image marked on a whiteboard. In this case, since the average luminance value becomes high, contrary to the above-described example, the limiter 1701 prevents the excessively high average luminance value from being output.

【0125】なお、本実施の形態においては、CCD1
01を用いたが、使用の態様によっては、実施の形態2
で示したごとく、CMOSセンサ901(図9参照)を
用いてもよい。
In this embodiment, the CCD 1
01 was used, but depending on the mode of use, the second embodiment
As shown in, a CMOS sensor 901 (see FIG. 9) may be used.

【0126】(実施の形態6)実施の形態6では、平均
輝度値を所定レンジ内の値に収まるように範囲制限しつ
つ、所定ブロック内の画素毎に適用される二値化閾値を
算出し、画素毎に画像データの二値化を行う画像二値化
装置をデジタルカメラに適用した場合について説明す
る。図18は、本実施の形態にかかるデジタルカメラの
構成の一例を示したブロック図である。なお、本実施の
形態では、実施の形態5と同一の構成部分については同
一の符合を付し、その説明を省略する。
(Embodiment 6) In Embodiment 6, the binarization threshold value applied to each pixel in a predetermined block is calculated while limiting the average luminance value to a value within a predetermined range. A case will be described in which an image binarization device that binarizes image data for each pixel is applied to a digital camera. FIG. 18 is a block diagram illustrating an example of a configuration of a digital camera according to the present embodiment. In the present embodiment, the same components as those in the fifth embodiment are denoted by the same reference numerals, and description thereof will be omitted.

【0127】デジタルカメラ1800は、平均輝度値算
出器120から出力される平均輝度値を予め設定した下
限値で制限して、低すぎる平均輝度値が出力されるのを
防ぐ制限器1801を有する。制限器1801から出力
された平均輝度値は所定の範囲内にある。たとえば、暗
い画像のなかの相対的に明るい文字、より具体的には黒
板に描かれた白墨の描画像に適用できる。
The digital camera 1800 has a limiter 1801 that limits the average luminance value output from the average luminance value calculator 120 by a preset lower limit value to prevent the output of the average luminance value that is too low. The average luminance value output from limiter 1801 is within a predetermined range. For example, the present invention can be applied to relatively bright characters in a dark image, more specifically, to a black ink image drawn on a blackboard.

【0128】特に、本実施の形態では二値化閾値補間器
1003で、補間ブロック内の個々の画素に適用する二
値化閾値を周囲の処理対象ブロックのブロック二値化閾
値により算出する。このとき、制限器1801により、
突出した平均輝度値を除外するので、個々の二値化閾値
をより適切に設定することができ、これにより、さらに
高品質な二値化処理が可能となる。使用の態様によって
は、平均輝度値を予め設定した上限値で制限して、白飛
びが発生していないのに高すぎる平均輝度値が出力され
ないようにすることもできる。また、制限器1801
は、所定範囲をブロック二値化閾値より設定してもよ
い。
In particular, in the present embodiment, the binarization threshold value interpolator 1003 calculates the binarization threshold value applied to each pixel in the interpolation block from the block binarization threshold value of the surrounding processing target block. At this time, the limiter 1801
Since the prominent average luminance value is excluded, individual binarization thresholds can be set more appropriately, thereby enabling higher quality binarization processing. Depending on the mode of use, the average luminance value may be limited to a preset upper limit value so that an excessively high average luminance value is not output even though whiteout does not occur. In addition, the limiter 1801
May set a predetermined range from a block binarization threshold.

【0129】なお、本実施の形態においては、CCD1
01を用いたが、使用の態様によっては、実施の形態4
で示したごとく、CMOSセンサ1601(図16参
照)を用いてもよい。
In this embodiment, the CCD 1
01 was used, but the fourth embodiment may be used depending on the mode of use.
As shown in, a CMOS sensor 1601 (see FIG. 16) may be used.

【0130】(実施の形態7)実施の形態7では、測光
手段を有する画像撮像装置について説明する。図19
は、測光器を備える画像撮像装置をデジタルカメラに適
用した場合について、画像入力から二値化処理をした画
像を記録するまでの装置構成の一例を示したブロック図
である。なお、本実施の形態では、実施の形態1の構成
要素が近似するため、実施の形態1と同様の構成要素に
ついては同一の符合を付して詳細な説明を省略し、実施
の形態1と異なる部分を主として説明するものとする。
(Embodiment 7) In Embodiment 7, an image pickup apparatus having photometric means will be described. FIG.
FIG. 2 is a block diagram showing an example of a device configuration from input of an image to recording of an image subjected to a binarization process in a case where an image pickup device including a photometer is applied to a digital camera. In the present embodiment, since the components of the first embodiment are similar, the same components as those of the first embodiment are denoted by the same reference numerals, and detailed description thereof will be omitted. The different parts will be mainly described.

【0131】デジタルカメラ1900は、CCD101
と、A/D変換器102と、ホワイトバランス調整器1
03と、画素補間器104と、輝度生成器105と、ア
パーチャ補正器106と、フレームメモリ107と、C
PU108と、測光器1901と、平滑化器1902
と、メモリ1903と、ブロック読出制御器1904
と、二値化閾値設定回路1905と、二値化器123
と、圧縮器124と、画像記憶メモリ125と、から構
成される。
The digital camera 1900 includes the CCD 101
, A / D converter 102 and white balance adjuster 1
03, a pixel interpolator 104, a luminance generator 105, an aperture corrector 106, a frame memory 107,
PU 108, photometer 1901, smoother 1902
, A memory 1903, and a block read controller 1904
, A binarization threshold setting circuit 1905, and a binarizer 123
, A compressor 124, and an image storage memory 125.

【0132】CCD101は、デジタルカメラ1900
の光学系(図示せず)により集光された光を電気信号に
変換する部位であり、多値画像を構成する各画素のRG
Bアナログ信号を出力する部位である。出力されたアナ
ログ信号は、A/D変換器102でデジタル信号に変換
される。デジタル信号は、ホワイトバランス調整器10
3、画素補間器104、輝度生成器105、アパーチャ
補正器106を通じて、輝度値の補間、抽出などの処理
を受け、フレームメモリ107に一時記憶される。
The CCD 101 is a digital camera 1900
Is a part that converts light condensed by an optical system (not shown) into an electric signal.
It is a part that outputs a B analog signal. The output analog signal is converted into a digital signal by the A / D converter 102. The digital signal is sent to the white balance adjuster 10
3. Through the pixel interpolator 104, the luminance generator 105, and the aperture corrector 106, processing such as interpolation and extraction of luminance values is performed, and is temporarily stored in the frame memory 107.

【0133】CPU108は、後述する測光器1901
からの輝度情報(輝度値)を基に、後述するブロック読
出制御器1904を制御し、測光器1901が測光に用
いる画面分割と同様にフレームメモリ107に格納され
ている画像を分割する。測光器1901が測光に用いる
画面分割は、固定のものを用いてもよいし、CPU10
8の制御を受け図3に示したごとく分割する態様であっ
てもよい。CPU108は、その他のデジタルカメラ1
900の各回路、各部位を制御する。
The CPU 108 has a photometer 1901 to be described later.
Based on the luminance information (luminance value) from, a block reading controller 1904 described later is controlled to divide the image stored in the frame memory 107 in the same manner as the screen division used by the photometer 1901 for photometry. The screen division used by the photometer 1901 for photometry may be a fixed one,
8, the division may be performed as shown in FIG. The CPU 108 controls the other digital camera 1
Each circuit 900 is controlled.

【0134】測光器1901は、画像撮影前に被写体の
測光を行う自動露出検知機構(AE)を有し、A/D変
換器102から出力されるデジタル信号に基づき、各画
面の明るさを測定する。測光の方法は、たとえば、画素
の輝度値の加算により測定する。このときCPU108
は、測光器1901で加算に使用する測光値をサンプリ
ングすることも可能である。なお、使用の態様によって
は、CCD101により光電変換される光量を用いても
よい。
The photometer 1901 has an automatic exposure detection mechanism (AE) for performing photometry of a subject before taking an image, and measures the brightness of each screen based on a digital signal output from the A / D converter 102. I do. The photometry is performed, for example, by adding the luminance values of the pixels. At this time, the CPU 108
It is also possible to sample the photometric value used for the addition by the photometer 1901. Note that the amount of light photoelectrically converted by the CCD 101 may be used depending on the mode of use.

【0135】平滑化器1902は、測光器1901で得
られた各画面の測光値を平滑化し、ave(i,j)と
してメモリ1903に出力する。平滑化の一例として、
次の処理が挙げられる。すなわち、測光器1901内の
一つの画面(G(i,j)とする)に含まれる全画素数
の測光値の平均値ave(i,j)(もしくは画面G
(i,j)のなかからサンプリングされた測光値の平均
値)が周囲の画面の測光値の平均値から突出した値であ
る場合に、画面G(i,j)の各画素の測光値を補正し
て、周囲の画面の測光値の平均値に比して突出した値に
ならないようにする。
The smoother 1902 smoothes the photometric value of each screen obtained by the photometer 1901 and outputs it to the memory 1903 as ave (i, j). As an example of smoothing,
The following processing is included. That is, the average value ave (i, j) of the photometric values of all pixels included in one screen (G (i, j)) in the photometer 1901 (or the screen G
When the average value of the photometric values sampled from (i, j)) is a value protruding from the average value of the photometric values of the surrounding screen, the photometric value of each pixel of the screen G (i, j) is calculated. The correction is performed so that the value does not become prominent compared with the average value of the photometric values of the surrounding screen.

【0136】この処理を実現するアルゴリズムとしての
一例を以下に示す。画面G(i,j)に隣接する4画面
の平均測光値をave4(i,j)として、画面G
(i,j)の平均測光値ave(i,j)がave4
(i,j)の3倍以上である場合に画面G(i,j)内
の各画素の測光値(s(x,y)とする)を次式(1
1)のように変換する。 if ave(i,j)≧3*ave4(i,j) then s(i,j)=ave4(i,j) +(1/4)*(s(i,j) −ave4(i,j)) ‥‥(11)
An example of an algorithm for realizing this processing is shown below. The average photometry value of four screens adjacent to the screen G (i, j) is set as ave4 (i, j), and the screen G
The average photometric value ave (i, j) of (i, j) is ave4
If the value is three times or more than (i, j), the photometric value (s (x, y)) of each pixel in the screen G (i, j) is expressed by the following equation (1).
Convert as in 1). if ave (i, j) ≧ 3 * ave4 (i, j) thens (i, j) = ave4 (i, j) + (1/4) * (s (i, j) −ave4 (i, j) )) ‥‥ (11)

【0137】平滑化器1902では、変換された測光値
を用いて、画面G(i,j)の平均測光値ave(i,
j)を計算し直して、メモリ1903に平均測光値を出
力する。なお、メモリ1903は、この平均測光値を格
納する。
The smoothing unit 1902 uses the converted photometric values to calculate the average photometric value ave (i, j) of the screen G (i, j).
j) is calculated again, and the average photometric value is output to the memory 1903. The memory 1903 stores the average photometric value.

【0138】ブロック読出制御器1904は、測光器1
901が測光に用いる画面分割と同様にフレームメモリ
107に格納されている画像を分割する。これにより、
二値化による閾値がより自然なものとなる。
The block reading controller 1904 is connected to the photometer 1
An image 901 divides an image stored in the frame memory 107 in the same manner as the screen division used for photometry. This allows
The threshold value by binarization becomes more natural.

【0139】二値化閾値設定回路1905は、ave
(i,j)に基づいて二値化閾値TH(i,j)を設定
する。図20は、二値化閾値設定回路1905の一構成
例を示した説明図である。二値化閾値設定回路1905
は、加算減算器2001と、係数メモリ2002とを有
する。二値化閾値設定回路1905は、処理対象ブロッ
クの二値化閾値を二値化器123へ出力する。
The binarization threshold value setting circuit 1905 uses ave
The binarization threshold TH (i, j) is set based on (i, j). FIG. 20 is an explanatory diagram showing an example of the configuration of the binarization threshold setting circuit 1905. Binarization threshold setting circuit 1905
Has an adder / subtracter 2001 and a coefficient memory 2002. The binarization threshold setting circuit 1905 outputs the binarization threshold of the processing target block to the binarizer 123.

【0140】加算減算器2001は、平均測光値ave
(i,j)から係数Cmを減算する。係数メモリ200
2は、加算減算器2001で使用する係数を格納する。
この係数Cmは、平均測光値aveの大きさに従って値
が異なっている。図21(a)は、係数メモリ2002
に格納されている係数例を示した説明図である。図示し
たように、Cmは、平均測光値aveが中間レンジで最
も大きく、測光値が非常に高い場合もしくは測光値が非
常に小さな場合には、小さな値となっている。
The adder / subtracter 2001 calculates the average photometric value ave
The coefficient Cm is subtracted from (i, j). Coefficient memory 200
2 stores a coefficient used in the addition / subtraction unit 2001.
The value of the coefficient Cm varies depending on the magnitude of the average photometric value ave. FIG. 21A shows a coefficient memory 2002.
FIG. 4 is an explanatory diagram showing an example of coefficients stored in the. As illustrated, Cm has a small value when the average photometric value ave is the largest in the middle range and the photometric value is very high or the photometric value is very small.

【0141】この様な係数Cmを用いることにより、測
光値の大きな領域(高輝度領域)での二値化閾値THを
平均測光値aveから大きくずれないようにすることが
でき、白飛びが発生しているような領域でも、高品質な
二値化が可能となる。なお、図示した例では、上述した
ように、中間調の平均測光値に対して係数Cmが大き
い。これは、測光値の大半が中間的な値であり、この領
域で二値化を高品質に行うことを考慮して設定されたも
のである。また、ここではCmを正として減算を行う
が、使用の態様によってはCmを負の値として加算減算
器2001で加算を行ってもよい。
By using such a coefficient Cm, it is possible to prevent the binarization threshold value TH in a region where the photometric value is large (high-luminance region) from being largely deviated from the average photometric value ave. Even in such an area, high-quality binarization is possible. In the illustrated example, as described above, the coefficient Cm is larger than the average photometric value of the halftone. Most of the photometric values are intermediate values, and are set in consideration of performing binarization with high quality in this region. In addition, although the subtraction is performed with Cm being positive here, addition may be performed by the addition / subtraction unit 2001 with Cm being a negative value depending on the use mode.

【0142】なお、本実施の形態では、平滑化器190
2を用いて測光値が突出している白飛び領域における測
光値が平滑化される。従って、白飛び領域に対する二値
化閾値と平滑化される前の測光値との差が大きくなって
しまう可能性がある。従って、測光値が平滑化された場
合のCmを0に、場合によっては、負の値として減算し
てもよい(図21参照)。このような係数の正負の転換
発生するような場合には、乗算除算器を用いると処理ア
ルゴリズムが複雑となる。この点で、本実施の形態では
処理アルゴリズムが簡単な加算減算器2001が採用さ
れ、利便性が高いといえる。なお、Cmを0にする場合
は、平滑化値をそのまま二値化閾値THとすることがで
きるので、回路構成が単純になり、高速低消費電力のデ
ジタルカメラ1900が得られることになる。
In this embodiment, the smoothing unit 190
2, the photometric value in the overexposed area where the photometric value protrudes is smoothed. Therefore, there is a possibility that the difference between the binarization threshold value for the overexposed area and the photometric value before smoothing becomes large. Therefore, Cm when the photometric value is smoothed may be subtracted to 0, and in some cases, may be subtracted as a negative value (see FIG. 21). In such a case where the conversion of the coefficient between positive and negative occurs, the use of a multiplier / divider complicates the processing algorithm. In this regard, in this embodiment, the addition / subtraction unit 2001 having a simple processing algorithm is employed, and it can be said that convenience is high. When Cm is set to 0, the smoothed value can be directly used as the binarization threshold TH, so that the circuit configuration is simplified, and the digital camera 1900 with high speed and low power consumption can be obtained.

【0143】また、二値化閾値の設定に際し、濃度値を
用いる場合には、図21(b)に示したような係数Cm
テーブルを用いて加算すればよい。図示したように、係
数Cmテーブルは、濃度値(便宜的にaveとする)が
小さな領域では中間領域に対する係数Cmより小さな係
数Cmとなっている。この係数Cmを用いることによ
り、低濃度領域での二値化閾値THを平均濃度値ave
から大きくずれないようにすることができ、白飛びが発
生しているような領域でも、高品質な二値化が可能とな
る。
When the density value is used for setting the binarization threshold, the coefficient Cm as shown in FIG.
What is necessary is just to add using a table. As shown in the figure, the coefficient Cm table has a smaller coefficient Cm than the coefficient Cm for the intermediate area in an area where the density value (ave for convenience) is small. By using the coefficient Cm, the binarization threshold value TH in the low-density region is set to the average density value ave.
, And high-quality binarization is possible even in an area where whiteout occurs.

【0144】なお、この例では二値化閾値設定回路19
05は、加算減算器2001を有し、乗算除算器を備え
ないが、使用の態様によっては、乗算減算器を有し、加
算減算器を備えないブロック二値化閾値設定回路100
1(図11参照)を採用しても良く、また、いずれの演
算器も備えた二値化閾値設定回路122(図6参照)を
採用してもよい。
In this example, the binarization threshold setting circuit 19
05 has an addition / subtraction unit 2001 and does not include a multiplication / division unit. However, depending on a use mode, the block binarization threshold value setting circuit 100 includes a multiplication / subtraction unit and does not include an addition / subtraction unit.
1 (see FIG. 11), or a binarization threshold setting circuit 122 (see FIG. 6) provided with any of the arithmetic units.

【0145】二値化器123は二値化閾値TH(i,
j)に基づいて、画面G(i,j)に対応したブロック
B(i,j)の各画素を二値化する。なお、平滑化され
たブロックに対しては、変換後の測光値を用いて当該ブ
ロックを適宜処理して二値化する。圧縮器124はM
H、MR等により二値画像に適した圧縮を行う。画像記
憶メモリ125は、圧縮された画像を記憶する。
The binarizer 123 outputs a binarization threshold TH (i,
Based on j), each pixel of the block B (i, j) corresponding to the screen G (i, j) is binarized. The smoothed block is binarized by appropriately processing the block using the photometric value after conversion. Compressor 124 is M
Compression suitable for a binary image is performed by H, MR, or the like. The image storage memory 125 stores the compressed image.

【0146】次に、多値画像が二値化されるまでの画像
データの流れを説明する。図22は、多値画像が二値化
されるまでの画像データの処理流れを示したフローチャ
ートである。まず、CPU108は、CCD101から
画像サイズを読み出す(ステップS2201)。続い
て、CPU108は、測光器1901から出力される測
光値のなかから1画面G(i,j)を設定し(ステップ
S2202)、当該画面の測光値の平均値を算出する
(ステップS2203)。平均を求める際はすべての測
光値を用いてもよいし、適宜サンプリングを行ってもよ
い。
Next, the flow of image data until a multi-valued image is binarized will be described. FIG. 22 is a flowchart showing a processing flow of image data until a multi-value image is binarized. First, the CPU reads the image size from the CCD 101 (step S2201). Subsequently, the CPU 108 sets one screen G (i, j) from the photometric values output from the photometer 1901 (step S2202), and calculates an average of the photometric values of the screen (step S2203). When obtaining the average, all photometric values may be used, or sampling may be performed as appropriate.

【0147】次に、画面の測光値の平均値が隣接する画
面の測光値の平均値から突出していないかどうか判定す
る(ステップS2204)。突出している場合は(ステ
ップS2204:YES)、当該測光値の平均値を平滑
化器1902で平滑化する(ステップS2205)。突
出していない場合(ステップS2204:NO)もしく
はステップS2205で平滑化処理が行われた場合は、
フレームメモリ107から画面G(i,j)に対応する
ブロックB(i,j)をブロック読出制御器1904が
読み出し(ステップS2206)、画面G(i,j)の
測光値に基づいて二値化閾値を算出するルーチンに移行
する(ステップS2207)。
Next, it is determined whether or not the average value of the photometric values of the screens protrudes from the average value of the photometric values of the adjacent screens (step S2204). If it is protruding (step S2204: YES), the average of the photometric values is smoothed by the smoother 1902 (step S2205). If it has not protruded (step S2204: NO) or if the smoothing process has been performed in step S2205,
The block reading controller 1904 reads the block B (i, j) corresponding to the screen G (i, j) from the frame memory 107 (step S2206), and binarizes based on the photometric value of the screen G (i, j). The process proceeds to a routine for calculating a threshold value (step S2207).

【0148】ここで、ステップS2207の二値化閾値
算出ルーチンについて説明する。図23は、二値化閾値
算出ルーチンの処理流れの一例を示したフローチャート
である。二値化閾値設定回路1905は、まず、入力し
た平均測光値ave(i,j)の値に応じて、使用する
係数Cmを決定する(ステップS2301)。続いて、
加算減算器2001は、平均輝度値ave(i,j)に
ステップS2301で決定された係数を減算し二値化閾
値TH(i,j)を出力する(ステップS2302)。
Here, the binarization threshold value calculation routine in step S2207 will be described. FIG. 23 is a flowchart illustrating an example of the processing flow of the binarization threshold value calculation routine. First, the binarization threshold setting circuit 1905 determines a coefficient Cm to be used according to the value of the input average photometric value ave (i, j) (step S2301). continue,
The addition / subtraction unit 2001 subtracts the coefficient determined in step S2301 from the average luminance value ave (i, j) and outputs a binarization threshold TH (i, j) (step S2302).

【0149】図22に戻り、ステップS2207で算出
された二値化閾値を用いてブロック内の多値画像を二値
化する(ステップS2208)。すべてのブロックにつ
いて二値化が終了したか否かを判定し(ステップS22
09)、終了したならば(ステップS2209:YE
S)、二値化処理を終了し、終了していないならば(ス
テップS2209:NO)、ステップS2202に移行
し、次の画面(たとえばG(i+1,j))を設定し、
以降ステップS2202からステップS2209を繰り
返す。
Returning to FIG. 22, the multi-valued image in the block is binarized using the binarization threshold calculated in step S2207 (step S2208). It is determined whether binarization has been completed for all blocks (step S22).
09), if completed (step S2209: YE)
S), the binarization process ends, and if not (step S2209: NO), the process proceeds to step S2202, and the next screen (for example, G (i + 1, j)) is set.
Thereafter, steps S2202 to S2209 are repeated.

【0150】実施の形態7では、デジタルカメラに備わ
っている自動測光部から得られる情報(測光値)を利用
して二値化閾値を設定するので、別途二値化閾値を設定
するための処理を不要とする。従って、回路構成が簡単
になりコストの低減を図ることができるとともに、二値
化閾値の計算処理アルゴリズムが簡易となり、消費電力
を低減することができる。また、二値化閾値設定回路が
所定の係数を平均測光値に応じて減算するので、光源に
よるピンポイント的な写り込みがある画像であっても高
品質に多値画像を二値化することが可能となる。
In the seventh embodiment, since the binarization threshold is set using information (photometric value) obtained from the automatic photometer provided in the digital camera, a process for separately setting the binarization threshold is performed. Is unnecessary. Therefore, the circuit configuration is simplified, the cost can be reduced, and the algorithm for calculating the binarization threshold value is simplified, and the power consumption can be reduced. Also, since the binarization threshold setting circuit subtracts a predetermined coefficient according to the average photometric value, it is possible to binarize a multi-valued image with high quality even if the image has a pinpoint reflection by a light source. Becomes possible.

【0151】(実施の形態8)実施の形態8では、CM
OSセンサを使用した画像撮像装置について説明する。
図24は、画像入力部分にCMOSセンサが使用された
デジタルカメラにおいて、入力した画像を二値化処理し
て記録するまでの装置構成の一例を示したブロック図で
ある。なお、本実施の形態では、実施の形態7と同様の
部分については同一の符合を付して説明を省略するもの
とし、実施の形態7と異なる部分について説明する。
(Eighth Embodiment) In the eighth embodiment, the CM
An image pickup device using an OS sensor will be described.
FIG. 24 is a block diagram showing an example of a device configuration up to binarizing an input image and recording the input image in a digital camera using a CMOS sensor in an image input portion. In the present embodiment, the same components as those in the seventh embodiment are denoted by the same reference numerals, and the description thereof will be omitted. The different components from the seventh embodiment will be described.

【0152】デジタルカメラ2400は画像入力部にC
MOSセンサ2401を有する。従って、ラスター走査
しかできないCCD101(図19参照)と異なり、C
MOSセンサ2401はランダムアクセスが可能で、ブ
ロック単位での読み出しができるので、フレームメモリ
107およびブロック読出制御器1904が不要とな
り、回路構成が簡単となる。この場合はCPU108
が、ブロック読出制御器の役割を持つことになる。
The digital camera 2400 has a C
It has a MOS sensor 2401. Therefore, unlike the CCD 101 (see FIG. 19) which can only perform raster scanning,
Since the MOS sensor 2401 can perform random access and can perform reading in units of blocks, the frame memory 107 and the block reading controller 1904 become unnecessary, and the circuit configuration is simplified. In this case, the CPU 108
Have the role of a block read controller.

【0153】さらに、CCD101はCMOS集積回路
とは別の電源を必要とするのに対し、CMOSセンサ2
401はCMOS集積回路と同じ電源を使用でき、消費
電力も小さくなる。従って、デジタルカメラ2400と
しての回路規模も小さくなるため、消費電力、処理速
度、コストなどにおいて、CCDを使用したシステムよ
り利便性が高い。なお、本実施の形態ではCMOSセン
サを用いたが、その他のブロックアクセス可能な画像入
力部を有する画像撮像装置であってもよい。
Further, while the CCD 101 requires a power supply different from that of the CMOS integrated circuit, the CMOS sensor 2
The power supply 401 can use the same power supply as that of the CMOS integrated circuit, and consumes less power. Therefore, the circuit scale of the digital camera 2400 is reduced, and thus the power consumption, processing speed, cost, and the like are more convenient than a system using a CCD. Although the CMOS sensor is used in the present embodiment, an image capturing apparatus having an image input unit capable of accessing other blocks may be used.

【0154】(実施の形態9)実施の形態9では、測光
手段を有し、所定ブロック内の画素毎に適用される二値
化閾値を算出し、画素毎に画像データの二値化を行う画
像撮像装置をデジタルカメラに適用した場合について説
明する。図25は、測光器を備え、各画素毎に二値化閾
値を設定する画像撮像装置をデジタルカメラに適用した
一例を示した構成図である。なお、本実施の形態では、
実施の形態7の構成要素が近似するため、実施の形態7
と同様の構成要素については同一の符合を付して説明を
省略するものとし、実施の形態7と異なる部分について
説明するものとする。
(Embodiment 9) Embodiment 9 has photometric means, calculates a binarization threshold applied to each pixel in a predetermined block, and binarizes image data for each pixel. A case where the image pickup apparatus is applied to a digital camera will be described. FIG. 25 is a configuration diagram illustrating an example in which an image capturing apparatus that includes a photometer and sets a binarization threshold value for each pixel is applied to a digital camera. In the present embodiment,
Since the components of the seventh embodiment are similar,
The same components as those described above are denoted by the same reference numerals, and description thereof will be omitted, and portions different from the seventh embodiment will be described.

【0155】デジタルカメラ2500は、平滑化器19
02から出力されメモリ1903に格納された測光値の
平均値を入力し、画面毎に所定係数を乗じた値(以降画
面二値化閾値と称することとする)を出力する画面二値
化閾値設定回路2501と、画面二値化閾値を格納する
メモリ2502と、画面二値化閾値に基づいて、所定ブ
ロック内の個々の画素毎に適用する二値化閾値を設定す
る二値化閾値補間器2503と、を備える。なお、色差
信号を生成する部分は省略してある。
The digital camera 2500 includes the smoothing unit 19
Screen binarization threshold setting for inputting an average value of photometric values outputted from the memory 02 and stored in the memory 1903 and outputting a value multiplied by a predetermined coefficient for each screen (hereinafter referred to as a screen binarization threshold) A circuit 2501, a memory 2502 for storing a screen binarization threshold, and a binarization threshold interpolator 2503 for setting a binarization threshold to be applied to each pixel in a predetermined block based on the screen binarization threshold And. Note that a portion for generating a color difference signal is omitted.

【0156】画面二値化閾値設定回路2501は、平滑
化された測光値に当該画面に応じた係数を乗じる。以降
では説明の便宜のために、平滑化された測光値aを有す
る画面をGaと表示し、この所定係数をCb(Ga)と
表示するものとする。画面二値化閾値設定回路2501
は、すべての画面について、画面二値化閾値を算出し、
順次メモリ2502に格納する。画面二値化閾値設定回
路2501は、たとえば、図11に示したブロック二値
化閾値設定回路1001と同様の回路構成とし、係数メ
モリにCb(Ga)を格納しておく。
The screen binarization threshold value setting circuit 2501 multiplies the smoothed photometric value by a coefficient corresponding to the screen. Hereinafter, for convenience of explanation, it is assumed that the screen having the smoothed photometric value a is displayed as Ga, and the predetermined coefficient is displayed as Cb (Ga). Screen binarization threshold setting circuit 2501
Calculates the screen binarization threshold for all screens,
The data is sequentially stored in the memory 2502. The screen binarization threshold setting circuit 2501 has, for example, a circuit configuration similar to that of the block binarization threshold setting circuit 1001 shown in FIG. 11, and stores Cb (Ga) in a coefficient memory.

【0157】二値化閾値補間器2503は、メモリ25
02に格納された全画面の画面二値化閾値をもちいて、
補間ブロックBHの各画素毎に適用する二値化閾値を設
定する。なお、以降の説明では各画素毎に適用する二値
化閾値を設定する。補間ブロックBHはブロック読出制
御器1904により設定される。なお、使用の態様によ
ってはCPU108が設定してもよい。
The binary threshold interpolator 2503 is
02, using the screen binarization thresholds of all screens stored in
A binarization threshold applied to each pixel of the interpolation block BH is set. In the following description, a binarization threshold applied to each pixel is set. The interpolation block BH is set by the block read controller 1904. The setting may be performed by the CPU 108 depending on the mode of use.

【0158】ここで、補間ブロック内の各画素に適用す
る二値化閾値の算出の概要を説明する。図26は、補間
ブロックと画面との関係を示した図である。同図から明
らかなように、補間ブロックBHは、隣接する4つの画
面Ga、Gb、GcおよびGdにまたがっている。な
お、画面Ga、Gb、Gc、Gdの平滑化された測光値
の平均値をそれぞれa、b、c、dとする。二値化閾値
補間器2503は、平滑化された測光値の平均値a、
b、cおよびdを用いて、補間ブロックBH内の各画素
に適用する二値化閾値を計算する。
Here, the outline of the calculation of the binarization threshold applied to each pixel in the interpolation block will be described. FIG. 26 is a diagram showing the relationship between the interpolation block and the screen. As is clear from the figure, the interpolation block BH extends over four adjacent screens Ga, Gb, Gc and Gd. The average values of the smoothed photometric values of the screens Ga, Gb, Gc, and Gd are a, b, c, and d, respectively. The binarization threshold interpolator 2503 calculates the average value a of the smoothed photometric values,
Using b, c, and d, a binarization threshold to be applied to each pixel in the interpolation block BH is calculated.

【0159】補間ブロックBH内の画素bpに適用する
二値化閾値の算出方法を説明する。補間ブロックBHは
長方形であるとして、その大きさ(画素数)を水平方向
にxbnum、垂直方向にybnumとする。また、画
素bpの位置を(m,l)とする。このとき、補間ブロ
ックBHの(0,0)点に値a×Cb(Ga)、(xb
num,0)点に値b×Cb(Gb)、(0,ybnu
m)点に値c×Cb(Gc)、(xbnum,ybnu
m)点に値d×Cb(Gd)があり、この間を線形に近
似する。
A method of calculating a binarization threshold applied to the pixel bp in the interpolation block BH will be described. Assuming that the interpolation block BH is rectangular, the size (the number of pixels) is xbnum in the horizontal direction and ybnum in the vertical direction. Further, the position of the pixel bp is (m, l). At this time, the values a × Cb (Ga), (xb
The value b × Cb (Gb), (0, ybnu) at the point (num, 0)
The value c × Cb (Gc), (xbnum, ybnu)
At the point m), there is a value d × Cb (Gd), which is linearly approximated.

【0160】本実施の形態では、各画面毎に異なる係数
Cbをとる。これは、各画面の測光値の平均値を用いて
より品質の高い二値化を可能とするために必要であり、
特に、ブロック分割と画面分割が異なるときに、品質の
高い画面二値化閾値が設定されることとなる。
In this embodiment, a different coefficient Cb is used for each screen. This is necessary to enable higher quality binarization using the average of the photometric values of each screen,
In particular, when the block division and the screen division are different, a high-quality screen binarization threshold is set.

【0161】画素bpに適用する二値化閾値thは、前
述した式(10)を用いることにより算出する。なお、
式(9)および(10)においては、a、b、c、dを
それぞれa×Cb(Ga)、b×Cb(Gb)、c×C
b(Gc)、d×Cb(Gd)に置き換える。
The binarization threshold th applied to the pixel bp is calculated by using the above-described equation (10). In addition,
In Equations (9) and (10), a, b, c, and d are a × Cb (Ga), b × Cb (Gb), and c × C
b (Gc), d × Cb (Gd).

【0162】二値化器123では、フレームメモリ10
7もしくはブロック読出制御器1904から補間ブロッ
クにおける画素bpの輝度値と、二値化閾値補間器25
03で算出した画素bpに対する二値化閾値とを比較し
て、補間ブロックBHの輝度値の二値化を行う。二値化
された画像データは、実施の形態7と同様に、圧縮器1
24でMH、MMRなどの二値化画像に適した画像圧縮
がほどこされる。
In the binarizer 123, the frame memory 10
7 or the block reading controller 1904 outputs the luminance value of the pixel bp in the interpolation block and the binarization threshold value interpolator 25.
The binarization of the luminance value of the interpolation block BH is performed by comparing the binarization threshold value for the pixel bp calculated in 03 with the threshold value. The binarized image data is supplied to the compressor 1 as in the seventh embodiment.
At 24, image compression suitable for binarized images such as MH and MMR is performed.

【0163】図27は、多値画像が二値化されるまでの
画像データの処理流れを表すフローチャートである。ま
ず、CPU108は、CCD101から画像サイズを読
み出す(ステップS2701)。続いて、CPU108
は、測光器1901から出力される測光器のなかから1
画面G(i,j)を設定し(ステップS2702)、当
該画面の平均値を算出する(ステップS2703)。平
均を求める際はすべての測光値を用いてもよいが適宜サ
ンプリングを行ってもよい。
FIG. 27 is a flowchart showing the processing flow of image data until a multi-valued image is binarized. First, the CPU reads the image size from the CCD 101 (step S2701). Subsequently, the CPU 108
Is one of the photometers output from the photometer 1901.
The screen G (i, j) is set (step S2702), and the average value of the screen is calculated (step S2703). When obtaining the average, all photometric values may be used, or sampling may be performed as appropriate.

【0164】次に、画面の測光値の平均値が隣接する画
面の測光値の平均値から突出していないかどうか判定す
る(ステップS2704)。突出している場合は(ステ
ップS2704:YES)、当該測光値の平均値を平滑
化器1902で平滑化する(ステップS2705)。突
出していない場合(ステップS2704:NO)もしく
はステップS2705で平滑化処理が行われた場合は、
その測光値の平均値に基づいて画面二値化閾値を算出し
(ステップS2706)、この画面二値化閾値をメモリ
1702に格納する(ステップS2707)。
Next, it is determined whether or not the average of the photometric values of the screens protrudes from the average of the photometric values of the adjacent screens (step S2704). If it is protruding (step S2704: YES), the average value of the photometric values is smoothed by the smoother 1902 (step S2705). If it has not protruded (step S2704: NO) or if the smoothing process has been performed in step S2705,
A screen binarization threshold is calculated based on the average of the photometric values (step S2706), and the screen binarization threshold is stored in the memory 1702 (step S2707).

【0165】続いて、すべてのブロックに対する画面二
値化閾値の算出が終了したかを判定し(ステップS27
08)、終了していないならば(ステップS2708:
NO)、ステップS2702に移行し、次の画面(たと
えばG(i+1,j))を設定し、ステップS2702
からステップS2708までを繰り返す。すべての画面
で画面二値化閾値の算出が終了したならば(ステップS
2708:YES)、補間ブロックを設定する(ステッ
プS2709)。この補間ブロックは、部分的に高品質
な二値化を行う場合などに適しており、ユーザが予め設
定しておいてもよいし、適当なモード切替により、画像
中心部分を設定する態様であってもよい。
Subsequently, it is determined whether the calculation of the screen binarization threshold for all blocks has been completed (step S27).
08), if not completed (step S2708:
NO), proceeding to step S2702, setting the next screen (for example, G (i + 1, j)), and step S2702.
To step S2708 are repeated. If the calculation of the screen binarization threshold is completed for all the screens (step S
2708: YES), an interpolation block is set (step S2709). This interpolation block is suitable for partially performing high-quality binarization or the like, and may be set in advance by the user, or may be a mode in which an image center portion is set by appropriate mode switching. You may.

【0166】二値化閾値補間器2503は、ステップS
2709で設定された補間ブロックがまたがる画面の画
面二値化閾値(たとえば、a×Cb(Ga)など)を用
いて、補間ブロック内の画素単位の二値化閾値th
(x,y)を設定する(ステップS2710)。
The binarization threshold value interpolator 2503 performs the processing in step S
Using the screen binarization threshold (for example, a × Cb (Ga)) of the screen over which the interpolation block is set in 2709, the pixel-based binarization threshold th in the interpolation block
(X, y) is set (step S2710).

【0167】二値化器123でフレームメモリ107か
ら読み出した画素(g(x,y)とする)を、ステップ
S2710で算出した二値化閾値を用いて二値化する
(ステップS2711)。次に、すべての画素について
二値化処理を行ったか否かを判定し(ステップS271
2)、すべての画素の二値化が終了していない場合(ス
テップS2712:NO)は、g(x,y)に隣接する
補間ブロック内の画素を設定し(たとえば,g(x+
1,y))、ステップS2710からステップS271
2までを繰り返す。すべての画素に対して二値化が終了
した場合は(ステップS2712:YES)、すべての
補間ブロックに対して二値化が終了したか否かを判定し
(ステップS2713)、終了していなければ(ステッ
プS2713:NO)、ステップS2709からステッ
プS2713までを繰り返し、終了していれば(ステッ
プS2713:YES)、処理を終了する。
The pixel (g (x, y)) read from the frame memory 107 by the binarizer 123 is binarized using the binarization threshold calculated in step S2710 (step S2711). Next, it is determined whether or not the binarization processing has been performed for all the pixels (step S271).
2) In a case where binarization of all pixels has not been completed (step S2712: NO), a pixel in an interpolation block adjacent to g (x, y) is set (for example, g (x +
1, y)), steps S2710 to S271
Repeat up to 2. If binarization has been completed for all pixels (step S2712: YES), it is determined whether or not binarization has been completed for all interpolation blocks (step S2713). (Step S2713: NO), Steps S2709 to S2713 are repeated, and if the processing has been completed (Step S2713: YES), the processing is completed.

【0168】実施の形態9では、デジタルカメラに備わ
っている自動測光部から得られる情報(測光値)を利用
して二値化閾値を設定するので、別途二値化閾値を設定
するための処理を不要とする。従って、回路構成が簡単
になりコストの低減を図ることができるとともに、別途
の二値化閾値の計算処理が不要であるため消費電力を低
減することができる。また、光源によるピンポイント的
な写り込みがある画像であっても高品質に多値画像を二
値化することが可能となる。さらに、測光値をもとに補
間ブロック内の個々の画素に適用する二値化閾値を設定
して、二値化するので、実施の形態7のデジタルカメラ
より、高品質な画像処理が可能となる。特に、掲示板を
撮影する場合など、個々の文字が小さい場合や、一部の
領域の文字が小さい場合などに、当該箇所を部分的に高
品質に二値化することが可能となる。
In the ninth embodiment, since the binarization threshold is set using information (photometric value) obtained from the automatic photometer provided in the digital camera, processing for separately setting the binarization threshold is performed. Is unnecessary. Therefore, the circuit configuration is simplified, the cost can be reduced, and the power consumption can be reduced because a separate binarization threshold calculation process is not required. In addition, it is possible to binarize a multi-valued image with high quality even if the image has a pinpoint reflection by a light source. Further, since the binarization is performed by setting a binarization threshold applied to each pixel in the interpolation block based on the photometric value, higher quality image processing can be performed than the digital camera of the seventh embodiment. Become. In particular, when individual characters are small, such as when photographing a bulletin board, or when characters in a part of the region are small, it is possible to partially binarize the portion with high quality.

【0169】(実施の形態10)実施の形態10では、
CMOSセンサと測光器を用いて、所定ブロック内の画
素毎に適用される二値化閾値を算出し、画素毎に画像デ
ータの二値化を行う画像撮像装置をデジタルカメラに適
用した場合について説明する。図28は、CMOSセン
サと測光器を用いて、所定ブロック内の画素毎に適用さ
れる二値化閾値を算出し、画素毎に画像データの二値化
を行う画像撮像装置をデジタルカメラに適用した一例を
示した構成図である。なお、本実施の形態では、実施の
形態9と同様の部分については同一の符合を付してその
詳細な説明を省略するものとし、実施の形態9と異なる
部分を主として説明する。
(Embodiment 10) In Embodiment 10,
A description will be given of a case where an image capturing apparatus that calculates a binarization threshold value applied to each pixel in a predetermined block using a CMOS sensor and a photometer and binarizes image data for each pixel is applied to a digital camera. I do. FIG. 28 shows an example in which a CMOS sensor and a photometer are used to calculate a binarization threshold applied to each pixel in a predetermined block, and apply an image capturing apparatus that binarizes image data for each pixel to a digital camera. FIG. 2 is a configuration diagram showing an example. In the present embodiment, the same parts as those in the ninth embodiment are denoted by the same reference numerals, and detailed description thereof will be omitted. The different parts from the ninth embodiment will be mainly described.

【0170】デジタルカメラ2800は画像入力部にC
MOSセンサ2801を有する。従って、ラスター走査
しかできないCCD101(図25参照)と異なり、C
MOSセンサ2801はランダムアクセスが可能で、ブ
ロック単位での読み出しができるので、フレームメモリ
107およびブロック読出制御器1904が不要とな
り、回路構成が簡単となる。この場合はCPU108
が、ブロック読出制御器の役割を持つことになる。
The digital camera 2800 has a C
It has a MOS sensor 2801. Therefore, unlike the CCD 101 (see FIG. 25) which can only perform raster scanning,
Since the MOS sensor 2801 can perform random access and can read data in units of blocks, the frame memory 107 and the block read controller 1904 become unnecessary, and the circuit configuration is simplified. In this case, the CPU 108
Have the role of a block read controller.

【0171】さらに、CCD101はCMOS集積回路
とは別の電源を必要とするのに対し、CMOSセンサ2
801はCMOS集積回路と同じ電源を使用でき、消費
電力も小さくなる。従って、デジタルカメラ2800と
しての回路規模も小さくなるため、消費電力、処理速
度、コストなどにおいて、CCDを使用したシステムよ
り利便性が高い。なお、本実施の形態ではCMOSセン
サを用いたが、その他のブロックアクセス可能な画像入
力部を有する画像撮像装置であってもよい。
Further, while the CCD 101 requires a power supply different from that of the CMOS integrated circuit, the CMOS sensor 2
The power supply 801 can use the same power supply as that of the CMOS integrated circuit, and consumes less power. Accordingly, the circuit size of the digital camera 2800 is also reduced, so that power consumption, processing speed, cost, and the like are more convenient than a system using a CCD. Although the CMOS sensor is used in the present embodiment, an image capturing apparatus having an image input unit capable of accessing other blocks may be used.

【0172】(実施の形態11)実施の形態11では、
測光手段から出力される測光値に基づき、その測光値を
所定レンジ内に収まる調整を行った後、各処理対象ブロ
ックに対する二値化閾値を設定する画像撮像装置をデジ
タルカメラに適用した場合について説明する。図29
は、測光手段から出力される測光値に基づき、その測光
値を所定レンジ内に収まる調整を行った後、各処理対象
ブロックに対する二値化閾値を設定する画像撮像装置を
デジタルカメラに適用した場合について、画像入力から
二値化処理をした画像を記録するまでの装置構成の一例
を示したブロック図である。
(Eleventh Embodiment) In the eleventh embodiment,
A description will be given of a case where an image capturing apparatus that sets a binarization threshold for each processing target block is applied to a digital camera after adjusting the photometric value within a predetermined range based on the photometric value output from the photometric unit. I do. FIG.
Is based on the photometric value output from the photometric means, after adjusting the photometric value to fall within a predetermined range, and applying an image capturing apparatus that sets a binarization threshold for each processing target block to a digital camera. FIG. 3 is a block diagram showing an example of a device configuration from image input to recording of a binarized image.

【0173】デジタルカメラ2900は、CCD101
と、A/D変換器102と、ホワイトバランス調整器1
03と、画素補間器104と、輝度生成器105と、ア
パーチャ補正器106と、フレームメモリ107と、C
PU108と、測光器2901と、平滑化器2902
と、制限器2905と、メモリ2903と、ブロック読
出制御器2904と、二値化閾値設定回路122と、二
値化器123と、圧縮器124と、画像記憶メモリ12
5と、からなる。色差信号を生成する部分は省略してい
る。
The digital camera 2900 includes the CCD 101
, A / D converter 102 and white balance adjuster 1
03, a pixel interpolator 104, a luminance generator 105, an aperture corrector 106, a frame memory 107,
PU 108, photometer 2901, smoother 2902
, A limiter 2905, a memory 2903, a block read controller 2904, a binarization threshold setting circuit 122, a binarizer 123, a compressor 124, and the image storage memory 12
5 A part for generating a color difference signal is omitted.

【0174】測光器2901は、画像撮影前に被写体の
測光を行う自動露出検知機構(AE)を有し、A/D変
換器102から出力されるデジタル信号に基づき、各画
面の明るさを測定する。測光の方法は、画素の輝度値の
加算により測定する。このときCPU108は、測光器
2901で加算に使用する測光値をサンプリングするこ
とも可能である。
The photometer 2901 has an automatic exposure detection mechanism (AE) for performing photometry of a subject before photographing an image, and measures the brightness of each screen based on a digital signal output from the A / D converter 102. I do. The photometry is performed by adding the luminance values of the pixels. At this time, the CPU 108 can also sample the photometric value used for the addition by the photometer 2901.

【0175】平滑化器2902は、測光器2901で得
られた各画面の測光値を平滑化し、ave(i,j)と
して制限器2905に出力する。平滑化の一例として、
次の処理が挙げられる。すなわち、測光器2901内の
一つの画面(G(i,j)とする)に含まれる全画素数
の測光値の平均値ave(i,j)(もしくは画面G
(i,j)のなかからサンプリングされた測光値の平均
値)が周囲の画面の測光値の平均値から突出した値であ
る場合に、画面G(i,j)の各画素の測光値を補正し
て、周囲の画面の測光値の平均値に比して突出した値に
ならないようにする。
The smoother 2902 smoothes the photometric value of each screen obtained by the photometer 2901 and outputs it to the limiter 2905 as ave (i, j). As an example of smoothing,
The following processing is included. That is, the average value ave (i, j) of the photometric values of all the pixels included in one screen (G (i, j)) in the photometer 2901 (or the screen G
When the average value of the photometric values sampled from (i, j)) is a value protruding from the average value of the photometric values of the surrounding screen, the photometric value of each pixel of the screen G (i, j) is calculated. The correction is performed so that the value does not become prominent compared with the average value of the photometric values of the surrounding screen.

【0176】この処理を実現するアルゴリズムとしての
一例を以下に示す。画面G(i,j)に隣接する4画面
の平均測光値をave4(i,j)として、画面G
(i,j)の平均測光値ave(i,j)がave4
(i,j)の3倍以上である場合に画面G(i,j)の
平均測光値ave(i,j)を次式(12)のように変
換する。 if ave(i,j)≧3*ave4(i,j) then ave(i,j)=ave4(i,j) +(1/4)*(ave(i,j) −ave4(i,j)) ‥‥(12)
An example of an algorithm for realizing this processing is shown below. The average photometry value of four screens adjacent to the screen G (i, j) is set as ave4 (i, j), and the screen G
The average photometric value ave (i, j) of (i, j) is ave4
When it is three times or more than (i, j), the average photometric value ave (i, j) of the screen G (i, j) is converted as in the following equation (12). if ave (i, j) ≧ 3 * ave4 (i, j) then ave (i, j) = ave4 (i, j) + (1/4) * (ave (i, j) −ave4 (i, j) )) ‥‥ (12)

【0177】平滑化器2902では、上記のように、画
面G(i,j)の平均測光値ave(i,j)を計算す
る。さらに、制限器2905においてave(i,j)
を予め設定した下限値に制限して低すぎる平均測光値が
出力されるのを防ぐ。その後、メモリ2903に平均測
光値を出力する。なお、使用の態様によっては平滑化器
2902を設けることなく制限器2905で範囲制限し
た測光値を出力してもよい。
The smoother 2902 calculates the average photometric value ave (i, j) of the screen G (i, j) as described above. Further, in the limiter 2905, ave (i, j)
Is limited to a preset lower limit to prevent the output of an average photometry value that is too low. After that, the average photometric value is output to the memory 2903. Note that, depending on the mode of use, the photometric value whose range is limited by the limiter 2905 may be output without providing the smoothing unit 2902.

【0178】二値化閾値設定回路122は、ave
(i,j)に基づいて二値化閾値TH(i,j)を設定
する。設定手段は、所定の係数Cbをave(i,j)
に乗ずる乗算器であるが、Cb=x/16、あるいはC
b=x/8(xは分母を超えない自然数を表す既定値)
とすれば、二値化閾値設定回路122は加算器のみで構
成できるので、コスト、スピードの点で有利になる。な
お、測光値が大きなブロックに対してはCbの値を1に
近づくように大きくし、白飛びが発生している領域に対
して二値化閾値と平均測光値との差を小さくする。な
お、本実施の形態では平滑化器2902があるので、平
滑化器2902により平滑化された領域に関しては、実
施の形態7を用いて示したようにCm=0もしくはCm
<0として減算を行って二値化閾値THを算出してもよ
い。
The binarization threshold value setting circuit 122 outputs
The binarization threshold TH (i, j) is set based on (i, j). The setting means sets a predetermined coefficient Cb to ave (i, j)
Is multiplied by Cb = x / 16 or Cb = x / 16
b = x / 8 (x is a default value representing a natural number not exceeding the denominator)
Then, since the binarization threshold value setting circuit 122 can be constituted only by an adder, it is advantageous in terms of cost and speed. Note that the value of Cb is increased so as to approach 1 for a block having a large photometric value, and the difference between the binarization threshold and the average photometric value is reduced for an area where whiteout occurs. In the present embodiment, since there is a smoother 2902, as for the region smoothed by the smoother 2902, Cm = 0 or Cm as described using the seventh embodiment.
The binarization threshold TH may be calculated by performing subtraction as <0.

【0179】二値化器123は二値化閾値TH(i,
j)に基づいて、画面G(i,j)に対応したブロック
B(i,j)の各画素を二値化する。圧縮器124はM
H、MMR等により二値画像に適した圧縮を行う。画像
記憶メモリ125は、圧縮された画像を記憶する。
The binarizer 123 outputs a binarization threshold TH (i,
Based on j), each pixel of the block B (i, j) corresponding to the screen G (i, j) is binarized. Compressor 124 is M
Compression suitable for a binary image is performed by H, MMR, or the like. The image storage memory 125 stores the compressed image.

【0180】次に、多値画像が二値化されるまでの処理
の流れを説明する。図30は、多値画像が二値化される
までの画像データの処理流れを表すフローチャートであ
る。まず、CPU108は、CCD101から画像サイ
ズを読み出す(ステップS3001)。続いて、CPU
108は、測光器2901から出力される測光値のなか
から1画面G(i,j)を設定し(ステップS300
2)、当該画面の平均値を算出する(ステップS300
3)。平均を求める際はすべての測光値を用いてもよい
が適宜サンプリングを行ってもよい。
Next, the flow of processing until a multi-valued image is binarized will be described. FIG. 30 is a flowchart illustrating a processing flow of image data until a multi-valued image is binarized. First, the CPU reads the image size from the CCD 101 (step S3001). Then, CPU
108 sets one screen G (i, j) from the photometric values output from the photometer 2901 (step S300).
2), calculate the average value of the screen (step S300)
3). When obtaining the average, all photometric values may be used, or sampling may be performed as appropriate.

【0181】次に、画面の測光値の平均値が隣接する画
面の測光値の平均値から突出していないかどうか判定す
る(ステップS3004)。突出している場合は(ステ
ップS3004:YES)、当該測光値の平均値を平滑
化器2902で平滑化する(ステップS3005)。突
出していない場合(ステップS3004:NO)もしく
はステップS3005で平滑化処理が行われた場合、出
力された測光値が低すぎる値かどうかを判定する(ステ
ップS3006)。低すぎる場合は(ステップS300
6:YES)、その測光値の値を所定の値に置き換える
(ステップS3007)。低すぎる値でない場合(ステ
ップS3006:NO)もしくはステップS3007で
置き換え処理が行われた場合、画面G(i,j)の測光
値に基づいて二値化閾値を算出する(ステップS300
8)。
Next, it is determined whether or not the average value of the photometric values of the screens protrudes from the average value of the photometric values of the adjacent screen (step S3004). If it is protruding (step S3004: YES), the average of the photometric values is smoothed by the smoothing unit 2902 (step S3005). If it does not protrude (step S3004: NO) or if the smoothing process is performed in step S3005, it is determined whether the output photometric value is too low (step S3006). If it is too low (step S300
6: YES), the value of the photometric value is replaced with a predetermined value (step S3007). When the value is not too low (step S3006: NO) or when the replacement process is performed in step S3007, a binarization threshold is calculated based on the photometric value of the screen G (i, j) (step S300).
8).

【0182】次に、フレームメモリ107から画面G
(i,j)に対応するブロックB(i,j)をブロック
読出制御器2904が読み出し(ステップS300
9)、この二値化閾値を用いてブロック内の多値画像を
二値化する(ステップS3010)。すべてのブロック
について二値化が終了したならば(ステップS301
1:YES)、二値化処理を終了し、終了していないな
らば(ステップS3011:NO)、ステップS300
2に移行し、次の画面(たとえばG(i+1,j))を
設定し、以降ステップS3002からステップS301
1を繰り返す。
Next, the screen G is read from the frame memory 107.
The block read controller 2904 reads the block B (i, j) corresponding to (i, j) (Step S300)
9), the multi-valued image in the block is binarized using the binarization threshold (step S3010). If binarization has been completed for all blocks (step S301)
1: YES), the binarization process ends, and if not (step S3011: NO), step S300
2 and the next screen (for example, G (i + 1, j)) is set. Thereafter, steps S3002 to S301 are performed.
Repeat 1.

【0183】実施の形態11は、デジタルカメラに備わ
っている自動測光部から得られる情報(測光値)を利用
して二値化閾値を設定するので、別途二値化閾値を設定
するための処理を不要とする。従って、回路構成が簡単
になりコストの低減を図ることができるとともに、別途
の二値化閾値の計算処理が不要であるため消費電力を低
減することができる。また、光源によるピンポイント的
な写り込みがある画像であっても高品質に多値画像を二
値化することができる。また、平滑化器と制限器の併用
により、効率的に二値化閾値が設定される。
In the eleventh embodiment, since the binarization threshold is set using information (photometric value) obtained from the automatic photometer provided in the digital camera, a process for separately setting the binarization threshold is performed. Is unnecessary. Therefore, the circuit configuration is simplified, the cost can be reduced, and the power consumption can be reduced because a separate binarization threshold calculation process is not required. Further, it is possible to binarize a multi-valued image with high quality even if the image has a pinpoint reflection by a light source. In addition, the binarization threshold is set efficiently by using the smoother and the limiter together.

【0184】なお、デジタルカメラ2900では、CC
D101を用いたが、使用の態様によっては、図31に
示したように、CMOSセンサ3101を用いたデジタ
ルカメラ3100の構成とすることもできる。この様な
構成にすることによりデジタルカメラ2900に比し、
フレームメモリやブロック読出制御器が不要となり、回
路構成が簡単になる。また、CMOSセンサ3101は
CMOS集積回路と同じ電源を使用でき、消費電力も小
さくなる。従ってデジタルカメラ3100は、デジタル
カメラ2900よりも回路規模を小さくすることがで
き、消費電力も小さくなる。従って、デジタルカメラ2
900より消費電力、処理速度、コストなどにおいて利
便性の高いデジタルカメラを提供することが可能とな
る。
In the digital camera 2900, CC
Although D101 is used, a configuration of a digital camera 3100 using a CMOS sensor 3101 can be adopted as shown in FIG. With such a configuration, compared to the digital camera 2900,
A frame memory and a block reading controller are not required, and the circuit configuration is simplified. Further, the same power supply as that of the CMOS integrated circuit can be used for the CMOS sensor 3101, and power consumption is reduced. Therefore, the digital camera 3100 can have a smaller circuit scale than the digital camera 2900, and also consumes less power. Therefore, digital camera 2
It is possible to provide a digital camera that is more convenient than 900 in terms of power consumption, processing speed, cost, and the like.

【0185】(実施の形態12)実施の形態12では、
所定レンジ内に範囲制限した測光値をもとに、所定のブ
ロック内の個々の画素に適用する二値化閾値を算出する
画像撮像装置をデジタルカメラに適用した場合について
説明する。図32は、所定レンジ内に範囲制限した測光
値をもとに、所定のブロック内の個々の画素に適用する
二値化閾値を算出する画像撮像装置をデジタルカメラに
適用した一例を示した構成図である。
(Twelfth Embodiment) In the twelfth embodiment,
A case will be described in which an image capturing apparatus that calculates a binarization threshold to be applied to individual pixels in a predetermined block based on photometric values limited to a predetermined range is applied to a digital camera. FIG. 32 is a diagram illustrating an example in which an image capturing apparatus that calculates a binarization threshold to be applied to each pixel in a predetermined block based on photometric values limited to a predetermined range is applied to a digital camera. FIG.

【0186】デジタルカメラ3200は、CCD101
と、A/D変換器102と、ホワイトバランス調整器1
03と、画素補間器104と、輝度生成器105と、ア
パーチャ補正器106と、フレームメモリ107と、C
PU108と、測光器2901と、平滑化器2902
と、制限器3201と、ブロック二値化閾値設定回路1
001と、メモリ1002と、二値化閾値補間器100
3と、二値化器123と、圧縮器124と、画像記憶メ
モリ125と、からなる。色差信号を生成する部分は省
略している。
The digital camera 3200 includes the CCD 101
, A / D converter 102 and white balance adjuster 1
03, a pixel interpolator 104, a luminance generator 105, an aperture corrector 106, a frame memory 107,
PU 108, photometer 2901, smoother 2902
, Limiter 3201, and block binarization threshold setting circuit 1
001, the memory 1002, and the binarization threshold interpolator 100
3, a binarizer 123, a compressor 124, and an image storage memory 125. A part for generating a color difference signal is omitted.

【0187】CCD101は、デジタルカメラ3200
の光学系(図示せず)により集光された光を電気信号に
変換する部位であり、多値画像を構成する各画素のRG
Bアナログ信号を出力する部位である。出力されたアナ
ログ信号は、A/D変換器102でデジタル信号に変換
される。デジタル信号は、ホワイトバランス調整器10
3、画素補間器104、輝度生成器105、アパーチャ
補正器106を通じて、輝度値の補間、抽出などの処理
を受け、フレームメモリ107に一時記憶される。
The CCD 101 is a digital camera 3200
Is a part that converts light condensed by an optical system (not shown) into an electric signal.
It is a part that outputs a B analog signal. The output analog signal is converted into a digital signal by the A / D converter 102. The digital signal is sent to the white balance adjuster 10
3. Through the pixel interpolator 104, the luminance generator 105, and the aperture corrector 106, processing such as interpolation and extraction of luminance values is performed, and is temporarily stored in the frame memory 107.

【0188】CPU108は、デジタルカメラ3200
の各回路、各部位を制御する。測光器2901は、画像
撮影前に被写体の測光を行う自動露出検知機構(AE)
を有し、A/D変換器102から出力されるデジタル信
号に基づき、各画面の明るさを測定する。測光の方法
は、画素の輝度値の加算により測定する。このときCP
U108は、測光器2901で加算に使用する測光値を
サンプリングすることも可能である。
The CPU 108 is a digital camera 3200
Each circuit and each part are controlled. A photometer 2901 is an automatic exposure detection mechanism (AE) that performs photometry of a subject before capturing an image.
And measures the brightness of each screen based on the digital signal output from the A / D converter 102. The photometry is performed by adding the luminance values of the pixels. At this time CP
U108 can also sample the photometric value used for the addition by the photometer 2901.

【0189】平滑化器2902は、測光器2901で得
られた各画面の測光値を平滑化し、ave(i,j)と
して制限器3201に出力する。さらに、制限器320
1においてave(i,j)を予め設定した下限値に制
限して低すぎる平均測光値が出力されるのを防ぐ。
The smoothing unit 2902 smoothes the photometric value of each screen obtained by the photometer 2901 and outputs it to the limiter 3201 as ave (i, j). Further, the limiter 320
In step 1, ave (i, j) is limited to a preset lower limit to prevent output of an average photometry value that is too low.

【0190】ブロック二値化閾値設定回路1001は、
ave(i,j)に基づいて二値化閾値TH(i,j)
を設定する。すべてのブロックのブロック二値化閾値は
メモリ1002に記憶される。次に、全ブロックのブロ
ック二値化閾値を用いて、二値化閾値補間器1003で
画素単位の二値化閾値を算出する。画素毎に二値化閾値
を算出しながら当該画素の輝度値をフレームメモリ10
7から同時に読み出し、輝度値と二値化閾値を二値化器
123に入力する。二値化器123では二値化閾値と輝
度値を比較して輝度値の二値化を行う。二値化された画
像は、圧縮器124でMH、MMR等の二値画像に適し
た画像圧縮がなされる。圧縮された画像は、画像記憶メ
モリ125に記憶される。また、CCD101の代わり
にCMOSセンサを用いても同様の構成でデジタルカメ
ラが実現できる。
The block binarization threshold value setting circuit 1001
threshold value TH (i, j) based on ave (i, j)
Set. Block binarization thresholds of all blocks are stored in the memory 1002. Next, using the binarization thresholds of all the blocks, the binarization threshold interpolator 1003 calculates a binarization threshold for each pixel. While calculating the binarization threshold value for each pixel, the luminance value of the pixel is stored in the frame memory 10.
7, and the luminance value and the binarization threshold are input to the binarizer 123. The binarizer 123 binarizes the luminance value by comparing the binarization threshold with the luminance value. The binarized image is subjected to image compression suitable for a binary image such as MH or MMR by the compressor 124. The compressed image is stored in the image storage memory 125. Further, a digital camera can be realized with a similar configuration even if a CMOS sensor is used instead of the CCD 101.

【0191】次に、多値画像が二値化されるまでの処理
の流れを説明する。図33は、多値画像が二値化される
までの画像データの処理流れを表すフローチャートであ
る。まず、CPU108は、CCD101から画像サイ
ズを読み出す(ステップS3301)。続いて、CPU
108は、測光器2901から出力される測光値のなか
から1画面G(i,j)を設定し(ステップS330
2)、当該画面の平均値を算出する(ステップS330
3)。平均を求める際はすべての測光値を用いてもよい
が適宜サンプリングを行ってもよい。
Next, the flow of processing until a multi-valued image is binarized will be described. FIG. 33 is a flowchart illustrating a processing flow of image data until a multi-valued image is binarized. First, the CPU reads the image size from the CCD 101 (step S3301). Then, CPU
108 sets one screen G (i, j) from the photometric values output from the photometer 2901 (step S330).
2), calculate the average value of the screen (step S330)
3). When obtaining the average, all photometric values may be used, or sampling may be performed as appropriate.

【0192】次に、画面の測光値の平均値が隣接する画
面の測光値の平均値から突出していないかどうか判定す
る(ステップS3304)。突出している場合は(ステ
ップS3304:YES)、当該測光値の平均値を平滑
化器2902で平滑化する(ステップS3305)。突
出していない場合(ステップS3304:NO)もしく
はステップS3305で平滑化処理が行われた場合、次
に測光値が低すぎる値かどうかを判定する(ステップS
3306)。低すぎる場合は(ステップS3306:Y
ES)、その測光値を所定の値に置き換える(ステップ
S3307)。低すぎる値でない場合(ステップS33
06:NO)もしくはステップS3307で置き換え処
理が行われた場合、画面G(i,j)の測光値に基づい
て画面に対応するブロックのブロック二値化閾値TH
(i,j)を算出する(ステップS3308)。
Next, it is determined whether or not the average value of the photometric values of the screens protrudes from the average value of the photometric values of the adjacent screen (step S3304). If it is protruding (step S3304: YES), the average of the photometric values is smoothed by the smoother 2902 (step S3305). If it does not protrude (step S3304: NO) or if the smoothing process has been performed in step S3305, it is next determined whether the photometric value is too low (step S3).
3306). If it is too low (step S3306: Y
ES), the photometric value is replaced with a predetermined value (step S3307). If the value is not too low (step S33)
06: NO) or when the replacement process is performed in step S3307, based on the photometric value of the screen G (i, j), the block binarization threshold TH of the block corresponding to the screen G (i, j)
(I, j) is calculated (step S3308).

【0193】次にすべてのブロックについてブロック二
値化閾値が計算されたか否かを判定し(ステップS33
09)、すべてのブロックのブロック二値化閾値が計算
された場合(ステップS3309:YES)は処理を次
ステップに移し、計算されていない場合(ステップS3
309:NO)はG(i,j)に隣接するブロックを設
定し(たとえばG(i+1,j))、ステップS330
2からステップS3309までを繰り返す。
Next, it is determined whether or not the block binarization threshold has been calculated for all the blocks (step S33).
09), if the block binarization thresholds of all blocks have been calculated (step S3309: YES), the process proceeds to the next step, and if not (step S3).
309: NO) sets a block adjacent to G (i, j) (for example, G (i + 1, j)), and proceeds to step S330.
Steps 2 to S3309 are repeated.

【0194】すべてのブロックについてブロック二値化
閾値が計算された場合(ステップS3309:YE
S)、補間ブロックを設定する(ステップS331
0)。二値化閾値補間器1003は、二値化閾値を用い
て補間により画素単位の二値化閾値th(x,y)を算
出する(ステップS3311)。なお、x、yは画像の
各画素の位置を表す自然数である。さらにこの二値化閾
値th(x,y)を用いてフレームメモリ107から読
み出した画素(g(x,y)とする)を二値化する(ス
テップS3312)。すべての画素について二値化処理
を行ったか否かを判定し(ステップS3313)、すべ
ての画素の二値化が終了しない場合(ステップS331
3:NO)はg(x,y)に隣接する画素を設定し(た
とえば、g(x+1,y))、ステップS3311から
ステップS3313までを繰り返す。
When the block binarization threshold has been calculated for all blocks (step S3309: YE
S), and sets an interpolation block (step S331)
0). The binarization threshold interpolator 1003 calculates a binarization threshold th (x, y) for each pixel by interpolation using the binarization threshold (step S3311). Note that x and y are natural numbers indicating the position of each pixel of the image. Further, using the binarization threshold th (x, y), the pixel (g (x, y)) read from the frame memory 107 is binarized (step S3312). It is determined whether or not the binarization processing has been performed for all the pixels (step S3313), and when the binarization of all the pixels has not been completed (step S331).
3: NO) sets a pixel adjacent to g (x, y) (for example, g (x + 1, y)), and repeats steps S3311 to S3313.

【0195】また、すべての画素で二値化が終了した場
合は(ステップS3313:YES)、すべての補間ブ
ロックで二値化が終了したかを判定し(ステップS33
14)、終了していないならば(ステップS3314:
NO)、ステップS3310からステップS3314ま
でを繰り返し、すべての補間ブロックで二値化が終了し
たならば(ステップS3314:YES)、処理を終了
する。
If the binarization has been completed for all the pixels (step S3313: YES), it is determined whether the binarization has been completed for all the interpolation blocks (step S33).
14) If not completed (step S3314:
NO), Steps S3310 to S3314 are repeated, and if binarization has been completed for all interpolation blocks (Step S3314: YES), the process ends.

【0196】実施の形態12では、デジタルカメラに備
わっている自動測光部から得られる情報(測光値)を利
用して二値化閾値を設定するので、別途二値化閾値を設
定するための処理を不要とする。従って、回路構成が簡
単になりコストの低減を図ることができるとともに、別
途の二値化閾値の計算処理が不要であるため消費電力を
低減することができる。また、光源によるピンポイント
的な写り込みがある画像であっても高品質に多値画像を
二値化することが可能となる。また、平滑化器と制限器
の併用により、効率的に二値化閾値が設定される。さら
に、測光値をもとに補間ブロック内の個々の画素に適用
する二値化閾値を設定して、二値化するので、高品質な
画像処理が可能となる。特に、掲示板を撮影する場合な
ど、個々の文字が小さい場合や、一部の領域の文字が小
さい場合などに、当該箇所を部分的に高品質に二値化す
ることが可能となる。
In the twelfth embodiment, since the binarization threshold is set using information (photometric value) obtained from the automatic photometer provided in the digital camera, processing for separately setting the binarization threshold is performed. Is unnecessary. Therefore, the circuit configuration is simplified, the cost can be reduced, and the power consumption can be reduced because a separate binarization threshold calculation process is not required. In addition, it is possible to binarize a multi-valued image with high quality even if the image has a pinpoint reflection by a light source. In addition, the binarization threshold is set efficiently by using the smoother and the limiter together. Furthermore, since binarization is performed by setting a binarization threshold value applied to each pixel in the interpolation block based on the photometric value, high-quality image processing can be performed. In particular, when individual characters are small, such as when photographing a bulletin board, or when characters in a part of the region are small, it is possible to partially binarize the portion with high quality.

【0197】(実施の形態13)実施の形態13では、
画像二値化をCPUにおいてソフトウェア処理で行う画
像撮像装置について説明する。図34は、画像二値化を
CPUにおいてソフトウェア処理で行う画像撮像装置を
デジタルカメラに適用した場合について、画像入力から
二値化処理をした画像を記録するまでの装置構成の一例
を示したブロック図である。なお、本実施の形態では、
前述した各実施の形態と同様の構成要素については同一
の符合を付してその詳細な説明を省略するものとし、異
なる部分を主として説明するものとする。
(Thirteenth Embodiment) In the thirteenth embodiment,
An image capturing apparatus that performs image binarization by software processing in a CPU will be described. FIG. 34 is a block diagram illustrating an example of a device configuration from image input to recording of a binarized image in a case where an image capturing device that performs image binarization by software processing in a CPU is applied to a digital camera. FIG. In the present embodiment,
The same components as those in the above-described embodiments are denoted by the same reference numerals, and detailed description thereof will be omitted. Different portions will mainly be described.

【0198】デジタルカメラ3400は、CCD101
と、A/D変換器102と、ホワイトバランス調整器1
03と、画素補間器104と、輝度生成器105と、ア
パーチャ補正器106と、フレームメモリ107と、C
PU3401と、ROM3402、RAM3403と、
画像記憶メモリ125と、からなる。色差信号を生成す
る部分は省略している。
The digital camera 3400 includes the CCD 101
, A / D converter 102 and white balance adjuster 1
03, a pixel interpolator 104, a luminance generator 105, an aperture corrector 106, a frame memory 107,
PU3401, ROM3402, RAM3403,
An image storage memory 125. A part for generating a color difference signal is omitted.

【0199】CCD101は、デジタルカメラ3400
の光学系(図示せず)により集光された光を電気信号に
変換する部位であり、多値画像を構成する各画素のRG
Bアナログ信号を出力する部位である。出力されたアナ
ログ信号は、A/D変換器102でデジタル信号に変換
される。デジタル信号は、ホワイトバランス調整器10
3、画素補間器104、輝度生成器105、アパーチャ
補正器106を通じて、輝度値の補間、抽出などの処理
を受け、フレームメモリ107に一時記憶される。
The CCD 101 is a digital camera 3400
Is a part that converts light condensed by an optical system (not shown) into an electric signal.
It is a part that outputs a B analog signal. The output analog signal is converted into a digital signal by the A / D converter 102. The digital signal is sent to the white balance adjuster 10
3. Through the pixel interpolator 104, the luminance generator 105, and the aperture corrector 106, processing such as interpolation and extraction of luminance values is performed, and is temporarily stored in the frame memory 107.

【0200】CPU3401は、デジタルカメラ340
0の各回路、各部位を制御するとともに、画像二値化の
処理機能を有する。CPU3401に接続されたROM
3402には、二値化の機能を実現するソフトウェアプ
ログラムが格納されている。また、係数CbもしくはC
mも格納されている。また、RAM3403は、二値化
処理を行うためのワークエリアとして画像データなどの
データを格納する。
The CPU 3401 is a digital camera 340
In addition to controlling each circuit and each part of 0, it has a processing function of image binarization. ROM connected to CPU 3401
3402 stores a software program for realizing the binarization function. Further, the coefficient Cb or C
m is also stored. Further, the RAM 3403 stores data such as image data as a work area for performing a binarization process.

【0201】ROM3402には、これまで説明した、
実施の形態における平均輝度算出器、低輝度閾値設定
器、二値化閾値設定回路、二値化閾値補間器、二値化
器、圧縮器などの機能を実現するソフトウェアプログラ
ムが格納されており、平均輝度算出、二値化閾値設定、
二値化、二値画像の圧縮などの機能がCPU3401に
おいてプログラムが実行されることにより実現できる。
CPU3401で二値化、圧縮された画像は画像記憶メ
モリ125に記憶される。
[0201] The ROM 3402 contains
The average luminance calculator in the embodiment, a low luminance threshold setting device, a binarization threshold setting circuit, a binarization threshold interpolator, a binarizer, a software program for realizing functions such as a compressor are stored, Average brightness calculation, binarization threshold setting,
Functions such as binarization and compression of a binary image can be realized by executing a program in the CPU 3401.
The image binarized and compressed by the CPU 3401 is stored in the image storage memory 125.

【0202】デジタルカメラ3400は、使用の態様に
よっては、ROM3402には、測光器、平滑化器、制
限器、ブロック二値化閾値設定回路、二値化閾値補間
器、二値化器、圧縮器などの機能を実現するソフトウェ
アプログラムが格納されており、二値化閾値設定、二値
化、二値画像の圧縮などの機能がCPU3401におい
てプログラムが実行されることにより実現できる。CP
U3401で二値化、圧縮された画像は画像記憶メモリ
125に記憶される。また、CCD101の代わりにC
MOSセンサを使用してもよい。
The digital camera 3400 may have a photometer, a smoother, a limiter, a block binarization threshold setting circuit, a binarization threshold interpolator, a binarizer, and a compressor depending on the mode of use. A software program that realizes functions such as binarization threshold setting, binarization, and compression of a binary image is realized by the CPU 3401 executing the program. CP
The image binarized and compressed in U3401 is stored in the image storage memory 125. Also, instead of the CCD 101, C
A MOS sensor may be used.

【0203】実施の形態13では、CPU3401およ
びROM3402により各機能を実現するので、個々の
機能部をつくり分けなくてすみ、開発費を削減すること
が可能となるとともに、安価なデジタルカメラを提供す
ることが可能となる。また、ソフトウェアをアップグレ
ードすることにより、常に最新のアルゴリズムを提供す
ることが可能となる。
In the thirteenth embodiment, since each function is realized by the CPU 3401 and the ROM 3402, it is not necessary to separately form each functional unit, and it is possible to reduce the development cost and to provide an inexpensive digital camera. It becomes possible. In addition, by upgrading software, it is possible to always provide the latest algorithm.

【0204】(実施の形態14)実施の形態14では、
画像二値化をCPUにおいてソフトウェア処理で行う測
光器を有する画像撮像装置について説明する。図35
は、画像二値化をCPUにおいてソフトウェア処理で行
う画像撮像装置をデジタルカメラに適用した場合につい
て、画像入力から二値化処理をした画像を記録するまで
の装置構成を表すブロック図である。なお、本実施の形
態では、前述した実施の形態13と同様の構成要素につ
いては詳細な説明を省略するものとし、異なる部分を主
として説明するものとする。
(Embodiment 14) In Embodiment 14,
An image pickup apparatus having a photometer that performs image binarization by software processing in a CPU will be described. FIG.
FIG. 3 is a block diagram illustrating a device configuration from image input to recording of a binarized image in a case where an image capturing device that performs image binarization by software processing in a CPU is applied to a digital camera. In the present embodiment, detailed description of the same components as those in the above-described thirteenth embodiment will be omitted, and different portions will be mainly described.

【0205】デジタルカメラ3500は、CCD101
と、A/D変換器102と、ホワイトバランス調整器1
03と、画素補間器104と、輝度生成器105と、ア
パーチャ補正器106と、フレームメモリ107と、C
PU3501と、ROM3502、RAM3503、測
光器3504と、メモリ3505と、画像記憶メモリ1
25と、からなる。色差信号を生成する部分は省略して
いる。
The digital camera 3500 includes the CCD 101
, A / D converter 102 and white balance adjuster 1
03, a pixel interpolator 104, a luminance generator 105, an aperture corrector 106, a frame memory 107,
PU 3501, ROM 3502, RAM 3503, photometer 3504, memory 3505, image storage memory 1
25. A part for generating a color difference signal is omitted.

【0206】CCD101は、デジタルカメラ3500
の図示しない光学系により集光された光を電気信号に変
換する部位であり、多値画像を構成する各画素のRGB
アナログ信号を出力する部位である。出力されたアナロ
グ信号は、A/D変換器102でデジタル信号に変換さ
れる。デジタル信号は、ホワイトバランス調整器10
3、画素補間器104、輝度生成器105、アパーチャ
補正器106を通じて、輝度値の補間、抽出などの処理
を受け、フレームメモリ107に一時記憶される。
The CCD 101 is a digital camera 3500
Is a part that converts light condensed by an optical system (not shown) into an electric signal.
This is a part that outputs an analog signal. The output analog signal is converted into a digital signal by the A / D converter 102. The digital signal is sent to the white balance adjuster 10
3. Through the pixel interpolator 104, the luminance generator 105, and the aperture corrector 106, processing such as interpolation and extraction of luminance values is performed, and is temporarily stored in the frame memory 107.

【0207】測光器3504は、画像撮影前に被写体の
測光を行う自動露出検知機構(AE)を有し、A/D変
換器102から出力されるデジタル信号に基づき、各画
面の明るさを測定する。測光の方法は、画素の輝度値の
加算により測定する。このときCPU3501は、測光
器3504で加算に使用する測光値をサンプリングする
ことも可能である。本測光器3504において輝度信号
生成と同時に平均輝度を算出することができるので、C
PU3501における演算量が削減され画像の撮像から
二値画像の記憶まで実施の形態13と比較してより高速
に実行できる。
The photometer 3504 has an automatic exposure detection mechanism (AE) for performing photometry of a subject before taking an image, and measures the brightness of each screen based on a digital signal output from the A / D converter 102. I do. The photometry is performed by adding the luminance values of the pixels. At this time, the CPU 3501 can also sample the photometric value used for the addition by the photometer 3504. Since the photometer 3504 can calculate the average luminance simultaneously with the generation of the luminance signal,
The amount of calculation in the PU 3501 is reduced, and the processing from image capturing to storage of a binary image can be performed at a higher speed than in the thirteenth embodiment.

【0208】CPU3501は、デジタルカメラ350
0の各回路、各部位を制御するとともに、画像二値化の
ための機能を有する。CPU3501に接続されたRO
M3502には、二値化の機能を実現するソフトウェア
プログラムが格納されている。また、RAM3503
は、二値化処理を行うためのワークエリアとして画像デ
ータなどのデータを格納する。
The CPU 3501 is a digital camera 350
In addition to controlling each circuit and each part of 0, it has a function for image binarization. RO connected to CPU 3501
In M3502, a software program for realizing the binarization function is stored. RAM 3503
Stores data such as image data as a work area for performing binarization processing.

【0209】ROM3502には、前述の実施の形態に
おける平滑化器、制限器、ブロック二値化閾値設定回
路、二値化閾値補間器、二値化器、圧縮器などの機能を
実現するソフトウェアプログラムが格納されており、二
値化閾値設定、二値化、二値画像の圧縮などの機能がC
PU3501においてプログラムが実行されることによ
り実現できる。また、係数CbもしくはCmも格納され
ている。CPU3501で二値化、圧縮された画像は画
像記憶メモリ125に記憶される。使用の態様によって
はCCD101の代わりにCMOSセンサを使用しても
よい。
The ROM 3502 stores software programs for realizing the functions of the smoother, the limiter, the block binarization threshold setting circuit, the binarization threshold interpolator, the binarizer, and the compressor in the above embodiment. Are stored, and functions such as a binarization threshold setting, binarization, and compression of a binary image are C
This can be realized by executing a program in the PU 3501. Further, the coefficient Cb or Cm is also stored. The image binarized and compressed by the CPU 3501 is stored in the image storage memory 125. Depending on the mode of use, a CMOS sensor may be used instead of the CCD 101.

【0210】実施の形態14では、実施の形態13と同
様に、CPU3501およびROM3502により各機
能を実現するので、個々の機能部をつくり分けなくてす
み、開発費を削減することが可能となるとともに、安価
なデジタルカメラを提供することが可能となる。また、
ソフトウェアをアップグレードすることにより、常に最
新のアルゴリズムを提供することが可能となる。
In the fourteenth embodiment, similarly to the thirteenth embodiment, each function is realized by the CPU 3501 and the ROM 3502, so that it is not necessary to separately form individual functional units, and it is possible to reduce development costs. It is possible to provide an inexpensive digital camera. Also,
Upgrading the software makes it possible to always provide the latest algorithm.

【0211】(実施の形態15)本発明は、上述した実
施の形態の他にソフトウェアプログラムによっても実現
することができる。図36は、本発明をソフトウェアに
よって実現する場合におけるコンピュータシステムの構
成例を表す図である。
(Embodiment 15) The present invention can also be realized by a software program in addition to the embodiments described above. FIG. 36 is a diagram illustrating a configuration example of a computer system when the present invention is implemented by software.

【0212】図において、3601は制御プログラムに
基づいて装置全体を制御するCPUを、3602は制御
プログラムが格納されているROMを、3603はRA
Mを、3604はコンピュータの入力・出力状態などを
表示する表示装置を、3605はハードディスクを、3
606は文字列などを入力するために用いられるキーボ
ードを、3607はCD−ROMドライブを、3608
はコンピュータ読み取り可能な記録媒体としてのCD−
ROMを表し、本発明の画像二値化方法を実現するプロ
グラムが記録されている。
In the figure, 3601 is a CPU for controlling the entire apparatus based on the control program, 3602 is a ROM storing the control program, and 3603 is an RA
M, 3604 is a display device for displaying the input / output state of the computer, 3605 is a hard disk, 3
Reference numeral 606 denotes a keyboard used for inputting a character string and the like, 3607 denotes a CD-ROM drive, and 3608
Is a CD-ROM as a computer-readable recording medium
It represents a ROM and stores a program for realizing the image binarization method of the present invention.

【0213】以上のように構成されたコンピュータシス
テムにおいて、CD−ROM3608に本発明の画像二
値化方法を実現するプログラムを記録しておく。CPU
3601の制御および処理により、上記プログラムが読
み込まれ、プログラムが起動することにより、画像二値
化処理が実行され、二値化された情報がハードディスク
3605等に出力される。
In the computer system configured as described above, a program for realizing the image binarization method of the present invention is recorded on the CD-ROM 3608. CPU
Under the control and processing of 3601, the above program is read, and the program is started to execute the image binarization processing, and the binarized information is output to the hard disk 3605 or the like.

【0214】[0214]

【発明の効果】以上説明したように、本発明の画像二値
化装置(請求項1)は、輝度値入力手段が、多値画像を
構成する各画素の輝度値を入力し、平均輝度値算出手段
が、前記輝度値入力手段により入力された輝度値に基づ
いて、二値化すべき画素を含んだ局所的な平均輝度値を
算出し、二値化閾値設定手段が、前記平均輝度値算出手
段により算出された局所的な平均輝度値の大きさに応じ
て二値化閾値を当該局所的な平均輝度値より低く設定
し、二値化手段が、前記二値化閾値設定手段により設定
された二値化閾値により前記二値化すべき画素を二値化
するので、平均輝度値に応じて値の異なる二値化閾値を
用い、表面反射が発生しているような領域に対して適切
な二値化閾値を採用することができ、これにより、多値
画像を高品質に二値化することが可能となる。
As described above, according to the image binarizing apparatus of the present invention (claim 1), the luminance value input means inputs the luminance value of each pixel constituting the multi-valued image and outputs the average luminance value. Calculating means for calculating a local average luminance value including a pixel to be binarized based on the luminance value input by the luminance value input means; and a binarization threshold setting means for calculating the average luminance value. The binarization threshold is set lower than the local average luminance value according to the magnitude of the local average luminance value calculated by the means, and the binarization means is set by the binarization threshold setting means. Since the pixel to be binarized is binarized by the binarization threshold, a binarization threshold having a different value according to the average luminance value is used, and the binarization threshold is appropriate for an area where surface reflection occurs. A binarization threshold can be adopted, which allows a multi-valued image to be binarized with high quality. It is possible to become.

【0215】また、本発明の画像二値化装置(請求項
2)は、請求項1に記載の画像二値化装置において、前
記二値化閾値設定手段が、前記平均輝度値算出手段によ
り算出された局所的な平均輝度値に応じた補正量であっ
て、平均輝度値が所定の中間レンジにある場合には当該
中間レンジ外にある場合よりも大きな値である補正量を
当該局所的な平均輝度値から減算することにより二値化
閾値を設定するので、表面反射が生じる輝度レンジでは
平均輝度値と二値化閾値との差を小さくするような補正
量により適切な二値化閾値を採用しつつ、中間レンジで
はある程度大きな補正量により適切な二値化閾値を採用
することができ、これにより、多値画像を高品質に二値
化することが可能となる。また、低輝度側での平均輝度
値と二値化閾値との差を大きくしないようにして、低輝
度側でのノイズの発生を抑制することができ、これによ
り、多値画像を高品質に二値化することが可能となる。
[0215] Further, according to the image binarizing device of the present invention (claim 2), in the image binarizing device according to claim 1, wherein the binarizing threshold value setting means is calculated by the average luminance value calculating means. The correction amount according to the obtained local average luminance value, and when the average luminance value is in a predetermined intermediate range, the correction amount is larger than that in the case where the average luminance value is outside the intermediate range. Since the binarization threshold is set by subtracting from the average luminance value, in the luminance range where surface reflection occurs, an appropriate binarization threshold is set with a correction amount that reduces the difference between the average luminance value and the binarization threshold. While adopting, an appropriate binarization threshold can be adopted in the intermediate range with a relatively large correction amount, and thereby, a multi-valued image can be binarized with high quality. In addition, by preventing the difference between the average luminance value on the low luminance side and the binarization threshold from being large, it is possible to suppress the occurrence of noise on the low luminance side, whereby the multi-valued image can be made high quality. It is possible to binarize.

【0216】また、本発明の画像二値化装置(請求項
3)は、請求項1に記載の画像二値化装置において、前
記二値化閾値設定手段が、前記平均輝度値算出手段によ
り算出された局所的な平均輝度値に対して、平均輝度値
が大きな値となるほどに大きな値の補正量を用いて乗算
することにより二値化閾値を設定するので、表面反射が
生じる輝度レンジにおいて、平均輝度値と二値化閾値と
の差を小さくするような補正量により適切な二値化閾値
を採用することができ、これにより、多値画像を高品質
に二値化することが可能となる。
[0216] In the image binarizing apparatus according to the present invention (claim 3), in the image binarizing apparatus according to claim 1, the binarization threshold value setting means is calculated by the average luminance value calculating means. Since the binarization threshold is set by multiplying the obtained local average luminance value by using a correction amount of a larger value as the average luminance value becomes a larger value, in a luminance range in which surface reflection occurs, An appropriate binarization threshold value can be adopted by a correction amount that reduces the difference between the average luminance value and the binarization threshold value, which makes it possible to binarize a multi-valued image with high quality. Become.

【0217】また、本発明の画像二値化装置(請求項
4)は、輝度値入力手段が、多値画像を構成する各画素
の輝度値を入力し、平均輝度値算出手段が、前記輝度値
入力手段により入力された輝度値に基づいて、二値化す
べき画素を含んだ局所的な平均輝度値を算出し、減算閾
値算出手段が、前記平均輝度値算出手段により算出され
た局所的な平均輝度値に第1の補正量を減算して第1の
二値化閾値を算出し、乗算閾値算出手段が、前記平均輝
度値算出手段により算出された局所的な平均輝度値に1
未満の値である第2の補正量を乗じて第2の二値化閾値
を算出し、比較判定手段が、前記平均輝度値算出手段に
より算出された局所的な平均輝度値の大きさが所定の比
較値より大であるか小であるかを判定し、二値化閾値決
定手段が、前記比較判定手段により前記局所的な平均輝
度値の大きさが前記比較値より大であると判定された場
合には、前記減算閾値算出手段により算出される前記第
1の二値化閾値を採用することを決定し、前記比較判定
手段により前記局所的な平均輝度値の大きさが前記比較
値より小であると判定された場合には、前記乗算閾値算
出手段により算出される前記第2の二値化閾値を採用す
ることを決定し、二値化手段が、前記二値化閾値決定手
段により決定された二値化閾値により前記二値化すべき
画素を二値化するので、表面反射が生じている様な領域
に対する二値化閾値と、通常の領域に対する二値化閾値
を使い分け、表面反射が生じている様な領域に対して
は、平均輝度値が大きくなるにつれて平均輝度値との差
が相対的に小さくなる二値化閾値を採用し、通常の領域
に対しては、二値化後の全体的な調子が滑らかとなる二
値化閾値を採用することができ、これにより、多値画像
を高品質に二値化することが可能となる。
In the image binarizing device of the present invention (claim 4), the luminance value input means inputs the luminance value of each pixel constituting the multi-valued image, and the average luminance value calculating means outputs the luminance value. Based on the brightness value input by the value input means, a local average brightness value including the pixel to be binarized is calculated, and the subtraction threshold calculation means calculates the local average brightness value calculated by the average brightness value calculation means. A first binarization threshold is calculated by subtracting the first correction amount from the average luminance value, and the multiplication threshold value calculating means calculates the local average luminance value calculated by the average luminance value calculating means by one.
A second binarization threshold is calculated by multiplying by a second correction amount that is a value less than and the comparison determination unit determines that the magnitude of the local average luminance value calculated by the average luminance value calculation unit is a predetermined value. It is determined whether the value is larger or smaller than the comparison value of, and the binarization threshold value determination means determines that the magnitude of the local average luminance value is larger than the comparison value by the comparison determination means. In this case, it is determined that the first binarization threshold value calculated by the subtraction threshold value calculation means is used, and the magnitude of the local average luminance value is larger than the comparison value by the comparison determination means. When it is determined to be small, it is determined to adopt the second binarization threshold calculated by the multiplication threshold calculation means, and the binarization means is determined by the binarization threshold determination means. Binarizing the pixel to be binarized according to the determined binarization threshold Therefore, the binarization threshold for the region where the surface reflection occurs and the binarization threshold for the normal region are selectively used. For the region where the surface reflection occurs, as the average luminance value increases, It is possible to adopt a binarization threshold that makes the difference from the average luminance value relatively small, and to adopt a binarization threshold that makes the overall tone after binarization smooth for a normal region. This makes it possible to binarize a multi-valued image with high quality.

【0218】また、本発明の画像二値化装置(請求項
5)は、請求項4に記載の画像二値化装置において、前
記減算閾値算出手段が、前記平均輝度値算出手段により
算出された局所的な平均輝度値に対して、当該輝度値の
大きさに応じた補正量を減算することにより前記第1の
二値化閾値を算出するので、表面反射が生じる輝度レン
ジでより適切な二値化閾値を採用でき、これにより、多
値画像を高品質に二値化することが可能となる。
Further, in the image binarizing device according to the present invention (claim 5), in the image binarizing device according to claim 4, the subtraction threshold value calculating means is calculated by the average luminance value calculating means. Since the first binarization threshold is calculated by subtracting a correction amount corresponding to the magnitude of the luminance value from the local average luminance value, a more appropriate threshold value in a luminance range in which surface reflection occurs is obtained. A binarization threshold can be employed, which makes it possible to binarize a multi-valued image with high quality.

【0219】また、本発明の画像二値化装置(請求項
6)は、請求項4または5に記載の画像二値化装置にお
いて、前記乗算閾値設定手段が、前記平均輝度値算出手
段により算出された局所的な平均輝度値に対して、当該
輝度値の大きさに応じた補正量で乗算することにより前
記第2の二値化閾値を算出するので、表面反射が生じて
いない領域において、境界が発生せず滑らかな二値画像
が得られる二値化閾値を採用することができ、これによ
り、多値画像を高品質に二値化することが可能となる。
[0219] In the image binarizing device according to the present invention (claim 6), in the image binarizing device according to claim 4 or 5, the multiplication threshold value setting means is calculated by the average luminance value calculating means. Since the second binarization threshold is calculated by multiplying the obtained local average luminance value by a correction amount corresponding to the magnitude of the luminance value, in a region where surface reflection does not occur, It is possible to adopt a binarization threshold that allows a smooth binary image to be obtained without generating a boundary, thereby enabling a multivalued image to be binarized with high quality.

【0220】また、本発明の画像二値化装置(請求項
7)は、請求項1〜6のいずれか一つに記載の画像二値
化装置において、ブロック分割手段が、多値画像をブロ
ックに分割し、前記平均輝度値算出手段が、前記ブロッ
ク分割手段により分割されたブロックを単位として前記
局所的な平均輝度値を算出するので、ブロック毎に適正
な二値化閾値を設定することができ、これにより、多値
画像を高品質に二値化することが可能となる。
The image binarizing device according to the present invention (claim 7) is the image binarizing device according to any one of claims 1 to 6, wherein the block dividing means converts the multi-valued image into blocks. And the average luminance value calculation means calculates the local average luminance value in units of blocks divided by the block division means, so that an appropriate binarization threshold value can be set for each block. This makes it possible to binarize a multi-valued image with high quality.

【0221】また、本発明の画像二値化装置(請求項
8)は、請求項7に記載の画像二値化装置において、比
較値決定手段が、前記局所的な平均輝度値を算出するブ
ロックに隣接するブロックの平均輝度値に基づいて前記
比較値を決定するので、多値画像の白飛びをより的確に
判断して二値化閾値を設定することができ、これによ
り、多値画像を高品質に二値化することが可能となる。
[0221] Further, in the image binarizing apparatus according to the present invention (claim 8), in the image binarizing apparatus according to claim 7, the comparison value determining means calculates the local average luminance value. Since the comparison value is determined on the basis of the average luminance value of the block adjacent to, the binarization threshold can be set by more accurately determining the overexposure of the multi-valued image. High quality binarization is possible.

【0222】また、本発明の画像二値化装置(請求項
9)は、濃度値入力手段が、多値画像を構成する各画素
の濃度値を入力し、平均濃度値算出手段が、前記濃度値
入力手段により入力された濃度値に基づいて、二値化す
べき画素を含んだ局所的な平均濃度値を算出し、二値化
閾値設定手段が、前記平均濃度値算出手段により算出さ
れた局所的な平均濃度値の大きさに応じて二値化閾値を
当該局所的な平均濃度値より高く設定し、二値化手段
が、前記二値化閾値設定手段により設定された二値化閾
値により前記二値化すべき画素を二値化するので、平均
濃度値に応じて値の異なる二値化閾値を用い、表面反射
が発生しているような領域に対して適切な二値化閾値を
採用することができ、これにより、多値画像を高品質に
二値化することが可能となる。
In the image binarizing device of the present invention (claim 9), the density value input means inputs the density value of each pixel constituting the multi-valued image, and the average density value calculation means outputs the density value. Based on the density value input by the value input unit, a local average density value including the pixel to be binarized is calculated, and the binarization threshold setting unit calculates the local average density value calculated by the average density value calculation unit. The binarization threshold is set higher than the local average density value in accordance with the magnitude of the average density value, and the binarization unit uses the binarization threshold set by the binarization threshold setting unit. Since the pixels to be binarized are binarized, a binarization threshold having a different value according to the average density value is used, and an appropriate binarization threshold is used for an area where surface reflection occurs. This allows multi-valued images to be binarized with high quality It made.

【0223】また、本発明の画像二値化装置(請求項1
0)は、請求項9に記載の画像二値化装置において、前
記二値化閾値設定手段が、前記平均濃度値算出手段によ
り算出された局所的な平均濃度値に応じた補正量であっ
て、平均濃度値が所定の中間レンジにある場合には当該
中間レンジ外にある場合よりも大きな値である補正量を
当該局所的な平均濃度値に加算することにより二値化閾
値を設定するので、表面反射が生じる濃度レンジでは平
均濃度値と二値化閾値との差を小さくするような補正量
により適切な二値化閾値を採用しつつ、中間レンジでは
ある程度大きな補正量により適切な二値化閾値を採用す
ることができ、これにより、多値画像を高品質に二値化
することが可能となる。また、高濃度側での平均濃度値
と二値化閾値との差を大きくしないようにして、高濃度
側でのノイズの発生を抑制することができ、これによ
り、多値画像を高品質に二値化することが可能となる。
The image binarizing apparatus according to the present invention (Claim 1)
0) The image binarization device according to claim 9, wherein the binarization threshold value setting unit is a correction amount according to a local average density value calculated by the average density value calculation unit. When the average density value is in a predetermined intermediate range, the binarization threshold is set by adding a correction amount that is a larger value than when the average density value is outside the intermediate range to the local average density value. In the density range where surface reflection occurs, while using an appropriate binarization threshold with a correction amount that reduces the difference between the average density value and the binarization threshold, an appropriate binarization with a relatively large correction amount is used in the intermediate range. A binarization threshold can be adopted, which makes it possible to binarize a multi-valued image with high quality. In addition, by preventing the difference between the average density value on the high density side and the binarization threshold from being large, it is possible to suppress the occurrence of noise on the high density side, thereby improving the quality of the multi-valued image. It is possible to binarize.

【0224】また、本発明の画像二値化装置(請求項1
1)は、請求項9に記載の画像二値化装置において、前
記二値化閾値設定手段が、前記平均濃度値算出手段によ
り算出された局所的な平均濃度値に対して、平均濃度値
が大きな値となるほどに小さな値の補正量を用いて乗算
することにより二値化閾値を設定するので、表面反射が
生じている濃度レンジにおいて、平均濃度値と二値化閾
値との差を小さくするような補正量により適切な二値化
閾値を採用することができ、これにより、多値画像を高
品質に二値化することが可能となる。
The image binarizing apparatus of the present invention (Claim 1)
1) The image binarization device according to claim 9, wherein the binarization threshold value setting unit sets an average density value to a local average density value calculated by the average density value calculation unit. Since the binarization threshold is set by multiplying by using a smaller correction amount as the value becomes larger, the difference between the average density value and the binarization threshold is reduced in the density range where surface reflection occurs. An appropriate binarization threshold value can be adopted by such a correction amount, and thereby, it becomes possible to binarize a multi-valued image with high quality.

【0225】また、本発明の画像二値化装置(請求項1
2)は、濃度値入力手段が、多値画像を構成する各画素
の濃度値を入力し、平均濃度値算出手段が、前記濃度値
入力手段により入力された濃度値に基づいて、二値化す
べき画素を含んだ局所的な平均濃度値を算出し、加算閾
値算出手段が、前記平均濃度値算出手段により算出され
た局所的な平均濃度値に第1の補正量を加算して第1の
二値化閾値を算出し、乗算閾値算出手段が、前記平均濃
度値算出手段により算出された局所的な平均濃度値に1
以上の値である第2の補正量を乗じて第2の二値化閾値
を算出し、比較判定手段が、前記平均濃度値算出手段に
より算出された局所的な平均濃度値の大きさが所定の比
較値より大であるか小であるかを判定し、二値化閾値決
定手段が、前記比較判定手段により前記局所的な平均濃
度値の大きさが前記比較値より小であると判定された場
合には、前記加算閾値算出手段により算出される前記第
1の二値化閾値を採用することを決定し、前記比較判定
手段により前記局所的な平均濃度値の大きさが前記比較
値より大であると判定された場合には、前記乗算閾値算
出手段により算出される前記第2の二値化閾値を採用す
ることを決定し、二値化手段が、前記二値化閾値決定手
段により決定された二値化閾値により前記二値化すべき
画素を二値化するので、表面反射が生じている様な領域
に対する二値化閾値と、通常の領域に対する二値化閾値
を使い分け、表面反射が生じている様な領域に対して
は、平均濃度値が小さくなるにつれて平均濃度値との差
が相対的に小さくなる二値化閾値を採用し、通常の領域
に対しては、二値化後の全体的な調子が滑らかとなる二
値化閾値を採用することができ、これにより、多値画像
を高品質に二値化することが可能となる。
The image binarizing apparatus of the present invention (Claim 1)
In 2), the density value input means inputs the density value of each pixel constituting the multi-valued image, and the average density value calculation means performs binarization based on the density value input by the density value input means. The local average density value including the power pixel is calculated, and the addition threshold value calculation means adds a first correction amount to the local average density value calculated by the average density value calculation means to obtain a first average correction value. A binarization threshold value is calculated, and the multiplication threshold value calculation means adds 1 to the local average density value calculated by the average density value calculation means.
A second binarization threshold is calculated by multiplying the second correction amount which is the above value, and the comparison and determination unit determines that the magnitude of the local average density value calculated by the average density value calculation unit is a predetermined value. It is determined whether the value is larger or smaller than the comparison value, and the binarization threshold value determination unit determines that the local average density value is smaller than the comparison value by the comparison determination unit. In this case, it is determined that the first binarization threshold value calculated by the addition threshold value calculation means is to be used, and the magnitude of the local average density value is larger than the comparison value by the comparison determination means. When it is determined to be large, it is determined to adopt the second binarization threshold calculated by the multiplication threshold calculation means, and the binarization means is determined by the binarization threshold determination means. Binarizing the pixel to be binarized according to the determined binarization threshold Therefore, the binarization threshold for the region where the surface reflection occurs and the binarization threshold for the normal region are selectively used. For the region where the surface reflection occurs, as the average density value decreases, It is possible to adopt a binarization threshold that makes the difference from the average density value relatively small, and for a normal region, adopt a binarization threshold that makes the overall tone after binarization smooth. This makes it possible to binarize a multi-valued image with high quality.

【0226】また、本発明の画像二値化装置(請求項1
3)は、請求項12に記載の画像二値化装置において、
前記加算閾値算出手段が、前記平均濃度値算出手段によ
り算出された局所的な平均濃度値に対して、当該濃度値
の大きさに応じた補正量を加算することにより前記第1
の二値化閾値を算出するので、表面反射が生じている濃
度レンジでより適切な二値化閾値を採用でき、これによ
り、多値画像を高品質に二値化することが可能となる。
Further, the image binarizing apparatus of the present invention (Claim 1)
3) The image binarizing device according to claim 12, wherein
The addition threshold calculating means adds the correction amount according to the magnitude of the density value to the local average density value calculated by the average density value calculating means, thereby obtaining the first
Is calculated, a more appropriate binarization threshold can be adopted in the density range in which surface reflection occurs, whereby a multivalued image can be binarized with high quality.

【0227】また、本発明の画像二値化装置(請求項1
4)は、請求項12または13に記載の画像二値化装置
において、前記乗算閾値設定手段が、前記平均濃度値算
出手段により算出された局所的な平均濃度値に対して、
当該濃度値の大きさに応じた補正量で乗算することによ
り前記第2の二値化閾値を算出するので、表面反射が生
じていない領域において、境界が発生せず滑らかな二値
画像が得られる二値化閾値を採用することができ、これ
により、多値画像を高品質に二値化することが可能とな
る。
The image binarizing apparatus of the present invention (Claim 1)
4) The image binarizing device according to claim 12 or 13, wherein the multiplication threshold setting unit sets a local average density value calculated by the average density value calculation unit as:
Since the second binarization threshold is calculated by multiplying by the correction amount corresponding to the magnitude of the density value, a smooth binary image without boundaries is obtained in an area where surface reflection does not occur. It is possible to adopt a binarization threshold value, which enables binarization of a multi-valued image with high quality.

【0228】また、本発明の画像二値化装置(請求項1
5)は、請求項9〜14のいずれか一つに記載の画像二
値化装置において、ブロック分割手段が、多値画像をブ
ロックに分割し、前記平均濃度値算出手段が、前記ブロ
ック分割手段により分割されたブロックに基づいて前記
局所的な平均濃度値を算出するので、ブロック毎に適正
な二値化閾値を設定することができ、これにより、多値
画像を高品質に二値化することが可能となる。
Further, the image binarizing apparatus of the present invention (Claim 1)
5) The image binarizing device according to any one of claims 9 to 14, wherein the block dividing unit divides the multi-valued image into blocks, and wherein the average density value calculating unit includes the block dividing unit. Calculates the local average density value based on the blocks divided by, so that an appropriate binarization threshold value can be set for each block, thereby binarizing a multi-valued image with high quality. It becomes possible.

【0229】また、本発明の画像二値化装置(請求項1
6)は、請求項15に記載の画像二値化装置において、
比較値決定手段が、前記局所的な平均濃度値を算出する
ブロックに隣接するブロックの平均濃度値に基づいて前
記比較値を決定するので、多値画像の白飛びをより的確
に判断して二値化閾値を設定することができ、これによ
り、多値画像を高品質に二値化することが可能となる。
Further, the image binarizing apparatus of the present invention (Claim 1)
6) The image binarizing device according to claim 15, wherein
The comparison value determination means determines the comparison value based on the average density value of a block adjacent to the block for which the local average density value is calculated. A binarization threshold can be set, which makes it possible to binarize a multi-valued image with high quality.

【0230】また、本発明の画像二値化方法(請求項1
7)は、多値画像を構成する画素の輝度値を入力し、二
値化すべき画素を含んだ局所的な画素集合の平均輝度値
より低い値の二値化閾値であって白飛びしている画素集
合に対しては白飛びしていない画素集合に対してよりも
平均輝度値との差が小さな二値化閾値を決定し、当該局
所的な画素集合の画像を前記二値化閾値を用いて二値化
して出力するので、表面反射が生じている画像に対して
も適正な二値化閾値を設定することができ、これによ
り、多値画像を高品質に二値化することが可能となる。
The image binarization method of the present invention (Claim 1)
7) is a binarization threshold of a value lower than the average luminance value of a local pixel set including a pixel to be binarized, which is input with a luminance value of a pixel forming a multi-valued image. For a set of pixels that are not overexposed, determine a binarization threshold having a smaller difference from the average luminance value than for a pixel set that is not overexposed, and determine the image of the local pixel set by using the binarization threshold. Since binarization is used for output, it is possible to set an appropriate binarization threshold even for an image having surface reflection, thereby binarizing a multi-valued image with high quality. It becomes possible.

【0231】また、本発明の画像二値化方法(請求項1
8)は、多値画像を構成する画素の濃度値を入力し、二
値化すべき画素を含んだ局所的な画素集合の平均濃度値
より高い値の二値化閾値であって白飛びしている画素集
合に対しては白飛びしていない画素集合に対してよりも
平均濃度値との差が小さな二値化閾値を決定し、当該局
所的な画素集合の画像を前記二値化閾値を用いて二値化
して出力するので、表面反射が生じている画像に対して
も適正な二値化閾値を設定することができ、これによ
り、多値画像を高品質に二値化することが可能となる。
The image binarization method of the present invention (Claim 1)
8) is a binarization threshold of a value higher than the average density value of a local pixel set including a pixel to be binarized, which is input with a density value of a pixel forming a multi-valued image. For a set of pixels that are not overexposed, determine a binarization threshold that has a smaller difference from the average density value than for a pixel set that is not overexposed. Since binarization is used for output, it is possible to set an appropriate binarization threshold even for an image having surface reflection, thereby binarizing a multi-valued image with high quality. It becomes possible.

【0232】また、本発明の画像二値化プログラム(請
求項19)は、コンピュータに、多値画像を構成する画
素の輝度値を入力させ、二値化すべき画素を含んだ局所
的な画素集合の平均輝度値より低い値の二値化閾値であ
って白飛びしている画素集合に対しては白飛びしていな
い画素集合に対してよりも平均輝度値との差が小さくな
るような二値化閾値を決定させ、当該局所的な画素集合
の画像を前記二値化閾値を用いて二値化して出力させる
ので、表面反射が生じている画像に対しても適正な二値
化閾値を設定することができ、これにより、多値画像を
高品質に二値化することが可能となる。
The image binarization program according to the present invention (claim 19) provides a computer which inputs a luminance value of a pixel constituting a multi-valued image, and a local pixel set including a pixel to be binarized. The binarization threshold value is lower than the average luminance value of, and the difference from the average luminance value is smaller for a pixel set that is overexposed than for a pixel set that is not overexposed. Since the binarization threshold is determined and the image of the local pixel set is binarized and output using the binarization threshold, an appropriate binarization threshold is also set for an image having surface reflection. This makes it possible to binarize the multi-valued image with high quality.

【0233】また、本発明の画像二値化プログラム(請
求項20)は、コンピュータに、多値画像を構成する画
素の濃度値を入力させ、二値化すべき画素を含んだ局所
的な画素集合の平均濃度値より高い値の二値化閾値であ
って白飛びしている画素集合に対しては白飛びしていな
い画素集合に対してよりも平均濃度値との差が小さくな
るような二値化閾値を決定させ、当該局所的な画素集合
の画像を前記二値化閾値を用いて二値化して出力させる
ので、表面反射が生じている画像に対しても適正な二値
化閾値を設定することができ、これにより、多値画像を
高品質に二値化することが可能となる。
The image binarization program according to the present invention (claim 20) provides a computer which inputs a density value of a pixel constituting a multi-valued image, and a local pixel set including a pixel to be binarized. The binarization threshold value is higher than the average density value, and the difference from the average density value is smaller for a pixel set that is overexposed than for a pixel set that is not overexposed. Since the binarization threshold is determined and the image of the local pixel set is binarized and output using the binarization threshold, an appropriate binarization threshold is also set for an image having surface reflection. This makes it possible to binarize the multi-valued image with high quality.

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

【図1】実施の形態1の画像二値化装置をデジタルカメ
ラに適用した場合の、画像データの入力から、二値化処
理した画像を記録するまでの装置構成の一例を示したブ
ロック図である。
FIG. 1 is a block diagram illustrating an example of a device configuration from input of image data to recording of a binarized image when the image binarizing device according to the first embodiment is applied to a digital camera. is there.

【図2】実施の形態1のデジタルカメラにおけるCCD
の受光部の概念を示した概念図である。
FIG. 2 is a CCD in the digital camera according to the first embodiment.
FIG. 4 is a conceptual diagram showing the concept of a light receiving unit.

【図3】実施の形態1のデジタルカメラが撮影した多値
画像をブロックに分割する分割例を示した図である。
FIG. 3 is a diagram illustrating a division example in which a multivalued image captured by the digital camera according to the first embodiment is divided into blocks.

【図4】ブロック内の画素をサンプリングするサンプリ
ング間隔の例を示した図である。
FIG. 4 is a diagram illustrating an example of a sampling interval for sampling pixels in a block.

【図5】実施の形態1のデジタルカメラの平均輝度値算
出器の構成の一例を示したブロック図である。
FIG. 5 is a block diagram illustrating an example of a configuration of an average luminance value calculator of the digital camera according to the first embodiment.

【図6】実施の形態1のデジタルカメラの二値化閾値設
定回路の一構成例を示した説明図である。
FIG. 6 is an explanatory diagram illustrating a configuration example of a binarization threshold setting circuit of the digital camera according to the first embodiment;

【図7】実施の形態1のデジタルカメラにおいて、多値
画像が二値化されるまでの画像データの処理流れを示し
たフローチャートである。
FIG. 7 is a flowchart showing a processing flow of image data until a multi-value image is binarized in the digital camera according to the first embodiment.

【図8】図7に示したフローチャート中の二値化閾値算
出ルーチンの処理流れの一例を示したフローチャートで
ある。
FIG. 8 is a flowchart illustrating an example of a processing flow of a binarization threshold value calculation routine in the flowchart illustrated in FIG. 7;

【図9】実施の形態2の画像二値化装置をデジタルカメ
ラに適用した場合の装置構成の一例を示したブロック図
である。
FIG. 9 is a block diagram showing an example of a device configuration when the image binarization device according to the second embodiment is applied to a digital camera.

【図10】実施の形態3の画像二値化装置をデジタルカ
メラに適用した場合の装置構成の一例を示したブロック
図である。
FIG. 10 is a block diagram illustrating an example of a device configuration when the image binarizing device according to the third embodiment is applied to a digital camera.

【図11】実施の形態3のデジタルカメラのブロック二
値化閾値設定回路の一構成例を示した説明図である。
FIG. 11 is an explanatory diagram showing a configuration example of a block binarization threshold value setting circuit of the digital camera according to the third embodiment.

【図12】係数メモリに格納されている係数例を示した
説明図である。
FIG. 12 is an explanatory diagram showing an example of coefficients stored in a coefficient memory.

【図13】実施の形態3のデジタルカメラの補間ブロッ
ク内の各画素に適用する二値化閾値を算出する概要を説
明する説明図である。
FIG. 13 is an explanatory diagram illustrating an outline of calculating a binarization threshold value applied to each pixel in an interpolation block of the digital camera according to the third embodiment.

【図14】実施の形態3のデジタルカメラにおいて、多
値画像が二値化されるまでの画像データの処理流れを示
したフローチャートである。
FIG. 14 is a flowchart showing a processing flow of image data until a multivalued image is binarized in the digital camera according to the third embodiment.

【図15】図14に示したフローチャート中のブロック
二値化閾値算出ルーチンの処理流れの一例を示したフロ
ーチャートである。
FIG. 15 is a flowchart showing an example of a processing flow of a block binarization threshold value calculation routine in the flowchart shown in FIG. 14;

【図16】画像入力部分にCMOSセンサを使用し、画
素毎に適用される二値化閾値を算出して画素毎に画像デ
ータの二値化を行うデジタルカメラの装置構成の一例を
示したブロック図である。
FIG. 16 is a block diagram illustrating an example of a device configuration of a digital camera that uses a CMOS sensor for an image input portion, calculates a binarization threshold applied to each pixel, and binarizes image data for each pixel. FIG.

【図17】実施の形態5の画像二値化装置をデジタルカ
メラに適用した場合の装置構成の一例を示したブロック
図である。
FIG. 17 is a block diagram illustrating an example of a device configuration when the image binarization device according to the fifth embodiment is applied to a digital camera.

【図18】実施の形態6の画像二値化装置をデジタルカ
メラに適用した場合の装置構成の一例を示したブロック
図である。
FIG. 18 is a block diagram illustrating an example of a device configuration when the image binarizing device according to the sixth embodiment is applied to a digital camera.

【図19】実施の形態7の画像撮像装置をデジタルカメ
ラに適用した場合について、画像入力から二値化処理を
した画像を記録するまでの装置構成の一例を示したブロ
ック図である。
FIG. 19 is a block diagram illustrating an example of a device configuration from image input to recording of a binarized image when the image capturing device according to the seventh embodiment is applied to a digital camera.

【図20】実施の形態7のデジタルカメラの二値化閾値
設定回路の一構成例を示した説明図である。
FIG. 20 is an explanatory diagram showing a configuration example of a binarization threshold value setting circuit of the digital camera according to the seventh embodiment.

【図21】係数メモリに格納されている係数例を示した
説明図である。
FIG. 21 is an explanatory diagram showing an example of coefficients stored in a coefficient memory.

【図22】実施の形態7のデジタルカメラにおいて、多
値画像が二値化されるまでの画像データの処理流れを示
したフローチャートである。
FIG. 22 is a flowchart showing a processing flow of image data until a multi-valued image is binarized in the digital camera according to the seventh embodiment.

【図23】図22に示した二値化閾値算出ルーチンの処
理流れの一例を示したフローチャートである。
FIG. 23 is a flowchart illustrating an example of a processing flow of a binarization threshold value calculation routine illustrated in FIG. 22;

【図24】画像入力部分にCMOSセンサが使用された
デジタルカメラにおいて、入力した画像を二値化処理し
て記録するまでの装置構成の一例を示したブロック図で
ある。
FIG. 24 is a block diagram showing an example of a device configuration up to a step of binarizing and recording an input image in a digital camera using a CMOS sensor for an image input portion.

【図25】実施の形態9の画像撮像装置をデジタルカメ
ラに適用した場合の装置構成の一例を示したブロック図
である。
FIG. 25 is a block diagram illustrating an example of a device configuration when the image capturing device according to Embodiment 9 is applied to a digital camera.

【図26】実施の形態9のデジタルカメラにおいて、補
間ブロックと画面との関係を示した図である。
FIG. 26 is a diagram illustrating a relationship between an interpolation block and a screen in the digital camera according to the ninth embodiment.

【図27】実施の形態9のデジタルカメラにおいて、多
値画像が二値化されるまでの画像データの処理流れを表
すフローチャートである。
FIG. 27 is a flowchart illustrating a processing flow of image data until a multi-valued image is binarized in the digital camera according to the ninth embodiment.

【図28】CMOSセンサと測光器を用いて、所定ブロ
ック内の画素毎に適用される二値化閾値を算出し、画素
毎に画像データの二値化を行う画像撮像装置をデジタル
カメラに適用した一例を示した構成図である。
FIG. 28 is a diagram illustrating a digital camera in which a binarization threshold applied to each pixel in a predetermined block is calculated using a CMOS sensor and a photometer and binarization of image data is performed for each pixel. FIG. 2 is a configuration diagram showing an example.

【図29】実施の形態11の画像撮像装置をデジタルカ
メラに適用した場合の装置構成の一例を示したブロック
図である。
FIG. 29 is a block diagram illustrating an example of a device configuration in a case where the image capturing device according to Embodiment 11 is applied to a digital camera.

【図30】実施の形態11のデジタルカメラにおいて、
多値画像が二値化されるまでの画像データの処理流れを
表すフローチャートである。
FIG. 30 shows a digital camera according to an eleventh embodiment.
9 is a flowchart illustrating a processing flow of image data until a multi-value image is binarized.

【図31】実施の形態11のデジタルカメラの他の装置
構成の一例を示したブロック図である。
FIG. 31 is a block diagram showing an example of another device configuration of the digital camera according to the eleventh embodiment.

【図32】実施の形態12の画像撮像装置をデジタルカ
メラに適用した場合の装置構成の一例を示したブロック
図である。
FIG. 32 is a block diagram illustrating an example of a device configuration in a case where the image capturing device according to Embodiment 12 is applied to a digital camera.

【図33】実施の形態12のデジタルカメラにおいて、
多値画像が二値化されるまでの画像データの処理流れを
表すフローチャートである。
FIG. 33 shows a digital camera according to a twelfth embodiment.
9 is a flowchart illustrating a processing flow of image data until a multi-value image is binarized.

【図34】画像二値化をCPUにおいてソフトウェア処
理で行う画像撮像装置をデジタルカメラに適用した場合
について、画像入力から二値化処理をした画像を記録す
るまでの装置構成の一例を示したブロック図である。
FIG. 34 is a block diagram illustrating an example of a device configuration from image input to recording of a binarized image in a case where an image capturing device that performs image binarization by software processing in a CPU is applied to a digital camera. FIG.

【図35】画像二値化をCPUにおいてソフトウェア処
理で行う画像撮像装置をデジタルカメラに適用した場合
について、画像入力から二値化処理をした画像を記録す
るまでの装置構成を表すブロック図である。
FIG. 35 is a block diagram illustrating a device configuration from image input to recording of a binarized image in a case where an image capturing device that performs image binarization by software processing in a CPU is applied to a digital camera. .

【図36】本発明をソフトウェアによって実現する場合
におけるコンピュータシステムの構成例を表す図であ
る。
FIG. 36 is a diagram illustrating a configuration example of a computer system when the present invention is realized by software.

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

100,900,1000,1600,1700,18
00,1900,2400,2500,2800,29
00,3100,3200,3400,3500 デジ
タルカメラ 101 CCD 102 A/D変換器 103 ホワイトバランス調整器 104 画素補間器 105 輝度生成器 106 アパーチャ補正器 107 フレームメモリ 109 ブロックバッファ 120 平均輝度値算出器 121 低輝度閾値設定器 122,1905 二値化閾値設定回路 123 二値化器 124 圧縮器 125 画像記憶メモリ 501 比較器 502 加算結果レジスタ 503 カウンタ 504 シフトレジスタ 506 加算器 601,2001 加算減算器 602,1011 乗算除算器 603 比較器 604 セレクタ 1001 ブロック二値化閾値設定回路 1003,2503 二値化閾値補間器 1012 係数メモリ(Cb) 1901,2901,3504 測光器 1902,2902 平滑化器 1904,2904 ブロック読出制御器 2002 係数メモリ(Cm) 2501 画面二値化閾値設定回路 Cb 係数,定数 Cm 係数,定数 TH 二値化閾値(ブロック二値化閾値) ave 平均値(平均輝度値、平均濃度値) Y 輝度信号値(輝度値) th 二値化閾値 thl 低輝度閾値 v 輝度値
100, 900, 1000, 1600, 1700, 18
00, 1900, 2400, 2500, 2800, 29
00, 3100, 3200, 3400, 3500 Digital camera 101 CCD 102 A / D converter 103 White balance adjuster 104 Pixel interpolator 105 Luminance generator 106 Aperture corrector 107 Frame memory 109 Block buffer 120 Average luminance value calculator 121 Low Brightness threshold setting device 122, 1905 Binarization threshold setting circuit 123 Binarization device 124 Compressor 125 Image storage memory 501 Comparator 502 Addition result register 503 Counter 504 Shift register 506 Adder 601, 2001 Addition and subtraction device 602, 1011 Multiplication Divider 603 Comparator 604 Selector 1001 Block binarization threshold setting circuit 1003, 2503 Binarization threshold interpolator 1012 Coefficient memory (Cb) 1901, 2901, 3504 Photometer 190 , 2902 Smoothing unit 1904, 2904 Block readout controller 2002 Coefficient memory (Cm) 2501 Screen binarization threshold setting circuit Cb coefficient, constant Cm coefficient, constant TH Binarization threshold (block binarization threshold) ave Average value ( Average luminance value, average density value) Y luminance signal value (luminance value) th binarization threshold thl low luminance threshold v luminance value

Claims (20)

【特許請求の範囲】[Claims] 【請求項1】 多値画像を構成する各画素の輝度値を入
力する輝度値入力手段と、 前記輝度値入力手段により入力された輝度値に基づい
て、二値化すべき画素を含んだ局所的な平均輝度値を算
出する平均輝度値算出手段と、 前記平均輝度値算出手段により算出された局所的な平均
輝度値の大きさに応じて二値化閾値を当該局所的な平均
輝度値より低く設定する二値化閾値設定手段と、 前記二値化閾値設定手段により設定された二値化閾値に
より前記二値化すべき画素を二値化する二値化手段と、 を備えたことを特徴とする画像二値化装置。
1. A brightness value input means for inputting a brightness value of each pixel constituting a multi-valued image, and a local value including a pixel to be binarized based on the brightness value input by the brightness value input means. Average brightness value calculating means for calculating an average brightness value, and a binarization threshold lower than the local average brightness value according to the size of the local average brightness value calculated by the average brightness value calculating means. Binarization threshold setting means for setting, and binarization means for binarizing the pixel to be binarized with the binarization threshold set by the binarization threshold setting means, Image binarization device.
【請求項2】 前記二値化閾値設定手段は、前記平均輝
度値算出手段により算出された局所的な平均輝度値に応
じた補正量であって、平均輝度値が所定の中間レンジに
ある場合には当該中間レンジ外にある場合よりも大きな
値である補正量を当該局所的な平均輝度値から減算する
ことにより二値化閾値を設定することを特徴とする請求
項1に記載の画像二値化装置。
2. The method according to claim 1, wherein the binarization threshold value setting unit is a correction amount corresponding to a local average luminance value calculated by the average luminance value calculation unit, and the average luminance value is within a predetermined intermediate range. 2. The image processing apparatus according to claim 1, wherein a threshold value is set by subtracting a correction amount, which is a value larger than a value outside the intermediate range, from the local average luminance value. Pricer.
【請求項3】 前記二値化閾値設定手段は、前記平均輝
度値算出手段により算出された局所的な平均輝度値に対
して、平均輝度値が大きな値となるほどに大きな値の補
正量を用いて乗算することにより二値化閾値を設定する
ことを特徴とする請求項1に記載の画像二値化装置。
3. The binarization threshold setting unit uses a correction amount of a larger value with respect to a local average luminance value calculated by the average luminance value calculation unit as the average luminance value becomes larger. 2. The image binarization device according to claim 1, wherein the binarization threshold is set by multiplying the image by a threshold.
【請求項4】 多値画像を構成する各画素の輝度値を入
力する輝度値入力手段と、 前記輝度値入力手段により入力された輝度値に基づい
て、二値化すべき画素を含んだ局所的な平均輝度値を算
出する平均輝度値算出手段と、 前記平均輝度値算出手段により算出された局所的な平均
輝度値に第1の補正量を減算して第1の二値化閾値を算
出する減算閾値算出手段と、 前記平均輝度値算出手段により算出された局所的な平均
輝度値に1未満の値である第2の補正量を乗じて第2の
二値化閾値を算出する乗算閾値算出手段と、 前記平均輝度値算出手段により算出された局所的な平均
輝度値の大きさが、所定の比較値より大であるか小であ
るかを判定する比較判定手段と、 前記比較判定手段により前記局所的な平均輝度値の大き
さが前記比較値より大であると判定された場合には、前
記減算閾値算出手段により算出される前記第1の二値化
閾値を採用することを決定し、前記比較判定手段により
前記局所的な平均輝度値の大きさが前記比較値より小で
あると判定された場合には、前記乗算閾値算出手段によ
り算出される前記第2の二値化閾値を採用することを決
定する二値化閾値決定手段と、 前記二値化閾値決定手段により決定された二値化閾値に
より前記二値化すべき画素を二値化する二値化手段と、 を備えたことを特徴とする画像二値化装置。
4. A luminance value input means for inputting a luminance value of each pixel constituting a multi-valued image, and a local value including a pixel to be binarized based on the luminance value input by the luminance value input means. Average brightness value calculating means for calculating an average brightness value; calculating a first binary threshold by subtracting a first correction amount from the local average brightness value calculated by the average brightness value calculating means; Subtraction threshold value calculation means; multiplication threshold value calculation for calculating a second binarization threshold value by multiplying a local average brightness value calculated by the average brightness value calculation means by a second correction amount less than 1 Means, a comparison determination means for determining whether the local average brightness value calculated by the average brightness value calculation means is larger or smaller than a predetermined comparison value, and The magnitude of the local average luminance value is greater than the comparison value. When it is determined that the first binarization threshold calculated by the subtraction threshold calculation unit is used, the magnitude of the local average luminance value is determined by the comparison determination unit. When it is determined that is smaller than the comparison value, a binarization threshold determining unit that determines to adopt the second binarization threshold calculated by the multiplication threshold calculation unit; An image binarization device, comprising: a binarization unit that binarizes the pixel to be binarized according to the binarization threshold determined by the binarization threshold determination unit.
【請求項5】 前記減算閾値算出手段は、前記平均輝度
値算出手段により算出された局所的な平均輝度値に対し
て、当該輝度値の大きさに応じた補正量を減算すること
により前記第1の二値化閾値を算出することを特徴とす
る請求項4に記載の画像二値化装置。
5. The subtraction threshold value calculation means subtracts a correction amount according to the magnitude of the luminance value from the local average luminance value calculated by the average luminance value calculation means, and 5. The image binarization device according to claim 4, wherein one binarization threshold is calculated.
【請求項6】 前記乗算閾値設定手段は、前記平均輝度
値算出手段により算出された局所的な平均輝度値に対し
て、当該輝度値の大きさに応じた補正量で乗算すること
により前記第2の二値化閾値を算出することを特徴とす
る請求項4にまたは5に記載の画像二値化装置。
6. The multiplying threshold setting means multiplies the local average luminance value calculated by the average luminance value calculating means by a correction amount according to the magnitude of the luminance value, and The image binarization device according to claim 4 or 5, wherein a binarization threshold value of 2 is calculated.
【請求項7】 多値画像をブロックに分割するブロック
分割手段を備え、前記平均輝度値算出手段は、前記ブロ
ック分割手段により分割されたブロックに基づいて前記
局所的な平均輝度値を算出することを特徴とする請求項
1〜6のいずれか一つに記載の画像二値化装置。
7. An image processing apparatus comprising: a block dividing unit that divides a multi-valued image into blocks; wherein the average luminance value calculating unit calculates the local average luminance value based on the blocks divided by the block dividing unit. The image binarization device according to claim 1, wherein:
【請求項8】 前記局所的な平均輝度値を算出するブロ
ックに隣接するブロックの平均輝度値に基づいて前記比
較値を決定する比較値決定手段を備えたことを特徴とす
る請求項7に記載の画像二値化装置。
8. The apparatus according to claim 7, further comprising comparison value determination means for determining the comparison value based on an average luminance value of a block adjacent to a block for calculating the local average luminance value. Image binarization device.
【請求項9】 多値画像を構成する各画素の濃度値を入
力する濃度値入力手段と、 前記濃度値入力手段により入力された濃度値に基づい
て、二値化すべき画素を含んだ局所的な平均濃度値を算
出する平均濃度値算出手段と、 前記平均濃度値算出手段により算出された局所的な平均
濃度値の大きさに応じて二値化閾値を当該局所的な平均
濃度値より高く設定する二値化閾値設定手段と、 前記二値化閾値設定手段により設定された二値化閾値に
より前記二値化すべき画素を二値化する二値化手段と、 を備えたことを特徴とする画像二値化装置。
9. A density value input means for inputting a density value of each pixel constituting a multi-valued image, and a local value including a pixel to be binarized based on the density value input by the density value input means. Average density value calculating means for calculating an average density value, and a binarization threshold higher than the local average density value according to the size of the local average density value calculated by the average density value calculating means. Binarization threshold setting means for setting, and binarization means for binarizing the pixel to be binarized with the binarization threshold set by the binarization threshold setting means, Image binarization device.
【請求項10】 前記二値化閾値設定手段は、前記平均
濃度値算出手段により算出された局所的な平均濃度値に
応じた補正量であって、平均濃度値が所定の中間レンジ
にある場合には当該中間レンジ外にある場合よりも大き
な値である補正量を当該局所的な平均濃度値に加算する
ことにより二値化閾値を設定することを特徴とする請求
項9に記載の画像二値化装置。
10. The binarization threshold setting means, wherein the correction value is a correction amount according to the local average density value calculated by the average density value calculation means, and the average density value is in a predetermined intermediate range. 10. The image processing method according to claim 9, wherein a binarization threshold is set by adding a correction amount that is larger than a value outside the intermediate range to the local average density value. Pricer.
【請求項11】 前記二値化閾値設定手段は、前記平均
濃度値算出手段により算出された局所的な平均濃度値に
対して、平均濃度値が大きな値となるほどに小さな値の
補正量を用いて乗算することにより二値化閾値を設定す
ることを特徴とする請求項9に記載の画像二値化装置。
11. The binarization threshold value setting means uses a correction amount of a smaller value for the local average density value calculated by the average density value calculation means as the average density value becomes larger. 10. The image binarization device according to claim 9, wherein the binarization threshold is set by multiplying the image.
【請求項12】 多値画像を構成する各画素の濃度値を
入力する濃度値入力手段と、 前記濃度値入力手段により入力された濃度値に基づい
て、二値化すべき画素を含んだ局所的な平均濃度値を算
出する平均濃度値算出手段と、 前記平均濃度値算出手段により算出された局所的な平均
濃度値に第1の補正量を加算して第1の二値化閾値を算
出する加算閾値算出手段と、 前記平均濃度値算出手段により算出された局所的な平均
濃度値に1以上の値である第2の補正量を乗じて第2の
二値化閾値を算出する乗算閾値算出手段と、 前記平均濃度値算出手段により算出された局所的な平均
濃度値の大きさが、所定の比較値より大であるか小であ
るかを判定する比較判定手段と、 前記比較判定手段により前記局所的な平均濃度値の大き
さが前記比較値より小であると判定された場合には、前
記加算閾値算出手段により算出される前記第1の二値化
閾値を採用することを決定し、前記比較判定手段により
前記局所的な平均濃度値の大きさが前記比較値より大で
あると判定された場合には、前記乗算閾値算出手段によ
り算出される前記第2の二値化閾値を採用することを決
定する二値化閾値決定手段と、 前記二値化閾値決定手段により決定された二値化閾値に
より前記二値化すべき画素を二値化する二値化手段と、 を備えたことを特徴とする画像二値化装置。
12. A density value input means for inputting a density value of each pixel constituting a multi-valued image, and a local value including a pixel to be binarized based on the density value input by the density value input means. Average density value calculating means for calculating an average density value, and calculating a first binarization threshold value by adding a first correction amount to the local average density value calculated by the average density value calculating means. Addition threshold value calculation means, and multiplication threshold value calculation for calculating a second binarization threshold value by multiplying the local average density value calculated by the average density value calculation means by a second correction amount that is one or more. Means, a comparison determination means for determining whether the local average density value calculated by the average density value calculation means is larger or smaller than a predetermined comparison value, and the comparison determination means The magnitude of the local average density value is greater than the comparison value. If it is determined to be small, it is determined that the first binarization threshold calculated by the addition threshold calculation means is to be used, and the magnitude of the local average density value is determined by the comparison determination means. When it is determined that is larger than the comparison value, a binarization threshold determination unit that determines to adopt the second binarization threshold calculated by the multiplication threshold calculation unit; An image binarization device, comprising: a binarization unit that binarizes the pixel to be binarized according to the binarization threshold determined by the binarization threshold determination unit.
【請求項13】 前記加算閾値算出手段は、前記平均濃
度値算出手段により算出された局所的な平均濃度値に対
して、当該濃度値の大きさに応じた補正量を加算するこ
とにより前記第1の二値化閾値を算出することを特徴と
する請求項12に記載の画像二値化装置。
13. The method according to claim 1, wherein the adding threshold value calculating means adds the correction amount according to the magnitude of the density value to the local average density value calculated by the average density value calculating means. 13. The image binarization device according to claim 12, wherein one binarization threshold is calculated.
【請求項14】 前記乗算閾値設定手段は、前記平均濃
度値算出手段により算出された局所的な平均濃度値に対
して、当該濃度値の大きさに応じた補正量で乗算するこ
とにより前記第2の二値化閾値を算出することを特徴と
する請求項12または13に記載の画像二値化装置。
14. The multiplication threshold value setting means multiplies the local average density value calculated by the average density value calculation means by a correction amount corresponding to the magnitude of the density value. 14. The image binarization device according to claim 12, wherein a binarization threshold value of 2 is calculated.
【請求項15】 多値画像をブロックに分割するブロッ
ク分割手段を備え、前記平均濃度値算出手段は、前記ブ
ロック分割手段により分割されたブロックに基づいて前
記局所的な平均濃度値を算出することを特徴とする請求
項9〜14のいずれか一つに記載の画像二値化装置。
15. An image processing apparatus comprising: a block dividing unit that divides a multi-valued image into blocks; wherein the average density value calculating unit calculates the local average density value based on the blocks divided by the block dividing unit. The image binarization device according to any one of claims 9 to 14, wherein:
【請求項16】 前記局所的な平均濃度値を算出するブ
ロックに隣接するブロックの平均濃度値に基づいて前記
比較値を決定する比較値決定手段を備えたことを特徴と
する請求項15に記載の画像二値化装置。
16. The apparatus according to claim 15, further comprising comparison value determination means for determining said comparison value based on an average density value of a block adjacent to a block for calculating said local average density value. Image binarization device.
【請求項17】 多値画像を構成する画素の輝度値を入
力し、二値化すべき画素を含んだ局所的な画素集合の平
均輝度値より低い値の二値化閾値であって白飛びしてい
る画素集合に対しては白飛びしていない画素集合に対し
てよりも平均輝度値との差が小さな二値化閾値を決定
し、当該局所的な画素集合の画像を前記二値化閾値を用
いて二値化して出力することを特徴とする画像二値化方
法。
17. A binarization threshold value which is lower than an average luminance value of a local pixel set including a pixel to be binarized when a luminance value of a pixel constituting a multi-valued image is input. For the set of pixels, a binarization threshold having a smaller difference from the average luminance value than for the set of pixels not overexposed is determined, and the image of the local pixel set is converted to the binarization threshold. An image binarization method characterized in that the image is binarized and output using.
【請求項18】 多値画像を構成する画素の濃度値を入
力し、二値化すべき画素を含んだ局所的な画素集合の平
均濃度値より高い値の二値化閾値であって白飛びしてい
る画素集合に対しては白飛びしていない画素集合に対し
てよりも平均濃度値との差が小さな二値化閾値を決定
し、当該局所的な画素集合の画像を前記二値化閾値を用
いて二値化して出力することを特徴とする画像二値化方
法。
18. A binarization threshold value which is higher than an average density value of a local pixel set including a pixel to be binarized, which is input as a density value of a pixel constituting a multi-valued image. For the set of pixels, a binarization threshold having a smaller difference from the average density value than for the set of pixels that are not overexposed is determined, and the image of the local pixel set is subjected to the binarization threshold. An image binarization method characterized in that the image is binarized and output using.
【請求項19】 コンピュータに、多値画像を構成する
画素の輝度値を入力させ、二値化すべき画素を含んだ局
所的な画素集合の平均輝度値より低い値の二値化閾値で
あって白飛びしている画素集合に対しては白飛びしてい
ない画素集合に対してよりも平均輝度値との差が小さく
なるような二値化閾値を決定させ、当該局所的な画素集
合の画像を前記二値化閾値を用いて二値化して出力させ
ることを特徴とする画像二値化プログラム。
19. A binarization threshold having a value lower than an average luminance value of a local pixel set including a pixel to be binarized, the luminance value of a pixel forming a multi-valued image being input to a computer. The binarization threshold is determined such that the difference from the average luminance value is smaller for the pixel set that is overexposed than for the pixel set that is not overexposed, and the image of the local pixel set is determined. Using the binarization threshold to output the image.
【請求項20】 コンピュータに、多値画像を構成する
画素の濃度値を入力させ、二値化すべき画素を含んだ局
所的な画素集合の平均濃度値より高い値の二値化閾値で
あって白飛びしている画素集合に対しては白飛びしてい
ない画素集合に対してよりも平均濃度値との差が小さく
なるような二値化閾値を決定させ、当該局所的な画素集
合の画像を前記二値化閾値を用いて二値化して出力させ
ることを特徴とする画像二値化プログラム。
20. A binarization threshold having a higher value than an average density value of a local pixel set including a pixel to be binarized, in which a computer inputs a density value of a pixel forming a multi-valued image. The binarization threshold is determined such that the difference from the average density value is smaller for the pixel set that is overexposed than for the pixel set that is not overexposed, and the image of the local pixel set is determined. Binarizing the image using the binarization threshold and outputting the binarized image.
JP2001154087A 2001-05-23 2001-05-23 Image binarization apparatus, image binarization method, and image binarization program Expired - Lifetime JP4132725B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001154087A JP4132725B2 (en) 2001-05-23 2001-05-23 Image binarization apparatus, image binarization method, and image binarization program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001154087A JP4132725B2 (en) 2001-05-23 2001-05-23 Image binarization apparatus, image binarization method, and image binarization program

Publications (2)

Publication Number Publication Date
JP2002354248A true JP2002354248A (en) 2002-12-06
JP4132725B2 JP4132725B2 (en) 2008-08-13

Family

ID=18998491

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001154087A Expired - Lifetime JP4132725B2 (en) 2001-05-23 2001-05-23 Image binarization apparatus, image binarization method, and image binarization program

Country Status (1)

Country Link
JP (1) JP4132725B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005006061A (en) * 2003-06-12 2005-01-06 Matsushita Electric Ind Co Ltd Image processor
JP2008113071A (en) * 2006-10-27 2008-05-15 Matsushita Electric Works Ltd Automatic tracking device
JP2008147983A (en) * 2006-12-08 2008-06-26 Ricoh Co Ltd Image binarizing device and method
US8194134B2 (en) 2006-10-27 2012-06-05 Panasonic Corporation Target moving object tracking device
JP2015148686A (en) * 2014-02-05 2015-08-20 株式会社ニコン Subject detection device, imaging device, and image processing program
CN116993624A (en) * 2023-09-25 2023-11-03 湖南肆玖科技有限公司 Image data processing method, device and medium

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005006061A (en) * 2003-06-12 2005-01-06 Matsushita Electric Ind Co Ltd Image processor
US7688361B2 (en) 2003-06-12 2010-03-30 Panasonic Corporation Image processor including memory controller which starts reading image data before writing screenful of image data is completed
JP4598374B2 (en) * 2003-06-12 2010-12-15 パナソニック株式会社 Image processing device
JP2008113071A (en) * 2006-10-27 2008-05-15 Matsushita Electric Works Ltd Automatic tracking device
US8194134B2 (en) 2006-10-27 2012-06-05 Panasonic Corporation Target moving object tracking device
JP2008147983A (en) * 2006-12-08 2008-06-26 Ricoh Co Ltd Image binarizing device and method
JP4700597B2 (en) * 2006-12-08 2011-06-15 株式会社リコー Image binarization apparatus and image binarization method
JP2015148686A (en) * 2014-02-05 2015-08-20 株式会社ニコン Subject detection device, imaging device, and image processing program
CN116993624A (en) * 2023-09-25 2023-11-03 湖南肆玖科技有限公司 Image data processing method, device and medium
CN116993624B (en) * 2023-09-25 2023-12-29 湖南肆玖科技有限公司 Image data processing method, device and medium

Also Published As

Publication number Publication date
JP4132725B2 (en) 2008-08-13

Similar Documents

Publication Publication Date Title
US6898329B1 (en) Image binarization apparatus, image binarization method, image pickup apparatus, image pickup method, and a computer product
US7460168B2 (en) Image processing apparatus for generating a wide dynamic range image
WO2020034737A1 (en) Imaging control method, apparatus, electronic device, and computer-readable storage medium
JP6116272B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP2001008032A5 (en)
JP2013009316A (en) Imaging apparatus performing exposure control, control method of imaging apparatus, program, and recording medium
US20120127336A1 (en) Imaging apparatus, imaging method and computer program
WO2020034701A1 (en) Imaging control method and apparatus, electronic device, and readable storage medium
US10091422B2 (en) Image processing device and recording medium
US11601600B2 (en) Control method and electronic device
JP2002300402A (en) Image processor, processing method and recording medium
JP4079814B2 (en) Image processing method, image processing apparatus, image forming apparatus, imaging apparatus, and computer program
CN108259754A (en) Image processing method and device, computer readable storage medium and computer equipment
US7327493B2 (en) Image reading system and image reading program
JP4132725B2 (en) Image binarization apparatus, image binarization method, and image binarization program
JPH08235355A (en) Picture processor
JPH1169372A (en) Image lightness control method, digital camera used for the same and image processor
JPH1098678A (en) Detection and correction of mirror reflection in digital image acquisition
JP2018092350A (en) Image processing apparatus, image processing method, and program
JP2007228221A (en) Imaging apparatus, image processing apparatus, image processing method and image processing program
JP6786273B2 (en) Image processing equipment, image processing methods, and programs
JP2890456B2 (en) Image processing device
JP7135575B2 (en) Image processing device, image reading device and program
JP3974236B2 (en) Image processing apparatus and method
JP2006229488A (en) Device and method for correcting contour

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060925

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071106

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071228

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: 20080513

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: 20080602

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110606

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4132725

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: 20110606

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120606

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130606

Year of fee payment: 5

EXPY Cancellation because of completion of term