JP7798520B2 - Image processing device and image processing method - Google Patents
Image processing device and image processing methodInfo
- Publication number
- JP7798520B2 JP7798520B2 JP2021162787A JP2021162787A JP7798520B2 JP 7798520 B2 JP7798520 B2 JP 7798520B2 JP 2021162787 A JP2021162787 A JP 2021162787A JP 2021162787 A JP2021162787 A JP 2021162787A JP 7798520 B2 JP7798520 B2 JP 7798520B2
- Authority
- JP
- Japan
- Prior art keywords
- character
- image
- compression rate
- characters
- rectangles
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Facsimile Image Signal Circuits (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Description
本開示は、画像処理装置等に関する。 This disclosure relates to an image processing device, etc.
従来、複合機(MFP;Multi-Function Peripheral/Printer)等の画像処理装置が広く利用されている。複合機は、原稿を読み取るスキャナを備え、原稿の画像を電子データとして記憶したり、当該電子データを出力したりする機能を備えるものもある。 Image processing devices such as multi-function peripherals (MFPs) have been widely used. Multi-function peripherals include a scanner that reads documents, and some also have the ability to store images of documents as electronic data and output that electronic data.
また、電子データを圧縮する技術も提案されている。例えば、印刷画像を表す印刷データに含まれる最小サイズの文字のフォントサイズとフォントタイプとフォントスタイル(太字等)に基づいて圧縮率を決定し、印刷データに対して、決定された圧縮率に従う非可逆圧縮を行う技術が提案されている(例えば、特許文献1参照)。 Technologies for compressing electronic data have also been proposed. For example, a compression rate is determined based on the font size, font type, and font style (bold, etc.) of the smallest character included in print data representing a print image, and the print data is subjected to lossy compression according to the determined compression rate (see, for example, Patent Document 1).
特許文献1では、画像を印刷する際の文字の品質を重視して圧縮率が判定されている。しかし、画像は、印刷される以外にも、ユーザのストレージに記憶されたり、サーバなどの装置に送信されたりする場合がある。したがって、印刷品質ではなく、圧縮率と文字の品質とのバランスを優先した圧縮率が決定される必要があるという課題がある。このような課題について、特許文献1では考慮されていない。 In Patent Document 1, the compression rate is determined with emphasis on the quality of the text when printing the image. However, in addition to being printed, images may also be stored in the user's storage or transmitted to devices such as a server. Therefore, there is a problem in that the compression rate must be determined by prioritizing the balance between compression rate and text quality, rather than print quality. This problem is not taken into consideration in Patent Document 1.
本開示は上述した課題に鑑み、画像に含まれる文字をサイズに応じて分類して判定した圧縮率で圧縮した画像を出力する画像処理装置等を提供することを目的とする。 In view of the above-mentioned problems, the present disclosure aims to provide an image processing device and the like that classifies characters contained in an image according to their size and outputs the compressed image at a determined compression rate.
上述した課題を解決するために、本開示の画像処理装置は、原稿の画像を入力する入力部と、前記画像を出力するときの圧縮率を判定する圧縮率判定部と、前記画像を前記圧縮率判定部において判定された圧縮率を用いて圧縮した出力画像を出力する出力部と、を備え、前記圧縮率判定部は、前記画像に含まれるそれぞれの文字の文字サイズを取得し、前記文字を文字サイズに応じて、予め定められた文字サイズの範囲のうちの何れかに分類し、分類された前記文字の数に応じて圧縮率を判定することを特徴とする。 To solve the above-mentioned problems, the image processing device disclosed herein comprises an input unit that inputs an image of a document, a compression rate determination unit that determines the compression rate at which the image is output, and an output unit that outputs an output image obtained by compressing the image using the compression rate determined by the compression rate determination unit. The compression rate determination unit obtains the character size of each character included in the image, classifies the characters into one of a predetermined character size range according to the character size, and determines the compression rate according to the number of classified characters.
本開示の制御方法は、画像処理装置の制御方法であって、原稿の画像を入力する入力ステップと、前記画像を出力するときの圧縮率を判定する圧縮率判定ステップと、前記画像を前記圧縮率判定ステップにおいて判定された圧縮率を用いて圧縮した出力画像を出力する出力ステップと、を備え、前記圧縮率判定ステップは、前記画像に含まれるそれぞれの文字の文字サイズを取得し、前記文字を文字サイズに応じて、予め定められた文字サイズの範囲のうちの何れかに分類し、分類された前記文字の数に応じて圧縮率を判定することを特徴とする。 The control method disclosed herein is a control method for an image processing device, and includes an input step of inputting an image of an original document, a compression rate determination step of determining the compression rate at which the image will be output, and an output step of outputting an output image obtained by compressing the image using the compression rate determined in the compression rate determination step. The compression rate determination step is characterized in that it acquires the character size of each character included in the image, classifies the characters into one of a predetermined character size range according to the character size, and determines the compression rate according to the number of classified characters.
本開示によれば、画像に含まれる文字をサイズに応じて分類して判定した圧縮率で圧縮した画像を出力する画像処理装置等を提供することができる。 This disclosure makes it possible to provide an image processing device that classifies characters contained in an image according to their size and outputs the compressed image at a determined compression rate.
以下、図面を参照して、本開示を実施するための一実施形態について説明する。なお、以下の実施形態は、本開示を説明するための一例であり、特許請求の範囲に記載した発明の技術的範囲が、以下の記載に限定されるものではない。 One embodiment for carrying out the present disclosure will be described below with reference to the drawings. Note that the following embodiment is an example for explaining the present disclosure, and the technical scope of the invention described in the claims is not limited to the following description.
[1.第1実施形態]
[1.1 機能構成]
本実施形態の画像形成装置10の機能構成について、図1及び図2を参照して説明する。図1は、画像形成装置10の外観斜視図であり、図2は、画像形成装置10の機能的構成を示すブロック図である。
1. First embodiment
[1.1 Functional configuration]
The functional configuration of an image forming apparatus 10 of this embodiment will be described with reference to Fig. 1 and Fig. 2. Fig. 1 is an external perspective view of the image forming apparatus 10, and Fig. 2 is a block diagram showing the functional configuration of the image forming apparatus 10.
画像形成装置10は、コピー機能、スキャン機能、文書のプリント機能等を有する情報処理装置であり、MFP(Multi-Function Printer/Peripheral、複合機)とも呼ばれる。 The image forming device 10 is an information processing device that has functions such as copying, scanning, and document printing, and is also called an MFP (Multi-Function Printer/Peripheral).
画像形成装置10は、図2に示すように、制御部100と、画像入力部120と、画像形成部130と、表示部140と、操作部150と、記憶部160と、通信部190とを備えて構成される。 As shown in FIG. 2, the image forming device 10 is configured with a control unit 100, an image input unit 120, an image forming unit 130, a display unit 140, an operation unit 150, a memory unit 160, and a communication unit 190.
制御部100は、画像形成装置10の全体を制御するための機能部である。制御部100は、記憶部160に記憶された各種プログラムを読み出して実行することにより各種機能を実現しており、例えば、1又は複数の演算装置(CPU(Central Processing Unit))等により構成される。また、制御部100は、以下に説明する機能のうち、複数の機能を有するSoC(System on a Chip)として構成されてもよい。 The control unit 100 is a functional unit for controlling the entire image forming apparatus 10. The control unit 100 realizes various functions by reading and executing various programs stored in the storage unit 160, and is configured, for example, by one or more arithmetic units (CPUs (Central Processing Units)). The control unit 100 may also be configured as a SoC (System on a Chip) that has multiple functions among those described below.
制御部100は、記憶部160に記憶されたプログラム実行することにより、画像処理部102、出力モード設定部104、原稿特性判定部106、文字矩形抽出部108、文字列抽出部110、解像度推定部112、圧縮率判定部114として機能する。 By executing the programs stored in the memory unit 160, the control unit 100 functions as an image processing unit 102, an output mode setting unit 104, a document characteristic determination unit 106, a character rectangle extraction unit 108, a character string extraction unit 110, a resolution estimation unit 112, and a compression rate determination unit 114.
画像処理部102は、各種画像に関する処理を行う。例えば、画像処理部102は、画像入力部120によって読み取られて入力された原稿の画像(以下、「入力画像」という)に対して、鮮鋭化処理や、階調変換処理を実行する。また、画像処理部102は、画像の解像度を変換したり、画像を圧縮したりする。 The image processing unit 102 performs various image-related processes. For example, the image processing unit 102 performs sharpening and tone conversion processes on the image of the original document read and input by the image input unit 120 (hereinafter referred to as the "input image"). The image processing unit 102 also converts the resolution of the image and compresses the image.
出力モード設定部104は、出力モードを設定する。出力モードは、入力画像に基づいて出力される画像(以下、「出力画像」という)の出力方法を示す。本実施形態では、出力モードとして、以下の5種類のいずれかが設定されることとする。
(1)サイズ優先(通常)
(2)サイズ優先(小さな文字を鮮明にする)
(3)標準(通常)
(4)標準(小さな文字を鮮明にする)
(5)画質優先
The output mode setting unit 104 sets an output mode. The output mode indicates a method for outputting an image (hereinafter referred to as an "output image") based on an input image. In this embodiment, one of the following five types is set as the output mode.
(1) Size priority (normal)
(2) Size priority (make small text clearer)
(3) Standard (normal)
(4) Standard (makes small text clearer)
(5) Image quality priority
「サイズ優先」は、出力画像の圧縮率の高さ(出力画像のファイルサイズが小さいこと)を優先する出力方法であり、出力画像の圧縮率が重視される。「画質優先」は、出力画像の文字品質を重視する出力方式である。「標準」は、出力画像の圧縮率と文字品質とのバランスをとる出力方法である。 "Size Priority" is an output method that prioritizes the high compression rate of the output image (small file size of the output image), and places importance on the compression rate of the output image. "Image Quality Priority" is an output method that prioritizes the quality of the text in the output image. "Standard" is an output method that balances the compression rate of the output image with the quality of the text.
なお、本実施形態では、「サイズ優先」及び「標準」は、さらに、「通常」と「小さな文字を鮮明にする」との2つの種類の出力モードに分かれていることとする。「小さな文字を鮮明にする」に対応する出力モードは、「通常」に対応する出力モードに比べて、後述する解像度推定部112において出力画像の解像度として高い解像度が推定される。なお、以降の説明において、「サイズ優先」との記載は、「サイズ優先(通常)」と「サイズ優先(小さな文字を鮮明にする)」との2つの出力モードに対応する。同様に、「標準」との記載は、「標準(通常)」と「標準(小さな文字を鮮明にする)」との2つの出力モードに対応する。 In this embodiment, "size priority" and "standard" are further divided into two types of output modes: "normal" and "clarify small characters." The output mode corresponding to "clarify small characters" is estimated to have a higher resolution as the output image resolution by the resolution estimation unit 112, which will be described later, compared to the output mode corresponding to "normal." In the following explanation, the term "size priority" corresponds to the two output modes, "size priority (normal)" and "size priority (clarify small characters)." Similarly, the term "standard" corresponds to the two output modes, "standard (normal)" and "standard (clarify small characters)."
原稿特性判定部106は、画像入力部120によって読み取られた原稿特性を判定する。原稿特性とは、その原稿に記載されている内容の特徴や原稿の種類といった、原稿の特性をいう。本実施形態では、原稿特性判定部106によって判定される原稿特性は、以下の3種類の何れかとする。
(1)原稿が、主に文字で構成されていることを示す「文字」
(2)原稿が、文字及び文字以外の要素により構成されていることを示す「文字+写真」
(3)原稿に文字がない又は原稿に文字がほとんど含まれていないことを示す「写真」
The document characteristic determination unit 106 determines the characteristics of the document read by the image input unit 120. The document characteristic refers to the characteristics of the document, such as the characteristics of the content written on the document and the type of document. In this embodiment, the document characteristic determined by the document characteristic determination unit 106 is one of the following three types:
(1) "Text" indicates that the manuscript is primarily composed of text.
(2) "Text + Photo" indicates that the manuscript is composed of text and non-text elements.
(3) A "photo" showing that the manuscript contains no text or very few texts.
原稿特性判定部106は、例えば、入力画像に含まれる画素の画素値に基づき、原稿特性を判定する。この場合、原稿特性判定部106は、入力画像に含まれる画素の濃度のヒストグラムを作成し、当該ヒストグラムから2つのピーク(下地の濃度と文字の濃度)を検出する。原稿特性判定部106は、ピークの階級と当該階級の周囲の階級とによる階級の範囲(ピーク範囲)を設定し、当該ピーク範囲に含まれる画素数の和が所定の閾値TH1未満であれば、原稿特性を「写真」と判定する。一方、原稿特性判定部106は、ピーク範囲に含まれる画素数の和が閾値TH1以上である場合、2つのピーク範囲に挟まれた階級の画素数が、何れも所定の閾値TH2未満であるか否かを判定する。原稿特性判定部106は、2つのピーク範囲に挟まれた階級の画素数が、何れも閾値TH2未満であれば、原稿特性を「文字」と判定し、それ以外の場合は、原稿特性を「文字+写真」と判定する。なお、上述した判定方法は一例であって、原稿特性として「文字」、「文字+写真」、「写真」の何れかに判定する方法であれば、公知の技術を用いることができる。 The document characteristic determination unit 106 determines document characteristics based on, for example, the pixel values of pixels contained in the input image. In this case, the document characteristic determination unit 106 creates a histogram of the densities of the pixels contained in the input image and detects two peaks (background density and character density) from the histogram. The document characteristic determination unit 106 sets a class range (peak range) consisting of the peak class and classes surrounding the peak class, and determines the document characteristic as "photograph" if the sum of the number of pixels contained in the peak range is less than a predetermined threshold TH1. On the other hand, if the sum of the number of pixels contained in the peak range is equal to or greater than threshold TH1, the document characteristic determination unit 106 determines whether the number of pixels in the classes sandwiched between the two peak ranges is both less than a predetermined threshold TH2. If the number of pixels in the classes sandwiched between the two peak ranges are both less than threshold TH2, the document characteristic determination unit 106 determines the document characteristic as "text." Otherwise, the document characteristic determination unit 106 determines the document characteristic as "text + photo." Note that the above-mentioned determination method is just one example, and any known technology can be used as long as it determines whether the document characteristics are "text," "text + photo," or "photo."
文字矩形抽出部108は、入力画像から、文字矩形を抽出する。文字矩形とは、文字を構成するエッジの画素に外接する矩形である。なお、本実施形態では、後述する解像度推定部112及び圧縮率判定部114は、1の文字矩形が、入力画像に含まれる1つの文字に対応するものとして、所定の処理を実行する。 The character rectangle extraction unit 108 extracts character rectangles from the input image. A character rectangle is a rectangle that circumscribes the edge pixels that make up a character. Note that in this embodiment, the resolution estimation unit 112 and compression rate determination unit 114, which will be described later, perform predetermined processing assuming that one character rectangle corresponds to one character included in the input image.
文字矩形抽出部108は、例えば、入力画像に含まれる画素を1つ選択し、当該選択した画素(注目画素)と注目画素に隣接する画素との間での画素値(例えば、濃度)の変化量を算出する。文字矩形抽出部108は、変化量が予め定められた所定の閾値以上である場合、注目画素は急な立ち上がりを示す画素であり、文字を構成するエッジ画素であると判定する。また、文字矩形抽出部108は、注目画素がエッジ画素ではない場合であっても、注目画素の周囲(例えば、注目画素の周囲の8画素)に所定の数(例えば、2以上)のエッジ画素がある場合、当該注目画素をエッジ画素とする膨張処理を実行する。そして、文字矩形抽出部108は、エッジ画素を連結させ、連結されたエッジ画素に外接する矩形を文字矩形として抽出する。なお、上述した抽出方法は一例であって、文字矩形を抽出する方法であれば、公知の技術を用いることができる。 For example, the character rectangle extraction unit 108 selects one pixel included in the input image and calculates the amount of change in pixel value (e.g., density) between the selected pixel (target pixel) and a pixel adjacent to the target pixel. If the amount of change is equal to or greater than a predetermined threshold, the character rectangle extraction unit 108 determines that the target pixel is a pixel that exhibits a steep rise and is an edge pixel that constitutes a character. Furthermore, even if the target pixel is not an edge pixel, if there are a predetermined number (e.g., two or more) of edge pixels surrounding the target pixel (e.g., eight pixels surrounding the target pixel), the character rectangle extraction unit 108 performs an expansion process to treat the target pixel as an edge pixel. The character rectangle extraction unit 108 then connects the edge pixels and extracts a rectangle circumscribing the connected edge pixels as a character rectangle. Note that the above-described extraction method is merely an example, and any known technique for extracting character rectangles can be used.
文字列抽出部110は、文字矩形抽出部108によって抽出された文字矩形に基づき、文字列を構成する領域(文字列領域)を抽出する。例えば、文字列抽出部110は、1の文字矩形を選択し、選択した文字矩形との左右方向の距離が所定の閾値以下である他の文字矩形をグループとして統合することで、文字矩形同士が所定の距離内にある文字矩形(横方向に隣接する文字矩形)をグループにする。また、文字列抽出部110は、文字矩形のグループに外接する矩形領域を、文字列領域として抽出する。 The character string extraction unit 110 extracts regions that make up a character string (character string regions) based on the character rectangles extracted by the character rectangle extraction unit 108. For example, the character string extraction unit 110 selects one character rectangle and groups other character rectangles whose horizontal distance from the selected character rectangle is less than a predetermined threshold, thereby grouping character rectangles that are within a predetermined distance from each other (horizontally adjacent character rectangles). The character string extraction unit 110 also extracts a rectangular region that circumscribes the group of character rectangles as a character string region.
なお、文字列抽出部110は、文字矩形が横方向に一列に並んでいると見做せる領域を文字列領域として検出(抽出)することで、一列単位(行単位)の文字列領域を抽出してもよい。また、文字列抽出部110は、当該文字列領域から句点、読点、カッコ等の記号やスペースを検出し、検出した記号やスペースに基づき行単位の文字列領域を複数の文字列領域(例えば、句点毎、句読点毎、スペース毎の文字列領域)に区切ってもよい。 The character string extraction unit 110 may extract character string areas in units of columns (lines) by detecting (extracting) an area where character rectangles can be considered to be lined up in a horizontal row as a character string area. The character string extraction unit 110 may also detect symbols such as periods, commas, and parentheses, or spaces, from the character string area, and divide the line-by-line character string area into multiple character string areas (for example, character string areas for each period, punctuation, or space) based on the detected symbols and spaces.
解像度推定部112は、入力画像を出力するときの解像度、すなわち、出力画像の解像度を推定する解像度推定処理を実行する。解像度推定処理については後述する。 The resolution estimation unit 112 performs a resolution estimation process to estimate the resolution at which the input image will be output, i.e., the resolution of the output image. The resolution estimation process will be described later.
圧縮率判定部114は、入力画像を出力するときの圧縮率、すなわち、出力画像の圧縮率を判定する圧縮率判定処理を実行する。圧縮率判定処理については後述する。 The compression rate determination unit 114 performs a compression rate determination process to determine the compression rate when outputting the input image, i.e., the compression rate of the output image. The compression rate determination process is described below.
画像入力部120は、画像をデジタルデータ(画像データ)として画像形成装置10に入力する。例えば、画像入力部120は、原稿の画像を読み取って画像データを生成することが可能なスキャナ装置等により構成される。スキャナ装置は、例えば、CCD(Charge Coupled Device)やCIS(Contact Image Sensor)等のイメージセンサによって画像を電気信号に変換し、電気信号を量子化及び符号化することでデジタルデータを生成する。 The image input unit 120 inputs an image as digital data (image data) to the image forming apparatus 10. For example, the image input unit 120 is configured as a scanner device capable of reading an image of a document and generating image data. The scanner device converts the image into an electrical signal using an image sensor such as a CCD (Charge Coupled Device) or CIS (Contact Image Sensor), and then generates digital data by quantizing and encoding the electrical signal.
画像形成部130は、記録用紙等の記録媒体に対して画像を形成(印刷)する。画像形成部130は、例えば、電子写真方式を利用したレーザプリンタ等の印刷装置により構成される。画像形成部130は、例えば、図1の給紙トレイ132から記録用紙を給紙し、記録用紙の表面に画像を形成し、記録用紙を排紙トレイ134から排紙する。 The image forming unit 130 forms (prints) an image on a recording medium such as recording paper. The image forming unit 130 is configured, for example, by a printing device such as a laser printer that uses electrophotography. The image forming unit 130 feeds recording paper from the paper feed tray 132 in FIG. 1, forms an image on the surface of the recording paper, and ejects the recording paper from the paper ejection tray 134, for example.
表示部140は、各種情報を表示する。表示部140は、例えば、LCD(Liquid crystal display)、有機EL(electro-luminescence)ディスプレイ、マイクロLED(Light Emitting Diode)ディスプレイ等の表示装置により構成される。 The display unit 140 displays various types of information. The display unit 140 is composed of a display device such as an LCD (Liquid Crystal Display), an organic EL (Electro-Luminescence) display, or a micro LED (Light Emitting Diode) display.
操作部150は、画像形成装置10を使用するユーザによる操作指示を受け付ける。操作部150は、キースイッチ(ハードキー)や、接触(タッチ)による入力を検出するタッチセンサといった入力装置により構成されている。タッチセンサにおいて入力を検出する方式は、例えば、抵抗膜方式、赤外線方式、電磁誘導方式、静電容量方式といった、一般的な検出方式であればよい。なお、画像形成装置10には、表示部140と、操作部150とが一体に形成されたタッチパネルが搭載されてもよい。 The operation unit 150 accepts operation instructions from the user of the image forming apparatus 10. The operation unit 150 is composed of input devices such as key switches (hard keys) and touch sensors that detect input by contact (touch). The touch sensor may use any common detection method to detect input, such as a resistive film method, an infrared method, an electromagnetic induction method, or a capacitance method. The image forming apparatus 10 may also be equipped with a touch panel in which the display unit 140 and the operation unit 150 are integrally formed.
記憶部160は、画像形成装置10の動作に必要な各種プログラムや、各種データを記憶する。記憶部160は、例えば、半導体メモリであるSSD(Solid State Drive)や、HDD(Hard Disk Drive)等の記憶装置により構成される。 The storage unit 160 stores various programs and data necessary for the operation of the image forming device 10. The storage unit 160 is configured, for example, by a storage device such as a semiconductor memory such as an SSD (Solid State Drive) or an HDD (Hard Disk Drive).
記憶部160は、記憶領域として、文字矩形情報記憶領域162と文字列領域情報記憶領域164とを確保し、さらに、解像度対応テーブル166と文字矩形数比率テーブル168と積算範囲テーブル170とを記憶する。 The memory unit 160 secures a character rectangle information memory area 162 and a character string area information memory area 164 as memory areas, and further stores a resolution correspondence table 166, a character rectangle number ratio table 168, and an accumulation range table 170.
文字矩形情報記憶領域162は、文字矩形の情報(文字矩形情報)を記憶する。文字矩形情報は、例えば、図3に示すように、文字矩形を識別する文字矩形ID(例えば、「1」)と、当該文字矩形の左上の座標を示すsx(例えば、「100」)及びsy(例えば、「10」)と、当該文字矩形の右下の座標を示すex(例えば、「130」)及びey(例えば、「40」)と、文字サイズ(例えば、「12」)と、当該文字矩形が属する文字列領域を識別する文字列領域ID(例えば、「1」)とを含む。 The character rectangle information storage area 162 stores information about character rectangles (character rectangle information). For example, as shown in FIG. 3, the character rectangle information includes a character rectangle ID (e.g., "1") that identifies the character rectangle, sx (e.g., "100") and sy (e.g., "10") that indicate the coordinates of the upper left corner of the character rectangle, ex (e.g., "130") and ey (e.g., "40") that indicate the coordinates of the lower right corner of the character rectangle, a character size (e.g., "12"), and a character string area ID (e.g., "1") that identifies the character string area to which the character rectangle belongs.
座標は、例えば、入力画像の左上隅の画素を原点(0,0)とし、原点から注目している画素までに含まれる横方向の画素数をx、縦方向の画素数をyとした場合に、(x,y)と表現したものをいう。図3の例では、文字矩形IDが「1」の文字矩形は、左上の座標が(100,10)、右下の座標が(130,40)である矩形状の領域である。 For example, coordinates are expressed as (x, y), where the pixel in the upper left corner of the input image is the origin (0, 0), x is the number of horizontal pixels between the origin and the pixel of interest, and y is the number of vertical pixels. In the example in Figure 3, the character rectangle with a character rectangle ID of "1" is a rectangular area with coordinates of (100, 10) at the top left and (130, 40) at the bottom right.
また、文字サイズは、文字矩形の領域内の画素によって構成される文字の大きさである。本実施形態では、文字サイズは、ポイント(pt)で表す。 Function size is the size of the character composed of pixels within the character rectangle. In this embodiment, the character size is expressed in points (pt).
文字列領域情報記憶領域164は、文字列領域の情報(文字列領域情報)を記憶する。文字列領域情報には、例えば、図4に示すように、文字列領域を識別する文字列領域ID(例えば、「1」)と、当該文字列領域の左上の座標を示すsx(例えば、「100」)及びsy(例えば、「10」)と、当該文字列領域の右下の座標を示すex(例えば、「400」)及びey(例えば、「40」)と、文字列サイズ(例えば、「12」)とを含む。 The string area information storage area 164 stores information about string areas (string area information). For example, as shown in FIG. 4, the string area information includes a string area ID (e.g., "1") that identifies the string area, sx (e.g., "100") and sy (e.g., "10") that indicate the coordinates of the upper left corner of the string area, ex (e.g., "400") and ey (e.g., "40") that indicate the coordinates of the lower right corner of the string area, and the string size (e.g., "12").
文字列サイズとは、文字列領域の高さをポイント単位で示した値である。図4の例では、文字列領域IDが「1」の文字列領域は、文字列サイズが12で、左上の座標が(100,10)、右下の座標が(400,40)である矩形状の領域である。 The string size is a value that indicates the height of the string area in points. In the example in Figure 4, the string area with a string area ID of "1" is a rectangular area with a string size of 12, upper left coordinates (100, 10), and lower right coordinates (400, 40).
解像度対応テーブル166は、文字サイズと、当該文字サイズの文字を含む画像を出力する場合における画像の解像度とを対応させたテーブルである。解像度対応テーブル166は、例えば、図5に示すように、文字サイズと解像度の値(単位は、dpi(dots per inch))とが出力モード毎に設定される。本実施形態では、解像度の値は、300dpi、200dpi、150dpiのいずれかであるとする。解像度対応テーブル166は、予め記憶される。 The resolution correspondence table 166 is a table that associates character sizes with the image resolutions when an image containing characters of that character size is output. For example, as shown in FIG. 5, the resolution correspondence table 166 sets character sizes and resolution values (in units of dpi (dots per inch)) for each output mode. In this embodiment, the resolution value is set to 300 dpi, 200 dpi, or 150 dpi. The resolution correspondence table 166 is stored in advance.
文字矩形数比率テーブル168は、文字矩形の数の比率の閾値(文字矩形比率)を示すテーブルである。文字矩形比率は、解像度推定処理に用いる値であり、出力モード毎に予め記憶される。例えば、文字矩形数比率テーブル168は、図6に示すように、出力モードが「サイズ優先」及び「標準」であれば「0.5」、出力モードが「画質優先」であれば「0.3」といった値が記憶される。 The character rectangle count ratio table 168 is a table that shows the threshold value for the ratio of the number of character rectangles (character rectangle ratio). The character rectangle ratio is a value used in the resolution estimation process and is stored in advance for each output mode. For example, as shown in FIG. 6, the character rectangle count ratio table 168 stores a value such as "0.5" if the output mode is "size priority" or "standard," and "0.3" if the output mode is "image quality priority."
積算範囲テーブル170は、入力画像に含まれる文字を文字サイズに応じて分類する場合における文字サイズの範囲(積算範囲)及び当該範囲に対応する圧縮率を示したテーブルである。本実施形態では、文字サイズの範囲及び当該範囲に対応する圧縮率は、出力画像の解像度毎、出力モード毎、原稿特性毎に定められていることとする。また、積算範囲テーブル170は、予め記憶される。 The accumulation range table 170 is a table that shows the range of character sizes (accumulation ranges) and the compression rates corresponding to those ranges when classifying characters contained in an input image according to character size. In this embodiment, the character size ranges and the compression rates corresponding to those ranges are determined for each output image resolution, output mode, and document characteristics. The accumulation range table 170 is also stored in advance.
本実施形態では、圧縮率として「中」「中高」「高」の何れかであり、「中」「中高」「高」の順に高い圧縮率であるとする。一般的に、圧縮率「中」で圧縮した画像のサイズは、圧縮率「中高」で圧縮した画像のサイズよりも大きく、圧縮率「中高」で圧縮した画像のサイズは、入力画像を圧縮率「高」で圧縮した画像のサイズよりも大きい。 In this embodiment, the compression rate is either "medium," "medium-high," or "high," with "medium," "medium-high," and "high" representing increasing compression rates. Generally, the size of an image compressed at a "medium" compression rate is larger than the size of an image compressed at a "medium-high" compression rate, and the size of an image compressed at a "medium-high" compression rate is larger than the size of an image compressed from an input image at a "high" compression rate.
積算範囲テーブル170は、図7に示すように、出力画像の解像度、原稿特性、出力モードに応じて、テーブルとして記憶される。図7(a)は、原稿特性が「文字+写真」又は「文字」であり、出力画像の解像度が300dpiである場合のテーブルである。同様にして、図7(b)は、原稿特性が「文字+写真」又は「文字」であり、出力画像の解像度が200dpiである場合のテーブル、図7(c)は、原稿特性が「文字+写真」又は「文字」であり、出力画像の解像度が150dpiである場合のテーブルである。また、図7(d)は、原稿特性が「写真」であり、出力画像の解像度が100dpiである場合のテーブルである。なお、原稿特性が「写真」である場合、後述する画像形成装置10の処理において、出力画像の解像度として、100dpiが設定される。 As shown in FIG. 7, the accumulation range table 170 is stored as a table according to the resolution of the output image, the document characteristics, and the output mode. FIG. 7(a) is a table when the document characteristics are "text + photo" or "text" and the output image resolution is 300 dpi. Similarly, FIG. 7(b) is a table when the document characteristics are "text + photo" or "text" and the output image resolution is 200 dpi, and FIG. 7(c) is a table when the document characteristics are "text + photo" or "text" and the output image resolution is 150 dpi. FIG. 7(d) is a table when the document characteristics are "photo" and the output image resolution is 100 dpi. Note that when the document characteristics are "photo," 100 dpi is set as the output image resolution in the processing of the image forming device 10, which will be described later.
例えば、図7(b)のD100は、原稿特性が「文字+写真」又は「文字」であり、出力画像の解像度が200dpiであり、出力モードが「標準」である場合における、文字サイズの範囲及び当該範囲に対応する圧縮率を示している。D100では、文字サイズが3ポイント以上10ポイント以下の範囲が、圧縮率「中」に対応する積算範囲であることを示す。同様にして、文字サイズが11ポイント以上17ポイント以下の範囲が、圧縮率「中高」に対応する積算範囲であることを示し、文字サイズが18ポイント以上の範囲が、圧縮率「高」に対応する範囲であることを示す。 For example, D100 in Figure 7(b) shows the range of character sizes and the compression rates corresponding to that range when the document characteristics are "text + photo" or "text," the output image resolution is 200 dpi, and the output mode is "standard." D100 indicates that the range of character sizes from 3 points to 10 points corresponds to an integrated range corresponding to a "medium" compression rate. Similarly, the range of character sizes from 11 points to 17 points corresponds to an integrated range corresponding to a "medium-high" compression rate, and the range of character sizes of 18 points or greater corresponds to a "high" compression rate.
通信部190は、外部の装置と通信を行う。通信部190は、例えば、有線/無線LAN(Local Area Network)で利用されるNIC(Network Interface Card)等の通信装置や通信モジュールにより構成される。 The communication unit 190 communicates with external devices. The communication unit 190 is composed of a communication device or communication module, such as a network interface card (NIC) used in a wired or wireless local area network (LAN).
[1.2 処理の流れ]
本実施形態の画像形成装置10が実行する処理の流れについて図8から図10を参照して説明する。図8から図10に示した処理は、記憶部160に記憶されたプログラムを読み出した制御部100によって実行される。
[1.2 Processing flow]
The flow of processing executed by the image forming apparatus 10 of this embodiment will be described with reference to Fig. 8 to Fig. 10. The processing shown in Fig. 8 to Fig. 10 is executed by the control unit 100 that reads out a program stored in the storage unit 160.
[1.2.1 メイン処理]
図8を参照して、画像形成装置10が実行する主な処理(メイン処理)について説明する。図8に示した処理は、例えば、ユーザによってスキャン機能の使用が選択されたときに実行される。はじめに、制御部100は、画像入力部120を介して、原稿を読み取らせることで、当該原稿の画像を入力画像として入力する(ステップS100)。
[1.2.1 Main Processing]
The main process executed by the image forming apparatus 10 will be described with reference to Fig. 8. The process shown in Fig. 8 is executed, for example, when a user selects to use the scan function. First, the control unit 100 reads an original document via the image input unit 120, thereby inputting an image of the original document as an input image (step S100).
つづいて、制御部100(出力モード設定部104)は、出力モードが自動設定であるか否かを判定する(ステップS102)。例えば、出力モード設定部104は、出力モードを設定する画面を表示部140に表示し、ユーザによって特定の出力モードが選択されている場合、出力モードが自動設定ではないと判定する。一方、出力モード設定部104は、ユーザによって特定の出力モードが選択されていなかったり、出力モードを自動設定とるすことが選択されていたりする場合は、出力モードが自動設定であると判定する。 Next, the control unit 100 (output mode setting unit 104) determines whether the output mode is automatically set (step S102). For example, the output mode setting unit 104 displays a screen for setting the output mode on the display unit 140, and if a specific output mode is selected by the user, it determines that the output mode is not automatically set. On the other hand, if the user has not selected a specific output mode or has selected to automatically set the output mode, the output mode setting unit 104 determines that the output mode is automatically set.
制御部100(出力モード設定部104)は、出力モードが自動設定である場合、出力モードを自動で設定する(ステップS102;Yes→ステップS104)。例えば、出力モード設定部104は、出力モードとして「標準(通常)」を設定する。なお、出力モード設定部104は、出力画像の出力方法に応じて、出力モードを設定してもよい。例えば、出力モード設定部104は、出力画像をメールに添付して送信することで他の装置に出力する場合は出力モードを「サイズ優先(通常)」とし、出力モードをUSBメモリ等の外部記憶媒体に記憶することで出力する場合は出力モードを「画質優先」としてもよい。また、出力モード設定部104は、出力画像を外部のサーバに記憶させることで出力する場合は、出力モードを「標準(通常)」としてもよい。 When the output mode is set to automatic, the control unit 100 (output mode setting unit 104) automatically sets the output mode (step S102; Yes → step S104). For example, the output mode setting unit 104 sets "standard (normal)" as the output mode. The output mode setting unit 104 may also set the output mode depending on the output method of the output image. For example, the output mode setting unit 104 may set the output mode to "size priority (normal)" when the output image is output to another device by attaching it to an email and sending it, and may set the output mode to "image quality priority" when the output image is output by storing it in an external storage medium such as a USB memory. The output mode setting unit 104 may also set the output mode to "standard (normal)" when the output image is output by storing it in an external server.
一方、制御部100(出力モード設定部104)は、出力モードが自動設定ではない場合、ユーザによる選択に応じて、出力モードを設定する(ステップS102;No→ステップS106)。 On the other hand, if the output mode is not automatically set, the control unit 100 (output mode setting unit 104) sets the output mode in accordance with the user's selection (step S102; No → step S106).
つづいて、制御部100は、ステップS100において入力された原稿の原稿特性を原稿特性判定部106に判定させ、原稿特性の判定結果が「文字」又は「文字+写真」であるか否かを判定する(ステップS108)。 Next, the control unit 100 causes the document characteristic determination unit 106 to determine the document characteristics of the document input in step S100, and determines whether the document characteristic determination result is "text" or "text + photo" (step S108).
制御部100(解像度推定部112)は、原稿特性が「文字」又は「文字+写真」である場合、解像度推定処理を実行し、出力画像の解像度を設定する(ステップS108;Yes→ステップS110)。また、制御部100(圧縮率判定部114)は、圧縮率判定処理を実行し、出力画像の圧縮率を設定する(ステップS112)。解像度推定処理及び圧縮率判定処理については後述する。 If the document characteristic is "text" or "text + photo," the control unit 100 (resolution estimation unit 112) performs a resolution estimation process and sets the resolution of the output image (step S108; Yes → step S110). Furthermore, the control unit 100 (compression rate determination unit 114) performs a compression rate determination process and sets the compression rate of the output image (step S112). The resolution estimation process and compression rate determination process will be described later.
一方、制御部100は、原稿特性が「写真」である場合は、出力画像の解像度を、所定の解像度(例えば、100dpi)に設定する(ステップS108;No→ステップS114)。また、制御部100は、出力モードに応じた圧縮率を積算範囲テーブル170から取得し、当該取得した圧縮率を出力画像の圧縮率に設定する(ステップS116)。 On the other hand, if the document characteristic is "photo," the control unit 100 sets the resolution of the output image to a predetermined resolution (e.g., 100 dpi) (step S108; No → step S114). The control unit 100 also obtains the compression rate corresponding to the output mode from the integration range table 170, and sets the obtained compression rate as the compression rate of the output image (step S116).
つづいて、制御部100は、入力画像の解像度をステップS110又はステップS114において設定した解像度に変換し、当該変換後の画像をステップS112又はステップS116において設定した圧縮率に応じて圧縮した画像(出力画像)を取得する(ステップS118)。 Next, the control unit 100 converts the resolution of the input image to the resolution set in step S110 or step S114, and obtains an image (output image) obtained by compressing the converted image according to the compression ratio set in step S112 or step S116 (step S118).
例えば、制御部100は、画像処理部102に入力画像の画像データと、解像度と、圧縮率を入力する。この場合、画像処理部102は、入力画像の解像度を、入力された解像度に変換し、変換後の入力画像をJPEG(Joint Photographic Experts Group)フォーマットの画像データ(画像ファイル)に変換する。このとき、画像処理部102は、JPEGフォーマットの画像ファイルに変換するときにおける圧縮率として、設定された圧縮率に対応する値を指定する。このようにして、画像処理部102は入力画像をJPEG形式の画像データに変換する。制御部100は、画像処理部102によって変換されたJPEG形式の画像データを、出力画像の画像データとして取得する。 For example, the control unit 100 inputs the image data, resolution, and compression rate of the input image to the image processing unit 102. In this case, the image processing unit 102 converts the resolution of the input image to the input resolution and converts the converted input image into image data (image file) in JPEG (Joint Photographic Experts Group) format. At this time, the image processing unit 102 specifies a value corresponding to the set compression rate as the compression rate when converting into a JPEG format image file. In this way, the image processing unit 102 converts the input image into JPEG format image data. The control unit 100 acquires the JPEG format image data converted by the image processing unit 102 as image data for the output image.
つづいて、制御部100は、ステップS118において取得した出力画像を出力する(ステップS120)。例えば、制御部100は、出力画像を電子メールに添付して送信したり、出力画像を記憶部160の所定の領域に記憶したり、出力画像をユーザによって市指定されたサーバや外部記憶装置に記憶したりすることで出力する。出力方法は、例えば、ユーザによって予め選択されてもよい。 The control unit 100 then outputs the output image acquired in step S118 (step S120). For example, the control unit 100 outputs the output image by attaching it to an email and sending it, by storing the output image in a specified area of the storage unit 160, or by storing the output image in a server or external storage device designated by the user. The output method may be selected in advance by the user, for example.
[1.2.2 解像度推定処理]
つづいて、図9を参照して、解像度推定処理について説明する。解像度推定処理は、解像度推定部112によって実行される。
[1.2.2 Resolution Estimation Process]
Next, the resolution estimation process will be described with reference to Fig. 9. The resolution estimation process is performed by the resolution estimation unit 112.
はじめに、解像度推定部112は、入力画像から文字矩形及び文字列を抽出する(ステップS140)。例えば、解像度推定部112は、文字矩形抽出部108を介して入力画像から文字矩形を抽出し、文字列抽出部110を介して文字列(文字列領域)を抽出する。さらに、解像度推定部112は、以下の処理を実行することで、文字矩形情報及び文字列領域情報を記憶する。 First, the resolution estimation unit 112 extracts character rectangles and character strings from the input image (step S140). For example, the resolution estimation unit 112 extracts character rectangles from the input image via the character rectangle extraction unit 108, and extracts character strings (character string areas) via the character string extraction unit 110. Furthermore, the resolution estimation unit 112 stores character rectangle information and character string area information by performing the following processing:
(1)解像度推定部112は、1の文字列領域を選択し、当該文字列領域を識別する文字列領域IDを発行する。解像度推定部112は、発行した文字列領域IDと、選択した文字列領域の左上の座標(sx,sy)及び右下の座標(ex,ey)とを含む文字列領域情報を、文字列領域情報記憶領域164に記憶する。解像度推定部112は、上述した処理を、抽出された文字列領域を全て選択するまで繰り返す。 (1) The resolution estimation unit 112 selects one character string area and issues a character string area ID that identifies that character string area. The resolution estimation unit 112 stores the issued character string area ID and character string area information, including the coordinates (sx, sy) of the upper left corner and the coordinates (ex, ey) of the lower right corner of the selected character string area, in the character string area information storage area 164. The resolution estimation unit 112 repeats the above-described process until all extracted character string areas have been selected.
(2)解像度推定部112は、1の文字矩形を選択し、当該文字矩形を識別する文字矩形IDを発行する。つづいて、解像度推定部112は、選択した文字矩形が含まれる文字列領域を検索する。つづいて、解像度推定部112は、発行した文字列領域IDと、選択した文字矩形の左上の座標(sx,sy)及び右下の座標(ex,ey)と、検索した文字列領域に対応する文字列領域IDとを含む文字矩形情報を文字矩形情報記憶領域162に記憶する。解像度推定部112は、上述した処理を、抽出された文字矩形を全て選択するまで繰り返す。 (2) The resolution estimation unit 112 selects one character rectangle and issues a character rectangle ID that identifies the character rectangle. Next, the resolution estimation unit 112 searches for a character string area that includes the selected character rectangle. Next, the resolution estimation unit 112 stores character rectangle information in the character rectangle information storage area 162, including the issued character string area ID, the upper left coordinates (sx, sy) and lower right coordinates (ex, ey) of the selected character rectangle, and the character string area ID corresponding to the searched character string area. The resolution estimation unit 112 repeats the above process until all extracted character rectangles have been selected.
なお、解像度推定部112は、選択した文字矩形を含む文字列が見つからなかった場合は、当該文字矩形に対応する文字列領域の文字列領域IDを空やNULLといった値とする。文字列領域IDが空やNULLである文字矩形情報は、有効な文字列領域IDが含まれておらず、特定の文字列に属さない文字(例えば、表中の文字)に対応する文字矩形情報であることを示す。 If the resolution estimation unit 112 cannot find a string containing the selected character rectangle, it sets the string area ID of the string area corresponding to the character rectangle to a value such as empty or NULL. Character rectangle information with an empty or NULL string area ID does not contain a valid string area ID, indicating that the character rectangle information corresponds to a character that does not belong to a specific string (for example, a character in a table).
つづいて、解像度推定部112は、文字矩形毎に、文字矩形サイズを抽出し、文字サイズを算出する(ステップS142)。例えば、解像度推定部112は、文字矩形情報記憶領域162から、有効な文字列領域IDを含んでいない文字矩形情報を1件ずつ読み出し、読み出した文字矩形情報に対応する文字矩形の高さ又は幅のうち長い方の長さを抽出する。例えば、解像度推定部112は、読み出した文字矩形情報に基づき、eyからsyを引いた値と、exからsxを引いた値とのうち、大きい値(画素数)を取得し、当該画素数の値をポイント単位の値(文字サイズ)に変換する。なお、解像度推定部112は、画素数に対応するポイント単位の値を、原稿を読み取ったときの解像度を用いて取得した画素数の値に応じて算出すればよい。なお、解像度推定部112は、読み出した文字矩形情報に文字サイズを記憶する。 Next, the resolution estimation unit 112 extracts the character rectangle size for each character rectangle and calculates the character size (step S142). For example, the resolution estimation unit 112 reads out, one by one, character rectangle information that does not include a valid character string area ID from the character rectangle information storage area 162, and extracts the longer of the height or width of the character rectangle corresponding to the read character rectangle information. For example, based on the read character rectangle information, the resolution estimation unit 112 obtains the larger value (number of pixels) between the value obtained by subtracting sy from ey and the value obtained by subtracting sx from ex, and converts the value of the number of pixels into a value in points (character size). The resolution estimation unit 112 may calculate the value in points corresponding to the number of pixels according to the value of the number of pixels obtained using the resolution used when the document was read. The resolution estimation unit 112 stores the character size in the read character rectangle information.
つづいて、解像度推定部112は、文字矩形サイズを、対応する文字サイズ毎にカウントする(ステップS144)。このようにして、解像度推定部112は、原稿に記載された文字であって、特定の文字列に属さない文字を、文字サイズ毎に集計する。 Next, the resolution estimation unit 112 counts the character rectangle size for each corresponding character size (step S144). In this way, the resolution estimation unit 112 tallies characters written in the document that do not belong to a specific character string, by character size.
つづいて、解像度推定部112は、文字列毎に、文字列サイズを抽出する(ステップS146)。例えば、解像度推定部112は、文字列領域情報記憶領域164から、文字列領域情報を1件ずつ読み出して、文字列領域の高さ(eyからsyを引いた値(画素数))をポイント単位の値に変換する。さらに、解像度推定部112は、ポイント単位の値を、読み出した文字列領域情報の文字列サイズとして記憶する。 Next, the resolution estimation unit 112 extracts the character string size for each character string (step S146). For example, the resolution estimation unit 112 reads out each piece of character string area information from the character string area information storage area 164, and converts the height of the character string area (the value (number of pixels) obtained by subtracting sy from ey) into a value in points. The resolution estimation unit 112 then stores the value in points as the character string size of the read character string area information.
つづいて、解像度推定部112は、文字列領域内の文字矩形サイズを、対応する文字サイズ毎にカウントする(ステップS148)。例えば、解像度推定部112は、文字矩形情報記憶領域162から、有効な文字列領域IDを含む文字矩形情報を1件ずつ読み出し、読み出した文字矩形情報に含まれる文字列領域IDに対応する文字列領域情報に含まれる文字列サイズを取得する。解像度推定部112は、取得した文字列サイズを、読み出した文字矩形情報に文字サイズとして記憶するとともに、当該記憶した文字サイズを文字サイズ毎にカウント(集計)する。このようにして、解像度推定部112は、原稿に記載された文字であって、特定の文字列に属する文字の文字サイズを、当該文字列の高さを基準とした文字サイズとする。また、解像度推定部112は、文字列内の文字の文字サイズを、当該文字列の高さを基準として集計することができる。なお、解像度推定部112は、ステップS144における集計結果と、ステップS148における集計結果とを足し合わせることで、原稿に含まれる全ての文字に対する文字サイズ毎の集計結果を得られる。 Next, the resolution estimation unit 112 counts the character rectangle sizes within the character string area for each corresponding character size (step S148). For example, the resolution estimation unit 112 reads out character rectangle information containing valid character string area IDs one by one from the character rectangle information storage area 162, and obtains the character string size included in the character string area information corresponding to the character string area ID included in the read character rectangle information. The resolution estimation unit 112 stores the obtained character string size as the character size in the read character rectangle information, and counts (aggregates) the stored character sizes for each character size. In this way, the resolution estimation unit 112 determines the character size of characters written in the document that belong to a specific character string as a character size based on the height of the character string. The resolution estimation unit 112 can also aggregate the character sizes of characters within a character string based on the height of the character string. The resolution estimation unit 112 adds up the aggregation results from step S144 and step S148 to obtain aggregation results for each character size for all characters included in the document.
つづいて、解像度推定部112は、文字サイズ毎に集計された文字矩形の数(文字数)の比率に応じて、出力画像の解像度を推定する(ステップS150)。例えば、解像度推定部112は、以下の処理を実行する。 Next, the resolution estimation unit 112 estimates the resolution of the output image based on the ratio of the number of character rectangles (number of characters) tallied for each character size (step S150). For example, the resolution estimation unit 112 performs the following process:
(1)解像度推定部112は、文字矩形数比率テーブル168を参照して、出力モードに対応する文字矩形比率を取得する。
(2)解像度推定部112は、ステップS148において得た集計結果から、1以上の文字矩形(文字)を含む最小文字サイズを取得する。また、解像度推定部112は、最小文字サイズを、対象文字サイズとする。
(3)解像度推定部112は、最小文字サイズから対象文字サイズまでの何れかの文字サイズにカウントされた文字矩形の数(文字数)の合計値を算出する。
(4)解像度推定部112は、全ての文字矩形の数(文字数)に対して、(2)において算出した合計値が占める割合(比率)を算出する。
(5)解像度推定部112は、(4)において算出した比率が文字矩形比率を超える場合、解像度対応テーブル166を参照して、対象文字サイズに対応する解像度であって、出力モードに対応する解像度を出力画像に適した解像度として推定する。一方、解像度推定部112は、(4)において算出した比率が文字矩形数比率を超えない場合、対象文字サイズを1ポイント大きくして、(3)から繰り返す。
上述した処理により、解像度推定部112は、各文字サイズの文字矩形や文字列内の文字矩形のカウント数を小さい文字サイズから順に加算し、加算した文字矩形のカウント数の比率が文字矩形数比率を超えた段階の解像度を、出力画像の解像度として推定する。
(1) The resolution estimation unit 112 refers to the character rectangle number ratio table 168 and acquires the character rectangle ratio corresponding to the output mode.
(2) The resolution estimation unit 112 obtains the minimum character size that includes one or more character rectangles (characters) from the counting result obtained in step S148. The resolution estimation unit 112 also sets the minimum character size as the target character size.
(3) The resolution estimation unit 112 calculates the total number of character rectangles (number of characters) counted for any character size from the minimum character size to the target character size.
(4) The resolution estimation unit 112 calculates the ratio (proportion) of the total value calculated in (2) to the number of all character rectangles (number of characters).
(5) If the ratio calculated in (4) exceeds the character rectangle ratio, the resolution estimation unit 112 refers to the resolution correspondence table 166 and estimates the resolution that corresponds to the target character size and the output mode as the resolution suitable for the output image. On the other hand, if the ratio calculated in (4) does not exceed the character rectangle number ratio, the resolution estimation unit 112 increases the target character size by one point and repeats from (3).
By the above-described processing, the resolution estimation unit 112 adds up the counts of character rectangles of each character size and character rectangles within a string of characters, starting from the smallest character size, and estimates the resolution at the stage where the ratio of the added character rectangle counts exceeds the character rectangle count ratio as the resolution of the output image.
つづいて、解像度推定部112は、ステップS150において推定した解像度を、出力画像の解像度として設定する(ステップS152)。 Next, the resolution estimation unit 112 sets the resolution estimated in step S150 as the resolution of the output image (step S152).
[1.2.3 圧縮率判定処理]
つづいて、図10を参照して、圧縮率判定処理について説明する。圧縮率判定処理は、圧縮率判定部114によって実行される。
[1.2.3 Compression ratio determination process]
Next, the compression rate determination process will be described with reference to Fig. 10. The compression rate determination process is executed by the compression rate determination unit 114.
はじめに、圧縮率判定部114は、解像度推定処理によって推定された解像度と、出力モードとに対応する積算範囲を、積算範囲テーブル170を参照することで設定する(ステップS170)。 First, the compression rate determination unit 114 sets the integration range corresponding to the resolution estimated by the resolution estimation process and the output mode by referencing the integration range table 170 (step S170).
つづいて、圧縮率判定部114は、所定の文字列に含まれる文字矩形の情報を取得する(ステップS172)。例えば、圧縮率判定部114は、文字矩形情報記憶領域162から、有効な文字列領域IDを含む文字矩形情報を取得する。 Next, the compression rate determination unit 114 obtains information about character rectangles contained in the specified character string (step S172). For example, the compression rate determination unit 114 obtains character rectangle information containing valid character string area IDs from the character rectangle information storage area 162.
つづいて、圧縮率判定部114は、文字矩形を、文字サイズ毎にカウント(集計)する(ステップS174)。ここで、有効な文字列領域IDを含む文字矩形情報には、当該文字列領域IDによって識別される文字列の文字列サイズが文字サイズとして含まれる。そのため、圧縮率判定部114は、文字列の高さに対応した文字サイズを基準として、文字矩形の数(文字数)をカウントすることができる。 Next, the compression rate determination unit 114 counts (aggregates) the character rectangles by character size (step S174). Here, character rectangle information containing a valid character string area ID includes the character size of the character string identified by that character string area ID as the character size. Therefore, the compression rate determination unit 114 can count the number of character rectangles (number of characters) based on the character size corresponding to the height of the character string.
つづいて、圧縮率判定部114は、積算範囲毎に、文字矩形の数(文字数)を積算する(ステップS176)。これにより、圧縮率判定部114は、文字矩形の情報を用いることで、入力画像に含まれるそれぞれの文字を、文字サイズに応じて積算範囲の何れかに分類し、分類された文字数(文字矩形の数)を取得することができる。 Next, the compression rate determination unit 114 accumulates the number of character rectangles (number of characters) for each accumulation range (step S176). By using the character rectangle information, the compression rate determination unit 114 can thereby classify each character included in the input image into one of the accumulation ranges according to the character size and obtain the number of classified characters (number of character rectangles).
つづいて、圧縮率判定部114は、積算範囲毎の文字矩形の数(文字数)を比較して、最も文字矩形の数(文字数)が多い積算範囲に対応する圧縮率を、出力画像の圧縮率とする。このとき、圧縮率判定部114は、積算後の文字矩形のカウント数(文字数)に対して重み付けを行う(ステップS178)。 Next, the compression rate determination unit 114 compares the number of character rectangles (number of characters) for each integration range, and determines the compression rate corresponding to the integration range with the largest number of character rectangles (number of characters) as the compression rate for the output image. At this time, the compression rate determination unit 114 weights the count number (number of characters) of character rectangles after integration (step S178).
例えば、圧縮率判定部114は、圧縮率「中」に対応する積算範囲における積算後の文字矩形のカウント数に対して2.0を掛ける。同様にして、圧縮率判定部114は、圧縮率「中高」に対応する積算範囲における積算後の文字矩形のカウント数に対して1.5を掛け、圧縮率「高」に対応する積算範囲における積算後の文字矩形のカウント数に対して1.0を掛ける。なお、積算後の文字矩形のカウント数に対して乗じる値は、予め定められていてもよいし、ユーザにより設定されてもよい。 For example, the compression rate determination unit 114 multiplies the number of character rectangles counted after integration in the integration range corresponding to a "medium" compression rate by 2.0. Similarly, the compression rate determination unit 114 multiplies the number of character rectangles counted after integration in the integration range corresponding to a "medium-high" compression rate by 1.5, and multiplies the number of character rectangles counted after integration in the integration range corresponding to a "high" compression rate by 1.0. Note that the value by which the number of character rectangles counted after integration is multiplied may be predetermined or may be set by the user.
つづいて、圧縮率判定部114は、ステップS178において重み付けを行った後のカウント数の値を比較して、カウント数が最大の積算範囲を特定する(ステップS180)。さらに、圧縮率判定部114は、ステップS180において特定した積算範囲に対応する圧縮率を、出力画像に対する圧縮率として設定する(ステップS182)。 Next, the compression rate determination unit 114 compares the count values after weighting in step S178 to identify the accumulation range with the largest count (step S180). Furthermore, the compression rate determination unit 114 sets the compression rate corresponding to the accumulation range identified in step S180 as the compression rate for the output image (step S182).
なお、圧縮率判定部114は、値が最大の積算範囲が複数ある場合、当該複数の積算範囲に対応するそれぞれの圧縮率のうち、高画質側の圧縮率を出力画像に対する圧縮率として設定する。例えば、圧縮率判定部114は、値が最大の積算範囲に対応する圧縮率が「中」と「高」である場合、高画質側の圧縮率である「中」を出力画像に対する圧縮率として設定する。 Note that, if there are multiple integration ranges with the maximum value, the compression rate determination unit 114 sets the compression rate on the higher image quality side of the compression rates corresponding to those multiple integration ranges as the compression rate for the output image. For example, if the compression rates corresponding to the integration ranges with the maximum value are "medium" and "high," the compression rate determination unit 114 sets the compression rate on the higher image quality side, "medium," as the compression rate for the output image.
なお、圧縮率判定部114は、ステップS178における重み付けの処理を省略してもよい。この場合、圧縮率判定部114は、文字矩形の数(文字数)が最も多く分類された積算範囲に対応する圧縮率を、出力画像に対する圧縮率として設定する。 The compression rate determination unit 114 may omit the weighting process in step S178. In this case, the compression rate determination unit 114 sets the compression rate for the output image to the compression rate corresponding to the accumulation range into which the largest number of character rectangles (number of characters) is classified.
上述した処理により、圧縮率判定部114は、読み取られた原稿の画像に含まれる文字を、文字の大きさである文字サイズに基づき、所定の積算範囲(例えば、3段階の大きさ)に分類し、当該分類された文字数を比較して、圧縮率を判定することができる。これにより、圧縮率判定部114は、小さいサイズの文字が多い場合は圧縮率を「中」に、中程度のサイズの文字が多い場合は圧縮率を「中高」に、大きい文字が多い場合は圧縮率を「大」とすることができる。 Through the above-described processing, the compression rate determination unit 114 can classify the characters contained in the scanned document image into a predetermined cumulative range (for example, three levels of size) based on the character size, and compare the number of characters in this classification to determine the compression rate. As a result, the compression rate determination unit 114 can set the compression rate to "medium" if there are many small-sized characters, "medium-high" if there are many medium-sized characters, and "high" if there are many large characters.
また、積算範囲毎の文字数を比較する際、圧縮率判定部114は、圧縮率が小さい積算範囲(文字サイズが小さい範囲)ほど大きい重み付けをすることで、文字サイズが小さい文字の数ほど、圧縮率の判定において重視することができる。 In addition, when comparing the number of characters for each accumulation range, the compression rate determination unit 114 assigns a higher weight to accumulation ranges with smaller compression rates (ranges with smaller character sizes), thereby allowing the number of characters with smaller character sizes to be given more importance in determining the compression rate.
[1.3 動作例]
図11を参照して、本実施形態の画像形成装置10の動作の概要を説明する。はじめに、画像形成装置10は、出力モードを設定する(図11の(1))。画像形成装置10は、原稿特性が「写真」である場合(図11の(2))、出力画像の解像度を所定の解像度(例えば、100dpi)に設定し(図11の(3))、出力画像の圧縮率を出力モードに応じて判定する(図11の(4))。
[1.3 Operation example]
An overview of the operation of the image forming apparatus 10 of this embodiment will be described with reference to Fig. 11. First, the image forming apparatus 10 sets the output mode ((1) in Fig. 11). If the document characteristic is "photograph" ((2) in Fig. 11), the image forming apparatus 10 sets the resolution of the output image to a predetermined resolution (e.g., 100 dpi) ((3) in Fig. 11), and determines the compression rate of the output image according to the output mode ((4) in Fig. 11).
一方、画像形成装置10は、原稿特性が「文字」又は「文字+写真」である場合(図11の(5))、入力画像に含まれる文字の文字サイズと出力モードとから出力画像の解像度を推定する(図11の(6))。また、画像形成装置10は、推定された解像度と出力モードとに対応する積算範囲(積算範囲の閾値)に基づき、入力画像に含まれる文字を文字毎に文字サイズに応じて積算範囲の何れかに分類する。なお、積算範囲の閾値とは、各積算範囲のうち、最も小さい文字サイズの値である。そして、画像形成装置10は、分類した文字数に応じて出力画像の圧縮率を判定する(図11の(7))。 On the other hand, when the document characteristics are "text" or "text + photo" ((5) in Figure 11), the image forming device 10 estimates the resolution of the output image from the character size of the characters included in the input image and the output mode ((6) in Figure 11). Furthermore, based on the integration range (threshold value of the integration range) corresponding to the estimated resolution and output mode, the image forming device 10 classifies each character included in the input image into one of the integration ranges according to its character size. The threshold value of the integration range is the smallest character size value within each integration range. The image forming device 10 then determines the compression rate of the output image according to the number of classified characters ((7) in Figure 11).
なお、画像形成装置10は、出力モードが「サイズ優先(通常)」である場合に比べ、出力モードが「サイズ優先(小さな文字を鮮明にする)」の方が、推定される解像度を高くしてもよい。例えば、解像度対応テーブル166として図5に示したテーブルを用いることで、画像形成装置10は、出力モードが「サイズ優先(小さな文字を鮮明にする)」である場合、文字サイズが小さい文字数の比率が高いときに、出力画像の解像度として300dpiを推定することができる。一方、出力モードが「サイズ優先(通常)」である場合、出力画像の解像度として300dpiが推定されることがない。これは、出力モードが「標準(通常)」と「標準(小さな文字を鮮明にする)」との場合であっても同様である。これにより、出力モードが「サイズ優先(小さな文字を鮮明にする)」や「標準(小さな文字を鮮明にする)」である場合、文字サイズが小さい文字の比率が高い原稿の画像が入力されたとき、画像形成装置10は、出力画像の解像度として高い解像度を推定する。この結果、画像形成装置10は、文字サイズが小さい文字の比率が高い原稿の出力画像を、解像度が高い出力画像とすることができ、出力画像において小さい文字が潰れてしまうことを回避する。 Note that the image forming device 10 may estimate a higher resolution when the output mode is "Size Priority (Clear Small Characters)" than when the output mode is "Size Priority (Normal)." For example, by using the table shown in FIG. 5 as the resolution correspondence table 166, the image forming device 10 can estimate 300 dpi as the resolution of the output image when the output mode is "Size Priority (Clear Small Characters)" and the proportion of small characters is high. On the other hand, when the output mode is "Size Priority (Normal)," 300 dpi is not estimated as the resolution of the output image. This is the same for the output modes "Standard (Normal)" and "Standard (Clear Small Characters)." As a result, when the output mode is "Size Priority (Clear Small Characters)" or "Standard (Clear Small Characters)," and an image of a document with a high proportion of small characters is input, the image forming device 10 estimates a higher resolution as the resolution of the output image. As a result, the image forming device 10 can output a high-resolution image from an original document with a high proportion of small characters, preventing small characters from being blurred in the output image.
つづいて、図12を参照して、解像度推定処理の動作について説明する。図12は、300dpi相当文字列内文字矩形数と、200dpi相当文字列内文字矩形数と、150dpi相当文字列内文字矩形数を示したグラフである。300dpi相当文字列内文字矩形数とは、文字列内の文字矩形のうち、当該文字矩形に対応する文字を出力するときの解像度として300dpiが設定された文字矩形の数である。200dpi相当文字列内文字矩形数及び150dpi相当文字列内文字矩形数も同様である。図12は、文字列に含まれる文字矩形の数(文字数)の合計が100であり、そのうち、300dpi相当文字列内文字矩形数が35、200dpi相当文字列内文字矩形数が10、150dpi相当文字列内文字矩形数が55あることを示す。 Next, the operation of the resolution estimation process will be explained with reference to Figure 12. Figure 12 is a graph showing the number of character rectangles in a string equivalent to 300 dpi, the number of character rectangles in a string equivalent to 200 dpi, and the number of character rectangles in a string equivalent to 150 dpi. The number of character rectangles in a string equivalent to 300 dpi is the number of character rectangles in a string for which 300 dpi is set as the resolution for outputting the character corresponding to that character rectangle. The same is true for the number of character rectangles in a string equivalent to 200 dpi and the number of character rectangles in a string equivalent to 150 dpi. Figure 12 shows that the total number of character rectangles (number of characters) contained in a string is 100, of which the number of character rectangles in a string equivalent to 300 dpi is 35, the number of character rectangles in a string equivalent to 200 dpi is 10, and the number of character rectangles in a string equivalent to 150 dpi is 55.
ここで、文字矩形数比率が0.5であるとする。画像形成装置10は、文字サイズが小さい方から文字矩形のカウント数を順に加算し、比率を求める。ここで、300dpi相当文字列内文字矩形数(小さな文字の数)の比率は0.35であり、0.5を超えない。したがって、画像形成装置10は、出力画像の解像度として300dpiを推定しない。また、200dpi相当文字列内文字矩形数(中程度のサイズの文字の数)が加算されても、加算後の文字の比率は0.45であり、0.5を超えない。したがって、画像形成装置10は、出力画像の解像度として200dpiを推定しない。150dpi相当文字列内文字矩形数(大きな文字の数)が加算された場合、加算後の文字の比率は1.0であり、0.5を超える。したがって、画像形成装置10は、出力画像の解像度として150dpiを推定する。 Here, let's assume the character rectangle count ratio is 0.5. The image forming device 10 calculates the ratio by adding the counts of character rectangles in ascending order of character size. Here, the ratio of the number of character rectangles (number of small characters) within a string equivalent to 300 dpi is 0.35, which does not exceed 0.5. Therefore, the image forming device 10 does not estimate 300 dpi as the resolution of the output image. Furthermore, even if the number of character rectangles (number of medium-sized characters) within a string equivalent to 200 dpi is added, the character ratio after the addition is 0.45, which does not exceed 0.5. Therefore, the image forming device 10 does not estimate 200 dpi as the resolution of the output image. When the number of character rectangles (number of large characters) within a string equivalent to 150 dpi is added, the character ratio after the addition is 1.0, which exceeds 0.5. Therefore, the image forming device 10 estimates 150 dpi as the resolution of the output image.
なお、画像形成装置10は、推定可能な解像度である150dpi、200dpi、300dpiのうち、最も小さい解像度である150dpiを推定した場合は、他の解像度で出力されるべき文字(文字矩形)の数に応じて、解像度を推定し直してもよい。例えば、以下の2つの条件を両方満たす場合、画像形成装置10は、出力画像の解像度として200dpiを推定する。
(1)300dpi相当文字列内文字矩形数と200dpi相当文字列内文字矩形数との合計の比率が0.3以上(文字矩形数比率の60%に対応)
(2)300dpi相当文字列内文字矩形数と200dpi相当文字列内文字矩形数との合計に対する300dpi相当文字列内文字矩形数の比率が0.6以上
図12の例では、(1)における比率は0.45であり、(2)における比率は0.78(=0.35/0.45)である。したがって、図12の例では、(1)及び(2)を満たすので、画像形成装置10は、出力画像の解像度を200dpiと推定し直す。
Note that, when the image forming apparatus 10 estimates 150 dpi, which is the smallest resolution among the possible resolutions of 150 dpi, 200 dpi, and 300 dpi, it may re-estimate the resolution depending on the number of characters (character rectangles) to be output at other resolutions. For example, when both of the following two conditions are met, the image forming apparatus 10 estimates 200 dpi as the resolution of the output image.
(1) The ratio of the total number of character rectangles in a string equivalent to 300 dpi to the total number of character rectangles in a string equivalent to 200 dpi is 0.3 or more (corresponding to 60% of the character rectangle ratio)
(2) The ratio of the number of character rectangles in a string equivalent to 300 dpi to the sum of the number of character rectangles in a string equivalent to 300 dpi and the number of character rectangles in a string equivalent to 200 dpi is 0.6 or more. In the example of Fig. 12, the ratio in (1) is 0.45, and the ratio in (2) is 0.78 (= 0.35/0.45). Therefore, in the example of Fig. 12, both (1) and (2) are satisfied, and therefore the image forming apparatus 10 re-estimates the resolution of the output image to 200 dpi.
上述の処理が実行されることで、大きな文字が多い原稿の画像が入力された場合であって、小さな文字も比較的多く存在するとき、画像形成装置10は、出力画像の解像度として、高い解像度を推定することができる。なお、解像度を推定し直す方法は上述した方法以外の方法が用いられてもよい。 By performing the above-described process, when an image of a document containing many large characters is input and there are also a relatively large number of small characters, the image forming device 10 can estimate a high resolution as the resolution of the output image. Note that methods other than the above-described method may also be used to re-estimate the resolution.
つづいて、図13を参照して、画像に含まれる文字を分類する動作について説明する。図13(a)は、一点鎖線で示した文字列E110に、点線で示した5の文字矩形(C110、C111、C112、C113、C114)が含まれていることを示す図である。5つの文字矩形はそれぞれ高さが異なるが、画像形成装置10は、文字列内の文字矩形に対する文字サイズとして、当該文字列の高さから算出した文字列サイズを用いることで、当該5つの文字矩形の文字サイズを全て同じ文字サイズとする。 Next, with reference to Figure 13, the operation of classifying characters contained in an image will be described. Figure 13(a) is a diagram showing that a character string E110, indicated by a dashed line, contains five character rectangles (C110, C111, C112, C113, C114), indicated by dotted lines. Although the five character rectangles each have a different height, the image forming device 10 uses the character string size calculated from the height of the character string as the character size for the character rectangles within the character string, thereby making the character size of all five character rectangles the same.
図13(b)は、文字サイズ毎に、文字矩形(文字)をカウントした結果を示した図である。図13(b)において、(1)は圧縮率「中」に対応する積算範囲を、(2)は圧縮率「中高」に対応する積算範囲を、(3)は圧縮率「高」に対応する積算範囲を示す。本実施形態の画像形成装置10は、積算範囲毎に、文字矩形の数(文字数)を積算して、積算範囲毎のカウント数を比較する。図13(b)の例では、(1)の積算範囲に含まれる文字数が最も多い。したがって、画像形成装置10は、出力画像に対する圧縮率として「中」を判定する。 Figure 13(b) shows the results of counting character rectangles (characters) for each character size. In Figure 13(b), (1) indicates the accumulation range corresponding to a "medium" compression rate, (2) indicates the accumulation range corresponding to a "medium-high" compression rate, and (3) indicates the accumulation range corresponding to a "high" compression rate. The image forming device 10 of this embodiment accumulates the number of character rectangles (number of characters) for each accumulation range and compares the counts for each accumulation range. In the example of Figure 13(b), the accumulation range in (1) contains the largest number of characters. Therefore, the image forming device 10 determines the compression rate for the output image to be "medium."
つづいて、図14から図16を参照して、積算範囲を調整する方法について説明する。積算範囲は、画像形成装置10の開発者等が、所定のフォントで所定の文字サイズの文字が所定の数印刷された原稿(例えば、白い背景に黒文字が記載された原稿)を読み取った画像(入力画像)に対して、以下の2つの手順を行うことにより調整する。
(手順1)画像形成装置10の開発者等は、基準となる解像度(例えば、200dpi)に変換され、各圧縮率で圧縮された入力画像(確認用画像)の画質を目視により確認し、視認性に応じて、積算範囲の閾値を決定する。
(手順2)画像形成装置10の開発者等は、入力画像に対して、プログラムを用いて文字サイズを検出させ、検出された文字サイズに基づき、積算範囲を調整する。
Next, a method for adjusting the integration range will be described with reference to Figures 14 to 16. The integration range is adjusted by a developer of the image forming apparatus 10 or the like by carrying out the following two procedures for an image (input image) obtained by scanning an original document on which a predetermined number of characters of a predetermined character size are printed in a predetermined font (for example, an original document with black characters on a white background).
(Step 1) The developer of the image forming device 10 visually checks the image quality of the input image (confirmation image) that has been converted to a standard resolution (e.g., 200 dpi) and compressed at each compression rate, and determines the threshold value of the accumulation range based on visibility.
(Step 2) The developer of the image forming apparatus 10 uses a program to detect the character size of the input image, and adjusts the integration range based on the detected character size.
はじめに、(手順1)について説明する。図14は、確認用画像に対して、視認性が充分確保できている場合は「○」を、視認性が確保できていない場合は「×」を記入した表である。このような視認性の確認は、画像形成装置10の開発者等が、予めフォント毎(例えば、明朝体、ゴシック体、ローマン体等)に、目視により行う。 First, we will explain (Step 1). Figure 14 is a table in which "O" indicates that sufficient visibility is ensured for the confirmation image, and "X" indicates that visibility is not ensured. This visibility check is performed visually in advance by the developer of the image forming device 10 for each font (e.g., Mincho, Gothic, Roman, etc.).
例えば、図14は、明朝体の文字に対する視認性の確認の結果を示す表の例である。図14のE120は、10ポイントの明朝体の文字を含む画像を圧縮率「中高」で圧縮した場合、当該画像に含まれる文字の視認性が確保できていないことを示す。また、図14のE121は、12ポイントの明朝体の文字を含む画像を圧縮率「中高」で圧縮した場合、当該画像に含まれる文字の視認性が確保できていることを示す。このように、同じフォント、同じ圧縮率であっても、文字サイズにより画質差が生じる。図14の例では、11ポイントが圧縮率「中高」に対応する積算範囲の閾値として決定され(図14の(1))、17ポイントが圧縮率「高」に対応する積算範囲の閾値として決定されたことを示す(図14の(2))。 For example, Figure 14 is an example table showing the results of checking the visibility of characters in Mincho font. E120 in Figure 14 shows that when an image containing 10-point Mincho font characters is compressed at a "medium-high" compression rate, the visibility of the characters in the image is not ensured. E121 in Figure 14 also shows that when an image containing 12-point Mincho font characters is compressed at a "medium-high" compression rate, the visibility of the characters in the image is ensured. As such, even with the same font and compression rate, image quality differs depending on the character size. In the example in Figure 14, 11 points are determined as the threshold for the integration range corresponding to the "medium-high" compression rate ((1) in Figure 14), and 17 points are determined as the threshold for the integration range corresponding to the "high" compression rate ((2) in Figure 14).
なお、同じ圧縮率、同じ文字サイズであっても、ゴシック体と明朝体とでは視認性に差が出る場合がある。そのため、フォント毎に視認性の確認がされる。そして、画像形成装置10の開発者等は、フォント毎に決定した積算範囲の閾値を総合的に考慮して、圧縮率「中高」に対する積算範囲の閾値と圧縮率「高」に対する積算範囲の閾値とを決定する。 Note that even with the same compression rate and character size, there may be differences in visibility between Gothic and Mincho fonts. For this reason, visibility is checked for each font. Developers of the image forming device 10 then comprehensively consider the threshold values for the integration range determined for each font and determine the threshold values for the integration range for a "medium-high" compression rate and a "high" compression rate.
次に、(手順2)について説明する。画像形成装置10は、文字列に含まれる文字の文字サイズは、その文字列の高さ(文字列サイズ)に応じた文字サイズとする。しかし、異なる文字列に含まれる文字の文字サイズが、実際には同じ文字サイズであるのにも関わらず、プログラム上では異なるサイズとして検出(算出)される場合がある。これは、以下の文字特性(文字の特徴)による。
(i)文字の種類(英字や日本字等)により、実際の文字サイズと、算出される文字サイズとに差があること。
(ii)文字列内の文字の種類や組み合わせにより文字列の高さが変動すること。
上記2つの文字特性について、図15を参照して詳述する。なお、図15に記載された文字は、全て同じ文字サイズ(例えば、16ポイント)であるとする。
Next, we will explain (Step 2). The image forming apparatus 10 sets the character size of characters included in a string to correspond to the height (string size) of the string. However, there are cases where characters included in different strings are detected (calculated) as different sizes in the program, even though they are actually the same size. This is due to the following character characteristics (character features).
(i) Depending on the type of character (English characters, Japanese characters, etc.), there is a difference between the actual character size and the calculated character size.
(ii) The height of the string varies depending on the type and combination of characters in the string.
The above two character characteristics will be described in detail with reference to Fig. 15. It is assumed that all the characters shown in Fig. 15 are the same character size (for example, 16 points).
原因の(i)について説明する。図15の(a)及び(b)は、英字を含む文字列の例である。英字は、アセンダラインからディセンダラインまでの長さが、実際の文字サイズに対応する。図15(a)では、実際の文字サイズ(図15(a)の(1))と、当該文字列に含まれる文字矩形に外接する文字列領域の高さとがほぼ同じであるため、プログラムは、文字列サイズとして実際の文字サイズに近いサイズを算出する。一方、図15(b)では、実際の文字サイズ(図15(b)の(2))に比べて、当該文字列に含まれる文字矩形に外接する文字列領域の高さが低い(図15(b)の(3))。したがって、プログラムは、文字列サイズとして実際の文字サイズよりも小さいサイズを算出する。 Let's explain cause (i). Figures 15(a) and (b) are examples of character strings containing English letters. For English letters, the length from ascender line to descender line corresponds to the actual character size. In Figure 15(a), the actual character size ((1) in Figure 15(a)) and the height of the character string area circumscribing the character rectangle included in the character string are approximately the same, so the program calculates a character string size that is close to the actual character size. On the other hand, in Figure 15(b), the height of the character string area circumscribing the character rectangle included in the character string is lower ((3) in Figure 15(b)) compared to the actual character size ((2) in Figure 15(b)). Therefore, the program calculates a character string size that is smaller than the actual character size.
また、図15(c)に示すように、日本字の場合、文字サイズは仮想ボディの大きさ(例えば、図15(c)の(4))に対応するが、字面は仮想ボディよりも小さく配置される。そのため、プログラムは、図15(c)の点線に示した矩形を文字矩形として抽出し、文字サイズとして、図15(c)の(5)に示した文字サイズを算出する。図15(c)の(5)は、(4)と比べて小さい。 Furthermore, as shown in Figure 15(c), in the case of Japanese characters, the character size corresponds to the size of the virtual body (for example, (4) in Figure 15(c)), but the character face is placed smaller than the virtual body. Therefore, the program extracts the rectangle shown by the dotted line in Figure 15(c) as the character rectangle, and calculates the character size shown in (5) in Figure 15(c) as the character size. (5) in Figure 15(c) is smaller than (4).
つまり、図15(a)、図15(b)、図15(c)は、何れも実際の文字サイズは同じであるのにも関わらず、プログラムは、実際の文字サイズとほぼ同じ文字サイズを算出する場合も、実際の文字サイズよりも小さい文字サイズを算出する場合もある。これにより、文字列に含まれる文字の種類により、異なる文字サイズが算出される。 In other words, even though the actual character sizes are the same in Figures 15(a), 15(b), and 15(c), the program may calculate a character size that is almost the same as the actual character size, or it may calculate a character size that is smaller than the actual character size. This results in different character sizes being calculated depending on the type of characters contained in the string.
次に、原因の(ii)について説明する。図15の(d)は、ブロック体の英字(例えば、Arial)で16ポイントの大きさの文字を含む文字列に対して、日本字の文字(文字サイズは16ポイント)を組み合わせた場合を示している。 Next, we will explain cause (ii). Figure 15(d) shows the case where a string containing 16-point block letters (e.g., Arial) is combined with Japanese characters (16-point character size).
図15の(d)の1行目は、英字の「+」と、日本字の「漢字」が組み合わされた行を示す。1行目が英字の「+」だけであれば、文字列の高さは(6)に示した高さとなるが、日本字が含まれることで、文字列の高さは(7)に示した高さとなる。図15の(d)の2行目は、英字の「+123」と、日本字の「漢字」が組み合わされた行を示す。2行目が英字の「+123」だけであれば、文字列の高さは(8)に示した高さとなるが、日本字が含まれることで、文字列の高さは(9)に示した高さとなる。図15の(d)の3行目は、英字の「+ghi」と、日本字の「漢字」が組み合わされた行を示す。英字の「g」は、日本語の字面よりも下に長いため、文字列の高さは(10)に示した高さとなり、1行目と2行目と比べて文字列の高さは高くなる。この結果、16ポイントの文字が記載された文字列であっても、1行目と2行目と3行目とで、文字列の高さが異なることとなる。 The first line in Figure 15(d) shows a combination of the English letter "+" and the Japanese character "kanji." If the first line only contained the English letter "+," the height of the string would be the height shown in (6), but because Japanese characters are included, the height of the string becomes the height shown in (7). The second line in Figure 15(d) shows a combination of the English letter "+123" and the Japanese character "kanji." If the second line only contained the English letter "+123," the height of the string would be the height shown in (8), but because Japanese characters are included, the height of the string becomes the height shown in (9). The third line in Figure 15(d) shows a combination of the English letter "+ghi" and the Japanese character "kanji." Because the English letter "g" extends downward longer than the Japanese character, the height of the string becomes the height shown in (10), which is taller than the first and second lines. As a result, even if the text contains 16-point characters, the height of the text will differ between the first, second, and third lines.
さらに、同じ種類の文字(例えば、日本字)であっても、フォントによっても文字列の高さが異なる。例えば、図15(e)は、ゴシック体で記載した日本字(「漢字:漢字」)を示すE132と、E132とは異なるゴシック体で記載した日本字(「漢字:漢字」)を示すE133とを並べた図である。ここで、E132と、E133とは文字サイズは同じであるが、E132の文字列の高さ(図15の(12))とE133の文字列の高さ(図15の(13))とは異なる。 Furthermore, even for the same type of character (for example, Japanese characters), the height of the character string varies depending on the font. For example, Figure 15(e) is a diagram showing E132, which shows Japanese characters written in Gothic font ("Kanji: Kanji"), and E133, which shows Japanese characters written in a different Gothic font from E132 ("Kanji: Kanji"). Here, E132 and E133 have the same character size, but the height of the character string in E132 ((12) in Figure 15) is different from the height of the character string in E133 ((13) in Figure 15).
さらに、1行を構成する文字列の中に、スペースがあったりフォントの変化があったりすると、当該1行を構成する文字列が異なる文字列に分離することがある。このとき、分離した文字列において、文字列の高さが異なる場合がある。例えば、図15(e)のように、「abc defg」と記載された1行の文字列があった場合、スペースC134によって、1行を構成する文字列が、文字列E134と文字列E135とに分離する。ここで、文字列E134と文字列E135との文字列の高さには、図15の(14)で示した差があるため、文字列E134と文字列E135とは異なる文字列の高さとして算出される。 Furthermore, if there is a space or a change in font within the characters that make up a line, the characters that make up that line may be separated into different characters. In this case, the separated characters may have different heights. For example, if there is a line of character string that reads "abc defg," as shown in Figure 15(e), the character string that makes up that line is separated by a space C134 into character string E134 and character string E135. Here, because there is a difference in the height of character string E134 and character string E135 as shown in (14) of Figure 15, character string E134 and character string E135 are calculated to have different heights.
上述の(i)及び(ii)により、実際には同じ文字サイズにより記載された文字を含む文字列同士であっても、プログラムによって算出される文字列サイズが、文字の種類や組み合わせ等により異なる場合がある。この結果、文字列の高さのパターンが増えることとなり、それぞれの文字列に含まれる文字は異なるサイズとしてカウントされやすくなる。そこで、画像形成装置10の開発者等は、プログラムによって算出される文字サイズに基づき、積算範囲を調整することで、プログラムによって算出される文字サイズに応じて文字矩形を分類されるとき、適切な積算範囲に分類されるようにする。 Due to (i) and (ii) above, even if two strings contain characters that are actually written with the same character size, the string size calculated by the program may differ depending on the type and combination of characters. As a result, the number of possible string height variations increases, making it more likely that the characters contained in each string will be counted as different sizes. Therefore, developers of the image forming device 10 can adjust the accumulation range based on the character size calculated by the program so that when character rectangles are classified according to the character size calculated by the program, they are classified into the appropriate accumulation range.
図16(a)は、“Arial”という名前のフォントの文字を5ポイントから16ポイントまで1ポイントずつそれぞれ88文字印刷した印刷の原稿を読み取らせた画像から、プログラム上で文字矩形を抽出し、文字矩形から算出された文字サイズ毎に集計した表である。図16(a)のE140は、実際の文字サイズが15ポイントである文字が88文字あるのに対して、プログラムによって文字サイズが15ポイントとして算出された文字が74文字あることを示す。また、図16(a)のE141は、実際の文字サイズが16ポイントである文字が88文字あるのに対して、プログラムによって文字サイズが16ポイントとして算出された文字が0文字であることを示す。このように、プログラム上では実際の文字サイズと異なる文字サイズが算出される。 Figure 16(a) shows a table in which character rectangles were extracted by a program from an image of a scanned original document containing 88 characters in the font named "Arial" printed in increments of 1 point from 5 point to 16 point, and the results were tabulated by character size calculated from the character rectangles. E140 in Figure 16(a) shows that while there are 88 characters whose actual character size is 15 points, there are 74 characters for which the program calculated the character size to be 15 points. E141 in Figure 16(a) shows that while there are 88 characters whose actual character size is 16 points, there are 0 characters for which the program calculated the character size to be 16 points. In this way, the program calculates a character size that differs from the actual character size.
また、図16(b)は、フォント毎に、印字する文字の文字サイズや文字数を変えて印刷した原稿の画像から算出されたプログラム上での文字数を示した表である。画像形成装置10の開発者等は、原稿に印刷された実際の文字サイズ毎の文字数と、プログラム上での文字数とを比較し、原稿中の各ポイントの文字が、プログラムではどの文字サイズの範囲にカウントされたかを推測してマーキングする。図16(b)における一点鎖線は、積算範囲に対応する圧縮率が「中」に対応する文字サイズ(3ポイントから10ポイント)の文字がカウントされていると推測されたマーキングの範囲を示す。同様に、図16(b)における点線は、積算範囲に対応する圧縮率が「中高」に対応する文字サイズ(11ポイントから16ポイント)のマーキングの範囲を、図16(b)における実線は、積算範囲に対応する圧縮率が「高」に対応する文字サイズ(17ポイント以上)のマーキングの範囲を示す。なお、図16(b)における積算範囲は、図14に示したように、目視により決定した積算範囲の閾値に基づく積算範囲と対応する。 Figure 16(b) is a table showing the program's character counts calculated from images of original documents printed with different font sizes and character counts. Developers of the image forming device 10 compare the actual character counts for each character size printed on the original document with the program's character counts, and estimate the character size range in the program where each point size in the original document falls. The dashed-dotted line in Figure 16(b) indicates the estimated marking range for characters with a character size (3 to 10 points) corresponding to a "medium" compression rate. Similarly, the dotted line in Figure 16(b) indicates the marking range for character sizes (11 to 16 points) corresponding to a "medium-high" compression rate, and the solid line in Figure 16(b) indicates the marking range for character sizes (17 points or larger) corresponding to a "high" compression rate. Note that the integration range in Figure 16(b) corresponds to the integration range based on the threshold value of the integration range determined visually, as shown in Figure 14.
画像形成装置10の開発者等は、プログラムにより算出される文字サイズによって決定される圧縮率が、低画質側に判定されないように、目視により決定した積算範囲の閾値を調整する。図16(b)は、目視により決定した積算範囲の閾値に基づく積算範囲と、マーキングした範囲とがほぼ一致しているため、積算範囲は調整されない。なお、画像形成装置10の開発者等は、積算範囲の閾値に基づく積算範囲とマーキングした範囲とが一致しない場合は、積算範囲を調整する。 The developers of the image forming device 10 adjust the threshold value of the integration range determined visually so that the compression rate, determined by the character size calculated by the program, is not judged to be on the low image quality side. In Figure 16(b), the integration range based on the threshold value of the integration range determined visually and the marked range nearly match, so the integration range is not adjusted. Note that the developers of the image forming device 10 adjust the integration range if the integration range based on the threshold value of the integration range and the marked range do not match.
このようにして、実際には同じ文字サイズの文字であっても、プログラムによって異なる文字サイズとして算出されることによる影響が緩和できる。なお、画像形成装置10の開発者等は、上述の手順によって調整した積算範囲を、確認用画像の解像度(例えば、200dpi)で出力モードが「標準」である場合の積算範囲とし、当該積算範囲を考慮して、他の解像度及び他の出力モードに対する積算範囲を決定する。 In this way, the impact of characters being calculated as different character sizes by the program, even if they are actually the same size, can be mitigated. The developer of the image forming device 10 then uses the integration range adjusted using the above procedure as the integration range for the resolution of the confirmation image (e.g., 200 dpi) and the output mode "standard," and takes this integration range into account when determining integration ranges for other resolutions and other output modes.
つづいて、表示部140に表示される画面の例を説明する。図17(a)は、ホーム画面W100の画面例である。ホーム画面は、画像形成装置10が備える機能を選択するためのボタン等が表示される。ユーザは、ホーム画面W100を介して、ユーザは使用を所望する機能を選択する。ホーム画面W100には、シンプルスキャン機能を使用するためのシンプルスキャンボタンB100が含まれる。シンプルスキャン機能は、入力された原稿の画像を、他の装置に送信させたり、画像形成装置10の記憶部160や他の記憶装置(例えば、サーバの記憶部や外部記憶媒体)に記憶させたりする機能である。 Next, examples of screens displayed on the display unit 140 will be described. Figure 17(a) is an example of the home screen W100. The home screen displays buttons and the like for selecting functions provided by the image forming device 10. The user selects the function they wish to use via the home screen W100. The home screen W100 includes a simple scan button B100 for using the simple scan function. The simple scan function is a function that sends an image of an input document to another device or stores it in the memory unit 160 of the image forming device 10 or another storage device (for example, the storage unit of a server or an external storage medium).
図17(b)は、ホーム画面W100から、ボタンB100が選択された場合に表示される設定画面W110の画面例である。設定画面W110には、出力画像の圧縮率を自動設定させるためのボタンB110が含まれる。なお、出力画像の圧縮率を自動設定させない場合は、出力画像の圧縮率は特定の圧縮率(例えば、「中高」)に固定されてもよいし、ユーザによって選択されてもよい。 Figure 17 (b) is an example of the settings screen W110 that is displayed when button B100 is selected from the home screen W100. The settings screen W110 includes a button B110 for automatically setting the compression rate of the output image. If the compression rate of the output image is not automatically set, the compression rate of the output image may be fixed to a specific compression rate (e.g., "medium-high") or may be selected by the user.
ユーザは、ボタンB110を選択することで、画像形成装置10に出力画像の圧縮率を自動的に判定させることができる。図17(c)は、ボタンB110が選択された場合の設定画面W120の画面例である。設定画面W120では、ボタンB120(図17(b)のボタンB110に対応するボタン)が選択状態となり、圧縮率が自動的に設定されることが示される(図17(c)のE120)。 By selecting button B110, the user can have the image forming device 10 automatically determine the compression rate of the output image. Figure 17(c) is an example of the settings screen W120 that appears when button B110 is selected. On the settings screen W120, button B120 (the button corresponding to button B110 in Figure 17(b)) is selected, indicating that the compression rate will be set automatically (E120 in Figure 17(c)).
また、設定画面には、詳細ボタン(例えば、図17(b)のボタンB112)が含まれてもよい。図18(a)は、図17(b)に含まれるボタンB112が選択されたときに表示される詳細画面W130の画面例である。詳細画面は、シンプルスキャン機能の詳細な設定が可能な画面である。詳細画面W130には、出力モードを設定するためのボタンB130が含まれる。 The settings screen may also include a details button (e.g., button B112 in Figure 17(b)). Figure 18(a) is an example of the details screen W130 that is displayed when button B112 included in Figure 17(b) is selected. The details screen is a screen where detailed settings for the simple scan function can be made. The details screen W130 includes a button B130 for setting the output mode.
図18(b)は、詳細画面W130のボタンB130が選択されたときに表示される詳細画面W140の画面例である。詳細画面W140には、出力モードとして、「サイズ優先(ファイルサイズ優先)」、「標準」、「画質優先」のいずれかを選択するためのボタンを含む領域E140が含まれる。また、「サイズ優先」又は「標準」が選択された場合に、「通常」か「小さい文字を鮮明にする」のいずれかを選択するためのボタンを含む領域E142が含まれる。ユーザは、領域E140及び領域E142からボタンを選択することで、所望の出力モードを指定することができる。 Figure 18 (b) is an example of the details screen W140 that is displayed when button B130 on the details screen W130 is selected. The details screen W140 includes an area E140 containing buttons for selecting one of the output modes: "Size Priority (File Size Priority)," "Standard," or "Image Quality Priority." It also includes an area E142 containing buttons for selecting either "Normal" or "Clear Small Text" when "Size Priority" or "Standard" is selected. The user can specify the desired output mode by selecting a button from area E140 or area E142.
なお、ユーザによって特定の出力モードが選択されない場合、画像形成装置10は、出力モードを自動的に選択すればよい。図17及び図18に示した画面は、図8に示したメイン処理が実行される前に表示される。ユーザは、図17及び図18に示した画面を介して、画像形成装置10に対して、出力画像の解像度を推定させたり、出力画像の圧縮率を判定させたり、出力モードを指定したりすることができる。 If the user does not select a specific output mode, the image forming device 10 can automatically select an output mode. The screens shown in Figures 17 and 18 are displayed before the main processing shown in Figure 8 is executed. Via the screens shown in Figures 17 and 18, the user can have the image forming device 10 estimate the resolution of the output image, determine the compression rate of the output image, and specify the output mode.
なお、上述した実施形態は、適宜変更しても構わない。例えば、本実施形態では、圧縮率を判定する装置が画像形成装置10であるとして説明したが、画像形成装置10以外の装置によって実現されてもよい。例えば、画像形成部を備えない情報処理装置(例えば、画像処理装置やスキャナ等の画像読取装置)が解像度推定部112と圧縮率判定部114とを備えることで、圧縮率を判定可能にしてもよい。 The above-described embodiment may be modified as appropriate. For example, in this embodiment, the device that determines the compression ratio is described as the image forming device 10, but this may be realized by a device other than the image forming device 10. For example, an information processing device that does not have an image forming unit (for example, an image processing device or an image reading device such as a scanner) may be equipped with a resolution estimation unit 112 and a compression ratio determination unit 114, thereby making it possible to determine the compression ratio.
また、圧縮率の種類は2種類であってもよいし、4種類以上であってもよい。また、圧縮率は「低」「中」「高」といった表現であってもよいし、「50%」「70%」「85%」のような数値による表現であってもよい。 The number of compression rates may be two, four, or more. Compression rates may be expressed as "low," "medium," or "high," or as numerical values such as "50%, "70%, or "85%."
また、原稿特性が「写真」である場合、図7(d)に示したように、出力モードに応じて圧縮率が定まってもよいし、出力モードによらず圧縮率が一意に(例えば、圧縮率「高」)に定まってもよい。 Furthermore, when the document characteristic is "photograph," the compression rate may be determined according to the output mode, as shown in Figure 7(d), or the compression rate may be uniquely determined (for example, a "high" compression rate) regardless of the output mode.
また、本実施形態では、出力モードと出力画像の解像度とによって積算範囲が設定されることとして説明したが、出力画像の解像度のみによって積算範囲が設定されてもよい。 In addition, in this embodiment, the integration range is set based on the output mode and the resolution of the output image, but the integration range may also be set based only on the resolution of the output image.
また、文字サイズが大きい文字が分類される積算範囲のカウント数が最大である場合であって、文字サイズが小さい文字が分類される積算範囲のカウント数も同程度であるとき(例えば、カウント数の差分が予め定められた閾値以内であるとき)、制御部100は、次のいずれかの処理を実行してもよい。
(1)制御部100は、出力画像の解像度を大きめに設定し、圧縮率を「高」にする。
(2)制御部100は、出力画像の解像度を低めに設定し、圧縮率を「低」にする。
In addition, when the count number of the accumulation range into which characters with large character sizes are classified is the largest and the count number of the accumulation range into which characters with small character sizes are classified is also approximately the same (for example, when the difference in the count numbers is within a predetermined threshold), the control unit 100 may perform one of the following processes.
(1) The control unit 100 sets the resolution of the output image to a large value and the compression rate to "high."
(2) The control unit 100 sets the resolution of the output image to a low level and the compression rate to "low."
また、上述した実施形態では、文字列を抽出するとき、横方向に隣接した文字矩形が連結されることとして説明した。これは、原稿の文字が横組みであることを仮定していることによる。一方、原稿は、縦組みの場合もあるため、文字列抽出部110は、文字列を抽出するとき、文字列の方向も特定してもよい。この場合、文字列抽出部110は、文字列領域の長手方向が横であれば文字列の方向を横とし、文字列領域の長手方向が縦であれば文字列の方向を縦と判定する。また、解像度推定部112は、図9のステップS146において文字列サイズ抽出するとき、文字列の方向が横であれば文字列領域の高さをポイント単位の値に変換し、文字列の方向が縦であれば文字列領域の幅をポイント単位の値に変換すればよい。 In the above-described embodiment, when extracting a character string, horizontally adjacent character rectangles are concatenated. This is because it is assumed that the characters in the document are typeset horizontally. However, a document may also be typeset vertically, so the character string extraction unit 110 may also specify the direction of the character string when extracting the character string. In this case, the character string extraction unit 110 determines that the direction of the character string is horizontal if the length of the character string area is horizontal, and determines that the direction of the character string is vertical if the length of the character string area is vertical. Furthermore, when extracting the character string size in step S146 of FIG. 9, the resolution estimation unit 112 converts the height of the character string area into a value in points if the direction of the character string is horizontal, and converts the width of the character string area into a value in points if the direction of the character string is vertical.
以上のように、本実施形態の画像形成装置によれば、画像に含まれる文字を、文字サイズに基づき分類し、分類された文字の数に応じて圧縮率を決定する。これにより、画像を圧縮するとき、最も多く用いられている文字サイズの文字の可読性を確保しながら、最適な圧縮率を用いて圧縮をすることができる。 As described above, the image forming device of this embodiment classifies the characters contained in an image based on character size, and determines the compression rate according to the number of classified characters. This makes it possible to compress an image using the optimal compression rate while ensuring the readability of characters of the most commonly used character size.
ここで、画像に含まれる文字の種類(フォント)によっては、圧縮率や文字サイズによって、視認性に差が出る。この問題に対し、本実施形態の画像処理装置は、画像に含まれる文字を文字サイズに応じて分類し、分類結果に応じて圧縮率を決定することで、文字の種類の差異による圧縮率の判定への影響を抑制することができる。 Depending on the type of characters (font) contained in the image, the compression rate and character size can affect visibility. To address this issue, the image processing device of this embodiment classifies the characters contained in the image according to character size and determines the compression rate based on the classification results, thereby reducing the impact of differences in character type on the determination of the compression rate.
従来技術のように、最小文字サイズなどの1の文字サイズのみに基づいて圧縮率を判定すると、画像に含まれる文字の種類(フォント)によっては、圧縮後の画像が適切な画像とならない場合がある。例えば、細字を含む原稿において情報損失が発生することで、フォントによって視認できない原稿の画像が発生といった問題があった。また、本来低解像度・高圧縮でよい原稿の画像に対して、高画質で出力するための処理がなされ、ファイルサイズ抑制の効果が十分に得られないといった問題があった。このような問題に対し、本実施形態の画像形成装置は、原稿に最も多く用いられている文字サイズの範囲(積算範囲)に基づき圧縮率を判定する。これにより、原稿に含まれる文字の文字サイズが総合的に考慮された圧縮率が判定される。ここで、積算範囲は、文字特性を考慮して決定されることにより、文字特性に応じた適切な圧縮率が選択される。 When the compression rate is determined based only on a single character size, such as the minimum character size, as in conventional technology, the compressed image may not be appropriate depending on the type of characters (font) contained in the image. For example, information loss occurs in documents containing fine print, resulting in an image of the document that is unreadable due to the font. Furthermore, document images that would normally be low-resolution and highly compressed are processed to output at high image quality, resulting in insufficient file size reduction. To address these issues, the image forming apparatus of this embodiment determines the compression rate based on the range of character sizes most commonly used in documents (accumulation range). This allows the compression rate to be determined taking into consideration the character sizes of the characters contained in the document. Here, the accumulation range is determined taking into consideration character characteristics, allowing an appropriate compression rate to be selected according to the character characteristics.
さらに、本実施形態の画像形成装置は、スキャン機能の使用時等において、原稿特性に応じて圧縮率を判定(設定)することで、原稿特性と文字特性に応じた適切な圧縮率を自動判定することができる。これにより、本実施形態の画像形成装置は、通常の画像形成装置のように、圧縮率が固定されることでスキャンされた画像に生じる画像情報の損失(特に文字情報の損失)を回避するとともに、出力画像のファイルサイズを低減させることができる。つまり、本実施形態の画像形成装置は、出力画像の画質及びサイズの最適化が可能である。また、ユーザは、出力画像の解像度や圧縮率等の詳細な設定をすることなく、画像形成装置に対して、自動で適切な圧縮率を判定させることができる。 Furthermore, the image forming device of this embodiment can automatically determine an appropriate compression rate according to the document characteristics and character characteristics by determining (setting) the compression rate according to the document characteristics when using the scan function, etc. This allows the image forming device of this embodiment to avoid the loss of image information (particularly the loss of character information) that occurs in scanned images when the compression rate is fixed, as occurs in ordinary image forming devices, and also reduces the file size of the output image. In other words, the image forming device of this embodiment can optimize the image quality and size of the output image. Furthermore, the user can have the image forming device automatically determine an appropriate compression rate without having to configure detailed settings such as the resolution and compression rate of the output image.
[2.第2実施形態]
つづいて第2実施形態について説明する。第2実施形態は第1実施形態の圧縮率判定処理において、文字矩形を連結する処理を行う実施形態である。本実施形態は、第1実施形態の図10を図19に置き換えたものである。なお、同一の処理には同一の符号を付し、説明については省略する。
[2. Second embodiment]
Next, a second embodiment will be described. The second embodiment is an embodiment in which processing for connecting character rectangles is performed in the compression rate determination processing of the first embodiment. In this embodiment, FIG. 10 of the first embodiment is replaced with FIG. 19. Note that the same processes are assigned the same reference numerals, and descriptions thereof will be omitted.
画像形成装置10に含まれる文字矩形抽出部108は、文字によっては、1文字分の文字を表す画像(画素)から、複数の文字矩形を抽出する場合がある。これにより、1文字分の文字に対応する画素が、複数の文字矩形に分離してしまい、画像形成装置10は、文字数を正しくカウントすることができなくなる。一般的に、文字サイズが大きくなるほど、文字が分離しやすくなる。つまり、文字サイズが大きい文字ほど、複数の文字矩形に分離してしまう。したがって、本実施形態では、圧縮率判定処理において、分離した文字矩形を連結する処理を実行する。 Depending on the character, the character rectangle extraction unit 108 included in the image forming device 10 may extract multiple character rectangles from an image (pixels) representing one character. As a result, the pixels corresponding to one character are separated into multiple character rectangles, preventing the image forming device 10 from correctly counting the number of characters. Generally, the larger the character size, the easier it is to separate characters. In other words, the larger the character size, the more likely it is to be separated into multiple character rectangles. Therefore, in this embodiment, the compression rate determination process involves connecting the separated character rectangles.
[2.1 処理の流れ]
図19を参照して本実施形態の圧縮率判定処理の流れについて説明する。本実施形態では、第1実施形態において説明した圧縮率判定処理を実行する前に、文字列に含まれる文字矩形を連結する処理を実行する。
2.1 Processing flow
The flow of the compression rate determination process of this embodiment will be described with reference to Fig. 19. In this embodiment, before executing the compression rate determination process described in the first embodiment, a process of concatenating character rectangles included in a character string is executed.
はじめに、圧縮率判定部114は、1の文字列を選択する(ステップS200)。例えば、圧縮率判定部114は、文字列領域情報記憶領域164から1の文字列領域情報を読み出す。なお、以下の説明では、ステップS200において選択した文字列を対象文字列と記載する。 First, the compression rate determination unit 114 selects one character string (step S200). For example, the compression rate determination unit 114 reads one character string area information from the character string area information storage area 164. In the following description, the character string selected in step S200 will be referred to as the target character string.
つづいて、圧縮率判定部114は、対象文字列に含まれる文字矩形のうち、縦方向に隣接した文字矩形を連結する(ステップS202)。例えば、圧縮率判定部114は、対象文字列に含まれる文字矩形に対して、以下の処理を実行する。
(1)圧縮率判定部114は、左上の位置が上にある文字矩形から順に、1の文字矩形を選択する。
(2)圧縮率判定部114は、(1)において選択した1の文字矩形の左端から右端までのいずれかの位置を含む他の文字矩形を特定する。
(3)圧縮率判定部114は、(2)において1以上の他の文字矩形が特定した場合、(1)において選択した文字矩形と、(2)において特定した文字矩形は、縦方向に隣接した文字矩形であるとして連結する。
(4)圧縮率判定部114は、全ての文字矩形を選択していない場合は、(1)に戻り別の文字矩形を選択し、全ての文字矩形を選択していた場合は、ステップS202における処理を終了する。
Next, the compression rate determination unit 114 concatenates vertically adjacent character rectangles included in the target character string (step S202). For example, the compression rate determination unit 114 performs the following process on the character rectangles included in the target character string.
(1) The compression rate determination unit 114 selects one character rectangle, starting from the character rectangle with the top left position.
(2) The compression rate determination unit 114 identifies other character rectangles that include any position between the left end and the right end of the one character rectangle selected in (1).
(3) If one or more other character rectangles are identified in (2), the compression rate determination unit 114 connects the character rectangle selected in (1) and the character rectangle identified in (2) as vertically adjacent character rectangles.
(4) If the compression rate determination unit 114 has not selected all the character rectangles, it returns to (1) and selects another character rectangle; if all the character rectangles have been selected, it ends the processing in step S202.
なお、圧縮率判定部114は、(3)において、縦方向に隣接した複数の文字矩形を連結する場合、当該複数の文字矩形に外接し、対象文字列に属する文字矩形の文字矩形情報を生成し文字矩形情報記憶領域162に記憶する。さらに、圧縮率判定部114は、連結の対象となった複数の文字矩形に対応する文字矩形情報を文字矩形情報記憶領域162から削除する。 In addition, when the compression rate determination unit 114 concatenates multiple vertically adjacent character rectangles in (3), it generates character rectangle information for character rectangles that circumscribe the multiple character rectangles and belong to the target string, and stores this information in the character rectangle information storage area 162. Furthermore, the compression rate determination unit 114 deletes the character rectangle information corresponding to the multiple character rectangles that were concatenated from the character rectangle information storage area 162.
つづいて、圧縮率判定部114は、横方向に隣接する文字矩形を連結させるために用いる変数である参照位置に、対象文字列の左端の位置を代入し(ステップS204)。当該参照位置の右にある文字矩形のうち最も近い文字矩形を特定する(ステップS206)。 Next, the compression rate determination unit 114 assigns the leftmost position of the target character string to the reference position, which is a variable used to connect horizontally adjacent character rectangles (step S204). It then identifies the closest character rectangle to the right of the reference position (step S206).
つづいて、圧縮率判定部114は、ステップS206において特定した文字矩形の左端の位置から、対象文字列の高さと同じ長さの横幅の範囲(連結範囲)を設定する(ステップS208)。すなわち、連結範囲は、ステップS206において選択した文字矩形の左端の位置から、対象文字列の高さと同じ長さだけ離れた位置までを含む範囲である。 Next, the compression rate determination unit 114 sets a range (connected range) whose width is the same as the height of the target character string from the left edge of the character rectangle identified in step S206 (step S208). In other words, the connected range is a range that includes the left edge of the character rectangle selected in step S206 to a position that is the same distance away as the height of the target character string.
つづいて、圧縮率判定部114は、連結範囲に重なる文字矩形が複数ある場合、当該複数の文字矩形を、横方向に隣接する文字矩形として連結する(ステップS210)。このとき、圧縮率判定部114は、当該複数の文字矩形に外接し、対象文字列に属する文字矩形の文字矩形情報を新たに生成し文字矩形情報記憶領域162に記憶する。さらに、圧縮率判定部114は、連結の対象となった複数の文字矩形に対応する文字矩形情報を文字矩形情報記憶領域162から削除する。 Next, if there are multiple overlapping character rectangles in the concatenated range, the compression rate determination unit 114 concatenates the multiple character rectangles as horizontally adjacent character rectangles (step S210). At this time, the compression rate determination unit 114 generates new character rectangle information for character rectangles that circumscribe the multiple character rectangles and belong to the target string, and stores this in the character rectangle information storage area 162. Furthermore, the compression rate determination unit 114 deletes the character rectangle information corresponding to the multiple character rectangles that were the subject of concatenation from the character rectangle information storage area 162.
つづいて、圧縮率判定部114は、参照位置に、ステップS208において設定した連結範囲の右端の位置を代入し(ステップS212)、参照位置の右に文字矩形があるか否かを判定する(ステップS214)。圧縮率判定部114は、参照位置の右に文字矩形がある場合は、ステップS206に戻る(ステップS214;No→ステップS206)。一方、圧縮率判定部114は、参照位置の右に文字矩形がない場合は、全ての文字列を選択したか否かを判定する(ステップS214;Yes→ステップS216)。圧縮率判定部114は、全ての文字列を選択していない場合はステップS200に戻る(ステップS216;No→ステップS200)。一方、圧縮率判定部114は、全ての文字列を選択した場合はステップS172以降の処理を実行する(ステップS216;Yes)。 Next, the compression rate determination unit 114 assigns the right end position of the linked range set in step S208 to the reference position (step S212) and determines whether there is a character rectangle to the right of the reference position (step S214). If there is a character rectangle to the right of the reference position, the compression rate determination unit 114 returns to step S206 (step S214; No → step S206). On the other hand, if there is no character rectangle to the right of the reference position, the compression rate determination unit 114 determines whether all character strings have been selected (step S214; Yes → step S216). If all character strings have not been selected, the compression rate determination unit 114 returns to step S200 (step S216; No → step S200). On the other hand, if all character strings have been selected, the compression rate determination unit 114 executes the processing from step S172 onwards (step S216; Yes).
[2.2 動作例]
図20を参照して、本実施形態の動作例について説明する。図20(a)は、「波動」という文字を含む文字列E200に含まれる文字矩形を示した図である。図20(a)に示すように、文字列E200には、6の文字矩形が含まれる。
[2.2 Operation example]
An example of the operation of this embodiment will be described with reference to Fig. 20. Fig. 20(a) is a diagram showing character rectangles included in a character string E200 that includes the character "hado" (wave). As shown in Fig. 20(a), the character string E200 includes six character rectangles.
図20(b)は、文字列E200に含まれる文字矩形のうち、縦方向に隣接した文字矩形を連結したあとの文字矩形を示す図である。本実施形態では、図20(a)に示した文字矩形のうち、上から順に、文字矩形C204、文字矩形C205、文字矩形C206、文字矩形C201と選択される。ここで、文字矩形C204、文字矩形C205、文字矩形C206は、縦方向に隣接した他の文字矩形がない。一方、文字矩形C201は、縦方向に隣接した他の文字矩形として、文字矩形C202とC203とが存在する。したがって、文字矩形C201、文字矩形C202、文字矩形C203は連結され、図20(b)の文字矩形C207となる。このように、図20(b)の(1)に示したように、縦方向に隣接した文字矩形が、文字列の高さを基準として連結される。これにより、縦方向に分離した文字の部分(図20(a)の例では、さんずいの部分)が連結される。 Figure 20(b) shows the character rectangles included in the character string E200 after vertically adjacent character rectangles are concatenated. In this embodiment, from the character rectangles shown in Figure 20(a), character rectangle C204, character rectangle C205, character rectangle C206, and character rectangle C201 are selected, starting from the top. Here, character rectangles C204, C205, and C206 do not have any vertically adjacent character rectangles. On the other hand, character rectangle C201 has character rectangles C202 and C203 as its vertically adjacent character rectangles. Therefore, character rectangles C201, C202, and C203 are concatenated to form character rectangle C207 in Figure 20(b). In this way, as shown in (1) of Figure 20(b), vertically adjacent character rectangles are concatenated based on the height of the character string. This connects the vertically separated parts of the character (in the example of Figure 20(a) , the "san" part).
図20(c)は、文字列E200に含まれる文字矩形のうち、横方向に隣接した文字矩形を連結したあとの文字矩形を示す図である。本実施形態では、参照位置が文字列E200の左端に設定され、当該参照位置の右に位置する文字矩形から、最も近い文字矩形C207が特定される。さらに、文字矩形C207の左端の位置から、文字列E200の高さと同じ長さの横幅の連結範囲E202が設定される。連結範囲E202には、文字矩形C207と文字矩形C204とが含まれる。したがって、文字矩形C207と文字矩形C204とが連結され、文字矩形C208となる。さらに、参照位置が文字矩形C208の右端に設定され、当該参照位置の右に位置する文字矩形から、最も近い文字矩形C205が特定される。さらに、文字矩形C205の左端の位置から、文字列E200の高さと同じ長さの横幅の連結範囲E204が設定される。連結範囲E204には、文字矩形C205と文字矩形C206とが含まれる。したがって、文字矩形C205と文字矩形C206とが連結され、文字矩形C209となる。このように、図20(c)の(2)に示したように、文字列E200の高さと同じ長さの横幅に基づき、横方向に隣接した文字矩形が連結される。これにより、横方向に分離した文字の部分(例えば、漢字のへんとつくり)が連結(統合)される。 Figure 20(c) shows the character rectangles obtained by concatenating horizontally adjacent character rectangles included in character string E200. In this embodiment, the reference position is set to the left end of character string E200, and the closest character rectangle C207 is identified from the character rectangle located to the right of the reference position. Furthermore, a concatenated range E202 is set from the left end of character rectangle C207, with a width equal to the height of character string E200. Concatenated range E202 includes character rectangle C207 and character rectangle C204. Therefore, character rectangle C207 and character rectangle C204 are concatenated to form character rectangle C208. Furthermore, the reference position is set to the right end of character rectangle C208, and the closest character rectangle C205 is identified from the character rectangle located to the right of the reference position. Furthermore, a concatenated range E204 is set from the left end of character rectangle C205, with a width equal to the height of character string E200. Concatenated range E204 includes character rectangle C205 and character rectangle C206. Therefore, character rectangle C205 and character rectangle C206 are concatenated to form character rectangle C209. In this way, as shown in (2) of Figure 20(c), horizontally adjacent character rectangles are concatenated based on a width that is the same length as the height of character string E200. This concatenates (integrates) horizontally separated character parts (for example, the radicals and structures of kanji characters).
図20(d)及び図20(e)は、別の文字列の例である。図20(d)及び図20(e)において、一点鎖線は文字列領域(文字列矩形)を、点線は文字矩形を示す。 Figures 20(d) and 20(e) show examples of other character strings. In Figures 20(d) and 20(e), the dashed-dotted lines indicate character string areas (character string rectangles), and the dotted lines indicate character rectangles.
図20(d)は、18ポイントの文字を含む文字列E210と、10ポイントの文字を含む文字列E212とを含む画像P210の例である。文字列E210には13の文字矩形が含まれ、文字列E212には9の文字矩形が含まれる。そのため、圧縮率判定部114は、18ポイントの文字が13文字、10ポイントの文字が9文字あるとして圧縮率を判定する。 Figure 20(d) shows an example of an image P210 that includes a string E210 containing 18-point characters and a string E212 containing 10-point characters. The string E210 contains 13 character rectangles, and the string E212 contains 9 character rectangles. Therefore, the compression rate determination unit 114 determines the compression rate by assuming that there are 13 18-point characters and 9 10-point characters.
ここで、10ポイントの文字サイズの文字が圧縮率「中」に対応する積算範囲に分類され、18ポイントの文字サイズの文字が圧縮率「高」に対応する積算範囲に分類され、積算後の文字カウントに対する重み付けがされない場合について説明する。この場合、18ポイントの文字が最大であるため、圧縮率判定部114は、出力画像の圧縮率として「高」を判定する。この結果、出力画像において、10ポイントの文字の周囲にモスキートノイズが生じる可能性がある。 Here, we will explain the case where 10-point characters are classified into an accumulation range corresponding to a "medium" compression rate, 18-point characters are classified into an accumulation range corresponding to a "high" compression rate, and no weighting is applied to the accumulated character count. In this case, since 18-point characters are the largest, the compression rate determination unit 114 determines the compression rate of the output image to be "high." As a result, mosquito noise may occur around the 10-point characters in the output image.
図20(e)は、図20(d)に示した画像P210に対して文字矩形を連結する処理を実行した後における、文字列領域及び文字矩形を示した図である。図20(e)の文字列E214と文字列E216は、それぞれ、図20(d)の文字列E210と文字列E214とに対応する。図20(e)では、18ポイントの文字及び10ポイントの文字はともに9文字である。したがって、圧縮率判定部114は、高画質側の圧縮率を判定することにより、出力画像の圧縮率として「中」を判定する。このようにして、文字矩形が連結されることにより、1文字分の文字を重複して検出されることがなくなり、文字数がより正確にカウントされ、適切な圧縮率が判定される。また、実際の文字のサイズに近い文字サイズが検出されることとなる。 Figure 20(e) is a diagram showing the character string area and character rectangles after the process of concatenating character rectangles has been performed on image P210 shown in Figure 20(d). Character strings E214 and E216 in Figure 20(e) correspond to character strings E210 and E214 in Figure 20(d), respectively. In Figure 20(e), there are nine 18-point characters and nine 10-point characters. Therefore, the compression rate determination unit 114 determines the compression rate for the output image to be "medium" by determining the compression rate on the high-image-quality side. By concatenating character rectangles in this way, characters equivalent to one character are no longer detected twice, the number of characters is counted more accurately, and an appropriate compression rate is determined. Furthermore, a character size close to the actual character size is detected.
なお、上述した説明は、縦方向に隣接した文字矩形を連結した後に連結範囲を設定することとして説明したが、連結範囲を設定してから縦方向に隣接した文字矩形を連結させてもよい。この場合、連結範囲内に、縦方向に文字矩形が分離されていない場合は、縦方向に隣接した文字矩形を連結する処理を省略する。 In the above explanation, the connection range is set after connecting vertically adjacent character rectangles, but it is also possible to set the connection range and then connect vertically adjacent character rectangles. In this case, if there are no vertically separated character rectangles within the connection range, the process of connecting vertically adjacent character rectangles is omitted.
また、上述した説明は、文字列の方向が横の場合であるときの処理の説明である。文字列の方向が縦の場合は、参照位置を文字列の上端から下方向に移動させることとし、先に横方向に分離した文字矩形を連結させ、次に文字列サイズの縦幅の連結範囲を設定して、連結範囲に重なる縦方向の文字矩形を連結させればよい。 The above explanation is for processing when the character string is oriented horizontally. If the character string is oriented vertically, the reference position is moved downward from the top of the character string, and the character rectangles separated horizontally are first concatenated. Next, a concatenation range is set for the vertical width of the character string size, and the vertical character rectangles that overlap the concatenation range are concatenated.
また、画像形成装置10は、上述した方法以外により、文字矩形を連結してもよい。例えば、文字の横サイズと縦サイズの比、同じ文字列の横サイズの比、同じ文字列のMAX横サイズとの比で所定比率より小さい2連続の 文字矩形を結合してもよい。 The image forming device 10 may also connect character rectangles using methods other than those described above. For example, it may combine two consecutive character rectangles where the ratio of the width and height of the characters, the ratio of the width of the same character string, or the ratio of the maximum width of the same character string is smaller than a predetermined ratio.
このように、本実施形態の画像形成装置は、文字矩形の数(文字数)をより正確な値とすることができ、出力画像の圧縮率を適切に判定することができる。 In this way, the image forming device of this embodiment can determine the number of character rectangles (number of characters) more accurately, and can appropriately determine the compression rate of the output image.
[3.第3実施形態]
つづいて第3実施形態について説明する。第3実施形態は第1実施形態の圧縮率判定処理において、出力モードに応じた処理を実行することで圧縮率を判定する実施形態である。本実施形態は、第1実施形態の図10を図21に置き換えたものである。なお、同一の処理には同一の符号を付し、説明については省略する。
3. Third embodiment
Next, a third embodiment will be described. In the third embodiment, the compression ratio is determined by executing processing according to the output mode in the compression ratio determination processing of the first embodiment. In this embodiment, FIG. 10 of the first embodiment is replaced with FIG. 21. Note that the same processes are denoted by the same reference numerals, and their description will be omitted.
図21を参照して、本実施形態における圧縮率判定処理の流れを説明する。本実施形態では、圧縮率判定部114は、ステップS176における処理を実行したあと、出力モードがサイズ優先であるか否かを判定する(ステップS300)。圧縮率判定部114は、出力モードが画質優先である場合、積算範囲のうち、最小文字サイズの文字が含まれる積算範囲を特定する(ステップS300;Yes→ステップS302)。 The flow of the compression rate determination process in this embodiment will be described with reference to Figure 21. In this embodiment, after performing the process in step S176, the compression rate determination unit 114 determines whether the output mode is size-priority (step S300). If the output mode is image quality-priority, the compression rate determination unit 114 identifies an accumulation range that includes characters of the minimum character size (step S300; Yes → step S302).
一方、圧縮率判定部114は、出力モードが画質優先ではない場合、出力モードがサイズ優先であるか否かを判定する(ステップS300;No→ステップS304)。圧縮率判定部114は、出力モードがサイズ優先である場合は、ステップS178の処理を省略する。この場合、圧縮率判定部114は、重み付けを行わず、各積載範囲のカウント値を比較し、カウント値が最大の積算範囲を特定する(ステップS304;Yes→ステップS306)。この場合、圧縮率判定部114は、文字サイズが小さい文字を重視しない。 On the other hand, if the output mode is not image quality priority, the compression rate determination unit 114 determines whether the output mode is size priority (step S300; No → step S304). If the output mode is size priority, the compression rate determination unit 114 skips the processing of step S178. In this case, the compression rate determination unit 114 does not perform weighting, but compares the count values of each loading range and identifies the accumulation range with the largest count value (step S304; Yes → step S306). In this case, the compression rate determination unit 114 does not prioritize characters with small character sizes.
一方、圧縮率判定部114は、出力モードがサイズ優先でない場合(出力モードが標準である場合)は、ステップS178及びステップS180の処理を実行する(ステップS304;No→ステップS178→ステップS180)。 On the other hand, if the output mode is not size-priority (if the output mode is standard), the compression ratio determination unit 114 executes the processes of steps S178 and S180 (step S304; No → step S178 → step S180).
つづいて、圧縮率判定部114は、ステップS302、ステップS306又はステップS180において特定した積算範囲に対応する圧縮率を、出力画像の圧縮率として設定する(ステップS182)。 Next, the compression rate determination unit 114 sets the compression rate corresponding to the integration range identified in step S302, step S306, or step S180 as the compression rate of the output image (step S182).
このように、本実施形態の画像形成装置は、出力モードに応じて、積算範囲に含まれる文字数を比較する方法を切り替えることで、適切な圧縮率を判定することができる。 In this way, the image forming device of this embodiment can determine the appropriate compression rate by switching the method for comparing the number of characters included in the accumulation range depending on the output mode.
[4.変形例]
本発明は上述した各実施の形態に限定されるものではなく、種々の変更が可能である。すなわち、本発明の要旨を逸脱しない範囲内において適宜変更した技術的手段を組み合わせて得られる実施の形態についても本発明の技術的範囲に含まれる。
4. Modifications
The present invention is not limited to the above-described embodiments, and various modifications are possible. In other words, embodiments obtained by combining technical means that are appropriately modified within the scope of the gist of the present invention are also included in the technical scope of the present invention.
また、上述した実施形態は、説明の都合上、それぞれ別に説明している部分があるが、技術的に可能な範囲で組み合わせて実行してもよいことは勿論である。例えば、第2実施形態と第3実施形態とを組み合わせてもよい。 Furthermore, although the above-mentioned embodiments are described separately for convenience of explanation, they may of course be combined to the extent technically possible. For example, the second and third embodiments may be combined.
また、上述した実施形態は、圧縮率の判定が画像形成装置や画像処理装置によって実行されることとして説明したが、解像度推定部及び圧縮率判定部を備えたサーバ等の装置によって実行されてもよい。また、当該サーバをインターネット上(クラウド)に設置することで、サービスとして提供されてもよい。この場合、当該サーバは、受信した画像を入力画像として解像度の推定と圧縮率の判定を行い、当該解像度に変換し、当該圧縮率を用いて圧縮した入力画像を、出力画像として画像の送信元に送信すればよい。 In addition, while the above-described embodiments have been described as the determination of the compression rate being performed by an image forming device or image processing device, it may also be performed by a device such as a server equipped with a resolution estimation unit and a compression rate determination unit. Furthermore, the server may be provided as a service by being installed on the Internet (cloud). In this case, the server estimates the resolution and determines the compression rate for the received image as an input image, converts it to that resolution, and transmits the input image compressed using that compression rate as an output image to the sender of the image.
また、実施形態において各装置で動作するプログラムは、上述した実施形態の機能を実現するように、CPU等を制御するプログラム(コンピュータを機能させるプログラム)である。そして、これら装置で取り扱われる情報は、その処理時に一時的に一時記憶装置(例えば、RAM)に蓄積され、その後、各種ROM(Read Only Memory)やHDD等の記憶装置に格納され、必要に応じてCPUによって読み出し、修正・書き込みが行なわれる。 In addition, the programs that run on each device in the embodiments are programs that control the CPU and other devices (programs that cause a computer to function) so as to realize the functions of the above-mentioned embodiments. Information handled by these devices is temporarily stored in temporary storage devices (e.g., RAM) during processing, and is then stored in various storage devices such as ROMs (Read Only Memory) and HDDs, from which it is read, modified, and written by the CPU as needed.
ここで、プログラムを格納する記録媒体としては、半導体媒体(例えば、ROMや、不揮発性のメモリカード等)、光記録媒体・光磁気記録媒体(例えば、DVD(Digital Versatile Disc)、MO(Magneto Optical Disc)、MD(Mini Disc)、CD(Compact Disc)、BD (Blu-ray(登録商標) Disk) 等)、磁気記録媒体(例えば、磁気テープ、フレキシブルディスク等)等の何れであってもよい。また、ロードしたプログラムを実行することにより、上述した実施形態の機能が実現されるだけでなく、そのプログラムの指示に基づき、オペレーティングシステムあるいは他のアプリケーションプログラム等と共同して処理することにより、本発明の機能が実現される場合もある。 Here, the recording medium for storing the program may be any of semiconductor media (e.g., ROM, non-volatile memory cards, etc.), optical recording media/magneto-optical recording media (e.g., DVD (Digital Versatile Disc), MO (Magneto Optical Disc), MD (Mini Disc), CD (Compact Disc), BD (Blu-ray (registered trademark) Disc), etc.), and magnetic recording media (e.g., magnetic tape, flexible disks, etc.). Furthermore, not only are the functions of the above-described embodiments realized by executing the loaded program, but the functions of the present invention may also be realized by processing in cooperation with an operating system or other application programs, etc., based on the program's instructions.
また、市場に流通させる場合には、可搬型の記録媒体にプログラムを格納して流通させたり、インターネット等のネットワークを介して接続されたサーバコンピュータに転送したりすることができる。この場合、サーバコンピュータの記憶装置も本発明に含まれるのは勿論である。 Furthermore, when distributing the program on the market, it can be stored on a portable recording medium and distributed, or transferred to a server computer connected via a network such as the Internet. In this case, the storage device of the server computer is of course also included in the present invention.
10 画像形成装置
100 制御部
102 画像処理部
104 出力モード設定部
106 原稿特性判定部
108 文字矩形抽出部
110 文字列抽出部
112 解像度推定部
114 圧縮率判定部
120 画像入力部
130 画像形成部
140 表示部
150 操作部
160 記憶部
162 文字矩形情報記憶領域
164 文字列領域情報記憶領域
166 解像度対応テーブル
168 文字矩形数比率テーブル
170 積算範囲テーブル
190 通信部
10 Image forming apparatus 100 Control unit 102 Image processing unit 104 Output mode setting unit 106 Document characteristic determination unit 108 Character rectangle extraction unit 110 Character string extraction unit 112 Resolution estimation unit 114 Compression rate determination unit 120 Image input unit 130 Image forming unit 140 Display unit 150 Operation unit 160 Storage unit 162 Character rectangle information storage area 164 Character string area information storage area 166 Resolution correspondence table 168 Character rectangle number ratio table 170 Accumulation range table 190 Communication unit
Claims (10)
前記画像を出力するときの圧縮率を判定する圧縮率判定部と、
前記画像を前記圧縮率判定部において判定された圧縮率を用いて圧縮した出力画像を出力する出力部と、
を備え、
前記圧縮率判定部は、
前記画像に含まれるそれぞれの文字の文字サイズを取得し、
1文字分の文字に対応する画素から複数の矩形が抽出された場合に、当該複数の矩形を連結する処理を実行し、
前記文字を文字サイズに応じて予め定められた文字サイズの範囲の何れかに分類し、
分類された前記文字の数に応じて圧縮率を判定する
ことを特徴とする画像処理装置。 an input unit for inputting an image of a document;
a compression rate determination unit that determines a compression rate when outputting the image;
an output unit that outputs an output image obtained by compressing the image using the compression rate determined by the compression rate determination unit;
Equipped with
The compression ratio determination unit
Obtaining the character size of each character included in the image;
When a plurality of rectangles are extracted from pixels corresponding to one character, a process of connecting the plurality of rectangles is performed;
classifying the characters into a predetermined range of character sizes according to the character sizes;
An image processing device comprising: a processor for processing an image; a processor for processing an image;
前記圧縮率判定部は、前記解像度推定部によって推定された解像度に基づき、前記文字サイズの範囲を設定することを特徴とする請求項1に記載の画像処理装置。 further comprising a resolution estimation unit that estimates a resolution when the image is output;
The image processing device according to claim 1 , wherein the compression rate determination unit sets the range of character sizes based on the resolution estimated by the resolution estimation unit.
分類された前記文字の数に重み付けを行い、
重み付けを行った値のうち、最も大きい値となった前記文字サイズの範囲に基づいて圧縮率を判定する
ことを特徴とする請求項1又は2に記載の画像処理装置。 The compression ratio determination unit
weighting the number of classified characters;
3. The image processing device according to claim 1, wherein the compression ratio is determined based on the range of character sizes that has the largest weighted value.
前記出力部は、前記原稿が文字を含まない原稿である場合、予め定められた圧縮率を用いて圧縮した前記出力画像を出力することを特徴とする請求項1から3の何れか一項に記載の画像処理装置。 a document characteristic determination unit that determines whether the document characteristic is a document including characters;
4. The image processing apparatus according to claim 1, wherein the output unit outputs the output image compressed using a predetermined compression rate when the document does not contain characters.
前記画像から文字列を抽出し、
前記文字の文字サイズを、当該文字が含まれる前記文字列の高さに基づいて取得し、
前記文字列の高さと同じ長さの横幅の長さに対応する位置までに位置する前記矩形を連結し、
連結後の前記矩形に基づき、前記文字サイズを取得する
ことを特徴とする請求項1から4の何れか一項に記載の画像処理装置。 The compression ratio determination unit
Extracting a character string from the image;
obtaining a character size of the character based on the height of the character string including the character;
The rectangles located up to a position corresponding to a width having the same length as the height of the character string are connected together,
The image processing device according to claim 1 , wherein the character size is obtained based on the rectangle after the concatenation.
前記圧縮率判定部は、
前記文字列の縦方向に隣接した前記矩形を連結する
ことを特徴とする請求項5に記載の画像処理装置。 The character is extracted as a rectangle circumscribing the pixels that make up the character,
The compression ratio determination unit
The image processing device according to claim 5 , wherein the rectangles adjacent in the vertical direction of the character string are connected.
前記圧縮率判定部は、前記解像度推定部によって判定された解像度及び前記出力モード設定部によって設定された前記出力モードに基づき、前記文字サイズの範囲を設定することを特徴とする請求項2に記載の画像処理装置。 further comprising an output mode setting unit that sets an output mode;
3. The image processing device according to claim 2, wherein the compression rate determination unit sets the range of character sizes based on the resolution determined by the resolution estimation unit and the output mode set by the output mode setting unit.
前記圧縮率判定部は、
前記出力モードが前記第1のモードである場合、分類された前記文字の数が最も大きい前記文字サイズの範囲に基づいて圧縮率を判定し、
前記出力モードが前記第2のモードである場合は、分類された前記文字のうち、最もサイズが小さい前記文字が分類された前記文字サイズの範囲に基づいて圧縮率を判定する、
前記出力モードが前記第3のモードである場合は、分類された前記文字の数に重み付けを行い、重み付けを行った値のうち、最も大きい値となった前記文字サイズの範囲に基づいて圧縮率を判定し、
ことを特徴とする請求項7に記載の画像処理装置。 the output mode is one of a first mode that prioritizes compression rate, a second mode that prioritizes character quality, and a third mode that balances compression rate and character quality;
The compression ratio determination unit
If the output mode is the first mode, determining a compression ratio based on the range of character sizes in which the number of classified characters is the largest;
If the output mode is the second mode, the compression ratio is determined based on the range of character sizes into which the smallest character among the classified characters is classified.
If the output mode is the third mode, weighting is performed on the number of classified characters, and a compression rate is determined based on the range of character sizes that has the largest weighted value among the weighted values;
8. The image processing device according to claim 7,
原稿の画像を入力する入力ステップと、
前記画像を出力するときの圧縮率を判定する圧縮率判定ステップと、
前記画像を前記圧縮率判定ステップにおいて判定された圧縮率を用いて圧縮した出力画像を出力する出力ステップと、
を備え、
前記圧縮率判定ステップは、
前記画像に含まれるそれぞれの文字の文字サイズを取得し、
1文字分の文字に対応する画素から複数の矩形が抽出された場合に、当該複数の矩形を連結する処理を実行し、
前記文字を文字サイズに応じて、予め定められた文字サイズの範囲の何れかに分類し、
分類された前記文字の数に応じて圧縮率を判定する
ことを特徴とする制御方法。 A control method for an image processing device, comprising:
an input step of inputting an image of a manuscript;
a compression rate determination step of determining a compression rate when outputting the image;
an output step of compressing the image using the compression rate determined in the compression rate determination step and outputting the output image;
Equipped with
The compression ratio determination step
Obtaining the character size of each character included in the image;
When a plurality of rectangles are extracted from pixels corresponding to one character, a process of connecting the plurality of rectangles is performed;
classifying the characters into a predetermined range of character sizes according to the character sizes;
A control method comprising determining a compression rate according to the number of classified characters.
前記画像から文字列を抽出し、
前記文字の文字サイズを、当該文字が含まれる前記文字列の高さに基づいて取得し、
前記文字列の高さと同じ長さの横幅の長さに対応する位置までに位置する前記矩形を連結し、
連結後の前記矩形に基づき、前記文字サイズを取得する
請求項9に記載の制御方法。 The compression ratio determination step
Extracting a character string from the image;
obtaining a character size of the character based on the height of the character string including the character;
The rectangles located up to a position corresponding to a width having the same length as the height of the character string are connected together,
The control method according to claim 9 , further comprising obtaining the character size based on the connected rectangle.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021162787A JP7798520B2 (en) | 2021-10-01 | 2021-10-01 | Image processing device and image processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021162787A JP7798520B2 (en) | 2021-10-01 | 2021-10-01 | Image processing device and image processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2023053632A JP2023053632A (en) | 2023-04-13 |
| JP7798520B2 true JP7798520B2 (en) | 2026-01-14 |
Family
ID=85873245
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021162787A Active JP7798520B2 (en) | 2021-10-01 | 2021-10-01 | Image processing device and image processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7798520B2 (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005318146A (en) | 2004-04-28 | 2005-11-10 | Konica Minolta Business Technologies Inc | Image reader |
| JP2011118517A (en) | 2009-12-01 | 2011-06-16 | Fujifilm Corp | Document image generation server and program, and document browsing system |
| JP2016051914A (en) | 2014-08-28 | 2016-04-11 | シャープ株式会社 | Image processing apparatus, image processing system, computer program and recording medium |
-
2021
- 2021-10-01 JP JP2021162787A patent/JP7798520B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005318146A (en) | 2004-04-28 | 2005-11-10 | Konica Minolta Business Technologies Inc | Image reader |
| JP2011118517A (en) | 2009-12-01 | 2011-06-16 | Fujifilm Corp | Document image generation server and program, and document browsing system |
| JP2016051914A (en) | 2014-08-28 | 2016-04-11 | シャープ株式会社 | Image processing apparatus, image processing system, computer program and recording medium |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2023053632A (en) | 2023-04-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7884977B2 (en) | Method, device and computer program for processing input data concerning generation of electronic files | |
| US6668101B2 (en) | Image processing apparatus and method, and computer-readable memory | |
| CN101388073B (en) | Image checking device, image checking method and image data input processing device | |
| US7805022B2 (en) | Image processing apparatus, image processing method and computer program | |
| US10574839B2 (en) | Image processing apparatus, method and storage medium for acquiring character information from scanned image | |
| CN100517372C (en) | Image forming apparatus that automatically creates an index and a method thereof | |
| US8059895B2 (en) | Image processing apparatus | |
| US20200134309A1 (en) | Image processing apparatus, method for controlling image processing apparatus, and storage medium | |
| US8538154B2 (en) | Image processing method and image processing apparatus for extracting heading region from image of document | |
| US7957576B2 (en) | Image processing apparatus, image processing method, and image processing program | |
| JP2011008549A (en) | Image processor, image reader, multifunctional machine, image processing method, program, and recording medium | |
| US8837818B2 (en) | Document image processing apparatus, document image processing method, and computer-readable recording medium having recorded document image processing program | |
| JP4240107B2 (en) | Region determination method, region determination device, image processing device, and computer program | |
| JP6197840B2 (en) | Image processing apparatus, electronic file generation method, and program | |
| US20050226503A1 (en) | Scanned image content analysis | |
| US11283963B2 (en) | Image processing apparatus and image processing method and storage medium | |
| JP7798520B2 (en) | Image processing device and image processing method | |
| US11948342B2 (en) | Image processing apparatus, image processing method, and non-transitory storage medium for determining extraction target pixel | |
| JP2010057017A (en) | Image processing apparatus and method | |
| JP4396710B2 (en) | Image processing apparatus, image processing apparatus control method, and image processing apparatus control program | |
| JP7705468B2 (en) | Information processing system, document type identification method, model generation method and program | |
| US11924390B2 (en) | Apparatus, method, and storage medium for performing color reduction processing | |
| US7969618B2 (en) | Image forming apparatus, image forming system, computer readable recording medium, and image forming method | |
| US11288536B2 (en) | Image processing apparatus, image processing method, and non-transitory computer-readable storage medium | |
| US20060215187A1 (en) | Image processing apparatus and image processing method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240919 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20250527 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20250603 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20250728 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20250930 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20251024 |
|
| 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: 20251202 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20251225 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7798520 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |