JPH077457B2 - Original image histogram data collection device - Google Patents
Original image histogram data collection deviceInfo
- Publication number
- JPH077457B2 JPH077457B2 JP1044330A JP4433089A JPH077457B2 JP H077457 B2 JPH077457 B2 JP H077457B2 JP 1044330 A JP1044330 A JP 1044330A JP 4433089 A JP4433089 A JP 4433089A JP H077457 B2 JPH077457 B2 JP H077457B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- circuit
- image
- original image
- pixel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
- 238000013480 data collection Methods 0.000 title description 2
- 230000004044 response Effects 0.000 claims 1
- 238000000034 method Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 9
- 238000006243 chemical reaction Methods 0.000 description 7
- 238000001454 recorded image Methods 0.000 description 6
- 230000002093 peripheral effect Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 238000003705 background correction Methods 0.000 description 1
- 239000013256 coordination polymer Substances 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Description
【発明の詳細な説明】 (産業上の利用分野) この発明は、画像走査読取・記録装置に係り、画像に走
査記録において原画の階調変換を行う場合に必須となる
原画のヒストグラムを得る装置、より詳しくは、画像走
査読取りにおいて複数の画像領域を有する原画のヒスト
グラムデータを各画像領域毎にリアルタイムで収集する
原画のヒストグラムデータ収集装置に関する。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image scanning reading / recording apparatus, and an apparatus for obtaining a histogram of an original image which is indispensable when performing gradation conversion of the original image in scanning recording on an image. More specifically, the present invention relates to an original image histogram data collecting apparatus that collects original image histogram data having a plurality of image areas in real time for each image area in image scanning and reading.
(従来の技術とその問題点) 画像走査読取・記録装置、たとえば平面型スキャナにお
いて、簡易な画像変換処理の一態様として、原画の濃度
分布を再配分する階調変換処理を採用している例が多い
(特開昭63−42575号公報など)。(Prior Art and its Problems) An example in which an image scanning / reading / recording apparatus, for example, a flatbed scanner, adopts a gradation conversion process for redistributing the density distribution of an original image as one mode of a simple image conversion process. In many cases (Japanese Patent Laid-Open No. 63-42575, etc.).
原画の階調変換処理を行うためには、まず、原画の濃度
ヒストグラムを求めることが必要である。原画の総画素
に見合うだけの記憶容量をもったメモリ装置を用いれ
ば、この濃度ヒストグラムを求めることは比較的簡単で
ある。しかし、上記の平面型スキャナなどにおいては、
画像メモリとして、高々2走査線分程度の容量、即ち、
画像バッファしか有しないのが一般的である。そこで、
記録のための読取走査に先立って行なわれる読取走査
(プレスキャン)時に濃度データを収集し、そのヒスト
グラムを得るリアルタイム処理が要求される。In order to perform the gradation conversion process on the original image, it is necessary to first obtain the density histogram of the original image. It is relatively easy to obtain this density histogram by using a memory device having a storage capacity corresponding to the total pixels of the original image. However, in the above flatbed scanner,
The image memory has a capacity of at most about 2 scanning lines, that is,
It is common to have only an image buffer. Therefore,
Real-time processing is required to collect density data during a read scan (pre-scan) performed prior to the read scan for recording and obtain a histogram thereof.
他方、原画に仕様の異なる複数の画像領域を有する場
合、階調変換は各画像に個微に対応したものにしなけれ
ばならないから、濃度ヒストグラムは各画像領域ごとに
求めることが必要になる。この発明は、大容量の画像メ
モリを備えない、プレスキャン時にリアルタイムでヒス
トグラムデータを処理する、この処理を原画の画像領域
ごとに行う。この三条件を背景とする。On the other hand, when the original image has a plurality of image areas having different specifications, the gradation conversion must correspond to each image minutely, and therefore the density histogram needs to be obtained for each image area. According to the present invention, the histogram data is processed in real time at the time of prescan without providing a large-capacity image memory, and this processing is performed for each image area of the original image. Against the background of these three conditions.
上記の三条件を背景とする従来技術を第9図〜第12図に
示す。Prior arts against the background of the above three conditions are shown in FIGS.
第9図に示すように、画像領域(2),(3)を有する
原画(1)は、主走査方向(Y)及び副走査方方向
(X)に光電走査される。この走査にかかる主たる信号
は、第10図に示すように、画像データの取込みタイング
を与える画素クロック、画素の信号値(濃度値など)を
示す画素データ、及び画素データの有効な読込み期間で
あるが復帰期間等の無効期間であるかを示す画素エネー
ブル信号(以下、画素ENB信号と略記する)である。画
素データを画像領域別にヒストグラム収集するために、
第11図及び概要を第12図(A),(B)に示すフローに
よる処理を行っている。As shown in FIG. 9, the original image (1) having the image areas (2) and (3) is photoelectrically scanned in the main scanning direction (Y) and the sub scanning direction (X). The main signals involved in this scanning are, as shown in FIG. 10, a pixel clock that gives an image data acquisition timing, pixel data that indicates the pixel signal value (density value, etc.), and an effective reading period of the pixel data. Is a pixel enable signal (hereinafter, abbreviated as a pixel ENB signal) indicating whether or not an invalid period such as a restoration period. In order to collect pixel data by histogram for each image area,
Processing is performed according to the flow shown in FIG. 11 and an outline of FIG. 12 (A) and (B).
第11図において、(4)はマイクロコンピュータのCP
U、(5)は同RAM、(6)はフリップフロップ回路、
(7)はラッチ回路、(8)はデコーダ(8a)を含み画
素データの取込み処理とCPU内部処理とを切り換える切
換回路である。In FIG. 11, (4) is the CP of the microcomputer
U, (5) same RAM, (6) flip-flop circuit,
(7) is a latch circuit, and (8) is a switching circuit which includes a decoder (8a) and switches between pixel data fetching processing and CPU internal processing.
画素クロックに同期して入力される画素ENB信号がアク
ティブであれば、その信号がフリップフロップ回路
(6)にラッチされ、CPU(4)に割り込み処理を要求
するインタラプト信号INTをアクティブにする。その結
果、CPU(4)は第12図(B)の割り込み処理を実行
し、まず、ラッチ回路(7)において画素クロックに期
してラッチされた画素データを読み込む。If the pixel ENB signal input in synchronization with the pixel clock is active, the signal is latched by the flip-flop circuit (6) and activates the interrupt signal INT that requests the CPU (4) to perform interrupt processing. As a result, the CPU (4) executes the interrupt process of FIG. 12 (B), and first reads the pixel data latched in the latch circuit (7) in synchronization with the pixel clock.
次に、この割り込みプログラムは、読取った画素データ
の画素が原画のどの領域にあるか、どの画像領域に属す
るものかを判定する。そして領域が判ると、ヒストグラ
ムを収集する領域対応のメモリブロックを求めるととも
にブロック内のアドレスを算出し、RAM(5)にアクセ
スする。当該アドレスのメモリ内容を読出し、それをも
とに値を更新演算し、同じアドレスに更新内容を書き込
む。書き換えが終わると、現在のスキャニング位置を与
えるX座標カウンタ,X座標カウンタの処理をして第12図
(A)のメインルーチンに戻る。Next, this interrupt program determines which area of the original image the pixel of the read pixel data belongs to, and which image area it belongs to. When the area is known, the memory block corresponding to the area for which the histogram is collected is obtained, the address in the block is calculated, and the RAM (5) is accessed. The memory content of the address is read, the value is updated and calculated based on it, and the updated content is written to the same address. When the rewriting is completed, the X coordinate counter and the X coordinate counter which give the current scanning position are processed and the process returns to the main routine of FIG. 12 (A).
この割り込み処理は、割り込み信号INTが入力されるた
びに繰り返される。原画の全領域の処理が終わったスキ
ャンエンドを判定すると、その時点でRAM(5)のメモ
リブロックには領域対応のヒストグラムが出来上がる。This interrupt process is repeated every time the interrupt signal INT is input. When the scan end at which the processing of all the areas of the original image is finished is determined, a histogram corresponding to the areas is completed in the memory block of the RAM (5) at that time.
ところが、ヒストグラムデータのリアルタイム収集をこ
のように割り込みプログラムによって行うと、画素デー
タの処理はCPUの処理能力に大きく依存してしまうこと
になり、仮に、画素データを高速で読取ろうとすれば、
高速処理が可能な高価なCPUに置き換えなければならな
い。また、現状では、割り込み処理ルーチンが、画素ク
ロックの周期を制限している、即ちこのクロック周期は
割り込み処理ルーチンの最大所要時間以上なければなら
ないので、結果として画素サイズが大きくなってしま
い、比較的に粗い読み取り処理となってしまう問題があ
る。又、割り込み処理ルーチンからX,Y座標カウンタの
処理を除去し(別設する)、クロック周期を短く即ち高
速の読取りとしても、割り込み処理ルーチンの所要時間
がクロッ周期より長ければ、画素を間引いてしかデータ
を収集出来ないので、原画像に忠実なヒストグラムをる
ことができない問題がある。いずれにしても、現状で
は、階調変換による高精度の記録画像をるためにその原
始データであるヒストグラムを高い精度で求めるには幾
つかの問題があり、また、的確な記録画像を得るために
その原画像の性質に鑑みこの性質を反映した精度の高い
ヒストグラムをどのようにして求めるかの課題も一つの
問題点として残されていた。However, if real-time collection of histogram data is performed by an interrupt program in this way, the processing of pixel data greatly depends on the processing capacity of the CPU, and if the pixel data is read at high speed,
It must be replaced with an expensive CPU that can process at high speed. At present, the interrupt processing routine limits the cycle of the pixel clock, that is, this clock cycle must be longer than the maximum required time of the interrupt processing routine, resulting in a large pixel size, which is relatively large. There is a problem that the reading process becomes coarse. Also, even if the processing of the X and Y coordinate counters is removed from the interrupt processing routine (separately provided) and the clock cycle is shortened, that is, high-speed reading is performed, if the time required for the interrupt processing routine is longer than the clock cycle, pixels are thinned out. However, since data can only be collected, there is a problem that a histogram that is faithful to the original image cannot be obtained. In any case, at present, there are some problems in obtaining the histogram as the original data with high accuracy in order to obtain a highly accurate recorded image by gradation conversion, and in order to obtain an accurate recorded image. Another problem is how to obtain a highly accurate histogram that reflects this property in view of the property of the original image.
(発明の目的) そこで、この発明は、処理能力の高くはないCPUを使用
しても、また高速で画素を読取っても、原画像に忠実な
精度の高いヒストグラムの作成を可能にするとともに、
原画像(例えば、写真など)の性質に応じたより的確な
記録画像を得ることができるヒストグラムデータの収集
装置を提供することを目的とする。(Object of the Invention) Therefore, the present invention makes it possible to create a highly accurate histogram faithful to the original image, even if a CPU having a low processing capacity is used and pixels are read at high speed.
An object of the present invention is to provide a histogram data collection device that can obtain a more accurate recorded image according to the property of an original image (for example, a photograph).
(発明の構成) この発明の原画のヒストグラムデータ収集装置は、複数
の画像領域を有する原画を光電走査し画素クロックに同
期して画素データを得る画像走査読取装置に設けられ、
前記原画中の複数の領域ごとに前記画素データのヒスト
グラムを作成する装置であって、前記原画中の画像領域
を規定する位置座標に基づいて予め求められた領域識別
データ、当該領域を仮想的に分割した分割領域の主走査
方方向の続長データ、及び前記分割領域に応じた重み付
け用コードデータの組データを複数記憶するレジスタ回
路と、このレジスタ回路から出力される前記続長データ
をプリセットデータとし、画素クロックをカウントする
カウンタ回路と、前記レジスタ回路から出力される領域
識別データとコードデータをラッチするラッチ回路と、
読取った画素データを第2のアレスとし前記ラッチ回路
からの領域識別データを第1のアドレスとしてアクセス
されるメモリと、このメモリからの読出しデータに前記
ラッチ回路からのコードデータに基づく重み値を加算す
る加算回路と、少なくとも前記カウンタ回路のカウント
信号に応じて前記レジスタ回路の組データを出力させる
とともに、前記メモリのリード/ライトを制御するタイ
ミング制御回路とを備えることを特徴としている。(Structure of the Invention) The original image histogram data collecting apparatus of the present invention is provided in an image scanning reading apparatus that photoelectrically scans an original image having a plurality of image areas to obtain pixel data in synchronization with a pixel clock,
A device for creating a histogram of the pixel data for each of a plurality of regions in the original image, the region identification data previously obtained based on position coordinates defining the image region in the original image, the region is virtually A register circuit for storing a plurality of sets of continuous length data in the main scanning direction of the divided regions and weighting code data according to the divided regions, and preset data for the continuous length data output from the register circuit. A counter circuit for counting the pixel clock, a latch circuit for latching the region identification data and code data output from the register circuit,
A memory accessed by using the read pixel data as the second address and the area identification data from the latch circuit as the first address, and a weight value based on the code data from the latch circuit is added to the read data from this memory. And a timing control circuit for outputting the set data of the register circuit according to at least the count signal of the counter circuit and controlling read / write of the memory.
(作用) 主走査線に沿う読取りが、原画の別の指定され仮想的に
分割された画像領域に入ると、タイング制御回路によっ
て、レジスタ回路から組データが読出される。ラッチ回
路にラッチされた領域識別データは、メモリの第1のア
ドレスを与え、これにより領域に対応したメモリブロッ
クが指定される。他方、画素クロックに同期して入力さ
れる画素データは、メモリの第2のアドレスを与え、こ
れにより前記メモリブロック内の所定アドレスが指定さ
れる。カウンタ回路は、画素クロックをカウントし、カ
ウント中は現在読み取っている画素のデータが当該領域
中のいずれの分割領域のものであるかを示し、加算回路
では、前記の指定アドレスにアクセスして読出された内
容に前記ラッチ回路からのコードデータに基づく重み
値、たとえば「2」を加算して、結果は、読出しと同様
にタイミング制御回路により同じアドレスに書き込ま
れ、記憶内容が更新される。上記の重み値を加算する動
作は、主走査線が主走査方向の異なる分割領域に入るご
とに異なる重み値をもって行なわれ、副走査方向にこれ
ら動作を進めてゆくに従って、メモリの当該領域対応の
ブロックに重み付けられたヒストグラムデータが蓄積さ
れてゆく。(Operation) When reading along the main scanning line enters another designated and virtually divided image area of the original image, the towing control circuit reads the set data from the register circuit. The area identification data latched by the latch circuit gives the first address of the memory, whereby the memory block corresponding to the area is designated. On the other hand, the pixel data input in synchronization with the pixel clock gives the second address of the memory, whereby the predetermined address in the memory block is designated. The counter circuit counts the pixel clock and indicates during which count the data of the currently read pixel belongs to which divided area. In the adder circuit, the specified address is accessed and read out. A weight value based on the code data from the latch circuit, for example, "2" is added to the contents thus obtained, and the result is written to the same address by the timing control circuit as in the case of reading, and the stored contents are updated. The operation of adding the above weight values is performed with different weight values each time the main scanning line enters a different divided area in the main scanning direction, and as these operations are advanced in the sub scanning direction, the corresponding area of the memory The weighted histogram data is accumulated in the blocks.
以下には、後述する実施例の理解を容易にするため、実
施例の基礎となる参考例を掲げ、まずこの参考例によっ
て本発明の概要を説明する。In order to facilitate the understanding of the examples described below, reference examples that form the basis of the examples will be given, and the outline of the present invention will first be described by the reference examples.
(参考例) 第1〜5図により参考例を説明する。第4図は、画像領
域A,B,Cと領域Zを有する原画(11)を示している。走
査処理に先立って、座標入力器により画像領域A,B,Cの
座標を読取装置に入力する。第4図示のような矩形であ
れば、第9図と同様に対角の2点を指定する。Reference Example A reference example will be described with reference to FIGS. FIG. 4 shows an original picture (11) having image areas A, B and C and an area Z. Prior to the scanning process, the coordinates of the image areas A, B and C are input to the reading device by the coordinate input device. If it is a rectangle as shown in FIG. 4, two diagonal points are designated as in FIG.
座標入力が終了すると、読取装置のマイクロコンピュー
タ(図示せず)は、この入力データをもとに、原画(1
1)における領域A,B,C,Zが主走査線を区切る長さを主走
査線ごとに演算する。画素サイズを単位とすると、その
長さは、L個のように整数値で表わされる。このLを続
長データとする。When the coordinate input is completed, the microcomputer (not shown) of the reading device uses the input data to draw the original image (1
The lengths of the areas A, B, C, and Z in 1) that divide the main scanning lines are calculated for each main scanning line. When the pixel size is used as a unit, its length is represented by an integer value like L. This L is used as continuous length data.
マイクロコンピュータは、主走査線X1,X2,X3,X4,…Xnご
とに求めた続長データLとその続長データがどの領域に
属するものであるかを示す領域識別データ(IDデータ)
a,b,c,zを対として、第5図に示すようなデータテーブ
ルを作る。主走査線X3を例にすると、有効走査の始端か
らA領域が長さL3続き、続いて領域Bが長さL4だけ続
き、次いで領域Cが長さL5続いて、最後の領域Zが長さ
L6続き、有効走査の終端に至ることを示す。The microcomputer uses the continuous length data L obtained for each of the main scanning lines X 1 , X 2 , X 3 , X 4 , ... Xn and area identification data (ID indicating which area the continuous length data belongs to. data)
A data table as shown in FIG. 5 is created by pairing a, b, c and z. Taking the main scanning line X 3 as an example, the area A continues for a length L 3 from the start of effective scanning, the area B continues for a length L 4 , then the area C continues for a length L 5 and the last area. Z is the length
L 6 Indicates that the end of effective scanning is reached.
第1図は、参考例及び後述する実施例のヒストグラムデ
ータ収集装置のブロック回路図である。FIG. 1 is a block circuit diagram of a histogram data collecting device according to a reference example and an example described later.
ヒストグラムデータを記憶するRAM(21)は、読取装置
の動作を統括制御するマイクロコンピュータ(図示せ
ず)の内部メモリを使用している。A RAM (21) for storing the histogram data uses an internal memory of a microcomputer (not shown) that controls the operation of the reading device.
RAM(21)は、CPUインターフェイス(22)を介してCPU
バス,CPUと接続されている。RAM (21) CPU via CPU interface (22)
It is connected to the bus and CPU.
先入れ先出しレジスタ回路(23)(以下、FIFO回路とい
う)は、そのデータ入力DがCPUインターフェイス(2
2)を介してCPUと接続され、データ書込み入力▲▼
はCPUバスを介してCPUと接続され、第5図に示したデー
タテーブルの続長データと領域識別データのデータ対を
複数記憶することができる。The data input D of the first-in first-out register circuit (23) (hereinafter referred to as the FIFO circuit) is the CPU interface (2
2) Connected to the CPU via
Is connected to the CPU via the CPU bus and can store a plurality of data pairs of the continuation length data and the area identification data of the data table shown in FIG.
ラッチ回路(24)は、タイング制御回路(25)の出力信
号jによってFIFO回路(23)から出力される対データの
うち、領域識別データを画素クロック信号cに同期して
ラッチする。他方、プリセットカウンタ回路(26)は、
FIFO回路(23)の出力のうち、続長データをタイング制
御回路(25)の出力信号eによって、画素クロック信号
cに同期してロードする。カウンタ回路(26)は、画素
クロック信号をカウントし、カウント値がロードデータ
になれば、Dec Outから信号fを出力する。The latch circuit (24) latches the region identification data among the paired data output from the FIFO circuit (23) by the output signal j of the towing control circuit (25) in synchronization with the pixel clock signal c. On the other hand, the preset counter circuit (26)
Of the output of the FIFO circuit (23), the continuous length data is loaded in synchronization with the pixel clock signal c by the output signal e of the towing control circuit (25). The counter circuit (26) counts the pixel clock signal, and when the count value becomes the load data, outputs the signal f from Dec Out.
ラッチ回路(24)の出力g1は、バッファ回路(27)に入
力される。他方、画素データbは、画素クロック信号c
に同期してラッチ回路(28)にラッチされ、出力はバッ
ファ回路(27)に入力される。バッファ回路(27)の出
力は、FAM(21)のアドレスバス(29)に接続されてい
て、バッファ回路(27)はアドレスバッファとして機能
する。The output g 1 of the latch circuit (24) is input to the buffer circuit (27). On the other hand, the pixel data b is the pixel clock signal c
Is latched by the latch circuit (28) in synchronism with, and the output is input to the buffer circuit (27). The output of the buffer circuit (27) is connected to the address bus (29) of the FAM (21), and the buffer circuit (27) functions as an address buffer.
CPUから直接アクセスされるRAM(21)は、また、タイミ
ング制御回路(25)からもアクセスされる。タイミング
制御回路(25)から出力される信号hによりリード・ア
クセスされ、バス上でデータが衝突しないように信号h
を遅延させた信号iによりライト・アクセスされる。The RAM (21) directly accessed by the CPU is also accessed by the timing control circuit (25). The signal h output from the timing control circuit (25) is read-accessed to prevent the data from colliding on the bus.
Is write-accessed by the delayed signal i.
加算回路(30)は、RAM(21)から延びるデータバス(3
4)にA入力が接続されたアダー回路(31)と、加算結
果Sを信号hに同期してラッチするラッチ回路(32)と
からなり、ラッチ回路(32)の出力はRAM(21)の▲
▼信号である信号iに同期してRAMのデータバス(3
4)に乗せられる。アダー回路(31)の加算入力Bに
は、所定値として、たとえば固定値の「1」や、ラッチ
回路(24)の出力g2に応じてルックアツプテーブル(3
3)で参照され出力される「1」以外の値の入力も可能
である。The adder circuit (30) has a data bus (3) extending from the RAM (21).
4) consists of an adder circuit (31) connected to the A input and a latch circuit (32) that latches the addition result S in synchronization with the signal h. The output of the latch circuit (32) is the RAM (21). ▲
▼ The data bus of RAM (3
4) can be put on. The addition input B of the adder circuit (31) has a predetermined value, for example, a fixed value "1" or a look-up table (3) depending on the output g 2 of the latch circuit (24).
It is also possible to input a value other than "1" that is referenced and output in 3).
尚、出力g2及びルックアツプテーブル(LUT)(33)に
ついては、本発明の実施例として後述する。ここに示し
た参考例では、アダー回路(31)で単に+1するものと
して、すなわち画素データの1個がヒストグラムの1つ
のデータになるものとして説明している。The output g 2 and the look-up table (LUT) (33) will be described later as an embodiment of the present invention. In the reference example shown here, it is described that the adder circuit (31) simply increments by 1, that is, one piece of pixel data becomes one piece of data of the histogram.
第1図の回路動作を、第2図のCPUが実行するフロー及
び第3図のタイミングチャートによって説明する。ま
た、より具体的に、第4図,第5図に示した主走査線X3
を処理する場合を例示する。L3=3,L4=1,L5=5の場合
である。The circuit operation of FIG. 1 will be described with reference to the flow executed by the CPU of FIG. 2 and the timing chart of FIG. Further, more specifically, the main scanning line X 3 shown in FIG. 4 and FIG.
The case of processing is illustrated. This is the case where L 3 = 3, L 4 = 1 and L 5 = 5.
まず、第2図において、ヒストグラム収集のメインプロ
グラムがスタートすると、ステップ(S1)でヒストグラ
ムメモリ部すなわちRAM(21)の該当領域を初期化す
る。次のステップ(S2)では、予め入力されている画像
領域の座標に基づいて、続長データを算出するととも
に、その領域識別データを付けて第5図に示したデータ
テーブルを作成し、これを設定する。ステップ(S3)で
はFIFO回路(23)の状態をモニタし(第1図においてこ
のモニタ用の配線は省略している)、データ入力可能で
あれば、ステップ(S4)に進み、既に求められている
(続長データ+領域識別データ)の対データを処理順に
FIFO回路(23)にセットする。ステップ(S5)は、走査
が全領域にわたって終了したかどうか、スキャンエンド
を判定する。終了でなければ、ステップ(S3)に戻り、
FIFO回路(23)の状態をチェックし、FIFO回路(23)か
らデータが読出されていたら、前に書込んだ対データの
次の対データをステップ(S4)でセットし、これを全て
のデータを書込むまで繰り返す。First, in FIG. 2, when the main program for histogram collection starts, the histogram memory unit, that is, the corresponding area of the RAM (21) is initialized in step (S1). In the next step (S2), the continuation length data is calculated based on the coordinates of the image area that is input in advance, and the area identification data is added to create the data table shown in FIG. Set. In step (S3), the state of the FIFO circuit (23) is monitored (the wiring for this monitor is omitted in FIG. 1). If data can be input, the process proceeds to step (S4) and is already calculated. (Data of continuous length + area identification data)
Set in the FIFO circuit (23). The step (S5) determines the scan end whether the scanning is completed over the entire area. If not, return to step (S3),
The state of the FIFO circuit (23) is checked, and if the data is read from the FIFO circuit (23), the pair data next to the previously written pair data is set in step (S4), and all the data is set. Repeat until you write.
主走査線X3を処理する場合、走査線X2の終了からこの走
査線の開始の前に、最初の対データ(L3,a)がFIFO回路
(23)からそれぞれカウンタ回路(26),ラッチ回路
(24)にロードされる。画素クロックcに同期して最初
の画素データ(P0)が入力されると、領域識別信号g
1(a)によって、ヒストグラムを記憶憶するRAM(21)
のメモリブロックが選択され、かつ画素データのラッチ
出力d(P0)がこのメモリブロック内のアドレスを与え
てアクセス可能となる。RAM(21)の▲▼信号hに
より、そのアドレスの内容が読み出され、加算回路(3
0)で所定値「1」を加算され、引続く▲▼信号i
によって、同じアドレスに累積データが書込まれる。When processing the main scan line X 3 , before the start of this scan line from the end of the scan line X 2 , the first pair of data (L 3 , a) is output from the FIFO circuit (23) to the counter circuit (26), respectively. It is loaded into the latch circuit (24). When the first pixel data (P0) is input in synchronization with the pixel clock c, the area identification signal g
RAM (21) that stores the histogram according to 1 (a)
Memory block is selected, and the latch output d (P0) of the pixel data gives an address in this memory block and becomes accessible. The contents of that address are read by the ▲ ▼ signal h of the RAM (21), and the addition circuit (3
In step 0), the predetermined value "1" is added, and the subsequent ▲ ▼ signal i
Causes the cumulative data to be written to the same address.
今、L3=3であり、上記の動作は3回、カウンタ回路
(26)のDec Out信号が出力されるまでで繰り返えされ
る。Dec Out信号がカウント値fが1のとき出力される
ものとして、第3図のタイミングチャート上にその数値
が記載されている。Now, L 3 = 3, and the above operation is repeated three times until the Dec Out signal of the counter circuit (26) is output. As the Dec Out signal is output when the count value f is 1, its numerical value is described in the timing chart of FIG.
Dec Out信号が出力されると、タイミング制御回路(2
5)を経由して、カウンタロード信号▲▼(e)が
このカウンタ回路(26)に入力され、画素データb(P
3)に対応する次の画素クロックcに同期してFIFO回路
(23)から次の対データ(L4,b)がそれぞれカウンタ回
路(26),ラッチ回路(24)にロードされる。そして、
この新しいカウントデータと領域識別データによって同
様の処理が反復される。When the Dec Out signal is output, the timing control circuit (2
The counter load signal ▲ ▼ (e) is input to this counter circuit (26) via 5) and the pixel data b (P
The next pair of data (L 4 , b) is loaded from the FIFO circuit (23) into the counter circuit (26) and the latch circuit (24) in synchronization with the next pixel clock c corresponding to 3). And
Similar processing is repeated by the new count data and area identification data.
(実施例) 次に、実施例を説明する。(Example) Next, an example will be described.
例えば画像の一例として写真を取り挙げる。写真の撮影
目的,行為から考えると、写真画像においては、一般的
に、重要であるのは中央部であって、周辺部に至るに従
い重要度は低下する。この写真画像を読取り、階調変換
として記録する場合、写真画像全域にわたる濃度分布を
単純にヒストグラムとして求めると、重要でない周辺部
のデータが重要である中央部に悪影響を与えるといった
ことが考えられる。そこで、1つの画像中で、たとえ
ば、重要な領域,そうでない領域,及びこれらの中間の
領域というふうに仮想的に区分して、それぞれの領域に
対応づけてヒストグラム累積の重み付けを変えると、画
像の性質に見合ったより的確な記録画像が得られる。For example, a photograph is taken as an example of the image. Considering the purpose and action of taking a photograph, generally, in a photographic image, the important part is the central part, and the importance becomes lower toward the peripheral part. When this photographic image is read and recorded as gradation conversion, if the density distribution over the entire photographic image is simply obtained as a histogram, it is conceivable that the data in the unimportant peripheral portion will adversely affect the important central portion. Therefore, if one region is virtually divided into, for example, an important region, a region that is not so important, and an intermediate region between these regions, and the histogram accumulation weighting is changed in association with each region, the image It is possible to obtain a more accurate recorded image that matches the property of.
上記の趣旨に沿う、ヒストグラムを重み付けして求める
装置は、上述の参考例を変形することにより実現可能で
ある。第6図,第7図,第1図を参照して説明する。An apparatus that weights and obtains a histogram in line with the above-mentioned purpose can be realized by modifying the above-described reference example. This will be described with reference to FIGS. 6, 7, and 1.
第6図は、第4図に示した原画(11)中の画像領域Cを
取り出して示している。この画像領域Cが例えば写真画
像であるとする。中央部,中間部,周辺部の順に重要度
が低下するものとして、ヒストグラムデータの重み付け
を、中央部には「3」,中間部に「2」,周辺部には
「1」を与えるものとする。このため、1つの画像Cを
仮想的な3つの領域に区分し、先の参考例で示した続長
データをこの仮想的な3つの領域にも適用し、かつ重み
付けを続長データに対応付けたコードで設定する。FIG. 6 shows the image area C in the original image (11) shown in FIG. It is assumed that the image area C is a photographic image, for example. As the importance decreases in the order of the central part, the intermediate part, and the peripheral part, weighting of the histogram data is given as "3" for the central part, "2" for the intermediate part, and "1" for the peripheral part. To do. Therefore, one image C is divided into three virtual regions, the continuous length data shown in the above reference example is also applied to these virtual three regions, and weighting is associated with the continuous length data. Set with the code.
主走査線X4の例示のように、続長データL9は、L91〜L95
に分解され、かつ第7図に例示するように、それぞれの
続長データに、第1図の加重テーブル(33)参照用のコ
ードを設定する。加重テーブル(33)は、ラッチ回路
(24)からコードデータが入力されると、対応の重みデ
ータを出力し、これをダー回路(31)の加算値とする。As shown in the example of the main scanning line X 4 , the continuous length data L 9 is L 91 to L 95.
As shown in FIG. 7, each continuous length data is set with a code for referring to the weight table (33) in FIG. When the code data is input from the latch circuit (24), the weighting table (33) outputs the corresponding weight data, which is used as the added value of the dar circuit (31).
なお、上記の重み付けは、コードによって加重テーブル
を参照して行うものとしたが、コードそのものを重みの
2進値としてもよい。この場合、加重テーブルを備えず
とも、単なるラッチ回路で代替可能となる。Although the above weighting is performed by referring to the weighting table according to the code, the code itself may be a binary value of the weight. In this case, a simple latch circuit can be used instead of the weight table.
また、画像に対し、重み付けするか否かは、画像領域の
座標入力に続けてこれを指定すればよく、又、重み付け
する場合、その仮想領域をどのように割り振るかは、予
めパターン化された標準を作成しておき、画像の特性に
応じてオペレータが任意にパターンを指定することによ
って、マイクロコンピュータにより自動的に割り振りが
可能である。Further, whether or not to weight the image may be specified by inputting the coordinates of the image region after the input, and in the case of weighting, how to allocate the virtual region is pre-patterned. The standard can be created in advance, and the operator can arbitrarily specify the pattern according to the characteristics of the image, whereby the allocation can be automatically performed by the microcomputer.
上記の参考例、実施例はいずれも、原画中に矩形の画像
領域を有する場合を示したが、第8図に示す原画(41)
のように、原画に、矩形のほか、円形,三角形,楕円
形,星形,L字形などの異種または同種の複数の画像領域
を有していても、同様に本発明を適用しうることを妨げ
るものではない。In each of the reference example and the example described above, the case where the original image has a rectangular image area is shown, but the original image (41) shown in FIG.
As described above, even if the original image has a plurality of image regions of different types or the same types such as a circle, a triangle, an ellipse, a star, and an L shape in addition to a rectangle, the present invention can be similarly applied. It does not hinder.
なお、この明細書でいうヒストグラムは、実施例として
は、濃度ヒストグラムを前提にしているが、この「濃
度」の語は、狭義の光学的濃度値を示すほか、マンセル
バリューや原画読取装置の出力信号レベル、シェーディ
ング補正後の信号レベル、それに、網点画像における網
点面積率など、光学的濃度値に応じた量一般を指すもの
とする。Note that the histogram in this specification is based on a density histogram as an example, but the term “density” indicates an optical density value in a narrow sense, and also the Munsell value and the output of the original image reading device. The signal level, the signal level after shading correction, and the dot area ratio in the dot image are generally referred to as quantities corresponding to optical density values.
(発明の効果) 以上のように、この発明によれば、画像を読取りその画
素データのヒストグラム収集処理に直接CPUが介在しな
いので、処理能力が高くはない安価なCPUを使用でき、
また、画素読取りのためのクロック周期の制約が大幅に
緩和されるので、高速の読取り、すなわち高精度な読取
りが可能となって精度の高いヒストグラムを得ることが
でき、これによって記録画像の品質を向上させることが
できる。また、本発明にかかる装置は、特に小型,簡易
型の画像走査読取装置に限ることなく、大型,中型及び
読取りの精細度の如何にかかわらず広く適用可能である
ので、汎用性の点でもその利用価値は大きい。さらに、
本発明によれば、画像領域内を分割してその分割領域に
画像の性質に応じた重み値を付与しこの重み値を用いて
重み付けられたヒストグラムを収集するように構成した
ので、画像の性質に見合ったより的確な記録画像が得ら
れる効果がある。(Effect of the Invention) As described above, according to the present invention, since the CPU does not directly intervene in the histogram collection process of reading the image of the pixel data, an inexpensive CPU with a low processing capacity can be used,
In addition, since the restriction on the clock cycle for pixel reading is greatly relaxed, high-speed reading, that is, high-accuracy reading is possible and a highly accurate histogram can be obtained, which improves the quality of recorded images. Can be improved. Further, the apparatus according to the present invention is not limited to a small-sized and simple-type image scanning reading apparatus, but can be widely applied regardless of the large-sized, medium-sized, and reading fineness, and therefore in terms of versatility. The utility value is great. further,
According to the present invention, the inside of the image area is divided, a weight value according to the property of the image is given to the divided area, and the weighted histogram is collected using this weight value. There is an effect that a more accurate recorded image corresponding to the above can be obtained.
第1図はこの発明の一実施例のブロック回路図、 第2図は参考例、実施例におけるCPU処理の概略フロー
チャート、 第3図は第1図の回路における信号のタイミングチャー
ト、 第4図は参考例における原画走査の説明図、 第5図は参考例における続長データを領域識別データの
データテーブルの概念図、 第6図は本発明の一実施例に係る画像内重み付けを説明
するための図、 第7図は重み付けデータの設定の仕方の説明図、 第8図は原画内に置く各種画像の形態を示す図、 第9図は複数の画像領域を有する原画を読取り走査する
説明図、 第10図は画像信号のタイミングの説明図、 第11図は従来例のブロック回路図、 第12図は従来例のCPU処理のフローチャートである。 A,B,C……画像領域、11……原画、23……先入れ先出し
レジスタ回路(FIFO回路)、26……プリセットカウンタ
回路、24……ラッチ回路、21……RAM、30……加算回
路、25……タイミング制御回路、31……ルックアツプテ
ーブル(加重テーブル)。FIG. 1 is a block circuit diagram of an embodiment of the present invention, FIG. 2 is a reference example, a schematic flowchart of CPU processing in the embodiment, FIG. 3 is a timing chart of signals in the circuit of FIG. 1, and FIG. FIG. 5 is an explanatory diagram of original image scanning in the reference example, FIG. 5 is a conceptual diagram of a data table of the continuous length data and area identification data in the reference example, and FIG. FIG. 7, FIG. 7 is an explanatory diagram of how to set weighting data, FIG. 8 is a diagram showing forms of various images placed in an original image, and FIG. 9 is an explanatory diagram of reading and scanning an original image having a plurality of image regions, FIG. 10 is an explanatory diagram of timing of image signals, FIG. 11 is a block circuit diagram of a conventional example, and FIG. 12 is a flowchart of CPU processing of a conventional example. A, B, C …… Image area, 11 …… Original image, 23 …… First-in first-out register circuit (FIFO circuit), 26 …… Preset counter circuit, 24 …… Latch circuit, 21 …… RAM, 30 …… Adding circuit, 25 …… Timing control circuit, 31 …… Look up table (weighted table).
Claims (1)
画素クロックに同期して画素データを得る画像走査読取
装置に設けられ、前記原画中の複数の領域ごとに前記画
素データのヒストグラムを作成する装置であって、 前記原画中の画像領域を規定する位置座標に基づいて予
め求められた領域識別データ、当該領域を仮想的に分割
した分割領域の主走査方向の続長データ、及び前記分割
領域に応じた重み付け用コードデータの組データを複数
記憶するレジスタ回路と、 このレジスタ回路から出力される前記続長データをプリ
セットデータとし、画素クロックをカウントするカウン
タ回路と、 前記レジスタ回路から出力される領域識別データとコー
ドデータをラッチするラッチ回路と、 読取った画素データを第2のアレスとし前記ラッチ回路
からの領域識別データを第1のアドレスとしてアクセス
されるメモリと、 このメモリからの読出しデータに前記ラッチ回路からの
コードデータに基づく重み値を加算する加算回路と、 少なくとも前記カウンタ回路のカウント信号に応じて前
記レジスタ回路の組データを出力させるとともに、前記
メモリのリード/ライトを制御するタイミング制御回路
と、 を備えることを特徴とする原画のヒストグラムデータ収
集装置。1. An image scanning / reading device for photoelectrically scanning an original image having a plurality of image areas to obtain pixel data in synchronization with a pixel clock, and creating a histogram of the pixel data for each of the plurality of areas in the original image. Which is a device for predetermining region identification data based on position coordinates defining an image region in the original image, continuous data in the main scanning direction of a divided region obtained by virtually dividing the region, and the division. A register circuit that stores a plurality of set data of weighting code data according to areas, a counter circuit that counts pixel clocks by using the continuation length data output from the register circuit as preset data, and an output from the register circuit. A latch circuit for latching the region identification data and the code data, and the read pixel data as a second address. A memory accessed using the area identification data from the first address as a first address; an adder circuit that adds a weight value based on the code data from the latch circuit to the read data from the memory; and a count signal of at least the counter circuit. And a timing control circuit that controls the read / write of the memory while outputting the group data of the register circuit in response to the original data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1044330A JPH077457B2 (en) | 1989-02-25 | 1989-02-25 | Original image histogram data collection device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1044330A JPH077457B2 (en) | 1989-02-25 | 1989-02-25 | Original image histogram data collection device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH02224077A JPH02224077A (en) | 1990-09-06 |
| JPH077457B2 true JPH077457B2 (en) | 1995-01-30 |
Family
ID=12688499
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1044330A Expired - Lifetime JPH077457B2 (en) | 1989-02-25 | 1989-02-25 | Original image histogram data collection device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH077457B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP2199973A3 (en) | 1997-06-09 | 2010-09-08 | Seiko Epson Corporation | An image processing apparatus and method, and an image evaluation device and method |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH077441B2 (en) * | 1985-11-07 | 1995-01-30 | 富士通株式会社 | Concentration histogram detector |
-
1989
- 1989-02-25 JP JP1044330A patent/JPH077457B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH02224077A (en) | 1990-09-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0369702B1 (en) | Image processing apparatus and method | |
| CA1260841A (en) | Image reading and/or recording apparatus with enlarging and reducing function | |
| JPS62230265A (en) | Picture signal correcting device | |
| US4852024A (en) | Picture processing apparatus | |
| EP0827082B1 (en) | Semiconductor memory having arithmetic function | |
| JPH077457B2 (en) | Original image histogram data collection device | |
| US5383032A (en) | Image processing system | |
| US5062142A (en) | Data processor producing a medial axis representation of an extended region | |
| US6480231B1 (en) | Efficiently de-interlacing a buffer of image data | |
| JP3132771B2 (en) | Image storage device and image processing device having the same | |
| JP2814769B2 (en) | Image processing device | |
| JPH04236568A (en) | Edit processing system and equipment in picture reader | |
| JP2646889B2 (en) | Image processing device | |
| JP2710635B2 (en) | Image reading device | |
| JP3272463B2 (en) | Image forming apparatus and method of using the same | |
| JP2601059B2 (en) | Image processing device | |
| JPS6089169A (en) | Picture information reduction processing method | |
| WO2025086253A1 (en) | Image correction method and system, and display device | |
| JPH06187436A (en) | Picture data processor | |
| JPS58163079A (en) | Pattern measuring device | |
| JPH11266334A (en) | Image reading device | |
| JPH0514704A (en) | Method and device for picture processing | |
| JPH09121278A (en) | Image reading device | |
| JP2945028B2 (en) | Image processing designated area information calculation device | |
| JP3009088B2 (en) | Scan format converter |