JP2007060334A - Image processing device and method therefor - Google Patents

Image processing device and method therefor Download PDF

Info

Publication number
JP2007060334A
JP2007060334A JP2005243721A JP2005243721A JP2007060334A JP 2007060334 A JP2007060334 A JP 2007060334A JP 2005243721 A JP2005243721 A JP 2005243721A JP 2005243721 A JP2005243721 A JP 2005243721A JP 2007060334 A JP2007060334 A JP 2007060334A
Authority
JP
Japan
Prior art keywords
data
code data
image processing
code
image data
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.)
Withdrawn
Application number
JP2005243721A
Other languages
Japanese (ja)
Inventor
Yoshiaki Mimata
義昭 三又
Taichi Nagata
太一 永田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2005243721A priority Critical patent/JP2007060334A/en
Publication of JP2007060334A publication Critical patent/JP2007060334A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To realize unification of data management and improve processing efficiency in a process of partial image data rewrite. <P>SOLUTION: Code data in a replacing objective portion are separated with a restart marker in original code data, and are replaced with a rewriting code data compressed under the same condition as the original code data. In addition, the replacement position information and code data in the replacement objective portion are stored in an application marker. As a result, the replacement of the original code data is realized. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、画像処理装置及び画像処理方法に関し、特に画像の一部分を書き換える部分画像書き換え技術に関するものである。   The present invention relates to an image processing apparatus and an image processing method, and more particularly to a partial image rewriting technique for rewriting a part of an image.

自然画像に対する高能率な圧縮伸長方式の1つとして、国際標準規格であるJPEGが知られている。このJPEG方式では、MCU(Minimum Coded Unit)と呼ばれる8×8画素のブロックが1つの単位となっている。このMCUに対して、次のように圧縮が行われる。   As one of highly efficient compression / decompression methods for natural images, JPEG which is an international standard is known. In this JPEG system, an 8 × 8 pixel block called MCU (Minimum Coded Unit) is one unit. The MCU is compressed as follows.

まず、1つのMCUに対して2次元DCT変換を行う。DCT係数に変換された64個のデータに対して量子化を行う。図11は、量子化ステップの一例を示す図である。人間の目には、高周波数成分は目立ちにくいという特徴があるため、図11に示すように、低周波成分は省略を少なくし、高周波成分は省略を大きくするようにしている。   First, two-dimensional DCT transformation is performed on one MCU. Quantization is performed on 64 pieces of data converted into DCT coefficients. FIG. 11 is a diagram illustrating an example of the quantization step. Since human eyes have a feature that high frequency components are not conspicuous, as shown in FIG. 11, the omission of low frequency components is reduced and the omission of high frequency components is increased.

図12は、量子化されたDCT係数の一例を示す図である。図12において、特に左上の1係数をDC成分と呼び、残りの63係数をAC成分と呼ぶ。   FIG. 12 is a diagram illustrating an example of quantized DCT coefficients. In FIG. 12, in particular, one coefficient at the upper left is called a DC component, and the remaining 63 coefficients are called AC components.

このように量子化された64個の係数に対してエントロピー符号化してハフマン符号で表すことにより、圧縮データが得られる。   Compressed data can be obtained by entropy encoding the 64 coefficients quantized in this way and expressing them by a Huffman code.

図13は、ジグザグスキャン順序を示す図である。符号化の際には、図13に示すようなジグザグ順にデータ処理を行う。具体的には、まず、最初のDC成分は、近接するMCUのDC成分との相関が強いため、直前MCUのDC係数との差分値を求め、可変長符号化処理を行う。   FIG. 13 shows a zigzag scan order. At the time of encoding, data processing is performed in the zigzag order as shown in FIG. Specifically, first, since the first DC component has a strong correlation with the DC component of the adjacent MCU, a difference value from the DC coefficient of the immediately preceding MCU is obtained, and variable length coding processing is performed.

そして、残る63個のAC成分に対してランレングス符号化を行うが、その方法は非0係数が出現するまで0の数を数え、出現と同時に0のカウント数と非0係数をまとめて出力する。   The remaining 63 AC components are run-length encoded. In this method, the number of zeros is counted until a non-zero coefficient appears, and at the same time, the count number of zero and the non-zero coefficient are output together. To do.

図14は、ランレングス符号化の一例を示す図である。図13に示すようなジグザグ順にデータを読むと、0が2つ続いた後に3が出現している。この場合、2/3(0の数/非0係数値)がランレングス符号となる。   FIG. 14 is a diagram illustrating an example of run-length encoding. When data is read in zigzag order as shown in FIG. 13, 3 appears after 2 0s. In this case, 2/3 (number of 0 / non-zero coefficient value) is the run-length code.

そして、次に0が20個続き、その後10が出現している。このように、連続する0が16個以上続く場合、最初の16個をZRL符号とし、その符号はF/0で表され、残る4個の0と10が4/10で表される符号として出力される。   Then, 20 0s continue, and then 10 appears. Thus, when 16 or more consecutive 0s continue, the first 16 are ZRL codes, the codes are represented by F / 0, and the remaining 4 0s and 10 are codes represented by 4/10. Is output.

次に、残る39個の係数すべてが0となっており、この場合を特にEOBと呼び、符号は0/0とされている。   Next, all the remaining 39 coefficients are 0, and this case is particularly called EOB, and the code is 0/0.

以上のようにランレングス符号化が行われ、その0の数は0の最大個数が15個であることから4bitで表される。そして、ランレングス符号化されたラン/係数の係数をグループ化する。   Run-length encoding is performed as described above, and the number of zeros is represented by 4 bits because the maximum number of zeros is 15. Then, the run-length encoded run / coefficient coefficients are grouped.

図15は、量子化係数と対応するグループ番号を示す図である。図15に示すように、JPEGの場合には係数が11bitであり、この11bitの係数が4bitのグループ番号に割り当てられる。以上のようにランレングス符号化されたデータに対して、可変長符号化処理を行う。   FIG. 15 is a diagram illustrating a group number corresponding to a quantization coefficient. As shown in FIG. 15, in the case of JPEG, the coefficient is 11 bits, and this 11-bit coefficient is assigned to a 4-bit group number. Variable length coding processing is performed on the data that has been run-length coded as described above.

図16は、符号テーブルの一例を示す図であり、この符号テーブルから、0の数4bitとグループ番号4bitを併せた計8bitのラン/グループ番号と発生頻度とを取得する。この発生頻度と可変長符号化処理の初期値から可変長符号を得る。初期値として、各符号長の最小符号であるMinコードと、そのMinコードの発生頻度を記憶する。   FIG. 16 is a diagram illustrating an example of a code table. From this code table, a total of 8 bits of run / group number including the number of 0 4 bits and the group number 4 bits and the occurrence frequency are acquired. A variable length code is obtained from the occurrence frequency and the initial value of the variable length encoding process. As an initial value, the Min code that is the minimum code of each code length and the occurrence frequency of the Min code are stored.

図17は、ハフマン符号化/復号化に使用する初期値の一例を示す図である。初期値作成のためには各符号長の符号個数が必要となるが、外部で初期値を作成して入力しても構わないし、各符号長の符号個数を符号テーブルから内部で作成しても構わない。   FIG. 17 is a diagram illustrating an example of initial values used for Huffman encoding / decoding. The number of codes for each code length is required to create the initial value, but the initial value may be created and input externally, or the number of codes for each code length may be created internally from the code table. I do not care.

一方、符号データの伸張に際しては、上述の圧縮と逆の手順として、ハフマン復号化によりMCU単位のデータを取り出した後、逆量子化、逆DCT変換を行うことにより、原画像を復元することができる。   On the other hand, when the code data is decompressed, the original image can be restored by performing inverse quantization and inverse DCT transform after extracting data in MCU units by Huffman decoding as a procedure reverse to the above-described compression. it can.

図18は、JPEGフォーマットの概要を示す図である。図18に示すように、JPEGフォーマット全体は、マーカという2バイトの記号によって区切られたセグメントと呼ばれるデータの集まりによって構成されている。   FIG. 18 is a diagram showing an outline of the JPEG format. As shown in FIG. 18, the entire JPEG format is composed of a collection of data called segments, which are delimited by 2-byte symbols called markers.

このように、JPEGフォーマットは、マーカを利用することにより、符号データの他に、ハフマンテーブルや画像サイズといった、様々な種類の情報を含めることができる。   As described above, the JPEG format can include various types of information such as the Huffman table and the image size in addition to the code data by using the marker.

ここで、JPEG方式のマーカとして、リスタートマーカというものがある。通常、DC成分は、直前MCUのDC成分との差分値を使用するため、直前MCUの情報がないと復号化を行うことができないが、リスタートマーカを挿入することにより、直前MCUのDC成分との差分値を取らなくてもよくなる。   Here, there is a restart marker as a JPEG marker. Normally, since the DC component uses a difference value from the DC component of the immediately preceding MCU, it cannot be decoded without the information of the immediately preceding MCU. However, by inserting a restart marker, the DC component of the immediately preceding MCU It is not necessary to take the difference value.

すなわち、リスタートマーカで区切られたブロックは近接ブロックとの相関がなくなり、そのブロックのみで構成することができる。なお、リスタートマーカは、MCU数個の単位で挿入され、その挿入単位はリスタートインターバル定義セグメントとして、符号データに記憶されている。   That is, the block delimited by the restart marker has no correlation with the adjacent block, and can be configured by only that block. The restart marker is inserted in units of several MCUs, and the insertion unit is stored in the code data as a restart interval definition segment.

また、JPEG方式のマーカとして、アプリケーションセグメントというものが存在し、0番から15番までを付加することができる。通常の復号化シーケンスにおいて、このセグメントは無視されるが、上位のアプリケーションにとって必要な情報を格納しておくことができる。例えば、Exif規格に準拠したJPEGファイルには、通常アプリケーションマーカの1番にExif情報が格納されている。   In addition, there is an application segment as a JPEG marker, and numbers 0 to 15 can be added. In a normal decoding sequence, this segment is ignored, but information necessary for the upper application can be stored. For example, in a JPEG file compliant with the Exif standard, Exif information is stored in the first application marker.

なお、JPEGについてのより詳細な仕様に関しては、特許文献1、特許文献2、及び非特許文献1に示す公知の標準化勧告書等に開示されている。
特開2002−84493号公報 特開2003−189109号公報 ISO/IEC標準 10918
Note that more detailed specifications for JPEG are disclosed in known standardization recommendation documents shown in Patent Document 1, Patent Document 2, and Non-Patent Document 1.
JP 2002-84493 A JP 2003-189109 A ISO / IEC standard 10918

ここで、上述のJPEG方式で符号化された画像に対して部分的な書き換えを行う場合、符号データを伸張する手順と、画像の書き換えを行う手順と、書き換えた画像を符号化する手順とが必要となる。   Here, when partial rewriting is performed on an image encoded by the above-described JPEG method, there are a procedure for expanding code data, a procedure for rewriting an image, and a procedure for encoding a rewritten image. Necessary.

しかしながら、JPEG方式は、画像1枚単位での処理が通例であるため、画像サイズが大きくなると処理に要する時間が長くなってしまい、且つ必要なバッファメモリ量も大きくなる。例えば、2560×1920画素の4:2:2画像の場合には、ほぼ9Mバイトもの容量が必要となる。   However, since the JPEG method is usually processed in units of one image, the time required for processing increases as the image size increases, and the amount of buffer memory required also increases. For example, in the case of a 4: 2: 2 image of 2560 × 1920 pixels, a capacity of approximately 9 Mbytes is required.

また、JPEGは非可逆圧縮方式のため、繰り返して書き換えを行うと、その度に圧縮処理が発生するため、オリジナル画像に対しての画質劣化が激しくなることが予想される。   JPEG is an irreversible compression method, and if rewriting is repeated, compression processing occurs each time, and it is expected that image quality deterioration of the original image will become severe.

そして、書き換えを行った後はオリジナル画像に復元することができないため、オリジナルの画像データを残す必要がある場合は、書き換え後のデータとは別に管理しておく必要があった。   Since the original image cannot be restored after rewriting, it is necessary to manage the original image data separately from the rewritten data when it is necessary to leave the original image data.

本発明は、かかる点に鑑みてなされたものであり、その目的とするところは、部分画像書き換え処理において、処理効率を向上するとともに、データ管理の一元化を可能にすることにある。   The present invention has been made in view of this point, and an object of the present invention is to improve the processing efficiency and to centralize data management in the partial image rewriting process.

すなわち、本発明は、符号化されたオリジナル画像データの一部分を書き換え用画像データに置き換えるための画像処理装置であって、
前記オリジナル画像データの符号データからヘッダ情報を読み出し、少なくともハフマンテーブル及びリスタートマーカ挿入間隔を示す情報を取得するヘッダ読み出し部と、
前記書き換え用画像データを、前記ヘッダ読み出し部で取得したハフマンテーブルを用いて符号化する符号化部と、
前記オリジナル画像データの符号データにおける第M番目(Mは自然数)のリスタートマーカから第N番目(Nは自然数)のリスタートマーカで指定される置き換え対象となる部分の符号データを、前記符号化部で符号化した書き換え用画像データの符号データに置き換える符号置き換え部とを備えたことを特徴とするものである。
That is, the present invention is an image processing apparatus for replacing a part of encoded original image data with rewrite image data,
Header information is read from the code data of the original image data, and at least a Huffman table and a header reading unit for acquiring information indicating a restart marker insertion interval;
An encoding unit that encodes the image data for rewriting using a Huffman table acquired by the header reading unit;
The encoded data of the portion to be replaced specified by the Nth (N is a natural number) restart marker from the Mth (M is a natural number) restart marker in the code data of the original image data is encoded. And a code replacement unit that replaces the code data of the rewritten image data encoded by the unit.

また、本発明は、符号化されたオリジナル画像データの一部分を書き換え用画像データに置き換えるための画像処理方法であって、
前記オリジナル画像データの符号データからヘッダ情報を読み出し、少なくともハフマンテーブル及びリスタートマーカ挿入間隔を示す情報を取得する手順と、
前記書き換え用画像データを、前記取得したハフマンテーブルを用いて符号化する手順と、
前記オリジナル画像データの符号データにおける第M番目(Mは自然数)のリスタートマーカから第N番目(Nは自然数)のリスタートマーカで指定される置き換え対象となる部分の符号データを、前記符号化した書き換え用画像データの符号データに置き換える手順とを備えたことを特徴とするものである。
Further, the present invention is an image processing method for replacing a part of encoded original image data with image data for rewriting,
A procedure for reading header information from the code data of the original image data, and obtaining information indicating at least a Huffman table and a restart marker insertion interval;
A procedure for encoding the rewriting image data using the acquired Huffman table;
The encoded data of the portion to be replaced specified by the Nth (N is a natural number) restart marker from the Mth (M is a natural number) restart marker in the code data of the original image data is encoded. And a procedure for replacing the rewritten image data with the code data.

以上のように、本発明によれば、部分画像書き換え処理において、オリジナルの画像データを一旦伸張する必要がないため処理効率が向上し、且つ必要サイズのみのバッファメモリで画像の書き換えを行うことが可能である。また、非可逆符号化を用いる場合にも、不要な画質劣化を抑制することが可能である。   As described above, according to the present invention, in the partial image rewriting process, it is not necessary to once decompress the original image data, so that the processing efficiency is improved and the image can be rewritten with a buffer memory having a required size. Is possible. Even when irreversible encoding is used, unnecessary image quality degradation can be suppressed.

以下、本発明の実施形態を図面に基づいて詳細に説明する。以下の好ましい実施形態の説明は、本質的に例示に過ぎず、本発明、その適用物或いはその用途を制限することを意図するものでは全くない。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The following description of the preferred embodiments is merely exemplary in nature and is in no way intended to limit the invention, its application, or its application.

<実施形態1>
図1は、本発明の実施形態1に係る画像処理装置の構成を示すブロック図である。図1において、11は符号入力部であり、オリジナル画像の符号データをヘッダ読み出し部13に出力するとともに符号置き換え部15にも出力するものである。
<Embodiment 1>
FIG. 1 is a block diagram showing a configuration of an image processing apparatus according to Embodiment 1 of the present invention. In FIG. 1, reference numeral 11 denotes a code input unit that outputs code data of an original image to the header reading unit 13 and also to the code replacement unit 15.

前記ヘッダ読み出し部13は、入力された符号データから、ハフマンテーブル、リスタートマーカ挿入間隔の情報を読み込み、その情報を符号化部14に出力するものである。   The header reading unit 13 reads information on the Huffman table and restart marker insertion interval from the input code data, and outputs the information to the encoding unit 14.

前記符号化部14は、画像入力部12から書き換え画像データを受け取り、入力されたハフマンテーブルを用いて書き換え画像データの符号化を行い、符号置き換え部15に出力するものである。   The encoding unit 14 receives the rewritten image data from the image input unit 12, encodes the rewritten image data using the input Huffman table, and outputs the encoded image data to the code replacement unit 15.

前記符号置き換え部15は、符号入力部11から入力されたオリジナル画像の符号データにおける指定された開始位置から終了位置までの符号全てを書き換え画像の符号データに置き換えるものである。   The code replacement unit 15 replaces all the codes from the designated start position to the end position in the code data of the original image input from the code input unit 11 with the code data of the rewritten image.

図5は、本実施形態1に係る画像処理装置を用いた部分画像書き換え方法の処理手順を示すフローチャート図である。図5に示すように、まず、ステップS101では、符号入力部11からオリジナル画像の符号データを入力し、続くステップS102に進む。   FIG. 5 is a flowchart showing the processing procedure of the partial image rewriting method using the image processing apparatus according to the first embodiment. As shown in FIG. 5, first, in step S101, code data of the original image is input from the code input unit 11, and the process proceeds to subsequent step S102.

ステップS102では、ヘッダ読み出し部13が、入力された符号データからハフマンテーブル、リスタートマーカ挿入間隔の情報を読み出し、続くステップS103に進む。   In step S102, the header reading unit 13 reads the information of the Huffman table and the restart marker insertion interval from the input code data, and proceeds to subsequent step S103.

ステップS103では、画像入力部12から書き換え画像データを入力し、続くステップS104に進む。   In step S103, the rewritten image data is input from the image input unit 12, and the process proceeds to the subsequent step S104.

ステップS104では、符号化部14が、ステップS102で読み出されたハフマンテーブルを用いて、入力された書き換え画像データの符号化を行い、続くステップS105に進む。   In step S104, the encoding unit 14 encodes the input rewritten image data using the Huffman table read in step S102, and proceeds to subsequent step S105.

ステップS105では、図9に示すように、オリジナル画像の符号データから、書き換えを行う開始位置(第M番目(Mは自然数)のリスタートマーカ)と、終了位置(第N番目(Nは自然数)のリスタートマーカ)をリスタートインターバル単位で指定し、続くステップS106に進む。   In step S105, as shown in FIG. 9, from the code data of the original image, a rewrite start position (Mth (M is a natural number) restart marker) and end position (Nth (N is a natural number)). The restart marker) is designated in units of restart intervals, and the process proceeds to the subsequent step S106.

ステップS106では、図9に示すように、符号置き換え部15が、ステップS105で指定された開始位置から終了位置までの符号全てを、ステップS104で符号化された書き換え画像の符号データに置き換え、続くステップS107に進む。   In step S106, as shown in FIG. 9, the code replacement unit 15 replaces all the codes from the start position to the end position specified in step S105 with the code data of the rewritten image encoded in step S104. Proceed to step S107.

ステップS107では、図10に示すように、符号置き換え部15が、ステップS105で指定された書き換え位置情報、及びステップS106で置き換え対象となった部分の符号データをアプリケーションマーカに記憶させ、処理を終了する。   In step S107, as shown in FIG. 10, the code replacement unit 15 stores the rewrite position information specified in step S105 and the code data of the portion to be replaced in step S106 in the application marker, and ends the process. To do.

以上のように、本実施形態1に係る画像処理装置によれば、書き換えを行わないブロックに対する処理は発生しないため、処理時間が短縮できるとともに処理に必要なバッファメモリ量を削減することができる。   As described above, according to the image processing apparatus according to the first embodiment, processing for blocks that are not rewritten does not occur, so that the processing time can be shortened and the amount of buffer memory necessary for processing can be reduced.

また、再圧縮処理が発生しないため、書き換えを行わないブロックに対する画質劣化も発生しない。   In addition, since recompression processing does not occur, image quality deterioration does not occur for blocks that are not rewritten.

さらに、オリジナル画像データの情報を併せ持つことができるから、オリジナル画像データと書き換え後の画像データとを一元管理することが可能となり、オリジナル画像データ情報を読み出して同様の方法で置き換えを行うことにより、書き換え後の画像からオリジナル画像へと復元することが可能となる。   Furthermore, since it is possible to have the information of the original image data together, it becomes possible to centrally manage the original image data and the rewritten image data, and by reading out the original image data information and performing replacement in the same manner, It is possible to restore the rewritten image to the original image.

図8は、書き換え後の符号データをオリジナル画像データに復元するための部分画像書き換え方法の処理手順を示すフローチャート図である。   FIG. 8 is a flowchart showing a processing procedure of a partial image rewriting method for restoring code data after rewriting to original image data.

図8に示すように、まず、ステップS401では、符号入力部11から置き換え後の符号データを入力し、続くステップS402に進む。   As shown in FIG. 8, first, in step S401, the replaced code data is input from the code input unit 11, and the process proceeds to the subsequent step S402.

ステップS402では、ヘッダ読み出し部13が、置き換え後の符号データのアプリケーションセグメントから、オリジナル画像の符号データ及び置き換え位置情報を読み出し、続くステップS403に進む。   In step S402, the header reading unit 13 reads the code data and replacement position information of the original image from the application segment of the replaced code data, and proceeds to subsequent step S403.

ステップS403では、ステップS402で読み出した情報に基づいて、置き換え後の符号データから、書き換えを行う開始位置(第M番目のリスタートマーカ)と終了位置(第N番目のリスタートマーカ)とをリスタートマーカ挿入単位で指定し、続くステップS404に進む。   In step S403, based on the information read in step S402, the rewrite start position (Mth restart marker) and end position (Nth restart marker) are rewritten from the replaced code data. The start marker insertion unit is designated, and the process proceeds to the subsequent step S404.

ステップS404では、符号置き換え部15が、ステップS105で指定された開始位置から終了位置までの符号全てを、ステップS402で読み出されたオリジナル符号データに置き換え(図9参照)、処理を終了する。これにより、オリジナルの符号データに復元することができる。   In step S404, the code replacement unit 15 replaces all the codes from the start position to the end position specified in step S105 with the original code data read in step S402 (see FIG. 9), and ends the process. As a result, the original code data can be restored.

なお、本実施形態1に係る画像処理装置では、第N番目のリスタートマーカは、第M+1番目のリスタートマーカとして説明した(図9参照)が、この形態に限定するものではなく、第M番目以降(M<N)のリスタートマーカであればよい。   In the image processing apparatus according to the first embodiment, the N-th restart marker has been described as the (M + 1) -th restart marker (see FIG. 9). It is sufficient that the restart marker is the first and subsequent (M <N) restart markers.

さらに、位置情報と符号データとを同じアプリケーションマーカに記憶する場合について説明した(図10参照)が、それぞれを別セグメントとして記憶させてもよい。また、位置情報及び置き換え対象となった部分の符号データをアプリケーションマーカに記憶する場合について説明したが、この形態に限定するものではなく、例えば、コメントマーカ等の他のセグメントに記憶させてもよく、またデータサイズ削減のために、記憶を行わないようにしても構わない。   Furthermore, although the case where position information and code data are stored in the same application marker has been described (see FIG. 10), each may be stored as separate segments. Moreover, although the case where the position data and the code data of the part to be replaced are stored in the application marker has been described, the present invention is not limited to this form, and may be stored in another segment such as a comment marker, for example. In addition, storage may be omitted in order to reduce the data size.

また、置き換える画像の入力には、別途画像を用意するように説明したが、オリジナルの符号データから、書き換えを行いたい部分を含むリスタートインターバル単位で伸張し、それに対して書き換えを行った画像を入力するようにしてもよい。   In addition, although it has been described that a separate image is prepared for input of a replacement image, the original code data is expanded in units of restart intervals including the portion to be rewritten, and the rewritten image is then rewritten. You may make it input.

また、書き換え画像は非圧縮のものを入力する構成にしたが、例えば、図4に示す画像処理装置を用いて、オリジナル符号データと同じハフマンテーブルで圧縮された既存のJPEG符号データを入力する構成にしてもよい。   In addition, the rewritten image is configured to input an uncompressed image. For example, using the image processing apparatus illustrated in FIG. 4, a configuration in which existing JPEG code data compressed using the same Huffman table as the original code data is input. It may be.

具体的に、図4の画像処理装置は、符号入力部11、ヘッダ読み出し部13、及び符号書き換え部15で構成された復号化専用装置であるが、このように符号化部を持たない構成であっても、画像データの部分書き換えを行うことが可能となる。   Specifically, the image processing apparatus in FIG. 4 is a decoding-dedicated apparatus including the code input unit 11, the header reading unit 13, and the code rewriting unit 15, but has a configuration that does not include the encoding unit. Even if it exists, it becomes possible to perform partial rewriting of image data.

<実施形態2>
図2は、本発明の実施形態2に係る画像処理装置の構成を示すブロック図である。前記実施形態1との違いは、オリジナル画像データの情報をスクランブル処理するスクランブル処理部21をさらに備えた点であるため、以下、実施形態1と同じ部分については同じ符号を付し、相違点についてのみ説明する。
<Embodiment 2>
FIG. 2 is a block diagram showing the configuration of the image processing apparatus according to the second embodiment of the present invention. The difference from the first embodiment is that it further includes a scramble processing unit 21 that scrambles the information of the original image data. Therefore, the same parts as those of the first embodiment are denoted by the same reference numerals and the differences are described below. Only explained.

図2に示すように、前記スクランブル処理部21は、オリジナル画像データにおいて置き換え対象となる部分の符号データに対してスクランブル処理をするものである。   As shown in FIG. 2, the scramble processing unit 21 performs scramble processing on code data of a part to be replaced in original image data.

図6は、本実施形態2に係る画像処理装置を用いた部分画像書き換え方法の処理手順を示すフローチャート図である。なお、前記実施形態1の部分画像書き換え方法と同じ処理要素と同じ処理要素には同じステップ番号を付し、その説明を省略する。   FIG. 6 is a flowchart showing the processing procedure of the partial image rewriting method using the image processing apparatus according to the second embodiment. Note that the same processing elements as those in the partial image rewriting method of the first embodiment are denoted by the same step numbers, and description thereof is omitted.

図6に示すように、ステップS101〜ステップS106が実行された後、続くステップS201に進む。ステップS201では、スクランブル処理部21が、ステップS105で指定された書き換え位置情報、及びステップS106で置き換え対象となった部分の符号データに対してスクランブルを施し、続くステップS202に進む。   As shown in FIG. 6, after step S101 to step S106 are executed, the process proceeds to subsequent step S201. In step S201, the scramble processing unit 21 scrambles the rewrite position information specified in step S105 and the code data of the portion to be replaced in step S106, and the process proceeds to the subsequent step S202.

ステップS202では、符号置き換え部15が、ステップS105で指定された書き換え位置情報、又はステップS106で置き換え対象となった部分の符号データに加えて、ステップS201で行ったスクランブルの解除鍵をアプリケーションマーカに記憶させ、処理を終了する。   In step S202, the code replacement unit 15 uses the scramble release key performed in step S201 as an application marker in addition to the rewrite position information specified in step S105 or the code data of the part to be replaced in step S106. Store it and finish the process.

以上のように、本実施形態2によれば、オリジナル画像データの情報にスクランブルを施すようにしたから、第3者による、意図しないオリジナル画像への復元を抑制することができる。   As described above, according to the second embodiment, since the information of the original image data is scrambled, the unintended restoration of the original image by the third party can be suppressed.

なお、本実施形態2では、スクランブル解除鍵をアプリケーションマーカに記憶するように説明したが、この形態に限定するものではなく、例えば、コメントマーカ等の他のセグメントに記憶させてもよく、またデータサイズ削減のために、記憶を行わないようにしても構わない。   In the second embodiment, the descrambling key is stored in the application marker. However, the present invention is not limited to this mode. For example, the descrambling key may be stored in another segment such as a comment marker. In order to reduce the size, storage may not be performed.

<実施形態3>
図3は、本発明の実施形態3に係る画像処理装置の構成を示すブロック図である。前記実施形態1との違いは、符号データに対して識別IDをウォーターマーク(電子透かし)として挿入するウォーターマーク挿入部31をさらに備えた点であるため、以下、実施形態1と同じ部分については同じ符号を付し、相違点についてのみ説明する。
<Embodiment 3>
FIG. 3 is a block diagram showing the configuration of the image processing apparatus according to the third embodiment of the present invention. The difference from the first embodiment is that it further includes a watermark insertion unit 31 that inserts an identification ID into the code data as a watermark (digital watermark). Only the differences will be described with the same reference numerals.

図3に示すように、前記ウォーターマーク挿入部31は、オリジナル画像データにおいて置き換え対象となった部分の符号データに対してウォーターマークを挿入するものである。   As shown in FIG. 3, the watermark insertion unit 31 inserts a watermark into code data of a portion to be replaced in original image data.

図7は、本実施形態3に係る画像処理装置を用いた部分画像書き換え方法の処理手順を示すフローチャート図である。前記実施形態1の部分画像書き換え方法と同じ処理要素と同じ処理要素には同じステップ番号を付し、その説明を省略する。   FIG. 7 is a flowchart showing the processing procedure of the partial image rewriting method using the image processing apparatus according to the third embodiment. The same processing elements as those in the partial image rewriting method of the first embodiment are denoted by the same step numbers, and description thereof is omitted.

図7に示すように、ステップS101〜ステップS106が実行された後、続くステップS301に進む。ステップS301では、ウォーターマーク挿入部31が、ステップS106で置き換え対象となった部分の符号データに対してウォーターマークを挿入し、続くステップS107に進む。   As shown in FIG. 7, after step S101 to step S106 are executed, the process proceeds to subsequent step S301. In step S301, the watermark insertion unit 31 inserts a watermark into the code data of the portion to be replaced in step S106, and the process proceeds to subsequent step S107.

ステップS302では、符号置き換え部15が、ステップS105で指定された書き換え位置情報、及びステップS106で置き換え対象となった部分の符号データをアプリケーションマーカに記憶させ、処理を終了する。   In step S302, the code replacement unit 15 stores the rewrite position information specified in step S105 and the code data of the part to be replaced in step S106 in the application marker, and ends the process.

以上のように、本実施形態3によれば、識別IDをウォーターマークとして挿入しておくことで、例えば、画像データの不正流出が発生した場合に、この識別IDを識別して流出元を特定する上で有利な効果が得られる。   As described above, according to the third embodiment, by inserting an identification ID as a watermark, for example, when an illegal outflow of image data occurs, the identification ID is identified and the outflow source is specified. Advantageous effects can be obtained.

以上説明したように、本発明は、部分画像書き換え処理において、処理効率を向上するとともに、データ管理の一元化が可能であるという実用性の高い効果が得られることから、きわめて有用で産業上の利用可能性は高い。   As described above, the present invention is extremely useful and industrially utilized because it provides a highly practical effect of improving the processing efficiency and centralizing data management in the partial image rewriting process. The possibility is high.

本発明の実施形態1に係る画像処理装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image processing apparatus according to a first embodiment of the present invention. 本実施形態2に係る画像処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus which concerns on this Embodiment 2. 本実施形態3に係る画像処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus which concerns on this Embodiment 3. 本実施形態1における書き換え後の符号データをオリジナル画像データに復元するための画像処理装置の別の構成を示すブロック図である。It is a block diagram which shows another structure of the image processing apparatus for decompress | restoring the code data after rewriting in this Embodiment 1 to original image data. 本実施形態1に係る画像処理装置を用いた部分画像書き換え方法の処理手順を示すフローチャート図である。It is a flowchart figure which shows the process sequence of the partial image rewriting method using the image processing apparatus which concerns on this Embodiment 1. FIG. 本実施形態2における部分画像書き換え方法の処理手順を示すフローチャート図である。It is a flowchart figure which shows the process sequence of the partial image rewriting method in this Embodiment 2. 本実施形態3における部分画像書き換え方法の処理手順を示すフローチャート図である。It is a flowchart figure which shows the process sequence of the partial image rewriting method in this Embodiment 3. 本実施形態1における書き換え後の符号データをオリジナル画像データに復元するための部分画像書き換え方法の処理手順を示すフローチャート図である。It is a flowchart figure which shows the process sequence of the partial image rewriting method for decompress | restoring the code data after rewriting in this Embodiment 1 to original image data. 本実施形態1におけるオリジナル画像の符号データと書き換えを行う符号データとの置き換えを示す概念図である。FIG. 3 is a conceptual diagram illustrating replacement of original image code data and rewritten code data in the first embodiment. 本実施形態1における書き換えの位置情報及び符号データをアプリケーションマーカに記憶させる状態を示す概念図である。It is a conceptual diagram which shows the state which memorize | stores the positional information and code | cord | chord data of rewriting in this Embodiment 1 in an application marker. 量子化ステップの一例を示す図である。It is a figure which shows an example of a quantization step. 量子化されたDCT係数の一例を示す図である。It is a figure which shows an example of the quantized DCT coefficient. ジグザグスキャン順序を示す図である。It is a figure which shows a zigzag scan order. ランレングス符号化の一例を示す図である。It is a figure which shows an example of run length encoding. 量子化係数と対応するグループ番号を示す図である。It is a figure which shows the group number corresponding to a quantization coefficient. 符号テーブルの一例を示す図である。It is a figure which shows an example of a code table. ハフマン符号化/復号化に使用する初期値の一例を示す図である。It is a figure which shows an example of the initial value used for Huffman encoding / decoding. JPEGフォーマットの概要を示す図である。It is a figure which shows the outline | summary of a JPEG format.

符号の説明Explanation of symbols

11 符号入力部
12 画像入力部
13 ヘッダ読み出し部
14 符号化部
15 符号置き換え部
21 スクランブル処理部
31 ウォーターマーク挿入部
DESCRIPTION OF SYMBOLS 11 Code input part 12 Image input part 13 Header reading part 14 Encoding part 15 Code replacement part 21 Scramble process part 31 Watermark insertion part

Claims (10)

符号化されたオリジナル画像データの一部分を書き換え用画像データに置き換えるための画像処理装置であって、
前記オリジナル画像データの符号データからヘッダ情報を読み出し、少なくともハフマンテーブル及びリスタートマーカ挿入間隔を示す情報を取得するヘッダ読み出し部と、
前記書き換え用画像データを、前記ヘッダ読み出し部で取得したハフマンテーブルを用いて符号化する符号化部と、
前記オリジナル画像データの符号データにおける第M番目(Mは自然数)のリスタートマーカから第N番目(Nは自然数)のリスタートマーカで指定される置き換え対象となる部分の符号データを、前記符号化部で符号化した書き換え用画像データの符号データに置き換える符号置き換え部とを備えたことを特徴とする画像処理装置。
An image processing apparatus for replacing a part of encoded original image data with rewriting image data,
Header information is read from the code data of the original image data, and at least a Huffman table and a header reading unit for acquiring information indicating a restart marker insertion interval;
An encoding unit that encodes the image data for rewriting using a Huffman table acquired by the header reading unit;
The encoded data of the portion to be replaced specified by the Nth (N is a natural number) restart marker from the Mth (M is a natural number) restart marker in the code data of the original image data is encoded. An image processing apparatus comprising: a code replacement unit that replaces the code data of the rewritten image data encoded by the unit.
請求項1に記載された画像処理装置において、
前記符号置き換え部は、前記オリジナル画像データの符号データにおける置き換え位置情報及び置き換え対象となる部分の符号データを、セグメントとして符号データに含めるように構成されていることを特徴とする画像処理装置。
The image processing apparatus according to claim 1,
The image processing apparatus, wherein the code replacement unit is configured to include, in the code data, replacement position information in the code data of the original image data and code data of a portion to be replaced as a segment.
請求項2に記載された画像処理装置において、
前記オリジナル画像データの符号データにおける置き換え位置情報及び置き換え対象となる部分の符号データに対してスクランブルを施すスクランブル処理部をさらに備えたことを特徴とする画像処理装置。
The image processing apparatus according to claim 2,
An image processing apparatus, further comprising: a scramble processing unit that scrambles the replacement position information in the code data of the original image data and the code data of a part to be replaced.
請求項3に記載された画像処理装置において、
前記符号置き換え部は、前記スクランブルの鍵情報を、セグメントとして符号データに含めるように構成されていることを特徴とする画像処理装置。
The image processing apparatus according to claim 3,
The image processing device, wherein the code replacement unit is configured to include the scramble key information as a segment in code data.
請求項1に記載された画像処理装置において、
前記オリジナル画像データにおける置き換え対象となる部分の符号データに対してウォーターマークを挿入するウォーターマーク挿入部をさらに備えたことを特徴とする画像処理装置。
The image processing apparatus according to claim 1,
An image processing apparatus, further comprising a watermark insertion unit that inserts a watermark into code data of a portion to be replaced in the original image data.
符号化されたオリジナル画像データの一部分を書き換え用画像データに置き換えるための画像処理方法であって、
前記オリジナル画像データの符号データからヘッダ情報を読み出し、少なくともハフマンテーブル及びリスタートマーカ挿入間隔を示す情報を取得する手順と、
前記書き換え用画像データを、前記取得したハフマンテーブルを用いて符号化する手順と、
前記オリジナル画像データの符号データにおける第M番目(Mは自然数)のリスタートマーカから第N番目(Nは自然数)のリスタートマーカで指定される置き換え対象となる部分の符号データを、前記符号化した書き換え用画像データの符号データに置き換える手順とを備えたことを特徴とする画像処理方法。
An image processing method for replacing a part of encoded original image data with image data for rewriting,
A procedure for reading header information from the code data of the original image data, and obtaining information indicating at least a Huffman table and a restart marker insertion interval;
A procedure for encoding the rewriting image data using the acquired Huffman table;
The encoded data of the portion to be replaced specified by the Nth (N is a natural number) restart marker from the Mth (M is a natural number) restart marker in the code data of the original image data is encoded. And a procedure for replacing the rewritten image data with code data.
請求項6に記載された画像処理方法において、
前記オリジナル画像データの符号データにおける置き換え位置情報及び置き換え対象となる部分の符号データを、セグメントとして符号データに含める手順をさらに備えたことを特徴とする画像処理方法。
The image processing method according to claim 6.
An image processing method, further comprising a step of including the replacement position information in the code data of the original image data and the code data of the part to be replaced as a segment in the code data.
請求項7に記載された画像処理方法において、
前記オリジナル画像データの符号データにおける置き換え位置情報及び置き換え対象となる部分の符号データに対してスクランブルを施す手順をさらに備えたことを特徴とする画像処理方法。
The image processing method according to claim 7,
An image processing method, further comprising a step of scrambling the replacement position information in the code data of the original image data and the code data of a part to be replaced.
請求項8に記載された画像処理方法において、
前記スクランブルの鍵情報を、セグメントとして符号データに含める手順をさらに備えたことを特徴とする画像処理方法。
The image processing method according to claim 8, wherein
An image processing method, further comprising a step of including the scramble key information in the code data as a segment.
請求項6に記載された画像処理方法において、
前記オリジナル画像データにおける置き換え対象となる部分の符号データに対してウォーターマークを挿入する手順をさらに備えたことを特徴とする画像処理方法。
The image processing method according to claim 6.
An image processing method, further comprising a step of inserting a watermark into code data of a portion to be replaced in the original image data.
JP2005243721A 2005-08-25 2005-08-25 Image processing device and method therefor Withdrawn JP2007060334A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005243721A JP2007060334A (en) 2005-08-25 2005-08-25 Image processing device and method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005243721A JP2007060334A (en) 2005-08-25 2005-08-25 Image processing device and method therefor

Publications (1)

Publication Number Publication Date
JP2007060334A true JP2007060334A (en) 2007-03-08

Family

ID=37923410

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005243721A Withdrawn JP2007060334A (en) 2005-08-25 2005-08-25 Image processing device and method therefor

Country Status (1)

Country Link
JP (1) JP2007060334A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008235999A (en) * 2007-03-16 2008-10-02 Nippon Hoso Kyokai <Nhk> Content encrypting device, program thereof, content decrypting device and program thereof
JP2008236000A (en) * 2007-03-16 2008-10-02 Nippon Hoso Kyokai <Nhk> Content decrypting device, its method and its program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008235999A (en) * 2007-03-16 2008-10-02 Nippon Hoso Kyokai <Nhk> Content encrypting device, program thereof, content decrypting device and program thereof
JP2008236000A (en) * 2007-03-16 2008-10-02 Nippon Hoso Kyokai <Nhk> Content decrypting device, its method and its program

Similar Documents

Publication Publication Date Title
US6909810B2 (en) Image processing apparatus and method, and its computer program and storage medium
US20060067582A1 (en) Progressive JPEG decoding system
Fridrich et al. Lossless data embedding with file size preservation
JP2002262065A (en) Modification of material
JP4997243B2 (en) Image coding apparatus, method thereof and integrated circuit thereof
Li et al. A reversible data hiding scheme for JPEG images
JP2007060334A (en) Image processing device and method therefor
JP3952116B2 (en) Image compression apparatus and method
JP4642509B2 (en) Apparatus for embedding confidential information in compressed image data and apparatus for encoding confidential data
JP4919213B2 (en) Digital watermark insertion method and detection method
US8073270B2 (en) Image decoding apparatus and method
JP2005530411A (en) Lossless data embedding
JP4731972B2 (en) Image encoding method and image encoding apparatus
JP5086777B2 (en) Image encoding apparatus, control method therefor, computer program, and computer-readable storage medium
Tan et al. Rewritable data insertion in encrypted JPEG using coefficient prediction method
JP4414328B2 (en) Image processing apparatus and image processing apparatus
JP4971881B2 (en) Image encoding apparatus, image decoding apparatus, and control method thereof
EP1555630B1 (en) Watermarking of images
JP2007221387A (en) Data inserting device and method, and image compressing coding device and method
WO2018154982A1 (en) Image decoding device
JP2002344726A (en) Information embedding device and information extracting device
Karim et al. Reversible data embedding for any digital signal
JP2003087573A (en) Image compressing device and image expanding device
KR20040056403A (en) Method of displaying a high-resolution digital image on a low-resolution display
JP2005210566A (en) Image data coding method, and image processing device for coding image data

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080701

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20100107