[go: up one dir, main page]

JP2016015669A - Moving image restoration device, moving image restoration method, and program for moving image restoration device - Google Patents

Moving image restoration device, moving image restoration method, and program for moving image restoration device Download PDF

Info

Publication number
JP2016015669A
JP2016015669A JP2014137497A JP2014137497A JP2016015669A JP 2016015669 A JP2016015669 A JP 2016015669A JP 2014137497 A JP2014137497 A JP 2014137497A JP 2014137497 A JP2014137497 A JP 2014137497A JP 2016015669 A JP2016015669 A JP 2016015669A
Authority
JP
Japan
Prior art keywords
moving image
frame information
frame
file
image file
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.)
Granted
Application number
JP2014137497A
Other languages
Japanese (ja)
Other versions
JP6451102B2 (en
Inventor
美明 青山
Yoshiaki Aoyama
美明 青山
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2014137497A priority Critical patent/JP6451102B2/en
Publication of JP2016015669A publication Critical patent/JP2016015669A/en
Application granted granted Critical
Publication of JP6451102B2 publication Critical patent/JP6451102B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a moving image restoration device 10 etc. which needs no record of a file other than a moving image file such as a restoration file.SOLUTION: A moving image file of a moving image is acquired and frame information relating to the frame part of the moving image file is extracted from a header part of the acquired moving image file (S13). Each frame of the frame part is retrieved and the frame information is calculated (S14 to S17). The extracted frame information is compared with the calculated frame information (S18). When the extracted frame information is different from the calculated frame information, the frame information of the header part is replaced with the calculated frame information (S30) and a moving image file is restored (S31).

Description

本発明は、動画を修復するための動画修復装置、動画修復方法、および、動画修復装置用のプログラムに関する。   The present invention relates to a moving image restoration device, a moving image restoration method, and a program for a moving image restoration device for restoring a moving image.

監視カメラにより撮像した動画データの書き込みに不良が生じ、修復が必要となる場合がある。例えば、特許文献1には、デジタルカメラに対して、記録する一連のデータのファイル情報を修復用ファイル情報として更新し、データファイルとともに更新した修復用ファイル情報を記録媒体に記録し、ドライブ電源切断、蓋あけ、衝撃等によって書き込み処理が中断されると、更新された修復用ファイル情報を検索して読み出し、読み出された修復用ファイル情報に基づいて記録が中断されたファイルのファイル情報を復元するデータ記録再生装置が開示されている。   In some cases, the writing of moving image data picked up by the monitoring camera is defective and needs to be repaired. For example, in Patent Document 1, file information of a series of data to be recorded is updated as restoration file information for a digital camera, the restoration file information updated together with the data file is recorded on a recording medium, and the drive power is turned off. When the writing process is interrupted due to opening, opening, impact, etc., the updated repair file information is retrieved and read, and the file information of the file whose recording was interrupted is restored based on the read repair file information. A data recording / reproducing apparatus is disclosed.

特開2003−169293公報JP 2003-169293 A

しかしながら、特許文献1の技術では、動画データとは別に修復用ファイルとして保存しているので、記録媒体の容量を消費し、パソコン等によるデータのコピー、移動などでも制約が生じていた。また、修復用ファイル自体が正常に保存されない場合等の対応も必要になり、処理が煩雑になっていた。   However, in the technique of Patent Document 1, since it is stored as a restoration file separately from the moving image data, the capacity of the recording medium is consumed, and there is a restriction in copying and moving data using a personal computer or the like. In addition, it is necessary to cope with the case where the restoration file itself is not normally stored, and the processing becomes complicated.

そこで、本発明は上記の問題点等に鑑みて為されたもので、その課題の一例は、修復用ファイル等の動画ファイル以外のファイルの記録を必要としない動画修復装置等を提供することを目的とする。   Therefore, the present invention has been made in view of the above-described problems, and one example of the problem is to provide a moving image restoration device that does not require recording of a file other than a moving image file such as a restoration file. Objective.

上記の課題を解決するために、請求項1に記載の発明は、動画の動画ファイルを取得する動画ファイル取得手段と、前記取得した動画ファイルのヘッダ部から、当該動画ファイルのフレーム部に関するフレーム情報を抽出するフレーム情報抽出手段と、前記フレーム部の各フレームを検索して、前記フレーム情報を算出するフレーム情報算出手段と、前記抽出したフレーム情報と、前記算出したフレーム情報とを比較する比較手段と、前記抽出したフレーム情報と前記算出したフレーム情報とが異なる場合、前記ヘッダ部のフレーム情報を前記算出したフレーム情報に書き換えて、動画ファイルを修復する動画ファイル修復手段と、を備えることを特徴とする。   In order to solve the above-mentioned problem, the invention according to claim 1 is characterized in that a moving image file acquisition unit that acquires a moving image file of moving images and frame information relating to a frame portion of the moving image file from the header portion of the acquired moving image file. Frame information extracting means for extracting the frame information, frame information calculating means for searching for each frame in the frame portion to calculate the frame information, and comparing means for comparing the extracted frame information with the calculated frame information And, when the extracted frame information and the calculated frame information are different, rewrites the frame information of the header part to the calculated frame information, and includes a moving image file repairing unit that repairs the moving image file. And

また、請求項2に記載の発明は、請求項1に記載の動画修復装置において、前記フレーム情報算出手段が、前記フレーム部の各フレームを検索して、他のフレーム情報を算出し、前記動画ファイル修復手段が、前記他のフレーム情報から、前記動画ファイルの末尾部を生成することを特徴とする。   Further, the invention according to claim 2 is the moving image restoration apparatus according to claim 1, wherein the frame information calculation unit searches each frame of the frame portion to calculate other frame information, and The file restoration means generates a tail portion of the moving image file from the other frame information.

また、請求項3に記載の発明は、請求項2に記載の動画修復装置において、前記フレーム情報が、前記動画ファイルのフレーム数であり、前記他のフレーム情報が、各フレームのデータサイズであることを特徴とする。   In the moving image restoration device according to claim 2, the frame information is the number of frames of the moving image file, and the other frame information is a data size of each frame. It is characterized by that.

また、請求項4に記載の発明は、請求項1から請求項3のいずれか1項に記載の動画修復装置において、前記動画ファイルのファイル名が、記憶手段に記憶された順番を示すファイル名であり、前記動画ファイル取得手段が、前記ファイル名に基づき、前記記憶手段に最後に記憶された動画ファイルを取得することを特徴とする。   According to a fourth aspect of the present invention, there is provided the moving image restoration apparatus according to any one of the first to third aspects, wherein the file name of the moving image file indicates the order stored in the storage means. The moving image file acquisition unit acquires the moving image file stored last in the storage unit based on the file name.

また、請求項5に記載の発明は、動画ファイル取得手段が、動画の動画ファイルを取得する動画ファイル取得ステップと、フレーム情報抽出手段が、前記取得した動画ファイルのヘッダ部から、当該動画ファイルのフレーム部に関するフレーム情報を抽出するフレーム情報抽出ステップと、フレーム情報算出手段が、前記フレーム部の各フレームを検索して、前記フレーム情報を算出するフレーム情報算出ステップと、比較手段が、前記抽出したフレーム情報と、前記算出したフレーム情報とを比較する比較ステップと、動画ファイル修復手段が、前記抽出したフレーム情報と前記算出したフレーム情報とが異なる場合、前記ヘッダ部のフレーム情報を前記算出したフレーム情報に書き換えて、動画ファイルを修復する動画ファイル修復ステップと、を有することを特徴とする。   According to the fifth aspect of the present invention, the moving image file acquiring unit acquires the moving image file of the moving image, and the frame information extracting unit extracts the moving image file from the header portion of the acquired moving image file. A frame information extracting step for extracting frame information relating to the frame portion; a frame information calculating means for searching each frame of the frame portion to calculate the frame information; and a comparing means for extracting the frame information. The comparison step for comparing the frame information with the calculated frame information, and the moving image file restoration means, when the extracted frame information and the calculated frame information are different, the frame information of the header portion is the calculated frame Video file repair step to repair video files by rewriting information And having a flop, a.

また、請求項6に記載の発明は、コンピュータを、動画の動画ファイルを取得する動画ファイル取得手段、前記取得した動画ファイルのヘッダ部から、当該動画ファイルのフレーム部に関するフレーム情報を抽出するフレーム情報抽出手段、前記フレーム部の各フレームを検索して、前記フレーム情報を算出するフレーム情報算出手段、前記抽出したフレーム情報と、前記算出したフレーム情報とを比較する比較手段、および、前記抽出したフレーム情報と前記算出したフレーム情報とが異なる場合、前記ヘッダ部のフレーム情報を前記算出したフレーム情報に書き換えて、動画ファイルを修復する動画ファイル修復手段として機能させることを特徴とする。   According to a sixth aspect of the present invention, there is provided a video file acquisition means for acquiring a video file of a video, and frame information for extracting frame information relating to a frame portion of the video file from a header portion of the acquired video file. Extraction means, frame information calculation means for searching for each frame in the frame portion to calculate the frame information, comparison means for comparing the extracted frame information with the calculated frame information, and the extracted frame When the information and the calculated frame information are different, the frame information in the header portion is rewritten with the calculated frame information to function as a moving image file repair unit that repairs a moving image file.

本発明によれば、修復用ファイル等の動画ファイル以外のファイルを記録していなくても、動画ファイルを修復できる。   According to the present invention, a moving image file can be repaired even if a file other than a moving image file such as a repair file is not recorded.

本発明の実施形態に係る動画修復装置の概要構成例を示す模式図である。It is a schematic diagram which shows the example of a schematic structure of the moving image restoration apparatus which concerns on embodiment of this invention. 動画ファイルの構成例を示す模式図である。It is a schematic diagram which shows the structural example of a moving image file. 図1の動画修復装置の動作例を示すフローチャートである。It is a flowchart which shows the operation example of the moving image restoration apparatus of FIG. 動画ファイルの記憶領域の一例を示す模式図である。It is a schematic diagram which shows an example of the storage area of a moving image file. 図3のファイルチェックのサブルーチンの一例を示すフローチャートである。FIG. 4 is a flowchart illustrating an example of a file check subroutine of FIG. 3. FIG. 破損した動画ファイルの一例を示す模式図である。It is a schematic diagram which shows an example of the damaged moving image file. 破損した動画ファイルの一例を示す模式図である。It is a schematic diagram which shows an example of the damaged moving image file. 破損した動画ファイルの一例を示す模式図である。It is a schematic diagram which shows an example of the damaged moving image file. 図3のファイル修復のサブルーチンの一例を示すフローチャートである。4 is a flowchart illustrating an example of a file repair subroutine of FIG. 3. 修復された動画ファイルの一例を示す模式図である。It is a schematic diagram which shows an example of the restored moving image file.

以下、図面を参照して本発明の実施形態について説明する。なお、以下に説明する実施の形態は、動画修復装置に対して本発明を適用した場合の実施形態である。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. The embodiment described below is an embodiment when the present invention is applied to a moving image restoration apparatus.

[1.動画修復装置の構成および機能の概要]
(1.1 動画修復装置の構成および機能の概要)
[1. Overview of video restoration device configuration and functions]
(1.1 Overview of configuration and functions of video restoration device)

まず、本発明の一実施形態に係る動画修復装置の構成および概要機能について、図1を用いて説明する。   First, the configuration and outline function of a moving image restoration apparatus according to an embodiment of the present invention will be described with reference to FIG.

図1は、本発明の実施形態に係る動画修復装置の概要構成例を示す模式図である。   FIG. 1 is a schematic diagram illustrating a schematic configuration example of a moving image restoration apparatus according to an embodiment of the present invention.

図1に示すように、動画修復装置10は、動画を撮像するカメラ3からの動画データの入力を継続的に受け付ける入力部11と、動画データの複数のフレームを、所定の形式の動画ファイルに変換するシステム制御部12と、動画ファイルを記憶する記憶部13と、を有する。入力部11と、システム制御部12と、記憶部13とは、システムバス15を介して接続されている。なお、動画修復装置10は、ネットワークに接続可能な通信部(図示せず)を有してもよい。また、動画ファイルの形式の一例として、AVI(Audio Video Interleave)等が挙げられる。   As illustrated in FIG. 1, the moving image restoration apparatus 10 includes an input unit 11 that continuously receives input of moving image data from a camera 3 that captures moving images, and a plurality of frames of moving image data in a moving image file of a predetermined format. It has the system control part 12 which converts, and the memory | storage part 13 which memorize | stores a moving image file. The input unit 11, the system control unit 12, and the storage unit 13 are connected via a system bus 15. Note that the moving image restoration apparatus 10 may include a communication unit (not shown) that can be connected to a network. Moreover, AVI (Audio Video Interleave) etc. are mentioned as an example of the format of a moving image file.

カメラ3は、CMOS(Complementary Metal Oxide Semiconductor)またはCCD(Charge Coupled Device)のようなイメージセンサ(撮像手段の一例)と、レンズを有する。カメラ3は、例えば、車載カメラや、監視カメラである。   The camera 3 includes an image sensor (an example of an imaging unit) such as a complementary metal oxide semiconductor (CMOS) or a charge coupled device (CCD), and a lens. The camera 3 is, for example, an in-vehicle camera or a surveillance camera.

入力部11は、カメラ3とのインターフェース機能を有する。なお、入力部11は、TVを録画するために(例えば、多チャンネルの放送を同時録画するために)、TVとの接続のインターフェースを有してもよい。   The input unit 11 has an interface function with the camera 3. Note that the input unit 11 may have an interface connected to the TV in order to record the TV (for example, to simultaneously record a multi-channel broadcast).

システム制御部12は、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)等により構成されている。そして、システム制御部12は、動画データの複数のフレームをまとめたフレーム部、ヘッダ部と、インデックス部とからなる動画ファイルに変換する。システム制御部12は、動画ファイルのファイル名を生成する。   The system control unit 12 includes a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like. Then, the system control unit 12 converts the frame of the moving image data into a moving image file including a frame portion, a header portion, and an index portion. The system control unit 12 generates a file name of the moving image file.

記憶部13は、例えば、メモリカード、ハードディスクドライブ、シリコンディスクドライブ等の記録媒体13aにより構成されている。記憶部13は、メモリカード(記録媒体の一例)を装着するスロットを有する。記憶部13は、撮像した動画データ、オペレーティングシステムおよび各種プログラム等を記憶する。なお、各種プログラムは、例えば、他のサーバ装置等からネットワークを介して取得されるようにしてもよいし、記録媒体13aに記録されてドライブ装置を介して読み込まれるようにしてもよい。   The storage unit 13 includes a recording medium 13a such as a memory card, a hard disk drive, or a silicon disk drive, for example. The storage unit 13 has a slot for mounting a memory card (an example of a recording medium). The storage unit 13 stores captured moving image data, an operating system, various programs, and the like. Note that the various programs may be acquired from another server device or the like via a network, or may be recorded on the recording medium 13a and read via a drive device.

(1.2 動画ファイルの構成例)
次に、図2を用いて動画ファイルの構成例について説明する。
図2は、動画ファイルの構成例を示す模式図である。
(1.2 Example of video file structure)
Next, a configuration example of a moving image file will be described with reference to FIG.
FIG. 2 is a schematic diagram illustrating a configuration example of a moving image file.

図2に示すように、動画ファイルは、動画ファイルの先頭のヘッダ部と、ヘッダ部の次のフレーム部と、動画ファイルの末尾のインデックス部(末尾部の一例)と、を有する。   As shown in FIG. 2, the moving image file has a header portion at the beginning of the moving image file, a frame portion next to the header portion, and an index portion at the end of the moving image file (an example of the end portion).

ヘッダ部(HEADER)は、動画ファイルの形式を認識するための”RIFF” (Resource Interchange File Format)の4文字の識別子と、LISTチャンク等の複数のブロック等と、を有する。ヘッダ部には、動画ファイルの総フレーム数の情報、動画ファイルのデータサイズの情報等のヘッダ情報(フレーム情報の一例)が記載されている。   The header section (HEADER) has a 4-character identifier of “RIFF” (Resource Interchange File Format) for recognizing the format of the moving image file, and a plurality of blocks such as a LIST chunk. In the header portion, header information (an example of frame information) such as information on the total number of frames of the moving image file and information on the data size of the moving image file is described.

フレーム部(frame)は、複数のフレームからなる。各フレームは、JPEG(Joint Photographic Experts Group)形式等の圧縮画像の静止画データである。各フレームの先頭に、SOIマーカ(Start of Image)、末尾にEOIマーカ(End of Image)が付されている。SOIマーカには、例えば、16進”FFD8”が割り当てられている。EOIマーカには、例えば、16進”FFD9”が割り当てられている。   The frame part (frame) is composed of a plurality of frames. Each frame is still image data of a compressed image in JPEG (Joint Photographic Experts Group) format or the like. Each frame has an SOI marker (Start of Image) at the beginning and an EOI marker (End of Image) at the end. For example, hexadecimal “FFD8” is assigned to the SOI marker. For example, hexadecimal “FFD9” is assigned to the EOI marker.

インデックス部(INDEX)には、各フレームの相対アドレスを示すオフセット、各フレームのデータサイズの情報が記載される。   In the index part (INDEX), information indicating an offset indicating a relative address of each frame and a data size of each frame is described.

ここで、JPEG圧縮方式の場合、フレーム毎に圧縮後のサイズは異なるため、動画ファイルのファイルサイズ、ヘッダ部およびインデックス部のオフセット、サイズは可変となる。従って、録画は停止するまでデータサイズ、フレーム数、インデックス(各フレームのオフセット、サイズ)が不明であるため、停止時に、これらが算出され、ヘッダ部のヘッダ情報の更新、インデックス部の追加を行い動画ファイルの記録が完了する。具体的には、ヘッダ部のAVILISTMOVIタグのmoviListSizeにデータサイズが記載され、AVIMAINHEADERタグのdwTotalFramesに、算出されたフレーム数が上書きされる。そして、各フレームのオフセットとサイズで構成した情報が、インデックスとして動画ファイルの末尾に追加される。   Here, in the case of the JPEG compression method, since the size after compression is different for each frame, the file size of the moving image file, the offset of the header part and the index part, and the size are variable. Therefore, the data size, the number of frames, and the index (offset and size of each frame) are unknown until the recording is stopped. When the recording is stopped, these are calculated, the header information in the header part is updated, and the index part is added. Recording of the video file is complete. More specifically, the data size is described in mobiListSize of the AVILISTMOVI tag in the header part, and the calculated number of frames is overwritten in dwTotalFrames of the AVIMAINHEADER tag. Information composed of the offset and size of each frame is added to the end of the moving image file as an index.

ファイル名およびディレクトリ構造は、時間または録画順の番号により形成される。例えば、年月日でディレクトリを作成し、時間でサブディレクトリを作成し、ファイル名(記憶手段に記憶された順番を示すファイル名の一例)を分秒で作成する。また、録画順にナンバリングしたファイル名(記憶手段に記憶された順番を示すファイル名の一例)でもよい。   The file name and directory structure are formed by time or recording order numbers. For example, a directory is created by date, a subdirectory is created by time, and a file name (an example of a file name indicating the order stored in the storage means) is created in minutes and seconds. Moreover, the file name numbered in order of recording (an example of a file name indicating the order stored in the storage means) may be used.

[2.動画修復装置10の動作]
次に、本発明の1実施形態に係る動画修復装置10の動作について図3を用いて説明する。
図3は、動画修復装置の動作例を示すフローチャートである。
[2. Operation of video restoration device 10]
Next, the operation of the moving image restoration apparatus 10 according to one embodiment of the present invention will be described with reference to FIG.
FIG. 3 is a flowchart illustrating an operation example of the moving image restoration apparatus.

(2.1 動画修復装置の動作)
図3に示すように、動画修復装置10は、記録媒体13aが挿入されたか否かを判定する(ステップS1)。具体的には、動画修復装置10のシステム制御部12が、電源起動時に記憶部13のスロットに、メモリカードが挿入されたか否かを検出して判定する。
(2.1 Operation of video restoration device)
As shown in FIG. 3, the moving image restoration apparatus 10 determines whether or not the recording medium 13a has been inserted (step S1). Specifically, the system control unit 12 of the moving image restoration apparatus 10 determines whether or not a memory card has been inserted into the slot of the storage unit 13 when the power is turned on.

記録媒体が挿入されている場合(ステップS1;YES)、動画修復装置10は、記録媒体のデータをロードする(ステップS2)。具体的には、システム制御部12が、記憶部13のメモリカードにアクセスして、記録されているデータを読み込む。更に具体的には、メモリカードに記録してある動画ファイルに関連したディレクトリ情報、FAT情報を読み込み、録画の準備を行うためのロードを行う。   When the recording medium is inserted (step S1; YES), the moving image restoration apparatus 10 loads the data of the recording medium (step S2). Specifically, the system control unit 12 accesses the memory card in the storage unit 13 and reads the recorded data. More specifically, directory information and FAT information related to the moving image file recorded on the memory card are read, and loading is performed to prepare for recording.

このように、動画修復装置10は、動画の動画ファイルを取得する動画ファイル取得手段の一例として機能する。   As described above, the moving image restoration apparatus 10 functions as an example of a moving image file acquisition unit that acquires a moving image file.

なお、記録媒体が挿入されていない場合(ステップS1;NO)、ステップS1に戻り、挿入されるまで、待機状態となる。例えば、電源起動後にメモリカードが挿入されていない場合には、メモリカードの挿入を1秒間隔で確認し、メモリカードが挿入された場合にロードを行う。   If no recording medium is inserted (step S1; NO), the process returns to step S1 and enters a standby state until it is inserted. For example, when the memory card is not inserted after the power is turned on, insertion of the memory card is confirmed at intervals of 1 second, and loading is performed when the memory card is inserted.

次に、動画修復装置10は、上書きモードか否かを判定する(ステップS3)。具体的には、システム制御部12が、メモリカードに動画ファイルを書き込む際の方式が、メモリカードに上書きをするモードが否かを判定する。   Next, the moving image restoration apparatus 10 determines whether or not the overwrite mode is set (step S3). Specifically, the system control unit 12 determines whether or not the method for writing the moving image file to the memory card is a mode for overwriting the memory card.

上書きモードである場合(ステップS3;YES)、動画修復装置10は、記録媒体の空き容量があるか否かを判定する(ステップS4)。具体的には、システム制御部12が、ロード時に設定されている録画モードからファイル使用量を算出し、記憶部13に挿入されたメモリカードの空き容量を確認する。   When the overwrite mode is set (step S3; YES), the moving image restoration apparatus 10 determines whether or not there is a free space in the recording medium (step S4). Specifically, the system control unit 12 calculates the file usage amount from the recording mode set at the time of loading, and checks the free space of the memory card inserted in the storage unit 13.

記録媒体の空き容量が無い場合(ステップS4;NO)、動画修復装置10は、一番古いファイルを検索し、削除する(ステップS6)。具体的には、システム制御部12が、空き容量が無ければ、記憶部13に挿入されたメモリカードから一番古いファイルを検索し削除を行う。そして、動画修復装置10は、ステップS4に戻り、さらに空き容量を確認する。   When there is no free space on the recording medium (step S4; NO), the moving image restoration apparatus 10 searches for and deletes the oldest file (step S6). Specifically, if there is no free space, the system control unit 12 searches for and deletes the oldest file from the memory card inserted in the storage unit 13. Then, the moving image restoration apparatus 10 returns to step S4 and further checks the free space.

上書きモードでない場合(ステップS3;NO)、動画修復装置10は、記録媒体の空き容量があるか否かを判定する(ステップS6)。   If it is not the overwrite mode (step S3; NO), the moving image restoration apparatus 10 determines whether or not there is a free space in the recording medium (step S6).

記録媒体の空き容量が無い場合(ステップS6;NO)、処理が終了し、録画を開始する。   If there is no free space on the recording medium (step S6; NO), the process ends and recording starts.

記録媒体の空き容量がある場合(ステップS4;YES、または、ステップS6;YES)、動画修復装置10は、動画ファイルを検索する(ステップS7)。具体的には、システム制御部12が、ファイル名を検索し、最も新しい動画ファイル、すなわち、最後に記録された動画ファイルを求める。例えば、図4に示すように、動画修復装置10は、”ファイル4”の動画ファイルを検索して求める。   When the recording medium has free space (step S4; YES or step S6; YES), the moving image restoration apparatus 10 searches for a moving image file (step S7). Specifically, the system control unit 12 searches for the file name and obtains the newest moving image file, that is, the last recorded moving image file. For example, as illustrated in FIG. 4, the moving image restoration apparatus 10 searches for and obtains a moving image file of “file 4”.

このように、動画修復装置10は、動画の動画ファイルを取得する動画ファイル取得手段の一例として機能する。また、動画修復装置10は、前記ファイル名に基づき、前記記憶手段に最後に記憶された動画ファイルを取得する動画ファイル取得手段の一例として機能する。   As described above, the moving image restoration apparatus 10 functions as an example of a moving image file acquisition unit that acquires a moving image file. The moving image restoration apparatus 10 functions as an example of a moving image file acquisition unit that acquires a moving image file stored last in the storage unit based on the file name.

次に、動画修復装置10は、最後に記録した動画ファイルをチェックする(ステップS8)。具体的には、システム制御部12が、ファイルチェックのサブルーチンに従い、最後に記録した動画ファイルを、ファイルの先頭からチェックする。   Next, the moving image restoration apparatus 10 checks the last recorded moving image file (step S8). Specifically, the system control unit 12 checks the last recorded moving image file from the top of the file according to a file check subroutine.

このように、動画修復装置10は、動画の動画ファイルを取得する動画ファイル取得手段の一例として機能する。   As described above, the moving image restoration apparatus 10 functions as an example of a moving image file acquisition unit that acquires a moving image file.

次に、動画修復装置10は、動画ファイルが正常か否かを判定する(ステップS9)。例えば、システム制御部12が、最後に記録した動画ファイルのチェック結果(フラグ等)に基づき、動画ファイルが正常か否かを判定する。   Next, the moving image restoration apparatus 10 determines whether or not the moving image file is normal (step S9). For example, the system control unit 12 determines whether or not the moving image file is normal based on the check result (flag or the like) of the moving image file recorded last.

動画ファイルが正常でない場合(ステップS9;NO)、動画修復装置10は、ファイルを修復する(ステップS10)。具体的には、システム制御部12が、ファイル修復のサブルーチンに従い、破損した動画ファイルが正常に再生できるように、動画ファイルを修復する。   If the moving image file is not normal (step S9; NO), the moving image repairing apparatus 10 repairs the file (step S10). Specifically, the system control unit 12 repairs the moving image file so that the damaged moving image file can be normally reproduced according to the file repair subroutine.

動画ファイルが正常である場合(ステップS9;YES)、処理を終了して、録画を開始する、   If the video file is normal (step S9; YES), the process ends and recording starts.

(2.2 ファイルチェックのサブルーチン)
次に、ファイルチェックのサブルーチンについて、図5から図8を用いて説明する。
図5は、ファイルチェックのサブルーチンの一例を示すフローチャートである。図6は、破損した動画ファイルの一例を示す模式図である。図7は、破損した動画ファイルの一例を示す模式図である。図8は、破損した動画ファイルの一例を示す模式図である。
(2.2 File check subroutine)
Next, a file check subroutine will be described with reference to FIGS.
FIG. 5 is a flowchart illustrating an example of a file check subroutine. FIG. 6 is a schematic diagram illustrating an example of a damaged moving image file. FIG. 7 is a schematic diagram illustrating an example of a damaged moving image file. FIG. 8 is a schematic diagram illustrating an example of a damaged moving image file.

図5に示すように、動画修復装置10は、ヘッダ部が正常か否かを判定する(ステップS11)。具体的には、システム制御部12が、対象の動画ファイルのヘッダ部が、図2に示すような構成されているかを判定する。例えば、システム制御部12が、動画ファイルのヘッダ部の先頭から読み出し、ヘッダ部の最後のパラメータ”moviListSize"が存在するか否かを判定する。ヘッダ部の生成中に電源が切れたり、メモリカードが抜かれたりした場合、ヘッダ部の生成が完了せずに、中途半端なヘッダ部になる。   As shown in FIG. 5, the moving image restoration apparatus 10 determines whether or not the header portion is normal (step S11). Specifically, the system control unit 12 determines whether the header portion of the target moving image file is configured as shown in FIG. For example, the system control unit 12 reads from the head of the header part of the moving image file and determines whether or not the last parameter “moviListSize” of the header part exists. If the power is turned off or the memory card is removed during the generation of the header part, the generation of the header part is not completed and the header part becomes halfway.

このように、動画修復装置10は、動画の動画ファイルを取得する動画ファイル取得手段の一例として機能する。   As described above, the moving image restoration apparatus 10 functions as an example of a moving image file acquisition unit that acquires a moving image file.

ここで、動画ファイルの破損の原因として、録画中に、電源が切れたり、メモリカードが抜かれたりする場合が挙げられる。また、動画ファイルの破損のパターンとして、例えば、以下の3つ挙げられる。図6に示すように、動画ファイルのヘッダ部が破損する場合、図7に示すように、フレーム部が破損する場合(例えば、n+1番目のフレームが破損)、図8に示すように、n番目のフレームの後のインデックス部が破損する場合が挙げられる。フレームが破損している場合は、SOIマーカがあるが、EOIマーカが存在しなく、さらに、インデックス部が存在しない動画ファイルとなる。これらのように、停止時の処理が正常に行われないためデータサイズ、フレーム数、インデックスが存在しない動画ファイルとなる。   Here, as a cause of the damage of the moving image file, there is a case where the power is turned off or the memory card is removed during recording. Further, there are the following three examples of damage patterns of moving image files. As shown in FIG. 6, when the header portion of the moving image file is damaged, as shown in FIG. 7, when the frame portion is damaged (for example, the n + 1th frame is damaged), as shown in FIG. In this case, the index part after the frame is damaged. If the frame is damaged, there is an SOI marker, but there is no EOI marker, and the video file does not have an index part. As described above, since the process at the time of stopping is not normally performed, the moving image file does not have the data size, the number of frames, and the index.

ヘッダ部が正常で無い場合(ステップS11;NO)、動画修復装置10は、異常終了のフラグを設定し(ステップS12)、サブルーチンを終了する。   When the header portion is not normal (step S11; NO), the moving image restoration apparatus 10 sets an abnormal end flag (step S12) and ends the subroutine.

ヘッダ部が正常である場合(ステップS11;YES)、動画修復装置10は、総フレーム数を取得する(ステップS13)。具体的には、システム制御部12が、ヘッダ部から、動画ファイルの総フレーム数(フレーム情報の一例)を取得する。   When the header part is normal (step S11; YES), the moving image restoration apparatus 10 acquires the total number of frames (step S13). Specifically, the system control unit 12 acquires the total number of frames (an example of frame information) of the moving image file from the header part.

このように、動画修復装置10は、前記取得した動画ファイルのヘッダ部から、当該動画ファイルのフレーム部に関するフレーム情報を抽出するフレーム情報抽出手段の一例として機能する。   As described above, the moving image restoration apparatus 10 functions as an example of a frame information extraction unit that extracts frame information related to the frame portion of the moving image file from the header portion of the acquired moving image file.

次に、動画修復装置10は、フレーム部に検索のポインタを設定する(ステップS14)。具体的には、動画ファイル先頭から各フレームの先頭(SOI)を検索するため、システム制御部12が、フレーム部に検索のポインタを設定する。   Next, the moving image restoration apparatus 10 sets a search pointer in the frame portion (step S14). Specifically, in order to search for the top (SOI) of each frame from the top of the moving image file, the system control unit 12 sets a search pointer in the frame portion.

次に、動画修復装置10は、SOIマーカおよびEOIマーカを検索する(ステップS15)。具体的には、システム制御部12が、動画ファイルのフレーム部の先頭から読み出しながら、まず、SOIマーカを検索して、フレームの先頭を求める。そして、システム制御部12が、EOIマーカを検索する。検索しながら、フレームサイズを測定していく。   Next, the moving image restoration apparatus 10 searches for an SOI marker and an EOI marker (step S15). Specifically, the system control unit 12 first searches for the SOI marker while reading from the beginning of the frame portion of the moving image file to obtain the beginning of the frame. Then, the system control unit 12 searches for an EOI marker. While searching, measure the frame size.

このように、動画修復装置10は、動画の動画ファイルを取得する動画ファイル取得手段の一例として機能する。   As described above, the moving image restoration apparatus 10 functions as an example of a moving image file acquisition unit that acquires a moving image file.

次に、動画修復装置10は、マーカが存在するか否かを判定する(ステップS16)。具体的には、システム制御部12が、記憶部13のメモリカードのメモリ領域のポインタを進めて、SOIマーカまたはEOIマーカがあるか否かを判定して行く。   Next, the moving image restoration apparatus 10 determines whether or not a marker exists (step S16). Specifically, the system control unit 12 advances the pointer of the memory area of the memory card in the storage unit 13 and determines whether there is an SOI marker or an EOI marker.

マーカが存在する場合(ステップS16;YES)、動画修復装置10は、フレーム数をカウントし、インデックスにエントリを追加する(ステップS17)。具体的には、システム制御部12が、SOIマーカに対して、対応するEOIマーカがある場合、フレーム数(フレーム情報の一例)のカウントを1つ増加させ、同時に、フレームのサイズ(他のフレーム情報の一例)を求める。そして、システム制御部12が、インデックス部を生成するためのメモリ領域に、フレーム数や、フレーム番号、フレーム番号毎のフレームサイズ等を書き込み、インデックス部を順次構築していく。なお、インデックス部を生成するためのメモリ領域は、記憶部13に形成されている。   When the marker exists (step S16; YES), the moving image restoration apparatus 10 counts the number of frames and adds an entry to the index (step S17). Specifically, when there is a EOI marker corresponding to the SOI marker, the system control unit 12 increases the count of the number of frames (an example of frame information) by one, and at the same time, the size of the frame (another frame) An example of information) is obtained. Then, the system control unit 12 writes the number of frames, the frame number, the frame size for each frame number, and the like in the memory area for generating the index unit, and sequentially builds the index unit. Note that a memory area for generating the index part is formed in the storage part 13.

このように、動画修復装置10は、前記取得した動画ファイルのヘッダ部から、当該動画ファイルのフレーム部に関するフレーム情報を抽出するフレーム情報抽出手段の一例として機能する。また、動画修復装置10は、前記フレーム部の各フレームを検索して、前記フレーム情報を算出するフレーム情報算出手段の一例として機能する。また、動画修復装置10は、前記フレーム部の各フレームを検索して、他のフレーム情報を算出するフレーム情報算出手段の一例として機能する。   As described above, the moving image restoration apparatus 10 functions as an example of a frame information extraction unit that extracts frame information related to the frame portion of the moving image file from the header portion of the acquired moving image file. In addition, the moving image restoration apparatus 10 functions as an example of a frame information calculation unit that searches for each frame of the frame portion and calculates the frame information. The moving image restoration apparatus 10 functions as an example of a frame information calculation unit that searches each frame of the frame portion and calculates other frame information.

インデックスにエントリを追加した後、動画修復装置10は、ステップS15に戻る。   After adding the entry to the index, the moving image restoration apparatus 10 returns to step S15.

ポインタが進んでフレームがなくなって、マーカが存在しない場合(ステップS16;NO)、動画修復装置10は、フレーム数が等しいか否かを判定する(ステップS18)。具体的には、システム制御部12が、ヘッダ部に記載してあった総フレーム数(フレーム情報の一例)と、カウントしたフレーム数(他のフレーム情報の一例)とが一致する否かを判定する。一致していない場合は、フレーム部が破損している。   When the pointer advances and there are no frames and no marker exists (step S16; NO), the moving image restoration apparatus 10 determines whether or not the number of frames is equal (step S18). Specifically, the system control unit 12 determines whether or not the total number of frames (an example of frame information) described in the header part matches the counted number of frames (an example of other frame information). To do. If they do not match, the frame is damaged.

このように、動画修復装置10は、前記抽出したフレーム情報と、前記算出したフレーム情報とを比較する比較手段の一例として機能する。   As described above, the moving image restoration apparatus 10 functions as an example of a comparison unit that compares the extracted frame information with the calculated frame information.

フレーム数が等しく無い場合(ステップS18;NO)、動画修復装置10は、修復フラグを設定する(ステップS19)。具体的には、システム制御部12が、ファイルの修復が必要なので、修復フラグを設定し、サブルーチンを終了する。   When the number of frames is not equal (step S18; NO), the moving image restoration apparatus 10 sets a restoration flag (step S19). Specifically, since the system control unit 12 needs to repair the file, it sets a repair flag and ends the subroutine.

フレーム数が等しい場合(ステップS18;YES)、動画修復装置10は、正常終了のフラグを設定する(ステップS20)。具体的には、システム制御部12が、ファイルが破損していないので、正常終了のフラグを設定し、サブルーチンを終了する。   When the number of frames is equal (step S18; YES), the moving image restoration apparatus 10 sets a normal end flag (step S20). Specifically, since the file is not damaged, the system control unit 12 sets a normal end flag and ends the subroutine.

なお、インデックス部が破損している場合として、カウントしたフレーム数が、インデックス部の最後のフレームの番号と等しく無い場合、または、ヘッダ部の総フレーム数が、インデックス部の最後のフレームの番号と等しく無い場合、または、最後のフレームオフセットがあるが、最後のフレームデータ数が無い場合等が挙げられる。動画修復装置10は、これらの場合に該当するか否かにより、インデックス部が破損しているか否かを判定する。   In addition, as the case where the index part is damaged, when the number of counted frames is not equal to the number of the last frame of the index part, or the total number of frames of the header part is equal to the number of the last frame of the index part. Examples include a case where they are not equal, or a case where there is a final frame offset but there is no final number of frame data. The moving image restoration apparatus 10 determines whether or not the index portion is damaged depending on whether or not these cases are applicable.

(2.3 ファイル修復のサブルーチン)
次に、ファイル修復のサブルーチンについて、図9および図10を用いて説明する、
図9は、ファイル修復のサブルーチンの一例を示すフローチャートである。図10は、修復された動画ファイルの一例を示す模式図である。
(2.3 File restoration subroutine)
Next, the file repair subroutine will be described with reference to FIGS. 9 and 10.
FIG. 9 is a flowchart illustrating an example of a file repair subroutine. FIG. 10 is a schematic diagram illustrating an example of a restored moving image file.

図9に示すように、動画修復装置10は、ヘッダ部に検索したフレーム数を設定する(ステップS30)。具体的には、システム制御部12が、ヘッダ部の総フレーム数のタグに、カウントしたフレーム数を設定する。AVIMAINHEADERタグのdwTotalFramesにカウントしたフレーム数が上書きされる。   As shown in FIG. 9, the moving image restoration apparatus 10 sets the number of searched frames in the header part (step S30). Specifically, the system control unit 12 sets the counted number of frames in the tag of the total number of frames in the header part. The number of frames counted is overwritten in dwTotalFrames of the AVIMAINHEADER tag.

このように、動画修復装置10は、前記抽出したフレーム情報と前記算出したフレーム情報とが異なる場合、前記ヘッダ部のフレーム情報を前記算出したフレーム情報に書き換えて、動画ファイルを修復する動画ファイル修復手段の一例として機能する。   As described above, when the extracted frame information and the calculated frame information are different from each other, the moving image restoration apparatus 10 rewrites the frame information in the header portion with the calculated frame information and restores the moving image file. It functions as an example of means.

次に、動画修復装置10は、インデックス部を追加する(ステップS31)。具体的には、システム制御部12が、記憶部13に生成されたインデックス部に基づき、図10に示すように、フレーム部の最後のフレーム(n番目のフレーム)の後に、インデックス部(末尾部の一例)を追加して、動画ファイルを修復し、サブルーチンを終了する。例えば、n+1番目のフレームが破損している場合は、n番目のフレームの後に、インデックス部が追加され、動画ファイルが完成する。なお、図8に示すように、n番目のフレームの直後のインデックス部が破損している場合は、n番目のフレームの直後に、生成されたインデックス部が追加される。   Next, the moving image restoration apparatus 10 adds an index part (step S31). Specifically, based on the index part generated in the storage part 13, the system control part 12, as shown in FIG. 10, after the last frame (nth frame) of the frame part, the index part (tail part) Is added), the moving image file is repaired, and the subroutine is terminated. For example, if the (n + 1) th frame is damaged, an index part is added after the nth frame, and the moving image file is completed. As shown in FIG. 8, when the index part immediately after the nth frame is damaged, the generated index part is added immediately after the nth frame.

このように、動画修復装置10は、前記抽出したフレーム情報と前記算出したフレーム情報とが異なる場合、前記ヘッダ部のフレーム情報を前記算出したフレーム情報に書き換えて、動画ファイルを修復する動画ファイル修復手段の一例として機能する。また、動画修復装置10は、前記他のフレーム情報から、前記動画ファイルの末尾部を生成する動画ファイル修復手段の一例として機能する。   As described above, when the extracted frame information and the calculated frame information are different from each other, the moving image restoration apparatus 10 rewrites the frame information in the header portion with the calculated frame information and restores the moving image file. It functions as an example of means. In addition, the moving image restoration apparatus 10 functions as an example of a moving image file restoration unit that generates a tail portion of the moving image file from the other frame information.

以上、本実施形態によれば、動画の動画ファイルを取得し、取得した動画ファイルのヘッダ部から、当該動画ファイルのフレーム部に関するフレーム情報を抽出し、フレーム部の各フレームを検索して、フレーム情報を算出し、抽出したフレーム情報と、算出したフレーム情報とを比較し、抽出したフレーム情報と算出したフレーム情報とが異なる場合、ヘッダ部のフレーム情報を算出したフレーム情報に書き換えて、動画ファイルを修復することにより、修復用ファイル等の動画ファイル以外のファイルを記録していなくても、動画ファイルを修復できる。   As described above, according to the present embodiment, a moving image file of a moving image is acquired, frame information related to the frame portion of the moving image file is extracted from the header portion of the acquired moving image file, each frame in the frame portion is searched, Information is calculated, the extracted frame information is compared with the calculated frame information, and if the extracted frame information is different from the calculated frame information, the frame information in the header part is rewritten to the calculated frame information, and the video file By repairing the video file, the video file can be repaired even if a file other than the video file such as a repair file is not recorded.

修復用ファイルなど動画ファイル以外のファイルを記録しないため、記録媒体は必要最低限の容量のみ消費する。またパソコン等において、コピー、移動等のファイル操作も、動画ファイルのみで完結できる。パソコンの準備と小型メモリカードビデオレコーダーからメモリカードをパソコンに移動する等の手間が不要となる。   Since files other than video files, such as restoration files, are not recorded, the recording medium consumes only the minimum necessary capacity. In a personal computer or the like, file operations such as copying and moving can be completed with only a moving image file. Eliminates the need to prepare a personal computer and move the memory card from the small memory card video recorder to the personal computer.

また、電源断で動画ファイルを保護するために使用するバックアップ電源、電気二重層コンデンサ等のハードウェアが不要になる。   Moreover, hardware such as a backup power source and an electric double layer capacitor used for protecting the moving image file when the power is cut off is not required.

さらに、装置内で動画ファイルを修復するため、パソコンやパソコン用のソフトウェアの開発、インストールが不要となる。また、メモリカードのロード時に自動的に行うため操作の手間がかからない。   Furthermore, since the moving image file is restored in the apparatus, it is not necessary to develop and install a personal computer or software for the personal computer. Moreover, since it is automatically performed when the memory card is loaded, it does not take time and effort.

フレーム部の各フレームを検索して、他のフレーム情報を算出し、他のフレーム情報から、動画ファイルの末尾部を生成する場合、破損せずに残っているフレーム部の各フレームを検索して動画ファイルの末尾部が生成されるので、動画ファイル以外のファイルを使用せず、ファイルを修復できる。   When searching for each frame in the frame part, calculating other frame information, and generating the end part of the movie file from the other frame information, search for each frame in the remaining frame part without damage. Since the end of the movie file is generated, the file can be repaired without using a file other than the movie file.

また、フレーム情報が、動画ファイルのフレーム数であり、他のフレーム情報が、各フレームのデータサイズである場合、破損せずに残ったフレームのフレーム数やデータサイズから、容易に修復できる。   Further, when the frame information is the number of frames of the moving image file and the other frame information is the data size of each frame, it can be easily restored from the number of frames and the data size of the remaining frames without being damaged.

また、動画ファイルのファイル名が、記憶手段(記録媒体13a)に記憶された順番を示すファイル名であり、ファイル名に基づき、記憶手段に最後に記憶された動画ファイルを取得する場合、最後に記録したファイルの検索とチェックのみを行うため短時間で動作することができる。また、電源切断、記録媒体の取り出しによるファイルの破壊は記録中の動画ファイル、すなわち、最後に記録した動画ファイルが該当するため、この動画ファイルのみ検索を行うため処理も効率的になる。   When the file name of the moving image file is a file name indicating the order stored in the storage means (recording medium 13a), and the moving image file stored last in the storage means is acquired based on the file name, It can operate in a short time because it only searches and checks the recorded file. In addition, the destruction of the file due to the power-off or removal of the recording medium corresponds to the moving image file being recorded, that is, the last recorded moving image file. Therefore, only the moving image file is searched, and the processing becomes efficient.

さらに、本発明は、上記各実施形態に限定されるものでは無い。上記各実施形態は、例示であり、本発明の特許請求の範囲に記載された技術的思想と実質的に同一な構成を有し、同様な作用効果を奏するものは、いかなるものであっても本発明の技術的範囲に包含される。   Furthermore, the present invention is not limited to the above embodiments. Each of the embodiments described above is an exemplification, and any configuration that has substantially the same configuration as the technical idea described in the claims of the present invention and has the same operational effects can be used. It is included in the technical scope of the present invention.

10:動画修復装置
12:システム制御部
13:記憶部
13a:記録媒体(記憶手段)
10: moving image restoration device 12: system control unit 13: storage unit 13a: recording medium (storage unit)

Claims (6)

動画の動画ファイルを取得する動画ファイル取得手段と、
前記取得した動画ファイルのヘッダ部から、当該動画ファイルのフレーム部に関するフレーム情報を抽出するフレーム情報抽出手段と、
前記フレーム部の各フレームを検索して、前記フレーム情報を算出するフレーム情報算出手段と、
前記抽出したフレーム情報と、前記算出したフレーム情報とを比較する比較手段と、
前記抽出したフレーム情報と前記算出したフレーム情報とが異なる場合、前記ヘッダ部のフレーム情報を前記算出したフレーム情報に書き換えて、動画ファイルを修復する動画ファイル修復手段と、
を備えることを特徴とする動画修復装置。
A video file acquisition means for acquiring a video file of a video;
Frame information extraction means for extracting frame information relating to the frame portion of the moving image file from the header portion of the acquired moving image file;
Frame information calculation means for searching for each frame of the frame portion and calculating the frame information;
A comparing means for comparing the extracted frame information with the calculated frame information;
When the extracted frame information and the calculated frame information are different, the frame information in the header part is rewritten to the calculated frame information, and a moving image file repairing unit that repairs a moving image file;
A video restoration apparatus comprising:
請求項1に記載の動画修復装置において、
前記フレーム情報算出手段が、前記フレーム部の各フレームを検索して、他のフレーム情報を算出し、
前記動画ファイル修復手段が、前記他のフレーム情報から、前記動画ファイルの末尾部を生成することを特徴とする動画修復装置。
The moving image restoration apparatus according to claim 1,
The frame information calculation means searches each frame of the frame portion to calculate other frame information,
The moving image restoration apparatus, wherein the moving image file repairing unit generates a tail portion of the moving image file from the other frame information.
請求項2に記載の動画修復装置において、
前記フレーム情報が、前記動画ファイルのフレーム数であり、前記他のフレーム情報が、各フレームのデータサイズであることを特徴とする動画修復装置。
The moving image restoration apparatus according to claim 2,
The moving image restoration apparatus, wherein the frame information is the number of frames of the moving image file, and the other frame information is a data size of each frame.
請求項1から請求項3のいずれか1項に記載の動画修復装置において、
前記動画ファイルのファイル名が、記憶手段に記憶された順番を示すファイル名であり、
前記動画ファイル取得手段が、前記ファイル名に基づき、前記記憶手段に最後に記憶された動画ファイルを取得することを特徴とする動画修復装置。
In the moving image restoration device according to any one of claims 1 to 3,
The file name of the video file is a file name indicating the order stored in the storage means,
The moving image restoration apparatus, wherein the moving image file acquisition unit acquires a moving image file stored last in the storage unit based on the file name.
動画ファイル取得手段が、動画の動画ファイルを取得する動画ファイル取得ステップと、
フレーム情報抽出手段が、前記取得した動画ファイルのヘッダ部から、当該動画ファイルのフレーム部に関するフレーム情報を抽出するフレーム情報抽出ステップと、
フレーム情報算出手段が、前記フレーム部の各フレームを検索して、前記フレーム情報を算出するフレーム情報算出ステップと、
比較手段が、前記抽出したフレーム情報と、前記算出したフレーム情報とを比較する比較ステップと、
動画ファイル修復手段が、前記抽出したフレーム情報と前記算出したフレーム情報とが異なる場合、前記ヘッダ部のフレーム情報を前記算出したフレーム情報に書き換えて、動画ファイルを修復する動画ファイル修復ステップと、
を有することを特徴とする動画修復方法。
A video file acquisition step in which the video file acquisition means acquires a video file of the video;
A frame information extraction step for extracting frame information relating to the frame portion of the moving image file from the header portion of the acquired moving image file;
Frame information calculation means for searching for each frame of the frame portion and calculating the frame information;
A comparison step in which a comparing means compares the extracted frame information with the calculated frame information;
If the extracted frame information and the calculated frame information are different from each other, the moving image file repairing unit rewrites the frame information in the header part with the calculated frame information, and repairs the moving image file.
A moving image restoration method characterized by comprising:
コンピュータを、
動画の動画ファイルを取得する動画ファイル取得手段、
前記取得した動画ファイルのヘッダ部から、当該動画ファイルのフレーム部に関するフレーム情報を抽出するフレーム情報抽出手段、
前記フレーム部の各フレームを検索して、前記フレーム情報を算出するフレーム情報算出手段、
前記抽出したフレーム情報と、前記算出したフレーム情報とを比較する比較手段、および、
前記抽出したフレーム情報と前記算出したフレーム情報とが異なる場合、前記ヘッダ部のフレーム情報を前記算出したフレーム情報に書き換えて、動画ファイルを修復する動画ファイル修復手段として機能させることを特徴とする動画修復装置用のプログラム。
Computer
Video file acquisition means for acquiring video files of videos,
Frame information extracting means for extracting frame information relating to the frame portion of the moving image file from the header portion of the acquired moving image file;
Frame information calculation means for searching for each frame of the frame portion and calculating the frame information;
A comparison means for comparing the extracted frame information with the calculated frame information; and
When the extracted frame information and the calculated frame information are different, the frame information in the header portion is rewritten with the calculated frame information to function as a moving image file repairing unit that repairs a moving image file. Program for repair device.
JP2014137497A 2014-07-03 2014-07-03 Movie restoration device, movie restoration method, and program for movie restoration device Expired - Fee Related JP6451102B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014137497A JP6451102B2 (en) 2014-07-03 2014-07-03 Movie restoration device, movie restoration method, and program for movie restoration device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014137497A JP6451102B2 (en) 2014-07-03 2014-07-03 Movie restoration device, movie restoration method, and program for movie restoration device

Publications (2)

Publication Number Publication Date
JP2016015669A true JP2016015669A (en) 2016-01-28
JP6451102B2 JP6451102B2 (en) 2019-01-16

Family

ID=55231545

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014137497A Expired - Fee Related JP6451102B2 (en) 2014-07-03 2014-07-03 Movie restoration device, movie restoration method, and program for movie restoration device

Country Status (1)

Country Link
JP (1) JP6451102B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108961193A (en) * 2018-08-10 2018-12-07 厦门市美亚柏科信息股份有限公司 A kind of image repair method, device and storage medium
JPWO2021182089A1 (en) * 2020-03-09 2021-09-16
CN115211104A (en) * 2020-03-09 2022-10-18 索尼集团公司 Document processing apparatus, document processing method, and program
JP2023090299A (en) * 2021-12-17 2023-06-29 キヤノン株式会社 IMAGING DEVICE, CONTROL METHOD AND PROGRAM THEREOF
US12477236B2 (en) 2023-03-22 2025-11-18 Panasonic Intellectual Property Management Co., Ltd. Imaging apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005301641A (en) * 2004-04-12 2005-10-27 Matsushita Electric Ind Co Ltd Video shooting device
JP2007323694A (en) * 2006-05-30 2007-12-13 Sony Corp Recording apparatus and method, program, and recording medium
US20090067817A1 (en) * 2007-09-07 2009-03-12 Sunplus Technology Co., Ltd. Error recovery method for recording audio-video interleaved file
WO2009050894A1 (en) * 2007-10-17 2009-04-23 Panasonic Corporation Video recording device, video recording method, video recording program, and integrated circuit
JP2011090733A (en) * 2009-10-21 2011-05-06 Canon Inc Recording device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005301641A (en) * 2004-04-12 2005-10-27 Matsushita Electric Ind Co Ltd Video shooting device
JP2007323694A (en) * 2006-05-30 2007-12-13 Sony Corp Recording apparatus and method, program, and recording medium
US20090067817A1 (en) * 2007-09-07 2009-03-12 Sunplus Technology Co., Ltd. Error recovery method for recording audio-video interleaved file
WO2009050894A1 (en) * 2007-10-17 2009-04-23 Panasonic Corporation Video recording device, video recording method, video recording program, and integrated circuit
JP2011090733A (en) * 2009-10-21 2011-05-06 Canon Inc Recording device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108961193A (en) * 2018-08-10 2018-12-07 厦门市美亚柏科信息股份有限公司 A kind of image repair method, device and storage medium
CN108961193B (en) * 2018-08-10 2021-04-02 厦门市美亚柏科信息股份有限公司 Image restoration method, device and storage medium
JPWO2021182089A1 (en) * 2020-03-09 2021-09-16
WO2021182089A1 (en) * 2020-03-09 2021-09-16 ソニーグループ株式会社 File processing device, file processing method, and program
CN115211105A (en) * 2020-03-09 2022-10-18 索尼集团公司 Document processing apparatus, document processing method, and program
CN115211104A (en) * 2020-03-09 2022-10-18 索尼集团公司 Document processing apparatus, document processing method, and program
US12189678B2 (en) 2020-03-09 2025-01-07 Sony Group Corporation File processing device, file processing method, and program
JP7695618B2 (en) 2020-03-09 2025-06-19 ソニーグループ株式会社 File processing device, file processing method, and program
JP2023090299A (en) * 2021-12-17 2023-06-29 キヤノン株式会社 IMAGING DEVICE, CONTROL METHOD AND PROGRAM THEREOF
US12477236B2 (en) 2023-03-22 2025-11-18 Panasonic Intellectual Property Management Co., Ltd. Imaging apparatus

Also Published As

Publication number Publication date
JP6451102B2 (en) 2019-01-16

Similar Documents

Publication Publication Date Title
JP6107965B2 (en) Data storage device, data storage method, and data storage program
CN101105963B (en) Data processing system, information processing device and method, and recording and reproducing device
JP6451102B2 (en) Movie restoration device, movie restoration method, and program for movie restoration device
US9411690B2 (en) Security surveillance apparatus with networking and video recording functions and failure detecting and repairing method for storage device thereof
US8270813B2 (en) Apparatus, method and computer program for processing information
US8094993B2 (en) Video recording device, video recording method, video recording program, and integrated circuit
US8255590B2 (en) Image file transfer apparatus that detect whether transferred image files to an external device has been aborted or not
US8346064B2 (en) Recording apparatus, recording method, program and computer-readable recording medium
US20150098694A1 (en) Recording control apparatus, recording control method, and recording medium
US11343461B2 (en) Device, control method, and computer-readable storage medium
KR100881714B1 (en) Shooting device and file management method used for the shooting device
KR101549615B1 (en) A method for recovering CCTV video data in DVR by using time-based video index and matching scan of video data
US12174794B2 (en) Processing apparatus and control method thereof
JP2001045420A (en) RECORDING DEVICE, METHOD, AND COMPUTER-READABLE STORAGE MEDIUM
CN100421462C (en) Digital video data storage method
US20060098950A1 (en) Digital video recording device
JP2008219425A (en) Image processing apparatus and image processing method
KR101685043B1 (en) Determining method and acquiring method for past video data from overwritten video data of CCTV
JP2002229829A (en) File management information generation method and device
CN101981924B (en) Method for rapid archiving and restoring of video store
US20080008443A1 (en) Data management system and method
JP2017005325A (en) Imaging apparatus, imaging method, and program of the same
JP2011034166A (en) Data processing device, content management software and data processing system
JP2005115856A (en) Electronic camera, electronic camera control method, file management apparatus, and file management method
JPH0998363A (en) Recording device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170529

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180313

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180501

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180614

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20181113

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181126

R150 Certificate of patent or registration of utility model

Ref document number: 6451102

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees