JP6440465B2 - Image processing apparatus, image processing method, and program - Google Patents

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

Info

Publication number
JP6440465B2
JP6440465B2 JP2014235697A JP2014235697A JP6440465B2 JP 6440465 B2 JP6440465 B2 JP 6440465B2 JP 2014235697 A JP2014235697 A JP 2014235697A JP 2014235697 A JP2014235697 A JP 2014235697A JP 6440465 B2 JP6440465 B2 JP 6440465B2
Authority
JP
Japan
Prior art keywords
coordinates
image
correction image
correction
rectangular area
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
JP2014235697A
Other languages
Japanese (ja)
Other versions
JP2016100717A (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 JP2014235697A priority Critical patent/JP6440465B2/en
Publication of JP2016100717A publication Critical patent/JP2016100717A/en
Application granted granted Critical
Publication of JP6440465B2 publication Critical patent/JP6440465B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、特に、光学的要因による歪みを信号処理によって補正するために用いて好適な画像処理装置、画像処理方法及びプログラムに関する。   The present invention particularly relates to an image processing apparatus, an image processing method, and a program suitable for use in correcting distortion caused by optical factors by signal processing.

近年、デジタルカメラやビデオカメラ等の撮像装置では、撮像レンズにおける歪曲収差の特性の影響により、光学的要因による歪みが撮像画像に生じる。高価な高性能のレンズでは、歪曲収差の特性の影響が小さいため、このような歪みは目立たない。しかし、低コストのレンズや光学ズームレンズを使用した場合には、歪みが目立つようになり画質が劣化する。そこで、近年、光学的要因による歪みを信号処理によって補正する撮像装置が、例えば、特許文献1及び2に提案されている。   In recent years, in an imaging apparatus such as a digital camera or a video camera, distortion due to an optical factor occurs in a captured image due to the influence of distortion characteristics of an imaging lens. In an expensive high-performance lens, since the influence of distortion characteristics is small, such distortion is not conspicuous. However, when a low-cost lens or an optical zoom lens is used, distortion becomes conspicuous and image quality deteriorates. Thus, in recent years, for example, Patent Documents 1 and 2 have proposed image pickup apparatuses that correct distortion due to optical factors by signal processing.

特許文献1には、歪補正処理部が歪補正処理を行うのに必要な歪補正前(入力)画像範囲を算出する歪補正範囲算出部を備えた技術が開示されている。この構成により、歪補正によって得られる補正画像(出力画像)は画像出力範囲に対して過不足なく出力することを可能としている。そして、元データである入力画像データを有効に活用した歪補正処理を行い、糸巻き型歪や、樽型歪、陣笠型歪などに対しても有効な歪補正処理を行うことが提案されている。   Patent Document 1 discloses a technique including a distortion correction range calculation unit that calculates a pre-distortion (input) image range necessary for the distortion correction processing unit to perform distortion correction processing. With this configuration, a corrected image (output image) obtained by distortion correction can be output without excess or deficiency with respect to the image output range. Then, it has been proposed to perform distortion correction processing that effectively uses the input image data that is the original data, and to perform effective distortion correction processing for pincushion distortion, barrel distortion, Jinkasa distortion, and the like. .

さらに特許文献2に記載の方法では、補正後画像座標系に対応する補正前座標を記憶し、補正後画像の各画素に対応する補正前座標を記憶部から読み出して座標を出力する。そして出力された補正前座標に対応する補正前画像のデータを、補正後画像の画素のデータとして出力する。ここで、座標出力部から出力された補正前座標が小数点以下の数値を含む場合には、補正前座標の近傍複数画素のデータを基に加重平均を算出することにより、その補正前座標に対応する補正後画像の画素のデータを出力している。   Further, in the method described in Patent Document 2, the coordinates before correction corresponding to the corrected image coordinate system are stored, the coordinates before correction corresponding to each pixel of the corrected image are read from the storage unit, and the coordinates are output. Then, the pre-correction image data corresponding to the output pre-correction coordinates is output as pixel data of the post-correction image. Here, when the coordinates before correction output from the coordinate output unit include a numerical value after the decimal point, it corresponds to the coordinates before correction by calculating a weighted average based on data of a plurality of pixels in the vicinity of the coordinates before correction. The pixel data of the corrected image to be output is output.

特開2005−44098号公報JP 2005-44098 A 国際公開第2008/139577号International Publication No. 2008/139579

しかしながら、特許文献1に開示されている技術では、補正後画像の座標を基準に補正前画像のどの位置から画素を取ってくるかの演算を行う関係上、入力部と歪補正演算部との両方で歪補正前座標が必要となる。そのため、座標演算回路が2つ必要となり、回路規模及び消費電力が増加してしまう。   However, in the technique disclosed in Patent Document 1, since the calculation of which position of the pre-correction image pixel is taken based on the coordinates of the post-correction image, the input unit and the distortion correction calculation unit Both require coordinates before distortion correction. For this reason, two coordinate arithmetic circuits are required, and the circuit scale and power consumption increase.

また、光学ズーム倍率に応じて歪み率は異なってくるため、特許文献2に開示されている技術では、補正後画像座標系に対応する補正前座標を記憶することから、ズーム倍率に応じた補正前座標を記憶しておく必要がある。そのため、記憶容量が増大する可能性がある。そこで、特許文献2には、矩形ブロックに分けて頂点のみの座標を保持する技術が開示されているが、この場合、糸巻き型歪、樽型歪には対応できるが、陣笠型歪の対応が困難となる可能性がある。   Further, since the distortion rate varies depending on the optical zoom magnification, the technique disclosed in Patent Document 2 stores the pre-correction coordinates corresponding to the post-correction image coordinate system, and thus the correction according to the zoom magnification. It is necessary to memorize the previous coordinates. As a result, the storage capacity may increase. Therefore, Patent Document 2 discloses a technique for holding the coordinates of only the vertices divided into rectangular blocks. In this case, although it can deal with pincushion distortion and barrel distortion, It can be difficult.

さらに、補正前画像をブロックラインバッファに保持しているが、ブロックラインバッファは、補正前画像と補正後画像との間での座標の最大移動分の垂直ライン分必要となるため、次のことが懸念される。例えばブロックラインバッファをSRAMとした場合は、近年の画素数増加に伴い水平画素数が多くなっているため、膨大なデータ量に対応するための記憶容量が不足するという問題がある。また、ブロックラインバッファをDRAMとした場合は、記憶容量は十分に備えているが、補正前座標が小数点以下の場合は、補間用に近傍複数画素のデータをDRAMから読み出すことになるため、ランダムアクセスが発生して性能が低下するという問題がある。   Furthermore, the pre-correction image is stored in the block line buffer, but the block line buffer requires the vertical line for the maximum coordinate movement between the pre-correction image and the post-correction image. Is concerned. For example, when the block line buffer is an SRAM, the number of horizontal pixels has increased with the recent increase in the number of pixels, and there is a problem that the storage capacity for dealing with an enormous amount of data is insufficient. If the block line buffer is a DRAM, the storage capacity is sufficient, but if the coordinates before correction are below the decimal point, the data of a plurality of neighboring pixels is read out from the DRAM for interpolation. There is a problem that access occurs and performance decreases.

本発明は前述の問題点に鑑み、記憶容量、回路規模及び消費電力を抑え、高性能に歪補正を行うことができるようにすることを目的としている。   The present invention has been made in view of the above-described problems, and it is an object of the present invention to suppress the storage capacity, the circuit scale, and the power consumption and perform the distortion correction with high performance.

本発明に係る画像処理装置は、光学系を用いて被写体が撮像された画像データにおける前記光学系の歪曲収差を補正する画像処理装置であって、前記画像データを補正前画像として記憶する第1の記憶手段と、前記歪曲収差が補正された補正後画像の座標を生成する座標生成手段と、前記座標生成手段によって生成された補正後画像の座標に対応する前記補正前画像の座標を演算する演算手段と、前記演算手段によって演算された前記補正前画像における矩形領域の一部の座標を元に、前記第1の記憶手段から前記補正前画像を矩形領域ごとに読み出す読み出し制御手段と、前記読み出し制御手段によって読み出された補正前画像を矩形領域ごとに一時的に記憶する第2の記憶手段と、前記演算手段によって演算された前記補正前画像における矩形領域内の座標を元に、前記第2の記憶手段から前記補正前画像を読み出して前記補正後画像を生成する画像処理手段とを有し、前記座標生成手段は、前記第1の記憶手段から前記補正前画像を読み出す座標を前記演算手段が演算するための座標を生成するとともに、前記第2の記憶手段から前記補正前画像を読み出す座標を前記演算手段が演算するための座標を生成し、前記演算手段は、前記第1の記憶手段から前記補正前画像を読み出すための座標、または前記第2の記憶手段から前記補正前画像を読み出すための座標を演算し、さらに前記演算手段は、前記座標生成手段によって生成された補正後画像の座標が、前記補正後画像における矩形領域の一部の座標か否かを判定する判定手段と、前記判定手段によって前記矩形領域の一部の座標と判定された場合に、前記補正後画像における当該矩形領域に対応する、前記補正前画像における矩形領域の一部の座標を一時的に保持する保持手段とを有し、前記画像処理手段は、前記保持手段に保持されている座標に基づいて前記第2の記憶手段から前記補正前画像を読み出して前記補正後画像を生成することを特徴とする。 An image processing apparatus according to the present invention is an image processing apparatus that corrects distortion aberration of the optical system in image data obtained by imaging an object using an optical system, and stores the image data as a pre-correction image. Storage means; coordinate generation means for generating coordinates of the corrected image in which the distortion is corrected; and coordinates of the uncorrected image corresponding to the coordinates of the corrected image generated by the coordinate generation means. Based on a part of the coordinates of the rectangular area in the pre-correction image calculated by the calculating means, a reading control means for reading out the pre-correction image for each rectangular area from the first storage means, A second storage means for temporarily storing the pre-correction image read by the read control means for each rectangular area; and the pre-correction image calculated by the calculation means. Image processing means for reading out the pre-correction image from the second storage means and generating the post-correction image based on the coordinates in the rectangular area, wherein the coordinate generation means is the first storage means. Generating coordinates for the calculation means to calculate the coordinates for reading the pre-correction image from, and generating coordinates for the calculation means to calculate the coordinates for reading the pre-correction image from the second storage means. The calculation means calculates coordinates for reading the uncorrected image from the first storage means or coordinates for reading the uncorrected image from the second storage means , and the calculation means further comprises: Determining means for determining whether or not the coordinates of the corrected image generated by the coordinate generating means are coordinates of a part of the rectangular area in the corrected image; and determining one of the rectangular areas by the determining means. And holding means for temporarily holding the coordinates of a part of the rectangular area in the pre-correction image corresponding to the rectangular area in the post-correction image. Is configured to read the pre-correction image from the second storage unit based on the coordinates held in the holding unit and generate the post-correction image .

本発明によれば、記憶容量、回路規模及び消費電力を抑え、高性能に歪補正を行うことができる。   According to the present invention, distortion correction can be performed with high performance while suppressing storage capacity, circuit scale, and power consumption.

実施形態に係る収差補正部の詳細な構成例を示すブロック図である。It is a block diagram which shows the detailed structural example of the aberration correction part which concerns on embodiment. 実施形態に係るデジタルカメラの構成例を示すブロック図である。It is a block diagram which shows the structural example of the digital camera which concerns on embodiment. 第1の実施形態における補正前座標演算部の詳細な構成例を示すブロック図である。It is a block diagram which shows the detailed structural example of the coordinate calculation part before correction | amendment in 1st Embodiment. 画像の中心と補正前画像の画素位置と補正後画像の画素位置とを示した図である。It is the figure which showed the center of the image, the pixel position of the image before correction | amendment, and the pixel position of the image after correction | amendment. 矩形画像保持部における入出力の関係を模式的に示した図である。It is the figure which showed typically the input / output relationship in a rectangular image holding part. 第1の実施形態において、座標演算部の処理状況と、矩形画像保持部へ矩形画像を書き込むタイミングとを説明するための図である。In a 1st embodiment, it is a figure for explaining the processing situation of a coordinate operation part, and the timing which writes a rectangular picture into a rectangular picture holding part. 収差により樽型歪が生じた補正前画像と補正後画像とを示す図である。It is a figure which shows the image before correction | amendment and the image after correction | amendment which the barrel distortion produced by the aberration. 収差補正部による1矩形画像の補正前座標の演算処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the calculation processing procedure of the coordinate before correction | amendment of 1 rectangular image by an aberration correction part. 収差により糸巻きが生じた補正前画像及び補正後画像の矩形分割を示した図である。It is the figure which showed the rectangular division | segmentation of the image before correction | amendment which the pincushion produced by the aberration, and the image after correction | amendment. 第2の実施形態における補正前座標演算部の詳細な構成例を示すブロック図である。It is a block diagram which shows the detailed structural example of the coordinate calculation part before correction | amendment in 2nd Embodiment. 第2の実施形態において、座標演算部の処理状況と、矩形画像保持部へ矩形画像を書き込むタイミングとを説明するための図である。In 2nd Embodiment, it is a figure for demonstrating the processing condition of a coordinate calculating part, and the timing which writes a rectangular image in a rectangular image holding | maintenance part.

(第1の実施形態)
以下、図面を参照しながら本発明の第1の実施形態について説明する。なお、本実施形態では画像処理装置の一例としてデジタルカメラについて説明するが、デジタルビデオカメラ、カメラ付き携帯電話、車載カメラ等の撮像装置あるいは、プロジェクタなど収差補正が必要な装置を採用することも可能である。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. In this embodiment, a digital camera will be described as an example of an image processing device. However, an imaging device such as a digital video camera, a mobile phone with a camera, an in-vehicle camera, or a device that requires aberration correction, such as a projector, may be employed. It is.

図2は、本実施形態に係るデジタルカメラ10の構成例を示すブロック図である。
図2において、撮像素子200は、受光した被写体像を電気信号に変換して画像データを作成するCCDやCMOSセンサ等の受光素子である。A/D変換器201は、撮像素子200のアナログ出力信号をデジタル信号に変換する。
FIG. 2 is a block diagram illustrating a configuration example of the digital camera 10 according to the present embodiment.
In FIG. 2, an image sensor 200 is a light receiving element such as a CCD or CMOS sensor that converts a received subject image into an electrical signal to create image data. The A / D converter 201 converts the analog output signal of the image sensor 200 into a digital signal.

画像処理部202は、撮像/現像処理部203、収差補正部100及びDMAC110を備えている。さらに、画像バッファメモリ、画像データの圧縮処理や伸長処理を行う圧縮伸長部、モニタなどに表示する表示部、記録媒体に画像データを記録する記録処理部(いずれも図示せず)などを備えている。   The image processing unit 202 includes an imaging / development processing unit 203, an aberration correction unit 100, and a DMAC 110. Furthermore, an image buffer memory, a compression / decompression unit that performs compression processing and decompression processing of image data, a display unit that displays on a monitor, a recording processing unit that records image data on a recording medium (all not shown), and the like are provided. Yes.

撮像/現像処理部203は、A/D変換器201により変換された画像データに対して黒レベル補正、シェーディング補正などを適正に行う。また、撮像/現像処理部203は、補正処理された画像データや、画像バッファメモリまたはメモリ107に格納された画像データに対して以下の処理を行う。具体的には、画素補間やフィルタ処理、縮小といったリサイズ処理や色変換処理、例えば圧縮画像データに保存するのに最適なフォーマットであるYCbCr形式のフォーマットに変換する処理などの現像処理を適正に行う。   The imaging / development processing unit 203 appropriately performs black level correction, shading correction, and the like on the image data converted by the A / D converter 201. Further, the imaging / development processing unit 203 performs the following processing on the corrected image data and the image data stored in the image buffer memory or the memory 107. Specifically, resize processing such as pixel interpolation, filter processing, and reduction, and color conversion processing, for example, development processing such as processing for conversion to a YCbCr format that is an optimal format for saving in compressed image data are appropriately performed. .

収差補正部100は、画像データに対して歪曲収差を補正する。この処理の詳細については後述する。DMAC110は、データ転送を行うDirect Memory Accessコントローラである。画像データは、DMAC110によってバス105に出力され、メモリ制御部106を介してメモリ107に一時記憶される。メモリ107に一時記憶された画像データは、DMAC110によってメモリ107からバス105に出力され、DMAC110を経由して、画像処理部202に画像データが出力される。また、DMAC110は複数の画像処理のデータ転送を行うために、複数のDMAチャネルを有している。   The aberration correction unit 100 corrects distortion aberration for the image data. Details of this processing will be described later. The DMAC 110 is a Direct Memory Access controller that performs data transfer. The image data is output to the bus 105 by the DMAC 110 and temporarily stored in the memory 107 via the memory control unit 106. The image data temporarily stored in the memory 107 is output from the memory 107 to the bus 105 by the DMAC 110, and the image data is output to the image processing unit 202 via the DMAC 110. The DMAC 110 has a plurality of DMA channels in order to perform data transfer for a plurality of image processes.

バス105は、システムバスと画像データバスとを兼用するバスであるが、システムバスと画像データバスとを異なるバスで構成するものであってもよい。メモリ制御部106は、システム制御部204或いはDMAC110からの指示に応じて、メモリ107にデータを書き込んだり、メモリ107からデータを読み出したりする。なお、A/D変換器201からの出力データがメモリ107に直接書き込まれる場合もある。メモリ107は、所定枚数の静止画像や、所定時間の動画像、音声等のデータやシステム制御部204の動作用の定数、プログラム等を格納するのに十分な記憶容量を備える記憶装置であり、例えばDRAMなどが用いられる。   The bus 105 is a bus that serves both as a system bus and an image data bus. However, the system bus and the image data bus may be configured as different buses. The memory control unit 106 writes data into the memory 107 or reads data from the memory 107 in accordance with an instruction from the system control unit 204 or the DMAC 110. Note that output data from the A / D converter 201 may be directly written into the memory 107. The memory 107 is a storage device having a storage capacity sufficient to store a predetermined number of still images, data for a predetermined time, data such as sound, constants for operating the system control unit 204, programs, and the like. For example, a DRAM or the like is used.

不揮発性メモリ制御部206は、システム制御部204からの指示に応じて、不揮発性メモリ207にデータを書き込んだり、不揮発性メモリ207からデータを読み出したりする。不揮発性メモリ207は、電気的に消去・記録可能なメモリであり、例えばEEPROM等が用いられる。また、不揮発性メモリ207には、システム制御部204の動作用の定数、プログラム等が記憶されている。   The nonvolatile memory control unit 206 writes data into the nonvolatile memory 207 or reads data from the nonvolatile memory 207 in accordance with an instruction from the system control unit 204. The nonvolatile memory 207 is an electrically erasable / recordable memory, and for example, an EEPROM or the like is used. In addition, the nonvolatile memory 207 stores constants, programs, and the like for operating the system control unit 204.

システム制御部204は、デジタルカメラ10の動作制御を司るマイクロコンピュータなどで構成され、デジタルカメラ10を構成する各機能ブロックに対して様々な指示を行い、各種の制御処理を実行する。また、システム制御部204は、バス105を介して接続された画像処理部202、メモリ制御部106、不揮発性メモリ制御部206、操作部205、及び撮像素子200を制御する。マイクロコンピュータは、前述した不揮発性メモリ207に記録されたプログラムを実行することにより、本実施形態の各処理を実現する。   The system control unit 204 includes a microcomputer that controls the operation of the digital camera 10, and gives various instructions to each functional block constituting the digital camera 10 to execute various control processes. Further, the system control unit 204 controls the image processing unit 202, the memory control unit 106, the nonvolatile memory control unit 206, the operation unit 205, and the image sensor 200 connected via the bus 105. The microcomputer realizes each process of the present embodiment by executing the program recorded in the nonvolatile memory 207 described above.

操作部205は、ユーザーにより操作されるスイッチやボタン等を含み、電源のON/OFF、シャッターのON/OFF等の操作に使用される。   The operation unit 205 includes switches and buttons operated by the user, and is used for operations such as power ON / OFF and shutter ON / OFF.

図1は、本実施形態に係る収差補正部100の詳細な構成例を示すブロック図である。なお、図2と同一の構成については、同一の符号を付しており、詳細な説明は省略する。
図1において、補正後座標生成部111は、第一補正後座標生成部101と第二補正後座標生成部102とから構成され、補正後画像の座標を生成する。
FIG. 1 is a block diagram illustrating a detailed configuration example of the aberration correction unit 100 according to the present embodiment. In addition, about the structure same as FIG. 2, the same code | symbol is attached | subjected and detailed description is abbreviate | omitted.
In FIG. 1, a post-correction coordinate generation unit 111 includes a first post-correction coordinate generation unit 101 and a second post-correction coordinate generation unit 102, and generates the coordinates of the post-correction image.

第一補正後座標生成部101は、補正後画像の座標を生成する。この補正後画像の座標は、メモリ107から補正前画像を読み出して矩形画像保持部108に書き込むための座標を補正前座標演算部103に演算させるために用いられる。具体的には、補正後画像を矩形に分割し、矩形領域内の一部の座標として矩形内の周辺画素毎の座標を生成する。さらに、第一補正後座標生成部101は、システム制御部204の制御により、収差補正率に応じた矩形サイズの調整を行うことができる。矩形サイズは、1枚の画像に対して、すべて同一サイズであってもよいし、異なるサイズであってもよい。また、第一補正後座標生成部101は、矩形内の周辺画素毎の座標の情報を保持するバッファを備えている。   The first corrected coordinate generation unit 101 generates the coordinates of the corrected image. The coordinates of the post-correction image are used to cause the pre-correction coordinate calculation unit 103 to calculate coordinates for reading out the pre-correction image from the memory 107 and writing it to the rectangular image holding unit 108. Specifically, the corrected image is divided into rectangles, and coordinates for each peripheral pixel in the rectangle are generated as some coordinates in the rectangular area. Furthermore, the first post-correction coordinate generation unit 101 can adjust the rectangular size according to the aberration correction rate under the control of the system control unit 204. The rectangular size may be the same size or different sizes for one image. The first post-correction coordinate generation unit 101 includes a buffer that holds coordinate information for each peripheral pixel in the rectangle.

第二補正後座標生成部102は、補正後画像の座標を生成する。この補正後画像の座標は、矩形画像保持部108に保持されている補正前画像を読み出す際に、画素補間部109が画素単位で読み出す座標を補正前座標演算部103に演算させるために用いられる。具体的には、第一補正後座標生成部101と同様に補正後画像を矩形に分割して、矩形内全ての画素の座標を生成する。なお、補正前画像及び補正後画像の座標と矩形分割とについては、図7及び図9を用いて後述する。   The second corrected coordinate generation unit 102 generates the coordinates of the corrected image. The coordinates of the post-correction image are used to cause the pre-correction coordinate calculation unit 103 to calculate the coordinates read by the pixel interpolation unit 109 in units of pixels when reading the pre-correction image held in the rectangular image holding unit 108. . Specifically, as in the first corrected coordinate generation unit 101, the corrected image is divided into rectangles, and the coordinates of all the pixels in the rectangle are generated. Note that the coordinates and rectangular division of the pre-correction image and the post-correction image will be described later with reference to FIGS.

補正前座標演算部103は、補正前座標を演算する。なお、処理の詳細については、図3を用いて後述する。矩形読み出し制御部104は、補正前座標演算部103の演算結果を受けて、メモリ107の読み出しアドレスを生成する。矩形画像保持部108は、詳細は後述するが、書き込み及び読み出しが頻繁に行われることから例えばSRAMなどで構成され、補正前画像が矩形毎に書き込まれ、一時的に保持している。本実施形態では、2Bank構成とするが、Bank数を2以外にしてもよい。   The pre-correction coordinate calculation unit 103 calculates the pre-correction coordinates. Details of the processing will be described later with reference to FIG. The rectangular read control unit 104 receives the calculation result of the pre-correction coordinate calculation unit 103 and generates a read address of the memory 107. Although the details will be described later, the rectangular image holding unit 108 is configured by, for example, an SRAM or the like because writing and reading are frequently performed, and an image before correction is written for each rectangle and temporarily held. In this embodiment, a 2-bank configuration is used, but the number of banks may be other than 2.

画素補間部109は、補正前座標演算部103が演算した座標を元に、矩形画像保持部108に保持されている矩形の補正前画像(矩形画像)の補正対象画素、および補正対象画素の複数の矩形内周辺画素を読み出す。そして、補正前座標演算部103の座標値を用いて、バイリニア補間あるいはバイキュービック補間などで画素を補正し、補正後画像を得る。   Based on the coordinates calculated by the pre-correction coordinate calculation unit 103, the pixel interpolation unit 109 corrects a pixel to be corrected in a rectangular pre-correction image (rectangular image) held in the rectangular image holding unit 108, and a plurality of correction target pixels. Read out the surrounding pixels in the rectangle. Then, using the coordinate value of the pre-correction coordinate calculation unit 103, the pixel is corrected by bilinear interpolation or bicubic interpolation to obtain a corrected image.

ここで、図7及び図9を参照しながら、補正前画像及び補正後画像の座標と矩形分割とについて説明する。図7は、収差により樽型歪が生じた補正前画像700と補正後画像701とを示す図である。ここで補正後画像701の座標は、第一補正後座標生成部101により生成された補正後画像の座標の一例である。補正後画像701の座標(X、Y)に対応する補正前座標が、補正前画像700の座標(x、y)である。また、矩形画像703、707、709は、補正後画像を矩形分割時の1矩形を示し、矩形画像703、707、709に対応する補正前画像の矩形画像はそれぞれ矩形画像702、706、708である。   Here, with reference to FIG. 7 and FIG. 9, the coordinates and rectangular division of the pre-correction image and the post-correction image will be described. FIG. 7 is a diagram illustrating an uncorrected image 700 and an after-correction image 701 in which barrel distortion has occurred due to aberration. Here, the coordinates of the corrected image 701 are an example of the coordinates of the corrected image generated by the first corrected coordinate generation unit 101. The coordinates before correction corresponding to the coordinates (X, Y) of the corrected image 701 are the coordinates (x, y) of the image 700 before correction. The rectangular images 703, 707, and 709 indicate one rectangle when the corrected image is divided into rectangles. The rectangular images of the images before correction corresponding to the rectangular images 703, 707, and 709 are rectangular images 702, 706, and 708, respectively. is there.

また、拡大画像704、705は、補正後の矩形画像703の拡大画像である。拡大画像704では、第一補正後座標生成部101で生成する座標を斜線で示し、第一補正後座標生成部101が矩形画像703内の周辺画素の座標のみを生成することを示している。また、拡大画像705は、第二補正後座標生成部102で生成する座標を斜線で示し、第二補正後座標生成部102が矩形画像703内に対して全ての座標を生成することを示している。   The enlarged images 704 and 705 are enlarged images of the corrected rectangular image 703. In the enlarged image 704, the coordinates generated by the first corrected coordinate generation unit 101 are indicated by diagonal lines, and the first corrected coordinate generation unit 101 generates only the coordinates of the peripheral pixels in the rectangular image 703. The enlarged image 705 indicates that the coordinates generated by the second corrected coordinate generation unit 102 are hatched, and indicates that the second corrected coordinate generation unit 102 generates all the coordinates in the rectangular image 703. Yes.

図9は、収差により糸巻きが生じた補正前画像903及び補正後画像900の矩形分割を示した図である。図9(A)に示す例では、補正後矩形画像901は、補正後画像900の第一の矩形画像を示し、長方形に矩形分割されていることを示している。補正後矩形画像902は、補正後画像900の第二の矩形画像を示し、同様に長方形に矩形分割されていることを示している。   FIG. 9 is a diagram illustrating rectangular division of the pre-correction image 903 and the post-correction image 900 in which pincushion is generated due to aberration. In the example shown in FIG. 9A, the corrected rectangular image 901 is a first rectangular image of the corrected image 900, and is divided into rectangles. The corrected rectangular image 902 is a second rectangular image of the corrected image 900, and similarly indicates that the rectangle is divided into rectangles.

補正前矩形画像904は、矩形画像保持部108に保持される矩形サイズを示す。このうち、矩形画像906がメモリ107から読み出す第一の矩形画像であり、斜線部が補正に使用する有効画素となり、空白は使用しない無効画素を示す。また、矩形画像907は、矩形画像保持部108に保持されず、未使用領域となる。   A pre-correction rectangular image 904 indicates a rectangular size held in the rectangular image holding unit 108. Among these, the rectangular image 906 is the first rectangular image read from the memory 107, and the shaded portion is an effective pixel used for correction, and a blank indicates an invalid pixel that is not used. Further, the rectangular image 907 is not held in the rectangular image holding unit 108 but becomes an unused area.

また、補正前矩形画像905は、矩形画像保持部108に保持される矩形サイズを示す。補正前矩形画像905は、さらにメモリ107から読み出す、補正後矩形画像902に対応した第二の矩形画像を示し、斜線部が補正に使用する有効画素となり、空白は使用しない無効画素を示す。   A pre-correction rectangular image 905 indicates a rectangular size held in the rectangular image holding unit 108. The pre-correction rectangular image 905 is a second rectangular image corresponding to the post-correction rectangular image 902 that is further read from the memory 107, and the hatched portion is an effective pixel used for correction, and a blank indicates an invalid pixel that is not used.

一方、図9(B)に示す例では、補正後矩形画像908は、補正後画像900の第一の矩形画像を示し、正方形に矩形分割されていることを示している。また、補正後矩形画像909は、補正後画像900の第二の矩形画像を示し、正方形に矩形分割されていることを示している。   On the other hand, in the example shown in FIG. 9B, the corrected rectangular image 908 is a first rectangular image of the corrected image 900, and is divided into squares. A corrected rectangular image 909 is a second rectangular image of the corrected image 900, which is divided into squares.

補正前矩形画像910は、矩形画像保持部108に保持される矩形サイズを示す。補正前矩形画像910は、さらにメモリ107から読み出す、補正後矩形画像908に対応した第一の矩形画像を示し、斜線部が補正に使用する有効画素となり、空白は使用しない無効画素を示す。   The pre-correction rectangular image 910 indicates a rectangular size held in the rectangular image holding unit 108. The pre-correction rectangular image 910 is a first rectangular image corresponding to the post-correction rectangular image 908 that is read from the memory 107, and the hatched portion is an effective pixel used for correction, and a blank indicates an invalid pixel that is not used.

また、補正前矩形画像911は、矩形画像保持部108に保持される矩形サイズを示す。補正前矩形画像911は、さらにメモリ107から読み出す、補正後矩形画像909に対応した第二の矩形画像を示し、斜線部が補正に使用する有効画素となり、空白は使用しない無効画素を示す。   The pre-correction rectangular image 911 indicates the rectangular size held in the rectangular image holding unit 108. The pre-correction rectangular image 911 is a second rectangular image corresponding to the post-correction rectangular image 909, which is further read from the memory 107, and the hatched portion is an effective pixel used for correction, and a blank indicates an invalid pixel that is not used.

図9(A)及び図9(B)に示すように、正方形に近い形でメモリ107から読み出すと、矩形に有効画素を多く含むため、矩形画像保持部108を有効に使用できる。また、後述する周辺座標保持部304の矩形内周辺座標を保持する座標数が、面積(保存領域)が同じであれば、長方形よりも正方形の方が少なくなる。そのため、本実施形態においては、第一補正後座標生成部101は、正方形に近い形でメモリ107から矩形画像を読み出すものとする。   As shown in FIGS. 9A and 9B, when reading from the memory 107 in a shape close to a square, the rectangular image holding unit 108 can be used effectively because the rectangle includes many effective pixels. Further, if the number of coordinates for holding the peripheral coordinates in the rectangle of the peripheral coordinate holding unit 304 to be described later is the same as the area (storage area), the square is smaller than the rectangle. Therefore, in the present embodiment, the first corrected coordinate generation unit 101 reads a rectangular image from the memory 107 in a shape close to a square.

図3は、本実施形態における補正前座標演算部103の詳細な構成例を示すブロック図である。なお、図1及び図2と同一の構成については、同一の符号を付しており、詳細な説明を省略する。
図3において、矩形周辺判定部301は、第二補正後座標生成部102から入力された座標情報を元に、与えられた座標が矩形内の周辺座標かどうかを判定する。ここで、矩形内の周辺座標と判定する条件は、第二補正後座標生成部102から座標が与えられず、かつ矩形画像保持部108の2Bankとも補正前画像(矩形画像)がない場合である。判定結果は第一のセレクタ302及び第二のセレクタ300のセレクト条件として使用される。また、判定とともに、第二補正後座標生成部102から入力された座標情報を第一のセレクタ302に出力する。
FIG. 3 is a block diagram illustrating a detailed configuration example of the pre-correction coordinate calculation unit 103 in the present embodiment. In addition, about the structure same as FIG.1 and FIG.2, the same code | symbol is attached | subjected and detailed description is abbreviate | omitted.
In FIG. 3, the rectangular periphery determination unit 301 determines whether the given coordinates are peripheral coordinates in the rectangle based on the coordinate information input from the second corrected coordinate generation unit 102. Here, the condition for determining the peripheral coordinates in the rectangle is a case where no coordinates are given from the second corrected coordinate generation unit 102 and there is no pre-correction image (rectangular image) in both 2 Banks of the rectangular image holding unit 108. . The determination result is used as a selection condition for the first selector 302 and the second selector 300. Further, along with the determination, the coordinate information input from the second corrected coordinate generation unit 102 is output to the first selector 302.

第一のセレクタ302は、矩形周辺判定部301による矩形内の周辺座標か否かの判定結果に応じて切り替える。具体的には、周辺座標の場合は、第一補正後座標生成部101から入力された座標情報を座標演算部303に出力し、周辺座標でない場合は、矩形周辺判定部301から入力された座標情報を座標演算部303に出力する。   The first selector 302 switches according to the determination result of whether or not the rectangle periphery determination unit 301 determines the peripheral coordinates in the rectangle. Specifically, in the case of peripheral coordinates, the coordinate information input from the first corrected coordinate generation unit 101 is output to the coordinate calculation unit 303, and in the case of not peripheral coordinates, the coordinates input from the rectangular periphery determination unit 301 are output. Information is output to the coordinate calculation unit 303.

座標演算部303は、入力された座標に対して一般的な収差補正方法により補正前画像の画素位置を算出する。なお、座標演算部303の演算方法の詳細については後述する。周辺座標保持部304は、例えばSRAMなどで構成され、矩形周辺判定部301により周辺座標と判定された場合に、周辺座標として、座標演算部303の出力結果を保持する。そして、周辺座標保持部304が保持している周辺座標を座標情報として第二のセレクタ300に出力する。   The coordinate calculation unit 303 calculates the pixel position of the uncorrected image with respect to the input coordinates by a general aberration correction method. Details of the calculation method of the coordinate calculation unit 303 will be described later. The peripheral coordinate holding unit 304 is configured by, for example, an SRAM or the like, and holds the output result of the coordinate calculation unit 303 as peripheral coordinates when the rectangular peripheral determination unit 301 determines that the peripheral coordinates are peripheral coordinates. Then, the peripheral coordinates held by the peripheral coordinate holding unit 304 are output to the second selector 300 as coordinate information.

第二のセレクタ300は、矩形周辺判定部301により周辺画素と判定された場合は、周辺座標保持部304から出力された座標情報を矩形画像保持部108に出力する。また、矩形周辺判定部301により周辺座標でないと判定された場合は、座標演算部303の出力結果を矩形画像保持部108に出力する。   The second selector 300 outputs the coordinate information output from the peripheral coordinate storage unit 304 to the rectangular image storage unit 108 when the rectangular peripheral determination unit 301 determines that the pixel is a peripheral pixel. When the rectangular periphery determination unit 301 determines that the coordinates are not peripheral coordinates, the output result of the coordinate calculation unit 303 is output to the rectangular image holding unit 108.

次に、図4を参照しながら座標演算部303の処理の一例について説明する。なお、収差補正が可能であれば他の方法を採用してもよい。一般的に補正前画像の画素に着目すると、本来、着目画素に結像されるべき像は、それぞれの収差によって着目画素と画像の中心とを結ぶ線上に移動されて結像されている。   Next, an example of processing of the coordinate calculation unit 303 will be described with reference to FIG. Other methods may be adopted as long as aberration correction is possible. In general, when attention is paid to the pixel of the pre-correction image, the image to be originally formed on the target pixel is moved and formed on a line connecting the target pixel and the center of the image by each aberration.

図4は、画像の中心400と補正前画像の画素位置402と補正後画像の画素位置401とを示した図である。図4においては、撮像素子200の出力画素を走査方向に沿って水平軸を規定し、走査方向に直交して垂直軸を規定する二次元の直交座標系の画像で表されている。   FIG. 4 is a diagram showing the center 400 of the image, the pixel position 402 of the image before correction, and the pixel position 401 of the image after correction. In FIG. 4, the output pixels of the image sensor 200 are represented by a two-dimensional orthogonal coordinate system image that defines a horizontal axis along the scanning direction and defines a vertical axis perpendicular to the scanning direction.

補正前画像の画素位置402を補正するための補正量Cは、画像の中心からの距離を表す像高Rと、光学系の特性とによって求められることが一般的に知られている。画像の中心400の水平方向と画像の中心400からの補正後画像の画素位置401の方向との角度θと、補正量Cとから座標変換して補正前画像の画素位置402を算出することができる。また、補正前画像の画素位置402は必ずしも撮像素子の画素単位ではなく、撮像素子の画素と画素との間に移動される場合があり、小数点までを演算するものとする。   It is generally known that the correction amount C for correcting the pixel position 402 of the uncorrected image is obtained from the image height R representing the distance from the center of the image and the characteristics of the optical system. It is possible to calculate the pixel position 402 of the uncorrected image by performing coordinate conversion from the angle θ between the horizontal direction of the center 400 of the image and the direction of the pixel position 401 of the corrected image from the center 400 of the image and the correction amount C. it can. In addition, the pixel position 402 of the image before correction is not necessarily a pixel unit of the image sensor, and may be moved between pixels of the image sensor, and the decimal point is calculated.

次に、図5、図6及び図8を参照しながら本実施形態の制御について説明する。図5は、矩形画像保持部108における入出力の関係を模式的に示した図である。図5において、Bank500、501は、RAMなどで構成されているバッファである。   Next, the control of the present embodiment will be described with reference to FIGS. FIG. 5 is a diagram schematically showing an input / output relationship in the rectangular image holding unit 108. In FIG. 5, Banks 500 and 501 are buffers formed of RAM or the like.

まず、図5(A)に示すように、メモリ107からBank500に第一の矩形画像が書き込まれ、保持する。続いて、図5(B)に示すように、メモリ107からBank501に第二の矩形画像が書き込まれると、これを保持し、Bank500から第一の矩形画像が画素単位で画素補間部109により読み出される。さらに、図5(C)に示すように、メモリ107からBank500に第三の矩形画像が書き込まれると、これを保持し、Bank501から第二の矩形画像が画素単位で画素補間部109により読み出される。以降、図5(b)及び図5(c)に示す状態を繰り返し、1枚の画像を処理するまで続く。   First, as shown in FIG. 5A, the first rectangular image is written from the memory 107 to the Bank 500 and held. Subsequently, as shown in FIG. 5B, when the second rectangular image is written from the memory 107 to the Bank 501, the second rectangular image is retained, and the first rectangular image is read from the Bank 500 by the pixel interpolation unit 109 in units of pixels. It is. Further, as shown in FIG. 5C, when the third rectangular image is written from the memory 107 to the Bank 500, the third rectangular image is retained, and the second rectangular image is read from the Bank 501 by the pixel interpolation unit 109 in units of pixels. . Thereafter, the state shown in FIGS. 5B and 5C is repeated until one image is processed.

図6は、本実施形態における座標演算部303の処理状況と、矩形画像保持部108へ矩形画像を書き込むタイミングとを説明するための図である。
図6において、タイミングチャート610は、座標演算部303による、第一補正後座標生成部101から入力された座標情報に基づいて、補正前画像を読み出すための座標演算をHighまたはLowで示し、Highが演算期間を示している。
FIG. 6 is a diagram for explaining the processing status of the coordinate calculation unit 303 and the timing of writing a rectangular image to the rectangular image holding unit 108 in the present embodiment.
In FIG. 6, a timing chart 610 indicates coordinate calculation for reading an uncorrected image based on the coordinate information input from the first corrected coordinate generation unit 101 by the coordinate calculation unit 303 as High or Low. Indicates the calculation period.

タイミングチャート611は、座標演算部303による、矩形周辺判定部301から入力された座標情報に基づいて、補正前画像を読み出すための座標演算をHighまたはLowで示し、Highが演算期間を示している。さらにタイミングチャート612は、補正前画像を矩形画像保持部108に書き込むタイミングを示し、Highが書き込み期間を示している。   The timing chart 611 indicates coordinate calculation for reading an uncorrected image by High or Low based on the coordinate information input from the rectangular periphery determination unit 301 by the coordinate calculation unit 303, and High indicates a calculation period. . Further, the timing chart 612 shows the timing of writing the pre-correction image in the rectangular image holding unit 108, and High shows the writing period.

期間600、601は、それぞれメモリ107から補正前画像の第一の矩形画像及び第二の矩形画像を読み出すために、第一補正後座標生成部101が生成した座標に対して座標演算部303で演算している期間である。つまり、期間600は第一の矩形座標演算期間を示し、期間601は第二の矩形座標演算期間を示している。   In periods 600 and 601, the coordinate calculation unit 303 applies the coordinates generated by the first corrected coordinate generation unit 101 in order to read the first rectangular image and the second rectangular image of the pre-correction image from the memory 107. This is the period during which the calculation is performed. That is, the period 600 indicates the first rectangular coordinate calculation period, and the period 601 indicates the second rectangular coordinate calculation period.

期間602は、矩形画像保持部108のBank500に補正前画像の第一の矩形画像を書き込んでいる期間を示し、図5(A)の状態を表している。そして、期間603は、矩形画像保持部108のBank501に補正前画像の第二の矩形画像を書き込んでいる期間を示し、図5(B)の状態を表している。   A period 602 indicates a period in which the first rectangular image of the pre-correction image is written in the Bank 500 of the rectangular image holding unit 108, and represents the state of FIG. A period 603 indicates a period during which the second rectangular image of the pre-correction image is written in the bank 501 of the rectangular image holding unit 108, and represents the state of FIG.

また、期間603は、タイミングチャート611に示すように、画素補間部109が第一の矩形画像を画素単位で読み出すために、座標演算部303で演算している期間でもある。さらに、タイミングチャート610に示すように、期間603においては、メモリ107から矩形画像保持部108のBank500に第三の矩形画像を書き込むために、座標演算部303で演算している。なお、座標演算部303は、どちらか一方の処理を行うことになるため、タイミングチャート610とタイミングチャート611とで同時にHighになることはない。以下、処理の切り替えについて説明する。   In addition, the period 603 is also a period during which the coordinate calculation unit 303 performs calculation so that the pixel interpolation unit 109 reads the first rectangular image in units of pixels as illustrated in the timing chart 611. Further, as shown in the timing chart 610, in the period 603, the coordinate calculation unit 303 performs calculation in order to write the third rectangular image from the memory 107 to the Bank 500 of the rectangular image holding unit 108. Note that the coordinate calculation unit 303 performs either one of the processes, so that the timing chart 610 and the timing chart 611 do not become High at the same time. Hereinafter, the process switching will be described.

期間604は、メモリ107から矩形画像保持部108のBank500に第三の矩形画像を書き込むために座標演算部303で演算している期間である。さらに期間604は、周辺座標保持部304から第一の矩形画像の周辺座標を出力し、出力する際に、第三の矩形画像の周辺座標を保持している期間を示している。   A period 604 is a period during which the coordinate calculation unit 303 calculates to write the third rectangular image from the memory 107 to the Bank 500 of the rectangular image holding unit 108. Further, a period 604 indicates a period in which the peripheral coordinates of the first rectangular image are output from the peripheral coordinate holding unit 304 and the peripheral coordinates of the third rectangular image are held when the peripheral coordinates are output.

期間605は、画素補間部109が矩形画像保持部108から第一の矩形画像を画素単位で読み出すために、座標演算部303で演算している期間である。つまり、期間603以降は、タイミングチャート610のHighの期間は、座標演算部303で演算を行い、さらに周辺座標保持部304に周辺座標を保持し、さらに前の矩形画像の周辺座標を出力する期間を示している。なお、期間600、601におけるタイミングチャート610のHighの期間は、座標演算部303で演算を行い、さらに周辺座標保持部304に周辺座標を保持している期間となる。   A period 605 is a period during which the coordinate calculation unit 303 performs calculation so that the pixel interpolation unit 109 reads the first rectangular image from the rectangular image holding unit 108 in units of pixels. That is, after the period 603, during the High period of the timing chart 610, the coordinate calculation unit 303 performs calculations, the peripheral coordinates are held in the peripheral coordinate holding unit 304, and the peripheral coordinates of the previous rectangular image are output. Is shown. Note that a high period of the timing chart 610 in the periods 600 and 601 is a period in which the calculation is performed by the coordinate calculation unit 303 and the peripheral coordinates are held in the peripheral coordinate holding unit 304.

また、期間606は、矩形画像保持部108のBank500に補正前画像の第三の矩形画像を書き込んでいる期間を示し、図5(C)の状態を示している。なお、図6に示す例は、矩形画像保持部108のBank500への書き込みタイミングと、画素補間部109が矩形画像を画素単位で読み出すタイミングとを同じとしている。ところが、矩形画像保持部108のBank500への書き込みが早く終了する場合や、画素補間部109が矩形画像を画素単位で読み出すのが終了するタイミングが早い場合もありうる。この場合には、同じBankに書き込みと読み出しとが発生しないように制御する。   A period 606 indicates a period in which the third rectangular image of the pre-correction image is written in the Bank 500 of the rectangular image holding unit 108, and shows the state of FIG. In the example illustrated in FIG. 6, the writing timing of the rectangular image holding unit 108 to the Bank 500 and the timing at which the pixel interpolation unit 109 reads the rectangular image in units of pixels are the same. However, there may be a case where writing to the Bank 500 of the rectangular image holding unit 108 ends early, or a timing when the pixel interpolation unit 109 ends reading out the rectangular image in units of pixels. In this case, control is performed so that writing and reading do not occur in the same Bank.

図8は、収差補正部100による1つの矩形画像の補正前座標の演算処理手順の一例を示すフローチャートである。
まず、ステップS800において、第一補正後座標生成部101は、補正後画像の矩形内の周辺画素毎の座標情報を生成して保持する。第一補正後座標生成部101に保持する期間は、例えば第三の矩形画像の場合は、図6の期間602で保持することになる。
FIG. 8 is a flowchart illustrating an example of a calculation process procedure of the coordinates before correction of one rectangular image by the aberration correction unit 100.
First, in step S800, the first post-correction coordinate generation unit 101 generates and holds coordinate information for each peripheral pixel in the rectangle of the post-correction image. For example, in the case of the third rectangular image, the period held in the first corrected coordinate generation unit 101 is held in the period 602 in FIG.

続いてステップS801において、補正前座標演算部103は、矩形画像保持部108の少なくとも1つのBankにデータがないかどうかを判定する。この判定の結果、少なくとも1つのBankにデータがない場合は、ステップS804に進み、いずれのBankにもデータがある場合は、ステップS802に進む。   Subsequently, in step S <b> 801, the pre-correction coordinate calculation unit 103 determines whether there is data in at least one Bank of the rectangular image holding unit 108. As a result of the determination, if there is no data in at least one Bank, the process proceeds to Step S804, and if any Bank has data, the process proceeds to Step S802.

ステップS802においては、補正前座標演算部103は、第二補正後座標生成部102から座標情報が入力されるまで待機する。そして、第二補正後座標生成部102から座標情報が入力されると、次のステップS803に進む。   In step S <b> 802, the pre-correction coordinate calculation unit 103 waits until coordinate information is input from the second post-correction coordinate generation unit 102. When coordinate information is input from the second corrected coordinate generation unit 102, the process proceeds to the next step S803.

次に、ステップS803において、補正前座標演算部103は、入力された座標が矩形内の周辺座標かどうかを判定する。この判定の結果、周辺座標である場合はステップS804に進み、周辺座標でない場合は、ステップS806に進む。なお、ステップS801からS803の処理は、補正前座標演算部103の矩形周辺判定部301で行われる。   Next, in step S803, the pre-correction coordinate calculation unit 103 determines whether or not the input coordinates are peripheral coordinates in a rectangle. As a result of the determination, if the coordinates are peripheral coordinates, the process proceeds to step S804. If the coordinates are not peripheral coordinates, the process proceeds to step S806. Note that the processes in steps S801 to S803 are performed by the rectangular periphery determination unit 301 of the pre-correction coordinate calculation unit 103.

ステップS804においては、座標演算部303は、第一補正後座標生成部101から座標情報を入力し、座標演算を行う。そして、ステップS805において、座標演算部303は、演算結果を矩形読み出し制御部104に出力するとともに、周辺座標保持部304に演算結果を出力して保持するようにする。このとき、補正前座標演算部103は、周辺座標保持部304に保持していた周辺座標を矩形画像保持部108に出力するようにする。   In step S804, the coordinate calculation unit 303 inputs coordinate information from the first corrected coordinate generation unit 101 and performs coordinate calculation. In step S805, the coordinate calculation unit 303 outputs the calculation result to the rectangular readout control unit 104, and outputs and holds the calculation result in the peripheral coordinate holding unit 304. At this time, the pre-correction coordinate calculation unit 103 outputs the peripheral coordinates held in the peripheral coordinate holding unit 304 to the rectangular image holding unit 108.

一方、ステップS806においては、座標演算部303は、矩形周辺判定部301から座標情報を入力し、座標演算部303で座標演算を行う。そして、ステップS807において、座標演算部303は、演算結果を矩形画像保持部108に出力する。   On the other hand, in step S806, the coordinate calculation unit 303 inputs coordinate information from the rectangular periphery determination unit 301, and the coordinate calculation unit 303 performs coordinate calculation. In step S <b> 807, the coordinate calculation unit 303 outputs the calculation result to the rectangular image holding unit 108.

次のステップS808においては、矩形内の座標の全ての演算が終わったかどうかを判定する。この判定の結果、演算が全て終わっていない場合はステップS801に戻る。一方、ステップS808の判定の結果、演算が全て終了した場合は、1矩形画像の補正前座標の演算を終了する。   In the next step S808, it is determined whether or not all the calculations for the coordinates in the rectangle have been completed. As a result of the determination, if all the calculations are not completed, the process returns to step S801. On the other hand, if all the calculations are completed as a result of the determination in step S808, the calculation of the pre-correction coordinates of one rectangular image is ended.

以上説明したように本実施形態によれば、補正前画像をメモリ107から読み出す時の座標の演算と、補正前画像を矩形画像保持部108から読み出す時の座標の演算とを、1つの補正前座標演算部(回路)で実行することができる。これにより、回路規模及び消費電力を削減することができる。   As described above, according to the present embodiment, the calculation of the coordinates when reading the pre-correction image from the memory 107 and the calculation of the coordinates when reading the pre-correction image from the rectangular image holding unit 108 are performed as one pre-correction. It can be executed by a coordinate calculation unit (circuit). Thereby, a circuit scale and power consumption can be reduced.

また、第一補正後座標生成部101、第二補正後座標生成部102、矩形画像保持部108、矩形周辺判定部301、第一のセレクタ302、周辺座標保持部304、及び第二のセレクタ300により、メモリ107へのランダムアクセスを低減している。これにより、2つの補正前座標演算部を実装した場合と同等の性能を維持することが可能となる。   In addition, the first post-correction coordinate generation unit 101, the second post-correction coordinate generation unit 102, the rectangular image holding unit 108, the rectangular periphery determination unit 301, the first selector 302, the peripheral coordinate storage unit 304, and the second selector 300 Thus, random access to the memory 107 is reduced. This makes it possible to maintain the same performance as when two pre-correction coordinate calculation units are mounted.

(第2の実施形態)
次に、本発明の第2の実施形態について説明する。なお、本実施形態では、前述した第1の実施形態と異なる部分のみを説明し、同一の部分については、同一の符号を付すなどして詳細な説明は省略する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. In the present embodiment, only the parts different from the first embodiment described above will be described, and the same parts will be denoted by the same reference numerals and detailed description thereof will be omitted.

図10は、本実施形態における補正前座標演算部103の詳細な構成例を示すブロック図である。
図10に示すように、本実施形態に係る補正前座標演算部103は、入力判定部1000と座標演算部303とを備えている。
FIG. 10 is a block diagram illustrating a detailed configuration example of the pre-correction coordinate calculation unit 103 in the present embodiment.
As shown in FIG. 10, the pre-correction coordinate calculation unit 103 according to the present embodiment includes an input determination unit 1000 and a coordinate calculation unit 303.

入力判定部1000は、第一補正後座標生成部101と第二補正後座標生成部102とのどちらかから出力された座標情報かを判定し、先に入力された座標情報を座標演算部303に出力する。また、第一補正後座標生成部101と第二補正後座標生成部102とから座標が略同時に入力された場合は、第一補正後座標生成部101から出力された座標情報を優先して座標演算部303に出力する。   The input determination unit 1000 determines whether the coordinate information is output from either the first post-correction coordinate generation unit 101 or the second post-correction coordinate generation unit 102, and uses the previously input coordinate information as the coordinate calculation unit 303. Output to. When coordinates are input from the first corrected coordinate generation unit 101 and the second corrected coordinate generation unit 102 substantially simultaneously, the coordinate information output from the first corrected coordinate generation unit 101 is given priority. The result is output to the calculation unit 303.

また、第二補正後座標生成部102は、補正前座標演算部103に入力された座標に対応する補正前座標が出力されるまで、同じ座標を出力するようにする。このように補正前座標演算部103で演算されるまで、同じ座標を出力することにより、第一補正後座標生成部101と第二補正後座標生成部102との座標を全て演算することが可能となる。   Further, the second post-correction coordinate generation unit 102 outputs the same coordinates until the pre-correction coordinates corresponding to the coordinates input to the pre-correction coordinate calculation unit 103 are output. By outputting the same coordinates until calculated by the pre-correction coordinate calculation unit 103 in this way, it is possible to calculate all the coordinates of the first post-correction coordinate generation unit 101 and the second post-correction coordinate generation unit 102. It becomes.

図11は、本実施形態における座標演算部303の処理状況と、矩形画像保持部108へ矩形画像を書き込むタイミングとを説明するための図である。
図11において、タイミングチャート1110は、座標演算部303による、第一補正後座標生成部101から入力された座標情報に基づいて、補正前画像を読み出すための座標演算をHighまたはLowで示し、Highが演算期間を示している。
FIG. 11 is a diagram for explaining the processing status of the coordinate calculation unit 303 and the timing of writing a rectangular image to the rectangular image holding unit 108 in the present embodiment.
In FIG. 11, a timing chart 1110 indicates coordinate calculation for reading an uncorrected image based on the coordinate information input from the first corrected coordinate generation unit 101 by the coordinate calculation unit 303 as High or Low. Indicates the calculation period.

タイミングチャート1111は、座標演算部303による、第二補正後座標生成部102から入力された座標情報に基づいて、補正前画像を読み出すための座標演算をHighまたはLowで示し、Highが演算期間を示している。さらにタイミングチャート1112は、補正前画像を矩形画像保持部108に書き込むタイミングチャートを示し、Highが書き込み期間を示している。   The timing chart 1111 indicates coordinate calculation for reading an uncorrected image by High or Low based on the coordinate information input from the second corrected coordinate generation unit 102 by the coordinate calculation unit 303, and High indicates the calculation period. Show. Further, a timing chart 1112 shows a timing chart for writing the pre-correction image in the rectangular image holding unit 108, and High shows a writing period.

期間1100、1101は、それぞれメモリ107から補正前画像の第一の矩形画像及び第二の矩形画像を読み出すために、第一補正後座標生成部101の座標に対して座標演算部303で演算している期間である。つまり、期間1100は第一の矩形座標演算期間、期間1101は、第二の矩形座標演算期間を示している。   In periods 1100 and 1101, the coordinate calculation unit 303 calculates the coordinates of the first corrected coordinate generation unit 101 in order to read the first rectangular image and the second rectangular image of the image before correction from the memory 107, respectively. It is a period. That is, the period 1100 indicates the first rectangular coordinate calculation period, and the period 1101 indicates the second rectangular coordinate calculation period.

期間1102は、矩形画像保持部108のBank500に補正前画像の第一の矩形画像を書き込んでいる期間を示し、図5(A)の状態を表している。そして、期間1103は、矩形画像保持部108のBank501に補正前画像の第二の矩形画像を書き込んでいる期間を示し、図5(B)の状態を表している。   A period 1102 indicates a period in which the first rectangular image of the pre-correction image is written in the Bank 500 of the rectangular image holding unit 108, and represents the state of FIG. A period 1103 indicates a period in which the second rectangular image of the pre-correction image is written in the bank 501 of the rectangular image holding unit 108, and represents the state of FIG.

ここで、期間1103中の期間1105は、タイミングチャート1111に示すように、画素補間部109が第一の矩形画像を画素単位で読み出すために、座標演算部303で演算している期間を示している。さらに、期間1103中の期間1104は、タイミングチャート1110に示すように、メモリ107から矩形画像保持部108のBank500に第三の矩形画像を書き込むために、座標演算部303で演算している期間を示している。なお、座標演算部303は、どちらか一方の処理を行うことになるため、タイミングチャート1110とタイミングチャート1111とで同時にHighになることはない。   Here, a period 1105 in the period 1103 indicates a period during which the coordinate calculation unit 303 calculates the pixel interpolation unit 109 to read out the first rectangular image in units of pixels as illustrated in the timing chart 1111. Yes. Further, a period 1104 in the period 1103 is a period calculated by the coordinate calculation unit 303 in order to write the third rectangular image from the memory 107 to the Bank 500 of the rectangular image holding unit 108 as shown in the timing chart 1110. Show. Note that the coordinate calculation unit 303 performs either one of the processes, so the timing chart 1110 and the timing chart 1111 do not become High at the same time.

また、期間1106は、矩形画像保持部108のBank500に補正前画像の第三の矩形画像を書き込んでいる期間を示し、図5(C)の状態を表している。ここで、期間1106中の期間1108は、タイミングチャート1111に示すように、画素補間部109が第二の矩形画像を画素単位で読み出すために、座標演算部303で演算している期間を示している。さらに、期間1106中の期間1107は、タイミングチャート1110に示すように、メモリ107から矩形画像保持部108のBank500に第四の矩形画像を書き込むために、座標演算部303で演算している期間を示している。   A period 1106 is a period during which the third rectangular image of the pre-correction image is written in the Bank 500 of the rectangular image holding unit 108, and represents the state of FIG. Here, a period 1108 in the period 1106 indicates a period during which the coordinate calculation unit 303 calculates the pixel interpolation unit 109 so as to read out the second rectangular image in units of pixels, as shown in the timing chart 1111. Yes. Further, a period 1107 in the period 1106 is a period calculated by the coordinate calculation unit 303 in order to write the fourth rectangular image from the memory 107 to the Bank 500 of the rectangular image holding unit 108 as shown in the timing chart 1110. Show.

図11に示す例は、矩形画像保持部108のBank500への書き込むタイミングと、画素補間部109が矩形画像を画素単位で読み出すタイミングとを同じとしている。ところが、矩形画像保持部108のBank500への書き込みが早く終了する場合や、画素補間部109が矩形画像を画素単位で読み出すのが終了するタイミングが早い場合もありうる。この場合には、同じBankに書き込みと読み出しとが発生しないように制御する。   In the example illustrated in FIG. 11, the timing at which the rectangular image holding unit 108 writes to the Bank 500 is the same as the timing at which the pixel interpolation unit 109 reads the rectangular image in units of pixels. However, there may be a case where writing to the Bank 500 of the rectangular image holding unit 108 ends early, or a timing when the pixel interpolation unit 109 ends reading out the rectangular image in units of pixels. In this case, control is performed so that writing and reading do not occur in the same Bank.

以上説明したように本実施形態によれば、補正前画像をメモリ107から読み出す時の座標の演算と、補正前画像を矩形画像保持部108から読み出す時の座標の演算とを、1つの補正前座標演算部で実行することができる。これにより、回路規模及び消費電力を削減することができる。   As described above, according to the present embodiment, the calculation of the coordinates when reading the pre-correction image from the memory 107 and the calculation of the coordinates when reading the pre-correction image from the rectangular image holding unit 108 are performed as one pre-correction. It can be executed by the coordinate calculation unit. Thereby, a circuit scale and power consumption can be reduced.

(その他の実施形態)
以上、第1及び第2の実施形態について具体的に説明したが、本発明は、例えば、ローリング歪などその他の歪補正に関しても適応可能であり、実施形態に限定されるものではない。その要旨を逸脱しない範囲において種々の変更が可能であることは言うまでもない。
(Other embodiments)
Although the first and second embodiments have been specifically described above, the present invention can be applied to other distortion corrections such as rolling distortion, and is not limited to the embodiments. Needless to say, various modifications can be made without departing from the scope of the invention.

本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。   The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

103 補正前座標演算部
104 矩形読み出し制御部
107 メモリ
108 矩形画像保持部
109 画素補間部
111 補正後座標生成部
103 Pre-correction coordinate calculation unit 104 Rectangle readout control unit 107 Memory 108 Rectangular image holding unit 109 Pixel interpolation unit 111 Corrected coordinate generation unit

Claims (10)

光学系を用いて被写体が撮像された画像データにおける前記光学系の歪曲収差を補正する画像処理装置であって、
前記画像データを補正前画像として記憶する第1の記憶手段と、
前記歪曲収差が補正された補正後画像の座標を生成する座標生成手段と、
前記座標生成手段によって生成された補正後画像の座標に対応する前記補正前画像の座標を演算する演算手段と、
前記演算手段によって演算された前記補正前画像における矩形領域の一部の座標を元に、前記第1の記憶手段から前記補正前画像を矩形領域ごとに読み出す読み出し制御手段と、
前記読み出し制御手段によって読み出された補正前画像を矩形領域ごとに一時的に記憶する第2の記憶手段と、
前記演算手段によって演算された前記補正前画像における矩形領域内の座標を元に、前記第2の記憶手段から前記補正前画像を読み出して前記補正後画像を生成する画像処理手段とを有し、
前記座標生成手段は、前記第1の記憶手段から前記補正前画像を読み出す座標を前記演算手段が演算するための座標を生成するとともに、前記第2の記憶手段から前記補正前画像を読み出す座標を前記演算手段が演算するための座標を生成し、
前記演算手段は、前記第1の記憶手段から前記補正前画像を読み出すための座標、または前記第2の記憶手段から前記補正前画像を読み出すための座標を演算し、
さらに前記演算手段は、
前記座標生成手段によって生成された補正後画像の座標が、前記補正後画像における矩形領域の一部の座標か否かを判定する判定手段と、
前記判定手段によって前記矩形領域の一部の座標と判定された場合に、前記補正後画像における当該矩形領域に対応する、前記補正前画像における矩形領域の一部の座標を一時的に保持する保持手段とを有し、
前記画像処理手段は、前記保持手段に保持されている座標に基づいて前記第2の記憶手段から前記補正前画像を読み出して前記補正後画像を生成することを特徴とする画像処理装置。
An image processing apparatus for correcting distortion aberration of the optical system in image data obtained by imaging an object using an optical system,
First storage means for storing the image data as an uncorrected image;
Coordinate generating means for generating coordinates of the corrected image in which the distortion is corrected;
Computing means for computing coordinates of the pre-correction image corresponding to coordinates of the post-correction image generated by the coordinate generation means;
Read control means for reading out the pre-correction image for each rectangular area from the first storage means based on some coordinates of the rectangular area in the pre-correction image calculated by the calculation means;
Second storage means for temporarily storing the pre-correction image read by the read control means for each rectangular area;
Image processing means for reading out the pre-correction image from the second storage means and generating the post-correction image based on the coordinates in the rectangular area in the pre-correction image calculated by the calculation means;
The coordinate generation means generates coordinates for the calculation means to calculate coordinates for reading the pre-correction image from the first storage means, and coordinates for reading the pre-correction image from the second storage means. Generating coordinates for the calculation means to calculate,
The calculating means calculates coordinates for reading the uncorrected image from the first storage means, or coordinates for reading the uncorrected image from the second storage means ,
Further, the calculation means includes:
Determining means for determining whether or not the coordinates of the corrected image generated by the coordinate generating means are coordinates of a part of a rectangular area in the corrected image;
When the determination unit determines that the coordinates are part of the rectangular area, the storage temporarily stores some coordinates of the rectangular area in the pre-correction image corresponding to the rectangular area in the corrected image. Means,
The image processing device, wherein the image processing unit reads the pre-correction image from the second storage unit based on the coordinates held in the holding unit, and generates the post-correction image .
前記演算手段は、前記第2の記憶手段に前記補正前画像における第1の矩形領域が記憶されている場合において、前記判定手段によって前記補正後画像の座標が前記第1の矩形領域とは異なる矩形領域と対応する矩形領域の一部の座標であると判定された場合に、前記演算手段は、前記補正後画像における当該矩形領域に対応する、前記補正前画像における第2の矩形領域の一部の座標を演算し、
前記画像処理手段は、前記保持手段に保持されている前記補正前画像における第1の矩形領域の座標に基づいて前記第2の記憶手段から前記補正前画像を読み出して前記補正後画像を生成することを特徴とする請求項に記載の画像処理装置。
In the case where the first rectangular area in the pre-correction image is stored in the second storage means, the calculation means has the coordinates of the post-correction image different from the first rectangular area by the determination means. When it is determined that the coordinates of a part of the rectangular area corresponding to the rectangular area are, the calculation means includes one of the second rectangular areas in the uncorrected image corresponding to the rectangular area in the corrected image. Calculate the coordinates of the part,
The image processing unit reads the pre-correction image from the second storage unit based on the coordinates of the first rectangular area in the pre-correction image held in the holding unit, and generates the post-correction image. The image processing apparatus according to claim 1 .
前記演算手段は、前記第1の記憶手段から前記補正前画像を読み出すための座標の演算を、前記第2の記憶手段から前記補正前画像を読み出すための座標の演算よりも優先することを特徴とする請求項1又は2に記載の画像処理装置。 The calculation means prioritizes the calculation of coordinates for reading the uncorrected image from the first storage means over the calculation of coordinates for reading the uncorrected image from the second storage means. The image processing apparatus according to claim 1 or 2 . 光学系を用いて被写体が撮像された画像データにおける前記光学系の歪曲収差を補正する画像処理装置であって、
前記画像データを補正前画像として記憶する第1の記憶手段と、
前記歪曲収差が補正された補正後画像の座標を生成する座標生成手段と、
前記座標生成手段によって生成された補正後画像の座標に対応する前記補正前画像の座標を演算する演算手段と、
前記演算手段によって演算された前記補正前画像における矩形領域の一部の座標を元に、前記第1の記憶手段から前記補正前画像を矩形領域ごとに読み出す読み出し制御手段と、
前記読み出し制御手段によって読み出された補正前画像を矩形領域ごとに一時的に記憶する第2の記憶手段と、
前記演算手段によって演算された前記補正前画像における矩形領域内の座標を元に、前記第2の記憶手段から前記補正前画像を読み出して前記補正後画像を生成する画像処理手段とを有し、
前記座標生成手段は、前記第1の記憶手段から前記補正前画像を読み出す座標を前記演算手段が演算するための座標を生成するとともに、前記第2の記憶手段から前記補正前画像を読み出す座標を前記演算手段が演算するための座標を生成し、
前記演算手段は、前記第1の記憶手段から前記補正前画像を読み出すための座標、または前記第2の記憶手段から前記補正前画像を読み出すための座標を演算し、
前記矩形領域は正方形の領域であることを特徴とする画像処理装置。
An image processing apparatus for correcting distortion aberration of the optical system in image data obtained by imaging an object using an optical system,
First storage means for storing the image data as an uncorrected image;
Coordinate generating means for generating coordinates of the corrected image in which the distortion is corrected;
Computing means for computing coordinates of the pre-correction image corresponding to coordinates of the post-correction image generated by the coordinate generation means;
Read control means for reading out the pre-correction image for each rectangular area from the first storage means based on some coordinates of the rectangular area in the pre-correction image calculated by the calculation means;
Second storage means for temporarily storing the pre-correction image read by the read control means for each rectangular area;
Image processing means for reading out the pre-correction image from the second storage means and generating the post-correction image based on the coordinates in the rectangular area in the pre-correction image calculated by the calculation means;
The coordinate generation means generates coordinates for the calculation means to calculate coordinates for reading the pre-correction image from the first storage means, and coordinates for reading the pre-correction image from the second storage means. Generating coordinates for the calculation means to calculate,
The calculating means calculates coordinates for reading the uncorrected image from the first storage means, or coordinates for reading the uncorrected image from the second storage means,
Images processor characterized in that the rectangular region is a square region.
前記演算手段は、1つの回路によって構成されていることを特徴とする請求項1〜の何れか1項に記載の画像処理装置。 It said calculation means, an image processing apparatus according to any one of claims 1-4, characterized in that it is constituted by a single circuit. 前記第1の記憶手段はDRAMであり、前記第2の記憶手段はSRAMであることを特徴とする請求項1〜の何れか1項に記載の画像処理装置。 The first storage means is a DRAM, an image processing apparatus according to any one of claim 1 to 5, wherein said second storage means, which is a SRAM. 光学系を用いて被写体が撮像された画像データを補正前画像として第1の記憶手段に記憶し、前記画像データにおける前記光学系の歪曲収差を補正する画像処理装置の画像処理方法であって、
前記歪曲収差が補正された補正後画像の座標を生成する座標生成工程と、
前記座標生成工程において生成された補正後画像の座標に対応する前記補正前画像の座標を演算する演算工程と、
前記演算工程において演算された前記補正前画像における矩形領域の一部の座標を元に、前記第1の記憶手段から前記補正前画像を矩形領域ごとに読み出し、第2の記憶手段に一時的に記憶する制御工程と、
前記演算工程において演算された前記補正前画像における矩形領域内の座標を元に、前記第2の記憶手段から前記補正前画像を読み出して前記補正後画像を生成する画像処理工程とを有し、
前記座標生成工程においては、前記第1の記憶手段から前記補正前画像を読み出す座標を前記演算工程において演算するための座標を生成するとともに、前記第2の記憶手段から前記補正前画像を読み出す座標を前記演算工程において演算するための座標を生成し、
前記演算工程においては、前記第1の記憶手段から前記補正前画像を読み出すための座標、または前記第2の記憶手段から前記補正前画像を読み出すための座標を演算し、
さらに前記演算工程においては、
前記座標生成工程において生成された補正後画像の座標が、前記補正後画像における矩形領域の一部の座標か否かを判定する判定工程と、
前記判定工程において前記矩形領域の一部の座標と判定された場合に、前記補正後画像における当該矩形領域に対応する、前記補正前画像における矩形領域の一部の座標を一時的に保持手段に保持する保持工程とを有し、
前記画像処理工程においては、前記保持手段に保持されている座標に基づいて前記第2の記憶手段から前記補正前画像を読み出して前記補正後画像を生成することを特徴とする画像処理方法。
An image processing method of an image processing apparatus for storing image data obtained by imaging an object using an optical system as a pre-correction image in a first storage unit and correcting distortion aberration of the optical system in the image data,
A coordinate generation step of generating coordinates of the corrected image in which the distortion is corrected;
A calculation step of calculating coordinates of the pre-correction image corresponding to the coordinates of the corrected image generated in the coordinate generation step;
Based on the coordinates of a part of the rectangular area in the pre-correction image calculated in the calculation step, the pre-correction image is read from the first storage unit for each rectangular area, and temporarily stored in the second storage unit. A control process for storing;
An image processing step of reading out the pre-correction image from the second storage means and generating the post-correction image based on the coordinates in the rectangular area in the pre-correction image calculated in the calculation step;
In the coordinate generation step, coordinates for calculating the coordinates for reading the pre-correction image from the first storage means in the calculation step and coordinates for reading the pre-correction image from the second storage means To generate coordinates for calculating in the calculation step,
In the calculation step, the coordinates for reading the pre-correction image from the first storage means or the coordinates for reading the pre-correction image from the second storage means are calculated ,
Furthermore, in the calculation step,
A determination step of determining whether or not the coordinates of the corrected image generated in the coordinate generation step are coordinates of a part of a rectangular region in the corrected image;
When it is determined in the determination step that the coordinates are a part of the rectangular area, the coordinates of the rectangular area in the pre-correction image corresponding to the rectangular area in the corrected image are temporarily stored in the holding unit. Holding process to hold,
In the image processing step, the post-correction image is generated by reading the pre-correction image from the second storage unit based on the coordinates held in the holding unit .
光学系を用いて被写体が撮像された画像データを補正前画像として第1の記憶手段に記憶し、前記画像データにおける前記光学系の歪曲収差を補正する画像処理装置の画像処理方法であって、An image processing method of an image processing apparatus for storing image data obtained by imaging an object using an optical system as a pre-correction image in a first storage unit and correcting distortion aberration of the optical system in the image data,
前記歪曲収差が補正された補正後画像の座標を生成する座標生成工程と、A coordinate generation step of generating coordinates of the corrected image in which the distortion is corrected;
前記座標生成工程において生成された補正後画像の座標に対応する前記補正前画像の座標を演算する演算工程と、A calculation step of calculating coordinates of the pre-correction image corresponding to the coordinates of the corrected image generated in the coordinate generation step;
前記演算工程において演算された前記補正前画像における矩形領域の一部の座標を元に、前記第1の記憶手段から前記補正前画像を矩形領域ごとに読み出し、第2の記憶手段に一時的に記憶する制御工程と、Based on the coordinates of a part of the rectangular area in the pre-correction image calculated in the calculation step, the pre-correction image is read from the first storage unit for each rectangular area, and temporarily stored in the second storage unit. A control process for storing;
前記演算工程において演算された前記補正前画像における矩形領域内の座標を元に、前記第2の記憶手段から前記補正前画像を読み出して前記補正後画像を生成する画像処理工程とを有し、An image processing step of reading out the pre-correction image from the second storage means and generating the post-correction image based on the coordinates in the rectangular area in the pre-correction image calculated in the calculation step;
前記座標生成工程においては、前記第1の記憶手段から前記補正前画像を読み出す座標を前記演算工程において演算するための座標を生成するとともに、前記第2の記憶手段から前記補正前画像を読み出す座標を前記演算工程において演算するための座標を生成し、In the coordinate generation step, coordinates for calculating the coordinates for reading the pre-correction image from the first storage means in the calculation step and coordinates for reading the pre-correction image from the second storage means To generate coordinates for calculating in the calculation step,
前記演算工程においては、前記第1の記憶手段から前記補正前画像を読み出すための座標、または前記第2の記憶手段から前記補正前画像を読み出すための座標を演算し、In the calculation step, the coordinates for reading the pre-correction image from the first storage means or the coordinates for reading the pre-correction image from the second storage means are calculated,
前記矩形領域は正方形の領域であることを特徴とする画像処理方法。An image processing method, wherein the rectangular area is a square area.
光学系を用いて被写体が撮像された画像データを補正前画像として第1の記憶手段に記憶し、前記画像データにおける前記光学系の歪曲収差を補正する画像処理装置を制御するためのプログラムであって、
前記歪曲収差が補正された補正後画像の座標を生成する座標生成工程と、
前記座標生成工程において生成された補正後画像の座標に対応する前記補正前画像の座標を演算する演算工程と、
前記演算工程において演算された前記補正前画像における矩形領域の一部の座標を元に、前記第1の記憶手段から前記補正前画像を矩形領域ごとに読み出し、第2の記憶手段に一時的に記憶する制御工程と、
前記演算工程において演算された前記補正前画像における矩形領域内の座標を元に、前記第2の記憶手段から前記補正前画像を読み出して前記補正後画像を生成する画像処理工程とをコンピュータに実行させ、
前記座標生成工程においては、前記第1の記憶手段から前記補正前画像を読み出す座標を前記演算工程において演算するための座標を生成するとともに、前記第2の記憶手段から前記補正前画像を読み出す座標を前記演算工程において演算するための座標を生成し、
前記演算工程においては、前記第1の記憶手段から前記補正前画像を読み出すための座標、または前記第2の記憶手段から前記補正前画像を読み出すための座標を演算し、
さらに前記演算工程においては、
前記座標生成工程において生成された補正後画像の座標が、前記補正後画像における矩形領域の一部の座標か否かを判定する判定工程と、
前記判定工程において前記矩形領域の一部の座標と判定された場合に、前記補正後画像における当該矩形領域に対応する、前記補正前画像における矩形領域の一部の座標を一時的に保持手段に保持する保持工程とを有し、
前記画像処理工程においては、前記保持手段に保持されている座標に基づいて前記第2の記憶手段から前記補正前画像を読み出して前記補正後画像を生成することを特徴とするプログラム。
A program for controlling an image processing apparatus that stores image data obtained by capturing an object using an optical system as a pre-correction image in a first storage unit and corrects distortion aberration of the optical system in the image data. And
A coordinate generation step of generating coordinates of the corrected image in which the distortion is corrected;
A calculation step of calculating coordinates of the pre-correction image corresponding to the coordinates of the corrected image generated in the coordinate generation step;
Based on the coordinates of a part of the rectangular area in the pre-correction image calculated in the calculation step, the pre-correction image is read from the first storage unit for each rectangular area, and temporarily stored in the second storage unit. A control process for storing;
Based on the coordinates in the rectangular area of the pre-correction image calculated in the calculation step, the computer executes an image processing step of reading the pre-correction image from the second storage means and generating the post-correction image Let
In the coordinate generation step, coordinates for calculating the coordinates for reading the pre-correction image from the first storage means in the calculation step and coordinates for reading the pre-correction image from the second storage means To generate coordinates for calculating in the calculation step,
In the calculation step, the coordinates for reading the pre-correction image from the first storage means or the coordinates for reading the pre-correction image from the second storage means are calculated,
Furthermore, in the calculation step,
A determination step of determining whether or not the coordinates of the corrected image generated in the coordinate generation step are coordinates of a part of a rectangular region in the corrected image;
When it is determined in the determination step that the coordinates are a part of the rectangular area, the coordinates of the rectangular area in the pre-correction image corresponding to the rectangular area in the corrected image are temporarily stored in the holding unit. Holding process to hold,
In the image processing step, the pre-correction image is read out from the second storage unit based on the coordinates held in the holding unit and the post-correction image is generated .
光学系を用いて被写体が撮像された画像データを補正前画像として第1の記憶手段に記憶し、前記画像データにおける前記光学系の歪曲収差を補正する画像処理装置を制御するためのプログラムであって、A program for controlling an image processing apparatus that stores image data obtained by capturing an object using an optical system as a pre-correction image in a first storage unit and corrects distortion aberration of the optical system in the image data. And
前記歪曲収差が補正された補正後画像の座標を生成する座標生成工程と、A coordinate generation step of generating coordinates of the corrected image in which the distortion is corrected;
前記座標生成工程において生成された補正後画像の座標に対応する前記補正前画像の座標を演算する演算工程と、A calculation step of calculating coordinates of the pre-correction image corresponding to the coordinates of the corrected image generated in the coordinate generation step;
前記演算工程において演算された前記補正前画像における矩形領域の一部の座標を元に、前記第1の記憶手段から前記補正前画像を矩形領域ごとに読み出し、第2の記憶手段に一時的に記憶する制御工程と、Based on the coordinates of a part of the rectangular area in the pre-correction image calculated in the calculation step, the pre-correction image is read from the first storage unit for each rectangular area, and temporarily stored in the second storage unit. A control process for storing;
前記演算工程において演算された前記補正前画像における矩形領域内の座標を元に、前記第2の記憶手段から前記補正前画像を読み出して前記補正後画像を生成する画像処理工程とをコンピュータに実行させ、Based on the coordinates in the rectangular area of the pre-correction image calculated in the calculation step, the computer executes an image processing step of reading the pre-correction image from the second storage means and generating the post-correction image Let
前記座標生成工程においては、前記第1の記憶手段から前記補正前画像を読み出す座標を前記演算工程において演算するための座標を生成するとともに、前記第2の記憶手段から前記補正前画像を読み出す座標を前記演算工程において演算するための座標を生成し、In the coordinate generation step, coordinates for calculating the coordinates for reading the pre-correction image from the first storage means in the calculation step and coordinates for reading the pre-correction image from the second storage means To generate coordinates for calculating in the calculation step,
前記演算工程においては、前記第1の記憶手段から前記補正前画像を読み出すための座標、または前記第2の記憶手段から前記補正前画像を読み出すための座標を演算し、In the calculation step, the coordinates for reading the pre-correction image from the first storage means or the coordinates for reading the pre-correction image from the second storage means are calculated,
前記矩形領域は正方形の領域であることを特徴とするプログラム。The rectangular area is a square area.
JP2014235697A 2014-11-20 2014-11-20 Image processing apparatus, image processing method, and program Active JP6440465B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014235697A JP6440465B2 (en) 2014-11-20 2014-11-20 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014235697A JP6440465B2 (en) 2014-11-20 2014-11-20 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2016100717A JP2016100717A (en) 2016-05-30
JP6440465B2 true JP6440465B2 (en) 2018-12-19

Family

ID=56078161

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014235697A Active JP6440465B2 (en) 2014-11-20 2014-11-20 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP6440465B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019032590A (en) * 2017-08-04 2019-02-28 キヤノン株式会社 Image processing device and image processing method, program, storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004362069A (en) * 2003-06-02 2004-12-24 Olympus Corp Image processor
JP4781229B2 (en) * 2006-11-01 2011-09-28 キヤノン株式会社 Distortion correction apparatus, imaging apparatus, and control method for distortion correction apparatus

Also Published As

Publication number Publication date
JP2016100717A (en) 2016-05-30

Similar Documents

Publication Publication Date Title
JP5443844B2 (en) Image processing apparatus and imaging apparatus
JP4781229B2 (en) Distortion correction apparatus, imaging apparatus, and control method for distortion correction apparatus
US8094230B2 (en) Image processing apparatus, image processing method, and program
US8335398B2 (en) Zoom lens distortion correcting apparatus
JP5602532B2 (en) Image processing apparatus and image processing method
US7499082B2 (en) Distortion correction circuit for generating distortion-corrected image using data for uncorrected image
US8928782B2 (en) Image processing device and image capture device
JP2013218654A (en) Image processing device
US10395337B2 (en) Image processing apparatus, image processing method, and storage medium
US10713757B2 (en) Image processing apparatus, control method thereof, and storage medium
JP2005135096A (en) Image processing method, image processing apparatus and program
JP6440465B2 (en) Image processing apparatus, image processing method, and program
JP5676233B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP6762775B2 (en) Image processing equipment, imaging equipment, control methods and programs
WO2015098721A1 (en) Image processing device, image processing method, image processing program, and imaging device
JP2009003953A (en) Image processor
JP2017017609A (en) Image processing device
US9917972B2 (en) Image processor, image-processing method and program
JP4769880B2 (en) Image processing apparatus and method
JP2018098612A (en) Image processing system, image processing method, imaging apparatus, program, and storage medium
JP2009033498A (en) Optical distortion correction device, method and program therefor, and imaging apparatus
JP2003037769A (en) Signal processing unit, imaging device and signal processing method
CN108770374B (en) Image processing apparatus and image processing method
JP2016103169A (en) Image processing apparatus, image processing method, and electronic apparatus
JP2015154455A (en) image processing apparatus, image processing method and image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171110

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180726

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180731

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180926

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181120

R151 Written notification of patent or utility model registration

Ref document number: 6440465

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151