JP6524644B2 - Image processing apparatus and electronic device - Google Patents

Image processing apparatus and electronic device Download PDF

Info

Publication number
JP6524644B2
JP6524644B2 JP2014231174A JP2014231174A JP6524644B2 JP 6524644 B2 JP6524644 B2 JP 6524644B2 JP 2014231174 A JP2014231174 A JP 2014231174A JP 2014231174 A JP2014231174 A JP 2014231174A JP 6524644 B2 JP6524644 B2 JP 6524644B2
Authority
JP
Japan
Prior art keywords
image
pixels
area
processing
divided
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
JP2014231174A
Other languages
Japanese (ja)
Other versions
JP2016095667A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2014231174A priority Critical patent/JP6524644B2/en
Publication of JP2016095667A publication Critical patent/JP2016095667A/en
Application granted granted Critical
Publication of JP6524644B2 publication Critical patent/JP6524644B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理装置および電子機器に関する。   The present invention relates to an image processing apparatus and an electronic device.

電子機器として例えばデジタルカメラにおいては、小型化が急速に進められ、内蔵する撮影レンズに対しても小型化が要求されている。撮影レンズの小型化については、従来の多枚数のレンズを組み合わせて用いるものから、1枚若しくは少枚数の小型のものに置き換えることが多くなっている。   As electronic devices, for example, digital cameras, miniaturization is rapidly advancing, and miniaturization is also required for the built-in imaging lens. In order to miniaturize the photographing lens, in place of using a combination of a large number of conventional lenses, it is often replaced with a small number of one or a small number of lenses.

また、小型化のためにレンズの径をより小さいものに置き換えたり、低価格化のためにレンズの材質を安価なものに置き換えることがある。 ところが、このような小型化、低価格化された撮影レンズでは、いわゆる色収差や、歪曲収差などのレンズで生じる画質劣化を充分に抑えることが困難になってくる。撮像装置の小型化、広角化は、撮影画像の周辺部で歪曲が大きくなる要因となっている。   In addition, the diameter of the lens may be replaced with a smaller one for downsizing, or the material of the lens may be replaced with an inexpensive one for cost reduction. However, it is difficult to sufficiently suppress image quality deterioration caused by so-called chromatic aberration, distortion aberration, and the like with such a downsized and low cost photographing lens. Miniaturization and widening of the imaging apparatus are factors that increase distortion at the periphery of a captured image.

そこで、特許文献1に記載の撮像装置が提案されている。特許文献1に記載の撮像装置は、CCD(Charge Coupled Device)センサやCMOS(Complementary Metal Oxide Semiconductor)センサ等の撮像素子からR(赤)、G(緑)、B(青)の各色別の映像信号を取り出す。次に、一旦デジタルデータに変換してそれぞれ個別のフィールドメモリに一時記憶する。そして、撮影レンズの駆動状態に基づいて、各フィールドメモリ全体を個別にベクトル移動して各画像を拡大、縮小する。その後に再びR、G、Bの合成を行うことにより、撮影レンズで発生する色ずれや歪曲収差を補正することが記載されている。   Then, the imaging device of patent document 1 is proposed. The imaging device described in Patent Document 1 is an image according to each color of R (red), G (green), and B (blue) from an imaging element such as a charge coupled device (CCD) sensor or a complementary metal oxide semiconductor (CMOS) sensor. Take out the signal. Next, the digital data is temporarily converted into digital data and temporarily stored in individual field memories. Then, based on the drive state of the photographing lens, the entire field memory is individually vector-moved to enlarge or reduce each image. After that, it is described that color deviation and distortion generated in the photographing lens are corrected by combining R, G, and B again.

また、デジタルカメラ等の撮像装置において、撮像素子から得られた画像を歪み補正後に画像処理することにより、画像の倍率を拡大させるデジタルズーム技術も既に知られている。   Also, in an imaging apparatus such as a digital camera, digital zoom technology is already known which enlarges the magnification of an image by performing image processing after distortion correction on an image obtained from an imaging element.

しかしながら、特許文献1に記載された撮像装置では、撮像素子から読み出されたデータは、一旦SDRAM(Synchronous Dynamic Random Access Memory)等のメモリに格納された後、歪補正のために読み出され、歪補正が行われた後、再度メモリに保存するという動作が行われる。 同様に、デジタルズームを行う際にも、メモリに格納された画像データを読出し、補間等の処理により拡大画像を生成した後、再度メモリに保存するという動作が行われる。   However, in the imaging device described in Patent Document 1, the data read from the imaging element is temporarily stored in a memory such as a synchronous dynamic random access memory (SDRAM) and then read out for distortion correction. After the distortion correction is performed, an operation of saving in the memory again is performed. Similarly, when digital zooming is performed, the image data stored in the memory is read out, and after an enlarged image is generated by a process such as interpolation, the image is stored again in the memory.

このため、メモリからのデータの読出し、メモリへデータの書き込みが頻繁に行われることとなり、メモリへアクセスする帯域が不足してしまうという問題が生じる。 特に、歪補正、及びデジタルズーム処理は圧縮前の画像データに対して行うため、メモリへのアクセス帯域が大きく不足してしまう。 このため、システムクロックを高速化するなどの対処が必要となり、消費電力が増大するとともに、システム構成が複雑になるという問題が生じる。   For this reason, reading of data from the memory and writing of data to the memory are frequently performed, which causes a problem that a bandwidth for accessing the memory is insufficient. In particular, since distortion correction and digital zoom processing are performed on image data before compression, the access bandwidth to the memory is largely insufficient. For this reason, it is necessary to take measures such as speeding up of the system clock, and power consumption increases, and there is a problem that the system configuration becomes complicated.

また、CCDセンサやCMOSセンサ等の撮像素子の高画素化、撮影レンズの広角化により、歪み補正時に画像の場所に合わせて画素を拡大、縮小する際の拡大倍率と縮小倍率のレンジが大きくなる。この場合、画素位置によっては、2分の1以下の縮小処理が行われることがある。そのため歪み補正後の画像に画像処理でデジタルズームを行うと、縮小処理の後に拡大処理を行う位置が出現してしまうことになるため、画質の劣化が起きるという問題があった。   In addition, by increasing the number of pixels of the image sensor such as a CCD sensor or CMOS sensor, and widening the angle of the imaging lens, the range of enlargement magnification and reduction magnification when enlarging or reducing pixels according to the location of the image at distortion correction becomes large. . In this case, reduction processing of 1⁄2 or less may be performed depending on the pixel position. Therefore, if digital zooming is performed on the image after distortion correction by image processing, a position at which enlargement processing is performed appears after reduction processing, resulting in a problem that the image quality is degraded.

本発明はかかる問題を解決することを目的としている。即ち、本発明は、例えば、メモリへのアクセス帯域の増加を抑えるとともに、画質の劣化も少なくすることができる画像処理装置を提供することを目的としている。   The present invention aims to solve such problems. That is, an object of the present invention is, for example, to provide an image processing apparatus capable of suppressing an increase in access bandwidth to a memory and reducing deterioration in image quality.

上記に記載された課題を解決するために、本発明は、入力画像に対して所定の変形処理を行って出力画像を出力する変形手段を有する画像処理装置であって、前記変形手段は、前記出力画像を複数の領域に分割し、その分割領域の画素数に対して、前記分割領域ごとにそれぞれ前記入力画像内で参照する参照領域の画素数が少ない場合は、当該分割領域に対して前記変形処理と共に縮小処理を施し、前記参照領域の画素数が多い場合は、当該分割領域に対して前記変形処理と共に拡大処理を施すことを特徴とする。 In order to solve the problems described above, the present invention is an image processing apparatus including a deformation unit that performs predetermined deformation processing on an input image and outputs an output image, and the deformation unit is configured to When the output image is divided into a plurality of areas, and the number of pixels of the reference area to be referred to in the input image for each of the divided areas is smaller than the number of pixels of the divided area, subjected to contraction small processing deformation processing co, when the number of pixels of the reference region is large, and characterized by applying expansion increasing processing to the transformation processing co respect to the divided regions.

本発明によれば、分割領域ごとに変形処理とともに拡大処理または縮小処理を施すので、変形処理と拡大処理または縮小処理とでそれぞれメモリにアクセスする必要が無く、メモリアクセス帯域の増加を抑えることができる。また、分割領域ごとに拡大処理をするか縮小処理をするか判断するので、画質の劣化を少なくすることができる。   According to the present invention, the expansion process or the reduction process is performed together with the deformation process for each divided area, so there is no need to access the memory for the deformation process and the expansion process or the reduction process, and the increase of the memory access bandwidth can be suppressed. it can. In addition, since it is determined whether enlargement processing or reduction processing is to be performed for each divided area, deterioration in image quality can be reduced.

本発明の第1の実施形態にかかる画像処理装置のブロック構成図である。FIG. 1 is a block diagram of an image processing apparatus according to a first embodiment of the present invention. 図1に示された座標データテーブルの説明図である。It is explanatory drawing of the coordinate data table shown by FIG. 入力画像の例の説明図であるIt is explanatory drawing of the example of an input image. 1エリアの四隅の4点を示す説明図である。It is an explanatory view showing four points of four corners of 1 area. 図4に示されたエリアの座標データと入力画像の対応の例である。It is an example of the correspondence of the coordinate data of the area shown by FIG. 4, and an input image. 変形処理のみの場合の参照エリア(参照領域)の画素数と出力エリアの画素数との関係の説明図である。It is explanatory drawing of the relationship between the pixel count of the reference area (reference area) in the case of only a deformation | transformation process, and the pixel count of an output area. 自由変形部12における拡大動作の説明図である。FIG. 14 is an explanatory view of an enlargement operation in the free deformation unit 12; 拡大処理または縮小処理を伴う変形処理の場合の参照エリアの画素数と出力エリアの画素数との関係の説明図である。It is explanatory drawing of the relationship between the pixel count of the reference area in the case of the deformation process in the case of the expansion process or a reduction process, and the pixel count of an output area. 図1に示された自由変形部の動作を示したフローチャートである。It is the flowchart which showed the operation | movement of the free deformation part shown by FIG. 本発明の第2の実施形態にかかる画像処理装置の拡大処理または縮小処理を伴う変形処理の場合の参照エリアの画素数と出力エリアの画素数との関係の説明図である。It is explanatory drawing of the relationship between the pixel count of a reference area, and the pixel count of an output area in the case of the deformation process in the expansion process or the reduction process of the image processing apparatus concerning the 2nd Embodiment of this invention. 本発明の第2の実施形態にかかる自由変形部の動作を示したフローチャートである。It is the flowchart which showed the operation | movement of the free deformation part concerning the 2nd Embodiment of this invention. 本発明の第3の実施形態にかかる画像処理装置のブロック構成図である。It is a block block diagram of the image processing apparatus concerning the 3rd Embodiment of this invention. ブレンディング画像の例を示した説明図である。It is an explanatory view showing an example of a blending picture. 図13に示した画像を2つの画像に分解した説明図である。It is explanatory drawing which decomposed | disassembled the image shown in FIG. 13 into two images. 図12に示した自由変形部により処理が行われた後の2つの画像例の説明図である。It is explanatory drawing of the example of two images after processing is performed by the free deformation part shown in FIG. 本発明の第4の実施形態にかかる画像処理装置の動作を示したタイミングチャートである。It is the timing chart which showed the operation of the image processing device concerning a 4th embodiment of the present invention. 本発明の一実施形態にかかる電子機器のブロック構成図である。It is a block block diagram of the electronic device concerning one Embodiment of this invention.

(第1実施形態)
本発明の第1の実施形態にかかる画像処理装置を図1乃至図9を参照して説明する。本実施形態にかかる画像処理装置1は、図1に示したように、座標データテーブル11と、自由変形部12と、メモリコントローラ13と、メモリ14と、拡大・縮小部15と、を有している。
First Embodiment
An image processing apparatus according to a first embodiment of the present invention will be described with reference to FIGS. 1 to 9. The image processing apparatus 1 according to the present embodiment has a coordinate data table 11, a free deformation unit 12, a memory controller 13, a memory 14, and an enlargement / reduction unit 15, as shown in FIG. ing.

座標格納手段としての座標データテーブル11は、自由変形部12が入力画像を変形するために読み出す領域が設定されているテーブルである。座標データテーブル11は例えばROM(Read Only Memory)等の不揮発性のメモリに記憶されている。あるいは、RAM等の揮発性のメモリで構成し、電源投入時に外部からロードするようにしてもよい。座標データテーブル11は歪み補正や回転等の変形処理ごとにテーブルが複数設けられている。   The coordinate data table 11 as coordinate storage means is a table in which an area which the free deformation unit 12 reads out to deform an input image is set. The coordinate data table 11 is stored, for example, in a non-volatile memory such as a ROM (Read Only Memory). Alternatively, it may be configured of volatile memory such as RAM and loaded from the outside when the power is turned on. The coordinate data table 11 is provided with a plurality of tables for each deformation process such as distortion correction and rotation.

変形手段としての自由変形部12は、座標データテーブル11に設定された座標データに基づいて、メモリ14に格納されている入力画像をメモリコントローラ13に読み出させる。自由変形部12は、内部にRAM等の内部メモリを有し、読み出された入力画像は、内部メモリに記憶されている。そして、自由変形部12は、内部メモリに記憶された入力画像に基づいて、歪み処理や回転処理等に伴う所定の変形処理や、後述する拡大処理または縮小処理を行う。前記した処理が施された後の画像データは、メモリコントローラ13を介してメモリ14に記憶される。   The free deformation unit 12 as a deformation unit causes the memory controller 13 to read the input image stored in the memory 14 based on the coordinate data set in the coordinate data table 11. The free deformation unit 12 internally has an internal memory such as a RAM, and the read input image is stored in the internal memory. Then, the free deformation unit 12 performs predetermined deformation processing accompanying distortion processing, rotation processing and the like, and enlargement processing or reduction processing to be described later, based on the input image stored in the internal memory. The image data after the above-described processing is stored in the memory 14 via the memory controller 13.

メモリコントローラ13は、例えば外部の撮像部等が取得して、画像処理装置1に入力した入力画像をメモリ14に記憶させる。また、メモリコントローラ13は、自由変形部12および拡大・縮小部15からの指示に応じてメモリ14から入力画像や自由変形部12により処理が施された後の画像データ等を読み出す。   The memory controller 13 causes the memory 14 to store, for example, an input image acquired by an external imaging unit or the like and input to the image processing apparatus 1. Further, the memory controller 13 reads an input image from the memory 14 or image data after processing by the free deformation unit 12 in accordance with instructions from the free deformation unit 12 and the enlargement / reduction unit 15.

メモリ14は、例えばSDRAM等で構成され、メモリコントローラ13からの制御によって入力画像や自由変形部12により処理が施された後の画像データ等が記憶される。   The memory 14 is, for example, an SDRAM or the like, and stores an input image and image data and the like after processing by the free deformation unit 12 under control of the memory controller 13.

拡大縮小手段としての拡大・縮小部15は、メモリ14に記憶されている入力画像または自由変形部12により処理が施された後の画像データに拡大処理または縮小処理を施して出力画像として外部に出力する。   The enlargement / reduction unit 15 as the enlargement / reduction means performs enlargement processing or reduction processing on the input image stored in the memory 14 or the image data subjected to the processing by the free deformation unit 12 and externally outputs the image as an output image. Output.

なお、上述した構成の画像処理装置1において、メモリ14は、外部に設けてもよい。また、画像処理装置1は、半導体集積回路として構成してもよいし、プリント基板やモジュール等で構成してもよい。   In the image processing apparatus 1 having the above-described configuration, the memory 14 may be provided outside. The image processing apparatus 1 may be configured as a semiconductor integrated circuit, or may be configured as a printed circuit board, a module, or the like.

あるいは、図1の構成をコンピュータのCPU(Central Processing Unit)やメモリに機能させるコンピュータプログラム(画像処理プログラム)として構成することもできる。例えば、CPUが自由変形部12、メモリコントローラ13、拡大・縮小部15として機能し、メモリが座標データテーブル11、メモリ14として機能することができる。   Alternatively, it can be configured as a computer program (image processing program) that causes the configuration of FIG. 1 to function on a CPU (Central Processing Unit) or memory of a computer. For example, the CPU can function as the free deformation unit 12, the memory controller 13, and the enlargement / reduction unit 15, and the memory can function as the coordinate data table 11 and the memory 14.

次に、座標データテーブル11について図2および図3を参照して説明する。図2は、座標データテーブル11の例である。座標データテーブル11は、X座標データとY座標データとから構成されている。ここで、X座標とは画像の主走査方向(例えば画像の横方向)、Y座標とは画像の副走査方向(例えば画像の縦方向)をそれぞれ示している。   Next, the coordinate data table 11 will be described with reference to FIGS. 2 and 3. FIG. 2 is an example of the coordinate data table 11. The coordinate data table 11 is composed of X coordinate data and Y coordinate data. Here, the X coordinate indicates the main scanning direction (for example, the horizontal direction of the image) of the image, and the Y coordinate indicates the sub scanning direction of the image (for example, the vertical direction of the image).

座標データテーブル11は、自由変形部12で処理をする際に入力画像において参照する領域の画素位置を一組のX座標データとY座標データとで示している。具体例を図3を参照して説明する。図3(a)は、入力画像を示している。図3(b)は、図3(a)の斜線部分に対応する出力画像である。   The coordinate data table 11 indicates the pixel position of the area to be referred to in the input image when processing by the free deformation unit 12 by a pair of X coordinate data and Y coordinate data. A specific example will be described with reference to FIG. FIG. 3A shows an input image. FIG. 3 (b) is an output image corresponding to the hatched portion in FIG. 3 (a).

図3の場合、X座標データとY座標データは4画素×4画素を1つのエリア(領域)として設定されている。例えば、図3(b)の画素aに対応して参照する画素は、図2のX座標データ・Y座標データ−0に設定される。同様に、画素bに対応して参照する画素はX座標データ・Y座標データ−1に設定され、画素cに対応して参照する画素はX座標データ・Y座標データ−2に設定され、画素dに対応して参照する画素はX座標データ・Y座標データ−3に設定され、画素dはX座標データ・Y座標データ−15に設定される。   In the case of FIG. 3, the X coordinate data and the Y coordinate data are set to 4 pixels × 4 pixels as one area (area). For example, a pixel to be referred to corresponding to the pixel a in FIG. 3B is set to X coordinate data · Y coordinate data −0 in FIG. Similarly, a pixel to be referenced corresponding to the pixel b is set to X coordinate data · Y coordinate data−1, a pixel to be referenced corresponding to the pixel c is set to X coordinate data • Y coordinate data −2, The pixel to be referred to corresponding to d is set to X coordinate data · Y coordinate data -3 and the pixel d is set to X coordinate data · Y coordinate data -15.

図2のX座標データ・Y座標データ−16〜X座標データ・Y座標データ−31は、図3(b)で説明したエリアの右隣のエリアに対応する画素の座標データが設定されている。   The coordinate data of the pixel corresponding to the area on the right of the area described in FIG. 3B is set as the X-coordinate data, Y-coordinate data-16 to X-coordinate data, Y-coordinate data-31 of FIG. .

メモリコントローラ13は、上述したX座標データとY座標データとに基づいてメモリ14のアドレスを算出し、X座標データとY座標データで示された座標の入力画像(画素)を読み出す。   The memory controller 13 calculates an address of the memory 14 based on the X coordinate data and the Y coordinate data described above, and reads an input image (pixel) of the coordinates indicated by the X coordinate data and the Y coordinate data.

メモリコントローラ13によるメモリ14のアドレス計算は、例えば入力画像のデータフォーマットがYUV422の場合、以下の(1)式となる。
メモリアドレス=メモリオフセットアドレス+X座標データ×2+(Y座標データ×(入力画像のX画素数×2))・・・(1)
The address calculation of the memory 14 by the memory controller 13 is, for example, the following equation (1) when the data format of the input image is YUV422.
Memory address = memory offset address + X coordinate data × 2 + (Y coordinate data × (number of X pixels of input image × 2)) (1)

ここで、メモリオフセットアドレスは、予め定められているアドレスのオフセット値、X画素数はX方向(主走査方向)の画素数である。   Here, the memory offset address is a predetermined offset value of the address, and the number of X pixels is the number of pixels in the X direction (main scanning direction).

また、本実施形態では、X座標データ、Y座標データともに小数点5桁まで設定が可能となっている。そのため、小数点精度(サブピクセル精度)で指定された場合は、自由変形部12は、画素補間法として周知であるバイキュービック法により補間計算を行う。バイキュービック法では、隣接する周辺画素を必要し、本実施形態では9画素を必要とする。勿論16画素など他の画素数であってもよい。即ち、X座標データおよびY座標データが小数点精度で指定された場合は、X座標データおよびY座標データに設定されている1つの座標に付き9画素のデータを読み出す必要がある。なお、X座標データおよびY座標データに小数点以下の桁の数字が存在しなければ、バイキュービック法による補間は行わず、バイキュービック法による補間のみに必要とする画素の参照(読み出し)は行われない。   Further, in the present embodiment, both X coordinate data and Y coordinate data can be set to five decimal places. Therefore, when designated with decimal point accuracy (sub-pixel accuracy), the free deformation unit 12 performs interpolation calculation by the bicubic method well-known as a pixel interpolation method. The bicubic method requires adjacent peripheral pixels, and the present embodiment requires 9 pixels. Of course, other numbers of pixels such as 16 pixels may be used. That is, when the X coordinate data and the Y coordinate data are specified with decimal point precision, it is necessary to read data of 9 pixels per one coordinate set in the X coordinate data and the Y coordinate data. Note that if there are no digits after the decimal point in X coordinate data and Y coordinate data, interpolation by bicubic method is not performed, and reference (readout) of pixels required only for interpolation by bicubic method is performed. Absent.

このように、バイキュービック法による補間演算で出力画素データ1画素に対してメモリ14上に記憶された9画素の参照することから、例えば、X座標データ・Y座標データ−0とX座標データ・Y座標データ−1とで、参照するデータが重なる可能性が高い。そこで、本実施形態では、自由変形部12は、出力画像を4×4画素のエリア単位に分割し、エリア単位で画像データを扱う。この4×4画素の出力画像のエリアを出力エリアあるいは出力エリア画像と呼ぶ。そして、座標データテーブル11から16個分(X座標データ・Y座標データ0〜15)の参照画素データをメモリ14から取り出し、自由変形部12の内部メモリに記憶させることで、メモリ14へのアクセス効率を向上させている。   As described above, since nine pixels stored in the memory 14 are referred to one pixel of output pixel data by interpolation calculation by the bicubic method, for example, X coordinate data, Y coordinate data-0 and X coordinate data, There is a high possibility that the data to be referred to overlap with Y coordinate data -1. Therefore, in the present embodiment, the free deformation unit 12 divides the output image into area units of 4 × 4 pixels, and handles image data in area units. The area of the 4 × 4 pixel output image is called an output area or an output area image. Then, 16 reference pixel data (X coordinate data and Y coordinate data 0 to 15) are retrieved from the memory 14 from the coordinate data table 11 and stored in the internal memory of the free deformation unit 12 to access the memory 14 I am improving the efficiency.

この出力エリア(出力エリア画像)は、予め設定されるものであるが、4×4画素に限るものではない。また、この出力エリア(出力エリア画像)は、自由変形部12における拡大処理または縮小処理の際の基準となるものである。自由変形部12で等倍処理の場合は、この出力エリアのサイズと自由変形部12の出力結果のサイズとが等しくなるが、拡大処理または縮小処理が施された場合は、出力エリアのサイズと自由変形部12の出力結果のサイズとは異なる場合がある。詳細は後述する。   This output area (output area image) is preset, but is not limited to 4 × 4 pixels. Further, this output area (output area image) is a reference in the enlargement process or the reduction process in the free deformation unit 12. Although the size of the output area is equal to the size of the output result of the free deformation unit 12 in the case of equal magnification processing in the free deformation unit 12, the size of the output area and the enlargement process or the reduction process are performed. The size of the output result of the free deformation unit 12 may be different. Details will be described later.

なお、図2に示した例では、1エリアあたり16個の座標データが座標データテーブル11に設定されていたが、図4に示すように、1エリアの四隅となる4点のみを座標データテーブル11に設定し、他の12点は計算により算出してもよい。図4は出力エリア画像の1つについて示した図である。   In the example shown in FIG. 2, 16 coordinate data per area are set in the coordinate data table 11. However, as shown in FIG. 11 may be set, and the other 12 points may be calculated. FIG. 4 is a view showing one of the output area images.

図4において、画素fは、図2のX座標データ・Y座標データ−0で示される座標の入力画像が参照される。同様に、画素gは、X座標データ・Y座標データ−1で示される座標の入力画像が参照され、画素hは、X座標データ・Y座標データ−2で示される座標の入力画像が参照され、画素iは、X座標データ・Y座標データ−3で示される座標の入力画像が参照される。   In FIG. 4, the pixel f refers to the input image at the coordinates indicated by X coordinate data and Y coordinate data −0 in FIG. 2. Similarly, the pixel g refers to the input image at coordinates indicated by X coordinate data / Y coordinate data-1, and the pixel h refers to the input image at coordinates indicated by X coordinate data / Y coordinate data-2. The pixel i is referred to an input image at coordinates indicated by X coordinate data and Y coordinate data -3.

そして、残りの12点の画素は、例えば線形補間により座標データを算出する。線形補間以外の補間方法であってもよい。また、エリアごとに補間方法を変更するようなパラメータを有してもよい。   The remaining 12 pixels calculate coordinate data by, for example, linear interpolation. An interpolation method other than linear interpolation may be used. In addition, parameters may be provided to change the interpolation method for each area.

図5に線形補間の具体例を示す。図5(a)は、図4に具体的な座標データを示したものである(上段がX座標データ、下段がY座標データ)。図5(a)のうち、図4の画素f、g、h、iに対応する位置の座標データは、予め座標データテーブル11に設定されている値である。それ以外の位置の座標データは、線形補間により算出した値である。図5(a)の場合、入力画像に対して図5(b)に示すような形状の領域を参照していることとなる(なお、図5(b)はバイキュービック法による補間分を含まない)。   FIG. 5 shows a specific example of linear interpolation. FIG. 5A shows specific coordinate data in FIG. 4 (the upper part is X coordinate data, and the lower part is Y coordinate data). The coordinate data of the position corresponding to the pixels f, g, h, i in FIG. 4 in FIG. 5A is a value set in advance in the coordinate data table 11. Coordinate data of other positions are values calculated by linear interpolation. In the case of FIG. 5A, an area having a shape as shown in FIG. 5B is referred to in the input image (note that FIG. 5B includes the interpolation by the bicubic method). Absent).

図6に変形処理のみの場合の参照エリア(参照領域)の画素数と出力エリアの画素数との関係を示す。ここで、出力エリアは、上述したように出力画像を予め定めた任意のサイズに分割した際の一つの分割エリアをいい、図6の例では4×4画素(矩形状)で画素数は16画素とする。また、図6の上段は参照エリア、下段は自由変形部12により当該参照エリアを参照して処理した結果をそれぞれ示している。   FIG. 6 shows the relationship between the number of pixels in the reference area (reference area) and the number of pixels in the output area in the case of only the deformation processing. Here, the output area refers to one divided area when the output image is divided into predetermined predetermined sizes as described above, and in the example of FIG. 6, the number of pixels is 4 × 4 pixels (rectangular). Let it be a pixel. The upper part of FIG. 6 shows the reference area, and the lower part shows the result of processing by the free deformation section 12 with reference to the reference area.

図6(a)は出力エリアの画素数<参照エリアの画素数の場合である。図6(b)は出力エリアの画素数>参照エリアの画素数の場合、図6(c)は出力エリアの画素数=参照エリアの画素数の場合、図6(d)は出力エリアの画素数<参照エリアの画素数の場合である。   FIG. 6A shows the case where the number of pixels in the output area <the number of pixels in the reference area. 6B shows the number of pixels in the output area> the number of pixels in the reference area, FIG. 6C shows the number of pixels in the output area = the number of pixels in the reference area, and FIG. This is the case where the number <the number of pixels in the reference area.

なお、参照エリアは、上述したサブピクセル精度で指定された場合にはバイキュービック法による補間が必要となるので、図6に示したように、必ずしも矩形とはならない場合がある。また、変形処理の内容によっては、4×4画素でない領域を参照する場合もある。したがって、参照エリアの画素数は、座標データテーブル11に基づいて、例えば周知の座標法を用いて算出すればよい。   The reference area may not necessarily be rectangular as shown in FIG. 6 because interpolation by the bicubic method is necessary when the reference area is specified with the above-described sub-pixel accuracy. Also, depending on the contents of the transformation process, an area other than 4 × 4 pixels may be referred to. Therefore, the number of pixels in the reference area may be calculated based on the coordinate data table 11, for example, using a well-known coordinate method.

図6では拡大処理や縮小処理を行わないので下段の処理結果は全て4×4画素で固定される。即ち、座標データテーブル11に示された座標に応じた参照エリアに基づいた変形のみ(例えば図5)が行われる。   In FIG. 6, since the enlargement process and the reduction process are not performed, all the processing results in the lower stage are fixed at 4 × 4 pixels. That is, only the deformation (for example, FIG. 5) based on the reference area corresponding to the coordinates shown in the coordinate data table 11 is performed.

次に、自由変形部12における拡大動作について図7を参照して説明する。例えば4×4画素から5×5画素に拡大する場合、座標データテーブル11に設定されている四隅の座標データをそのまま利用して拡大処理をすることができる。   Next, the enlargement operation in the free deformation unit 12 will be described with reference to FIG. For example, in the case of enlarging from 4 × 4 pixels to 5 × 5 pixels, the enlargement processing can be performed by using the coordinate data of the four corners set in the coordinate data table 11 as it is.

図5に示したような、1エリアの四隅となる4点のみを座標データテーブル11に設定した場合(矩形の4つの頂点に対応する入力画像の座標位置が格納されている場合)、四隅以外の画素数を増やすことで拡大処理となる。例えば、図7に示したように、4×4画素の場合、各頂点間の2画素の座標データを線形補間して算出していたが、5×5画素に拡大する場合は、各頂点間を3画素として座標データを算出すればよい。このようにすることで、1.25倍の拡大処理を行うことができる。   As shown in FIG. 5, when only four points which are four corners of one area are set in the coordinate data table 11 (when the coordinate position of the input image corresponding to the four vertices of the rectangle is stored), other than four corners The enlargement process is performed by increasing the number of pixels. For example, as shown in FIG. 7, in the case of 4 × 4 pixels, the coordinate data of 2 pixels between each vertex was calculated by linear interpolation, but when expanding to 5 × 5 pixels, the distance between each vertex is calculated. The coordinate data may be calculated with three pixels. By doing this, it is possible to carry out an enlargement process of 1.25 times.

図7の場合は、画素f、g、h、iにかかる座標データは、4×4画素の場合も5×5画素の場合も同じデータを利用することができる。また、同様に6×6画素として扱えば1.5倍、7×7画素として扱えば1.75倍にそれぞれ拡大することができる。即ち、座標データに関しては、四隅の4点からの線形補間で算出するため、自由変形部12から出力するエリア単位の出力画像のサイズを変更することで拡大動作が可能になる。なお、線形補間ではなく、他の補間方法を用いてもよい。   In the case of FIG. 7, the same data can be used for the coordinate data concerning the pixels f, g, h and i in the case of 4 × 4 pixels and in the case of 5 × 5 pixels. Similarly, if it is treated as 6 × 6 pixels, it can be enlarged to 1.75 times if it is treated as 1.5 times and as 7 × 7 pixels. That is, since coordinate data is calculated by linear interpolation from four points at four corners, the enlargement operation can be performed by changing the size of the output image in units of area output from the free deformation unit 12. Instead of linear interpolation, another interpolation method may be used.

上記は拡大処理の例であるが、同様の考え方で縮小処理も可能である。つまり、四隅の4点間の画素数を少なくするように補間処理をすればよい。即ち、変形手段は、座標格納手段に格納されている矩形の4つの頂点の座標位置に基づいて分割領域に拡大処理または縮小処理を施す。   Although the above is an example of the enlargement process, the reduction process is also possible in the same way. That is, the interpolation processing may be performed to reduce the number of pixels between the four points at the four corners. That is, the deformation means performs enlargement processing or reduction processing on the divided area based on the coordinate positions of the four vertexes of the rectangle stored in the coordinate storage means.

図8に自由変形部12において拡大処理または縮小処理を伴う変形処理の場合の参照エリアの画素数と出力エリアの画素数との関係を示す。図8は、例えばデジタルズームなどによって画像処理装置1全体として1.25倍の拡大処理をする場合の例である。また、図8の上段は参照エリア、下段は自由変形部12により当該参照エリアを参照して処理した結果をそれぞれ示している。   FIG. 8 shows the relationship between the number of pixels in the reference area and the number of pixels in the output area in the case of deformation processing involving enlargement processing or reduction processing in the free deformation unit 12. FIG. 8 is an example of the case where the image processing apparatus 1 as a whole performs an enlargement process of 1.25 times by, for example, digital zoom. The upper part of FIG. 8 shows the reference area, and the lower part shows the result of processing by the free deformation section 12 with reference to the reference area.

図8(a)は出力エリアの画素数<参照エリアの画素数の場合である。図8(b)は出力エリアの画素数>参照エリアの画素数の場合、図8(c)は出力エリアの画素数=参照エリアの画素数の場合、図8(d)は出力エリアの画素数<参照エリアの画素数の場合である。ここで、出力エリアの画素数は図6と同様に、4×4画素=16画素とする。   FIG. 8A shows the case where the number of pixels in the output area <the number of pixels in the reference area. 8 (b) shows the number of pixels in the output area> the number of pixels in the reference area, FIG. 8 (c) shows the number of pixels in the output area = the number of pixels in the reference area, FIG. 8 (d) shows the pixels in the output area This is the case where the number <the number of pixels in the reference area. Here, the number of pixels in the output area is 4 × 4 pixels = 16 pixels as in FIG.

本実施形態における自由変形部12の拡大処理または縮小処理の判断基準は以下の3つにより行われる。
(1)出力エリアの画素数<参照エリアの画素数の条件を満たす場合、自由変形部12は拡大処理を行う。即ち、分割領域の画素数に対して、参照領域の画素数が多い場合は、当該分割領域に拡大処理を施す。
(2)出力エリアの画素数>参照エリアの画素数の条件を満たす場合、自由変形部12は縮小処理を行う。即ち、分割領域の画素数に対して、参照領域の画素数が少ない場合は、当該分割領域に縮小処理を施す。
(3)出力エリアの画素数=参照エリアの画素数の条件を満たす場合、自由変形部12は拡大処理も縮小処理も行わない(等倍)。
The judgment criteria of the enlargement process or the reduction process of the free deformation unit 12 in the present embodiment are performed by the following three.
(1) When the condition of the number of pixels in the output area <the number of pixels in the reference area is satisfied, the free deformation unit 12 performs enlargement processing. That is, when the number of pixels in the reference area is larger than the number of pixels in the divided area, the enlargement process is performed on the divided area.
(2) When the condition of the number of pixels in the output area> the number of pixels in the reference area is satisfied, the free deformation unit 12 performs a reduction process. That is, when the number of pixels in the reference area is smaller than the number of pixels in the divided area, reduction processing is performed on the divided area.
(3) When the condition of the number of pixels in the output area = the number of pixels in the reference area is satisfied, the free deformation unit 12 neither performs the enlargement process nor the reduction process (equal magnification).

上記条件を図8に当て嵌めると、図8(a)の場合は、出力エリアの画素数(16画素)<参照エリアの画素数(27画素)のため、1.25倍の拡大処理が行われる。図8(b)の場合は、出力エリアの画素数(16画素)>参照エリアの画素数(9画素)のため、縮小処理が行われる。縮小処理の場合は、参照エリアのサイズに縮小している。図8(c)の場合は、出力エリアの画素数(16画素)=参照エリアの画素数(16画素)のため、拡大処理も縮小処理も行われない。図8(d)の場合は、出力エリアの画素数(16画素)<参照エリアの画素数(21画素)のため、1.25倍の拡大処理が行われる。   If the above condition is applied to FIG. 8, in the case of FIG. 8A, the enlargement process of 1.25 times is performed because the number of pixels in the output area (16 pixels) <the number of pixels in the reference area (27 pixels). It will be. In the case of FIG. 8B, since the number of pixels in the output area (16 pixels)> the number of pixels in the reference area (9 pixels), the reduction process is performed. In the case of reduction processing, the size of the reference area is reduced. In the case of FIG. 8C, neither the enlargement process nor the reduction process is performed because the number of pixels in the output area (16 pixels) = the number of pixels in the reference area (16 pixels). In the case of FIG. 8D, since the number of pixels in the output area (16 pixels) <the number of pixels in the reference area (21 pixels), the enlargement processing of 1.25 times is performed.

図8(a)や(d)の出力エリアの画素数<参照エリアの画素数の場合、自由変形部12が出力する画像データは、参照エリアのデータに対して、縮小処理をかけているのと同等と見做すことができる。例えば、参照エリア画像が25×25画素で、出力エリア画像が4×4画素とし、歪み補正等の所定の変形を行いつつ2倍に拡大処理をする場合で説明する。   If the number of pixels in the output area in FIG. 8A or 8D <the number of pixels in the reference area, the image data output from the free deformation unit 12 is subjected to reduction processing on the data in the reference area. It can be regarded as equivalent to For example, it is assumed that the reference area image is 25 × 25 pixels and the output area image is 4 × 4 pixels, and enlargement processing is performed twice while performing predetermined deformation such as distortion correction.

この場合、自由変形部12では変形処理のみを行い、後段の拡大・縮小部15で2倍すると、自由変形部12での変形処理に際して行われる(4/25)×(4/25)画素に縮小処理後に2倍の拡大処理が行われる。一方、自由変形部12で変形処理とともに拡大も行う場合、自由変形部12では、(8/25)×(8/25)画素とする処理が行われる。そして、拡大・縮小部15では、等倍として何も処理が行われないので、自由変形部12で拡大した場合に、拡大・縮小部15で拡大するよりも画質が向上すると判定できる。   In this case, if only the deformation processing is performed in the free deformation unit 12 and the magnification / reduction unit 15 in the subsequent stage doubles, the (4/25) × (4/25) pixel is performed in the deformation processing in the free deformation unit 12 After the reduction process, the enlargement process is performed twice. On the other hand, when the free deformation unit 12 performs the deformation process and the enlargement process, the free deformation unit 12 performs a process of (8/25) × (8/25) pixels. Then, since the enlargement / reduction unit 15 does not perform any processing at equal magnification, it can be determined that the image quality is improved compared to enlargement by the enlargement / reduction unit 15 when enlargement is performed by the free deformation unit 12.

図8(b)の出力エリアの画素数>参照エリアの画素数の場合、参照エリア画像が3×3画素であるので、その参照エリア画像のサイズと同じ3×3画素としても自由変形部12では、実質的に等倍処理となる。したがって、出力エリア画像サイズから縮小しても画質が劣化しないと判定できる。そして、自由変形部12で出力された出力画像の当該エリアは、拡大・縮小部15で別途拡大処理が行われる。   If the number of pixels in the output area in FIG. 8B> the number of pixels in the reference area, the reference area image is 3 × 3 pixels, so the free deformation unit 12 may be 3 × 3 pixels the same as the size of the reference area image. In this case, the processing is substantially equal. Therefore, it can be determined that the image quality does not deteriorate even if it is reduced from the output area image size. Then, the enlargement / reduction unit 15 separately performs enlargement processing on the area of the output image output from the free deformation unit 12.

図8(c)の出力エリアの画素数=参照エリアの画素数の場合は、自由変形部12では、等倍処理となるので、自由変形部12で拡大しても画質が向上しないと判定できる。したがって、自由変形部12で出力された出力画像の当該エリアは、拡大・縮小部15で別途拡大処理が行われる。   In the case where the number of pixels in the output area in FIG. 8C = the number of pixels in the reference area, the free deformation unit 12 performs equal magnification processing, so it can be determined that the image quality does not improve even if enlarged by the free deformation unit 12 . Therefore, the enlargement / reduction unit 15 separately performs enlargement processing on the area of the output image output by the free deformation unit 12.

上述した自由変形部12の動作(画像処理方法)を図9のフローチャートにまとめる。図9のフローチャートは、まず、自由変形部12は、ステップS101において、座標データテーブル11に基づいて処理対象となるエリアの参照エリアをメモリ14からメモリコントローラ13を介して読み出す。次に、自由変形部12は、ステップS102で、デジタルズーム等の拡大処理が有るか否かを判断し、有る場合(YESの場合)はステップS103で出力エリアの画素数と参照エリアの画素数とを比較する。一方、拡大処理が無い場合(NOの場合)はステップS106で変形処理のみを行ってステップS107に進む。   The operation (image processing method) of the above-described free deformation unit 12 is summarized in the flowchart of FIG. In the flowchart of FIG. 9, first, the free deformation unit 12 reads the reference area of the area to be processed from the memory 14 via the memory controller 13 in step S101 based on the coordinate data table 11. Next, the free deformation unit 12 determines whether or not enlargement processing such as digital zoom is performed in step S102, and if there is (in the case of YES), the number of pixels in the output area and the number of pixels in the reference area in step S103. Compare On the other hand, when there is no enlargement process (in the case of NO), only the deformation process is performed in step S106, and the process proceeds to step S107.

自由変形部12は、ステップS103では、出力エリアの画素数<参照エリアの画素数の場合はステップS104で拡大処理と変形処理を行う。一方、出力エリアの画素数>参照エリアの画素数の場合はステップS105で縮小処理と変形処理を行う。ここで、拡大、縮小は、上述した出力エリアの画素数と比較しての処理をいう。   In step S103, the free deformation unit 12 performs enlargement processing and deformation processing in step S104 if the number of pixels in the output area <the number of pixels in the reference area. On the other hand, if the number of pixels in the output area> the number of pixels in the reference area, reduction processing and deformation processing are performed in step S105. Here, enlargement or reduction refers to processing in comparison with the number of pixels in the output area described above.

自由変形部12は、出力エリアの画素数=参照エリアの画素数の場合は、ステップS106で変形処理のみを行う。そして、自由変形部12は、ステップS107において、次のエリアが有るか否かを判断し、ある場合はステップS101に戻って次のエリアに対して上述した処理を繰り返し、無い場合は終了する。   If the number of pixels in the output area = the number of pixels in the reference area, the free deformation unit 12 performs only the deformation processing in step S106. Then, in step S107, the free deformation unit 12 determines whether there is a next area, and if there is, the process returns to step S101 to repeat the above-described process for the next area, and ends the process if there is no such area.

以上の説明から明らかなように、ステップS101〜S107が変形工程に相当する。また、自由変形部12は、出力画像を複数の出力エリアに分割し、その出力エリアごとにそれぞれ入力画像内で参照する参照領域に基づいて、当該出力エリアに対して変形処理と共に拡大処理または縮小処理を施している。   As apparent from the above description, steps S101 to S107 correspond to the deformation step. In addition, the free deformation unit 12 divides the output image into a plurality of output areas, and performs the enlargement process or the reduction process on the output area based on the reference area referred to in the input image for each of the output areas. Processing is given.

本実施形態によれば、画像処理装置1において、自由変形部12は、出力画像を複数に分割し、その分割したエリアごとにそれぞれ入力画像内で参照する参照エリアに基づいて、当該分割エリアを拡大または縮小する。このようにすることにより、分割エリアごとに変形処理とともに拡大処理または縮小処理を施すので、変形処理と拡大処理または縮小処理とでそれぞれメモリ14にアクセスする必要が無く、メモリアクセス帯域の増加を抑えることができる。また、分割領域ごとに拡大するか縮小するか判断するので、画質の劣化を少なくすることができる。   According to the present embodiment, in the image processing apparatus 1, the free deformation unit 12 divides the output image into a plurality of parts, and divides the divided areas based on the reference areas to be referred to in the input image for each of the divided areas. Zoom in or out. In this way, the deformation process and the enlargement process or the reduction process are performed for each divided area, and therefore there is no need to access the memory 14 for the deformation process and the enlargement process or the reduction process, thereby suppressing an increase in memory access bandwidth. be able to. In addition, since it is determined whether to enlarge or reduce for each divided area, it is possible to reduce the deterioration of the image quality.

また、自由変形部12は、出力エリアの画素数>参照エリアの画素数の場合は縮小処理と変形処理を行い、出力エリアの画素数<参照エリアの画素数の場合は拡大処理と変形処理を行う。このようにすることにより、出力エリアの画素数>参照エリアの画素数の場合は、自由変形部12では、参照エリアのサイズと同じサイズにするため、出力エリア画像サイズから縮小しても画質が劣化しない。また、出力エリアの画素数<参照エリアの画素数の場合は、自由変形部12でのみで拡大処理を行うため、拡大・縮小部15で別途拡大するよりも画質が向上する。   The free deformation unit 12 performs reduction processing and deformation processing if the number of pixels in the output area> the number of pixels in the reference area, and if the number of pixels in the output area <the number of pixels in the reference area, enlargement processing and deformation processing are performed. Do. By doing this, in the case where the number of pixels in the output area> the number of pixels in the reference area, the free deformation unit 12 makes the size the same as the size of the reference area, so the image quality is reduced even from the output area image size. It does not deteriorate. Further, in the case where the number of pixels in the output area <the number of pixels in the reference area, the enlargement processing is performed only by the free deformation unit 12, so the image quality is improved as compared with enlargement separately by the enlargement / reduction unit 15.

また、自由変形部12は、出力エリアの画素数>参照エリアの画素数の場合は変形処理のみを行う。このようにすることにより、自由変形部12では、等倍処理となるので、自由変形部12で拡大しても画質が向上しない。したがって、拡大・縮小部15で別途処理を行えばよい。   In addition, the free deformation unit 12 performs only the deformation process when the number of pixels in the output area> the number of pixels in the reference area. By doing this, since the free deformation unit 12 performs equal magnification processing, the image quality is not improved even if the free deformation unit 12 enlarges the image. Therefore, the enlargement / reduction unit 15 may separately perform processing.

(第2実施形態)
次に、本発明の第2の実施形態にかかる画像処理装置を図10および図11を参照して説明する。なお、前述した第1の実施形態と同一部分には、同一符号を付して説明を省略する。
Second Embodiment
Next, an image processing apparatus according to a second embodiment of the present invention will be described with reference to FIGS. 10 and 11. FIG. The same parts as those of the first embodiment described above are denoted by the same reference numerals and the description thereof will be omitted.

本実施形態にかかる画像処理装置1は、ブロック構成は図1と同様であるが、自由変形部12における処理が異なる。   The image processing apparatus 1 according to the present embodiment has the same block configuration as that of FIG. 1, but the processing in the free deformation unit 12 is different.

図10に、本実施形態にかかる拡大処理または縮小処理を伴う変形処理の場合の参照エリアの画素数と出力エリアの画素数との関係を示す。図10は、図8と同様にデジタルズームなどによって画像処理装置1全体として1.25倍の拡大処理をする場合の例である。また、図10の上段は参照エリア、下段は自由変形部12により当該参照エリアを参照して処理した結果をそれぞれ示している。また、出力エリアの画素数は第1の実施形態と同様に、4×4画素=16画素とする。   FIG. 10 shows the relationship between the number of pixels in the reference area and the number of pixels in the output area in the case of deformation processing involving enlargement processing or reduction processing according to the present embodiment. FIG. 10 shows an example of the case where the image processing apparatus 1 as a whole is subjected to 1.25 × enlargement processing by digital zoom or the like as in FIG. The upper part of FIG. 10 shows the reference area, and the lower part shows the result of processing by the free deformation unit 12 with reference to the reference area. Further, the number of pixels in the output area is 4 × 4 pixels = 16 pixels as in the first embodiment.

本実施形態における自由変形部12の拡大処理または縮小処理の判断基準は以下の6つにより行われる。なお、本実施形態では、主走査方向(X座標)を一の方向、副走査方向(Y座標)を一の方向と直交する他の方向として説明する。
(1)出力エリアの画像のXサイズ(主走査方向の画素数)<参照エリアの画像のXサイズの条件を満たす場合、自由変形部12はXサイズを大きくする(X方向の拡大処理)。即ち、分割領域の一の方向の画素数に対して、参照領域の一の方向の画素数が多い場合は、当該分割領域の前記一の方向に拡大処理を施す。
(2)出力エリアの画像のXサイズ>参照エリアの画像のXサイズの条件を満たす場合、自由変形部12はXサイズを小さくする(X方向の縮小処理)。即ち、分割領域の一の方向の画素数に対して、参照領域の一の方向の画素数が少ない場合は、当該分割領域の一の方向に縮小処理を施す。
(3)出力エリアの画像のXサイズ=参照エリアの画像のXサイズの条件を満たす場合、自由変形部12はXサイズを変更しない。
The criteria for the enlargement process or the reduction process of the free deformation unit 12 in the present embodiment are performed by the following six. In the present embodiment, the main scanning direction (X coordinate) will be described as one direction, and the sub scanning direction (Y coordinate) as another direction orthogonal to the one direction.
(1) When the condition of X size of the image of the output area (number of pixels in the main scanning direction) <X size of the image of the reference area is satisfied, the free deformation unit 12 enlarges the X size (enlargement processing in X direction). That is, when the number of pixels in one direction of the reference area is larger than the number of pixels in one direction of the divided area, the enlargement process is performed in the one direction of the divided area.
(2) When the condition of X size of the image of the output area> X size of the image of the reference area is satisfied, the free deformation unit 12 reduces the X size (reduction process in the X direction). That is, when the number of pixels in one direction of the reference area is smaller than the number of pixels in one direction of the divided area, the reduction process is performed in one direction of the divided area.
(3) When the condition of X size of image of output area = X size of image of reference area is satisfied, the free deformation unit 12 does not change the X size.

(4)出力エリアの画像のYサイズ(副走査方向の画素数)<参照エリアの画像のYサイズの条件を満たす場合、自由変形部12はYサイズを大きくする(Y方向の拡大処理)。即ち、分割領域の他の方向の画素数に対して、参照領域の他の方向の画素数が多い場合は、当該分割領域の他の方向に拡大処理を施す。
(5)出力エリアの画像のYサイズ>参照エリアの画像のYサイズの条件を満たす場合、自由変形部12はYサイズを小さくする(Y方向の縮小処理)。即ち、分割領域の一の方向と直交する他の方向の画素数に対して、参照領域の他の方向の画素数が少ない場合は、当該分割領域の他の方向に縮小処理を施す。
(6)出力エリアの画像のYサイズ=参照エリアの画像のYサイズの条件を満たす場合、自由変形部12がYサイズを変更しない。
(4) If the Y size of the image in the output area (number of pixels in the sub scanning direction) <the Y size of the image in the reference area is satisfied, the free deformation unit 12 enlarges the Y size (enlargement processing in the Y direction). That is, when the number of pixels in the other direction of the reference area is larger than the number of pixels in the other direction of the divided area, the enlargement processing is performed in the other direction of the divided area.
(5) If the condition of Y size of the image of the output area> Y size of the image of the reference area is satisfied, the free deformation unit 12 reduces the Y size (reduction processing in the Y direction). That is, when the number of pixels in the other direction of the reference area is smaller than the number of pixels in the other direction orthogonal to one direction of the divided area, the reduction process is performed in the other direction of the divided area.
(6) When the condition of Y size of image of output area = Y size of image of reference area is satisfied, the free deformation unit 12 does not change the Y size.

上記条件を図10に当て嵌めると、図10(a)の場合は、出力エリアのXサイズ(4画素)<参照エリアのXサイズ(6画素)のため、Xサイズを4画素から5画素に大きくする(1.25倍に拡大する)。また、出力エリアのYサイズ(4画素)>参照エリアのYサイズ(3画素)のため、Yサイズを4画素から3画素に小さくする(参照エリアのサイズに合わせるよう縮小する)。   If the above conditions are applied to FIG. 10, in the case of FIG. 10A, since the X size of the output area (4 pixels) <the X size of the reference area (6 pixels), the X size is changed from 4 pixels to 5 pixels. Increase (increase by 1.25 times). In addition, since Y size of output area (4 pixels)> Y size of reference area (3 pixels), Y size is reduced from 4 pixels to 3 pixels (reduction to fit the size of reference area).

図10(b)の場合は、出力エリアのXサイズ(4画素)>参照エリアのXサイズ(3画素)のため、Xサイズを4画素から3画素に小さくする(参照エリアのサイズに合わせるよう縮小する)。また、出力エリアのYサイズ(4画素)>参照エリアのYサイズ(3画素)のため、Yサイズを4画素から3画素に小さくする(参照エリアのサイズに合わせるよう縮小する)。   In the case of FIG. 10B, the X size is reduced from 4 pixels to 3 pixels because the X size (4 pixels) of the output area> the X size (3 pixels) of the reference area to shrink). In addition, since Y size of output area (4 pixels)> Y size of reference area (3 pixels), Y size is reduced from 4 pixels to 3 pixels (reduction to fit the size of reference area).

図10(c)の場合は、出力エリアのXサイズ(4画素)=参照エリアのXサイズ(4画素)のため、Xサイズは変更しない。また、出力エリアのYサイズ(4画素)=参照エリアのYサイズ(4画素)のため、Yサイズは変更しない。   In the case of FIG. 10C, since the X size of the output area (4 pixels) = the X size of the reference area (4 pixels), the X size is not changed. In addition, since the Y size of the output area (4 pixels) = the Y size of the reference area (4 pixels), the Y size is not changed.

図10(b)の場合は、出力エリアのXサイズ(4画素)>参照エリアのXサイズ(3画素)のため、Xサイズを4画素から3画素に小さくする(参照エリアのサイズに合わせるよう縮小する)。また、出力エリアのYサイズ(4画素)<参照エリアのYサイズ(7画素)のため、Yサイズを4画素から5画素に大きくする(1.25倍に拡大する)。   In the case of FIG. 10B, the X size is reduced from 4 pixels to 3 pixels because the X size (4 pixels) of the output area> the X size (3 pixels) of the reference area to shrink). In addition, Y size is increased from 4 pixels to 5 pixels (expanded by 1.25 times) because Y size of output area (4 pixels) <Y size of reference area (7 pixels).

本実施形態の場合、第1の実施形態をXサイズ、Yサイズにそれぞれ分けて判断しているので、拡大、縮小、等倍の各判定は、第1の実施形態と同様に考えることができる。つまり、出力エリアのXサイズ<参照エリアのXサイズの場合と出力エリアのYサイズ<参照エリアのYサイズの場合は、拡大・縮小部15では、XサイズまたはYサイズにおいては等倍として何も処理が行われない。そのため、自由変形部12で拡大した場合に、拡大・縮小部15で拡大するよりも画質が向上すると判定できる。   In the case of this embodiment, since the first embodiment is judged separately for X size and Y size, each judgment of enlargement, reduction and equal magnification can be considered in the same manner as the first embodiment. . In other words, if X size of output area <X size of reference area and Y size of output area <Y size of reference area, enlargement / reduction unit 15 does nothing with X size or Y size as equal Processing is not performed. Therefore, it can be determined that the image quality is improved compared to enlargement by the enlargement / reduction unit 15 when enlarged by the free deformation unit 12.

出力エリアのXサイズ>参照エリアのXサイズの場合と出力エリアのYサイズ>参照エリアのYサイズの場合は、自由変形部12では、XサイズまたはYサイズは実質的に等倍処理となるので、出力エリア画像サイズから縮小しても画質が劣化しないと判定できる。そして、自由変形部12で出力された出力画像は、拡大・縮小部15で別途拡大処理が行われる。   In the case of X size of output area> X size of reference area and Y size of output area> Y size of reference area, in free deformation unit 12, X size or Y size is substantially equal magnification processing. It can be determined that the image quality does not deteriorate even if it is reduced from the output area image size. Then, the enlargement / reduction unit 15 separately performs enlargement processing on the output image output by the free deformation unit 12.

出力エリアのXサイズ=参照エリアのXサイズの場合と出力エリアのYサイズ=参照エリアのYサイズの場合は、自由変形部12では、等倍処理となるので、自由変形部12で拡大しても画質が向上しないと判定できる。したがって、自由変形部12で出力された出力画像は、拡大・縮小部15で別途拡大処理が行われる。   In the case of X size of output area = X size of reference area and Y size of output area = Y size of reference area, the free deformation unit 12 performs equal magnification processing, so the free deformation unit 12 enlarges Also, it can be determined that the image quality does not improve. Therefore, the enlargement / reduction unit 15 separately performs enlargement processing on the output image output by the free deformation unit 12.

例えば、拡大・縮小部15では、図10(a)の場合、Xサイズは等倍、Yサイズは1.66倍の拡大処理を行う。図10(b)の場合、Xサイズ、Yサイズとも1.66倍の拡大処理を行う。図10(c)の場合、Xサイズ、Yサイズとも1.25倍の拡大処理を行う。図10(d)の場合、Xサイズは1.66倍の拡大処理、Yサイズは等倍処理を行う。このようにして画像処理装置1A全体として1.25倍の拡大処理が行われるようにする。   For example, in the case of FIG. 10A, the enlargement / reduction unit 15 performs enlargement processing with the same size as the X size and 1.66 times the Y size. In the case of FIG. 10B, the enlargement process is performed 1.66 times for both the X size and the Y size. In the case of FIG. 10C, the enlargement process is performed at 1.25 times for both the X size and the Y size. In the case of FIG. 10D, the X size is subjected to 1.66 times enlargement processing, and the Y size is subjected to equal magnification processing. In this manner, the image processing apparatus 1A as a whole is subjected to the 1.25 × enlargement processing.

本実施形態にかかる自由変形部12の動作(画像処理方法)を図11のフローチャートにまとめる。図11のフローチャートは、まず、自由変形部12は、ステップS201において、座標データテーブル11に基づいて処理対象となるエリアの参照エリアを読み出す。次に、自由変形部12は、ステップS202で、デジタルズーム等の拡大処理が有るか否かを判断し、有る場合(YESの場合)はステップS203で出力エリアのXサイズと参照エリアのXサイズとを比較する。一方、拡大処理が無い場合(NOの場合)はステップS212で変形処理のみを行ってステップS213に進む。   The operation (image processing method) of the free deformation unit 12 according to the present embodiment is summarized in the flowchart of FIG. In the flowchart of FIG. 11, first, the free deformation unit 12 reads the reference area of the area to be processed based on the coordinate data table 11 in step S201. Next, the free deformation unit 12 determines whether or not enlargement processing such as digital zoom is present in step S202, and if there is (in the case of YES), the X size of the output area and the X size of the reference area in step S203. Compare On the other hand, if the enlargement process is not performed (in the case of NO), only the deformation process is performed in step S212, and the process proceeds to step S213.

自由変形部12は、ステップS203では、出力エリアのXサイズ<参照エリアのXサイズの場合はステップS204でXサイズを大きくする。出力エリアのXサイズ>参照エリアのXサイズの場合はステップS205でXサイズを小さくする。出力エリアのXサイズ=参照エリアのXサイズの場合はステップS206でXサイズの変更は行わない。   In step S203, the free deformation unit 12 increases the X size in step S204 if the X size of the output area <the X size of the reference area. If X size of output area> X size of reference area, the X size is reduced in step S205. If the X size of the output area = the X size of the reference area, the X size is not changed in step S206.

自由変形部12は、ステップS204〜S206から進んだステップS207では、出力エリアのYサイズと参照エリアのYサイズとを比較する。そして、ステップS207で、出力エリアのYサイズ<参照エリアのYサイズの場合はステップS208でYサイズを大きくする。出力エリアのYサイズ>参照エリアのYサイズの場合はステップS209でYサイズを小さくする。出力エリアのYサイズ=参照エリアのYサイズの場合はステップS210でYサイズの変更は行わない。   The free deformation unit 12 compares the Y size of the output area with the Y size of the reference area in step S207, which has been advanced from steps S204 to S206. Then, in step S207, if Y size of output area <Y size of reference area, the Y size is increased in step S208. If Y size of output area> Y size of reference area, the Y size is reduced in step S209. When Y size of output area = Y size of reference area, the Y size is not changed in step S210.

自由変形部12は、ステップ208〜S210から進んだステップS211では、ステップS204〜206およびステップS208〜S210において決定したXサイズ、Yサイズに基づく拡大処理または縮小処理と座標データテーブル11に基づく変形処理を行う。   In step S211 that follows from step 208 to step S210, the free deformation unit 12 performs enlargement processing or reduction processing based on the X size and Y size determined in steps S204 to S206 and steps S208 to S210 and deformation processing based on the coordinate data table 11. I do.

自由変形部12は、ステップS213において次のエリアが有るか否かを判断し、ある場合はステップS201に戻って次のエリアに対して上述した処理を繰り返し、無い場合は終了する。   The free deformation unit 12 determines whether or not there is a next area in step S213. If there is, the process returns to step S201 to repeat the above-described process for the next area.

以上の説明から明らかなように、ステップS201〜S213が変形工程に相当する。なお、図11に示したフローチャートではXサイズを先に判定していたが、Yサイズを先に判定してもよい。また、図11に示したフローチャートではXサイズとYサイズとを独立に判定しているが、同時に判定してもよい。   As apparent from the above description, steps S201 to S213 correspond to the deformation step. In the flowchart shown in FIG. 11, the X size is determined first, but the Y size may be determined first. Further, although the X size and the Y size are determined independently in the flowchart shown in FIG. 11, they may be determined simultaneously.

本実施形態によれば、出力エリアと参照エリアの比較の際に、画素数ではなく、XサイズとYサイズとをそれぞれ個別に比較して、それぞれの比較結果に基づいて拡大処理または縮小処理を行っている。このようにすることにより、参照エリアが矩形でない場合でも、画質の劣化を少なくすることができる。したがって、より多様な変形処理において画質の劣化を少なくすることができる。   According to this embodiment, when comparing the output area and the reference area, not the number of pixels but X size and Y size are individually compared, and enlargement processing or reduction processing is performed based on the comparison results. Is going. By doing this, even when the reference area is not rectangular, the deterioration of the image quality can be reduced. Therefore, the deterioration of the image quality can be reduced in more various deformation processes.

(第3実施形態)
次に、本発明の第3の実施形態にかかる画像処理装置を図12乃至図15を参照して説明する。なお、前述した第1、第2の実施形態と同一部分には、同一符号を付して説明を省略する。
Third Embodiment
Next, an image processing apparatus according to a third embodiment of the present invention will be described with reference to FIG. 12 to FIG. The same parts as those in the first and second embodiments described above are designated by the same reference numerals and description thereof is omitted.

本実施形態にかかる画像処理装置1Aのブロック構成図を図12に示す。図12に示した画像処理装置1Aは、図1に示した画像処理装置1Aにブレンディング部16が追加され、メモリコントローラ13がメモリコントローラ13aに変更されている。メモリコントローラ13aは、複数の入力画像(入力画像A、B)が入力可能に構成されている。なお、図1に示したメモリコントローラ13のような1つの1入力で複数の入力画像を順次入力するようにしてもよい。   A block diagram of the image processing apparatus 1A according to the present embodiment is shown in FIG. In the image processing apparatus 1A shown in FIG. 12, a blending unit 16 is added to the image processing apparatus 1A shown in FIG. 1, and the memory controller 13 is changed to a memory controller 13a. The memory controller 13a is configured to be able to input a plurality of input images (input images A and B). A plurality of input images may be sequentially input by one single input like the memory controller 13 shown in FIG.

混合手段としてのブレンディング部16は、複数の入力画像のブレンディング処理を行う。ブレンディング処理とは、複数の入力画像を重畳して、複数の入力画像が混合された1つの出力画像とする処理である。例えば2つの画像をブレンディングする場合には、ブレンディング係数を設定し、以下の(2)式を演算して演算結果の画素データ(画像データ)をメモリコントローラ13を介してメモリ14に出力する。
(一方の画像の画素データ×ブレンディング係数)+(他方の画像の画素データ×(1−ブレンディング係数))・・・(2)
The blending unit 16 as blending means performs blending processing of a plurality of input images. The blending process is a process of superimposing a plurality of input images into one output image in which the plurality of input images are mixed. For example, when two images are blended, a blending coefficient is set, the following equation (2) is calculated, and pixel data (image data) of the calculation result is output to the memory 14 through the memory controller 13.
(Pixel data of one image x blending coefficient) + (pixel data of the other image x (1-blending coefficient)) (2)

図13はブレンディング画像の例である。図13はA画像とB画像の2つの画像の端部をブレンディングしている。つまり、A画像の右端部とB画像の左端部が重畳されている。この重畳されている領域を以下ブレンディング画像と呼ぶ。なお、本実施形態では、図13等に示す画像は、自由変形部12の処理前の画像ではなく、処理後(変形後)の画像である。   FIG. 13 is an example of a blending image. FIG. 13 blends the edges of two images, an A image and a B image. That is, the right end of the A image and the left end of the B image are superimposed. This superimposed region is hereinafter referred to as a blending image. In the present embodiment, the image shown in FIG. 13 or the like is not an image before the process of the free deformation unit 12 but an image after processing (after deformation).

つまり、図14に示すように、A画像がarea1〜5、area11〜15、area21〜25の15エリアから構成されている。また、B画像がarea6〜10、area16〜20、area26〜30の15エリアから構成されている。この場合、area5とarea6、area15とarea16、area25とarea26がそれぞれ重なるエリア(領域)となる。   That is, as shown in FIG. 14, the A image is composed of 15 areas of areas 1 to 5, areas 11 to 15, and areas 21 to 25. Also, the B image is composed of 15 areas of areas 6 to 10, areas 16 to 20, and areas 26 to 30. In this case, areas 5 and 6, areas 15 and 16, and areas 25 and 26 overlap with each other.

ブレンディング部16においてブレンディング処理を行う場合、第1、第2の実施形態で説明した自由変形部12における拡大処理や縮小処理を行うと、例えばブレンディング画像に含まれるエリアでは2つの画像間で拡大等の倍率が異なる可能性がある。拡大等の倍率が異なると、ブレンディング処理時にどちらかを拡大処理または縮小処理をしなければならず画像処理装置1Aとしての処理効率が低下する。   When the blending process is performed in the blending unit 16, if the enlargement process or the reduction process in the free deformation unit 12 described in the first and second embodiments is performed, for example, the area between two images is enlarged etc. in the area included in the blending image. The magnification of may be different. If magnifications such as enlargement differ, either one needs to be subjected to enlargement processing or reduction processing at the time of blending processing, and processing efficiency as the image processing apparatus 1A decreases.

そのため、本実施形態では、自由変形部12において、ブレンディング画像に含まれるエリアは、いずれかの倍率に合わせるようにする。ここで倍率は、拡大処理の場合は1よりも大きな値、縮小処理の場合は1未満の値、等倍は1として表すものとする。   Therefore, in the present embodiment, in the free deformation unit 12, the area included in the blending image is adjusted to one of the magnifications. Here, the magnification is represented as a value larger than 1 in the enlargement processing, a value less than 1 in the reduction processing, and 1 as an equal magnification.

具体例としては、図13の場合、A画像のエリアの倍率>B画像のエリアの倍率の場合、A画像のエリアの倍率で、当該エリアの拡大処理または縮小処理を行う。また、A画像のエリアの倍率<B画像のエリアの倍率の場合、B画像のエリアの倍率で、当該エリアの拡大処理または縮小処理を行う。即ち、変形手段は、混合手段で混合される分割領域においては、それぞれの出力画像の分割領域についてそれぞれ算出された拡大または縮小の倍率のうち、最大の倍率に合わせて拡大処理または縮小処理を施す。   As a specific example, in the case of FIG. 13, when the magnification of the area of the A image> the magnification of the area of the B image, the enlargement processing or the reduction processing of the area is performed at the magnification of the area of the A image. When the magnification of the area of the A image <the magnification of the area of the B image, the enlargement process or the reduction process of the area is performed at the magnification of the area of the B image. That is, in the divided area mixed by the mixing means, the deformation means performs the enlargement process or the reduction process according to the largest magnification among the magnifications of the enlargement or the reduction calculated for each divided area of each output image. .

図14における自由変形部12の処理としては、まず、A画像のarea1〜4の処理を行う。次に、後にarea5の処理を行い、続いてB画像のarea6の処理を行って、area5、area6の倍率を合わせて2つのエリアをブレンディング部16に出力する。そして、B画像のarea7〜10の処理を行う。つまり、ブレンディング画像に含まれるA画像のarea5とB画像のarea6がブレンディング部16により処理が行われる。A画像のarea1〜4の処理とB画像のarea7〜10との処理は第1または第2の実施形態と同様となり、ブレンディング部16による処理は行われない。このように、本実施形態ではブレンディング画像で互いに重畳されるエリアが連続して処理されるようにしている。   As processing of the free deformation unit 12 in FIG. 14, first, processing of areas 1 to 4 of the A image is performed. Next, the processing of area 5 is performed later, and then the processing of area 6 of B image is performed, and the magnifications of area 5 and area 6 are combined and two areas are output to the blending unit 16. Then, processing of areas 7 to 10 of the B image is performed. That is, the processing of the area 5 of the A image and the area 6 of the B image included in the blending image is performed by the blending unit 16. The processes of the areas 1 to 4 of the A image and the processes of the areas 7 to 10 of the B image are the same as those in the first or second embodiment, and the process by the blending unit 16 is not performed. As described above, in the present embodiment, the areas superimposed on each other in the blending image are continuously processed.

図15は、上述したような処理を行った例である。ブレンディング画像に含まれるarea5とarea6、area15とarea16、area25とarea26は、それぞれ同じ倍率となる。   FIG. 15 shows an example in which the process as described above is performed. Areas 5 and 6 included in the blending image, areas 15 and 16 and areas 25 and 26 have the same magnification.

本実施形態によれば、自由変形部12は、ブレンディング処理を行う場合、ブレンディング画像に含まれるエリアにおいては、それぞれ算出された倍率のうち、高い倍率に合わせて拡大または縮小を行う。このようにすることにより、ブレンディング部16で拡大処理や縮小処理を行う必要が無く、ブレンディング部16の処理を複雑化させず、画像処理装置1Aの処理効率を向上させることができる。   According to the present embodiment, when the free deformation unit 12 performs blending processing, in the area included in the blending image, the free deformation unit 12 performs enlargement or reduction in accordance with the higher magnification among the calculated magnifications. By doing this, there is no need to perform enlargement processing or reduction processing in the blending unit 16, and the processing efficiency of the image processing apparatus 1A can be improved without complicating the processing of the blending unit 16.

なお、上述した例では、2つの画像のブレンディング処理で説明したが、3つ以上のブレンディング処理のケースであっても同様に高い倍率に合わせることで、処理効率を向上させることができる。   In the example described above, the blending process of two images has been described, but even in the case of three or more blending processes, the processing efficiency can be improved by similarly adjusting to a high magnification.

(第4実施形態)
次に、本発明の第4の実施形態にかかる画像処理装置を図16を参照して説明する。なお、前述した第1〜第3の実施形態と同一部分には、同一符号を付して説明を省略する。
Fourth Embodiment
Next, an image processing apparatus according to a fourth embodiment of the present invention will be described with reference to FIG. The same parts as those in the first to third embodiments described above are denoted by the same reference numerals and description thereof is omitted.

本実施形態は、ブロック構成は図1または図12のいずれでもよく、自由変形部12の動作が異なる。   In the present embodiment, the block configuration may be either FIG. 1 or FIG. 12, and the operation of the free deformation portion 12 is different.

第1〜第3の実施形態に記載の自由変形部12の動作を行うと、メモリ14へのアクセス帯域が不足する場合がある。例えば、デジタルカメラの場合、撮像部から入力された入力画像が動画の場合、1秒間に30枚以上の画像が入力される。そのため、画像処理装置1(1A)は、遅くとも33ミリ秒以内に、処理を完了させる必要がある。しかしながら、自由変形部12の処理内容によっては、メモリ14に対してアクセス量が増加してしまい33ミリ秒以内に処理を完了させることができない場合もある。   When the operation of the free deformation unit 12 described in the first to third embodiments is performed, the access bandwidth to the memory 14 may be insufficient. For example, in the case of a digital camera, when the input image input from the imaging unit is a moving image, thirty or more images are input in one second. Therefore, the image processing apparatus 1 (1A) needs to complete the processing within 33 milliseconds at the latest. However, depending on the processing content of the free deformation unit 12, the access amount to the memory 14 may increase and the processing may not be completed within 33 milliseconds.

本実施形態では、直前の入力画像で、メモリアクセスが不足した場合においては、自由変形部12は次の入力画像の処理を行わずに、さらに次の入力画像から、拡大処理を禁止して縮小処理または等倍処理のみを許可するようにする。   In the present embodiment, if memory access is insufficient with the immediately preceding input image, the free deformation unit 12 does not process the next input image, and prohibits enlargement processing from the next input image and reduces it. Allow only processing or equal-magnification processing.

図16に具体例を示す。図16は、フレームスタート信号と自由変形部12の処理状態を示したタイミングチャートである。フレームスタート信号は、フレームの開始を示す信号であり、例えば画像処理装置1(1A)の前段にある撮像部等から入力される。   A specific example is shown in FIG. FIG. 16 is a timing chart showing the processing state of the frame start signal and the free deformation unit 12. The frame start signal is a signal indicating the start of a frame, and is input from, for example, an imaging unit or the like in the front stage of the image processing apparatus 1 (1A).

図16では、1番目の入力画像に対する最大処理時間(1フレーム期間)内に自由変形部12の処理が完了していない。したがって、2番目の入力画像は、1フレーム期間以上経過したので自由変形部12において処理を行わない。そして、3番目の入力画像から自由変形部12は処理を再開するが、拡大処理は行わないようにする。拡大処理が必要な場合は、拡大・縮小部15で別途行う。即ち、変形手段は、一つの入力画像の処理が所定時間以上経過した場合は、以降の入力画像に対しては拡大処理を制限する。   In FIG. 16, the processing of the free deformation unit 12 is not completed within the maximum processing time (one frame period) for the first input image. Therefore, since the second input image has passed one frame period or more, the process is not performed in the free deformation unit 12. Then, although the free deformation unit 12 resumes the process from the third input image, the enlargement process is not performed. If enlargement processing is required, the enlargement / reduction unit 15 separately performs it. That is, when the processing of one input image has passed a predetermined time or more, the deformation means limits the enlargement processing to the subsequent input images.

なお、拡大処理を行わないと判断する所定期間は、1フレーム期間に限らず、メモリ14の読み書きや拡大・縮小部15等の処理のオーバーヘッド分や、フレームレート等の画像処理装置1(1A)に要求される性能に応じて適宜変更してもよい。   Note that the predetermined period for determining that the enlargement processing is not performed is not limited to one frame period, and the overhead of the processing of the read / write of the memory 14 and the processing of the enlargement / reduction unit 15 etc., and the image processing device 1 (1A) It may be suitably changed according to the performance required of.

本実施形態によれば、自由変形部12は、一つの入力画像の処理が1フレーム期間以上経過した場合は、以降の入力画像に対しては拡大処理を禁止するように制限している。このようにすることにより、自由変形部12がメモリ14に書き込むデータ量と、拡大・縮小部15が読み出すデータ量が減少し、メモリアクセスの帯域不足を解消することができる。   According to the present embodiment, the free deformation unit 12 restricts the enlargement processing to be prohibited for the subsequent input images when the processing of one input image has elapsed for one frame period or more. By doing this, the amount of data written to the memory 14 by the free deformation unit 12 and the amount of data read by the enlargement / reduction unit 15 are reduced, and it is possible to eliminate the bandwidth shortage of memory access.

また、自由変形部12は、入力画像の処理が1フレーム期間以上経過した画像の直後の入力画像の処理を行わないので、入力画像がリアルタイムに入力される動画像等の場合に、画像の劣化を最小限に抑えることができる。   In addition, since the free deformation unit 12 does not process the input image immediately after the processing of the input image for which one frame period or more has elapsed, the image is degraded when the input image is a moving image or the like input in real time. Can be minimized.

最後に上述した4つの実施形態にかかる画像処理装置1(1A)のいずれかを有する電子機器の一実施形態を図17を参照して説明する。図17は、図1に示した画像処理装置1の例であるが図12に示した画像処理装置1Aでもよいことはいうまでもない。   Lastly, an embodiment of an electronic device having any one of the image processing apparatuses 1 (1A) according to the above-described four embodiments will be described with reference to FIG. Although FIG. 17 shows an example of the image processing apparatus 1 shown in FIG. 1, it goes without saying that the image processing apparatus 1A shown in FIG. 12 may be used.

図17に示した電子機器100は、画像処理装置1に、画像取得手段としての画像取得部101と、画像出力手段としての画像出力部102と、が追加されている。例えば電子機器100がデジタルカメラの場合、画像取得部101は、撮像素子(撮像部)やYUV422ファーマットへの変換部等が相当し、画像出力部102は、液晶ディスプレイ等の表示手段や、メモリカード等の記憶媒体等が相当する。   In the electronic device 100 shown in FIG. 17, an image acquisition unit 101 as an image acquisition unit and an image output unit 102 as an image output unit are added to the image processing apparatus 1. For example, when the electronic device 100 is a digital camera, the image acquisition unit 101 corresponds to an imaging device (imaging unit), a conversion unit to YUV 422 format, etc. The image output unit 102 is a display unit such as a liquid crystal display, a memory It corresponds to a storage medium such as a card.

図17に示した電子機器100は、画像取得部101で、撮像素子が撮像した画像をYUV422フォーマットへ変換して画像処理装置1に入力する。画像処理装置1では、上述した実施形態のようにして、歪み補正処理やデジタルズーム処理を行い、画像出力部102で、歪み補正処理やデジタルズーム処理が施された画像が表示手段に表示される。   The electronic device 100 illustrated in FIG. 17 causes the image acquisition unit 101 to convert an image captured by the imaging device into the YUV422 format and input the image to the image processing apparatus 1. The image processing apparatus 1 performs distortion correction processing and digital zoom processing as in the above-described embodiment, and the image output unit 102 displays an image subjected to distortion correction processing and digital zoom processing on the display unit.

なお、画像取得部101は、撮像素子等に限らない。例えば、画像がメモリカードやハードディスクドライブ等の記憶媒体に格納されているのであれば、それら記憶媒体であってもよいし、画像がネットワーク等を介して取得されるのであればネットワークインターフェース等であってもよい。   The image acquisition unit 101 is not limited to an imaging device or the like. For example, if the image is stored in a storage medium such as a memory card or a hard disk drive, the storage medium may be used. If the image is acquired via a network or the like, a network interface etc. May be

画像出力部102も同様に表示手段に限らない。例えば、画像がメモリカードやハードディスクドライブ等の記憶媒体に格納されるのであれば、それら記憶媒体であってもよいし、画像がネットワーク等を介して出力されるのであればネットワークインターフェース等であってもよい。   Similarly, the image output unit 102 is not limited to the display unit. For example, if the image is stored in a storage medium such as a memory card or a hard disk drive, the storage medium may be used. If the image is output via a network or the like, a network interface or the like may be used. It is also good.

電子機器100も、デジタルカメラ等の撮影装置に限らず、画像の歪み補正や回転等の変形と拡大や縮小機能とを有する映像機器、情報機器及び通信機器あるいは画像形成装置等であってもよい。   The electronic device 100 is not limited to a photographing device such as a digital camera, but may be a video device, an information device, a communication device, an image forming device, or the like having distortion correction, rotation, etc. .

また、本発明は上記実施形態に限定されるものではない。即ち、当業者は、従来公知の知見に従い、本発明の骨子を逸脱しない範囲で種々変形して実施することができる。かかる変形によってもなお本発明の画像処理装置の構成を具備する限り、勿論、本発明の範疇に含まれるものである。   Further, the present invention is not limited to the above embodiment. That is, those skilled in the art can carry out various modifications without departing from the gist of the present invention in accordance with conventionally known findings. As long as the configuration of the image processing apparatus of the present invention is provided even by such a modification, it is of course included in the scope of the present invention.

1、1A 画像処理装置
11 座標データテーブル(座標格納手段)
12 自由変形部(変形手段)
13 メモリコントローラ
14 メモリ
15 拡大・縮小部(拡大縮小手段)
16 ブレンディング部(混合手段)
100 電子機器
101 画像取得部(画像取得手段)
102 画像出力部(画像出力手段)
S101〜S107 変形工程
1, 1A Image processing device 11 Coordinate data table (coordinate storage means)
12 Free deformation part (deformation means)
13 memory controller 14 memory 15 enlargement / reduction unit (enlargement / reduction means)
16 Blending section (mixing means)
100 electronic device 101 image acquisition unit (image acquisition means)
102 Image output unit (image output means)
S101 to S107 deformation process

特許第5154361号公報Patent No. 5154361 gazette

Claims (10)

入力画像に対して所定の変形処理を行って出力画像を出力する変形手段を有する画像処理装置であって、
前記変形手段は、前記出力画像を複数の領域に分割し、その分割領域の画素数に対して、前記分割領域ごとにそれぞれ前記入力画像内で参照する参照領域の画素数が少ない場合は、当該分割領域に対して前記変形処理と共に縮小処理を施し、前記参照領域の画素数が多い場合は、当該分割領域に対して前記変形処理と共に拡大処理を施すことを特徴とする画像処理装置。
An image processing apparatus including a deformation unit that performs predetermined deformation processing on an input image and outputs an output image,
The deformation means divides the output image into a plurality of areas, and when the number of pixels of a reference area to be referred to in the input image for each of the divided areas is smaller than the number of pixels of the divided areas, subjected to contraction small processing on the deformation processing co the divided region, when the number of pixels of the reference region is large, and characterized by applying expansion increasing processing to the transformation processing co against the partition area Image processing device.
入力画像に対して所定の変形処理を行って出力画像を出力する変形手段を有する画像処理装置であって、
前記変形手段は、前記出力画像を複数の領域に分割し、その分割領域の一の方向の画素数に対して、前記分割領域ごとにそれぞれ前記入力画像内で参照する参照領域の前記一の方向の画素数が少ない場合は、当該分割領域の前記一の方向に縮小処理を施し、前記参照領域の前記一の方向の画素数が多い場合は、当該分割領域の前記一の方向に拡大処理を施し、
前記分割領域の前記一の方向と直交する他の方向の画素数に対して、前記参照領域の前記他の方向の画素数が少ない場合は、当該分割領域の前記他の方向に前記縮小処理を施し、前記参照領域の前記他の方向の画素数が多い場合は、当該分割領域の前記他の方向に前記拡大処理を施す、
ことを特徴とする画像処理装置。
An image processing apparatus including a deformation unit that performs predetermined deformation processing on an input image and outputs an output image,
The deformation means divides the output image into a plurality of areas, and the direction of one of the reference areas to be referred to in the input image for each of the divided areas with respect to the number of pixels in one direction of the divided areas. If the number of pixels is small, the aforementioned divided areas subjected to contraction small processing in one direction, when the number of pixels the one direction of the reference region is large, expanded to the one direction of the divided area Process and
When the number of pixels in the other direction of the reference area is smaller than the number of pixels in the other direction orthogonal to the one direction of the divided area, the reduction process is performed in the other direction of the divided area. When the number of pixels in the other direction of the reference area is large, the enlargement process is performed in the other direction of the divided area;
An image processing apparatus characterized by
前記分割領域が矩形状であって、少なくとも前記矩形の4つの頂点に対応する前記入力画像の座標位置が格納されている座標格納手段をさらに有し、
前記変形手段は、前記座標格納手段に格納されている前記座標位置に基づいて前記分割領域に前記拡大処理または前記縮小処理を施すことを特徴とする請求項1または2に記載の画像処理装置。
The image processing apparatus further includes coordinate storage means in which the divided area is in a rectangular shape and the coordinate position of the input image corresponding to at least four vertices of the rectangle is stored.
The image processing apparatus according to claim 1, wherein the deformation unit performs the enlargement process or the reduction process on the divided area based on the coordinate position stored in the coordinate storage unit.
複数の画像を混合する混合手段をさらに有し、
前記変形手段は、前記混合手段で混合される前記分割領域においては、それぞれの出力画像の前記分割領域についてそれぞれ算出された拡大または縮小の倍率のうち、最大の倍率に合わせて前記拡大処理または前記縮小処理を施すことを特徴とする請求項1乃至3のうちいずれか一項に記載の画像処理装置。
It further comprises mixing means for mixing a plurality of images,
In the divided area to be mixed by the mixing means, the deformation means may perform the enlargement process or the enlargement process in accordance with the largest magnification among the enlargement or reduction rates respectively calculated for the divided areas of the respective output images. The image processing apparatus according to any one of claims 1 to 3, wherein a reduction process is performed.
前記変形手段は、一つの前記入力画像の処理が所定期間以上経過した場合は、以降の入力画像に対しては前記拡大処理を制限することを特徴とする請求項1乃至4のうちいずれか1項に記載の画像処理装置。   5. The image processing apparatus according to any one of claims 1 to 4, wherein the transformation means limits the enlargement process on subsequent input images when processing of one of the input images has passed a predetermined period or more. An image processing apparatus according to claim 1. 前記変形手段における処理後の画像に対して拡大処理または縮小処理を施す拡大縮小手段を有することを特徴とする請求項1乃至5のうちいずれか一項に記載の画像処理装置。   The image processing apparatus according to any one of claims 1 to 5, further comprising enlargement / reduction means for performing enlargement processing or reduction processing on the processed image in the deformation means. 請求項1乃至6のうちいずれか一項に記載の画像処理装置を有することを特徴とする電子機器。   An electronic apparatus comprising the image processing apparatus according to any one of claims 1 to 6. 画像を取得する画像取得手段と、請求項1乃至6のうちいずれか一項に記載の画像処理装置と、前記画像処理装置による処理が施された画像を出力する画像出力手段と、を有することを特徴とする電子機器。   An image acquisition unit configured to acquire an image, an image processing apparatus according to any one of claims 1 to 6, and an image output unit configured to output an image processed by the image processing apparatus. Electronic equipment characterized by 入力画像に対して所定の変形処理を行って出力画像を出力する変形工程を含む画像処理方法であって、
前記変形工程は、前記出力画像を複数の領域に分割し、その分割領域の画素数に対して、前記分割領域ごとにそれぞれ前記入力画像内で参照する参照領域の画素数が少ない場合は、当該分割領域に対して前記変形処理と共に縮小処理を施し、前記参照領域の画素数が多い場合は、当該分割領域に対して前記変形処理と共に拡大処理を施すことを特徴とする画像処理方法。
An image processing method including a deformation step of performing predetermined deformation processing on an input image and outputting an output image,
In the deformation step, the output image is divided into a plurality of areas, and when the number of pixels of a reference area to be referred to in the input image for each of the divided areas is smaller than the number of pixels of the divided areas, subjected to contraction small processing on the deformation processing co the divided region, when the number of pixels of the reference region is large, and characterized by applying expansion increasing processing to the transformation processing co against the partition area Image processing method.
入力画像に対して所定の変形処理を行って出力画像を出力する変形工程を含む画像処理方法であって、
前記変形工程は、前記出力画像を複数の領域に分割し、その分割領域の一の方向の画素数に対して、前記分割領域ごとにそれぞれ前記入力画像内で参照する参照領域の前記一の方向の画素数が少ない場合は、当該分割領域の前記一の方向に縮小処理を施し、前記参照領域の前記一の方向の画素数が多い場合は、当該分割領域の前記一の方向に拡大処理を施し、
前記分割領域の前記一の方向と直交する他の方向の画素数に対して、前記参照領域の前記他の方向の画素数が少ない場合は、当該分割領域の前記他の方向に前記縮小処理を施し、前記参照領域の前記他の方向の画素数が多い場合は、当該分割領域の前記他の方向に前記拡大処理を施す、
ことを特徴とする画像処理方法。
An image processing method including a deformation step of performing predetermined deformation processing on an input image and outputting an output image,
In the deformation step, the output image is divided into a plurality of areas, and the direction of one of the reference areas to be referred to in the input image for each of the divided areas with respect to the number of pixels in one direction of the divided areas. If the number of pixels is small, the aforementioned divided areas subjected to contraction small processing in one direction, when the number of pixels the one direction of the reference region is large, expanded to the one direction of the divided area Process and
When the number of pixels in the other direction of the reference area is smaller than the number of pixels in the other direction orthogonal to the one direction of the divided area, the reduction process is performed in the other direction of the divided area. When the number of pixels in the other direction of the reference area is large, the enlargement process is performed in the other direction of the divided area;
An image processing method characterized in that.
JP2014231174A 2014-11-14 2014-11-14 Image processing apparatus and electronic device Active JP6524644B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014231174A JP6524644B2 (en) 2014-11-14 2014-11-14 Image processing apparatus and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014231174A JP6524644B2 (en) 2014-11-14 2014-11-14 Image processing apparatus and electronic device

Publications (2)

Publication Number Publication Date
JP2016095667A JP2016095667A (en) 2016-05-26
JP6524644B2 true JP6524644B2 (en) 2019-06-05

Family

ID=56071874

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014231174A Active JP6524644B2 (en) 2014-11-14 2014-11-14 Image processing apparatus and electronic device

Country Status (1)

Country Link
JP (1) JP6524644B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6789720B2 (en) * 2016-08-10 2020-11-25 キヤノン株式会社 Image processing equipment, image processing methods and programs

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2830339B2 (en) * 1990-03-28 1998-12-02 ソニー株式会社 Image conversion method
JPH11149549A (en) * 1997-11-17 1999-06-02 Toshiba Corp Picture processor
JP4583863B2 (en) * 2004-10-06 2010-11-17 Necディスプレイソリューションズ株式会社 Image display system
JP4754939B2 (en) * 2005-11-01 2011-08-24 オリンパス株式会社 Image processing device
JP4971818B2 (en) * 2007-02-07 2012-07-11 キヤノン株式会社 Image processing apparatus, image processing apparatus control method, program, and storage medium

Also Published As

Publication number Publication date
JP2016095667A (en) 2016-05-26

Similar Documents

Publication Publication Date Title
US8228396B2 (en) Image processing apparatus, image capturing apparatus, and image distortion correction method
US7630584B2 (en) Image processing apparatus, image processing system, imaging apparatus and image processing method
JP2009071689A (en) Image processing apparatus, image processing method, and imaging apparatus
JP2009105533A (en) Image processing device, imaging device, image processing method, and picked-up image processing method
JP5154361B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2009055410A (en) Image processing device and image processing method
US11244431B2 (en) Image processing
US20160189350A1 (en) System and method for remapping of image to correct optical distortions
JP2005135096A (en) Image processing method, image processing apparatus and program
JP2007184720A (en) Image photographing apparatus
JP2009100407A (en) Image processing apparatus and method thereof
JP6524644B2 (en) Image processing apparatus and electronic device
JP2006135565A (en) Image processing apparatus and image processing method
JP5676233B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP2009116763A (en) Image processing apparatus, and memory access method for image data
WO2015098721A1 (en) Image processing device, image processing method, image processing program, and imaging device
US9781353B2 (en) Image processing apparatus, electronic apparatus, and image processing method
JP5387276B2 (en) Image processing apparatus and image processing method
JP2004312072A (en) Image processing device, camera, and image processing method
JP6440465B2 (en) Image processing apparatus, image processing method, and program
JP6273881B2 (en) Image processing apparatus, image processing method, and program
WO2021054235A1 (en) Image capturing device, and image processing method
JP5251684B2 (en) Image processing device
JP2009033498A (en) Optical distortion correction device, method and program therefor, and imaging apparatus
JP2006139697A (en) Image processor and image processing method

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20161222

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171020

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20180813

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181022

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181120

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190305

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190325

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190422

R151 Written notification of patent or utility model registration

Ref document number: 6524644

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250