JP2006014357A - Image processing apparatus, image processing method and computer readable storage medium - Google Patents
Image processing apparatus, image processing method and computer readable storage medium Download PDFInfo
- Publication number
- JP2006014357A JP2006014357A JP2005215033A JP2005215033A JP2006014357A JP 2006014357 A JP2006014357 A JP 2006014357A JP 2005215033 A JP2005215033 A JP 2005215033A JP 2005215033 A JP2005215033 A JP 2005215033A JP 2006014357 A JP2006014357 A JP 2006014357A
- Authority
- JP
- Japan
- Prior art keywords
- output
- image data
- procedure
- holding
- selection
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title description 3
- 238000006243 chemical reaction Methods 0.000 claims abstract description 48
- 238000007906 compression Methods 0.000 claims abstract description 32
- 230000006835 compression Effects 0.000 claims abstract description 32
- 238000000034 method Methods 0.000 claims description 97
- 238000010187 selection method Methods 0.000 claims description 13
- 230000003111 delayed effect Effects 0.000 claims description 6
- 238000011946 reduction process Methods 0.000 claims description 3
- 239000000872 buffer Substances 0.000 abstract description 57
- 101100328887 Caenorhabditis elegans col-34 gene Proteins 0.000 abstract description 36
- 238000000926 separation method Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 17
- 238000004364 calculation method Methods 0.000 description 10
- 101100063435 Caenorhabditis elegans din-1 gene Proteins 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- RRLHMJHRFMHVNM-BQVXCWBNSA-N [(2s,3r,6r)-6-[5-[5-hydroxy-3-(4-hydroxyphenyl)-4-oxochromen-7-yl]oxypentoxy]-2-methyl-3,6-dihydro-2h-pyran-3-yl] acetate Chemical compound C1=C[C@@H](OC(C)=O)[C@H](C)O[C@H]1OCCCCCOC1=CC(O)=C2C(=O)C(C=3C=CC(O)=CC=3)=COC2=C1 RRLHMJHRFMHVNM-BQVXCWBNSA-N 0.000 description 1
- 230000008602 contraction Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
- Facsimile Image Signal Circuits (AREA)
- Studio Devices (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
Description
本発明はデジタル・スチルカメラのプロセスおよび圧縮を行う場合に用いて好適な画像処理装置、画像処理方法及びコンピュータ読み取り可能な記憶媒体に関するものである。 The present invention relates to an image processing apparatus, an image processing method, and a computer-readable storage medium suitable for use in the process and compression of a digital still camera.
近年、コンピュータの画像取り込み装置として、デジタル・スチルカメラが広く使われている。デジタル・スチルカメラにおいては、JPEGなどのDCT(Discrete Cosine Transform)を利用した画像圧縮方式が利用されている。また、デジタル・スチルカメラの普及に従って、高速な連続撮影及びデジタル・スチルカメラの省電力化が望まれている。そこで撮影から画像データの記録までの時間を短縮するために、従来は信号処理プロセスから画像圧縮までをハードウェアで処理していた。 In recent years, digital still cameras have been widely used as image capturing devices for computers. In the digital still camera, an image compression method using DCT (Discrete Cosine Transform) such as JPEG is used. Further, with the spread of digital still cameras, high-speed continuous shooting and power saving of digital still cameras are desired. Therefore, in order to shorten the time from shooting to recording of image data, conventionally, the processing from signal processing to image compression has been performed by hardware.
図17は従来のデジタル・スチルカメラのハードウェアの構成例である。
次に図17に従って従来のハードウェアによる信号処理プロセスから画像圧縮までの構成及び動作を説明する。
図示していない光学系によってCCD1に結像された画像は蓄積電荷情報に変換される。A/D変換器2によって、この蓄積電荷情報はアナログ信号からデジタル信号に変換される。このデジタル信号はCPUバス3を通り、RAM4に転送される。この時、CCD1からフレーム読み出しが行われた場合には、図18に示すように、デジタル化された蓄積電荷情報がRAM4に格納される。CPU5は、所定のパラメータ(メモリの画像データ位置、ガンマ補正値、画像圧縮設定値など)を信号処理プロセス回路9、プロセスSSG回路7及びJPEG圧縮回路11に設定し、プロセスSSG回路7に信号処理の開始を命令する。
FIG. 17 is a hardware configuration example of a conventional digital still camera.
Next, the configuration and operation from a signal processing process by conventional hardware to image compression will be described with reference to FIG.
An image formed on the
プロセスSSG回路7は、CPU5から信号処理開始の命令を受け取ると、設定された値に従ってDMAC(Direct Memory Accuses Controller)6を設定し、DMA転送を開始する。このDMA転送によってRAM4からデジタル化された蓄積電荷情報が信号処理プロセス回路9及び遅延回路8に読み出される。遅延回路8は蓄積電荷情報に対して信号処理プロセス回路9において垂直方向のフィルタリングを行うための遅延回路であり、垂直方向のフィルタのタップ数が3タップの場合には2Hd分のメモリ容量がある。ここでHdは、RAM4からの転送される画像データの水平方向のピクセル数である。
When the
CCD1から得られた画像信号は、輝度情報と色情報が周波数多重された信号になっているので、信号処理プロセス回路9では、遅延回路8より得られる垂直方向2画素分に同時化された信号を用いて、水平及び垂直方向の周波数濾過フィルタ処理を行い、輝度信号と色信号とを分離する。さらに分離した輝度信号に輪郭強調処理、ガンマ処理などを行ってY信号として出力し、色信号はマトリックス変換処理、ガンマ処理などを行いU/V信号として出力する。
Since the image signal obtained from the
信号処理プロセス回路9から出力されたYUV信号は、ラスタブロック変換器10においてラスタ走査順次の信号を複数個のピクセルから成るブロック単位の信号に変換するラスタブロック変換を行う。このラスタブロック変換器10は8Hr分のYUV情報を保持できる。ここでHrは、信号処理プロセス回路9から出力される画像データの水平方向のピクセル数である。次にJPEG圧縮回路11は上記ラスタ・ブロック変換されたYUV信号をJPEG圧縮し、CPUバス3を通じてRAM4に書き込む。RAM4に書き込まれたJPEG圧縮データは、CPU5からの命令によって、FATなどのファイル記録フォーマットに従ってCPUバス3、I/F12を通して記録媒体13に記録される。
The YUV signal output from the
遅延回路8とラスタ・ブロック変換器10においては、それぞれ入力画像データの水平方向の大きさに比例したバッファ容量が必要である。例えば入力画像データが水平1034、垂直770、信号処理プロセス回路9の水平フィルタが11タップ、垂直フィルタが3タップ、JPEGの間引きが4:2:2、CCDの画像データが10bit、YUVがそれぞれ8bitの場合は、
The
Hd=1034
Hr=1034−INT(11/2)×2−1024
となり
遅延回路8のバッファ容量=2×Hd×10bit
=20680bit
ラスタ・ブロック変換器10のバッファ容量
=8×Hr×((Yのビット数)+(UVのビット数))
=8×1024×16bit
=131072bit
となる。
Hd = 1034
Hr = 1034-INT (11/2) × 2-1024
Buffer capacity of
= 20680bit
Buffer capacity of
= 8 × 1024 × 16bit
= 131072bit
It becomes.
しかしながら上記従来の構成においては、複数の画像サイズを扱うシステムにおいても、最大の水平画像サイズに対応して遅延回路8とラスタ・ブロック変換器10のバッファ容量を確保する必要があり、メモリの使用効率が不経済になるという問題があった。また、高速な連続撮影及び省電力化が望まれている。
However, in the above-described conventional configuration, even in a system that handles a plurality of image sizes, it is necessary to secure the buffer capacity of the
従って、本発明は上記諸問題を解決することを目的とする。 Accordingly, an object of the present invention is to solve the above problems.
本発明による画像処理装置においては、画像データを保持する保持手段と、上記保持された画像データを隣接部分で重なり合う複数のブロックに分割し、上記ブロックのサイズを設定してブロック毎に順次読み出す読み出し制御手段とを設け、上記読み出された画像データを遅延させる遅延手段と、上記読み出された画像データと上記遅延された画像データとを水平フィルタ及び垂直フィルタを用いて処理する信号処理手段を設け、上記信号処理手段の出力を拡大もしくは縮小する拡大・縮小手段と、ラスタ・ブロック変換する変換手段と、上記拡大・縮小手段により拡大もしくは縮小された画像データを保持することが可能な第2の保持手段と、上記拡大・縮小手段の出力を上記第2の保持手段に与えるか上記変換手段に与えるかを選択する第1の選択手段と、上記変換手段の入力を上記第2の保持手段か上記第1の保持手段の出力かを選択する第2の選択手段と、上記変換手段の出力を圧縮する圧縮手段とを備え、上記拡大・縮小手段における垂直方向の変倍率の分子が上記圧縮手段の最小処理単位の垂直サイズの約数である場合には、上記第1の選択手段で上記拡大・縮小処理の出力を上記変換手段に入力するように選択し、上記第2の選択手段は上記第1の選択手段の出力を選択し、それ以外の変倍率の場合は、上記第1の選択手段の選択により上記拡大・縮小手段の出力が上記第2の保持手段に出力され、上記第2の選択手段により上記変換手段の入力に上記第2の保持手段に出力された画像データを選択することを特徴とする。 In the image processing apparatus according to the present invention, the reading unit that holds the image data and the held image data are divided into a plurality of blocks that overlap each other in adjacent portions, and the size of the block is set and read sequentially for each block. Control means, delay means for delaying the read image data, and signal processing means for processing the read image data and the delayed image data using a horizontal filter and a vertical filter. A second enlarging / reducing means for enlarging or reducing the output of the signal processing means; a converting means for raster / block conversion; and a second image data that can be held by the enlarging / reducing means. Holding means and whether the output of the enlarging / reducing means is given to the second holding means or the converting means First selection means; second selection means for selecting whether the input of the conversion means is the second holding means or the output of the first holding means; and compression means for compressing the output of the conversion means When the numerator of the vertical scaling factor in the enlarging / reducing means is a divisor of the vertical size of the minimum processing unit of the compressing means, the output of the enlarging / reducing process by the first selecting means Is selected to be input to the conversion means, the second selection means selects the output of the first selection means, and in the case of other scaling factors, the selection by the first selection means The output of the enlarging / reducing means is outputted to the second holding means, and the image data outputted to the second holding means is selected as the input of the converting means by the second selecting means. .
本発明による記憶媒体においては、画像データを保持する保持手順と、上記保持された画像データを隣接部分で重なり合う複数のブロックに分割し、上記ブロックのサイズを設定してブロック毎に順次読み出す読み出し制御手順とを設け、上記読み出された画像データを遅延させる遅延手順と、上記読み出された画像データと上記遅延された画像データとを水平フィルタ及び垂直フィルタを用いて処理する信号処理手順を設け、上記信号処理手順の出力を拡大もしくは縮小する拡大・縮小手順と、ラスタ・ブロック変換する変換手順と、上記拡大・縮小手順により拡大もしくは縮小された画像データを保持することが可能な第2の保持手順と、上記拡大・縮小手順の出力を上記第2の保持手順に与えるか上記変換手順に与えるかを選択する第1の選択手順と、上記変換手順の入力を上記第2の保持手順か上記第1の保持手順の出力かを選択する第2の選択手順と、上記変換手順の出力を圧縮する圧縮手順とを備え、上記拡大・縮小手順における垂直方向の変倍率の分子が上記圧縮手順の最小処理単位の垂直サイズの約数である場合には、上記第1の選択手順で上記拡大・縮小処理の出力を上記変換手順に入力するように選択し、上記第2の選択手順は上記第1の選択手順の出力を選択し、それ以外の変倍率の場合は、上記第1の選択手順の選択により上記拡大・縮小手順の出力が上記第2の保持手順に出力され、上記第2の選択手順により上記変換手順の入力に上記第2の保持手順に出力された画像データを選択することをコンピュータに実行させるためのプログラムを記録したことを特徴とする。 In the storage medium according to the present invention, the holding procedure for holding the image data, and the reading control for dividing the held image data into a plurality of blocks overlapping at adjacent portions, sequentially setting the size of the blocks, and sequentially reading each block A delay procedure for delaying the read image data, and a signal processing procedure for processing the read image data and the delayed image data using a horizontal filter and a vertical filter. , An enlargement / reduction procedure for enlarging or reducing the output of the signal processing procedure, a conversion procedure for raster / block conversion, and a second capable of holding image data enlarged or reduced by the enlargement / reduction procedure. A holding procedure and a first step for selecting whether to give the output of the enlargement / reduction procedure to the second holding procedure or the conversion procedure. A second selection procedure for selecting whether the input of the conversion procedure is the output of the second holding procedure or the output of the first holding procedure, and a compression procedure for compressing the output of the conversion procedure When the numerator of the vertical scaling factor in the enlargement / reduction procedure is a divisor of the vertical size of the minimum processing unit of the compression procedure, the output of the enlargement / reduction process is output in the first selection procedure. Select to input to the conversion procedure, the second selection procedure selects the output of the first selection procedure, and in the case of other scaling factors, the enlargement / reduction is performed by the selection of the first selection procedure. The output of the reduction procedure is output to the second holding procedure, and the computer is caused to select the image data output to the second holding procedure as the input of the conversion procedure by the second selection procedure. Recorded the program of The features.
また、本発明による画像処理方法においては、画像データを保持する保持ステップと、上記保持された画像データを隣接部分で重なり合う複数のブロックに分割し、上記ブロックのサイズを設定してブロック毎に順次読み出す読み出し制御ステップとを設け、上記読み出された画像データを遅延させる遅延ステップと、上記読み出された画像データと上記遅延された画像データとを水平フィルタ及び垂直フィルタを用いて処理する信号処理ステップを設け、上記信号処理ステップの出力を拡大もしくは縮小する拡大・縮小ステップと、ラスタ・ブロック変換する変換ステップと、上記拡大・縮小ステップにより拡大もしくは縮小された画像データを保持することが可能な第2の保持ステップと、上記拡大・縮小ステップの出力を上記第2の保持ステップに与えるか上記変換ステップに与えるかを選択する第1の選択ステップと、上記変換ステップの入力を上記第2の保持ステップか上記第1の保持ステップの出力かを選択する第2の選択ステップと、上記変換ステップの出力を圧縮する圧縮ステップとを備え、上記拡大・縮小ステップにおける垂直方向の変倍率の分子が上記圧縮ステップの最小処理単位の垂直サイズの約数である場合には、上記第1の選択ステップで上記拡大・縮小処理の出力を上記変換ステップに入力するように選択し、上記第2の選択ステップは上記第1の選択ステップの出力を選択し、それ以外の変倍率の場合は、上記第1の選択ステップの選択により上記拡大・縮小ステップの出力が上記第2の保持ステップに出力され、上記第2の選択ステップにより上記変換ステップの入力に上記第2の保持ステップに出力された画像データを選択することを特徴とする。 Further, in the image processing method according to the present invention, the holding step for holding the image data and the held image data are divided into a plurality of overlapping blocks at adjacent portions, the size of the block is set, and the blocks are sequentially set. A read control step for reading, a delay step for delaying the read image data, and signal processing for processing the read image data and the delayed image data using a horizontal filter and a vertical filter Steps can be provided to hold the enlargement / reduction step for enlarging or reducing the output of the signal processing step, the conversion step for raster / block conversion, and the image data enlarged or reduced by the enlargement / reduction step. The outputs of the second holding step and the enlargement / reduction step are stored in the second holding step. A first selection step for selecting whether to give to the step or the conversion step, and a second selection step for selecting whether the input of the conversion step is the output of the second holding step or the first holding step And a compression step for compressing the output of the conversion step, and when the numerator of the vertical scaling factor in the enlargement / reduction step is a divisor of the vertical size of the minimum processing unit of the compression step, In the first selection step, the output of the enlargement / reduction process is selected to be input to the conversion step, the second selection step selects the output of the first selection step, and other scaling factors are selected. In this case, the output of the enlargement / reduction step is output to the second holding step by the selection of the first selection step, and the output of the expansion / reduction step is increased by the second selection step. And selects the image data output to the input of the conversion step to the second holding step.
本発明によれば、画像データをブロック分割して処理することによって、後段の例えば遅延回路やラスタ・ブロック変換等の処理に必要なバッファ容量を減らすことができる。 According to the present invention, by processing image data by dividing it into blocks, it is possible to reduce the buffer capacity required for subsequent processing such as delay circuits and raster block conversion.
また、画像信号処理が可能な水平ピクセルサイズが遅延回路及びラスタ・ブロック変換等で用いられるバッファメモリの容量に依存しなくなり、任意の水平ピクセルサイズの画像の画像処理が可能となる。これによって、メモリ量を減らしコストダウンが可能になる。
任意の画像サイズのデータの信号処理及び画像圧縮をRAM等の保持手段を経由することなく行えるので、高速な信号処理が可能となる。
Further, the horizontal pixel size capable of image signal processing does not depend on the capacity of the buffer memory used in the delay circuit and raster / block conversion, and image processing of an image with an arbitrary horizontal pixel size is possible. As a result, the amount of memory can be reduced and the cost can be reduced.
Since signal processing and image compression of data of an arbitrary image size can be performed without going through a holding unit such as a RAM, high-speed signal processing is possible.
また、本発明によれば、RAM等から読み出した画像データからJPEG等による圧縮画像データをハードウェアによるパイプライン処理で作成することが可能なので高速な信号処理が可能になる。
また、RAMへのアクセス回数を減らすことができるので、信号処理に必要な電力を節約することが可能になる。
また、上記バッファメモリの容量に依存せず、任意サイズの画像データに対して拡大・縮小を行うことができる。これによって、メモリ量を減らすことができるのでコストダウンが可能となる。
Further, according to the present invention, compressed image data by JPEG or the like can be created from image data read from a RAM or the like by pipeline processing by hardware, so that high-speed signal processing is possible.
In addition, since the number of accesses to the RAM can be reduced, it is possible to save the power required for signal processing.
Further, it is possible to enlarge / reduce image data of an arbitrary size without depending on the capacity of the buffer memory. As a result, the amount of memory can be reduced, and the cost can be reduced.
また、画像の正方化をDRAMなどのメモリを経由することなく、ハードウェアで信号処理プロセスから圧縮までをパイプラインで処理することができる。
さらに、信号処理のためのクロックを特定の期間停止することができるので、信号処理に必要な電力を節約することが可能になる。
In addition, it is possible to process a signal from a signal processing process to compression by a pipeline without using a memory such as a DRAM for square image conversion.
Furthermore, since the clock for signal processing can be stopped for a specific period, it is possible to save power required for signal processing.
以下、本発明の第1〜第4の実施の形態を図面と共に説明する。
尚、各実施の形態を示す図1、図9、図11、図15においては、図17及び互いに同一又は相当する部分には同一符号を付して重複する説明は省略する。
Hereinafter, first to fourth embodiments of the present invention will be described with reference to the drawings.
1, FIG. 9, FIG. 11 and FIG. 15 showing the respective embodiments, the same reference numerals are given to the same or corresponding parts in FIG.
図1は第1の実施の形態を示すもので、2次元DMAC16と遅延回路18が図17とは図面上の構成が異なっている。またROM14はCPU5の後述する処理を実行するためのプログラムを記憶する本発明による記憶媒体を構成する。この記憶媒体としては、半導体メモリ、光ディスク、光磁気ディスク、磁気媒体等を用いてよく、これらを不揮発性メモリカード、CD−ROM、フロッピディスク、磁気カード等に構成して用いてよい。
FIG. 1 shows a first embodiment. A two-
図1において、CCD1の蓄積電荷情報が図17の従来と同様にしてデジタル信号に変換された後、RAM4に図18に示すように格納されると、プロセスSSG回路7の信号処理が開始される。プロセスSSG回路7は、パラメータ、2次元DMAC16にDMA転送開始アドレスadr、水平転送回数m、垂直転送回数n、垂直オフセットoffsetの4つの値を設定してRAM4から画像データを読み出す。
In FIG. 1, after the stored charge information of the
図2に、DMA転送開始アドレスadr=0x030(以後0xがつく数字は16進数を意味する)、水平転送回数m=0x8、垂直転送回数n=0x5、垂直オフセットoffset=0x010の場合の読み出し順序を図示する。
2次元DMAC16は、読み出し開始アドレスとして2次元DMAC16内部にadrを保持し、2次元DMAC16内部にある水平読み出し回数を保持するカウンタと垂直読み出し回数を保持するカウンタを0にリセットする。そして、データの読み出しを行う毎に水平読み出し回数を保持するカウンタを1つインクリメントする。
FIG. 2 shows the reading order when the DMA transfer start address adr = 0x030 (hereinafter, the number with 0x means a hexadecimal number), the number of horizontal transfers m = 0x8, the number of vertical transfers n = 0x5, and the vertical offset offset = 0x010. Illustrated.
The two-
また水平読み出し回数を保持しているカウンタの値がmと一致した場合は、データ読み出し開始アドレスoffset分インクリメントするとともに、水平読み出し回数を保持するカウンタを0にリセットし、垂直読み出し回数を保持するカウンタを1つインクリメントする。データ読み出しは、垂直読み出し回数のカウンタの値がnに一致した時点で終了する。このように、RAM4から読み出しアドレスを変化させることによって、図2に示すようにRAM4の方形状の領域からデータの読み出しを行う。
When the value of the counter that holds the number of horizontal readings is equal to m, the counter that increments the data reading start address offset, resets the counter that holds the number of horizontal readings to 0, and holds the number of vertical readings Is incremented by one. Data reading ends when the value of the counter for the number of vertical readings matches n. Thus, by changing the read address from the
プロセスSSG回路7は、2次元DMAC16を繰り返し制御することによって、図3に示すように、RAMから画像データを複数のブロックに分割して、ブロック0からブロック1、ブロック2、・・・、ブロックpq−1の順序に読み出す。図3において、HとVはそれぞれCCD1からRAM4に転送された1画面分の画像データの水平方向サイズと垂直方向サイズであり、水平方向にp個、垂直方向にq個、合計p×q個の領域が斜線部分で上下左右に重なり合ったブロックに分割されている。
The
このようにして、RAM4から読み出された画像データはCPUバス3を通じて遅延回路18と信号処理プロセス回路9に送られる。このため、遅延回路18で必要な記憶容量は、
2(ライン)×Hb×(1画素を表現するビット数)
となる。
In this way, the image data read from the
2 (line) x Hb x (number of bits representing one pixel)
It becomes.
図3の各ブロックは、さらに図4に示すように4つの領域から構成されている。
図4において、領域4−Aは、RAM4から読み出される画像データが有効、遅延回路18から読み出される画像データが無効な領域であり、このため信号処理プロセス回路9の出力も無効な領域である。Vdelayは、遅延回路18の遅延ライン数に等しく、本実施の形態においては垂直3タップのフィルタを信号処理プロセス回路9において行うため2である。
Each block in FIG. 3 is further composed of four areas as shown in FIG.
In FIG. 4, an area 4-A is an area where the image data read from the
領域4−B及び領域4−Dは、RAM4から読み出される画像データ及び遅延回路18から読み出される画像データは有効であるが、信号処理プロセス回路9内のフィルタに2ラインの水平画像データが同時に存在するため、信号処理プロセス回路9からの出力が無効になる領域である。信号処理プロセス回路9を水平方向にタップ数がNTapのフィルタと遅延回路から構成されると近似した場合、領域4−B及び領域4−Dの水平方向の長さは、NTap/2となる、例えばNTapが10の場合は5であり、NTap画像データ11の場合は小数点以下を切り捨てて5となる。本実施の形態においてはNTapは11であり、Hfil=5である。
In the area 4-B and the area 4-D, the image data read from the
領域4−Cは、信号処理プロセス回路9からの出力が有効となる領域であり、水平方向の長さHaはMCU(Minimum Coded Unit:JPEGにおける最小のデータ単位)の水平サイズの倍数とし、垂直方向の長さVaはMCUの垂直サイズと等しくする。このためJPEGの間引きが4:2:2において8とする。
The area 4-C is an area where the output from the
このように、信号処理プロセス回路9からの出力が各ブロックの1部の領域のみ有効になり、プロセスSSG回路7は図3に示すように領域4−Aが上のブロックの領域4−Cと、領域4−Bが左側のブロックの領域4−Cと重なるように2次元DMAC16を制御する。
この水平方向の重なりを図5に垂直の重なりを図6に示す。
In this way, the output from the signal
This horizontal overlap is shown in FIG. 5, and the vertical overlap is shown in FIG.
図5において、ブロックXとブロックX+1が水平方向に重なっている。この時、Hoffsetは、
Hoffset=Ha
となる。
In FIG. 5, the block X and the block X + 1 are overlapped in the horizontal direction. At this time, Hoffset is
Hoffset = Ha
It becomes.
図6において、ブロックXとブロックX+pが垂直方向に重なっている。この時、Voffsetは、
Voffset=Va
となる。
In FIG. 6, the block X and the block X + p overlap in the vertical direction. At this time, Voffset is
Voffset = Va
It becomes.
この結果、図7に示すように1画面の画像データを信号処理プロセス回路9が処理することにより、出力ブロック0、出力ブロック1、・・・、出力ブロックpq−1の順にラスタ・ブロック変換器10に出力される。ただし、信号処理プロセス回路9から出力される画像データは、入力された全画像データに対して水平方向では左右端でHfil、垂直方向では上部でVdelayライン分小さい画像データとなる。
As a result, as shown in FIG. 7, the
各出力ブロックの大きさは水平方向がHa、垂直方向がVaであり、この出力ブロックを連続的にラスタ・ブロック変換器10においてラスタ・ブロック変換すると、ブロック分割されていない画像データを入力した場合と同等の信号がラスタ・ブロック変換器10から出力される。このため、ラスタ・ブロック変換器10内部にあるラインバッファの記憶容量は、水平方向がHa分、垂直方向がVa分あれば十分である。
The size of each output block is Ha in the horizontal direction and Va in the vertical direction. When this output block is continuously raster-block converted by the
次にJPEG圧縮回路11はラスタ・ブロック変換器10においてラスタ・ブロック変換された信号をJPEG圧縮し、CPUバス3を通じてRAM4に書き込む。RAM4に書き込まれたJPEG圧縮データは、CPU5からの命令によって、FATなどのファイル記録フォーマットに従ってCPUバス3、I/F12を通して記録媒体13に記録される。
Next, the
本実施の形態において、遅延回路18とラスタ・ブロック変換器10で必要となるバッファ容量は、入力画像データが水平1034、垂直770、信号処理プロセス回路9の水平フィルタが11タップ、垂直フィルタが3タップ、JPEGの間引きが4:2:2、CCDの画像データが10bit、YUVがそれぞれ8bit、画像の分割が水平4分割、垂直96分割の場合は、
In the present embodiment, the buffer capacity required for the
Ha=(1034−Hfil×2)/4(分割)
=(1034−5×2)/4
=256
Va=8
Vb=Va+2
=10bit
Hb=Ha+Hfil×2
=256+5×2
=266
となり、
遅延回路18のバッファ容量=2×Hb×10bit
=5320bit
ラスタ・ブロック変換器10のバッファ容量
=Va×Ha×((Yのビット数)+(UVのビット数))
=8×Ha×((Yのビット数)+(UVのビット数))
=8×256×16bit
=32768bit
となる。すなわち図17について前述した従来のバッファ容量より減らすことができる。
Ha = (1034-Hfil × 2) / 4 (division)
= (1034-5 × 2) / 4
= 256
Va = 8
Vb = Va + 2
= 10 bits
Hb = Ha + Hfil × 2
= 256 + 5 × 2
= 266
And
Buffer capacity of the
= 5320 bits
Buffer capacity of
= 8 × Ha × ((number of Y bits) + (number of UV bits))
= 8 × 256 × 16bit
= 32768 bits
It becomes. That is, it can be reduced from the conventional buffer capacity described above with reference to FIG.
また、図4の領域4−AをRAM4から読み出している間は、常に信号処理プロセス回路9の出力は無効であり、かつ遅延回路18から信号処理プロセス回路9に出力されている信号も無効である。このため、図8に示すようにプロセスSSG回路7によって信号処理プロセス回路9を駆動するクロック信号を制御し、領域4−Aの画像データがRAM4から読み出されている期間は、スイッチ15により信号処理プロセス回路9へのクロックの供給を停止する。このようなクロックの制御を信号処理プロセス回路9へ行っても、もともと無効な出力を出す期間なので有効な出力信号には影響はない。
While the area 4-A in FIG. 4 is read from the
尚、本実施の形態においてパラメータ、2次元DMAC16を利用したが、プロセスSSG回路7が通常のDMACを制御して、本実施の形態と同様の画像データの読み出しをRAM4から行うようにしてもよい。
Although the parameters and the two-
図9は第2の実施の形態を示すもので、スイッチ19、20および拡大・縮小回路17が設けられている。また2次元DMAC16、遅延回路8が用いられている。CCD1の蓄積電荷情報はA/D変換された後、RAM4に図18に示すように格納される。
FIG. 9 shows a second embodiment, in which switches 19 and 20 and an enlargement /
プロセスSSG回路7は2次元DMAC16にDMA転送開始アドレスadr、水平転送回数m、垂直転送回数n、垂直オフセットoffsetの4つの値を設定してRAM4から画像データを読み出す。
図2に、DMA転送開始アドレスadr=0x030(以後0xがつく数字は16進数を意味する)、水平転送回数m=0x8、垂直転送回数n=0x5、垂直オフセットoffset=0x010の場合の読み出し順序を図示する。
The
FIG. 2 shows the reading order when the DMA transfer start address adr = 0x030 (hereinafter, the number with 0x means a hexadecimal number), the number of horizontal transfers m = 0x8, the number of vertical transfers n = 0x5, and the vertical offset offset = 0x010. Illustrated.
2次元DMAC16は、読み出し開始アドレスとして2次元DMAC16内部にadrを保持し、2次元DMAC16内部にある水平読み出し回数を保持するカウンタと垂直読み出し回数を保持するカウンタを0にリセットする。データの読み出しを行う毎に水平読み出し回数を保持するカウンタを1つインクリメントし、読み出しアドレスも1つインクリメントする。
The two-
また水平読み出し回数を保持しているカウンタの値がmと一致した場合は、データ読み出し開始アドレスoffset分インクリメントするとともに、水平読み出し回数を保持するカウンタを0にリセットし、垂直読み出し回数を保持するカウントを1つインクリメントし、読み出しアドレスに読み出し開始アドレスをセットする。データ読み出しは垂直読み出し回数のカウンタ値がnに一致した時点で終了する。このように、RAM4からの読み出しアドレスを変化させることによって、図2に示すようにRAM4の方形状の領域からデータの読み出しを行う。
When the value of the counter that holds the number of horizontal readings matches m, the counter is incremented by the data reading start address offset, and the counter that holds the number of horizontal readings is reset to 0, and the count that holds the number of vertical readings Is incremented by 1, and the read start address is set as the read address. Data reading ends when the counter value of the number of vertical readings matches n. In this way, by changing the read address from the
プロセスSSG回路7は、2次元DMAC16を繰り返し制御することによって、図3に示すようにRAM4から画像データを複数のブロックに分割してブロック0からブロック1、ブロック2、・・・、ブロックpg−1の順序に読み出す。このようにして、RAM4から読み出された画像データはCPUバス3を通じて遅延回路8と信号処理プロセス回路9に送られる。
また、ブロック0からブロックpq−1の各ブロックは図4に示すように4つの領域から構成されており、各領域については前述した通りである。
The
Each block from
次に、拡大・縮小回路17は、CPU5によってあらかじめ指定された倍率で、この時の信号処理プロセス回路9からの出力に対して拡大または縮小を行う。この拡大・縮小回路13の構成は特開平5−227414号公報などで開示されているように構成されており、拡大・縮小回路17に入力される画像データの順番によって出力されるデータの計算方法が異なる。
Next, the enlargement /
例えば、図10に4/9に縮小される場合と、9/4に拡大される場合の入出力データの位相関係を示す。
4/9縮小の場合は、
Dout1=Din1
Dout2=3/4Din3+1/4Din4
Dout3=2/4Din5+2/4Din6
Dout4=1/4din7+3/4DIn8
Dout5=Din10
となり、入力データにおいては9周期で、出力データにおいては4周期で位相が変化する。
For example, FIG. 10 shows the phase relationship of input / output data when the image is reduced to 4/9 and when it is enlarged to 9/4.
In the case of 4/9 reduction,
Dout1 = Din1
Dout2 = 3 /
Dout3 = 2 /
Dout4 = 1 / 4din7 + 3 / 4DIn8
Dout5 = Din10
Thus, the phase changes in 9 cycles for input data and 4 cycles for output data.
同様に9/4拡大の場合は、
Dout1=Din1
Dout2=5/9Din1+4/9Din2
Dout3=1/9Din1+8/9Din2
Dout4=6/9din2+3/9Din3
Dout5=2/9Din2+7/9Din3
Dout6=7/9Din3+2/9Din4
Dout7=3/9Din3+6/9Din4
Dout8=8/9din4+1/9Din5
Dout9=4/9Din4+5/9Din5
Dout10=Din5
となり、入力データにおいては4周期で、出力データにおいては9周期で位相が変化する。
Similarly, in the case of 9/4 enlargement,
Dout1 = Din1
Dout2 = 5 /
Dout3 = 1 /
Dout4 = 6 / 9din2 + 3 / 9Din3
Dout5 = 2 /
Dout6 = 7 /
Dout7 = 3 /
Dout8 = 8/9 din4 + 1 / 9Din5
Dout9 = 4 /
Dout10 = Din5
Thus, the phase changes in 4 cycles in input data and in 9 cycles in output data.
また、拡大の場合は、M/Nの倍率において、拡大縮小回路17からM個のデータを出力させるにはN+1個の入力データが必要である。従って、領域4−Cの大きさであるHaとVaは以下のように決定される。
In the case of enlargement, N + 1 pieces of input data are required to output M pieces of data from the enlargement /
[水平方向のみ拡大を行う場合]
拡大・圧縮回路17において、水平方向にM/N倍の拡大を行って画像のリサイズ及び正方化を行う場合には、Ha×Vaの画像データを拡大・縮小回路17で処理した結果、水平サイズがMCUの水平サイズの倍数であり、垂直サイズがMCUの垂直サイズと等しい画像データが出力されるようにHa、Vaを決定する。このため、HaはMCUの水平サイズとMの最小公倍数にN/Mを乗算し、それに1を加えた値であり、VaはMCUの垂直サイズである。
[When enlarging only in the horizontal direction]
In the enlarging / compressing
また、水平方向のみ拡大する場合は、スイッチ19、20は共に'1'を選択し、拡大・縮小回路17の出力がスイッチ19、20を通ってラスタ・ブロック変換器10に出力されるようにする。
When enlarging only in the horizontal direction, both
例えば、CCD1の信号処理プロセス後の有効画像データが960(水平)×768(垂直)ピクセルであり、この画像を水平方向に16/15倍に拡大して1024(水平)×768(垂直)ピクセルの画像データを作成し、これを4:2:2の間引きを行ってJPEG圧縮する場合には、
(MCUの水平方向サイズ)=16ピクセル
(MCUの垂直方向サイズ)=8ピクセル
となり、
Ha=(16と16の最小公倍数)/16×15×n+1
=15×n+1(nは自然数)
Va=8
となる。
For example, the effective image data after the signal processing process of the
(MCU horizontal size) = 16 pixels (MCU vertical size) = 8 pixels
Ha = (the least common multiple of 16 and 16) / 16 × 15 × n + 1
= 15 × n + 1 (n is a natural number)
Va = 8
It becomes.
nの最大値は、遅延回路8とラスタ・ブロック変換器10のバッファ容量によって決定される。例えば、CCDの1画素の蓄積電荷情報が10bitで表現され遅延回路8が水平640画素を2ライン分保持可能なバッファ容量を持ち、ラスタ・ブロック変換器10が信号処理プロセス回路9の出力を水平640ピクセルで8ライン分保持可能なバッファ容量を持ち、Hfilが5の場合には、
nl=(640−1−Hfil×2)/15
=41(小数点以下は切り捨て)
n2=640/(15×16/15)
=40(小数点以下は切り捨て)
(nの最大値)=(n1とn2の小さい方)
=40
である。
The maximum value of n is determined by the buffer capacity of the
nl = (640-1-Hfil × 2) / 15
= 41 (rounded down)
n2 = 640 / (15 × 16/15)
= 40 (rounded down)
(Maximum value of n) = (smaller of n1 and n2)
= 40
It is.
このとき、1つのブロックを信号処理プロセス回路9が処理する毎に拡大・縮小回路17からは(16×n)(水平)×8(垂直)ピクセルの画像データ、つまり水平がMCUの水平サイズの倍数であり、垂直がMCUの垂直サイズと等しい画像データがラスタ・ブロック変換器10に出力される。
At this time, every time the
[水平方向のみの縮小を行う場合]
拡大・圧縮回路17において、水平方向にM/N倍の縮小を行って画像のリサイズ及び正方化を行う場合には、Ha×Vaの画像データを拡大・縮小回路17で処理した結果、水平サイズがMCU水平サイズの倍数であり、垂直サイズがMCUの垂直サイズと等しい画像データが出力されるようにHa、Vaを決定する。このため、HaはMCUの水平サイズとMの最小公倍数にN/Mを乗算した値であり、VaはMCUの垂直サイズである。
[When performing horizontal reduction only]
When the enlargement /
また、水平方向のみ縮小する場合は、スイッチ19、20は共に'1'を選択し、拡大・縮小回路17の出力がスイッチ19、20を通ってラスタ・ブロック変換器10に出力されるようにする。
Further, when reducing only in the horizontal direction, both the
例えば、CCD1の信号処理プロセス後の有効画像データが1060(水平)×768(垂直)ピクセルであり、この画像を水平方向に28/29倍に拡大して1024(水平)×768(垂直)ピクセルの画像データを作成し、これを4:2:2の間引きを行ってJPEG圧縮する場合には、
(MCUの水平方向サイズ)=16ピクセル
(MCUの垂直方向サイズ)=8ピクセル
となり、
Ha=(28と16の最小公倍数)/28×29×n
=116×n(nは自然数)
Va=8
となる。
For example, the effective image data after the signal processing process of the
(MCU horizontal size) = 16 pixels (MCU vertical size) = 8 pixels
Ha = (the least common multiple of 28 and 16) / 28 × 29 × n
= 116 × n (n is a natural number)
Va = 8
It becomes.
nの最大値は、遅延回路8とラスタ・ブロック変換器10のバッファ容量によって決定される。例えば、CCDの1画素の蓄積電荷情報が10bitで表現され遅延回路8が水平640画素を2ライン分保持可能なバッファ容量を持ち、ラスタ・ブロック変換器10が信号処理プロセス回路9の出力を水平640ピクセルで8ライン分保持可能なバッファ容量を持ち、Hfilが5の場合には、
nl=(640−2×Hfil)/116
=5(小数点以下は切り捨て)
n2=640/(116×28/29)
=5(小数点以下は切り捨て)
(nの最大値)=(n1とn2の小さい方)
=5
となる。
The maximum value of n is determined by the buffer capacity of the
nl = (640-2 × Hfil) / 116
= 5 (rounded down)
n2 = 640 / (116 × 28/29)
= 5 (rounded down)
(Maximum value of n) = (smaller of n1 and n2)
= 5
It becomes.
このとき、1つのブロックを信号処理プロセス回路9が処理する毎に拡大・縮小回路17からは(7×16×n)(水平)×8(垂直)ピクセルの画像データ、つまり水平がMCUの水平サイズの倍数であり、垂直がMCUの垂直サイズと等しい画像データがラスタ・ブロック変換器10に出力される。
At this time, every time the signal
[垂直方向にMCUの垂直サイズの約数の拡大を行う場合]
拡大・圧縮回路17において、垂直方向にMCUの垂直サイズの約数の拡大を行う場合には、Haは上記の[水平方向のみ拡大を行う場合]または[水平方向のみ縮小を行う場合]に従って決定する。
[When expanding the divisor of the vertical size of the MCU in the vertical direction]
When the enlargement /
ブロックの垂直方向サイズVaは、MCUの垂直サイズが8のときは、
倍率が1のときはVa=8
倍率が2のときはVa=4
倍率が4のときはVa=2
倍率が8のときはVa=1
となり、MCUの垂直サイズが16のときは、
倍率が1のときはVa=16
倍率が2のときはVa=8
倍率が4のときはVa=4
倍率が8のときはVa=2
倍率が16のときは Va=1
となる。
When the vertical size Va of the block is 8, the vertical size Va of the block is
When the magnification is 1, Va = 8
When magnification is 2, Va = 4
Va = 2 when the magnification is 4
When magnification is 8, Va = 1
When the MCU vertical size is 16,
When the magnification is 1, Va = 16
When the magnification is 2, Va = 8
When magnification is 4, Va = 4
When magnification is 8, Va = 2
When magnification is 16, Va = 1
It becomes.
また、この時スイッチ19、20は共に'1'を選択し、拡大・縮小回路13の出力がスイッチ19、20を通ってラスタ・ブロック変換器10に出力されるようにする。これによって、1つのブロックを信号処理プロセス回路9が処理する毎に拡大・縮小回路17からは水平がMCUの水平サイズの倍数であり、垂直がMCUの垂直サイズと等しい画像データがラスタ・ブロック変換器10へ出力される。
At this time, the
[垂直方向に1/n倍の縮小を行う場合]
拡大・圧縮回路17において、垂直方向に1/n倍の縮小を行う場合には、Haは上記の[水平方向のみ拡大を行う場合]または[水平方向のみ縮小を行う場合]に従って決定する。Vaは、
Va=(MCUの垂直サイズ)×n
とする。
[When performing
When the enlargement /
Va = (MCU vertical size) × n
And
この時スイッチ19、20は共に'1'を選択し、拡大・縮小回路17の出力がスイッチ19、20を通ってラスタ・ブロック変換器10に出力されるようにする。これによって、1つのブロックを信号処理プロセス回路9が処理する毎に拡大・縮小回路17からは水平がMCUの水平サイズの倍数であり、垂直がMCUの垂直サイズと等しい画像データがラスタ・ブロック変換器10へ出力される。
At this time, the
[垂直方向にMCUの垂直サイズの約数、I/n倍以外の拡大・縮小を行う場合]
拡大・圧縮回路17において、垂直方向にMCUの垂直サイズの約数、1/n倍以外のMv/Nv倍の拡大を行い、水平方向にMh/Nh倍の拡大または縮小を行う場合には、
Haは拡大の時は
Ha=(Nhの倍数)+1
縮小の時は
Ha=(Nhの倍数)
である。
[When divisor of MCU vertical size, enlargement / reduction other than I / n times]
In the enlargement /
When Ha is enlarged, Ha = (multiple of Nh) +1
When reducing, Ha = (multiple of Nh)
It is.
また、VaはNvの倍数となる様に指定する。このとき、CPU5によりスイッチ19、20は共に'0'を選択する。これによって、信号処理プロセス回路9からの出力データは拡大・縮小回路17において拡大もしくは縮小されたのちに一旦RAM4に書き込まれる。RAM4に書き込まれた画像データは、MCUの垂直サイズ毎に分割してスイッチ20を通ってラスタ・ブロック変換器10に出力する。
Va is specified to be a multiple of Nv. At this time, both the
上記のようにHaとVaを決定し、スイッチ19、20を制御することによって、ラスタ・ブロック変換器10には、水平方向がMCUの水平サイズの整数倍であり、垂直方向がMCUの垂直サイズと等しい画像データが出力される。
また、各ブロックが、水平方向には図5に示すように、垂直方向には図6に示すように各領域が重なるようにプロセスSSG回路7は2次元DMAC16を制御する。
By determining Ha and Va and controlling the
Further, the
図5において、Hoffsetは、
Hoffset=Ha(縮小時)
Hoffset=Ha−1(拡大時)
であり、縮小時にはブロックXとブロックX+1の領域4−Cが水平方向に連続し、拡大時にはブロックXとブロックX+1の領域4−Cが水平に1ピクセルだけ重なる。
In FIG. 5, Hoffset is
Hoffset = Ha (when reduced)
Hoffset = Ha-1 (when enlarged)
In the reduction, the area 4-C of the block X and the block X + 1 continues in the horizontal direction, and in the enlargement, the area 4-C of the block X and the block X + 1 overlaps by one pixel horizontally.
また、図6において、Voffsetは、
Voffset=Va
であり、ブロックXとブロックX+pの領域4−Cが垂直方向に連続する。
In FIG. 6, Voffset is
Voffset = Va
The area 4-C of the block X and the block X + p is continuous in the vertical direction.
以上の動作によって、拡大・縮小回路17へ画像分割を行い、ブロック単位で処理を行っても、ブロックのつなぎめで拡大・縮小回路17の位相による画像の歪みは発生しない。
With the above operation, even when the image is divided into the enlargement /
尚、上記第2の実施の形態においては、拡大もしくは縮小の倍率からHaを決定していたが、遅延回路8およびラスタ・ブロック変換器10のバッファの容量からHa及び倍率を決定することも可能である。
例えば、ラスタ・ブロック変換器10のバッファ容量が水平方向に320ピクセル分であり、目標とする拡大率が11/10、MCUの水平方向のサイズが16の時にラスタ・ブロック変換器10のバッファメモリが一杯になるためのブロックの領域4−Cの水平サイズHaは、
Ha=320×10/11
=291(小数点以下を切り上げ)
である。
In the second embodiment, Ha is determined from the magnification of enlargement or reduction, but it is also possible to determine Ha and the magnification from the buffer capacity of the
For example, when the buffer capacity of the
Ha = 320 × 10/11
= 291 (rounded up after the decimal point)
It is.
このとき、拡大・縮小回路17の倍率を320/291とすることによって、拡大・縮小回路17の出力の水平ピクセル数が320となり、MCUの水平サイズの倍数の条件を満たしている。倍率に関しては目標値と異なるが、実用上は問題のない精度である。
At this time, by setting the magnification of the enlargement /
図11は第3の実施の形態を示すもので、拡大・縮小回路17、位相バッファ21が設けられている。
RAM4に図18に示すように格納されたCCD1からの画像情報は、プロセスSSG回路7、2次元DMAC16により図2に示す順序で読み出される。その際の2次元DMAC16内部にある水平読み出し回数を保持するカウンタと垂直読み出し回数を保持するカウンタの動作は、図9の第2の実施の形態で述べたと同様に行われ、RAM4から読み出しアドレスを変化させることによって、図2に示すようにRAM4の方形状の領域からデータの読み出しを行う。
FIG. 11 shows a third embodiment, in which an enlargement /
Image information from the
そして図3に示すように、RAM4から画像データを複数のブロックに分割してブロック0からブロック1、ブロック2、・・・、ブロックpg−1の順序に読み出し、読み出された画像データはCPUバス3を通じて遅延回路8と信号処理プロセス回路9に送られる。ブロック0からブロックpq−1の各ブロックは図4に示すように4つの領域から構成されている。
As shown in FIG. 3, the image data is divided into a plurality of blocks from the
拡大・縮小回路17は、図9の場合と同様に、入力される画像データの順番によって出力されるデータの計算方法が異なるものであり、
例えば、4/9に縮小される場合と、9/4に拡大される場合の入出力データの位相関係は、図10について説明した通りである。
As in the case of FIG. 9, the enlargement /
For example, the phase relationship of input / output data when reduced to 4/9 and enlarged to 9/4 is as described for FIG.
また、拡大においては、前述したように、M/Nの倍率において、拡大・縮小回路17からM個のデータを出力させるにはN+1個の入力データが必要である。このため、Haの幅によってはブロックが変化する際に、拡大・縮小回路17の位相に不連続が発生して画像の歪みが生じる。
In enlargement, as described above, N + 1 input data are required to output M data from the enlargement /
これを回避するために、本実施の形態では、ブロックの境界において拡大・縮小回路17の内部の位相と画像データを位相バッファ21に保持し、ブロックが変化した際は位相バッファ21から幾何学的に隣接したブロックの境界における位相と画像データを読み出して拡大・縮小のための補間演算を行う。
In order to avoid this, in the present embodiment, the phase and image data inside the enlargement /
以下に、ブロックの境界での画像データと位相の保存及び呼び出しの動作を説明する。
拡大・縮小回路17及び位相バッファ21は、図12に示す構成となっている。すなわち拡大・縮小回路17は水平拡大・縮小回路171と垂直拡大・縮小回路172とで構成され、位相バッファ21は、水平位相バッファ211と垂直位相バッファ212とで構成されている。
In the following, the operation of storing and recalling image data and phase at block boundaries will be described.
The enlargement /
図13は、上記各拡大・縮小回路171、172を構成する拡大・縮小回路66と、上記各位相バッファ211、212で構成する位相バッファ67の構成を示す。図13においてSIG_IN、STO、LOAD、SELはプロセスSSG回路1−7からの制御信号である。拡大・縮小回路66は、画像データSIC_INから読み出し、補間演算回路61で補間演算を行う。この時の演算を行う位相は位相カウンタ62から得る。
FIG. 13 shows the configuration of the enlargement / reduction circuit 66 constituting the enlargement /
STOがアクティブ(以下の説明においては、制御信号はアクティブHiとする)になると補間演算回路61内に保持している画像データ、リニア補間においては2点の画像データを補間演算回路61のDAT端子から出力すると共にWEN(WRITE ENABLE)をアクティブにする。このとき、SELの値に従ってスイッチ64により選択されているバッファメモリ65に画像データが書き込まれる。また、位相カウンタ62のCNT端子から出力されている現在の位相を示すカウントも同時にスイッチ64により選択されているバッファメモリ65に書き込まれる。
When STO becomes active (in the following description, the control signal is active Hi), the image data held in the
LOADがアクティブになるとSELの値に従ってスイッチ63により選択されているバッファメモリ65から位相と画像データをそれぞれ位相カウンタ62と補間演算回路61に出力する。補間演算回路61はそのLOAD端子がアクティブになると、LOAD_DAT端子から画像データを補間演算回路61に読み込む。位相カウンタ62はそのLOAD端子がアクティブになるとLOAD_CNT端子より位相を読み込む。
When LOAD becomes active, the phase and image data are output from the
このように動作する水平拡大・縮小回路171、水平位相バッファ211、垂直拡大・縮小回路172、垂直位相バッファ212に対してプロセスSSG回路7が行う制御を図14に示す。
図14において、HSEL、HSTO、HLOADはそれぞれ水平拡大・縮小回路171及び水平位相バッファ211のSEL、STO、LOADであり、VSEL、VSTO、VLOADはそれぞれ垂直拡大・縮小回路172及び垂直位相バッファ212のSEL、STO、LOADの制御信号である。
FIG. 14 shows the control performed by the
In FIG. 14, HSEL, HSTO, and HLOAD are SEL, STO, and LOAD of the horizontal enlargement /
HLOADは、各ブロックにおいてラインの先頭の画像データを水平拡大・縮小回路171で処理する前にアクティブにし、HSELを現在の画像データのブロック内でライン数と同じ値にする。これによって、水平拡大・縮小回路171には、前のブロックの同じラインの最後の画像データと位相が水平位相バッファ211から読み込まれる。
HLOAD is activated before the image data at the head of the line in each block is processed by the horizontal enlargement /
HSTOは、各ブロックにおいてラインの最後の画像データを水平拡大・縮小回路171で処理した後にアクティブにし、HSELを現在の画像データのブロック内でライン数と同じ値にする。これによって、現在のラインの最後の画像データと位相が水平拡大・縮小回路171から読み出されて、水平位相バッファ211に書き込まれる。
VLOADは、各ブロックにおいてブロックの最初のラインの画像データを垂直拡大・縮小回路172で処理している間にアクティブにし、VSELを処理する画像データのブロック内での水平ピクセル位置をVSELにする。これによって、垂直拡大・縮小回路172に1ライン前の同じ水平ピクセル位置の画像データが垂直位相バッファ212から読み込まれる。
The HSTO is activated after the last image data of the line in each block is processed by the horizontal enlargement /
VLOAD is activated while the image data of the first line of the block is processed by the vertical enlargement /
VSTOは、各ブロックにおいてブロックの最後のラインの画像データを垂直拡大・縮小回路172で処理している間にアクティブになる。VSELを処理する画像データのブロック内での水平ピクセル位置をVSELにする。これによって、現在のラインの画像データと位相が垂直拡大・縮小回路172から読み出されて、垂直位相バッファ212に書き込まれる。
The VSTO becomes active while the vertical enlargement /
また、水平位相バッファ211は、図3においてブロックp−1、ブロック2p−1、・・・、ブロックpq−1、つまり画像の水平に対して最後のブロックの拡大/縮小が終了した段階でリセットする。垂直位相バッファ212は、図3においてブロックpq−1、つまり1画面に対して最後のブロックの拡大/縮小が終了した段階でリセットする。
Further, the
以上、説明したようにプロセスSSG回路7、拡大・縮小回路17、位相バッファ21が動作することによって、画像データを分割して処理した場合においても歪みのない拡大/縮小がハードウェアのパイプライン処理で行うことができる。
As described above, by operating the
拡大・縮小回路17からの出力はラスタ・ブロック変換器10へ入力される。ラスタ・ブロック変換器10では、水平方向がMCUの水平サイズの倍数であり、垂直方向がMCUの垂直サイズと同じライン数の画像データに対してラスタ・ブロック変換を行う。このため拡大・縮小回路17から出力される画像データを拡大/縮小した結果、水平方向がMCUの水平サイズの倍数であり、垂直方向がMCUの垂直サイズと等しい画像が得られるように、領域4−CのHaとVaを設定する。
The output from the enlargement /
また、位相と画像データを保持するために、位相バッファ21に必要なバッファ容量は、例えば拡大/縮小後の画像が水平1024ピクセルであり、1ピクセルが16ビットで表現され、位相が8ビットで表現されている。MCUの垂直サイズが8ラインであり、垂直方向に4/5倍の縮小を行っているとすると、水平位相バッファ211には、
(16+8)×8×5/4=240ビット
垂直位相バッファ212には、
(16+8)×1024=24576ビット
のバッファ容量が必要である。
The buffer capacity required for the
(16 + 8) × 8 × 5/4 = 240 bit
A buffer capacity of (16 + 8) × 1024 = 24576 bits is required.
図15は第4の実施の形態を示すもので、第3の実施の形態と異なる点は、スイッチ19、20である。
本実施の形態の拡大・縮小回路17と位相バッファ21は、図16に示すように、水平拡大・縮小回路91、垂直拡大・縮小回路93、水平位相バッファ92から構成されている。
FIG. 15 shows a fourth embodiment, and the points different from the third embodiment are
As shown in FIG. 16, the enlargement /
CCD1が非正方画素である場合は、拡大・縮小回路17においては水平方向のみ拡大しもしくは縮小を行って正方化を行う。このとき、画像データのブロック分割は第3の実施の形態と同様に行い、CPU5はスイッチ19、20を'1'に選択する。
In the case where the
この結果、拡大・縮小回路17からは水平がMCUの水平サイズの倍数で、かつ垂直がMCUの垂直サイズに等しいブロック単位で画像が出力される。拡大・縮小回路17からの出力はスイッチ19、20を通り、ラスタ・ブロック変換器10に入力され、ラスタ・ブロック変換された後、JPEG圧縮回路11においてJPEG圧縮された後、JPEG圧縮データがRAM4へ書き込まれる。
As a result, the enlargement /
画像の正方化だけでなくリサイズも行う場合には、CPU5はスイッチ19、20を'0'に選択する。またブロックの領域4−Cの大きさであるHa、Vaとしては、Haは、Hbが遅延回路8のバッファ容量が許容する範囲を超えない任意の値とし、Vaは、拡大・縮小回路17においてMv/Nv倍の拡大もしくは縮小を行うとすると
Va=Nv×n(nは自然数)
とする。
When the image is squared as well as being resized, the
And
この結果、拡大・縮小回路17においては、第3の実施の形態で説明したように、水平拡大・縮小回路91の位相の連続性は位相バッファ21から以前の画像データ及び位相を読み込むことによって達成される。また、垂直拡大・縮小回路93の位相の連続性はVaをNvの公倍数にすることによって達成される。
As a result, in the enlargement /
拡大・縮小回路17の出力はスイッチ19、CPUバス3を通りRAM4に書き込まれる。RAM4に書き込まれた拡大もしくは縮小された画像データは、CPUバス3、スイッチ20を通りラスタ・ブロック変換器10でラスタ・ブロック変換された後、JPEG圧縮回路11においてJPEG圧縮され、JPEG圧縮データがRAM4へ書き込まれる。
The output of the enlargement /
4 RAM
5 CPU
7 プロセスSSG回路
8、18 遅延回路
9 信号処理プロセス回路
10 ラスタ・ブロック変換器
11 JPEG圧縮回路
14 ROM
16 2次元DMAC
17 拡大・縮小回路
19、20 スイッチ
21 位相バッファ
4 RAM
5 CPU
7
16 2D DMAC
17 Enlargement /
Claims (3)
上記拡大・縮小手段における垂直方向の変倍率の分子が上記圧縮手段の最小処理単位の垂直サイズの約数である場合には、上記第1の選択手段で上記拡大・縮小処理の出力を上記変換手段に入力するように選択し、上記第2の選択手段は上記第1の選択手段の出力を選択し、それ以外の変倍率の場合は、上記第1の選択手段の選択により上記拡大・縮小手段の出力が上記第2の保持手段に出力され、上記第2の選択手段により上記変換手段の入力に上記第2の保持手段に出力された画像データを選択することを特徴とする画像処理装置。 There is provided holding means for holding image data, and read control means for dividing the held image data into a plurality of blocks overlapping in adjacent portions, setting the size of the block, and sequentially reading each block. A delay means for delaying the read image data, a signal processing means for processing the read image data and the delayed image data using a horizontal filter and a vertical filter, and outputting an output of the signal processing means. Enlarging / reducing means for enlarging or reducing, converting means for raster / block conversion, second holding means capable of holding image data enlarged or reduced by the enlarging / reducing means, and the enlarging / reducing function First selection means for selecting whether the output of the means is given to the second holding means or to the conversion means, and input of the conversion means The a compression means for compressing a second selection means for selecting whether the output of said second holding means or said first holding means, the output of the conversion means,
When the numerator of the vertical scaling factor in the enlarging / reducing means is a divisor of the vertical size of the minimum processing unit of the compressing means, the output of the enlarging / reducing process is converted into the conversion by the first selecting means. The second selection means selects the output of the first selection means, and in the case of other magnifications, the enlargement / reduction is performed by the selection of the first selection means. The output of the means is output to the second holding means, and the image data output to the second holding means is selected as the input of the converting means by the second selecting means. .
上記拡大・縮小手順における垂直方向の変倍率の分子が上記圧縮手順の最小処理単位の垂直サイズの約数である場合には、上記第1の選択手順で上記拡大・縮小処理の出力を上記変換手順に入力するように選択し、上記第2の選択手順は上記第1の選択手順の出力を選択し、それ以外の変倍率の場合は、上記第1の選択手順の選択により上記拡大・縮小手順の出力が上記第2の保持手順に出力され、上記第2の選択手順により上記変換手順の入力に上記第2の保持手順に出力された画像データを選択することをコンピュータに実行させるためのプログラムを記録したことを特徴とするコンピュータ読み取り可能な記憶媒体。 There is provided a holding procedure for holding image data, and a reading control procedure for dividing the held image data into a plurality of blocks overlapping in adjacent portions, setting the size of the block, and sequentially reading each block. A delay procedure for delaying the read image data, a signal processing procedure for processing the read image data and the delayed image data using a horizontal filter and a vertical filter, and outputting the signal processing procedure. Enlarging / reducing procedure for enlarging or reducing, conversion procedure for raster / block conversion, second holding procedure capable of holding image data enlarged or reduced by the enlarging / reducing procedure, and enlarging / reducing A first selection procedure for selecting whether to provide the output of the procedure to the second holding procedure or the conversion procedure; The a compression procedure for compressing the second selection procedure that selects whether the output of said second holding steps or the first holding procedure, the output of the conversion procedure,
When the numerator of the vertical scaling factor in the enlargement / reduction procedure is a divisor of the vertical size of the minimum processing unit of the compression procedure, the output of the enlargement / reduction processing is converted into the conversion in the first selection procedure. Select to input to the procedure, the second selection procedure selects the output of the first selection procedure, and for other scaling factors, the enlargement / reduction by the selection of the first selection procedure The output of the procedure is output to the second holding procedure, and the computer executes the selection of the image data output to the second holding procedure as the input of the conversion procedure by the second selection procedure. A computer-readable storage medium characterized by recording a program.
上記拡大・縮小ステップにおける垂直方向の変倍率の分子が上記圧縮ステップの最小処理単位の垂直サイズの約数である場合には、上記第1の選択ステップで上記拡大・縮小処理の出力を上記変換ステップに入力するように選択し、上記第2の選択ステップは上記第1の選択ステップの出力を選択し、それ以外の変倍率の場合は、上記第1の選択ステップの選択により上記拡大・縮小ステップの出力が上記第2の保持ステップに出力され、上記第2の選択ステップにより上記変換ステップの入力に上記第2の保持ステップに出力された画像データを選択することを特徴とする画像処理方法。 There is provided a holding step for holding image data, and a reading control step for dividing the held image data into a plurality of blocks that overlap in adjacent portions, setting the size of the block, and sequentially reading each block. A delay step for delaying the read image data, a signal processing step for processing the read image data and the delayed image data using a horizontal filter and a vertical filter, and outputting an output of the signal processing step An enlargement / reduction step for enlarging or reducing, a conversion step for raster / block conversion, a second holding step capable of holding the image data enlarged or reduced by the enlargement / reduction step, and the enlargement / reduction Give the output of the step to the second holding step or to the conversion step A first selection step for selecting whether or not, a second selection step for selecting whether the input of the conversion step is the output of the second holding step or the output of the first holding step, and the output of the conversion step is compressed And a compression step
If the numerator of the vertical scaling factor in the enlargement / reduction step is a divisor of the vertical size of the minimum processing unit of the compression step, the output of the enlargement / reduction process is converted into the conversion in the first selection step. The second selection step selects the output of the first selection step, and in the case of other scaling factors, the enlargement / reduction is performed by the selection of the first selection step. The output of the step is output to the second holding step, and the image data output to the second holding step is selected as the input of the conversion step by the second selecting step. .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005215033A JP4137097B2 (en) | 2005-07-25 | 2005-07-25 | Image processing apparatus, image processing method, and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005215033A JP4137097B2 (en) | 2005-07-25 | 2005-07-25 | Image processing apparatus, image processing method, and computer-readable storage medium |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP06011198A Division JP3748489B2 (en) | 1998-03-11 | 1998-03-11 | Image processing apparatus, image processing method, and computer-readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006014357A true JP2006014357A (en) | 2006-01-12 |
JP4137097B2 JP4137097B2 (en) | 2008-08-20 |
Family
ID=35780930
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005215033A Expired - Fee Related JP4137097B2 (en) | 2005-07-25 | 2005-07-25 | Image processing apparatus, image processing method, and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4137097B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014131262A (en) * | 2012-11-30 | 2014-07-10 | Oki Data Corp | Image processing apparatus and method, and image forming apparatus |
-
2005
- 2005-07-25 JP JP2005215033A patent/JP4137097B2/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014131262A (en) * | 2012-11-30 | 2014-07-10 | Oki Data Corp | Image processing apparatus and method, and image forming apparatus |
Also Published As
Publication number | Publication date |
---|---|
JP4137097B2 (en) | 2008-08-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3748489B2 (en) | Image processing apparatus, image processing method, and computer-readable storage medium | |
US8009337B2 (en) | Image display apparatus, method, and program | |
JP3781634B2 (en) | Image processing apparatus, image processing method, and portable video device | |
US9519959B2 (en) | Image processing apparatus, imaging apparatus, and method for processing image | |
JP4442392B2 (en) | Image processing apparatus and image processing method | |
JP4024649B2 (en) | Image processing apparatus and image processing method | |
JP4225241B2 (en) | Image display device | |
JP4137097B2 (en) | Image processing apparatus, image processing method, and computer-readable storage medium | |
JP6524644B2 (en) | Image processing apparatus and electronic device | |
JP2010028758A (en) | Image processing apparatus and method, program, and imaging apparatus | |
JP4313907B2 (en) | Imaging apparatus and control method thereof | |
US8031245B2 (en) | Imaging apparatus and methods, and storing medium having computer program to perform the methods | |
JP2008068547A (en) | Image forming device | |
JPH11168610A (en) | Image processor | |
JP3529208B2 (en) | Image processing device | |
JP4377997B2 (en) | Signal processing apparatus and imaging apparatus | |
JP2006141001A (en) | Image processing apparatus reduced in power consumption and method | |
JP4439746B2 (en) | Information processing device | |
JP2006067513A (en) | Image magnification/reduction converting apparatus and digital video system | |
JP2003224715A (en) | Image processing circuit and image processing method | |
JP2006135566A (en) | Image processing apparatus and image processing method | |
JP2009260788A (en) | Imaging unit | |
JP2005227479A (en) | Image processor, image processing method, and program having image processing method executed by computer | |
JP3877054B2 (en) | Image reduction scaling device | |
JP2007213251A (en) | Image correction processing device and image correction processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071120 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080121 |
|
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: 20080507 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080603 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110613 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120613 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120613 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130613 Year of fee payment: 5 |
|
LAPS | Cancellation because of no payment of annual fees |