JP2016063369A - Image processing device, image processing method, image formation device, image processing program, and recording medium thereof - Google Patents
Image processing device, image processing method, image formation device, image processing program, and recording medium thereof Download PDFInfo
- Publication number
- JP2016063369A JP2016063369A JP2014189386A JP2014189386A JP2016063369A JP 2016063369 A JP2016063369 A JP 2016063369A JP 2014189386 A JP2014189386 A JP 2014189386A JP 2014189386 A JP2014189386 A JP 2014189386A JP 2016063369 A JP2016063369 A JP 2016063369A
- Authority
- JP
- Japan
- Prior art keywords
- image
- thinning
- aspect ratio
- unit
- 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.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims abstract description 204
- 238000003672 processing method Methods 0.000 title claims abstract description 9
- 230000015572 biosynthetic process Effects 0.000 title abstract 3
- 238000000034 method Methods 0.000 claims description 141
- 238000001514 detection method Methods 0.000 claims description 31
- 230000006870 function Effects 0.000 claims description 6
- 230000002093 peripheral effect Effects 0.000 abstract description 11
- 230000000694 effects Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 109
- 238000006243 chemical reaction Methods 0.000 description 28
- 238000000926 separation method Methods 0.000 description 19
- 238000000605 extraction Methods 0.000 description 18
- 230000005540 biological transmission Effects 0.000 description 14
- 238000012937 correction Methods 0.000 description 12
- 238000007906 compression Methods 0.000 description 11
- 230000006835 compression Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 7
- 238000003705 background correction Methods 0.000 description 4
- 241001469893 Oxyzygonectes dovii Species 0.000 description 3
- 230000014509 gene expression Effects 0.000 description 3
- 238000012015 optical character recognition Methods 0.000 description 3
- 235000002673 Dioscorea communis Nutrition 0.000 description 2
- 241000544230 Dioscorea communis Species 0.000 description 2
- 208000035753 Periorbital contusion Diseases 0.000 description 2
- 235000014676 Phragmites communis Nutrition 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 210000000887 face Anatomy 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 238000009792 diffusion process Methods 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 230000008921 facial expression Effects 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000000859 sublimation Methods 0.000 description 1
- 230000008022 sublimation Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
Abstract
Description
本発明は、写真画像データに応じた画像を出力用紙に印刷する際に出力用紙のサイズに応じて写真画像データの画像サイズを変換する画像処理装置および画像処理方法に関するものである。 The present invention relates to an image processing apparatus and an image processing method for converting the image size of photographic image data in accordance with the size of output paper when an image corresponding to photographic image data is printed on output paper.
従来、写真画像を出力用紙に印刷出力する際、写真画像データのサイズを出力用紙のサイズに応じて変換して印刷を行う技術が知られている。 2. Description of the Related Art Conventionally, when printing a photographic image on output paper, a technique is known in which the size of photographic image data is converted according to the size of the output paper and printing is performed.
例えば、特許文献1には、イメージスキャナで取得した原稿の画像データを原稿の画像が出力用紙より若干大きくなるように拡大し、拡大した画像データに応じた画像を出力用紙に印刷することにより、周囲4辺に余白領域のない4辺縁なし画像を印刷する技術が開示されている。
For example, in
しかしながら、上記特許文献1の技術では、画像データを出力用紙よりも大きく拡大して印刷を行うので、画像データの周縁部が出力用紙上に印刷されずにカットされてしまうという問題がある。
However, in the technique disclosed in
これにより、例えば図12の(a)に示すように画像データの縦横比と出力用紙の縦横比とが等しい場合にはカットされる領域が比較的小さいので周縁部のオブジェクトが欠けるという問題は比較的生じにくいが、図12の(b)に示すように画像データの縦横比と出力用紙の縦横比とが異なる場合には印刷されずにカットされる領域が大きくなり、画像データの周縁部のオブジェクトが欠けてしまうという問題が生じやすい。 Thus, for example, as shown in FIG. 12A, when the aspect ratio of the image data and the aspect ratio of the output paper are equal, the area to be cut is relatively small, and the problem that the peripheral object is missing is compared. As shown in FIG. 12B, when the aspect ratio of the image data and the aspect ratio of the output paper are different as shown in FIG. The problem of missing objects tends to occur.
本発明は、上記の問題点に鑑みてなされたものであり、その目的は、出力用紙のサイズに応じて印刷する画像データの画像サイズを変換する画像処理装置において、画像に含まれるオブジェクトが印刷範囲からはみ出すことを防止することにある。 SUMMARY An advantage of some aspects of the invention is that an object included in an image is printed in an image processing apparatus that converts an image size of image data to be printed according to the size of output paper. It is to prevent it from going out of range.
本発明の一態様にかかる画像処理装置は、画像データにおける画像の縦横比を、当該画像を印刷する出力用紙の縦横比に応じて変換する画像処理装置であって、上記画像データにおける各画素のエッジ成分の強度を示すエッジ値を検出し、上記画像の一端部から他端部までを連結する画素の経路のうち、エッジ値の合計値が最小になる経路上の画素を間引き処理することによって上記画像の縦横比を変換する間引き処理部を備えていることを特徴としている。 An image processing apparatus according to an aspect of the present invention is an image processing apparatus that converts an aspect ratio of an image in image data in accordance with an aspect ratio of an output sheet on which the image is printed. By detecting an edge value indicating the strength of the edge component and thinning out pixels on the path where the total value of the edge values is the smallest among the paths of the pixels connecting the one end to the other end of the image. A thinning-out processing unit for converting the aspect ratio of the image is provided.
上記の構成によれば、エッジ成分の強度が低い領域の画素を間引くことにより、見た目の違和感を抑えつつ画像の縦横比を変換することができる。また、画像の周縁部のオブジェクトが印刷範囲からはみ出してしまうことを防止できる。 According to the above configuration, the aspect ratio of the image can be converted while suppressing a sense of strangeness of appearance by thinning out pixels in a region where the intensity of the edge component is low. Further, it is possible to prevent the object at the peripheral edge of the image from protruding from the printing range.
〔実施形態1〕
本発明の一実施形態について説明する。
An embodiment of the present invention will be described.
(1−1.画像形成装置1の概要)
本実施形態では、本発明を、コピアモード・プリントモード・ファクシミリ送信モード・ファクシミリ受信モード・イメージ送信モードの中から選択されたモードを実行するデジタルカラー複合機である画像形成装置1に適用する場合の例について説明する。ただし、本発明の適用対象はこれに限るものではなく、写真画像データのサイズを出力用紙のサイズに応じて変換する画像処理装置およびそれを備えた装置であれば適用できる。
(1-1. Overview of Image Forming Apparatus 1)
In the present embodiment, the present invention is applied to the
なお、コピアモード(複写モード)とは、画像データを読み込み(原稿を読み取って画像データを生成し)、この画像データの画像を用紙に印刷するモードである。プリントモードとは、画像形成装置に接続されているコンピュータから送られてくる画像データの画像を用紙に印刷するモードである。ファクシミリ送信モードには、原稿を読み取って得られる画像データを電話回線によって外部装置に送信する通常のファクシミリモードと、前記画像データをメールに添付してインターネットによって送信するインターネットファクシミリモードとが含まれる。ファクシミリ受信モードとは、外部装置から画像データをファクシミリにて受信し、受信した画像データの画像を用紙に印刷するモードである。イメージ送信モードには、(1)原稿を読み取って生成した画像データを電子メールに添付して指定されたアドレスへ送信するモード(scan to e-mailモード)、(2)原稿を読み取って生成した画像データをユーザにより指定されたフォルダに送信するモード(scan to ftpモード)、および(3)原稿を読み取って生成した画像データを画像形成装置に装着されたUSBメモリなどに送信するモード(scan to usbモード)が含まれる。 The copier mode (copy mode) is a mode for reading image data (reading a document to generate image data) and printing an image of the image data on a sheet. The print mode is a mode in which an image of image data sent from a computer connected to the image forming apparatus is printed on paper. The facsimile transmission mode includes a normal facsimile mode in which image data obtained by reading a document is transmitted to an external device via a telephone line, and an Internet facsimile mode in which the image data is attached to a mail and transmitted over the Internet. The facsimile reception mode is a mode in which image data is received from an external device by facsimile and an image of the received image data is printed on a sheet. The image transmission mode includes (1) a mode in which image data generated by reading a document is attached to an e-mail and transmitted to a specified address (scan to e-mail mode), and (2) generated by reading the document. A mode in which image data is transmitted to a folder designated by the user (scan to ftp mode), and (3) a mode in which image data generated by reading a document is transmitted to a USB memory mounted on the image forming apparatus (scan to usb mode).
また、画像形成装置1では、コピアモード・プリントモードが選択されている場合、利用者は、モノクロ画像を出力するモノクロモード、フルカラーの画像を出力するフルカラーモードのいずれかを選択できるようになっている。
In the
(1−2.画像形成装置1の全体構成)
図1は、本実施形態にかかる画像形成装置1の概略構成を示す説明図である。この図に示すように、画像形成装置1は、画像入力装置2、画像処理装置3、RIP(Raster Image Processor)4、画像出力装置5、受信装置6、送信装置7、記憶装置8、および制御部9を備えている。
(1-2. Overall Configuration of Image Forming Apparatus 1)
FIG. 1 is an explanatory diagram illustrating a schematic configuration of an
画像入力装置2は、コピアモード、ファクシミリ送信モード、イメージ送信モードにおいて、原稿を読み取り画像データを生成する画像読取手段である。より具体的に説明すると、画像入力装置は、CCD(Charge Coupled Device)を備えたスキャナ部を有し、原稿から反射してきた光を、RGBに色分解された電気信号(アナログの画像信号)に変換し、この電気信号を画像処理装置3に出力するものである。
The
なお、画像入力装置2は、上記のフルカラーモード、モノクロモードのいずれのモードが選択されている場合であっても、フルカラーにて原稿画像の読み取りを行う。
Note that the
画像処理装置3は、画像データ(画像信号)に対して画像処理を施す集積回路であり、ASIC(Application specific integrated circuit)から構成されるものである。
The
画像処理装置3は、図1に示したように、A/D(アナログ/デジタル)変換部11、シェーディング補正部12、入力処理部13、原稿種別判定部14、圧縮部15、領域分離処理部16、領域分離信号圧縮部17、領域分離信号復号部18、復号部19、縦横比比較部20、顔検出部21、集合写真判定部22、間引き処理部23、画質調整部24、色補正/黒生成部25、フィルタ処理部26、および中間調生成部27の各ブロックを備えている。これら各ブロックの処理内容については後述する。
As shown in FIG. 1, the
なお、画像処理装置3は、コピアモード、ファクシミリ送信モード、イメージ送信モードでは画像入力装置2から送られてくる画像データに画像処理を行い、プリントモードではRIP4から送られてくる画像データに画像処理を行い、ファクシミリ受信モードでは受信装置6が外部装置から受信した画像データに画像処理を行う。
The
また、画像処理装置3は、コピアモード、プリントモード、ファクシミリ受信モードでは画像処理を施した画像データを画像出力装置5に送信し、ファクシミリ送信モードでは画像処理を施した画像データを送信装置7に送信する。
The
また、画像処理装置3は、イメージ送信モードのscan to e-mailモードでは画像処理を施した画像データをメール処理部(不図示)に送信し、scan to ftpモードでは画像処理を施した画像データを所定のフォルダに送信し、scan to usbモードでは画像処理を施した画像データを所定のUSBメモリに送信する。
The
RIP4は、不図示のプリンタドライバから送られてきたPDL(Page Description Language:ページ記述言語)データを、PDL言語仕様に従って解釈してRGB信号からなる連続階調ビットマップ画像データに変換し、RGB信号を縦横比比較部20に送信する。
The
画像出力装置5は、画像処理装置3から送られてきた画像データの画像を記録媒体(例えば紙等)上に印刷(形成)する。画像出力装置5としては、例えば、電子写真方式またはインクジェット方式のカラープリンタ、あるいは、昇華型プリンタなどを用いることができる。なお、本実施形態においての「印刷」とは、プリントモードでの印刷、コピアモードでの印刷、ファクシミリ受信モードでの印刷のいずれかを意味する。
The
受信装置6は、電話回線またはインターネットに接続されており、外部装置から画像データを受信する。
The receiving
送信装置7は、電話回線またはインターネットに接続されており、画像入力装置2が取得して画像処理装置3で処理された画像データを外部装置へ送信する。
The
記憶装置8は、画像処理装置3にて扱われる画像データを一旦保存するための記憶手段である。記憶装置8の構成は特に限定されるものではなく、例えばハードディスクなどを用いることができる。
The
制御部9は、CPU(Central Processing Unit)あるいはDSP(Digital Signal Processor)等のプロセッサを含むコンピュータであり、画像形成装置1に備えられる各ハードウェアの動作を制御するものである。また、制御部9は、画像形成装置1に備えられる各ハードウェア間のデータ転送を制御する機能も有している。
The
(1−3.画像処理装置3の構成)
上述したように、画像処理装置3は、A/D(アナログ/デジタル)変換部11、シェーディング補正部12、入力処理部13、原稿種別判定部14、圧縮部15、領域分離処理部16、領域分離信号圧縮部17、領域分離信号復号部18、復号部19、縦横比調整部28a、画質調整部24、色補正/黒生成部25、フィルタ処理部26、および中間調生成部27の各ブロックを備えている。また、縦横比調整部28aは、縦横比比較部20、顔検出部21、集合写真判定部22、および間引き処理部23を備えている。
(1-3. Configuration of Image Processing Device 3)
As described above, the
A/D変換部11は、画像入力装置2から送られてきたカラー画像信号(RGBアナログ信号)をデジタルの画像データ(RGBデジタル信号)に変換する。
The A /
シェーディング補正部12は、A/D変換部11から送られてきた画像データに対して、画像入力装置2の照明系、結像系、撮像系で生じる各種の歪みを取り除く処理を施す。
The
入力処理部13は、シェーディング補正部12より送られてくるRGBの画像データのそれぞれに対してγ補正処理などの階調変換処理を施す。
The
原稿種別判定部14は、入力処理部13にてγ補正等の処理がなされたRGBの画像データ(RGBの濃度信号)に基づき、画像入力装置2にて読み取られた原稿の種別の判定を行う。ここで、判定される原稿の種別としては、文字原稿、印刷写真原稿、文字と印刷写真とが混在した文字印刷写真原稿等がある。また、原稿種別判定部14は、上記画像データに基づき、読み取られた原稿がカラー原稿であるか白黒原稿であるかを判別する自動カラー判別処理(ACS:Auto Color Selection)やブランク原稿であるか否か(無地の原稿であるか否か)の判定処理も行う。
The document
圧縮部15は、原稿種別判定部14から送られてくる画像データ(RGB信号)を符号化し、記憶装置8に記憶させる。なお、上記符号化は、例えばJPEG(Joint Photographic Experts Group)方式に基づいて行われる。
The
領域分離処理部16は、原稿種別判定部14から送られてくるRGBの画像データに基づいて、入力画像の画素毎に、当該画素がどのような画像領域に分類されるのかを判別し、この判別結果を示す領域分離信号を生成する。ここで、領域分離処理部16において判別される画像領域には、黒文字領域,色文字領域,網点領域などがある。なお、領域分離処理は、画素毎に画像領域の判定を行う形態ではなく、複数の画素よりなるブロック毎に画像領域の判定が行われる形態であってもよい。
Based on the RGB image data sent from the document
領域分離信号圧縮部17は、画素毎に生成された領域分離信号に対して圧縮処理を施して領域分離信号コードを生成し、画像データの各画素と対応付けて記憶装置8に記憶させる。なお、領域分離信号圧縮部17における圧縮処理は、例えば、可逆圧縮方法であるMMR(Modified Modified Reed)方式、あるいはMR(Modified Reed)方式に基づいて行われる。
The region separation
領域分離信号復号部18は、領域分離信号圧縮部17で生成された領域分離信号コードに対して復号化処理を施す。復号化した領域分離信号は、色補正/黒生成部25、フィルタ処理部26、および中間調生成部27に引き渡される。これにより、色補正/黒生成部25、フィルタ処理部26、および中間調生成部27において、画像領域の種類に応じて画像処理内容の切り替えが行われる。
The region separation
復号部19は、圧縮部15で符号化された符号化コードに対して復号化処理を施すことによって、上記符号化コードをRGBの画像データに伸張する。
The decoding unit 19 decompresses the encoded code into RGB image data by performing a decoding process on the encoded code encoded by the compressing
縦横比調整部28aは、ユーザが縁無し印刷を選択し、かつ間引き処理モードを選択した場合に、印刷する画像データの画像の縦横比を出力用紙の縦横比に合わせるための間引き処理を行う。 The aspect ratio adjustment unit 28a performs thinning processing to match the aspect ratio of the image of the image data to be printed with the aspect ratio of the output paper when the user selects borderless printing and selects the thinning processing mode.
すなわち、本実施形態では、画像形成装置1を用いて写真の印刷処理を行う場合に、ユーザが操作パネル(図示せず)を介して縁無し印刷と縁有り印刷とを選択できるようになっている。また、縁無し印刷を行う場合、ユーザが、操作パネル(図示せず)を介して、(i)間引き処理モード、または(ii)変倍処理モードのいずれかを選択できるようになっている。変倍処理モードは、従来技術の縁無し印刷において用いられている処理モードであり、画像処理装置3に備えられる変倍処理部(図示せず)が、画像を出力用紙よりも少し大きいサイズに変倍し、画像の周縁部が印刷範囲からはみ出すように印刷することで縁無し印刷を行う。あるいは、変倍処理モードにおいて、画像の長辺または短辺の一方が出力用紙の両端に一致し、他端が出力用紙内に収まるように変倍処理して印刷するようにしてもよい。
In other words, in the present embodiment, when a photo print process is performed using the
また、上記の処理モードの選択は、例えば、両処理モードを示すアイコン等の画像を操作パネルに表示させ、ユーザが所望のモードを選択するようにしてもよい。あるいは、両処理モードで印刷する場合のプレビュー画像を操作パネルにそれぞれ表示させ、ユーザが所望するモードを選択するようにしてもよい。 In addition, the selection of the processing mode may be performed, for example, by displaying an image such as an icon indicating both processing modes on the operation panel and the user selecting a desired mode. Alternatively, preview images for printing in both processing modes may be displayed on the operation panel, respectively, and the user may select a desired mode.
縦横比比較部20は、間引き処理モードが選択されている場合、入力されてくる画像データに基づいて画像の縦横比と出力用紙の縦横比とを比較し、比較結果に応じて間引き処理部23で間引き処理を実施するか否かを判定し、判定結果を示す信号(間引き要否判定信号)を間引き処理部23に送信する。
When the thinning processing mode is selected, the aspect
顔検出部21は、間引き処理モードが選択されている場合、縦横比比較部20から入力される画像データに基づいて画像に含まれる人物の顔が含まれているか否かを判定し、含まれている場合には各画素が顔に相当する画素(顔領域画素)であるか顔以外の画素であるかを判定し、これらの判定結果を示す信号(顔領域判定信号)を生成して間引き処理部23に送信する。
When the thinning processing mode is selected, the
集合写真判定部22は、間引き処理モードが選択されている場合、顔検出部21から入力される画像データに基づいて画像が集合写真であるか否かを判定し、判定結果を示す信号(集合写真判定信号)を間引き処理部23に送信する。
When the thinning processing mode is selected, the group
間引き処理部23は、間引き処理モードが選択されている場合、縦横比比較部20から入力される間引き要否判定信号、および集合写真判定部22から入力される集合写真判定信号に基づいて間引き処理を行うか否かを判定する。
When the thinning processing mode is selected, the thinning
また、間引き処理部23は、間引き処理を行う場合、集合写真判定部22から入力される画像データに基づいて画像から除去しても見た目の違和感が少ない画素を抽出し、上記画像データに対して抽出した画素を間引く処理を行って出力用紙の縦横比に応じた画像サイズに変換して画質調整部24に出力する。この際、間引き処理部23は、顔検出部21において顔領域画素と判定された画素については間引き処理の対象から除外する。
In addition, when performing the thinning process, the thinning
また、間引き処理部23は、間引き処理を行わない場合、集合写真判定部22から入力されたRGBの画像データをそのまま画質調整部24に出力する。なお、間引き処理を行わない場合、縁無し印刷を行わないようにしてもよく、上述した変倍処理モードによる縁無し印刷を行うようにしてもよい。なお、縦横比変換部28aにおける処理の詳細については後述する。
Further, the thinning
画質調整部24は、間引き処理部23から送られてくるRGBの画像データについて、下地の検出を行って下地除去補正を行う。また、画質調整部24は、ユーザによって操作パネル(図示せず)を介して入力される設定情報に基づいて、RGBのバランス(カラー調整、赤み青みといった全体のカラー調整)、明るさ、鮮やかさ等の調整を行う。
The image
色補正/黒生成部25は、フルカラーモードが選択されている場合、色補正処理および黒生成処理を行う。色補正処理は、RGBの画像データをCMYの画像データに変換すると共に、当該画像データに対して色再現性を高める処理を施す処理である。色補正処理は、入力値(RGB)と出力値(CMY)とを対応付けたLUT(ルックアップテーブル)を作成し、作成したLUTから出力値をルックアップすることによって実現される。なお、領域分離信号に応じて異なるLUTを用いてもよい。黒生成処理は、CMYの画像データから黒(K)の画像データを生成する黒生成を行う一方、元のCMYの画像データから黒(K)の画像データを差し引いて新たなCMYの画像データを生成する処理である。生成する黒(K)の量は、領域分離信号に応じて異なる値であってもよい。以上の処理により、図1に示されるように、RGBの画像データは色補正/黒生成部25によってCMYKの4色の画像データに変換される。
The color correction /
フィルタ処理部26は、CMYKの画像データに対し、各プレーン毎にデジタルフィルタによる空間フィルタ処理(強調処理、平滑化処理等)を行う。空間フィルタ処理において、領域分離信号に応じて異なるフィルタ係数を用いてもよい。 The filter processing unit 26 performs spatial filter processing (enhancement processing, smoothing processing, etc.) using a digital filter for each plane on the CMYK image data. In the spatial filter processing, different filter coefficients may be used depending on the region separation signal.
中間調生成部27は、誤差拡散法やディザ法を用いて、画像出力装置5において画像を印刷するために必要な階調再現処理(中間調生成処理)を実行する。
The
(1−4.縦横比変換処理)
次に、縦横比変換部28a(縦横比比較部20、顔検出部21、集合写真判定部22、および間引き処理部23)において行われる縦横比変換処理について説明する。
(1-4. Aspect ratio conversion process)
Next, the aspect ratio conversion process performed in the aspect ratio conversion unit 28a (the aspect
図2は、縦横比変換部28aにおける処理の流れ示すフローチャートである。 FIG. 2 is a flowchart showing the flow of processing in the aspect ratio conversion unit 28a.
縦横比比較部20は、入力されてくるRGBの画像データにおける画像の縦横比と出力用紙の縦横比との差分(縦横比差分)Aを算出し(S1)、算出した差分Aが所定範囲内であるか否かを判断する(S2)。
The aspect
例えば、縦横比比較部20は、入力画像の縦方向の画素数がY1画素、横方向の画素数がX1画素であり、出力用紙の縦方向のサイズがY2cm、横方向のサイズがX2cmである場合、下記式(1)に基づいて縦横比の差分Aを算出する。
For example, the aspect
また、縦横比比較部20は、上記式(1)で算出した縦横比の差分AがT1≦A≦T2の条件を満たす場合に間引き処理を行うと判定し、満たさない場合には間引き処理を行わないと判定する。なお、上記T1およびT2は予め設定される閾値であり、例えばT1=1.01、T2=1.1に設定される。
Also, the aspect
S2において差分Aが所定範囲内ではないと判断した場合、縦横比比較部20は、「間引き処理なし」であることを示す間引き要否判定信号を生成して間引き処理部23に出力し(S3)、後述するS12の処理に移行する。
When it is determined in S2 that the difference A is not within the predetermined range, the aspect
一方、S2において差分Aが所定範囲内であると判断した場合、縦横比比較部20は、「間引き処理あり」であることを示す間引き要否判定信号を生成して間引き処理部23に出力する(S4)。
On the other hand, if it is determined in S2 that the difference A is within the predetermined range, the aspect
S4の処理の後、顔検出部21が、縦横比比較部20から入力されるRGBの画像データに基づいて、画像に顔が含まれているか否かを判定する(S5)。
After the process of S4, the
S5において画像に顔が含まれていないと判断した場合、顔検出部21は、後述するS7の処理に移行する。
When it is determined in S5 that the face is not included in the image, the
一方、S5において画像に顔が含まれていると判断した場合、顔検出部21は、画像データの各画素が顔に相当する画素(顔領域画素)であるか顔以外の画素であるかを判定し、顔領域画素を検出する(S6)。その後、顔検出部21は、顔領域画素と顔領域以外の画素とを識別するための識別情報を含む顔領域判定信号を生成し、間引き処理部23に出力する(S7)。
On the other hand, when it is determined in S5 that the image includes a face, the
画像に顔が含まれているか否かの判定方法としては、例えば、特許文献2に開示されている方法を用いることができる。この方法では、以下に示す(1)〜(6)の処理により画像に顔が含まれているか否かを判定する。
(1)画像上の上から下の方向に、入力画像信号に対して一次微分を行い、一次微分信号を2値化する。また、入力画像信号に対して二次微分を行い、二次微分信号を2値化する。
(2)上記2値化した一次微分信号と二次微分信号との論理和を求め、目・口第一候補信号とする。
(3)上記目・口第一候補信号において、連結領域を成している各領域に対して面積、重心位置、領域の縦・横の長さ、各領域内の輝度の平均・分散を領域特徴量信号とする。
(4)上記領域特徴量信号に基づいて、目らしい領域、口らしい領域を判定し、それぞれ、目第二候補信号、口第二候補信号を出力する。
(5)目第二候補信号から目候補領域を二つ、口第二候補信号から口候補領域を一つ、全ての領域が重複しないように選択し、各領域の重心位置に基づいて顔らしい配置をしている候補の組みを全ての組み合わせについて調べ、顔候補信号を生成する。
(6)上記顔候補信号中の左右の目の候補領域の重心位置を基準に、顔の存在する領域をアフィン変換を用いて切り出し、顔候補画像信号とする。顔候補画像信号を顔標準パターンと比較することにより顔であるか否かの判定を行う。
As a method for determining whether or not a face is included in an image, for example, a method disclosed in
(1) First-order differentiation is performed on the input image signal in the direction from top to bottom on the image, and the first-order differential signal is binarized. In addition, second derivative is performed on the input image signal, and the second derivative signal is binarized.
(2) The logical sum of the binarized primary differential signal and the secondary differential signal is obtained and used as the eye / mouth first candidate signal.
(3) In the first eye / mouth first candidate signal, the area, the center of gravity position, the vertical / horizontal length of the area, and the average / dispersion of the luminance in each area for each area constituting the connected area Let it be a feature signal.
(4) Based on the region feature value signal, the eye-like region and the mouth-like region are determined, and the second eye candidate signal and the second mouth candidate signal are output, respectively.
(5) Select two eye candidate regions from the second eye candidate signal, one mouth candidate region from the second mouth candidate signal, and select all the regions so that they do not overlap. The candidate combinations arranged are examined for all combinations, and face candidate signals are generated.
(6) Based on the position of the center of gravity of the candidate regions for the left and right eyes in the face candidate signal, the region where the face exists is cut out using affine transformation to obtain a face candidate image signal. The face candidate image signal is compared with the face standard pattern to determine whether or not it is a face.
また、各画素が顔に相当する画素(顔領域画素)であるか顔以外の画素であるかの判定方法としては、画像に顔が含まれているかどうかの判定処理において抽出された人物の目および口を含む所定範囲内の領域(例えば目および口を含む領域の外接矩形を縦横に1.5倍拡大した矩形領域)に含まれる画素を顔領域画素と判定し、当該領域に含まれない画素を顔以外の画素と判定する方法を用いる。 In addition, as a method for determining whether each pixel is a pixel corresponding to a face (face area pixel) or a pixel other than a face, a human eye extracted in a determination process for determining whether or not a face is included in an image. And a pixel included in a region within a predetermined range including the mouth (for example, a rectangular region obtained by enlarging the circumscribed rectangle of the region including the eyes and the mouth 1.5 times vertically and horizontally) is determined as a face region pixel and is not included in the region A method of determining a pixel as a pixel other than a face is used.
図3は、顔領域画素であるか否かの判定処理の一例を示す説明図である。まず、顔検出部21は、図3の(a)に示す入力画像に対して上記(1)〜(6)の処理により画像に人物が含まれているか否かを判定する。そして、人物の顔が含まれていると判定した場合、顔検出部21は、目と口とを含む領域の外接矩形を検出するとともに、検出した外接矩形を縦横に1.5倍した矩形領域(図3の(b)の破線部参照)を抽出する。そして、顔検出部21は、図3の(c)に示すように、上記矩形領域に含まれる画素を顔領域画素とし、上記矩形領域の外部の画素を顔領域以外の画素とした顔領域判定信号を生成する。
FIG. 3 is an explanatory diagram showing an example of a process for determining whether or not a face area pixel. First, the
なお、画像に顔が含まれているかどうかの判定方法、および各画素が顔画素であるか否かの判定方法は、上記した方法に限るものではなく、他の方法を用いてもよい。 Note that the method for determining whether or not a face is included in the image and the method for determining whether or not each pixel is a face pixel are not limited to the methods described above, and other methods may be used.
S7の処理の後、集合写真判定部22が、画像が集合写真であるか否かを判定する(S8)。
After the process of S7, the group
集合写真であるか否かの判定方法は、特に限定されるものではないが、例えば、特許文献3に開示されている方法を用いることができる。この方法では、以下の(a)〜(d)の処理により、画像が集合写真であるか否かを判定する。
(a)顔検出部21における画像に含まれる人物の顔が含まれているか否かの判定処理で検出した画像中に存在する顔画像の個数が所定の閾値(例えば3人)以上であるか否かを判定する被写体人数判定処理を行う。
(b)顔画像の個数が閾値以上であれば、視線が検出できた顔の割合を判定する視線判定処理を行う。視線が検出できた割合が閾値(例えば、90%)以上であれば、顔画像それぞれの視線がカメラを向いているか否か判定するカメラ目線判定処理を行う。
A method for determining whether or not a group photo is used is not particularly limited. For example, a method disclosed in
(A) Whether the number of face images present in the image detected by the determination process of whether or not a human face included in the image in the
(B) If the number of face images is equal to or greater than the threshold value, a line-of-sight determination process is performed to determine the proportion of faces in which the line of sight was detected. If the rate at which the line of sight can be detected is equal to or greater than a threshold (for example, 90%), camera line of sight determination processing is performed to determine whether the line of sight of each face image is facing the camera.
視線の検出は、眼部(顔検出部21における画像に含まれる人物の顔が含まれているか否かの判定処理で検出した目の候補領域)における明るさの分布を利用し、所定の幅を有し、周囲よりも明るいピークを被写体人物の白目部とする。眼部より白目部が検出されると、視線が検出できたと判定する。
The detection of the line of sight uses the brightness distribution in the eye part (candidate area of the eye detected by the determination process of whether or not the human face included in the image in the
また、黒眼部の偏り具合により、被写体の人物の視線の方向を検出する。被写体の人物が正面を向いている場合、白目部による明るさのピークが2つ存在し、この2つのピークに挟まれるように黒目部による暗い部分が存在する。上記特徴が抽出された場合、被写体の人物はカメラの方を見ていると判定する。 Further, the direction of the line of sight of the subject person is detected based on the degree of bias of the black eye part. When the subject person is facing the front, there are two brightness peaks due to the white eye portion, and there is a dark portion due to the black eye portion so as to be sandwiched between the two peaks. When the above feature is extracted, it is determined that the subject person is looking at the camera.
なお、視線検出と視線の方向検出とを同時に行ってもよい。また、視線検出結果が閾値未満の場合、顔面積判定処理および顔間隔判定処理を行って、集合写真であるか否かの判定を行う。
(c)カメラを向いている顔の割合が一定(例えば、検出された視線の70%)以上である場合、あるいは視線検出結果が閾値未満の場合、顔画像それぞれの面積が顔画像の面積の平均値と比較して一定の割合(例えば、±30%)以内であるか否かを判定する顔面積判定処理を行う。
(d)顔画像の面積が一定の割合以内であれば、それぞれの顔画像の重心を求め、重心間の間隔が平均値と比較して一定の割合(例えば、±30%)以内であるか否かを判定する顔間隔判定処理を行う。一定の割合以内であれば、入力画像は集合写真であると判定する。(c)、(d)の処理は、集合写真の場合、抽出さあれる顔画像の大きさは、ほぼ同様の大きさで、ほぼ同等の間隔であることを利用するものである。
Note that gaze detection and gaze direction detection may be performed simultaneously. When the line-of-sight detection result is less than the threshold value, face area determination processing and face interval determination processing are performed to determine whether the photo is a group photo.
(C) When the ratio of faces facing the camera is a certain value (for example, 70% of the detected line of sight) or when the line-of-sight detection result is less than the threshold, the area of each face image is equal to the area of the face image. A face area determination process is performed to determine whether the ratio is within a certain ratio (for example, ± 30%) as compared with the average value.
(D) If the area of the face image is within a certain ratio, obtain the centroid of each face image, and whether the interval between the centroids is within a certain ratio (for example, ± 30%) compared to the average value. A face interval determination process is performed to determine whether or not. If it is within a certain ratio, it is determined that the input image is a group photo. The processes (c) and (d) use the fact that in the case of a group photo, the size of the extracted face images is almost the same size and at almost the same interval.
S8において集合写真であると判断した場合、集合写真判定部22は、「間引き処理なし」であることを示す集合写真判定信号を生成して間引き処理部23に出力し(S9)、後述するS11の処理に移行する。
If it is determined in S8 that the photo is a group photo, the group
一方、S8において集合写真ではないと判断した場合、集合写真判定部22は、「間引き処理あり」であることを示す集合写真判定信号を生成して間引き処理部23に出力し(S10)、S11の処理に移行する。
On the other hand, if it is determined in S8 that the photo is not a group photo, the group
S11では、間引き処理部23が、縦横比比較部20から入力される間引き要否判定信号および集合写真判定部22から入力される集合写真判定信号に基づいて、間引き処理を行うか否かを判断する(S11)。具体的には、間引き処理部23は、間引き要否判定信号および集合写真判定信号の少なくとも一方が「間引き処理なし」を示す信号である場合には間引き処理を行わず、間引き要否判定信号および集合写真判定信号の両方が「間引き処理あり」を示す信号である場合に間引き処理を行うと判断する。
In S <b> 11, the thinning
S11において間引き処理を行うと判断した場合、間引き処理部23は画像データに間引き処理を実行し(S12)、処理後の画像データを画質調整部24に出力して縦横比変換処理を終了する。間引き処理の詳細については後述する。
If it is determined in S11 that the thinning process is to be performed, the thinning
また、S11において間引き処理を行わないと判断した場合、間引き処理部23は画像データに間引き処理を施すことなく、集合写真判定部22から伝達された画像データをそのまま画質調整部24に出力して縦横比変換処理を終了する。なお、間引き処理を行わない場合、縁無し印刷を行わないようにしてもよく、上述した変倍処理モードによる縁無し印刷を行うようにしてもよい。
When it is determined in S11 that the thinning process is not performed, the thinning
(1−5.間引き処理)
次に、間引き処理部23において行われる間引き処理(上述したS12の処理)についてより詳細に説明する。
(1-5. Thinning process)
Next, the thinning process (the process of S12 described above) performed in the thinning
間引き処理部23は、画像中の顔領域画素を間引き対象から除外するとともに、顔領域以外の画素のうちエッジ成分の小さい画素を検出して間引く処理を行う。間引き処理の対象をエッジ成分の小さい画素にすることにより、見た目の違和感を抑えつつ、画像サイズを縦方向または横方向に縮小して縦横比を出力用紙の縦横比に一致させるように変換することができる。
The thinning
具体的には、間引き処理部23は、以下の(A)〜(D)の処理を行う。
(A)まず、間引き処理部23は、集合写真判定部22から入力される入力画像を輝度成分画像に変換する。輝度成分画像への変換は、「Y=0.2990×R+0.5870×G+0.1140×B」に基づいて行う。上記式におけるR,G,Bは入力画像のRGB値(R,G,B各色の階調値)である。
(B)次に、間引き処理部23は、輝度成分画像にエッジ抽出処理を施し、エッジ画像を生成する。エッジ抽出処理は、輝度成分画像の画素値と、エッジ抽出フィルタとの畳み込み演算により行われる。図4は、エッジ抽出フィルタの一例を示す説明図である。また、図5の(a)は、この処理によって生成されるエッジ画像の一例を示している。なお、図5の(a)は、入力画像が5×5画素のサイズである場合の当該入力画像から導出されるエッジ画像の例を示しているが、間引き処理は集合写真判定部22から入力される入力画像の全体に対して一括して行われる。また、図5の(a)では、エッジ画像中の各画素に示した数値(エッジ成分)が大きいほどエッジ成分が大きい画素であることを示している。
(C)次に、間引き処理部23は、入力画像の縦横比と出力用紙の縦横比とに基づいて入力画像の横方向のサイズ(あるいは縦方向のサイズ)を何ライン分縮小させるかを判断する。
(D)横方向のサイズを小さくする場合、間引き処理部23は、エッジ画像における最も上の行と最も下の行を8近傍(8連結)で結ぶ画素列のうち、エッジ成分の合計値が最も小さい画素列を求め、その画素列を構成する画素を間引く。そして、この処理を画像の横方向のサイズが所望するサイズになるまで繰り返すことにより、画像の縦横比を出力用紙の縦横比に一致させる。なお、縦方向のサイズを小さくする場合、間引き処理部23は、エッジ画像における最も左の行と最も右の行を8近傍(8連結)で結ぶ画素列のうち、エッジ成分の合計値が最も小さい画素列を求め、その画素列を構成する画素を間引く。そして、この処理を画像の縦方向のサイズが所望するサイズになるまで繰り返す。
Specifically, the thinning
(A) First, the thinning
(B) Next, the thinning
(C) Next, the thinning
(D) When reducing the size in the horizontal direction, the thinning-
次に、上記(D)の処理について、上記した図5の(a)のエッジ画像に基づいて横方向のサイズを縮小する場合を例としてより詳細に説明する。なお、以下の説明では、画像の横方向のサイズを小さくする場合の例について説明するが、縦方向のサイズを小さくする場合は、画像の最も左の列と最も右の列とを8近傍で結ぶ画素列に対して同様の処理を行えばよい。
(D1)まず、間引き処理部23は、図5の(a)および(b)に示すように、エッジ画像の2行目の左端の画素を注目画素として、注目画素に対する8近傍画素のうち、上側3画素の中から最小値を求め、注目画素の値に加算する加算処理を行う。
(D2)同様に、図5の(c)に示すように、エッジ画像の2行目全ての画素について、各画素に対する8近傍画素のうち、上側3画素の最小値を求め、注目画素に加算する加算処理を行う。そして、2行目の画素に対する処理が終わったら、3行目以降の画素についても、同様の処理を行う。図5の(d)は、5行目の右端の画素まで上記加算処理が終わった状態を示している。
(D3)次に、間引き処理部23は、図5の(e)に示すように、最も下の行について、上記加算処理によって算出された最小値を求める。
(D4)次に、間引き処理部23は、上記最小値の画素に対する8近傍の画素のうち、上側3画素の中で、最小値を持つ画素を探す探索処理を行う。最小値を持つ画素が見つかったらその画素を注目画素とし、当該注目画素について同様に8近傍画素のうち上側3画素の中で最小値を持つ画素を探す探索処理を行う。この処理を最も上の行に到達するまで繰り返す。図5の(f)は、最も上の行まで上記探索処理を繰り返した結果を示している。図5の(f)においてグレーで色付けされている画素が、各行で求めた最小値を有する画素を示している。
(D4)また、間引き処理部23は、上記探索処理で求めた各行の最小値を有する画素の座標を記憶しておき、上記(A)において輝度変換する前の元画像(集合写真判定部22から入力された入力画像)に対して、上記の記憶した座標に相当する画素を間引き処理する。図5の(g)は図5の(a)に対応する元画像の例を示しており、図5の(h)は図5の(g)の元画像に上記探索処理で求めた各行の最小値の座標を当てはめた例を示しており、図5の(i)は図5の(g)の元画像に対して最小値の座標に対応する上記画素を間引き処理した結果を示している。
(D5)その後、間引き処理部23は、上記間引き処理によって画像の横方向のサイズが所望するサイズになったか否か(所望する縦横比になったか否か)を判断し、所望するサイズになっていない場合には所望するサイズになるまで上記(D1)〜(D4)の処理を繰り返す。
Next, the process (D) will be described in more detail by taking as an example the case of reducing the size in the horizontal direction based on the edge image shown in FIG. In the following description, an example in which the horizontal size of the image is reduced will be described. However, in the case of reducing the vertical size, the leftmost column and the rightmost column of the image are arranged in 8 neighborhoods. A similar process may be performed on the pixel columns to be connected.
(D1) First, as shown in (a) and (b) of FIG. 5, the thinning
(D2) Similarly, as shown in FIG. 5C, for all the pixels in the second row of the edge image, the minimum value of the upper three pixels among the eight neighboring pixels for each pixel is obtained and added to the target pixel. Addition processing is performed. When the processing for the pixels in the second row is completed, the same processing is performed for the pixels in the third and subsequent rows. FIG. 5D shows a state where the above addition processing has been completed up to the rightmost pixel in the fifth row.
(D3) Next, as shown in FIG. 5E, the thinning-
(D4) Next, the thinning-
(D4) Further, the thinning
(D5) Thereafter, the thinning
なお、図5に示した例では、入力画像に顔の画像が含まれていない場合について説明したが、上述したように、入力画像に顔の画像が含まれる場合には顔領域画素を間引き対象から除外する。この場合の処理について、図6の(a)〜(i)を参照しながら説明する。 In the example shown in FIG. 5, the case where the input image does not include a face image has been described. However, as described above, when the input image includes a face image, the face area pixels are subject to thinning. Exclude from Processing in this case will be described with reference to (a) to (i) of FIG.
図6の(a)は、入力画像に顔が含まれる場合に上記(B)の処理によって生成されるエッジ画像の一例を示している。なお、図6において斜線でハッチングした画素は顔領域画素であることを示している。 FIG. 6A shows an example of an edge image generated by the process (B) when a face is included in the input image. In FIG. 6, the hatched pixels are face area pixels.
図6の(c)に示すように、顔領域画素については上記(B)の処理においてエッジ抽出フィルタ処理による画素値(エッジ成分)の計算は行わない。また、図6の(d)に示すように、注目画素の8近傍画素のうち、上側3画素が全て顔領域画素である場合は、注目画素も顔領域画素に変換して処理を続ける。その他の処理方法は図5で説明した処理と同様である。これにより、顔領域以外の画素について間引き処理が行われる。 As shown in (c) of FIG. 6, for face area pixels, the pixel value (edge component) is not calculated by the edge extraction filter process in the process (B). Further, as shown in FIG. 6D, when all the upper three pixels of the eight neighboring pixels of the target pixel are face region pixels, the target pixel is also converted into a face region pixel and the processing is continued. Other processing methods are the same as those described in FIG. Thereby, the thinning process is performed on the pixels other than the face area.
以上のように、本実施形態では、間引き処理部23が、エッジ成分の弱い画素を間引き処理することにより、画像の縦横比を出力用紙の縦横比に合わせるように変換する。すなわち、間引き処理部23が、画像データにおける各画素のエッジ成分の強度を示すエッジ値を検出し、画像の一端部から他端部までを連結する画素の経路のうち、エッジ値の合計値が最小になる経路上の画素を間引き処理することによって画像の縦横比を変換する。
As described above, in the present embodiment, the thinning
これにより、見た目の違和感を抑えつつ画像の縦横比を変換することができる。また、画像の周縁部のオブジェクトが印刷範囲からはみ出してしまうことを防止できる。 Thereby, it is possible to convert the aspect ratio of the image while suppressing the uncomfortable appearance. Further, it is possible to prevent the object at the peripheral edge of the image from protruding from the printing range.
また、本実施形態では、顔検出部21が人物の顔の画像を含む領域である顔領域を検出し、間引き処理部23が顔領域に属する画素を間引き処理の対象から除外する。
In the present embodiment, the
これにより、人物の顔のバランスや表情のバランスが崩れるなどして違和感のある画像になることを防止できる。 Thereby, it is possible to prevent an image having a sense of incongruity due to, for example, the balance of the face of the person or the balance of the expression being lost.
また、本実施形態では、集合写真判定部22が集合写真の画像であるか否かを判定し、集合写真である場合には間引き処理部23が間引き処理を行わない。
In this embodiment, the group
これにより、集合写真に含まれる各人物の顔のバランスや表情のバランスが崩れるなどして違和感のある画像になることを防止できる。 As a result, it is possible to prevent an uncomfortable image due to, for example, the balance of each person's face and the balance of expressions included in the group photo being lost.
また、本実施形態では、画像の縦横比と出力用紙の縦横比との差が所定範囲内であるか否かを検出する縦横比比較部20を備え、間引き処理部23は、上記差が所定範囲内ではない場合には間引き処理を行わない。
Further, in the present embodiment, the aspect
これにより、間引き処理で間引かれる画素数が多くなりすぎて違和感のある画像になることを防止できる。 Thereby, it can be prevented that the number of pixels to be thinned out by the thinning-out process becomes too large and the image becomes uncomfortable.
〔実施形態2〕
本発明の他の実施形態について説明する。なお、説明の便宜上、実施形態1と同様の機能を有する部材については同じ符号を付し、その説明を省略する。
[Embodiment 2]
Another embodiment of the present invention will be described. For convenience of explanation, members having the same functions as those in the first embodiment are denoted by the same reference numerals, and description thereof is omitted.
実施形態1では、画像に含まれる人物の顔の領域を間引き処理の対象から除外する構成について説明した。これに対して、本実施形態では、文字に対応する領域を間引き処理の対象から除外する。 In the first embodiment, the configuration has been described in which the human face area included in the image is excluded from the thinning target. In contrast, in the present embodiment, the area corresponding to the character is excluded from the thinning process target.
図7は、本実施形態にかかる画像形成装置1の概略構成を示す説明図である。この図に示すように、本実施形態にかかる画像形成装置1は、実施形態1の画像形成装置1における縦横比変換部28aに代えて、縦横比変換部28bを備えている。その他の構成は実施形態1と同様である。
FIG. 7 is an explanatory diagram showing a schematic configuration of the
縦横比変換部28bは、図7に示すように、縦横比比較部20、文字範囲抽出部29、および間引き処理部23を備えている。
As shown in FIG. 7, the aspect ratio conversion unit 28 b includes an aspect
図8は、縦横比変換部28bにおける処理の流れを示すフローチャートである。 FIG. 8 is a flowchart showing the flow of processing in the aspect ratio converter 28b.
縦横比比較部20は、入力されてくるRGBの画像データにおける画像の縦横比と出力用紙の縦横比との差分(縦横比差分)Aを算出し(S21)、算出した差分Aが所定範囲内であるか否かを判断する(S22)。
The aspect
S22において差分Aが所定範囲内ではないと判断した場合、縦横比比較部20は、「間引き処理なし」であることを示す間引き要否判定信号を生成して間引き処理部23に出力し(S23)、後述するS27の処理に移行する。
When it is determined in S22 that the difference A is not within the predetermined range, the aspect
一方、S22において差分Aが所定範囲内であると判断した場合、縦横比比較部20は、「間引き処理あり」であることを示す間引き要否判定信号を生成して間引き処理部23に出力する(S24)。
On the other hand, when it is determined in S22 that the difference A is within the predetermined range, the aspect
次に、文字範囲抽出部29が、縦横比比較部20から入力される画像データに基づいて画像中の文字を検出し、検出した文字の外接矩形に相当する文字矩形領域の画素を文字範囲画素として抽出する(S25)。さらに、文字範囲抽出部29は、各画素が文字範囲画素であるか文字範囲画素以外の画素であるかを示す文字範囲信号を生成して間引き処理部23に出力する(S26)。
Next, the character
文字範囲抽出部29における文字の検出方法としては、例えばOCR(optical character recognition:光学文字認識)処理を用いることができる。また、OCR処理の方法は特に限定されるものではなく、従来から公知の方法を用いることができる。例えば、特許文献4に開示されている方法を用いることができる。
As a character detection method in the character
特許文献4の方法では、まず、入力画像を低解像度化(例えば75dpi)した後、2値画像データに変換する。そして、変換した2値画像データに基づいて、図9の(a)に示すように、隣接した黒画素を抽出し、抽出した黒画素を取り囲む矩形(外接矩形)を算出することにより各文字の領域を抽出する。さらに、抽出された外接矩形に対して、特徴量を抽出し、抽出結果を予め用意された辞書データに含まれる文字の特徴量と比較して文字認識を行い、類似する文字を検出する。このとき、文字として検出された外接矩形の位置を文字の位置とする。これにより、文字範囲抽出部29は、図9の(b)に示すように、文字として検出された外接矩形に相当する画素を文字範囲画素とする文字範囲信号を作成し、間引き処理部23に送信する。
In the method of
その後、間引き処理部23が、縦横比比較部20から入力される間引き要否判定信号に基づいて間引き処理を行うか否かを判断する(S27)。
Thereafter, the thinning
S27において間引き処理を行うと判断した場合、間引き処理部23は画像データに間引き処理を実行し(S28)、処理後の画像データを画質調整部24に出力して縦横比変換処理を終了する。なお、間引き処理部23は、文字範囲抽出部29から入力される文字範囲信号に基づいて文字範囲画素を識別し、文字範囲画素を間引き処理の対象から除外して間引き処理を行う。間引き処理の方法としては、実施形態1と同じ方法を用いることができる。
If it is determined in S27 that the thinning process is performed, the thinning
また、S27において間引き処理を行わないと判断した場合、間引き処理部23は画像データに間引き処理を施すことなく、文字範囲抽出部29から伝達された画像データをそのまま画質調整部24に出力して縦横比変換処理を終了する。
When it is determined in S27 that the thinning process is not performed, the thinning
以上のように、本実施形態では、文字範囲検出部29が文字の画像を含む領域である文字領域を検出し、間引き処理部23が文字領域に属する画素を間引き処理の対象から除外する。
As described above, in this embodiment, the character
これにより、文字のバランスが崩れるなどして不自然な画像になることを防止できる。 As a result, it is possible to prevent an unnatural image from being lost due to the imbalance of characters.
〔実施形態3〕
本発明の他の実施形態について説明する。なお、説明の便宜上、上述した実施形態と同様の機能を有する部材については同じ符号を付し、その説明を省略する。
[Embodiment 3]
Another embodiment of the present invention will be described. For convenience of explanation, members having the same functions as those of the above-described embodiment are denoted by the same reference numerals, and description thereof is omitted.
実施形態1では、画像に含まれる人物の顔の領域を間引き処理の対象から除外する構成について説明した。また、実施形態2では、文字に対応する領域を間引き処理の対象から除外する構成について説明した。これに対して、本実施形態では、人物の顔の領域および文字に対応する領域を間引き処理の対象から除外する。 In the first embodiment, the configuration has been described in which the human face area included in the image is excluded from the thinning target. In the second embodiment, the configuration in which the area corresponding to the character is excluded from the thinning process target has been described. On the other hand, in the present embodiment, the area of the person's face and the area corresponding to the character are excluded from the thinning process targets.
図10は、本実施形態にかかる画像形成装置1の概略構成を示す説明図である。この図に示すように、本実施形態にかかる画像形成装置1は、実施形態1の画像形成装置1における縦横比変換部28aに代えて、縦横比変換部28cを備えている。その他の構成は実施形態1と同様である。
FIG. 10 is an explanatory diagram showing a schematic configuration of the
縦横比変換部28cは、図10に示すように、縦横比比較部20、顔検出部21、集合写真判定部22、文字範囲抽出部29、および間引き処理部23を備えている。
As shown in FIG. 10, the aspect ratio conversion unit 28 c includes an aspect
図11は、縦横比変換部28cにおける処理の流れを示すフローチャートである。 FIG. 11 is a flowchart showing the flow of processing in the aspect ratio converter 28c.
S1〜S10の処理は実施形態1(図2のS1〜S10)と同様である。 The process of S1-S10 is the same as that of Embodiment 1 (S1-S10 of FIG. 2).
S10の処理の後、文字範囲抽出部29が、縦横比比較部20から入力される画像データに基づいて画像中の文字を検出し、検出した文字の外接矩形に相当する文字矩形領域の画素を文字範囲画素として抽出する(S25)。さらに、文字範囲抽出部29は、各画素が文字範囲画素であるか文字範囲画素以外の画素であるかを示す文字範囲信号を生成して間引き処理部23に出力する(S26)。文字範囲画素の抽出方法としては、実施形態2と同様の方法を用いることができる。
After the process of S10, the character
その後、間引き処理部23が、縦横比比較部20から入力される間引き要否判定信号および集合写真判定部22から入力される集合写真判定信号に基づいて、間引き処理を行うか否かを判断する(S11)。
Thereafter, the thinning
S11において間引き処理を行うと判断した場合、間引き処理部23は画像データに間引き処理を実行し(S12)、処理後の画像データを画質調整部24に出力して縦横比変換処理を終了する。間引き処理の詳細については後述する。また、S11において間引き処理を行わないと判断した場合、間引き処理部23は画像データに間引き処理を施すことなく、集合写真判定部22から伝達された画像データをそのまま画質調整部24に出力して縦横比変換処理を終了する。
If it is determined in S11 that the thinning process is to be performed, the thinning
以上のように、本実施形態では、顔検出部21が人物の顔の画像を含む領域である顔領域を検出し、文字範囲検出部29が文字の画像を含む領域である文字領域を検出し、間引き処理部23が顔領域に属する画素および文字領域に属する画素を間引き処理の対象から除外する。
As described above, in the present embodiment, the
これにより、人物の顔のバランスや文字のバランスが崩れるなどして違和感のある画像になることを防止できる。 As a result, it is possible to prevent the image from having a sense of incongruity due to the loss of the balance of the face of the person or the balance of the characters.
〔実施形態4〕
画像形成装置1の制御ブロック(特に画像処理装置3、制御部9、およびRIP4)は、集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェアによって実現してもよい。
[Embodiment 4]
The control blocks (particularly the
後者の場合、画像処理装置3、制御部9、およびRIP4は、各機能を実現するソフトウェアであるプログラムの命令を実行するCPU、上記プログラムおよび各種データがコンピュータ(またはCPU)で読み取り可能に記録されたROM(Read Only Memory)または記憶装置(これらを「記録媒体」と称する)、上記プログラムを展開するRAM(Random Access Memory)などを備えている。そして、コンピュータ(またはCPU)が上記プログラムを上記記録媒体から読み取って実行することにより、本発明の目的が達成される。
In the latter case, the
上記記録媒体としては、「一時的でない有形の媒体」、例えば、テープ、ディスク、カード、半導体メモリ、プログラマブルな論理回路などを用いることができる。また、上記プログラムは、該プログラムを伝送可能な任意の伝送媒体(通信ネットワークや放送波等)を介して上記コンピュータに供給されてもよい。なお、本発明は、上記プログラムが電子的な伝送によって具現化された、搬送波に埋め込まれたデータ信号の形態でも実現され得る。 As the recording medium, a “non-temporary tangible medium” such as a tape, a disk, a card, a semiconductor memory, a programmable logic circuit, or the like can be used. The program may be supplied to the computer via an arbitrary transmission medium (such as a communication network or a broadcast wave) that can transmit the program. The present invention can also be realized in the form of a data signal embedded in a carrier wave in which the program is embodied by electronic transmission.
〔まとめ〕
本発明の態様1にかかる画像処理装置3は、画像データにおける画像の縦横比を、当該画像を印刷する出力用紙の縦横比に応じて変換する画像処理装置3であって、上記画像データにおける各画素のエッジ成分の強度を示すエッジ値を検出し、上記画像の一端部から他端部までを連結する画素の経路のうち、エッジ値の合計値が最小になる経路上の画素を間引き処理することによって上記画像の縦横比を変換する間引き処理部23を備えていることを特徴としている。
[Summary]
An
上記の構成によれば、エッジ成分の強度が低い領域の画素を間引くことにより、見た目の違和感を抑えつつ画像の縦横比を変換することができる。また、画像の周縁部のオブジェクトが印刷範囲からはみ出してしまうことを防止できる。 According to the above configuration, the aspect ratio of the image can be converted while suppressing a sense of strangeness of appearance by thinning out pixels in a region where the intensity of the edge component is low. Further, it is possible to prevent the object at the peripheral edge of the image from protruding from the printing range.
本発明の態様2にかかる画像処理装置3は、上記態様1において、上記画像データに基づいて人物の顔の画像を含む領域である顔領域を検出する顔検出部21を備え、上記間引き処理部23は上記顔領域に属する画素を上記間引き処理の対象から除外する構成であってもよい。
The
人物の顔に対応する画素を間引くと、顔のバランスあるいは表情のバランスが崩れてしまい、見た目が不自然な画像になってしまう場合がある。これに対して、上記の構成によれば、顔領域に属する画素を間引き処理の対象から除外するので、不自然な画像になることを防止できる。 If pixels corresponding to a person's face are thinned out, the balance of the face or the balance of expression may be lost, and the image may appear unnatural. On the other hand, according to the above configuration, the pixels belonging to the face area are excluded from the thinning target, so that an unnatural image can be prevented.
本発明の態様3にかかる画像処理装置3は、上記態様1または2において、上記画像データに基づいて文字の画像を含む領域である文字領域を検出する文字範囲検出部29を備え、上記間引き処理部23は上記文字領域に属する画素を上記間引き処理の対象から除外する構成である。
The
文字に対応する画素を間引くと、文字のバランスが崩れてしまい、見た目が不自然な画像になってしまう場合がある。これに対して、上記の構成によれば、文字領域に属する画素を間引き処理の対象から除外するので、不自然な画像になることを防止できる。 If pixels corresponding to a character are thinned out, the balance of the character may be lost, resulting in an unnatural image. On the other hand, according to the above configuration, pixels belonging to the character region are excluded from the thinning target, so that an unnatural image can be prevented.
本発明の態様4にかかる画像処理装置3は、上記態様1から3のいずれかにおいて、上記画像データの画像が人物の顔の画像を所定数以上含む集合写真であるか否かを判定する集合写真判定部22を備え、上記間引き処理部23は、上記集合写真判定部22によって集合写真であると判定された場合には上記間引き処理を行わない構成である。
The
集合写真の場合、画像全体に顔領域が多数存在する。このため、間引き処理を行うと、顔領域の画素を間引いてしまい、表情のバランスが崩れて、見た目が不自然な画像なってしまう場合がある。これに対して、上記の構成によれば、集合写真であると判定された場合には間引き処理を行わないので、不自然な画像になることを防止できる。 In the case of a group photo, there are many face areas in the entire image. For this reason, when the thinning process is performed, the pixels in the face area are thinned out, the balance of facial expressions may be lost, and the image may appear unnatural. On the other hand, according to the above configuration, when it is determined that the photo is a group photo, the thinning process is not performed, so that an unnatural image can be prevented.
本発明の態様5にかかる画像処理装置3は、上記態様1から4のいずれかにおいて、上記画像の縦横比と上記出力用紙の縦横比との差が所定範囲内であるか否かを検出する縦横比比較部20を備え、上記間引き処理部23は、上記差が上記所定範囲内ではない場合には上記間引き処理を行わない構成である。
The
画像データの縦横比と出力用紙の縦横比が大きく異なっている場合、間引き処理を行う画素数が多くなるので、間引き処理後の画像が元画像から大きく変わってしまい、不自然な画像になってしまう場合がある。これに対して、上記の構成によれば、画像の縦横比と出力用紙の縦横比との差が所定範囲内ではない場合には間引き処理を行わないので、不自然な画像になることを防止できる。 If the aspect ratio of the image data and the aspect ratio of the output paper are significantly different, the number of pixels to be thinned out will increase, so the image after thinning will be significantly different from the original image, resulting in an unnatural image. May end up. On the other hand, according to the above configuration, since the thinning process is not performed when the difference between the aspect ratio of the image and the aspect ratio of the output paper is not within the predetermined range, an unnatural image is prevented. it can.
本発明の態様6にかかる画像形成装置1は、上記態様1から5のいずれかの画像処理装置3と、上記画像データに応じた画像を出力用紙に印刷する画像形成部5とを備えていることを特徴としている。
An
上記の構成によれば、見た目の違和感を抑えつつ画像の縦横比を変換することができる。また、画像の周縁部のオブジェクトが印刷範囲からはみ出してしまうことを防止できる。 According to the above configuration, it is possible to convert the aspect ratio of the image while suppressing the uncomfortable appearance. Further, it is possible to prevent the object at the peripheral edge of the image from protruding from the printing range.
本発明の態様7にかかる画像処理方法は、画像データにおける画像の縦横比を、当該画像を印刷する出力用紙の縦横比に応じて変換する画像処理方法であって、上記画像データにおける各画素のエッジ成分の強度を示すエッジ値を検出する工程と、上記画像の一端部から他端部までを連結する画素の経路のうち、エッジ値の合計値が最小になる経路上の画素を間引き処理することによって上記画像の縦横比を変換する間引き処理工程とを含むことを特徴としている。
An image processing method according to an
上記の方法によれば、エッジ成分の強度が低い領域の画素を間引くことにより、見た目の違和感を抑えつつ画像の縦横比を変換することができる。また、従来の画像を出力用紙よりも大きいサイズに拡大して印刷する構成の課題であった、画像の周縁部のオブジェクトが印刷範囲からはみ出してしまうという課題を防止できる。 According to the above method, the aspect ratio of the image can be converted while suppressing a sense of strangeness of appearance by thinning out pixels in a region where the intensity of the edge component is low. In addition, it is possible to prevent the problem that the object at the peripheral portion of the image protrudes from the print range, which is a problem of the configuration in which the conventional image is enlarged and printed to a size larger than the output paper.
本発明の各態様に係る画像処理装置3は、コンピュータによって実現してもよく、この場合には、コンピュータを上記間引き処理部として動作させることにより上記画像処理装置をコンピュータにて実現させる画像処理プログラム、およびそれを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に含まれる。
The
本発明は、上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope shown in the claims, and the embodiments can be obtained by appropriately combining technical means disclosed in different embodiments. The form is also included in the technical scope of the present invention.
本発明は、写真画像データに応じた画像を出力用紙に印刷する際に出力用紙のサイズに応じて写真画像データの画像サイズを変換する画像処理装置および画像処理方法に適用できる。 The present invention can be applied to an image processing apparatus and an image processing method for converting the image size of photographic image data according to the size of the output paper when an image corresponding to the photographic image data is printed on the output paper.
1 画像形成装置
2 画像入力装置
3 画像処理装置
4 RIP
5 画像出力装置
9 制御部
20 縦横比比較部
21 顔検出部
22 集合写真判定部
23 間引き処理部
28a〜28c 縦横比調整部
29 文字範囲抽出部
DESCRIPTION OF
DESCRIPTION OF
Claims (9)
上記画像データにおける各画素のエッジ成分の強度を示すエッジ値を検出し、上記画像の一端部から他端部までを連結する画素の経路のうち、エッジ値の合計値が最小になる経路上の画素を間引き処理することによって上記画像の縦横比を変換する間引き処理部を備えていることを特徴とする画像処理装置。 An image processing apparatus that converts an aspect ratio of an image in image data according to an aspect ratio of an output sheet on which the image is printed,
An edge value indicating the intensity of the edge component of each pixel in the image data is detected, and a path of pixels connecting the one end part to the other end part of the image is on a path where the total value of the edge values is minimized. An image processing apparatus comprising: a thinning processing unit that converts the aspect ratio of the image by thinning pixels.
上記間引き処理部は上記顔領域に属する画素を上記間引き処理の対象から除外することを特徴とする請求項1に記載の画像処理装置。 A face detection unit for detecting a face area that is an area including an image of a person's face based on the image data;
The image processing apparatus according to claim 1, wherein the thinning processing unit excludes pixels belonging to the face area from the thinning processing target.
上記間引き処理部は上記文字領域に属する画素を上記間引き処理の対象から除外することを特徴とする請求項1または2に記載の画像処理装置。 A character range detection unit that detects a character region that is a region including a character image based on the image data;
The image processing apparatus according to claim 1, wherein the thinning processing unit excludes pixels belonging to the character area from the thinning processing target.
上記間引き処理部は、上記集合写真判定部によって集合写真であると判定された場合には上記間引き処理を行わないことを特徴とする請求項1から3のいずれか1項に記載の画像処理装置。 A group photo determination unit for determining whether the image of the image data is a group photo including a predetermined number of human face images;
The image processing apparatus according to claim 1, wherein the thinning processing unit does not perform the thinning processing when the group photo determination unit determines that the group photo is a group photo. .
上記間引き処理部は、上記差が上記所定範囲内ではない場合には上記間引き処理を行わないことを特徴とする請求項1から4のいずれか1項に記載の画像処理装置。 An aspect ratio comparison unit that detects whether or not the difference between the aspect ratio of the image and the aspect ratio of the output paper is within a predetermined range;
5. The image processing apparatus according to claim 1, wherein the thinning processing unit does not perform the thinning processing when the difference is not within the predetermined range.
上記画像データに応じた画像を出力用紙に印刷する画像形成部とを備えていることを特徴とする画像形成装置。 An image processing apparatus according to any one of claims 1 to 5,
An image forming apparatus comprising: an image forming unit that prints an image corresponding to the image data on an output sheet.
上記画像データにおける各画素のエッジ成分の強度を示すエッジ値を検出する工程と、
上記画像の一端部から他端部までを連結する画素の経路のうち、エッジ値の合計値が最小になる経路上の画素を間引き処理することによって上記画像の縦横比を変換する間引き処理工程とを含むことを特徴とする画像処理方法。 An image processing method for converting an aspect ratio of an image in image data according to an aspect ratio of an output sheet on which the image is printed,
Detecting an edge value indicating an intensity of an edge component of each pixel in the image data;
A thinning process step of converting the aspect ratio of the image by thinning out pixels on a path where the total value of the edge values is the smallest among the paths of pixels connecting the one end part to the other end part of the image. An image processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014189386A JP2016063369A (en) | 2014-09-17 | 2014-09-17 | Image processing device, image processing method, image formation device, image processing program, and recording medium thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014189386A JP2016063369A (en) | 2014-09-17 | 2014-09-17 | Image processing device, image processing method, image formation device, image processing program, and recording medium thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2016063369A true JP2016063369A (en) | 2016-04-25 |
Family
ID=55798387
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014189386A Pending JP2016063369A (en) | 2014-09-17 | 2014-09-17 | Image processing device, image processing method, image formation device, image processing program, and recording medium thereof |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2016063369A (en) |
-
2014
- 2014-09-17 JP JP2014189386A patent/JP2016063369A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8792735B2 (en) | Image compressing apparatus which extracts black text edge pixels from an image and compresses a layer with black text edge pixels extracted | |
US8422778B2 (en) | Image compressing method, image compressing apparatus, image forming apparatus, computer program and computer readable medium | |
US7903872B2 (en) | Image-processing apparatus and method, computer program, and storage medium | |
JP4331159B2 (en) | Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium therefor | |
US9497353B2 (en) | Image processing apparatus, image processing method, and image processing system | |
US8463032B2 (en) | Image compressing apparatus, compressed image outputting apparatus, image compression method, and recording medium | |
JP4637054B2 (en) | Image processing apparatus, control method therefor, computer program, and computer-readable storage medium | |
US8599456B2 (en) | Image processing apparatus, image forming apparatus, image processing method, and computer-readable recording medium on which image processing program is recorded | |
JP2022145776A (en) | Image processing apparatus and image processing method | |
JP2012074852A (en) | Image processing device, image formation device, image reading device, image processing method, image processing program and recording medium | |
JP2015015599A (en) | Image processing apparatus, image forming apparatus, image processing method, and program and recording medium of the same | |
JP2009060474A (en) | Image processing apparatus | |
JP5165043B2 (en) | Device, method and program capable of detecting line | |
JP2016063369A (en) | Image processing device, image processing method, image formation device, image processing program, and recording medium thereof | |
JP4149368B2 (en) | Image processing method, image processing apparatus and image forming apparatus, computer program, and computer-readable recording medium | |
JP2015088910A (en) | Image processing device | |
JP2018174420A (en) | Image processing apparatus and computer program | |
JP6293466B2 (en) | Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium | |
JP6834701B2 (en) | Image processing equipment and computer programs | |
JP6794901B2 (en) | Image processing equipment and computer programs | |
JP2008206186A (en) | Image processing apparatus, image processing system, and image processing method | |
JP2007189275A (en) | Image processor | |
JP5165137B2 (en) | Device, method and program capable of detecting line | |
JP2015023461A (en) | Image processing apparatus, image forming apparatus, image processing method, program, and recording medium | |
JP2001211318A (en) | Device and method for image processing, storage medium, and image processing system |