JP3557563B2 - Electronic camera - Google Patents
Electronic camera Download PDFInfo
- Publication number
- JP3557563B2 JP3557563B2 JP09304094A JP9304094A JP3557563B2 JP 3557563 B2 JP3557563 B2 JP 3557563B2 JP 09304094 A JP09304094 A JP 09304094A JP 9304094 A JP9304094 A JP 9304094A JP 3557563 B2 JP3557563 B2 JP 3557563B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- screen
- processing
- recording
- unit
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Television Signal Processing For Recording (AREA)
Description
【0001】
【産業上の利用分野】
本発明は、撮像した画像データの記録媒体としてフラッシュメモリを用いる電子カメラに関する。
【0002】
【従来の技術】
近年、カメラも電子化が進み、撮影画像をフロッピディスクやICメモリカードに記録する電子カメラが実用化されている。
【0003】
このような従来の電子カメラは、カメラ本体にフロッピディスクやICメモリカードを着脱可能に装着する装着部を備えており、この装着部に装着されたフロッピディスクやICメモリカードに撮影した画像の画像データを記録させている。
【0004】
また、近年、注目される記録媒体としては、フラッシュメモリーがあり、フラッシュメモリーは、DRAMのようにデータ保持のためのバッテリーバックアップが不要で、かつDRAMより高集積化が可能であるため、大容量を実現でき、ハードディスクやフロッピーディスク等の代替も可能である。このため、フラッシュメモリーは、上記電子カメラの記録媒体としても有望である。
【0005】
このフラッシュメモリーにおけるデータ書込み処理について、図11に示すフローチャートに基づいて説明する。
【0006】
図11において、フラッシュメモリーにデータを書込む際には、まず、フラッシュメモリー上の書込み先のアドレスAddress及び書込みの際のNG回数nをセット(初期化)し(ステップP1、P2)、ライト(Write)プログラムコマンドを入力して、書込み用データを読み出し、その1バイト(byte)のデータを、セットしたアドレスに書込み(ステップP3)、所定時間ウエイト(Wait)した後(ステップP4)、ベリファイ(Verify)コマンドを入力する(ステップP5)。
【0007】
次いで、再び所定時間ウエイトした後(ステップP6)、先の書込み用データを読み出し、フラッシュメモリーに書込んだデータと一致するか否かを確認し(ステップP7)、一致しない場合(NG)は、NG回数を1増加させ(n+1)(ステップP8)、そのアドレスが“50”に達したか否かを判別し(ステップP9)、50に達していない場合は、ステップP3の処理に戻り、50に達している場合は、本処理を中断する。
【0008】
また、ステップP7で読み出しデータと書込みデータが一致した場合は、今回の書込み先アドレスが最終アドレスか否かを識別し(ステップP10)、最終アドレスでない場合は、書込み先アドレスを1増加させ(Address+1)(ステップP11)、ステップP2に戻る。また、書込み先アドレスが最終アドレスの場合は、本処理を終了する。
【0009】
以上のように、フラッシュメモリーにデータを書込む際には、書込み時とベリファイ時で所定時間のウエイト動作が必要になっている。
【0010】
【発明が解決しようとする課題】
しかしながら、このような従来の電子カメラにあっては、記録媒体としてフラッシュメモリを用いる場合は、図11に示したように、データを書込む際には、書込み時とベリファイ時で所定時間のウエイト動作が必要になっていたため、上記電子カメラにおいて記録媒体として利用する場合、画像データの記録処理に際して、ウエイト時間による空き時間が発生し、記録処理の時間を長引かせて処理効率を低下させるという問題点があった。
【0011】
また、撮影した画像データの記録途中に何らかのアクシデントが発生して、電子カメラ本体の電源が遮断された場合、完全な符号化データが記録されないという事態が発生しても、従来の電子カメラでは、不完全な符号化データであることを知ることができなかったため、その不完全な符号化データを伸張する途中で、複合エラーを起こして、不完全な画像がモニタに表示されてしまうという問題もあった。
【0012】
本発明の目的は、画像データの書込み処理を行うに際して発生する不具合を改善することができる電子カメラを提供することである。
【0013】
【課題を解決するための手段】
請求項1記載の発明は、
被写体を撮像する撮像手段と、
この撮像手段から入力される1画面分の画像信号をデジタル画像データに変換するデジタル変換手段と、
このデジタル変換手段により変換された1画面分のデジタル画像データを所定の符号化方式により符号化して1画面分の符号化データを生成する圧縮手段と、
前記符号化データを復号化する伸張手段と、
この伸張手段により復号化されたデジタル画像データを表示部に表示するための表示信号に変換するデータ変換手段と、
前記圧縮手段により符号化された1画面分の符号化データを記録するデータ記録手段と、
このデータ記録手段に1画面分の符号化データを書込んでいる期間中に、前記圧縮手段における符号化処理に係る処理及び前記データ変換手段におけるデータ変換処理を実行させる制御手段と、
を備えたことを特徴としている。
【0014】
また、この場合、請求項2に記載するように、
前記データ記録手段は、前記1画面分の符号化データを所定の書込みタイミングで所定のデータ単位で分割して記録し、
前記制御手段は、前記データ記録手段に1画面分の符号化データを分割して書込む際の待ち時間を利用して、前記圧縮手段における符号化処理に係る処理及び前記データ変換手段におけるデータ変換処理を分散して実行させるようにすることが有効である。
【0015】
さらに、請求項3に記載するように、
前記データ記録手段に前記圧縮手段により符号化される1画面分のデジタル画像データの符号化開始位置と符号化終了位置を識別する識別情報を記録する記録制御手段と、
前記データ記録手段に記録された符号化データを再生する際に、前記識別情報に基づいて当該符号化データが1画面分あるか否かを判断し、前記伸張手段により復号化させるか否かを制御する再生制御手段と、
を備えさせることが有効である。
さらに、請求項4に記載するように、前記データ記録手段は、フラッシュメモリにより構成するようにしてもよい。
【0019】
【実施例】
以下、図1〜図10を参照して実施例を説明する。
【0020】
図1は、本発明を適用した電子カメラの一実施例を示す図である。
【0021】
まず、構成を説明する。
【0022】
図1は、電子カメラ1のブロック構成図である。
【0023】
この図において、電子カメラ1は、CCD2、A/Dコンバータ3、DRAM4、フラッシュメモリ5、CPU6、圧縮伸張部7、エンコーダ8、D/Aコンバータ9及びモニタ10により構成されており、A/Dコンバータ3、DRAM4、フラッシュメモリ5、CPU6、圧縮伸張部7、エンコーダ8は、バスBに接続されている。
【0024】
CCD(Charge Coupled Device )2は、被写体がレンズ(図示せず)によって結像された光の強度に基づいて、例えば、m×n画素で形成される1画面分の画像信号(アナログ信号)を発生して、この画像信号をA/Dコンバータ3に出力する。
【0025】
A/Dコンバータ3は、CCD2から入力される1画面分の画像信号(アナログ信号)を以降の画像処理をディジタルで行えるように、1画面分の画像データ(ディジタル信号)に変換し、この画像データをバスBを介してCPU6に出力する。
【0026】
DRAM(Dynamic Random Accesss Memory )4は、CPU6により実行されるカラープロセス処理により、1画面分の画像データから生成される輝度信号データと色差信号データを格納するメモリエリアを形成する。
【0027】
フラッシュメモリ5は、圧縮伸張部7において8×8画素単位を1ブロックとして切り出して符号化された符号化データを格納するデータ書込みエリアを形成する。また、フラッシュメモリ5は、1ブロック分の輝度/色差信号データが圧縮伸張部7において圧縮される前に、その輝度/色差信号データのスタート位置を示す特定のスターコードを書込むスタートコード書込みエリアと、圧縮伸張部7において圧縮された符号化データの最終位置を示す特定のエンドコードを書込むエンドコード書込みエリアとを、データ書込みエリアとは別に形成する。
【0028】
CPU(Central Processing Unit )6は、所定の制御プログラムに従って電子カメラ1内の各部を制御する。CPU6は、カラープロセス処理により、A/Dコンバータ3から入力される1画面分の画像データから輝度信号と色差信号を生成してDRAM4に格納し、そのDRAM4に格納した1画面分の輝度/色差信号のうち、8×8画素分を1ブロックとして切り出して圧縮伸張部7に出力して、符号化処理を実行させ、その符号化データをフラッシュメモリ5に順次書込む書込み処理を実行する。
【0029】
また、CPU6は、そのフラッシュメモリ5への1ブロック単位で符号化データの書込み処理に際して、その書込み時のウエイト時間(空き時間)を利用して、後述する割り込み制御処理において、次に符号化させるブロックの輝度/色差データの圧縮伸張部7内への書込みを実行するとともに、エンコーダ8への画像データのセットを実行する。
【0030】
すなわち、CPU6は、フラッシュメモリ5への符号化データ書込み処理に際して発生するウエイト時間を利用して、圧縮伸張部7及びエンコーダ8に対するデータ書込み処理あるいはデータセット処理を分散して実行することにより、撮影時の画像データの記録処理時間を短縮するようにしている。
【0031】
圧縮伸張部7は、図2に示すように、RAMG21、DCT部22、量子化部23、ハフマン符号化部24及びRAMC25により構成されている。
【0032】
RAMG21は、CPU6により書込まれる1ブロック分の輝度/色差信号データを格納するメモリエリアを形成する。
【0033】
DCT部22は、画像記録の際に、RAMG21に書込まれた1ブロック単位の輝度/色差信号データを、DCT(Discrete Cosine Transform:離散コサイン変換)処理し、その1ブロック単位のDCTデータを量子化部23に出力する。また、DCT部22は、記録画像を再生する際に、フラッシュメモリ5に書込まれた1画面分の符号化データを、1ブロック単位に逆DCT処理する機能も有する。
【0034】
量子化部23は、画像記録の際に、DCT部22から入力されるDCT処理された1ブロック単位のDCTデータを、所定の量子化テーブルの値に従って量子化演算を行ない、その1ブロック分の量子化データをハフマン符号化部24に出力する。また、量子化部23は、記録画像を再生する際に、フラッシュメモリ5に書込まれた1画面分の符号化データを、所定の逆量子化テーブルに基づいて1ブロック単位に逆量子化処理する機能も有する。
【0035】
ハフマン符号化部24は、量子化部23から入力される1ブロック単位の量子化データをハフマン符号化方式によりハフマン符号化処理して、その1ブロック単位のハフマン符号化データをRAMC25に格納する。また、ハフマン符号化部24は、記録画像を再生する際に、フラッシュメモリ5に書込まれた1画面分の符号化データを、1ブロック単位に復号化処理する機能を有する。
【0036】
RAMC25は、ハフマン符号化部24から入力される1ブロック単位のハフマン符号化データを格納するメモリエリアを形成し、その格納した1ブロック単位のハフマン符号化データは、CPU6により読み出されてフラッシュメモリ5に書込まれる。
【0037】
したがって、圧縮伸張部7では、画像記録の際には、CPU6によって1ブロック単位でRAMG21に順次書込まれる輝度/色差信号データについて、上記DCT処理、量子化処理及びハフマン符号化処理が繰り返し実行され、1画面分の輝度/色差信号データが順次符号化される。
【0038】
また、圧縮伸張部7では、フラッシュメモリ5に書込まれた符号化データを再生する際には、1ブロック単位でRAMC25に書込まれる符号化データについて、上記復号化処理、逆量子化処理及び逆DCT処理が繰り返し実行され、1画面分の符号化データが順次輝度/色差信号に戻される。
【0039】
エンコーダ部8は、CPU6によって書込まれる輝度/色差信号データをモニタ10に表示するためのビデオ信号にエンコード処理し、そのビデオ信号をモニタ10に出力して撮影画像を表示させる。
【0040】
次に、動作を説明する。
【0041】
まず、上記CPU6によるフラッシュメモリ5への符号化データの書込み処理に際して、その書込み時に発生するウエイト時間を利用して、当該CPU6の割り込み制御処理により実行される各タスクの関係を、図3においてブロック単位で示す。
【0042】
図3において、まず、圧縮伸張部7において1ブロック分の符号化処理が終了すると、CPU6に対して終了割り込みが出力される。CPU6では、終了割り込みが発生されると、符号化終了処理が実行され、イベントBがセットされて、図中にタスク2ブロックで示す“RAMCからのデータ読み出しとフラッシュメモリへのデータ書込み”が行われる。
【0043】
このタスク2ブロックで示す処理において、RAMC25の空き容量が所定byte以上の場合は、イベントAがセットされ、図中にタスク1ブロックで示す“RAMGへのデータ書込み”が行われる。
【0044】
さらに、このタスク1、タスク2とは非同期に図中にタスク3ブロックで示す“エンコーダへのデータセット”が行われる。
【0045】
次に、図3に示したタスク1〜3のブロックでCPU6により実行される各処理の詳細について、図4〜図7に示すフローチャートに基づいて説明する。
【0046】
まず、図3に示した符号化終了処理について図4に示すフローチャートに基づいて説明する。
【0047】
図4において、圧縮伸張部7から符号化終了割り込みが発生されると、CPU6は、符号化終了処理を開始し、イベントBをセットし(ステップS1)、圧縮伸張部7内のRAMC25の空き容量を算出する(ステップS2)。その空き容量が所定byte以上あるか否かを判別し(ステップS3)、空き容量が所定byte以上ある場合は、イベントAをセットして(ステップS4)、本符号化終了処理を終了し、空き容量が所定byte以上ない場合は、イベントAをセットせずに本符号化終了処理を終了する。
【0048】
次に、図3のタスク1に示したRAMG21へのデータ書込み処理について図5に示すフローチャートに基づいて説明する。
【0049】
図5において、まず、DRAM4に格納した1画面分の輝度/色差信号データから1ブロック分(8×8画素)を圧縮伸張部7内のRAMG21に書込み(ステップS11)、その書込んだデータブロックが最終ブロックか否かを判別する(ステップS12)。書込んだデータブロックが最終ブロックの場合は、本タスクを終了し、書込んだデータブロックが最終ブロックでない場合は、上記符号化終了処理によるイベントAのセット待ち状態となる(ステップS13)。イベントAがセットされると、待ち状態から復帰して、自らイベントAをクリアし(ステップS14)、ステップS11に戻って、再び、1ブロック分の輝度/色差信号データをRAMG21に書込む処理を行う。
【0050】
次に、図3のタスク2に示したRAMC25からのデータ読み出しとフラッシュメモリへのデータ書込み処理について図6に示すフローチャートに基づいて説明する。
【0051】
図6において、まず、DRAM4から切り出した1ブロック分の輝度/色差信号データのスタートコードをフラッシュメモリ5内のスタートコード書込みエリアに書込み(ステップS21)、上記符号化終了処理によるイベントBのセット待ち状態となる(ステップS22)。符号化処理終了によりイベントBがセットされると、待ち状態から復帰して、符号化されてRAMC25に格納した符号化データを1byte読み出し(ステップS23)、フラッシュメモリ5に読み出した符号化データを書込む(ステップS24)。次いで、この書込みのための所定時間の間に、処理権限をOS(Operating System)に渡して、時間待ち状態に入る(ステップS25)。
【0052】
この時、他に実行可能なタスクがあれば、OSは、そのタスクに処理権限を渡して、そのタスクを実行状態とする。
【0053】
時間待ち状態に入ってから所定時間が経過すると、その時間待ち状態から復帰し、他のタスクが実行状態になければ、そのまま動作を開始し、他のタスクが実行中の場合は、そのタスクが待ち状態に入るまで待機し、OSから処理権限を受け取ると、直ちに動作を再開する。動作を再開すると、本タスクは、フラッシュメモリ5に書込んだ符号化データのベリファイを行い(ステップS26)、ステップS25と同様の所定時間の待ち状態に入る(ステップS27)。
【0054】
次いで、この待ち状態から復帰すると、RAMCの空き容量を算出し(ステップS28)、その空き容量が所定byte以上あるか否かを判別する(ステップS29)。空き容量が所定byte以上ある場合は、イベントAをセットして(ステップS30)、ステップS30の処理に移行し、また、空き容量が所定byte以上ない場合は、イベントAをセットせずにステップS30の処理に移行する。ステップS30の処理では、符号化データ数が“0”か否かを判別し、符号化データ数が“0”でない場合は、ステップS22に戻ってイベントBのセット待ち状態に入り、符号化データ数が“0”の場合は、最終ブロックか否かを判別する(ステップS32)。最終ブロックでない場合は、イベントBをクリアし(ステップS33)、最終ブロックである場合は、最終ブロックであることを示すエンドコードをフラッシュメモリ5内のエンドコード書込みエリアに書込んで(ステップS34)、本タスクを終了する。
【0055】
次に、図3のタスク3に示したエンコーダへのデータセット処理について図7に示すフローチャートに基づいて説明する。なお、本タスク3は、上記タスク1、2とは非同期に動作するタスクである。
【0056】
図7において、まず、1ライン分の画像データをエンコーダにセットし(ステップS41)、そのセットした画像データが最終ラインか否かを判別する(ステップS42)。画像データが最終ラインでない時は、一定時間の時間待ち処理に入り(ステップS43)、画像データが最終ラインである時は、本タスクを終了する。
【0057】
以上のCPU6の割り込み制御処理によりシーケンシャルに処理されるタスク1〜3及び圧縮伸張部7での符号化処理の関係をブロック単位で図8に示す。
【0058】
すなわち、CCD2により1画面分の画像信号がA/Dコンバータ3に出力され、A/Dコンバータ3でディジタル変換されて1画面分の画像データに変換され、この画像データがバスBを介してCPU6に出力されると、CPU6ではカラープロセス処理により1画面分の輝度/色差信号データが生成されて、DRAM4に格納される。次いで、このDRAM4に格納した1画面分の輝度/色差信号データから最初の1ブロック分(第1ブロック)が切り出されて圧縮伸張部7内のRAMGに書込まれる(ブロックB1)。
【0059】
次いで、圧縮伸張部7では、第1ブロック輝度/色差信号データに対するDCT処理が行われ、続いて量子化処理、ハフマン符号化処理が行われて(ブロックB2、B3)、第1ブロック符号化データのRAMC25への書込みが行われる。この第1ブロックに対する符号化処理が終了すると、圧縮伸張部7からCPU6に対して符号化処理終了割り込みが出力され、CPU6により上記符号化終了処理が開始され、イベントBがセットされるとともに、RAMC25の空き容量に基づいてイベントAがセットされる。
【0060】
このイベントBのセットにより、第1ブロック符号化データがRAMC25から読み出されて、フラッシュメモリ5への書込みが開始される(ブロックB4)。このフラッシュメモリ5への第1ブロック符号化データの書込みに際してウエイト時間が発生すると、RAMC25の空き容量に基づくイベントAのセットにより、RAMG21に対する第2ブロック輝度/色差信号データの書込みが行われる(ブロックB5)。
【0061】
次いで、圧縮伸張部7では、第2ブロック輝度/色差信号データに対するDCT処理が行われ、続いて量子化処理、ハフマン符号化処理が行われて(ブロックB6、B7)、第2ブロック符号化データのRAMC25への書込みが行われる。この第2ブロックに対する符号化処理が終了すると、圧縮伸張部7からCPU6に対して符号化処理終了割り込みが出力され、CPU6により上記符号化終了処理が開始され、イベントBがセットされるとともに、RAMC25の空き容量に基づいてイベントAがセットされる。
【0062】
このイベントBのセットにより、第2ブロック符号化データがRAMC25から読み出されて、フラッシュメモリ5への書込みが開始される(ブロックB8)。以下、同様に、第3ブロック以降、最終ブロックまでの符号化処理が繰り返し行われて、フラッシュメモリ5への書込み処理が行われる(ブロックBn1〜Bn4)。そして、1画面分の符号化処理及びフラッシュメモリ5へのデータ書込み処理が行われるタイミングとは非同期に、CPU6では、DRAM4に格納した1画面分の輝度/色差信号データを、1ライン分毎にエンコーダ8にセットする処理が行われる(ブロックBE)。
【0063】
この図8にブロック単位で示した各タスク1〜3の遷移状態を示すタイミングチャートを図9に示す。
【0064】
この図9において、実線で示す部分は、各タスク1〜3が実行状態であることを示し、破線で示す部分は、各タスク1〜3間の遷移状態を示している。また、図中に“書”と記入した部分は、フラッシュメモリ5に対する書込み動作であることを示し、“ベ”と記入した部分は、フラッシュメモリ5に書込んだデータのベリファイ動作であることを示し、“算”と記入した部分は、RAMC25の空き容量の算出動作であることを示している。
【0065】
この図において、始めはフラッシュメモリ5へのデータの書込み時に発生する待ち時間に、RAMG21にデータを書込んでいるが、RAMC25の空き容量が少なくなると、RAMG21へのデータの書込みをせず、エンコーダ8へデータをセットし、RAMC25の空き容量ができると、再びRAMG21にデータを書込むようにしている。
【0066】
次に、フラッシュメモリ5に書込まれた符号化データを再生する再生処理について図10に示すフローチャートに基づいて説明する。
【0067】
図10において、まず、フラッシュメモリ5内のスタートコード書込みエリアに、スタートコードが書込まれているか否かを判別し(ステップS51)、スタートコードが書込まれている場合は、フラッシュメモリ5内のエンドトコード書込みエリアに、エンドコードが書込まれているか否かを判別する(ステップS52)。エンドコードが書込まれている場合は、その1画面分の符号化処理が終了していること判断して、フラッシュメモリ5内のデータ書込みエリアに書込まれた符号化データを読み出して圧縮伸張部7に出力し、圧縮伸張部7内のDCT部22及び量子化部23で逆DCT処理及び逆量子化処理を行い、輝度信号データと色差信号データに伸張し(ステップS53)、この伸張した輝度/色差信号データを1ラインづつエンコーダ8にセットして、ビデオ信号にエンコードさせた後、D/Aコンバータ9でD/A変換させて、モニタ10に表示させて、本処理を終了する。
【0068】
また、ステップS51及びステップS52において、フラッシュメモリ5内のスタートコード書込みエリア及びエンドコード書込みエリアに、スタートコードあるいはエンドコードが書込まれていない場合は、その1画面分の符号化処理が中途状態、又は、符号化データが壊れている状態であると判断して、そのデータ書込みエリアに書込まれた符号化データを消去して(ステップS54)、本処理を終了する。
【0069】
以上のように、本実施例の電子カメラ1では、フラッシュメモリ5への符号化データ書込みに際して発生するウエイト時間を利用して、CPU6が符号化終了割り込み処理によってイベントAをセットすることにより、圧縮伸張部7内のRAMG21に対する輝度/色差信号データの書込み処理が行われ、また、CPU6が符号化終了割り込み処理によってイベントBをセットすることにより、RAMC25に書込まれた符号化データの読み出しとフラッシュメモリ5への符号化データの書込み処理が行われ、さらに、イベントAとイベントBのセットによる処理の合間に、非同期にエンコーダ8への輝度/色差信号データのセット処理が行われる。
【0070】
このため、従来は、フラッシュメモリへのデータ書込み時に発生するウエイト時間中は、何の処理も行われずに無駄にされていた時間中に、分散してデータ処理が行われるため、撮影時の画像データの記録処理効率を向上させて、記録処理時間を短縮することができる。
【0071】
また、1画面分の画像データの符号化処理が終了しているか否かを、フラッシュメモリ5内のスタートコード書込みエリア及びエンドコード書込みエリアに書込まれるスタートコード及びエンドコードによって判断するようにしているため、フラッシュメモリ5に不完全な符号化データが記録された場合に、スタートコードあるいはエンドコードが記録されないため、再生前に、不完全な符号化データであることを判断して消去することができ、不完全な画像を再生するという事態を回避することができる。
【0072】
【発明の効果】
本発明によれば、フラッシュメモリへのデータ書込み時に発生するウェイト時間中は、何の処理も行われずに無駄にされていた時間中に、分散してデータ処理が行われるため、撮影時の画像データの記録処理効率を向上させて、記録処理時間を短縮することができる。
【0073】
また、本発明によれば、フラッシュメモリに不完全な符号化データが記録された場合に、開始位置あるいは終了位置が識別情報として記録されないため、再生前に、不完全な符号化データであることを判断して、不完全な画像を再生するという事態を回避することができる。
【図面の簡単な説明】
【図1】本発明の電子カメラの一実施例の要部ブロック構成図。
【図2】図1の圧縮伸張部のブロック構成図。
【図3】フラッシュメモリへの符号化データの書込み処理に際して発生するウエイト時間を利用して、CPUの割り込み制御処理により実行される各タスクの関係をブロック単位で示す図。
【図4】図3の符号化終了処理のフローチャート。
【図5】図3のタスク1のフローチャート。
【図6】図3のタスク2のフローチャート。
【図7】図3のタスク3のフローチャート。
【図8】CPUの割り込み制御処理によりシーケンシャルに処理されるタスク1〜3及び圧縮伸張部での符号化処理の関係をブロック単位で示す図。
【図9】図8にブロック単位で示した各タスク1〜3の遷移状態を示すタイミングチャート。
【図10】フラッシュメモリに書込まれた符号化データを再生する再生処理のフローチャート。
【図11】従来のフラッシュメモリにデータを書込む際のフローチャート。
【符号の説明】
1 電子カメラ
2 CCD
3 A/Dコンバータ
4 DRAM
5 フラッシュメモリ
6 CPU
7 圧縮伸張部
8 エンコーダ
9 D/Aコンバータ
10 モニタ
21 RAMG
22 DCT部
23 量子化部
24 ハフマン符号化部
25 RAMC[0001]
[Industrial applications]
The present invention relates to an electronic camera that uses a flash memory as a recording medium for captured image data.
[0002]
[Prior art]
2. Description of the Related Art In recent years, electronic cameras have been advanced, and electronic cameras that record captured images on a floppy disk or an IC memory card have been put into practical use.
[0003]
Such a conventional electronic camera has a mounting portion for detachably mounting a floppy disk or an IC memory card on the camera body, and an image of an image taken on the floppy disk or the IC memory card mounted on the mounting portion. The data is being recorded.
[0004]
In recent years, a flash memory has been attracting attention as a recording medium. A flash memory does not require a battery backup for data retention like a DRAM, and can be more highly integrated than a DRAM. And a substitute for a hard disk or a floppy disk is also possible. For this reason, the flash memory is also promising as a recording medium for the electronic camera.
[0005]
The data writing process in the flash memory will be described with reference to the flowchart shown in FIG.
[0006]
In FIG. 11, when writing data to the flash memory, first, the address Address of the write destination on the flash memory and the number of NGs n during writing are set (initialized) (steps P1 and P2), and the write ( Write) A program command is input to read out the write data, write the 1-byte data to the set address (Step P3), wait for a predetermined time (Wait) (Step P4), and verify (Step P4). (Verify) command is input (step P5).
[0007]
Next, after waiting for a predetermined time again (step P6), the previous write data is read, and it is confirmed whether or not the data matches the data written to the flash memory (step P7). If they do not match (NG), The number of NG is increased by 1 (n + 1) (step P8), and it is determined whether or not the address has reached "50" (step P9). If this has been reached, this processing is interrupted.
[0008]
If the read data and the write data match in Step P7, it is determined whether or not the current write destination address is the last address (Step P10). If not, the write destination address is incremented by 1 (Address + 1). (Step P11), and returns to Step P2. If the write destination address is the last address, the process ends.
[0009]
As described above, when writing data to the flash memory, a wait operation for a predetermined time is required at the time of writing and at the time of verification.
[0010]
[Problems to be solved by the invention]
However, in such a conventional electronic camera, when a flash memory is used as a recording medium, as shown in FIG. 11, when writing data, a wait time of a predetermined time is required between writing and verifying. When the electronic camera is used as a recording medium because of the necessity of an operation, a vacant time due to a wait time occurs in a recording process of image data, and the recording process is prolonged, thereby reducing the processing efficiency. There was a point.
[0011]
Also, in the event that some kind of accident occurs during the recording of captured image data and the power of the electronic camera main body is cut off, even if a situation occurs where complete encoded data is not recorded, in the conventional electronic camera, Since it was not possible to know that the data was incompletely coded data, there was also a problem that a composite error occurred during the decompression of the incompletely coded data and an incomplete image was displayed on a monitor. there were.
[0012]
An object of the present invention is to provide a process for writing image data.ReasonAn object of the present invention is to provide an electronic camera capable of improving a problem that occurs when performing the operation.
[0013]
[Means for Solving the Problems]
The invention according to
Imaging means for imaging a subject;
Digital conversion means for converting an image signal for one screen input from the imaging means into digital image data;
Compression means for encoding the digital image data for one screen converted by the digital conversion means by a predetermined encoding method to generate encoded data for one screen;
Decompression means for decoding the encoded data,
Data conversion means for converting the digital image data decoded by the decompression means into a display signal for displaying on a display unit;
SaidData recording means for recording one screen of encoded data encoded by the compression means;
During a period in which encoded data for one screen is written in the data recording unit, a process related to an encoding process in the compression unit is performed.And data conversion processing in the data conversion meansControl means for executing
It is characterized by having.
[0014]
In this case, as described in
The data recording unit records the coded data for one screen by dividing the coded data for one screen in a predetermined data unit at a predetermined writing timing,
The control unit uses a waiting time when dividing and writing one screen of encoded data into the data recording unit, and performs processing related to encoding processing in the compression unit.And data conversion processing in the data conversion meansIt is effective to distribute and execute.
[0015]
Further, as described in
SaidData recording meansThe compression meansRecording control means for recording identification information for identifying an encoding start position and an encoding end position of one screen of digital image data encoded by
When reproducing the encoded data recorded in the data recording means, it is determined whether or not the encoded data for one screen based on the identification information,The extension meansPlayback control means for controlling whether or not to decrypt by
It is effective to provide
Claims4The data recording means may be constituted by a flash memory.
[0019]
【Example】
Hereinafter, embodiments will be described with reference to FIGS.
[0020]
FIG. 1 is a diagram showing one embodiment of an electronic camera to which the present invention is applied.
[0021]
First, the configuration will be described.
[0022]
FIG. 1 is a block diagram of the
[0023]
Referring to FIG. 1, an
[0024]
The CCD (Charge Coupled Device) 2 outputs, for example, an image signal (analog signal) for one screen formed of m × n pixels based on the intensity of light formed by imaging a subject by a lens (not shown). Then, the image signal is output to the A /
[0025]
The A /
[0026]
A DRAM (Dynamic Random Access Memory) 4 forms a memory area for storing luminance signal data and chrominance signal data generated from image data for one screen by color process processing executed by the CPU 6.
[0027]
The
[0028]
A CPU (Central Processing Unit) 6 controls each unit in the
[0029]
Further, when writing the encoded data to the
[0030]
That is, the CPU 6 executes the data writing process or the data setting process for the compression /
[0031]
As shown in FIG. 2, the compression /
[0032]
The RAMG 21 forms a memory area for storing one block of luminance / color difference signal data written by the CPU 6.
[0033]
The DCT unit 22 performs DCT (Discrete Cosine Transform) processing on the luminance / color difference signal data in units of one block written in the RAMG 21 at the time of image recording, and quantizes the DCT data in units of one block. Output to the
[0034]
When recording an image, the
[0035]
The
[0036]
The RAMC 25 forms a memory area for storing Huffman-encoded data in units of one block input from the
[0037]
Therefore, in the image recording, the compression /
[0038]
When the encoded data written in the
[0039]
The
[0040]
Next, the operation will be described.
[0041]
First, when the CPU 6 writes the encoded data into the
[0042]
In FIG. 3, first, when the encoding process for one block is completed in the compression /
[0043]
In the processing indicated by the
[0044]
Further, "set data to the encoder" indicated by a
[0045]
Next, details of each process executed by the CPU 6 in the blocks of the
[0046]
First, the encoding end processing shown in FIG. 3 will be described based on the flowchart shown in FIG.
[0047]
In FIG. 4, when an encoding end interrupt is generated from the compression /
[0048]
Next, the process of writing data to the RAMG 21 shown in
[0049]
In FIG. 5, first, one block (8 × 8 pixels) is written from the luminance / color difference signal data for one screen stored in the
[0050]
Next, the process of reading data from the RAMC 25 and writing data to the flash memory shown in
[0051]
In FIG. 6, first, the start code of the luminance / color difference signal data for one block cut out from the
[0052]
At this time, if there is another executable task, the OS passes the processing authority to the task and sets the task to the execution state.
[0053]
When a predetermined time elapses after entering the time waiting state, the task returns from the time waiting state, and if no other task is in the executing state, the operation starts as it is. If another task is executing, the task is executed. It waits until it enters a wait state, and upon receiving processing authority from the OS, immediately resumes its operation. When the operation is restarted, this task performs verification of the encoded data written in the flash memory 5 (step S26), and enters a waiting state for a predetermined time as in step S25 (step S27).
[0054]
Next, when returning from the waiting state, the free space of the RAMC is calculated (step S28), and it is determined whether or not the free space is equal to or more than a predetermined byte (step S29). If the free space is equal to or larger than the predetermined byte, event A is set (step S30), and the process proceeds to step S30. If the free space is not equal to or larger than the predetermined byte, event A is set without setting event A. Move to the processing of. In the process of step S30, it is determined whether or not the number of coded data is “0”. If the number of coded data is not “0”, the process returns to step S22 to enter the event B set waiting state, and If the number is "0", it is determined whether or not the block is the last block (step S32). If it is not the last block, the event B is cleared (step S33). If it is the last block, an end code indicating the last block is written in the end code writing area in the flash memory 5 (step S34). , End this task.
[0055]
Next, the data setting process for the encoder shown in
[0056]
In FIG. 7, first, one line of image data is set in the encoder (step S41), and it is determined whether or not the set image data is the last line (step S42). If the image data is not the last line, the process enters a waiting time for a certain period of time (step S43). If the image data is the last line, this task ends.
[0057]
FIG. 8 shows the relationship between the
[0058]
That is, an image signal for one screen is output to the A /
[0059]
Next, in the compression /
[0060]
With the setting of the event B, the first block encoded data is read from the RAMC 25, and writing to the
[0061]
Next, the compression /
[0062]
With the setting of the event B, the second block encoded data is read from the RAMC 25, and writing to the
[0063]
FIG. 9 is a timing chart showing transition states of the
[0064]
In FIG. 9, a part shown by a solid line indicates that each of the
[0065]
In this figure, data is initially written to the RAM G21 during a waiting time that occurs when data is written to the
[0066]
Next, a reproduction process for reproducing the encoded data written in the
[0067]
In FIG. 10, first, it is determined whether or not a start code is written in a start code writing area in the flash memory 5 (step S51). It is determined whether or not an end code has been written in the end code writing area (step S52). If the end code has been written, it is determined that the encoding process for one screen has been completed, and the encoded data written in the data writing area in the
[0068]
If the start code or the end code is not written in the start code writing area and the end code writing area in the
[0069]
As described above, in the
[0070]
For this reason, conventionally, during a wait time that occurs when writing data to a flash memory, data processing is performed in a distributed manner during a time that is wasted without performing any processing. It is possible to improve the data recording processing efficiency and shorten the recording processing time.
[0071]
Also, it is determined whether or not the encoding process of the image data for one screen is completed based on the start code and the end code written in the start code writing area and the end code writing area in the
[0072]
【The invention's effect】
BookAccording to the invention, during the wait time that occurs when data is written to the flash memory, the data processing is performed in a distributed manner during the time that is wasted without performing any processing. The recording processing efficiency can be improved, and the recording processing time can be shortened.
[0073]
Also bookAccording to the invention, when incomplete coded data is recorded in the flash memory, the start position or the end position is not recorded as identification information, so that it is determined that the data is incomplete coded data before reproduction.hand,A situation in which an incomplete image is reproduced can be avoided.
[Brief description of the drawings]
FIG. 1 is a block diagram of a main part of an embodiment of an electronic camera according to the present invention.
FIG. 2 is a block diagram of a compression / expansion unit in FIG. 1;
FIG. 3 is a diagram showing, in block units, a relationship between tasks executed by an interrupt control process of a CPU using a wait time generated in a process of writing encoded data to a flash memory.
FIG. 4 is a flowchart of an encoding end process of FIG. 3;
FIG. 5 is a flowchart of a
FIG. 6 is a flowchart of a
FIG. 7 is a flowchart of a
FIG. 8 is a diagram showing, in block units, a relationship between
FIG. 9 is a timing chart showing transition states of
FIG. 10 is a flowchart of a reproducing process for reproducing encoded data written in a flash memory.
FIG. 11 is a flowchart for writing data to a conventional flash memory.
[Explanation of symbols]
1 electronic camera
2 CCD
3 A / D converter
4 DRAM
5 Flash memory
6 CPU
7 Compression / expansion unit
8 Encoder
9 D / A converter
10 Monitor
21 RAMG
22 DCT section
23 Quantization unit
24 Huffman coding unit
25 RAMC
Claims (4)
この撮像手段から入力される1画面分の画像信号をデジタル画像データに変換するデジタル変換手段と、
このデジタル変換手段により変換された1画面分のデジタル画像データを所定の符号化方式により符号化して1画面分の符号化データを生成する圧縮手段と、
前記符号化データを復号化する伸張手段と、
この伸張手段により復号化されたデジタル画像データを表示部に表示するための表示信号に変換するデータ変換手段と、
前記圧縮手段により符号化された1画面分の符号化データを記録するデータ記録手段と、
このデータ記録手段に1画面分の符号化データを書込んでいる期間中に、前記圧縮手段における符号化処理に係る処理及び前記データ変換手段におけるデータ変換処理を実行させる制御手段と、
を備えたことを特徴とする電子カメラ。Imaging means for imaging a subject;
Digital conversion means for converting an image signal for one screen input from the imaging means into digital image data;
Compression means for encoding one screen of digital image data converted by the digital conversion means by a predetermined encoding method to generate one screen of encoded data;
Decompression means for decoding the encoded data,
Data conversion means for converting the digital image data decoded by the decompression means into a display signal for displaying on a display unit;
A data recording means for recording encoded data of one picture encoded by said compressing means,
Control means for executing processing relating to encoding processing in the compression means and data conversion processing in the data conversion means during a period in which encoded data for one screen is written in the data recording means;
An electronic camera comprising:
前記制御手段は、前記データ記録手段に1画面分の符号化データを分割して書込む際の待ち時間を利用して、前記圧縮手段における符号化処理に係る処理及び前記データ変換手段におけるデータ変換処理を分散して実行させることを特徴とする請求項1記載の電子カメラ。The data recording unit records the coded data for one screen by dividing the coded data for one screen in a predetermined data unit at a predetermined writing timing,
The control unit utilizes a waiting time when dividing and writing one screen of encoded data into the data recording unit, and performs processing related to encoding processing in the compression unit and data conversion in the data conversion unit. 2. The electronic camera according to claim 1, wherein the processing is executed in a distributed manner.
前記データ記録手段に記録された符号化データを再生する際に、前記識別情報に基づいて当該符号化データが1画面分あるか否かを判断し、前記伸張手段により復号化させるか否かを制御する再生制御手段と、
を備えたことを特徴とする請求項1又は2記載の電子カメラ。A recording control means for recording the identification information for identifying the coding start position and end of encoding the position of the digital image data for one screen to be coded by said compression means to said data recording means,
When reproducing the encoded data recorded in the data recording means, it is determined whether or not the encoded data exists for one screen based on the identification information, and whether or not the data is to be decoded by the decompression means is determined. Playback control means for controlling;
The electronic camera according to claim 1, further comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP09304094A JP3557563B2 (en) | 1994-04-05 | 1994-04-05 | Electronic camera |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP09304094A JP3557563B2 (en) | 1994-04-05 | 1994-04-05 | Electronic camera |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003196270A Division JP3658641B2 (en) | 2003-07-14 | 2003-07-14 | Electronic camera |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH07284063A JPH07284063A (en) | 1995-10-27 |
| JP3557563B2 true JP3557563B2 (en) | 2004-08-25 |
Family
ID=14071394
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP09304094A Expired - Fee Related JP3557563B2 (en) | 1994-04-05 | 1994-04-05 | Electronic camera |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3557563B2 (en) |
-
1994
- 1994-04-05 JP JP09304094A patent/JP3557563B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH07284063A (en) | 1995-10-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7343043B2 (en) | Image compression apparatus, method and recording medium storing an image compression program | |
| JP2001157173A (en) | Digital camera | |
| US5818524A (en) | Digital still camera having an image data compression function | |
| US6661452B1 (en) | Digital camera capable of decreasing a required memory capacity | |
| JP3557563B2 (en) | Electronic camera | |
| US6289127B1 (en) | Information processing apparatus and method | |
| JP3658641B2 (en) | Electronic camera | |
| US20020054222A1 (en) | Image capturing system, and recording medium for control program of image capturing system | |
| US6728471B1 (en) | Image reproducing apparatus | |
| KR20090064278A (en) | Recording device, playback device, recording method, playback method and program recording medium | |
| JP3055421B2 (en) | Video recording equipment | |
| US7236189B2 (en) | Digital camera and method of image processing | |
| JP3810814B2 (en) | Still image pickup device | |
| JP2004096354A (en) | Image processing apparatus, image processing method, and imaging apparatus | |
| JP2732941B2 (en) | Image signal processing device | |
| KR100402927B1 (en) | How to Display Multiple Screens of Digital Cameras | |
| JPH05143406A (en) | Information reproducing device | |
| JPH0767137A (en) | Image processing device | |
| JP3034923B2 (en) | Image data recording and playback device | |
| JPH0654252A (en) | Camera | |
| KR100210439B1 (en) | Compression Control Method of Digital Camera | |
| JP4423819B2 (en) | Surveillance image recording / reproducing method and apparatus | |
| US20110083007A1 (en) | Recording device and method for activating the same | |
| JP2732940B2 (en) | Image compression / decompression device | |
| JP2001309218A (en) | Digital camera |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20040420 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040503 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080528 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090528 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090528 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100528 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110528 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110528 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120528 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120528 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130528 Year of fee payment: 9 |
|
| LAPS | Cancellation because of no payment of annual fees |