Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4744470B2 - Histogram creation apparatus and method - Google Patents
[go: Go Back, main page]

JP4744470B2 - Histogram creation apparatus and method - Google Patents

Histogram creation apparatus and method Download PDF

Info

Publication number
JP4744470B2
JP4744470B2 JP2007091950A JP2007091950A JP4744470B2 JP 4744470 B2 JP4744470 B2 JP 4744470B2 JP 2007091950 A JP2007091950 A JP 2007091950A JP 2007091950 A JP2007091950 A JP 2007091950A JP 4744470 B2 JP4744470 B2 JP 4744470B2
Authority
JP
Japan
Prior art keywords
data
histogram
input
holding
address
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.)
Active
Application number
JP2007091950A
Other languages
Japanese (ja)
Other versions
JP2008250741A (en
Inventor
輝彦 上林
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.)
Denso Ten Ltd
Original Assignee
Denso Ten 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 Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP2007091950A priority Critical patent/JP4744470B2/en
Publication of JP2008250741A publication Critical patent/JP2008250741A/en
Application granted granted Critical
Publication of JP4744470B2 publication Critical patent/JP4744470B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)

Description

本発明は、メモリを利用してヒストグラムを作成するヒストグラム作成装置及び方法に関する。   The present invention relates to a histogram creation apparatus and method for creating a histogram using a memory.

画像処理システムにおいては、入力画像が利用可能な濃度値範囲に適切にスケールされているか否かを調べる際に、入力画像データの濃度値をヒストグラムとして算出することが行われている。   In an image processing system, when it is determined whether or not an input image is appropriately scaled to a usable density value range, the density value of input image data is calculated as a histogram.

ヒストグラムを求める方法としては、予め、画像データの各濃度値に対応してその濃度値のデータ数(度数)を格納するヒストグラム用のメモリを用意しておき、画像メモリから画像データを順番に読み出し、その画像データの濃度値がいずれの濃度値に該当するかを判別する。そして、該当する濃度値に対応するデータ数(度数)を読み出し、その度数に1を加算したのちその結果を同じアドレスに書き込むことによって、ヒストグラム用のメモリに画像データのヒストグラムを作成する。   As a method for obtaining the histogram, a histogram memory for storing the number of data of the density value (frequency) corresponding to each density value of the image data is prepared in advance, and the image data is sequentially read from the image memory. Then, it is determined which density value the density value of the image data corresponds to. Then, the number of data (frequency) corresponding to the corresponding density value is read out, 1 is added to the frequency, and the result is written to the same address, thereby creating a histogram of the image data in the histogram memory.

図1のフローチャート及び図2を参照しながら従来のヒストグラムの作成手順について説明する。
動作クロックの入力タイミングに合わせて、データを読み出すRAMのアドレスを入力データとして入力すると(ステップS1/YES)、次の動作クロックの立ち上がりに同期して該当するアドレスのデータをRAMから読み出す(ステップS2)。次に、読み出したデータに1を加算し、加算した値をライトデータとする(ステップS3)。求めたライトデータは、次の動作クロックの立ち上がりタイミングに同期してRAMに書き込まれる(ステップS4)。この処理を全画素について繰り返し行う(ステップS5)。
A conventional histogram creation procedure will be described with reference to the flowchart of FIG. 1 and FIG.
When the address of the RAM from which data is read is input as input data in accordance with the input timing of the operation clock (step S1 / YES), the data at the corresponding address is read from the RAM in synchronization with the next rising edge of the operation clock (step S2). ). Next, 1 is added to the read data, and the added value is used as write data (step S3). The obtained write data is written into the RAM in synchronism with the rising timing of the next operation clock (step S4). This process is repeated for all pixels (step S5).

特許文献1には、ヒストグラムを用いて、画像の階調を変換する方法が開示されている。   Patent Document 1 discloses a method for converting the gradation of an image using a histogram.

特開2001−154646号公報JP 2001-154646 A

しかしながら、図2に示すようにRAMからのデータの読み出しと、RAMへのデータの書き込みとが同時にはできないため、連続して入力されるデータに対しては、ヒストグラムを作成することができなかった。   However, as shown in FIG. 2, since reading data from the RAM and writing data to the RAM cannot be performed at the same time, a histogram could not be created for continuously input data. .

本発明は上記事情に鑑みてなされたものであり、連続して入力されるデータに対してもヒストグラムを作成することができるヒストグラム作成装置及び方法を提供することを目的とする。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a histogram creation apparatus and method capable of creating a histogram even for continuously input data.

かかる目的を達成するために本発明のヒストグラム作成装置は、データの入出力端子を複数有する記憶手段と、前記記憶手段を使用して、入力データのヒストグラムを作成するヒストグラム作成手段とを備えるヒストグラム作成装置であって、前記ヒストグラム作成手段は、入力データと、該入力データよりも1つ前に入力したデータとが一致しているか否かを判定する第1の判定手段と、前記入力データと、前記入力データよりも2つ前に入力したデータとが一致しているか否かを判定する第2の判定手段と、前記記憶手段に記憶するデータを保持する第1の保持手段と、前記第1の保持手段で保持しているデータをさらに保持する第2の保持手段とを備え、前記ヒストグラム作成手段は、前記第1の判定手段が一致していると判定した場合には、前記第1の保持手段に保持されたデータを用いてヒストグラムを作成し、前記第2の判定手段が一致していると判定した場合には、前記第2の保持手段に保持されたデータを用いてヒストグラムを作成することを特徴とする。
本発明によれば、記憶手段の同一の記憶領域に記憶したデータを連続して使用し、ヒストグラムを作成する場合であっても、ヒストグラムを正確に作成することができる。
Histogram forming apparatus of the present invention in order to achieve the above object, a plurality comprises memory means input and output terminals of the data, using the storage means, the histogram creation and a histogram generating means for generating a histogram of the input data In the apparatus, the histogram creation means includes: first determination means for determining whether or not the input data matches data input immediately before the input data; the input data; A second determination unit that determines whether or not the data input two times before the input data matches; a first holding unit that holds data to be stored in the storage unit; and the first Second holding means for further holding the data held by the holding means, wherein the histogram creating means determines that the first determining means is coincident. A histogram is created using the data held in the first holding unit, and when it is determined that the second determination unit matches, the histogram is held in the second holding unit. A histogram is created using data.
According to the present invention, even when data stored in the same storage area of the storage unit is continuously used to create a histogram, the histogram can be created accurately.

上記ヒストグラム作成装置において、前記ヒストグラム作成手段によって作成されたヒストグラムを解析する解析手段と、前記解析手段の解析結果に従って、入力データの補正を行う補正手段と、を有しているとよい。
従って、作成したヒストグラムに基づいて、入力データの解析を行うことができる。
The histogram creation device may include an analysis unit that analyzes the histogram created by the histogram creation unit, and a correction unit that corrects input data according to the analysis result of the analysis unit.
Therefore, input data can be analyzed based on the created histogram.

本発明のヒストグラム作成方法は、データの入出力端子を複数有する記憶手段を使用して、入力データのヒストグラムを作成するヒストグラム作成方法であって、入力データと、該入力データよりも1つ前に入力したデータとが一致しているか否かを判定する第1の判定ステップと、前記入力データと、前記入力データよりも2つ前に入力したデータとが一致しているか否かを判定する第2の判定ステップと、前記記憶手段に記憶するデータを第1の保持手段に保持する第1の保持ステップと、前記第1の保持ステップで前記第1の保持手段に保持したデータをさらに第2の保持手段に保持する第2の保持ステップとを備え、前記第1の判定ステップで一致していると判定した場合には、前記第1の保持手段に保持したデータを用いてヒストグラムを作成し、前記第2の判定ステップで一致していると判定した場合には、前記第2の保持手段に保持したデータを用いてヒストグラムを作成することを特徴とする。 The histogram creation method of the present invention is a histogram creation method for creating a histogram of input data using a storage means having a plurality of data input / output terminals . The input data and the input data are one before the input data. A first determination step for determining whether or not the input data matches, and a first determination step for determining whether or not the input data matches data input two times before the input data; 2 determination steps, a first holding step for holding data stored in the storage means in a first holding means, and a second holding of the data held in the first holding means in the first holding step. A second holding step held in the first holding means, and when it is determined that the two match in the first determination step, the data is stored using the data held in the first holding means. Create a ram, the second when it is determined that they match determination step is characterized by generating a histogram by using the data held in the second holding means.

本発明によれば、連続して入力されるデータに対してもヒストグラムを作成することができる。   According to the present invention, it is possible to create a histogram even for continuously input data.

添付図面を参照しながら本実施例の最良の実施例を説明する。   The best embodiment of the present embodiment will be described with reference to the accompanying drawings.

まず、図3を参照しながら本実施例の構成を説明する。図3には、1基板上に形成された電子装置1の構成を示す。電子装置1は、図3に示すようにヒストグラム作成部2と、デュアルポートRAM3と、画像解析部4と、画像補正部5とを有している。   First, the configuration of the present embodiment will be described with reference to FIG. FIG. 3 shows a configuration of the electronic device 1 formed on one substrate. As shown in FIG. 3, the electronic device 1 includes a histogram creation unit 2, a dual port RAM 3, an image analysis unit 4, and an image correction unit 5.

ヒストグラム作成部2は、デュアルポートRAM3を使用して、入力した画像データのヒストグラムを作成する。   The histogram creation unit 2 creates a histogram of the input image data using the dual port RAM 3.

デュアルポートRAM3は、データの入出力のための信号の出入り口(ポート)を2つ設けたRAMであり、例えば、デュアルポートRAM3は、第1のクロック入力端子に入力される書き込みクロック信号によって設定されたタイミングで入力ポートDinに入力されるデータを所定の記憶領域に順次書き込み、そして、第2のクロック入力端子に入力される読み出しクロック信号によって設定されたタイミングで上記記憶領域から記憶データを順次読み出し、出力ポートDoutに出力する。 The dual port RAM 3 is a RAM provided with two signal input / output ports (ports) for data input / output. For example, the dual port RAM 3 is set by a write clock signal input to a first clock input terminal. the data input to the input port D in in timing sequentially written into a predetermined storage area, and the stored data from the storage area sequentially at the timing set by the read clock signal input to the second clock input terminal Read and output to output port Dout .

画像解析部4は、ヒストグラム作成部2で作成したヒストグラムを利用して、画像を解析する。
画像補正部5は、画像解析部4の解析結果に基づいて、画像の補正を行う。例えば、入力した画像データの各色成分ごとに図4(A)に示すヒストグラムを作成し、図4(B)に示すように画像の濃度階調が0〜255の256階調となるように補正を行う。このような補正を行うことで色の再現性を高めることができる。
The image analysis unit 4 analyzes the image using the histogram created by the histogram creation unit 2.
The image correction unit 5 corrects the image based on the analysis result of the image analysis unit 4. For example, the histogram shown in FIG. 4A is created for each color component of the input image data, and correction is performed so that the density gradation of the image becomes 256 gradations from 0 to 255 as shown in FIG. 4B. I do. By performing such correction, color reproducibility can be improved.

図5に、ヒストグラム作成部2の構成を示す。ヒストグラム作成部2は、図5に示すように第1FF(フリップフロップ)21、第2FF22、第3FF23、第4FF24、第5FF(本発明の保持手段に該当する)27、第6FF(本発明の保持手段に該当する)30と、第1比較器(本発明の判定手段に該当する)25と、第2比較器(本発明の判定手段に該当する)26と、セレクタ28と、加算器29とを有している。   FIG. 5 shows the configuration of the histogram creation unit 2. As shown in FIG. 5, the histogram creation unit 2 includes a first FF (flip-flop) 21, a second FF22, a third FF23, a fourth FF24, a fifth FF (corresponding to the holding means of the present invention) 27, and a sixth FF (holding of the present invention). 30 (corresponding to the means), a first comparator (corresponding to the determining means of the present invention) 25, a second comparator (corresponding to the determining means of the present invention) 26, a selector 28, an adder 29, have.

第1FF21は、ヒストグラム作成部2に入力されたリードアドレス(入力データ)をラッチする。第1FF21のラッチするリードアドレスは、第2FF22に出力される。
第2FF22は第1FF21の出力するリードアドレスをラッチする。第2FF22のラッチするリードアドレスは、リードアドレス(ラッチ)として第1比較器25、第2比較器26、第3FF23に出力される。
The first FF 21 latches the read address (input data) input to the histogram creation unit 2. The read address latched by the first FF 21 is output to the second FF 22.
The second FF 22 latches the read address output from the first FF 21. The read address latched by the second FF 22 is output to the first comparator 25, the second comparator 26, and the third FF 23 as a read address (latch).

第3FF23は、第2FF22の出力するリードアドレス(ラッチ)をラッチする。第3FF23の格納するリードアドレス(ラッチ)は、ライトアドレスとしてデュアルポートRAM3に出力されると共に、第1比較器25と第4FF24に出力される。   The third FF 23 latches the read address (latch) output from the second FF 22. The read address (latch) stored in the third FF 23 is output as a write address to the dual port RAM 3 and also to the first comparator 25 and the fourth FF 24.

第4FF24は、第3FF23の出力するライトアドレスをラッチする。第4FF24の格納するライトアドレスは、ライアドレス(ラッチ)として第2比較器26に出力される。 The fourth FF 24 latches the write address output from the third FF 23. Write address to store the first 4FF24 is output as Lai preparative address (latched) to the second comparator 26.

第1比較器25は、第2FF22の出力するリードアドレス(ラッチ)と、第3FF23の出力するライトアドレスとを比較する。第1比較器25は、入力データ(リードアドレス(ラッチ))と、この入力データの1つ前の入力データ(ライトアドレス)とが一致しているか否かを判定する。第1比較器25は、比較結果を表す信号をセレクタ28に出力する。   The first comparator 25 compares the read address (latch) output from the second FF 22 with the write address output from the third FF 23. The first comparator 25 determines whether or not the input data (read address (latch)) matches the input data (write address) immediately before this input data. The first comparator 25 outputs a signal representing the comparison result to the selector 28.

第2比較器26は、第2FF22の出力するリードアドレス(ラッチ)と、第4FF24の出力するライトアドレス(ラッチ)とを比較する。第2比較器26は、入力データ(リードアドレス(ラッチ))と、この入力データの2つ前の入力データ(ライトアドレス(ラッチ))とが一致しているか否かを判定する。第2比較器26は、比較結果を表す信号をセレクタ28に出力する。   The second comparator 26 compares the read address (latch) output from the second FF 22 with the write address (latch) output from the fourth FF 24. The second comparator 26 determines whether or not the input data (read address (latch)) matches the input data two times before the input data (write address (latch)). The second comparator 26 outputs a signal representing the comparison result to the selector 28.

セレクタ28には、デュアルポートRAM3から読み出されたリードデータと、ヒストグラム作成部2の出力であり、デュアルポートRAM3に書き込まれるデータであるライトデータと、ライトデータをラッチした第5FF27の出力するライトデータ(ラッチ)と、第1比較器25と第2比較器26の比較結果とが入力される。セレクタ28は、第1比較器25と第2比較器26の比較結果をもとに、リードデータ、ライトデータ、ライトデータ(ラッチ)のいずれかを選択して、後段の加算器29に出力する。加算器29は、セレクタ28の出力するデータに1を加算して、第6FF30に出力する。第6FF30にラッチされたデータがライトデータとしてデュアルポートRAM3に出力される。   In the selector 28, the read data read from the dual port RAM 3, the write data which is the output of the histogram creating unit 2 and is written to the dual port RAM 3, and the write output from the fifth FF 27 which latches the write data. Data (latch) and comparison results of the first comparator 25 and the second comparator 26 are input. The selector 28 selects any one of read data, write data, and write data (latch) based on the comparison result of the first comparator 25 and the second comparator 26 and outputs the selected data to the adder 29 in the subsequent stage. . The adder 29 adds 1 to the data output from the selector 28 and outputs the result to the sixth FF 30. The data latched in the sixth FF 30 is output to the dual port RAM 3 as write data.

図6を参照しながらヒストグラム作成部2のヒストグラムの作成手順を説明する。
ヒストグラム作成部2は、画像データのヒストグラムを作成する機能部であるため、リードアドレスを入力すると、そのアドレスのデュアルポートRAM3に格納されたデータの値を読み出し、読み出した値に1を加算してデュアルポートRAM3の同一アドレスに書き込む。
The histogram creation procedure of the histogram creation unit 2 will be described with reference to FIG.
Since the histogram creation unit 2 is a functional unit that creates a histogram of image data, when a read address is input, the value of the data stored in the dual port RAM 3 at that address is read, and 1 is added to the read value. Write to the same address in the dual port RAM 3.

動作タイミングを示す動作クロック(図6(A)参照)の立ち下がりに同期して、リードアドレス(入力データ)がヒストグラム作成部2に入力される。このリードアドレスをヒストグラム作成部2は、第1FF21でラッチする。なお、以下の説明では入力されるリードアドレスのデータを、「1、3、5、7、7、7、5、7、5、3」とし、この順番にヒストグラム作成部2に入力されるものとする。   A read address (input data) is input to the histogram creation unit 2 in synchronization with the falling edge of the operation clock (see FIG. 6A) indicating the operation timing. The histogram creation unit 2 latches this read address in the first FF 21. In the following description, the read address data to be input is “1, 3, 5, 7, 7, 7, 5, 7, 5, 3”, and is input to the histogram creation unit 2 in this order. And

第2FF22は、第1FF21から出力されるリードアドレスをラッチする。第2FF22は、ラッチしたリードアドレスをリードアドレス(ラッチ)として、第1比較器25と、第2比較器26と、第3FF23とに出力する。図6(C)に、第2FF22から出力されるリードアドレス(ラッチ)を示す。リードアドレス(ラッチ)は、図6(B)に示すリードアドレスよりも動作クロックの1クロック分遅れたデータとなる。   The second FF 22 latches the read address output from the first FF 21. The second FF 22 outputs the latched read address as a read address (latch) to the first comparator 25, the second comparator 26, and the third FF 23. FIG. 6C shows the read address (latch) output from the second FF 22. The read address (latch) is data delayed by one clock of the operation clock from the read address shown in FIG.

図6(D)に、リードアドレス(ラッチ)を使用して、デュアルポートRAM3から読み出されたリードデータを示す。例えば、図6に示す例では、デュアルポートRAM3のリードアドレス(ラッチ)[1]に書き込まれたデータが[5]であり、デュアルポートRAM3のリードアドレス(ラッチ)[3]に書き込まれたデータが[2]であることを示している。   FIG. 6D shows read data read from the dual port RAM 3 using the read address (latch). For example, in the example shown in FIG. 6, the data written to the read address (latch) [1] of the dual port RAM 3 is [5], and the data written to the read address (latch) [3] of the dual port RAM 3 Is [2].

第3FF23は、第2FF22の出力するリードアドレス(ラッチ)をラッチする。第3FF23のラッチしたリードアドレス(ラッチ)は、ライトアドレスとして第1比較器25と、第4FF24とに出力される。また、第3FF23の出力するライトアドレスは、デュアルポートRAM3の書き込みアドレスとしてデュアルポートRAM3に供給される。図6(E)に第3FF23から出力されるライトアドレスを示す。ライトアドレスは、リードアドレスよりも動作クロックの2クロック分遅れたデータとなる。   The third FF 23 latches the read address (latch) output from the second FF 22. The read address (latch) latched by the third FF 23 is output to the first comparator 25 and the fourth FF 24 as a write address. The write address output from the third FF 23 is supplied to the dual port RAM 3 as a write address of the dual port RAM 3. FIG. 6E shows the write address output from the third FF 23. The write address is data delayed by 2 clocks of the operation clock from the read address.

図6(F)に、ライトデータとしてデュアルポートRAM3に書き込まれるデータを示す。ヒストグラムを作成するために、デュアルポートRAM3から読み出したリードデータに1を加算し、その値をリードデータが書き込まれていたデュアルポートRAM3の同一アドレスに書き込む。
セレクタ28は、第1比較器25と第2比較器26の比較結果により加算器29に出力するデータを選択する。ここでは、セレクタ28によりリードデータが選択され、加算器29に出力されたものとする。加算器29は、デュアルポートRAM3から読み出されたリードデータに1を加算して第6FF30に出力する。第6FF30から出力されるデータがライトデータとして、デュアルポートRAM3に出力される。
なお、図6(G)にライトアドレスをラッチした第4FF24が第2比較器26に出力するライトアドレス(ラッチ)のデータを示し、図6(H)に、ライトデータをラッチする第5FF27の出力であるライトデータ(ラッチ)を示す。
FIG. 6F shows data written to the dual port RAM 3 as write data. In order to create a histogram, 1 is added to the read data read from the dual port RAM 3, and the value is written to the same address of the dual port RAM 3 where the read data has been written.
The selector 28 selects data to be output to the adder 29 based on the comparison results of the first comparator 25 and the second comparator 26. Here, it is assumed that read data is selected by the selector 28 and output to the adder 29. The adder 29 adds 1 to the read data read from the dual port RAM 3 and outputs the result to the sixth FF 30. Data output from the sixth FF 30 is output to the dual port RAM 3 as write data.
FIG. 6G shows the data of the write address (latch) output to the second comparator 26 by the fourth FF 24 that latches the write address, and FIG. 6H shows the output of the fifth FF 27 that latches the write data. Write data (latch) is shown.

以上が、連続して入力されるリードアドレスが、デュアルポートメモリの同一アドレスにアクセスする必要のないデータであった場合の処理となる。   The above is the processing when the read address continuously input is data that does not need to access the same address of the dual port memory.

次に、図6(B)に示すように同一のリードアドレスが連続して入力された場合について説明する。この場合、デュアルポートRAM3の同一記憶領域に連続してアクセスすることになるため、後のリードアドレスに従ってデータを読み出すときに、前のリードデータに対する書き込みが完了していない場合がある。このような場合には、ライトデータが正しくカウントアップされない場合がある。
そこで、第1比較器25は、入力データ(リードアドレス(ラッチ))と、その1つ前の入力データ(ライトアドレス)とが一致しているか否かを判定する。また、第2比較器26は、入力データ(リードアドレス(ラッチ))と、その2つ前の入力データ(ライトアドレス(ラッチ))とが一致しているか否かを判定する。
Next, a case where the same read address is continuously input as shown in FIG. 6B will be described. In this case, since the same storage area of the dual port RAM 3 is continuously accessed, writing to the previous read data may not be completed when data is read according to the subsequent read address. In such a case, the write data may not be counted up correctly.
Therefore, the first comparator 25 determines whether or not the input data (read address (latch)) matches the previous input data (write address). In addition, the second comparator 26 determines whether or not the input data (read address (latch)) matches the previous input data (write address (latch)).

セレクタ28は、図7に示すように第1比較器25によって、リードアドレス(ラッチ)と、このデータの1つ前のライトアドレスとの一致を検出すると、ライトデータを加算器29に出力する。セレクタ28は、第2比較器2の比較結果によらず、第1比較器25の比較結果が一致した場合には、ライトデータを加算器29に出力する。この場合、リードデータではなくライトデータに1を加算するので、同じリードアドレスが連続して読み出された場合であっても、該当アドレスに正確な値を書き込むことができる。図6に示す例では、(C)に示すリードアドレス(ラッチ)のデータ[7,7]と、(E)に示すライトアドレスのデータ[7,7]とが一致している。この場合、セレクタ28でライトデータが選択され、(F)に示すようにライトデータに1が加算される。 When the first comparator 25 detects a match between the read address (latch) and the write address immediately before this data, the selector 28 outputs the write data to the adder 29 as shown in FIG. The selector 28 is irrespective of the comparison result of the second comparator 2 6, when the comparison result of the first comparator 25 match, outputs the write data to the adder 29. In this case, since 1 is added to the write data, not the read data, an accurate value can be written to the corresponding address even when the same read address is read continuously. In the example shown in FIG. 6, the read address (latch) data [7, 7] shown in (C) and the write address data [7, 7] shown in (E) match. In this case, the write data is selected by the selector 28, and 1 is added to the write data as shown in (F).

また、第2比較器26によって、リードアドレス(ラッチ)と、このデータの2つ前のライトアドレス(ラッチ)との一致を検出すると、セレクタ28は、加算器29にライトデータ(ラッチ)を出力する。第5FF27にラッチされていたライトデータ(ラッチ)に1を加算してこれをライトデータとしてデュアルポートRAM3に出力するので、入力データと、その2つ前の入力データとが同一であった場合であっても、該当アドレスに正確な値を書き込むことができる。図6に示す例では、(C)に示すリードアドレス(ラッチ)のデータ[7,5]と、(G)に示すライトアドレス(ラッチ)のデータ[7,5]とで一致している。この場合、セレクタ28でライトデータ(ラッチ)が選択され、(H)、(F)に示すようにライトデータラッチに1が加算される。   When the second comparator 26 detects a match between the read address (latch) and the write address (latch) two times before this data, the selector 28 outputs the write data (latch) to the adder 29. To do. Since 1 is added to the write data (latch) latched in the fifth FF 27 and this is output to the dual port RAM 3 as write data, the input data is the same as the previous input data. Even if it exists, an accurate value can be written in the corresponding address. In the example shown in FIG. 6, the read address (latch) data [7, 5] shown in (C) and the write address (latch) data [7, 5] shown in (G) match. In this case, write data (latch) is selected by the selector 28, and 1 is added to the write data latch as shown in (H) and (F).

図8に示すフローチャートを参照しながらヒストグラム作成部2の処理手順を説明する。
リードアドレスがデータとして入力されると(ステップS11)、ヒストグラム作成部2の第1比較器25で、第2FF22の出力するリードアドレス(ラッチ)と、第3FF23の出力するライトアドレスとが比較される(ステップS12)。リードアドレス(ラッチ)と、このリードアドレス(ラッチ)の1つ前のアドレスであるライトアドレスとが一致していた場合には(ステップS12/YES)、両者の一致を示す信号がセレクタ28に出力される。セレクタ28は、リードアドレス(ラッチ)とライトアドレスとが一致したことを示す信号が入力されると、このヒストグラム作成部2の出力であるライトデータを加算器29に出力する。加算器29によって前回のライトデータに1が加算され、これが新たなライトデータとしてデュアルポートRAM3に出力される。
The processing procedure of the histogram creation unit 2 will be described with reference to the flowchart shown in FIG.
When the read address is input as data (step S11), the first comparator 25 of the histogram creation unit 2 compares the read address (latch) output from the second FF 22 with the write address output from the third FF 23. (Step S12). When the read address (latch) and the write address which is the address immediately before this read address (latch) match (step S12 / YES), a signal indicating the match is output to the selector 28. Is done. When a signal indicating that the read address (latch) matches the write address is input to the selector 28, the selector 28 outputs write data that is the output of the histogram creation unit 2 to the adder 29. The adder 29 adds 1 to the previous write data, and this is output to the dual port RAM 3 as new write data.

また、リードアドレス(ラッチ)とライトアドレスとの一致が検出されなかった場合(ステップS12/NO)、第1比較器25からセレクタ28には、両信号の不一致を示す信号が入力される。
また、第2比較器26からは、リードアドレス(ラッチ)と、ライトアドレス(ラッチ)との比較結果が入力される。リードアドレス(ラッチ)と、このリードアドレス(ラッチ)の2つ前のアドレスであるライトアドレス(ラッチ)とが一致していた場合には(ステップS14/YES)、両者の一致を示す信号が第2比較器26からセレクタ28に出力される。セレクタ28は、リードアドレス(ラッチ)とライトアドレス(ラッチ)とが一致したことを示す信号が第2比較器26入力されると、第5FF27の出力であるライトデータ(ラッチ)を加算器29に出力する。加算器29によって前々回の書き込みデータであるライトデータ(ラッチ)に1が加算され、これが新たなライトデータとしてデュアルポートRAM3に出力される。
If no match between the read address (latch) and the write address is detected (step S12 / NO), a signal indicating a mismatch between the two signals is input from the first comparator 25 to the selector 28.
The second comparator 26 receives a comparison result between the read address (latch) and the write address (latch) . When the read address (latch) and the write address (latch), which is the address two times before the read address (latch), are coincident (step S14 / YES), a signal indicating the coincidence of the two is displayed. 2 is output from the comparator 26 to the selector 28. When the signal indicating that the read address (latch) matches the write address (latch) is input to the selector 28, the selector 28 inputs the write data (latch), which is the output of the fifth FF 27, to the adder 29. Output. The adder 29 adds 1 to the write data (latch) that is the previous write data, and outputs this to the dual port RAM 3 as new write data.

また、リードアドレス(ラッチ)とライトアドレス(ラッチ)とが一致していなかった場合には(ステップS14/NO)、第2比較器26からセレクタ28に、両者の不一致を示す信号が出力される。セレクタ28は、第1比較器25と第2比較器26とから不一致を示す信号が入力されると、リードデータを選択して加算器29に出力する。加算器29によってリードデータに1が加算され、これが新たなライトデータとしてデュアルポートRAM3に出力される。   If the read address (latch) and the write address (latch) do not match (step S14 / NO), the second comparator 26 outputs a signal indicating the mismatch between the two to the selector 28. . When a signal indicating a mismatch is input from the first comparator 25 and the second comparator 26, the selector 28 selects read data and outputs it to the adder 29. The adder 29 adds 1 to the read data, and this is output to the dual port RAM 3 as new write data.

このように本実施例は、デュアルポートRAM3を使用することで、連続して入力されるデータに対してもヒストグラムを作成することができる。
また、連続して入力されるデータが、デュアルポートRAM3の同一アドレスを指定するデータであっても、デュアルポートRAM3への正確なデータの書き込みが可能となる。
As described above, in this embodiment, the dual port RAM 3 can be used to create a histogram for data that is continuously input.
Further, even if the continuously input data is data designating the same address of the dual port RAM 3, accurate data can be written to the dual port RAM 3.

上述した実施例は、本発明の好適な実施の例である。但し、これに限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々変形実施が可能である。   The embodiment described above is a preferred embodiment of the present invention. However, the present invention is not limited to this, and various modifications can be made without departing from the scope of the present invention.

従来の処理手順を示すフローチャートである。It is a flowchart which shows the conventional process sequence. 従来のデュアルポートRAMからのデータの読み出しと、書き込みのタイミングを示す図である。It is a figure which shows the read-out timing of the data from the conventional dual port RAM, and the write-in timing. 電子装置の構成を示す図である。It is a figure which shows the structure of an electronic device. 画像補正部の処理を説明するための図である。It is a figure for demonstrating the process of an image correction part. ヒストグラム作成部の構成を示す図である。It is a figure which shows the structure of a histogram preparation part. ヒストグラム作成部の処理手順を示す図である。It is a figure which shows the process sequence of a histogram preparation part. 第1比較器と第2比較器との比較結果と、比較結果に応じたセレクタの選択出力とを示す図である。It is a figure which shows the comparison result of a 1st comparator and a 2nd comparator, and the selection output of the selector according to a comparison result. ヒストグラム作成部の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of a histogram preparation part.

符号の説明Explanation of symbols

1 電子装置
2 ヒストグラム生成部
3 デュアルポートRAM
4 画像解析部
5 画像補正部
21 第1FF
22 第2FF
23 第3FF
24 第4FF
25 第1比較器
26 第2比較器
27 第5FF
28 セレクタ
29 加算器
30 第6FF
1 Electronic Device 2 Histogram Generation Unit 3 Dual Port RAM
4 Image analysis unit 5 Image correction unit 21 1st FF
22 2nd FF
23 3rd FF
24 4th FF
25 1st comparator 26 2nd comparator 27 5th FF
28 Selector 29 Adder 30 6th FF

Claims (3)

データの入出力端子を複数有する記憶手段と、前記記憶手段を使用して、入力データのヒストグラムを作成するヒストグラム作成手段とを備えるヒストグラム作成装置であって、
前記ヒストグラム作成手段は、入力データと、該入力データよりも1つ前に入力したデータとが一致しているか否かを判定する第1の判定手段と、前記入力データと、前記入力データよりも2つ前に入力したデータとが一致しているか否かを判定する第2の判定手段と、前記記憶手段に記憶するデータを保持する第1の保持手段と、前記第1の保持手段で保持しているデータをさらに保持する第2の保持手段とを備え、
前記ヒストグラム作成手段は、前記第1の判定手段が一致していると判定した場合には、前記第1の保持手段に保持されたデータを用いてヒストグラムを作成し、前記第2の判定手段が一致していると判定した場合には、前記第2の保持手段に保持されたデータを用いてヒストグラムを作成することを特徴とするヒストグラム作成装置。
A histogram creation device comprising storage means having a plurality of data input / output terminals and histogram creation means for creating a histogram of input data using the storage means ,
The histogram creation means includes: first determination means for determining whether or not the input data matches data input immediately before the input data; the input data; and the input data 2nd determination means for determining whether or not the data input two times before matches, a first holding means for holding data stored in the storage means, and holding by the first holding means Second holding means for further holding the data being stored,
The histogram creation means creates a histogram using the data held in the first holding means when the first determination means determines that they match, and the second determination means If it is determined that they match , a histogram creation apparatus is characterized in that a histogram is created using data held in the second holding means .
前記ヒストグラム作成手段によって作成されたヒストグラムを解析する解析手段と、
前記解析手段の解析結果に従って、入力データの補正を行う補正手段と、
を有することを特徴とする請求項記載のヒストグラム作成装置。
Analyzing means for analyzing the histogram created by the histogram creating means;
Correction means for correcting input data according to the analysis result of the analysis means;
The histogram generating apparatus according to claim 1, wherein:
データの入出力端子を複数有する記憶手段を使用して、入力データのヒストグラムを作成するヒストグラム作成方法であって、
入力データと、該入力データよりも1つ前に入力したデータとが一致しているか否かを判定する第1の判定ステップと、
前記入力データと、前記入力データよりも2つ前に入力したデータとが一致しているか否かを判定する第2の判定ステップと、
前記記憶手段に記憶するデータを第1の保持手段に保持する第1の保持ステップと、
前記第1の保持ステップで前記第1の保持手段に保持したデータをさらに第2の保持手段に保持する第2の保持ステップとを備え、
前記第1の判定ステップで一致していると判定した場合には、前記第1の保持手段に保持したデータを用いてヒストグラムを作成し、前記第2の判定ステップで一致していると判定した場合には、前記第2の保持手段に保持したデータを用いてヒストグラムを作成することを特徴とするヒストグラム作成方法。
A histogram creation method for creating a histogram of input data using storage means having a plurality of data input / output terminals ,
A first determination step for determining whether or not the input data matches the data input immediately before the input data;
A second determination step of determining whether or not the input data matches data input two times before the input data;
A first holding step for holding data stored in the storage means in a first holding means;
A second holding step for holding data held in the first holding means in the first holding step in a second holding means;
If it is determined in the first determination step that the data match, a histogram is created using the data held in the first holding means, and it is determined that the data matches in the second determination step. In this case, a histogram creation method is characterized in that a histogram is created using data held in the second holding means .
JP2007091950A 2007-03-30 2007-03-30 Histogram creation apparatus and method Active JP4744470B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007091950A JP4744470B2 (en) 2007-03-30 2007-03-30 Histogram creation apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007091950A JP4744470B2 (en) 2007-03-30 2007-03-30 Histogram creation apparatus and method

Publications (2)

Publication Number Publication Date
JP2008250741A JP2008250741A (en) 2008-10-16
JP4744470B2 true JP4744470B2 (en) 2011-08-10

Family

ID=39975593

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007091950A Active JP4744470B2 (en) 2007-03-30 2007-03-30 Histogram creation apparatus and method

Country Status (1)

Country Link
JP (1) JP4744470B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6270971A (en) * 1985-09-24 1987-04-01 Tech Res & Dev Inst Of Japan Def Agency Histogram calculator
JP4147456B2 (en) * 2002-03-29 2008-09-10 富士通株式会社 Infrared image signal processor

Also Published As

Publication number Publication date
JP2008250741A (en) 2008-10-16

Similar Documents

Publication Publication Date Title
CN115640172B (en) Circuit simulation test method, device, equipment and medium
CN101964876A (en) Solid-state imaging apparatus
US7181088B2 (en) Method for constructing a Gamma table to perform Gamma correction according to the Gamma table
JP4744470B2 (en) Histogram creation apparatus and method
US20230317137A1 (en) Method and apparatus for testing adjustment circuit
CN113867475B (en) A clock phase adjustment method and related device
CN118521465B (en) Waveform compression method, waveform compression device and waveform display equipment
US12078671B2 (en) Method and apparatus of testing circuit, and storage medium
CN114822634B (en) Reference voltage determining method, reference voltage determining device, computer equipment and storage medium
US7257036B2 (en) Method and apparatus for storage device read phase auto-calibration
CN110472345B (en) Post-processing system based on ABAQUS and implementation method
JP3953250B2 (en) Asynchronous circuit verification method
US6549573B2 (en) Testing method and apparatus of glitch noise and storage medium
JP2010040092A (en) Semiconductor integrated circuit
JP2007047095A (en) Data processing circuit, data processing method, and waveform display device
US6587584B1 (en) Apparatus for gamma correcting image data
US7583544B2 (en) Data reading circuit
JP7129161B2 (en) Time interleave operation check circuit
CN114548004B (en) Method for identifying packet type in verdi waveforms
JP5240135B2 (en) Semiconductor memory device testing method and semiconductor memory device
CN112463534B (en) Daily newspaper generating method, device, equipment and medium
CN111436214B (en) Image signal processing device and method
JP4461483B2 (en) Multi-point measuring device
JP2019159945A (en) Information management program, device, and method
CN120526836A (en) DRAM testing method, device, electronic device and storage medium

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101207

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110203

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110510

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110510

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

Free format text: PAYMENT UNTIL: 20140520

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4744470

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250