JPH0591324A - Method of setting reference density point - Google Patents

Method of setting reference density point

Info

Publication number
JPH0591324A
JPH0591324A JP3277344A JP27734491A JPH0591324A JP H0591324 A JPH0591324 A JP H0591324A JP 3277344 A JP3277344 A JP 3277344A JP 27734491 A JP27734491 A JP 27734491A JP H0591324 A JPH0591324 A JP H0591324A
Authority
JP
Japan
Prior art keywords
density
block
value
histogram
blocks
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
JP3277344A
Other languages
Japanese (ja)
Other versions
JP2584556B2 (en
Inventor
Shinji Asada
晋次 朝田
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.)
Dainippon Screen Manufacturing Co Ltd
Original Assignee
Dainippon Screen Manufacturing 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 Dainippon Screen Manufacturing Co Ltd filed Critical Dainippon Screen Manufacturing Co Ltd
Priority to JP3277344A priority Critical patent/JP2584556B2/en
Priority to DE69216190T priority patent/DE69216190T2/en
Priority to EP92116365A priority patent/EP0534430B1/en
Priority to US07/953,536 priority patent/US5680477A/en
Publication of JPH0591324A publication Critical patent/JPH0591324A/en
Application granted granted Critical
Publication of JP2584556B2 publication Critical patent/JP2584556B2/en
Priority to US08/870,989 priority patent/US5875262A/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Facsimile Image Signal Circuits (AREA)

Abstract

PURPOSE:To provide the setting method of the reference density point to obtain a gradation conversion curve which reduces an influence of bright and dark background parts. CONSTITUTION:The original picture is divided into plural blocks and a background part, is detected from these blocks in a step S1, and the number of picture elements of the block in the background part is compressed relatively to that of the other blocks and a cumulative relative frequency histogram of the whole of the original picture is obtained in this state in a step S2, and a cumulative density value histogram to which temporary highlight and shadow density values obtained based on the cumulative relative frequency histogram are applied is generate in a step S3, and the reference density point or the gradation conversion curve is obtained based on the cumulative relative frequency histogram and the cumulative density value histogram in a step S4. Thus, a copied picture is prevented from being too dark neither too white even in the case of the existence of bright and dark background parts.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、製版用カラースキャ
ナ等の画像処理の分野で使用される階調変換装置におい
て、基準濃度点であるハイライト点および/またはシャ
ドウ点を設定する方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for setting a highlight point and / or a shadow point which is a reference density point in a gradation converting apparatus used in the field of image processing such as a color scanner for plate making.

【0002】[0002]

【従来の技術】製版用カラースキャナなどの色分解装置
においてハイライト濃度、シャドウ濃度を自動的に設定
する方法として、本出願人による特開平2−15775
8号公報に開示されるものがある。この従来公報に開示
される方法は、図17に示すような手順で階調変換曲線
の入力側ハイライト濃度値、シャドウ濃度値を求めるも
のである。
2. Description of the Related Art As a method for automatically setting highlight density and shadow density in a color separation device such as a plate-making color scanner, Japanese Patent Laid-Open No. 15775/1990 by the present applicant.
Some are disclosed in Japanese Patent No. The method disclosed in this prior art publication obtains the input side highlight density value and the shadow density value of the gradation conversion curve by the procedure shown in FIG.

【0003】まず、ステップS501で、複製対象原画
をプリスキャンし、この原画の画像の色成分別の濃度値
を画素ごとに求める。
First, in step S501, an original image to be reproduced is prescanned, and a density value for each color component of the image of the original image is obtained for each pixel.

【0004】次に、ステップS502で、画素ごとに色
成分別の濃度値を平均して平均濃度値を求め、平均濃度
値度数ヒストグラムを求める。
Next, in step S502, the density values for each color component are averaged for each pixel to obtain an average density value, and an average density value frequency histogram is obtained.

【0005】次に、ステップS503で、色成分別に各
階級ごとに累積濃度値を求め、図19に示すような累積
濃度値ヒストグラムを求める(但し、図19は色成分R
についての累積濃度値ヒストグラムのみを図示してい
る)。
Next, in step S503, the cumulative density value is obtained for each class for each color component, and a cumulative density value histogram as shown in FIG. 19 is obtained (however, FIG. 19 shows the color component R).
Only the cumulative density value histogram for the is shown.

【0006】次に、ステップS504で、濃度の低い方
の階級から画素を累積加算した画素の相対度数を求め、
図18に示すような、最小および最大発生濃度値の範囲
で0から100%まで変化する累積相対度数ヒストグラ
ムを求める。
Next, in step S504, the relative frequency of the pixel obtained by cumulatively adding the pixels from the lower density class is obtained,
A cumulative relative frequency histogram that changes from 0 to 100% in the range of the minimum and maximum generated density values as shown in FIG. 18 is obtained.

【0007】次に、ステップS505で、経験的に求め
られる最適の階調変換特性を与えるハイライト点および
シャドウ点に対応する所定の累積濃度出現率RNH ,R
NSを前記累積相対度数ヒストグラムに適用することに
より、前記累積相対度数に対応する仮のハイライト平均
濃度値DMH,シャドウ平均濃度値DMSを求める。
Next, in step S505, predetermined cumulative density appearance rates RNH, R corresponding to highlight points and shadow points that give optimum gradation conversion characteristics empirically obtained.
By applying NS to the cumulative relative frequency histogram, the temporary highlight average density value DMH and shadow average density value DMS corresponding to the cumulative relative frequency are obtained.

【0008】そして、最後にステップS506で、前記
仮のハイライト平均濃度値DMH,シャドウ平均濃度値D
MSを図19に示す色成分ごとの累積濃度値ヒストグラム
に適用し、色成分ごとの入力側ハイライト濃度値および
入力側シャドウ濃度値を求めるのである。以上のように
して求めた入力側ハイライト濃度値および入力側シャド
ウ濃度値と予め任意に設定された出力側ハイライト濃度
値および出力側シャドウ濃度値とに基づいて、階調変換
曲線が通るべきハイライト点とシャドウ点、すなわち基
準濃度点が設定される。
Finally, in step S506, the temporary highlight average density value DMH and shadow average density value D
By applying the MS to the cumulative density value histogram for each color component shown in FIG. 19, the input side highlight density value and the input side shadow density value for each color component are obtained. The tone conversion curve should pass based on the input side highlight density value and the input side shadow density value and the output side highlight density value and the output side shadow density value that have been set in advance as described above. A highlight point and a shadow point, that is, a reference density point is set.

【0009】[0009]

【発明が解決しようとする課題】しかしながら、上記特
開平2−157758号公報に開示される方法では、原
画像が明るい背景を持つシーンである場合や逆光で撮影
されたシーンであった場合に、入力側ハイライト濃度値
が望ましい値よりも低く設定され、複製画が暗い仕上が
りになることがあった。また、逆に原画像が暗い背景を
持つシーンである場合には、入力側シャドウ濃度値が高
めに設定され、白っぽい仕上がりになる。
However, in the method disclosed in Japanese Patent Laid-Open No. 2-157758 mentioned above, when the original image is a scene having a bright background or is a scene photographed by backlight, The highlight density value on the input side was set lower than the desired value, sometimes resulting in a dark finish on the duplicate image. On the contrary, when the original image is a scene with a dark background, the input side shadow density value is set to a high value, resulting in a whitish finish.

【0010】これは以下のような原因による。すなわ
ち、例えば原画像が明るい背景を持つシーンである場
合、この明るい背景部分の影響により、図19に示す累
積濃度値ヒストグラムは相対的に濃度の低い階級の頻度
が高いヒストグラムとなる。このため、図18の累積相
対度数ヒストグラムから求める仮のハイライト平均濃度
値が低くなり、前記ステップS506で求める入力側ハ
イライト濃度値も低くなる。このようにして入力側ハイ
ライト濃度値が低くなると、この入力側ハイライト側濃
度値に基づいて設定する階調変換曲線はハイライト領域
が出力側シャドウ濃度値に移行し、結果として複製画が
暗い仕上がりとなってしまうのである。
This is due to the following causes. That is, for example, when the original image is a scene having a bright background, the cumulative density histogram shown in FIG. 19 becomes a histogram in which the class of relatively low density has a high frequency due to the influence of this bright background portion. Therefore, the provisional highlight average density value obtained from the cumulative relative frequency histogram of FIG. 18 becomes low, and the input side highlight density value obtained at step S506 also becomes low. When the input side highlight density value becomes low in this way, the gradation conversion curve set based on this input side highlight density value shifts the highlight area to the output side shadow density value, resulting in a duplicate image. The result is a dark finish.

【0011】原画像が暗い背景を持つものである場合に
は、図19の累積濃度値ヒストグラムは相対的に濃度の
高い階級の頻度が高いヒストグラムとなり、ステップS
506で求める入力側シャドウ濃度値は高くなる。した
がって、階調変換曲線はシャドウ領域が出力側ハイライ
ト濃度値側に移行したものとなり、この階調変換曲線に
したがって階調変換された複製画は白っぽい仕上がりに
なってしまうのである。
When the original image has a dark background, the cumulative density histogram shown in FIG. 19 is a histogram in which the density of the class having a relatively high density is high, and step S
The input side shadow density value obtained in 506 becomes high. Therefore, the gradation conversion curve is such that the shadow area is shifted to the output side highlight density value side, and the copied image gradation-converted according to this gradation conversion curve has a whitish finish.

【0012】この発明は、原画像の背景の状態に影響さ
れることなく、望ましい複製画の仕上がりを得られる階
調変換曲線の基準濃度点の設定方法を提供することを目
的とする。
It is an object of the present invention to provide a method of setting a reference density point of a gradation conversion curve that can obtain a desired finished copy image without being affected by the background state of the original image.

【0013】[0013]

【課題を解決するための手段】上記目的を達成する請求
項1の基準濃度点の設定方法は、階調を有する複製対象
原画像を読取って得られた画像データに基づいて、複製
に際して階調変換を行うために設定する階調変換曲線が
通るべき基準濃度点を設定する方法であって、原画像を
複数のブロックに分割する第1の工程と、原画像の画像
データに基づいて、各ブロックごとに濃度値とこの濃度
値を与える画素数との関係を示すブロック別濃度ヒスト
グラムを求める第2の工程と、前記画像データに基づい
て、互いに近接し、それぞれの濃度が均一であり且つ濃
度が連続するブロックでなるブロック群を選別する第3
の工程と、第3の工程で選別されたブロック群から、所
定ブロックと濃度が連続しているブロックを備えるブロ
ック群のブロックを背景ブロックとして検出する第4の
工程と、前記背景ブロックの画素数を、前記背景ブロッ
クに選別されなかったブロックの画素数に対して、前記
ブロック別濃度ヒストグラムの各階級ごとに相対的に圧
縮する第5の工程と、第5の工程の後、各階級ごとに全
ブロックの画素数を加算することにより、原画像全体の
濃度ヒストグラムを求める第6の工程と、前記原画像全
体の濃度ヒストグラムに基づいて、累積濃度値ヒストグ
ラムを求める第7の工程と、前記累積濃度値ヒストグラ
ムに基づいて、基準濃度点を設定する第8の工程と、を
備えることを特徴としている。なお、前記累積濃度値ヒ
ストグラムは原画像全体において少なくともハイライト
部分およびシャドウ部分を含んでいればよい。
According to a first aspect of the present invention, there is provided a method for setting a reference density point according to claim 1, wherein a gradation is set when copying based on image data obtained by reading an original image to be copied having a gradation. A method of setting a reference density point through which a gradation conversion curve set for conversion is to be set, which comprises: a first step of dividing an original image into a plurality of blocks; The second step of obtaining a density histogram for each block showing the relationship between the density value for each block and the number of pixels giving this density value; and the density is uniform and the density is close to each other based on the image data. The third that selects a block group consisting of consecutive blocks
And a fourth step of detecting, as a background block, a block of a block group including a block whose density is continuous with a predetermined block from the block group selected in the third step, and the number of pixels of the background block Relative to the number of pixels of the block not selected as the background block for each class of the density histogram for each block, and after the fifth step, for each class. A sixth step of obtaining a density histogram of the entire original image by adding the numbers of pixels of all blocks; a seventh step of obtaining a cumulative density value histogram based on the density histogram of the entire original image; An eighth step of setting a reference density point based on the density value histogram. The cumulative density value histogram may include at least a highlight portion and a shadow portion in the entire original image.

【0014】請求項2の基準濃度点の設定方法は、請求
項1において前記第4の工程における所定ブロックが原
画像の四隅のブロックであることを特徴としている。
According to a second aspect of the present invention, the predetermined density points in the fourth step are the blocks at the four corners of the original image.

【0015】また、請求項3の基準濃度点の設定方法
は、請求項1または請求項2において、第3の工程が、
互いに近接し且つそれぞれの濃度が均一であるブロック
の濃度平均値の差が所定値以下であるとき、これらのブ
ロックの濃度が連続しているものとすることを特徴とと
している。
The method of setting the reference density point according to claim 3 is the method according to claim 1 or 2, wherein the third step is
When the difference between the density average values of the blocks which are close to each other and have uniform densities is less than or equal to a predetermined value, the densities of these blocks are continuous.

【0016】請求項4の基準濃度点の設定方法は、請求
項1〜3のいずれか一つに記載の基準濃度点の設定方法
において、背景ブロックの濃度ヒストグラムの各階級の
画素数に1未満の係数を乗じるとともに背景ブロック以
外のブロックの濃度ヒストグラムの各階級の画素数に1
を乗じることによって、前記濃度ヒストグラムの各階級
ごとに、前記背景ブロックの画素数を前記背景ブロック
以外のブロックの画素数に対して相対的に圧縮すること
を特徴としている。
A method of setting a reference density point according to a fourth aspect is the method of setting a reference density point according to any one of the first to third aspects, wherein the number of pixels of each class of the density histogram of the background block is less than one. And multiply the number of pixels in each class of the density histogram of blocks other than the background block by 1
By multiplying by, the number of pixels of the background block is relatively compressed with respect to the number of pixels of blocks other than the background block for each class of the density histogram.

【0017】請求項5の基準濃度点の設定方法は、請求
項4の基準濃度点の設定方法において、背景ブロックの
濃度ヒストグラムの各階級の画素数に乗じる係数が0で
あることを特徴としている。
According to a fifth aspect of the present invention, there is provided a method for setting a reference density point according to the fourth aspect, wherein a coefficient by which the number of pixels of each class of the density histogram of the background block is multiplied is zero. ..

【0018】請求項6〜8の基準濃度点の設定方法は、
請求項1〜5のいずれか一つに記載の基準濃度点の設定
方法において、(1) 濃度値が画素ごとの各色成分の濃度
値を平均した平均濃度値であること、(2) 濃度値が選択
された色成分の画素ごとの濃度値であること、もしくは
(3) 濃度値が画素ごとの各色成分の濃度値であることを
特徴としている。
The method of setting the reference density points according to claims 6 to 8 is as follows:
The reference density point setting method according to any one of claims 1 to 5, wherein (1) the density value is an average density value obtained by averaging the density values of the respective color components for each pixel, and (2) the density value. Is the density value for each pixel of the selected color component, or
(3) It is characterized in that the density value is the density value of each color component for each pixel.

【0019】[0019]

【作用】請求項1の基準濃度点の設定方法によると、一
様に明るいかあるいは一様に暗い濃度が均一なブロック
であってしかも所定のブロックと直接または間接に濃度
が連続しているブロックが背景ブロックとして選別され
る。また、各背景ブロックの画素数が、背景ブロック以
外の各ブロックの画素数に対して相対的に圧縮されるこ
とにより、原画像全体の濃度ヒストグラムの各階級の画
素数中において前記背景ブロックの濃度ヒストグラムの
各階級の画素数が占める割り合いが、前記圧縮がない場
合に比べ減少する。したがって、原画像の背景が明るい
背景の時には、背景ブロックの画素数を相対的に圧縮し
ない場合に比べ、主に入力側ハイライト濃度値が大きく
なることにより、階調変換曲線はハイライト領域が出力
側ハイライト濃度値側に移行する。また、原画像の背景
が暗い背景の時には、背景ブロックの画素数を相対的に
圧縮しない場合に比べ、主に入力側シャドウ濃度値が小
さくなることにより階調変換曲線はシャドウ領域が出力
側シャドウ濃度値側に移行する。
According to the method of setting the reference density point of claim 1, the block is a block which is uniformly bright or dark and has a uniform density and which is directly or indirectly continuous with a predetermined block. Is selected as a background block. In addition, the number of pixels of each background block is relatively compressed with respect to the number of pixels of each block other than the background block, so that the density of the background block in the number of pixels of each class of the density histogram of the entire original image is reduced. The ratio of the number of pixels in each class of the histogram is reduced as compared with the case without the compression. Therefore, when the background of the original image is a bright background, the input side highlight density value is mainly larger than that in the case where the number of pixels of the background block is not relatively compressed. The output side shifts to the highlight density value side. Also, when the background of the original image is a dark background, the gradation value of the tone conversion curve is mainly due to the smaller input side shadow density value compared to when the number of pixels in the background block is not relatively compressed. Shift to the density value side.

【0020】請求項2の基準濃度点の設定方法による
と、前記第4の工程で検出される背景ブロックは原画像
の四隅のブロックと直接または間接に濃度が連続してい
る。
According to the reference density point setting method of the second aspect, the background blocks detected in the fourth step are directly or indirectly continuous in density with the blocks at the four corners of the original image.

【0021】請求項3の基準濃度点の設定方法では、濃
度が均一で且つ近接する一様に明るいブロック同士ある
いは一様に暗いブロック同士は、これらのブロックの濃
度平均値の差が所定値以下であるときに、濃度が連続し
たブロックとされる。
According to the third aspect of the present invention, in the method of setting the reference density point, the difference between the average density values of these blocks is equal to or less than a predetermined value between the uniformly bright blocks or the uniformly dark blocks having the same density and close to each other. , The density is a continuous block.

【0022】請求項4の基準濃度点の設定方法による
と、背景ブロックとして検出されたブロックの画素数を
減少させることにより、この背景ブロックの画素数を背
景ブロック以外のブロックの画素数に対して相対的に圧
縮している。
According to the reference density point setting method of the fourth aspect, the number of pixels of the block detected as the background block is reduced, so that the number of pixels of this background block is compared with the number of pixels of blocks other than the background block. It is relatively compressed.

【0023】請求項5の基準濃度点の設定方法による
と、背景ブロックに選別されたブロックの画素は原画像
全体の累積濃度値ヒストグラムを求めるにあたって完全
に無視される。
According to the reference density point setting method of the fifth aspect, the pixels of the block selected as the background block are completely ignored in obtaining the cumulative density value histogram of the entire original image.

【0024】請求項6の基準濃度点の設定方法による
と、背景ブロックの画素の影響が基準濃度付近の色成分
の比率に応じてを軽減される。
According to the reference density point setting method of the sixth aspect, the influence of the pixels of the background block is reduced according to the ratio of the color components near the reference density.

【0025】請求項7の基準濃度点の設定方法による
と、背景ブロックが特定の色成分が大半を占める画素で
なる場合に、その色成分に関して背景ブロックの画素の
影響が軽減される。
According to the reference density point setting method of claim 7, when the background block is composed of pixels occupying the majority of the specific color component, the influence of the pixels of the background block on the color component is reduced.

【0026】請求項8の基準濃度点の設定方法による
と、背景ブロックの画素の影響が色成分ごとに軽減され
る。
According to the reference density point setting method of the eighth aspect, the influence of the pixels of the background block is reduced for each color component.

【0027】[0027]

【実施例】図10は、この発明の一実施例を適用する製
版用スキャナの概略ブロック図である。同図において、
原画100の画像が走査読取装置200によって画素ご
とに読取られ、このようにして得られた画像信号が画像
処理装置300に転送される。画像処理装置300は、
後述する機能を持ったハイライト・シャドウ点設定部4
00を備えており、入力された画像信号に対してハイラ
イト・シャドウ点設定等の処理を行う。そして、処理後
の画像信号は走査記録装置500に与えられる。走査記
録装置500は画像信号を網点信号へと変換し、それに
基づいて、感光フィルム600上に網点画像を露光記録
する。
FIG. 10 is a schematic block diagram of a plate-making scanner to which an embodiment of the present invention is applied. In the figure,
The image of the original image 100 is read for each pixel by the scanning reading device 200, and the image signal thus obtained is transferred to the image processing device 300. The image processing device 300 is
Highlight / shadow point setting unit 4 with functions to be described later
00, and performs processing such as highlight / shadow point setting on the input image signal. Then, the processed image signal is given to the scanning recording apparatus 500. The scanning recording device 500 converts the image signal into a halftone dot signal, and on the basis of this, the halftone dot image is exposed and recorded on the photosensitive film 600.

【0028】図11は、上述したハイライト・シャドウ
点設定部400を含む画像処理装置300を示してい
る。ここではまず、走査読取装置200により得た画像
データが、ハイライト・シャドウ点設定部400を構成
する画像メモリ401に読み込まれる。この画像メモリ
401は、原画像OGを多数の画素、例えば縦512、
横512でなる262144個の画素に分解して記憶す
る。ハイライト・シャドウ点設定部400を構成するC
PU402は、多数の画素を持つ前記原画像OGを、図
12に示すように、縦V、横HでなるN個のブロックT
n に分割する。前記のように262144個の画素を持
つ原画像は、V=32,H=32であるN=1024の
ブロックTn に分割される。この場合、一つのブロック
Tn は縦16、横16の計256個の画素で構成される
ことになる。また、前記CPU402は、前記画像メモ
リ401に読み込まれた原画像データを元に、後述する
手順で階調変換曲線のハイライト点・シャドウ点を算出
する。
FIG. 11 shows an image processing apparatus 300 including the highlight / shadow point setting unit 400 described above. Here, first, the image data obtained by the scanning reading device 200 is read into the image memory 401 constituting the highlight / shadow point setting unit 400. The image memory 401 stores the original image OG in a large number of pixels, for example, a vertical 512,
It is decomposed into 262144 pixels of 512 pixels and stored. C configuring the highlight / shadow point setting unit 400
The PU 402 converts the original image OG having a large number of pixels into N blocks T each having a vertical V and a horizontal H, as shown in FIG.
split into n. As described above, the original image having 262144 pixels is divided into N = 1024 blocks Tn having V = 32 and H = 32. In this case, one block Tn is composed of 256 pixels in the vertical direction and 16 pixels in the horizontal direction. Further, the CPU 402 calculates the highlight point / shadow point of the gradation conversion curve based on the original image data read in the image memory 401 by the procedure described later.

【0029】CPU402が算出した前記ハイライト点
・シャドウ点は、階調変換装置301が備えるルックア
ップテーブル等の記憶部に与えられる。以後、前記走査
読取装置200から前記階調変換装置301に与えられ
る未補正のデジタル濃度信号は、前記ハイライト点・シ
ャドウ点に基づいて設定した階調変換曲線にしたがっ
て、正規化デジタル濃度信号に変換される。この正規化
デジタル濃度信号は、色演算ブロック302において所
定の色演算を施された後、前記走査記録装置500に出
力される。色演算ブロック302は、CRTやキーボー
ド等によって構成される図示しない入出力部からの指示
にしたがって所定の色演算を行う。
The highlight point / shadow point calculated by the CPU 402 is given to a storage unit such as a look-up table included in the gradation converting device 301. After that, the uncorrected digital density signal given from the scanning reading device 200 to the gradation converting device 301 becomes a normalized digital density signal according to the gradation converting curve set based on the highlight point / shadow point. To be converted. The normalized digital density signal is subjected to a predetermined color calculation in the color calculation block 302 and then output to the scanning printing apparatus 500. The color calculation block 302 performs a predetermined color calculation according to an instruction from an input / output unit (not shown) including a CRT, a keyboard, and the like.

【0030】前記ハイライト・シャドウ点設定部400
は、以下のようにして階調変換曲線のハイライト点およ
びシャドウ点を設定する。図1はこのハイライト点およ
びシャドウ点の概略的な設定手順を示している。
The highlight / shadow point setting section 400
Sets the highlight points and shadow points of the gradation conversion curve as follows. FIG. 1 shows a schematic setting procedure of the highlight point and the shadow point.

【0031】図1に示すように、前記ハイライト・シャ
ドウ点設定部400は、まずステップS1において、例
えば図12に示すような原画像OGの背景部分BKを検
出する。この図12において、背景部分BKは斜線で示
す主題部分MA以外の部分である。
As shown in FIG. 1, the highlight / shadow point setting section 400 first detects a background portion BK of the original image OG as shown in FIG. 12, for example, in step S1. In FIG. 12, the background portion BK is a portion other than the main subject portion MA indicated by diagonal lines.

【0032】次に、ステップS2において上記ステップ
S1で検出した背景部分BKの画素数を前記背景部分B
K以外(図12の場合は主題部分MA)のブロックの画
素数に対して相対的に圧縮した状態で、原画像OG全体
の累積相対度数ヒストグラムを作成する。
Next, in step S2, the number of pixels of the background portion BK detected in step S1 is set to the background portion B.
A cumulative relative frequency histogram of the entire original image OG is created in a state of being relatively compressed with respect to the number of pixels of blocks other than K (the subject portion MA in FIG. 12).

【0033】また、ステップ3において、色成分別の累
積濃度値ヒストグラムを作成する。
In step 3, a cumulative density histogram for each color component is created.

【0034】そして、ステップS4において、前記ステ
ップS2において作成した原画像OG全体の累積相対度
数ヒストグラムおよびステップS3において作成した累
積濃度値ヒストグラムに基づいて、階調変換曲線の基準
濃度点すなわちハイライト点とシャドウ点を算出する。
Then, in step S4, based on the cumulative relative frequency histogram of the entire original image OG created in step S2 and the cumulative density value histogram created in step S3, reference density points, that is, highlight points, of the gradation conversion curve. And calculate the shadow point.

【0035】以下に、上記ステップS1〜ステップS4
を詳細に説明する。
The steps S1 to S4 will be described below.
Will be described in detail.

【0036】前記ステップS1においては、図2〜図6
に示すような手順で原画像OG中の背景部分BKを検出
している。
In step S1 shown in FIGS.
The background portion BK in the original image OG is detected by the procedure shown in FIG.

【0037】まず、図2のステップS101において、
原画像OGを縦がV個で横がH個のN(H×V)個のブ
ロックTn に分割する(図12参照)。nはブロックT
n のブロック番号であって1〜Nの整数である。
First, in step S101 of FIG.
The original image OG is divided into N (H.times.V) blocks Tn having V in the vertical direction and H in the horizontal direction (see FIG. 12). n is block T
It is a block number of n and is an integer of 1 to N.

【0038】次に、ステップS102〜ステップS10
5において、各ブロックTn の濃度ヒストグラムhnj、
濃度平均値Dn 、濃度分散値Sn をn=1〜Nまで順次
求める。ここで、jはヒストグラムの階級番号であり0
〜Jの整数である。また最終階級番号Jは、最大濃度値
をDmax 、濃度ステップを△Dとしたとき、J=Dmax
/△Dで与えられる。以下、濃度ヒストグラムhnj、濃
度平均値Dn 、濃度分散値Snをさらに詳細に説明す
る。
Next, steps S102 to S10.
5, the density histogram hnj of each block Tn,
The density average value Dn and the density dispersion value Sn are sequentially obtained from n = 1 to N. Where j is the histogram class number and is 0
Is an integer from ~ J. The final class number J is J = Dmax, where Dmax is the maximum density value and ΔD is the density step.
/ ΔD Hereinafter, the density histogram hnj, the density average value Dn, and the density variance value Sn will be described in more detail.

【0039】この実施例における前記濃度ヒストグラム
hnjは、個々の画素の色成分ごとの濃度値を平均した平
均濃度値の濃度ヒストグラムであって、例えば以下のよ
うな手順で作成する。すなわち、まず原画像OGをプリ
スキャンすることにより求めた各画素ごとの色成分別の
濃度値DR,DG,DBを、数1の式により平均化すること
によって、各画素ごとの平均濃度値DMを求める。
The density histogram hnj in this embodiment is a density histogram of average density values obtained by averaging the density values of the color components of individual pixels, and is created by the following procedure, for example. That is, first, by averaging the density values DR, DG, and DB for the respective color components for each pixel, which are obtained by prescanning the original image OG, by the equation 1 to obtain the average density value DM for each pixel. Ask for.

【0040】[0040]

【数1】 [Equation 1]

【0041】そして、各ブロックTn ごとに、所定幅の
階級に属する画素の平均濃度値DM とこの平均濃度値D
M を与える画素数との関係を示すヒストグラムとして前
記濃度ヒストグラムhnjを作成する。
Then, for each block Tn, the average density value DM of the pixels belonging to the class of the predetermined width and this average density value D
The density histogram hnj is created as a histogram showing the relationship with the number of pixels giving M.

【0042】濃度平均値Dn は、個々のブロックTn 中
に含まれる画素ごとの平均濃度値DMni の平均値であ
る。すなわち、各ブロックTn の濃度平均値Dn は下記
の数2の式によって求めることができる。この数2の式
において、IはブロックTn 中の画素数である。
The average density value Dn is the average value of the average density values DMni of the pixels included in each block Tn. That is, the density average value Dn of each block Tn can be obtained by the following equation (2). In the equation of this equation 2, I is the number of pixels in the block Tn.

【0043】[0043]

【数2】 [Equation 2]

【0044】次に、濃度分散値Sn は、この実施例では
個々の画素の平均濃度値DMni を標本確率変数とする標
本標準偏差として下記の数3の式によって求めている。
Next, the density dispersion value Sn is obtained by the following formula 3 as a sample standard deviation using the average density value DMni of each pixel as a sample random variable in this embodiment.

【0045】[0045]

【数3】 [Equation 3]

【0046】以上のようにして、濃度ヒストグラムhn
j、濃度平均値Dn 、濃度分散値Snを求めた後、図2に
示す、ステップS106〜ステップS111において、
ブロックT1 〜TN の中から濃度が均一なブロックを検
出する。この実施例では、まず、ステップS107にお
いて、ブロックTn の分散値Sn を所定値εと比較す
る。ここでは、分散値Sn が所定値ε未満であるブロッ
クを濃度が均一なブロックとする。また、分散値Sn が
所定値ε以上であるブロックを濃度が不均一なブロック
としている。
As described above, the density histogram hn
After obtaining j, the density average value Dn, and the density variance value Sn, in steps S106 to S111 shown in FIG.
A block having a uniform density is detected from the blocks T1 to TN. In this embodiment, first, in step S107, the variance value Sn of the block Tn is compared with a predetermined value ε. Here, a block whose variance value Sn is less than a predetermined value ε is a block with uniform density. Further, a block having a variance value Sn of a predetermined value ε or more is defined as a block having non-uniform density.

【0047】そして、濃度が均一なブロックについて
は、ステップS108でフラグFSnを「1」とする。
また、濃度が不均一なブロックについては、ステップS
109でフラグFSn を「0」としている。ブロック番
号n=1〜Nまで上記ステップS107〜S111のル
ーチンを繰り返すことにより、全てのブロックTn のフ
ラグFSn が「1」または「0」とされる。
Then, for blocks having uniform densities, the flag FSn is set to "1" in step S108.
For blocks with uneven density, step S
At 109, the flag FSn is set to "0". By repeating the routine of steps S107 to S111 for the block numbers n = 1 to N, the flags FSn of all the blocks Tn are set to "1" or "0".

【0048】次に、図3〜図4に示すように、ステップ
S112〜ステップS137において、濃度が均一なブ
ロックについて、近接するブロックとの濃度の連続性を
評価する。この濃度の連続性の評価は、図13に示すよ
うな走査マスクを用いて行う。この図13に示す走査マ
スクは、評価を行うブロックTn に加え、この評価ブロ
ックTn の上の既に評価されているブロックTn-H 、評
価ブロックTn の前に評価されたブロックTn-1 、およ
び前記ブロックTn-H の前に評価されたブロックTn-H-
1 をカバーするものである。
Next, as shown in FIGS. 3 to 4, in steps S112 to S137, with respect to the blocks having uniform densities, the continuity of densities with adjacent blocks is evaluated. The continuity of density is evaluated using a scanning mask as shown in FIG. The scanning mask shown in FIG. 13 includes, in addition to the evaluation block Tn, an already evaluated block Tn-H above the evaluation block Tn, a block Tn-1 evaluated before the evaluation block Tn, and Block Tn-H- evaluated before block Tn-H
It covers one.

【0049】ステップS112においては、この図13
の走査マスクを用いて評価を行うのに先立って、前記ブ
ロックT1 〜TN のブロック番号n、後述するエクィブ
テーブルETk0,ETk1のテーブル番号k、ブロックT
n に順次付してゆくラベルLc を全て「1」に初期化し
ている。
In step S112, the process shown in FIG.
Prior to performing the evaluation using the scanning mask of No. 1, the block number n of the blocks T1 to TN, the table number k of the later-described active tables ETk0 and ETk1, and the block T.
All the labels Lc sequentially attached to n are initialized to "1".

【0050】次に、ステップS113〜S114におい
て、図13の走査マスクがカバーする前記評価ブロック
Tn およびブロックTn-H-1 が濃度の均一なブロックで
あるか否かを判定する。前記ブロックTn およびブロッ
クTn-H-1 が共に濃度が均一なブロックであれば、ステ
ップS115においてブロックTn の濃度平均値Dnと
ブロックTn-H-1 の濃度平均値Dn-H-1 との差の絶対値
を所定値dと比較する。前記絶対値が所定値dよりも小
さければ、ステップS116でブロックTnのラベルLn
をブロックTn-H-1 のラベルLn-H-1 と同じ値にす
る。このようにしてラベルLn をラベルLn-H-1 と同じ
値にした場合には、次に後述するステップS136に進
む。
Next, in steps S113 to S114, it is determined whether or not the evaluation block Tn and the block Tn-H-1 covered by the scan mask of FIG. 13 are blocks having uniform densities. If both the block Tn and the block Tn-H-1 have uniform densities, the difference between the density average value Dn of the block Tn and the density average value Dn-H-1 of the block Tn-H-1 is determined in step S115. The absolute value of is compared with a predetermined value d. If the absolute value is smaller than the predetermined value d, the label Ln of the block Tn is read in step S116.
To the same value as the label Ln-H-1 of the block Tn-H-1. When the label Ln has the same value as the label Ln-H-1 in this way, the process proceeds to step S136 described below.

【0051】ステップS114においてブロックTn-H-
1 の濃度が均一でないと判定された場合、ステップS1
15において濃度平均値Dn と濃度平均値Dn-H-1 の差
の絶対値が所定値d以上であると判定された場合には、
ステップS117に進む。
In step S114, the block Tn-H-
If it is determined that the density of 1 is not uniform, step S1
When it is determined in 15 that the absolute value of the difference between the density average value Dn and the density average value Dn-H-1 is equal to or greater than the predetermined value d,
It proceeds to step S117.

【0052】ステップS117では、ブロックTn-H が
濃度が均一なブロックであるか否かを判定する。前記ブ
ロックTn-H が濃度が均一なブロックであれば、ステッ
プS118においてブロックTn の濃度平均値Dn とブ
ロックTn-H の濃度平均値Dn-H との差の絶対値を所定
値dと比較する。前記濃度平均値Dn と濃度平均値Dn-
H との差の絶対値が所定値dよりも小さければ、ステッ
プS119でブロックTn のラベルLn をブロックTn-
H のラベルLn-H と同じ値にする。
In step S117, it is determined whether or not the block Tn-H has a uniform density. If the block Tn-H has a uniform density, the absolute value of the difference between the density average value Dn of the block Tn and the density average value Dn-H of the block Tn-H is compared with a predetermined value d in step S118. .. The density average value Dn and the density average value Dn-
If the absolute value of the difference from H is smaller than the predetermined value d, the label Ln of the block Tn is changed to the block Tn- in step S119.
The value is the same as the label Ln-H of H.

【0053】このように、評価するブロックTn のラベ
ルLn をその上のブロックTn-H のラベルLn-H と同じ
値にした場合には、次のステップS120で前記評価ブ
ロックTn の一つ前のブロックTn-1 が濃度が均一なブ
ロックであるか否かを判定する。このブロックTn-1 が
濃度が均一なブロックである場合には、ステップS12
1でブロックTn-H のラベルLn-H とブロックTn-1 の
ラベルLn-1 の値が等しいか否かを判定し、等しくない
場合にステップS122に進む。
In this way, when the label Ln of the block Tn to be evaluated is set to the same value as the label Ln-H of the block Tn-H above it, in the next step S120, the previous block of the evaluation block Tn is calculated. It is determined whether the block Tn-1 is a block having a uniform density. If this block Tn-1 is a block having a uniform density, step S12
In step 1, it is determined whether the label Ln-H of the block Tn-H and the label Ln-1 of the block Tn-1 are equal, and if they are not equal, the process proceeds to step S122.

【0054】ステップS122においては、ブロックT
n-H の濃度平均値Dn-H とブロックTn-1 の濃度平均値
Dn-1 との差の絶対値を所定値dと比較する。前記濃度
平均値Dn-H と濃度平均値Dn-1 との差の絶対値が所定
値dよりも小さければステップS123で、互いに統合
可能なラベルを記録するエクィブテーブルETk0,ET
k1にラベルLn-1 とラベルLn-H をそれぞれ記録する。
In step S122, the block T
The absolute value of the difference between the density average value Dn-H of nH and the density average value Dn-1 of the block Tn-1 is compared with a predetermined value d. If the absolute value of the difference between the density average value Dn-H and the density average value Dn-1 is smaller than the predetermined value d, in step S123, the active tables ETk0 and ET for recording mutually integrable labels.
Labels Ln-1 and Ln-H are recorded in k1, respectively.

【0055】すなわち、ブロックTn ,ブロックTn-1
,ブロックTn-H が全て濃度が均一なブロックであ
り、ラベルLn-H とラベルLn が同一の値であり、且つ
ブロックTn-H とブロックTn-1 の濃度が連続している
場合、ラベルLn-1 もラベルLn-H およびラベルLn に
することができるため、これをエクィブテーブルETk
0,ETk1に記録している。以上のようにしてエクィブ
テーブルETk0,ETk1にラベルLn-1 とラベルLn-H
を記録した後は、ステップS124でエクィブテーブル
のテーブル番号を一つ前に進め、次にステップS136
に進む。
That is, the block Tn and the block Tn-1
If the blocks Tn-H are all blocks having uniform densities, the labels Ln-H and Ln have the same value, and the densities of the blocks Tn-H and Tn-1 are continuous, the labels Ln Since -1 can also be labeled Ln-H and Ln, this is stored in the empty table ETk.
It is recorded at 0 and ETk1. As described above, the labels Ln-1 and Ln-H are added to the active tables ETk0 and ETk1.
After recording, the table number of the active table is advanced by one in step S124, and then step S136.
Proceed to.

【0056】なお、ステップS120でブロックTn-1
が濃度が均一なブロックでない場合、ステップS121
でラベルLn-1 とラベルLn-H がこの段階で既に同一の
値である場合、およびステップS122で濃度平均値D
n-H と濃度平均値Dn-1 との差の絶対値が所定値d以上
である場合には、エクィブテーブルETk0,ETk1には
何も記録することなくそのままステップS136に進
む。
In step S120, the block Tn-1
Is not a block with uniform density, step S121
If the label Ln-1 and the label Ln-H already have the same value at this stage, and in step S122, the density average value D
If the absolute value of the difference between nH and the average density value Dn-1 is greater than or equal to the predetermined value d, nothing is recorded in the active tables ETk0 and ETk1 and the process directly proceeds to step S136.

【0057】また、前記ステップS117においてブロ
ックTn-H が濃度が均一なブロックではないと判定され
た場合、およびステップS118で濃度平均値Dn と濃
度平均値Dn-H との差の絶対値が所定値d以上と判定さ
れた場合には、ステップS125へ進む。
When it is determined in step S117 that the block Tn-H is not a uniform density block, and in step S118, the absolute value of the difference between the density average value Dn and the density average value Dn-H is predetermined. If it is determined that the value is equal to or greater than the value d, the process proceeds to step S125.

【0058】ステップS125においては、ブロックT
n-1 が濃度が均一なブロックであるか否かを判定する。
ブロックTn-1 が濃度が均一なブロックである場合に
は、ステップS126において、ブロックTn-1 の濃度
平均値Dn-1 と評価ブロックTn の濃度平均値Dn との
差の絶対値が所定値dより小さいか否かを判定する。こ
こで前記絶対値が所定値dより小さい場合には、ステッ
プS127でブロックTn のラベルLn をブロックTn-
1 のラベルLn-1 と同一の値にする。ラベルLnをラベ
ルLn-1 と同一の値にした後は、ステップS136に進
む。
In step S125, the block T
It is determined whether n-1 is a block with uniform density.
If the block Tn-1 has a uniform density, in step S126, the absolute value of the difference between the density average value Dn-1 of the block Tn-1 and the density average value Dn of the evaluation block Tn is a predetermined value d. Determine if less than. If the absolute value is smaller than the predetermined value d, the label Ln of the block Tn is changed to the block Tn- in step S127.
The value is the same as the label Ln-1 of 1. After setting the label Ln to the same value as the label Ln-1, the process proceeds to step S136.

【0059】ステップS125においてブロックTn-1
が濃度が均一なブロックでないと判定された場合、もし
くはステップS126で濃度平均値Dn-1 と濃度平均値
Dnとの差の絶対値が所定値d以上と判定された場合、
すなわち評価ブロックTn は濃度が均一なブロックであ
るにも拘らず前述した図13の走査マスクでカバーされ
る他のいずれのブロックTn-H-1 ,Tn-H ,TN-1 とも
濃度の連続性がない、と判定された場合にはステップS
128に進む。
In step S125, the block Tn-1
, If it is determined that the block is not a uniform density, or if it is determined in step S126 that the absolute value of the difference between the density average value Dn-1 and the density average value Dn is not less than the predetermined value d,
That is, even though the evaluation block Tn is a block having a uniform density, the density continuity of any of the other blocks Tn-H-1, Tn-H, and TN-1 covered by the scanning mask of FIG. If it is determined that there is not, step S
Proceed to 128.

【0060】このステップS128では、評価ブロック
Tn につけるラベルLn としてそれまで使用されていな
い新たなラベルLc を割り当てる。このように、新たな
ラベルLc が使用された場合には、ステップS129で
ラベルLc の値を一つ前に進める。このようにしてラベ
ルLcの値を更新した後も前記ステップS136に進
む。
In this step S128, a new label Lc which has not been used until now is assigned as the label Ln to be attached to the evaluation block Tn. Thus, when the new label Lc is used, the value of the label Lc is advanced by one in step S129. After updating the value of the label Lc in this way, the process also proceeds to step S136.

【0061】前記ステップS113で評価ブロックTn
が濃度の均一なブロックではないと判定された場合には
ステップS130に進む。ステップS130〜ステップ
S133は、評価ブロックTn が濃度が均一なブロック
ではない場合に、この評価ブロックTn の手前のブロッ
クTn-1 のラベルLn-1 と評価ブロックTn の上のブロ
ックTn-H のラベルLn-H とが統合できるブロックであ
るか否かを判定している。
In step S113, the evaluation block Tn
If it is determined that is not a block with uniform density, the process proceeds to step S130. In steps S130 to S133, when the evaluation block Tn is not a block with uniform density, the label Ln-1 of the block Tn-1 immediately before the evaluation block Tn and the label of the block Tn-H above the evaluation block Tn are processed. It is determined whether or not the block can be integrated with Ln-H.

【0062】つまり、ステップS130,S131でブ
ロックTn-H とブロックTn-1 とが共に濃度が均一なブ
ロックであり、ステップS132でラベルLn-H とラベ
ルLn-1 との値が未だ同一でなく、且つステップS13
3でブロックTn-1 の濃度平均値Dn-1 とブロックTn-
H の濃度平均値Dn-H との差の絶対値が所定値dより小
さい時には、ステップS134において前記ラベルLn-
1 とラベルLn-H とを互いに統合可能なラベルとしてエ
クィブテーブルETk0,ETk1に記録する。そして、ス
テップS135でエクィブテーブルETk0,ETk1の番
号を一つ更新して前記ステップS136に進む。
That is, in steps S130 and S131, the blocks Tn-H and Tn-1 are both blocks having uniform densities, and the values of the label Ln-H and the label Ln-1 are not the same in step S132. , And step S13
In step 3, the density average value Dn-1 of the block Tn-1 and the block Tn-
When the absolute value of the difference between H and the average density value Dn-H is smaller than the predetermined value d, in step S134, the label Ln-
1 and the label Ln-H are recorded as labels that can be integrated with each other in the empty tables ETk0 and ETk1. Then, in step S135, the number in the active tables ETk0 and ETk1 is updated by one and the process proceeds to step S136.

【0063】ステップS130,S131でブロックT
n-1 とブロックTn-H のうちのいずれか一方が濃度が均
一なブロックでない場合、ステップS132でラベルL
n-1とラベルLn-H の値が既に同一である場合、もしく
はステップS133で濃度平均値Dn-1 と濃度平均値D
n-H との差の絶対値が所定値d以上である場合には、そ
の時点で前記ステップS136に進む。
Blocks T in steps S130 and S131
If one of the n-1 and the block Tn-H is not a uniform density block, the label L is added in step S132.
If the values of n-1 and the label Ln-H are already the same, or in step S133, the density average value Dn-1 and the density average value D
If the absolute value of the difference from nH is greater than or equal to the predetermined value d, the process proceeds to step S136 at that time.

【0064】ステップS136では図13の走査マスク
がカバーする評価ブロックTn のブロック番号を一つ進
め、ステップS137においてその更新されたブロック
番号nがN以下であれば、前記ステップS113に戻っ
てこのステップS113からステップS136までのル
ーチンを繰り返す。以上のルーチンによって、濃度が均
一な全てのブロックにラベルが付されることになる。ス
テップS137において前記評価ブロックTn の番号n
がNを越えるとステップS138に進む。
In step S136, the block number of the evaluation block Tn covered by the scan mask in FIG. 13 is advanced by one, and if the updated block number n is N or less in step S137, the process returns to step S113 and this step is performed. The routine from S113 to step S136 is repeated. By the above routine, all blocks having uniform density are labeled. In step S137, the number n of the evaluation block Tn
When exceeds N, the process proceeds to step S138.

【0065】図5に示すステップS138からステップ
S144においては、前記エクィブテーブルETk0,E
Tk1に記録したラベルの統合を行っている。
In steps S138 to S144 shown in FIG. 5, the empty tables ETk0, E are set.
Labels recorded in Tk1 are integrated.

【0066】まず、ステップS138でエクィブテーブ
ルETk0,ETk1のテーブル番号kを一つ前の番号に戻
し、ステップS139で一つ前のエクィブテーブルET
k0,ETk1のテーブル番号kが1以上か否かを判定して
いる。ステップS139においてテーブル番号kが1未
満すなわち「0」であれば、エクィブテーブルETk0,
ETk1は使用されなかったことになり、図6のステップ
S145に進む。
First, in step S138, the table number k of the active tables ETk0 and ETk1 is returned to the previous number, and in step S139, the previous active table ET.
It is determined whether the table number k of k0 and ETk1 is 1 or more. If the table number k is less than 1 in step S139, that is, "0", the active table ETk0,
Since ETk1 has not been used, the process proceeds to step S145 in FIG.

【0067】ステップS139において番号kが1以上
であれば、ステップS140〜S144で前記ブロック
Tn のラベルLn を一方のエクィブテーブルETk0と比
較し(ステップS141)、エクィブテーブルETk0に
記憶されたラベルがラベルLn と同値であれば、他方の
エクィブテーブルETk1に記録されたブロックのラベル
をラベルLn に書き換える(ステップS142)。
If the number k is 1 or more in step S139, the label Ln of the block Tn is compared with one of the active tables ETk0 in steps S140 to S144 (step S141), and the label stored in the active table ETk0 is compared. Is the same as the label Ln, the label of the block recorded in the other active table ETk1 is rewritten to the label Ln (step S142).

【0068】前記ブロックT1 〜TN について上記ステ
ップS141,S142の処理を終えると、ステップS
143でブロック番号nを1つ更新する。以上のステッ
プS141〜S143のルーチンは、ステップS144
でn=Nとなるまで繰り返される。ステップS144で
n>Nとなると、ステップS138に戻ってエクィブテ
ーブルETk0,ETk1のテーブル番号kをさらに一つ前
の番号に戻し、ステップS139でテーブル番号kが1
未満すなわち0となるまでエクィブテーブルETk0,E
Tk1に対し上記ステップS140〜S144のルーチン
を繰り返す。
When the processes of steps S141 and S142 are completed for the blocks T1 to TN, step S
At 143, the block number n is updated by one. The routine of steps S141 to S143 described above is performed in step S144.
Is repeated until n = N. When n> N in step S144, the process returns to step S138 to return the table number k of the active tables ETk0 and ETk1 to the previous table number, and in step S139, the table number k becomes 1
Equitable ETk0, E until less than 0
The routine of steps S140 to S144 is repeated for Tk1.

【0069】次に、この実施例では、図6に示すステッ
プS145以下のルーチンにおいて、原画の四隅のブロ
ックT1 ,TH ,TN-H+1 ,TN (図12参照)と同じ
ラベルが付されたブロックを、背景を構成するブロック
であると評価している。すなわち、この実施例では原画
像の四隅は背景部分であることを前提としている。ステ
ップS145〜S148は、ブロックTn が背景ブロッ
クであるか否かを示すフラグBGn を全てブロックTn
において「0」にクリアするルーチンである。以下にス
テップS149以降のルーチンを説明する。
Next, in this embodiment, the same labels as the blocks T1, TH, TN-H + 1, TN (see FIG. 12) at the four corners of the original image are attached in the routine of step S145 and subsequent steps shown in FIG. The block is evaluated as a block that constitutes the background. That is, in this embodiment, it is assumed that the four corners of the original image are background portions. In steps S145 to S148, all the flags BGn indicating whether the block Tn is a background block are the block Tn.
Is a routine for clearing to "0". The routines after step S149 will be described below.

【0070】まず、ステップS149は背景ブロックの
検索番号mを1に設定している。ステップS150〜S
153においては、検索番号mのブロックが背景評価の
基準となる前記四隅のブロックT1 ,TH ,TN-H-1,
TN であるか否かを順次判定する。検索番号m=1のと
き、ステップS150においてブロックT1 が前記背景
評価基準ブロックT1 ,TH ,TN-H-1 ,TN のうちの
一つのブロックとして検索され、ステップS154に進
む。
First, in step S149, the background block search number m is set to 1. Steps S150-S
In 153, the block with the search number m is the four corner blocks T1, TH, TN-H-1, which serve as the reference for background evaluation.
It is sequentially determined whether or not it is TN. When the search number is m = 1, the block T1 is searched as one of the background evaluation reference blocks T1, TH, TN-H-1 and TN in step S150, and the process proceeds to step S154.

【0071】次のステップS154〜S159では、ラ
ベルLm すなわちステップS150で検索された背景評
価基準ブロックT1 のラベルL1を、全てのブロックTn
のラベルLn と順次比較(ステップS155)する。
Ln =L1 の場合はステップS156でブロックTn の
フラグBGn を「1」にする。また、Ln ≠L1 の場合
はステップS157でブロックTn のフラグBGn を
「0」とする。ステップS156またはステップS15
7においてフラグBGn が「1」または「0」にされる
と、ステップS158に進みブロック番号nを1つ更新
する。ステップS155〜S158のルーチンは、ステ
ップS159でブロック番号n=Nとなるまで繰り返さ
れる。ステップS159でn>NとなるとステップS1
60へ進む。
In the next steps S154 to S159, the label Lm, that is, the label L1 of the background evaluation reference block T1 retrieved in step S150 is replaced with all the blocks Tn.
Are sequentially compared with the label Ln (step S155).
If Ln = L1, the flag BGn of the block Tn is set to "1" in step S156. If Ln ≠ L1, the flag BGn of the block Tn is set to "0" in step S157. Step S156 or step S15
When the flag BGn is set to "1" or "0" in step 7, the process proceeds to step S158 and the block number n is updated by one. The routine of steps S155 to S158 is repeated until the block number n = N in step S159. When n> N in step S159, step S1
Proceed to 60.

【0072】ステップS160では検索番号mを1つ更
新し、m=2とする。ステップS161では検索番号m
=2をブロック数Nと比較し、2≦Nであるのでステッ
プS150に戻る。
In step S160, the search number m is updated by 1 to set m = 2. In step S161, the search number m
= 2 is compared with the number of blocks N, and since 2 ≦ N, the process returns to step S150.

【0073】以後、検索番号m=2〜Nについてステッ
プS150〜S161のルーチンを繰り返す。但し、検
索番号mがm≠1,H,N−H+1,Nの場合には、ス
テップS153から直接ステップS160に進み検索番
号mを1つ更新する。
Thereafter, the routine of steps S150 to S161 is repeated for the search numbers m = 2 to N. However, when the search number m is m ≠ 1, H, N−H + 1, N, the process directly proceeds from step S153 to step S160 and the search number m is updated by one.

【0074】検索番号m=H,N−H+1,もしくはN
のときはm=1のときと同様にステップS154へ進
み、ステップS155〜S159のルーチンを繰り返
す。すなわち、m=Hのときに、Ln =LH のブロック
Tn のフラグBGn を「1」にする一方、Ln ≠LH の
ブロックTn のフラグBGn を「0」にする。また、m
=N−H−1のとき、Ln =LN-H-1 のブロックTn の
フラグBGn を「1」にする一方、Ln ≠LN-H-1 のブ
ロックTn のフラグBGn を「0」にする。さらに、m
=Nのとき、Ln =LN のブロックTn のフラグBGn
を「1」にする一方、Ln ≠LN のブロックTn のフラ
グBGn を「0」にする。
Search number m = H, N-H + 1, or N
In the case of, the process proceeds to step S154 as in the case of m = 1, and the routine of steps S155 to S159 is repeated. That is, when m = H, the flag BGn of the block Tn of Ln = LH is set to "1", while the flag BGn of the block Tn of Ln ≠ LH is set to "0". Also, m
= N-H-1, the flag BGn of the block Tn of Ln = LN-H-1 is set to "1", while the flag BGn of the block Tn of Ln ≠ LN-H-1 is set to "0". Furthermore, m
= N, the flag BGn of the block Tn of Ln = LN
Is set to "1" while the flag BGn of the block Tn of Ln ≠ LN is set to "0".

【0075】以上のようにして全てのブロックT1 〜T
N のフラグBG1 〜BGN を「1」または「0」とす
る。但し、背景評価ブロックT1 ,TH ,TN-H-1 ,T
N のうちいずれかのブロックのラベルと同じラベルを付
されたブロックTn のフラグBGn は「1」とする。す
なわち、前記ステップS149〜S161のルーチン
で、一つのブロックTn に対しフラグBGn を「1」に
する場合と「0」にする場合が発生したときは、そのブ
ロックTn のフラグBGnは「1」を優先する。
As described above, all blocks T1 to T
The flags BG1 to BGN of N are set to "1" or "0". However, the background evaluation blocks T1, TH, TN-H-1, T
The flag BGn of the block Tn labeled with the same label as any one of N blocks is set to "1". That is, in the routine of steps S149 to S161, when the flag BGn is set to "1" or "0" for one block Tn, the flag BGn of the block Tn is set to "1". Prioritize.

【0076】以上のようにしてステップS101〜S1
61のルーチンにより、ブロックT1 〜TN の中から背
景であるブロックTn を検出する。このようにして背景
であるブロックを検出した後、図7および図8に示すス
テップS201〜S223で原画像全体の累積相対度数
ヒストグラムを作成している。
As described above, steps S101 to S1
The routine of 61 detects the background block Tn from the blocks T1 to TN. After detecting the background block, the cumulative relative frequency histogram of the entire original image is created in steps S201 to S223 shown in FIGS. 7 and 8.

【0077】まず、ステップS201〜S213におい
て、前記各ブロックT1 〜TN の濃度ヒストグラムhnj
の各階級jに基づいて、原画像全体の濃度ヒストグラム
を作成している。ステップS201〜S204において
は濃度ヒストグラムhnjの階級番号j(=0〜J)に対
応する画素数DFj を0にクリアしている。
First, in steps S201 to S213, the density histogram hnj of each of the blocks T1 to TN is obtained.
A density histogram of the entire original image is created based on each class j of. In steps S201 to S204, the number of pixels DFj corresponding to the class number j (= 0 to J) of the density histogram hnj is cleared to 0.

【0078】次に、ステップS205においてブロック
番号nを「1」、階級番号jを「0」、総画素数yを
「0」にそれぞれ設定する。その後ステップS206〜
S213のルーチンをステップS213でn>Nとなる
まで繰り返すことにより、原画全体における各階級ごと
の画素数DFj と総画素数yを求める。ステップS20
6〜S213のルーチンは以下の通りである。
Next, in step S205, the block number n is set to "1", the class number j is set to "0", and the total number of pixels y is set to "0". Then step S206-
By repeating the routine of S213 until n> N in step S213, the number of pixels DFj and the total number of pixels y for each class in the entire original image are obtained. Step S20
The routine from 6 to S213 is as follows.

【0079】まず、ステップS206において、ブロッ
クTn のフラグBGn が「1」であるか否かを判定す
る。フラグBGn が「1」である場合、すなわちブロッ
クTnが背景と評価されたブロックである場合は、ステ
ップS207において係数α=α0 を選択する。係数α
0 は、0≦α0 <1である。フラグBGn が「0」であ
る場合、すなわちブロックTn が背景でないと評価され
たブロックである場合は、ステップS208において係
数α=1を選択する。
First, in step S206, it is determined whether the flag BGn of the block Tn is "1". When the flag BGn is "1", that is, when the block Tn is evaluated as the background, the coefficient α = α0 is selected in step S207. Coefficient α
0 is 0 ≦ α0 <1. When the flag BGn is "0", that is, when the block Tn is a block evaluated not to be the background, the coefficient α = 1 is selected in step S208.

【0080】次に、ステップS209〜S211におい
ては、(1) ブロックT1 〜ブロックTn でなる画像の各
階級の画素数DFj と、(2) ブロックT1 〜ブロックT
n でなる画像の総画素数yが求められる。
Next, in steps S209 to S211, (1) the number of pixels DFj of each class of the image composed of the blocks T1 to Tn and (2) the blocks T1 to Tn.
The total number of pixels y of the image consisting of n is obtained.

【0081】上述のステップS206〜S211のルー
チンは、ステップS212でブロック番号nを1つ更新
した結果、ステップS213でn>Nとなるまで繰り返
される。
The routines of steps S206 to S211 described above are repeated until n> N is satisfied in step S213 as a result of updating the block number n by one in step S212.

【0082】次に、上記ステップS209〜S211で
求める各階級の画素数DFj と総画素数yについて詳説
する。
Next, the number of pixels DFj of each class and the total number of pixels y obtained in steps S209 to S211 will be described in detail.

【0083】ブロック番号n=1、階級番号j=0のと
き、ステップS209では、ステップS202でクリア
された画素数DF0 に、対応する階級の補正画素数α1
・h10を加算してなるDF0 +α1 ・h10が、ブロック
T1 の画像における階級番号「0」に対応する画素数D
F0 として演算される。ここでα1 はステップS206
〜S208で選択されたブロックT1 の係数αである。
この場合、ステップS202で画素数DF0 は「0」で
あるから、ステップS209で演算される画素数DF0
はα1 ・h10となる。
When the block number n = 1 and the class number j = 0, in step S209, the correction pixel number α1 of the corresponding class is added to the pixel number DF0 cleared in step S202.
DF0 + α1 obtained by adding h10. H10 is the number of pixels D corresponding to the class number "0" in the image of the block T1.
Calculated as F0. Where α 1 is step S206
Is the coefficient α of the block T1 selected in steps S208 to S208.
In this case, the pixel number DF0 is “0” in step S202, and thus the pixel number DF0 calculated in step S209.
Becomes α1 · h10.

【0084】画素数DF0 を演算した後、ステップS2
10で階級番号jを1つ更新し、ステップS211で更
新した階級番号jを最終階級番号Jと比較する。ステッ
プS211でj≦JであればステップS209に戻って
上記ステップS209〜S211のルーチンを繰り返
す。これにより、n=1のときの全ての階級の画素数D
F0 〜DFJ が順次求められる。
After calculating the number of pixels DF0, step S2
At step 10, the class number j is updated by one, and the class number j updated at step S211 is compared with the final class number J. If j ≦ J in step S211, the process returns to step S209 to repeat the routine of steps S209 to S211. As a result, the number of pixels D of all classes when n = 1
F0 to DFJ are sequentially obtained.

【0085】また、ブロック番号n=1、階級番号j=
0のとき、ステップS209ではステップS205でク
リアされた総画素数yに階級番号j=0の補正画素数α
1 ・h10を加算してなるy+α1 ・h10を演算する。ス
テップS205で総画素数yは「0」であるから、階級
番号j=0のときのステップS209で演算される総画
素数yはα1 ・h10となる。
Block number n = 1 and class number j =
When it is 0, in step S209, the correction pixel number α of the class number j = 0 is added to the total pixel number y cleared in step S205.
Calculate y + α1 · h10 by adding 1 · h10. Since the total number of pixels y is “0” in step S205, the total number of pixels y calculated in step S209 when the class number j = 0 is α1 · h10.

【0086】次に、ステップS210で階級番号を1つ
更新してj=1とする。ステップS211において1≦
JによりステップS209に戻る。次のステップS20
9では、階級番号j=0のときに演算した総画素数y=
α1 ・h10に、階級番号j=1のときの補正画素数α1
・h11を加算し、階級番号j=1のときの総画素数y=
α1 (h10+h11)を演算する。以下、同様にしてj=
2〜Jで上記ステップS209〜S211のルーチンが
繰り返されることにより、ブロックT1 の総画素数y=
α1(h10+h11+…h1J)が演算される。
Next, in step S210, the class number is updated by 1 to set j = 1. In step S211, 1 ≦
By J, the process returns to step S209. Next step S20
In 9, the total number of pixels calculated when the class number j = 0 is y =
α1 · h10 is the number of corrected pixels α1 when class number j = 1
・ Adding h11, total number of pixels when class number j = 1, y =
Calculate α 1 (h10 + h11). Similarly, j =
2 to J, by repeating the routine of steps S209 to S211 above, the total number of pixels in the block T1 is y =
α1 (h10 + h11 + ... h1J) is calculated.

【0087】ステップS211でj>Jであればステッ
プS212に進みブロック番号nを1つ更新しn=2と
する。そして、ステップS213で2≦Nであるのでス
テップS206に戻る。次のステップS206〜S20
8では、n=2すなわちブロックT2 の係数α2 を選択
する。
If j> J in step S211, the flow advances to step S212 to update the block number n by 1 to n = 2. Since 2 ≦ N in step S213, the process returns to step S206. Next steps S206 to S20
In 8, n = 2, that is, the coefficient α2 of the block T2 is selected.

【0088】次のステップS209〜S211では、n
=1で演算した各階級の画素数DFj =α1 ・h1jにブ
ロックT2 の対応する階級の補正画素数α2 ・h2jを加
算することにより、ブロックT1 とブロックT2 でなる
画像における階級番号jに対応する画素数DFj として
α1 ・h1j+α2 ・h2jを求める。また、このステップ
S209では、n=1で演算した総画素数y=α1 (h
10+h11+…h1J)に順次補正画素数α2 ・h2jを加算
してゆく。ステップS211においてj>Jとなるまで
ステップS209〜S211のルーチンを繰り返すこと
により、ブロックT1 とブロックT2 でなる画像におけ
る総画素数y=α1 (h10+h11+…h1J)+α2 (h
20+h21+…h2J)が求められる。
In the next steps S209 to S211, n
= 1 is added to the number of pixels in each class DFj = α1 · h1j and the number of corrected pixels in the corresponding class of block T2 α2 · h2j is added to correspond to the class number j in the image composed of blocks T1 and T2. Α1 · h1j + α2 · h2j is obtained as the number of pixels DFj. Further, in this step S209, the total number of pixels y = α1 (h
10 + h11 + ... h1J) is sequentially added with the correction pixel number α2 · h2j. By repeating the routine of steps S209 to S211 until j> J in step S211, the total number of pixels in the image composed of the blocks T1 and T2 y = α1 (h10 + h11 + ... h1J) + α2 (h
20 + h21 + ... h2J) is required.

【0089】以下、同様にしてn=3〜Nで上記ステッ
プS206〜S213のルーチンが繰り返されることに
より、数4および数5の式で示すような原画像全体の各
階級の画素数DFj および総画素数yが演算される。
In the same manner, the routines of steps S206 to S213 are similarly repeated with n = 3 to N, so that the number of pixels DFj and the total number of pixels of each class of the entire original image as shown by the equations (4) and (5) are obtained. The number of pixels y is calculated.

【0090】[0090]

【数4】 [Equation 4]

【0091】[0091]

【数5】 [Equation 5]

【0092】以上のようにして原画像全体の各階級の画
素数DFj を求めることにより、原画像全体の濃度ヒス
トグラムを作成することができる。数4および数5の式
から明らかなように、前記ステップS101〜161で
検出した背景となるブロックの画素数は、ステップS2
07で選択する係数α0 が0≦α0 <1であることによ
り、背景以外のブロックの画素数に対し軽視もしくは無
視される。
By obtaining the number of pixels DFj of each class of the entire original image as described above, the density histogram of the entire original image can be created. As is clear from the equations (4) and (5), the number of pixels in the background block detected in steps S101 to 161 is equal to that in step S2.
Since the coefficient α 0 selected in 07 is 0 ≦ α 0 <1, the number of pixels in blocks other than the background is neglected or ignored.

【0093】次に、ステップS214〜S219におい
て、原画全体の各階級jごとの累積画素数CDFj (C
DF1 〜CDFJ )を求める。まず、ステップS214
で階級番号jを0に初期化してからステップS215に
進む。ステップS215においてj≠0でなければ、す
なわちj=0であればステップS216へ進み、ステッ
プS215でj≠0であればステップS217へ進む。
Next, in steps S214 to S219, the cumulative number of pixels CDFj (C
DF1 to CDFJ). First, step S214
After the class number j is initialized to 0, the process proceeds to step S215. If j ≠ 0 in step S215, that is, if j = 0, the process proceeds to step S216, and if j ≠ 0 in step S215, the process proceeds to step S217.

【0094】ステップS216では、階級番号j=0の
階級の画素数DF0 を累積画素数CDFO に変換してい
る。ステップS217では、階級番号jの画素数DFj
に前の階級j−1までの累積画素数CDFj-1 を加算す
ることにより、この階級番号jまでの累積画素数CDF
j を求めている。ステップS218においては階級番号
jを1だけ更新する。更新した階級番号jがステップS
219においてj≦Jであれば前記ステップS215に
戻る。ステップS218で階級番号jを1前進させた結
果、ステップS219でj>Jとなれば次のステップS
220に進む。
In step S216, the pixel number DF0 of the class of the class number j = 0 is converted into the cumulative pixel number CDFO. In step S217, the number of pixels DFj of the class number j
By adding the cumulative pixel number CDFj-1 up to the previous class j-1 to the cumulative pixel number CDF up to this class number j
Seeking j. In step S218, the class number j is updated by 1. The updated class number j is step S
If j ≦ J in 219, the process returns to step S215. As a result of advancing the class number j by 1 in step S218, if j> J in step S219, the next step S
Proceed to 220.

【0095】以上のようなステップS214〜S219
のルーチンによれば、階級番号j=1のとき、累積画素
数CDF1 は、階級番号j=1−1=0に対応する累積
画素数CDF0 に階級番号j=1に対応する画素数DF
1を加算することによって求められ、以後階級番号jの
低い方から順に累積画素数CDF2 ,CDF3 ,……C
DFJ が求められる。
Steps S214 to S219 as described above
According to this routine, when the class number j = 1, the cumulative pixel number CDF1 is the cumulative pixel number CDF0 corresponding to the class number j = 1−1 = 0 and the pixel number DF corresponding to the class number j = 1.
It is calculated by adding 1, and thereafter the cumulative number of pixels CDF2, CDF3, ... C in order from the lowest class number j.
DFJ is required.

【0096】ステップS220〜S223においては、
原画像全体の総画素数yに対する各累積画素数CDFj
の相対度数RNj(%)を求めている。ステップS22
0においては階級番号jを「0」に初期化している。ス
テップS221は前記ステップS214〜S219で求
めた各累積画素数CDFj と原画像全体の総画素数yに
基づく式RNj=CDFj ×100/yにより相対度数
RNj(%)を求めている。ステップS222は階級番
号jを1つ更新する。ステップS223はステップS2
22において更新された階級番号jを最終階級番号Jと
比較している。j>JとなるまでステップS221〜S
223のルーチンを繰り返すことにより、全ての階級の
相対度数RNjが求められる。
In steps S220 to S223,
Cumulative pixel count CDFj for the total pixel count y of the entire original image
The relative frequency RNj (%) is calculated. Step S22
At 0, the class number j is initialized to "0". In step S221, the relative frequency RNj (%) is calculated by the expression RNj = CDFj × 100 / y based on the cumulative pixel number CDFj calculated in steps S214 to S219 and the total pixel number y of the entire original image. A step S222 updates the class number j by one. Step S223 is step S2
The class number j updated in 22 is compared with the final class number J. Steps S221 to S until j> J
By repeating the routine of step 223, the relative frequencies RNj of all classes are obtained.

【0097】平均濃度の階級値DMj(n=0〜J)を横
軸に、前記ステップS220〜S223において算出し
た相対度数RNjを縦軸にすることで、図14に示すよ
うな累積相対度数ヒストグラムを作成することができ
る。この図14の累積相対度数ヒストグラムは、最小発
生濃度DMminと最大発生濃度DMmaxの範囲で0%から1
00%まで変化する形状となる。なお、この図14の累
積相対度数ヒストグラムは、階級幅を十分に小さくとる
ことにより曲線で近似して表されている。
The cumulative relative frequency histogram shown in FIG. 14 is obtained by plotting the average density class value DMj (n = 0 to J) on the horizontal axis and the relative frequency RNj calculated on the above steps S220 to S223 on the vertical axis. Can be created. The cumulative relative frequency histogram of FIG. 14 shows 0% to 1 in the range of the minimum generated density DMmin and the maximum generated density DMmax.
The shape changes up to 00%. The cumulative relative frequency histogram of FIG. 14 is represented by a curve approximation by making the class width sufficiently small.

【0098】次に、図9に示すステップS301〜S3
15において色成分別の累積濃度値ヒストグラムを作成
する。
Next, steps S301 to S3 shown in FIG.
At 15, a cumulative density value histogram for each color component is created.

【0099】まず、ステップS301〜S304におい
て、前記図2のステップS103で求めた各ブロックT
n ごとの濃度ヒストグラムhnjに基づき、各ブロックT
n ごとに各色成分別の累積濃度値DRnj ,DGnj ,DBn
j を求める。すなわち、ステップS103において求め
た濃度ヒストグラムhnjの各階級ごとに、その中に含ま
れる各画素が有する濃度値を抽出し、各色成分ごとの濃
度値を累積加算する。この処理は各階級ごとに独立して
行う次に、ステップS305〜S313において、原画
全体における階級番号jの累積濃度値を算出している。
ステップS305では階級番号jを0に初期化してい
る。ステップS306においては、原画像全体の各色成
分別の累積濃度値をDRj,DGj,DBjをクリアしてい
る。次にステップS307はブロック番号nを1として
いる。
First, in steps S301 to S304, each block T obtained in step S103 of FIG.
Based on the density histogram hnj for each n, each block T
Cumulative density values DRnj, DGnj, and DBn for each color component for each n
ask for j. That is, for each class of the density histogram hnj obtained in step S103, the density value of each pixel included therein is extracted, and the density values for each color component are cumulatively added. This process is performed independently for each class. Next, in steps S305 to S313, the cumulative density value of the class number j in the entire original image is calculated.
In step S305, the class number j is initialized to 0. In step S306, DRj, DGj, and DBj of the cumulative density values for each color component of the entire original image are cleared. Next, in step S307, the block number n is set to 1.

【0100】次のステップS308〜S310は前記ス
テップS206〜S208と同様である。すなわち、ス
テップS308においてブロックTn のフラグBGn が
「1」であるか否かを判定し、フラグBGn が「1」で
ある場合はステップS309において係数としてα=α
0 を選択する。また、フラグBGn が「0」である場合
はステップS310において係数としてα=1を選択す
る。
The following steps S308 to S310 are the same as steps S206 to S208. That is, in step S308, it is determined whether or not the flag BGn of the block Tn is "1", and if the flag BGn is "1", the coefficient α = α in step S309.
Select 0. If the flag BGn is "0", α = 1 is selected as the coefficient in step S310.

【0101】ステップS311においては、既に算出さ
れた累積濃度値DRj,DGj,DBjに、それぞれα・DRn
j ,α・DGnj,α・DBnj を加算している。ステップ
S312でブロック番号nを1だけ前進させる。ステッ
プS313において1だけ増加したブロック番号nがn
≦Nであるか否かを判定している。n≦Nであれば前記
ステップS308に戻り、以下ステップS313でn>
NとなるまでステップS308〜S313のルーチンを
繰り返す。
In step S311, α · DRn is added to the already calculated cumulative density values DRj, DGj, and DBj, respectively.
j, α · DGnj and α · DBnj are added. In step S312, the block number n is advanced by 1. The block number n increased by 1 in step S313 is n
It is determined whether or not ≦ N. If n ≦ N, the process returns to step S308, and n> in step S313.
The routine of steps S308 to S313 is repeated until it becomes N.

【0102】これによって、原画全体の各階級ごとの累
積濃度値DRj=α1 ・DR1j +α2・DR2j +……+αN
・DRNj 、DGj=α1 ・DG1j +α2 ・DG2j +……
+αN ・DGNj 、DBj=α1 ・DB1j +α2 ・DB2j +
……+αN ・DBNj が算出される。係数α1 ,α2 ……
αN は1またはα0 である。
Accordingly, the cumulative density value DRj = α1 · DR1j + α2 · DR2j + ... + αN for each class of the entire original image
・ DRNj, DGj = α1 ・ DG1j + α2 ・ DG2j + ……
+ ΑN · DGNj, DBj = α1 · DB1j + α2 · DB2j +
...... + αN ・ DBNj is calculated. Coefficients α1, α2 ……
αN is 1 or α0.

【0103】上記ステップS306〜S313は、ステ
ップS314において階級値jを1づつ前進させ、ステ
ップS315において1だけ前進した階級値jがj≦J
であるか否かを判定するようにしておくことにより、ス
テップS315において階級値j>Jとなるまで繰り返
される。すなわち、ステップS305〜S315におい
て、j=0〜Jまでの全ての階級に関する原画全体の累
積濃度値が算出され、それによって図15に示すような
原画像全体の色成分別の累積濃度値ヒストグラムを作成
することができる。
In steps S306 to S313, the class value j is advanced by 1 in step S314, and the class value j advanced by 1 in step S315 is j≤J.
By determining whether or not, it is repeated until the class value j> J in step S315. That is, in steps S305 to S315, the cumulative density value of the entire original image for all classes from j = 0 to J is calculated, and the cumulative density value histogram for each color component of the entire original image as shown in FIG. Can be created.

【0104】なお、図15の色成分別の累積濃度値ヒス
トグラムの各階級に対応する画素数Pj は、各ブロック
Tn ごとに階級値DMjに対応する画素数Pj を用いるこ
とにより、Pj =α1 ・P1j+α2 ・P2j+……+αN
・PNjとして求めることができる。
The number of pixels Pj corresponding to each class in the cumulative density value histogram for each color component shown in FIG. 15 is Pj = α1.multidot. By using the number of pixels Pj corresponding to the class value DMj for each block Tn. P1j + α2 ・ P2j + …… + αN
-Can be obtained as PNj.

【0105】次に、図14の累積相対度数ヒストグラム
と図15の色成分別の累積濃度値ヒストグラムに基づい
て階調変換曲線のハイライト点とシャドウ点を求める。
Next, the highlight point and the shadow point of the gradation conversion curve are obtained based on the cumulative relative frequency histogram of FIG. 14 and the cumulative density value histogram of each color component of FIG.

【0106】まず、ステップS201〜S223のルー
チンにより作成した前記図14の累積相対度数ヒストグ
ラムに対し、例えば予め用意された多数のサンプル原画
から経験的に求められるような、最適な階調変換特性を
与えるハイライト点HL、シャドウ点SDに対応する累
積濃度出現率RNH ,RNS を採用することにより、ハ
イライト点HL、シャドウ点SDに対応した仮のハイラ
イト平均濃度値DMH,シャドウ平均濃度値DMSをそれぞ
れ求める。なお、累積濃度出現率RNH ,RNS の値は
1%,98%程度の値である。このようにして求めた仮
のハイライト平均濃度値DMH,シャドウ平均濃度値DMS
は、図15に示す色成分別の累積濃度値ヒストグラムに
適用する。
First, for the cumulative relative frequency histogram shown in FIG. 14 created by the routine of steps S201 to S223, an optimum gradation conversion characteristic that can be empirically obtained from a large number of sample original images prepared in advance is set. By adopting the cumulative density appearance rates RNH and RNS corresponding to the given highlight point HL and shadow point SD, the temporary highlight average density value DMH and shadow average density value DMS corresponding to the highlight point HL and shadow point SD are adopted. Respectively. The cumulative density appearance rates RNH and RNS are about 1% and 98%. Temporary highlight average density value DMH and shadow average density value DMS thus obtained
Is applied to the cumulative density value histogram for each color component shown in FIG.

【0107】図15の累積濃度値ヒストグラムでは、ハ
イライト側については、仮のハイライト平均濃度DMH以
下の領域(DMmin≦DM ≦DMH),シャドウ側について
は、仮のシャドウ平均濃度値DMS以上の領域(DMS≦D
M ≦DMmax)に入っている階級に斜線を付して示してい
る。なお、図示例では、仮のハイライト平均濃度値DM
H,シャドウ平均濃度値DMSとして、それぞれ階級値DM
5,DM(J-2)が設定されている。
In the cumulative density value histogram of FIG. 15, the area on the highlight side is equal to or lower than the temporary highlight average density DMH (DMmin≤DM≤DMH), and on the shadow side is equal to or higher than the temporary shadow average density value DMS. Area (DMS ≤ D
The classes within M ≤ DMmax) are shown with diagonal lines. In the illustrated example, the temporary highlight average density value DM
H, shadow average density value DMS, class value DM respectively
5, DM (J-2) is set.

【0108】例えば、色成分Rについては、原画全体に
おいて前記階級値DM1〜DM5に対応する累積濃度値DR1
〜DR5を加算する。さらに、階級値DM1〜DM5に対応す
る範囲内の画素数PR1〜PR5を加算する。この2つの加
算値から色成分Rの入力側ハイライト濃度値DRHを数6
の式で求める。
For example, for the color component R, the cumulative density value DR1 corresponding to the class values DM1 to DM5 in the entire original image.
~ Add DR5. Further, the numbers of pixels PR1 to PR5 within the range corresponding to the class values DM1 to DM5 are added. From these two added values, the input side highlight density value DRH of the color component R is calculated by Equation 6
Calculate with the formula.

【0109】[0109]

【数6】 [Equation 6]

【0110】また、シャドウ側についても同様の処理を
施し、入力側シャドウ濃度値DRSを数7の式により求め
る。
The same processing is performed on the shadow side, and the input side shadow density value DRS is obtained by the equation (7).

【0111】[0111]

【数7】 [Equation 7]

【0112】累積濃度値DR(J-2),DR(J-1),DRJおよ
び画素数PR(J-2),PR(J-1),PRJは、それぞれ数6の
場合と同様に階級値DM(J-2),DM(J-1),DMJに対応し
て与えられる。
The cumulative density values DR (J-2), DR (J-1), DRJ and the number of pixels PR (J-2), PR (J-1), PRJ are the same as in the case of the equation 6. It is given corresponding to the values DM (J-2), DM (J-1), and DMJ.

【0113】ここでは、詳細には説明しないが、他の色
成分G,Bについても全く同様にして、入力側ハイライ
ト濃度値DGH,DBH、および入力側シャドウ濃度値DG
S,DBSを求めることができる。
Although not described in detail here, the input side highlight density values DGH and DBH and the input side shadow density value DG are similarly set in the same manner for the other color components G and B.
S and DBS can be calculated.

【0114】次に、以上のようにして求めた入力側ハイ
ライト濃度値DRH,DGH,DBH、入力側シャドウ濃度値
DRS,DGS,DBSを用いて実行するセットアップを説明
する。
Next, the setup executed by using the input side highlight density values DRH, DGH, DBH and the input side shadow density values DRS, DGS, DBS obtained as described above will be described.

【0115】今、仮に原画像が明るい背景を持つシーン
であるとする。この場合に前述した実施例におけるステ
ップS201〜S223のルーチンで作成した図14に
実線で示す累積相対度数ヒストグラムHIは、従来方法
により背景部分も他の部分と同様の条件で作成する図1
4に一点鎖線で示す累積相対度数ヒストグラムHI′に
比べ、全体として高濃度側に偏ったヒストグラムとな
る。これは、この発明による前記実施例においては、ス
テップS209で原画像全体における各階級の累積画素
数CDFj を求めるに当たって、ステップS101〜S
161で検出した背景部分のブロックTn の各階級の画
素数に対して1より小さい係数α0 を乗じるようにして
いるためである。すなわち、明るい背景部分のブロック
Tn の各階級の画素数に対して1より小さい係数α0 を
乗じるようにしていることにより、原画像全体の平均濃
度ヒストグラムにおいて濃度の低い階級のレベルが抑制
され、必然的に累積相対度数ヒストグラムが全体として
高濃度側に偏るのである。
Now, let us assume that the original image is a scene having a bright background. In this case, the cumulative relative frequency histogram HI shown by the solid line in FIG. 14 created by the routine of steps S201 to S223 in the above-described embodiment is created by the conventional method under the same conditions as the background part and other parts.
Compared with the cumulative relative frequency histogram HI 'indicated by the one-dot chain line in 4, the histogram is biased toward the high density side as a whole. This is because, in the above-described embodiment according to the present invention, in determining the cumulative pixel number CDFj of each class in the entire original image in step S209, steps S101 to S101.
This is because the number of pixels of each class of the block Tn of the background portion detected in 161 is multiplied by a coefficient α0 smaller than 1. That is, by multiplying the number of pixels in each class of the block Tn in the bright background portion by a coefficient α0 smaller than 1, the level of a class having a low density is suppressed in the average density histogram of the entire original image, which is inevitable. Therefore, the cumulative relative frequency histogram is biased toward the high density side as a whole.

【0116】前記のような図14に示す累積相対度数ヒ
ストグラムにハイライト側の前記累積濃度出現率RNH
を適用すると、累積相対度数ヒストグラムHIに適用し
た場合に求められる仮のハイライト平均濃度値DMHは、
累積相対度数ヒストグラムHI′に適用した場合の仮の
ハイライト平均濃度値DMH′に比べ大きくなる。したが
って、仮のハイライト平均濃度値DMHに基づいて前記数
6の式で与えられる色成分Rの入力側ハイライト濃度値
DRHおよび同様の式で与えられる色成分G,Bの入力側
ハイライト濃度値DGH,DBHが、従来方法による仮のハ
イライト平均濃度値DMH′に基づいて得られる色成分ご
との入力側ハイライト濃度値DRH′,DGH′,DBH′よ
りも大きくなる。
In the cumulative relative frequency histogram shown in FIG. 14 as described above, the cumulative density appearance rate RNH on the highlight side is shown.
Is applied, the provisional highlight average density value DMH obtained when applied to the cumulative relative frequency histogram HI is
It becomes larger than the provisional highlight average density value DMH 'when applied to the cumulative relative frequency histogram HI'. Therefore, the input side highlight density value DRH of the color component R given by the equation (6) and the input side highlight density of the color components G and B given by the same equation based on the provisional highlight average density value DMH. The values DGH, DBH are larger than the input side highlight density values DRH ', DGH', DBH 'for each color component obtained based on the temporary highlight average density value DMH' by the conventional method.

【0117】なお図14に示すように、上記実施例の方
法で作成した実線で示す累積相対度数ヒストグラムHI
と従来方法で作成した一点鎖線で示す累積相対度数ヒス
トグラムHI′は、相対度数100%の手前においてほ
ぼ一致している。したがって、上記実施例において作成
した累積相対度数ヒストグラムにシャドウ側の累積濃度
出現率RNS を適用した場合に求められる仮のシャドウ
平均濃度値DMSと、従来方法により作成した累積相対度
数ヒストグラムに累積濃度出現率RNS を適用した場合
に求められる仮のシャドウ平均濃度値DMS′とはきわめ
て近似している。このため、以後においては便宜上、仮
のシャドウ平均濃度値DMSとDMS′は等しいものとす
る。また、仮のシャドウ平均濃度値DMSに基づいて前記
数7の式で求められる色成分Rのシャドウ側濃度値DRS
および色成分G,Bのシャドウ側濃度値DGS,DBSも、
仮のシャドウ平均濃度値DMS′に基づいて求められるシ
ャドウ側濃度値DRS′,DGS′,DBS′にそれぞれ等し
いものとする。
Incidentally, as shown in FIG. 14, the cumulative relative frequency histogram HI shown by the solid line created by the method of the above embodiment is shown.
And the cumulative relative frequency histogram HI ′ shown by the one-dot chain line created by the conventional method almost match before the relative frequency of 100%. Therefore, the provisional shadow average density value DMS obtained when the cumulative density appearance ratio RNS on the shadow side is applied to the cumulative relative frequency histogram created in the above embodiment, and the cumulative density appearance in the cumulative relative frequency histogram created by the conventional method. It is very close to the provisional shadow average density value DMS 'obtained when the rate RNS is applied. Therefore, in the following, for the sake of convenience, the temporary shadow average density values DMS and DMS 'are assumed to be equal. In addition, the shadow side density value DRS of the color component R obtained by the equation (7) based on the provisional shadow average density value DMS.
And the shadow side density values DGS, DBS of the color components G, B,
It is assumed that they are equal to the shadow side density values DRS ', DGS', DBS 'obtained based on the temporary shadow average density value DMS'.

【0118】図16は上記実施例の方法により求めた色
成分Rの入力側ハイライト濃度値DRHとシャドウ側濃度
値DRSを用いて設定する階調変換曲線GCR と、従来方
法により求めたハイライト側濃度値DRH′とシャドウ側
濃度値DRS′を用いて設定する階調変換曲線GCR ′と
を示すグラフである。横軸は色成分ごとに入力される入
力濃度値DI、縦軸は出力濃度値DOである。出力側ハ
イライト濃度値DOHL,出力側シャドウ濃度値DOSDは
すべての色成分に関して共通に固定された値である。な
お、ここでは、便宜上全ての入力側ハイライト濃度値D
RH,DGH,DBHは入力側ハイライト濃度値DRH′,DG
H′,DBH′に対して同じだけ大きくなり、且つDRH=
DGH=DBH、DRH′=DGH′=DBH′であるとする。ま
た、入力側シャドウ濃度値DRS,DGS,DBSはDRS=D
GS=DBSであり、入力側シャドウ濃度値DRS′,DG
S′,DBS′はDRS′=DGS′=DBS′であるとする。
このような場合、色成分Gの階調変換曲線GCG と色成
分Bの階調変換曲線GCB は図16に示す色成分Rの階
調変換曲線GCR と等しくなり、階調変換曲線GCG ′
とGCB ′は図16に示す階調変換曲線GCR ′と等し
くなる。
FIG. 16 is a gradation conversion curve GCR set by using the input side highlight density value DRH and the shadow side density value DRS of the color component R obtained by the method of the above embodiment, and the highlight obtained by the conventional method. 7 is a graph showing a gradation conversion curve GCR 'set by using a side density value DRH' and a shadow side density value DRS '. The horizontal axis represents the input density value DI input for each color component, and the vertical axis represents the output density value DO. The output-side highlight density value DOHL and the output-side shadow density value DOSD are fixed values common to all color components. Here, for the sake of convenience, all the input side highlight density values D
RH, DGH, and DBH are the input side highlight density values DRH ', DG
It becomes the same as H'and DBH ', and DRH =
It is assumed that DGH = DBH and DRH '= DGH' = DBH '. Also, the input side shadow density values DRS, DGS, DBS are DRS = D
GS = DBS, input side shadow density values DRS ', DG
S'and DBS 'are DRS' = DGS '= DBS'.
In such a case, the gradation conversion curve GCG of the color component G and the gradation conversion curve GCB of the color component B become equal to the gradation conversion curve GCR of the color component R shown in FIG. 16, and the gradation conversion curve GCG '
And GCB 'are equal to the gradation conversion curve GCR' shown in FIG.

【0119】図16から明らかなように、ハイライト側
濃度値DRHに対応するハイライト点HLR は、ハイライ
ト側濃度値DRH′に対応するハイライト点HLR ′から
右側に平行移動した位置に設定される。一方、前述した
ように、シャドウ側濃度値DRSはシャドウ側濃度値DR
S′と等しい。したがって、シャドウ側濃度値DRSに対
応するシャドウ点SDR は、シャドウ側濃度値DRS′に
対応するシャドウ点SDR ′と一致する。
As is apparent from FIG. 16, the highlight point HLR corresponding to the highlight side density value DRH is set at a position which is translated to the right from the highlight point HLR 'corresponding to the highlight side density value DRH'. To be done. On the other hand, as described above, the shadow side density value DRS is the shadow side density value DR.
Equal to S '. Therefore, the shadow point SDR corresponding to the shadow side density value DRS coincides with the shadow point SDR 'corresponding to the shadow side density value DRS'.

【0120】この場合、図16に示すように、階調変換
曲線GCR は階調変換曲線GCR ′よりも上側すなわち
ハイライト側出力設定値DOHL側を通過する。前述した
ように、ここでは階調変換曲線GCR =GCG =GCB
であり且つ階調変換曲線GCR ′=GCG ′=GCB ′
であるので、階調変換曲線GCG は階調変換曲線GCG
′よりハイライト側出力設定値DOHLを通過し、階調
変換曲線GCB は階調変換曲線GCB ′よりハイライト
側出力設定値DOHLを通過する。したがって、同じ入力
濃度値DIを与えても、階調変換曲線GCR ,GCG ,
GCB により変換した出力濃度値DOの方が、階調変換
曲線GCR ′,GCG ′,GCB ′により変換した出力
濃度値DOよりもそれぞれハイライト側出力設定値DO
HLに接近する。
In this case, as shown in FIG. 16, the gradation conversion curve GCR passes above the gradation conversion curve GCR ', that is, on the highlight side output set value DOHL side. As described above, here, the gradation conversion curve GCR = GCG = GCB
And the gradation conversion curve GCR '= GCG' = GCB '
Therefore, the gradation conversion curve GCG is equal to the gradation conversion curve GCG.
The output value DOHL on the highlight side passes through, and the gradation conversion curve GCB passes the output value DOHL on the highlight side than the gradation conversion curve GCB '. Therefore, even if the same input density value DI is given, the gradation conversion curves GCR, GCG,
The output density value DO converted by the GCB is higher than the output density value DO converted by the gradation conversion curves GCR ', GCG', and GCB ', respectively, and the output setting value DO on the highlight side.
Approach HL.

【0121】以上の説明から明らかなように、原画像が
明るい背景を持つシーンである場合、上記実施例におい
て求めたハイライト側濃度値DRH,DGH,DBH、シャド
ウ側濃度値DRS,DGS,DBSを用いてセットアップを行
うと、従来方法により求めたハイライト側濃度値DR
H′,DGH′,DBH′、シャドウ側濃度値DRS′,DG
S′,DBS′を用いてセットアップを行う場合に比べ、
出力濃度値DOはハイライト領域がハイライト側出力設
定値DOHLに接近し、より明るい仕上がりの複製画を得
ることができる。
As is clear from the above description, when the original image is a scene having a bright background, the highlight side density values DRH, DGH, DBH and the shadow side density values DRS, DGS, DBS obtained in the above-mentioned embodiment are obtained. When the setup is performed using, the highlight side density value DR obtained by the conventional method
H ', DGH', DBH ', shadow side density values DRS', DG
Compared with the case of setting up using S'and DBS ',
The output density value DO is such that the highlight region approaches the output setting value DOHL on the highlight side, and a reproduced image with a brighter finish can be obtained.

【0122】一方、詳細には説明しないが、上記実施例
によれば、原画像が暗い背景を持つシーンである場合に
は、シャドウ側濃度値DRS,DGS,DBSがシャドウ側濃
度値DRS′,DGS′,DBS′よりも低く設定されること
になる。したがって、この場合、階調変換曲線GCR は
階調変換曲線GCR ′の下側すなわちシャドウ側出力設
定値DOSD側を通過し、同じ入力濃度値DIを与えて
も、階調変換曲線GCRにより変換した出力濃度値DO
の方が、階調変換曲線GCR ′により変換した出力濃度
値DOよりシャドウ側出力設定値DOSDに接近すること
になる。すなわち、上記実施例によりシャドウ側濃度値
DRS,DGS,DBSを設定することにより、原画像が暗い
背景を持つシーンである場合でも、従来ほど白っぽい仕
上がりでない複製画を得ることができる。
On the other hand, although not described in detail, according to the above embodiment, when the original image is a scene having a dark background, the shadow side density values DRS, DGS, DBS are the shadow side density values DRS ', It will be set lower than DGS 'and DBS'. Therefore, in this case, the gradation conversion curve GCR passes through the lower side of the gradation conversion curve GCR ', that is, the shadow side output set value DOSD side, and even if the same input density value DI is given, the gradation conversion curve GCR is converted. Output density value DO
In this case, the output density value DO converted by the gradation conversion curve GCR 'is closer to the shadow side output set value DOSD. That is, by setting the density values DRS, DGS, DBS on the shadow side according to the above-described embodiment, even if the original image is a scene having a dark background, it is possible to obtain a duplicate image that is not whitish as in the conventional case.

【0123】なお、階調変換曲線は、必ずしも図16に
示す実施例の階調変換曲線のような直線状のものでなく
てもよい。すなわち、階調変換曲線は適宜の曲線であっ
てもよい。
Note that the gradation conversion curve does not necessarily have to be linear like the gradation conversion curve of the embodiment shown in FIG. That is, the gradation conversion curve may be an appropriate curve.

【0124】また、上記実施例は、ステップS103に
おいて求める各ブロックTn ごとの濃度ヒストグラムを
画素ごとの各色成分の濃度値を平均した平均濃度の濃度
ヒストグラムとしているが、この平均濃度値に代えて、
各色成分濃度値を加重平均して求めた明度値を用いても
よい。また、濃度ヒストグラムは色成分別の濃度の濃度
ヒストグラムであってもよい。この場合、色成分R,
G,Bの全てについて濃度ヒストグラムを求めてもよい
し、予め選択した一つの色成分についてのみ濃度ヒスト
グラムを求めてもよい。色成分R,G,Bの全てについ
て濃度ヒストグラムを求める場合には、ステップS20
1〜S223で求める累積相対度数ヒストグラムも各色
成分別に求め、且つ各色成分別に累積濃度出現率RNH
,RNS を求める。
In the above embodiment, the density histogram of each block Tn obtained in step S103 is a density histogram of average density obtained by averaging the density values of the color components of each pixel. However, instead of this average density value,
You may use the lightness value calculated by carrying out the weighted average of each color component density value. Further, the density histogram may be a density histogram of the density of each color component. In this case, the color components R,
The density histogram may be calculated for all of G and B, or the density histogram may be calculated for only one preselected color component. To obtain the density histograms for all of the color components R, G, B, step S20
1 to S223, the cumulative relative frequency histogram is also calculated for each color component, and the cumulative density appearance rate RNH is calculated for each color component.
, RNs.

【0125】そして、それぞれの色成分の累積濃度出現
率RNH ,RNS とステップS301〜S315で求め
る累積濃度値ヒストグラムに基づいて、ハイライト側濃
度値DRH,DGH,DBH、シャドウ側濃度値DRS,DGS,
DBSを求める。一方、ステップS103において、予め
選択した一つの色成分についてのみ濃度ヒストグラムを
求める場合には、ステップS301〜S315で求める
累積濃度値ヒストグラムも対応する色成分の累積濃度値
ヒストグラムのみでよい。
Then, based on the cumulative density appearance rates RNH and RNS of the respective color components and the cumulative density value histograms obtained in steps S301 to S315, the highlight side density values DRH, DGH and DBH and the shadow side density values DRS and DGS are obtained. ,
Ask for DBS. On the other hand, in step S103, when the density histogram is obtained for only one preselected color component, the cumulative density value histogram obtained in steps S301 to S315 may be only the cumulative density value histogram of the corresponding color component.

【0126】また、上記実施例では、ステップS11
5、S118、S122、S126、S133におい
て、共に濃度が均一で且つ互いに近接している二つのブ
ロック間の濃度平均値の差を取り、その差が所定値dよ
りも小さい時に両ブロック間の濃度が連続しているもの
と判定している。しかし、前記ステップS115、S1
18、S122、S126、S133においては、前記
両ブロック全体の濃度の分散値を求め、この分散値が所
定値以下であるとき両ブロック間の濃度が連続している
ものと判定するようにしていてもよい。
Also, in the above embodiment, step S11.
In S5, S118, S122, S126, and S133, the difference between the average density values of two blocks having uniform density and close to each other is calculated, and when the difference is smaller than a predetermined value d, the density between both blocks is decreased. Are determined to be continuous. However, the steps S115, S1
In 18, S122, S126, and S133, the dispersion value of the densities of both the blocks is obtained, and when the dispersion value is less than or equal to a predetermined value, it is determined that the densities between the blocks are continuous. Good.

【0127】また、上記実施例では、ステップS206
〜S208において、ブロックTnが背景部分のブロッ
クであるとき係数α=α0 (α0 <1)とし、ブロック
Tnが背景部分以外のブロックであるとき係数α=1と
しているが、例えば、ブロックTn が背景部分のブロッ
クであるとき係数α=1とし、ブロックTn が背景部分
以外のブロックであるとき係数α=α0 ′(α0 ′>
1)としてもよい。このようにしても、α0 =1/α0
′であればステップS221で得られる相対度数RNj
は上記実施例の場合と同じである。
In the above embodiment, step S206.
In step S208, the coefficient α = α 0 (α 0 <1) is set when the block Tn is a background portion block, and the coefficient α = 1 is set when the block Tn is a block other than the background portion. For example, the block Tn is a background portion. When the block is a partial block, the coefficient α = 1, and when the block Tn is a block other than the background part, the coefficient α = α0 '(α0'>
It may be 1). Even in this way, α0 = 1 / α0
If ', then the relative frequency RNj obtained in step S221
Is the same as in the above embodiment.

【0128】また、この発明は、製版用スキャナのみで
なく、階調再現性を有する複写機やファクシミリなどに
も利用できる。
Further, the present invention can be applied not only to the plate-making scanner, but also to a copying machine or a facsimile having gradation reproducibility.

【0129】また、所定ブロックは必ずしも原画像の四
隅のブロックでなくてもよく、上の二隅のブロックであ
ってもよいし、場合によっては隅のブロック以外のブロ
ックであってもよい。
The predetermined blocks are not necessarily blocks at the four corners of the original image, may be blocks at the upper two corners, or may be blocks other than the corner blocks in some cases.

【0130】さらに、原画の画像情報をあらかじめ大容
量メモリに格納しているときには、走査読取装置による
プリスキャンは不要であり、上記メモリから直接画像デ
ータを読み出して使用すればよい。
Further, when the image information of the original image is stored in advance in the large-capacity memory, the prescan by the scanning reading device is not necessary, and the image data may be directly read from the memory and used.

【0131】[0131]

【発明の効果】請求項1によると、原画像の背景が明る
い背景の時には階調変換曲線を全体として出力側ハイラ
イト濃度側に移行させることができるため、複製画像が
暗い仕上がりとなるのを防止することができる。また、
原画像の背景が暗い背景の時には階調変換曲線を全体と
して出力側シャドウ濃度側に移行させることができるた
め、複製画の仕上がりが白っぽくなるようなことがなく
なる。
According to the first aspect of the present invention, when the background of the original image is a light background, the gradation conversion curve as a whole can be shifted to the output side and the highlight density side, so that the reproduced image has a dark finish. Can be prevented. Also,
When the background of the original image is a dark background, the gradation conversion curve can be shifted to the output side and the shadow density side as a whole, so that the finish of the duplicate image does not become whitish.

【0132】請求項2によると、中央部に対象物が描か
れており周囲が背景部であるような原画像である場合に
適正な仕上がりの複製画を得ることができる。
According to the second aspect, it is possible to obtain an appropriately finished duplicate image when the object is drawn in the center and the surrounding is the background.

【0133】請求項3によると、個々のブロックの濃度
平均値を求めておくだけで、近接するブロック間の濃度
が連続しているか否かを判別することができる。
According to the third aspect, it is possible to determine whether or not the densities between the adjacent blocks are continuous only by obtaining the density average value of each block.

【0134】請求項4によると、背景ブロック以外のブ
ロックの画素数を基準として背景ブロックの画素数を相
対的に圧縮することができる。
According to the fourth aspect, the number of pixels in the background block can be relatively compressed with reference to the number of pixels in the blocks other than the background block.

【0135】請求項5によると、背景ブロックの影響を
完全に除去した状態で基準濃度点を設定することができ
る。
According to the fifth aspect, the reference density point can be set while the influence of the background block is completely removed.

【0136】請求項6によると、原画像全体の累積濃度
値ヒストグラムを1つ求めるだけで全ての色成分の基準
濃度点を作成することができる。
According to the sixth aspect, the reference density points of all the color components can be created by obtaining only one cumulative density value histogram of the entire original image.

【0137】請求項7によると、1つの色成分の累積濃
度値ヒストグラムを求めるだけでよく、基準濃度点を求
める工程を簡略化できる。
According to the seventh aspect, it is only necessary to obtain the cumulative density value histogram of one color component, and the step of finding the reference density point can be simplified.

【0138】請求項8によると、色成分ごとに独立して
累積濃度値ヒストグラムを求めるようにしているから、
色成分ごとにより適正な基準濃度点を求めることができ
る。
According to the eighth aspect, since the cumulative density value histogram is obtained independently for each color component,
An appropriate reference density point can be obtained for each color component.

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

【図1】この発明による基準濃度点の設定方法の概略を
示すフローチャート図である。
FIG. 1 is a flowchart showing an outline of a method of setting a reference density point according to the present invention.

【図2】背景部分の検出方法を示すフローチャート図で
ある。
FIG. 2 is a flowchart showing a method of detecting a background portion.

【図3】背景部分の検出方法を示すフローチャート図で
ある。
FIG. 3 is a flowchart showing a method of detecting a background portion.

【図4】背景部分の検出方法を示すフローチャート図で
ある。
FIG. 4 is a flowchart showing a method of detecting a background portion.

【図5】背景部分の検出方法を示すフローチャート図で
ある。
FIG. 5 is a flowchart showing a method of detecting a background portion.

【図6】背景部分の検出方法を示すフローチャート図で
ある。
FIG. 6 is a flowchart showing a method of detecting a background portion.

【図7】累積相対度数ヒストグラムを求める工程を示す
フローチャート図である。
FIG. 7 is a flowchart showing a process of obtaining a cumulative relative frequency histogram.

【図8】色成分別の累積相対度数ヒストグラムを求める
工程を示すフローチャート図である。
FIG. 8 is a flowchart showing a process of obtaining a cumulative relative frequency histogram for each color component.

【図9】累積濃度値ヒストグラムを求める工程を示すフ
ローチャート図である。
FIG. 9 is a flowchart showing a process of obtaining a cumulative density value histogram.

【図10】この発明の一実施例を適用する製版スキャナ
の概略ブロック図である。
FIG. 10 is a schematic block diagram of a plate-making scanner to which an embodiment of the present invention is applied.

【図11】画像処理装置を示すブロック図である。FIG. 11 is a block diagram showing an image processing apparatus.

【図12】原画像を複数のブロックに分割した状態を示
す正面図である。
FIG. 12 is a front view showing a state in which an original image is divided into a plurality of blocks.

【図13】走査マスクを示す説明図である。FIG. 13 is an explanatory diagram showing a scan mask.

【図14】累積相対度数ヒストグラムを示す図である。FIG. 14 is a diagram showing a cumulative relative frequency histogram.

【図15】累積濃度値度数ヒストグラムを示す図であ
る。
FIG. 15 is a diagram showing a cumulative density value frequency histogram.

【図16】階調変換曲線を示すグラフである。FIG. 16 is a graph showing a gradation conversion curve.

【図17】従来の基準濃度点の設定方法を示すフローチ
ャート図である。
FIG. 17 is a flowchart showing a conventional method of setting reference density points.

【図18】従来方法により求めた累積相対度数ヒストグ
ラムを示す図である。
FIG. 18 is a diagram showing a cumulative relative frequency histogram obtained by a conventional method.

【図19】従来方法により求めた色成分別の累積濃度値
ヒストグラムを示す図である。
FIG. 19 is a diagram showing a cumulative density value histogram for each color component obtained by a conventional method.

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

400 ハイライト・シャドウ点設定部 Tn ブロック hnj 濃度ヒストグラム Dn 濃度平均値 Sn 濃度分散値 DFj 画素数 CDFj 累積画素数 HI 累積相対度数ヒストグラム RNH ,RNS 累積濃度出現率 DRH,DGH,DBH 入力側ハイライト濃度値 DRS,DGS,DBS 入力側シャドウ濃度値 HL ハイライト点 SD シャドウ点 GCR 階調変換曲線 400 Highlight / shadow point setting section Tn block hnj Density histogram Dn Density average value Sn Density variance value DFj Number of pixels CDFj Cumulative number of pixels HI Cumulative relative frequency histogram RNH, RNS Cumulative density appearance rate DRH, DGH, DBH Input side highlight density Value DRS, DGS, DBS Input side shadow density value HL Highlight point SD Shadow point GCR Gradation conversion curve

─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成3年11月12日[Submission date] November 12, 1991

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0004[Correction target item name] 0004

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0004】次に、ステップS502で、画素ごとに色
成分別の濃度値を平均して平均濃度値を求め、平均濃度
値ヒストグラムを求める。
Next, in step S502, the average density value is calculated by averaging the density values for each color component for each pixel.
Seek Nehi Sutoguramu.

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0010[Correction target item name] 0010

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0010】これは以下のような原因による。すなわ
ち、例えば原画像が明るい背景を持つシーンである場
合、この明るい背景部分の影響により、図19に示す累
積濃度値ヒストグラムは相対的に濃度の低い階級の頻度
が高いヒストグラムとなる。このため、図18の累積相
対度数ヒストグラムから求める仮のハイライト平均濃度
値が低くなり、前記ステップS506で求める入力側ハ
イライト濃度値も低くなる。このようにして入力側ハイ
ライト濃度値が低くなると、この入力側ハイライト側濃
度値に基づいて設定する階調変換曲線はハイライト領域
が出力側シャドウ濃度値に移行し、結果として複製画
が暗い仕上がりとなってしまうのである。
This is due to the following causes. That is, for example, when the original image is a scene having a bright background, the cumulative density histogram shown in FIG. 19 becomes a histogram in which the class of relatively low density has a high frequency due to the influence of this bright background portion. Therefore, the provisional highlight average density value obtained from the cumulative relative frequency histogram of FIG. 18 becomes low, and the input side highlight density value obtained at step S506 also becomes low. When the input side highlight density value becomes low in this way, the gradation conversion curve set based on this input side highlight density value shifts the highlight area to the output side shadow density value side , resulting in a duplicate image. Is a dark finish.

【手続補正3】[Procedure 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】図8[Correction target item name] Figure 8

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図8】積相対度数ヒストグラムを求める工程を示す
フローチャート図である。
8 is a flowchart showing a process of determining the cumulative relative frequency histogram.

【手続補正4】[Procedure amendment 4]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】図9[Correction target item name] Figure 9

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図9】色成分別の累積濃度値ヒストグラムを求める工
程を示すフローチャート図である。
FIG. 9 is a flowchart showing a process of obtaining a cumulative density value histogram for each color component .

【手続補正5】[Procedure Amendment 5]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】図12[Correction target item name] Figure 12

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図12】原画像を複数のブロックに分割した状態を示
説明図である。
FIG. 12 is an explanatory diagram showing a state in which an original image is divided into a plurality of blocks.

【手続補正6】[Procedure Amendment 6]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】図15[Correction target item name] Fig. 15

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図15】累積濃度値ヒストグラムを示す図である。15 is a diagram showing the cumulative concentration Nehi Sutoguramu.

【手続補正7】[Procedure Amendment 7]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図7[Name of item to be corrected] Figure 7

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図7】 [Figure 7]

【手続補正8】[Procedure Amendment 8]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図8[Correction target item name] Figure 8

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図8】 [Figure 8]

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 階調を有する複製対象原画像を読取って
得られた画像データに基づいて、複製に際して階調変換
を行うために設定する階調変換曲線が通るべき基準濃度
点を設定する方法であって、 原画像を複数のブロックに分割する第1の工程と、 原画像の画像データに基づいて、各ブロックごとに濃度
値とこの濃度値を与える画素数との関係を示すブロック
別濃度ヒストグラムを求める第2の工程と、 前記画像データに基づいて、互いに近接し、それぞれの
濃度が均一であり且つ濃度が連続するブロックでなるブ
ロック群を選別する第3の工程と、 第3の工程で選別されたブロック群から、所定ブロック
と濃度が連続しているブロックを備えるブロック群のブ
ロックを背景ブロックとして検出する第4の工程と、 前記背景ブロックの画素数を、前記背景ブロックに選別
されなかったブロックの画素数に対して、前記ブロック
別濃度ヒストグラムの各階級ごとに相対的に圧縮する第
5の工程と、 第5の工程の後、各階級ごとに全ブロックの画素数を加
算することにより、原画像全体の濃度ヒストグラムを求
める第6の工程と、 前記原画像全体の濃度ヒストグラムに基づいて、累積濃
度値ヒストグラムを求める第7の工程と、 前記累積濃度値ヒストグラムに基づいて、基準濃度点を
設定する第8の工程と、 を備えることを特徴とする基準濃度点の設定方法。
1. A method for setting a reference density point through which a gradation conversion curve set for gradation conversion during copying should pass based on image data obtained by reading an original image to be reproduced having gradation. The first step of dividing the original image into a plurality of blocks, and the density for each block showing the relationship between the density value for each block and the number of pixels giving this density value based on the image data of the original image A second step of obtaining a histogram; a third step of selecting a block group consisting of blocks that are close to each other and have uniform densities and continuous densities based on the image data; and a third step A fourth step of detecting, as a background block, a block of a block group including a block whose density is continuous with a predetermined block from the block group selected in step 4, and pixels of the background block Is relatively compressed for each class of the density histogram for each block with respect to the number of pixels of the block not selected as the background block, and after the fifth step, for each class. A sixth step of obtaining a density histogram of the entire original image by adding the pixel numbers of all blocks; a seventh step of obtaining a cumulative density value histogram based on the density histogram of the entire original image; An eighth step of setting a reference density point based on a density value histogram, and a method of setting a reference density point, comprising:
【請求項2】 請求項1の基準濃度点の設定方法におい
て、 前記第4の工程における所定ブロックが矩形原画像の四
隅のブロックであることを特徴とする基準濃度点の設定
方法。
2. The reference density point setting method according to claim 1, wherein the predetermined blocks in the fourth step are blocks at four corners of a rectangular original image.
【請求項3】 請求項1または請求項2の基準濃度点の
設定方法において、 第3の工程は、互いに近接し且つそれぞれの濃度が均一
であるブロックの濃度平均値の差が所定値以下であると
き、これらのブロックの濃度が連続しているものとする
ことを特徴とする基準濃度点の設定方法。
3. The method of setting a reference density point according to claim 1 or 2, wherein in the third step, the difference between the density average values of the blocks which are close to each other and whose density is uniform is not more than a predetermined value. A method of setting a reference density point, characterized in that the density of these blocks is continuous at a certain time.
【請求項4】 請求項1〜3のいずれか一つに記載の基
準濃度点の設定方法において、 第5の工程は、背景ブロックの濃度ヒストグラムの各階
級の画素数に1未満の係数を乗じるとともに背景ブロッ
ク以外のブロックの濃度ヒストグラムの各階級の画素数
に1を乗じることによって、各階級ごとに、前記背景ブ
ロックの画素数を前記背景ブロック以外のブロックの画
素数に対して相対的に圧縮することを特徴とする基準濃
度点の設定方法。
4. The method of setting a reference density point according to claim 1, wherein in the fifth step, the number of pixels in each class of the density histogram of the background block is multiplied by a coefficient less than 1. Also, by multiplying the number of pixels of each class of the density histogram of blocks other than the background block by 1, the number of pixels of the background block is relatively compressed for each class with respect to the number of pixels of blocks other than the background block. A method of setting a reference density point, characterized by:
【請求項5】 請求項4の基準濃度点の設定方法におい
て、 背景ブロックの濃度ヒストグラムの各階級の画素数に乗
じる係数が0であることを特徴とする基準濃度点の設定
方法。
5. The method of setting a reference density point according to claim 4, wherein the coefficient by which the number of pixels of each class of the density histogram of the background block is multiplied is 0.
【請求項6】 請求項1〜5のいずれか一つに記載の基
準濃度点の設定方法において、濃度値が画素ごとの各色
成分の濃度値を平均した平均濃度値であることを特徴と
する基準濃度点の設定方法。
6. The method for setting a reference density point according to claim 1, wherein the density value is an average density value obtained by averaging the density values of the respective color components for each pixel. How to set the reference concentration point.
【請求項7】 請求項1〜5のいずれか一つに記載の基
準濃度点の設定方法において、濃度値が、選択された色
成分の画素ごとの濃度値であることを特徴とする基準濃
度点の設定方法。
7. The reference density according to any one of claims 1 to 5, wherein the density value is a density value for each pixel of the selected color component. How to set points.
【請求項8】 請求項1〜5のいずれか一つに記載の基
準濃度点の設定方法において、濃度値が画素ごとの各色
成分の濃度値であることを特徴とする基準濃度点の設定
方法。
8. The method of setting a reference density point according to claim 1, wherein the density value is a density value of each color component for each pixel. .
JP3277344A 1991-09-27 1991-09-27 How to set the reference density point Expired - Fee Related JP2584556B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP3277344A JP2584556B2 (en) 1991-09-27 1991-09-27 How to set the reference density point
DE69216190T DE69216190T2 (en) 1991-09-27 1992-09-24 Method and device for converting image signals representing an image with gradation
EP92116365A EP0534430B1 (en) 1991-09-27 1992-09-24 Method of and apparatus for converting image signal representing image having gradation
US07/953,536 US5680477A (en) 1991-09-27 1992-09-28 Method of and apparatus for converting image signal representing image having gradation
US08/870,989 US5875262A (en) 1991-09-27 1997-06-06 Method of and apparatus for converting image signal representing image having gradation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3277344A JP2584556B2 (en) 1991-09-27 1991-09-27 How to set the reference density point

Publications (2)

Publication Number Publication Date
JPH0591324A true JPH0591324A (en) 1993-04-09
JP2584556B2 JP2584556B2 (en) 1997-02-26

Family

ID=17582222

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3277344A Expired - Fee Related JP2584556B2 (en) 1991-09-27 1991-09-27 How to set the reference density point

Country Status (1)

Country Link
JP (1) JP2584556B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5832653A (en) * 1994-07-29 1998-11-10 Daiwa Seiko, Inc. Inter-line fishing rod
US7251056B2 (en) 2001-06-11 2007-07-31 Ricoh Company, Ltd. Image processing apparatus, image processing method and information recording medium
WO2019130626A1 (en) * 2017-12-27 2019-07-04 パナソニックIpマネジメント株式会社 Display device and display method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5832653A (en) * 1994-07-29 1998-11-10 Daiwa Seiko, Inc. Inter-line fishing rod
US7251056B2 (en) 2001-06-11 2007-07-31 Ricoh Company, Ltd. Image processing apparatus, image processing method and information recording medium
US7525688B2 (en) 2001-06-11 2009-04-28 Ricoh Company, Ltd. Image processing apparatus, image processing method and information recording medium
WO2019130626A1 (en) * 2017-12-27 2019-07-04 パナソニックIpマネジメント株式会社 Display device and display method
JPWO2019130626A1 (en) * 2017-12-27 2019-12-26 パナソニックIpマネジメント株式会社 Display device and display method
US11270661B2 (en) 2017-12-27 2022-03-08 Panasonic Intellectual Property Management Co., Ltd. Display apparatus and display method

Also Published As

Publication number Publication date
JP2584556B2 (en) 1997-02-26

Similar Documents

Publication Publication Date Title
US6198844B1 (en) Image processing apparatus
US7170645B2 (en) Method and apparatus for enhancing digital image quality
US7468759B2 (en) Method, apparatus and recording medium for image processing
JP3325243B2 (en) Image processing device
US20020030831A1 (en) Image correction method
US20050259884A1 (en) Image processing apparatus, image forming apparatus, image processing method, program, and recording medium
US20020163670A1 (en) Image processing method and apparatus, and recording medium
JP2584556B2 (en) How to set the reference density point
JPH1023279A (en) Image-processing unit
JPH09261505A (en) Color correction condition calculating method, printing, exposure quantity deciding method, image processing method, image processor, image forming device, printing, exposure device and storage medium
JP2003051946A (en) Image processing method, image processing apparatus, imaging device provided with the image processing apparatus, image processing program, and computer- readable recording medium with the program recorded
JPH0846784A (en) Image processing unit
JPH10283470A (en) Image processor, image processing method and recording medium
JP2614379B2 (en) How to set the reference density point
Laihanen et al. Automatic colour correction
JP2000222437A (en) Retrieval system and image processor
JPH09233335A (en) Image data processor and image data processing method
JP4083823B2 (en) Image processing device
US6546131B1 (en) Image processing method and apparatus for achieving tone reproduction suited to the image
JP4064289B2 (en) Image processing apparatus, image processing method, and image forming apparatus, program, and recording medium including the same
US7295344B2 (en) Image processing method and image processing apparatus, program and recording medium, and image forming apparatus
JP2006229817A (en) Background detection method, program, recording medium, image processing apparatus, and image forming apparatus
JPH06152945A (en) Image processor
JPH05268423A (en) Scanner
JP2000354163A (en) Image processing method

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees