JP4705894B2 - Image processing apparatus and program - Google Patents

Image processing apparatus and program Download PDF

Info

Publication number
JP4705894B2
JP4705894B2 JP2006234253A JP2006234253A JP4705894B2 JP 4705894 B2 JP4705894 B2 JP 4705894B2 JP 2006234253 A JP2006234253 A JP 2006234253A JP 2006234253 A JP2006234253 A JP 2006234253A JP 4705894 B2 JP4705894 B2 JP 4705894B2
Authority
JP
Japan
Prior art keywords
color
correction coefficient
image
mark
calculating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006234253A
Other languages
Japanese (ja)
Other versions
JP2008060829A (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.)
Hitachi Omron Terminal Solutions Corp
Original Assignee
Hitachi Omron Terminal Solutions 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 Hitachi Omron Terminal Solutions Corp filed Critical Hitachi Omron Terminal Solutions Corp
Priority to JP2006234253A priority Critical patent/JP4705894B2/en
Publication of JP2008060829A publication Critical patent/JP2008060829A/en
Application granted granted Critical
Publication of JP4705894B2 publication Critical patent/JP4705894B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Color Image Communication Systems (AREA)
  • Studio Devices (AREA)

Description

本発明は、原稿台に置かれた撮像対象物を撮像する撮像機器から得られる画像データを処理する技術に関する。   The present invention relates to a technique for processing image data obtained from an imaging device that captures an imaging target placed on a document table.

近年、ドキュメントをカメラ等の撮像機器で撮影して読取る読取り装置が製品化されている。   In recent years, readers that capture and read documents with an imaging device such as a camera have been commercialized.

そして、カメラ等の撮像機器でドキュメントの画像を読み取る際には、焦点距離を長くとることができずに、広角のレンズが主に使用されている。広角レンズを介してイメージセンサに結像させる際には、色の波長によって屈折率が異なるため、色により結像倍率が異なる倍率色収差が問題となる。   When reading an image of a document with an imaging device such as a camera, a wide-angle lens is mainly used because the focal length cannot be increased. When forming an image on an image sensor through a wide-angle lens, the refractive index varies depending on the wavelength of the color.

この倍率色収差を補正するため、特許文献1では、撮像機器のレンズの色収差特性と、画像データの中心からの座標位置と、を用いて色収差を補正する技術が記載されている。   In order to correct this lateral chromatic aberration, Patent Document 1 describes a technique for correcting chromatic aberration using the chromatic aberration characteristics of a lens of an imaging device and the coordinate position from the center of image data.

特開平11−225270号公報Japanese Patent Laid-Open No. 11-225270

特許文献1に記載の技術では、画像データの中心から等距離にある座標位置では、等しい補正値を用いて色収差の補正を行っているため、ドキュメントの撮像面とカメラの光軸とが垂直になっていない場合には、焦点位置も画像位置により一律ではなくなり、補正値も変わってくるため、精度の高い補正をすることはできない。   In the technique disclosed in Patent Document 1, chromatic aberration is corrected using equal correction values at coordinate positions that are equidistant from the center of image data, so that the imaging surface of the document and the optical axis of the camera are perpendicular to each other. If it is not, the focal position is not uniform depending on the image position, and the correction value changes. Therefore, it is not possible to perform highly accurate correction.

そこで、本発明は、ドキュメントの撮像面とカメラの光軸とが垂直になっていない場合にも色収差の補正を高精度に行うことができる技術を提供することを目的とする。   Therefore, an object of the present invention is to provide a technique capable of correcting chromatic aberration with high accuracy even when the imaging surface of a document and the optical axis of a camera are not perpendicular.

以上の課題を解決するため、本発明では、原稿台に置かれた撮像対象物を撮像する撮像機器から得られる画像データに含まれるマークを、R(赤)、G(緑)、B(青)毎に検出して、検出したマークにおけるR、G、B相互間のズレを補正するための補正係数を算出することを特徴とする。   In order to solve the above problems, in the present invention, marks included in image data obtained from an imaging device that captures an imaging object placed on a document table are R (red), G (green), and B (blue). ), And a correction coefficient for correcting a shift between R, G, and B in the detected mark is calculated.

例えば、本発明は、原稿台に置かれた撮像対象物を撮像する撮像機器から得られる画像データを処理する画像処理装置であって、前記撮像機器の各々の基準色における結像倍率を焦点距離に対応させた色収差情報を記憶するレンズデータ記憶部と、前記画像データに含まれているマークの画像を、複数の基準色毎に検出するマーク検出部と、前記マークの撮像距離を算出する距離推定部と、前記マーク検出部で検出された複数の基準色毎のマークの画像が、重なり合うように基準色毎の画素位置を変更する補正係数を生成する補正係数生成部と、前記補正係数により撮像機器で撮像される画像データを補正する補正部と、を備え、前記補正係数生成部は、前記撮像距離から焦点距離を算出する処理と、前記色収差情報から各々の基準色毎の結像倍率を算出し、当該基準色毎の結像倍率から前記マークにおける色ズレ量を推定色ズレ量として算出する処理と、前記撮像機器から得られる画像データにおける基準色毎の実測色ズレ量を算出する処理と、前記推定色ズレ量と、前記実測色ズレ量と、の差分が予め定められた閾値以下になるように前記撮像距離を変更する処理と、前記変更された前記撮像距離における変更色ズレ量を前記色収差情報から算出し、当該変更色ズレ量を補正する補正係数を前記基準色毎に生成する処理と、を行うこと、を特徴とする。
また、原稿台に置かれた撮像対象物を撮像する撮像機器から得られる画像データを処理する画像処理装置であって、前記撮像機器の各々の基準色における結像倍率を焦点距離に対応させた色収差情報を記憶するレンズデータ記憶部と、前記画像データに含まれているマークの画像を、複数の基準色毎に検出するマーク検出部と、前記マーク検出部で検出された複数の基準色毎のマークの画像が、重なり合うように基準色毎の画素位置を変更する補正係数を生成する補正係数生成部と、前記補正係数により撮像機器で撮像される画像データを補正する補正部と、を備え、前記補正係数生成部は、前記色収差情報から各々の基準色毎の結像倍率を算出し、当該基準色毎の結像倍率から前記マークの基準位置における色ズレ量を推定色ズレ量として算出する処理と、前記撮像機器から得られる画像データにおける基準色毎の実測色ズレ量を算出する処理と、前記推定色ズレ量と、前記実測色ズレ量と、の差分が予め定められた閾値以下になるように前記基準位置を変更する処理と、前記変更された前記基準位置における変更色ズレ量を前記色収差情報から算出し、当該変更色ズレ量を補正する補正係数を前記基準色毎に生成する処理と、を行うこと、を特徴とする。
For example, the present invention is an image processing apparatus that processes image data obtained from an imaging device that captures an imaging object placed on a platen, and the imaging magnification in each reference color of the imaging device is expressed as a focal length. A lens data storage unit that stores chromatic aberration information corresponding to the image data, a mark detection unit that detects an image of a mark included in the image data for each of a plurality of reference colors, and a distance for calculating an imaging distance of the mark An estimation unit, a correction coefficient generation unit that generates a correction coefficient for changing a pixel position for each reference color so that images of marks for each of the plurality of reference colors detected by the mark detection unit overlap, and the correction coefficient and a correcting unit for correcting the image data by the imaging device, wherein the correction coefficient generation unit includes a process of calculating a focal length from the imaging distance, forming for each respective reference color from the chromatic information Calculating the magnification, calculating the color shift amount at the mark as the estimated color shift amount from the imaging magnification for each reference color, and calculating the actual color shift amount for each reference color in the image data obtained from the imaging device Processing to change the imaging distance so that a difference between the estimated color misregistration amount and the actually measured color misregistration amount is equal to or less than a predetermined threshold, and the changed color at the changed imaging distance And a process of calculating a shift amount from the chromatic aberration information and generating a correction coefficient for correcting the changed color shift amount for each reference color .
An image processing apparatus that processes image data obtained from an imaging device that captures an imaging object placed on a document table, wherein an imaging magnification in each reference color of the imaging device corresponds to a focal length A lens data storage unit for storing chromatic aberration information, a mark detection unit for detecting an image of a mark included in the image data for each of a plurality of reference colors, and a plurality of reference colors detected by the mark detection unit A correction coefficient generation unit that generates a correction coefficient that changes the pixel position for each reference color so that the mark images overlap, and a correction unit that corrects image data captured by an imaging device using the correction coefficient. The correction coefficient generation unit calculates an image forming magnification for each reference color from the chromatic aberration information, and uses a color shift amount at the reference position of the mark as an estimated color shift amount from the image forming magnification for each reference color. A threshold value in which a difference between the processing to be performed, the processing for calculating the actual color misregistration amount for each reference color in the image data obtained from the imaging device, the estimated color misregistration amount, and the actual color misregistration amount is determined in advance. The process of changing the reference position so as to be as follows, the change color shift amount at the changed reference position is calculated from the chromatic aberration information, and a correction coefficient for correcting the change color shift amount is calculated for each reference color And a process of generating.

以上のように、本発明によれば、R、G、B相互間のズレをマークを用いて補正するようにしているため、撮像面と撮像装置の光軸とが垂直になっていない場合でも、色収差の補正を行うことができる。   As described above, according to the present invention, misalignment between R, G, and B is corrected using marks, so even when the imaging surface and the optical axis of the imaging device are not perpendicular to each other. Correction of chromatic aberration can be performed.

図1は、本発明の第一の実施形態である読取システム100の概略図である。   FIG. 1 is a schematic diagram of a reading system 100 according to the first embodiment of the present invention.

図示するように、読取システム100は、撮像装置110と、画像処理装置120と、を備えている。   As illustrated, the reading system 100 includes an imaging device 110 and an image processing device 120.

撮像装置110は、カメラ111と、支柱112と、原稿台113と、マーク114と、を備えている。   The imaging device 110 includes a camera 111, a support column 112, a document table 113, and a mark 114.

本実施形態におけるカメラ111は、単板式のCCDカラーセンサ(エリアセンサ)を使用したものを用いており、そのレンズが原稿台113の方向に向くように設置されており、原稿台113の上に置かれた原稿140の画像を撮像することができるようにされている。   The camera 111 according to the present embodiment uses a single-plate CCD color sensor (area sensor), and is installed so that its lens faces the document table 113. An image of the placed original 140 can be taken.

支柱112は、カメラ111を原稿台113の上方の所定の位置に固定する。   The column 112 fixes the camera 111 at a predetermined position above the document table 113.

原稿台113は、撮像対象物(ここでは、原稿140)を載せることができるようにされている。   The document table 113 is configured to be able to place an imaging object (here, the document 140).

マーク114は、原稿台113に四つ配置されている。そして、マーク114は、矩形状の頂点位置が含まれるように配置されている。即ち、マーク114を直線で結ぶことにより、矩形状の図形を描くことができるようにされている。   Four marks 114 are arranged on the document table 113. And the mark 114 is arrange | positioned so that the rectangular vertex position may be included. That is, by connecting the marks 114 with straight lines, a rectangular figure can be drawn.

本実施形態においては、マーク114を円形に形成しているが、このような態様に限定されるわけではなく、矩形状の四つの頂点を特定することができる範囲で適宜変更可能である。   In the present embodiment, the mark 114 is formed in a circular shape, but is not limited to such a mode, and can be appropriately changed within a range in which four rectangular vertices can be specified.

また、本実施形態においては、原稿台113におかれる原稿140により、マーク114が覆われてしまわないように、マーク114は、原稿台113の四隅に配置されている。   In this embodiment, the marks 114 are arranged at the four corners of the document table 113 so that the mark 114 is not covered by the document 140 placed on the document table 113.

なお、本実施形態においては、マーク114を四つ配置しているが、このような態様に限定されず、原稿台113の表面における縦方向と横方向の二つの軸を特定することができるように、三つ以上の任意の数を選択可能である。   In the present embodiment, four marks 114 are arranged. However, the present invention is not limited to such a mode, and two axes in the vertical direction and the horizontal direction on the surface of the document table 113 can be specified. In addition, any number of three or more can be selected.

画像処理装置120は、IF部121と、マーク座標検出部122と、補正係数生成部123と、補正部124と、を備えている。   The image processing apparatus 120 includes an IF unit 121, a mark coordinate detection unit 122, a correction coefficient generation unit 123, and a correction unit 124.

IF部121は、撮像装置110のカメラ111で撮像された画像データを画像処理装置120に入力するためのインターフェースである。   The IF unit 121 is an interface for inputting image data captured by the camera 111 of the imaging apparatus 110 to the image processing apparatus 120.

マーク座標検出部122は、カメラ111で撮像された画像データから、四つのマーク114の位置情報をR(Red)画像、G(Green)画像及びB(Blue)画像の各々について検出する。   The mark coordinate detection unit 122 detects position information of the four marks 114 from the image data captured by the camera 111 for each of an R (Red) image, a G (Green) image, and a B (Blue) image.

本実施形態におけるマーク座標検出部122は、図2(マーク座標検出部122の概略図)に示されているように、R座標検出部122aと、G座標検出部122bと、B座標検出部122cと、R座標記憶部122dと、G座標記憶部122eと、B座標記憶部122fと、を備えている。   As shown in FIG. 2 (schematic diagram of the mark coordinate detection unit 122), the mark coordinate detection unit 122 in this embodiment includes an R coordinate detection unit 122a, a G coordinate detection unit 122b, and a B coordinate detection unit 122c. An R coordinate storage unit 122d, a G coordinate storage unit 122e, and a B coordinate storage unit 122f.

そして、IF部121より入力された画像データは、例えば、本実施形態のように、単板式のCCDカラーセンサで画像データを取得した場合には、ベイヤ配列でR、G、Bそれぞれのカラーフィルタが付けられている各々の撮像素子毎に分けたR画像、G画像、B画像を、それぞれR座標検出部122a、G座標検出部122b又はB座標検出部122cに入力して、それぞれの色の画像毎に、マーク114の座標が検出される。   The image data input from the IF unit 121 is, for example, in the case where the image data is acquired by a single-plate CCD color sensor as in the present embodiment, and each of the R, G, and B color filters in a Bayer array. The R image, G image, and B image divided for each image sensor attached with are input to the R coordinate detection unit 122a, the G coordinate detection unit 122b, or the B coordinate detection unit 122c, respectively. The coordinates of the mark 114 are detected for each image.

例えば、マーク座標検出部122は、図3(座標検出部122a〜122cの概略図)に示されているように、パターンマッチング部122gと、マークパターン記憶部122hと、を備えている。   For example, the mark coordinate detection unit 122 includes a pattern matching unit 122g and a mark pattern storage unit 122h as illustrated in FIG. 3 (schematic diagram of the coordinate detection units 122a to 122c).

そして、マークパターン記憶部122hに予め検出すべきマークパターンのテンプレート画像データを記憶しておき、パターンマッチング部122gでは、IF部121より入力される画像データとテンプレート画像データとをパターンマッチングすることで、マーク144の座標を各R画像、G画像、B画像において検出する。   Then, the template image data of the mark pattern to be detected is stored in advance in the mark pattern storage unit 122h, and the pattern matching unit 122g performs pattern matching between the image data input from the IF unit 121 and the template image data. The coordinates of the mark 144 are detected in each R image, G image, and B image.

パターンマッチングの方法は、既知のものを使用すればよいが、例えば、本実施形態においては、正規化相関を用いたパターンマッチングを行っている。   A known pattern matching method may be used. For example, in the present embodiment, pattern matching using normalized correlation is performed.

例えば、マークパターン記憶部122hに記憶されているテンプレート画像データの座標(x、y)の画素値をt(x、y)、テンプレート画像の平均値をTmとし、原稿から読み取られた画像データからテンプレートと同じサイズの画像データを切り出して、その切り出した画像の座標(x、y)の画素値をf(x、y)、テンプレート画像の平均値をFmとすると、下記の式(1)で正規化相関係数が求まる。   For example, assuming that the pixel value of the coordinates (x, y) of the template image data stored in the mark pattern storage unit 122h is t (x, y) and the average value of the template image is Tm, from the image data read from the document When image data having the same size as the template is cut out, the pixel value of the coordinates (x, y) of the cut out image is f (x, y), and the average value of the template image is Fm, the following equation (1) A normalized correlation coefficient is obtained.

Figure 0004705894
Figure 0004705894

この正規化相関係数は、テンプレート画像と切り出した画像とが似ているほど数が大きくなるようになっている。   The number of normalized correlation coefficients increases as the template image and the clipped image are more similar.

従って、IF部121より入力された画像データの端から順に画像を切り出し、正規化相関係数が最も大きくなる画像の座標位置を求めることによりマーク114を検出することができる。   Therefore, the mark 114 can be detected by cutting out images sequentially from the end of the image data input from the IF unit 121 and obtaining the coordinate position of the image having the largest normalized correlation coefficient.

そして、本実施形態においては、このようにして検出したマーク114を特定するための基準となる座標として、マーク114の重心の座標を、各R画像、G画像、B画像において検出し、R座標記憶部122d、G座標記憶部122e及びB座標記憶部122fにそれぞれ記憶する。従って、マーク114が各画像に4つあれば、1つの画像に対してx座標値とy座標値のペアが4つ記憶される。   In this embodiment, the coordinates of the center of gravity of the mark 114 are detected in the R image, the G image, and the B image as the reference coordinates for specifying the mark 114 detected in this way, and the R coordinate The data is stored in the storage unit 122d, the G coordinate storage unit 122e, and the B coordinate storage unit 122f, respectively. Therefore, if there are four marks 114 in each image, four pairs of x coordinate values and y coordinate values are stored for one image.

補正係数生成部123は、マーク座標検出部122で検出された各々の色毎のマーク114の座標から、カメラ111の傾きと、色ズレ量と、を補正するための補正係数を算出する。   The correction coefficient generation unit 123 calculates a correction coefficient for correcting the tilt of the camera 111 and the amount of color misregistration from the coordinates of the mark 114 for each color detected by the mark coordinate detection unit 122.

ここで、例えば、本実施形態のように、四つのマーク114が縦方向及び横方向に同じ間隔で配置されている場合、図4(A)に示されているように、カメラ111の撮像方向(カメラ111のレンズの光軸)が原稿台113に対して垂直であれば、図4(B)に示されているように、撮像された画像データにおいて各マーク114の間隔は、向かい合うもの同士で等しくなるものと考えられる。   Here, for example, when the four marks 114 are arranged at the same interval in the vertical direction and the horizontal direction as in the present embodiment, the imaging direction of the camera 111 as shown in FIG. If (the optical axis of the lens of the camera 111) is perpendicular to the document table 113, as shown in FIG. 4B, the intervals between the marks 114 in the captured image data are opposite to each other. Is considered to be equal.

しかしながら、図4(C)に示されているように、カメラ111の撮像方向(カメラ111のレンズの光軸)が原稿台113に対して傾いていると(ここでは、カメラ111が原稿台113に対して横方向に傾いている場合を例としている)、図4(D)に示されているように、撮像された画像データにおいて各マーク114の間隔は、向かい合うもの同士で等しくならない(ここでは、側方に位置するマーク114間の間隔S、S’が異なるものとなっている)。また、各々の色では、色の波長によって屈折率が異なるため、色により結像倍率が異なる倍率色収差が発生する。   However, as shown in FIG. 4C, when the imaging direction of the camera 111 (the optical axis of the lens of the camera 111) is tilted with respect to the document table 113 (here, the camera 111 is the document table 113). 4D), as shown in FIG. 4D, the interval between the marks 114 in the captured image data is not equal between the facing ones (here , The distances S and S ′ between the marks 114 located on the sides are different). Further, in each color, since the refractive index differs depending on the wavelength of the color, lateral chromatic aberration with different imaging magnification depending on the color occurs.

そこで、補正係数生成部123では、まず、全ての色の画像に対して、四つのマーク114間の長さから、全ての画素位置と、当該画素位置に対応する縦方向及び横方向の長さを既知の補間処理で求める。   Therefore, in the correction coefficient generation unit 123, first, for all color images, from the lengths between the four marks 114, all the pixel positions and the vertical and horizontal lengths corresponding to the pixel positions are obtained. Is obtained by a known interpolation process.

次に、補正係数生成部123は、R画像及びB画像においてマーク114により囲まれる領域が、G画像においてマーク114により囲まれる領域に一致するように、R画像及びB画像の各々の画素毎に、縦横方向の変倍率を求める。なお、G画像の変倍率は等倍となる。   Next, the correction coefficient generation unit 123 performs an R image and a B image for each pixel so that the region surrounded by the mark 114 in the R image and the B image matches the region surrounded by the mark 114 in the G image. Find the scaling factor in the vertical and horizontal directions. Note that the magnification of the G image is the same magnification.

具体的な算出方法としては、例えば、図5を用いて説明する。   A specific calculation method will be described with reference to FIG.

図5は、カメラ111で撮像した画像データのR画像141及びG画像142を示している。   FIG. 5 shows an R image 141 and a G image 142 of image data captured by the camera 111.

そして、R画像141は、マーク114a〜114dにより領域を特定することができるようにされており、G画像142は、マーク114e〜114fにより領域を特定することができるようにされている。なお、これらのマークの座標はマークの重心位置を用いている。   The R image 141 can specify a region by marks 114a to 114d, and the G image 142 can specify a region by marks 114e to 114f. The coordinates of these marks use the center of gravity of the marks.

ここで、R画像141のマーク114aの画素位置x、yは(20,10)なっており、マーク114bの画素位置x、yは(80、3)となっているとすると、これらのマーク間の傾きは、(3−10)/(80−20)=−0.117となる。同様に、G画像142のマーク114eの画素位置x、yは(15、5)となっており、これらのマーク間の傾きは、(0−5)/(83−15)=−0.074となる。そして、これらの傾きの差分は−0.043となる。   Here, the pixel positions x and y of the mark 114a of the R image 141 are (20, 10), and the pixel positions x and y of the mark 114b are (80, 3). Is (3-10) / (80-20) =-0.117. Similarly, the pixel positions x and y of the mark 114e of the G image 142 are (15, 5), and the inclination between these marks is (0-5) / (83-15) = − 0.074. It becomes. The difference between these inclinations is −0.043.

また、R画像141のマーク114c及びマーク114dの間の傾きは、(68−68)/(82−22)=0で、G画像のマーク114g及び114hの間の傾きは(70−71)/(84−19)=−0.015の傾きとなる。そして、これらの傾きの差分は、−0.058となる。   The inclination between the marks 114c and 114d of the R image 141 is (68−68) / (82-22) = 0, and the inclination between the marks 114g and 114h of the G image is (70−71) / The inclination is (84-19) = − 0.015. The difference between these inclinations is −0.058.

そして、これらの傾きの差分を画素位置に応じて加算したものがR画像をG画像に重ねるための変倍率となる。例えば、G画像のマーク114e及びマーク114gとの間の長さaと、R画像のマーク114a及びマーク114bとの間の長さbと、を、これらの傾きから算出し、G画像におけるマーク114eのx座標である15画素目に対応するR画像における画素位置(マーク114eの点)には、b/aの倍率を掛ければよい。次のG画像における16画素目に対応するR画像の画素位置には、b/aから傾きの差分(−0.058)を一画素毎に加算すればよい。ここでは、縦方向の変倍率のみ説明しているが、横方向も同様に変倍率が求まる。さらに同様にB画像においても変倍率が求まる。   Then, the sum of these inclination differences according to the pixel position is a scaling factor for superimposing the R image on the G image. For example, the length a between the mark 114e and the mark 114g of the G image and the length b between the mark 114a and the mark 114b of the R image are calculated from these inclinations, and the mark 114e in the G image is calculated. The pixel position (the point of the mark 114e) in the R image corresponding to the fifteenth pixel that is the x coordinate may be multiplied by a magnification of b / a. A difference in inclination (−0.058) from b / a may be added to each pixel at the pixel position of the R image corresponding to the 16th pixel in the next G image. Here, only the magnification in the vertical direction has been described, but the magnification in the horizontal direction can be obtained in the same manner. Similarly, the scaling factor can be obtained for the B image.

また、高速化のためにモードを設けて、縦方向及び横方向の2箇所でのRGBの平均のマーク位置に基づいて倍率を一律にすることも考えられる。   It is also conceivable to provide a mode for speeding up and to make the magnification uniform based on the average mark positions of RGB in two places in the vertical and horizontal directions.

そして、補正係数生成部123は、このようにして算出した縦方向と横方向における変倍率をR画像及びB画像の各々の画素位置毎にまとめた補正位置情報を生成して、後述する補正部124に出力する。   Then, the correction coefficient generation unit 123 generates correction position information in which the magnifications in the vertical direction and the horizontal direction calculated in this way are collected for each pixel position of the R image and the B image, and a correction unit described later It outputs to 124.

補正部124は、補正係数生成部123で生成した補正位置情報により、対応する読取画像の画素位置を補正する。なお、読み取り画像の画素位置が整数値でない場合は、周囲の4点の補間処理(バイリニア)で求めるので、その際は補正画像の画素位置に対応する読取画像の画素位置とその周囲のRGB画素値を用いて補正を行い、ディスプレイ等の出力装置に出力する。   The correction unit 124 corrects the pixel position of the corresponding read image based on the correction position information generated by the correction coefficient generation unit 123. If the pixel position of the read image is not an integer value, the pixel position of the read image corresponding to the pixel position of the corrected image and the surrounding RGB pixels are obtained by performing interpolation of the surrounding four points (bilinear). Correction is performed using the value and output to an output device such as a display.

以上のように構成される画像処理装置120において、撮像装置110で読み取られた画像データを補正するための補正位置情報を生成する処理フローを図6に示す。   FIG. 6 shows a processing flow for generating correction position information for correcting the image data read by the imaging device 110 in the image processing device 120 configured as described above.

まず、IF部121を介して撮像装置110で撮像された画像データを入力し、マーク座標検出部122において、各色の画像毎のマーク114の座標を検出する(S10)。   First, image data captured by the imaging apparatus 110 is input via the IF unit 121, and the mark coordinate detection unit 122 detects the coordinates of the mark 114 for each color image (S10).

そして、補正係数生成部123では、マーク座標検出部122で検出されたマーク114の座標に基づいて、それぞれの色の対応する画素位置を特定し、R画像、B画像及びG画像それぞれの色ズレ量を算出する(S11)。   Then, the correction coefficient generation unit 123 specifies the corresponding pixel position of each color based on the coordinates of the mark 114 detected by the mark coordinate detection unit 122, and the color shift of each of the R image, the B image, and the G image. The amount is calculated (S11).

次に、補正係数生成部123は、S11で算出された色ズレ量を基準画像であるG画像に合わせるための補正係数(変倍率)を算出する(S12)。   Next, the correction coefficient generation unit 123 calculates a correction coefficient (magnification) for matching the color misregistration amount calculated in S11 with the G image that is the reference image (S12).

そして、補正係数生成部123は、S12で算出された補正係数(変倍率)を画像データの画素位置に対応付けた補正位置情報を生成する(S13)。   Then, the correction coefficient generation unit 123 generates correction position information in which the correction coefficient (magnification ratio) calculated in S12 is associated with the pixel position of the image data (S13).

以上のように構成される読取システム100では、マーク114の形状を円形に形成しているが、このような態様に限定されるわけではなく、例えば、図7(A)に示すマーク114Aのように矩形状に形成することも可能である。この場合には、マークの検出するパターンとしてマーク114Aの直角部分143を用いて検出すればよい。   In the reading system 100 configured as described above, the shape of the mark 114 is formed in a circular shape. However, the shape is not limited to such a mode. For example, the mark 114A illustrated in FIG. It is also possible to form a rectangular shape. In this case, detection may be performed using the right-angled portion 143 of the mark 114A as a pattern to be detected by the mark.

さらに、図7(B)又は図7(C)に示されているマーク114B、114Cのように、原稿台113に原稿140をおいた際に、原稿140によって覆われてしまうような位置に設けることも可能である。   Further, like marks 114B and 114C shown in FIG. 7B or FIG. 7C, they are provided at positions where they are covered by the original 140 when the original 140 is placed on the original table 113. It is also possible.

また、以上に記載した実施形態においては、R画像及びB画像の補正係数をG画像に合わせるようにしたが、このような態様に限定されず、例えば、R画像及びB画像の何れか一方に合わせるようにすることも可能である。   Further, in the embodiment described above, the correction coefficients of the R image and the B image are adjusted to the G image. However, the present invention is not limited to such a mode. For example, the correction coefficient is set to one of the R image and the B image. It is also possible to match.

また、以上に記載した画像処理装置120において、補正位置情報を生成するのは、キャリブレーションのように定期的に行うことも考えられるが、原稿140を読み取る際に、マークも一緒に読み取ることで、色収差の補正を画像データの読み込みと同時に行うことも可能となる。例えば、このようにすることで、温度特性により色収差が変化した場合でもその色収差が反映された良好な補正が可能となる。   In the image processing apparatus 120 described above, the correction position information can be generated periodically as in calibration, but when the original 140 is read, the mark is also read together. Further, correction of chromatic aberration can be performed simultaneously with reading of image data. For example, in this way, even when the chromatic aberration is changed due to the temperature characteristic, it is possible to perform a good correction reflecting the chromatic aberration.

また、補正係数生成部123の補正係数については、キーデバイス等を用いてユーザが変更できるようにしてもよい。その際には、画像データを基に生成した補正係数を使用するか、ユーザが変更した補正係数を使用するかの選択するためのセレクタスイッチを設けてもよい。   Further, the correction coefficient of the correction coefficient generation unit 123 may be changed by the user using a key device or the like. In that case, a selector switch for selecting whether to use a correction coefficient generated based on image data or a correction coefficient changed by the user may be provided.

なお、以上に記載した画像処理装置120については、ASIC(Application Specific Integrated Circuit)などの集積回路によってハードウェアで実現してもよく、コンピュータに読み込まれるソフトウェアによって実現してもよい。   The image processing apparatus 120 described above may be realized by hardware using an integrated circuit such as an ASIC (Application Specific Integrated Circuit), or may be realized by software read into a computer.

ソフトウェアによって実現する場合には、マーク座標検出部122や補正係数生成部123で行う処理を所定のプログラムをCPU(Central Processing Unit)で実行することにより実現可能であり、これらのマーク座標検出部122や補正係数生成部123で必要になるデータについては、ハードディスク等の外部記憶装置に記憶すればよい。   When realized by software, the processing performed by the mark coordinate detection unit 122 and the correction coefficient generation unit 123 can be realized by executing a predetermined program by a CPU (Central Processing Unit). The data required by the correction coefficient generation unit 123 may be stored in an external storage device such as a hard disk.

図8は、本発明の第二の実施形態である読取システム200の概略図である。   FIG. 8 is a schematic diagram of a reading system 200 according to the second embodiment of the present invention.

本実施形態では、第一の実施形態とは異なり、カメラ111のレンズに関する特性情報が取得されている場合に、その特性情報に基づいて画像データを補正する補正係数を生成することができるようにするものである。   In the present embodiment, unlike the first embodiment, when characteristic information related to the lens of the camera 111 is acquired, a correction coefficient for correcting image data can be generated based on the characteristic information. To do.

図示するように、読取システム200は、撮像装置110と、画像処理装置220と、を備えており、撮像装置110は第一の実施形態と同様であるため、説明を省略する。   As illustrated, the reading system 200 includes an imaging device 110 and an image processing device 220. Since the imaging device 110 is the same as that of the first embodiment, description thereof is omitted.

本実施形態における画像処理装置220は、IF部121と、マーク座標検出部122と、補正係数生成部223と、補正部224と、距離推定部225と、レンズデータ記憶部226と、を備えており、IF部121及びマーク座標検出部122は第一の実施形態と同様であるため説明を省略する。   The image processing apparatus 220 in this embodiment includes an IF unit 121, a mark coordinate detection unit 122, a correction coefficient generation unit 223, a correction unit 224, a distance estimation unit 225, and a lens data storage unit 226. Since the IF unit 121 and the mark coordinate detection unit 122 are the same as those in the first embodiment, description thereof is omitted.

距離推定部225は、マーク座標検出部122で検出された各色のマーク114の位置座標から、マーク114間の長さを算出することで、それぞれのマーク114までのカメラ111からの撮像距離を算出し、全ての画素位置までの撮像距離を補完処理により算出する。このようにして算出された撮像距離は、推定距離情報として補正係数生成部223に出力する。   The distance estimation unit 225 calculates the imaging distance from the camera 111 to each mark 114 by calculating the length between the marks 114 from the position coordinates of the marks 114 of each color detected by the mark coordinate detection unit 122. Then, the imaging distances to all the pixel positions are calculated by complement processing. The imaging distance calculated in this way is output to the correction coefficient generation unit 223 as estimated distance information.

例えば、距離推定部225については、図9(距離推定部225の概略図)に示すように、マーク間長さ算出部225aと、マーク位置距離算出部225bと、により構成することができる。   For example, as shown in FIG. 9 (schematic diagram of the distance estimation unit 225), the distance estimation unit 225 can be configured by an inter-mark length calculation unit 225a and a mark position distance calculation unit 225b.

マーク間長さ算出部225aは、各々の色毎に4つのマーク114のそれぞれの差分を算出して、マーク間の長さを求め、求めた長さをマーク位置距離算出部225bに出力する。   The mark-to-mark length calculation unit 225a calculates the difference between the four marks 114 for each color, obtains the length between the marks, and outputs the obtained length to the mark position distance calculation unit 225b.

マーク位置距離算出部225bは、入力されたマーク114間の長さを基にカメラ111のレンズから各マーク114までの撮像距離を算出する。   The mark position distance calculation unit 225b calculates the imaging distance from the lens of the camera 111 to each mark 114 based on the input length between the marks 114.

具体的には、カメラ111で撮影する画像範囲(倍率)と、この画像範囲におけるマーク114間の長さと、を予め定めておくことで、マーク間の長さと傾きにより、カメラ111のレンズから各マーク114までの撮像距離が算出され、この撮像距離から既知の補間処理により画像全体の画素位置までの撮像距離が算出される。   Specifically, by predetermining the image range (magnification) taken by the camera 111 and the length between the marks 114 in the image range, each of the lenses of the camera 111 can be changed according to the length and inclination between the marks. The imaging distance to the mark 114 is calculated, and the imaging distance to the pixel position of the entire image is calculated from this imaging distance by a known interpolation process.

このようにして算出された各画素位置までの撮像距離については、推定距離情報として補正係数生成部223に出力される。   The imaging distance to each pixel position calculated in this way is output to the correction coefficient generation unit 223 as estimated distance information.

レンズデータ記憶部226は、撮影レンズの色収差特性を特定する色収差特性情報が記憶される。   The lens data storage unit 226 stores chromatic aberration characteristic information for specifying the chromatic aberration characteristic of the photographing lens.

例えば、撮像対象面に対してカメラ111のレンズの光軸が垂直となるように撮像を行った場合には、色収差の特性は、図10(A)に示されているように、基点位置144(ここでは、光軸)から同心円状に等収差となるものとして考えられるが、例えば、図10(B)のように、撮像対称面に対してカメラ111のレンズの光軸が傾いた状態で撮像を行った場合、画像データに発生する収差の特性は、図10(B)に示されているように、基点位置144(ここでは、光軸)から歪んだ楕円状に等収差となるものと考えられる。   For example, when the imaging is performed so that the optical axis of the lens of the camera 111 is perpendicular to the imaging target surface, the chromatic aberration characteristic is the base point position 144 as shown in FIG. It can be considered that the aberration is concentric from (here, the optical axis). For example, as shown in FIG. 10B, the optical axis of the lens of the camera 111 is tilted with respect to the imaging symmetry plane. When imaging is performed, the characteristic of the aberration generated in the image data is an equal aberration in an elliptical shape distorted from the base point position 144 (here, the optical axis) as shown in FIG. it is conceivable that.

そこで、本実施形態では、色収差特性情報として、撮像対象面に対してレンズの光軸が垂直となるように撮像を行った場合に、焦点距離毎の結像倍率を特定する情報をR、G、B毎にレンズデータ記憶部226に記憶する。   Therefore, in the present embodiment, as chromatic aberration characteristic information, when imaging is performed so that the optical axis of the lens is perpendicular to the imaging target surface, information for specifying the imaging magnification for each focal length is R, G , B is stored in the lens data storage unit 226.

本実施形態における補正係数生成部223は、レンズデータ記憶部226に記憶されている色収差特性情報に基づいて、マーク114の座標位置におけるR画像及びB画像のG画像に対するそれぞれの色ズレ量を算出する。   The correction coefficient generation unit 223 according to the present embodiment calculates the respective color misregistration amounts of the R image and the B image for the G image at the coordinate position of the mark 114 based on the chromatic aberration characteristic information stored in the lens data storage unit 226. To do.

そして、補正係数生成部223は、距離測定部225で算出された推定距離情報から各マーク114までの撮像距離を算出し、この撮像距離に対応する焦点距離を特定し、特定した焦点距離に対応する結像倍率をレンズデータ記憶部226に記憶されている色収差特性情報により特定し、特定した結像倍率により、R画像及びB画像のG画像に対するそれぞれの色ズレ量を算出する。   Then, the correction coefficient generation unit 223 calculates an imaging distance to each mark 114 from the estimated distance information calculated by the distance measurement unit 225, identifies a focal distance corresponding to the imaging distance, and corresponds to the identified focal distance. The imaging magnification to be determined is specified by the chromatic aberration characteristic information stored in the lens data storage unit 226, and the respective color shift amounts of the R image and the B image with respect to the G image are calculated based on the specified imaging magnification.

さらに、このようにして算出した色ズレ量と、マーク座標検出部122から得られる実際に撮像された実測のマーク114の座標位置におけるR画像及びB画像のG画像に対するそれぞれの色ズレ量と、を比較する。そして、比較の結果、所定の閾値を満たさない場合には、基点位置座標と、各マーク位置までのカメラ111からの撮像距離と、の少なくとも何れか一方を変更して推定色ズレ量と実測色ズレ量とが一致又は近似するような補正係数を生成する。   Further, the color misregistration amount calculated in this way, and the respective color misregistration amounts with respect to the R image and the B image of the G image at the coordinate position of the actually captured actual mark 114 obtained from the mark coordinate detection unit 122, Compare As a result of comparison, if the predetermined threshold value is not satisfied, the estimated color shift amount and the actually measured color are changed by changing at least one of the base point position coordinates and the imaging distance from the camera 111 to each mark position. A correction coefficient that matches or approximates the deviation amount is generated.

例えば、補正係数生成部223については、図11(補正係数生成部223の概略図)に示すように、色ズレ推定部223bと、調整部223bと、補正係数記憶部223cと、により構成することが可能である。   For example, as shown in FIG. 11 (schematic diagram of the correction coefficient generation unit 223), the correction coefficient generation unit 223 includes a color misregistration estimation unit 223b, an adjustment unit 223b, and a correction coefficient storage unit 223c. Is possible.

色ズレ推定部223aは、距離推定部225で算出した各マーク114までの推定撮像距離から焦点距離を特定し、この焦点距離に対応する結像倍率を各々の色毎に算出し、R画像及びB画像のG画像に対する色ズレ量を算出する。算出した色ズレ量は、推定色ズレ量として調整部223bに出力する。   The color misregistration estimation unit 223a specifies the focal length from the estimated imaging distance to each mark 114 calculated by the distance estimation unit 225, calculates the imaging magnification corresponding to this focal length for each color, A color shift amount of the B image with respect to the G image is calculated. The calculated color misregistration amount is output to the adjustment unit 223b as an estimated color misregistration amount.

調整部223bは、マーク座標検出部122より入力した各色のマーク位置の座標から、実測した画像データにおける色ズレ量を算出し、算出した色ズレ量と、色ズレ推定部223aから入力した推定色ズレ量と、を比較する。比較の結果、これらの差分が予め定められた閾値以下でない場合には、各色の色ズレ量を算出する際の基点位置と、各色のマーク位置までの撮像距離と、の少なくとも何れか一方を変更して、新たな基点位置及び新たな撮像距離における推定色ズレ量を算出する。以上の処理を繰り返すことにより、実測した画像データにおける色ズレ量と、色ズレ推定部223aから入力した推定色ズレ量と、が予め定められた閾値以下になるような、基点位置と、撮像距離と、を特定する。なお、処理を繰り返す回数に上限を設定することも可能である。   The adjustment unit 223b calculates the color misregistration amount in the actually measured image data from the coordinates of the mark position of each color input from the mark coordinate detection unit 122, and the calculated color misregistration amount and the estimated color input from the color misregistration estimation unit 223a. Compare the amount of deviation. As a result of the comparison, if these differences are not less than or equal to a predetermined threshold value, at least one of the base point position for calculating the color misregistration amount of each color and the imaging distance to the mark position of each color is changed. Then, the estimated color misregistration amount at the new base position and the new imaging distance is calculated. By repeating the above processing, the base point position and the imaging distance such that the color misregistration amount in the actually measured image data and the estimated color misregistration amount input from the color misregistration estimation unit 223a are equal to or less than a predetermined threshold value. And specify. An upper limit can be set for the number of times the process is repeated.

そして、色ズレ推定部223aは、特定した基点位置と、撮像距離と、に基づいてR画像及びB画像のそれぞれをG画像に対応するようにするための補正係数(変倍率)を各々の画素毎に算出して、R画像及びB画像の各々の画素毎にまとめた補正位置情報を生成して、補正係数記憶部223cに記憶する。   Then, the color misregistration estimation unit 223a sets a correction coefficient (magnification ratio) for each pixel so that each of the R image and the B image corresponds to the G image based on the identified base point position and the imaging distance. The correction position information calculated for each pixel of the R image and the B image is generated and stored in the correction coefficient storage unit 223c.

なお、例えば、調整部223bについては、図12(調整部223bの概略図)に示すように、推定ズレ算出部223dと、中心位置・距離補正部223eと、により構成することが可能である。   For example, as shown in FIG. 12 (schematic diagram of the adjusting unit 223b), the adjusting unit 223b can be configured by an estimated deviation calculating unit 223d and a center position / distance correcting unit 223e.

推定ズレ算出部223dは、マーク座標検出部122より入力した各色のマーク114の位置を特定する座標から、実測した画像データにおけるR画像及びB画像のG画像に対する色ズレ量を算出し、算出した色ズレ量と、色ズレ推定部223aから入力した推定色ズレ量と、を比較し、これらの差分が予め定めた閾値以下でない場合には、各色の色ズレ量を算出する際の基点位置と、各マーク114までの撮像距離と、の何れか一方を中心位置・距離補正部223eにおいて変更して、新たな基点位置及び新たな撮像距離における推定色ズレ量を算出する。   The estimated misregistration calculation unit 223d calculates the color misregistration amount of the R image and the B image in the actually measured image data from the coordinates specifying the position of the mark 114 of each color input from the mark coordinate detection unit 122, and calculates the amount. The color misregistration amount is compared with the estimated color misregistration amount input from the color misregistration estimation unit 223a, and when these differences are not equal to or less than a predetermined threshold, the base point position when calculating the color misregistration amount of each color Any one of the imaging distances to the marks 114 is changed in the center position / distance correction unit 223e, and an estimated color shift amount at a new base position and a new imaging distance is calculated.

補正部224は、補正係数記憶部223cに記憶されている補正位置情報に対応する画像データの画素位置をR、G、B毎に補正する。なお、読み取り画像の画像位置が整数値でない場合は、周囲の4点の補間処理(バイリニア)で求めるので、その際は補正画像の画素位置に対応する読取画像の画素位置とその周囲のRGB画素値を用いて補正を行い、ディスプレイ等の出力装置に出力する。   The correction unit 224 corrects the pixel position of the image data corresponding to the correction position information stored in the correction coefficient storage unit 223c for each of R, G, and B. If the image position of the read image is not an integer value, the pixel position of the read image corresponding to the pixel position of the corrected image and the surrounding RGB pixels are obtained by performing interpolation of the surrounding four points (bilinear). Correction is performed using the value and output to an output device such as a display.

図13に中心位置・距離値補正部223eの処理フローを示す。   FIG. 13 shows a processing flow of the center position / distance value correction unit 223e.

まず、中心位置・距離値補正部223eは、初回の処理であるか否かを確認し(S20)、初回の処理である場合には、初期設定を行う(S21)。初期設定としては、カウンタ値Cを「0」にクリヤし、基点位置のオフセット値である基点オフセット値を「0」、距離オフセット値も「0」に設定する。ここで初期値としてそれぞれに「0」を設定しているが特にこの値に限ることはない。   First, the center position / distance value correction unit 223e checks whether or not the process is the first process (S20), and if it is the first process, performs the initial setting (S21). As an initial setting, the counter value C is cleared to “0”, the base point offset value that is the offset value of the base point position is set to “0”, and the distance offset value is also set to “0”. Here, “0” is set as an initial value, but the value is not limited to this value.

次に推定ズレ算出部223dで算出した推定色ズレ量と実測した色ズレ量の差分が予め定めた閾値TH以内か判定する(S22)。ここで閾値TH以内であれば現在の基点オフセット値及び距離オフセット値を決定値として、色ズレ推定部223aを介して補正係数記憶部223cに記憶して(S23)、処理を終了する。   Next, it is determined whether the difference between the estimated color shift amount calculated by the estimated shift calculation unit 223d and the actually measured color shift amount is within a predetermined threshold TH (S22). If it is within the threshold TH, the current base point offset value and the distance offset value are stored in the correction coefficient storage unit 223c via the color misregistration estimation unit 223a (S23), and the process is terminated.

ステップS22において閾値TH以内でなければ、カウンタ値Cに「1」を加算して(S24)、カウンタ値Cを閾値Nと比較し(S25)、閾値N以上であれば、現在の基点オフセット値及び距離オフセット値を決定値として記憶する(S23)。   If it is not less than the threshold value TH in step S22, "1" is added to the counter value C (S24), the counter value C is compared with the threshold value N (S25). The distance offset value is stored as a determined value (S23).

カウンタ値Cが閾値N以上でなければ、距離推定部225で算出された基点位置と各マーク114までの撮像距離で特定されるマーク114の位置が、全て実測されたマーク114の位置の内側に位置しているか、若しくは全て実測マーク114の位置より外側に位置するかを判定する(S26)。   If the counter value C is not equal to or greater than the threshold value N, the position of the mark 114 specified by the base point position calculated by the distance estimation unit 225 and the imaging distance to each mark 114 is all inside the position of the mark 114 actually measured. It is determined whether they are located or whether they are all located outside the position of the actual measurement mark 114 (S26).

もしも、全体的に実際の撮影距離が近い場合、画像は拡大されており、四隅のマーク114の全ての推定値が実測値の中心側(内側)に位置することになる。逆に全体的に実際の距離が離れている場合、画像は縮小され、四隅のマーク114の全ての推定値は実測値の周辺側(外側)に位置することになる。四隅のマーク114の全ての推定値が内側若しくは外側になった場合は撮影距離が異なっていると考えて、距離オフセット値を変更する(S27)。それ以外であれば、基点位置に加算する基点オフセット値を変更する(S28)。そして変更した基点位置若しくは距離オフセット値を色ズレ推定部223aに送る。なお、ステップS27については図15を用いて後述し、ステップS28については図16を用いて後述する。   If the actual shooting distance is close as a whole, the image is enlarged, and all the estimated values of the marks 114 at the four corners are located on the center side (inside) of the actual measurement values. On the contrary, when the actual distance is far away as a whole, the image is reduced, and all the estimated values of the marks 114 at the four corners are located on the peripheral side (outside) of the actual measurement value. When all the estimated values of the marks 114 at the four corners are inside or outside, it is considered that the shooting distance is different, and the distance offset value is changed (S27). Otherwise, the base point offset value added to the base point position is changed (S28). Then, the changed base point position or distance offset value is sent to the color misregistration estimation unit 223a. Step S27 will be described later with reference to FIG. 15, and step S28 will be described later with reference to FIG.

基点位置に加算する基点オフセット値を変更する処理フローを図14に示す。   FIG. 14 shows a processing flow for changing the base point offset value to be added to the base point position.

まず、基点位置は等収差の中心とする。この基点位置は各色の画像の収差を算出する際の基になるため、基点位置をずらしながら推定した推定値と実測値との誤差が最も小さい基点位置を検出する。なお、基点位置の初期値は色ズレ推定部223aで決めた同心円状の等収差の中心位置である。また、ここでは説明を簡単にするため、一方向(x方向:横方向)のみ変更する場合の処理フローを説明する。   First, the base point position is the center of iso-aberration. Since the base point position is a base for calculating the aberration of the image of each color, the base point position where the error between the estimated value estimated while shifting the base point position and the actually measured value is the smallest is detected. The initial value of the base point position is the center position of concentric equiaberration determined by the color misregistration estimation unit 223a. In order to simplify the description, a processing flow in the case where only one direction (x direction: horizontal direction) is changed will be described.

まず、調整部223bでオフセット値を変更する際、初回かどうか判定し(S30)、初回である場合には、初期設定としてプラス誤差の出現の有無を表すプラス誤差フラグ、マイナス誤差の出現の有無を表すマイナス誤差フラグを共に「0」にクリヤし、また、プラス誤差のMIN値を表すプラスMIN値とマイナス誤差のMIN値を表すマイナスMIN値を最大値に設定し、さらに、プラスMIN値が得られた基点オフセット値を表すプラス基点値とマイナスMIN値が得られた基点オフセット値を表すマイナス基点値と、設定中の基点オフセット値を表す基点オフセット値を「0」にクリヤする(S31)。   First, when the adjustment unit 223b changes the offset value, it is determined whether or not it is the first time (S30). If it is the first time, a positive error flag indicating the presence or absence of a positive error and the presence or absence of a negative error are set as initial settings. The minus error flag indicating MIN is set to “0”, the plus MIN value indicating the plus error MIN value and the minus MIN value indicating the minus error MIN value are set to the maximum values, and the plus MIN value is The plus base point value representing the obtained base point offset value, the minus base point value representing the base point offset value from which the minus MIN value was obtained, and the base point offset value representing the base point offset value being set are cleared to “0” (S31). .

次に各々のマーク114位置、各々の色毎にマーク座標検出部122から得られた実測色ズレ量と色ズレ推定部223より得られた推定色ズレ量の差分(誤差)を求めて、それらの合計値(誤差合計値)を求める(S32)。この差分は、推定ズレ算出部223dでの差分(実測値−推定値)の合計値を求める。   Next, a difference (error) between the measured color shift amount obtained from the mark coordinate detection unit 122 and the estimated color shift amount obtained from the color shift estimation unit 223 is obtained for each position of each mark 114 and for each color. Is calculated (total error value) (S32). For this difference, a total value of differences (actual value-estimated value) in the estimated deviation calculating unit 223d is obtained.

そして、求めた誤差合計値が「0」以上かを判定し(S33)、誤差合計値が「0」以上であるとき、誤差合計値がプラスMIN値よりも誤差が小さいか判定する(S34)。ここで、初回はプラスMIN値にはMAX値が設定されているので必ず誤差合計値がプラスMIN値よりも小さいと判定される。   Then, it is determined whether the obtained error total value is “0” or more (S33). If the error total value is “0” or more, it is determined whether the error total value is smaller than the plus MIN value (S34). . Here, since the MAX value is set as the plus MIN value for the first time, it is always determined that the total error value is smaller than the plus MIN value.

ステップS33で、小さいと判定されるとプラスMIN値に今回の誤差合計値を設定し、プラス基点値にも今回の基点オフセット値を設定し、プラス誤差フラグには「1」を設定する(S35)。ここで、初回はプラス基点値も基点オフセット値も「0」になる。またプラス誤差フラグは一回でも「1」に設定されると次の読取りで初期値設定されるまで「0」に戻らない。   If it is determined in step S33 that the value is small, the current total error value is set to the plus MIN value, the current base point offset value is also set to the plus base point value, and “1” is set to the plus error flag (S35). ). Here, for the first time, the plus base point value and the base point offset value are both “0”. If the plus error flag is set to “1” even once, it does not return to “0” until the initial value is set in the next reading.

次に、今までマイナスの誤差になったことがあるかどうかを示すマイナス誤差フラグが「0」かどうかチェックする(S36)。マイナス誤差フラグも一回でも誤差合計値がマイナスになると「1」になっており、初期値のままの「0」は一回も誤差合計値がマイナスになっていないことになる。   Next, it is checked whether or not a minus error flag indicating whether there has been a minus error until now is "0" (S36). The minus error flag is also “1” when the error total value becomes minus even once, and “0” as the initial value means that the error total value has never become minus.

推定値と実測値が一致すれば誤差合計値は「0」であり、プラス誤差とマイナス誤差の間にあるので、誤差がプラスからマイナスに変わる時に、真の値に近いと考えられる。基点オフセット値を最小単位で変化させていく際に、誤差の符号が変化した時点で、プラス側とマイナス側の最も誤差の小さい基点オフセット値が決まっていると考えられる。   If the estimated value and the actually measured value match, the total error value is “0”, which is between the plus error and the minus error, and is considered to be close to the true value when the error changes from plus to minus. When the base point offset value is changed in the smallest unit, it is considered that the base point offset value having the smallest error on the plus side and the minus side is determined when the sign of the error is changed.

マイナス誤差フラグが「0」の時、つまり今までマイナスの誤差になったことがなければ、基点オフセット値を最小単位の「1」を加算する(S37)。   When the minus error flag is “0”, that is, when no minus error has been found so far, “1” of the minimum unit is added to the base point offset value (S37).

ステップS36において、マイナスの誤差になったことが有れば、プラスMIN値とマイナスMIN値(絶対値)を比較し(S38)、マイナスMIN値(絶対値)が小さければ基点オフセット値はマイナス基点値を設定し(S39)、そうでなければ基点オフセット値はプラス基点値を設定する(S40)。   In step S36, if a negative error has occurred, the plus MIN value and the minus MIN value (absolute value) are compared (S38). If the minus MIN value (absolute value) is small, the base offset value is the minus base point. A value is set (S39), otherwise, a base point offset value is set to a plus base point value (S40).

ステップS33において、誤差合計値が「0」以上か判定する際、誤差合計値がマイナスの場合は、誤差合計値(絶対値)がマイナスMIN値(絶対値)よりも誤差が小さいか判定する(S41)。初回はマイナスMIN値にはMAX値が設定されているので必ず誤差合計値がマイナスMIN値よりも小さいと判定される。   In step S33, when determining whether the total error value is “0” or more, if the total error value is negative, it is determined whether the total error value (absolute value) is smaller than the negative MIN value (absolute value) (step S33). S41). Since the MAX value is set for the minus MIN value for the first time, it is always determined that the total error value is smaller than the minus MIN value.

ステップS41において、小さいと判定されるとマイナスMIN値に今回の誤差合計値を設定し、マイナス基点値にも今回の基点オフセット値を設定し、マイナス誤差フラグには「1」を設定する(S42)。   If it is determined in step S41 that the value is small, the current total error value is set to the minus MIN value, the current base point offset value is also set to the minus base point value, and “1” is set to the minus error flag (S42). ).

次に、今までプラスの誤差になったことがあるかどうかを、プラス誤差フラグが「0」かどうかチェックすることにより確認する(S43)。ここで、プラス誤差フラグは一回でも誤差合計値がプラスになると「1」になっており、初期値のままの「0」は一回も誤差合計値がプラスになっていないことになる。   Next, whether or not there has been a positive error has been confirmed by checking whether or not the positive error flag is “0” (S43). Here, the plus error flag is “1” when the total error value becomes positive even once, and “0” as the initial value means that the total error value has never become positive.

今までプラスの誤差になったことがなければ、基点オフセット値として最小単位で「1」を減算する(S44)。   If there has never been a positive error, “1” is subtracted in the minimum unit as the base point offset value (S44).

ステップS43でプラスの誤差になったことがあれば、ステップS38に進む。   If a positive error has occurred in step S43, the process proceeds to step S38.

以上が基点位置に加算する基点オフセット値を変更する処理となるが、ここではx方向(横方向)の基点オフセット値を説明したが、y方向(縦方向)の基点オフセット値も同様に求めることができる。x方向、y方向は別々に行い、x方向を決定した後で、y方向を決定することも可能であるし、同時に行うことも可能である。   The above is the process of changing the base point offset value to be added to the base point position. Here, the base point offset value in the x direction (horizontal direction) has been described, but the base point offset value in the y direction (vertical direction) is also obtained in the same manner. Can do. The x direction and the y direction are performed separately, and after determining the x direction, it is possible to determine the y direction or simultaneously.

また、ここで説明した方法以外にも誤差の「0」の箇所を求める方法として、基点位置の変化させる変化量とそれに伴い発生した誤差合計値の変化量を基に、誤差の「0」の基点位置を算出して求めることも考えられる。   In addition to the method described here, as a method for obtaining the location of the error “0”, the error “0” is calculated based on the change amount of the base position change and the change amount of the error total value generated accordingly. It is also conceivable to calculate and obtain the base point position.

距離値に加算する距離オフセット値を変更する処理フローを図15に示す。   FIG. 15 shows a processing flow for changing the distance offset value to be added to the distance value.

まず、調整部223bでオフセット値を変更する際、初回かどうか判定し(S50)、初回では初期設定としてプラス誤差の出現有無を表すプラス誤差フラグ、マイナス誤差の出現有無を表すマイナス誤差フラグを共に「0」にクリヤし、また、プラス誤差のMIN値を表すプラスMIN値とマイナス誤差のMIN値を表すマイナスMIN値を最大値に設定し、さらに、プラスMIN値が得られた距離オフセット値を表すプラス距離値とマイナスMIN値が得られた距離オフセット値を表すマイナス距離値と、設定中の距離オフセット値を表す距離オフセット値を「0」にクリヤする(S51)。   First, when the offset value is changed by the adjusting unit 223b, it is determined whether or not it is the first time (S50), and at the first time, a positive error flag indicating whether or not a plus error appears and a minus error flag indicating whether or not a minus error appears are both initialized. Clear to “0”, and set the plus MIN value that represents the MIN value of plus error and the minus MIN value that represents the MIN value of minus error to the maximum value, and further set the distance offset value from which the plus MIN value was obtained. The plus distance value and the minus distance value representing the distance offset value from which the minus MIN value is obtained and the distance offset value representing the set distance offset value are cleared to “0” (S51).

次に各マーク位置、各色毎に実測値と推測値の差分(誤差)を求めて、それらの合計値(誤差合計値)を求める(S52)。ただし、マーク114の座標位置での色ズレ量の誤差を計算する際には、画像の中心を原点に考えるため、推定ズレ算出部223dからの差分結果についてx方向の差分は、原点よりも左側のマーク114に関して求めた値の符号を逆転させる。また、y方向の差分については、原点よりも上側のマーク114に関して求めた値は符号が逆転させて使用する。ここでは、X方向もY方向の両方の誤差を集計して、誤差の合計値を算出する。   Next, the difference (error) between the actual measurement value and the estimated value is obtained for each mark position and each color, and the total value (error total value) is obtained (S52). However, when calculating the error of the color misregistration amount at the coordinate position of the mark 114, since the center of the image is considered as the origin, the difference in the x direction of the difference result from the estimated misregistration calculation unit 223d is on the left side of the origin. The sign of the value obtained for the mark 114 is reversed. For the difference in the y direction, the value obtained for the mark 114 above the origin is used with the sign reversed. Here, the errors in both the X direction and the Y direction are totaled, and the total value of the errors is calculated.

次に、求めた誤差合計値が「0」以上かを判定し(S53)、誤差合計値が「0」以上であるとき、誤差合計値がプラスMIN値よりも誤差が小さいか判定する(S54)。   Next, it is determined whether the obtained error total value is “0” or more (S53). When the error total value is “0” or more, it is determined whether the error total value is smaller than the plus MIN value (S54). ).

そして、ステップS54において小さいと判定されるとプラスMIN値に今回の誤差合計値を設定し、プラス距離値にも今回の距離オフセット値を設定し、プラス誤差フラグには「1」を設定する(S55)。   If it is determined in step S54 that it is small, the current total error value is set to the plus MIN value, the current distance offset value is also set to the plus distance value, and “1” is set to the plus error flag ( S55).

次に、今までマイナスの誤差になったことがあるかどうかを示すマイナス誤差フラグが「0」かどうかチェックする(S56)。マイナスMINフラグが「0」の時、つまり今までマイナスの誤差になったことがなければ、距離オフセット値に最小単位の「1」を加算する(S57)。   Next, it is checked whether or not a minus error flag indicating whether or not a minus error has ever been "0" (S56). When the minus MIN flag is “0”, that is, when no minus error has occurred so far, “1” of the minimum unit is added to the distance offset value (S57).

ステップS57で、マイナスの誤差になったことが有れば、プラスMIN値とマイナスMIN値(絶対値)を比較し(S58)、マイナスMIN値(絶対値)が小さければ距離オフセット値はマイナス距離値を設定し(S59)、そうでなければ距離オフセット値はプラス距離値を設定する(S60)。   If a negative error has occurred in step S57, the plus MIN value and the minus MIN value (absolute value) are compared (S58). If the minus MIN value (absolute value) is small, the distance offset value is minus distance. A value is set (S59), otherwise the distance offset value is set to a plus distance value (S60).

ステップS53で、誤差合計値が「0」以上か判定する際、誤差合計値がマイナスの場合は、誤差合計値(絶対値)がマイナスMIN値(絶対値)よりも誤差が小さいか判定する(S61)。   In step S53, when determining whether the total error value is “0” or more, if the total error value is negative, it is determined whether the total error value (absolute value) is smaller than the negative MIN value (absolute value) ( S61).

ステップS61で、小さいと判定されるとマイナスMIN値に今回の誤差合計値を設定し、マイナス距離値にも今回の距離オフセット値を設定し、マイナス誤差フラグには「1」を設定する(S62)。   If it is determined in step S61 that the value is small, the current total error value is set as the minus MIN value, the current distance offset value is set as the minus distance value, and "1" is set as the minus error flag (S62). ).

次に、今までプラスの誤差になったことがあるかどうかを、プラス誤差フラグが「0」かどうかによりチェックする(S63)。   Next, it is checked whether or not there has been a positive error until now depending on whether or not the positive error flag is “0” (S63).

そして、今までプラスの誤差になったことがなければ、距離オフセット値から最小単位の「1」を減算する(S64)。   If there has never been a positive error, the minimum unit “1” is subtracted from the distance offset value (S64).

ステップS63でプラスの誤差になったことがあれば、ステップS58に進む。   If a positive error has occurred in step S63, the process proceeds to step S58.

また、ここで説明した方法以外にも誤差の「0」の箇所を求める方法として、距離オフセット値の変化させる変化量とそれに伴い発生した誤差合計値の変化量を基に、誤差「0」の距離オフセット値を算出して求めることも考えられる。   In addition to the method described here, as a method of obtaining the location of the error “0”, the error “0” is calculated based on the amount of change in the distance offset value and the amount of change in the error total value that accompanies it. It is also conceivable to calculate and obtain a distance offset value.

図14に示されたフローチャートにおいて、マーク位置の色ずれの推定値と実測値の差が閾値TH以内になるとステップS23で現在の中心オフセット値と撮影距離オフセット値を記憶するが、その値を用いた色収差特性は色ズレ推定部223aに既に生成されていると考えられる。それはメモリに記憶しておいてもいいし、記憶した基点オフセット値と距離オフセット値を用い、再度生成してもよい。また、例えば、処理時間短縮のため、以上の一連の距離及び基点位置を決める処理については、収差を推定するのはマーク位置のみの4点の位置だけにしておき、撮像距離及び収差特性の基点位置を決定した後で、全ての画像位置における収差を求めることも可能である。   In the flowchart shown in FIG. 14, when the difference between the estimated value of color misregistration at the mark position and the actual measurement value is within the threshold value TH, the current center offset value and shooting distance offset value are stored in step S23. It is considered that the chromatic aberration characteristics that have been generated are already generated in the color misregistration estimation unit 223a. It may be stored in a memory, or may be generated again using the stored base point offset value and distance offset value. Further, for example, in order to shorten the processing time, in the above processing for determining the series of distances and base point positions, the aberration is estimated only at the four positions of only the mark position, and the imaging distance and the base point of the aberration characteristics are set. It is also possible to determine aberrations at all image positions after determining the position.

以上のように、本実施形態によれば、このように収差特性を用いて全画像位置毎にR、G、Bの位置ずれを求めて、補正画像位置にあるべきR、G、Bの画素値を、読取り画像のR、G、Bから求めることができ、また、「1」画素未満の画素位置に対応する場合は周囲の情報も使用して線形補間を行って求めることも可能である。   As described above, according to the present embodiment, R, G, and B pixels that should be in the corrected image position are obtained by calculating the R, G, and B position shifts for all image positions using the aberration characteristics as described above. The value can be obtained from R, G, and B of the read image, and when corresponding to a pixel position of less than “1” pixels, it can also be obtained by performing linear interpolation using surrounding information. .

以上に記載した第二の実施形態においては、カメラ111からの撮像距離と、基点となる基点位置と、を同時に変更して、補正係数を求めているが、このような態様に限定されず、例えば、撮像距離については固定されているものとして、基点位置だけを変更して補正係数を求めるようにしてもよい。この場合には、距離推定部225を設ける必要はなくなる。   In the second embodiment described above, the imaging distance from the camera 111 and the base point position serving as the base point are changed at the same time to obtain the correction coefficient. However, the present invention is not limited to this mode. For example, assuming that the imaging distance is fixed, the correction coefficient may be obtained by changing only the base point position. In this case, it is not necessary to provide the distance estimation unit 225.

以上に記載した第二の実施形態における画像処理装置220についても、ASICなどの集積回路によってハードウェアで実現してもよく、コンピュータに読み込まれるソフトウェアによって実現してもよい。   The image processing apparatus 220 in the second embodiment described above may be realized by hardware using an integrated circuit such as an ASIC, or may be realized by software read into a computer.

ソフトウェアによって実現する場合には、マーク座標検出部122や補正係数生成部223、補正部224、距離推定部225、で行う処理を所定のプログラムをCPU(制御部)で実行することにより実現可能であり、これらのマーク座標検出部122や補正係数生成部223、補正部224、距離推定部225で必要になるデータについては、ハードディスク等の外部記憶装置に記憶すればよい。   When realized by software, the processing performed by the mark coordinate detection unit 122, the correction coefficient generation unit 223, the correction unit 224, and the distance estimation unit 225 can be realized by executing a predetermined program on the CPU (control unit). The data required by the mark coordinate detection unit 122, the correction coefficient generation unit 223, the correction unit 224, and the distance estimation unit 225 may be stored in an external storage device such as a hard disk.

以上に記載した実施形態においては、原稿台113にマーク114を記しているが、このような態様に限定されず、例えば、原稿台113にテストチャートとなる原稿を載せて撮像を行い、補正係数を求めるようにしてもよい。   In the embodiment described above, the mark 114 is described on the document table 113. However, the present invention is not limited to such a mode. For example, a document serving as a test chart is placed on the document table 113 and imaged, and a correction coefficient is set. May be requested.

また、マーク114と原稿台113の配色については、原稿台113が黒でマーク114は白、若しくは、原稿台113が白でマーク114が黒と共に彩度の無い色で配色することが考えられる。テストチャートにマークを配置する際も、配色については、テストチャートの地色が黒でマークは白、若しくは、テストチャートの地色が白でマークが黒とすることが考えられる。   Further, regarding the color arrangement of the mark 114 and the document table 113, it is conceivable that the document table 113 is black and the mark 114 is white, or the document table 113 is white and the mark 114 is black and a color having no saturation. Even when the mark is arranged on the test chart, it can be considered that the ground color of the test chart is black and the mark is white, or the ground color of the test chart is white and the mark is black.

第一の実施形態である読取システム100の概略図。1 is a schematic diagram of a reading system 100 according to a first embodiment. マーク座標検出部122の概略図。3 is a schematic diagram of a mark coordinate detection unit 122. FIG. 座標検出部122a〜122cの概略図。Schematic of the coordinate detection parts 122a-122c. カメラ111の傾きとマーク114の間隔との関係を説明する概略図。Schematic explaining the relationship between the inclination of the camera 111 and the space | interval of the mark 114. FIG. 変倍率を算出する方法を示す概略図。Schematic which shows the method of calculating variable magnification. 補正位置情報を生成する処理フロー。A processing flow for generating correction position information. マーク114の変形例を示す概略図。Schematic which shows the modification of the mark 114. FIG. 第二の実施形態である読取システム200の概略図。Schematic of the reading system 200 which is 2nd embodiment. 距離推定部225の概略図。Schematic of the distance estimation part 225. カメラ111の傾きと収差との関係を示す概略図。Schematic which shows the relationship between the inclination of a camera 111, and an aberration. 補正係数生成部223の概略図。Schematic of the correction coefficient generation unit 223. FIG. 調整部223bの概略図。Schematic of the adjustment part 223b. 中心位置・距離値補正部223eの処理フロー。The processing flow of the center position / distance value correction unit 223e. 基点位置に加算する基点オフセット値を変更する処理フロー。The processing flow which changes the base point offset value added to a base point position. 距離値に加算する距離オフセット値を変更する処理フロー。A processing flow for changing the distance offset value to be added to the distance value.

符号の説明Explanation of symbols

100、200 読取システム
110 撮像装置
111 カメラ
113 原稿台
114 マーク
120、220 画像処理装置
122 マーク座標検出部
123 補正係数生成部
124、224 補正部
225 距離推定部
226 レンズデータ記憶部
100, 200 Reading system 110 Imaging device 111 Camera 113 Document table 114 Mark 120, 220 Image processing device 122 Mark coordinate detection unit 123 Correction coefficient generation unit 124, 224 Correction unit 225 Distance estimation unit 226 Lens data storage unit

Claims (10)

原稿台に置かれた撮像対象物を撮像する撮像機器から得られる画像データを処理する画像処理装置であって、
前記撮像機器の各々の基準色における結像倍率を焦点距離に対応させた色収差情報を記憶するレンズデータ記憶部と、
前記画像データに含まれているマークの画像を、複数の基準色毎に検出するマーク検出部と、
前記マークの撮像距離を算出する距離推定部と、
前記マーク検出部で検出された複数の基準色毎のマークの画像が、重なり合うように基準色毎の画素位置を変更する補正係数を生成する補正係数生成部と、
前記補正係数により撮像機器で撮像される画像データを補正する補正部と、を備え、
前記補正係数生成部は、
前記撮像距離から焦点距離を算出する処理と、
前記色収差情報から各々の基準色毎の結像倍率を算出し、当該基準色毎の結像倍率から前記マークにおける色ズレ量を推定色ズレ量として算出する処理と、
前記撮像機器から得られる画像データにおける基準色毎の実測色ズレ量を算出する処理と、
前記推定色ズレ量と、前記実測色ズレ量と、の差分が予め定められた閾値以下になるように前記撮像距離を変更する処理と、
前記変更された前記撮像距離における変更色ズレ量を前記色収差情報から算出し、当該変更色ズレ量を補正する補正係数を前記基準色毎に生成する処理と、を行うこと、
特徴とする画像処理装置。
An image processing apparatus that processes image data obtained from an imaging device that images an imaging object placed on a platen,
A lens data storage unit that stores chromatic aberration information in which the imaging magnification in each reference color of the imaging device corresponds to the focal length;
A mark detection unit that detects an image of a mark included in the image data for each of a plurality of reference colors;
A distance estimation unit for calculating an imaging distance of the mark;
A correction coefficient generation unit that generates a correction coefficient for changing the pixel position for each reference color so that the images of the marks for each of the plurality of reference colors detected by the mark detection unit overlap;
A correction unit that corrects image data picked up by an imaging device using the correction coefficient ,
The correction coefficient generation unit
A process of calculating a focal length from the imaging distance;
A process of calculating an image forming magnification for each reference color from the chromatic aberration information, and calculating an amount of color shift in the mark as an estimated color shift amount from the image forming magnification for each reference color;
A process of calculating an actual color shift amount for each reference color in the image data obtained from the imaging device;
A process of changing the imaging distance so that a difference between the estimated color misregistration amount and the actually measured color misregistration amount is equal to or less than a predetermined threshold;
Calculating a change color shift amount at the changed imaging distance from the chromatic aberration information, and generating a correction coefficient for correcting the change color shift amount for each reference color,
The image processing apparatus according to claim.
原稿台に置かれた撮像対象物を撮像する撮像機器から得られる画像データを処理する画像処理装置であって、  An image processing apparatus that processes image data obtained from an imaging device that images an imaging object placed on a platen,
前記撮像機器の各々の基準色における結像倍率を焦点距離に対応させた色収差情報を記憶するレンズデータ記憶部と、  A lens data storage unit that stores chromatic aberration information in which the imaging magnification of each reference color of the imaging device corresponds to the focal length;
前記画像データに含まれているマークの画像を、複数の基準色毎に検出するマーク検出部と、  A mark detection unit that detects an image of a mark included in the image data for each of a plurality of reference colors;
前記マーク検出部で検出された複数の基準色毎のマークの画像が、重なり合うように基準色毎の画素位置を変更する補正係数を生成する補正係数生成部と、  A correction coefficient generation unit that generates a correction coefficient for changing the pixel position for each reference color so that the images of the marks for each of the plurality of reference colors detected by the mark detection unit overlap;
前記補正係数により撮像機器で撮像される画像データを補正する補正部と、を備え、  A correction unit that corrects image data picked up by an imaging device using the correction coefficient,
前記補正係数生成部は、  The correction coefficient generation unit
前記色収差情報から各々の基準色毎の結像倍率を算出し、当該基準色毎の結像倍率から前記マークの基準位置における色ズレ量を推定色ズレ量として算出する処理と、  A process of calculating an image forming magnification for each reference color from the chromatic aberration information, and calculating an amount of color shift at the reference position of the mark as an estimated color shift amount from the image forming magnification for each reference color;
前記撮像機器から得られる画像データにおける基準色毎の実測色ズレ量を算出する処理と、  A process of calculating an actual color shift amount for each reference color in the image data obtained from the imaging device;
前記推定色ズレ量と、前記実測色ズレ量と、の差分が予め定められた閾値以下になるように前記基準位置を変更する処理と、  A process of changing the reference position so that a difference between the estimated color misregistration amount and the actually measured color misregistration amount is equal to or less than a predetermined threshold;
前記変更された前記基準位置における変更色ズレ量を前記色収差情報から算出し、当該変更色ズレ量を補正する補正係数を前記基準色毎に生成する処理と、を行うこと、  Calculating a change color shift amount at the changed reference position from the chromatic aberration information, and generating a correction coefficient for correcting the change color shift amount for each reference color,
を特徴とする画像処理装置。  An image processing apparatus.
請求項1又は2に記載の画像処理装置であって、
前記マークは、前記画像データに少なくとも三つ以上含まれていること、を特徴とする画像処理装置。
An image processing apparatus according to claim 1 or 2,
An image processing apparatus, wherein at least three marks are included in the image data.
請求項1又は2に記載の画像処理装置であって、
前記マークは、少なくとも矩形状の頂点位置を含むようにされており、
前記補正係数生成部は、前記頂点位置において、複数の基準色毎のマークの画像が、重なり合うように基準色毎の補正係数を生成するものであること、
を特徴とする画像処理装置。
An image processing apparatus according to claim 1 or 2,
The mark includes at least a rectangular vertex position;
The correction coefficient generation unit is configured to generate a correction coefficient for each reference color so that images of marks for each of a plurality of reference colors overlap at the vertex position;
An image processing apparatus.
請求項1乃至の何れか一項に記載の画像処理装置であって、
前記マーク検出部は、検出した前記マークの画像のうち、予め定められた位置にある画素の座標を検出するものであり、
前記補正係数生成部は、一の基準色毎の前記座標が、他の基準色の前記座標と重なり合う位置に配置されるように、前記基準色毎の補正係数を生成するものであること、
を特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 4 ,
The mark detection unit detects coordinates of a pixel at a predetermined position in the detected image of the mark,
The correction coefficient generation unit generates a correction coefficient for each reference color so that the coordinates for each reference color are arranged at positions where the coordinates of the other reference colors overlap.
An image processing apparatus.
コンピュータを、
原稿台に置かれた撮像対象物を撮像する撮像機器から得られる画像データを処理する画像処理装置として機能させるためのプログラムであって、
前記コンピュータを、
前記撮像機器の各々の基準色における結像倍率を焦点距離に対応させた色収差情報を記憶するレンズデータ記憶手段として機能させ、
演算手段に、
前記画像データに含まれているマークの画像を、複数の基準色毎に検出するマーク検出処理と、
前記マークの撮像距離を算出する距離推定処理と、
前記マーク検出処理で検出された複数の基準色毎のマークの画像が、重なり合うように基準色毎の画素位置を変更する補正係数を生成する補正係数生成処理と、
前記補正係数により撮像機器で撮像される画像データを補正する補正処理と、
を行わせ
前記補正係数生成処理は、
前記撮像距離から焦点距離を算出する処理と、
前記色収差情報から各々の基準色毎の結像倍率を算出し、当該基準色毎の結像倍率から前記マークにおける色ズレ量を推定色ズレ量として算出する処理と、
前記撮像機器から得られる画像データにおける基準色毎の実測色ズレ量を算出する処理と、
前記推定色ズレ量と、前記実測色ズレ量と、の差分が予め定められた閾値以下になるように前記撮像距離を変更する処理と、
前記変更された前記撮像距離における変更色ズレ量を前記色収差情報から算出し、当該変更色ズレ量を補正する補正係数を前記基準色毎に生成する処理と、を行うものであること、
を特徴とするプログラム。
Computer
A program for causing an image processing apparatus to function as an image processing apparatus that processes image data obtained from an imaging device that captures an imaging object placed on a document table,
The computer,
Function as lens data storage means for storing chromatic aberration information in which the imaging magnification in each reference color of the imaging device corresponds to the focal length;
In the calculation means,
Mark detection processing for detecting an image of a mark included in the image data for each of a plurality of reference colors;
A distance estimation process for calculating an imaging distance of the mark;
A correction coefficient generation process for generating a correction coefficient for changing the pixel position for each reference color so that the images of the marks for each of the plurality of reference colors detected by the mark detection process overlap,
Correction processing for correcting image data captured by the imaging device using the correction coefficient;
It was carried out,
The correction coefficient generation process includes
A process of calculating a focal length from the imaging distance;
A process of calculating an image forming magnification for each reference color from the chromatic aberration information, and calculating an amount of color shift in the mark as an estimated color shift amount from the image forming magnification for each reference color;
A process of calculating an actual color shift amount for each reference color in the image data obtained from the imaging device;
A process of changing the imaging distance so that a difference between the estimated color misregistration amount and the actually measured color misregistration amount is equal to or less than a predetermined threshold;
Calculating a change color shift amount at the changed imaging distance from the chromatic aberration information, and generating a correction coefficient for correcting the change color shift amount for each reference color,
A program characterized by
コンピュータを、  Computer
原稿台に置かれた撮像対象物を撮像する撮像機器から得られる画像データを処理する画像処理装置として機能させるためのプログラムであって、  A program for causing an image processing apparatus to function as an image processing apparatus that processes image data obtained from an imaging device that captures an imaging object placed on a document table,
前記コンピュータを、  The computer,
前記撮像機器の各々の基準色における結像倍率を焦点距離に対応させた色収差情報を記憶するレンズデータ記憶手段として機能させ、  Function as lens data storage means for storing chromatic aberration information in which the imaging magnification in each reference color of the imaging device corresponds to the focal length;
演算手段に、  In the calculation means,
前記画像データに含まれているマークの画像を、複数の基準色毎に検出するマーク検出処理と、  Mark detection processing for detecting an image of a mark included in the image data for each of a plurality of reference colors;
前記マーク検出処理で検出された複数の基準色毎のマークの画像が、重なり合うように基準色毎の画素位置を変更する補正係数を生成する補正係数生成処理と、  A correction coefficient generation process for generating a correction coefficient for changing the pixel position for each reference color so that the images of the marks for each of the plurality of reference colors detected in the mark detection process overlap;
前記補正係数により撮像機器で撮像される画像データを補正する補正処理と、  Correction processing for correcting image data captured by the imaging device using the correction coefficient;
を行わせ、  Let
前記補正係数生成処理は、  The correction coefficient generation process includes
前記色収差情報から各々の基準色毎の結像倍率を算出し、当該基準色毎の結像倍率から前記マークの基準位置における色ズレ量を推定色ズレ量として算出する処理と、  A process of calculating an image forming magnification for each reference color from the chromatic aberration information, and calculating an amount of color shift at the reference position of the mark as an estimated color shift amount from the image forming magnification for each reference color;
前記撮像機器から得られる画像データにおける基準色毎の実測色ズレ量を算出する処理と、  A process of calculating an actual color shift amount for each reference color in the image data obtained from the imaging device;
前記推定色ズレ量と、前記実測色ズレ量と、の差分が予め定められた閾値以下になるように前記基準位置を変更する処理と、  A process of changing the reference position so that a difference between the estimated color misregistration amount and the actually measured color misregistration amount is equal to or less than a predetermined threshold;
前記変更された前記基準位置における変更色ズレ量を前記色収差情報から算出し、当該変更色ズレ量を補正する補正係数を前記基準色毎に生成する処理と、を行うものであること、  Calculating a change color shift amount at the changed reference position from the chromatic aberration information, and generating a correction coefficient for correcting the change color shift amount for each reference color;
を特徴とするプログラム。  A program characterized by
請求項6又は7に記載のプログラムであって、
前記マークは、前記画像データに少なくとも三つ以上含まれていること、を特徴とするプログラム。
The program according to claim 6 or 7,
A program characterized in that at least three marks are included in the image data.
請求項6又は7に記載のプログラムであって、
前記マークは、少なくとも矩形状の頂点位置を含むようにされており、
前記補正係数生成処理は、前記頂点位置において、複数の基準色毎のマークの画像が、重なり合うように基準色毎の補正係数を生成するものであること、
を特徴とするプログラム。
The program according to claim 6 or 7,
The mark includes at least a rectangular vertex position;
The correction coefficient generation processing is to generate a correction coefficient for each reference color so that images of marks for each of a plurality of reference colors overlap at the vertex position;
A program characterized by
請求項乃至9の何れか一項に記載のプログラムであって、
前記マーク検出処理は、検出した前記マークの画像のうち、予め定められた位置にある画素の座標を検出するものであり、
前記補正係数生成処理は、一の基準色毎の前記座標が、他の基準色の前記座標と重なり合う位置に配置されるように、前記基準色毎の補正係数を生成するものであること、
を特徴とするプログラム。
A program according to any one of claims 6 to 9,
The mark detection process is to detect the coordinates of a pixel at a predetermined position in the detected image of the mark,
The correction coefficient generation process is to generate a correction coefficient for each reference color so that the coordinates for each reference color are arranged at a position overlapping the coordinates of another reference color;
A program characterized by
JP2006234253A 2006-08-30 2006-08-30 Image processing apparatus and program Expired - Fee Related JP4705894B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006234253A JP4705894B2 (en) 2006-08-30 2006-08-30 Image processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006234253A JP4705894B2 (en) 2006-08-30 2006-08-30 Image processing apparatus and program

Publications (2)

Publication Number Publication Date
JP2008060829A JP2008060829A (en) 2008-03-13
JP4705894B2 true JP4705894B2 (en) 2011-06-22

Family

ID=39243091

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006234253A Expired - Fee Related JP4705894B2 (en) 2006-08-30 2006-08-30 Image processing apparatus and program

Country Status (1)

Country Link
JP (1) JP4705894B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5326919B2 (en) * 2009-08-06 2013-10-30 ソニー株式会社 Appearance inspection device
CN114581380A (en) * 2022-02-16 2022-06-03 合肥埃科光电科技股份有限公司 Dispersion correction method based on FPGA and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006074512A (en) * 2004-09-02 2006-03-16 Casio Comput Co Ltd Photographing device, and image processing method, and program for photographing device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08116490A (en) * 1994-10-14 1996-05-07 Olympus Optical Co Ltd Image processing unit
JP3434716B2 (en) * 1997-12-09 2003-08-11 富士写真フイルム株式会社 Image processing method and image processing apparatus

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006074512A (en) * 2004-09-02 2006-03-16 Casio Comput Co Ltd Photographing device, and image processing method, and program for photographing device

Also Published As

Publication number Publication date
JP2008060829A (en) 2008-03-13

Similar Documents

Publication Publication Date Title
US8259216B2 (en) Interchangeable lens camera system having autofocusing function
JP5075757B2 (en) Image processing apparatus, image processing program, image processing method, and electronic apparatus
JP6261676B1 (en) Image processing apparatus, image processing method, and image processing program
JP2005006228A (en) Projector
JP4700993B2 (en) Imaging device
JP2011028048A (en) Image capturing apparatus, and method of controlling the same
JP2004317245A (en) Distance detection device, distance detection method and distance detection program
JP4705894B2 (en) Image processing apparatus and program
JP4863441B2 (en) Imaging apparatus and control method thereof
WO2020008832A1 (en) Distance measurement camera
CN107666605B (en) Image processing apparatus, image capturing apparatus, image processing method, and storage medium
JP2012147281A (en) Image processing apparatus
JP5446285B2 (en) Image processing apparatus and image processing method
JP5489545B2 (en) Imaging system and imaging method
JP2006145755A (en) Lens position confirmation chart, mark position detection method, and mark position detection program
JP2006059270A (en) Method for correcting distortion of image
JP6214713B1 (en) Image processing apparatus, imaging apparatus, lens apparatus, image processing method, program, storage medium, and information processing method
JP2005043085A (en) Angle detector and projector equipped with the same
JP2004153323A (en) Chromatic aberration correction image processing system
JP7463133B2 (en) Area measuring device, area measuring method, and program
JP7051580B2 (en) Image processing device, image pickup device, image processing method and image processing program
JPH08211284A (en) Focus detector
JP2008182684A (en) Distortion correcting method, distortion correcting device, distortion correcting program, and digital camera
JP2010041416A (en) Image processing unit, image processing method, image processing program, and imaging apparatus
JPH06103182B2 (en) Focus detection device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081002

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100812

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101130

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110127

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110308

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110314

LAPS Cancellation because of no payment of annual fees