JP2014127990A - Encryption apparatus, encryption method and program - Google Patents
Encryption apparatus, encryption method and program Download PDFInfo
- Publication number
- JP2014127990A JP2014127990A JP2012285726A JP2012285726A JP2014127990A JP 2014127990 A JP2014127990 A JP 2014127990A JP 2012285726 A JP2012285726 A JP 2012285726A JP 2012285726 A JP2012285726 A JP 2012285726A JP 2014127990 A JP2014127990 A JP 2014127990A
- Authority
- JP
- Japan
- Prior art keywords
- encryption
- frame
- unit
- encryption information
- encoding
- 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
- Compression Or Coding Systems Of Tv Signals (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
Description
本発明は、動画データを暗号化する暗号化装置、暗号化方法及びプログラムに関する。 The present invention relates to an encryption device, an encryption method, and a program for encrypting moving image data.
従来、動画データを暗号化する際に、スクランブルにより動画の各ブロックをランダムに並び替え、暗号鍵情報に相当する並び替え情報を、動画フレームの付加情報として記録する動画暗号化方法が存在する。また、不定期的、もしくは定期的に並べ替え情報を変更する動画暗号化方法も存在する(特許文献1参照)。この方法により、暗号化する際に、動画フレームの付加情報を利用することによって暗号化を実現できる。また、復号化するためには、不定期的、もしくは定期的に変更される付加情報を利用する必要があるので、付加情報を用いない限り、容易に復号化することができない。 Conventionally, when encrypting moving image data, there is a moving image encryption method in which moving image blocks are randomly rearranged by scrambling and reordering information corresponding to encryption key information is recorded as additional information of the moving image frame. There is also a moving image encryption method that changes the rearrangement information irregularly or periodically (see Patent Document 1). By this method, encryption can be realized by using the additional information of the moving image frame when encrypting. Further, since it is necessary to use additional information that is changed irregularly or periodically in order to perform decoding, it cannot be easily decoded unless additional information is used.
しかしながら、従来の動画暗号化方法は、動画を分割した場合に、分割した後半の動画に含まれる一部のフレームに対応する並び替え情報が、分割した前半の動画に含まれてしまう。そのため、分割した後半の動画の一部が暗号復号化できなくなってしまう。 However, in the conventional moving image encryption method, when a moving image is divided, rearrangement information corresponding to some frames included in the divided latter moving image is included in the divided first moving image. Therefore, a part of the latter half of the divided moving image cannot be decrypted.
本発明は、前述の問題点に鑑みてなされたものであり、動画を分割した場合に暗号復号化が可能な動画データを生成できるようにすることを目的とする。 The present invention has been made in view of the above-described problems, and an object of the present invention is to generate moving image data that can be encrypted and decrypted when a moving image is divided.
本発明に係る暗号化装置は、動画データに対し、暗号化情報を変更しながら所定のタイミングで暗号化情報を生成する生成手段と、前記生成手段により生成された暗号化情報に基づいて、前記動画データをフレームごとに暗号化する暗号化手段と、前記暗号化手段によって暗号化されたフレームのうち、前記暗号化情報が変更されたタイミングのフレームに、前記フレームに適用されている暗号化情報と、前記フレームよりも前のフレームに適用されている暗号化情報とを付加して符号化する符号化手段とを有する。 The encryption device according to the present invention, for the moving image data, based on the generation means for generating the encryption information at a predetermined timing while changing the encryption information, and the encryption information generated by the generation means, Encryption means for encrypting moving image data for each frame, and encryption information applied to the frame in a frame at a timing when the encryption information is changed among frames encrypted by the encryption means And encoding means for adding and encoding the encryption information applied to the frame before the frame.
本発明によれば、動画を分割した場合であっても、分割した後半の動画を暗号復号化することができる。 According to the present invention, even if a moving image is divided, the latter half of the divided moving image can be decrypted.
以下、本発明の実施形態について、図面を参照しながら説明する。
(実施形態1)
図1は、実施形態1における撮像装置を含む撮像システムの概略構成の一例を示す図である。
図1に示すように、再生装置として機能するパーソナルコンピュータ(PC)100と、デジタルカメラなどの撮像装置200とが、インターフェース300を介して接続されている。インターフェース300としては、例えば、USB(Universal Serial Bus)を用いることができるが、USB以外の通信インターフェースを用いることも可能である。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(Embodiment 1)
FIG. 1 is a diagram illustrating an example of a schematic configuration of an imaging system including an imaging apparatus according to the first embodiment.
As shown in FIG. 1, a personal computer (PC) 100 that functions as a playback device and an
実施形態1では、撮像装置200としてデジタルカメラを例に説明するが、実施形態1に係る撮像装置200はデジタルカメラ以外の装置により構成することも可能である。また、実施形態1における撮像装置200は、例えばカメラ機能付き携帯電話など、デジタルカメラとして動作する動作モードを有する装置により構成することも可能である。さらに、実施形態1では、撮像装置200に記録される画像データは、動画データを前提としているが、動画の符号化方式は、フレーム内符号化方式、フレーム間符号化方式を用いたもの、または、これらを組み合わせたものなどフォーマットは問わない。
In the first embodiment, a digital camera will be described as an example of the
図2は、実施形態1に係る撮像装置200を含む撮像システムの構成例を示すブロック図である。
図2に示すように、PC100は、CPU(Central Processing Unit)101、メモリ102、通信部104、画像復号化部105、暗号復号化部106、表示部107、及び操作部108を有している。
FIG. 2 is a block diagram illustrating a configuration example of an imaging system including the
As illustrated in FIG. 2, the PC 100 includes a CPU (Central Processing Unit) 101, a
CPU101は、PC100全体を制御するためのものである。画像復号化部105は、撮像装置200で作成された符号化データを復号化し、暗号化データとピクチャレイヤ内のユーザーデータとを取り出す。暗号復号化部106は、画像復号化部105において取り出された暗号化データを復号化し、映像データを取り出す。表示部107は、液晶ディスプレイ等の表示器により構成されており、メモリ102または通信部104から供給された符号化データを基に、画像復号化部105及び暗号復号化部106において処理した結果の映像データに係る映像を表示する。また、表示部107は、メモリ102に記憶されているメニュー画面のデータをグラフィカルユーザインターフェース(GUI)として表示することもできる。なお、メニュー画面には、PC100を制御するためのPC制御画面、PC100の設定を変更するためのPC設定画面、画像復号化部105及び暗号復号化部106で処理した結果の映像を表示するための画像表示画面等を含む。
The
操作部108は、PC100を操作するためのユーザインターフェースである。また、操作部108は、PC100を操作するための操作手段として、不図示のマウスや不図示のタブレット、トラックボール等のポインティングデバイスやキーボードを有する。これらのポインティングデバイスをユーザが操作することによって、メニュー画面上で操作を行うことができる。
The
次に、撮像装置200の構成について説明する。
図2に示すように、撮像装置200は、CPU201、メモリ202、記録部203、通信部204、暗号化部205、画像符号化部206、表示部207、操作部208、及び撮像部209を有している。
Next, the configuration of the
As illustrated in FIG. 2, the
CPU201は、撮像装置200全体を制御するためのものである。メモリ202には、撮像装置200を制御するためのコンピュータプログラムや、表示部207に表示するための所定の画像データやアイコンの情報等が記憶されている。記録部203は、画像符号化部206によって作成された符号化データを不図示のメモリカードなどの記録媒体に書き込む。表示部207は、液晶ディスプレイ等により構成されており、撮像装置200の動作モードが撮影モードである場合に、撮像部209により生成された映像データに係る映像を表示する。一方、撮像装置200の動作モードが再生モードである場合、表示部207は、記録媒体から再生された映像データに係る映像を表示する。
The
暗号化部205は、撮像部209から出力された映像データの各フレームをマクロブロックに分割し、暗号化情報として作成されたマクロブロック並び替えテーブルに従ってマクロブロックを並び替えて暗号化データを作成する。なお、マクロブロック並び替えテーブルの詳細については、図6の説明において後述する。また、暗号化部205は、映像データの画像符号化方式がフレーム内符号化かフレーム間符号化かを判定する。さらに、暗号化部205において、フレーム内符号化方式によって符号化する画像(フレーム)をカウントし、所定数のフレーム毎もしくは不定フレーム毎に、マクロブロック並び替えテーブルを変更する。ここで、暗号化部205において、変更するタイミングとして時刻をカウントし、一定時間毎もしくは不定時間毎に、マクロブロック並び替えテーブルを変更できるようにしてもよい。
The
画像符号化部206は、暗号化部205によりマクロブロックが並び替えられた映像データを、例えば、MPEG符号化方式によって符号化し、符号化データを作成する。この時、フレーム内符号化の場合には、判定した現在のフレームに適用されるマクロブロック並び替えテーブル、及び前フレームまでのフレームに適用されていたマクロブロック並び替えテーブルをピクチャレイヤ内のユーザーデータに挿入する。ユーザーデータを挿入する際にはMPEGシンタックスに従って挿入する。
The
操作部208は、撮像装置200を操作するためのユーザインターフェースであり、撮像装置200を操作するための複数のボタンを有し、ユーザからの指示は、操作部208を介してCPU201に入力される。操作部208内の各ボタンは、スイッチ、タッチパネル等により構成される。また、操作部208は、シャッターボタン、電源ボタン、スタート/ストップボタン、モード変更ボタン、メニューボタン、十字ボタン、SETボタン等を有する。
The
スタート/ストップボタンは、撮像部209によって生成された映像データ等を記録媒体に記録するのを開始したり一時停止したりCPU201に指示するボタンである。モード変更ボタンは、撮像装置200の動作モードを撮影モード、再生モード等のいずれかに変更することをCPU201に指示するボタンである。なお、撮像装置200の動作モードが撮影モードの時に、スタート/ストップボタンが押されることにより撮像部209が行う撮影処理については、後述する。メニューボタンは、撮像装置200のメニュー画面を表示したり非表示したりすることをCPU201に指示するボタンである。撮像装置200のメニュー画面は、撮像装置200を制御するためのメニュー画面、及び撮像装置200の設定を変更するためのメニュー画面が含まれており、これらのメニュー画面のデータは、メモリ202に記憶されている。
The start / stop button is a button for instructing the
また、操作部208は、さらに再生開始ボタン、再生停止ボタン、一時停止ボタン、早送りボタン、巻き戻しボタン等を有する。これらのボタンは、記録媒体に記録された映像データの再生(play)、停止(stop)、一時停止(pause)、早送り(fast forward)及び巻き戻し(rewind)の実行をCPU201に指示するボタンである。
The
次に、撮影処理について説明する。撮影処理は、撮像装置200の動作モードが撮影モードの待機状態の時にスタート/ストップボタンが押されることにより行われる。動画撮影処理では、撮像部209から出力された映像データが、暗号化部205により暗号化され、画像符号化部206によりさらに符号化され、記録部203により記録媒体に符号化データとして記録される。そして、通信部204を経由して符号化データがPC100へ送られる。この一連の処理は、操作部208のスタート/ストップボタンが再び押されるまで繰り返される。
Next, the photographing process will be described. The shooting process is performed by pressing the start / stop button when the operation mode of the
次に、図3を参照しながら、実施形態1に係る撮像装置200により行われる処理を説明する。図3は、実施形態1に係る撮像装置200により行われる撮影処理手順の一例を示すフローチャートである。なお、図3のフローチャートが示す処理は、PC100と撮像装置200とがインターフェース300を介して接続され、PC100及び撮像装置200が電源オン状態であるときに実行される処理である。また、図3のフローチャートに示す処理は、CPU201がメモリ202に記憶されているコンピュータプログラムを実行することによって制御される。
Next, processing performed by the
図3において、操作部208のモード変更ボタンから撮影モードに設定され、撮影待機中に操作部208のスタート/ストップボタンが押されることにより、処理を開始する。そして、ステップS301において、操作部208のスタート/ストップボタンが再び押されたか否かを判定する。この判定の結果、スタート/ストップボタンが再び押された場合は、撮影処理を終了する。一方、スタート/ストップボタンが再び押されていない場合は、ステップS302において、撮像部209により撮影処理を行い、映像データを作成する。次に、ステップS303において、暗号化部205は、映像データを暗号化して、暗号化データを作成する。
In FIG. 3, the shooting mode is set from the mode change button of the
図4は、暗号化部205により図3のステップS303において行われる暗号化処理の詳細な手順の一例を示すフローチャートである。
まず、ステップS401において、ステップS302において出力された映像データの画像符号化方式を解析する。そして、ステップS402において、解析の対象となるフレームの画像符号化方式がフレーム内符号化方式かフレーム間符号化方式かを判定する。この判定の結果、フレーム間符号化方式である場合には、処理を終了する。
FIG. 4 is a flowchart showing an example of a detailed procedure of the encryption process performed by the
First, in step S401, the image encoding method of the video data output in step S302 is analyzed. In step S402, it is determined whether the image encoding method of the frame to be analyzed is an intra-frame encoding method or an inter-frame encoding method. As a result of this determination, if the interframe coding method is used, the processing is terminated.
一方、ステップS402の判定の結果、フレーム内符号化方式である場合は、ステップS403において、フレーム内符号化方式のフレーム数をカウントする。そして、ステップS404において、カウントしたフレーム数が所定値以上であるか否かを判定する。この判定の結果、所定値以上である場合には、ステップS405へ進み、所定値未満である場合には、ステップS407へ進む。 On the other hand, if the result of determination in step S402 is the intraframe coding method, the number of frames in the intraframe coding method is counted in step S403. In step S404, it is determined whether the counted number of frames is equal to or greater than a predetermined value. As a result of the determination, if it is greater than or equal to the predetermined value, the process proceeds to step S405, and if it is less than the predetermined value, the process proceeds to step S407.
ステップS405においては、分割されるマクロブロックの配置を表すマクロブロック並び替えテーブルを作成する。そして、ステップS406において、フレーム数のカウントを0へリセットする。次に、ステップS407において、ステップS405において新たにもしくは既に作成されたマクロブロック並び替えテーブルを用いてマクロブロックを並び替え、暗号化データを作成し、処理を終了する。 In step S405, a macroblock rearrangement table representing the arrangement of the macroblocks to be divided is created. In step S406, the frame count is reset to zero. Next, in step S407, macroblocks are rearranged using the macroblock rearrangement table newly or already created in step S405, encrypted data is created, and the process ends.
図3の説明に戻り、次のステップS304において、画像符号化部206は、マクロブロック並び替えテーブルを用いて暗号化データを符号化し、符号化データを作成する。
Returning to the description of FIG. 3, in the next step S304, the
図5は、画像符号化部206により図3のステップS304において行われる符号化処理の詳細な手順の一例を示すフローチャートである。
まず、ステップS501において、暗号化データを符号化して符号化データを作成する。次に、ステップS502において、ステップS401において解析された画像符号化方式を参照する。そして、ステップS503において、対象となるフレームの画像符号化方式がフレーム内符号化方式かフレーム間符号化方式かを判定する。この判定の結果、フレーム間符号化方式である場合は、そのまま処理を終了する。
FIG. 5 is a flowchart illustrating an example of a detailed procedure of the encoding process performed by the
First, in step S501, the encrypted data is encoded to create encoded data. Next, in step S502, the image coding method analyzed in step S401 is referred to. In step S503, it is determined whether the target frame image coding method is an intra-frame coding method or an inter-frame coding method. As a result of this determination, if the inter-frame coding method is used, the processing is terminated as it is.
一方、ステップS503の判定の結果、フレーム内符号化方式である場合には、ステップS504へ進む。そして、判定した現在のフレームに適用されるマクロブロック並び替えテーブル、及び前フレームまでのフレームに適用されていたマクロブロック並び替えテーブルをステップS501で作成した符号化データのピクチャレイヤ内のユーザーデータに記録する。そして、処理を終了する。なお、最初のフレームの場合は、前フレームまでのフレームに適用されていたマクロブロック並び替えテーブルは存在しないため、記録は行わない。 On the other hand, if the result of determination in step S503 is that it is an intraframe coding method, processing proceeds to step S504. Then, the macroblock rearrangement table applied to the determined current frame and the macroblock rearrangement table applied to the frames up to the previous frame are added to the user data in the picture layer of the encoded data created in step S501. Record. Then, the process ends. In the case of the first frame, there is no macroblock rearrangement table applied to the frames up to the previous frame, so no recording is performed.
図3の説明に戻り、次に、ステップS305において、記録部203は、ステップS304で作成された符号化データを記録媒体に記録する。そして、ステップS306において、記録部203は、記録媒体から符号化データを読み出し、通信部204により、読み出した符号化データをPC100に送信し、ステップS301に戻る。
Returning to the description of FIG. 3, in step S305, the
次に、図6及び図7を参照しながら、マクロブロックについて詳細に説明する。ここで、説明を簡単にするため、画像(フレーム)のサイズを64ピクセル×48ピクセルとし、画像を分割するマクロブロックの1つのサイズを16×16であるものとして説明する。
図6は、画像をマクロブロックに分割した状態を示す図である。
図6において、マクロブロック内の数字は、オリジナル画像の表示位置を表すインデックスを示す。実施形態1では、左上から右下に順にインデックスを割り当てているが、インデックスの割り当てルールは、記録、再生側で統一されていれば、特に何でもよい。また、図7には、図6に示す画像を図8に示すマクロブロック並び替えテーブル800を参照して並び替えた状態を示している。
Next, macroblocks will be described in detail with reference to FIGS. Here, in order to simplify the description, it is assumed that the size of an image (frame) is 64 pixels × 48 pixels, and one macroblock that divides the image is 16 × 16.
FIG. 6 is a diagram illustrating a state in which an image is divided into macro blocks.
In FIG. 6, the numbers in the macroblock indicate an index representing the display position of the original image. In the first embodiment, indexes are assigned in order from the upper left to the lower right, but the index assignment rules may be anything as long as they are unified on the recording and reproduction side. FIG. 7 shows a state in which the image shown in FIG. 6 is rearranged with reference to the macroblock rearrangement table 800 shown in FIG.
次に、図8を参照しながら、マクロブロック並び替えテーブル800の詳細について説明する。
マクロブロック並び替えテーブル800の要素数801には、画像をマクロブロックに分割する際のマクロブロック数が記録される。図6に示す例では、「12」が記録される。一方、マクロブロック並び替えテーブル800の並び替えインデックス802には、インデックスの並びを変更する際のランダム関数など必要な情報が記録される。図6に示す例では、12個のマクロブロックのインデックスの並び替え順序の情報が記録される。
Next, details of the macroblock rearrangement table 800 will be described with reference to FIG.
In the
また、前述したように、マクロブロック並び替えテーブル800には、現在のフレームに適用されるマクロブロック並び替えテーブルと前フレームまでに適用されていたマクロブロック並び替えテーブルとがある。このため、符号化データのピクチャレイヤ内のユーザーデータには、それぞれのテーブルにタグIDが割り当てられて記録される。さらに、スタート/ストップボタンが再度押された際に、動画の最終フレームとなる符号化データを作成し、そのピクチャレイヤ内のユーザーデータに、現在のフレームに適用されるマクロブロック並び替えテーブルを記録するようにしてもよい。 As described above, the macroblock rearrangement table 800 includes a macroblock rearrangement table applied to the current frame and a macroblock rearrangement table applied up to the previous frame. For this reason, tag data is assigned to each table and recorded in the user data in the picture layer of the encoded data. Furthermore, when the start / stop button is pressed again, the encoded data that will be the last frame of the video is created, and the macroblock rearrangement table applied to the current frame is recorded in the user data in the picture layer. You may make it do.
次に、再生処理について説明する。実施形態1においては、PC100側が撮像装置200から符号化データを受信した場合の再生処理について説明する。通信部104を介して、撮像装置200から符号化データを受信すると、画像復号化部105は、暗号化データとピクチャレイヤ内のマクロブロック並び替えテーブルとを取り出す。そして、暗号復号化部106は、マクロブロック並び替えテーブルを基に暗号化データを暗号復号化して映像データを取り出す。最後に、CPU101の制御により、取り出した映像データに係る映像を表示部107に表示する。この一連の処理は、撮像装置200から符号化データが受信されなくなるまで繰り返される。
Next, the reproduction process will be described. In the first embodiment, a description will be given of a reproduction process when the
次に、図9を参照しながら、実施形態1に係るPC100で行われる処理について説明する。図9は、実施形態1に係るPC100において行われる再生処理手順の一例を示すフローチャートである。なお、図9のフローチャートが示す処理は、PC100と撮像装置200とがインターフェース300を介して接続され、PC100及び撮像装置200が電源オン状態であるときに実行される処理である。また、図9のフローチャートに示す処理は、CPU101がメモリ102に記憶されているコンピュータプログラムを実行することによって制御される。
Next, processing performed by the
図9において、通信部104により撮像装置200から符号化データを受信すると、処理を開始する。そして、ステップS901において、撮像装置200から符号化データが受信されなくなったか否かを判定する。この判定の結果、受信が終了した場合は、再生処理を終了する。一方、受信が終了していない場合は、ステップS902においては、画像復号化部105により画像復号化処理を行い、暗号化データとピクチャレイヤ内のユーザーデータとを取り出す。
In FIG. 9, when encoded data is received from the
図10は、画像復号化部105により図9のステップS902において行われる復号化処理の詳細な手順の一例を示すフローチャートである。
まず、ステップS1001において、撮像装置200から送られた符号化データに対して画像復号化を行い、暗号化データ(暗号化されたフレーム)とピクチャレイヤ内のユーザーデータとを取り出す。次に、ステップS1002において、ピクチャレイヤ内のユーザーデータを解析する。そして、ステップS1003において、ユーザーデータにマクロブロック並び替えテーブルが存在するか否かを判定する。この判定の結果、マクロブロック並び替えテーブルが存在しない場合は、処理を終了する。一方、ステップS1003の判定の結果、マクロブロック並び替えテーブルが存在する場合は、ステップS1004において、マクロブロック並び替えテーブルをメモリ102に記憶し、処理を終了する。
FIG. 10 is a flowchart illustrating an example of a detailed procedure of the decoding process performed by the
First, in step S1001, image decoding is performed on the encoded data sent from the
図9の説明に戻り、次に、ステップS903において、暗号復号化部106は、暗号化データに対して暗号復号化を行って映像データを作成する。
Returning to the description of FIG. 9, in step S903, the encryption /
図11は、暗号復号化部106により図9のステップS903において行われる暗号復号化処理の詳細な手順の一例を示すフローチャートである。
まず、ステップS1101において、メモリ102からマクロブロック並び替えテーブルを検索する。そして、ステップS1102において、マクロブロック並び替えテーブルが記憶されているか否かを判定する。この判定の結果、マクロブロック並び替えテーブルが記憶されている場合は、ステップS1103へ進む。マクロブロック並び替えテーブルが記憶されていない場合には、ステップS1106へ進む。
FIG. 11 is a flowchart illustrating an example of a detailed procedure of the encryption / decryption process performed by the encryption /
First, in step S1101, the macro block rearrangement table is searched from the
ステップS1103においては、画像復号化されて暗号復号化されていない画像(フレーム)がメモリ102に記憶されているか否かを判定する。この判定の結果、メモリ102に記憶されている場合は、ステップS1104において、マクロブロック並び替えテーブルを参照してメモリ102に記憶された全てのフレームのマクロブロックを元の順序に並び替え、ステップS1105へ進む。
In step S <b> 1103, it is determined whether or not an image (frame) that has been decrypted and not decrypted is stored in the
一方、ステップS1103の判定の結果、メモリ102に記憶されていない場合は、ステップS1105において、マクロブロック並び替えテーブルを参照し、ステップS902で画像復号化されたフレームのマクロブロックを並び替えて映像データを作成する。そして、メモリ102に映像データを記憶し、処理を終了する。ここで、ステップS1105において、メモリ102に記憶されたフレームのマクロブロックを並び替えた場合は、ステップS1106でマクロブロックを並び替えたフレームとともに、映像データを1つにまとめる。一方、ステップS1102の判定の結果、マクロブロック並び替えテーブルが記憶されていない場合には、ステップS1106へ進む。そして、ステップS1106においては、復号化されたフレームを暗号復号化できないためメモリ102へ記憶し、処理を終了する。
On the other hand, if the result of determination in step S1103 is not stored in the
図9の説明に戻り、次に、ステップS904において、ステップS903において暗号復号化された映像データがメモリ102に記憶されているか否かを判定する。この判定の結果、映像データが記憶されている場合は、ステップS905において、メモリ102に記憶されている映像データを読み出し、表示部107に映像を表示し、ステップS901に戻る。一方、ステップS904の判定の結果、映像データが記憶されていない場合は、そのままステップS901に戻る。
Returning to the description of FIG. 9, next, in step S <b> 904, it is determined whether or not the video data encrypted / decrypted in step S <b> 903 is stored in the
以上説明したように、実施形態1によれば、現在のフレームのマクロブロック並び替えテーブルとともに、前回用いたマクロブロック並べ替えテーブルを付加するようにした。これにより、動画を分割した場合であっても、再生できない画像(フレーム)が存在してしまうことを防止できる。 As described above, according to the first embodiment, the previously used macroblock rearrangement table is added together with the macroblock rearrangement table of the current frame. Thereby, even when a moving image is divided, it is possible to prevent an image (frame) that cannot be reproduced from existing.
(実施形態2)
実施形態1では、撮像装置200において作成された映像データをPC100で受信して再生する方法について説明した。実施形態2では、撮像装置250において作成された映像データを撮像装置250において再生する方法について説明する。実施形態2においては、実施形態1と異なる部分を中心に説明し、実施形態1と同様の部分についてはその説明を省略する。
(Embodiment 2)
In the first embodiment, the method of receiving and reproducing the video data created in the
図12は、実施形態2に係る撮像装置250の構成例を示すブロック図である。
図12に示すように、撮像装置250は、実施形態1において示した撮像装置200の構成に加えて、暗号復号化部210と画像復号化部211とを有している。画像復号化部211は、記録部203によって不図示のメモリカードなどの記録媒体に記録された符号化データを画像復号化し、暗号化データとピクチャレイヤ内のユーザーデータとを取り出す。暗号復号化部210は、画像復号化部211により取り出された暗号化データを暗号復号化し、映像データを取り出す。また、表示部207は、暗号復号化部210により取り出された映像データに係る映像を表示する。
FIG. 12 is a block diagram illustrating a configuration example of the
As illustrated in FIG. 12, the
以下、図13を参照しながら、実施形態2に係る撮像装置250により行われる処理を説明する。図13は、実施形態2に係る撮像装置250により行われる撮影処理手順の一例を示すフローチャートである。なお、図13のフローチャートが示す処理は、撮像装置250が電源オン状態であるときに実行される処理である。また、図13のフローチャートに示す処理は、CPU201がメモリ202に記憶されているコンピュータプログラムを実行することによって制御される。
Hereinafter, processing performed by the
図13において、操作部208のモード変更ボタンから撮影モードに設定され、撮影待機中に操作部208のスタート/ストップボタンが押されることにより、処理を開始する。図3のフローチャートと異なる点は、ステップS106において符号化データを送信しない点である。それ以外は図3に示す処理と同様である。これにより、記録部203によって符号化データが記録される。
In FIG. 13, the shooting mode is set from the mode change button of the
次に、再生処理について説明する。前述したように実施形態2においては、記録部203によって記録された符号化データを撮像装置250において再生する処理について説明する。実施形態2の再生処理では、記録部203により符号化データを不図示の記録媒体から読み出し、画像復号化部211により暗号化データとピクチャレイヤ内のマクロブロック並び替えテーブルを取り出す。そして、暗号復号化部210によりマクロブロック並び替えテーブルを元に暗号化データを暗号復号化して映像データを取り出し、最後に、CPU201の制御により表示部207に映像データに係る映像を表示する。この一連の処理は、操作部208の再生停止ボタンが再度押されるまで繰り返される。
Next, the reproduction process will be described. As described above, in the second embodiment, a process for reproducing the encoded data recorded by the
次に、図14を参照しながら、実施形態2に係る撮像装置250により行われる処理を説明する。図14は、実施形態2に係る撮像装置250により行われる再生処理手順の一例を示すフローチャートである。なお、図14のフローチャートが示す処理は、撮像装置250が電源オン状態であるときに実行される処理である。また、図14のフローチャートに示す処理は、CPU101がメモリ102に記憶されているコンピュータプログラムを実行することによって制御される。
Next, processing performed by the
図14において、操作部208のモード変更ボタンから再生モードに設定され、操作部208の再生開始ボタンが押されることにより、処理を開始する。実施形態2では、再生する符号化データが存在するか否かを判定するために、図9のステップS901の処理の代わりにステップS1401及びS1402の処理を行う。
In FIG. 14, the playback mode is set from the mode change button of the
まず、ステップS1401において、再生中に再生停止ボタンが押されたか否かを判定する。この判定の結果、再生停止ボタンが押された場合は、処理を終了する。一方、ステップS1401の判定の結果、再生停止ボタンが押されていない場合は、ステップS1402において、再生している符号化データのファイルが終端に達したか否かを判定する。この判定の結果、終端に達した場合は、処理を終了し、終端に達していない場合は、ステップS902に進む。 First, in step S1401, it is determined whether or not a playback stop button has been pressed during playback. If the result of this determination is that the playback stop button has been pressed, the processing is terminated. On the other hand, if the result of determination in step S1401 is that the playback stop button has not been pressed, it is determined in step S1402 whether or not the encoded data file being played has reached the end. As a result of the determination, if the end has been reached, the process is terminated, and if the end has not been reached, the process proceeds to step S902.
ステップS902においては、記録部203により記録媒体から符号化データを読み出し、図10に示した手順で画像復号化部211により画像復号処理を行う。そして、ステップS903において、暗号復号化部210は、図11に示した手順で暗号データに対して暗号復号化し、映像データを生成する。なお、ステップS904〜S905は、実施形態1と同様である。
In step S902, encoded data is read from the recording medium by the
以上説明したように、実施形態2によれば、撮像装置250で作成された映像データを撮像装置250内で再生することができる。
As described above, according to the second embodiment, the video data created by the
(実施形態3)
実施形態1及び2では、暗号化部205は、暗号化処理としてマクロブロックを並び替えた。実施形態3では、マクロブロックを並び替える代わりに、暗号鍵を用いた暗号関数により暗号化する方法について説明する。なお、実施形態3に係る撮像装置の構成は、実施形態1と同様であるため、その説明は省略する。また、実施形態3においては、実施形態1及び2と異なる部分を説明し、実施形態1及び2と同様の部分についてはその説明を省略する。
(Embodiment 3)
In the first and second embodiments, the
図15は、暗号化部205により図3のステップS303において行われる暗号化処理の詳細な手順の一例を示すフローチャートである。
ステップS401〜S404は、図4と同様である。そして、ステップS404の判定の結果、フレーム内符号化方式のフレーム数が所定値以上である場合は、ステップS1501において、画像(フレーム)を暗号化するための暗号鍵を作成する。そして、ステップS406において、図4のステップS406と同様の処理を行い、ステップS1502へ進む。一方、ステップS404の判定の結果、フレーム内符号化方式のフレーム数が所定値未満である場合は、ステップS1502において、ステップS1501で新たにもしくは既に作成された暗号鍵を用いて暗号化関数により暗号化し、暗号化データを作成する。そして、処理を終了する。
FIG. 15 is a flowchart illustrating an example of a detailed procedure of the encryption process performed by the
Steps S401 to S404 are the same as those in FIG. If the result of determination in step S404 is that the number of frames in the intraframe encoding method is equal to or greater than a predetermined value, an encryption key for encrypting an image (frame) is created in step S1501. In step S406, the same processing as in step S406 of FIG. 4 is performed, and the process proceeds to step S1502. On the other hand, as a result of the determination in step S404, if the number of frames in the intraframe encoding method is less than the predetermined value, in step S1502, the encryption function is encrypted using the encryption key newly or already created in step S1501. To create encrypted data. Then, the process ends.
図16は、画像符号化部206により図3のステップS304において行われる符号化処理の詳細な手順の一例を示すフローチャートである。
ステップS501〜S503は、図5と同様である。そして、ステップS1601において、判定した現在のフレームに適用される暗号鍵、及び前フレームまでのフレームに適用されていた暗号鍵をステップS501で作成した符号化データのピクチャレイヤ内のユーザーデータに記録し、処理を終了する。なお、最初のフレームの場合は、前フレームまでのフレームに適用されていた暗号鍵は存在しない、記録は行わない。
FIG. 16 is a flowchart illustrating an example of a detailed procedure of the encoding process performed by the
Steps S501 to S503 are the same as those in FIG. In step S1601, the encryption key applied to the determined current frame and the encryption key applied to the frames up to the previous frame are recorded in the user data in the picture layer of the encoded data created in step S501. The process is terminated. In the case of the first frame, there is no encryption key applied to the frames up to the previous frame, and no recording is performed.
また、再生処理については、図9に示す手順により再生を行う。このとき、図9のステップS902においては、図17に示すフローチャートに従って画像復号化を行う。また、図9のステップS903においては、図18に示すフローチャートに従って暗号復号化を行う。 As for the reproduction process, reproduction is performed according to the procedure shown in FIG. At this time, in step S902 of FIG. 9, image decoding is performed according to the flowchart shown in FIG. In step S903 in FIG. 9, encryption / decryption is performed according to the flowchart shown in FIG.
図17は、画像復号化部105により図9のステップS902において行われる復号化処理の詳細な手順の一例を示すフローチャートである。
ステップS1001は、図10のステップS1001と同様である。次に、ステップS1701において、ピクチャレイヤ内のユーザーデータを解析する。そして、ステップS1702において、ユーザーデータに暗号鍵が存在するか否かを判定する。この判定の結果、暗号鍵が存在しない場合は、処理を終了する。一方、ステップS1702の判定の結果、暗号鍵が存在する場合は、ステップS1703において、暗号鍵をメモリ102に記憶し、処理を終了する。
FIG. 17 is a flowchart illustrating an example of a detailed procedure of the decoding process performed by the
Step S1001 is the same as step S1001 of FIG. In step S1701, user data in the picture layer is analyzed. In step S1702, it is determined whether an encryption key exists in the user data. If the result of this determination is that there is no encryption key, the process ends. On the other hand, if the result of determination in step S1702 is that there is an encryption key, in step S1703, the encryption key is stored in the
図18は、暗号復号化部106により図9のステップS903において行われる暗号復号化処理の詳細な手順の一例を示すフローチャートである。
まず、ステップS1801において、メモリ102から暗号鍵を検索する。そして、ステップS1802において、暗号鍵が記憶されているか否かを判定する。この判定の結果、暗号鍵が記憶されている場合は、ステップS1103へ進み、暗号鍵が記憶されていない場合には、ステップS1106へ進む。
FIG. 18 is a flowchart illustrating an example of a detailed procedure of the encryption / decryption process performed by the encryption /
First, in step S1801, the encryption key is searched from the
ステップS1103においては、画像復号化されて暗号復号化されていない画像(フレーム)がメモリ102に記憶されているか否かを判定する。この判定の結果、メモリ102に記憶されている場合は、ステップS1803において、暗号鍵を参照してメモリ102に記憶された全てのフレームに対し、暗号鍵を用いた暗号関数により復号化して、ステップS1804へ進む。
In step S <b> 1103, it is determined whether or not an image (frame) that has been decrypted and not decrypted is stored in the
一方、ステップS1103の判定の結果、メモリ102に記憶されていない場合は、ステップS1804において、ステップS902で画像復号化されたフレームに対し、暗号鍵を用いた暗号関数により復号化して映像データを作成する。そして、メモリ102に映像データを記憶し、処理を終了する。ここで、ステップS1804において、メモリ102に記憶されたフレームを暗号復号化した場合は、ステップS1804で暗号復号化したフレームとともに、映像データを1つにまとめる。一方、ステップS1802の判定の結果、暗号鍵が記憶されていない場合には、ステップS1106へ進む。そして、ステップS1106においては、復号化されたフレームを暗号復号化できないためメモリ102へ記憶し、処理を終了する。
On the other hand, if it is not stored in the
以上説明したように、実施形態3によれば、撮像装置200の暗号化部205による暗号化処理として、マクロブロックの並び替えではなく、暗号鍵を利用した暗号関数による方法でも実現可能である。なお、実施形態3は、撮像装置200を実施形態2に係る撮像装置250に置き換えても実現可能である。
As described above, according to the third embodiment, the encryption processing by the
(実施形態4)
実施形態1〜3で説明した様々な機能及び処理は、パーソナルコンピュータ、マイクロコンピュータ、CPU(Central Processing Unit)などがコンピュータプログラムなどのソフトウェアを用いて実現することもできる。以下、実施形態4では、パーソナルコンピュータ、マイクロコンピュータ、CPUなどを「コンピュータ」と呼ぶ。また、実施形態4では、コンピュータプログラムなどのソフトウェアであって、上述の実施形態で説明した様々な機能及び処理を実現するためのソフトウェアを「所定のソフトウェア」と呼ぶ。
実施形態1〜3で説明した様々な機能及び処理は、コンピュータが所定のソフトウェアを実行することによって実現される。この場合において、所定のソフトウェアは、コンピュータ読取可能な記録媒体を介してコンピュータに供給される。実施形態4におけるコンピュータ読取可能な記録媒体は、ハードディスク装置、光ディスク、CD−ROM、CD−R、メモリカード、ROM、RAMなどを含む。また、実施形態4におけるコンピュータ読取可能な記録媒体は、non-transitory(非一時的)な記録媒体である。
(Embodiment 4)
Various functions and processes described in the first to third embodiments can be realized by a personal computer, a microcomputer, a CPU (Central Processing Unit), or the like using software such as a computer program. Hereinafter, in the fourth embodiment, a personal computer, a microcomputer, a CPU, and the like are referred to as a “computer”. In the fourth embodiment, software such as a computer program for realizing the various functions and processes described in the above embodiments is referred to as “predetermined software”.
Various functions and processes described in the first to third embodiments are realized by a computer executing predetermined software. In this case, the predetermined software is supplied to the computer via a computer-readable recording medium. The computer-readable recording medium in the fourth embodiment includes a hard disk device, an optical disk, a CD-ROM, a CD-R, a memory card, a ROM, a RAM, and the like. In addition, the computer-readable recording medium according to the fourth embodiment is a non-transitory recording medium.
205 暗号化部
206 画像符号化部
205
Claims (9)
前記生成手段により生成された暗号化情報に基づいて、前記動画データをフレームごとに暗号化する暗号化手段と、
前記暗号化手段によって暗号化されたフレームのうち、前記暗号化情報が変更されたタイミングのフレームに、前記フレームに適用されている暗号化情報と、前記フレームよりも前のフレームに適用されている暗号化情報とを付加して符号化する符号化手段とを有することを特徴とする暗号化装置。 Generating means for generating encryption information at a predetermined timing while changing the encryption information for the video data;
An encryption unit that encrypts the moving image data for each frame based on the encryption information generated by the generation unit;
Of the frames encrypted by the encryption means, the frame at the timing when the encryption information is changed is applied to the encryption information applied to the frame and the frame before the frame. An encryption apparatus comprising: encoding means for adding and encoding encryption information.
前記暗号化手段は、前記テーブルに従ってマクロブロックを並び替えることにより暗号化することを特徴とする請求項1から3のいずれか1項に記載の暗号化装置。 The generation means generates a table for rearranging macroblocks as the encryption information,
The encryption apparatus according to any one of claims 1 to 3, wherein the encryption unit performs encryption by rearranging macroblocks according to the table.
前記暗号化手段は、前記暗号鍵を用いた暗号関数により暗号化することを特徴とする請求項1から3のいずれか1項に記載の暗号化装置。 The generation means generates an encryption key as the encryption information,
The encryption apparatus according to any one of claims 1 to 3, wherein the encryption unit performs encryption by an encryption function using the encryption key.
前記生成ステップにおいて生成された暗号化情報に基づいて、前記動画データをフレームごとに暗号化する暗号化ステップと、
前記暗号化ステップにおいて暗号化されたフレームのうち、前記暗号化情報が変更されたタイミングのフレームに、前記フレームに適用されている暗号化情報と、前記フレームよりも前のフレームに適用されている暗号化情報とを付加して符号化する符号化ステップとを有することを特徴とする暗号化方法。 A generation step for generating encryption information at a predetermined timing while changing encryption information for video data;
An encryption step for encrypting the video data for each frame based on the encryption information generated in the generation step;
Among the frames encrypted in the encryption step, the encryption information applied to the frame and the frame before the frame are applied to the frame at the timing when the encryption information is changed. An encryption method comprising: an encoding step of encoding by adding encryption information.
前記生成ステップにおいて生成された暗号化情報に基づいて、前記動画データをフレームごとに暗号化する暗号化ステップと、
前記暗号化ステップにおいて暗号化されたフレームのうち、前記暗号化情報が変更されたタイミングのフレームに、前記フレームに適用されている暗号化情報と、前記フレームよりも前のフレームに適用されている暗号化情報とを付加して符号化する符号化ステップとをコンピュータに実行させることを特徴とするプログラム。 A generation step for generating encryption information at a predetermined timing while changing encryption information for video data;
An encryption step for encrypting the video data for each frame based on the encryption information generated in the generation step;
Among the frames encrypted in the encryption step, the encryption information applied to the frame and the frame before the frame are applied to the frame at the timing when the encryption information is changed. A program for causing a computer to execute an encoding step of encoding by adding encryption information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012285726A JP2014127990A (en) | 2012-12-27 | 2012-12-27 | Encryption apparatus, encryption method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012285726A JP2014127990A (en) | 2012-12-27 | 2012-12-27 | Encryption apparatus, encryption method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2014127990A true JP2014127990A (en) | 2014-07-07 |
Family
ID=51407145
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012285726A Pending JP2014127990A (en) | 2012-12-27 | 2012-12-27 | Encryption apparatus, encryption method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2014127990A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101602581B1 (en) * | 2014-11-27 | 2016-03-11 | 한동대학교 산학협력단 | Encription method and system for compressed video |
CN111800634A (en) * | 2020-06-30 | 2020-10-20 | 西安万像电子科技有限公司 | Image processing method and device |
-
2012
- 2012-12-27 JP JP2012285726A patent/JP2014127990A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101602581B1 (en) * | 2014-11-27 | 2016-03-11 | 한동대학교 산학협력단 | Encription method and system for compressed video |
CN111800634A (en) * | 2020-06-30 | 2020-10-20 | 西安万像电子科技有限公司 | Image processing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4525831B1 (en) | Image receiving apparatus and program | |
JP5092469B2 (en) | Imaging apparatus, image processing apparatus, image display control method, and computer program | |
JP2016504790A (en) | Moving image editing method, terminal and recording medium | |
JP5488056B2 (en) | Image processing apparatus, image processing method, and program | |
KR20120017649A (en) | Display apparatus and control method | |
KR102162714B1 (en) | Display control method, terminal and recording medium recording programs | |
JP2006350647A (en) | Image display method and image display | |
KR20120138224A (en) | Reproduction apparatus | |
JP2006191300A (en) | Digital camera and electronic equipment | |
JP2014127990A (en) | Encryption apparatus, encryption method and program | |
JP5166571B2 (en) | Electronic device, display control method, and display control program | |
JP5878295B2 (en) | Image processing apparatus, image processing method, and program | |
WO2015125420A1 (en) | Imaging apparatus and imaging system | |
JP2005020356A (en) | Video recording and reproducing device | |
JPWO2012001992A1 (en) | Video signal conversion apparatus and video signal conversion method | |
CN103905698A (en) | Imaging apparatus | |
JP6572107B2 (en) | Image processing apparatus and image processing method | |
JP2018098664A (en) | Recording device, control method therefor, computer program, and recording medium | |
JP5492269B2 (en) | Electronic device, display control method, and display control program | |
JP6170373B2 (en) | Recording apparatus and control method | |
JP2011099992A (en) | Image display device, image display method, and program | |
JP2016082266A (en) | Recording/reproducing apparatus | |
JP6218489B2 (en) | Image processing device | |
JP5925020B2 (en) | Playback device | |
JP6082269B2 (en) | Recording apparatus and control method thereof |