JP5251316B2 - Image correction apparatus, image correction method, and image correction program - Google Patents

Image correction apparatus, image correction method, and image correction program Download PDF

Info

Publication number
JP5251316B2
JP5251316B2 JP2008180198A JP2008180198A JP5251316B2 JP 5251316 B2 JP5251316 B2 JP 5251316B2 JP 2008180198 A JP2008180198 A JP 2008180198A JP 2008180198 A JP2008180198 A JP 2008180198A JP 5251316 B2 JP5251316 B2 JP 5251316B2
Authority
JP
Japan
Prior art keywords
image
pixel
pixels
adjacent
edge information
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
JP2008180198A
Other languages
Japanese (ja)
Other versions
JP2010020529A (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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2008180198A priority Critical patent/JP5251316B2/en
Publication of JP2010020529A publication Critical patent/JP2010020529A/en
Application granted granted Critical
Publication of JP5251316B2 publication Critical patent/JP5251316B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像補正装置、画像補正方法および画像補正プログラムに関する。   The present invention relates to an image correction apparatus, an image correction method, and an image correction program.

帳票に印刷された文字やバーコード等を自動認識する場合、例えば、帳票に対向するように設置された非接触型スキャナにより帳票を撮影して画像データを取得する。そして、コンピュータ等を用いてこの画像データを処理することによって文字やバーコード等を認識する。   When automatically recognizing characters, barcodes, or the like printed on a form, for example, the form is photographed by a non-contact scanner installed so as to face the form, and image data is acquired. Then, characters, bar codes, and the like are recognized by processing the image data using a computer or the like.

非接触型スキャナは、撮像素子としてCCD(Charge Coupled Device)イメージセンサやCMOS(Complementary Meal Oxide Semiconductor)イメージセンサ等を用いる。非接触型スキャナの撮像素子の画像数は700万〜1000万画素程度である。非接触型スキャナを用いてA4サイズの用紙を撮影した場合、撮影された画像の解像度は約250dpi〜350dpiである。   The non-contact scanner uses a charge coupled device (CCD) image sensor, a complementary metal oxide semiconductor (CMOS) image sensor, or the like as an image sensor. The number of images of the image sensor of the non-contact scanner is about 7 million to 10 million pixels. When A4 size paper is photographed using a non-contact scanner, the resolution of the photographed image is approximately 250 dpi to 350 dpi.

一方、印刷スペースを削減するために、線幅(エレメント幅)の狭いバーコードを帳票に印刷する場合がある。
このような場合、非接触型スキャナの撮像素子では解像度が不足し、撮影された画像データがバーコードの個々の線幅を正確に再現できないおそれがある。バーコードの個々の線幅を再現できないと、バーコードを正しく認識することができない。
そこで、画素をずらしながら撮影した複数の画像を合成して、撮像素子の実際の解像度よりも高い解像度の画像を生成することが考えられる。解像度の高い画像ではバーコードの各線幅が正確に再現されるため、バーコードを正しく認識することができる。
On the other hand, in order to reduce the printing space, a barcode with a narrow line width (element width) may be printed on a form.
In such a case, the image sensor of the non-contact scanner has insufficient resolution, and the captured image data may not be able to accurately reproduce the individual line widths of the barcode. If the individual line width of the barcode cannot be reproduced, the barcode cannot be recognized correctly.
Therefore, it is conceivable to combine a plurality of images taken while shifting the pixels to generate an image with a resolution higher than the actual resolution of the image sensor. Since each line width of the barcode is accurately reproduced in a high-resolution image, the barcode can be correctly recognized.

低解像度の画像から高解像度の画像を生成する方法として、基準となる画像と、基準となる画像に対して斜め方向に変位させた画像(水平方向と垂直方向にそれぞれ隣接した画素の間の距離の半分の距離だけ画素の位置を変位させた画像)とを合成する方法が知られている(例えば、特許文献1参照)。   As a method of generating a high-resolution image from a low-resolution image, a reference image and an image displaced obliquely with respect to the reference image (distance between pixels adjacent to each other in the horizontal and vertical directions) And an image obtained by displacing the position of the pixel by a half of the distance (see, for example, Patent Document 1).

この方法では、まず2枚の画像を重ねて、画素(以下、実画素という。)が市松状に配置された画像を生成する。次に、各実画素の間の画素が存在しない空の領域の画素(以下、虚画素という。)を、その領域の周辺の実画素から生成する。   In this method, two images are first overlapped to generate an image in which pixels (hereinafter referred to as real pixels) are arranged in a checkered pattern. Next, a pixel in an empty region (hereinafter referred to as an imaginary pixel) in which there is no pixel between each real pixel is generated from the real pixels around the region.

例えば、虚画素の上下左右に隣接する実画素を重み付けして重畳することにより虚画素を生成することができる。しかし、エッジ(隣接した2つの画素の輝度差の大きい)部分では、輝度が高い画素と輝度が低い画素を用いて虚画素が生成されるため、ボケもしくはノイズが発生する場合がある。   For example, the imaginary pixel can be generated by weighting and superimposing the real pixels adjacent to the top, bottom, left and right of the imaginary pixel. However, at the edge (where the luminance difference between two adjacent pixels is large), an imaginary pixel is generated using a pixel with a high luminance and a pixel with a low luminance, so blurring or noise may occur.

そこで、特許文献1に開示されている画像補正方法では、まず、虚画素に隣接する左右の実画素の画素値の差から水平方向の変化量を検出し、上下の実画素の画素値の差から垂直方向の変化量を検出する。そして、画像の水平方向の変化量が垂直方向の変化量よりも小さい場合は、虚画素に隣接する左右の2つの実画素の平均値を虚画素の画素値とする。また、画像の垂直方向の変化量が水平方向の変化量よりも小さい場合は、虚画素に隣接する上下の2つの実画素の平均値を虚画素の画素値とする。水平方向と垂直方向の変化量が両方とも同等である場合は、上下左右の4つの実画素の平均値を虚画素の画素値とする。   Therefore, in the image correction method disclosed in Patent Document 1, first, the amount of change in the horizontal direction is detected from the difference between the pixel values of the left and right real pixels adjacent to the imaginary pixel, and the difference between the pixel values of the upper and lower real pixels is detected. The amount of change in the vertical direction is detected. When the horizontal change amount of the image is smaller than the vertical change amount, the average value of the two right and left real pixels adjacent to the imaginary pixel is set as the pixel value of the imaginary pixel. When the amount of change in the vertical direction of the image is smaller than the amount of change in the horizontal direction, the average value of the upper and lower real pixels adjacent to the imaginary pixel is used as the pixel value of the imaginary pixel. When the amount of change in both the horizontal direction and the vertical direction is the same, the average value of the four real pixels on the top, bottom, left, and right is set as the pixel value of the imaginary pixel.

特開平10−108209号公報Japanese Patent Laid-Open No. 10-108209

しかし、特許文献1に開示されている画像補正方法では、エッジを正しく検出できない場合がある。例えば、撮影されたバーコードの線幅(エレメント幅)と実画素の間隔が等しい場合、左右の実画素の画素値の差と上下の実画素の画素値の差は両方とも0となり、水平方向と垂直方向の変化量は同等となる。このため、上下左右の4つの実画素の平均値が虚画素の画素値とされる。すなわち、エッジを検出することができず、エッジがないとして虚画素が生成される。   However, the image correction method disclosed in Patent Document 1 may not be able to detect edges correctly. For example, when the line width (element width) of the photographed barcode is equal to the interval between the actual pixels, the difference between the pixel values of the left and right actual pixels and the difference between the pixel values of the upper and lower actual pixels are both zero. The amount of change in the vertical direction is the same. For this reason, the average value of four real pixels on the top, bottom, left, and right is the pixel value of the imaginary pixel. In other words, an edge cannot be detected, and an imaginary pixel is generated assuming that there is no edge.

本発明は、上記実情に鑑み、複数の画素が市松状に配置された画像について、エッジを正しく検出し、検出されたエッジに応じて各画素の間の画素が存在しない空の領域の画素を適切に生成することができる画像補正装置、画像補正方法および画像補正プログラムを提供することを目的とする。   In view of the above situation, the present invention correctly detects an edge of an image in which a plurality of pixels are arranged in a checkered pattern, and determines a pixel in an empty region in which no pixel exists between pixels according to the detected edge. An object of the present invention is to provide an image correction apparatus, an image correction method, and an image correction program that can be generated appropriately.

本発明の画像補正装置は、
第1の画像を撮影する第1の撮影手段と、
前記第1の画像の画素の位置に対して、画素列の方向と画素列と異なる方向にそれぞれ隣接した画素の間の距離の半分の距離だけ画素の位置を変位させた第2の画像を撮影する第2の撮影手段と、
前記第1の画像と前記第2の画像に基づいて、複数の画素列で構成されており、当該各画素列には複数の画素と画素の存在しない空の領域とが交互に所定の間隔で配置され、奇数番目の画素列に含まれる画素及び空の領域と偶数番目の画素列に含まれる画素及び空の領域とが画素列の方向にずらして配置された市松配列の画像を生成する市松配列画像生成手段と
前記市松配列の画像から、奇数番目の画素列と偶数番目の画素列にそれぞれ含まれる2つの隣接した画素及び当該2つの隣接した画素の両方に隣接している2つの空の領域と、当該2つの隣接した画素及び当該2つの隣接した画素の両方に隣接している2つの空の領域の周囲の所定の数の画素及び空の領域とを含む画素ブロックを切り出す画素ブロック切出し手段と、
画素値に差がある隣接した2つの画素で構成されるエッジを検出し、前記画素ブロックに含まれるエッジの種別を示すエッジ情報を求めるエッジ情報取得手段と、
前記画素ブロックに含まれる可能性のあるエッジの種別を示すエッジ情報のグループに含まれる個々のエッジ情報ごとに、前記2つの隣接した画素を補正する補正方法及び前記2つの隣接した画素の両方に隣接している2つの空の領域に対応する画素を生成する生成方法とを記憶している補正方法記憶手段と、
前記エッジ情報取得手段で求められたエッジ情報に対応する前記補正方法と前記生成方法を前記補正方法記憶手段から読み出して、読み出された前記補正方法に従って前記2つの隣接した画素を補正し、読み出された前記生成方法に従って前記2つの隣接した画素の両方に隣接した2つの空の領域に対応する画素を生成する画素補正手段と、
を備えることを特徴とする。
The image correction apparatus of the present invention includes:
First photographing means for photographing a first image;
Taking a second image in which the pixel position is displaced by a distance half the distance between adjacent pixels in the direction of the pixel column and in a direction different from the pixel column with respect to the pixel position of the first image Second imaging means for
Based on the first image and the second image, each pixel column is composed of a plurality of pixels and empty areas where no pixels exist alternately at predetermined intervals. A checkered image that generates an image of a checkered arrangement in which pixels and empty regions included in odd-numbered pixel columns and pixels and empty regions included in even-numbered pixel columns are shifted in the direction of the pixel columns. Array image generation means ;
From the checkered array image, two adjacent pixels included in each of the odd-numbered pixel column and the even-numbered pixel column and two empty regions adjacent to both of the two adjacent pixels; Pixel block cutout means for cutting out a pixel block including a predetermined number of pixels and two empty areas around two adjacent pixels and two empty areas adjacent to both of the two adjacent pixels;
Edge information acquisition means for detecting an edge composed of two adjacent pixels having a difference in pixel value and obtaining edge information indicating a type of edge included in the pixel block;
For each piece of edge information included in a group of edge information indicating types of edges that may be included in the pixel block, both the correction method for correcting the two adjacent pixels and the two adjacent pixels Correction method storage means for storing a generation method for generating pixels corresponding to two adjacent empty regions;
The correction method and the generation method corresponding to the edge information obtained by the edge information acquisition unit are read from the correction method storage unit, and the two adjacent pixels are corrected according to the read correction method. Pixel correcting means for generating pixels corresponding to two empty regions adjacent to both of the two adjacent pixels according to the generated generation method;
It is characterized by providing.

また、本発明の画像補正方法は、
第1の画像を撮影する第1の撮影工程と、
前記第1の画像の画素の位置に対して、画素列の方向と画素列と異なる方向にそれぞれ隣接した画素の間の距離の半分の距離だけ画素の位置を変位させた第2の画像を撮影する第2の撮影工程と、
前記第1の画像と前記第2の画像に基づいて、複数の画素列で構成されており、当該各画素列には複数の画素と画素の存在しない空の領域とが交互に所定の間隔で配置され、奇数番目の画素列に含まれる画素及び空の領域と偶数番目の画素列に含まれる画素及び空の領域とが画素列の方向にずらして配置された市松配列の画像を生成する市松配列画像生成工程と
前記市松配列の画像から、奇数番目の画素列と偶数番目の画素列にそれぞれ含まれる2つの隣接した画素及び当該2つの隣接した画素の両方に隣接している2つの空の領域と、当該2つの隣接した画素及び当該2つの隣接した画素の両方に隣接している2つの空の領域の周囲の所定の数の画素及び空の領域とを含む画素ブロックを切り出す画素ブロック切出し工程と、
画素値に差がある隣接した2つの画素で構成されるエッジを検出し、前記画素ブロックに含まれるエッジの種別を示すエッジ情報を求めるエッジ情報取得工程と、
前記画素ブロックに含まれる可能性のあるエッジの種別を示すエッジ情報のグループに含まれる個々のエッジ情報ごとに、前記2つの隣接した画素を補正する補正方法及び前記2つの隣接した画素の両方に隣接している2つの空の領域に対応する画素を生成する生成方法とを記憶している補正方法記憶手段から、前記エッジ情報取得工程で求められたエッジ情報に対応する前記補正方法と前記生成方法を読み出して、読み出された前記補正方法に従って前記2つの隣接した画素を補正し、読み出された前記生成方法に従って前記2つの隣接した画素の両方に隣接した2つの空の領域に対応する画素を生成する画素補正工程と、
を備えることを特徴とする。
Further, the image correction method of the present invention includes:
A first photographing step of photographing a first image;
Taking a second image in which the pixel position is displaced by a distance half the distance between adjacent pixels in the direction of the pixel column and in a direction different from the pixel column with respect to the pixel position of the first image A second imaging step to
Based on the first image and the second image, each pixel column is composed of a plurality of pixels and empty areas where no pixels exist alternately at predetermined intervals. A checkered image that generates an image of a checkered arrangement in which pixels and empty regions included in odd-numbered pixel columns and pixels and empty regions included in even-numbered pixel columns are shifted in the direction of the pixel columns. An array image generation process ;
From the checkered array image, two adjacent pixels included in each of the odd-numbered pixel column and the even-numbered pixel column and two empty regions adjacent to both of the two adjacent pixels; A pixel block cutting step of cutting out a pixel block including a predetermined number of pixels and an empty region around two adjacent pixels and two empty regions adjacent to both of the two adjacent pixels;
An edge information acquisition step of detecting an edge composed of two adjacent pixels having a difference in pixel value and obtaining edge information indicating a type of edge included in the pixel block;
For each piece of edge information included in a group of edge information indicating types of edges that may be included in the pixel block, both the correction method for correcting the two adjacent pixels and the two adjacent pixels The correction method and the generation corresponding to the edge information obtained in the edge information acquisition step from a correction method storage means storing a generation method for generating pixels corresponding to two adjacent empty regions Read out the method, correct the two adjacent pixels according to the read correction method, and correspond to two empty regions adjacent to both of the two adjacent pixels according to the read generation method A pixel correction step for generating pixels;
It is characterized by providing.

また、本発明の画像補正プログラムは、コンピュータに、
第1の画像を撮影する第1の撮影手順と、
前記第1の画像の画素の位置に対して、画素列の方向と画素列と異なる方向にそれぞれ隣接した画素の間の距離の半分の距離だけ画素の位置を変位させた第2の画像を撮影する第2の撮影手順と、
前記第1の画像と前記第2の画像に基づいて、複数の画素列で構成されており、当該各画素列には複数の画素と画素の存在しない空の領域とが交互に所定の間隔で配置され、奇数番目の画素列に含まれる画素及び空の領域と偶数番目の画素列に含まれる画素及び空の領域とが画素列の方向にずらして配置された市松配列の画像を生成する市松配列画像生成手順と
前記市松配列の画像から、奇数番目の画素列と偶数番目の画素列にそれぞれ含まれる2つの隣接した画素及び当該2つの隣接した画素の両方に隣接している2つの空の領域と、当該2つの隣接した画素及び当該2つの隣接した画素の両方に隣接している2つの空の領域の周囲の所定の数の画素及び空の領域とを含む画素ブロックを切り出す画素ブロック切出し手順と、
画素値に差がある隣接した2つの画素で構成されるエッジを検出し、前記画素ブロックに含まれるエッジの種別を示すエッジ情報を求めるエッジ情報取得手順と、
前記画素ブロックに含まれる可能性のあるエッジの種別を示すエッジ情報のグループに含まれる個々のエッジ情報ごとに、前記2つの隣接した画素を補正する補正方法及び前記2つの隣接した画素の両方に隣接している2つの空の領域に対応する画素を生成する生成方法とを記憶している補正方法記憶手段から、前記エッジ情報取得手順で求められたエッジ情報に対応する前記補正方法と前記生成方法を読み出して、読み出された前記補正方法に従って前記2つの隣接した画素を補正し、読み出された前記生成方法に従って前記2つの隣接した画素の両方に隣接した2つの空の領域に対応する画素を生成する画素補正手順と、
を実行させる。
The image correction program of the present invention is stored in a computer.
A first shooting procedure for shooting a first image;
Taking a second image in which the pixel position is displaced by a distance half the distance between adjacent pixels in the direction of the pixel column and in a direction different from the pixel column with respect to the pixel position of the first image A second shooting procedure,
Based on the first image and the second image, each pixel column is composed of a plurality of pixels and empty areas where no pixels exist alternately at predetermined intervals. A checkered image that generates an image of a checkered arrangement in which pixels and empty regions included in odd-numbered pixel columns and pixels and empty regions included in even-numbered pixel columns are shifted in the direction of the pixel columns. A sequence image generation procedure ;
From the checkered array image, two adjacent pixels included in each of the odd-numbered pixel column and the even-numbered pixel column and two empty regions adjacent to both of the two adjacent pixels; A pixel block cutout procedure for cutting out a pixel block including a predetermined number of pixels and an empty region around two adjacent pixels and two empty regions adjacent to both of the two adjacent pixels;
An edge information acquisition procedure for detecting an edge composed of two adjacent pixels having a difference in pixel value and obtaining edge information indicating a type of edge included in the pixel block;
For each piece of edge information included in a group of edge information indicating types of edges that may be included in the pixel block, both the correction method for correcting the two adjacent pixels and the two adjacent pixels The correction method and the generation corresponding to the edge information obtained in the edge information acquisition procedure from the correction method storage means storing a generation method for generating pixels corresponding to two adjacent empty regions Read out the method, correct the two adjacent pixels according to the read correction method, and correspond to two empty regions adjacent to both of the two adjacent pixels according to the read generation method A pixel correction procedure for generating pixels;
Is executed.

本発明によれば、複数の画素が市松状に配置された画像について、エッジを正しく検出し、検出されたエッジに応じて各画素の間の画素が存在しない空の領域の画素を適切に生成することができる。   According to the present invention, for an image in which a plurality of pixels are arranged in a checkered pattern, an edge is correctly detected, and a pixel in an empty area in which there is no pixel between the pixels is appropriately generated according to the detected edge. can do.

本発明の実施の形態に係る画像補正装置1は、図1に示すように、画像撮影部101と、画像保存メモリ121と、画像重ね合せ部111と、画素ブロック切出し部112と、エッジ情報取得部113と、画素補正部114と、最適補正辞書保存メモリ122とを有している。   As shown in FIG. 1, the image correction apparatus 1 according to the embodiment of the present invention includes an image photographing unit 101, an image storage memory 121, an image superimposing unit 111, a pixel block cutout unit 112, and edge information acquisition. Unit 113, pixel correction unit 114, and optimum correction dictionary storage memory 122.

画像撮影部101は、基準となる画像(以下、ずらし無し画像という。)と、基準となる画像に対して斜め方向に変位させた画像(水平方向と垂直方向にそれぞれ隣接した画素の間の距離の半分の距離だけ画素の位置を変位させた画像;以下、ずらし有り画像という。)を撮影する。画像撮影部101は、例えば、非接触型スキャナであり、帳票等を撮影する。   The image capturing unit 101 uses a reference image (hereinafter referred to as a non-shifted image) and an image displaced in an oblique direction with respect to the reference image (distances between pixels adjacent to each other in the horizontal and vertical directions). An image in which the position of the pixel is displaced by a half distance; hereinafter referred to as a shifted image) is taken. The image capturing unit 101 is, for example, a non-contact scanner, and captures a form or the like.

画像保存メモリ121は、画像撮影部101で撮影された2枚の画像(ずらし無し画像とずらし有り画像)を保存する。   The image storage memory 121 stores two images (an image without shifting and an image with shifting) captured by the image capturing unit 101.

画像重ね合せ部111は、画像保存メモリ121からずらし無し画像とずらし有り画像を読み出し、複数の実画素が市松状に配置された画像(以下、市松配列の画像という。)を生成する。
ここで、実画素は、例えば、輝度信号や色差信号を表す画素である。またR(赤)信号、G(緑)信号、B(青)信号のいずれかを表す画素であっても良い。
The image superimposing unit 111 reads out the non-shifted image and the shifted image from the image storage memory 121, and generates an image in which a plurality of real pixels are arranged in a checkered pattern (hereinafter referred to as a checkered array image).
Here, the actual pixel is, for example, a pixel that represents a luminance signal or a color difference signal. Alternatively, the pixel may represent any of an R (red) signal, a G (green) signal, and a B (blue) signal.

画素ブロック切出し部112は、市松配列の画像から、隣接した実画素2個、虚画素2個を含む領域(以後、補正対象領域という。)を中心として所定の数の実画素と虚画素を含む画素ブロックを切出す。画素ブロック切出し部112は、後述するように、補正対象領域を中心とした画素ブロックを、市松配列の画像の左上隅から右下隅まで順次切出す。   The pixel block cutout unit 112 includes a predetermined number of real pixels and imaginary pixels from a checkered array image centering on an area including two adjacent real pixels and two imaginary pixels (hereinafter referred to as a correction target area). Cut out a pixel block. As will be described later, the pixel block cutout unit 112 sequentially cuts out pixel blocks around the correction target region from the upper left corner to the lower right corner of the checkered array image.

エッジ情報取得部113は、後述するように、画素ブロック切出し部112によって切出された画素ブロックに含まれるエッジの種別を示すエッジ情報を求める。   As will be described later, the edge information acquisition unit 113 obtains edge information indicating the type of edge included in the pixel block extracted by the pixel block extraction unit 112.

最適補正辞書保存メモリ122は、最適補正辞書を格納する。最適補正辞書は、後述するように、全てのエッジ情報について、補正対象領域に含まれる実画素2個を最適に補正する方法と、虚画素2個を最適に生成する方法を保持している。
画素補正部114は、最適補正辞書保存メモリ122に格納されている最適補正辞書を参照してエッジ情報取得部113で生成されたエッジ情報に対応する最適な補正方法と生成方法を決定し、補正対象領域の実画素2個を補正し、虚画素2個を生成する。
The optimum correction dictionary storage memory 122 stores the optimum correction dictionary. As will be described later, the optimum correction dictionary holds a method for optimally correcting two real pixels included in the correction target region and a method for optimally generating two imaginary pixels for all edge information.
The pixel correction unit 114 determines an optimum correction method and generation method corresponding to the edge information generated by the edge information acquisition unit 113 with reference to the optimum correction dictionary stored in the optimum correction dictionary storage memory 122, and performs correction. Two real pixels in the target area are corrected to generate two imaginary pixels.

なお、画素ブロック切出し部112は本発明の画素ブロック切出し手段の一例であり、エッジ情報取得部113は本発明のエッジ情報取得手段の一例であり、最適補正辞書保存メモリ122は本発明の補正方法記憶手段の一例であり、画素補正部114は本発明の画素補正手段の一例であり、画像撮影部101は、本発明の第1の撮影手段と第2の撮影手段の一例であり、画像重ね合せ部111は本発明の市松配列画像生成手段の一例である。   The pixel block cutout unit 112 is an example of the pixel block cutout unit of the present invention, the edge information acquisition unit 113 is an example of the edge information acquisition unit of the present invention, and the optimum correction dictionary storage memory 122 is the correction method of the present invention. The pixel correction unit 114 is an example of a storage unit, the pixel correction unit 114 is an example of a pixel correction unit of the present invention, and the image shooting unit 101 is an example of a first shooting unit and a second shooting unit of the present invention. The matching unit 111 is an example of a checkered array image generation unit of the present invention.

本発明の実施の形態に係る画像補正装置2は、図2に示すように、画像撮影部101と、CPU11と、メモリ12と、ハードディスク13で構成することもできる。画像撮影部101は、図1と図2で同一である。   As shown in FIG. 2, the image correction apparatus 2 according to the embodiment of the present invention can be configured by an image photographing unit 101, a CPU 11, a memory 12, and a hard disk 13. The image capturing unit 101 is the same in FIGS.

CPU(Central Processing Unit)11は、プログラマブルなプロセサである。
メモリ12は、RAM(Randam Access Memory)、ROM(Read Only Memory)やフラッシュメモリ等のメモリを含む。メモリ12は、CPU11のプログラムや各種の設定等を記憶する。また、メモリ12は、ワークエリアとして使用される。
ハードディスク13は、ずらし無し画像、ずらし有り画像及び市松配列の画像や最適補正辞書を記憶する。
A CPU (Central Processing Unit) 11 is a programmable processor.
The memory 12 includes memories such as a RAM (Random Access Memory), a ROM (Read Only Memory), and a flash memory. The memory 12 stores a program of the CPU 11 and various settings. The memory 12 is used as a work area.
The hard disk 13 stores a non-shifted image, a shifted image, a checkered array image, and an optimal correction dictionary.

画像補正装置2は、CPU12でプログラムを実行することにより、画像重ね合せ部111と画素ブロック切出し部112とエッジ情報取得部113と画素補正部114を実現する。   The image correction apparatus 2 implements an image superimposing unit 111, a pixel block cutout unit 112, an edge information acquisition unit 113, and a pixel correction unit 114 by executing a program with the CPU 12.

次に、本発明の実施の形態に係る画像補正方法について図3の画像補正処理を参照して説明する。   Next, the image correction method according to the embodiment of the present invention will be described with reference to the image correction processing of FIG.

画像撮影部101は、例えば、帳票に対向するように設置された非接触型スキャナを用いて帳票を撮影し、図4(A)に示すずらし無し画像231とずらし有り画像232を取得する(ステップS101)。
画像撮影部101は、撮影したずらし無し画像231とずらし有り画像232を画像保存メモリ121に格納する(ステップS102)。
ずらし無し画像231とずらし有り画像232の実画素は、例えば、256階調の多値イメージであり、帳票の紙面の白地部分(輝度が高い部分)の実画素の値は大きい。
The image photographing unit 101 photographs a form using, for example, a non-contact scanner installed so as to face the form, and obtains a non-shifted image 231 and a shifted image 232 shown in FIG. S101).
The image photographing unit 101 stores the photographed image 231 without displacement and the image 232 with displacement in the image storage memory 121 (step S102).
The actual pixels of the non-shifted image 231 and the shifted image 232 are, for example, a 256-level multi-valued image, and the value of the actual pixel in the white background portion (the portion with high luminance) of the form is large.

画像重ね合せ部111は、図4(B)に示すように、画像保存メモリ121からずらし無し画像231とずらし有り画像232を読み出し、これらの画像を重ね合わせて、市松配列画像233を生成する(ステップS103)。補正対象枠234の内側が補正の対象である。   As shown in FIG. 4B, the image superimposing unit 111 reads a non-shifted image 231 and a shifted image 232 from the image storage memory 121, and superimposes these images to generate a checkered array image 233 ( Step S103). The inside of the correction target frame 234 is a correction target.

画素ブロック切出し部112は、図5Aに示すように、まず市松配列画像233から1番目の画素ブロック401を切り出す(ステップS104)。画素ブロック401は、市松配列画像233の左上隅に位置しており、18個の実画素で構成される。画素ブロック401は、実画素2個と虚画素2個で構成される補正対象領域402を含む。画素ブロック切出し部112は、切出した画素ブロック401をエッジ情報取得部113に出力する。   As illustrated in FIG. 5A, the pixel block cutout unit 112 first cuts out the first pixel block 401 from the checkered array image 233 (step S104). The pixel block 401 is located in the upper left corner of the checkered array image 233, and is composed of 18 real pixels. The pixel block 401 includes a correction target area 402 including two real pixels and two imaginary pixels. The pixel block cutout unit 112 outputs the cut out pixel block 401 to the edge information acquisition unit 113.

画素ブロック切出し部112は、図5Bに示すように、次に市松配列画像233から2番目の画素ブロック403を切り出す(ステップS104)。画素ブロック403は、実画素2個と虚画素2個で構成される補正対象領域404を含む。画素ブロック切出し部112は、切出した画素ブロック403をエッジ情報取得部113に出力する。
以降、画素ブロック切出し部112は、市松配列画像233の右下隅の最後の画素ブロックまで、市松配列画像233の左から右に、そして上から下に順次画素ブロックを切出し、切出した画素ブロックをエッジ情報取得部113に出力する。
Next, as illustrated in FIG. 5B, the pixel block cutout unit 112 cuts out the second pixel block 403 from the checkered array image 233 (step S104). The pixel block 403 includes a correction target area 404 composed of two real pixels and two imaginary pixels. The pixel block cutout unit 112 outputs the cut out pixel block 403 to the edge information acquisition unit 113.
Thereafter, the pixel block cutout unit 112 cuts out the pixel blocks sequentially from the left to the right of the checkered array image 233 and from the top to the bottom until the last pixel block at the lower right corner of the checkered array image 233, and the extracted pixel blocks are edged. The information is output to the information acquisition unit 113.

エッジ情報取得部113は、図6に示すように、画素ブロック60の中にずらし有り画像の9個の実画素A0〜A8と、ずらし無し画像の9個の実画素B0〜B8を含む。エッジ情報取得部113は、実画素A0〜A8と実画素B0〜B8を基にエッジ情報を求める(ステップS105)。
そして、画素補正部114は、エッジ情報取得部113によって求められたエッジ情報に応じて補正対象領域61に含まれる右上の実画素B4(612)と左下の実画素A4(613)を補正し、左上の虚画素611と右下の虚画素614を生成する(ステップS106)。
As illustrated in FIG. 6, the edge information acquisition unit 113 includes nine actual pixels A0 to A8 of the shifted image and nine actual pixels B0 to B8 of the shifted image in the pixel block 60. The edge information acquisition unit 113 obtains edge information based on the actual pixels A0 to A8 and the actual pixels B0 to B8 (step S105).
Then, the pixel correction unit 114 corrects the upper right real pixel B4 (612) and the lower left real pixel A4 (613) included in the correction target region 61 according to the edge information obtained by the edge information acquisition unit 113, and An upper left imaginary pixel 611 and a lower right imaginary pixel 614 are generated (step S106).

なお、ステップS104は本発明の画素ブロック切出し手段、画素ブロック切出し工程、画素ブロック切出し手順の一例であり、ステップS105は本発明のエッジ情報取得手段、エッジ情報取得工程、エッジ情報取得手順の一例であり、ステップS106は本発明の画素補正手段、画素補正工程、画素補正手順の一例である。   Step S104 is an example of a pixel block cutting means, a pixel block cutting process, and a pixel block cutting procedure of the present invention. Step S105 is an example of an edge information acquisition means, an edge information acquisition process, and an edge information acquisition procedure of the present invention. Step S106 is an example of the pixel correction means, the pixel correction step, and the pixel correction procedure of the present invention.

次に、エッジ情報取得部113と画素補正部114について詳細に説明する。   Next, the edge information acquisition unit 113 and the pixel correction unit 114 will be described in detail.

エッジ情報取得部113は、以下の条件式1〜条件式9に基づいてエッジ情報を求める。   The edge information acquisition unit 113 obtains edge information based on the following conditional expressions 1 to 9.

Figure 0005251316
Figure 0005251316

ここで、T1とT2はそれぞれ予め定められた閾値である。|X|はXの絶対値を意味する。エッジ情報取得部113は、条件式1〜条件式9が満たされる場合は「1」、満たされない場合は「0」とする。エッジ情報取得部113は、条件式1〜条件式9により判定された結果をそれぞれ9ビット目〜1ビット目として9ビットのデータを求める。すなわち、エッジ情報取得部113は、この9ビットのデータをエッジ情報として求める。エッジ情報は512通りである。   Here, T1 and T2 are predetermined threshold values. | X | means the absolute value of X. The edge information acquisition unit 113 sets “1” when the conditional expressions 1 to 9 are satisfied, and “0” when the conditional expressions 1 to 9 are not satisfied. The edge information acquisition unit 113 obtains 9-bit data with the results determined by the conditional expressions 1 to 9 as the 9th to 1st bits, respectively. That is, the edge information acquisition unit 113 obtains the 9-bit data as edge information. There are 512 types of edge information.

条件式1は、補正対象領域61に含まれる2個の実画素A4(613)とB4(612)の値の差が閾値T1より小さい場合に満たされる。すなわち、実画素A4(613)とB4(612)がエッジを構成しない場合に満たされる。この場合、エッジ情報取得部113は、エッジ情報の9ビット目を「1」とする。2個の実画素A4(613)とB4(612)の値の差が閾値T1以上である場合条件式1は満たされない。すなわち、実画素A4(613)とB4(612)がエッジを構成する場合、条件式1は満たされない。この場合、エッジ情報取得部113は、エッジ情報の9ビット目を「0」とする。
エッジ情報取得部113は、同様にして、条件式2〜条件式5により、垂直方向のエッジの有無に応じてエッジ情報の8ビット目〜5ビット目を求める。また、エッジ情報取得部113は、条件式6〜条件式9により、水平方向のエッジの有無に応じてエッジ情報の4ビット目〜1ビット目を求める。
Conditional expression 1 is satisfied when the difference between the values of the two actual pixels A4 (613) and B4 (612) included in the correction target region 61 is smaller than the threshold value T1. That is, it is satisfied when the real pixels A4 (613) and B4 (612) do not constitute an edge. In this case, the edge information acquisition unit 113 sets the ninth bit of the edge information to “1”. Conditional expression 1 is not satisfied when the difference between the values of the two real pixels A4 (613) and B4 (612) is equal to or greater than the threshold value T1. That is, when the real pixels A4 (613) and B4 (612) form an edge, the conditional expression 1 is not satisfied. In this case, the edge information acquisition unit 113 sets the ninth bit of the edge information to “0”.
Similarly, the edge information acquisition unit 113 obtains the 8th to 5th bits of the edge information according to the presence / absence of the edge in the vertical direction using the conditional expressions 2 to 5. Further, the edge information acquisition unit 113 obtains the fourth bit to the first bit of the edge information according to the presence / absence of the edge in the horizontal direction according to the conditional expressions 6 to 9.

例えば、エッジが全く無ければ、エッジ情報は111111111(511)となり、エッジが有れば、エッジ情報は0〜510のいずれかになる。   For example, if there is no edge, the edge information is 111111111 (511), and if there is an edge, the edge information is one of 0 to 510.

エッジ情報取得部113は、画素ブロック60と求められたエッジ情報を画素補正部114に出力する。   The edge information acquisition unit 113 outputs the pixel block 60 and the obtained edge information to the pixel correction unit 114.

最適補正辞書保存メモリ122は、最適補正辞書を記憶している。最適補正辞書は、図7に示すように、エッジ情報に対応して、補正対象領域61内の実画素A4(613)、B4(612)の補正方法と虚画素611、614の生成方法についての情報を保持している。   The optimum correction dictionary storage memory 122 stores an optimum correction dictionary. As shown in FIG. 7, the optimum correction dictionary corresponds to the edge information and relates to the correction method of the real pixels A4 (613) and B4 (612) and the generation method of the imaginary pixels 611 and 614 in the correction target area 61. Holds information.

以下の1−1式〜1−4式は、補正対象領域61内の左上の虚画素611の生成方法を示す。1−1式は、虚画素611の周辺にエッジが無い場合に選択される。1−2式〜1−4式は、虚画素611の周辺にエッジがある場合に、エッジの状況に応じて選択される。   The following formulas 1-1 to 1-4 show a method for generating the upper left imaginary pixel 611 in the correction target region 61. Formula 1-1 is selected when there is no edge around the imaginary pixel 611. Formulas 1-2 to 1-4 are selected according to the state of the edge when there is an edge around the imaginary pixel 611.

Figure 0005251316
Figure 0005251316


以下の2−1式と2−2式は、補正対象領域61内の右上の実画素B4(612)の補正方法を示す。2−1式は、実画素B4(612)の周辺にエッジが無い場合に選択される。2−1式は、実画素B4(612)に平滑化処理を施す。2−2式は、実画素B4(612)の周辺にエッジがある場合に選択される。2−2式は、実画素B4(612)をそのまま出力する。

The following formulas 2-1 and 2-2 show how to correct the upper right real pixel B4 (612) in the correction target area 61. Formula 2-1 is selected when there is no edge around the actual pixel B4 (612). In Formula 2-1, smoothing processing is performed on the actual pixel B4 (612). Formula 2-2 is selected when there is an edge around the actual pixel B4 (612). Equation 2-2 outputs the actual pixel B4 (612) as it is.

Figure 0005251316
Figure 0005251316

以下の3−1式と3−2式は、補正対象領域61内の左下の実画素A4(613)の補正方法を示す。   Equations 3-1 and 3-2 below show a method of correcting the lower left real pixel A4 (613) in the correction target region 61.

Figure 0005251316
Figure 0005251316

以下の4−1式〜2−4式は、補正対象領域61内の右下の虚画素614の生成方法を示す。   The following expressions 4-1 to 2-4 indicate a method for generating the lower right imaginary pixel 614 in the correction target region 61.

Figure 0005251316
Figure 0005251316

画素補正部114は、最適補正辞書保存メモリ122に記憶されている最適補正辞書を参照して、画素ブロックに含まれる補正対象領域の実画素を補正し、虚画素に対応する画素を生成する。画素補正部114は、急激に輝度が変化するエッジ付近でのノイズを軽減し、エッジが無い部分(帳票の背景部分)のノイズも軽減した補正画像(高解像度画像)を生成する。   The pixel correction unit 114 refers to the optimal correction dictionary stored in the optimal correction dictionary storage memory 122, corrects the real pixel in the correction target area included in the pixel block, and generates a pixel corresponding to the imaginary pixel. The pixel correction unit 114 generates a corrected image (high-resolution image) in which noise near the edge where the luminance changes abruptly is reduced, and noise in a portion without the edge (background portion of the form) is also reduced.

なお、画像補正装置2では、CPU11が画素ブロック切出し部112と、エッジ情報取得部113と、画素補正部114の処理をシーケンシャルに実行する。CPU11は、画素補正部114の処理が終了するごとに、終了した画素ブロックが市松配列画像233の右下隅の最後の画素ブロックであるか否かを判断する。CPU11は、最後の画素ブロックでない場合、ステップS104に戻り、画素ブロック切出し部112の処理を実行する。CPU11は、最後の画素ブロックである場合、画像補正処理を終了する。   In the image correction apparatus 2, the CPU 11 sequentially executes the processes of the pixel block cutout unit 112, the edge information acquisition unit 113, and the pixel correction unit 114. Each time the processing of the pixel correction unit 114 ends, the CPU 11 determines whether the ended pixel block is the last pixel block at the lower right corner of the checkered array image 233. If it is not the last pixel block, the CPU 11 returns to step S104 and executes the process of the pixel block cutout unit 112. If it is the last pixel block, the CPU 11 ends the image correction process.

次に、具体例について説明する。
図8(A)と図8(B)は、画像撮影部101で撮影された垂直方向にエッジがある画像の一例である。図8(A)はずらし無し画像であり、図8(B)はずらし有り画像である。画像重ね合せ部111は、これらの画像を重ね合わせて図9に示す市松配列の画像を生成する。
Next, a specific example will be described.
FIG. 8A and FIG. 8B are examples of images with edges in the vertical direction captured by the image capturing unit 101. FIG. 8A shows an image without shifting, and FIG. 8B shows an image with shifting. The image superimposing unit 111 superimposes these images to generate a checkered array image shown in FIG.

閾値T1=16、T2=32であるとき、エッジ情報取得部113は、図9の市松配列の画像について、条件式1〜条件式9に従って011110000(240)と011110010(242)の2通りのエッジ情報を求める。
画素補正部114は、例えばエッジ情報011110000(240)について図7の最適補正辞書を参照し、左上虚画素611を1−2式、右上実画素612を2−2式、左下実画素613を3−2式、右下虚画素614を4−2式の方法でそれぞれ補正または生成する。画素補正部114は、補正された垂直方向にエッジがある画像として図10に示す画像を出力する。
When the threshold values T1 = 16 and T2 = 32, the edge information acquisition unit 113 performs two kinds of edges of 011110000 (240) and 011110010 (242) according to Conditional Expression 1 to Conditional Expression 9 for the checkered array image of FIG. Ask for information.
The pixel correction unit 114 refers to, for example, the optimum correction dictionary in FIG. 7 for the edge information 011110000 (240), and sets the upper left imaginary pixel 611 to 1-2, the upper right real pixel 612 to 2-2, and the lower left actual pixel 613 to 3 -2 and the lower right imaginary pixel 614 are corrected or generated by the method of 4-2, respectively. The pixel correction unit 114 outputs the image shown in FIG. 10 as an image having an edge in the corrected vertical direction.

図11(A)と図11(B)は、画像撮影部101で撮影された水平方向にエッジがある画像の一例である。図11(A)はずらし無し画像であり、図11(B)はずらし有り画像である。画像重ね合せ部111は、これらの画像を重ね合わせて図12に示す市松配列の画像を生成する。   FIG. 11A and FIG. 11B are examples of images with edges in the horizontal direction captured by the image capturing unit 101. FIG. 11A shows an image without shifting, and FIG. 11B shows an image with shifting. The image superimposing unit 111 superimposes these images to generate a checkered array image shown in FIG.

閾値T1=16、T2=32であるとき、エッジ情報取得部113は、図12の市松配列の画像について、条件式1〜条件式9に従って000011111(31)と000001111(15)の2通りのエッジ情報を求める。
画素補正部114は、例えばエッジ情報000011111(31)について、図7の最適補正辞書を参照し、左上虚画素611を1−3式、右上実画素612を2−2式、左下実画素613を3−2式、右下虚画素614を4−3式の方法でそれぞれ補正または生成する。画素補正部114は、補正された画像として図13に示す画像を出力する。
When the thresholds T1 = 16 and T2 = 32, the edge information acquisition unit 113 performs two kinds of edges of 000011111 (31) and 0000011111 (15) according to the conditional expressions 1 to 9 for the checkered array image of FIG. Ask for information.
For example, with respect to the edge information 000011111 (31), the pixel correction unit 114 refers to the optimal correction dictionary in FIG. 7, and sets the upper left imaginary pixel 611 to the 1-3 formula, the upper right real pixel 612 to the 2-2 formula, and the lower left real pixel 613 to the The formula 3-2 and the lower right imaginary pixel 614 are corrected or generated by the method of formula 4-3, respectively. The pixel correction unit 114 outputs the image shown in FIG. 13 as the corrected image.

また、例えば、帳票の背景部分のようにエッジが無い場合、エッジ情報は111111111(511)である。画素補正部114は、図7の最適補正辞書を参照し、左上虚画素611を1−1式、右上実画素612を2−1式、左下実画素613を3−1式、右下虚画素614を4−1式の方法でそれぞれ補正または生成する。これらは周囲の画素の平均値による補正であり、画素補正部114は、紙面ノイズなどを除去する平滑化処理を施すことになる。   For example, when there is no edge as in the background portion of the form, the edge information is 111111111 (511). The pixel correction unit 114 refers to the optimum correction dictionary in FIG. 7, and the upper left imaginary pixel 611 is set to 1-1, the upper right real pixel 612 is set to 2-1, the lower left real pixel 613 is set to 3-1, and the lower right imaginary pixel. Each of 614 is corrected or generated by the method of Formula 4-1. These are corrections based on the average value of surrounding pixels, and the pixel correction unit 114 performs a smoothing process to remove paper surface noise and the like.

図14は、本発明の実施形態の変形例である画像補正装置3を示す。図1と図14の同一の構成要素には同じ符号が付されている。図14の画像補正装置3は、解像度変換部115を有する点が図1の画像補正装置1と異なる。
水平方向と垂直方向についてそれぞれ隣接した画素の間の距離の半分だけ画素の位置を変位させて高解像度化すると、縦横の解像度が元の画像の2倍相当に固定される。解像度変換部115は、ユーザの要求に応じて出力画像の解像度を変更する。
解像度変換部115は、画素補正部114で補正された画像(補正画像)を入力し、補正画像の解像度と要求された解像度から倍率を算出し、線形補間法あるいは3次補間法を用いて補正画像に対して縮小処理を施す。そして、解像度変換部115は、元の画像の解像度と補正画像の解像度(2倍相当)の間の解像度の画像を出力する。
FIG. 14 shows an image correction apparatus 3 which is a modification of the embodiment of the present invention. 1 and 14 are denoted by the same reference numerals. The image correction apparatus 3 in FIG. 14 is different from the image correction apparatus 1 in FIG.
When the pixel position is displaced by half the distance between adjacent pixels in the horizontal direction and the vertical direction to increase the resolution, the vertical and horizontal resolution is fixed to be equivalent to twice the original image. The resolution conversion unit 115 changes the resolution of the output image in response to a user request.
The resolution conversion unit 115 inputs the image (corrected image) corrected by the pixel correction unit 114, calculates the magnification from the resolution of the corrected image and the requested resolution, and corrects it using a linear interpolation method or a cubic interpolation method. Reduce the image. Then, the resolution conversion unit 115 outputs an image having a resolution between the resolution of the original image and the resolution of the corrected image (equivalent to twice).

本発明によれば、複数の実画素が市松状に配置された画像(市松配列の画像)について、エッジを正しく検出し、エッジ付近にノイズを発生することなく、高品質で高解像度な画像を生成することができる。特に、条件式1は、補正対象領域に含まれる2個の実画素で構成されるエッジの有無を判定する。このため、例えば、撮影されたバーコードの線幅(エレメント幅)と実画素の間隔が等しい場合でも、エッジを検出することができ、エッジがあるにもかかわらず平滑化処理が施されることを防止できる。
また、実画素についてエッジが無い部分(ベタ塗り部分)に平滑化処理を施すため、エッジが無い部分についてもノイズを軽減することができる。
According to the present invention, for an image in which a plurality of real pixels are arranged in a checkered pattern (an image in a checkered pattern), a high-quality and high-resolution image can be obtained without detecting the edge correctly and generating noise near the edge. Can be generated. In particular, Conditional Expression 1 determines whether or not there is an edge composed of two real pixels included in the correction target area. For this reason, for example, even when the line width (element width) of the photographed barcode is equal to the interval between the actual pixels, the edge can be detected, and smoothing processing is performed despite the presence of the edge. Can be prevented.
In addition, since smoothing processing is performed on a portion where there is no edge (solid-filled portion) for an actual pixel, noise can be reduced even in a portion where there is no edge.

更に、本発明によれば、最適補正辞書が規定する補正対象領域内の実画素の補正方法と虚画素の生成方法についての情報を適宜変更することができる。必要に応じて最適な補正方法と生成方法を選択することによって、補正された画像を高画質化することができる。   Furthermore, according to the present invention, it is possible to appropriately change the information about the correction method of the real pixel and the generation method of the imaginary pixel in the correction target area defined by the optimal correction dictionary. By selecting an optimal correction method and generation method as needed, the corrected image can be improved in image quality.

なお、上記実施形態では、エッジ情報取得部113は輝度信号に基づいてエッジ情報を求めるとしたが、エッジ情報取得部113は色差信号やR(赤)信号、G(緑)信号、B(青)信号を基にエッジ情報を求めても良い。   In the above embodiment, the edge information acquisition unit 113 obtains edge information based on the luminance signal. However, the edge information acquisition unit 113 performs color difference signals, R (red) signals, G (green) signals, and B (blue). ) Edge information may be obtained based on the signal.

以上、本発明の実施の形態について説明したが、設計上の都合やその他の要因によって必要となる様々な修正や組み合わせは、請求項に記載されている発明や発明の実施の形態に記載されている具体例に対応する発明の範囲に含まれると理解されるべきである。   Although the embodiments of the present invention have been described above, various modifications and combinations necessary for design reasons and other factors are described in the inventions and embodiments of the invention described in the claims. It should be understood that the invention falls within the scope of the invention corresponding to the specific example.

本発明の実施の形態に係る画像補正装置の一例を示す図である。It is a figure which shows an example of the image correction apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係る画像補正装置の別の例を示す図である。It is a figure which shows another example of the image correction apparatus which concerns on embodiment of this invention. 画像補正処理のフロ−チャートの一例を示す図である。It is a figure which shows an example of the flowchart of an image correction process. ずらし無し画像とずらし有り画像から生成される市松配列の画像の一例を示す図である。It is a figure which shows an example of the image of the checkered pattern produced | generated from the image without a shift, and the image with a shift. 市松配列の画像から切出される画素ブロックの一例を示す図である。It is a figure which shows an example of the pixel block cut out from the image of a checkered arrangement | sequence. 市松配列の画像から切出される画素ブロックの一例を示す図である。It is a figure which shows an example of the pixel block cut out from the image of a checkered arrangement | sequence. エッジ情報が求められる画素ブロックとその画素ブロックに含まれる補正対象領域の一例を示す図である。It is a figure which shows an example of the correction target area | region contained in the pixel block from which the edge information is calculated | required, and the pixel block. 最適補正辞書の一例を示す図である。It is a figure which shows an example of the optimal correction dictionary. 垂直方向にエッジがあるずらし無し画像とずらし有り画像の一例を示す図である。It is a figure which shows an example of the image without a shift | offset | difference which has an edge in a perpendicular direction, and a shift-present image. 垂直方向にエッジがある市松配列の画像の一例を示す図である。It is a figure which shows an example of the image of a checkered arrangement | sequence with an edge in a perpendicular direction. 垂直方向にエッジがある補正された画像の一例を示す図である。It is a figure which shows an example of the corrected image which has an edge in a perpendicular direction. 水平方向にエッジがあるずらし無し画像とずらし有り画像の一例を示す図である。It is a figure which shows an example of a non-shifting image with an edge in a horizontal direction, and an image with a shift. 水平方向にエッジがある市松配列の画像の一例を示す図である。It is a figure which shows an example of the image of a checkered arrangement | sequence with an edge in a horizontal direction. 水平方向にエッジがある補正された画像の一例を示す図である。It is a figure which shows an example of the corrected image which has an edge in a horizontal direction. 本発明の実施形態の変形例である画像補正装置の一例を示す図である。It is a figure which shows an example of the image correction apparatus which is a modification of embodiment of this invention.

符号の説明Explanation of symbols

1、2、3…画像補正装置
101…画像撮影部
111…画像重ね合せ部
112…画素ブロック切出し部
113…エッジ情報取得部
114…画素補正部
121…画像保存メモリ
122…最適補正辞書保存メモリ
231…ずらし無し画像
232…ずらし有り画像
233…市松配列画像
234…補正対象枠
401、403…画素ブロック
402、404…補正対象領域
60…画素ブロック
61…補正対象領域
611、614…虚画素
612、613…実画素
DESCRIPTION OF SYMBOLS 1, 2, 3 ... Image correction apparatus 101 ... Image photographing part 111 ... Image superposition part 112 ... Pixel block cutout part 113 ... Edge information acquisition part 114 ... Pixel correction part 121 ... Image storage memory 122 ... Optimal correction dictionary storage memory 231 ... Image without displacement 232 ... Image with displacement 233 ... Checkered array image 234 ... Correction target frame 401, 403 ... Pixel block 402, 404 ... Correction target region 60 ... Pixel block 61 ... Correction target region 611, 614 ... Imaginary pixels 612, 613 ... real pixels

Claims (5)

第1の画像を撮影する第1の撮影手段と、
前記第1の画像の画素の位置に対して、画素列の方向と画素列と異なる方向にそれぞれ隣接した画素の間の距離の半分の距離だけ画素の位置を変位させた第2の画像を撮影する第2の撮影手段と、
前記第1の画像と前記第2の画像に基づいて、複数の画素列で構成されており、当該各画素列には複数の画素と画素の存在しない空の領域とが交互に所定の間隔で配置され、奇数番目の画素列に含まれる画素及び空の領域と偶数番目の画素列に含まれる画素及び空の領域とが画素列の方向にずらして配置された市松配列の画像を生成する市松配列画像生成手段と
前記市松配列の画像から、奇数番目の画素列と偶数番目の画素列にそれぞれ含まれる2つの隣接した画素及び当該2つの隣接した画素の両方に隣接している2つの空の領域と、当該2つの隣接した画素及び当該2つの隣接した画素の両方に隣接している2つの空の領域の周囲の所定の数の画素及び空の領域とを含む画素ブロックを切り出す画素ブロック切出し手段と、
画素値に差がある隣接した2つの画素で構成されるエッジを検出し、前記画素ブロックに含まれるエッジの種別を示すエッジ情報を求めるエッジ情報取得手段と、
前記画素ブロックに含まれる可能性のあるエッジの種別を示すエッジ情報のグループに含まれる個々のエッジ情報ごとに、前記2つの隣接した画素を補正する補正方法及び前記2つの隣接した画素の両方に隣接している2つの空の領域に対応する画素を生成する生成方法とを記憶している補正方法記憶手段と、
前記エッジ情報取得手段で求められたエッジ情報に対応する前記補正方法と前記生成方法を前記補正方法記憶手段から読み出して、読み出された前記補正方法に従って前記2つの隣接した画素を補正し、読み出された前記生成方法に従って前記2つの隣接した画素の両方に隣接した2つの空の領域に対応する画素を生成する画素補正手段と、
を備えることを特徴とする画像補正装置。
First photographing means for photographing a first image;
Taking a second image in which the pixel position is displaced by a distance half the distance between adjacent pixels in the direction of the pixel column and in a direction different from the pixel column with respect to the pixel position of the first image Second imaging means for
Based on the first image and the second image, each pixel column is composed of a plurality of pixels and empty areas where no pixels exist alternately at predetermined intervals. A checkered image that generates an image of a checkered arrangement in which pixels and empty regions included in odd-numbered pixel columns and pixels and empty regions included in even-numbered pixel columns are shifted in the direction of the pixel columns. Array image generation means ;
From the checkered array image, two adjacent pixels included in each of the odd-numbered pixel column and the even-numbered pixel column and two empty regions adjacent to both of the two adjacent pixels; Pixel block cutout means for cutting out a pixel block including a predetermined number of pixels and two empty areas around two adjacent pixels and two empty areas adjacent to both of the two adjacent pixels;
Edge information acquisition means for detecting an edge composed of two adjacent pixels having a difference in pixel value and obtaining edge information indicating a type of edge included in the pixel block;
For each piece of edge information included in a group of edge information indicating types of edges that may be included in the pixel block, both the correction method for correcting the two adjacent pixels and the two adjacent pixels Correction method storage means for storing a generation method for generating pixels corresponding to two adjacent empty regions;
The correction method and the generation method corresponding to the edge information obtained by the edge information acquisition unit are read from the correction method storage unit, and the two adjacent pixels are corrected according to the read correction method. Pixel correcting means for generating pixels corresponding to two empty regions adjacent to both of the two adjacent pixels according to the generated generation method;
An image correction apparatus comprising:
前記エッジ情報取得手段は、前記2つの隣接した画素におけるエッジの有無に応じたエッジ情報を求め、
前記補正方法記憶手段は、前記2つの隣接した画素におけるエッジの有無に応じたエッジ情報に対応する前記補正方法と前記生成方法を記憶し、
前記画素補正手段は、前記2つの隣接した画素におけるエッジの有無に応じたエッジ情報に対応する前記補正方法と前記生成方法に従って前記2つの隣接した画素を補正し、前記2つの隣接した画素の両方に隣接した2つの空の領域に対応する画素を生成する、
ことを特徴とする請求項1に記載の画像補正装置。
The edge information acquisition means obtains edge information according to the presence or absence of an edge in the two adjacent pixels,
The correction method storage means stores the correction method and the generation method corresponding to edge information according to the presence or absence of an edge in the two adjacent pixels,
The pixel correction means corrects the two adjacent pixels according to the correction method and the generation method corresponding to edge information according to the presence or absence of an edge in the two adjacent pixels, and both the two adjacent pixels are corrected. Generate pixels corresponding to two empty regions adjacent to
The image correction apparatus according to claim 1.
前記エッジ情報取得手段は、前記画素列の方向に存在するエッジと画素列と異なる方向に存在するエッジに応じたエッジ情報を求め、
前記補正方法記憶手段は、前記画素列の方向に存在するエッジと前記画素列と異なる方向に存在するエッジに応じたエッジ情報に対応する前記補正方法と前記生成方法を記憶し、
前記画素補正手段は、前記画素列の方向に存在するエッジと前記画素列と異なる方向に存在するエッジに応じたエッジ情報に対応する前記補正方法と前記生成方法に従って前記2つの隣接した画素を補正し、前記2つの隣接した画素の両方に隣接した2つの空の領域に対応する画素を生成する、
ことを特徴とする請求項1又は2に記載の画像補正装置。
The edge information acquisition means obtains edge information corresponding to an edge existing in the direction of the pixel column and an edge existing in a direction different from the pixel column,
The correction method storage means stores the correction method and the generation method corresponding to edge information corresponding to an edge existing in the direction of the pixel column and an edge existing in a direction different from the pixel column,
The pixel correction unit corrects the two adjacent pixels according to the correction method and the generation method corresponding to edge information corresponding to an edge existing in the direction of the pixel column and an edge existing in a direction different from the pixel column. Generating pixels corresponding to two empty regions adjacent to both of the two adjacent pixels;
The image correction apparatus according to claim 1, wherein the image correction apparatus is an image correction apparatus.
第1の画像を撮影する第1の撮影工程と、
前記第1の画像の画素の位置に対して、画素列の方向と画素列と異なる方向にそれぞれ隣接した画素の間の距離の半分の距離だけ画素の位置を変位させた第2の画像を撮影する第2の撮影工程と、
前記第1の画像と前記第2の画像に基づいて、複数の画素列で構成されており、当該各画素列には複数の画素と画素の存在しない空の領域とが交互に所定の間隔で配置され、奇数番目の画素列に含まれる画素及び空の領域と偶数番目の画素列に含まれる画素及び空の領域とが画素列の方向にずらして配置された市松配列の画像を生成する市松配列画像生成工程と
前記市松配列の画像から、奇数番目の画素列と偶数番目の画素列にそれぞれ含まれる2つの隣接した画素及び当該2つの隣接した画素の両方に隣接している2つの空の領域と、当該2つの隣接した画素及び当該2つの隣接した画素の両方に隣接している2つの空の領域の周囲の所定の数の画素及び空の領域とを含む画素ブロックを切り出す画素ブロック切出し工程と、
画素値に差がある隣接した2つの画素で構成されるエッジを検出し、前記画素ブロックに含まれるエッジの種別を示すエッジ情報を求めるエッジ情報取得工程と、
前記画素ブロックに含まれる可能性のあるエッジの種別を示すエッジ情報のグループに含まれる個々のエッジ情報ごとに、前記2つの隣接した画素を補正する補正方法及び前記2つの隣接した画素の両方に隣接している2つの空の領域に対応する画素を生成する生成方法とを記憶している補正方法記憶手段から、前記エッジ情報取得工程で求められたエッジ情報に対応する前記補正方法と前記生成方法を読み出して、読み出された前記補正方法に従って前記2つの隣接した画素を補正し、読み出された前記生成方法に従って前記2つの隣接した画素の両方に隣接した2つの空の領域に対応する画素を生成する画素補正工程と、
を備えることを特徴とする画像補正方法。
A first photographing step of photographing a first image;
Taking a second image in which the pixel position is displaced by a distance half the distance between adjacent pixels in the direction of the pixel column and in a direction different from the pixel column with respect to the pixel position of the first image A second imaging step to
Based on the first image and the second image, each pixel column is composed of a plurality of pixels and empty areas where no pixels exist alternately at predetermined intervals. A checkered image that generates an image of a checkered arrangement in which pixels and empty regions included in odd-numbered pixel columns and pixels and empty regions included in even-numbered pixel columns are shifted in the direction of the pixel columns. An array image generation process ;
From the checkered array image, two adjacent pixels included in each of the odd-numbered pixel column and the even-numbered pixel column and two empty regions adjacent to both of the two adjacent pixels; A pixel block cutting step of cutting out a pixel block including a predetermined number of pixels and an empty region around two adjacent pixels and two empty regions adjacent to both of the two adjacent pixels;
An edge information acquisition step of detecting an edge composed of two adjacent pixels having a difference in pixel value and obtaining edge information indicating a type of edge included in the pixel block;
For each piece of edge information included in a group of edge information indicating types of edges that may be included in the pixel block, both the correction method for correcting the two adjacent pixels and the two adjacent pixels The correction method and the generation corresponding to the edge information obtained in the edge information acquisition step from a correction method storage means storing a generation method for generating pixels corresponding to two adjacent empty regions Read out the method, correct the two adjacent pixels according to the read correction method, and correspond to two empty regions adjacent to both of the two adjacent pixels according to the read generation method A pixel correction step for generating pixels;
An image correction method comprising:
コンピュータに、
第1の画像を撮影する第1の撮影手順と、
前記第1の画像の画素の位置に対して、画素列の方向と画素列と異なる方向にそれぞれ隣接した画素の間の距離の半分の距離だけ画素の位置を変位させた第2の画像を撮影する第2の撮影手順と、
前記第1の画像と前記第2の画像に基づいて、複数の画素列で構成されており、当該各画素列には複数の画素と画素の存在しない空の領域とが交互に所定の間隔で配置され、奇数番目の画素列に含まれる画素及び空の領域と偶数番目の画素列に含まれる画素及び空の領域とが画素列の方向にずらして配置された市松配列の画像を生成する市松配列画像生成手順と
前記市松配列の画像から、奇数番目の画素列と偶数番目の画素列にそれぞれ含まれる2つの隣接した画素及び当該2つの隣接した画素の両方に隣接している2つの空の領域と、当該2つの隣接した画素及び当該2つの隣接した画素の両方に隣接している2つの空の領域の周囲の所定の数の画素及び空の領域とを含む画素ブロックを切り出す画素ブロック切出し手順と、
画素値に差がある隣接した2つの画素で構成されるエッジを検出し、前記画素ブロックに含まれるエッジの種別を示すエッジ情報を求めるエッジ情報取得手順と、
前記画素ブロックに含まれる可能性のあるエッジの種別を示すエッジ情報のグループに含まれる個々のエッジ情報ごとに、前記2つの隣接した画素を補正する補正方法及び前記2つの隣接した画素の両方に隣接している2つの空の領域に対応する画素を生成する生成方法とを記憶している補正方法記憶手段から、前記エッジ情報取得手順で求められたエッジ情報に対応する前記補正方法と前記生成方法を読み出して、読み出された前記補正方法に従って前記2つの隣接した画素を補正し、読み出された前記生成方法に従って前記2つの隣接した画素の両方に隣接した2つの空の領域に対応する画素を生成する画素補正手順と、
を実行させるための画像補正プログラム。
On the computer,
A first shooting procedure for shooting a first image;
Taking a second image in which the pixel position is displaced by a distance half the distance between adjacent pixels in the direction of the pixel column and in a direction different from the pixel column with respect to the pixel position of the first image A second shooting procedure,
Based on the first image and the second image, each pixel column is composed of a plurality of pixels and empty areas where no pixels exist alternately at predetermined intervals. A checkered image that generates an image of a checkered arrangement in which pixels and empty regions included in odd-numbered pixel columns and pixels and empty regions included in even-numbered pixel columns are shifted in the direction of the pixel columns. A sequence image generation procedure ;
From the checkered array image, two adjacent pixels included in each of the odd-numbered pixel column and the even-numbered pixel column and two empty regions adjacent to both of the two adjacent pixels; A pixel block cutout procedure for cutting out a pixel block including a predetermined number of pixels and an empty region around two adjacent pixels and two empty regions adjacent to both of the two adjacent pixels;
An edge information acquisition procedure for detecting an edge composed of two adjacent pixels having a difference in pixel value and obtaining edge information indicating a type of edge included in the pixel block;
For each piece of edge information included in a group of edge information indicating types of edges that may be included in the pixel block, both the correction method for correcting the two adjacent pixels and the two adjacent pixels The correction method and the generation corresponding to the edge information obtained in the edge information acquisition procedure from the correction method storage means storing a generation method for generating pixels corresponding to two adjacent empty regions Read out the method, correct the two adjacent pixels according to the read correction method, and correspond to two empty regions adjacent to both of the two adjacent pixels according to the read generation method A pixel correction procedure for generating pixels;
An image correction program for executing
JP2008180198A 2008-07-10 2008-07-10 Image correction apparatus, image correction method, and image correction program Expired - Fee Related JP5251316B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008180198A JP5251316B2 (en) 2008-07-10 2008-07-10 Image correction apparatus, image correction method, and image correction program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008180198A JP5251316B2 (en) 2008-07-10 2008-07-10 Image correction apparatus, image correction method, and image correction program

Publications (2)

Publication Number Publication Date
JP2010020529A JP2010020529A (en) 2010-01-28
JP5251316B2 true JP5251316B2 (en) 2013-07-31

Family

ID=41705360

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008180198A Expired - Fee Related JP5251316B2 (en) 2008-07-10 2008-07-10 Image correction apparatus, image correction method, and image correction program

Country Status (1)

Country Link
JP (1) JP5251316B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5526991B2 (en) * 2010-04-30 2014-06-18 キヤノンマーケティングジャパン株式会社 Information processing apparatus, information processing method, program, information processing system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3946866B2 (en) * 1997-07-31 2007-07-18 富士フイルム株式会社 Image signal processing apparatus and medium storing program
JPH11103465A (en) * 1997-09-26 1999-04-13 Nikon Corp Interpolation device and recording medium for recording interpolation processing program
JPH11331857A (en) * 1998-05-13 1999-11-30 Mitsubishi Electric Corp Image pickup device
JP2002112276A (en) * 2000-09-29 2002-04-12 Toshiba Corp Color solid-state image pickup device
JP4104495B2 (en) * 2003-06-18 2008-06-18 シャープ株式会社 Data processing apparatus, image processing apparatus, and camera

Also Published As

Publication number Publication date
JP2010020529A (en) 2010-01-28

Similar Documents

Publication Publication Date Title
JP4727735B2 (en) Effective method to reduce noise and blur in composite still image from rolling shutter camera
JP6254548B2 (en) High capacity 2D color barcode and method for decoding high capacity 2D color barcode
US9649839B2 (en) Image processing apparatus and image processing method
JP4591211B2 (en) Image processing apparatus, image processing method, medium, code reading apparatus, and program
JP5986060B2 (en) Reliable decoding of printed color barcodes with very small data cells
JP6383753B2 (en) High capacity 2D color barcode design and processing method for camera-based applications
US8588521B2 (en) Image processing apparatus and control method therefor
WO2019187967A1 (en) Image processing device and image processing method
US20100290092A1 (en) Image interpolation apparatus and a computer readable storage medium storing instructions of a computer program
US10992837B2 (en) Information processing apparatus, control method thereof, and storage medium
JP6327533B2 (en) Design and processing of high-capacity 2D color barcodes for camera-based applications
KR20060049187A (en) Methods and systems for correcting color distortions
JP5251316B2 (en) Image correction apparatus, image correction method, and image correction program
JP6413542B2 (en) Image processing apparatus and image processing program
US20160026904A1 (en) Image processing apparatus, image processing method, and computer-readable recording medium
JP2005184685A (en) Image processing device, program, and recording medium
JP6073674B2 (en) Image processing apparatus and image forming apparatus
US9811877B2 (en) Image processing device selecting arrangement method for generating arranged image data
US9886648B2 (en) Image processing device generating arranged image data representing arranged image in which images are arranged according to determined relative position
JP2009265925A (en) Image processor and method thereof
JP6025803B2 (en) Image processing device
JP6230467B2 (en) Image processing apparatus and image processing method
US20110051152A1 (en) Image Processing Apparatus, Image Processing Method, And Program
JP5034131B2 (en) Image processing controller, image processing method, and image processing program
JP5147577B2 (en) Image processing apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110513

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121214

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121225

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130225

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130319

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130401

R150 Certificate of patent or registration of utility model

Ref document number: 5251316

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20160426

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees