JP5947385B2 - Image compression apparatus, operation control method thereof, and operation control program thereof - Google Patents
Image compression apparatus, operation control method thereof, and operation control program thereof Download PDFInfo
- Publication number
- JP5947385B2 JP5947385B2 JP2014531554A JP2014531554A JP5947385B2 JP 5947385 B2 JP5947385 B2 JP 5947385B2 JP 2014531554 A JP2014531554 A JP 2014531554A JP 2014531554 A JP2014531554 A JP 2014531554A JP 5947385 B2 JP5947385 B2 JP 5947385B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- compression
- data amount
- page
- total
- 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.)
- Active
Links
- 238000007906 compression Methods 0.000 title claims description 140
- 230000006835 compression Effects 0.000 title claims description 138
- 238000000034 method Methods 0.000 title claims description 19
- 230000007423 decrease Effects 0.000 claims description 4
- 238000004891 communication Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000013139 quantization Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 241000556720 Manga Species 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/146—Data rate or code amount at the encoder output
- H04N19/152—Data rate or code amount at the encoder output by measuring the fullness of the transmission buffer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/172—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Description
この発明は,画像圧縮装置ならびにその動作制御方法およびその動作制御プログラムに関する。 The present invention relates to an image compression apparatus, an operation control method thereof, and an operation control program thereof.
電子化された漫画をスマートフォンに代表される携帯電話に送信することにより,携帯電話の表示画面に漫画を表示できるようになってきている。電子化された漫画を圧縮せずに送信するとデータ量が多いので,電子化された漫画全体のデータ量が所定のデータ量以下となるように圧縮することが多い。 By sending electronic comics to mobile phones such as smartphones, it has become possible to display comics on the display screen of mobile phones. Since the amount of data is large when an electronic comic is transmitted without being compressed, it is often compressed so that the total data amount of the electronic comic is less than a predetermined data amount.
また,撮影条件に応じて圧縮率が変更されうる状況であっても,正確な撮影可能枚数の予測を確保するもの(特許文献1),少ない容量のメモリに複数の原稿のデータを効率的に格納することができるようにするもの(特許文献2),圧縮方法を適宜切り替えることにより,データ転送効率を向上させるもの(特許文献3)などもある。 Further, even in a situation where the compression rate can be changed according to the shooting conditions, it is possible to ensure an accurate prediction of the number of shots that can be taken (Patent Document 1). There are those that enable storage (Patent Document 2), and those that improve data transfer efficiency by switching the compression method as appropriate (Patent Document 3).
電子化された画像群を所望のデータ量となるように圧縮する場合,できるだけ早く圧縮が終了することが好ましい。 When compressing a digitized image group so as to have a desired data amount, it is preferable that the compression is completed as soon as possible.
この発明は,画像群,画像化された写真集,画像化されたフォト・ブック(フォト・アルバム)などの画像群を,できるだけ,早く圧縮が終了することを目的とする。 An object of the present invention is to finish compression of image groups such as image groups, imaged photo books, and imaged photo books (photo albums) as soon as possible.
第1の発明による画像圧縮装置は,複数のページ画像から構成される画像群のそれぞれのページ画像をページ画像ごとに順に読み取る読取手段,および読取手段によって読み取られた第n番目のページ画像のページ目標データ量が,[(圧縮後の画像群の全体目標データ量)−{第(n−1)番目までの圧縮後のページ画像の総データ量}−(余裕データ量)]/{(画像群の総ページ数)−{第(n−1)番目までのページ数}となるように圧縮する圧縮手段を備えていることを特徴とする。 According to a first aspect of the present invention, there is provided an image compression apparatus comprising: a reading unit that sequentially reads each page image of an image group including a plurality of page images for each page image; and a page of an nth page image read by the reading unit. The target data amount is [(total target data amount of the image group after compression) − {total data amount of the page image after compression up to the (n−1) th}} − (room data amount)] / {(image It is characterized by comprising compression means for compressing so that the total number of pages in the group)-{number of pages up to (n-1) th}.
第1の発明は,画像圧縮装置に適した動作制御方法も提供している。すなわち,この方法は,読取手段が,複数のページ画像から構成される画像群のそれぞれのページ画像をページ画像ごとに順に読み取り,圧縮手段が,読取手段によって読み取られた第n番目のページ画像のページ目標データ量が,[(圧縮後の画像群の全体目標データ量)−{第(n−1)番目までの圧縮後のページ画像の総データ量}−(余裕データ量)]/{(画像群の総ページ数)−{第(n−1)番目までのページ数}となるように圧縮するものである。 The first invention also provides an operation control method suitable for an image compression apparatus. That is, in this method, the reading unit reads each page image of an image group composed of a plurality of page images in order for each page image, and the compression unit reads the nth page image read by the reading unit. The page target data amount is [(total target data amount of the image group after compression) − {total data amount of the page image after compression up to the (n−1) th}} − (room data amount)] / {( The compression is performed so that the total number of pages in the image group)-{number of pages up to (n-1) th}.
第1の発明は,画像圧縮装置の動作制御方法を実施するためのコンピュータが読取可能なプログラムも提供している。そのようなプログラムを格納した,コンピュータに着脱自在な記録媒体を提供するようにしてもよい。 The first invention also provides a computer-readable program for executing the operation control method of the image compression apparatus. A recording medium storing such a program and detachable from the computer may be provided.
第1の発明によると,画像群は複数のページ画像から構成されており,それぞれのページ画像ごとに順に読み取られる。読み取られた第n番目のページ画像のデータ量(ページ目標データ量)が,[(圧縮後の画像群の全体目標データ量)−{第(n−1)番目までの圧縮後のページ画像の総データ量}−(余裕データ量)]/{(画像群の総ページ数)−{第(n−1)番目までのページ数}となるように圧縮される。読み取られたページ画像を順に圧縮することにより,圧縮後の画像群のデータ量が所望のデータ量(全体目標データ量)となるので,比較的迅速に画像群を圧縮できる。 According to the first invention, the image group includes a plurality of page images, and each page image is read sequentially. The data amount (page target data amount) of the read n-th page image is [(total target data amount of the image group after compression) − {(n−1) -th compressed page image of Total data amount} − (room data amount)] / {(total number of pages in image group) − {number of pages up to (n−1) th}}. By compressing the read page images in order, the data amount of the compressed image group becomes a desired data amount (total target data amount), so that the image group can be compressed relatively quickly.
圧縮手段により圧縮されたページ画像の総データ量が全体目標データ量を超えたかどうかを判定する判定手段,および判定手段において,圧縮手段により圧縮されたページ画像の総データ量が全体目標データ量を超えたと判定されたことに応じて,ページ画像の圧縮順と逆順にページ画像が最低画質以上となり,かつ圧縮手段による圧縮後の画像群が全体目標データ量に収まるまで,圧縮手段による圧縮前のページ画像を圧縮するように圧縮手段を制御する圧縮制御手段をさらに備えてもよい。 In the determining means for determining whether or not the total data amount of the page image compressed by the compressing means exceeds the total target data amount, and in the determining means, the total data amount of the page image compressed by the compressing means determines the total target data amount. In response to the determination that it has exceeded the page image compression order in the reverse order of the page image compression, the page image before compression by the compression means is compressed until the image group after compression by the compression means falls within the overall target data amount. You may further provide the compression control means which controls a compression means so that a page image may be compressed.
余裕データ量は,nが大きくなるほど小さくなることが好ましい。 It is preferable that the margin data amount decreases as n increases.
第2の発明は,ページ画像の中にコマが割り振られている,そのようなページ画像が複数集まって構成される画像群から,コマ内の画像をコマごとに順に読み取る読取手段,および読取手段によって読み取られた第m番目のコマ内の画像のコマ目標データ量が,[(圧縮後の画像群の全体目標データ量−第(m−1)番目までの圧縮後のコマ内の画像の総データ量)−余裕データ量]×m番目のコマの面積/[(画像群のすべてのコマの総面積)−{第(m−1)番目のすべてのコマの総面積}]となるように圧縮する圧縮手段を備えていることを特徴とする。 According to a second aspect of the present invention, there is provided reading means, and reading means for sequentially reading the images in the frames for each frame from an image group in which a plurality of such page images are collected. The frame target data amount of the image in the m-th frame read by “[(total target data amount of the compressed image group−total number of images in the compressed frame up to the (m−1) th) frame” Data amount) −allowance data amount] × mth frame area / [(total area of all frames in the image group) − {total area of all (m−1) th frames}]. A compression means for compressing is provided.
第2の発明は,上記画像圧縮装置に適した動作制御方法も提供している。すなわち,この方法は,読取手段が,ページ画像の中にコマが割り振られている,そのようなページ画像が複数集まって構成される画像群から,コマ内の画像をコマごとに順に読み取り,圧縮手段が,読取手段によって読み取られた第m番目のコマ内の画像のコマ目標データ量が,[(圧縮後の画像群の全体目標データ量−第(m−1)番目までの圧縮後のコマ内の画像の総データ量)−余裕データ量]×m番目のコマの面積/[(画像群のすべてのコマの総面積)−{第(m−1)番目のすべてのコマの総面積}]となるように圧縮するものである。 The second invention also provides an operation control method suitable for the image compression apparatus. That is, in this method, the reading means reads the images in the frames one by one from the image group in which the frames are allocated in the page images, and is composed of a plurality of such page images. Means that the frame target data amount of the image in the m-th frame read by the reading unit is [(total target data amount of the compressed image group− (m−1) -th compressed frame). The total data amount of the images in the image) −the marginal data amount] × the area of the mth frame / [(the total area of all the frames in the image group) − {the total area of all the (m−1) th frames}. ] To be compressed.
第2の発明においても,画像圧縮装置の動作制御方法を実施するのに提起したコンピュータが読み取り可能なプログラムを提供している。そのようなプログラムを格納した,コンピュータに着脱自在なプログラムを提供するようにしてもよい。 Also in the second invention, there is provided a computer-readable program proposed for carrying out the operation control method of the image compression apparatus. A program that stores such a program and is detachable from the computer may be provided.
第2の発明によると,ページ画像の中にコマが割り振られている,そのようなページ画像が複数集まって構成され画像群から,コマ内の画像がコマごとに順に読み取られる。読み取られた第m番目のコマ内の画像のデータ量(コマ目標データ量)が,[(圧縮後の画像群の全体目標データ量−第(m−1)番目までの圧縮後のコマ内の画像の総データ量)−余裕データ量]×m番目のコマの面積/[(画像群のすべてのコマの総面積)−{第(m−1)番目のすべてのコマの総面積}]となるように圧縮される。読み取られたコマ内の画像を順に圧縮することにより,圧縮後の画像群のデータ量が所望のデータ量(全体目標データ量)となるので,比較的迅速に画像群を圧縮できる。 According to the second invention, a frame is allocated to a page image, and a plurality of such page images are collected and images in the frame are sequentially read from the image group for each frame. The data amount of the image in the read m-th frame (frame target data amount) is [(total target data amount of image group after compression− (m−1) -th compressed frame in the compressed frame)]. (Total data amount of image) −allowance data amount] × m-th frame area / [(total area of all frames of image group) − {total area of all (m−1) -th frames}] Compressed to be By compressing the images in the read frames in order, the data amount of the compressed image group becomes a desired data amount (total target data amount), so that the image group can be compressed relatively quickly.
圧縮手段により圧縮されたコマ内の画像の総データ量が,全体目標データ量を超えたかどうかを判定する判定手段,および判定手段において,圧縮手段により圧縮されたコマ内の画像の総データ量が,全体目標データ量を超えたと判定されたことに応じて,コマ内の画像の圧縮順と逆順にコマ内の画像が,最低画質以上となり,かつ圧縮手段による圧縮後の画像群が全体目標データ量に収まるまで圧縮手段による圧縮前のコマ内の画像を圧縮するように圧縮手段を制御する圧縮制御手段をさらに備えてもよい。 The determining means for determining whether or not the total data amount of the image in the frame compressed by the compression means exceeds the overall target data amount, and in the determining means, the total data amount of the image in the frame compressed by the compression means is In response to the determination that the overall target data amount has been exceeded, the images in the frames have the minimum image quality in the reverse order of the compression order of the images in the frames, and the image group after compression by the compression means is the overall target data. You may further provide the compression control means which controls a compression means so that the image in the frame before the compression by a compression means may be compressed until it fits in quantity.
余裕データ量は,mが大きくなるほど小さくなることが好ましい。 The margin data amount is preferably smaller as m is larger.
図1は,この発明の実施例を示すもので,漫画画像圧縮装置1の電気的構成を示すブロック図である。
FIG. 1 shows an embodiment of the present invention and is a block diagram showing an electrical configuration of a comic
漫画画像圧縮装置1の全体の動作は,CPU2によって統括される。
The overall operation of the comic
漫画画像圧縮装置1には,インターネットなどのネットワークと接続するための通信インターフェイス3,データを記憶するメモリ4,漫画画像(画像群)を表示する表示装置5およびキーボードなどの入力装置6が含まれている。また,漫画画像圧縮装置1には,ハードディスク8およびハードディスク8にアクセスするハードディスク・ドライブ7ならびにCD-ROM(コンパクト・ディスク-リード・オンリ・メモリ)ドライブ9も含まれている。後述する動作を制御するプログラムが格納されているCD-ROM10がCD-ROMドライブ9によって読み取られると,読み取られたプログラムが漫画画像圧縮装置1にインストールされる。プログラムは,CD-ROM10以外の記録媒体に記録されており,そのような記録媒体から読み取られて漫画画像圧縮装置1にインストールされるようにしてもよい。また,インターネットなどを介して漫画画像圧縮装置1にプログラムを送信して,通信インターフェイス3を介して受信したプログラムが漫画画像圧縮装置1にインストールされるようにしてもよい。漫画画像圧縮装置1はコンピュータを利用して構成できる。
The comic
図2は,10ページ分のページ画像から構成される漫画画像を示している。 FIG. 2 shows a comic image composed of 10 pages of page images.
漫画画像は,第1ページ画像31から第10ページ画像40までの10個のページ画像31〜40で構成されている。もちろん,漫画画像は10個のページ画像未満のページ画像によって構成されていてもよいし,10個のページ画像より多くのページ画像によって構成されていてもよい。
The comic image is composed of ten
第1ページ画像31から第10ページ画像40のそれぞれのページ画像のデータ量は,すべて10MBであるとする。もちろん,ページ画像ごとにデータ量が異なっていてもよい。漫画画像の合計のデータ量は100MBとなる。この実施例では,漫画画像の合計のデータ量が目標のデータ量(全体目標データ量)である20MBとなるように,できるだけ迅速に漫画画像を圧縮するものである。
It is assumed that the data amount of each page image from the
図3は,漫画画像圧縮装置1の処理手順を示すフローチャートである。
FIG. 3 is a flowchart showing the processing procedure of the comic
この実施例では,漫画画像の圧縮はJPEG(Joint Photographic Experts Group)が利用される。JPEGでは,画像を8画素×8画素のブロックに分割し,そのブロック単位で離散コサイン変換を用いて空間領域から周波数領域へ変換される。変換されたデータが,量子化によってデータ量が落とされてから,ハフマン符号によるエントロピー符号化がなされる。量子化において利用されるパラメータがQ値と呼ばれ,そのQ値の値により圧縮後のデータ量が変わる。 In this embodiment, JPEG (Joint Photographic Experts Group) is used for compression of the comic image. In JPEG, an image is divided into blocks of 8 pixels × 8 pixels, and converted from the spatial domain to the frequency domain using discrete cosine transform in units of blocks. The converted data is subjected to entropy coding using Huffman codes after the amount of data is reduced by quantization. A parameter used in quantization is called a Q value, and the amount of data after compression changes depending on the value of the Q value.
上述したハードディスク8に漫画画像を表わすデータが格納されている。パラメータnが1にセットされ(ステップ51),第n番目のページ画像がハードディスク8から読み取られる(ステップ52)。したがって,最初は第1ページ目のページ画像31を表わす画像データがハードディスク8から読み取られることとなる。
Data representing a cartoon image is stored in the
この実施例では,式1の演算式にもとづくデータ量(ページ目標データ量)となるようなQ値が算出される(ステップ53)。圧縮後のデータ量が所望のデータ量近傍となるQ値を算出する方法は公知であるため,説明を省略する。 In this embodiment, a Q value is calculated such that the data amount (page target data amount) is based on the arithmetic expression of Equation 1 (step 53). Since a method for calculating the Q value at which the compressed data amount is close to the desired data amount is known, the description thereof is omitted.
[(圧縮後の漫画画像の全体目標データ量)−{第(n−1)番目までの圧縮後のページ画像の総データ量}−(余裕データ量)]/{(漫画画像の総ページ数)−{第(n−1)番目までのページ数}・・・式1
[(Total target data amount of the comic image after compression) − {Total data amount of the page image after compression up to the (n−1) th}} − (Margin data amount)] / {(Total number of pages of the comic image) )-{Number of pages up to the (n-1) th}}
式1において,余裕データ量は,漫画画像の圧縮が行われる場合に圧縮後の漫画画像の全体の目標データ量内に収まるようにするためのものであり,たとえば,1MBである。この余裕データ量は,圧縮した漫画画像の残りのページ画像が少なくなるにつれて,少なくなるようにしてもよい。たとえば,余裕データ量=(第1の所定値−第2の所定値×n)とすればよい。但し,第1の所定値>(第2の所定値×n)である。
In
式1において,全体目標データ量は20MBであり,第1番目のページ画像31は,n=1であるから,{第(n−1)番目までの圧縮後のページ画像の総データ量}および{第(n−1)番目までのページ数}は,いずれも0となる。第1番目のページ画像31の目標ページ画像データのデータ量は,(20MB−0MB−1MB)/(10−0)=1.9MBとなる。第1ページ画像31については,1.9MBが目標ページ画像データのデータ量となり,そのようなデータ量となるようなQ値が算出されて,圧縮が行われる(ステップ54)。
In
式1にもとづいて得られるデータ量となるようなQ値が算出されて,そのQ値を利用して圧縮した場合,式1にもとづいて得られる目標ページ画像データのデータ量となるかどうかは実際に圧縮してみないと分らない。たとえば,第1ページ画像31については,目標ページ画像データのデータ量が1.9MBだったにもかかわらず実際に圧縮すると3MBとなってしまうことがある。このように,目標ページ画像データのデータ量と実際の圧縮後のページ画像データのデータ量とは一致しないことがある。
If a Q value that is the amount of data obtained based on
図4は,漫画画像の圧縮後の様子を示している。 FIG. 4 shows a state after the comic image is compressed.
上述したように,第1ページ画像31の目標ページ画像データのデータ量は1.9MBだったにもかかわらず,実際に圧縮して得られたデータ量は3MBだったとする。また,同様に,第2ページ画像32の目標ページ画像データのデータ量は1.77MBだったにもかかわらず,実際に圧縮して得られたデータ量は2.5MBだったとする。このように,目標ページ画像データのデータ量と実際に圧縮して得られたデータ量とが異なってしまうと,漫画画像を構成するすべてのページ画像の目標ページ画像データのデータ量をあらかじめ決めておくことはできない。この実施例では,ハードディスク8から順に読み出されるページ画像の目標ページ画像データ量を,上述した式1にしたがって順に決定することにより,目標ページ画像データのデータ量と実際に圧縮して得られたデータ量とが異なっても,圧縮後の漫画画像のデータ量を全体目標データ量に収めることができる。
As described above, it is assumed that the data amount obtained by actual compression is 3 MB even though the data amount of the target page image data of the
式1にしたがって目標ページ画像データのデータ量が決定され,そのデータ量となるようにページ画像が圧縮された場合であっても,圧縮後の漫画画像のデータ量が全体目標データ量に収まらないことがある(特に,最後のページ画像40を圧縮した場合において目標ページ画像データよりも実際の圧縮後のデータ量が多くなってしまったとき)。このために,圧縮後のページ画像データの総データ量が全体目標データ量を超えてしまったかどうかが確認される(図3ステップ55)。
Even if the data amount of the target page image data is determined according to
超えていなければ(ステップ55でNO),漫画画像を構成するすべてのページ画像について圧縮処理が終了したかどうかが確認される(ステップ59)。終了していなければ,パラメータnがインクレメントされ(ステップ60),次のページ画像を表わすデータがハードディスク8から読み取られる(ステップ52)。 If not exceeded (NO in step 55), it is confirmed whether or not the compression processing has been completed for all page images constituting the comic image (step 59). If not completed, the parameter n is incremented (step 60), and data representing the next page image is read from the hard disk 8 (step 52).
第1ページ画像31の目標ページ画像のデータ量が1.9MBだったにもかかわらず,実際に圧縮したところ3MBとなってしまった場合に,第2ページ画像32の目標ページ画像のデータ量は,式1から,(20MB−3M−1MB)/(10−1)=1.77MBとなる。この目標ページ画像のデータ量となるようなQ値が算出され,算出されたQ値を用いて第2ページ画像32が圧縮される(ステップ54)。第2ページ画像32が実際に圧縮され,得られたデータが例えば2.5MBであったとすると,実際に得られたデータを利用して式1にしたがって次のページ画像である第3ページ画像33の目標ページ画像データ量が算出される。
Even if the data amount of the target page image of the
ページ画像の圧縮が繰り返され,圧縮後の総データ量が全体目標データ量を超えてしまうと(ステップ55でYES),圧縮前の第nページ目のページ画像が,あらかじめ定められている最低Q値を利用して圧縮される(ステップ56)。この最低Q値は,圧縮後の画像が最低画質以上となるような値である。もっとも,最低Q値そのものでなくとも,その近傍の値でもよい。最低Q値を利用して圧縮されることにより,圧縮後のページ画像のデータ量は少なくなるので,圧縮後の漫画画像の総データ量が全体目標データ量以内に収まるようになる。圧縮後の総データ量が全体目標データ量以内に収まっていなければ(ステップ57でYES),パラメータnがデクレメントされ(ステップ58),前ページのページ画像も最低Q値を利用して圧縮されるようになる。圧縮後の総データ量が全体目標データ量以内に収まるようになると(ステップ57でNO),ステップ59の処理に移行する。 If the compression of the page image is repeated and the total data amount after compression exceeds the total target data amount (YES in step 55), the page image of the nth page before compression is set to a predetermined minimum Q. The value is used for compression (step 56). The minimum Q value is a value such that the compressed image has a minimum image quality. Of course, it may not be the lowest Q value itself, but a value in the vicinity thereof. By compressing using the lowest Q value, the data amount of the page image after compression is reduced, so that the total data amount of the comic image after compression falls within the overall target data amount. If the total data amount after compression does not fall within the overall target data amount (YES in step 57), the parameter n is decremented (step 58), and the page image of the previous page is also compressed using the minimum Q value. Become so. When the total data amount after compression falls within the total target data amount (NO in step 57), the process proceeds to step 59.
このように,圧縮されたページ画像の総データ量が全体目標データ量を超えた場合には,全体目標データ量に収まるまで,ページ画像の圧縮順と逆順に最低画質以上となるように圧縮前のページ画像を圧縮すればよい。 As described above, when the total data amount of the compressed page image exceeds the overall target data amount, the compression before the compression is performed so that the image quality becomes equal to or higher than the minimum image quality in the reverse order of the page image until the total target data amount is reached. The page image may be compressed.
図5から図7は,他の実施例を示している。 5 to 7 show other embodiments.
上述の実施例では,ページ画像単位で圧縮処理が行われているが,この実施例では,コマ内の画像単位で圧縮処理が行われる。 In the above-described embodiment, the compression process is performed in units of page images. In this embodiment, the compression process is performed in units of images within a frame.
図5は,漫画画像を構成するページ画像31,32および40を示している。図5においては,ページ画像31,32および40が図示されているが,その他のページ画像もあるのはいうまでもない。
FIG. 5 shows
第1ページ画像31には,第1のコマ101から第6のコマ106が割り振られている。同様に,第2ページ画像32も第1のコマ107から第6のコマ112が割り振られている。第1ページ画像31と第2のページ画像32に割り振られているコマの合計は12となる。その他のページ画像にもコマが割り振られており,第10ページ画像40にも第1のコマ155から第7のコマ161が割り振られている。10ページのページ画像31〜40によって構成されている漫画画像全体には161のコマが割り振られていることとなる。
A
図6は,図5に示すコマ画像をコマ番号順に並べたものである。 FIG. 6 shows the frame images shown in FIG. 5 arranged in the order of frame numbers.
この実施例では,コマ画像がコマ番号順にハードディスク8から読み取られ,かつ圧縮される。もっとも,コマ番号順に読み取りおよび圧縮が行われなくともよいのはいうまでもない。
In this embodiment, frame images are read from the
図7は,漫画画像圧縮装置の処理手順を示すフローチャートであり,図3に対応している。図7において,図3に示す処理と同一の処理については同一符号が付されている。 FIG. 7 is a flowchart showing the processing procedure of the comic image compression apparatus, and corresponds to FIG. In FIG. 7, the same processes as those shown in FIG.
ハードディスク8には,漫画画像を構成するページ画像を表わすデータがコマ単位で記憶されているものとする。したがって,コマ単位でコマ内の画像を表わすデータがハードディスク8から読み取り可能である。
Assume that the
まず,パラメータmが1にセットされ(ステップ51A),第mコマ目のコマ内の画像(コマ画像)を表わすデータがハードディスク8から読み取られる(ステップ52A)。したがって,最初は第1コマのコマ101内の画像を表わすデータがハードディスク8から読み取られることとなる。
First, the parameter m is set to 1 (
コマ単位で画像を表わすデータがハードディスク8から読み取られる場合,式2の演算式にもとづくデータ量(コマ目標データ量)となるようなQ値が算出される(ステップ53A)。
When data representing an image in units of frames is read from the
[(圧縮後の漫画画像の全体目標データ量−第(m−1)番目までの圧縮後のコマ内の画像の総データ量)−余裕データ量]×m番目のコマの面積/[(漫画画像のすべてのコマの総面積)−{第(m−1)番目のすべてのコマの総面積}]・・・式2
[(Total target data amount of the comic image after compression−Total amount of data in the image after compression up to the (m−1) th) −Amount of surplus data] × Area of the mth frame / [(Manga Total area of all frames in image) − {total area of all (m−1) th frames}]
式2の余裕データ量も式1の余裕データ量と同様に圧縮後の漫画画像の全体の目標データ量内に収まるようにするものであり,圧縮した漫画画像ののこりのコマ数が少なくなるにつれて,少なくなるようにしてもよい。例えば,上述と同様に,余裕データ量=(第1の所定値−第2の所定値×m)とすればよい。但し,第1の所定値>(第2の所定値×m)である。また,コマの面積は何コマ目のコマかを示すコマ番号に対応して,漫画画像のデータが格納されているファイルのヘッダなどにあらかじめ記憶されているのはいうまでもない。
Similarly to the margin data amount of
算出されたQ値を用いて,読み出されたコマの画像が圧縮される(ステップ54)。コマ内の画像ごとに圧縮した場合もページ画像ごとに圧縮した場合と同様に,式2にもとづいて得られるデータ量となるようなQ値が算出されて,そのQ値を利用して圧縮した場合,式2にもとづいて得られる目標コマ画像データのデータ量となるかどうかは実際に圧縮してみないと分らない。このために,目標コマ画像データのデータ量と実際の圧縮後のコマ内の画像を表わす画像データのデータ量とは一致しないことがある。この実施例では,ハードディスクから順に読み出されるコマ内の画像のデータりょうを,上述した式2にしたがって順に決定することにより,コマ画像のデータ量と実際に圧縮した得られたデータ量とが異なっても,圧縮後の漫画画像のデータ量を全体目標データ量に収めることができる。
Using the calculated Q value, the read frame image is compressed (step 54). Similarly to the case of compressing for each image in a frame, a Q value that is the amount of data obtained based on
また,上述した実施例と同様に,式2にしたがって目標コマ画像データのデータ量が決定され,そのデータ量となるようにコマ画像が圧縮された場合であっても,圧縮後の漫画画像のデータ量が全体目標データ量に収まらないことがある(特に,最後のコマ画像161を圧縮した場合において目標コマ画像データよりも実際の圧縮後のデータ量が多くなってしまったとき)。このために,圧縮後のコマ画像データの総データ量が全体目標データ量を超えてしまったかどうかが確認される(ステップ55)。
Similarly to the above-described embodiment, even if the data amount of the target frame image data is determined according to
超えていなければ(ステップ55でNO),漫画画像を構成するすべてのコマ画像について圧縮処理が終了したかどうかが確認される(ステップ59A)。終了していなければ,パラメータmがインクレメントされ(ステップ60A),次のコマ画像を表わすデータがハードディスク8から読み取られる(ステップ52A)。
If not exceeded (NO in step 55), it is confirmed whether or not the compression processing has been completed for all the frame images constituting the comic image (
コマ画像の圧縮が繰り返され,圧縮後の総データ量が全体目標データ量を超えてしまうと(ステップ55でYES),圧縮前の第mコマ目のコマ画像が,あらかじめ定められている最低Q値を利用して圧縮される(ステップ56A)。この最低Q値は,圧縮後の画像が最低画質以上となるような値である。もっとも,最低Q値そのものでなくとも,その近傍の値でもよい。最低Q値を利用して圧縮されることにより,圧縮後のコマ画像のデータ量は少なくなるので,圧縮後の漫画画像の総データ量が全体目標データ量以内に収まるようになる。圧縮後の総データ量が全体目標データ量以内に収まっていなければ(ステップ57でYES),パラメータmがデクレメントされ(ステップ58A),前コマのコマ画像も最低Q値を利用して圧縮されるようになる。圧縮後の総データ量が全体目標データ量以内に収まるようになると(ステップ57でNO),ステップ59の処理に移行する。
If the compression of the frame image is repeated and the total data amount after compression exceeds the total target data amount (YES in step 55), the frame image of the m-th frame before compression is set to a predetermined minimum Q. The value is used for compression (
このように,圧縮されたコマ画像の総データ量が全体目標データ量を超えた場合には,全体目標データ量に収まるまで,コマ画像の圧縮順と逆順に最低画質以上となるように圧縮前のコマ画像を圧縮すればよい。 In this way, when the total data amount of the compressed frame image exceeds the overall target data amount, the compression is performed so that the image quality becomes equal to or higher than the minimum image quality in the reverse order of the compression order of the frame image until the total target data amount is reached. The frame image may be compressed.
また,上述の実施例では,コマ番号順にコマ画像が圧縮されているが,見開きの2ページに渡っているコマについては別々のコマと見なして上述の処理を行うようにしてもよいし,一つのコマと見なして上述の処理を行うようにしてもよい。 In the above-described embodiment, the frame images are compressed in the order of the frame numbers. However, frames that are spread over two pages may be regarded as separate frames and the above-described processing may be performed. The above-described processing may be performed by considering it as one frame.
上述の実施例では,漫画画像についての圧縮について説明したが,漫画画像以外の画像化された写真集,フォト・ブック(フォト・アルバム)などについても適用できるのはいうまでもない。 In the above-described embodiment, the compression of the comic image has been described. Needless to say, the present invention can also be applied to an image collection other than the comic image, a photo book (photo album), and the like.
1 漫画画像圧縮装置
2 CPU
31〜40 ページ画像
101〜161 コマ画像1 cartoon
31-40 page image
101-161 frame images
Claims (10)
上記読取手段によって読み取られた第n番目のページ画像のページ目標データ量が,[(圧縮後の画像群の全体目標データ量)−{第(n−1)番目までの圧縮後のページ画像の総データ量}−(余裕データ量)]/{(画像群の総ページ数)−{第(n−1)番目までのページ数}となるように圧縮する圧縮手段,
を備えた画像圧縮装置。Reading means for sequentially reading each page image of an image group composed of a plurality of page images for each page image, and the page target data amount of the nth page image read by the reading means is [(after compression The total target data amount of the image group) − {the total data amount of the page images after compression up to the (n−1) th}} − (the margin data amount)] / {(the total number of pages of the image group) − {the first. Compression means for compressing so that the number of pages up to (n-1) th}
An image compression apparatus comprising:
上記判定手段において,上記圧縮手段により圧縮されたページ画像の総データ量が上記全体目標データ量を超えたと判定されたことに応じて,ページ画像の圧縮順と逆順にページ画像が最低画質以上となり,かつ上記圧縮手段による圧縮後の画像群が上記全体目標データ量に収まるまで,上記圧縮手段による圧縮前のページ画像を圧縮するように上記圧縮手段を制御する圧縮制御手段,
をさらに備えた請求項1に記載の画像圧縮装置。Determining means for determining whether or not the total data amount of the page image compressed by the compression means exceeds the overall target data amount; and in the determining means, the total data amount of the page image compressed by the compression means is When it is determined that the overall target data amount has been exceeded, until the page image exceeds the minimum image quality in the reverse order of the compression order of the page image, and the group of images compressed by the compression means falls within the overall target data amount , Compression control means for controlling the compression means so as to compress the page image before compression by the compression means,
The image compression apparatus according to claim 1, further comprising:
上記読取手段によって読み取られた第m番目のコマ内の画像のコマ目標データ量が,[(圧縮後の画像群の全体目標データ量−第(m−1)番目までの圧縮後のコマ内の画像の総データ量)−余裕データ量]×m番目のコマの面積/[(画像群のすべてのコマの総面積)−{第(m−1)番目のすべてのコマの総面積}]となるように圧縮する圧縮手段,
を備えた画像圧縮装置。A reading means for sequentially reading the images in the frame for each frame from an image group composed of a plurality of such page images in which the frames are allocated in the page image, and the reading means read by the reading means. The frame target data amount of the image in the mth frame is [(total target data amount of the image group after compression−total data amount of images in the frame after compression up to the (m−1) th) − margin Compression means for compressing so that the amount of data] × m-th frame area / [(total area of all frames in image group) − {total area of all (m−1) -th frames}];
An image compression apparatus comprising:
上記判定手段において,上記圧縮手段により圧縮されたコマ内の画像の総データ量が,上記全体目標データ量を超えたと判定されたことに応じて,コマ内の画像の圧縮順と逆順にコマ内の画像が,最低画質以上となり,かつ上記圧縮手段による圧縮後の画像群が上記全体目標データ量に収まるまで上記圧縮手段による圧縮前のコマ内の画像を圧縮するように上記圧縮手段を制御する圧縮制御手段,
をさらに備えた請求項4に記載の画像圧縮装置。Determination means for determining whether the total data amount of the images in the frame compressed by the compression means exceeds the overall target data amount; and in the determination means, the image data in the frames compressed by the compression means When it is determined that the total data amount exceeds the overall target data amount, the images in the frames are in the reverse order of the compression order of the images in the frames, and the images in the frames are equal to or higher than the minimum image quality, and after compression by the compression means. Compression control means for controlling the compression means so as to compress the image in the frame before compression by the compression means until the image group falls within the overall target data amount;
The image compression apparatus according to claim 4, further comprising:
圧縮手段が,上記読取手段によって読み取られた第n番目のページ画像のページ目標データ量が,[(圧縮後の画像群の全体目標データ量)−{第(n−1)番目までの圧縮後のページ画像の総データ量}−(余裕データ量)]/{(画像群の総ページ数)−{第(n−1)番目までのページ数}となるように圧縮する,
画像圧縮装置の動作制御方法。The reading means reads each page image of an image group composed of a plurality of page images in order for each page image,
The compression means is such that the page target data amount of the nth page image read by the reading means is [(total target data amount of the image group after compression) − {after compression to the (n−1) th compression]. The total amount of data of page images} − (room data amount)] / {(total number of pages in image group) − {number of pages up to (n−1) th}}
An operation control method for an image compression apparatus.
圧縮手段が,上記読取手段によって読み取られた第m番目のコマ内の画像のコマ目標データ量が,[(圧縮後の画像群の全体目標データ量−第(m−1)番目までの圧縮後のコマ内の画像の総データ量)−余裕データ量]×m番目のコマの面積/[(画像群のすべてのコマの総面積)−{第(m−1)番目のすべてのコマの総面積}]となるように圧縮する,
画像圧縮装置の動作制御方法。The reading means reads the images in the frame one by one from the group of images in which a plurality of such page images are arranged, in which the frames are allocated in the page image,
The compression means determines that the frame target data amount of the image in the m-th frame read by the reading means is [(compressed total target data amount of image group after compression to the (m−1) th compression). (Total data amount of image in frame)-margin data amount] x area of mth frame / [(total area of all frames of image group)-{total of all (m-1) th frames Area}],
An operation control method for an image compression apparatus.
読み取られた第n番目のページ画像のページ目標データ量が,[(圧縮後の画像群の全体目標データ量)−{第(n−1)番目までの圧縮後のページ画像の総データ量}−(余裕データ量)]/{(画像群の総ページ数)−{第(n−1)番目までのページ数}となるように圧縮させるように画像圧縮装置のコンピュータを制御するプログラム。A computer-readable program for controlling a computer of an image compression device, wherein each page image of an image group composed of a plurality of page images is read in order for each page image,
The page target data amount of the read nth page image is [(total target data amount of the image group after compression) − {total data amount of the page image after compression up to the (n−1) th}}. A program for controlling the computer of the image compression apparatus so that compression is performed so as to satisfy − (allowance data amount)] / {(total number of pages in the image group) − {number of pages up to the (n−1) th page}.
ページ画像の中にコマが割り振られている,そのようなページ画像が複数集まって構成される画像群から,コマ内の画像をコマごとに順に読み取らせ,
読み取られた第m番目のコマ内の画像のコマ目標データ量が,[(圧縮後の画像群の全体目標データ量−第(m−1)番目までの圧縮後のコマ内の画像の総データ量)−余裕データ量]×m番目のコマの面積/[(画像群のすべてのコマの総面積)−{第(m−1)番目のすべてのコマの総面積}]となるように圧縮するように画像圧縮装置のコンピュータを制御するプログラム。A computer-readable program for controlling a computer of an image compression apparatus,
From the image group composed of a collection of such page images in which frames are allocated in the page image, the images in the frame are read in order for each frame,
The frame target data amount of the image in the read m-th frame is [(total target data amount of image group after compression−total data of images in the frame after compression up to the (m−1) th frame). Amount) −allowance data amount] × m-th frame area / [(total area of all frames in the image group) − {total area of all (m−1) -th frames}]. A program for controlling the computer of the image compression apparatus.
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012185459 | 2012-08-24 | ||
JP2012185459 | 2012-08-24 | ||
PCT/JP2013/070165 WO2014030486A1 (en) | 2012-08-24 | 2013-07-25 | Image compression device, operation control method therefor, and operation program therefor |
Publications (2)
Publication Number | Publication Date |
---|---|
JP5947385B2 true JP5947385B2 (en) | 2016-07-06 |
JPWO2014030486A1 JPWO2014030486A1 (en) | 2016-07-28 |
Family
ID=50149797
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014531554A Active JP5947385B2 (en) | 2012-08-24 | 2013-07-25 | Image compression apparatus, operation control method thereof, and operation control program thereof |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP5947385B2 (en) |
WO (1) | WO2014030486A1 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08130616A (en) * | 1994-08-12 | 1996-05-21 | Fuji Xerox Co Ltd | Image processor |
JP2001024896A (en) * | 1999-07-02 | 2001-01-26 | Xaxon R & D Kk | Picture file format having character data independently of bit map data and its display device |
JP2012123093A (en) * | 2010-12-07 | 2012-06-28 | Fujifilm Corp | Electronic book display device, method and program |
-
2013
- 2013-07-25 WO PCT/JP2013/070165 patent/WO2014030486A1/en active Application Filing
- 2013-07-25 JP JP2014531554A patent/JP5947385B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08130616A (en) * | 1994-08-12 | 1996-05-21 | Fuji Xerox Co Ltd | Image processor |
JP2001024896A (en) * | 1999-07-02 | 2001-01-26 | Xaxon R & D Kk | Picture file format having character data independently of bit map data and its display device |
JP2012123093A (en) * | 2010-12-07 | 2012-06-28 | Fujifilm Corp | Electronic book display device, method and program |
Also Published As
Publication number | Publication date |
---|---|
JPWO2014030486A1 (en) | 2016-07-28 |
WO2014030486A1 (en) | 2014-02-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4949037B2 (en) | Method and image representation format for processing digital images | |
JP4682102B2 (en) | Image coding apparatus and image coding method | |
US20070294245A1 (en) | Method for Simple Hardware Implementation of JPEG Size Limiter | |
US8531538B2 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
JP6929044B2 (en) | Imaging device, control method of imaging device, and program | |
JP6278712B2 (en) | Imaging apparatus and control method thereof | |
JP5947385B2 (en) | Image compression apparatus, operation control method thereof, and operation control program thereof | |
JP4407055B2 (en) | Electronic camera | |
JP6191394B2 (en) | Data compression apparatus, program, and computer-readable recording medium | |
CN103795928B (en) | A kind of raw data format photo processing method and system | |
JP4090975B2 (en) | Image processing device | |
US20090022409A1 (en) | Motion encoding of still images | |
JP3919426B2 (en) | Image encoding apparatus and method, and storage medium | |
JP5947384B2 (en) | Image compression apparatus, operation control method thereof, and operation program thereof | |
US10477211B2 (en) | Image re-encoding method and device thereof | |
JP5078538B2 (en) | Image reproducing apparatus, processing method thereof, and program thereof | |
JP4706567B2 (en) | Image processing method, image processing method program, recording medium storing image processing method program, and image processing apparatus | |
JP2006065805A (en) | Image processor and control method | |
JP2014110446A (en) | Dynamic image recording device, dynamic image recording method and program | |
JP2004297712A (en) | Image compression apparatus | |
JP2000278349A (en) | Compressed data transmission equipment and recording medium | |
CN110298895B (en) | Picture compression method, device, equipment and storage medium based on artificial intelligence | |
JP2006333299A (en) | Encoding apparatus, encoding method and image forming apparatus | |
JP2009100104A (en) | Moving image reproducing apparatus, its processing method, and its program | |
JP2006340338A (en) | Image processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
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: 20160510 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160602 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5947385 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |