JP2010245664A - Image processor, method of adjusting sampling position, and a/d converter - Google Patents

Image processor, method of adjusting sampling position, and a/d converter Download PDF

Info

Publication number
JP2010245664A
JP2010245664A JP2009089804A JP2009089804A JP2010245664A JP 2010245664 A JP2010245664 A JP 2010245664A JP 2009089804 A JP2009089804 A JP 2009089804A JP 2009089804 A JP2009089804 A JP 2009089804A JP 2010245664 A JP2010245664 A JP 2010245664A
Authority
JP
Japan
Prior art keywords
pixel data
data
offset
digital pixel
digital
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.)
Withdrawn
Application number
JP2009089804A
Other languages
Japanese (ja)
Inventor
Motoo Yoshizawa
源生 吉沢
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2009089804A priority Critical patent/JP2010245664A/en
Publication of JP2010245664A publication Critical patent/JP2010245664A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Facsimile Heads (AREA)
  • Facsimile Scanning Arrangements (AREA)
  • Analogue/Digital Conversion (AREA)
  • Image Input (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technology for appropriately setting a sampling position of data on a pixel unit in a control board, in a system with an A-D converter without incorporating a circuit for generating dummy data. <P>SOLUTION: This image processor includes: an A-D conversion part 230 for converting input analog pixel data to digital pixel data to be outputted; an offset part 210 for adapting a voltage range effective as a signal of analog pixel data supplied from an image sensor 100 to an input range of the A-D conversion part 230; and a digital data processing part 310 for adjusting the sampling position of the digital pixel data outputted from the A-D conversion part 230. The offset part 210 changes an offset value, and a digital data part 230 adjusts the sampling position of the digital pixel data outputted from the A-D conversion part 230 based on the amount of the change of the digital pixel data. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、画像処理装置、サンプリング位置調整方法、および、A/D変換装置に関する。   The present invention relates to an image processing apparatus, a sampling position adjustment method, and an A / D conversion apparatus.

一般的に、スキャナー装置などの画像読取装置では、イメージセンサーで得られる読取信号(アナログデータ)は、A/Dコンバーターで画像データ(デジタルデータ)に変換される。そして、A/Dコンバーターで変換された画像データは、制御基板の画像処理部に供給され、各種画像処理(例えば、シェーディング補正)が施される(例えば、特許文献1)。   In general, in an image reading apparatus such as a scanner apparatus, a read signal (analog data) obtained by an image sensor is converted into image data (digital data) by an A / D converter. The image data converted by the A / D converter is supplied to the image processing unit of the control board, and various image processing (for example, shading correction) is performed (for example, Patent Document 1).

画像読取装置では、A/Dコンバーターから送られてくるデジタルデータを正確に画素単位で区切って処理する必要がある。すなわち、画像処理部ではA/Dコンバーターからのデジタルデータを正しく受信できるように、サンプリング位置を適切に設定しなければならない。そのため、特に高速な読み取りを行う場合、従来の画像読取装置には、ダミーデータを生成するための回路をA/Dコンバーター内に設け、A/Dコンバーターから出力する画像データの一部(例えば、所定数の先頭画素)について所定値のダミーデータに置き換えることにより、サンプリング位置を適切に設定するものがある。   In the image reading apparatus, it is necessary to accurately process the digital data sent from the A / D converter in units of pixels. That is, the image processing unit must set the sampling position appropriately so that digital data from the A / D converter can be correctly received. For this reason, particularly when performing high-speed reading, a conventional image reading apparatus includes a circuit for generating dummy data in the A / D converter, and a part of the image data output from the A / D converter (for example, Some of the sampling positions are appropriately set by replacing the predetermined number of leading pixels) with dummy data of a predetermined value.

特開2008−227823号JP 2008-227823 A

しかし、ダミーデータを生成するための回路をA/Dコンバーター内に設けたものは一般的ではなく、画像読取装置の製造コストも高くなる。   However, it is not common to provide a circuit for generating dummy data in the A / D converter, and the manufacturing cost of the image reading apparatus is increased.

本発明は、ダミーデータを生成するための回路を内蔵していないA/Dコンバーターとのシステムにおいて、制御基板における画素単位のデータのサンプリング位置を適切に設定するための技術を提供することを目的とする。   An object of the present invention is to provide a technique for appropriately setting a sampling position of data on a pixel basis on a control board in a system with an A / D converter that does not include a circuit for generating dummy data. And

上記課題を解決するための本願発明は、画像処理装置であって、入力されたアナログ画素データをデジタル画素データに変換して出力するA/D変換手段と、イメージセンサーから供給されるアナログ画素データの信号として有効な電圧範囲を、前記A/D変換手段の入力範囲と適合させるオフセット調整手段と、前記A/D変換手段から出力されるデジタル画素データのサンプリング位置を調整するサンプリング調整手段と、を備え、前記オフセット調整手段は、オフセット値を変化させ、前記サンプリング調整手段は、前記A/D変換手段から出力されるデジタル画素データのサンプリング位置を、当該デジタル画素データの変化量に基づき調整する。   The present invention for solving the above-mentioned problems is an image processing apparatus, which converts A / D conversion means for converting input analog pixel data into digital pixel data and outputs the analog pixel data supplied from an image sensor. Offset adjusting means for adjusting a voltage range effective as a signal of the A / D converting means, sampling adjusting means for adjusting a sampling position of digital pixel data output from the A / D converting means, The offset adjustment means changes the offset value, and the sampling adjustment means adjusts the sampling position of the digital pixel data output from the A / D conversion means based on the change amount of the digital pixel data. .

本発明の実施形態に係る画像処理装置の概略構成図である。1 is a schematic configuration diagram of an image processing apparatus according to an embodiment of the present invention. クロック信号の入出力、デジタルデータの入出力についてのタイミングチャートである。6 is a timing chart for clock signal input / output and digital data input / output. A/D変換部が出力する1画素データの概略データ構造を示す図である。It is a figure which shows the schematic data structure of 1 pixel data which an A / D conversion part outputs. デジタルデータ処理部にデジタルデータが到達するタイミングと、デジタルデータの内容を示す図である。It is a figure which shows the timing when digital data arrives at a digital data processing part, and the content of digital data. 制御基板で行われるサンプリング位置の決定処理を説明するためのフローチャートである。It is a flowchart for demonstrating the determination process of the sampling position performed with a control board. ダミーデータの到達タイミングが遅延して、その到達タイミングと内部クロックの変化点が重ならない場合の例(例1)を示す図である。It is a figure which shows the example (example 1) when the arrival timing of dummy data delays and the arrival timing and the change point of an internal clock do not overlap. ダミーデータの到達タイミングが遅延することにより、その到達タイミングと内部クロックの変化点が重なってしまう場合の例(例2)を示す。An example (example 2) in which the arrival timing of the dummy data is delayed and the change timing of the internal clock overlaps with the arrival timing is shown. 記憶装置に保存されるダミーデータの概略データ構造を示す図である。It is a figure which shows the schematic data structure of the dummy data preserve | saved at a memory | storage device.

以下、本発明の実施形態の一例を図面を参照して説明する。   Hereinafter, an example of an embodiment of the present invention will be described with reference to the drawings.

図1は、本発明の実施形態が適用された画像処理装置50の概略構成図を示す。   FIG. 1 is a schematic configuration diagram of an image processing apparatus 50 to which an embodiment of the present invention is applied.

画像処理装置50は、例えば、スキャナー装置であり、図示するように、イメージセンサー100と、A/Dコンバーター200と、制御基板300と、を備えている。   The image processing device 50 is, for example, a scanner device, and includes an image sensor 100, an A / D converter 200, and a control board 300 as illustrated.

イメージセンサー100は、原稿などの読取信号(RGB各色の輝度値を示すアナログデータ)を、A/Dコンバーター200に出力する。具体的には、イメージセンサー100は、原稿などに反射した光を受光し、受光量に応じて蓄積された電荷を電圧として読み出し、A/Dコンバーター200に出力する。   The image sensor 100 outputs a reading signal of a document or the like (analog data indicating luminance values of RGB colors) to the A / D converter 200. Specifically, the image sensor 100 receives light reflected from a document or the like, reads out the electric charge accumulated according to the amount of received light as a voltage, and outputs the voltage to the A / D converter 200.

A/Dコンバーター200は、イメージセンサー100から出力されたアナログデータ(読取信号)を、デジタルデータに変換(量子化)し、ハーネス等の伝送路を介して、制御基板300に出力する。   The A / D converter 200 converts (quantizes) the analog data (read signal) output from the image sensor 100 into digital data, and outputs the digital data to the control board 300 via a transmission path such as a harness.

例えば、A/Dコンバーター200は、図示するように、オフセット部210と、増幅部220と、A/D変換部230と、オフセットレジスター240と、を備える。   For example, the A / D converter 200 includes an offset unit 210, an amplification unit 220, an A / D conversion unit 230, and an offset register 240 as illustrated.

オフセット部210と増幅部220は、イメージセンサー100から供給された読取信号の信号として有効な電圧範囲を、A/D変換部230の入力範囲と適合させるために設けられている。一般的に、オフセット部210は、有効な電圧範囲の最小値がA/D変換部230の入力範囲の最小値と合うように調整するために用いられる。また、増幅部230は、有効な電圧範囲の最大値がA/D変換部230の入力範囲の最大値と合うように調整するために用いられる。   The offset unit 210 and the amplification unit 220 are provided in order to match the voltage range effective as a signal of the read signal supplied from the image sensor 100 with the input range of the A / D conversion unit 230. In general, the offset unit 210 is used to adjust the minimum value of the effective voltage range so as to match the minimum value of the input range of the A / D conversion unit 230. The amplifying unit 230 is used to adjust the maximum value of the effective voltage range so as to match the maximum value of the input range of the A / D conversion unit 230.

具体的には、オフセット部210は、オペアンプなどで構成され、イメージセンサー100から供給された読取信号と、オフセットレジスター240に設定されているオフセット値(オフセット信号)と、の差分値を、増幅部220に出力する。   Specifically, the offset unit 210 is composed of an operational amplifier or the like, and amplifies the difference value between the read signal supplied from the image sensor 100 and the offset value (offset signal) set in the offset register 240. To 220.

そして、増幅部220は、オフセット部210から出力された読取信号(差分値)を増幅してA/D変換部230に出力する。例えば、増幅部220は、増幅回路などで構成される。   Then, the amplification unit 220 amplifies the read signal (difference value) output from the offset unit 210 and outputs the amplified signal to the A / D conversion unit 230. For example, the amplification unit 220 includes an amplification circuit.

A/D変換部230は、増幅部220から出力されたアナログ信号(増幅後の読取信号)をデジタルデータに変換する。ただし、A/D変換部230は、入力値(増幅部220から出力されたアナログ信号の値)が負となる場合には、「0」のデータを出力する。そして、A/D変換部230は、制御基板300のクロック出力部320から出力されるクロック信号(図示する「入力クロック」)に同期して、デジタルデータを制御基板300に出力する。   The A / D converter 230 converts the analog signal (amplified read signal) output from the amplifier 220 into digital data. However, when the input value (the value of the analog signal output from the amplification unit 220) is negative, the A / D conversion unit 230 outputs “0” data. Then, the A / D conversion unit 230 outputs digital data to the control board 300 in synchronization with a clock signal (“input clock” shown in the figure) output from the clock output unit 320 of the control board 300.

オフセットレジスター240は、制御基板300のオフセット設定部330からの設定を受け付け、オフセット値を記憶する。そして、オフセットレジスター240は、記憶しているオフセット値に相当する電圧(オフセット信号)を、オフセット部210に供給する。なお、初期値としては、オフセット調整量0となるような設定値、例えば「0」がオフセットレジスター240に記憶されている。   The offset register 240 receives the setting from the offset setting unit 330 of the control board 300 and stores the offset value. Then, the offset register 240 supplies a voltage (offset signal) corresponding to the stored offset value to the offset unit 210. Note that, as an initial value, a set value such that the offset adjustment amount is 0, for example, “0” is stored in the offset register 240.

また、本実施形態のオフセットレジスター240は、オフセット設定部330からの設定を受け付けて、記憶しているオフセット値を変更することができる。例えば、初期値より「1」小さい値、「2」小さい値、などに変更でき、これによりデジタルデータは値が減っていく。   Further, the offset register 240 of the present embodiment can accept the setting from the offset setting unit 330 and change the stored offset value. For example, the value can be changed to a value “1” smaller than the initial value, a value “2” smaller than the initial value, and the value of the digital data is decreased.

なお、以下では、オフセットレジスター240に設定するオフセット値を順次変更することで出力されるアナログ信号に基づき、A/D変換して生成されるデジタルデータを「ダミーデータ」とよぶ。これを用いて、サンプリングタイミングの調整を行う。   Hereinafter, digital data generated by A / D conversion based on an analog signal output by sequentially changing offset values set in the offset register 240 is referred to as “dummy data”. Using this, the sampling timing is adjusted.

制御基板300は、画像処理装置50の主要機能を搭載したチップ(SoC)で構成される。図示するように、制御基板300上には、デジタルデータ処理部310と、クロック出力部320と、オフセット設定部330と、が設けられている。   The control board 300 is configured by a chip (SoC) on which the main functions of the image processing apparatus 50 are mounted. As illustrated, a digital data processing unit 310, a clock output unit 320, and an offset setting unit 330 are provided on the control board 300.

クロック出力部320は、画像処理装置50における動作のタイミングをとるためのクロック信号を生成する。そして、クロック出力部320は、生成したクロック信号を、デジタルデータ処理部310と、A/D変換部230と、に供給する。以下では、デジタルデータ処理部310に出力するクロック信号を「内部クロック」とよび、A/D変換部230に出力するクロック信号を「出力クロック」とよぶ。なお、出力クロックは、ハーネス等の伝送路を介して、A/D変換部230に供給される。   The clock output unit 320 generates a clock signal for timing the operation in the image processing apparatus 50. Then, the clock output unit 320 supplies the generated clock signal to the digital data processing unit 310 and the A / D conversion unit 230. Hereinafter, a clock signal output to the digital data processing unit 310 is referred to as an “internal clock”, and a clock signal output to the A / D conversion unit 230 is referred to as an “output clock”. The output clock is supplied to the A / D converter 230 via a transmission line such as a harness.

デジタルデータ処理部310は、クロック出力部320から出力される内部クロックに同期して、A/Dコンバーター200から出力された画像データに対して各種補正処理を行う。例えば、デジタルデータ処理部310は、A/Dコンバーター200から出力された画像データに対し、シェーディング補正やガンマ補正を行う。   The digital data processing unit 310 performs various correction processes on the image data output from the A / D converter 200 in synchronization with the internal clock output from the clock output unit 320. For example, the digital data processing unit 310 performs shading correction and gamma correction on the image data output from the A / D converter 200.

ここで、デジタルデータ処理部310は、A/Dコンバーター200から出力されたデジタルデータ(画像データ)に対して、画素単位で各種補正処理を行う。そのため、デジタルデータ処理部310は、A/Dコンバーター200から連続的に出力されるデジタルデータから、1画素分の画素データを正確に特定しなければならない。しかし、画像データを構成する各画素データには、画素データの区切り位置(以下では、「境界位置とよぶ」)を識別するためのデータが含まれていないため、データ内容から画素データの境界位置を特定することはできない。   Here, the digital data processing unit 310 performs various correction processes on the digital data (image data) output from the A / D converter 200 in units of pixels. Therefore, the digital data processing unit 310 must accurately specify pixel data for one pixel from the digital data continuously output from the A / D converter 200. However, since each pixel data constituting the image data does not include data for identifying a delimiter position of the pixel data (hereinafter referred to as “boundary position”), the boundary position of the pixel data from the data content Cannot be specified.

そのため、デジタルデータ処理部310は、上述したダミーデータを用いて、画像データを構成する各画素データの境界位置を特定する。具体的には、デジタルデータ処理部310は、画像データを構成する各画素データの境界位置を特定する前に、ダミーデータの境界位置を特定しておく。そして、デジタルデータ処理部310は、特定したダミーデータの境界位置を基準(例えば、サンプリング開始位置)として、画像データを構成する各画素データの境界位置を特定する。なお、デジタルデータ処理部310が行う処理(サンプリング位置の決定処理)の詳細については後述する。   Therefore, the digital data processing unit 310 uses the above-described dummy data to identify the boundary position of each pixel data that constitutes the image data. Specifically, the digital data processing unit 310 specifies the boundary position of the dummy data before specifying the boundary position of each pixel data constituting the image data. Then, the digital data processing unit 310 specifies the boundary position of each pixel data constituting the image data using the specified boundary position of the dummy data as a reference (for example, a sampling start position). Details of the processing (sampling position determination processing) performed by the digital data processing unit 310 will be described later.

オフセット設定部330は、オフセットレジスター240のオフセット値を設定する。本実施形態では、オフセット設定部330は、A/Dコンバーター200でダミーデータを生成する場合、A/Dコンバーター200の出力が「0」でないようなオフセット値をオフセットレジスター240に設定する。そして、A/Dコンバーター200の出力が負の値(「0」以下)となるまで、オフセット値を段階的に(例えば、「1」ずつ)減らしていく。   The offset setting unit 330 sets the offset value of the offset register 240. In this embodiment, when the A / D converter 200 generates dummy data, the offset setting unit 330 sets an offset value in the offset register 240 such that the output of the A / D converter 200 is not “0”. Then, the offset value is decreased stepwise (for example, by “1”) until the output of the A / D converter 200 becomes a negative value (“0” or less).

本実施形態が適用された画像処理装置50は、以上のような構成からなる。ただし、画像処理装置50の構成はこれに限定されない。例えば、画像処理装置50は、複合機、コピー機、などとして機能するための他の構成を有していてもよい。   The image processing apparatus 50 to which this embodiment is applied has the above configuration. However, the configuration of the image processing apparatus 50 is not limited to this. For example, the image processing apparatus 50 may have another configuration for functioning as a multifunction peripheral, a copier, or the like.

そして、制御基板300上に設けられる各構成要素は、1つのASIC(Application Specific Integrated Circuit)で構成される。また、制御基板300上に設けられる主な構成要素は、主制御装置であるCPUと、プログラム等が記憶されたROMと、メインメモリーとしてデータ等を一時的に格納するRAMと、ホスト等との入出力を制御するインターフェイスと、各構成要素間の通信経路となるシステムバスと、を備えた一般的なコンピューターにより達成することもできる。   And each component provided on the control board 300 is comprised by one ASIC (Application Specific Integrated Circuit). The main components provided on the control board 300 include a CPU as a main control device, a ROM storing a program, a RAM that temporarily stores data as a main memory, a host, and the like. It can also be achieved by a general computer having an interface for controlling input / output and a system bus serving as a communication path between each component.

また、A/Dコンバーター200は、アナログフロントエンドIC(Integrated Circuit)で構成することができる。   The A / D converter 200 can be configured by an analog front end IC (Integrated Circuit).

なお、オフセット部210、オフセットレジスター240、オフセット設定部330などは、ダミーデータを生成する目的で設けられたものではなく、アナログ信号に対してダイナミックレンジを確保するためのオフセット調整を行うために、スキャナー装置などの画像処理装置50に一般的に設けられているものである。   Note that the offset unit 210, the offset register 240, the offset setting unit 330, and the like are not provided for the purpose of generating dummy data, and in order to perform offset adjustment for securing a dynamic range for an analog signal, It is generally provided in the image processing apparatus 50 such as a scanner apparatus.

また、上記の各構成要素は、画像処理装置50の構成を理解容易にするために、主な処理内容に応じて分類したものである。構成要素の分類の仕方や名称によって、本願発明が制限されることはない。画像処理装置50の構成は、処理内容に応じて、さらに多くの構成要素に分類することもできる。また、1つの構成要素がさらに多くの処理を実行するように分類することもできる。また、各構成要素の処理は、1つのハードウェアで実行されてもよいし、複数のハードウェアで実行されてもよい。   In addition, each of the above-described constituent elements is classified according to main processing contents in order to facilitate understanding of the configuration of the image processing apparatus 50. The present invention is not limited by the way of classification and names of the constituent elements. The configuration of the image processing device 50 can be classified into more components depending on the processing content. Moreover, it can also classify | categorize so that one component may perform more processes. Further, the processing of each component may be executed by one hardware or may be executed by a plurality of hardware.

次に、本実施形態のクロック出力部320がクロック信号(内部クロック、出力クロック)を出力するタイミングと、デジタルデータ処理部310にデジタルデータ(画像データ、ダミーデータ)が到達するタイミングについて、図2を用いて詳細に説明する。   Next, the timing at which the clock output unit 320 of the present embodiment outputs a clock signal (internal clock, output clock) and the timing at which digital data (image data, dummy data) arrives at the digital data processing unit 310 are shown in FIG. Will be described in detail.

図2は、クロック出力部320が出力するクロック信号のタイミングチャートである。クロック出力部320が出力する内部クロック及び出力クロックは、図示するような、一般的なクロック信号である。デジタルデータ処理部310は、クロック出力部320から供給される内部クロックの立ち上がり、立ち下がりに同期して、各種補正処理を行うことができる。   FIG. 2 is a timing chart of the clock signal output from the clock output unit 320. The internal clock and the output clock output from the clock output unit 320 are general clock signals as illustrated. The digital data processing unit 310 can perform various correction processes in synchronization with the rise and fall of the internal clock supplied from the clock output unit 320.

また、図2には、A/D変換部230に入力される入力クロック、A/D変換部230が出力するデジタルデータ、及び、デジタルデータ処理部310に到達するデジタルデータ、のタイミングチャートも示す。A/D変換部230は、クロック出力部320から出力されてA/D変換部230に入力される入力クロックの立ち上がり、立ち下がりに同期して、デジタルデータを出力する。図示する例では、A/D変換部230は、入力クロックの2周期で、1画素データ(例えば、16ビット)分のデジタルデータを出力している。これは、A/D変換部230からデジタルデータ処理部310にデジタルデータを伝送するための伝送路の幅(バス幅N)を4ビットとする場合の例である。   FIG. 2 also shows a timing chart of an input clock input to the A / D conversion unit 230, digital data output from the A / D conversion unit 230, and digital data reaching the digital data processing unit 310. . The A / D conversion unit 230 outputs digital data in synchronization with the rising and falling edges of the input clock output from the clock output unit 320 and input to the A / D conversion unit 230. In the illustrated example, the A / D converter 230 outputs digital data for one pixel data (for example, 16 bits) in two cycles of the input clock. This is an example in which the width of the transmission path (bus width N) for transmitting digital data from the A / D conversion unit 230 to the digital data processing unit 310 is 4 bits.

図3は、A/D変換部230が出力する1画素データの概略データ構造を例示する図である。図示するように、A/D変換部230は、4ビット(AD0、AD1、AD2、AD3)ずつ、デジタルデータを4回出力することによって、1画素データをデジタルデータ処理部310に供給する。   FIG. 3 is a diagram illustrating a schematic data structure of one pixel data output from the A / D conversion unit 230. As shown in the figure, the A / D conversion unit 230 supplies one pixel data to the digital data processing unit 310 by outputting the digital data four times (AD0, AD1, AD2, AD3) every four bits.

図2に戻り、クロック出力部320は、内部クロックと出力クロックを、同期させて出力する。   Returning to FIG. 2, the clock output unit 320 outputs the internal clock and the output clock in synchronization.

そして、出力クロックは、上述したように、ハーネス等の伝送路を介して、A/D変換部230に供給される。そのため、出力クロックがクロック出力部320から出力されるタイミングと、その出力クロックが入力クロックとしてA/D変換部230に到達するタイミングには、ずれ(時間差)が生じやすい。図示する例では、入力クロックの立ち上がりタイミングT2は、出力クロックの立ち上がりタイミングT1に対して遅延している(「T2−T1」時間)。   Then, as described above, the output clock is supplied to the A / D conversion unit 230 via a transmission line such as a harness. Therefore, a difference (time difference) is likely to occur between the timing at which the output clock is output from the clock output unit 320 and the timing at which the output clock reaches the A / D conversion unit 230 as the input clock. In the illustrated example, the rising timing T2 of the input clock is delayed with respect to the rising timing T1 of the output clock ("T2-T1" time).

また、A/D変換部230が出力するデジタルデータ(画像データ、ダミーデータ)についても、同様に、ハーネス等の伝送路を介して、デジタルデータ処理部310に供給される。そのため、A/D変換部230からデジタルデータが出力されるタイミングと、そのデジタルデータがデジタルデータ処理部310に到達するタイミングには、ずれ(時間差)が生じやすい。   Similarly, digital data (image data, dummy data) output from the A / D conversion unit 230 is also supplied to the digital data processing unit 310 via a transmission path such as a harness. Therefore, a difference (time difference) is likely to occur between the timing at which digital data is output from the A / D conversion unit 230 and the timing at which the digital data reaches the digital data processing unit 310.

図示する例1、例2では、デジタルデータ(画素データの先頭ビット)がデジタルデータ処理部310に到達するタイミングT3、T3’は、A/D変換部230からそのデジタルデータが出力されるタイミングT2に対して遅延している(「T3−T2」、「T3’−T2」時間)。ここで、例1は、デジタルデータの到達が遅延して、その到達タイミングT3と、内部クロックの変化点(立ち上がり、立ち下がり)と、が重ならない場合の例である。例2は、デジタルデータの到達が遅延することにより、その到達タイミングT3’と、内部クロックの変化点と、が重なってしまう場合の例である。   In examples 1 and 2 shown in the figure, timings T3 and T3 ′ at which digital data (first bit of pixel data) reaches the digital data processing unit 310 are timings T2 at which the digital data is output from the A / D conversion unit 230. ("T3-T2", "T3'-T2" time). Here, Example 1 is an example in which the arrival of digital data is delayed and the arrival timing T3 does not overlap the change point (rising edge, falling edge) of the internal clock. Example 2 is an example in which the arrival timing T3 'and the change point of the internal clock overlap due to the delay of arrival of the digital data.

以上より、内部クロックがデジタルデータ処理部310に到達するタイミングT1に対して、デジタルデータの到達タイミングT3、T3’が大きく遅延してしまう場合がある(「T3−T1」、「T3’−T1」時間)。   As described above, the arrival timings T3 and T3 ′ of the digital data may be greatly delayed from the timing T1 when the internal clock reaches the digital data processing unit 310 (“T3-T1”, “T3′-T1”). "time).

このようなずれが生じると、デジタルデータ処理部310においてT1のタイミングで受け付けたビットは、画素データの境界位置(例えば、先頭位置)のビットではなくなる。そのため、デジタルデータ処理部310は、画素データの境界位置を特定できなくなる。   When such a shift occurs, the bit received at the timing T1 in the digital data processing unit 310 is not a bit at the boundary position (for example, the head position) of the pixel data. Therefore, the digital data processing unit 310 cannot specify the boundary position of the pixel data.

なお、例1に示す例の場合には、デジタルデータ処理部310は、内部クロックに同期して画像データのサンプリングを正しく行うことができる。一方、例2に示す例の場合には、デジタルデータ処理部310は、内部クロックに同期して画像データのサンプリングを正しく行えないため、内部クロックと所定の調整量(例えば、1/4クロック)Dずらしたタイミングでサンプリングを行う。   In the example shown in Example 1, the digital data processing unit 310 can correctly sample image data in synchronization with the internal clock. On the other hand, in the case of the example shown in Example 2, since the digital data processing unit 310 cannot correctly sample image data in synchronization with the internal clock, the internal clock and a predetermined adjustment amount (for example, 1/4 clock) Sampling is performed at a timing shifted by D.

図4は、デジタルデータ処理部310にデジタルデータ(境界位置のビット)が到達するタイミングと、デジタルデータの内容(輝度値)を示す図である。   FIG. 4 is a diagram illustrating the timing at which digital data (bits at the boundary position) reaches the digital data processing unit 310 and the contents (luminance values) of the digital data.

図示するように、内部クロックに基づくタイミングT1で受け付けたビットを画素データの境界位置(先頭ビット)とし、所定ビット幅(16ビット)で区切って1画素データ分の画像データを認識しようとすると(点線の矢印で示す範囲)、画像データの伝送に遅延が生じた場合には、誤った範囲を1画素データ分として認識してしまう。   As shown in the drawing, when the bit received at timing T1 based on the internal clock is set as the boundary position (first bit) of the pixel data and divided by a predetermined bit width (16 bits), an attempt is made to recognize image data for one pixel data ( When a delay occurs in the transmission of image data, the erroneous range is recognized as one pixel data.

しかし、本実施形態では、A/D変換部230に対して、画像データの出力前に、所定値ずつ異なる複数のダミーデータを出力させる。そのため、デジタルデータ処理部310は、ダミーデータの変化量を識別することによって、1画素データ分のダミーデータを、正しく認識することができる。   However, in the present embodiment, the A / D converter 230 is caused to output a plurality of dummy data different by a predetermined value before outputting the image data. Therefore, the digital data processing unit 310 can correctly recognize the dummy data for one pixel data by identifying the variation amount of the dummy data.

1画素分のダミーデータを正しく認識できれば、デジタルデータ処理部310は、ダミーデータに続いて出力される画像データについても、1画素データ分を正しく認識することができる。これにより、デジタルデータ処理部310は、画像データ(境界位置のビット)が予定されていたタイミングとずれて(遅延して)到達する場合であっても、画像データに対して各種補正処理を画素単位で行うことができる。   If the dummy data for one pixel can be correctly recognized, the digital data processing unit 310 can correctly recognize the pixel data for the image data output following the dummy data. As a result, the digital data processing unit 310 performs various correction processes on the image data even if the image data (bits at the boundary position) arrives with a shift (delayed) from the scheduled timing. Can be done in units.

<サンプリング位置の決定処理>
次に、本実施形態の画像処理装置50の特徴的な動作について説明する。図5は、デジタルデータ処理部310が行う「サンプリング位置の決定処理」を説明するためのフローチャートである。
<Sampling position determination process>
Next, a characteristic operation of the image processing apparatus 50 according to the present embodiment will be described. FIG. 5 is a flowchart for explaining the “sampling position determination process” performed by the digital data processing unit 310.

デジタルデータ処理部310は、例えば、ユーザーからの指示を受け付けて、サンプリング位置の決定処理を開始する。   For example, the digital data processing unit 310 receives an instruction from the user and starts a sampling position determination process.

サンプリング位置の決定処理を開始してから、まず、デジタルデータ処理部310は、画像データ(ダミーデータを含む)のサンプリングタイミングについてデフォルトの設定を行う(ステップS101)。具体的には、デジタルデータ処理部310は、クロック出力部320から供給される内部クロックの変化点(立ち上がり、立ち下がり)に同期して、画像データのサンプリングを行うようにサンプリングタイミングを決定する。   After starting the sampling position determination process, the digital data processing unit 310 first sets a default for the sampling timing of image data (including dummy data) (step S101). Specifically, the digital data processing unit 310 determines the sampling timing so as to sample the image data in synchronization with the change point (rise, fall) of the internal clock supplied from the clock output unit 320.

次に、オフセット設定部330は、サンプリングタイミング調整のための初期オフセット値設定を行う(ステップS102)。具体的には、オフセット設定部330は、A/Dコンバーター200のオフセットレジスター240に、A/Dコンバーター200の出力デジタルデータが「0」にならないような設定値を設定する(ただし、本実施形態で、例えば、オフセットレジスター240に「0」を設定した場合に、光源オフ時の出力は4.2程度となるものとする)。   Next, the offset setting unit 330 sets an initial offset value for adjusting the sampling timing (step S102). Specifically, the offset setting unit 330 sets a setting value such that the output digital data of the A / D converter 200 does not become “0” in the offset register 240 of the A / D converter 200 (however, in this embodiment) For example, when “0” is set in the offset register 240, the output when the light source is off is about 4.2).

そして、オフセット部210は、イメージセンサー100から供給される読取信号と、オフセットレジスター240から出力されるオフセット信号と、の差分信号を、増幅部220に出力する。なお、本フローの処理中においては、イメージセンサー100からは光源オフ時の読取信号が供給される。すなわち、イメージセンサー100からはおよそ一定の輝度値(例えば「4.2」)を示す読取信号が連続して供給される。   Then, the offset unit 210 outputs a differential signal between the read signal supplied from the image sensor 100 and the offset signal output from the offset register 240 to the amplification unit 220. Note that during the processing of this flow, the image sensor 100 supplies a read signal when the light source is off. That is, a read signal indicating a substantially constant luminance value (for example, “4.2”) is continuously supplied from the image sensor 100.

増幅部220は、オフセット部210から出力される差分信号(読取信号)を所定の増幅率で増幅し、A/D変換部230に出力する。   The amplification unit 220 amplifies the difference signal (read signal) output from the offset unit 210 with a predetermined amplification factor, and outputs the amplified signal to the A / D conversion unit 230.

次に、A/D変換部230は、増幅部220から出力された読取信号を、デジタルデータに変換(量子化)してダミーデータを生成する。   Next, the A / D conversion unit 230 converts (quantizes) the read signal output from the amplification unit 220 into digital data to generate dummy data.

そして、A/D変換部230は、制御基板300上のクロック出力部320からのクロック信号(入力クロック)に同期して、生成したダミーデータをデジタルデータ処理部310に出力する。   Then, the A / D conversion unit 230 outputs the generated dummy data to the digital data processing unit 310 in synchronization with the clock signal (input clock) from the clock output unit 320 on the control board 300.

ここで、デジタルデータ処理部310は、ダミーデータの読み取りを行う(ステップS103)。具体的には、デジタルデータ処理部310は、A/D変換部230から出力されたダミーデータを、ステップS101又は後述するステップS109で決定したサンプリングタイミングに同期して所定ビットN(例えば4ビット)ずつ受け付け(取得し)、順次、バッファー等の記憶装置に保存する(1つのオフセット値につき少なくとも2画素分のダミーデータを保存する)。   Here, the digital data processing unit 310 reads dummy data (step S103). Specifically, the digital data processing unit 310 sets the dummy data output from the A / D conversion unit 230 to predetermined bits N (for example, 4 bits) in synchronization with the sampling timing determined in step S101 or step S109 described later. Accept (acquire) one by one and sequentially store it in a storage device such as a buffer (store dummy data for at least two pixels per offset value).

ただし、図2などに示したように、内部クロックの変化点T1に対して、ダミーデータの到達タイミングT3、T3’が遅延する場合がある。   However, as shown in FIG. 2 and the like, the arrival timings T3 and T3 'of the dummy data may be delayed with respect to the change point T1 of the internal clock.

図6は、ダミーデータの到達タイミングが遅延して、その到達タイミングと内部クロックの変化点が重ならない場合の例(例1)を示す。   FIG. 6 shows an example (example 1) in which the arrival timing of dummy data is delayed and the arrival timing does not overlap the change point of the internal clock.

図示するパターン1のように、T1に対して、先頭ビット(画素データ)の到達タイミングT3が、(2k+1/2)クロック以上、(2k+1)クロック未満で遅延する場合がある。この場合、タイミングT1でサンプリングしたビット(4ビット)を画素データの先頭ビットとして認識すると、本来の位置と(2N=8)ビットずれてしまう。ただし、kは整数であり、以下、同様とする。   As shown in Pattern 1 in the figure, the arrival timing T3 of the first bit (pixel data) may be delayed with respect to T1 by not less than (2k + 1/2) clocks and less than (2k + 1) clocks. In this case, if the bit (4 bits) sampled at the timing T1 is recognized as the first bit of the pixel data, the original position is shifted by (2N = 8) bits. However, k is an integer, and the same shall apply hereinafter.

また、図示するパターン2のように、T1に対して、先頭ビット(画素データ)の到達タイミングT4が、(2k+1)クロック以上、(2k+3/2)クロック未満で遅延する場合がある。この場合、タイミングT1でサンプリングしたビット(4ビット)を画素データの先頭ビットとして認識すると、本来の位置と(3N=12)ビットずれてしまう。   Further, as shown in pattern 2 in the figure, the arrival timing T4 of the first bit (pixel data) may be delayed with respect to T1 by (2k + 1) clocks or more and less than (2k + 3/2) clocks. In this case, if the bit (4 bits) sampled at the timing T1 is recognized as the first bit of the pixel data, the original position is shifted by (3N = 12) bits.

また、図示するパターン3のように、T1に対して、先頭ビット(画素データ)の到達タイミングT5が、(2k+3/2)クロック以上、(2k+2)クロック未満で遅延する場合がある。この場合、タイミングT1でサンプリングしたビット(4ビット)を画素データの先頭ビットとして認識すれば、本来の位置と一致する。   Further, as shown in pattern 3 in the figure, the arrival timing T5 of the first bit (pixel data) may be delayed with respect to T1 by (2k + 3/2) clocks or more and less than (2k + 2) clocks. In this case, if the bit (4 bits) sampled at the timing T1 is recognized as the first bit of the pixel data, it matches the original position.

また、図示するパターン4のように、T1に対して、先頭ビット(画素データ)の到達タイミングT6が、(2k)クロック以上、(2k+1/2)クロック未満で遅延する場合がある。この場合、タイミングT1でサンプリングしたビット(4ビット)を画素データの先頭ビットとして認識すると、本来の位置と(N=4)ビットずれてしまう。   Further, as shown in the pattern 4 in the figure, the arrival timing T6 of the first bit (pixel data) may be delayed with respect to T1 by not less than (2k) clocks and less than (2k + 1/2) clocks. In this case, if the bit (4 bits) sampled at timing T1 is recognized as the first bit of the pixel data, the original position is shifted by (N = 4) bits.

そして、図7は、ダミーデータの到達タイミングが遅延することにより、その到達タイミングと内部クロックの変化点が重なってしまう場合の例(例2)を示す。   FIG. 7 shows an example (example 2) in which the arrival timing of the dummy data is delayed and the arrival timing overlaps with the change point of the internal clock.

この場合には、上述したように、ジタルデータ処理部310は、内部クロックと所定の調整量(例えば、1/4クロック)DずらしたタイミングT1’でサンプリングを行う。   In this case, as described above, the digital data processing unit 310 performs sampling at the timing T1 'shifted from the internal clock by a predetermined adjustment amount (for example, 1/4 clock) D.

図示するパターン5のように、T1’に対して、先頭ビット(画素データ)の到達タイミングT5が、(2k+1/2)クロック以上、(2k+1)クロック未満で遅延する場合がある。この場合、タイミングT1’でサンプリングしたビット(4ビット)を画素データの先頭ビットとして認識すると、本来の位置と(2N=8)ビットずれてしまう。   As shown in the pattern 5 in the figure, the arrival timing T5 of the first bit (pixel data) may be delayed by more than (2k + 1/2) clocks and less than (2k + 1) clocks with respect to T1 '. In this case, if the bit (4 bits) sampled at the timing T1 'is recognized as the first bit of the pixel data, the original position is shifted by (2N = 8) bits.

また、図示するパターン6のように、T1’に対して、先頭ビット(画素データ)の到達タイミングT4が、(2k+1)クロック以上、(2k+3/2)クロック未満で遅延する場合がある。この場合、タイミングT1’でサンプリングしたビット(4ビット)を画素データの先頭ビットとして認識すると、本来の位置と(3N=12)ビットずれてしまう。   Further, as shown in the pattern 6 in the figure, the arrival timing T4 of the first bit (pixel data) may be delayed with respect to T1 'by (2k + 1) clocks or more and less than (2k + 3/2) clocks. In this case, if the bit (4 bits) sampled at the timing T1 'is recognized as the first bit of the pixel data, the original position is shifted by (3N = 12) bits.

また、図示するパターン7のように、T1’に対して、先頭ビット(画素データ)の到達タイミングT5が、(2k+3/2)クロック以上、(2k+2)クロック未満で遅延する場合がある。この場合、タイミングT1’でサンプリングしたビット(4ビット)を画素データの先頭ビットとして認識すれば、本来の位置と一致する。   In addition, as shown in the pattern 7 in the figure, the arrival timing T5 of the first bit (pixel data) may be delayed with respect to T1 'by (2k + 3/2) clocks or more and less than (2k + 2) clocks. In this case, if the bit (4 bits) sampled at the timing T1 'is recognized as the first bit of the pixel data, it matches the original position.

また、図示するパターン8のように、T1’に対して、先頭ビット(画素データ)の到達タイミングT6が、(2k)クロック以上、(2k+1/2)クロック未満で遅延する場合がある。この場合、タイミングT1’でサンプリングしたビット(4ビット)を画素データの先頭ビットとして認識すると、本来の位置と(N=4)ビットずれてしまう。   Further, as shown in the pattern 8 shown in the figure, the arrival timing T6 of the first bit (pixel data) may be delayed by more than (2k) clocks and less than (2k + 1/2) clocks with respect to T1 '. In this case, if the bit (4 bits) sampled at the timing T1 'is recognized as the first bit of the pixel data, the original position is shifted by (N = 4) bits.

図5に戻り、デジタルデータ処理部310は、ステップS103で読み取ったダミーデータについて、画素データの境界位置(境目)を探索可能か否か判定する(ステップS104)。具体的には、デジタルデータ処理部310は、ステップS103で記憶装置に最後に保存したダミーデータ(後述する図8の最終レコード)を読み出し、全ビットが「0」であるか否か判定する。デジタルデータ処理部310は、全ビットが「0」である場合には、画素データの境界位置を探索するために必要なダミーデータを全て読み取り済みであるので、画素データの境界位置を探索可能と判定する。一方、全ビットが「0」ではない場合には、画素データの境界位置を探索するために必要なダミーデータが不足しているため、画素データの境界位置を探索不可能と判定する。   Returning to FIG. 5, the digital data processing unit 310 determines whether or not it is possible to search for the boundary position (boundary) of the pixel data for the dummy data read in step S103 (step S104). Specifically, the digital data processing unit 310 reads dummy data (last record in FIG. 8 described later) stored last in the storage device in step S103, and determines whether or not all bits are “0”. When all the bits are “0”, the digital data processing unit 310 has already read all the dummy data necessary for searching for the boundary position of the pixel data, so that the boundary position of the pixel data can be searched. judge. On the other hand, when all the bits are not “0”, it is determined that the boundary position of the pixel data cannot be searched because the dummy data necessary for searching the boundary position of the pixel data is insufficient.

そして、デジタルデータ処理部310は、画素データの境界位置を探索可能と判定した場合には(ステップS104;Yes)、処理をステップS105に移行する。一方、画素データの境界位置を探索不可能と判定した場合には(ステップS104;No)、処理をステップS106に移行する。   If the digital data processing unit 310 determines that the boundary position of the pixel data can be searched (step S104; Yes), the process proceeds to step S105. On the other hand, when it is determined that the boundary position of the pixel data cannot be searched (step S104; No), the process proceeds to step S106.

ステップS106に処理が移行すると、オフセット設定部330は、オフセットレジスター240に設定されているオフセット値を変更する(ステップS106)。具体的には、オフセット設定部330は、A/Dコンバーター200のオフセットレジスター240に、オフセット値を変更する要求を通知する。そして、オフセットレジスター240は、当該要求が通知されると、その時点で格納(設定)されているオフセット値よりも所定値(例えば「1」)小さいオフセット値を記憶する。そして、オフセットレジスター240は、変更されたオフセット値に相当する電圧(オフセット信号)を、オフセット部210に出力する。   When the process proceeds to step S106, the offset setting unit 330 changes the offset value set in the offset register 240 (step S106). Specifically, the offset setting unit 330 notifies the offset register 240 of the A / D converter 200 of a request for changing the offset value. Then, when the request is notified, the offset register 240 stores an offset value that is smaller than the offset value stored (set) at that time by a predetermined value (for example, “1”). Then, the offset register 240 outputs a voltage (offset signal) corresponding to the changed offset value to the offset unit 210.

そうすると、デジタルデータ処理部310には、変更されたオフセット値でオフセット調整されたダミーデータが到達するようになる。   Then, dummy data that has been offset adjusted with the changed offset value reaches the digital data processing unit 310.

そして、デジタルデータ処理部310及びオフセット設定部330は、画素データの境界位置(境目)が探索可能になるまで、ステップS103、S104、S106の処理を繰り返す。   Then, the digital data processing unit 310 and the offset setting unit 330 repeat the processes of steps S103, S104, and S106 until the boundary position (boundary) of the pixel data can be searched.

図8は、ステップS103において記憶装置に保存されるダミーデータの概略データ個構造を示す図である。ただし、図8は、上述したパターン1の場合に保存されるダミーデータの例である。   FIG. 8 is a diagram showing a schematic data structure of dummy data stored in the storage device in step S103. However, FIG. 8 is an example of dummy data stored in the case of the pattern 1 described above.

図示するように、オフセット値ごとに、読み取ったダミーデータが記憶装置には保存される。そして、一つのレコードには、同一のオフセット値で連続して読み取った各画素データが保存される。同レコード内における各画素データの上位数ビットはおよそ一定の値となる。なぜなら、光源オフ時において、イメージセンサー100からオフセット部210に供給される読取信号は、およそ一定の値となっているからである。また、下位数ビットはノイズなどの影響によりランダムな値となる。例えば、オフセット値が「−2」の場合の例で説明すると、上位8ビット(整数部分)が「00000010」の一定値(図には16進数「0」「2」で示している)となり、下位8ビット(小数部分)がランダムな値(図には「####」で示している)となる。そして、ステップS106におけるオフセット値の変更に伴い、各レコードには、所定値(図示する例では「1」)ずつ変更されたオフセット値ごとの画素データが保存される。図示するように、各レコードの画素データの値は、オフセット値の変化量に応じて変化する。例えば、1番目の画素データの値について説明すると、オフセット値が「1」ずつ減らされると、画素データの値もおおよそ「1」ずつ減ることになる。   As shown in the drawing, the read dummy data is stored in the storage device for each offset value. Then, each pixel data read continuously with the same offset value is stored in one record. The high order bits of each pixel data in the record have a substantially constant value. This is because the read signal supplied from the image sensor 100 to the offset unit 210 is approximately constant when the light source is off. The lower-order bits are random values due to the influence of noise and the like. For example, in the case where the offset value is “−2”, the upper 8 bits (integer part) are constant values “00000010” (indicated by hexadecimal numbers “0” and “2” in the figure), The lower 8 bits (decimal part) are random values (indicated by “####” in the figure). In accordance with the change of the offset value in step S106, pixel data for each offset value changed by a predetermined value (“1” in the illustrated example) is stored in each record. As shown in the figure, the value of the pixel data of each record changes according to the amount of change in the offset value. For example, the value of the first pixel data will be described. When the offset value is decreased by “1”, the value of the pixel data is also decreased by approximately “1”.

図5に戻り、画素データの境界位置(境目)が探索可能となった後、処理がステップS105に移行すると、デジタルデータ処理部310は、画素データの境界位置を探索する(ステップS105)。   Returning to FIG. 5, after the boundary position (boundary) of the pixel data can be searched, when the process proceeds to step S105, the digital data processing unit 310 searches for the boundary position of the pixel data (step S105).

具体的には、デジタルデータ処理部310は、まず、記憶装置から、図8に示すようなダミーデータを読み出す。そして、最初に、タイミングT1(或いはT1’)でサンプリングしたビット(4ビット)を先頭ビットとし、ダミーデータを所定ビット幅(16ビット)で区切る。すなわち、図8に示す例(パターン1のようにダミーデータが遅延している場合)では、図示する矢印範囲(第1の区切り)のデータを画素データとして特定する。   Specifically, the digital data processing unit 310 first reads dummy data as shown in FIG. 8 from the storage device. First, the bit (4 bits) sampled at timing T1 (or T1 ') is used as the first bit, and the dummy data is divided by a predetermined bit width (16 bits). That is, in the example shown in FIG. 8 (when dummy data is delayed as in pattern 1), the data in the arrow range (first delimiter) shown is specified as pixel data.

次に、デジタルデータ処理部310は、特定した画素データについて、オフセット値の変化量と、画素データの変化量を比較する。   Next, the digital data processing unit 310 compares the amount of change in the offset value with the amount of change in the pixel data for the specified pixel data.

ここで、デジタルデータ処理部310は、オフセット値の変化量に応じて画素データが変化していれば、最初に特定した画素データ(第1の区切り)が、本来の画素データ(図示する「1番目の画素データ」)であると判定する。すなわち、デジタルデータ処理部310は、オフセット値の変化量と画素データの変化量が所定の関係性を満たす場合(例えば、ほぼ一致している場合や、ほぼ比例関係にある場合)に、画素データの境界位置を正しく特定できていると判定する。   Here, if the pixel data changes according to the amount of change in the offset value, the digital data processing unit 310 converts the first specified pixel data (first delimiter) into the original pixel data (“1” shown in the figure). It is determined that the pixel data is the "th pixel data"). That is, the digital data processing unit 310 performs pixel data when the amount of change in the offset value and the amount of change in the pixel data satisfy a predetermined relationship (for example, when they are substantially coincident or in a substantially proportional relationship). It is determined that the boundary position of is correctly identified.

一方、デジタルデータ処理部310は、オフセット値の変化量に応じて画素データが変化していなければ、最初に特定した画素データ(第1の区切り)は、本来の画素データ(図示する「1番目の画素データ」)ではないと判定する。図8に示す例で説明すると、オフセット値が「1」ずつ減るのに対し、最初に特定したデータ(第1の区切り)の値は、ランダムに変化する。従って、図8に示す例では、最初に特定したデータ(第1の区切り)は、本来の画素データではないと判定される。   On the other hand, if the pixel data does not change in accordance with the amount of change in the offset value, the digital data processing unit 310 uses the original pixel data (the “first” in the figure) as the first specified pixel data (first delimiter). It is determined that the pixel data is not “)”. In the example shown in FIG. 8, the offset value decreases by “1”, whereas the value of the first specified data (first delimiter) changes randomly. Therefore, in the example shown in FIG. 8, it is determined that the first specified data (first delimiter) is not the original pixel data.

最初に特定した画素データ(第1の区切り)が、本来の画素データ(画素単位)ではない場合には、デジタルデータ処理部310は、タイミングT1(或いはT1’)の次にサンプリングしたビット(4ビット)を先頭ビットとし、上記と同様にダミーデータを所定ビット幅(16ビット)で区切る。すなわち、図8に示す例では、図示する矢印範囲(第2の区切り)のデータを画素データとして特定する。   If the first specified pixel data (first division) is not the original pixel data (pixel unit), the digital data processing unit 310 samples the bit (4) sampled next to the timing T1 (or T1 ′). Bit) is the first bit, and dummy data is divided by a predetermined bit width (16 bits) in the same manner as described above. That is, in the example shown in FIG. 8, data in the illustrated arrow range (second segment) is specified as pixel data.

そして、上記と同様に、デジタルデータ処理部310は、特定した画素データについて、オフセット値の変化量と、画素データの変化量を比較する。   Similarly to the above, the digital data processing unit 310 compares the change amount of the offset value with the change amount of the pixel data for the specified pixel data.

デジタルデータ処理部310は、以上のような処理、すなわち、特定する画素データを所定ビット数N(例えば4ビット)単位でずらしていき、オフセット値の変化量と画素データの変化量を比較する処理を、両変化量が所定の関係性を満たす(例えば、ほぼ一致する)まで繰り返す。   The digital data processor 310 shifts the specified pixel data by a predetermined number of bits N (for example, 4 bits) and compares the change amount of the offset value with the change amount of the pixel data. Is repeated until both changes satisfy a predetermined relationship (for example, substantially coincide).

これにより、デジタルデータ処理部310は、ダミーデータの遅延量(パターン1からパターン4の場合)によらず、画素データの正しい境界位置を特定できる。図8に示す例では、図示する矢印範囲(第3の区切り)のデータを画素データとして特定したときに、オフセット値の変化量「1」に対して、画素データの変化量はほぼ「1」となるため、第3の区切りのデータが本来の画素データと特定できる。   Thereby, the digital data processing unit 310 can specify the correct boundary position of the pixel data regardless of the delay amount of the dummy data (in the case of pattern 1 to pattern 4). In the example illustrated in FIG. 8, when the data in the illustrated arrow range (third segment) is specified as pixel data, the change amount of the pixel data is substantially “1” with respect to the change amount “1” of the offset value. Therefore, the third segment data can be specified as the original pixel data.

なお、図8に示す例において、第2の区切りのデータを画素データとして特定した場合には、オフセット値の変化量「1」に対して、画素データの変化量はランダムとなる。また、第4の区切りのデータを画素データとして特定した場合には、オフセット値の変化量「1」に対して、画素データの変化量はほぼ「10」となる。   In the example shown in FIG. 8, when the second delimiter data is specified as the pixel data, the change amount of the pixel data is random with respect to the change amount “1” of the offset value. When the fourth segment data is specified as pixel data, the change amount of the pixel data is substantially “10” with respect to the change amount “1” of the offset value.

そして、デジタルデータ処理部310は、画素データの正しい境界位置を特定できた場合には(ステップS107;Yes)、本フローを終了する。一方、ステップS105において、特定する画素データをずらしても、画素データの正しい境界位置を特定できなかった場合には(ステップS107;No)、デジタルデータの到達タイミング(例えば、T3’)と、内部クロックの変化点と、が重なっている可能性があるため(図2に示す例2の遅延)、処理をステップS108に移行する。   When the digital data processing unit 310 can identify the correct boundary position of the pixel data (step S107; Yes), the digital data processing unit 310 ends this flow. On the other hand, if the correct boundary position of the pixel data cannot be specified even if the pixel data to be specified is shifted in step S105 (step S107; No), the arrival timing of the digital data (for example, T3 ′) Since there is a possibility that the change point of the clock overlaps (delay in example 2 shown in FIG. 2), the process proceeds to step S108.

ステップS108に処理が移行すると、デジタルデータ処理部310は、ステップS108に処理が移行した回数が、所定回数(例えば2回)に到達したか否か判定する(ステップS108)。所定回数に到達していると判定した場合には(ステップS108;Yes)、デジタルデータ処理部310は、エラーとみなし異常終了する。一方、所定回数に到達していないと判定した場合には(ステップS108;No)、処理をステップS109に移行する。   When the process proceeds to step S108, the digital data processing unit 310 determines whether or not the number of times the process has shifted to step S108 has reached a predetermined number (for example, twice) (step S108). If it is determined that the predetermined number of times has been reached (step S108; Yes), the digital data processing unit 310 regards it as an error and terminates abnormally. On the other hand, if it is determined that the predetermined number of times has not been reached (step S108; No), the process proceeds to step S109.

処理がステップS109に移行すると、デジタルデータ処理部310は、サンプリングタイミングを変更する(ステップS109)。具体的には、デジタルデータ処理部310は、内部クロックと所定の調整量(例えば、1/4クロック)D遅れたタイミングでサンプリングを行うように、サンプリングタイミングを変更する。   When the process proceeds to step S109, the digital data processing unit 310 changes the sampling timing (step S109). Specifically, the digital data processing unit 310 changes the sampling timing so that sampling is performed at a timing delayed by a predetermined adjustment amount (for example, ¼ clock) D from the internal clock.

サンプリングタイミングを変更後、デジタルデータ処理部310は、処理をステップS102に戻し、上述したステップS102からS107までの処理を行う。これにより、デジタルデータ処理部310は、デジタルデータの到達タイミングと、内部クロックの変化点と、が重なっている場合でも、ダミーデータの遅延量(パターン5からパターン8の場合)によらず、画素データの境界位置を正しく特定できる。   After changing the sampling timing, the digital data processing unit 310 returns the process to step S102, and performs the processes from step S102 to S107 described above. As a result, the digital data processing unit 310 can detect the pixel regardless of the delay amount of the dummy data (in the case of the pattern 5 to the pattern 8) even when the arrival timing of the digital data and the change point of the internal clock overlap. Data boundary position can be specified correctly.

そして、デジタルデータ処理部310は、上記フローで特定(決定)したダミーデータの境界位置(例えば、パターン1の場合では、サンプリング開始位置T3)を基準にサンプリングを続けることにより、ダミーデータの後に続いて到達する画像データについても、画素単位で正しくサンプリングできるようになる。   The digital data processing unit 310 continues sampling after the dummy data by continuing sampling based on the boundary position (for example, sampling start position T3 in the case of pattern 1) of the dummy data specified (determined) in the above flow. Therefore, it is possible to correctly sample image data that arrives in pixel units.

なお、本発明は、上記実施形態に限定されず、種々の変形、応用が可能である。   In addition, this invention is not limited to the said embodiment, A various deformation | transformation and application are possible.

例えば、上記実施形態では、A/D変換部230からデジタルデータ処理部310にダミーデータを伝送するバス幅Nを4ビットとして説明している。しかし、本発明は、これに限定されない。   For example, in the embodiment described above, the bus width N for transmitting dummy data from the A / D conversion unit 230 to the digital data processing unit 310 is described as 4 bits. However, the present invention is not limited to this.

例えば、バス幅Nを1ビットとする場合、A/D変換部230は、1ビットずつ、デジタルデータを16回出力することによって、1画素データをデジタルデータ処理部310に供給する。   For example, when the bus width N is 1 bit, the A / D conversion unit 230 supplies 1-pixel data to the digital data processing unit 310 by outputting the digital data 16 times bit by bit.

この場合、デジタルデータ処理部310は、上記のステップS103において、ダミーデータの読み取りを1ビット単位で行う。そして、上記のステップS105では、特定する画素データを1ビット単位でずらしていき、オフセット値の変化量と画素データの変化量を比較する処理を、両変化量が所定の関係性を満たす(例えば、ほぼ一致する)まで繰り返す。これにより、デジタルデータ処理部310は、バス幅Nによらず、画素データの境界位置を特定できる。   In this case, the digital data processing unit 310 reads dummy data in 1-bit units in the above-described step S103. Then, in the above step S105, the process of comparing the pixel value to be specified in increments of 1 bit and comparing the amount of change of the offset value with the amount of change of the pixel data satisfies both the predetermined amounts of change (for example, , Almost match). Thereby, the digital data processing unit 310 can specify the boundary position of the pixel data regardless of the bus width N.

50・・・画像処理装置、100・・・イメージセンサー、200・・・A/Dコンバーター、210・・・オフセット部、220・・・増幅部、230・・・A/D変換部、240・・・オフセットレジスター、300・・・制御基板、310・・・デジタルデータ処理部、320・・・クロック出力部、330・・・オフセット設定部。   DESCRIPTION OF SYMBOLS 50 ... Image processing apparatus, 100 ... Image sensor, 200 ... A / D converter, 210 ... Offset part, 220 ... Amplification part, 230 ... A / D conversion part, 240. .. Offset register, 300... Control board, 310... Digital data processing unit, 320... Clock output unit, 330.

Claims (5)

画像処理装置であって、
入力されたアナログ画素データをデジタル画素データに変換して出力するA/D変換手段と、
イメージセンサーから供給されるアナログ画素データの信号として有効な電圧範囲を、前記A/D変換手段の入力範囲と適合させるオフセット調整手段と、
前記A/D変換手段から出力されるデジタル画素データのサンプリング位置を調整するサンプリング調整手段と、を備え、
前記オフセット調整手段は、
オフセット値を変化させ、
前記サンプリング調整手段は、
前記A/D変換手段から出力されるデジタル画素データのサンプリング位置を、当該デジタル画素データの変化量に基づき調整する、
ことを特徴とする画像処理装置。
An image processing apparatus,
A / D conversion means for converting input analog pixel data into digital pixel data and outputting the digital pixel data;
Offset adjusting means for matching a voltage range effective as a signal of analog pixel data supplied from an image sensor with an input range of the A / D conversion means;
Sampling adjustment means for adjusting the sampling position of the digital pixel data output from the A / D conversion means,
The offset adjusting means includes
Change the offset value,
The sampling adjustment means includes
Adjusting the sampling position of the digital pixel data output from the A / D conversion means based on the amount of change of the digital pixel data;
An image processing apparatus.
請求項1に記載の画像処理装置であって、
前記サンプリング調整手段は、
前記オフセット値の変化量と、前記デジタル画素データの変化量と、の関係性に基づいて、前記サンプリング位置を調整する、
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 1,
The sampling adjustment means includes
Adjusting the sampling position based on the relationship between the change amount of the offset value and the change amount of the digital pixel data;
An image processing apparatus.
請求項1又は2に記載の画像処理装置であって、
前記サンプリング調整手段は、
前記A/D変換手段から出力されるデジタル画素データについて所定ビット幅で区切り、
前記オフセット値の変化量と、前記デジタル画素データの変化量と、に所定の関係性がある場合に、前記所定ビット幅のデータの区切り位置を、前記デジタル画素データのサンプリング基準となるサンプリング位置として特定する、
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 1, wherein:
The sampling adjustment means includes
The digital pixel data output from the A / D conversion means is delimited by a predetermined bit width,
When there is a predetermined relationship between the amount of change in the offset value and the amount of change in the digital pixel data, the delimiter position of the data having the predetermined bit width is used as a sampling position serving as a sampling reference for the digital pixel data. Identify,
An image processing apparatus.
アナログ画素データをデジタル画素データに変換するA/D変換装置から出力される当該デジタル画素データのサンプリング位置を調整するサンプリング位置調整方法であって、
オフセット値を調整して、前記A/D変換装置から出力されるデジタル画素データを変化させる第1のステップと、
前記A/D変換装置から出力されるデジタル画素データのサンプリング位置を、当該デジタル画素データの変化量に基づき調整する第2のステップと、を行う、
ことを特徴とするサンプリング位置調整方法。
A sampling position adjusting method for adjusting a sampling position of the digital pixel data output from an A / D converter that converts analog pixel data into digital pixel data,
A first step of adjusting the offset value to change the digital pixel data output from the A / D converter;
Performing a second step of adjusting a sampling position of the digital pixel data output from the A / D conversion device based on a change amount of the digital pixel data;
A sampling position adjustment method characterized by the above.
A/D変換装置であって、
入力されたアナログ画素データをデジタル画素データに変換して出力するA/D変換手段と、
イメージセンサーから供給されるアナログ画素データの信号として有効な電圧範囲を、前記A/D変換手段の入力範囲と適合させるオフセット調整手段と、を備え、
前記オフセット調整手段は、
前記デジタル画素データのサンプリング位置を決定する処理において、オフセット値を調整して、前記A/D変換手段から出力されるデジタル画素データを変化させる、
ことを特徴とするA/D変換装置。
An A / D converter,
A / D conversion means for converting input analog pixel data into digital pixel data and outputting the digital pixel data;
Offset adjusting means for matching a voltage range effective as a signal of analog pixel data supplied from an image sensor with an input range of the A / D conversion means,
The offset adjusting means includes
In the process of determining the sampling position of the digital pixel data, the offset value is adjusted to change the digital pixel data output from the A / D conversion means.
An A / D converter characterized by the above.
JP2009089804A 2009-04-02 2009-04-02 Image processor, method of adjusting sampling position, and a/d converter Withdrawn JP2010245664A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009089804A JP2010245664A (en) 2009-04-02 2009-04-02 Image processor, method of adjusting sampling position, and a/d converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009089804A JP2010245664A (en) 2009-04-02 2009-04-02 Image processor, method of adjusting sampling position, and a/d converter

Publications (1)

Publication Number Publication Date
JP2010245664A true JP2010245664A (en) 2010-10-28

Family

ID=43098230

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009089804A Withdrawn JP2010245664A (en) 2009-04-02 2009-04-02 Image processor, method of adjusting sampling position, and a/d converter

Country Status (1)

Country Link
JP (1) JP2010245664A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020079539A1 (en) * 2018-10-18 2020-04-23 株式会社半導体エネルギー研究所 Semiconductor device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020079539A1 (en) * 2018-10-18 2020-04-23 株式会社半導体エネルギー研究所 Semiconductor device
JPWO2020079539A1 (en) * 2018-10-18 2021-12-09 株式会社半導体エネルギー研究所 Semiconductor device
US11476862B2 (en) 2018-10-18 2022-10-18 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device including signal holding circuit
JP7273054B2 (en) 2018-10-18 2023-05-12 株式会社半導体エネルギー研究所 semiconductor equipment

Similar Documents

Publication Publication Date Title
JP4816781B2 (en) Spread spectrum clock frequency level detection method and spread spectrum clock frequency level detection apparatus
KR970049856A (en) Sensor distance correction method and circuit in an image reading device having a plurality of licensors
US20120069227A1 (en) Image reading device for reading image data
US20110228105A1 (en) Data transfer device and electronic camera
US8593699B2 (en) Image sensor module and image sensor
US10200559B2 (en) Image scanning apparatus with two-sided scanning, control method therefor, and multifunction apparatus
JP4650548B2 (en) Image reading device
JP2010245664A (en) Image processor, method of adjusting sampling position, and a/d converter
JP5909909B2 (en) Image reading apparatus, image forming apparatus, image reading method, and image reading program
JP2007048264A (en) Data processor having a synchronizing function of multiple chips
JP4357575B2 (en) Head separation type camera
WO2009087960A1 (en) Data transfer device and camera
JPWO2019069932A1 (en) Reading device and identification device
US20080018742A1 (en) Analog front-end device and imaging apparatus
WO2010079749A1 (en) Data transfer device and camera
JP5423071B2 (en) Data transfer device and imaging device
JP6888405B2 (en) Image processing equipment and programs
JP6876916B2 (en) Image processing equipment and programs
JP2022134411A (en) Semiconductor integrated circuit, image reading device, image forming apparatus, and camera system
JP2005176187A (en) Scanning device control signal generating circuit
CN111436214B (en) Image signal processing apparatus and method
JPH10233900A (en) Image reader
US20080158399A1 (en) Image sensor module, signal generation device and signal generation method
JP6885190B2 (en) Image processing equipment and programs
JP2002084403A (en) Image reader

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20120605