JP6324174B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP6324174B2
JP6324174B2 JP2014077639A JP2014077639A JP6324174B2 JP 6324174 B2 JP6324174 B2 JP 6324174B2 JP 2014077639 A JP2014077639 A JP 2014077639A JP 2014077639 A JP2014077639 A JP 2014077639A JP 6324174 B2 JP6324174 B2 JP 6324174B2
Authority
JP
Japan
Prior art keywords
image processing
image
storage unit
processing apparatus
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014077639A
Other languages
Japanese (ja)
Other versions
JP2015201677A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2014077639A priority Critical patent/JP6324174B2/en
Publication of JP2015201677A publication Critical patent/JP2015201677A/en
Application granted granted Critical
Publication of JP6324174B2 publication Critical patent/JP6324174B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Description

本発明は、メモリから画像データをバースト読み出しして画像を回転処理する画像処理装置および画像処理方法に関する。   The present invention relates to an image processing apparatus and an image processing method for rotating an image by burst-reading image data from a memory.

近年、画像処理装置において入力画像を任意の角度で回転させる任意角回転処理が要求されることがある。この任意角回転処理は、例えばスキャン時に原稿が傾いていた場合、スキャンした原稿の傾きを測定し、傾きを打ち消すような補正処理(斜行補正)に用いられる。回転前の画像の座標を(x,y)、 回転後の画像の座標を(X,Y)とすると、両者の関係は回転角度θを用いて以下の式(1)で与えられる。ただし、座標(X,Y)が画素の中心である場合に対応する座標(x,y)は必ずしも画素の中心とならないため、一般的に周囲の画素からの補間などによって演算される。   In recent years, an arbitrary angle rotation process for rotating an input image at an arbitrary angle in an image processing apparatus may be required. This arbitrary angle rotation processing is used for correction processing (skew correction) in which, for example, when the document is tilted during scanning, the tilt of the scanned document is measured and the tilt is canceled. If the coordinates of the image before rotation are (x, y) and the coordinates of the image after rotation are (X, Y), the relationship between them is given by the following equation (1) using the rotation angle θ. However, since the coordinate (x, y) corresponding to the case where the coordinate (X, Y) is the center of the pixel is not necessarily the center of the pixel, it is generally calculated by interpolation from surrounding pixels.

Figure 0006324174
Figure 0006324174

従来、画像処理装置に入力された画像データは、装置内のメモリ上で行毎に連続的に格納される。図1(a)は、画像がメモリ上で行毎に連続的に格納されている様子を示す図である。図1(a)において、画像100は幅16画素の画像であり、0,1,2,…の数字は、メモリに格納されている各画素のアドレス(16進数。以降同様。)をそれぞれ示している。例えば、座標(0,0)の画素は0番地,座標(1,0)の画素は1番地,座標(3,2)の座標は23番地に格納されている。このように格納されている入力画像100に、回転角度θの画像回転処理を行うとする(図1(b)を参照)。この時、出力画像における1行は図中の矢印に位置する。そのため、回転された画像の画素値を、補間演算を用いて近傍の画素から算出することになり、例えば図中の網点で示された部分の画素(処理対象画素)が必要となる。   Conventionally, image data input to an image processing apparatus is continuously stored for each row on a memory in the apparatus. FIG. 1A is a diagram illustrating a state in which images are continuously stored for each row in the memory. In FIG. 1A, an image 100 is an image having a width of 16 pixels, and the numbers 0, 1, 2,... Each indicate an address (hexadecimal number; the same applies hereinafter) of each pixel stored in the memory. ing. For example, the pixel at coordinate (0,0) is stored at address 0, the pixel at coordinate (1,0) is stored at address 1, and the coordinate (3,2) is stored at address 23. Assume that image rotation processing at a rotation angle θ is performed on the input image 100 stored in this way (see FIG. 1B). At this time, one line in the output image is located at the arrow in the figure. For this reason, the pixel value of the rotated image is calculated from the neighboring pixels by using an interpolation operation, and for example, a pixel (processing target pixel) of a portion indicated by a halftone dot in the drawing is required.

メモリから処理対象画素を読み出す際、連続した領域についてはバーストアクセスによる高速読み出しが可能である。ここでバースト長を8画素分とすると、図1(b)中の網点部分の画素を全て包含するように読み出すには、1x8画素を8回読み出す必要がある(図1(c)を参照)。この場合、計64画素を読み出すことになるが必要な網点部分の画素(処理対象画素)は36画素であり、非効率的である。このように、行毎にメモリに格納されている画像データに対して斜め方向にアクセスすると、バーストアクセスの効率が上げられず読み出しに時間が掛かる。   When reading the pixel to be processed from the memory, high-speed reading by burst access is possible for continuous areas. Here, assuming that the burst length is 8 pixels, in order to read out all the pixels in the halftone dot portion in FIG. 1B, it is necessary to read out 1 × 8 pixels 8 times (see FIG. 1C). ). In this case, a total of 64 pixels are read out, but the necessary halftone dot pixels (processing target pixels) are 36 pixels, which is inefficient. As described above, if the image data stored in the memory for each row is accessed in an oblique direction, the efficiency of burst access cannot be improved and reading takes time.

この点、例えば特許文献1に記載の方法では、NxN画素単位で画像データをメモリに書き込むことで90°あるいは270°回転時のバースト読み出しを効率化している。   In this regard, for example, in the method described in Patent Document 1, burst reading at 90 ° or 270 ° rotation is made efficient by writing image data in the memory in units of N × N pixels.

また、特許文献2に記載の方法では、回転角度に応じてブロックのサイズおよび形状を選択し、角度が補正されるようにブロック同士の相対位置をずらしながらメモリに書き込んでいる。   In the method described in Patent Document 2, the size and shape of the block are selected according to the rotation angle, and the relative position between the blocks is shifted and written in the memory so that the angle is corrected.

特開2011−188050号公報JP 2011-188050 A 特開2006−203710号公報JP 2006-203710 A

しかしながら、上記特許文献1に記載された方法では、90°および270°という2種類の回転角度のみに適用可能であり、任意の角度に対応できない。   However, the method described in Patent Document 1 can be applied only to two types of rotation angles of 90 ° and 270 °, and cannot cope with an arbitrary angle.

また、上記特許文献2に記載された方法では、ブロックの形状はいずれもほぼ正方形であるため、全ての角度でバーストアクセスに適した形状とはならない。   Further, in the method described in Patent Document 2, since the shapes of the blocks are almost square, the shape is not suitable for burst access at all angles.

特にスキャナでは、一般的にシェーディング補正を行った後に斜行補正を行い、その 後にフィルタ処理などの画像処理という流れでスキャンした画像データが処理される。このような処理順の下で、画像の走査方向をシェーディング補正の方向(副走査方向)に合わせたとき、当該順序で後続する斜行補正を行うと走査方向が斜行角度に応じで変わってしまう。こうなるとシステム性能が低下してしまうことになる。   In particular, in a scanner, generally, after performing shading correction, skew correction is performed, and then scanned image data is processed in a flow of image processing such as filter processing. Under such a processing order, when the scanning direction of the image is matched with the shading correction direction (sub-scanning direction), if the subsequent skew correction is performed in that order, the scanning direction changes depending on the skew angle. End up. This will reduce system performance.

本発明に係る画像処理装置は、入力画像に対し、所定の走査順序で第一の画像処理を施す手段と、前記第一の画像処理が施された画像を所定の格納単位で格納するメモリと、前記メモリから前記所定の格納単位でバースト読み出された画像に対し、任意の角度での回転処理を含む第二の画像処理を施す手段と、前記所定の格納単位を、前記任意の角度に応じて決定する決定手段と、を備えたことを特徴とする。   An image processing apparatus according to the present invention includes a unit that performs first image processing on an input image in a predetermined scanning order, and a memory that stores the image subjected to the first image processing in a predetermined storage unit. Means for performing second image processing including rotation processing at an arbitrary angle on an image read out in burst from the memory in the predetermined storage unit; and the predetermined storage unit at the arbitrary angle. And a determination means for determining the response accordingly.

本発明によれば、任意角回転処理時のバースト読み出しを効率よく行なうことができる。   According to the present invention, burst reading at the time of arbitrary angle rotation processing can be performed efficiently.

従来の画像回転処理の概要を説明する図である。It is a figure explaining the outline | summary of the conventional image rotation process. 実施例1に係る、スキャナ補正処理を実現する画像処理装置の内部構成を示すブロック図である。1 is a block diagram illustrating an internal configuration of an image processing apparatus that realizes scanner correction processing according to Embodiment 1. FIG. バンド垂直順序を説明する図である。It is a figure explaining a band perpendicular order. 入力画像とセンサとの位置関係を説明する図である。It is a figure explaining the positional relationship of an input image and a sensor. 1バンド分のシェーディング補正処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the shading correction process for 1 band. メモリのバースト長が16画素である場合における画像の格納例を示す図である。It is a figure which shows the example of a storage of the image in case the burst length of a memory is 16 pixels. 実施例1におけるタイルの処理順序を示す図である。FIG. 6 is a diagram illustrating a processing order of tiles in the first embodiment. 斜行補正部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of a skew correction part. 2x8のタイルによる位置をずらした書き込みの一例を示す図である。It is a figure which shows an example of the writing which shifted the position by a 2x8 tile. 実施例2に係る画像処理装置の内部構成を示すブロック図である。FIG. 6 is a block diagram illustrating an internal configuration of an image processing apparatus according to a second embodiment. タイル水平順序を説明する図である。It is a figure explaining a tile horizontal order.

以下、本発明を実施する為の形態について図面を用いて説明する。なお、以下の実施例において示す構成は一例にすぎず、本発明は図示された構成に限定されるものではない。   Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings. In addition, the structure shown in the following Examples is only an example, and this invention is not limited to the structure shown in figure.

本実施例では、スキャナで読み取った画像(以下、スキャン画像)に対し、斜行補正を含む一連のスキャナ補正処理を行う態様について説明する。   In this embodiment, a mode in which a series of scanner correction processes including skew correction is performed on an image read by a scanner (hereinafter referred to as a scanned image) will be described.

図2は、本実施例に係る、スキャナ補正処理を実現する画像処理装置の内部構成を示すブロック図である。スキャナ補正処理は、前段画像補正部200における処理と後段画像補正部210における処理とに大別できる。前段画像補正部200に入力される画像データは、ラインセンサにより読み取られた生データである。前段画像補正部200の処理結果は、メモリ220を経由して後段画像補正部210へと入力される。後段画像補正部210の処理結果は、補正済画像(出力画像)として外部へ出力される。また、斜行検出部230は例えば専用のセンサにより構成され、スキャナ(不図示)にセットされた原稿の傾き(搬入角度)θを測定する。測定された角度θはパラメータとして、後述するリオーダ部203および斜行補正部211に送られる。   FIG. 2 is a block diagram illustrating an internal configuration of an image processing apparatus that realizes scanner correction processing according to the present embodiment. Scanner correction processing can be broadly divided into processing in the preceding image correction unit 200 and processing in the subsequent image correction unit 210. The image data input to the pre-stage image correction unit 200 is raw data read by the line sensor. The processing result of the upstream image correction unit 200 is input to the downstream image correction unit 210 via the memory 220. The processing result of the post-stage image correction unit 210 is output to the outside as a corrected image (output image). Further, the skew detection unit 230 is constituted by a dedicated sensor, for example, and measures the inclination (carrying-in angle) θ of the document set on the scanner (not shown). The measured angle θ is sent as a parameter to a reorder unit 203 and a skew feeding correction unit 211 described later.

<前段画像補正部>
まず、前段画像補正部200について詳しく説明する。前段画像補正部200は、HV変換部201、シェーディング補正部202、リオーダ部203で構成される(図2を参照)。
<Pre-stage image correction unit>
First, the pre-stage image correction unit 200 will be described in detail. The pre-stage image correction unit 200 includes an HV conversion unit 201, a shading correction unit 202, and a reorder unit 203 (see FIG. 2).

HV変換部201は、入力画像を、所定の走査順序の画像に変換する処理を行なう。本実施例では、入力画像を副走査方向に分割した複数の領域毎に処理する。以下では、この分割された領域を「バンド」と呼ぶ。図3に示すように、入力画像300の各バンドでは副走査方向への走査が主走査方向に繰り返され、最終的に入力画像300全体が走査される。以降では、図3に示される走査順序をバンド垂直順序と呼ぶこととする。後述するように、シェーディング補正を効率化する目的で、このようなシステム固有の走査順序となっている。HV変換部201でバンド垂直順序の画像へと変換された画像データは、シェーディング補正部202に送られる。   The HV conversion unit 201 performs processing for converting the input image into an image in a predetermined scanning order. In this embodiment, the input image is processed for each of a plurality of areas divided in the sub-scanning direction. Hereinafter, this divided area is referred to as a “band”. As shown in FIG. 3, in each band of the input image 300, scanning in the sub-scanning direction is repeated in the main scanning direction, and finally the entire input image 300 is scanned. Hereinafter, the scanning order shown in FIG. 3 will be referred to as a band vertical order. As will be described later, this system-specific scanning order is used for the purpose of improving shading correction efficiency. The image data converted into an image in the band vertical order by the HV conversion unit 201 is sent to the shading correction unit 202.

シェーディング補正部202は、センサ毎のゲインを補正する処理を行なう。図4は、入力画像300とセンサとの位置関係を説明する図である。一般的なスキャナではセンサ(ラインセンサ)400は主走査方向にセンサ画素が並ぶため、バンド垂直順序の画像における1列は同一のセンサ画素により撮像された画素となる。このためバンド垂直順序では、シェーディング補正に必要なパラメータを列毎に更新すればよいことになり、効率的に処理できる。   The shading correction unit 202 performs a process of correcting the gain for each sensor. FIG. 4 is a diagram illustrating the positional relationship between the input image 300 and the sensor. In a general scanner, the sensor (line sensor) 400 has sensor pixels arranged in the main scanning direction. Therefore, one column in the band vertical order image is a pixel imaged by the same sensor pixel. For this reason, in the band vertical order, parameters necessary for shading correction need only be updated for each column, and processing can be performed efficiently.

図5は、1バンド分のシェーディング補正処理の流れを示すフローチャートである。   FIG. 5 is a flowchart showing the flow of shading correction processing for one band.

ステップ501において、シェーディング補正部202は、センサ画素それぞれのゲインに対応するパラメータであるシェーディングパラメータを取得する。   In step 501, the shading correction unit 202 acquires a shading parameter that is a parameter corresponding to the gain of each sensor pixel.

ステップ502において、シェーディング補正部202は、処理対象となるバンド内の処理対象列における注目画素を決定する。この際、注目画素は、上述したバンド垂直順序に従って決定される。   In step 502, the shading correction unit 202 determines a target pixel in the processing target column in the band to be processed. At this time, the target pixel is determined in accordance with the band vertical order described above.

ステップ503において、シェーディング補正部202は、ステップ501で取得したシェーディングパラメータを用いて、決定された注目画素に対しシェーディング補正処理を行う。   In step 503, the shading correction unit 202 performs a shading correction process on the determined pixel of interest using the shading parameters acquired in step 501.

ステップ504において、シェーディング補正部202は、注目画素が処理対象列の最後の画素かどうかを判定する。注目画素が処理対象列の最後の画素であれば、ステップ505に進む。一方、注目画素が処理対象列の最後の画素でなければステップ502に戻り、次の画素を注目画素に決定し、処理を続行する。   In step 504, the shading correction unit 202 determines whether the target pixel is the last pixel in the processing target column. If the target pixel is the last pixel in the processing target column, the process proceeds to step 505. On the other hand, if the target pixel is not the last pixel in the processing target column, the process returns to step 502, the next pixel is determined as the target pixel, and the processing is continued.

ステップ505において、シェーディング補正部202は、注目画素が処理対象となっているバンド内の最後の画素であるかどうかを判定する。注目画素が処理対象バンド内の最後の画素でなければステップ501に戻り、次の処理対象列のシェーディングパラメータを取得し、次の処理対象列についての処理を続行する。一方、注目画素が処理対象バンド内の最後の画素であれば本処理を終える。   In step 505, the shading correction unit 202 determines whether the target pixel is the last pixel in the band to be processed. If the target pixel is not the last pixel in the processing target band, the process returns to step 501 to acquire the shading parameter of the next processing target column, and the processing for the next processing target column is continued. On the other hand, if the target pixel is the last pixel in the band to be processed, this process ends.

以上が、1バンド分のシェーディング補正処理の内容であり、このような処理がすべてのバンドに対して実行される。このように、走査順序をバンド垂直順序とすることで、列単位で同じシェーディングパラメータを用いることができる。これが例えばバンド内を水平方向に走査する場合は、1画素毎にシェーディングパラメータを取得する必要があるところ、本実施例ではその必要がなく、シェーディングパラメータ取得の頻度を減らすことができる。シェーディング補正された画像のデータは、リオーダ部203に送られる。   The above is the content of the shading correction processing for one band, and such processing is executed for all bands. Thus, by setting the scanning order to the band vertical order, the same shading parameter can be used for each column. For example, when the band is scanned in the horizontal direction, it is necessary to acquire a shading parameter for each pixel. However, in this embodiment, this is not necessary, and the frequency of acquiring the shading parameter can be reduced. The image data subjected to the shading correction is sent to the reorder unit 203.

リオーダ部203は、シェーディング補正された画像データに対し、斜行検出部230で検出された角度θに応じて、後続の斜行補正部211の処理に適した形へと画素列を並び替えて、メモリ220に書き込む。リオーダ部203は、その内部にバンド高さ複数列分を蓄積可能な一時メモリを持ち、これを用いて画素を所定の格納単位毎にパッキングする。図6は、メモリ220のバースト長が16画素である場合の、メモリ220への画像の格納例を示す図である。図6の(a)はタイル形状が1x16の場合、同(b)はタイル形状が2x8の場合、 同(c)はタイル形状が4x4の場合、 同(d)はタイル形状が8x2の場合、 同(e)はタイル形状が16x1の場合にそれぞれ対応している。選択されたいずれかのタイル形状の1タイルがバーストアクセスできるようにパッキングしてメモリ220に配置される。例えば8x2のタイル形状が選択された時であれば、座標(0,0)から座標(7,1)までの8行2列16画素がメモリ220の0番地からf番地に格納されることになる。ここで、タイル形状の選択方法について説明する。   The reorder unit 203 rearranges the pixel rows of the image data subjected to the shading correction into a shape suitable for the processing of the subsequent skew correction unit 211 according to the angle θ detected by the skew detection unit 230. Write to the memory 220. The reorder unit 203 has a temporary memory capable of accumulating a plurality of band heights therein, and packs pixels for each predetermined storage unit using the temporary memory. FIG. 6 is a diagram illustrating an example of storing an image in the memory 220 when the burst length of the memory 220 is 16 pixels. Fig. 6 (a) shows the case where the tile shape is 1x16, (b) shows the case where the tile shape is 2x8, (c) shows the case where the tile shape is 4x4, and (d) shows the case where the tile shape is 8x2. (E) corresponds to the case where the tile shape is 16 × 1. One tile of any selected tile shape is packed in the memory 220 so that it can be burst-accessed. For example, when an 8x2 tile shape is selected, 8 rows by 2 columns 16 pixels from coordinates (0,0) to coordinates (7,1) are stored from address 0 to address f in memory 220. Become. Here, a tile shape selection method will be described.

タイル形状は、タイルの対角線と走査方向(バンド垂直順序では副走査方向)とのなす角が、検出された角度(回転角度)θと最も近いものを選択すればよい。図6の(a)〜(e)に示した1x16, 2x8, 4x4, 8x2, 16x1の各タイル形状の場合、対角線と副走査方向とのなす角は、それぞれarctan(16)、arctan(4)、arctan(1)、arctan(1/4)、arctan(1/16) で与えられる。例えば、回転角度θが45°近傍であれば4x4のタイル形状を選択すればよいことになる。そして、選択の際は、回転角度θに基づいて、タイルの対角線と走査方向とのなす角を求め、最も適切なタイル形状を選択するようにすればよい。或いは、回転角度θとタイル形状との対応関係を規定したテーブルを予め用意しておき、当該テーブルを参照して、検出された角度θに応じたタイル形状を選択するようにしてもよい。このようにして検出された角度θに応じてメモリへの格納単位を決定することで、1つのタイルに含まれ得る1走査分の画素数を最大化することができ、バーストアクセスの効率を上げることができる。   The tile shape may be selected such that the angle formed by the diagonal line of the tile and the scanning direction (sub-scanning direction in the band vertical order) is closest to the detected angle (rotation angle) θ. In the case of each tile shape of 1x16, 2x8, 4x4, 8x2, and 16x1 shown in (a) to (e) of FIG. , Arctan (1), arctan (1/4), arctan (1/16). For example, if the rotation angle θ is around 45 °, a 4 × 4 tile shape may be selected. At the time of selection, the angle formed between the diagonal line of the tile and the scanning direction may be obtained based on the rotation angle θ, and the most appropriate tile shape may be selected. Alternatively, a table that defines the correspondence between the rotation angle θ and the tile shape may be prepared in advance, and the tile shape corresponding to the detected angle θ may be selected with reference to the table. By determining the storage unit in the memory according to the detected angle θ, the number of pixels for one scan that can be included in one tile can be maximized, and the efficiency of burst access is increased. be able to.

なお、タイル形状の選択肢は、メモリ220にアクセスするバースト長をN画素分としたとき、N=PxQを満たす自然数PとQ の組合せ(縦P画素、横Q画素のタイル形状)を選択肢とすればよい。例えばN=12であれば、選択対象となるタイル形状の候補としては、1x12、2x6、 3x4、4x3、6x2、12x1となる。タイル形状をこのような縦P画素、横Q画素の矩形領域とすることで、画像をもれなくメモリ220に格納でき、またメモリアドレスも単純な演算により求めることができる。   The choice of tile shape can be a combination of natural numbers P and Q (vertical P pixel, horizontal Q pixel tile shape) satisfying N = PxQ, where the burst length for accessing the memory 220 is N pixels. That's fine. For example, if N = 12, the candidate tile shapes to be selected are 1 × 12, 2 × 6, 3 × 4, 4 × 3, 6 × 2, and 12 × 1. By setting the tile shape to a rectangular region of such vertical P pixels and horizontal Q pixels, it is possible to store all the images in the memory 220, and the memory address can be obtained by a simple calculation.

<後段画像補正部>
次に、後段画像補正部210について詳しく説明する。
<Second-stage image correction unit>
Next, the post-stage image correction unit 210 will be described in detail.

後段画像補正部210は、斜行補正部211、フィルタ処理部212で構成される(図2を参照)。   The post-stage image correction unit 210 includes a skew correction unit 211 and a filter processing unit 212 (see FIG. 2).

リオーダ部203によってメモリ220に格納された画像(対象画像)は、その書き込み時における格納単位でバースト読み出しされて斜行補正部211へと送られる。ここで、タイル形状として8x2が選択された場合を例に、メモリ220に格納された画像データが斜行補正部211へと送られる様子を説明する。図7の(a)はバンド垂直順序の画像1バンド分をθ回転させた状態を示す図であり、同(b)は格納単位でバースト読み出しされる際の順序を1〜39の数字で示している。斜行補正部211からの出力がこの順序となるので、斜行補正部211への入力は、図7(b)に示される順序に従い格納単位(ここでは8x2のタイル)でメモリ220から読み出されることになる。なお、角度θはページ毎に変わり得るため、この順序もページ毎に変わり得ることになる。   The image (target image) stored in the memory 220 by the reorder unit 203 is burst read in the storage unit at the time of writing and sent to the skew correction unit 211. Here, taking a case where 8 × 2 is selected as the tile shape as an example, a state in which the image data stored in the memory 220 is sent to the skew feeding correction unit 211 will be described. FIG. 7A is a diagram showing a state in which one band in the band vertical order is rotated by θ, and FIG. 7B shows the order when burst reading is performed in storage units by numbers 1 to 39. ing. Since the output from the skew correction unit 211 is in this order, the input to the skew correction unit 211 is read from the memory 220 in storage units (here, 8 × 2 tiles) according to the order shown in FIG. 7B. It will be. Since the angle θ can be changed for each page, this order can also be changed for each page.

図8は、斜行補正部211の内部構成を示すブロック図である。斜行補正部211に入力された8x2タイルのデータはまずバッファ810に蓄積される。バッファ810は、8x2タイルデータを複数保持可能であり、すべての画素が現在のバンド内で参照されなくなるまで保持する(現在のバンド内で参照されなくなった画素は随時破棄する。)。次に、バッファ810から補間に必要な所定の参照画素群を取り出し、補間演算部820へ送る。所定の参照画素群は、例えば補間演算部820での演算が線形補間であれば、処理対象画素の近傍2x2の画素群となる。座標演算部830は、処理対象画素の座標をバンド垂直順序に従って更新しながら、それに対応する回転前の座標を、角度θを用いて計算する。これにより、バッファ810に対しては、補間演算に必要な参照画素群の座標及び現在のバンド内ではもはや参照されない非参照画素の座標を送る。そして、補間演算部820に対しては、補間演算のパラメータ(位相)を送る。また、メモリ220に対しては、次に読み出す8x2タイルのメモリアドレスを送る。こうして、補間演算部820における補間演算結果(角度θに応じて回転処理を施した画素のデータ)が、バンド垂直順序でフィルタ処理部212へと出力される。
フィルタ処理部212は、任意の角度で回転処理された画素のデータに対し、バッファを用いて蓄積しながら例えば3x3フィルタ演算を実行し、ノイズ除去などを行う。フィルタ処理された画像データは外部へと出力される。
FIG. 8 is a block diagram illustrating an internal configuration of the skew feeding correction unit 211. The 8 × 2 tile data input to the skew correction unit 211 is first stored in the buffer 810. The buffer 810 can hold a plurality of 8 × 2 tile data, and holds all the pixels until they are not referred to in the current band (pixels that are no longer referred to in the current band are discarded at any time). Next, a predetermined reference pixel group necessary for interpolation is extracted from the buffer 810 and sent to the interpolation calculation unit 820. The predetermined reference pixel group is, for example, a 2 × 2 pixel group in the vicinity of the processing target pixel if the calculation in the interpolation calculation unit 820 is linear interpolation. The coordinate calculation unit 830 updates the coordinates of the processing target pixel in accordance with the band vertical order, and calculates the corresponding coordinates before rotation using the angle θ. As a result, the coordinates of the reference pixel group necessary for the interpolation operation and the coordinates of the non-reference pixels that are no longer referred to in the current band are sent to the buffer 810. Then, an interpolation calculation parameter (phase) is sent to the interpolation calculation unit 820. Further, the memory address of the 8 × 2 tile to be read next is sent to the memory 220. In this way, the interpolation calculation result (pixel data subjected to rotation processing according to the angle θ) in the interpolation calculation unit 820 is output to the filter processing unit 212 in the band vertical order.
The filter processing unit 212 performs, for example, 3 × 3 filter operation on the pixel data rotated at an arbitrary angle while accumulating using a buffer, and performs noise removal and the like. The filtered image data is output to the outside.

斜行補正部211及びフィルタ処理部212では、周辺画素を参照するための一定量の遅延バッファが必要であるが、バンド垂直順序で処理することで遅延バッファの容量はバンドの高さ依存となる。すなわち、本実施例の手法によれば、原画像のサイズに依存しない画像処理装置を実現することが可能となる。   The skew correction unit 211 and the filter processing unit 212 require a certain amount of delay buffer for referring to surrounding pixels. However, the delay buffer capacity depends on the height of the band by processing in the band vertical order. . That is, according to the method of the present embodiment, it is possible to realize an image processing apparatus that does not depend on the size of the original image.

以上説明したように本実施例によれば、回転角度θに従って適応的にメモリへの書き込み単位の縦横比が変更される。これにより、バースト読み出しの効率を高めることができる。特に、シェーディング補正と斜行補正の双方における走査順序を考慮してメモリに格納単位を決定しているので、ページ毎に変わり得る斜行角度に依らない安定したシステム性能を実現できる。   As described above, according to the present embodiment, the aspect ratio of the write unit to the memory is adaptively changed according to the rotation angle θ. Thereby, the efficiency of burst reading can be increased. In particular, since the storage unit is determined in consideration of the scanning order in both shading correction and skew correction, stable system performance independent of the skew angle that can change from page to page can be realized.

なお、前段画像補正部200内に、回転処理に不必要なタイルを破棄する機能を持たせてもよい。例えば、図7(b)におけるバンド1の左上端のタイル710は回転処理で参照されないためメモリ220に書き込む必要はない。したがって、このような不必要なタイルを破棄する構成を別途設けてもよい。   Note that the pre-stage image correction unit 200 may have a function of discarding tiles unnecessary for the rotation process. For example, the tile 710 at the upper left end of the band 1 in FIG. Therefore, a configuration for discarding such unnecessary tiles may be provided separately.

また、画素の走査順序は本実施例で説明した順序に限定されるものではない。一般に、走査順序が回転角度に依らない所定の順序として回転処理後に出力する場合、回転処理への入力は回転角度に依存する斜め方向の入力順序となる。この時、回転対象の画像をメモリに書き込む際に回転角度θが分かっていれば、同様に本発明を適用することができる。   Further, the scanning order of the pixels is not limited to the order described in this embodiment. In general, when the scan order is output after the rotation process as a predetermined order that does not depend on the rotation angle, the input to the rotation process is an oblique input order that depends on the rotation angle. At this time, if the rotation angle θ is known when the rotation target image is written in the memory, the present invention can be similarly applied.

さらに、シェーディング補正部202やフィルタ処理部212は、他の処理と入れ替えてもよいし、他の処理を加えてもよい。例えば、シェーディング補正の代わりに光学歪み補正をしてもよいし、フィルタ処理の後に解像度変換をしてもよい。   Furthermore, the shading correction unit 202 and the filter processing unit 212 may be replaced with other processes, or other processes may be added. For example, optical distortion correction may be performed instead of shading correction, or resolution conversion may be performed after filter processing.

また、本実施例では、メモリ220へ格子状に画像データ(タイルデータ)を書き込んでいるが、角度に応じて相対位置をずらして書き込んでもよい。図9は2x8のタイルによる位置をずらした書き込みの一例を示す図であり、(a)は1行毎に主走査方向にずらした場合、同(b)は1列毎に副走査方向にずらした場合をそれぞれ示している。このように、所定の画素分ずつずらしながら格納することにより、メモリアドレスの演算など制御が少し複雑化するものの、よりメモリアクセスを効率化できる場合がある。
なお、本発明の適用によりメモリに書き込む際の効率は低下し得る。しかしながら、任意の角度での回転処理は一般に周囲の画素を参照し、またその後段でもフィルタ処理や解像度変換といった周囲の画素を参照する処理があることが多い。よって、通常であればメモリ書き込み量よりもメモリ読み出し量の方が多いといえる。すなわち、メモリ書き込みの効率を犠牲にしてでもメモリ読み出しを効率化することでトータルでの効率化が成し遂げられる。
In this embodiment, the image data (tile data) is written in the memory 220 in a grid pattern, but the relative position may be shifted depending on the angle. FIG. 9 is a diagram showing an example of writing in which the positions are shifted by 2 × 8 tiles. FIG. 9A shows a case where each row is shifted in the main scanning direction, and FIG. 9B shows a case where each row is shifted in the sub scanning direction. Each case is shown. In this way, storing data while shifting it by a predetermined number of pixels may make the memory access more efficient, although the control such as the calculation of the memory address is slightly complicated.
Note that the efficiency in writing to the memory can be reduced by applying the present invention. However, rotation processing at an arbitrary angle generally refers to surrounding pixels, and there are often processes that refer to surrounding pixels such as filter processing and resolution conversion at subsequent stages. Therefore, it can be said that the memory read amount is usually larger than the memory write amount. That is, even if the memory writing efficiency is sacrificed, the total efficiency can be improved by improving the memory reading efficiency.

次に、実施例1とは異なる走査順序でシェーディング補正を行う態様について、実施例2として説明する。なお、実施例1と共通する部分については説明を省略ないしは簡略化し、以下では差異点を中心に説明するものとする。   Next, a mode in which shading correction is performed in a scanning order different from that in the first embodiment will be described as a second embodiment. The description of the parts common to the first embodiment will be omitted or simplified, and the differences will be mainly described below.

図10は、本実施例に係る画像処理装置の内部構成を示すブロック図であり、実施例1における図2に対応している。本実施例のスキャナ補正処理が前段画像補正部1000における処理と後段画像補正部1010における処理とに大別される点は実施例1と同じである。実施例1に係る図2の構成と比較すると、本実施例の前段画像補正部1000では、HV変換部が取り除かれているのが分かる。   FIG. 10 is a block diagram illustrating an internal configuration of the image processing apparatus according to the present embodiment, and corresponds to FIG. 2 in the first embodiment. The scanner correction processing of the present embodiment is roughly the same as that of the first embodiment in that the scanner correction processing is roughly divided into processing in the preceding image correction unit 1000 and processing in the subsequent image correction unit 1010. Compared to the configuration of FIG. 2 according to the first embodiment, it can be seen that the HV conversion unit is removed in the pre-stage image correction unit 1000 of the present embodiment.

本実施例における前段画像処理部1000への画像データの入力は、タイル水平順序に従うものとする。図11は、本実施例におけるタイル水平順序を説明する図であり、分割された各タイルにおいて主走査方向に走査されることが示されている。   The input of image data to the pre-stage image processing unit 1000 in this embodiment is assumed to follow the tile horizontal order. FIG. 11 is a diagram for explaining the tile horizontal order in this embodiment, and shows that each divided tile is scanned in the main scanning direction.

シェーディング補正部1002では、タイル水平順に各画素をシェーディング補正する。シェーディングパラメータは左右の画素で異なるため、1画素毎に更新する必要がある。そのため、タイル幅分に相当するシェーディングパラメータをシェーディング補正部内の一時メモリなどに蓄積しておき、1画素毎にそれを読み出して用いる。   The shading correction unit 1002 performs shading correction on each pixel in the tile horizontal order. Since the shading parameters differ between the left and right pixels, it is necessary to update each pixel. Therefore, a shading parameter corresponding to the tile width is accumulated in a temporary memory or the like in the shading correction unit, and is read out and used for each pixel.

リオーダ部1003では、実施例1におけるリオーダ部203と同様、回転角度に適したメモリ格納単位へと画素をパッキングして、メモリ1020に書き込む。そのため、リオーダ部1003はタイル幅の複数行を蓄積可能な一時メモリを具備し、当該一時メモリにメモリ格納単位の画素が揃い次第、随時メモリ1020へ書き込む。   In the reorder unit 1003, like the reorder unit 203 in the first embodiment, the pixels are packed into a memory storage unit suitable for the rotation angle, and are written in the memory 1020. Therefore, the reorder unit 1003 includes a temporary memory capable of storing a plurality of tile-width rows, and writes the data to the memory 1020 as needed as soon as the pixels of the memory storage unit are aligned in the temporary memory.

メモリ1020に書き込まれた時点での画像は、実施例1と同様であり、それ以降の処理も実施例1と異なるところはない。すなわち、回転処理に適したメモリ格納単位でメモリ1020に格納されているため、効率的にメモリ読み出しが実行できる。   The image at the time of writing in the memory 1020 is the same as that in the first embodiment, and the subsequent processing is not different from that in the first embodiment. That is, since the data is stored in the memory 1020 in a memory storage unit suitable for the rotation process, the memory can be read efficiently.

以上説明したように、一般的に使用されている水平方向の走査順序の場合でも、本発明を同様に適用することができる。   As described above, the present invention can be similarly applied even in the case of a generally used horizontal scanning order.

(その他の実施例)
本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施例の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other examples)
The present invention is also realized by executing the following processing. That is, software (program) for realizing the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program. It is a process to be executed.

Claims (12)

入力画像に対し、所定の走査順序で第一の画像処理を施す手段と、
前記第一の画像処理が施された画像を所定の格納単位で格納するメモリと、
前記メモリから前記所定の格納単位でバースト読み出された画像に対し、任意の角度での回転処理を含む第二の画像処理を施す手段と、
前記所定の格納単位を、前記任意の角度に応じて決定する決定手段と、
を備えたことを特徴とする画像処理装置。
Means for performing first image processing on the input image in a predetermined scanning order;
A memory for storing the image subjected to the first image processing in a predetermined storage unit;
Means for performing second image processing including rotation processing at an arbitrary angle on an image read out in bursts in the predetermined storage unit from the memory;
Determining means for determining the predetermined storage unit according to the arbitrary angle;
An image processing apparatus comprising:
前記決定手段は、縦横比が異なる複数の候補の中から、前記所定の格納単位を選択して決定することを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the determination unit selects and determines the predetermined storage unit from a plurality of candidates having different aspect ratios. 前記複数の候補は、前記メモリにアクセスする際のバースト長をN画素分としたとき、N=PxQを満たす自然数PとQの組み合わせからなる、縦P画素で横Q画素の矩形領域であることを特徴とする請求項2記載の画像処理装置。 The plurality of candidates is a rectangular region of vertical P pixels and horizontal Q pixels, which is a combination of natural numbers P and Q satisfying N = PxQ, where the burst length when accessing the memory is N pixels. the image processing apparatus according to claim 2, wherein. 前記決定手段は、前記複数の候補のうち、前記矩形領域の対角線と前記所定の走査順序に従う走査方向とのなす角度が、前記任意の角度に最も近いものを、前記所定の格納単位として選択することを特徴とする請求項3に記載の画像処理装置。The determination unit selects, as the predetermined storage unit, an angle formed by a diagonal line of the rectangular area and a scanning direction according to the predetermined scanning order that is closest to the arbitrary angle among the plurality of candidates. The image processing apparatus according to claim 3. 前記決定手段は、複数の異なる角度と前記矩形領域との対応関係を規定したテーブルを参照して、前記任意の角度に対応する前記所定の格納単位を選択することを特徴とする請求項4に記載の画像処理装置。The determination unit selects the predetermined storage unit corresponding to the arbitrary angle with reference to a table that defines a correspondence relationship between a plurality of different angles and the rectangular area. The image processing apparatus described. 前記第一の画像処理は、シェーディング補正であることを特徴とする請求項1乃至5のいずれか1項に記載の画像処理装置。 It said first image processing, the image processing apparatus according to any one of claims 1 to 5, characterized in that a shading correction. 前記所定の走査順序は、前記入力画像を副走査方向に分割した領域毎に、当該副走査方向への走査を主走査方向に繰り返す順序であることを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 Wherein the predetermined scan order, each obtained by dividing the input image in the sub-scanning direction region, any one of claims 1 to 6, characterized in that the order in which repeated scanning in the sub-scanning direction in the main scanning direction The image processing apparatus according to item 1. 前記入力画像は、スキャナで原稿をスキャンすることにより得られた画像であり、
前記スキャナにセットされた前記原稿の傾きを検出する斜行検出手段をさらに備え、
前記任意の角度は、前記斜行検出手段で検出された角度である
ことを特徴とする請求項1乃至7のいずれか1項に記載の画像処理装置。
The input image is an image obtained by scanning a document with a scanner,
Further comprising skew detection means for detecting an inclination of the document set on the scanner,
The image processing apparatus according to claim 1, wherein the arbitrary angle is an angle detected by the skew detection unit.
前記所定の走査順序は、画像処理装置に固有の順序であることを特徴とする請求項1乃至8のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the predetermined scanning order is an order unique to the image processing apparatus. 前記メモリには、前記任意の角度に応じて、前記格納単位を行又は列毎に所定の画素分ずらして格納されることを特徴とする請求項1乃至9のいずれか1項に記載の画像処理装置。   The image according to any one of claims 1 to 9, wherein the storage unit stores the storage unit by shifting the storage unit by a predetermined pixel for each row or column according to the arbitrary angle. Processing equipment. 入力画像に対し、所定の走査順序で第一の画像処理を施すステップと、
前記第一の画像処理が施された画像を所定の格納単位でメモリに格納するステップと、
前記メモリから前記所定の格納単位でバースト読み出された画像に対し、任意の角度での回転処理を含む第二の画像処理を施すステップと、
前記所定の格納単位を、前記任意の角度に応じて決定する決定ステップと、
を含むことを特徴とする画像処理方法。
Performing first image processing on the input image in a predetermined scanning order;
Storing the image subjected to the first image processing in a memory in a predetermined storage unit;
Performing second image processing including rotation processing at an arbitrary angle on an image read out in bursts from the memory in the predetermined storage unit;
A determining step of determining the predetermined storage unit according to the arbitrary angle;
An image processing method comprising:
コンピュータを、請求項1乃至10のいずれか1項に記載の画像処理装置として機能させるためのプログラム。   A program for causing a computer to function as the image processing apparatus according to any one of claims 1 to 10.
JP2014077639A 2014-04-04 2014-04-04 Image processing apparatus and image processing method Active JP6324174B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014077639A JP6324174B2 (en) 2014-04-04 2014-04-04 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014077639A JP6324174B2 (en) 2014-04-04 2014-04-04 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2015201677A JP2015201677A (en) 2015-11-12
JP6324174B2 true JP6324174B2 (en) 2018-05-16

Family

ID=54552631

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014077639A Active JP6324174B2 (en) 2014-04-04 2014-04-04 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP6324174B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339987B (en) * 2016-09-06 2019-05-10 北京凌云光子技术有限公司 A kind of fault image is become a full member method and device
JP6859781B2 (en) 2017-03-21 2021-04-14 富士ゼロックス株式会社 Image processing equipment, image processing methods and programs
JP7234000B2 (en) * 2019-03-27 2023-03-07 池上通信機株式会社 Image data processing device for affine transformation of two-dimensional image

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4286192B2 (en) * 2003-08-25 2009-06-24 オリンパス株式会社 Image processing apparatus and image processing method
JP5209953B2 (en) * 2007-12-20 2013-06-12 キヤノン株式会社 Image data supply apparatus and image data supply method
JP5124509B2 (en) * 2009-03-05 2013-01-23 株式会社Pfu Image processing apparatus, tilt correction method, and program

Also Published As

Publication number Publication date
JP2015201677A (en) 2015-11-12

Similar Documents

Publication Publication Date Title
JP6706985B2 (en) Image processing apparatus and control method thereof
JP4784500B2 (en) Image tilt correction apparatus and image tilt correction method
JP6324174B2 (en) Image processing apparatus and image processing method
CN110910301B (en) Image processing device and method, and recording medium storing image processing program
JP2009171560A5 (en)
JP6200664B2 (en) Image data processing apparatus, image data processing method, and image data processing program
JP4380740B2 (en) Image processing device
JP4020093B2 (en) Edge detection method and apparatus, program, storage medium, and frame detection method, apparatus, program, and storage medium
US8902474B2 (en) Image processing apparatus, control method of the same, and program
JP4770168B2 (en) Scan conversion device and electronic camera
JP2009164674A (en) Distortion correction device
JP5151999B2 (en) Image processing apparatus and image processing method
JP2006203710A (en) Image processing unit
JP5182587B2 (en) Image processing apparatus and image processing method
JP4867757B2 (en) Scanner device
US20090016619A1 (en) Image processing device
JP5132542B2 (en) Image processing apparatus, image processing method, computer program, and storage medium
JP2010239362A (en) Image processing apparatus and image processing method thereof
JP2010152456A (en) Image processor and image processing method and program using image processing method
US8078011B2 (en) Image processing circuit and multi-function apparatus
JP6562687B2 (en) Image deformation apparatus, image processing method, and program
JP5034131B2 (en) Image processing controller, image processing method, and image processing program
JP2006295379A (en) Image processing method and image processor
JP5222797B2 (en) Image processing device
JP6249234B2 (en) Image processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170404

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171110

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171114

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180115

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: 20180313

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180410

R151 Written notification of patent or utility model registration

Ref document number: 6324174

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151