JP2013051652A - Image processing device, image reading device, and image processing program - Google Patents
Image processing device, image reading device, and image processing program Download PDFInfo
- Publication number
- JP2013051652A JP2013051652A JP2011189830A JP2011189830A JP2013051652A JP 2013051652 A JP2013051652 A JP 2013051652A JP 2011189830 A JP2011189830 A JP 2011189830A JP 2011189830 A JP2011189830 A JP 2011189830A JP 2013051652 A JP2013051652 A JP 2013051652A
- Authority
- JP
- Japan
- Prior art keywords
- block
- image
- color
- unit
- mode value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
Abstract
Description
本発明は、画像を複数のブロックに分割してブロック毎に白黒ブロック、グレーブロック、有彩色ブロックのいずれであるかを判定する技術に関する。 The present invention relates to a technique for dividing an image into a plurality of blocks and determining whether each block is a monochrome block, a gray block, or a chromatic block.
従来、3原色のR、G、B信号を明度信号に変換して明度信号(YCbCr色空間におけるY成分に相当)のヒストグラムを作成し、作成したヒストグラムから原稿種別を判定する画像処理装置が知られている(例えば、特許文献1参照)。
上述した画像処理装置では、例えば有彩色の画素数と、有彩色の画素数と無彩色の画素数とを合計した画素数との比(=有彩色の画素数/(有彩色の画素数+無彩色の画素数))を求め、その比が基準値より大きいとカラー原稿であると判定している。
Conventionally, an image processing apparatus that converts R, G, and B signals of three primary colors into a brightness signal to create a histogram of the brightness signal (corresponding to the Y component in the YCbCr color space) and determines the document type from the created histogram is known. (For example, refer to Patent Document 1).
In the image processing apparatus described above, for example, the ratio of the number of chromatic pixels and the total number of chromatic and achromatic pixels (= number of chromatic pixels / (number of chromatic pixels + The number of achromatic pixels)) is obtained, and if the ratio is greater than the reference value, it is determined that the document is a color original.
ところで、上述した従来の技術は原稿(以下「画像」という)の種別がカラー画像であるか否かを判定するものであるが、画像の種別の判定はこれに限られるものではなく、無地画像、白黒画像、グレー画像、カラー画像のいずれであるかを判定する場合もある。
そして、このような判定を行う場合に、明度信号のヒストグラムを用いてブロック単位に白黒ブロック、グレーブロック、有彩色ブロックのいずれであるかを判定し、その判定結果を用いて原稿が無地画像、白黒画像、グレー画像、カラー画像のいずれであるかを判定する場合もある。
従来はこのような判定を行う場合に各ブロックが白黒ブロック、グレーブロック、有彩色ブロックのいずれであるかを効率よく判定することについて十分に検討されていなかった。
By the way, the above-described conventional technique determines whether or not the type of the document (hereinafter referred to as “image”) is a color image, but the determination of the type of image is not limited to this, and a plain image In some cases, it is determined whether the image is a monochrome image, a gray image, or a color image.
When making such a determination, the histogram of the brightness signal is used to determine whether each block is a black and white block, a gray block, or a chromatic block, and the determination result is used to determine whether the document is a plain image, In some cases, it is determined whether the image is a monochrome image, a gray image, or a color image.
Conventionally, when such a determination is made, it has not been sufficiently studied to efficiently determine whether each block is a monochrome block, a gray block, or a chromatic block.
本明細書では、ブロック毎にヒストグラムを用いて白黒ブロック、グレーブロック、有彩色ブロックのいずれであるかを判定する場合に、その判定を効率よく行うことができる技術を開示する。 In the present specification, a technique is disclosed in which when a block is used to determine whether a block is a black and white block, a gray block, or a chromatic block using a histogram, the determination can be performed efficiently.
本明細書によって開示される画像処理装置は、YCbCr色空間で表される画像を複数のブロックに分割してブロック毎に当該ブロックを構成している画素のY成分の値のヒストグラムを作成し、そのヒストグラムにおける最頻値と当該最頻値の割合とを求めるブロック単位最頻値算出部と、前記ブロック単位最頻値算出部によって求められた前記最頻値の割合に基づいて当該ブロックが単色ブロックであるか多色ブロックであるかを判定する単色/多色ブロック判定部と、前記単色/多色ブロック判定部によって単色ブロックであると判定されたブロックについて、当該ブロックが無彩色ブロックであるか有彩色ブロックであるかを判定する第1の無彩色/有彩色ブロック判定部と、前記第1の無彩色/有彩色ブロック判定部によって無彩色ブロックであると判定されたブロックについて、前記ブロック単位最頻値算出部によって求められた前記最頻値が第1の閾値以下であるか又は前記第1の閾値より大きい第2の閾値以上である場合は白黒ブロックと判定し、前記最頻値が前記第1の閾値より大きく前記第2の閾値より小さい場合はグレーブロックであると判定する第1の白黒/グレーブロック判定部と、を備える。 The image processing apparatus disclosed in the present specification divides an image represented in the YCbCr color space into a plurality of blocks, creates a histogram of the Y component values of the pixels constituting the block for each block, The block unit mode value calculation unit for determining the mode value and the mode value ratio in the histogram, and the block is monochromatic based on the mode value ratio obtained by the block unit mode value calculation unit A single color / multicolor block determination unit that determines whether the block is a multicolor block or a block that is determined to be a single color block by the single color / multicolor block determination unit is an achromatic block The first achromatic / chromatic color block determination unit that determines whether the block is a chromatic block or the first achromatic / chromatic block determination unit For the block determined to be a block, the mode value obtained by the block unit mode value calculation unit is not more than a first threshold value or not less than a second threshold value that is greater than the first threshold value. A first black-and-white / gray block determining unit that determines a black-and-white block, and determines that the mode is a gray block when the mode value is larger than the first threshold value and smaller than the second threshold value.
更に、上記画像処理装置は、前記単色/多色ブロック判定部によって多色ブロックであると判定されたブロックについて、当該ブロックが無彩色ブロックであるか有彩色ブロックであるかを判定する第2の無彩色/有彩色ブロック判定部と、前記無彩色/有彩色判定部によって無彩色ブロックであると判定されたブロックについて、前記ブロック単位最頻値算出部によって作成されたヒストグラムにおいてY成分の値が第3の閾値以下である画素、及び、Y成分の値が前記第3の閾値より大きい第4の閾値以上である画素の合計割合を求め、前記合計割合に基づいて当該ブロックが白黒ブロックであるかグレーブロックであるかを判定する第2の白黒/グレーブロック判定部と、を備えてもよい。 Furthermore, the image processing apparatus determines a second block for determining whether the block is an achromatic block or a chromatic block for the block determined to be a multicolor block by the single color / multicolor block determination unit. For the block determined to be an achromatic color block by the achromatic / chromatic color block determining unit and the achromatic / chromatic color determining unit, the value of the Y component in the histogram created by the block unit mode value calculating unit is A total ratio of pixels that are equal to or smaller than the third threshold and pixels whose Y component value is equal to or greater than the fourth threshold that is greater than the third threshold is obtained, and the block is a black and white block based on the total ratio. Or a second black and white / gray block determination unit that determines whether the block is a gray block.
更に、上記画像処理装置は、前記画像に占める前記単色ブロックの割合に基づいて、単色ブロックの割合が一定割合以上である単色画像であるか、単色ブロックの割合が一定割合未満である多色画像であるかを判定する単色/多色画像判定部と、前記単色/多色画像判定部によって単色画像であると判定された場合に、前記ブロック単位最頻値算出部によって前記ブロック毎に求められた前記最頻値のヒストグラムを作成し、そのヒストグラムにおける最頻値の割合を求める画像単位最頻値算出部と、前記画像単位最頻値算出部によって求められた前記最頻値の割合に基づいて当該画像が無地画像であるか否かを判定する無地画像判定部と、前記無地画像判定部によって無地画像でないと判定された場合に、前記画像が白黒画像、グレー画像、又は、カラー画像のいずれであるかを前記白黒ブロック、前記グレーブロック、及び、前記有彩色ブロックの割合に基づいて判定する白黒/グレー/カラー画像判定部と、を備えてもよい。 Further, the image processing apparatus is a single color image in which the ratio of the single color block is equal to or higher than a predetermined ratio based on the ratio of the single color block in the image, or a multicolor image in which the ratio of the single color block is less than the predetermined ratio. A single-color / multi-color image determination unit that determines whether the image is a single-color image by the single-color / multi-color image determination unit; Further, based on the mode value calculation unit that creates a histogram of the mode value and obtains the mode value ratio in the histogram, and the mode value ratio obtained by the image unit mode value calculation unit A plain image determination unit that determines whether or not the image is a plain image, and when the plain image determination unit determines that the image is not a plain image, the image is a monochrome image or a gray image Alternatively, the black and white blocks which of a color image, the gray block, and a determining monochrome / gray / color image determining unit on the basis of the ratio of the chromatic color blocks, may be provided.
なお、この発明は、画像読取装置、画像処理プログラム、画像処理方法、画像処理プログラムを記録した記録媒体等の種々の態様で実現することができる。 The present invention can be realized in various modes such as an image reading apparatus, an image processing program, an image processing method, and a recording medium on which the image processing program is recorded.
上記の画像処理装置によると、単色/多色ブロック判定部によって単色ブロックであると判定され、無彩色/有彩色ブロック判定部によって無彩色ブロックであると判定されたブロックについて、第1の白黒/グレーブロック判定部によって白黒ブロックであるかグレーブロックであるかを判定するとき、ブロック単位最頻値算出部によって求められた最頻値に基づいて判定する。
すなわち、上記の画像処理装置によると、ブロック単位最頻値算出部によって求められた最頻値を、ブロックが白黒ブロックであるかグレーブロックであるかの判定に流用するので、ブロック毎にヒストグラムを用いて白黒ブロック、グレーブロック、有彩色ブロックのいずれであるかを判定する場合に、その判定を効率よく行うことができる。
According to the above image processing device, the first monochrome / multicolor block determination unit determines that the block is a single color block and the achromatic / chromatic block determination unit determines that the block is an achromatic block. When the gray block determination unit determines whether the block is a black and white block or a gray block, the determination is made based on the mode value obtained by the block unit mode value calculation unit.
That is, according to the above image processing apparatus, the mode value obtained by the block unit mode value calculation unit is used for determining whether the block is a black and white block or a gray block. When it is used to determine whether the block is a black and white block, a gray block, or a chromatic color block, the determination can be performed efficiently.
<実施形態1>
本発明の実施形態1を図1ないし図11によって説明する。
(1)複合機の構成
図1は、実施形態1に係る画像処理装置としての複合機1の電気的構成を簡略化して示すブロック図である。複合機1は、制御部10、読取部11、印刷部12、操作部13、記憶部14、及び、通信インタフェース(通信I/F)部15を備えている。
<Embodiment 1>
A first embodiment of the present invention will be described with reference to FIGS.
(1) Configuration of Multifunction Device FIG. 1 is a block diagram showing a simplified electrical configuration of a multifunction device 1 as an image processing apparatus according to the first embodiment. The multi-function device 1 includes a
制御部10は、CPU10a、ROM10b、RAM10cを備えている。CPU10aはROM10bや記憶部14に記憶されているプログラムを実行することによって複合機1の各部を制御する。ROM10bには複合機1の動作を制御するための制御プログラムや各種のデータなどが記録されている。RAM10cはCPU10aが各種の処理を実行するための主記憶装置として用いられる。
The
読取部11は、原稿が載置されるプラテンガラス、プラテンガラスに載置されている原稿を照射する光源、受光した光に応じた画像信号を出力するイメージセンサ、原稿に反射された光をイメージセンサに結像させる光学系、イメージセンサをプラテンガラスの盤面に沿って搬送する搬送部、イメージセンサから出力された画像信号をA/D変換するA/D変換回路、A/D変換回路から出力された画像信号に基づいて画像を生成し、生成した画像に各種の画像処理を施す画像処理回路11aなどを備えて構成されている。
The
画像処理回路11aは、A/D変換回路から出力された画像信号に基づいて画像を生成すると、生成した画像の種別を判定し、画像の種別に応じた画像処理を施す。画像の種別に応じて画像処理を切り替えることは従来から行われていることであるので、画像の種別に応じた画像処理についての説明は省略する。
When the
画像処理回路11aは、ブロック単位最頻値算出部、単色/多色ブロック判定部、第1の無彩色/有彩色ブロック判定部、第1の白黒/グレーブロック判定部、第2の無彩色/有彩色ブロック判定部、第2の白黒/グレーブロック判定部、単色/多色画像判定部、画像単位最頻値算出部、無地画像判定部、白黒/グレー/カラー画像判定部、及び、色空間変換部の一例である。
The
印刷部12は、読取部11によって生成された画像や通信インタフェース部15によって外部装置から受信された画像を電子写真方式やインクジェット方式などで印刷用紙などのシートに印刷する。
The
操作部13は、液晶ディスプレイや各種のボタンを備えて構成されており、ユーザは操作部13を操作することによって読取モードの選択や原稿の読み取り指示などの各種の操作を行うことができる。本実施形態では読取モードとして「カラー/グレー/白黒/Auto」を選択することができる。
The
記憶部14は、ハードディスクやフラッシュメモリなどの不揮発性のメモリを用いて各種のプログラムやデータを記憶する装置である。記憶部14には読取部11によって生成された画像や通信インタフェース部15によって外部装置から受信された画像などが記憶される。
The
通信インタフェース部15はLAN(Local Aria Network)やインターネットなどの通信ネットワークを介してパーソナルコンピュータ(PC)や携帯情報端末などの外部装置と通信可能に接続されており、外部装置からの印刷対象の画像の受信や、読取部11によって生成された画像の外部装置への送信等を行う。なお、通信インタフェース部15はUSB(Universal Serial Bus)やパラレル回線などを介して外部装置と接続される構成であってもよい。
The
(2)画像の種別
本実施形態では画像の種別として無地画像、白黒画像、グレー画像、及び、カラー画像の4つを例に説明する。
(2) Image Types In this embodiment, four types of images, namely, plain images, black and white images, gray images, and color images will be described as examples.
無地画像とは、シートに印刷した場合に何も印刷されない白紙画像の他、全体が一色で塗り潰された画像も含む。無地画像の例としては、全体が白一色の画像、全体が黒一色の画像、全体が特定のグレー一色の画像、全体が特定の有彩色一色の画像などが挙げられる。
ここで特定のグレーとは、例えば白から黒までを256階調で表現するとすると、白と黒とを除いて254階調のグレーがあることになり、そのうちの特定の1階調のグレーのことをいう。
The plain image includes not only a blank image on which nothing is printed when printed on a sheet but also an image that is entirely filled with one color. Examples of the plain image include a white image as a whole, a black image as a whole, a specific gray image as a whole, and a specific chromatic color image as a whole.
Here, for example, if white to black is expressed with 256 gradations, there are 254 gradations of gray except for white and black. That means.
白黒画像とは、白と黒とからなる画像をいう。白黒画像の例としては、地色が白で文字が黒の文書画像が挙げられる。
グレー画像とは、二以上のグレーからなる画像をいう。グレー画像の例としては、モノクロの写真画像のように互いに階調の異なる2以上のグレーからなる画像が挙げられる。なお、前述したように本実施形態では全体が特定のグレー一色の画像は無地画像に分類されるので、全体が特定のグレー一色の画像はグレー画像から除外される。
A black and white image is an image composed of white and black. An example of a black-and-white image is a document image with a white background and black characters.
A gray image is an image composed of two or more grays. An example of a gray image is an image composed of two or more grays having different gradations, such as a monochrome photographic image. Note that, as described above, in the present embodiment, an image with a specific gray color as a whole is classified as a plain image, and therefore an image with a specific gray color as a whole is excluded from the gray image.
カラー画像とは、二以上の色からなる画像であってそれら二以上の色のうち少なくとも一色が有彩色である画像をいう。カラー画像の例としては、被写体をデジタルカメラで撮像して生成されたカラーの写真画像が挙げられる。 A color image is an image composed of two or more colors, and at least one of the two or more colors is a chromatic color. As an example of a color image, a color photographic image generated by imaging a subject with a digital camera can be given.
(3)画像の種別の判定の概要
本実施形態では、例えば無地画像の一部に無地とはいえない部分があっても、人が見た場合に全体として無地と認識される場合には無地画像であると判定する。例えば、画像に白でない部分が含まれていても、人が見た場合に全体として白と認識される場合は全体が白一色の画像、すなわち無地画像であると判定する。白黒画像、グレー画像、カラー画像についても同様である。
(3) Outline of determination of image type In this embodiment, for example, even if a part of a plain image has a part that cannot be said to be plain, if it is recognized as plain as a whole when viewed by a person, it is plain. It is determined to be an image. For example, even if a non-white portion is included in the image, if the image is recognized as white as a whole when viewed by a person, it is determined that the entire image is a solid white image, that is, a plain image. The same applies to black and white images, gray images, and color images.
このような判定を行うために、すなわち人が見た場合に認識される種別と一致する種別が判定されるようにするために、本実施形態では図2に示すように画像20を複数のブロック21に分割し、分割した各ブロックを色によって分類し、分類したブロックの割合に基づいて画像の種別を判定する。なお、図2では一つのブロックにのみ符号を付している。
In order to make such a determination, that is, in order to determine a type that matches a type recognized when viewed by a person, in this embodiment, an
ここで、画像の種別を判定する場合、ブロックに分割するのではなく一つ一つの画素の色を判定して画像の種別を判定することも可能である。例えば全画素のうち90%以上が白であれば白一色の画像であると判定することも可能である。しかしながら、そのような判定では次に説明するような問題があるため、本実施形態ではブロックに分割して判定する。 Here, when determining the type of image, it is also possible to determine the type of image by determining the color of each pixel instead of dividing into blocks. For example, if 90% or more of all pixels are white, it can be determined that the image is a single white image. However, since such a determination has the following problem, in this embodiment, the determination is made by dividing into blocks.
例えば、文書原稿を読み取って生成した文書画像では、文字を構成している画素のうち文字の輪郭を形成している画素(言い換えると文字を構成している画素のうち文字と文字以外の領域との境界に接している画素)の色が、読み取りの際の色ずれによってカラーになってしまう場合がある。この場合、カラーの画素が所定割合以上であればカラー画像であると判定するとすると、色ずれによってカラーと判定される画素の数が多いことにより、白黒の文書画像であるにもかかわらずカラー画像であると誤判定される場合がある。 For example, in a document image generated by reading a document original, a pixel forming a character outline among pixels constituting a character (in other words, an area other than a character and a character among pixels constituting a character). The color of the pixel in contact with the boundary may become a color due to a color shift at the time of reading. In this case, if it is determined that the color image is a color image if the number of color pixels is equal to or greater than a predetermined ratio, the color image is determined in spite of being a black and white document image due to the large number of pixels determined to be color due to color shift. May be misjudged.
これに対し、ブロックに分割すると、色ずれが生じるのは文字の輪郭を形成している画素のみであるので、一般にブロック全体がカラーになることはなく、そのブロックは一部に色ずれによるカラーの画素が含まれていたとしても全体としては後述する白黒ブロックに分類される。つまり、読み取りの際の色ずれによって生じたカラーの画素は局所的に集中せず画像全体に散らばるので、ブロックに分割すると色によるブロックの分類の際にカラーの画素の影響が排除され、誤判定を低減できる。 On the other hand, when divided into blocks, color misregistration occurs only in the pixels that form the outline of the character. Therefore, the entire block generally does not become color, and the block is partially colored by color misregistration. Even if this pixel is included, it is classified as a black and white block which will be described later as a whole. In other words, color pixels caused by color misregistration at the time of reading are not concentrated locally but scattered throughout the image, so dividing into blocks eliminates the influence of color pixels when classifying blocks by color, and misjudgment Can be reduced.
(4)色によるブロックの分類の概要
図3は、色によるブロックの分類を説明するための模式図である。図示するようにブロックは大きく単色ブロックと多色ブロックとに分類される。
単色ブロックは一色からなるブロックである。単色ブロックの例としては、全体が白一色のブロック、全体が黒一色のブロック、全体が特定のグレー一色のブロック、全体が特定の有彩色一色のブロックなどが挙げられる。
(4) Overview of Block Classification by Color FIG. 3 is a schematic diagram for explaining block classification by color. As shown in the figure, the blocks are roughly classified into single color blocks and multicolor blocks.
A single color block is a block composed of one color. As an example of the single color block, there are a block of white as a whole, a block of black as a whole, a block of specific gray as a whole, a block of specific chromatic color as a whole.
多色ブロックは二以上の色からなるブロックである。多色ブロックの例としては、地色が白で文字が黒の文書画像を構成しているブロックのように白黒二色からなるブロック、モノクロの写真画像を構成しているブロックのように互いに階調の異なる二以上のグレーからなるブロック、カラーの写真画像を構成しているブロックのように二以上の色からなるブロックであってそれら二以上の色のうち少なくとも一色が有彩色であるブロックなどが挙げられる。 A multicolor block is a block composed of two or more colors. Examples of multicolor blocks include blocks that consist of two monochrome colors, such as blocks that make up a document image with white background and black characters, and blocks that make up a monochrome photo image. A block composed of two or more grays having different tones, a block composed of two or more colors such as a block constituting a color photographic image, and a block in which at least one of the two or more colors is a chromatic color Is mentioned.
単色ブロック、及び、多色ブロックは、それぞれ更に無彩色ブロックと有彩色ブロックとに分類される。
無彩色ブロックとは、無彩色の画素からなるブロックであり、有彩色ブロックとは有彩色の画素からなるブロックをいう。ここで無彩色とは白、黒、グレーをいい、有彩色とは白、黒、グレー以外の色をいう。
The single color block and the multicolor block are further classified into an achromatic color block and a chromatic color block, respectively.
An achromatic block is a block composed of achromatic pixels, and a chromatic block is a block composed of chromatic pixels. Here, the achromatic color means white, black, and gray, and the chromatic color means a color other than white, black, and gray.
前述した単色ブロックの例の場合、全体が白一色のブロック、全体が黒一色のブロック、及び、全体が特定のグレー一色のブロックは無彩色ブロックであり、全体が特定の有彩色一色のブロックは有彩色ブロック(本実施形態では「カラーブロック」ともいう)である。
前述した多色ブロックの例の場合、白黒二色からなるブロック、及び、互いに階調の異なる二以上のグレーからなるブロックは無彩色ブロックであり、二以上の色からなるブロックであってそれら二以上の色のうち少なくとも一色が有彩色であるブロックは有彩色ブロック(本実施形態では「カラーブロック」ともいう)である。
In the case of the above-described single color block, the whole block of white color, the whole block of black color, and the whole block of specific gray color are achromatic blocks, and the whole block of specific chromatic color is It is a chromatic color block (also referred to as “color block” in this embodiment).
In the case of the above-described multicolor block, a block composed of two colors of black and white and a block composed of two or more grays having different gradations are achromatic blocks, and a block composed of two or more colors. A block in which at least one of the above colors is a chromatic color is a chromatic color block (also referred to as a “color block” in the present embodiment).
無彩色ブロックの場合は更に白黒ブロックとグレーブロックとに分類される。
前述した単色ブロックの例の場合、全体が白一色のブロック、及び、全体が黒一色のブロックは白黒ブロックであり、全体がほぼ特定のグレー一色のブロックはグレーブロックである。
前述した多色ブロックの例の場合、白黒二色からなるブロックは白黒ブロックであり、互いに階調の異なる二以上のグレーからなるブロックはグレーブロックである。
The achromatic color block is further classified into a black and white block and a gray block.
In the case of the above-described single color block, the entire white block, the entire black block is a black and white block, and the almost specific gray block is a gray block.
In the case of the above-described multicolor block, a block composed of two monochrome colors is a monochrome block, and a block composed of two or more grays having different gradations is a gray block.
画像の種別の場合と同様に、ブロックの分類においても、例えば白黒ブロックの一部に白黒とはいえない部分があっても、人が見た場合に全体として白黒と認識される場合には白黒ブロックであると判定する。単色ブロック、多色ブロック、無彩色ブロック、有彩色ブロック、グレーブロックについても同様である。 As in the case of the image type, in the block classification, for example, even if a part of the black and white block is not black and white, if it is recognized as black and white as a whole when viewed by a person, it is black and white. Judged to be a block. The same applies to a single color block, a multicolor block, an achromatic color block, a chromatic color block, and a gray block.
(5)画像種別判定処理
図4は、画像種別判定処理の流れを示すフローチャートである。本処理は読取モードとして「Auto」が選択され、その場合に原稿がカラーで読み取られて画像が生成されると開始される。
S101では、画像処理回路11aは、生成した画像の色空間をYCbCr色空間に変換する。
(5) Image Type Determination Process FIG. 4 is a flowchart showing the flow of the image type determination process. This process is started when “Auto” is selected as the reading mode, and in this case, the original is read in color and an image is generated.
In S101, the
S102では、画像処理回路11aは図2に示すように画像を格子状に複数のブロックに分割する。ブロックのサイズは適宜に選択可能であるが、本実施形態では縦横32ピクセルのブロックに分割するものとする。
S103では、画像処理回路11aはブロックを一つ選択する。S103の処理が2回目以降である場合は未だ選択していないブロックを選択するものとする。
In S102, the
In S103, the
S104では、画像処理回路11aは選択したブロックを色によって分類するブロック分類処理を実行する。ブロック分類処理の詳細については後述する。
S105では、画像処理回路11aは全てのブロックを選択したか否かを判定し、全てのブロックを選択した場合はS106に進み、未だ選択していないブロックがある場合はS103に戻って処理を繰り返す。
In S104, the
In S105, the
S106では、画像処理回路11aはブロック分類処理によって分類されたブロックの割合に基づいて画像の種別を判定する画像判定処理を実行する。画像判定処理の詳細については後述する。
In S106, the
(5−1)ブロック分類処理
図5は、ブロック分類処理の流れを示すフローチャートである。
S201では、画像処理回路11aはS103で選択したブロックを構成している画素のY成分の値のヒストグラム、Cb成分の値のヒストグラム、及び、Cr成分の値のヒストグラムを作成し、Y成分のヒストグラムから、Y成分の最頻値、及び、当該ブロックにおいてY成分の値が当該最頻値と一致する画素の割合(以下「Y成分の最頻値の割合」という)を求める。
(5-1) Block Classification Processing FIG. 5 is a flowchart showing the flow of block classification processing.
In S201, the
例えば、ブロックを構成している画素の数が仮に10であり、各画素のY成分の値がそれぞれ5、2、6、7、2、4、2、9、5、1であるとすると、2が最も多いので、Y成分の最頻値は2である。そして、Y成分の値が当該最頻値「2」と一致する画素の数は3であるので、Y成分の最頻値の割合は3/10(=30%)となる。
ここで求めたY成分の最頻値は後述するS205及びS302においても用いられる。そのため、画像処理回路11aは求めたY成分の最頻値をRAM10cに記憶する。
For example, if the number of pixels making up the block is 10, and the Y component value of each pixel is 5, 2, 6, 7, 2, 4, 2, 9, 5, 1, respectively, Since 2 is the most, the mode value of the Y component is 2. Since the number of pixels whose Y component value matches the mode value “2” is 3, the ratio of the Y component mode value is 3/10 (= 30%).
The mode value of the Y component obtained here is also used in S205 and S302 described later. Therefore, the
S202では、画像処理回路11aは当該ブロックのY成分の最頻値の割合に基づいて当該ブロックが単色ブロックであるか多色ブロックであるかを判定する。以下、具体的に説明する。
In S202, the
図6は単色ブロックのY成分の値のヒストグラムの一例を示す模式図であって、全体がほぼ白一色のブロックのヒストグラムの一例を示す模式図である。白はY成分の値が255に近いので、全体がほぼ白一色のブロックは図6に示すようにY成分の値のヒストグラムにおいて255近傍にピークができ、ブロック全体の画素数に占めるそのピークの画素数の割合、すなわちY成分の最頻値の割合は90%以上となる。全体がほぼ黒一色のブロック、全体がほぼ特定のグレー一色のブロック、全体がほぼ特定の有彩色一色のブロックについてもピークの位置が異なる点を除いて同様である。 FIG. 6 is a schematic diagram showing an example of the histogram of the Y component value of a single-color block, and is a schematic diagram showing an example of a histogram of an almost white block as a whole. Since the white component value of white is close to 255, a block that is almost white as a whole has a peak in the vicinity of 255 in the histogram of the Y component value as shown in FIG. 6, and this peak occupies the number of pixels of the entire block. The ratio of the number of pixels, that is, the ratio of the mode value of the Y component is 90% or more. The same applies to a block that is substantially black as a whole, a block that is substantially specific to gray, and a block that is substantially specific to chromatic color, except that the peak positions are different.
図7は多色ブロックのY成分の値のヒストグラムの一例を示す模式図であって、カラーブロックのY成分の値のヒストグラムの一例を示す模式図である。カラーブロックは色にばらつきがあるので一般に極端なピークはできず、Y成分の最頻値の割合は90%を超えない。これはモノクロの写真画像を構成しているブロックのように互いに階調の異なる2以上のグレーからなるブロックについても同様である。 FIG. 7 is a schematic diagram illustrating an example of a histogram of Y component values of a multi-color block, and is a schematic diagram illustrating an example of a histogram of Y component values of a color block. Since color blocks vary in color, they generally cannot have an extreme peak, and the ratio of the mode value of the Y component does not exceed 90%. The same applies to blocks composed of two or more grays having different gradations, such as blocks constituting a monochrome photographic image.
図8は多色ブロックのY成分の値のヒストグラムの一例を示す模式図であって、地色が白で文字が黒の文書画像を構成している白黒2色からなるブロックのヒストグラムの一例を示す模式図である。このような文書画像を構成しているブロックはY成分の値のヒストグラムにおいて0近傍及び255近傍にピークができるが、ピークが白と黒とに分散していることにより、Y成分の最頻値の割合は90%を超えない。 FIG. 8 is a schematic diagram showing an example of a histogram of the Y component values of a multicolor block, and an example of a histogram of a black and white block constituting a document image in which the ground color is white and the characters are black. It is a schematic diagram shown. A block constituting such a document image has peaks in the vicinity of 0 and 255 in the histogram of the value of the Y component, but since the peaks are dispersed in white and black, the mode value of the Y component The percentage does not exceed 90%.
そこで、画像処理回路11aはY成分の最頻値の割合が90%以上であれば単色ブロックであると判定し、90%未満であれば多色ブロックであると判定する。
ここで、Y成分の最頻値の割合が90%以上であってもCb、Cr成分が異なれば二以上の色があることになるが、一般にブロックの単位ではY成分の最頻値が90%以上のときにCb、Cr成分が異なることは少なく、経験的にこのような判定で十分であるため、本実施形態では単色ブロックであるか多色ブロックであるかをY成分の値だけで判定する。
なお、単色ブロックであるか多色ブロックであるかを、Cb、Cr成分を考慮して判定してもよい。また、上述した90%は一例であり、何%とするかは適宜に選択可能である。これは本実施形態における他の閾値についても同様である。
画像処理回路11aは、単色ブロックであると判定した場合はS203に進み、多色ブロックであると判定した場合はS208に進む。
Therefore, the
Here, even if the ratio of the mode value of the Y component is 90% or more, if the Cb and Cr components are different, there are two or more colors, but generally the mode value of the Y component is 90 in block units. %, The Cb and Cr components are unlikely to be different, and such determination is empirically sufficient. Therefore, in this embodiment, whether the block is a single color block or a multicolor block is determined only by the Y component value. judge.
Note that whether the block is a single color block or a multicolor block may be determined in consideration of the Cb and Cr components. The above 90% is an example, and what percentage can be selected as appropriate. The same applies to other threshold values in the present embodiment.
If the
以下に説明するS203〜S207の処理は、S202で単色ブロックと判定された場合の処理である。
S203では、画像処理回路11aは当該ブロックが無彩色ブロックであるか有彩色ブロックであるかを判定する。以下、具体的に説明する。
YCbCr色空間では、Cb、Cr成分の値の範囲を0〜255とすると、Cb、Crがそれぞれほぼ中間の値(=127)に近いときに画素の色が無彩色に近くなる。そこで、画像処理回路11aは、以下に示す式1、及び、式2が両方とも満たされていれば無彩色ブロックであると判定し、少なくとも一方が満たされていなければ有彩色ブロックであると判定する。
The processing of S203 to S207 described below is processing when it is determined as a single color block in S202.
In S203, the
In the YCbCr color space, assuming that the range of Cb and Cr component values is 0 to 255, when Cb and Cr are close to intermediate values (= 127), the pixel color is close to an achromatic color. Therefore, the
「120≦Cb≦135を満たす画素割合」≧90% ・・・ 式1
「120≦Cr≦135を満たす画素割合」≧90% ・・・ 式2
画像処理回路11aは、有彩色ブロックであると判定した場合はS204に進み、無彩色ブロックであると判定した場合はS205に進む。
“Pixel ratio satisfying 120 ≦ Cb ≦ 135” ≧ 90% Equation 1
“Pixel ratio satisfying 120 ≦ Cr ≦ 135” ≧ 90% Expression 2
If the
S204では、画像処理回路11aは当該ブロックが単色ブロックにおける有彩色ブロック、すなわちカラーブロックであると決定する。
S205では、画像処理回路11aは当該ブロックが白黒ブロックであるかグレーブロックであるかを判定する。以下、具体的に説明する。
In S204, the
In S205, the
YCbCr色空間では、Y成分の値の範囲を0〜255とすると、Cb、Crがそれぞれほぼ中間の値(=127)に近いとき、Y成分の値が0に近ければ画素の色が黒に近くなり、Y成分の値が255に近ければ画素の色が白に近くなる。そこで、画像処理回路11aは、S201で求めたY成分の最頻値が以下の式3、及び、式4のいずれか一方を持たしていれば白黒ブロックであると判定し、いずれも満たしていない場合はグレーブロックであると判定する。
「Y成分の最頻値」≦50 ・・・ 式3
220≦「Y成分の最頻値」 ・・・ 式4
In the YCbCr color space, assuming that the range of the Y component value is 0 to 255, when Cb and Cr are close to an intermediate value (= 127), if the Y component value is close to 0, the pixel color is black. If the values are close and the value of the Y component is close to 255, the pixel color is close to white. Therefore, the
“Mode of Y component” ≦ 50 Equation 3
220 ≦ “mode of the Y component” Expression 4
このように判定するのは、S205が実行されるのはY成分の最頻値の割合が90%以上であり、そのY成分の最頻値が50以下であるということは全体の90%以上が白であることになり、Y成分の最頻値が220以上であるということは全体の90%以上が黒であることになるので、上述した式のどちらかが満たされればそのブロックは全体が白一色、又は、黒一色であると判定できるからである。ここで、50は第1の閾値の一例であり、220は第2の閾値の一例である。
画像処理回路11aは、白黒ブロックと判定した場合はS206に進み、グレーブロックであると判定した場合はS207に進む。
The reason for this determination is that S205 is executed when the ratio of the mode value of the Y component is 90% or more, and that the mode value of the Y component is 50 or less is 90% or more of the whole. Is white and the mode of the Y component is 220 or more, 90% or more of the whole is black, so if either of the above formulas is satisfied, the block This is because it can be determined that the color is white or black. Here, 50 is an example of a first threshold value, and 220 is an example of a second threshold value.
If the
S206では、画像処理回路11aは当該ブロックが単色ブロックにおける白黒ブロックであると決定する。
S207では、画像処理回路11aは当該ブロックが単色ブロックにおけるグレーブロックであると決定する。
In S206, the
In S207, the
以下に説明するS208〜S213の処理は、S202で多色ブロックと判定された場合の処理である。
S208の処理はS203と同じであるので説明は省略する。
S209では、画像処理回路11aは当該ブロックが多色ブロックにおける有彩色ブロック、すなわちカラーブロックであると決定する。
The processing of S208 to S213 described below is processing when it is determined as a multicolor block in S202.
Since the process of S208 is the same as S203, description is abbreviate | omitted.
In S209, the
S210では、画像処理回路11aは当該ブロックのY成分の値のヒストグラムから以下の式5を満たす画素の数と以下の式6を満たす画素の数とをそれぞれ求める。ここで、50は第3の閾値の一例であり、220は第4の閾値の一例である。以降の説明では式5を満たす画素を白の画素といい、式6を満たす画素を黒の画素という。
Y≦50 ・・・ 式5
220≦Y ・・・ 式6
In S210, the
Y ≦ 50 Equation 5
220 ≦ Y Expression 6
S211では、画像処理回路11aはS210で求めた白の画素の数と黒の画素の数とを合計し、合計した数がブロック全体の画素の数に占める割合、すなわちY成分の値が50以下である画素、及び、220以上である画素の合計割合を求め、求めた合計割合が90%以上であれば白黒ブロックであると判定し、90%未満であればグレーブロックであると判定する。
画像処理回路11aは、白黒ブロックであると判定した場合はS212に進み、グレーブロックであると判定した場合はS213に進む。
In S211, the
If the
S212では、画像処理回路11aは当該ブロックが多色ブロックにおける白黒ブロックであると決定する。
S213では、画像処理回路11aは当該ブロックが多色ブロックにおけるグレーブロックであると決定する。
In S212, the
In S213, the
(5−2)画像判定処理
図9は、画像判定処理の流れを示すフローチャートである。
S301では、画像処理回路11aは画像を構成する全ブロックに占める単色ブロックの割合を求め、求めた割合が90%以上である場合は単色ブロックの割合が一定割合以上である単色画像であるとしてS302に進み、90%未満である場合は単色ブロックの割合が一定割合未満である多色画像であるとしてS305に進む。
(5-2) Image Determination Processing FIG. 9 is a flowchart showing the flow of image determination processing.
In S301, the
ここで、S301において単色ブロックの割合が90%以上であると判定される画像の例としては、無地画像の他、二以上の領域に区切られていて各領域がそれぞれ互いに異なる一色で塗り潰されている画像のように二色以上の色からなる画像であるがブロック単位に見るとほぼ全てのブロックが単色ブロックと判定される画像などが挙げられる。つまり、単色画像は全体が一色で塗り潰された無地画像に限定されず、二以上の色からなる画像であっても単色画像と判定される場合もある。
一方、カラー画像、グレー画像、白黒画像は一般に多色ブロックが多くを占めるので、多くの場合において多色画像と判定される。
Here, as an example of an image in which the ratio of the single color block is determined to be 90% or more in S301, in addition to a plain image, each region is divided into two or more regions and each region is filled with a different color. For example, an image including two or more colors such as an image in which almost all blocks are determined as a single color block when viewed in block units. That is, the monochromatic image is not limited to a solid image that is entirely filled with one color, and even an image composed of two or more colors may be determined as a monochromatic image.
On the other hand, a color image, a gray image, and a black and white image generally occupy a large number of multicolor blocks, and thus are determined to be multicolor images in many cases.
以下に説明するS302〜S303は、単色ブロックの割合が90%以上であると判定された場合に実行される処理である。
S302では、画像処理回路11aは画像を構成しているブロックのうち単色ブロックについて、S201でブロック毎に求めた最頻値についてのヒストグラムを作成し、そのヒストグラムにおける最頻値の割合、言い換えると、全ての単色ブロックの数に対する、最頻値が当該ヒストグラムにおける最頻値と一致するブロックの数の割合を求める。
S302 to S303 described below are processes executed when it is determined that the ratio of the single color block is 90% or more.
In S302, the
S303では、画像処理回路11aはS302で求めた最頻値の割合に基づいて当該画像が無地画像であるか否かを判定する。以下、具体的に説明する。
ブロック毎に求めた最頻値についてのヒストグラムを作成すると、無地画像の場合には各ブロックの最頻値がほぼ同じ値であるので、図6に示すヒストグラムと同様に極端なピークができ、ブロック全体に占めるそのピークのブロックの割合、言い換えると、最頻値が「ブロック毎に求めた最頻値についてのヒストグラムにおける最頻値」と一致するブロックの割合は90%以上となる。
In S303, the
When the histogram for the mode value obtained for each block is created, in the case of a plain image, since the mode value of each block is almost the same value, an extreme peak can be generated as in the histogram shown in FIG. The ratio of the block of the peak in the whole, in other words, the ratio of the block whose mode value coincides with “the mode value in the histogram for the mode value obtained for each block” is 90% or more.
これに対し、二色以上の色からなる画像であるがブロック単位に見るとほぼ全てのブロックが単色ブロックと判定される画像の場合はブロックによって最頻値がばらつくので、ヒストグラムに極端なピークはできない。
そこで、画像処理回路11aは、最頻値が「ブロック毎に求めた最頻値についてのヒストグラムにおける最頻値」と一致するブロックの割合が90%以上であれば無地画像であると判定し、90%未満であれば無地画像ではないと判定する。
画像処理回路11aは、無地画像であると判定した場合はS304に進み、無地画像ではないと判定した場合はS305に進む。
On the other hand, in the case of an image consisting of two or more colors but almost all blocks are determined to be single color blocks when viewed in block units, the mode varies depending on the block, so the extreme peak in the histogram is Can not.
Therefore, the
If the
S304では、画像処理回路11aは画像が無地画像であると決定する。
S305では、画像処理回路11aは画像がカラー画像であるか否かを判定する。具体的には、画像処理回路11aは、先ず画像を構成する全ブロックに占めるカラーブロックの割合を算出する。ここでいうカラーブロックには、単色ブロックにおけるカラーブロックも多色ブロックにおけるカラーブロックも含まれる。そして、画像処理回路11aは算出した割合が90%以上であればカラー画像であると判定し、90%未満であればカラー画像ではないと判定する。
画像処理回路11aは、カラー画像であると判定した場合はS306に進み、カラー画像ではないと判定した場合はS307に進む。
In S304, the
In S305, the
If the
S306では、画像処理回路11aは画像がカラー画像であると決定する。
S307では、画像処理回路11aは画像がグレー画像であるか白黒画像であるかを判定する。具体的には、画像処理回路11aは先ず画像を構成する全ブロックに占めるグレーブロックの割合を算出する。ここでいうグレーブロックには、単色ブロックにおけるグレーブロックも多色ブロックにおけるグレーブロックも含まれる。そして、画像処理回路11aは、算出した割合が90%以上であればグレー画像であると判定し、90%未満であれば白黒画像であると判定する。
画像処理回路11aは、白黒画像であると判定した場合はS308に進み、グレー画像であると判定した場合はS309に進む。
In S306, the
In S307, the
If the
S308では、画像処理回路11aは画像が白黒画像であると決定する。
S309では、画像処理回路11aは画像がグレー画像であると決定する。
In S308, the
In S309, the
(6)実施形態の効果
以下、実施形態1の効果を比較例と比較して説明する。
図10は、比較例としてのブロック分類処理の流れを示すフローチャートである。ここでは図5に示すフローチャートと同一の処理には同一の符号を付して説明を省略する。図10に示すフローチャートでは、S202で単色ブロックであると判定され、S203で無彩色ブロックであると判定された後に、白黒ブロックであるかグレーブロックであるかを判定するとき、図5に示すフローチャートのS205ではなく、S210及びS211を実行することによって判定している。
(6) Effect of Embodiment Hereinafter, the effect of Embodiment 1 will be described in comparison with a comparative example.
FIG. 10 is a flowchart showing the flow of block classification processing as a comparative example. Here, the same processes as those in the flowchart shown in FIG. In the flowchart shown in FIG. 10, when it is determined that the block is a single color block in S202 and the block is an achromatic block in S203, it is determined whether the block is a black and white block or a gray block. The determination is made by executing S210 and S211 instead of S205.
S210及びS211を実行することによって白黒ブロックであるかグレーブロックであるかを判定することはもちろん可能であるが、その場合にはY成分の値のヒストグラムから前述した式5を満たす画素の数と前述した式6を満たす画素の数とをそれぞれ集計しなければならない。 Of course, it is possible to determine whether the block is a black and white block or a gray block by executing S210 and S211. In this case, the number of pixels satisfying Expression 5 described above from the histogram of the Y component value The number of pixels satisfying Equation 6 must be totaled.
これに対し、図5に示すフローチャートによると、S201で求めたY成分の最頻値を用いて判定しているので、S210の処理を実行しなくてよい。S210の処理にはそれなりの時間を要するので、S210の処理を実行しないようにすると処理効率が向上する。
以上のように、複合機1によると、図5に示すフローチャートのS205において白黒ブロックであるかグレーブロックであるかを判定するとき、S201で求められたY成分の最頻値を用いて判定するので、ブロック毎にヒストグラムを用いて白黒ブロック、グレーブロック、有彩色ブロックのいずれであるかを判定する場合に、その判定を効率よく行うことができる。
On the other hand, according to the flowchart shown in FIG. 5, since the determination is made using the mode value of the Y component obtained in S201, the process of S210 need not be executed. Since the process of S210 requires a certain amount of time, the processing efficiency improves if the process of S210 is not executed.
As described above, according to the MFP 1, when determining whether the block is a black and white block or a gray block in S205 of the flowchart shown in FIG. 5, the determination is performed using the mode value of the Y component obtained in S201. Therefore, when determining whether each block is a black-and-white block, a gray block, or a chromatic block using a histogram, the determination can be performed efficiently.
更に、複合機1によると、図9に示す画像判定処理において、画像が無地画像であるか否かの判定(S302,S303)を、画像が白黒画像、グレー画像、カラー画像のいずれであるかの判定(S305〜S309)の前に行うので、判定ステップ数を大幅に低減できる。以下、比較例を用いて具体的に説明する。 Furthermore, according to the multifunction device 1, in the image determination process shown in FIG. 9, it is determined whether the image is a plain image (S302, S303). Whether the image is a monochrome image, a gray image, or a color image. Since this determination is performed before the determination (S305 to S309), the number of determination steps can be greatly reduced. Hereinafter, a specific example will be described using a comparative example.
図11は、比較例としての画像判定処理の流れを示すフローチャートである。詳細な説明は省略するが、図11に示すフローチャートでは画像が無地画像であるか否かの判定の前に、画像が無地画像・カラー画像、無地画像・グレー画像のいずれであるかの判定を行っている。図11に示すような判定の順序も可能ではあるが、一見してわかるように図9に示すフローチャートに比べてステップ数が大幅に増えている。 FIG. 11 is a flowchart illustrating a flow of image determination processing as a comparative example. Although detailed description is omitted, in the flowchart shown in FIG. 11, it is determined whether the image is a plain image / color image or a plain image / gray image before determining whether the image is a plain image. Is going. Although the order of determination as shown in FIG. 11 is possible, the number of steps is significantly increased as compared with the flowchart shown in FIG.
これに対し、複合機1によると、図9に示すように、画像判定処理において画像が無地画像であるか否かを画像が白黒画像、グレー画像、カラー画像のいずれであるかの判定の前に行うので、判定ステップ数を大幅に低減できる。 On the other hand, according to the multifunction device 1, as shown in FIG. 9, it is determined whether or not the image is a plain image in the image determination process before determining whether the image is a monochrome image, a gray image, or a color image. Therefore, the number of determination steps can be greatly reduced.
<他の実施形態>
本発明は上記記述及び図面によって説明した実施形態に限定されるものではなく、例えば次のような実施形態も本発明の技術的範囲に含まれる。
<Other embodiments>
The present invention is not limited to the embodiments described with reference to the above description and drawings. For example, the following embodiments are also included in the technical scope of the present invention.
(1)上記実施形態では画像処理装置として複合機を例に説明したが、画像処理装置は単機能の画像読取装置であってもよいし、印刷対象の画像にその画像の種別に応じた画像処理を施して印刷するプリンタであってもよい。 (1) In the above-described embodiment, the multifunction apparatus is described as an example of the image processing apparatus. However, the image processing apparatus may be a single-function image reading apparatus, or an image corresponding to the type of image to be printed. It may be a printer that performs processing and prints.
また、画像処理装置はパーソナルコンピュータ(PC)や携帯情報端末などであってもよい。
例えば、画像読取装置と通信可能に接続されているPCにおいて、スキャナドライバを実行することにより画像読取装置に原稿の読み取りを指示し、画像読取装置によって生成された画像を取得し、取得した画像にその画像の種別に応じた画像処理を施してもよい。この場合、スキャナドライバは画像処理プログラムの一例である。
The image processing apparatus may be a personal computer (PC), a portable information terminal, or the like.
For example, in a PC that is communicably connected to the image reading apparatus, the scanner driver is executed to instruct the image reading apparatus to read a document, and an image generated by the image reading apparatus is acquired. Image processing according to the type of the image may be performed. In this case, the scanner driver is an example of an image processing program.
あるいは、プリンタと通信可能に接続されているPCにおいて、プリンタドライバを実行することにより印刷対象の画像にその画像の種別に応じた画像処理を施してプリンタに送信してもよい。この場合、プリンタドライバは画像処理プログラムの一例である。 Alternatively, in a PC that is communicably connected to the printer, an image to be printed may be subjected to image processing corresponding to the type of the image by executing a printer driver and transmitted to the printer. In this case, the printer driver is an example of an image processing program.
(2)上記実施形態では画像判定処理として図9に示すフローチャートを用いる場合を例に説明したが、図11に示すフローチャートを用いてもよい。 (2) In the above embodiment, the case where the flowchart shown in FIG. 9 is used as the image determination processing has been described as an example, but the flowchart shown in FIG. 11 may be used.
(3)上記実施形態では画像の種別の判定を画像処理回路11aによって実行する場合を例に説明したが、CPU10aによって実現されてもよいし、CPUとASICとによって実現されてもよい。
(3) Although the case where the image type determination is executed by the
1・・・複合機、10・・・制御部、10a・・・CPU、10b・・・ROM、10c・・・RAM、11・・・読取部、11a・・・画像処理回路、12・・・印刷部、13・・・操作部、14・・・記憶部、15・・・通信インタフェース部、20・・・画像、21・・・ブロック
DESCRIPTION OF SYMBOLS 1 ... Multifunction machine, 10 ... Control part, 10a ... CPU, 10b ... ROM, 10c ... RAM, 11 ... Reading part, 11a ... Image processing circuit, 12 ... Print unit, 13 ... operation unit, 14 ... storage unit, 15 ... communication interface unit, 20 ... image, 21 ... block
Claims (5)
前記ブロック単位最頻値算出部によって求められた前記最頻値の割合に基づいて当該ブロックが単色ブロックであるか多色ブロックであるかを判定する単色/多色ブロック判定部と、
前記単色/多色ブロック判定部によって単色ブロックであると判定されたブロックについて、当該ブロックが無彩色ブロックであるか有彩色ブロックであるかを判定する第1の無彩色/有彩色ブロック判定部と、
前記第1の無彩色/有彩色ブロック判定部によって無彩色ブロックであると判定されたブロックについて、前記ブロック単位最頻値算出部によって求められた前記最頻値が第1の閾値以下であるか又は前記第1の閾値より大きい第2の閾値以上である場合は白黒ブロックと判定し、前記最頻値が前記第1の閾値より大きく前記第2の閾値より小さい場合はグレーブロックであると判定する第1の白黒/グレーブロック判定部と、
を備える画像処理装置。 The image represented in the YCbCr color space is divided into a plurality of blocks, a histogram of the Y component values of the pixels constituting the block is created for each block, and the mode value in the histogram and the mode value A block unit mode value calculation unit for obtaining a ratio;
A single color / multicolor block determination unit that determines whether the block is a single color block or a multicolor block based on the mode value ratio obtained by the block unit mode value calculation unit;
A first achromatic / chromatic block determining unit that determines whether the block is an achromatic block or a chromatic block for the block determined by the single color / multicolor block determining unit; ,
Whether the mode value obtained by the block unit mode value calculation unit is less than or equal to a first threshold for a block that is determined to be an achromatic color block by the first achromatic / chromatic color block determination unit Alternatively, it is determined as a black-and-white block if it is greater than or equal to a second threshold value that is greater than the first threshold value, and is determined to be a gray block if the mode value is greater than the first threshold value and less than the second threshold value. A first black-and-white / gray block determination unit,
An image processing apparatus comprising:
前記単色/多色ブロック判定部によって多色ブロックであると判定されたブロックについて、当該ブロックが無彩色ブロックであるか有彩色ブロックであるかを判定する第2の無彩色/有彩色ブロック判定部と、
前記無彩色/有彩色判定部によって無彩色ブロックであると判定されたブロックについて、前記ブロック単位最頻値算出部によって作成されたヒストグラムにおいてY成分の値が第3の閾値以下である画素、及び、Y成分の値が前記第3の閾値より大きい第4の閾値以上である画素の合計割合を求め、前記合計割合に基づいて当該ブロックが白黒ブロックであるかグレーブロックであるかを判定する第2の白黒/グレーブロック判定部と、
を備える画像処理装置。 The image processing apparatus according to claim 1,
A second achromatic / chromatic color block determination unit that determines whether the block is a multicolor block or not by a single color / multicolor block determination unit. When,
For a block that is determined to be an achromatic color block by the achromatic / chromatic color determination unit, a pixel whose Y component value is equal to or less than a third threshold in the histogram created by the block unit mode value calculation unit, and , Determining a total ratio of pixels having a Y component value equal to or greater than a fourth threshold value greater than the third threshold value, and determining whether the block is a black and white block or a gray block based on the total ratio. 2 black and white / gray block determination units;
An image processing apparatus comprising:
前記画像に占める前記単色ブロックの割合に基づいて、単色ブロックの割合が一定割合以上である単色画像であるか、単色ブロックの割合が一定割合未満である多色画像であるかを判定する単色/多色画像判定部と、
前記単色/多色画像判定部によって単色画像であると判定された場合に、前記ブロック単位最頻値算出部によって前記ブロック毎に求められた前記最頻値のヒストグラムを作成し、そのヒストグラムにおける最頻値の割合を求める画像単位最頻値算出部と、
前記画像単位最頻値算出部によって求められた前記最頻値の割合に基づいて当該画像が無地画像であるか否かを判定する無地画像判定部と、
前記無地画像判定部によって無地画像でないと判定された場合に、前記画像が白黒画像、グレー画像、又は、カラー画像のいずれであるかを前記白黒ブロック、前記グレーブロック、及び、前記有彩色ブロックの割合に基づいて判定する白黒/グレー/カラー画像判定部と、
を備える画像処理装置。 The image processing apparatus according to claim 2,
Based on the ratio of the monochromatic block in the image, it is determined whether the monochromatic image is a monochromatic image in which the ratio of the monochromatic block is equal to or greater than a certain ratio or a multicolor image in which the ratio of the monochromatic block is less than the certain ratio. A multicolor image determination unit;
When the single color / multicolor image determination unit determines that the image is a single color image, the mode unit calculating unit calculates a mode histogram of the mode value obtained for each block. An image unit mode value calculation unit for obtaining a ratio of mode values;
A plain image determination unit that determines whether or not the image is a plain image based on a ratio of the mode value obtained by the image unit mode value calculation unit;
When the plain image determination unit determines that the image is not a plain image, whether the image is a monochrome image, a gray image, or a color image is determined based on the monochrome block, the gray block, and the chromatic color block. A black and white / gray / color image determination unit for determination based on the ratio;
An image processing apparatus comprising:
前記読取部によって生成された画像の色空間をYCbCr色空間に変換する色空間変換部と、
前記色空間変換部によってYCbCr色空間に変換された前記画像を複数のブロックに分割してブロック毎に当該ブロックを構成している画素のY成分の値のヒストグラムを作成し、そのヒストグラムにおける最頻値と当該最頻値の割合とを求めるブロック単位最頻値算出部と、
前記ブロック単位最頻値算出部によって求められた前記最頻値の割合に基づいて当該ブロックが単色ブロックであるか多色ブロックであるかを判定する単色/多色ブロック判定部と、
前記単色/多色ブロック判定部によって単色ブロックであると判定されたブロックについて、当該ブロックが無彩色ブロックであるか有彩色ブロックであるかを判定する第1の無彩色/有彩色ブロック判定部と、
前記第1の無彩色/有彩色ブロック判定部によって無彩色ブロックであると判定されたブロックについて、前記ブロック単位最頻値算出部によって求められた前記最頻値が第1の閾値以下であるか又は前記第1の閾値より大きい第2の閾値以上である場合は白黒ブロックと判定し、前記最頻値が前記第1の閾値より大きく前記第2の閾値より小さい場合はグレーブロックであると判定する第1の白黒/グレーブロック判定部と、
を備える画像読取装置。 A reading unit that reads an original and generates an image;
A color space conversion unit that converts the color space of the image generated by the reading unit into a YCbCr color space;
The image converted into the YCbCr color space by the color space conversion unit is divided into a plurality of blocks, and a histogram of the Y component values of the pixels constituting the block is created for each block. A block unit mode value calculation unit for obtaining a value and a ratio of the mode value;
A single color / multicolor block determination unit that determines whether the block is a single color block or a multicolor block based on the mode value ratio obtained by the block unit mode value calculation unit;
A first achromatic / chromatic block determining unit that determines whether the block is an achromatic block or a chromatic block for the block determined by the single color / multicolor block determining unit; ,
Whether the mode value obtained by the block unit mode value calculation unit is less than or equal to a first threshold for a block that is determined to be an achromatic color block by the first achromatic / chromatic color block determination unit Alternatively, it is determined as a black-and-white block if it is greater than or equal to a second threshold value that is greater than the first threshold value, and is determined to be a gray block if the mode value is greater than the first threshold value and less than the second threshold value. A first black-and-white / gray block determination unit,
An image reading apparatus comprising:
前記ブロック単位最頻値算出処理によって求められた前記最頻値の割合に基づいて当該ブロックが単色ブロックであるか多色ブロックであるかを判定する単色/多色ブロック判定処理と、
前記単色/多色ブロック判定処理によって単色ブロックであると判定されたブロックについて、当該ブロックが無彩色ブロックであるか有彩色ブロックであるかを判定する第1の無彩色/有彩色ブロック判定処理と、
前記第1の無彩色/有彩色ブロック判定処理によって無彩色ブロックであると判定されたブロックについて、前記ブロック単位最頻値算出処理によって求められた前記最頻値が第1の閾値以下であるか又は前記第1の閾値より大きい第2の閾値以上である場合は白黒ブロックと判定し、前記最頻値が前記第1の閾値より大きく前記第2の閾値より小さい場合はグレーブロックであると判定する第1の白黒/グレーブロック判定処理と、
をコンピュータに実行させる画像処理プログラム。
The image represented in the YCbCr color space is divided into a plurality of blocks, a histogram of the Y component values of the pixels constituting the block is created for each block, and the mode value in the histogram and the mode value A block unit mode value calculation process for obtaining a ratio;
A monochrome / multicolor block determination process for determining whether the block is a single color block or a multicolor block based on the mode value ratio obtained by the block unit mode value calculation process;
A first achromatic / chromatic block determination process for determining whether the block is a monochrome block or a chromatic block for the block determined to be a monochrome block by the monochrome / multicolor block determination process; ,
Whether the mode value obtained by the block mode mode value calculation process is less than or equal to a first threshold value for a block that is determined to be an achromatic color block by the first achromatic / chromatic color block determination process Alternatively, it is determined as a black-and-white block if it is greater than or equal to a second threshold value that is greater than the first threshold value, and is determined to be a gray block if the mode value is greater than the first threshold value and less than the second threshold value. First black and white / gray block determination processing,
An image processing program for causing a computer to execute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011189830A JP5799676B2 (en) | 2011-08-31 | 2011-08-31 | Image processing apparatus, image reading apparatus, and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011189830A JP5799676B2 (en) | 2011-08-31 | 2011-08-31 | Image processing apparatus, image reading apparatus, and image processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013051652A true JP2013051652A (en) | 2013-03-14 |
JP5799676B2 JP5799676B2 (en) | 2015-10-28 |
Family
ID=48013350
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011189830A Active JP5799676B2 (en) | 2011-08-31 | 2011-08-31 | Image processing apparatus, image reading apparatus, and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5799676B2 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014192894A (en) * | 2013-03-28 | 2014-10-06 | Brother Ind Ltd | Image processing apparatus and image processing program |
JP2014219718A (en) * | 2013-05-01 | 2014-11-20 | 三菱電機株式会社 | Monitoring image processor |
US10142514B2 (en) | 2015-07-14 | 2018-11-27 | Brother Kogyo Kabushiki Kaisha | Image reading system and image reading device therein |
US10339848B2 (en) | 2015-05-29 | 2019-07-02 | Samsung Display Co., Ltd. | Display apparatus with multiple power modes and electronic system including the same |
JP2020136785A (en) * | 2019-02-14 | 2020-08-31 | ブラザー工業株式会社 | Image processing apparatus, and computer program |
JP2020178171A (en) * | 2019-04-15 | 2020-10-29 | シャープ株式会社 | Image processing apparatus, image processing method, program, recording medium, and image forming apparatus |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06284281A (en) * | 1993-03-25 | 1994-10-07 | Toshiba Corp | Picture processor |
JPH11331626A (en) * | 1998-03-09 | 1999-11-30 | Minolta Co Ltd | Image processor |
JP2006203584A (en) * | 2005-01-20 | 2006-08-03 | Fuji Xerox Co Ltd | Image processor and program |
JP2008271364A (en) * | 2007-04-24 | 2008-11-06 | Murata Mach Ltd | Image processor and image processing method |
-
2011
- 2011-08-31 JP JP2011189830A patent/JP5799676B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06284281A (en) * | 1993-03-25 | 1994-10-07 | Toshiba Corp | Picture processor |
JPH11331626A (en) * | 1998-03-09 | 1999-11-30 | Minolta Co Ltd | Image processor |
JP2006203584A (en) * | 2005-01-20 | 2006-08-03 | Fuji Xerox Co Ltd | Image processor and program |
JP2008271364A (en) * | 2007-04-24 | 2008-11-06 | Murata Mach Ltd | Image processor and image processing method |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014192894A (en) * | 2013-03-28 | 2014-10-06 | Brother Ind Ltd | Image processing apparatus and image processing program |
JP2014219718A (en) * | 2013-05-01 | 2014-11-20 | 三菱電機株式会社 | Monitoring image processor |
US10339848B2 (en) | 2015-05-29 | 2019-07-02 | Samsung Display Co., Ltd. | Display apparatus with multiple power modes and electronic system including the same |
US10964250B2 (en) | 2015-05-29 | 2021-03-30 | Samsung Display Co., Ltd. | Display apparatus with frame masking driving scheme and electronic system including the same |
US11335233B2 (en) | 2015-05-29 | 2022-05-17 | Samsung Display Co., Ltd. | Display apparatus and electronic system including the same |
US10142514B2 (en) | 2015-07-14 | 2018-11-27 | Brother Kogyo Kabushiki Kaisha | Image reading system and image reading device therein |
JP2020136785A (en) * | 2019-02-14 | 2020-08-31 | ブラザー工業株式会社 | Image processing apparatus, and computer program |
JP7205693B2 (en) | 2019-02-14 | 2023-01-17 | ブラザー工業株式会社 | Image processing device and computer program |
JP2020178171A (en) * | 2019-04-15 | 2020-10-29 | シャープ株式会社 | Image processing apparatus, image processing method, program, recording medium, and image forming apparatus |
JP7317557B2 (en) | 2019-04-15 | 2023-07-31 | シャープ株式会社 | IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, PROGRAM, RECORDING MEDIUM, AND IMAGE FORMING APPARATUS |
Also Published As
Publication number | Publication date |
---|---|
JP5799676B2 (en) | 2015-10-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5799676B2 (en) | Image processing apparatus, image reading apparatus, and image processing program | |
US8717648B2 (en) | Image processing apparatus, image processing method, and computer program product | |
EP2234383B1 (en) | Image processing apparatus, control method, and program | |
JP2009100026A (en) | Image processor | |
KR101810285B1 (en) | Image processing apparatus, image processing method, and computer program | |
US8610957B2 (en) | Image processing apparatus, image processing method, and non-transitory computer-readable medium | |
JP4925933B2 (en) | Image processing method and image processing apparatus | |
JP2010028314A (en) | Image processing apparatus, method, and program | |
JP4900175B2 (en) | Image processing apparatus and method, and program | |
JP4555192B2 (en) | Image processing apparatus, image processing method, and program causing computer to execute the method | |
EP2429173B1 (en) | Image forming apparatus, printing control terminal apparatus, and image forming method thereof | |
JP4628984B2 (en) | Image processing device | |
US20140126005A1 (en) | Method for controlling image processing device | |
JP5317931B2 (en) | Printing apparatus, printing apparatus control method, and program | |
US10657428B2 (en) | Image processing unit, image forming apparatus, image processing method, and storage medium | |
JP6292061B2 (en) | Information processing apparatus and program | |
JP2017209961A (en) | Image processing device, and computer program | |
JP5158364B2 (en) | Image processing apparatus, image processing method, and program | |
JP5575306B2 (en) | Printing system, printing system control method, and program | |
JP2012253775A (en) | Image forming device and image forming method | |
JP5005734B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2013115730A (en) | Image processing apparatus, image processing method and program | |
JP2010161755A (en) | Image processing apparatus and method thereof, computer program and storage medium | |
JP2009130811A (en) | Copy system, system program therefor, and computer readable recording medium with the program recorded thereon | |
JP2004266461A (en) | Image processing method and image processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140318 |
|
RD05 | Notification of revocation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7425 Effective date: 20140407 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150129 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150210 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150330 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150507 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150630 |
|
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: 20150728 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150810 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5799676 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |