JP2014127990A - Encryption apparatus, encryption method and program - Google Patents

Encryption apparatus, encryption method and program Download PDF

Info

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
Application number
JP2012285726A
Other languages
Japanese (ja)
Inventor
Toshiaki Eguri
俊明 殖栗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2012285726A priority Critical patent/JP2014127990A/en
Publication of JP2014127990A publication Critical patent/JP2014127990A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an encryption apparatus, capable of generating moving image data that can be encrypted and decrypted when the moving image is divided.SOLUTION: An encryption unit 205 in an imaging apparatus 200 counts the number of image frames obtained by coding the moving image data by an in-frame coding method, to generate and encrypt a macro block and a rearrangement table by changing the macro block and the rearrangement table for each certain frame or uncertain frame. An image coding unit 206 adds to a frame a macro block and a rearrangement table applied to a preceding frame than the frame of concern, to code the frame at timing in which the macro block and the rearrangement table are changed among frames encrypted by the encryption unit 205.

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.

特開2001−275111号公報JP 2001-275111 A

しかしながら、従来の動画暗号化方法は、動画を分割した場合に、分割した後半の動画に含まれる一部のフレームに対応する並び替え情報が、分割した前半の動画に含まれてしまう。そのため、分割した後半の動画の一部が暗号復号化できなくなってしまう。   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.

撮像装置を含む撮像システムの概略構成の一例を示す図である。It is a figure which shows an example of schematic structure of the imaging system containing an imaging device. 撮像装置及びPCの構成例を示すブロック図である。It is a block diagram which shows the structural example of an imaging device and PC. 実施形態1に係る撮影処理手順の一例を示すフローチャートである。6 is a flowchart illustrating an example of a shooting processing procedure according to the first embodiment. 暗号化処理の詳細な手順の一例を示すフローチャートである。It is a flowchart which shows an example of the detailed procedure of an encryption process. 符号化処理の詳細な手順の一例を示すフローチャートである。It is a flowchart which shows an example of the detailed procedure of an encoding process. 並び替える前のマクロブロックを説明する図である。It is a figure explaining the macroblock before rearrangement. 並び替えた後のマクロブロックを説明する図である。It is a figure explaining the macroblock after rearrangement. マクロブロック並び替えテーブルを説明する図である。It is a figure explaining a macroblock rearrangement table. 実施形態1に係る再生処理手順の一例を示すフローチャートである。4 is a flowchart illustrating an example of a reproduction processing procedure according to the first embodiment. 画像復号化処理の詳細な手順の一例を示すフローチャートである。It is a flowchart which shows an example of the detailed procedure of an image decoding process. 暗号復号化処理の詳細な手順の一例を示すフローチャートである。It is a flowchart which shows an example of the detailed procedure of an encryption / decryption process. 撮像装置の概略構成の一例を示す図である。It is a figure which shows an example of schematic structure of an imaging device. 実施形態2に係る撮影処理手順の一例を示すフローチャートである。10 is a flowchart illustrating an example of a shooting processing procedure according to the second embodiment. 実施形態2に係る再生処理手順の一例を示すフローチャートである。10 is a flowchart illustrating an example of a reproduction processing procedure according to the second embodiment. 暗号化処理の詳細な手順の一例を示すフローチャートである。It is a flowchart which shows an example of the detailed procedure of an encryption process. 符号化処理の詳細な手順の一例を示すフローチャートである。It is a flowchart which shows an example of the detailed procedure of an encoding process. 画像復号化処理の詳細な手順の一例を示すフローチャートである。It is a flowchart which shows an example of the detailed procedure of an image decoding process. 暗号復号化処理の詳細な手順の一例を示すフローチャートである。It is a flowchart which shows an example of the detailed procedure of an encryption / decryption process.

以下、本発明の実施形態について、図面を参照しながら説明する。
(実施形態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 imaging device 200 such as a digital camera are connected via an interface 300. For example, USB (Universal Serial Bus) can be used as the interface 300, but a communication interface other than USB can also be used.

実施形態1では、撮像装置200としてデジタルカメラを例に説明するが、実施形態1に係る撮像装置200はデジタルカメラ以外の装置により構成することも可能である。また、実施形態1における撮像装置200は、例えばカメラ機能付き携帯電話など、デジタルカメラとして動作する動作モードを有する装置により構成することも可能である。さらに、実施形態1では、撮像装置200に記録される画像データは、動画データを前提としているが、動画の符号化方式は、フレーム内符号化方式、フレーム間符号化方式を用いたもの、または、これらを組み合わせたものなどフォーマットは問わない。   In the first embodiment, a digital camera will be described as an example of the imaging device 200. However, the imaging device 200 according to the first embodiment can be configured by a device other than the digital camera. In addition, the imaging apparatus 200 according to the first embodiment can be configured by an apparatus having an operation mode that operates as a digital camera, such as a mobile phone with a camera function. Furthermore, in the first embodiment, the image data recorded in the imaging apparatus 200 is premised on moving image data, but the moving image encoding method uses an intra-frame encoding method, an inter-frame encoding method, or Any format such as a combination of these may be used.

図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 imaging device 200 according to the first embodiment.
As illustrated in FIG. 2, the PC 100 includes a CPU (Central Processing Unit) 101, a memory 102, a communication unit 104, an image decryption unit 105, an encryption / decryption unit 106, a display unit 107, and an operation unit 108. .

CPU101は、PC100全体を制御するためのものである。画像復号化部105は、撮像装置200で作成された符号化データを復号化し、暗号化データとピクチャレイヤ内のユーザーデータとを取り出す。暗号復号化部106は、画像復号化部105において取り出された暗号化データを復号化し、映像データを取り出す。表示部107は、液晶ディスプレイ等の表示器により構成されており、メモリ102または通信部104から供給された符号化データを基に、画像復号化部105及び暗号復号化部106において処理した結果の映像データに係る映像を表示する。また、表示部107は、メモリ102に記憶されているメニュー画面のデータをグラフィカルユーザインターフェース(GUI)として表示することもできる。なお、メニュー画面には、PC100を制御するためのPC制御画面、PC100の設定を変更するためのPC設定画面、画像復号化部105及び暗号復号化部106で処理した結果の映像を表示するための画像表示画面等を含む。   The CPU 101 is for controlling the entire PC 100. The image decoding unit 105 decodes the encoded data created by the imaging device 200 and extracts the encrypted data and user data in the picture layer. The encryption / decryption unit 106 decrypts the encrypted data extracted by the image decoding unit 105 and extracts video data. The display unit 107 is configured by a display device such as a liquid crystal display. Based on the encoded data supplied from the memory 102 or the communication unit 104, the display unit 107 is a result of processing performed by the image decoding unit 105 and the encryption / decryption unit 106. The video related to the video data is displayed. The display unit 107 can also display menu screen data stored in the memory 102 as a graphical user interface (GUI). The menu screen is for displaying a PC control screen for controlling the PC 100, a PC setting screen for changing the settings of the PC 100, and an image obtained as a result of processing by the image decoding unit 105 and the encryption / decryption unit 106. Image display screen.

操作部108は、PC100を操作するためのユーザインターフェースである。また、操作部108は、PC100を操作するための操作手段として、不図示のマウスや不図示のタブレット、トラックボール等のポインティングデバイスやキーボードを有する。これらのポインティングデバイスをユーザが操作することによって、メニュー画面上で操作を行うことができる。   The operation unit 108 is a user interface for operating the PC 100. In addition, the operation unit 108 includes a pointing device such as a mouse (not shown), a tablet (not shown), a trackball, and a keyboard as operation means for operating the PC 100. The user can operate these pointing devices on the menu screen.

次に、撮像装置200の構成について説明する。
図2に示すように、撮像装置200は、CPU201、メモリ202、記録部203、通信部204、暗号化部205、画像符号化部206、表示部207、操作部208、及び撮像部209を有している。
Next, the configuration of the imaging device 200 will be described.
As illustrated in FIG. 2, the imaging apparatus 200 includes a CPU 201, a memory 202, a recording unit 203, a communication unit 204, an encryption unit 205, an image encoding unit 206, a display unit 207, an operation unit 208, and an imaging unit 209. doing.

CPU201は、撮像装置200全体を制御するためのものである。メモリ202には、撮像装置200を制御するためのコンピュータプログラムや、表示部207に表示するための所定の画像データやアイコンの情報等が記憶されている。記録部203は、画像符号化部206によって作成された符号化データを不図示のメモリカードなどの記録媒体に書き込む。表示部207は、液晶ディスプレイ等により構成されており、撮像装置200の動作モードが撮影モードである場合に、撮像部209により生成された映像データに係る映像を表示する。一方、撮像装置200の動作モードが再生モードである場合、表示部207は、記録媒体から再生された映像データに係る映像を表示する。   The CPU 201 is for controlling the entire imaging apparatus 200. The memory 202 stores a computer program for controlling the imaging apparatus 200, predetermined image data to be displayed on the display unit 207, icon information, and the like. The recording unit 203 writes the encoded data created by the image encoding unit 206 in a recording medium such as a memory card (not shown). The display unit 207 is configured by a liquid crystal display or the like, and displays a video related to the video data generated by the imaging unit 209 when the operation mode of the imaging device 200 is a shooting mode. On the other hand, when the operation mode of the imaging apparatus 200 is the playback mode, the display unit 207 displays the video related to the video data played back from the recording medium.

暗号化部205は、撮像部209から出力された映像データの各フレームをマクロブロックに分割し、暗号化情報として作成されたマクロブロック並び替えテーブルに従ってマクロブロックを並び替えて暗号化データを作成する。なお、マクロブロック並び替えテーブルの詳細については、図6の説明において後述する。また、暗号化部205は、映像データの画像符号化方式がフレーム内符号化かフレーム間符号化かを判定する。さらに、暗号化部205において、フレーム内符号化方式によって符号化する画像(フレーム)をカウントし、所定数のフレーム毎もしくは不定フレーム毎に、マクロブロック並び替えテーブルを変更する。ここで、暗号化部205において、変更するタイミングとして時刻をカウントし、一定時間毎もしくは不定時間毎に、マクロブロック並び替えテーブルを変更できるようにしてもよい。   The encryption unit 205 divides each frame of the video data output from the imaging unit 209 into macro blocks, and rearranges the macro blocks according to the macro block rearrangement table created as the encryption information, thereby creating encrypted data. . Details of the macroblock rearrangement table will be described later in the description of FIG. The encryption unit 205 determines whether the image data encoding method of the video data is intraframe encoding or interframe encoding. Further, the encryption unit 205 counts images (frames) to be encoded by the intraframe encoding method, and changes the macroblock rearrangement table for every predetermined number of frames or for each indefinite frame. Here, the encryption unit 205 may count the time as the change timing and change the macroblock rearrangement table at regular time intervals or at indefinite time intervals.

画像符号化部206は、暗号化部205によりマクロブロックが並び替えられた映像データを、例えば、MPEG符号化方式によって符号化し、符号化データを作成する。この時、フレーム内符号化の場合には、判定した現在のフレームに適用されるマクロブロック並び替えテーブル、及び前フレームまでのフレームに適用されていたマクロブロック並び替えテーブルをピクチャレイヤ内のユーザーデータに挿入する。ユーザーデータを挿入する際にはMPEGシンタックスに従って挿入する。   The image encoding unit 206 encodes the video data in which the macroblocks are rearranged by the encryption unit 205 using, for example, an MPEG encoding method, and generates encoded data. At this time, in the case of intra-frame encoding, 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 displayed as user data in the picture layer. Insert into. When inserting user data, it is inserted according to the MPEG syntax.

操作部208は、撮像装置200を操作するためのユーザインターフェースであり、撮像装置200を操作するための複数のボタンを有し、ユーザからの指示は、操作部208を介してCPU201に入力される。操作部208内の各ボタンは、スイッチ、タッチパネル等により構成される。また、操作部208は、シャッターボタン、電源ボタン、スタート/ストップボタン、モード変更ボタン、メニューボタン、十字ボタン、SETボタン等を有する。   The operation unit 208 is a user interface for operating the imaging device 200 and has a plurality of buttons for operating the imaging device 200, and instructions from the user are input to the CPU 201 via the operation unit 208. . Each button in the operation unit 208 includes a switch, a touch panel, and the like. The operation unit 208 includes a shutter button, a power button, a start / stop button, a mode change button, a menu button, a cross button, a SET button, and the like.

スタート/ストップボタンは、撮像部209によって生成された映像データ等を記録媒体に記録するのを開始したり一時停止したりCPU201に指示するボタンである。モード変更ボタンは、撮像装置200の動作モードを撮影モード、再生モード等のいずれかに変更することをCPU201に指示するボタンである。なお、撮像装置200の動作モードが撮影モードの時に、スタート/ストップボタンが押されることにより撮像部209が行う撮影処理については、後述する。メニューボタンは、撮像装置200のメニュー画面を表示したり非表示したりすることをCPU201に指示するボタンである。撮像装置200のメニュー画面は、撮像装置200を制御するためのメニュー画面、及び撮像装置200の設定を変更するためのメニュー画面が含まれており、これらのメニュー画面のデータは、メモリ202に記憶されている。   The start / stop button is a button for instructing the CPU 201 to start or temporarily stop recording of video data generated by the imaging unit 209 on a recording medium. The mode change button is a button for instructing the CPU 201 to change the operation mode of the imaging apparatus 200 to any one of the shooting mode, the playback mode, and the like. Note that shooting processing performed by the imaging unit 209 when the start / stop button is pressed when the operation mode of the imaging device 200 is the shooting mode will be described later. The menu button is a button for instructing the CPU 201 to display or hide the menu screen of the imaging apparatus 200. The menu screen of the imaging apparatus 200 includes a menu screen for controlling the imaging apparatus 200 and a menu screen for changing settings of the imaging apparatus 200. Data of these menu screens is stored in the memory 202. Has been.

また、操作部208は、さらに再生開始ボタン、再生停止ボタン、一時停止ボタン、早送りボタン、巻き戻しボタン等を有する。これらのボタンは、記録媒体に記録された映像データの再生(play)、停止(stop)、一時停止(pause)、早送り(fast forward)及び巻き戻し(rewind)の実行をCPU201に指示するボタンである。   The operation unit 208 further includes a playback start button, a playback stop button, a pause button, a fast forward button, a rewind button, and the like. These buttons are buttons for instructing the CPU 201 to execute play, stop, pause, fast forward and rewind of video data recorded on the recording medium. is there.

次に、撮影処理について説明する。撮影処理は、撮像装置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 imaging apparatus 200 is in the shooting mode standby state. In the moving image shooting process, the video data output from the imaging unit 209 is encrypted by the encryption unit 205, further encoded by the image encoding unit 206, and recorded as encoded data on the recording medium by the recording unit 203. . Then, the encoded data is sent to the PC 100 via the communication unit 204. This series of processing is repeated until the start / stop button of the operation unit 208 is pressed again.

次に、図3を参照しながら、実施形態1に係る撮像装置200により行われる処理を説明する。図3は、実施形態1に係る撮像装置200により行われる撮影処理手順の一例を示すフローチャートである。なお、図3のフローチャートが示す処理は、PC100と撮像装置200とがインターフェース300を介して接続され、PC100及び撮像装置200が電源オン状態であるときに実行される処理である。また、図3のフローチャートに示す処理は、CPU201がメモリ202に記憶されているコンピュータプログラムを実行することによって制御される。   Next, processing performed by the imaging apparatus 200 according to the first embodiment will be described with reference to FIG. FIG. 3 is a flowchart illustrating an example of a shooting processing procedure performed by the imaging apparatus 200 according to the first embodiment. 3 is a process executed when the PC 100 and the imaging apparatus 200 are connected via the interface 300 and the PC 100 and the imaging apparatus 200 are in a power-on state. The process shown in the flowchart of FIG. 3 is controlled by the CPU 201 executing a computer program stored in the memory 202.

図3において、操作部208のモード変更ボタンから撮影モードに設定され、撮影待機中に操作部208のスタート/ストップボタンが押されることにより、処理を開始する。そして、ステップS301において、操作部208のスタート/ストップボタンが再び押されたか否かを判定する。この判定の結果、スタート/ストップボタンが再び押された場合は、撮影処理を終了する。一方、スタート/ストップボタンが再び押されていない場合は、ステップS302において、撮像部209により撮影処理を行い、映像データを作成する。次に、ステップS303において、暗号化部205は、映像データを暗号化して、暗号化データを作成する。   In FIG. 3, the shooting mode is set from the mode change button of the operation unit 208, and the process starts when the start / stop button of the operation unit 208 is pressed during shooting standby. In step S301, it is determined whether or not the start / stop button of the operation unit 208 has been pressed again. If the result of this determination is that the start / stop button has been pressed again, the shooting process is terminated. On the other hand, if the start / stop button has not been pressed again, in step S302, the imaging unit 209 performs shooting processing to create video data. Next, in step S303, the encryption unit 205 encrypts the video data to create encrypted data.

図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 encryption unit 205 in step S303 of FIG.
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 image encoding unit 206 encodes the encrypted data using the macroblock rearrangement table to create encoded data.

図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 image encoding unit 206 in step S304 of FIG.
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 recording unit 203 records the encoded data created in step S304 on a recording medium. In step S306, the recording unit 203 reads the encoded data from the recording medium, transmits the read encoded data to the PC 100 by the communication unit 204, and returns to step S301.

次に、図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 element number 801 of the macroblock rearrangement table 800, the number of macroblocks when an image is divided into macroblocks is recorded. In the example shown in FIG. 6, “12” is recorded. On the other hand, in the rearrangement index 802 of the macroblock rearrangement table 800, necessary information such as a random function for changing the index arrangement is recorded. In the example shown in FIG. 6, information on the rearrangement order of the indexes of 12 macroblocks is recorded.

また、前述したように、マクロブロック並び替えテーブル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 PC 100 side receives encoded data from the imaging apparatus 200. When the encoded data is received from the imaging apparatus 200 via the communication unit 104, the image decoding unit 105 extracts the encrypted data and the macroblock rearrangement table in the picture layer. Then, the encryption / decryption unit 106 decrypts the encrypted data based on the macroblock rearrangement table and extracts the video data. Finally, the video related to the extracted video data is displayed on the display unit 107 under the control of the CPU 101. This series of processing is repeated until no encoded data is received from the imaging apparatus 200.

次に、図9を参照しながら、実施形態1に係るPC100で行われる処理について説明する。図9は、実施形態1に係るPC100において行われる再生処理手順の一例を示すフローチャートである。なお、図9のフローチャートが示す処理は、PC100と撮像装置200とがインターフェース300を介して接続され、PC100及び撮像装置200が電源オン状態であるときに実行される処理である。また、図9のフローチャートに示す処理は、CPU101がメモリ102に記憶されているコンピュータプログラムを実行することによって制御される。   Next, processing performed by the PC 100 according to the first embodiment will be described with reference to FIG. FIG. 9 is a flowchart illustrating an example of a reproduction processing procedure performed in the PC 100 according to the first embodiment. 9 is a process executed when the PC 100 and the imaging device 200 are connected via the interface 300, and the PC 100 and the imaging device 200 are in the power-on state. Further, the processing shown in the flowchart of FIG. 9 is controlled by the CPU 101 executing a computer program stored in the memory 102.

図9において、通信部104により撮像装置200から符号化データを受信すると、処理を開始する。そして、ステップS901において、撮像装置200から符号化データが受信されなくなったか否かを判定する。この判定の結果、受信が終了した場合は、再生処理を終了する。一方、受信が終了していない場合は、ステップS902においては、画像復号化部105により画像復号化処理を行い、暗号化データとピクチャレイヤ内のユーザーデータとを取り出す。   In FIG. 9, when encoded data is received from the imaging apparatus 200 by the communication unit 104, processing is started. In step S901, it is determined whether encoded data is no longer received from the imaging apparatus 200. If reception is completed as a result of this determination, the reproduction process is terminated. On the other hand, if reception has not ended, in step S902, the image decoding unit 105 performs image decoding processing to extract encrypted data and user data in the picture layer.

図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 image decoding unit 105 in step S902 of FIG.
First, in step S1001, image decoding is performed on the encoded data sent from the imaging apparatus 200, and the encrypted data (encrypted frame) and user data in the picture layer are extracted. Next, in step S1002, user data in the picture layer is analyzed. In step S1003, it is determined whether a macroblock rearrangement table exists in the user data. If the result of this determination is that there is no macroblock rearrangement table, the process ends. On the other hand, if the result of determination in step S1003 is that a macroblock rearrangement table exists, in step S1004, the macroblock rearrangement table is stored in the memory 102, and the process ends.

図9の説明に戻り、次に、ステップS903において、暗号復号化部106は、暗号化データに対して暗号復号化を行って映像データを作成する。   Returning to the description of FIG. 9, in step S903, the encryption / decryption unit 106 performs encryption / decryption on the encrypted data to create video data.

図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 / decryption unit 106 in step S903 of FIG.
First, in step S1101, the macro block rearrangement table is searched from the memory 102. In step S1102, it is determined whether a macroblock rearrangement table is stored. If the result of this determination is that a macroblock rearrangement table is stored, the process advances to step S1103. If the macroblock rearrangement table is not stored, the process proceeds to step S1106.

ステップ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 memory 102. If the result of this determination is that it has been stored in the memory 102, in step S1104, the macroblocks of all the frames stored in the memory 102 are rearranged in the original order with reference to the macroblock rearrangement table, and step S1105. Proceed to

一方、ステップ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 memory 102, the macroblock rearrangement table is referred to in step S1105, and the macroblocks of the frame decoded in step S902 are rearranged to obtain video data. Create Then, the video data is stored in the memory 102, and the process ends. If the macroblocks of the frames stored in the memory 102 are rearranged in step S1105, the video data is combined into one together with the frames in which the macroblocks are rearranged in step S1106. On the other hand, if the result of determination in step S1102 is that no macroblock rearrangement table is stored, the process advances to step S1106. In step S1106, since the decrypted frame cannot be decrypted, it is stored in the memory 102, and the process ends.

図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 memory 102. If the result of this determination is that video data is stored, the video data stored in the memory 102 is read in step S905, the video is displayed on the display unit 107, and the process returns to step S901. On the other hand, if the result of determination in step S904 is that no video data is stored, processing returns directly to step S901.

以上説明したように、実施形態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 imaging apparatus 200 by the PC 100 has been described. In the second embodiment, a method for reproducing video data created by the imaging apparatus 250 on the imaging apparatus 250 will be described. In the second embodiment, the description will focus on parts different from the first embodiment, and the description of the same parts as in the first embodiment will be omitted.

図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 imaging apparatus 250 according to the second embodiment.
As illustrated in FIG. 12, the imaging device 250 includes an encryption / decryption unit 210 and an image decryption unit 211 in addition to the configuration of the imaging device 200 illustrated in the first embodiment. The image decryption unit 211 performs image decryption on the encoded data recorded on a recording medium such as a memory card (not shown) by the recording unit 203, and extracts the encrypted data and user data in the picture layer. The encryption / decryption unit 210 decrypts the encrypted data extracted by the image decoding unit 211 and extracts video data. Further, the display unit 207 displays a video related to the video data extracted by the encryption / decryption unit 210.

以下、図13を参照しながら、実施形態2に係る撮像装置250により行われる処理を説明する。図13は、実施形態2に係る撮像装置250により行われる撮影処理手順の一例を示すフローチャートである。なお、図13のフローチャートが示す処理は、撮像装置250が電源オン状態であるときに実行される処理である。また、図13のフローチャートに示す処理は、CPU201がメモリ202に記憶されているコンピュータプログラムを実行することによって制御される。   Hereinafter, processing performed by the imaging apparatus 250 according to the second embodiment will be described with reference to FIG. FIG. 13 is a flowchart illustrating an example of an imaging processing procedure performed by the imaging apparatus 250 according to the second embodiment. Note that the process illustrated in the flowchart of FIG. 13 is a process executed when the imaging apparatus 250 is in the power-on state. Further, the process shown in the flowchart of FIG. 13 is controlled by the CPU 201 executing a computer program stored in the memory 202.

図13において、操作部208のモード変更ボタンから撮影モードに設定され、撮影待機中に操作部208のスタート/ストップボタンが押されることにより、処理を開始する。図3のフローチャートと異なる点は、ステップS106において符号化データを送信しない点である。それ以外は図3に示す処理と同様である。これにより、記録部203によって符号化データが記録される。   In FIG. 13, the shooting mode is set from the mode change button of the operation unit 208, and the processing is started when the start / stop button of the operation unit 208 is pressed during shooting standby. A difference from the flowchart of FIG. 3 is that encoded data is not transmitted in step S106. The other processes are the same as those shown in FIG. As a result, the encoded data is recorded by the recording unit 203.

次に、再生処理について説明する。前述したように実施形態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 recording unit 203 in the imaging apparatus 250 will be described. In the reproduction processing of the second embodiment, the encoded data is read from a recording medium (not shown) by the recording unit 203, and the encrypted data and the macroblock rearrangement table in the picture layer are extracted by the image decoding unit 211. Then, the encryption / decryption unit 210 decrypts the encrypted data based on the macroblock rearrangement table to extract the video data, and finally displays the video related to the video data on the display unit 207 under the control of the CPU 201. This series of processing is repeated until the playback stop button of the operation unit 208 is pressed again.

次に、図14を参照しながら、実施形態2に係る撮像装置250により行われる処理を説明する。図14は、実施形態2に係る撮像装置250により行われる再生処理手順の一例を示すフローチャートである。なお、図14のフローチャートが示す処理は、撮像装置250が電源オン状態であるときに実行される処理である。また、図14のフローチャートに示す処理は、CPU101がメモリ102に記憶されているコンピュータプログラムを実行することによって制御される。   Next, processing performed by the imaging apparatus 250 according to the second embodiment will be described with reference to FIG. FIG. 14 is a flowchart illustrating an example of a reproduction processing procedure performed by the imaging apparatus 250 according to the second embodiment. Note that the process illustrated in the flowchart of FIG. 14 is a process executed when the imaging apparatus 250 is in the power-on state. Further, the process shown in the flowchart of FIG. 14 is controlled by the CPU 101 executing a computer program stored in the memory 102.

図14において、操作部208のモード変更ボタンから再生モードに設定され、操作部208の再生開始ボタンが押されることにより、処理を開始する。実施形態2では、再生する符号化データが存在するか否かを判定するために、図9のステップS901の処理の代わりにステップS1401及びS1402の処理を行う。   In FIG. 14, the playback mode is set from the mode change button of the operation unit 208, and the process starts when the playback start button of the operation unit 208 is pressed. In the second embodiment, in order to determine whether or not there is encoded data to be reproduced, the processes in steps S1401 and S1402 are performed instead of the process in step S901 in FIG.

まず、ステップ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 recording unit 203, and image decoding processing is performed by the image decoding unit 211 in the procedure shown in FIG. In step S903, the encryption / decryption unit 210 performs encryption / decryption on the encrypted data according to the procedure illustrated in FIG. 11 to generate video data. Steps S904 to S905 are the same as those in the first embodiment.

以上説明したように、実施形態2によれば、撮像装置250で作成された映像データを撮像装置250内で再生することができる。   As described above, according to the second embodiment, the video data created by the imaging device 250 can be reproduced in the imaging device 250.

(実施形態3)
実施形態1及び2では、暗号化部205は、暗号化処理としてマクロブロックを並び替えた。実施形態3では、マクロブロックを並び替える代わりに、暗号鍵を用いた暗号関数により暗号化する方法について説明する。なお、実施形態3に係る撮像装置の構成は、実施形態1と同様であるため、その説明は省略する。また、実施形態3においては、実施形態1及び2と異なる部分を説明し、実施形態1及び2と同様の部分についてはその説明を省略する。
(Embodiment 3)
In the first and second embodiments, the encryption unit 205 rearranges macroblocks as encryption processing. In the third embodiment, a method of performing encryption using an encryption function using an encryption key instead of rearranging macroblocks will be described. Note that the configuration of the imaging apparatus according to the third embodiment is the same as that of the first embodiment, and a description thereof will be omitted. In the third embodiment, parts different from the first and second embodiments will be described, and the description of the same parts as the first and second embodiments will be omitted.

図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 encryption unit 205 in step S303 of FIG.
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 image encoding unit 206 in step S304 of FIG.
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 image decoding unit 105 in step S902 of FIG.
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 memory 102, and the process ends.

図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 / decryption unit 106 in step S903 of FIG.
First, in step S1801, the encryption key is searched from the memory 102. In step S1802, it is determined whether an encryption key is stored. As a result of this determination, if an encryption key is stored, the process proceeds to step S1103. If an encryption key is not stored, the process proceeds to step S1106.

ステップ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 memory 102. If the result of this determination is that it has been stored in the memory 102, in step S1803, all frames stored in the memory 102 with reference to the encryption key are decrypted by an encryption function using the encryption key, and step S1803 is executed. The process proceeds to S1804.

一方、ステップS1103の判定の結果、メモリ102に記憶されていない場合は、ステップS1804において、ステップS902で画像復号化されたフレームに対し、暗号鍵を用いた暗号関数により復号化して映像データを作成する。そして、メモリ102に映像データを記憶し、処理を終了する。ここで、ステップS1804において、メモリ102に記憶されたフレームを暗号復号化した場合は、ステップS1804で暗号復号化したフレームとともに、映像データを1つにまとめる。一方、ステップS1802の判定の結果、暗号鍵が記憶されていない場合には、ステップS1106へ進む。そして、ステップS1106においては、復号化されたフレームを暗号復号化できないためメモリ102へ記憶し、処理を終了する。   On the other hand, if it is not stored in the memory 102 as a result of the determination in step S1103, in step S1804, the frame decoded in step S902 is decrypted with an encryption function using an encryption key to generate video data. To do. Then, the video data is stored in the memory 102, and the process ends. If the frame stored in the memory 102 is encrypted / decrypted in step S1804, the video data is combined into one together with the frame encrypted / decrypted in step S1804. On the other hand, if the result of determination in step S1802 is that no encryption key is stored, processing proceeds to step S1106. In step S1106, since the decrypted frame cannot be decrypted, it is stored in the memory 102, and the process ends.

以上説明したように、実施形態3によれば、撮像装置200の暗号化部205による暗号化処理として、マクロブロックの並び替えではなく、暗号鍵を利用した暗号関数による方法でも実現可能である。なお、実施形態3は、撮像装置200を実施形態2に係る撮像装置250に置き換えても実現可能である。   As described above, according to the third embodiment, the encryption processing by the encryption unit 205 of the imaging apparatus 200 can be realized by a method using an encryption function using an encryption key instead of rearranging macroblocks. The third embodiment can also be realized by replacing the imaging device 200 with the imaging device 250 according to the second embodiment.

(実施形態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 Encryption Unit 206 Image Encoding Unit

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に記載の暗号化装置。   The encryption apparatus according to claim 1, wherein the generation unit generates encryption information for each predetermined number of frames. 前記生成手段は、一定時間毎に暗号化情報を生成することを特徴とする請求項1に記載の暗号化装置。   The encryption apparatus according to claim 1, wherein the generation unit generates encryption information at regular time intervals. 前記生成手段は、前記暗号化情報としてマクロブロックを並べ替えるためのテーブルを生成し、
前記暗号化手段は、前記テーブルに従ってマクロブロックを並び替えることにより暗号化することを特徴とする請求項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.
前記符号化手段は、フレーム内符号化方式を用いるフレームに対して暗号化情報を付加することを特徴とする請求項1から5のいずれか1項に記載の暗号化装置。   The encryption apparatus according to claim 1, wherein the encoding unit adds encryption information to a frame using an intra-frame encoding method. 前記符号化手段は、フレーム内符号化方式、またはフレーム間符号化方式により符号化を行うことを特徴とする請求項1から6のいずれか1項に記載の暗号化装置。   The encryption apparatus according to any one of claims 1 to 6, wherein the encoding unit performs encoding by an intra-frame encoding scheme or an inter-frame encoding scheme. 動画データに対し、暗号化情報を変更しながら所定のタイミングで暗号化情報を生成する生成ステップと、
前記生成ステップにおいて生成された暗号化情報に基づいて、前記動画データをフレームごとに暗号化する暗号化ステップと、
前記暗号化ステップにおいて暗号化されたフレームのうち、前記暗号化情報が変更されたタイミングのフレームに、前記フレームに適用されている暗号化情報と、前記フレームよりも前のフレームに適用されている暗号化情報とを付加して符号化する符号化ステップとを有することを特徴とする暗号化方法。
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.
JP2012285726A 2012-12-27 2012-12-27 Encryption apparatus, encryption method and program Pending JP2014127990A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (2)

* Cited by examiner, † Cited by third party
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