JP2017220180A - Image processing system, image processing device, and image processing method - Google Patents

Image processing system, image processing device, and image processing method Download PDF

Info

Publication number
JP2017220180A
JP2017220180A JP2016116621A JP2016116621A JP2017220180A JP 2017220180 A JP2017220180 A JP 2017220180A JP 2016116621 A JP2016116621 A JP 2016116621A JP 2016116621 A JP2016116621 A JP 2016116621A JP 2017220180 A JP2017220180 A JP 2017220180A
Authority
JP
Japan
Prior art keywords
image processing
output
video data
fifo
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2016116621A
Other languages
Japanese (ja)
Inventor
幸成 西川
Yukinari Nishikawa
幸成 西川
佳弘 有田
Yoshihiro Arita
佳弘 有田
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.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP2016116621A priority Critical patent/JP2017220180A/en
Publication of JP2017220180A publication Critical patent/JP2017220180A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a function of taking image data from an external video apparatus and applying image processing to it in a simple configuration, in addition to a function normally disposed in a graphic device.SOLUTION: An FIFO (4) for holding imaging data input from an image sensor (3) is connected to a memory bus (8b). An FPGA (5) detects a rising edge or falling edge of a vertical synchronous signal of the image sensor (3), and, after a prescribed period determined so that the capacity of the FIFO (4) during the input of one frame of imaging data from the image sensor (3) to the FIFO (4) is kept in the state lower than an upper limit and higher than a lower limit, starts an output of the imaging data from the FIFO (4) to the memory bus (8b).SELECTED DRAWING: Figure 1

Description

本発明は、メモリバスへ出力された画像データに対して画像処理を施す画像処理システム等に関する。   The present invention relates to an image processing system that performs image processing on image data output to a memory bus.

従来、カメラにより撮像された撮像データを取り込み、当該撮像データを画像表示する技術が提案されている(特許文献1および2)。   Conventionally, techniques for capturing image data captured by a camera and displaying the image of the image data have been proposed (Patent Documents 1 and 2).

特開2007−293457号公報(2007年11月8日公開)JP 2007-293457 A (published on November 8, 2007) 特許第5627993号公報(2014年11月19発行)Japanese Patent No. 5627993 (issued on November 19, 2014)

市販のグラフィックデバイスは、メモリからメモリバスを介して読み出した画像データに対して画像処理を施す構成を備えているものが多い。このようなグラフィックデバイスにおいて、さらにカメラにより撮像された撮像データを取り込んで画像処理を施す場合、撮像データを取り込むための入力系統を、メモリバスとは別に新たに設ける必要が生じる。   Many commercially available graphic devices have a configuration for performing image processing on image data read from a memory via a memory bus. In such a graphic device, when image data captured by the camera is further captured and image processing is performed, it is necessary to newly provide an input system for capturing the image data separately from the memory bus.

そこで、本発明者らは、グラフィックデバイスに通常備えられている機能を転用または共用してカメラにより撮像された撮像データを取り込むことを、簡易な構成で実現すべく、鋭意検討を行った結果、本発明者らは本発明を完成するに至った。   Therefore, the present inventors diligently or commonly used the function normally provided in the graphic device to capture the image data captured by the camera, and as a result of intensive investigations to achieve a simple configuration, The inventors have completed the present invention.

なお、特許文献1には、ビデオメモリから読み出された画像データに対し、画像処理を施す技術は開示されているものの、上述した転用または共用による構成については、何ら開示されていない。また、特許文献2にも、メモリに予め記憶された図形パターンに赤外線カメラにより撮影した遊技者の画像を合成する画像処理技術は開示されているものの、特許文献1と同様、上述した転用または共用による構成については、何ら開示されていない。   Although Patent Document 1 discloses a technique for performing image processing on image data read from a video memory, it does not disclose any of the above-described diversion or sharing configuration. Also, Patent Document 2 discloses an image processing technique for combining a player's image captured by an infrared camera with a graphic pattern stored in advance in a memory. The configuration according to is not disclosed at all.

本発明の目的は、簡易な構成により、グラフィックデバイスが通常備える機能に加え、外部映像機器から画像データを取り込んで画像処理を施す機能をも具備する画像処理システム等を実現することにある。   An object of the present invention is to realize an image processing system and the like having a function of fetching image data from an external video device and performing image processing in addition to a function normally provided in a graphic device with a simple configuration.

上記の課題を解決するために、本発明の一態様に係る画像処理システムは、メモリに接続されたメモリバスを介して上記メモリから読み出した画像データに対して画像処理を施す画像処理部を備える画像処理システムであって、カメラの垂直同期信号に同期して上記カメラから入力される映像データを保持する、上記メモリバスの少なくとも一部に接続された保持部と、上記保持部から上記メモリバスへの映像データの出力を制御する出力制御部とを備え、上記出力制御部は、上記垂直同期信号の立ち上がりまたは立ち下がりエッジを検知してから、上記映像データの1フレーム分を上記カメラから上記保持部への入力中において上記保持部の容量が上限値未満かつ下限値より大きい状態を保つように定められた所定期間後に、上記出力を開始させ、上記画像処理部は、上記保持部から上記メモリバスへ出力された映像データに対して画像処理を施す。   In order to solve the above problems, an image processing system according to an aspect of the present invention includes an image processing unit that performs image processing on image data read from the memory via a memory bus connected to the memory. An image processing system for holding video data input from the camera in synchronization with a vertical synchronization signal of the camera, a holding unit connected to at least a part of the memory bus, and the holding unit to the memory bus An output control unit that controls output of video data to the camera, and the output control unit detects one rising or falling edge of the vertical synchronization signal and then outputs one frame of the video data from the camera During the input to the holding unit, the output is opened after a predetermined period of time determined to keep the capacity of the holding unit below the upper limit value and above the lower limit value. Is allowed, the image processing unit performs image processing on image data output to the memory bus from the holding portion.

上記構成によれば、カメラから入力される映像データを保持部が保持し、メモリバスを介して、保持部から読み出される映像データが画像処理部に出力される。   According to the above configuration, the video data input from the camera is held by the holding unit, and the video data read from the holding unit is output to the image processing unit via the memory bus.

カメラの垂直同期信号の立ち上がりまたは立ち下がりエッジに同期して、カメラから保持部への映像データの入力が開始した時点から、所定期間後に保持部からメモリバスへ映像データを出力することから、その出力時点において保持部には、ある程度の映像データが保持されている。そのため、上記映像データの1フレーム分を上記カメラから上記保持部に入力中において上記保持部の容量が上限値未満かつ下限値より大きい状態を保つように予め所定期間を定めることにより、カメラから保持部への映像データの入力が終了する時点にあわせて、保持部からメモリバスへの映像データの出力が終了させることができる。   Since the video data is output from the holding unit to the memory bus after a predetermined period from the start of video data input to the holding unit in synchronization with the rising or falling edge of the vertical synchronization signal of the camera, At the time of output, a certain amount of video data is held in the holding unit. Therefore, when one frame of the video data is input from the camera to the holding unit, it is held from the camera by setting a predetermined period in advance so that the capacity of the holding unit is kept below the upper limit value and larger than the lower limit value. The output of the video data from the holding unit to the memory bus can be terminated in accordance with the time when the input of the video data to the unit is completed.

したがって、メモリから画像データを読み出すためのものであったメモリバスに保持部を接続し、メモリバスを介して、カメラの映像データを読み出すことができるので、従来からの構成を用いた簡易な構成により、カメラから映像データを取り込んで画像処理を施す機能も実現することができる。   Therefore, a holding unit can be connected to the memory bus that was used to read image data from the memory, and the video data of the camera can be read via the memory bus, so a simple configuration using the conventional configuration Thus, it is possible to realize a function of capturing image data from a camera and performing image processing.

なお、本発明の態様に係る画像処理システム(特に、画像処理部)は、コンピュータによって実現してもよく、この場合には、コンピュータを上記画像処理システムが備える各部として動作させることにより上記画像処理システムをコンピュータにて実現させる画像処理システムの制御プログラム、およびそれを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に入る。さらに、本発明の態様に係る画像処理システムは集積回路(ICチップ)として実現してもよく、この場合には、上記集積回路を備えるチップ等も本発明の範疇に入る。   The image processing system (particularly, the image processing unit) according to an aspect of the present invention may be realized by a computer. In this case, the image processing is performed by causing the computer to operate as each unit included in the image processing system. An image processing system control program for realizing the system by a computer and a computer-readable recording medium on which the control program is recorded also fall within the scope of the present invention. Furthermore, the image processing system according to an aspect of the present invention may be realized as an integrated circuit (IC chip). In this case, a chip including the integrated circuit is also included in the scope of the present invention.

本発明によれば、簡易な構成により、グラフィックデバイスが通常備える機能に加え、外部映像機器から画像データを取り込んで画像処理を施す機能をも具備する画像処理システム等を実現することができる。   According to the present invention, it is possible to realize an image processing system or the like having a function of fetching image data from an external video device and performing image processing in addition to a function normally provided in a graphic device with a simple configuration.

本発明の一実施形態に係る画像処理システムの概略構成を示すブロック図である。1 is a block diagram illustrating a schematic configuration of an image processing system according to an embodiment of the present invention. 上記画像処理システムに含まれるFPGAによるDMA転送のタイミングチャートである。It is a timing chart of DMA transfer by FPGA included in the image processing system. 上記画像処理システムに接続されたイメージセンサにより撮像される、1フレーム分の撮像データのスキャン期間を示す概略図である。It is the schematic which shows the scanning period of the imaging data for 1 frame imaged with the image sensor connected to the said image processing system. 上記画像処理システムに含まれるFIFOの容量の変化の一例を説明する説明図である。It is explanatory drawing explaining an example of the change of the capacity | capacitance of FIFO contained in the said image processing system. 上記画像処理システムに含まれる画像処理部による画像処理の処理内容を示すタイミングチャートである。It is a timing chart which shows the processing content of the image processing by the image processing part contained in the above-mentioned image processing system. 上記FPGAが備えるフリップフロップを示す図である。It is a figure which shows the flip-flop with which the said FPGA is provided.

以下、図1〜図6を用いて、本発明の実施の形態について説明する。図1は、本発明の一実施形態に係る画像処理システム1の概略構成を示すブロック図である。なお、以下の図面の記載において、同一または類似の部分には同一または類似の符号を付し、重複する説明を省略する。   Hereinafter, embodiments of the present invention will be described with reference to FIGS. FIG. 1 is a block diagram showing a schematic configuration of an image processing system 1 according to an embodiment of the present invention. In the following description of the drawings, the same or similar parts are denoted by the same or similar reference numerals, and redundant description is omitted.

画像処理システム1は、画像処理部2と、イメージセンサ3(カメラ)により撮像された、静止画または動画である撮像データ(映像データ)を保持するFIFO(First In First Out)4(保持部)と、FIFO4と画像処理部2との間での各種のやり取りを制御するFPGA(Field Programmable Gate Array)5(出力制御部)と、CGROM(Character Generator Read Only Memory)6とを含んでいる。CGROM6は、各種のスプライト、背景、フォント等の表示対象についての圧縮形式または非圧縮形式の画像データやαブレンディングに用いる圧縮形式または非圧縮形式のαブレンド値等が予め記憶されている。図1では、画像処理部2により画像処理が施された画像データを表示する表示装置7も図示している。なお、画像処理部2およびFPGA5は画像処理装置を構成する部材でもある。   The image processing system 1 includes an image processing unit 2 and a FIFO (First In First Out) 4 (holding unit) that holds imaging data (video data) that is a still image or a moving image captured by an image sensor 3 (camera). An FPGA (Field Programmable Gate Array) 5 (output control unit) for controlling various exchanges between the FIFO 4 and the image processing unit 2, and a CGROM (Character Generator Read Only Memory) 6. The CGROM 6 stores in advance compressed or uncompressed image data for a display target such as various sprites, backgrounds, and fonts, a compressed or uncompressed α blend value used for α blending, and the like. In FIG. 1, a display device 7 that displays image data subjected to image processing by the image processing unit 2 is also illustrated. Note that the image processing unit 2 and the FPGA 5 are also members constituting the image processing apparatus.

画像処理部2は、FIFO4から撮像データを読み出し、および/または、CGROM6から画像データを読み出して、表示装置7に表示させる画像データを生成する。画像処理部2は、制御部21と、メモリインタフェース(I/F)22と、画像データバッファ23と、撮像データバッファ24と、描画部25と、出力部26と、映像出力インタフェース(I/F)27と、GPIO(General Purpose Input Output)28と、I2C(Inter Integrated Circuit)29とを含んでいる。   The image processing unit 2 reads image data from the FIFO 4 and / or reads image data from the CGROM 6 to generate image data to be displayed on the display device 7. The image processing unit 2 includes a control unit 21, a memory interface (I / F) 22, an image data buffer 23, an imaging data buffer 24, a drawing unit 25, an output unit 26, and a video output interface (I / F). ) 27, GPIO (General Purpose Input Output) 28, and I2C (Inter Integrated Circuit) 29.

制御部21は、画像処理部2の全体を制御するものである。   The control unit 21 controls the entire image processing unit 2.

メモリI/F22は、メモリバス8(特に、メモリバス8の一部である第1メモリバス8a)を介して、CGROM6に接続されている。メモリI/F22は、第1メモリバス8aを介して、CGROM6から供給される画像データを受け取り、画像データバッファ23に供給する。CGROM6から供給される画像データは、圧縮形式の画像データであれば、図示しない復号化部により復号され、画像データバッファ23に供給される。   The memory I / F 22 is connected to the CGROM 6 via the memory bus 8 (particularly, the first memory bus 8a that is a part of the memory bus 8). The memory I / F 22 receives the image data supplied from the CGROM 6 via the first memory bus 8 a and supplies it to the image data buffer 23. If the image data supplied from the CGROM 6 is compressed image data, it is decoded by a decoding unit (not shown) and supplied to the image data buffer 23.

ここで、メモリI/F22は本来、アドレス信号等の、CGROM6に記憶された画像データへのアクセスに必要な情報や、データ信号等の、画像データの読み込みに必要な情報を、メモリバス8を介して、CGROM6との間において送受信するものである。   Here, the memory I / F 22 originally stores information necessary for accessing the image data stored in the CGROM 6 such as an address signal and information necessary for reading the image data such as a data signal. Via the CGROM 6.

メモリバス8は、グラフフィックチップのNAND型フラッシュ(登録商標)やNOR型フラッシュ等に接続されるメモリバスである。また、メモリバス8は、高速にデータを取り込む仕様を備え、フレームレートが高い高速度カメラも接続可能である。   The memory bus 8 is a memory bus connected to a NAND flash (registered trademark) or a NOR flash of a graphic chip. The memory bus 8 has a specification for capturing data at high speed, and a high-speed camera having a high frame rate can be connected.

本発明者らは、メモリI/F22が、メモリバス8を介して、CGROM6から画像データを取り込むという入力系統に着目し、この入力系統を、イメージセンサ3により撮像された撮像データの取り込みに転用すること、および、CGROM6に記憶された画像データとイメージセンサ3からの撮像データの取り込みとに共用することを鋭意検討し、その結果、本発明を完成させるに至った。   The inventors pay attention to an input system in which the memory I / F 22 captures image data from the CGROM 6 via the memory bus 8 and diverts the input system to capture of image data captured by the image sensor 3. And sharing the image data stored in the CGROM 6 and the captured image data from the image sensor 3, and as a result, the present invention has been completed.

以下、本実施形態では、メモリバス8およびメモリI/F22が、CGROM6からの画像データの取り込みと、イメージセンサ3からの撮像データの取り込みと、に共用された構成について説明する。   In the following, in the present embodiment, a configuration in which the memory bus 8 and the memory I / F 22 are shared for capturing image data from the CGROM 6 and capturing image data from the image sensor 3 will be described.

メモリI/F22はCGROM6に接続されていることに加えて、さらに、メモリバス8(特に、メモリバス8の他の一部である第2メモリバス8b)を介して、FIFO4に接続されている。これにより、メモリI/F22は、第2メモリバス8bを介して、FIFO4に保持されている、イメージセンサ3により撮像された撮像データを受け取り、撮像データバッファ24に供給する。   In addition to being connected to the CGROM 6, the memory I / F 22 is further connected to the FIFO 4 via the memory bus 8 (particularly, the second memory bus 8 b that is another part of the memory bus 8). . As a result, the memory I / F 22 receives the imaging data captured by the image sensor 3 and held in the FIFO 4 via the second memory bus 8b, and supplies it to the imaging data buffer 24.

ここで、上述したとおり、メモリI/F22は本来、CGROM6から画像データを取り込むための情報のやり取りを、読み出し専用のCGROM6との間で実行可能となるように、その回路が構成されたものである。よって、メモリI/F22は、メモリバス8に新たに接続されたFIFO4、およびFIFO4に撮像データを供給するイメージセンサ3との間における各種情報のやり取りを想定した回路構成にはなっていない。   Here, as described above, the memory I / F 22 is originally configured with a circuit so that information exchange for capturing image data from the CGROM 6 can be performed with the read-only CGROM 6. is there. Therefore, the memory I / F 22 does not have a circuit configuration that assumes the exchange of various information between the FIFO 4 newly connected to the memory bus 8 and the image sensor 3 that supplies imaging data to the FIFO 4.

そこで、画像処理システム1では、メモリI/F22が、メモリバス8を介して、FIFO4に保持されている撮像データを取り込み可能とするために、FIFO4とメモリI/F22との間に、FPGA5を設けた。FPGA5は、FIFO4とメモリI/F22との間、さらには、FIFO4と画像処理部2との間における各種のやり取りを制御するものである。メモリI/F22は、FPGA5による各種の情報の送受信により、FIFO4より撮像データを受け取ることが可能となり、さらに、画像処理部2は、受け取った撮像データに画像処理を施し、CGROM6から読み出した画像データと共に、表示装置7に表示させることが可能となる。   Therefore, in the image processing system 1, the FPGA 5 is provided between the FIFO 4 and the memory I / F 22 so that the memory I / F 22 can capture the image data held in the FIFO 4 via the memory bus 8. Provided. The FPGA 5 controls various exchanges between the FIFO 4 and the memory I / F 22 and between the FIFO 4 and the image processing unit 2. The memory I / F 22 can receive imaging data from the FIFO 4 by transmitting and receiving various types of information by the FPGA 5, and the image processing unit 2 performs image processing on the received imaging data and reads the image data read from the CGROM 6. At the same time, it can be displayed on the display device 7.

再び、画像処理部2の説明に戻ると、画像データバッファ23は、メモリI/F22から供給された画像データを記憶する。画像データは、表示装置7のフレーム単位で、画像データバッファ23に書き込まれ、描画のために、描画部25により読み出される。   Returning to the description of the image processing unit 2 again, the image data buffer 23 stores the image data supplied from the memory I / F 22. The image data is written in the image data buffer 23 in units of frames of the display device 7 and read by the drawing unit 25 for drawing.

一方、撮像データバッファ24は、メモリI/F22から供給された撮像データを記憶する。本実施形態では、撮像データバッファ24は、トリプルバッファリングを行うことを想定し、第1バッファ24a(格納部)、第2バッファ24b(格納部)、および第3バッファ24c(格納部)を含む構成としている。第1バッファ24a、第2バッファ24b、および第3バッファ24cは、所定の順序(例えば、第1バッファ24a→第2バッファ24b→第3バッファ24c→第1バッファ24a→・・・)で、イメージセンサ3のフレーム単位で、FIFO4から撮像データが書き込まれ、上述の所定の順序で、描画のために、描画部25により撮像データが読み出される。   On the other hand, the imaging data buffer 24 stores imaging data supplied from the memory I / F 22. In the present embodiment, the imaging data buffer 24 is assumed to perform triple buffering, and includes a first buffer 24a (storage unit), a second buffer 24b (storage unit), and a third buffer 24c (storage unit). It is configured. The first buffer 24a, the second buffer 24b, and the third buffer 24c are arranged in a predetermined order (for example, first buffer 24a → second buffer 24b → third buffer 24c → first buffer 24a →...) Imaging data is written from the FIFO 4 in units of frames of the sensor 3, and the imaging data is read out by the drawing unit 25 for drawing in the above-described predetermined order.

例えば、第1バッファ24a→第2バッファ24b→第3バッファ24c→第1バッファ24a→・・・の順序で、イメージセンサ3のフレーム単位で、FIFO4から撮像データが書き込まれる場合、第1バッファ24aに撮像データが書き込まれる段階において、第2バッファ24bに書き込み済みの1つ前のフレームの撮像データに対して描画部25による画像処理が施され、また、第3バッファ24cに書き込み済みの2つ前のフレームの撮像データが出力部26に出力される。   For example, when imaging data is written from the FIFO 4 in units of frames of the image sensor 3 in the order of the first buffer 24a → second buffer 24b → third buffer 24c → first buffer 24a →. At the stage where the imaging data is written in, the image processing by the drawing unit 25 is performed on the imaging data of the previous frame written in the second buffer 24b, and the two already written in the third buffer 24c. The imaging data of the previous frame is output to the output unit 26.

本実施形態では、撮像データバッファ24はトリプルバッファリングを行うものとしたが、撮像データバッファ24が備えるバッファの個数は限定されるものではなく、2つであっても、または、4つ以上であってもよい。   In this embodiment, the imaging data buffer 24 performs triple buffering. However, the number of buffers included in the imaging data buffer 24 is not limited, and may be two or four or more. There may be.

描画部25は、画像データバッファ23から画像データを1フレーム分ずつ読み出し、読み出した画像データに対し、拡縮・変形、カラー処理等の画像処理を施した描画データを生成する。描画部25は、生成した描画データを出力部26に出力する。また、描画部25は、撮像データバッファ24から撮像データを1フレーム分ずつ読み出し、読み出した撮像データに対し、上述の画像処理を施した描画データを生成し、出力部26に出力する。   The drawing unit 25 reads image data from the image data buffer 23 frame by frame, and generates drawing data obtained by performing image processing such as enlargement / reduction, deformation, and color processing on the read image data. The drawing unit 25 outputs the generated drawing data to the output unit 26. In addition, the drawing unit 25 reads the imaging data for each frame from the imaging data buffer 24, generates drawing data obtained by performing the above-described image processing on the read imaging data, and outputs the drawing data to the output unit 26.

出力部26は、映像出力I/F27を介して、描画部25から入力された描画データを表示装置7へ供給し、表示装置7に表示させる。出力部26は、描画データを書き込み可能なフレームバッファを有している。フレームバッファは、ダブルバッファリングを行うものであり、2つのバッファは、交互にフレーム単位で、一方が描画のために描画データが書き込まれ、他方が表示のために描画データが読み出される。映像出力I/F27は、描画データをデジタルRGBとして出力する。   The output unit 26 supplies the drawing data input from the drawing unit 25 to the display device 7 via the video output I / F 27 and causes the display device 7 to display the drawing data. The output unit 26 has a frame buffer in which drawing data can be written. The frame buffer performs double buffering, and the two buffers are alternately written in units of frames, one of which draws drawing data for drawing and the other reads drawing data for display. The video output I / F 27 outputs the drawing data as digital RGB.

GPIO28およびI2C29は、画像処理部2が外部機器(本実施形態では、FPGA5およびイメージセンサ3)と接続するための入出力用のインタフェースである。画像処理部2(特に、制御部21)とFPGA5とは、GPIO28を介して接続されており、各種情報のやり取りが可能となっている。また、画像処理部2(特に、制御部21)とイメージセンサ3とは、I2C29に接続されたSCCB(Serial Camera Control Bus)を介して、各種情報のやり取りが可能である。例えば、制御部21は、イメージセンサ3に設けられているレジスタに対して表示空間や解像度など各種設定を行う。   The GPIO 28 and the I2C 29 are input / output interfaces for connecting the image processing unit 2 to external devices (in this embodiment, the FPGA 5 and the image sensor 3). The image processing unit 2 (in particular, the control unit 21) and the FPGA 5 are connected via the GPIO 28, and various information can be exchanged. In addition, the image processing unit 2 (particularly, the control unit 21) and the image sensor 3 can exchange various kinds of information via an SCCB (Serial Camera Control Bus) connected to the I2C 29. For example, the control unit 21 performs various settings such as a display space and a resolution for a register provided in the image sensor 3.

FIFO4は、イメージセンサ3により撮像された撮像データを保持する。FIFO4は、メモリバス8(特に、第2メモリバス8b)に接続されている。FIFO4に保持された撮像データは、メモリバス8を介して、メモリI/F22に供給される。FIFO4は、イメージセンサ3から送られてくる撮像データを保持し、送られてきた順序で、保持する撮像データをメモリI/F22に出力する、先入れ先出しのメモリである。すなわち、FIFO4は、撮像データの一時記憶に用いられ、高速アクセス可能であり、アドレス設定が不要な先入れ先出し方式の読み書き可能なメモリである。   The FIFO 4 holds image data captured by the image sensor 3. The FIFO 4 is connected to the memory bus 8 (particularly, the second memory bus 8b). The imaging data held in the FIFO 4 is supplied to the memory I / F 22 via the memory bus 8. The FIFO 4 is a first-in first-out memory that holds imaging data sent from the image sensor 3 and outputs the held imaging data to the memory I / F 22 in the order of sending. That is, the FIFO 4 is a first-in first-out read / write memory that is used for temporary storage of imaging data, can be accessed at high speed, and does not require address setting.

FPGA5は、イメージセンサ3、FIFO4、メモリI/F22、およびGPIO28に接続されている。FPGA5は、イメージセンサ3およびFIFO4と、画像処理部2との間における送受信の仲介を行うものである。FPGA5は、イメージセンサ3およびFIFO4と、画像処理部2(特に、メモリI/F22)との間における送受信の方法等について、ユーザが容易に設定可能である。   The FPGA 5 is connected to the image sensor 3, the FIFO 4, the memory I / F 22, and the GPIO 28. The FPGA 5 mediates transmission / reception between the image sensor 3 and the FIFO 4 and the image processing unit 2. The FPGA 5 can be easily set by the user for a method of transmission / reception between the image sensor 3 and the FIFO 4 and the image processing unit 2 (particularly, the memory I / F 22).

具体的には、FPGA5は、画像処理部2からの指示に従って、FIFO4からメモリI/F22への撮像データの直接転送(すなわち、DMA(Direct Memory Access)転送)をFIFO4に指示する。以下、図2を用いて、上述のDMA転送について、説明する。   Specifically, the FPGA 5 instructs the FIFO 4 to directly transfer the imaging data from the FIFO 4 to the memory I / F 22 (that is, DMA (Direct Memory Access) transfer) in accordance with the instruction from the image processing unit 2. Hereinafter, the above-described DMA transfer will be described with reference to FIG.

図2は、FPGA5によるDMA転送のタイミングチャートである。図2では、イメージセンサ3が毎秒30枚の撮像画像を出力するものを例としており、このため、イメージセンサ3の垂直同期信号(以下では「VSYNC」と表記する)の立ち下がりエッジ期間または立ち上がりエッジ期間(例えば、時刻t2から時刻t7までの期間)は、約1/30秒(33ms)である。また、イメージセンサ3への入力クロック周波数は25MHzとしている(VGA解像度)。なお、以下では、VSYNCの立ち下がりエッジを基準とし、VSYNCの立ち下がりエッジ期間(例えば、時刻t1から時刻t5までの期間)において、1枚(1フレーム)分の撮像データがイメージセンサ3からFIFO4へ出力されるものとする。   FIG. 2 is a timing chart of DMA transfer by the FPGA 5. FIG. 2 shows an example in which the image sensor 3 outputs 30 captured images per second. For this reason, a falling edge period or a rising edge of a vertical synchronization signal (hereinafter, referred to as “VSYNC”) of the image sensor 3. The edge period (for example, the period from time t2 to time t7) is about 1/30 second (33 ms). The input clock frequency to the image sensor 3 is 25 MHz (VGA resolution). In the following, with respect to the falling edge of VSYNC, in one falling edge period of VSYNC (for example, a period from time t1 to time t5), one frame (one frame) of imaging data is transferred from the image sensor 3 to the FIFO4. To be output.

時刻t2において、VSYNCが立ち上がると、イメージセンサ3により撮像された撮像データの、FIFO4への出力を開始する。一方、FIFO4からメモリI/F22への撮像データのDMA転送は時刻t4になるまで待機されている。このため、時刻t2から時刻t4までの期間においては、イメージセンサ3からFIFO4へ出力された撮像データは、FIFO4に蓄積されることになる。   When VSYNC rises at time t2, output of image data captured by the image sensor 3 to the FIFO 4 is started. On the other hand, the DMA transfer of the imaging data from the FIFO 4 to the memory I / F 22 is on standby until time t4. Therefore, during the period from time t2 to time t4, the imaging data output from the image sensor 3 to the FIFO 4 is accumulated in the FIFO 4.

また、時刻t1において、FPGA5は、VSYNCが立ち下がると、その立ち下がりエッジに同期して、VSHを立ち上げる。VSHは、VSYNCの立ち上がりまたは立ち下がりを画像処理部2に通知するために、FPGA5が生成し、画像処理部2に出力するものである。   At time t1, when VSYNC falls, the FPGA 5 raises VSH in synchronization with the falling edge. VSH is generated by the FPGA 5 and output to the image processing unit 2 in order to notify the image processing unit 2 of the rise or fall of VSYNC.

時刻t1からt4までの期間(以下では「待機期間W」と表記する)はDMA転送を開始せずに待機し、時刻t4になるとDMA転送を開始する。待機期間W(ここでは、8msとした)は、例えば、画像処理部2が備えるタイマにて計測する。制御部21は、HレベルのVSHを検知することにより、上述のタイマによる計測を開始し、待機期間Wが経過する(すなわち時刻t4になる)と、FPGA5にDMA転送の開始を指示する。その後の撮像データの転送は、FPGA5が制御する、FIFO4−メモリI/F22間の直接通信によって実行される。なお、待機期間Wの計測は、FPGA5が備えるカウンタを用いて行ってもよい。   During the period from time t1 to t4 (hereinafter referred to as “waiting period W”), the DMA transfer is waited for without starting, and the DMA transfer is started at time t4. The standby period W (here, 8 ms) is measured by a timer provided in the image processing unit 2, for example. The control unit 21 starts the measurement by the above-described timer by detecting the HSH at the H level, and instructs the FPGA 5 to start DMA transfer when the standby period W elapses (that is, at time t4). The subsequent transfer of the imaging data is executed by direct communication between the FIFO 4 and the memory I / F 22 controlled by the FPGA 5. Note that the measurement of the waiting period W may be performed using a counter provided in the FPGA 5.

時刻t4から時刻t6までの期間においては、イメージセンサ3により撮像された撮像データがFIFO4に出力されつつ、FIFO4からメモリI/F22へ撮像データが出力される。上述したとおり、FIFO4は先入れ先出し方式であるから、時刻t4から時刻t6までの期間では、イメージセンサ3から入力された順序で、FIFO4から撮像データが出力されることになる。   In the period from time t4 to time t6, the image data captured by the image sensor 3 is output to the FIFO 4, and the image data is output from the FIFO 4 to the memory I / F 22. As described above, since the FIFO 4 is a first-in first-out method, imaging data is output from the FIFO 4 in the order input from the image sensor 3 during the period from time t4 to time t6.

時刻t5においてイメージセンサ3からFIFO4への撮像データの出力が終了した後、時刻t6においてFIFO4が空(下限値)になる、つまり、1フレーム分の撮像データがFIFO4からメモリI/F22へ出力され次第、DMA転送が終了する。   After the output of imaging data from the image sensor 3 to the FIFO 4 is completed at time t5, the FIFO 4 becomes empty (lower limit) at time t6. That is, one frame of imaging data is output from the FIFO 4 to the memory I / F 22. The DMA transfer is finished as soon as possible.

このようにして、FIFO4からメモリI/F22へ出力された、1フレーム分の撮像データは、メモリI/F22により、撮像データバッファ24(ここでは、第1バッファ24a)に書き込まれる。   In this way, the imaging data for one frame output from the FIFO 4 to the memory I / F 22 is written into the imaging data buffer 24 (here, the first buffer 24a) by the memory I / F 22.

なお、時刻t7においては、次フレーム分の撮像データのFIFO4への出力が開始され、その後は、上述と同様の処理が行われ、第2バッファ24bへ撮像データが書き込まれる。   At time t7, output of imaging data for the next frame to the FIFO 4 is started, and thereafter, processing similar to that described above is performed, and imaging data is written to the second buffer 24b.

ここで、待機期間Wの算出方法について説明する。図3は、イメージセンサ3により撮像される、1フレーム分の撮像データのスキャン期間を示す概略図である。図3に示すように、1フレームあたりのスキャン期間(水平スキャン期間×垂直スキャン期間)には、撮像データが有効となる領域(水平有効画素数×垂直有効画素数)をスキャンする有効期間と、実際には撮像データが出力されない無効期間と、が存在する。   Here, a method for calculating the standby period W will be described. FIG. 3 is a schematic diagram illustrating a scan period of image data for one frame imaged by the image sensor 3. As shown in FIG. 3, in a scan period per frame (horizontal scan period × vertical scan period), an effective period for scanning an area in which imaging data is valid (horizontal effective pixel number × vertical effective pixel number); There is actually an invalid period during which imaging data is not output.

仮に、イメージセンサ3からFIFO4への撮像データの入力の速度と、FIFO4からメモリI/F22への出力の速度とが、ほぼ等しければ、上述の無効期間をそのまま待機期間Wとすることにより、イメージセンサ3からFIFO4への1フレーム分の撮像データの入力が終了する時点において、FIFO4からメモリI/F22への1フレーム分の撮像データの出力が終了することになる。   If the input speed of the imaging data from the image sensor 3 to the FIFO 4 and the output speed from the FIFO 4 to the memory I / F 22 are substantially equal, the invalid period is set as the standby period W as it is. When the input of the imaging data for one frame from the sensor 3 to the FIFO 4 ends, the output of the imaging data for one frame from the FIFO 4 to the memory I / F 22 ends.

一方、仮に、FIFO4からメモリI/F22への出力のデータ速度が、イメージセンサ3からFIFO4への入力のデータ速度より速い場合は、イメージセンサ3からFIFO4への1フレーム分の撮像データの入力が終了する以前に、一旦、FIFO4が空になってしまうことが起こり得る。このような場合には、FIFO4からメモリI/F22への出力のデータ速度と、イメージセンサ3からFIFO4への入力のデータ速度との差に応じて、上述の無効期間に適切なマージン期間を加えて調整したものを待機期間Wとしてもよい。   On the other hand, if the data rate of output from the FIFO 4 to the memory I / F 22 is faster than the data rate of input from the image sensor 3 to the FIFO 4, input of imaging data for one frame from the image sensor 3 to the FIFO 4 is performed. It is possible for the FIFO 4 to become empty before it is finished. In such a case, an appropriate margin period is added to the above-described invalid period according to the difference between the data speed of the output from the FIFO 4 to the memory I / F 22 and the data speed of the input from the image sensor 3 to the FIFO 4. The waiting period W may be adjusted as described above.

もちろん、イメージセンサ3からFIFO4への入力のデータ速度、FIFO4の容量、およびFIFO4からメモリI/F22への出力のデータ速度はそれぞれ調整可能であるから、これらを適切に調整することにより、FIFO4の容量が下限値を下回ること(アンダーフロー)、およびFIFO4の容量が上限値を越えること(オーバーフロー)を防止することができる。   Of course, the data rate of input from the image sensor 3 to the FIFO 4, the capacity of the FIFO 4, and the data rate of output from the FIFO 4 to the memory I / F 22 can be adjusted, respectively. It is possible to prevent the capacity from falling below the lower limit (underflow) and the capacity of the FIFO 4 from exceeding the upper limit (overflow).

以下、具体的な数値を用いて、待機期間W(8ms)の算出例について説明する。図3に示したスキャン期間において、垂直スキャン数を510、水平スキャン数を784、垂直有効画素を480、水平有効画素を640とする。なお、上述したとおり、1フレーム期間は33msである。   Hereinafter, an example of calculating the standby period W (8 ms) will be described using specific numerical values. In the scan period shown in FIG. 3, the number of vertical scans is 510, the number of horizontal scans is 784, the vertical effective pixels are 480, and the horizontal effective pixels are 640. As described above, one frame period is 33 ms.

(1)スキャン期間と有効期間との比率を算出する。   (1) The ratio between the scanning period and the effective period is calculated.

(480×640)÷(510×784)=0.7683
(2)1フレーム期間に対する有効期間を算出する。
33×0.7683=25.39[ms]
(3)1フレーム期間から、上記(2)で算出した有効期間を減算し、無効期間を算出する。
33−25.39=7.61[ms]
(4)上記(3)で算出した無効期間に上述したマージン期間を加算し、待機期間Wを決定する。
7.61+0.39=8.00[ms]
なお、マージン期間は、イメージセンサ3からFIFO4への入力開始時点から、上述の有効期間における撮像データの出力開始時点の範囲内に設定する必要がある。この範囲を超えるマージン期間を設定した場合、次のフレーム分の撮像データの入力開始時点において、FIFO4から先のフレーム分の撮像データの一部が残存し、先のフレーム分の撮像データの出力が未完了となってしまうおそれがあるからである。
(480 × 640) ÷ (510 × 784) = 0.6833
(2) The effective period for one frame period is calculated.
33 × 0.7683 = 25.39 [ms]
(3) The invalid period is calculated by subtracting the valid period calculated in (2) from one frame period.
33-25.39 = 7.61 [ms]
(4) The waiting period W is determined by adding the above-described margin period to the invalid period calculated in (3) above.
7.61 + 0.39 = 0.00 [ms]
Note that the margin period needs to be set within the range from the input start time to the FIFO 4 from the image sensor 3 to the output start time of imaging data in the above-described effective period. When a margin period exceeding this range is set, at the start of input of imaging data for the next frame, a part of the imaging data for the previous frame remains from the FIFO 4 and the imaging data for the previous frame is output. This is because there is a risk of being incomplete.

次に、図4を用いて、DMA転送の終了について説明する。図4は、DMA転送が行われているときのFIFO4の容量の変化の一例を説明する説明図である。なお、図4に示された「上限値」は、FIFO4の容量の上限値を意味するものである。ここでは、FIFO4からメモリI/F22への出力のデータ速度が、イメージセンサ3からFIFO4への入力のデータ速度より速い場合を例として説明する。   Next, the end of the DMA transfer will be described with reference to FIG. FIG. 4 is an explanatory diagram illustrating an example of a change in the capacity of the FIFO 4 when DMA transfer is performed. The “upper limit value” shown in FIG. 4 means the upper limit value of the capacity of the FIFO 4. Here, a case where the data rate of output from the FIFO 4 to the memory I / F 22 is faster than the data rate of input from the image sensor 3 to the FIFO 4 will be described as an example.

図4に示すように、イメージセンサ3のVSYNCが立ち上がると、イメージセンサ3からFIFO4への撮像データの入力が開始する。ただし、実際には、イメージセンサ3の仕様に起因する遅延期間(図4中、Aで示す期間)経過後、その出力が開始する(ここでは、時刻T2において、出力が開始する)。   As shown in FIG. 4, when VSYNC of the image sensor 3 rises, input of imaging data from the image sensor 3 to the FIFO 4 starts. However, actually, the output starts after a delay period (a period indicated by A in FIG. 4) due to the specification of the image sensor 3 has elapsed (here, the output starts at time T2).

イメージセンサ3からFIFO4への撮像データの入力と共に、FIFO4に蓄積される撮像データのデータ量(以下では、「FIFO容量」と表記する。)は上昇する。この上昇は、時刻T3になるまで(つまり待機期間Wが経過するまで)、継続することになる。   Along with the input of imaging data from the image sensor 3 to the FIFO 4, the amount of imaging data stored in the FIFO 4 (hereinafter referred to as “FIFO capacity”) increases. This increase continues until time T3 (that is, until the standby period W elapses).

時刻T3において、FIFO4からメモリI/F22への出力が開始すると、それに伴い、FIFO容量は下降する。FIFO4からメモリI/F22への出力のデータ速度が、イメージセンサ3からFIFO4への入力のデータ速度よりも速いからである。この下降は、時刻T4においてイメージセンサ3からFIFO4への入力が終了する、つまり、1フレーム分の撮像データの入力が終了するまで、継続することになる。   At time T3, when output from the FIFO 4 to the memory I / F 22 starts, the FIFO capacity decreases accordingly. This is because the data rate of output from the FIFO 4 to the memory I / F 22 is faster than the data rate of input from the image sensor 3 to the FIFO 4. This descent continues until the input from the image sensor 3 to the FIFO 4 ends at time T4, that is, until the input of imaging data for one frame is completed.

そして、時刻T4において、イメージセンサ3からFIFO4への入力が終了すると、FIFO4からメモリI/F22への出力のみが行われる結果、FIFO容量の下降速度は増し、時刻T5において、FIFO容量は空となる。つまり、FIFO4からメモリI/F22への出力が完了したことになる。   When the input from the image sensor 3 to the FIFO 4 is completed at time T4, only the output from the FIFO 4 to the memory I / F 22 is performed. As a result, the rate of decrease of the FIFO capacity increases, and at time T5, the FIFO capacity is empty. Become. That is, the output from the FIFO 4 to the memory I / F 22 is completed.

ここで、DMA転送を開始させるためには、上述したとおり、画像処理部2からFPGA5を介してFIFO4へ指示を必要とするのに対し、DMA転送を終了させるための指示は不要である点が特筆すべき事柄である。なぜなら、待機時間Wを適切に設けたことにより、イメージセンサ3からFIFO4への撮像データの入力が開始した後は、FIFO4からメモリI/F22へ1フレーム分の撮像データの出力が完了した後(つまり、時刻T5より後)になって初めてFIFO容量が空になり、その時点で自動的にDMA転送が終了するからである。   Here, in order to start the DMA transfer, as described above, an instruction from the image processing unit 2 to the FIFO 4 via the FPGA 5 is required, whereas an instruction for ending the DMA transfer is unnecessary. It should be noted. This is because, after the standby time W is appropriately provided, after the input of the imaging data from the image sensor 3 to the FIFO 4 is started, the output of the imaging data for one frame from the FIFO 4 to the memory I / F 22 is completed ( That is, the FIFO capacity becomes empty only after the time T5), and the DMA transfer automatically ends at that time.

また、FIFO容量が最大となる時点は、FIFO4からメモリI/F22への出力開始時点(時刻T3)である。そこで、この出力開始時点において、FIFO4に蓄積されているデータ量を予め想定し、そのデータ量を超える上限値を持つFIFOメモリをFIFO4に用いることにより、DMA転送時において、FIFO容量がFIFO4の上限値を超えることがない。したがって、DMA転送時におけるFIFO4のFIFO容量を監視する必要がなく、FIFO容量を監視するための構成が不要となる点についても注目すべきである。   Further, the time when the FIFO capacity becomes maximum is the time when output from the FIFO 4 to the memory I / F 22 is started (time T3). Therefore, assuming the amount of data stored in the FIFO 4 at the start of output, and using a FIFO memory having an upper limit value exceeding the data amount for the FIFO 4, the FIFO capacity is limited to the upper limit of the FIFO 4 during DMA transfer. The value is never exceeded. Therefore, it should be noted that it is not necessary to monitor the FIFO capacity of the FIFO 4 at the time of DMA transfer, and a configuration for monitoring the FIFO capacity becomes unnecessary.

図4に示した例は、FIFO4からメモリI/F22への出力のデータ速度が、イメージセンサ3からFIFO4への入力のデータ速度より速い場合におけるFIFO4の容量変化の一例である。しかしながら、FIFO4からメモリI/F22への出力のデータ速度が、イメージセンサ3からFIFO4への入力のデータ速度と同じまたはそれより遅い場合であっても、イメージセンサ3からFIFO4への入力のデータ速度、FIFO4の容量、およびFIFO4からメモリI/F22への出力のデータ速度をそれぞれ調整することにより、FIFO4のアンダーフローおよびオーバーフローを防止することができることは言うまでもない。   The example shown in FIG. 4 is an example of a change in the capacity of the FIFO 4 when the data rate of output from the FIFO 4 to the memory I / F 22 is faster than the data rate of input from the image sensor 3 to the FIFO 4. However, even when the data rate of the output from the FIFO 4 to the memory I / F 22 is the same as or slower than the data rate of the input from the image sensor 3 to the FIFO 4, the data rate of the input from the image sensor 3 to the FIFO 4 Needless to say, the FIFO 4 underflow and overflow can be prevented by adjusting the capacity of the FIFO 4 and the data rate of the output from the FIFO 4 to the memory I / F 22, respectively.

なお、FIFO4からメモリI/F22への出力のデータ速度が、イメージセンサ3からFIFO4への入力のデータ速度と同じまたはそれより遅い場合、イメージセンサ3からFIFO4への入力が終了するまでFIFO容量は上昇するかまたは略一定である。このため、図4に示す時刻T4において、FIFO容量がFIFO4の上限値未満となるように調整すればよい。   When the data rate of output from the FIFO 4 to the memory I / F 22 is the same as or slower than the data rate of input from the image sensor 3 to the FIFO 4, the FIFO capacity is determined until the input from the image sensor 3 to the FIFO 4 is completed. It rises or is almost constant. For this reason, it is only necessary to adjust the FIFO capacity to be less than the upper limit value of the FIFO 4 at time T4 shown in FIG.

このように、撮像データの1フレーム分をイメージセンサ3からFIFO4に入力中においては、FIFO4の容量が上限値未満かつ下限値より大きい状態を保つことになる。   As described above, when one frame of the imaging data is being input from the image sensor 3 to the FIFO 4, the capacity of the FIFO 4 is kept below the upper limit value and larger than the lower limit value.

最後に、画像処理部2による画像処理について、簡単に説明する。図5は、画像処理部2が、画像データバッファ23に書き込まれた画像データ、および撮像データバッファ24に書き込まれた撮像データに対して施す画像処理の処理内容を示すタイミングチャートである。なお、図5では、画像処理部2が毎秒60枚の描画データを表示装置7に出力するものを例としており、このため、画像処理部2の垂直帰線消去期間信号(以下では「VBLANK」と表記する)の立ち下がりエッジ期間または立ち上がりエッジ期間(例えば、時刻t101から時刻t102までの期間)は、約1/60秒(16ms)である。なお、以下では、VBLANKの立ち下がりエッジを基準とし、VBLANKの立ち下がりエッジ期間において、1枚(1フレーム)分の描画データが画像処理部2から表示装置7へ出力されるものとする。   Finally, image processing by the image processing unit 2 will be briefly described. FIG. 5 is a timing chart showing the processing contents of image processing performed by the image processing unit 2 on the image data written in the image data buffer 23 and the imaging data written in the imaging data buffer 24. 5 shows an example in which the image processing unit 2 outputs 60 drawing data per second to the display device 7. For this reason, the vertical blanking period signal (hereinafter, “VBLANK”) of the image processing unit 2 is used. The falling edge period or the rising edge period (for example, the period from time t101 to time t102) is approximately 1/60 second (16 ms). In the following, it is assumed that drawing data for one sheet (one frame) is output from the image processing unit 2 to the display device 7 during the falling edge period of VBLANK with reference to the falling edge of VBLANK.

時刻t101において、VBLANKが立ち下がると、出力部26の表示用のフレームバッファがクリアされる(S11)。撮像データバッファ24に書き込まれた撮像データに対しては、ARGB形式への変換を施し(S12)、画像データバッファ23に書き込まれた画像データ、および撮像データバッファ24に書き込まれた撮像データに対し、表示装置7の表示画面上における表示位置を示すアドレスデータを生成することにより、アドレス変換が施される(S13)。そして、画像データバッファ23に書き込まれた画像データ、および撮像データバッファ24に書き込まれた撮像データに対し、エッジ強調などのフィルタ処理を行う(S14)。   When VBLANK falls at time t101, the display frame buffer of the output unit 26 is cleared (S11). The imaging data written in the imaging data buffer 24 is converted into ARGB format (S12), and the image data written in the image data buffer 23 and the imaging data written in the imaging data buffer 24 are processed. Then, address conversion is performed by generating address data indicating a display position on the display screen of the display device 7 (S13). Then, filter processing such as edge enhancement is performed on the image data written in the image data buffer 23 and the imaging data written in the imaging data buffer 24 (S14).

ここで、画像処理部2の制御部21は、ステップS11〜14の処理完了時点の各々において、FPGA5から出力されるVSHのレベルを確認し(C11〜C14)、HレベルのVSHを検知したら、FPGA5に対し、VSHをLレベルに戻すように指示する。なお、ステップS14の処理完了後は、HレベルのVSHが検知できるまで、VSHのHレベルをポーリングする(C14)。   Here, the control unit 21 of the image processing unit 2 confirms the level of VSH output from the FPGA 5 at each of the processing completion points in steps S11 to S14 (C11 to C14). Instructs the FPGA 5 to return the VSH to the L level. Note that after the processing in step S14 is completed, the H level of the VSH is polled until the H level VSH can be detected (C14).

上述したように、VSHは、イメージセンサ3のVSYNCの立ち上がりまたは立ち下がりを画像処理部2に通知するために、FPGA5が生成し、画像処理部2に出力するものである。このようにする理由は、画像処理部2がイメージセンサ3からVSYNCを直接受け取る仕組みがないためであり、FPGA5は、VSYNCの代替としてVSHを画像処理部2に出力するのである。   As described above, the VSH is generated by the FPGA 5 and output to the image processing unit 2 in order to notify the image processing unit 2 of the rise or fall of VSYNC of the image sensor 3. The reason for this is that the image processing unit 2 does not have a mechanism for directly receiving VSYNC from the image sensor 3, and the FPGA 5 outputs VSH to the image processing unit 2 as an alternative to VSYNC.

なお、VSHを生成する構成は、例えば、図6に示すフリップフロップで実現することができる。入力端子Sにイメージセンサ3のVSYNCを入力し、入力端子Rに、VSHのHレベル検知に基づく、制御部21からの指示(ここでは、Hレベルの信号)を入力する。図6の例では、VSYNCの立ち上がりにより、入力端子SにHがセットされると、出力端子QにHがセットされ、入力端子RにHがセットされるまで、出力端子QはHを維持することになる。   In addition, the structure which produces | generates VSH is realizable with the flip-flop shown in FIG. 6, for example. The VSYNC of the image sensor 3 is input to the input terminal S, and an instruction (here, an H level signal) from the control unit 21 based on the VSH H level detection is input to the input terminal R. In the example of FIG. 6, when H is set to the input terminal S due to the rise of VSYNC, H is set to the output terminal Q, and the output terminal Q maintains H until H is set to the input terminal R. It will be.

再び、図5に戻り、画像処理部2による画像処理について説明する。   Returning to FIG. 5 again, the image processing by the image processing unit 2 will be described.

時刻t101から時刻t103までの期間において、描画部25により、上述のステップS11〜S14の画像処理が施された描画データが、出力部26に出力される。出力部26は、上述したとおり、ダブルバッファリングを行うものである。時刻t101から時刻t103までの期間において上述の画像処理が施された描画データは、2つのバッファの一方に書き込まれることになる。   In the period from time t101 to time t103, the drawing unit 25 outputs the drawing data on which the image processing of steps S11 to S14 described above has been performed to the output unit 26. The output unit 26 performs double buffering as described above. In the period from time t101 to time t103, the drawing data subjected to the above-described image processing is written in one of the two buffers.

ただし、イメージセンサ3のVSYNCの立ち下がりエッジ期間または立ち上がりエッジ期間は約1/30秒(33ms)である一方、画像処理部2のVBLANKの立ち下がりエッジ期間または立ち上がりエッジ期間は約1/60秒(16ms)である。つまり、画像処理部2が1フレーム分を描画するために要する期間は、イメージセンサ3が1フレーム分を撮像するために要する期間のほぼ半分となる。   However, the falling edge period or rising edge period of VSYNC of the image sensor 3 is about 1/30 second (33 ms), while the falling edge period or rising edge period of VBLANK of the image processing unit 2 is about 1/60 second. (16 ms). That is, the period required for the image processing unit 2 to draw one frame is approximately half of the period required for the image sensor 3 to capture one frame.

このため、画像処理部2では、表示装置7のVBLANKが2回検知されたことを条件とし、描画データが書き込まれるバッファと描画データが読み出されるバッファとの切り替えを行っている。   For this reason, the image processing unit 2 switches between a buffer in which drawing data is written and a buffer in which drawing data is read out on condition that VBLANK of the display device 7 is detected twice.

例えば、時刻t102において1回目のVBLANKが検知され、時刻t103において2回目のVBLANKが検知されると、もう一方のバッファに時刻t103から時刻t105までの期間において画像処理が施された描画データが書き込まれることになる。また、時刻t101から時刻t103までの期間において画像処理が施された描画データが書き込まれたバッファが読み出され、読み出された描画データが表示装置7に表示される。ただし、時刻t101から時刻t102までの期間および時刻t102から時刻t103までの期間の各々においては、同一のバッファから読み出された同一の描画データ(ここでは、時刻t101から時刻t103までの期間において画像処理が施された描画データ)が表示されることになる。   For example, when the first VBLANK is detected at time t102 and the second VBLANK is detected at time t103, drawing data subjected to image processing in the period from time t103 to time t105 is written in the other buffer. Will be. Further, the buffer in which the drawing data subjected to the image processing is written in the period from the time t101 to the time t103 is read, and the read drawing data is displayed on the display device 7. However, in each of the period from time t101 to time t102 and the period from time t102 to time t103, the same drawing data read from the same buffer (here, the image in the period from time t101 to time t103) The processed drawing data) is displayed.

画像処理システム1(特に、画像処理部2)は、集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェアによって実現してもよい。   The image processing system 1 (particularly the image processing unit 2) may be realized by a logic circuit (hardware) formed in an integrated circuit (IC chip) or the like, or by software using a CPU (Central Processing Unit). It may be realized.

後者の場合、画像処理システム1は、各機能を実現するソフトウェアであるプログラムの命令を実行するCPU、上記プログラムおよび各種データがコンピュータ(またはCPU)で読み取り可能に記録されたROM(Read Only Memory)または記憶装置(これらを「記録媒体」と称する)、上記プログラムを展開するRAM(Random Access Memory)などを備えている。そして、コンピュータ(またはCPU)が上記プログラムを上記記録媒体から読み取って実行することにより、本発明の目的が達成される。上記記録媒体としては、「一時的でない有形の媒体」、例えば、テープ、ディスク、カード、半導体メモリ、プログラマブルな論理回路などを用いることができる。また、上記プログラムは、該プログラムを伝送可能な任意の伝送媒体(通信ネットワークや放送波等)を介して上記コンピュータに供給されてもよい。なお、本発明は、上記プログラムが電子的な伝送によって具現化された、搬送波に埋め込まれたデータ信号の形態でも実現され得る。   In the latter case, the image processing system 1 includes a CPU that executes instructions of a program that is software that implements each function, and a ROM (Read Only Memory) in which the program and various data are recorded so as to be readable by a computer (or CPU). Alternatively, a storage device (these are referred to as “recording media”), a RAM (Random Access Memory) that expands the program, and the like are provided. And the objective of this invention is achieved when a computer (or CPU) reads the said program from the said recording medium and runs it. As the recording medium, a “non-temporary tangible medium” such as a tape, a disk, a card, a semiconductor memory, a programmable logic circuit, or the like can be used. The program may be supplied to the computer via an arbitrary transmission medium (such as a communication network or a broadcast wave) that can transmit the program. The present invention can also be realized in the form of a data signal embedded in a carrier wave in which the program is embodied by electronic transmission.

本発明は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、実施形態に開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。   The present invention is not limited to the above-described embodiment, and various modifications are possible within the scope shown in the claims, and the present invention is also applied to an embodiment obtained by appropriately combining technical means disclosed in the embodiment. It is included in the technical scope of the invention.

また、本発明は、FA機器、自動車、画像センサ、遊技機などに好適である。   Further, the present invention is suitable for FA devices, automobiles, image sensors, game machines and the like.

1 画像処理システム、2 画像処理部、3 イメージセンサ(カメラ)、4 FIFO(保持部)、5 FPGA(出力制御部)、6 CGROM(メモリ)、7 表示装置、8 メモリバス、8a 第1メモリバス、8b 第2メモリバス、22 メモリI/F、23 画像データバッファ、24 撮像データバッファ、24a 第1バッファ(格納部)、24b 第2バッファ(格納部)、24c 第3バッファ(格納部)、25 描画部、26 出力部、27 映像出力I/F、28 GPIO、29 I2C   DESCRIPTION OF SYMBOLS 1 Image processing system, 2 Image processing part, 3 Image sensor (camera), 4 FIFO (holding part), 5 FPGA (output control part), 6 CGROM (memory), 7 Display apparatus, 8 Memory bus, 8a 1st memory Bus, 8b Second memory bus, 22 Memory I / F, 23 Image data buffer, 24 Imaging data buffer, 24a First buffer (storage unit), 24b Second buffer (storage unit), 24c Third buffer (storage unit) 25 Drawing unit 26 Output unit 27 Video output I / F 28 GPIO 29 I2C

Claims (7)

メモリに接続されたメモリバスを介して上記メモリから読み出した画像データに対して画像処理を施す画像処理部を備える画像処理システムであって、
カメラの垂直同期信号に同期して上記カメラから入力される映像データを保持する、上記メモリバスの少なくとも一部に接続された保持部と、
上記保持部から上記メモリバスへの映像データの出力を制御する出力制御部とを備え、
上記出力制御部は、上記垂直同期信号の立ち上がりまたは立ち下がりエッジを検知してから、上記映像データの1フレーム分を上記カメラから上記保持部への入力中において上記保持部の容量が上限値未満かつ下限値より大きい状態を保つように定められた所定期間後に、上記出力を開始させ、
上記画像処理部は、上記保持部から上記メモリバスへ出力された映像データに対して画像処理を施す
ことを特徴とする画像処理システム。
An image processing system including an image processing unit that performs image processing on image data read from the memory via a memory bus connected to a memory,
A holding unit connected to at least a part of the memory bus for holding video data input from the camera in synchronization with a vertical synchronization signal of the camera;
An output control unit that controls output of video data from the holding unit to the memory bus;
The output control unit detects the rising or falling edge of the vertical synchronization signal, and then inputs one frame of the video data from the camera to the holding unit, so that the capacity of the holding unit is less than the upper limit value. And after a predetermined period of time determined to maintain a state greater than the lower limit, start the output,
The image processing system, wherein the image processing unit performs image processing on video data output from the holding unit to the memory bus.
1フレームあたりの上記映像データのスキャン期間は、上記映像データが有効となる領域をスキャンする有効期間と、上記映像データが出力されない無効期間と、から構成されており、
上記所定期間は、上記無効期間より長いことを特徴とする請求項1に記載に画像処理システム。
The scan period of the video data per frame is composed of a valid period for scanning an area in which the video data is valid and an invalid period in which the video data is not output.
The image processing system according to claim 1, wherein the predetermined period is longer than the invalid period.
上記出力制御部は、上記垂直同期信号の立ち上がりまたは立ち下がりエッジに同期して、上記垂直同期信号の立ち上がりまたは立ち下がりを示す制御信号を生成し、当該生成された制御信号を上記画像処理部に出力し、
上記画像処理部は、上記制御信号に基づき、上記出力制御部に対し、上記保持部から上記メモリバスへの映像データの出力を指示することを特徴とする請求項1または2に記載の画像処理システム。
The output control unit generates a control signal indicating the rising or falling edge of the vertical synchronization signal in synchronization with the rising or falling edge of the vertical synchronization signal, and sends the generated control signal to the image processing unit. Output,
The image processing according to claim 1, wherein the image processing unit instructs the output control unit to output video data from the holding unit to the memory bus based on the control signal. system.
上記保持部は、上記入力の順序通りに上記出力を行うことを特徴とする請求項1〜3のいずれか一項に記載の画像処理システム。   The image processing system according to claim 1, wherein the holding unit performs the output in the order of the input. 上記メモリバスを介して上記保持部から読み出された映像データを、フレーム単位で所定の順序に従って、順次格納する、少なくとも2つの格納部をさらに備え、
上記画像処理部は、フレーム単位で上記格納部を切り替えながら、格納された映像データに対して画像処理を施すことを特徴とする請求項1〜4のいずれか一項に記載の画像処理システム。
Further comprising at least two storage units for sequentially storing video data read from the holding unit via the memory bus in a predetermined order in units of frames;
The image processing system according to claim 1, wherein the image processing unit performs image processing on the stored video data while switching the storage unit in units of frames.
メモリに接続されたメモリバスを介して上記メモリから読み出した画像データに対して画像処理を施す画像処理部と、
カメラの垂直同期信号に同期して上記カメラから入力される映像データを保持する、上記メモリバスの少なくとも一部に接続された保持部から上記メモリバスへの映像データの出力を制御する出力制御部とを備え、
上記出力制御部は、上記垂直同期信号の立ち上がりまたは立ち下がりエッジを検知してから、上記映像データの1フレーム分を上記カメラから上記保持部への入力中において上記保持部の容量が上限値未満かつ下限値より大きい状態を保つように定められた所定期間後に、上記出力を開始させ、
上記画像処理部は、上記保持部から上記メモリバスへ出力された映像データに対して画像処理を施す
ことを特徴とする画像処理装置。
An image processing unit that performs image processing on image data read from the memory via a memory bus connected to the memory;
An output control unit for controlling video data output from the holding unit connected to at least a part of the memory bus to hold video data input from the camera in synchronization with a vertical synchronization signal of the camera. And
The output control unit detects the rising or falling edge of the vertical synchronization signal, and then inputs one frame of the video data from the camera to the holding unit, so that the capacity of the holding unit is less than the upper limit value. And after a predetermined period of time determined to maintain a state greater than the lower limit, start the output,
The image processing apparatus, wherein the image processing unit performs image processing on video data output from the holding unit to the memory bus.
メモリに接続されたメモリバスを介して上記メモリから読み出した画像データに対して画像処理を施す画像処理方法であって、
カメラの垂直同期信号に同期して上記カメラから入力される映像データを保持部に保持する保持ステップと、
上記垂直同期信号の立ち上がりまたは立ち下がりエッジを検知してから、上記映像データの1フレーム分を上記カメラから上記保持部への入力中において上記保持部の容量が上限値未満かつ下限値より大きい状態を保つように定められた所定期間後に、当該保持された映像データを上記メモリバスへ出力する出力ステップと、
上記メモリバスへ出力された映像データに対して画像処理を施す処理ステップとを含むことを特徴とする画像処理方法。
An image processing method for performing image processing on image data read from the memory via a memory bus connected to the memory,
A holding step for holding in the holding unit video data input from the camera in synchronization with a vertical synchronization signal of the camera;
A state in which the capacity of the holding unit is less than the upper limit value and larger than the lower limit value while one frame of the video data is being input from the camera to the holding unit after detecting the rising or falling edge of the vertical synchronization signal An output step of outputting the held video data to the memory bus after a predetermined period determined to maintain
And a processing step of performing image processing on the video data output to the memory bus.
JP2016116621A 2016-06-10 2016-06-10 Image processing system, image processing device, and image processing method Pending JP2017220180A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016116621A JP2017220180A (en) 2016-06-10 2016-06-10 Image processing system, image processing device, and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016116621A JP2017220180A (en) 2016-06-10 2016-06-10 Image processing system, image processing device, and image processing method

Publications (1)

Publication Number Publication Date
JP2017220180A true JP2017220180A (en) 2017-12-14

Family

ID=60656238

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016116621A Pending JP2017220180A (en) 2016-06-10 2016-06-10 Image processing system, image processing device, and image processing method

Country Status (1)

Country Link
JP (1) JP2017220180A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111601015A (en) * 2019-02-20 2020-08-28 富士施乐株式会社 Machining device, machining system, storage medium, and machining method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111601015A (en) * 2019-02-20 2020-08-28 富士施乐株式会社 Machining device, machining system, storage medium, and machining method

Similar Documents

Publication Publication Date Title
US8350791B2 (en) Image display controlling device
US9026697B2 (en) Data processing apparatus
KR100744120B1 (en) Video signal scaler and video signal processing apparatus having the same
TW545047B (en) Data transfer device
US10346323B2 (en) Data transfer device and data transfer method for smoothing data to a common bus
JP2006301724A (en) Memory controller, image processing controller and electronic equipment
US20030011691A1 (en) Camera-mounted apparatus and data writing control method for the same
EP2012535B1 (en) Direct interface of camera module to general purpose i/o port of digital baseband processor
JP2017220180A (en) Image processing system, image processing device, and image processing method
JP2012028997A (en) Image processing device and camera
JP2015096920A (en) Image processor and control method of image processing system
JPWO2017212524A1 (en) Data transfer device, image processing device, and imaging device
JPH09116828A (en) Write/read method for reduced image and reduced image processing circuit
JP6752640B2 (en) Imaging device
WO2021029152A1 (en) Image capturing device, operation method for image capturing device, and program
CN103680381B (en) Image processing apparatus and image processing method
CN107710178B (en) Data transfer apparatus and data transfer method
US20120144150A1 (en) Data processing apparatus
JP6403479B2 (en) Imaging apparatus and control method thereof
JP6021556B2 (en) Image processing device
JP5224492B2 (en) Image data transfer control device, image data transfer method, and camera having the image data transfer device
JP2012109853A (en) Data processing device
JP4525382B2 (en) Display device and imaging device
JP5901952B2 (en) Image processing apparatus and image display terminal having the same
JP2004094498A (en) Image display system, and display