JP2012175140A - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP2012175140A
JP2012175140A JP2011031953A JP2011031953A JP2012175140A JP 2012175140 A JP2012175140 A JP 2012175140A JP 2011031953 A JP2011031953 A JP 2011031953A JP 2011031953 A JP2011031953 A JP 2011031953A JP 2012175140 A JP2012175140 A JP 2012175140A
Authority
JP
Japan
Prior art keywords
component
image
data
quotient
remainder
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
JP2011031953A
Other languages
Japanese (ja)
Inventor
Takuya Maekawa
拓也 前川
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.)
Hitachi Solutions Ltd
Original Assignee
Hitachi Solutions 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 Hitachi Solutions Ltd filed Critical Hitachi Solutions Ltd
Priority to JP2011031953A priority Critical patent/JP2012175140A/en
Publication of JP2012175140A publication Critical patent/JP2012175140A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide an image processing apparatus and an image processing method capable of compressing image data including noise with a high compression ratio without losing the features of the compressed image.SOLUTION: The image processing apparatus is provided with: remainder component separation means which divides the pixel value of each pixel of an inputted image by 2 or an integer larger than 2, which is inputted by a user or preset, to separate the inputted image into quotient component data composed of the pixel value of the calculated quotient and remainder component data composed of the pixel value of the calculated remainder; and data compression means which compresses the respective components separated by the remainder component separation means and outputs compressed data of each component.

Description

本発明は、画像データの圧縮を行う画像処理装置及び画像処理方法に関するものである。   The present invention relates to an image processing apparatus and an image processing method for compressing image data.

データ圧縮は主にデータを記憶装置に保存したり、ネットワークを介してデータを転送する場合に、保存領域や転送時間の削減のために用いられる。
データ圧縮には可逆圧縮と非可逆圧縮がある。可逆圧縮は圧縮前のデータを完全に復元することができるのに対して非可逆圧縮は圧縮前のデータを完全に復元することはできない。
Data compression is mainly used to reduce the storage area and transfer time when data is stored in a storage device or when data is transferred via a network.
Data compression includes lossless compression and lossy compression. The lossless compression can completely restore the data before compression, whereas the lossy compression cannot completely restore the data before compression.

一般的なファイル圧縮には可逆圧縮が用いられるが、画像や音声の圧縮には非可逆圧縮も利用される。
可逆圧縮の例としてはハフマン符号化がある(非特許文献1)。これは、データ中に頻繁に出現するシンボルには短い符号を、逆に出現頻度が少ないシンボルには長い符号を与えて置き換えることで、全体のデータ量を削減するものである。
また、LZ77に代表される辞書式符号化では、データ中に既に出現しているフレーズがデータの後方に出現した場合に、先のフレーズの出現位置への参照に置き換えることで、頻出するフレーズを符号化するもので、前記ハフマン符号化などと組み合わせることで高い圧縮率を実現しているアルゴリズムが多数提案されている。画像圧縮の例ではpng形式やgif形式(特許文献1)に可逆圧縮が利用されている。
Lossless compression is used for general file compression, but irreversible compression is also used for image and audio compression.
An example of lossless compression is Huffman coding (Non-Patent Document 1). This is to reduce the overall data amount by replacing a symbol that frequently appears in data with a short code and conversely with a symbol that has a low appearance frequency.
In addition, in lexical coding represented by LZ77, when a phrase that already appears in the data appears behind the data, the phrase that appears frequently is replaced by a reference to the appearance position of the previous phrase. Many algorithms have been proposed that achieve high compression ratios by combining with the Huffman coding and the like. In the example of image compression, lossless compression is used in the png format or the gif format (Patent Document 1).

また,非可逆の画像圧縮の例としてはjpeg形式がある。これは離散コサイン変換を用いて画像を周波数成分に分離し、人間が認識できない高周波成分を除去することで、高い圧縮率を実現している。
画像データは単に閲覧目的で利用されるだけでなく、画像解析処理によって画像特徴を抽出することにも利用される。解析処理には膨大な枚数の画像データを用いることも多く、データの保存領域や転送時間の削減のためには、画像の圧縮は重要な技術となっている。
An example of irreversible image compression is the jpeg format. This achieves a high compression rate by separating an image into frequency components using discrete cosine transform and removing high frequency components that cannot be recognized by humans.
The image data is used not only for browsing purposes but also for extracting image features by image analysis processing. In many cases, an enormous number of image data is used for analysis processing, and image compression is an important technique for reducing the data storage area and transfer time.

文書データ圧縮アルゴリズム入門―ハフマン符号・算術符号・LZ符号などをCで実現 (IFエッセンス・シリーズ)、植松 友彦、CQ出版(1994/10)Introduction to document data compression algorithm-Huffman code, arithmetic code, LZ code, etc. realized in C (IF Essence Series), Tomohiko Uematsu, CQ Publishing (1994/10)

特開平8−237138号公報JP-A-8-237138

しかし、可逆圧縮では、例えば特定のシンボルやフレーズが頻出するなどのデータの特徴を利用して圧縮を行うため、ノイズのような乱数性の強い成分を含んだ画像データを圧縮した場合の圧縮率は低くなるという問題がある。
また、非可逆圧縮の場合、画像解析処理にとって重要な特徴まで除去しかねないという問題がある。例えば、明るさの異なる2つの画素が、圧縮後には同じ明るさになったり、明るさの大小関係が逆転してしまう可能性がある。非可逆圧縮は主に人間が認識できないような成分や特徴を除去することで圧縮を行うため、除去した特徴や成分が機械的な解析処理に影響を及ぼす可能性は高いという問題がある。
However, in lossless compression, compression is performed using data features such as frequent occurrence of specific symbols and phrases, so the compression rate when compressing image data that contains components with strong randomness such as noise Has the problem of becoming lower.
In the case of irreversible compression, there is a problem that features important for image analysis processing may be removed. For example, two pixels having different brightness may have the same brightness after compression, or the brightness magnitude relationship may be reversed. Since lossy compression is mainly performed by removing components and features that cannot be recognized by humans, there is a problem that the removed features and components are likely to affect the mechanical analysis processing.

本発明の目的は、圧縮後の画像特徴を失うことなく、ノイズを含んだ画像データを高圧縮率で圧縮することが可能な画像処理装置及び画像処理方法を提供することにある。   An object of the present invention is to provide an image processing apparatus and an image processing method capable of compressing image data including noise at a high compression rate without losing image characteristics after compression.

上記課題を解決するため、本発明に係る画像処理装置は、入力された画像に対して、ユーザによる入力または予め設定された2以上の整数を除数として用い、画像の各画素の画素値を除数で割ったときの商と剰余を算出し、商の画素値からなる商成分データと剰余の画素値からなる剰余成分データとに分離する成分分離手段と、前記成分分離手段によって分離された各成分をそれぞれ圧縮し、それぞれの成分の圧縮データを出力するデータ圧縮手段とを備えることを特徴とする。
また、最も圧縮率が高い前記除数を入力画像ごとに探索する手段をさらに備えることを特徴とする。
さらに、前記各成分の圧縮データを復元し、復元した商成分に前記除数を画素毎に乗算し、その乗算値に前記復元した剰余成分を加算して圧縮前の画像を復元し、復元画像を出力する圧縮データ復元手段をさらに備えることを特徴とする。
また、前記データ圧縮手段は、前記剰余成分を破棄し、商成分のみの圧縮データを出力することを特徴とする。
In order to solve the above-described problem, an image processing apparatus according to the present invention uses, as a divisor, an input by a user or a preset integer of 2 or more as a divisor for an input image, and the pixel value of each pixel of the image is a divisor. And a component separating means for calculating a quotient and a remainder when dividing by quotient and separating the quotient component data consisting of the quotient pixel value and the remainder component data consisting of the remainder pixel value, and each component separated by the component separating means And a data compression means for outputting compressed data of each component.
The divisor having the highest compression ratio is further searched for each input image.
Further, the compressed data of each component is restored, the restored quotient component is multiplied by the divisor for each pixel, the restored remainder component is added to the multiplied value to restore the image before compression, and the restored image is It further comprises compressed data restoration means for outputting.
Further, the data compression means discards the remainder component and outputs compressed data of only the quotient component.

本発明に係る画像処理方法は、入力された画像に対して、ユーザによる入力または予め設定された2以上の整数を除数として用い、画像の各画素の画素値を除数で割ったときの商と剰余を算出し、商の画素値からなる商成分データと剰余の画素値からなる剰余成分データとに分離するステップと、前記分離された各成分をそれぞれ圧縮し、それぞれの成分の圧縮データを出力するステップとを備えることを特徴とする。
また、最も圧縮率が高い前記除数を入力画像ごとに探索するステップをさらに備えることを特徴とする。
また、前記各成分の圧縮データを復元し、復元した商成分に前記除数を画素毎に乗算するステップと、その乗算値に前記復元した剰余成分を加算して圧縮前の画像を復元し、復元画像を出力するステップをさらに備えることを特徴とする。
また、前記データ圧縮手段は、前記剰余成分を破棄し、商成分のみの圧縮データを出力するステップを備えることを特徴とする。
The image processing method according to the present invention uses a quotient obtained by dividing the pixel value of each pixel of the image by the divisor, using the input by the user or a preset integer of 2 or more as the divisor for the input image. Calculating a remainder, separating the quotient component data consisting of the quotient pixel value and the remainder component data consisting of the remainder pixel value, compressing each of the separated components, and outputting the compressed data of each component And a step of performing.
Further, the method further includes a step of searching for the divisor having the highest compression rate for each input image.
In addition, the compressed data of each component is restored, the restored quotient component is multiplied by the divisor for each pixel, and the restored remainder component is added to the multiplied value to restore the pre-compression image. The method further includes the step of outputting an image.
The data compressing means includes a step of discarding the remainder component and outputting compressed data of only the quotient component.

本発明によれば、剰余成分に乱数性の高いパターンが出現するようなノイズ成分の多い画像の場合、商成分と剰余成分を分離してそれぞれ圧縮することで、画像全体としての圧縮率が高くなる。そして、各成分の圧縮に可逆圧縮を用いた場合、処理全体も可逆圧縮となるので、画像解析処理への影響を少なくすることができる。
剰余成分を破棄した場合は非可逆圧縮となるが、商成分の圧縮に適切なアルゴリズムを選択すれば、画素値の大小関係は逆転しないので、画像解析処理への影響を小さくすることができる。
According to the present invention, in the case of an image with many noise components such that a pattern with high randomness appears in the remainder component, the quotient component and the remainder component are separated and compressed respectively, so that the compression ratio of the entire image is high. Become. When reversible compression is used for compression of each component, the entire process is also reversible, so that the influence on the image analysis process can be reduced.
When the remainder component is discarded, lossy compression is performed. However, if an appropriate algorithm is selected for compression of the quotient component, the magnitude relationship between the pixel values is not reversed, so that the influence on the image analysis processing can be reduced.

本発明の実施形態を示すシステム構成図である。It is a system configuration figure showing an embodiment of the present invention. 図1の実施形態におけるデータ形式を表す図である。It is a figure showing the data format in embodiment of FIG. 図1の実施形態の全体処理を示すフローチャート図である。It is a flowchart figure which shows the whole process of embodiment of FIG. 図1の実施形態の分離圧縮処理を示すフローチャート図である。It is a flowchart figure which shows the separation compression process of embodiment of FIG. 図1の実施形態の剰余成分分離処理を示すフローチャート図である。It is a flowchart figure which shows the remainder component separation process of embodiment of FIG. 図1の実施形態の画像復元処理を示す図である。It is a figure which shows the image restoration process of embodiment of FIG.

図1は、本発明の実施の形態を示すシステム構成図である。
図1において、処理装置101は、分離圧縮処理部(103)と画像復元処理部(104)を含むプログラム(102)を実行する。また、プログラム実行時に必要な作業領域や入出力データを格納するための記憶装置と、入出力データを送受信するためのネットワーク環境も必要に応じて装備している。
プログラム102は、記憶装置またはネットワークを介して画像データ105が入力されると、それを分離圧縮処理部103で処理し、成分分離データ106を記憶装置に格納するか、またはネットワークを介して出力する。
また、記憶装置またはネットワークを介して成分分離データ107が入力されると、それを画像復元処理部104で処理し、成分分離データ108を記憶装置に格納するか、またはネットワークを介して出力する。
FIG. 1 is a system configuration diagram showing an embodiment of the present invention.
In FIG. 1, a processing apparatus 101 executes a program (102) including a separation / compression processing unit (103) and an image restoration processing unit (104). In addition, a storage area for storing work areas and input / output data necessary for program execution and a network environment for transmitting / receiving input / output data are provided as necessary.
When the image data 105 is input via the storage device or the network, the program 102 processes the image data 105 by the separation / compression processing unit 103, and stores the component separation data 106 in the storage device or outputs it via the network. .
When the component separation data 107 is input via the storage device or the network, it is processed by the image restoration processing unit 104, and the component separation data 108 is stored in the storage device or output via the network.

図2は、本実施形態で用いるデータ形式を表す図である。
データ形式は、本実施例で扱う画像データと、画像データに処理を行った場合の成分分離データがある。
まず画像データについて説明する。
画像データは、画像の幅(201)、高さ(202)、画素当たりデータ量(203)、その他ヘッダ情報(204)、画素値配列(205)からなる。
画素当たりデータ量(203)は、画素1つ当たりの色情報を表すのに必要なビット数である。これと幅(201)と高さ(202)を掛けることで、画素値配列(205)のサイズが算出できる。なお、本実施形態ではモノクロ画像を対象とするが、カラー画像に対しては、例えば赤、緑、青の各成分ごとに分けて処理するなど、容易に拡張可能である。
その他ヘッダ情報(204)には、例えば画像データの作成日時や画素値配列(205)を画像として展開するときの方向、RGBやCMYなどの画素の色形式といった、画像に関する諸情報を格納するものである。
画像データにおける201〜204をまとめて、画像のヘッダ情報と呼ぶことがある。
FIG. 2 is a diagram illustrating a data format used in the present embodiment.
The data format includes image data handled in the present embodiment and component separation data when processing is performed on the image data.
First, image data will be described.
The image data includes an image width (201), height (202), data amount per pixel (203), other header information (204), and pixel value array (205).
The data amount per pixel (203) is the number of bits necessary to represent the color information per pixel. By multiplying this by the width (201) and the height (202), the size of the pixel value array (205) can be calculated. In this embodiment, a monochrome image is a target. However, a color image can be easily expanded by, for example, processing separately for each component of red, green, and blue.
Other header information (204) stores various information related to the image, such as the creation date and time of image data, the direction when the pixel value array (205) is expanded as an image, and the color format of pixels such as RGB and CMY. It is.
The image data 201 to 204 may be collectively referred to as image header information.

次に、成分分離データについて説明する。
成分分離データは、指定された除数で画素値を割ったときの商と剰余を個別の配列に分離したデータであり、画像の幅(206)、高さ(207)、画素当たりデータ量(208)、その他ヘッダ情報(209)、除数(210)、商成分圧縮方式ID(211)、商成分配列サイズ(212)、商成分配列(213)、剰余成分圧縮方式ID(214)、剰余成分配列サイズ(215)、剰余成分配列(216)からなる。
206〜209は画像データのヘッダ情報201〜204と同一である。
成分分離データに画像データを設定する場合、206〜209のヘッダ情報は、画像のヘッダ情報201〜204からそのままコピーされる。
除数(210)は、画像の画素値を商成分と剰余成分に分離するときに用いる整数値である。成分分離データをCと表記したとき、その除数をC.Mと表記することがある。
除数に「1」を設定した場合は、全ての画素値データは商成分にのみ格納され、剰余成分は意味を持たない。
商成分圧縮方式ID(211)は、商成分配列(213)を圧縮するときに用いた圧縮方式を特定するためのIDである。
圧縮方式には可逆圧縮や非可逆圧縮として既に提案されているものを利用してよい。また、圧縮を行わずそのままの画素値を残す方式IDとして'raw'が利用できる。
利用可能な圧縮方式には、それに対応するデータ復元方式も用意されているものとする。
商成分配列サイズ(212)は、商成分配列(213)の配列サイズを格納する。
商成分配列(213)には、画像の画素値または商成分圧縮方式ID(211)で指定された圧縮方式によって画素値配列を圧縮したデータ列を格納する。成分分離データCの商成分配列をC.Pと表記することがある。
剰余成分圧縮方式ID(214)、剰余成分配列サイズ(215)、剰余成分配列(216)は それぞれ商成分に対する情報211〜213を、剰余成分に置き換えたものである。
成分分離データCの剰余成分配列をC.Qと表記することがある。
なお、商成分配列(213)や剰余成分配列(216)に対する圧縮処理、復元処理を実行して、配列データを入れ替える場合には、対応する配列サイズ(212、215)も同時に修正し、後方に続くデータは、その配列の次の位置に自動的に移動されるものとする。
Next, component separation data will be described.
The component separation data is data obtained by dividing the quotient and the remainder when the pixel value is divided by a specified divisor into separate arrays, and the image width (206), height (207), and data amount per pixel (208 ), Other header information (209), divisor (210), quotient component compression method ID (211), quotient component array size (212), quotient component array (213), residue component compression method ID (214), residue component array It consists of a size (215) and a remainder component array (216).
206 to 209 are the same as the header information 201 to 204 of the image data.
When image data is set as component separation data, the header information 206 to 209 is copied as it is from the header information 201 to 204 of the image.
The divisor (210) is an integer value used when the pixel value of the image is separated into a quotient component and a remainder component. When component separation data is expressed as C, the divisor may be expressed as CM.
When “1” is set as the divisor, all pixel value data is stored only in the quotient component, and the remainder component has no meaning.
The quotient component compression method ID (211) is an ID for specifying the compression method used when compressing the quotient component array (213).
A compression method that has already been proposed as lossless compression or lossy compression may be used. Also, 'raw' can be used as a method ID that leaves the pixel value as it is without compression.
It is assumed that a data restoration method corresponding to the available compression method is also prepared.
The quotient component array size (212) stores the array size of the quotient component array (213).
The quotient component array (213) stores a data string obtained by compressing the pixel value array by the compression method designated by the pixel value of the image or the quotient component compression method ID (211). The quotient component array of the component separation data C may be expressed as CP.
The remainder component compression method ID (214), the remainder component array size (215), and the remainder component array (216) are obtained by replacing the information 211 to 213 for the quotient component with the remainder component, respectively.
The remainder component array of the component separation data C may be expressed as CQ.
In addition, when executing the compression process and the decompression process on the quotient component array (213) and the remainder component array (216) and replacing the array data, the corresponding array size (212, 215) is also corrected at the same time. Subsequent data shall be automatically moved to the next position in the array.

図3は、本実施形態の全体処理を示すフローチャートである。
まず、圧縮対象の画像データが入力されたならば、その画像データが画像データか成分分離データかを調べる(ステップ301)。画像データである場合には、ステップ302以降の手順で圧縮処理を行い、成分分離データである場合は、画像復元処理を行う(ステップ317)。画像復元処理の詳細は図6で説明する。
以下、入力データが画像である場合の圧縮処理について説明する。
まず、結果として出力する分離データCを準備する(ステップ302)。
次に、Cに画像Iのデータを設定する(ステップ303)。ここでは、画像Iのヘッダ情報はそのままコピーし、画素値配列はCの商成分として格納する。
FIG. 3 is a flowchart showing the overall processing of this embodiment.
First, if image data to be compressed is input, it is checked whether the image data is image data or component separation data (step 301). If it is image data, compression processing is performed in the procedure from step 302 onward, and if it is component separation data, image restoration processing is performed (step 317). Details of the image restoration processing will be described with reference to FIG.
Hereinafter, compression processing when input data is an image will be described.
First, separation data C to be output as a result is prepared (step 302).
Next, image I data is set in C (step 303). Here, the header information of the image I is copied as it is, and the pixel value array is stored as a C quotient component.

次に、圧縮サイズが最小となる除数を探索するかチェックする(ステップ304)。探索する場合は以下に進む。
まず、Cの除数C.Mに「1」を代入する。除数1はデータを商成分と剰余成分に分離しないことを意味する。
次に、商成分C.Pを圧縮する(ステップ306)。このとき用いる圧縮方式は既知のものであってよい。また、使用する圧縮方式は予め決められたものでもよいし、画像ごとに圧縮方式を識別するIDを入力し、圧縮方式を自動的に選択する方法を採ってもよい。
配列を圧縮したら、Cの商成分圧縮方式IDを設定し、C.Pの配列サイズも同時に更新する。
Next, it is checked whether to search for a divisor that minimizes the compression size (step 304). When searching, proceed to the following.
First, “1” is assigned to the divisor CM of C. A divisor of 1 means that the data is not separated into a quotient component and a remainder component.
Next, the quotient component CP is compressed (step 306). The compression method used at this time may be a known one. The compression method to be used may be determined in advance, or an ID for identifying the compression method may be input for each image and the compression method may be automatically selected.
After the array is compressed, the C quotient component compression method ID is set, and the CP array size is updated simultaneously.

次に、分離データTを準備する(ステップ307)。
次に、除数T.Mに2を代入する(308)。初期値は2以上の整数であれば任意に設定可能である。
次に、T.Mが予め設定された上限値未満か調べる(ステップ309)。除数の上限は任意に設定可能であるが、本実施形態では画像データで指定されている画素当たりデータ量(203)から算出された画素値の最大値の半分を上限とする。
T.Mが上限未満の場合、まず、Tに画像Iを設定する(ステップ310)。設定方法はステップ303と同様である。
次に、Tに対して分離圧縮処理を実行する(ステップ311)。分離圧縮処理の詳細は図4で説明する。
Next, the separation data T is prepared (step 307).
Next, 2 is substituted into the divisor TM (308). The initial value can be arbitrarily set as long as it is an integer of 2 or more.
Next, it is checked whether TM is less than a preset upper limit value (step 309). Although the upper limit of the divisor can be arbitrarily set, in this embodiment, the upper limit is half of the maximum value of the pixel value calculated from the data amount per pixel (203) specified by the image data.
If TM is less than the upper limit, first, an image I is set in T (step 310). The setting method is the same as in step 303.
Next, a separation compression process is executed for T (step 311). Details of the separation compression processing will be described with reference to FIG.

次に、分離データCとTの圧縮後のサイズを比較する(ステップ312)。Tの方が小さい場合は、CにTを代入する(ステップ313)。
次に、T.Mに「1」を加え(ステップ314)、ステップ309に戻る。ステップ309でT.Mが上限以上の場合は、処理を終了する。
以上により、圧縮サイズが最小となる除数C.Mが求まる。
ステップ304で除数の探索を行わない場合は、まず、除数C.Mを初期化する(ステップ315)。除数は予め決められた値でもよいし、画像ごとに入力してもよい。
次に、Cに対して分離圧縮処理を実行し(ステップ316)、処理を終了する。
以上のように、入力画像毎に圧縮サイズが最小となる除数を求めて圧縮処理を行うことにより、圧縮対象の画像にノイズ成分が多い場合であっても高い圧縮率で画像データを圧縮可能になり、画像解析処理への影響を少なくすることができる。
Next, the compressed sizes of the separated data C and T are compared (step 312). If T is smaller, T is substituted for C (step 313).
Next, “1” is added to TM (step 314), and the process returns to step 309. If TM is greater than or equal to the upper limit in step 309, the process ends.
Thus, the divisor CM that minimizes the compression size is obtained.
If the divisor search is not performed in step 304, first, the divisor CM is initialized (step 315). The divisor may be a predetermined value or may be input for each image.
Next, a separation / compression process is executed for C (step 316), and the process ends.
As described above, by obtaining a divisor that minimizes the compression size for each input image and performing compression processing, it is possible to compress image data at a high compression rate even when the image to be compressed has a lot of noise components. Thus, the influence on the image analysis processing can be reduced.

図4は、本実施形態における分離圧縮処理を示すフローチャートである。
まず、入力された分離データCに対して剰余成分分離処理を実行する(ステップ401)。この処理の詳細は図5で説明する。
次に、Cの商成分配列C.Pを圧縮する(ステップ402)。このとき用いる圧縮方式は既知のものであってよい。また、使用する圧縮方式は予め決められたものでもよいし、画像ごとに圧縮方式を識別するIDを入力し、そのIDで圧縮方式を選択するようにしてもよい。
配列を圧縮したら、Cの商成分圧縮方式IDを設定し、C.Pの配列サイズも同時に更新する。
次に、剰余成分を破棄するかチェックする(ステップ403)。これは予め決めておいても良いし、画像ごとに別途入力してもよい。
ステップ403がYesの場合は、剰余成分C.Qを破棄する(ステップ404)。このとき同時に剰余成分配列サイズには「0」を代入する。
ステップ403がNoの場合は、剰余成分C.Qを圧縮する(ステップ405)。このとき用いる圧縮方式は商成分の場合と同様に既知のものであってよいし、使用する圧縮方式は予め決められたものでもよいし、画像ごとに圧縮方式を識別するIDを入力してもよい。
配列を圧縮したら、Cの剰余成分圧縮方式IDを設定し、C.Qの配列サイズも同時に更新する。
ここで、剰余成分C.Qを破棄した場合、非可逆圧縮となるが、商成分の圧縮に適切なアルゴリズムを選択すれば、画素値の大小関係は逆転しないので、画像解析処理への影響を小さくすることができる。
FIG. 4 is a flowchart showing the separation and compression processing in the present embodiment.
First, a remainder component separation process is performed on the input separation data C (step 401). Details of this processing will be described with reference to FIG.
Next, the C quotient component array CP is compressed (step 402). The compression method used at this time may be a known one. The compression method to be used may be determined in advance, or an ID for identifying the compression method may be input for each image, and the compression method may be selected based on the ID.
After the array is compressed, the C quotient component compression method ID is set, and the CP array size is updated simultaneously.
Next, it is checked whether the remainder component is discarded (step 403). This may be determined in advance or may be input separately for each image.
If step 403 is Yes, the remainder component CQ is discarded (step 404). At the same time, “0” is assigned to the remainder component array size.
If step 403 is No, the remainder component CQ is compressed (step 405). The compression method used at this time may be a known one as in the case of the quotient component, the compression method to be used may be predetermined, or an ID for identifying the compression method may be input for each image. Good.
After the array is compressed, the C remainder component compression method ID is set, and the CQ array size is simultaneously updated.
Here, when the remainder component CQ is discarded, lossy compression is performed. However, if an appropriate algorithm is selected for compression of the quotient component, the magnitude relationship between pixel values is not reversed, so the influence on the image analysis processing is reduced. be able to.

図5は、本実施形態における剰余成分分離処理のフローチャートである。
この処理には分離データCが入力され、商成分に元の画像のデータが格納され、これから分離処理を行うのに必要な除数が設定されている。
まず、配列p.qを準備する(ステップ501)。pは処理後に商成分となるデータを、qは剰余成分となるデータを格納するための領域である。p,qはCの商成分配列と同じサイズだけ確保する。
次に、変数iに「0」を代入する(ステップ502)。次に、iが画素数未満の間、以下を実行する(ステップ503)。まず、C.P[i]を除数C.Mで割った剰余を q[i] に代入する(ステップ504)。次に、C.P[i]を除数C.Mで割った商をp[i]に代入する(505)。
次に、iに「1」を加えて(ステップ606)、ステップ503に戻る。
ステップ503でNoの場合、まず、配列pを商成分C.Pに代入する(ステップ507)。
次に、配列qを剰余成分C.Qに設定し(ステップ508)、処理を終了する。このとき、Cの剰余成分配列サイズも同時に配列qのサイズに更新する。
FIG. 5 is a flowchart of the remainder component separation process in the present embodiment.
Separation data C is input to this process, the original image data is stored in the quotient component, and a divisor necessary for performing the separation process is set.
First, an array pq is prepared (step 501). p is an area for storing data that becomes a quotient component after processing, and q is an area for storing data that becomes a remainder component. For p and q, only the same size as the C quotient component array is secured.
Next, “0” is substituted into the variable i (step 502). Next, while i is less than the number of pixels, the following is executed (step 503). First, the remainder obtained by dividing CP [i] by the divisor CM is substituted into q [i] (step 504). Next, the quotient obtained by dividing CP [i] by the divisor CM is substituted into p [i] (505).
Next, “1” is added to i (step 606), and the process returns to step 503.
In the case of No in step 503, first, the array p is substituted into the quotient component CP (step 507).
Next, the array q is set as the remainder component CQ (step 508), and the process is terminated. At this time, the C remainder component array size is simultaneously updated to the size of the array q.

図6は、本実施形態にける画像復元処理のフローチャートである。
まず、入力された分離データCの商成分配列C.Pを、その圧縮方式IDで指定された方式に対する復元方式で復元する(ステップ601)。剰余成分C.Qのサイズが「0」の場合は何もしない。
次に 除数C.Mが1より大きくかつ剰余成分C.Qのサイズが「0」より大きいか調べる(602)。
Yesの場合は、まず、剰余成分C.Qを、その圧縮方式IDで指定された方式に対する復元方式で復元する(ステップ603)。次に変数iに「0」を代入する(ステップ604)。そして、iが画素数未満の間、以下を実行する(ステップ605)。
まず、iの位置の商成分と剰余成分と除数から、元の画素値を算出して、商成分を更新する(ステップ606)。画素値は C.P[i] × C.M + C.Q[i] で算出する。ここで、C.Pは商成分配列、C.Qは剰余成分配列、C.Mは除数を表す。ここで、C.Qのサイズが「0」の場合は、C.Q[i]は常に「0」とみなす。
次に、iに「1」を加えて(ステップ607)、ステップ605に戻る。
一方、ステップ602でNoだった場合(剰余成分がなかった場合)と、ステップ605でNoだった場合は、Cのヘッダ情報(206〜209)と商成分C.Pから復元画像Iを生成し(ステップ608)、処理を終了する。
FIG. 6 is a flowchart of the image restoration process in the present embodiment.
First, the quotient component array CP of the input separated data C is restored by the restoration method corresponding to the method designated by the compression method ID (step 601). If the size of the remainder component CQ is “0”, nothing is done.
Next, it is checked whether the divisor CM is larger than 1 and the size of the remainder component CQ is larger than “0” (602).
If Yes, the remainder component CQ is first restored by the restoration method for the method specified by the compression method ID (step 603). Next, “0” is substituted into the variable i (step 604). Then, while i is less than the number of pixels, the following is executed (step 605).
First, the original pixel value is calculated from the quotient component, remainder component, and divisor at the position i, and the quotient component is updated (step 606). Pixel value is calculated as CP [i] × CM + CQ [i]. Here, CP represents a quotient component array, CQ represents a remainder component array, and CM represents a divisor. Here, when the size of CQ is “0”, CQ [i] is always regarded as “0”.
Next, “1” is added to i (step 607), and the process returns to step 605.
On the other hand, if No in step 602 (when there is no remainder component) or No in step 605, a restored image I is generated from the C header information (206 to 209) and the quotient component CP (step 608), the process is terminated.

101…処理装置
102…プログラム
103…分離圧縮処理部
104…画像復元処理部
105…入力画像データ
106…出力分離圧縮データ
107…入力分離圧縮データ
108…出力画像データ
DESCRIPTION OF SYMBOLS 101 ... Processing apparatus 102 ... Program 103 ... Separation compression processing part 104 ... Image restoration processing part 105 ... Input image data 106 ... Output separation compression data 107 ... Input separation compression data 108 ... Output image data

Claims (8)

入力された画像に対して、ユーザによる入力または予め設定された2以上の整数を除数として用い、画像の各画素の画素値を除数で割ったときの商と剰余を算出し、商の画素値からなる商成分データと剰余の画素値からなる剰余成分データとに分離する成分分離手段と、前記成分分離手段によって分離された各成分をそれぞれ圧縮し、それぞれの成分の圧縮データを出力するデータ圧縮手段とを備えることを特徴とする画像処理装置。   For the input image, the quotient and the remainder are calculated by dividing the pixel value of each pixel of the image by the divisor using the input by the user or a preset integer of 2 or more as the divisor, and calculating the pixel value of the quotient Component separating means for separating the quotient component data consisting of and residual component data consisting of the remainder pixel values, and data compression for compressing each component separated by the component separating means and outputting compressed data for each component And an image processing apparatus. 最も圧縮率が高い前記除数を入力画像ごとに探索する手段をさらに備えることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, further comprising means for searching for the divisor having the highest compression rate for each input image. 前記各成分の圧縮データを復元し、復元した商成分に前記除数を画素毎に乗算し、その乗算値に前記復元した剰余成分を加算して圧縮前の画像を復元し、復元画像を出力する圧縮データ復元手段をさらに備えることを特徴とする請求項1または2に記載の画像処理装置。   The compressed data of each component is restored, the restored quotient component is multiplied by the divisor for each pixel, the restored remainder component is added to the multiplied value, the image before compression is restored, and the restored image is output The image processing apparatus according to claim 1, further comprising a compressed data decompression unit. 前記データ圧縮手段は、前記剰余成分を破棄し、商成分のみの圧縮データを出力することを特徴とする請求項1または2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the data compression unit discards the remainder component and outputs compressed data including only a quotient component. 入力された画像に対して、ユーザによる入力または予め設定された2以上の整数を除数として用い、画像の各画素の画素値を除数で割ったときの商と剰余を算出し、商の画素値からなる商成分データと剰余の画素値からなる剰余成分データとに分離するステップと、前記分離された各成分をそれぞれ圧縮し、それぞれの成分の圧縮データを出力するステップとを備えることを特徴とする画像処理方法。   For the input image, the quotient and the remainder are calculated by dividing the pixel value of each pixel of the image by the divisor using the input by the user or a preset integer of 2 or more as the divisor, and calculating the pixel value of the quotient Separating the quotient component data and the remainder component data comprising the pixel value of the remainder, and compressing each of the separated components and outputting the compressed data of the respective components. Image processing method. 最も圧縮率が高い前記除数を入力画像ごとに探索するステップをさらに備えることを特徴とする請求項5に記載の画像処理方法。   The image processing method according to claim 5, further comprising a step of searching for the divisor having the highest compression rate for each input image. 前記各成分の圧縮データを復元し、復元した商成分に前記除数を画素毎に乗算するステップと、その乗算値に前記復元した剰余成分を加算して圧縮前の画像を復元し、復元画像を出力するステップをさらに備えることを特徴とする請求項5または6に記載の画像処理方法。   The compressed data of each component is restored, the restored quotient component is multiplied by the divisor for each pixel, the restored remainder component is added to the multiplied value to restore the image before compression, and the restored image is The image processing method according to claim 5, further comprising an output step. 前記データ圧縮手段は、前記剰余成分を破棄し、商成分のみの圧縮データを出力するステップを備えることを特徴とする請求項5または6に記載の画像処理方法。   The image processing method according to claim 5, wherein the data compression unit includes a step of discarding the remainder component and outputting compressed data of only a quotient component.
JP2011031953A 2011-02-17 2011-02-17 Image processing apparatus and image processing method Withdrawn JP2012175140A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011031953A JP2012175140A (en) 2011-02-17 2011-02-17 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011031953A JP2012175140A (en) 2011-02-17 2011-02-17 Image processing apparatus and image processing method

Publications (1)

Publication Number Publication Date
JP2012175140A true JP2012175140A (en) 2012-09-10

Family

ID=46977672

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011031953A Withdrawn JP2012175140A (en) 2011-02-17 2011-02-17 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP2012175140A (en)

Similar Documents

Publication Publication Date Title
Bayer et al. DCT-like transform for image compression requires 14 additions only
JP6195997B2 (en) Data source encoding / decoding method and apparatus with symbol compression
US11074723B2 (en) Lossless compression of fragmented image data
JP2017507590A5 (en)
CN106503165A (en) Compression, decompressing method, device and equipment
JP4784281B2 (en) Decoding device, inverse quantization method, and program thereof
JP2006080794A5 (en)
CN101800761B (en) Lossless data compression method based on network dictionary
US9479792B2 (en) Apparatus and method for compression of image data assembled into groups
US10116328B2 (en) Encoders, decoders and methods utilizing mode symbols
US8305244B2 (en) Coding data using different coding alphabets
JP2012175140A (en) Image processing apparatus and image processing method
WO2010017322A1 (en) Two stage differencing algorithm with adaptive compression
RU2339082C1 (en) Method of compressing and decompressing static images and videos in digital form
CN103841396A (en) Coding method and system for stereo video
KR101573983B1 (en) Method of data compressing, method of data recovering, and the apparatuses thereof
Omari et al. Fractal image compression based on polynomial interpolation
Raj et al. Image compression using pictorial representation of data
KR20170014676A (en) Binary data compression and transferation method and apprartus thereof
WO2018154982A1 (en) Image decoding device
WO2018159105A1 (en) Image-decoding device
JP6510414B2 (en) Lossless method for transferring a file encoded by a first encoding to a file encoded by a second encoding
CN102572425A (en) Huffman decoding method
JP2003250052A (en) Image processing system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140513