JP2005124049A - Device and method for processing image data - Google Patents
Device and method for processing image data Download PDFInfo
- Publication number
- JP2005124049A JP2005124049A JP2003359327A JP2003359327A JP2005124049A JP 2005124049 A JP2005124049 A JP 2005124049A JP 2003359327 A JP2003359327 A JP 2003359327A JP 2003359327 A JP2003359327 A JP 2003359327A JP 2005124049 A JP2005124049 A JP 2005124049A
- Authority
- JP
- Japan
- Prior art keywords
- image data
- camera
- camera device
- timing
- frame rate
- 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
Links
Images
Landscapes
- Studio Devices (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
Description
本発明は、画像データ処理、特にカメラデバイスで撮影した画像データを処理する画像データ処理に関する。 The present invention relates to image data processing, and more particularly to image data processing for processing image data captured by a camera device.
画像と音声を使って通信を行うテレビ電話システムにおいては、一般的な問題として、データ量の多い画像データとデータ量の少ない音声データとの差によって、受信端末側で画像と音声のズレが生じるLip Syncと称せられる現象が知られている。従来、この種の問題を解決するための画像処理システムは、送信端末側がスキュー値と呼ばれる値を受信端末側にわたし、受信端末側においてスキュー値の分だけ音声の開始を遅らせるようにしている(例えば、非特許文献1参照)。 In a videophone system that communicates using images and sounds, a general problem is that the difference between image data with a large amount of data and sound data with a small amount of data causes a shift between the image and sound on the receiving terminal side. A phenomenon called Lip Sync is known. Conventionally, in an image processing system for solving this type of problem, a value called a skew value is transmitted to the receiving terminal side on the transmitting terminal side, and the start of audio is delayed by the amount of the skew value on the receiving terminal side ( For example, refer nonpatent literature 1).
また、画像データは情報量が多いことから、携帯型情報端末装置に電力を供給するバッテリの残存容量に応じてフレームレートを調節するようにしたもの(例えば、特許文献1参照)や、カメラで撮影した時における被写体距離等のカメラパラメータの閾値に対する大小に応じてフレームレートを設定し、それに従って映像信号の間引き処理を行うもの(例えば、特許文献2参照)が公知である。 Also, since image data has a large amount of information, the frame rate is adjusted according to the remaining capacity of the battery that supplies power to the portable information terminal device (for example, see Patent Document 1) or a camera. There is known a technique in which a frame rate is set according to the magnitude of a camera parameter threshold such as a subject distance at the time of shooting and a video signal is thinned out in accordance with the frame rate (for example, see Patent Document 2).
しかし、上述した非特許文献1記載の従来技術では、スキュー値の設定は送信端末側で一方的に行っている為、受信端末側のエンコード・デコード能力により画像と音声のズレが軽減される幅に差があるという問題点が残存する。 However, in the conventional technique described in Non-Patent Document 1 described above, since the skew value is set unilaterally on the transmission terminal side, the range in which the image / sound deviation is reduced by the encoding / decoding capability on the reception terminal side. The problem remains that there is a difference.
更に、システム全体として要求されているフレームレート値をそのままカメラデバイスに対して設定している為、カメラデバイスの性能を最大限出し切れず、画像データを取得するまでの時間がかかり、結果として画像データを取得してから受信端末側に送信するまでの処理の最適化が行われていないという問題点もある。 Furthermore, since the frame rate value required for the entire system is set for the camera device as it is, the performance of the camera device cannot be maximized, and it takes time to acquire the image data. As a result, the image data There is also a problem that the process from the acquisition to the receiving terminal side is not optimized.
また、上述した特許文献1記載の従来技術では単にフレームレートを調整するのみであり、特許文献2記載の従来技術ではカメラへのフレームレートの設定と、それに従った映像信号の間引き処理を行うが、Lip Sync現象に対する解決手段を提供するものではない。
Further, the conventional technique described in Patent Document 1 described above merely adjusts the frame rate, while the conventional technique described in
そこで、本発明の目的は、上記の問題点を解消する為、画像取り込み時間の高速化とシステムの負荷軽減を実現する画像データ処理方法を提供することにある。 SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide an image data processing method that realizes speeding up of image capturing time and reduction of system load in order to solve the above problems.
請求項1記載の画像データ処理装置は、カメラデバイスで撮影した画像データを処理する画像データ処理装置において、少なくとも、カメラデバイスからの画像データ取込み開始,停止と、該画像データのDMA転送のON,OFF,停止などのカメラI/F制御を行い、また指定されたフレームレートの整数倍となるフレームレート値をカメラデバイスで選択可能な最大値の範囲内でカメラデバイスに設定することを指示し、かつ設定されたフレームレートと指定されたフレームレートとの差異により画像データを間引くタイミングを算出するカメラ制御部(図2の1)と、該カメラ制御部からの設定内容および制御内容をカメラデバイスに設定し、またカメラデバイスから取り込んだ画像データを保存し、間引きタイミング外のタイミングでDMA転送でメモリに書き込むためのバッファリングを行うカメラインターフェイス部(図2の2)とを設けたことを特徴とする。 The image data processing apparatus according to claim 1 is an image data processing apparatus that processes image data captured by a camera device, and at least starts and stops capturing image data from the camera device, and turns on DMA transfer of the image data, Instructs the camera device to set the frame rate value that is an integral multiple of the specified frame rate within the range of the maximum value that can be selected by the camera device. In addition, a camera control unit (1 in FIG. 2) that calculates the timing for thinning out image data based on the difference between the set frame rate and the specified frame rate, and the setting content and control content from the camera control unit are stored in the camera device. Save the image data set and captured from the camera device, and save it with DMA transfer at a timing outside the thinning timing Characterized by (2 in Figure 2) and it was provided camera interface unit which performs buffering for writing to.
請求項2記載の画像データ処理装置は、請求項2記載の画像データ処理装置において、カメラインターフェイス部は、カメラデバイスから取り込んだ画像データをメモリに書き込むためのバッファとして機能するFIFO(図2の2-1)と、DMAモードのON状態/OFF状態,VSYNC立下り割込みの有効/無効およびFIFOをクリアするか否かの別がカメラ制御部によって設定されるカメラI/Fレジスタレジスタ(図2の2-2)と、カメラデバイスから取り込んだ画像データをFIFOからメモリに間引きして書き込むためのタイミングを生成するカウンタ(図2の2-3)とを備え、FIFOに書き込まれた画像データは、DMAモードがON状態であるときはメモリにDMA転送され書込み可能となり、DMAモードがOFF状態であるときはFIFOのクリア設定により廃棄され、VSYNC立下り割込みの設定は、DMAモードがON状態であるときは「無効」、一方、1フレームの画像データがメモリに書き込まれてOFF状態になると「有効」となってカメラ制御部に通知するVSYNC立下り割込みを可能とし、これによりカメラ制御部は、次回がメモリ書込みタイミングならDMAモードをON状態、VSYNC立下り割込みを「無効」、FIFOをクリアに設定してカウンタの値をクリアし、他のタイミングならカウンタの値をクリアすることを特徴とする。
The image data processing apparatus according to
請求項3記載の画像データ処理方法は、カメラデバイスで撮影した画像データを処理する画像データ処理方法であって、少なくとも、指定されたフレームレートの整数倍となるフレームレート値をカメラデバイスで選択可能な最大値の範囲内でカメラデバイスに設定することを指示し、かつ設定されたフレームレートと指定されたフレームレートとの差異により画像データを間引くタイミングを算出する手順と、カメラデバイスから取り込んだ画像データを保存し、間引きタイミングでは廃棄し、間引きタイミング外のタイミングでメモリに書き込む手順とを有することを特徴とする。
The image data processing method according to
請求項4記載の画像データ処理方法は、請求項3記載の画像データ処理方法において、メモリへの書込みが可能なDMAモードのON/OFF状態を判断する手順と、DMAモードがON状態ならカメラデバイスから取り込んだ画像データをDMA転送によりメモリへ書き込み、DMAモードをOFF状態、VSYNC立下り割込みの設定を「有効」として、書込みタイミングを生成するカウンタに1を足す手順と、DMAモードがOFF状態ならVSYNC立下り割込みの設定が「有効」かを判断して、「有効」なら次が書込みタイミングか否かを判断する手順と、次が書込みタイミングでないときはカメラデバイスから取り込んだ画像データを廃棄する手順と、次が書込みタイミングであるときはDMAモードをON状態、VSYNC立下り割込みの設定を「無効」に設定してカウンタをクリアする手順とを有することを特徴とする。
The image data processing method according to claim 4 is the image data processing method according to
本発明の第1の効果は、フレームレート値をカメラデバイスで選択可能な最大値内において、システム全体として要求されたフレームレート値の整数倍となる最大値をフレームレート値としてカメラデバイスに設定することにより、カメラデバイスの性能を最大限発揮させ、カメラ出画を開始してから実際にカメラ画を取得するまでの時間を短縮することにある。 The first effect of the present invention is that a maximum value that is an integral multiple of the frame rate value required for the entire system is set in the camera device as a frame rate value within the maximum value that can be selected by the camera device. This is to maximize the performance of the camera device and to shorten the time from the start of the camera output until the actual acquisition of the camera image.
短縮される時間は、指定されたフレームレート値とカメラデバイスに設定可能な最大フレームレート値との差により異なる。前述の例では、カメラデバイスから画像データ取り込みを開始して最初の画像データを取得するまで、フレームレートが7.5fpsにおいては134ミリ秒かかるが、30fpsにおいては34ミリ秒となり、1枚目の画像データが取得されるまでの時間が1/4に短縮される。これにより、画像データの送信を100ミリ秒早く行うことができる。また、指定フレームレート値が毎秒15フレームなら、従来と比べおよそ33ミリ秒処理開始までの時間を短縮することが可能になり、引いてはLip Syncの問題も解消できる。 The shortened time differs depending on the difference between the designated frame rate value and the maximum frame rate value that can be set in the camera device. In the above example, it takes 134 milliseconds at the frame rate of 7.5 fps until the first image data is acquired from the start of image data capture from the camera device, but it takes 34 milliseconds at 30 fps, so the first image Time until data is acquired is reduced to 1/4. As a result, the image data can be transmitted 100 milliseconds earlier. Also, if the specified frame rate value is 15 frames per second, it will be possible to reduce the time to start processing by approximately 33 milliseconds compared to the conventional case, and the problem of Lip Sync can be solved.
この短縮により、受信端末側に短縮された分だけ画像データの到着が早くなり、受信端末側にて受信した画像データのデコード処理をより早く開始することが可能となる。このことにより、受信端末側のエンコード・デコード性能の差に影響されず画像と音声のズレを軽減することが可能となる。 By this shortening, the arrival of the image data is accelerated by the amount shortened to the receiving terminal side, and the decoding process of the image data received on the receiving terminal side can be started earlier. As a result, it is possible to reduce the gap between the image and the sound without being affected by the difference in encoding / decoding performance on the receiving terminal side.
また、本発明の第2の効果は、カメラデバイスから取り込んだ画像データは、要求されたフレームレート値に対する、カメラデバイスに設定したフレームレート値の比と同数の取得回数につき1回のみメモリに書き込み、他の画像データは廃棄する、つまり間引き処理によりCPU負担を軽減し、処理の高速化が実現されるということである。 The second effect of the present invention is that the image data captured from the camera device is written into the memory only once for the number of acquisitions equal to the ratio of the frame rate value set in the camera device to the requested frame rate value. The other image data is discarded, that is, the CPU load is reduced by the thinning process, and the processing speed is increased.
例えば、要求フレームレート値が毎秒7.5フレーム(7.5fps)であるところ、カメラデバイスにフレームレート値として毎秒30フレーム(30fps)を設定した場合、7.5fpsと30fpsとの比は4となり、4フレームにつき1回だけカメラデバイスから画像データを取得し、他の3フレームは廃棄する。 For example, if the required frame rate value is 7.5 frames per second (7.5 fps), and 30 frames per second (30 fps) is set as the frame rate value for the camera device, the ratio between 7.5 fps and 30 fps will be 4, and every 4 frames Image data is acquired from the camera device only once, and the other three frames are discarded.
本発明の画像データ処理装置は、カメラデバイスで撮影した画像データを処理する画像データ処理装置において、少なくとも、カメラ制御部とカメラインターフェイス部とを設ける。 The image data processing apparatus of the present invention is an image data processing apparatus that processes image data captured by a camera device, and includes at least a camera control unit and a camera interface unit.
カメラ制御部は、カメラデバイスからの画像データ取込み開始,停止と、該画像データのDMA転送のON,OFF,停止などのカメラI/F制御を行い、また指定されたフレームレートの整数倍となるフレームレート値をカメラデバイスで選択可能な最大値の範囲内でカメラデバイスに設定することを指示し、かつ設定されたフレームレートと指定されたフレームレートとの差異により画像データを間引くタイミングを算出する。 The camera control unit performs camera I / F control such as starting / stopping image data capture from the camera device and turning on / off / stopping DMA transfer of the image data, and becomes an integer multiple of the specified frame rate. Instructs the camera device to set the frame rate value within the range of the maximum value selectable by the camera device, and calculates the timing to thin out the image data based on the difference between the set frame rate and the specified frame rate .
カメラインターフェイス部は、カメラ制御部からの設定内容および制御内容をカメラデバイスに設定し、またカメラデバイスから取り込んだ画像データを保存し、間引きタイミング外のタイミングでDMA転送でメモリに書き込むためのバッファリングを行う。そのために、FIFO,カメラI/Fレジスタレジスタおよびカウンタを備えている。 The camera interface unit sets the settings and control details from the camera control unit to the camera device, saves the image data captured from the camera device, and writes it to the memory by DMA transfer at a timing outside the decimation timing I do. For this purpose, a FIFO, a camera I / F register register and a counter are provided.
FIFOはカメラデバイスから取り込んだ画像データをメモリに書き込むためのバッファとして機能する。カメラI/FレジスタレジスタにはDMAモードのON状態/OFF状態,VSYNC立下り割込みの有効/無効およびFIFOをクリアするか否かの別がカメラ制御部によって設定される。また、カウンタはカメラデバイスから取り込んだ画像データをFIFOからメモリに間引きして書き込むためのタイミングを生成する。 The FIFO functions as a buffer for writing image data captured from the camera device into the memory. The camera I / F register register is set by the camera control unit to determine whether the DMA mode is on / off, whether the VSYNC falling interrupt is enabled / disabled, and whether to clear the FIFO. The counter generates timing for thinning out and writing image data captured from the camera device from the FIFO to the memory.
FIFOに書き込まれた画像データは、DMAモードがON状態であるときはメモリにDMA転送され書込み可能となり、DMAモードがOFF状態であるときはFIFOのクリア設定により廃棄され、VSYNC立下り割込みの設定は、DMAモードがON状態であるときは「無効」、一方、1フレームの画像データがメモリに書き込まれてOFF状態になると「有効」となってカメラ制御部に通知するVSYNC立下り割込みを可能とし、これによりカメラ制御部は、次回がメモリ書込みタイミングならDMAモードをON状態、VSYNC立下り割込みを「無効」、FIFOをクリアに設定してカウンタの値をクリアし、他のタイミングならカウンタの値をクリアする。 When the DMA mode is ON, the image data written to the FIFO is DMA-transferred to the memory and can be written.When the DMA mode is OFF, it is discarded by the FIFO clear setting, and the VSYNC falling interrupt is set. Is “invalid” when the DMA mode is ON, while it is “valid” when one frame of image data is written to the memory and becomes OFF, and a VSYNC falling interrupt can be sent to the camera controller As a result, if the next time is the memory write timing, the camera control unit will set the DMA mode to ON, set the VSYNC falling interrupt to “invalid”, set the FIFO to clear, and clear the counter value. Clear the value.
本発明の画像データ処理方法は、カメラデバイスで撮影した画像データを処理する画像データ処理方法であって、少なくとも、指定されたフレームレートの整数倍となるフレームレート値をカメラデバイスで選択可能な最大値の範囲内でカメラデバイスに設定することを指示し、かつ設定されたフレームレートと指定されたフレームレートとの差異により画像データを間引くタイミングを算出する手順と、カメラデバイスから取り込んだ画像データを保存し、間引きタイミングでは廃棄し、間引きタイミング外のタイミングでメモリに書き込む手順とを有する。 The image data processing method of the present invention is an image data processing method for processing image data captured by a camera device, and at least a frame rate value that is an integer multiple of a specified frame rate can be selected by the camera device. Instructs the camera device to set within the range of values, calculates the timing to thin out the image data based on the difference between the set frame rate and the specified frame rate, and the image data captured from the camera device Storing, discarding at the thinning timing, and writing to the memory at a timing outside the thinning timing.
より詳しくは、メモリへの書込みが可能なDMAモードのON/OFF状態を判断する手順と、DMAモードがON状態ならカメラデバイスから取り込んだ画像データをDMA転送によりメモリへ書き込み、DMAモードをOFF状態、VSYNC立下り割込みの設定を「有効」として、書込みタイミングを生成するカウンタに1を足す手順と、DMAモードがOFF状態ならVSYNC立下り割込みの設定が「有効」かを判断して、「有効」なら次が書込みタイミングか否かを判断する手順と、次が書込みタイミングでないときはカメラデバイスから取り込んだ画像データを廃棄する手順と、次が書込みタイミングであるときはDMAモードをON状態、VSYNC立下り割込みの設定を「無効」に設定してカウンタをクリアする手順とを有する。 More specifically, the procedure to determine the ON / OFF status of the DMA mode that can be written to the memory, and if the DMA mode is ON, the image data captured from the camera device is written to the memory by DMA transfer, and the DMA mode is OFF , Set the VSYNC falling interrupt setting to “valid”, add 1 to the counter that generates the write timing, and if the DMA mode is OFF, determine whether the VSYNC falling interrupt setting is “valid” ”If the next is the write timing, if the next is not the write timing, discard the image data captured from the camera device, if the next is the write timing, turn on the DMA mode, VSYNC And a procedure for clearing the counter by setting the falling interrupt setting to “invalid”.
次に、本発明の実施例について図面を参照しながら説明する。 Next, embodiments of the present invention will be described with reference to the drawings.
図1は、テレビ電話システムにおける画像処理部の概要を示す構成図であり、画像データを取り込むカメラデバイス10と、画像系ドライバ20と、ビデオDSP30とで構成される。
FIG. 1 is a configuration diagram showing an outline of an image processing unit in a videophone system, and includes a
画像系ドライバ20は、カメラデバイス10からの画像データ(YCbCr422形式)の取得処理を行うカメラ画像格納手段21と、ビデオDSP(Digital Signal Processor)30でエンコードされた画像データを保存するエンコードデータ格納手段22と、エンコードデータ格納手段22に保存されたエンコードデータをテレビ電話プロトコルに従ってパケット化して外部(相手側端末)に送り出すパケット処理手段23とから成る。
The
ビデオDSP30は、カメラ画像格納手段21に保存されたYCbCr422形式の画像データをMPEG4形式にエンコードする処理を行う。 The video DSP 30 performs a process of encoding the image data in the YCbCr422 format saved in the camera image storage means 21 into the MPEG4 format.
図2はカメラ画像格納手段21の主要部の詳細な構成を示すブロック図である。カメラ画像格納手段21は、図2に示すように、カメラ制御部1、カメラインターフェイス部2、DMA転送部3およびメモリ4から構成されている。
FIG. 2 is a block diagram showing a detailed configuration of the main part of the camera image storage means 21. As shown in FIG. 2, the camera
カメラ制御部1は、カメラデバイス10へのフレームレートの設定と、カメラデバイス10からの画像データ取込み開始,停止と、画像データのDMA転送のON,OFF,停止などのカメラI/F制御をカメラインターフェイス部2を介して行う。
The camera control unit 1 performs camera I / F control such as setting of a frame rate to the
また、カメラ制御部1は、指定されたフレームレートの整数倍となるフレームレート値をカメラデバイスで選択可能な最大値の範囲内でカメラデバイスに設定することを指示し、かつ設定されたフレームレートと指定されたフレームレートとの差異により画像データを間引くタイミングを算出する。 Further, the camera control unit 1 instructs the camera device to set a frame rate value that is an integral multiple of the specified frame rate within the range of the maximum value that can be selected by the camera device, and the set frame rate And the timing for thinning out the image data based on the difference between the designated frame rate.
カメラインターフェイス部2は、カメラ制御部1からの設定内容および制御内容をカメラデバイス10に設定する。また、カメラデバイス10から取り込んだ画像データを保存し、メモリ4へ間引きして書き込むためのバッファリングを行う。そして、このような処理のために、カメラインターフェイス部2は、FIFO2-1,カメラI/Fレジスタレジスタ2-2およびカウンタ2-3を備えている。
The
FIFO2-1はカメラデバイス10から取り込んだ画像データをメモリ4に書き込むためのバッファとして機能する。
The FIFO 2-1 functions as a buffer for writing image data captured from the
カメラI/Fレジスタ2-2は、DMAモードのON状態/OFF状態,VSYNC立下り割込みの有効/無効およびFIFO2-1をクリアするか否かの別がカメラ制御部1によって設定される。 In the camera I / F register 2-2, the camera control unit 1 sets whether the DMA mode is ON / OFF, whether the VSYNC falling interrupt is enabled / disabled, and whether to clear the FIFO 2-1 or not.
DMAモードがON状態であるときは、FIFO2-1に書き込まれた画像データは、DMA転送部3によってメモリ4に転送され書き込まれることが可能となる。一方、DMAモードがOFF状態であるときは、FIFO2-1に書き込まれた画像データは廃棄される。1フレームの画像データがメモリ4に書き込まれるとDMAモードはOFF状態に設定されて間引きに対処し、メモリ4への書込みが行われようとするときにはDMAモードはON状態に設定されている必要がある。
When the DMA mode is in the ON state, the image data written in the FIFO 2-1 can be transferred to the memory 4 and written by the
また、VSYNC立下り割込みとは、1フレームの画像データがメモリ4に書き込まれたことをカメラインターフェイス部2がカメラ制御部1に通知することをいう。そして、VSYNC立下り割込みの設定とは、VSYNC立下り割込みを許す(有効)か否(無効)かのカメラ制御部1による設定をいう。
Further, the VSYNC falling interrupt means that the
DMAモードのON状態/OFF状態と、VSYNC立下り割込みの有効/無効とは、上述の意義により、矛盾の無いように設定される。すなわち、DMAモードがON状態であるときはVSYNC立下り割込みの設定は「無効」になっており、DMAモードがOFF状態であるときはVSYNC立下り割込みの設定は「有効」になっているべきである。 The ON / OFF state of the DMA mode and the validity / invalidity of the VSYNC falling interrupt are set so as not to contradict each other due to the above-described significance. In other words, the VSYNC falling interrupt setting should be “invalid” when the DMA mode is ON, and the VSYNC falling interrupt setting should be “valid” when the DMA mode is OFF. It is.
また、カウンタ2-3は、カメラデバイス10から取り込んだ画像データをFIFO2-1からメモリ4に間引きして書き込むためのタイミングを生成する。先の例では、カウント値は0オリジンで3になると、次にカメラデバイス10から画像データを取り込むタイミングは書込みタイミングであることになる。つまり、このときにカメラデバイス10から取り込む画像データはメモリ4に書き込まれるべき画像データとなる。
The counter 2-3 generates timing for thinning out and writing the image data captured from the
カメラデバイス10は、ハードウェアのカメラセンサーを指し、画像データの読込み及び生成を行い、画像データをカメラインターフェイス部2が提供しているFIFO2-1のバッファエリアに書き込みを行う。
The
DMA転送部3は、FIFO2-1に書き込まれた画像データを取得し、ダイレクト・メモリ・アクセス(Direct Memory Access)にて指定されたメモリ4の領域内に書込みを行う。また、カメラ制御部1へは画像データのDMA転送が完了したことをDMA転送完了割込みにて通知する。
The
メモリ4は、DMA転送部3から取得した画像データの一時保存を行う記録媒体部であって、カメラ画バッファを形成し、ここに保存された画像データがビデオDSP30でエンコード処理される。
The memory 4 is a recording medium unit that temporarily stores the image data acquired from the
以下、本実施例の動作について、図3のフローチャートに従って説明する。 Hereinafter, the operation of this embodiment will be described with reference to the flowchart of FIG.
先ず、ユーザは本テレビ電話端末の操作部(図示省略)においてフレームレート値を指定して撮影開始を要求する(図3のステップS1)。このとき、ユーザが単に撮影開始を要求しさえすれば、カメラ制御部1がフレームレート値を自動的に設定するようにもできる。 First, the user designates a frame rate value in the operation unit (not shown) of the videophone terminal and requests to start shooting (step S1 in FIG. 3). At this time, the camera control unit 1 can automatically set the frame rate value as long as the user simply requests to start shooting.
カメラ制御部1は、指定されたフレームレートの整数倍となるフレームレート値をカメラデバイス10にカメラデバイス10で選択可能な最大値の範囲内で設定する(ステップS2)。
The camera control unit 1 sets a frame rate value that is an integral multiple of the designated frame rate to the
また、カメラ制御部1は、指定されたフレームレート値とカメラデバイス10に設定したフレームレート値との差異により画像データを間引くタイミングを算出する(ステップS3)。例えば、指定されたフレームレート値が1であり、設定されたフレームレート値が4である場合、間引きは4フレームにつき3フレームということになる。 Further, the camera control unit 1 calculates the timing for thinning out the image data based on the difference between the designated frame rate value and the frame rate value set in the camera device 10 (step S3). For example, when the designated frame rate value is 1 and the set frame rate value is 4, thinning out is 3 frames per 4 frames.
次に、ユーザが画像取得開始を要求すると(ステップS4)、カメラ制御部1→カメラインターフェイス部2→カメラデバイス10のルートで画像データ取込み開始の指示を内容とするカメラI/F制御がカメラデバイス10に伝わり、カメラデバイス10から画像データの取得を開始する。この取得は、カメラデバイス10に設定された(ステップS2)フレームレート値によって高速に行われる。このとき、カメラインターフェイス部2のカメラI/Fレジスタ2-2に設定されるDMAモードは初期値としてのON状態である。
Next, when the user requests start of image acquisition (step S4), camera I / F control including an instruction to start capturing image data in the route of camera control unit 1 →
カメラデバイス10からカメラインターフェイス部2に取り込まれた画像データは、FIFO2-1に書き込まれる(ステップS5)。
The image data captured from the
そして、カメラI/Fレジスタ2-2のDMAモードがONである場合(ステップS6でYes)、DMA転送部3は、FIFO2-1に書き込まれた画像データをメモリ4の指定された領域に書き込み、カメラ制御部1にDMA転送完了割込みにてDMA転送完了を通知する(ステップS7)。カメラ制御部1は、DMA転送完了の通知を受けることにより、カメラI/Fレジスタ2-2に対して、DMAモードをOFFとし、かつVSYNC立下り割込みを有効に設定する(ステップS8)。また、カウンタ2-3は1加算される(ステップS9)。
When the DMA mode of the camera I / F register 2-2 is ON (Yes in step S6), the
ステップS5〜S9の処理は、カメラの撮影停止が要求されない限り(ステップS10でNo)繰り返される。一方、撮影停止が要求された場合は(ステップS10でYes)、カメラ制御部1は、カメラデバイス10からの画像データ取込み処理を終了し、カメラ停止処理を行う(ステップS11)。
The processes in steps S5 to S9 are repeated unless a camera stop is requested (No in step S10). On the other hand, when the stop of photographing is requested (Yes in step S10), the camera control unit 1 ends the image data capturing process from the
一方、DMAモードがOFFである場合(ステップS6でNo)、VSYNC立下り割込みの設定が有効であることを確認の上で(ステップS12でYes)、カメラインターフェイス部2はVSYNC立下り割込みを行う(ステップS13)。そして、カウンタ2-3の画像データ取得回数により(ステップS14)、ステップS15およびステップS9か、ステップS16〜S18のいずれかに分岐する。なお、DMAモードがOFFであるのに(ステップS6でNo)、VSYNC立下り割込みの設定が有効でない場合は(ステップS12でNo)、間引き期間であるにも関わらずメモリ4への画像データの書込みが無いことになるのでエラーとなる。
On the other hand, if the DMA mode is OFF (No in step S6), the
次タイミングが画像データ書込みタイミングでない場合(ステップS14でNo)、カメラインターフェイス部2は、カメラI/Fレジスタ2-2にFIFO2-1のクリアを設定し(ステップS15)、かつ指定回数をチェックするカウンタ2-3の値をインクリメントする(ステップS9)。
When the next timing is not the image data writing timing (No in step S14), the
一方、次タイミングが画像データ書込みタイミングである場合(ステップS14でYes)、カメラインターフェイス部2は、カメラI/Fレジスタ2-2に対してDMAモードをON、VSYNC立下り割込みを「無効」にするとともに(ステップS16)、FIFO2-1のクリアを設定する(ステップS17)。また、指定回数をチェックするためのカウンタ2-3の値をクリアする(ステップS18)。
On the other hand, when the next timing is the image data write timing (Yes in step S14), the
なお、DMAモードがOFFであるのに(ステップS6でNo)、VSYNC立下り割込みの設定が無効である場合は(ステップS11でNo)エラーとなる。これは、DMAモードをOFFに設定しVSYNC立下り割込みを有効に設定した(ステップS8)ことと矛盾するからである。 If the DMA mode is OFF (No in step S6) but the VSYNC falling interrupt setting is invalid (No in step S11), an error occurs. This is because it contradicts the fact that the DMA mode is set to OFF and the VSYNC falling interrupt is enabled (step S8).
図4は、カメラデバイス10からの4回の画像データ取込みの内、1回だけメモリ4に書き込み、他の3回の画像データは廃棄する場合のカメラI/Fレジスタ2-2とカウンタ2-3の内容の遷移をタイムチャートで示したものである。タイミングt1〜t5それぞれは、カメラデバイス10から画像データを取り込んだタイミングを指す。
FIG. 4 shows the camera I / F register 2-2 and the counter 2- when the image data is fetched from the
いま、タイミングt1で画像データがDMA転送されたものとすると(図3のステップS7)、DMAモードはOFF状態に設定され、VSYNC立上り割込みの設定は「有効」とされる(ステップS8)。また、カウンタ2-3は1つ前のタイミングでクリアされて0となっているので(ステップS9)、1が足されて1となる(ステップS9)。 If the image data is DMA-transferred at the timing t1 (step S7 in FIG. 3), the DMA mode is set to the OFF state and the VSYNC rising interrupt setting is set to “valid” (step S8). Since the counter 2-3 is cleared to 0 at the previous timing (step S9), 1 is added to 1 (step S9).
タイミングt2ではカウンタ2-3の値は1、タイミングt3ではカウンタ2-3の値は2であるため、次はメモリ4への画像データの書込みタイミングではなく(ステップS14でNo)、DMAモードはOFF状態、VSYNC立上り割込みの設定は「有効」が維持され、FIFO2-1のクリアが設定され、カメラデバイス10から取り込んだ画像データが廃棄されるだけである(ステップS15)。
Since the value of the counter 2-3 is 1 at the timing t2 and the value of the counter 2-3 is 2 at the timing t3, the next is not the writing timing of the image data to the memory 4 (No in step S14), and the DMA mode is The setting of the OFF state and VSYNC rising interrupt is kept “valid”, the FIFO2-1 is cleared, and the image data captured from the
タイミングt4になると、カウンタ値は3になっているため、次はメモリ4への画像データの書込みタイミングということになり(ステップS14でYes)、DMAモードはON状態、VSYNC立上り割込みの設定は「無効」に設定される(ステップS16)。これにより、次のタイミングt5における画像データのメモリ4への書込みに備える。また、FIFO2-1のクリアが設定され、カメラデバイス10から取り込んだ画像データが廃棄されるとともに(ステップS17)、カウンタ2-3を0にクリアして(ステップS18)、ここから再び間引きのカウントを開始する。以下、タイミングt1〜t4と同様な処理がタイミングt5を起点として、停止要求がある(ステップS10でYes)まで繰り返される。
At timing t4, since the counter value is 3, next is the timing of writing image data to the memory 4 (Yes in step S14), the DMA mode is ON, and the VSYNC rising interrupt setting is “ “Invalid” is set (step S16). This prepares for the writing of the image data to the memory 4 at the next timing t5. Also, clearing of FIFO2-1 is set, the image data captured from the
なお、以上の説明は、テレビ電話システムを例にとっているが、本発明はこれに限定されることなく、例えば、画像データと音声データをMPEG4形式にてファイル化し、MPEG4データとして提供する動画撮影機能を備えたシステムにおけるカメラ画像取得処理においても同様に適用することができ、テレビ電話システムにおけるのと同等な効果を得ることが可能である。 Note that the above description is based on an example of a videophone system, but the present invention is not limited to this. For example, a moving image shooting function that converts image data and audio data into a file in MPEG4 format and provides it as MPEG4 data. The present invention can be similarly applied to the camera image acquisition process in the system including the above, and an effect equivalent to that in the videophone system can be obtained.
1 カメラ制御部
2 カメラインターフェイス部
3 DMA転送部
4 メモリ
10 カメラデバイス
20 画像系ドライバ
21 カメラ画像格納手段
22 エンコードデータ格納手段
23 パケット処理手段
30 ビデオDSP
2-1 FIFO
2-2 カメラI/Fレジスタ
2-3 カウンタ
DESCRIPTION OF SYMBOLS 1
2-1 FIFO
2-2 Camera I / F register
2-3 Counter
Claims (4)
カメラデバイスからの画像データ取込み開始,停止と、該画像データのDMA転送のON,OFF,停止などのカメラI/F制御を行い、また指定されたフレームレートの整数倍となるフレームレート値をカメラデバイスで選択可能な最大値の範囲内でカメラデバイスに設定し、かつ前記設定されたフレームレートと前記指定されたフレームレートとの差異により前記画像データを間引くタイミングを算出するカメラ制御部と、
該カメラ制御部からの設定内容および制御内容をカメラデバイスに設定し、またカメラデバイスから取り込んだ画像データを保存し、前記間引きタイミング外のタイミングでDMA転送でメモリに書き込むためのバッファリングを行うカメラインターフェイス部とを設けたことを特徴とする画像データ処理装置。 In an image data processing apparatus that processes image data captured by a camera device, at least,
Performs camera I / F control such as starting / stopping image data acquisition from the camera device, turning on / off / stopping DMA transfer of the image data, and setting the frame rate value that is an integral multiple of the specified frame rate to the camera A camera control unit that sets the camera device within a range of a maximum value that can be selected by the device, and calculates a timing at which the image data is thinned out according to a difference between the set frame rate and the specified frame rate;
A camera that sets the setting contents and control contents from the camera control unit to the camera device, stores image data captured from the camera device, and performs buffering for writing to the memory by DMA transfer at a timing outside the thinning timing An image data processing apparatus comprising an interface unit.
カメラデバイスから取り込んだ画像データをメモリに書き込むためのバッファとして機能するFIFOと、
DMAモードのON状態/OFF状態,VSYNC立下り割込みの有効/無効および前記FIFOをクリアするか否かの別が前記カメラ制御部によって設定されるカメラI/Fレジスタレジスタと、
前記カメラデバイスから取り込んだ画像データを前記FIFOからメモリに間引きして書き込むためのタイミングを生成するカウンタとを備え、
前記FIFOに書き込まれた画像データは、前記DMAモードがON状態であるときはメモリにDMA転送され書込み可能となり、DMAモードがOFF状態であるときは前記FIFOのクリア設定により廃棄され、
前記VSYNC立下り割込みの設定は、前記DMAモードがON状態であるときは「無効」、一方、1フレームの画像データがメモリに書き込まれてOFF状態になると「有効」となって前記カメラ制御部に通知するVSYNC立下り割込みを可能とし、
これによりカメラ制御部は、次回がメモリ書込みタイミングなら前記DMAモードをON状態、VSYNC立下り割込みを「無効」、FIFOをクリアに設定して前記カウンタの値をクリアし、他のタイミングなら前記カウンタの値をクリアすることを特徴とする請求項1に記載の画像データ処理装置。 The camera interface unit
FIFO that functions as a buffer for writing image data captured from the camera device to the memory,
The camera I / F register register that is set by the camera control unit according to whether the DMA mode is ON / OFF, VSYNC falling interrupt valid / invalid, and whether to clear the FIFO,
A counter for generating timing for thinning out and writing image data captured from the camera device from the FIFO to a memory;
When the DMA mode is in the ON state, the image data written in the FIFO is DMA transferred to the memory and can be written, and when the DMA mode is in the OFF state, it is discarded by the clear setting of the FIFO.
The VSYNC falling interrupt setting is “invalid” when the DMA mode is in the ON state, and becomes “valid” when one frame of image data is written in the memory and becomes the OFF state. Enable VSYNC falling interrupt to notify
As a result, the camera control unit clears the counter value by setting the DMA mode to the ON state, VSYNC falling interrupt is “invalid”, and clearing the FIFO if the next time is the memory write timing. The image data processing apparatus according to claim 1, wherein the value of is cleared.
指定されたフレームレートの整数倍となるフレームレート値をカメラデバイスで選択可能な最大値の範囲内でカメラデバイスに設定し、かつ前記設定されたフレームレートと前記指定されたフレームレートとの差異により前記画像データを間引くタイミングを算出する手順と、
カメラデバイスから取り込んだ画像データを保存し、前記間引きタイミングでは廃棄し、前記間引きタイミング外のタイミングでメモリに書き込む手順とを有することを特徴とする画像データ処理方法。 An image data processing method for processing image data captured by a camera device, at least,
A frame rate value that is an integral multiple of the specified frame rate is set in the camera device within the range of the maximum value selectable by the camera device, and the difference between the set frame rate and the specified frame rate A procedure for calculating a timing for thinning out the image data;
An image data processing method comprising: storing image data captured from a camera device, discarding the image data at the thinning timing, and writing the data to a memory at a timing outside the thinning timing.
DMAモードがON状態ならカメラデバイスから取り込んだ画像データをDMA転送によりメモリへ書き込み、前記DMAモードをOFF状態、VSYNC立下り割込みの設定を「有効」として、書込みタイミングを生成するカウンタに1を足す手順と、
DMAモードがOFF状態ならVSYNC立下り割込みの設定が「有効」かを判断して、「有効」なら次が書込みタイミングか否かを判断する手順と、
次が書込みタイミングでないときはカメラデバイスから取り込んだ画像データを廃棄する手順と、
次が書込みタイミングであるときはDMAモードをON状態、VSYNC立下り割込みの設定を「無効」に設定して前記カウンタをクリアする手順とを有することを特徴とする請求項3に記載の画像データ処理方法。 A procedure for determining the ON / OFF state of the DMA mode in which writing to the memory is possible,
If the DMA mode is ON, the image data captured from the camera device is written to the memory by DMA transfer, the DMA mode is OFF, the VSYNC falling interrupt setting is “valid”, and 1 is added to the counter that generates the write timing. Procedure and
If the DMA mode is OFF, determine whether the VSYNC falling interrupt setting is `` valid '', and if it is `` valid '', determine whether the next is the write timing,
When the next is not the write timing, the procedure to discard the image data captured from the camera device,
4. The image data according to claim 3, further comprising: a step of clearing the counter by setting the DMA mode to an ON state and setting the VSYNC falling interrupt to “invalid” when the next is a write timing. Processing method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003359327A JP2005124049A (en) | 2003-10-20 | 2003-10-20 | Device and method for processing image data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003359327A JP2005124049A (en) | 2003-10-20 | 2003-10-20 | Device and method for processing image data |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005124049A true JP2005124049A (en) | 2005-05-12 |
Family
ID=34615595
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003359327A Pending JP2005124049A (en) | 2003-10-20 | 2003-10-20 | Device and method for processing image data |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005124049A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009206887A (en) * | 2008-02-28 | 2009-09-10 | Casio Comput Co Ltd | Imaging apparatus, video imaging method, and program |
CN114615424A (en) * | 2020-12-21 | 2022-06-10 | 深圳市瑞立视多媒体科技有限公司 | Method for generating control SDK of binocular USB camera and method for controlling binocular USB camera |
-
2003
- 2003-10-20 JP JP2003359327A patent/JP2005124049A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009206887A (en) * | 2008-02-28 | 2009-09-10 | Casio Comput Co Ltd | Imaging apparatus, video imaging method, and program |
CN114615424A (en) * | 2020-12-21 | 2022-06-10 | 深圳市瑞立视多媒体科技有限公司 | Method for generating control SDK of binocular USB camera and method for controlling binocular USB camera |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021004381A1 (en) | Screencasting display method, and electronic apparatus | |
US20140111670A1 (en) | System and method for enhanced image capture | |
US20050083917A1 (en) | Communication apparatus and applications thereof | |
JP2005086826A (en) | Mms message splitting apparatus and its method in mobile terminal equipment | |
JP2014511071A (en) | Generate a zoomed image | |
JP2003524909A (en) | Method and apparatus for achieving a multimedia network interface | |
JP2008311831A (en) | Moving image communication equipment, moving image communication system, and semiconductor integrated circuit for moving image communication | |
US7676612B2 (en) | Video camera device and control method thereof | |
JP4636755B2 (en) | Imaging apparatus, image processing method, recording medium, and program | |
JP2013239961A (en) | Moving-image capturing apparatus and electronic zoom method for moving image | |
TWI590653B (en) | Image frame processing method | |
JP2001285860A (en) | Transfer rate controller, decoding device, medium and information assembly | |
JP5440839B2 (en) | Information processing apparatus and method, and program | |
JP2005057590A (en) | Decoding display device, image pickup unit, and image transmission system equipped with these | |
JP2005124049A (en) | Device and method for processing image data | |
US7821537B2 (en) | Signal processing apparatus | |
WO2022111712A1 (en) | Audio and video synchronization method and device | |
US20230045631A1 (en) | Text to Speech Processing Method, Terminal, and Server | |
JP2004266843A (en) | Communication device, communication method, and telephone device, video telephone device, and imaging device using method | |
TWI700921B (en) | Image decryption apparatus and method of the same | |
JP3557202B2 (en) | Communication device, communication method, and telephone device, video telephone device, and imaging device that can use the method | |
JP2000115249A (en) | Data communication terminal and data communication method | |
JP2008278323A (en) | Network camera | |
WO2015153723A1 (en) | A method and system for real-time cloud storage of video content | |
JP4266477B2 (en) | Information processing apparatus and control method thereof |