JP3756499B2 - Image reduction method, image reduction apparatus, image reduction program, and storage medium storing the program - Google Patents

Image reduction method, image reduction apparatus, image reduction program, and storage medium storing the program Download PDF

Info

Publication number
JP3756499B2
JP3756499B2 JP2003345761A JP2003345761A JP3756499B2 JP 3756499 B2 JP3756499 B2 JP 3756499B2 JP 2003345761 A JP2003345761 A JP 2003345761A JP 2003345761 A JP2003345761 A JP 2003345761A JP 3756499 B2 JP3756499 B2 JP 3756499B2
Authority
JP
Japan
Prior art keywords
image
reference pattern
linear density
similarity
reduction
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.)
Expired - Fee Related
Application number
JP2003345761A
Other languages
Japanese (ja)
Other versions
JP2005114825A (en
Inventor
大輔 山下
秀明 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2003345761A priority Critical patent/JP3756499B2/en
Priority to CNB2004800289209A priority patent/CN100449607C/en
Priority to PCT/JP2004/014211 priority patent/WO2005034079A1/en
Publication of JP2005114825A publication Critical patent/JP2005114825A/en
Application granted granted Critical
Publication of JP3756499B2 publication Critical patent/JP3756499B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/36Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
    • G09G5/363Graphics controllers
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/36Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
    • G09G5/39Control of the bit-mapped memory
    • G09G5/391Resolution modifying circuits, e.g. variable screen formats
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2340/00Aspects of display data processing
    • G09G2340/04Changes in size, position or resolution of an image
    • G09G2340/0407Resolution change, inclusive of the use of different resolutions for different screen areas

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Graphics (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Analysis (AREA)

Description

この発明は画像縮小方法、画像縮小装置、画像縮小プログラム、および該プログラムを記憶した記憶媒体に関し、特に、最適な縮小率が自動的に決定される画像縮小方法、画像縮小装置、画像縮小プログラム、および該プログラムを記憶した記憶媒体に関する。   The present invention relates to an image reduction method, an image reduction device, an image reduction program, and a storage medium storing the program, and in particular, an image reduction method, an image reduction device, an image reduction program, and an automatic reduction ratio that are automatically determined. And a storage medium storing the program.

従来、電子化文書を閲覧するためのプラットフォームとしてはパーソナルコンピュータが一般的であったが、近年、PDA(Personal Digital Assistants)や携帯電話などの携帯端末においても電子化文書を閲覧することができるようになってきている。たとえば、従来はパーソナルコンピュータでしか閲覧できなかったHTML(Hypertext Markup Language)形式やPDF(Portable Document Format)形式の電子化文書の閲覧用ソフトウェアが、現在、携帯端末に対しても提供されている。   Conventionally, a personal computer has been generally used as a platform for browsing an electronic document. However, in recent years, an electronic document can be viewed on a portable terminal such as a PDA (Personal Digital Assistants) or a mobile phone. It is becoming. For example, software for browsing digitized documents in HTML (Hypertext Markup Language) format or PDF (Portable Document Format) format, which has conventionally been browsed only by a personal computer, is also provided for mobile terminals.

ところで、パーソナルコンピュータ上で作成された電子化文書に画像が含まれていると、携帯端末のディスプレイでその電子化文書を閲覧する際に、当該画像が携帯端末のディスプレイの表示範囲をはみ出してしまう場合がある。そこで、当該画像をディスプレイの表示範囲に収まるように縮小することで、携帯端末のディスプレイの表示範囲内で表示可能とするのが一般的である。   By the way, if an electronic document created on a personal computer includes an image, when the electronic document is viewed on the display of the mobile terminal, the image protrudes from the display range of the mobile terminal. There is a case. Therefore, it is general that the image can be displayed within the display range of the mobile terminal by reducing the image so as to be within the display range of the display.

しかしながら、表やグラフなどのように、当該画像内に文字が存在する場合に、単純に当該画像を縮小してしまうと、文字部分が縮小されてつぶれてしまい、文字が読めなくなる場合があるという問題がある。   However, when there are characters in the image, such as a table or graph, if the image is simply reduced, the character part may be reduced and collapsed, making it impossible to read the characters. There's a problem.

特許文献1には、上記のような問題を解決するために、文字画像を十分に縮小しても文字の読取り可能な画像縮小方法が開示されている。すなわち、特許文献1は、文字画像から、予め、漢字の1画に相当するストローク(縦方向または横方向の線分)を抽出しておくと共に、画像の縮小率に基づいて文字部分のストローク同士の融合が起こらないような最大ストローク数を求めておき、原画像から、予め最大ストローク数を超えるストロークを削除してから縮小する画像縮小方法を開示している。特許文献1で開示されている画像縮小方法を用いることで、文字画像を縮小した際にも文字のつぶれを防ぐことができる。
特開平7−281657号公報
Patent Document 1 discloses an image reduction method capable of reading a character even if the character image is sufficiently reduced in order to solve the above-described problem. That is, in Patent Document 1, strokes (vertical or horizontal line segments) corresponding to one stroke of a Chinese character are extracted from a character image in advance, and strokes of a character portion are based on the image reduction rate. An image reduction method is disclosed in which the maximum number of strokes that does not cause the fusion of the two is obtained, and the strokes exceeding the maximum number of strokes are deleted from the original image before reduction. By using the image reduction method disclosed in Patent Document 1, it is possible to prevent the characters from being crushed even when the character image is reduced.
JP-A-7-281657

しかしながら、特許文献1が開示している画像縮小方法には、以下のような問題がある。   However, the image reduction method disclosed in Patent Document 1 has the following problems.

すなわち、上記方法を用いて画像中の文字部分のストロークを削除してしまうと、画像中の文字の背景部分に色や模様が描かれていた場合に、その色や模様の一部が抜けた状態になってしまうという問題がある。   That is, if the stroke of the character part in the image is deleted using the above method, if the color or pattern is drawn on the background part of the character in the image, part of the color or pattern is lost. There is a problem of becoming a state.

また、画像を縮小しすぎてしまうと、上記方法を用いても文字部分のつぶれを回避することができなくなってしまうため、文字部分のつぶれが起きない範囲で適切な縮小率の画像を得るためには、画像の縮小率を様々に変更して上記の方法を適用し、その結果を人間が目視で確認しなければならず煩雑である、という問題がある。   In addition, if the image is reduced too much, it will not be possible to avoid crushing the character part even if the above method is used. Therefore, in order to obtain an image with an appropriate reduction ratio within a range where the character part does not crush. However, there is a problem in that the above-described method is applied with various reduction rates of the image, and the result must be confirmed visually by a human.

本発明はこれらの問題に鑑みてなされたものであって、文字などのある程度複雑な図形を含む画像を縮小する際に、該図形の可読性を損なわない範囲での最適な縮小率を自動的に決定することが可能な画像縮小方法、画像縮小装置、画像縮小プログラム、および該プログラムを記憶した記憶媒体を提供することを目的とする。   The present invention has been made in view of these problems. When an image including a somewhat complicated figure such as a character is reduced, an optimum reduction ratio within a range that does not impair the readability of the figure is automatically set. An object is to provide an image reduction method, an image reduction apparatus, an image reduction program, and a storage medium storing the program, which can be determined.

上記目的を達成するために、本発明のある局面に従うと、画像縮小方法は、画像を画像縮小装置に対して入力する入力ステップと、画像の少なくとも一部分の線密度を算出する第1の線密度算出ステップと、第1の線密度算出ステップで算出された画像の線密度に基づいて、上記画像から、特定の部分を第1の参照パターンとして抽出する第1の参照パターン抽出ステップと、入力された画像の縮小率である第1の縮小率を決定する第1の縮小率決定ステップと、第1の縮小率で画像を縮小して生成された縮小画像から、第1の参照パターンに対応する部分を第2の参照パターンとして抽出する第2の参照パターン抽出ステップと、第2の参照パターンの線密度を算出する第2の線密度算出ステップと、第1の線密度算出ステップで算出された第1の参照パターンの線密度と、第2の線密度算出ステップで算出された第2の参照パターンの線密度とに基づいて、第1の参照パターンと第2の参照パターンとの間の類似度を算出する類似度算出ステップと、類似度と第1の縮小率とに基づいて、上記画像の第2の縮小率を決定する第2の縮小率決定ステップとを備える。 In order to achieve the above object, according to one aspect of the present invention, an image reduction method includes an input step of inputting an image to an image reduction device, and a first linear density for calculating a linear density of at least a part of the image. A first reference pattern extracting step for extracting a specific portion as a first reference pattern from the image based on the line density of the image calculated in the calculating step and the first line density calculating step is input. Corresponding to the first reference pattern from the first reduction rate determining step for determining the first reduction rate, which is the reduction rate of the image, and the reduced image generated by reducing the image at the first reduction rate. a second reference pattern extraction step of extracting a portion as the second reference pattern, and a second linear density calculation step of calculating the linear density of the second reference pattern, is calculated by the first linear density calculation step And linear density of the first reference pattern, based on the linear density of the second reference pattern calculated by the second linear density calculation step, similar between the first reference pattern and the second reference pattern A similarity calculating step for calculating a degree; and a second reduction rate determining step for determining a second reduction rate of the image based on the similarity and the first reduction rate.

さらに、第1の参照パターン抽出ステップは、第1の線密度算出ステップで算出された線密度が最大である特定の部分を第1の参照パターンとして抽出することがより好ましい。 Furthermore, it is more preferable that the first reference pattern extracting step extracts a specific portion having the maximum linear density calculated in the first linear density calculating step as the first reference pattern.

また、第1の参照パターン抽出ステップは、文字部分である特定の部分を第1の参照パターンとして抽出することが好ましい。   Moreover, it is preferable that a 1st reference pattern extraction step extracts the specific part which is a character part as a 1st reference pattern.

また、第1の参照パターン抽出ステップにおいて第1の参照パターンが複数抽出された場合、類似度算出ステップは、複数の第1の参照パターンごとに、第1の参照パターンと第1の参照パターンに対応する第2の参照パターンとの間の類似度を算出し、算出された複数の第1の参照パターンごとの類似度の関係に基づいて、入力された画像と縮小画像との類似度を算出することが好ましい。   In addition, when a plurality of first reference patterns are extracted in the first reference pattern extraction step, the similarity calculation step calculates the first reference pattern and the first reference pattern for each of the plurality of first reference patterns. The similarity between the corresponding second reference patterns is calculated, and the similarity between the input image and the reduced image is calculated based on the calculated similarity relationship for each of the first reference patterns. It is preferable to do.

さらに、類似度算出ステップは、複数の第1の参照パターンごとの類似度の平均値を、入力された画像と縮小画像との類似度とすることがより好ましい。   Furthermore, it is more preferable that the similarity calculation step sets the average value of the similarity for each of the plurality of first reference patterns as the similarity between the input image and the reduced image.

または、画像縮小方法は、第1の参照パターン抽出ステップにおいて文字部分である第1の参照パターンが複数抽出された場合、複数の第1の参照パターンの各々の文字らしさを算出する文字らしさ算出ステップをさらに備え、類似度算出ステップは、複数の第1の参照パターンごとの類似度の各々に、複数の第1の参照パターンごとの文字らしさを重みとして乗じた合計値を、入力された画像と縮小画像との類似度とすることがより好ましい。   Alternatively, in the image reduction method, when a plurality of first reference patterns, which are character parts, are extracted in the first reference pattern extraction step, a character likelihood calculation step of calculating the character likelihood of each of the plurality of first reference patterns. The similarity calculation step includes a step of multiplying each of the similarities for each of the plurality of first reference patterns by a character value for each of the plurality of first reference patterns as a weight, and the input image. More preferably, the degree of similarity with the reduced image is set.

また、類似度算出ステップは、第1の線密度算出ステップで算出された第1の参照パターンの線密度の分布と、第2の線密度算出ステップで算出された第2の参照パターンの線密度の分布とに基づいて、第1の参照パターンと第2の参照パターンとの間の類似度を算出することが好ましい。 The similarity calculation step includes the distribution of the line density of the first reference pattern calculated in the first line density calculation step and the line density of the second reference pattern calculated in the second line density calculation step. It is preferable to calculate the similarity between the first reference pattern and the second reference pattern based on the distribution of.

また、第2の縮小率決定ステップは、予め設定された縮小画像のサイズに対応した縮小率を下限値として、第2の縮小率を決定することが好ましい。   In the second reduction ratio determination step, it is preferable to determine the second reduction ratio using a reduction ratio corresponding to a preset size of the reduced image as a lower limit.

本発明の他の局面に従うと、画像縮小装置は、画像を取得する取得手段と、取得した画像の少なくとも一部分の線密度を算出する第1の線密度算出手段と、第1の線密度算出手段で算出された前記画像の線密度に基づいて、上記画像から、特定の部分を第1の参照パターンとして抽出する第1の参照パターン抽出手段と、取得した画像の縮小率である第1の縮小率を決定する第1の縮小率決定手段と、第1の縮小率で取得した画像を縮小して生成された縮小画像から、第1の参照パターンに対応する部分を第2の参照パターンとして抽出する第2の参照パターン抽出手段と、第2の参照パターンの線密度を算出する第2の線密度算出手段と、第1の線密度算出手段で算出された第1の参照パターンの線密度と、第2の線密度算出手段で算出された第2の参照パターンの線密度とに基づいて、第1の参照パターンと第2の参照パターンとの間の類似度を算出する類似度算出手段と、類似度と第1の縮小率とに基づいて、上記画像の第2の縮小率を決定する第2の縮小率決定手段とを備える。 According to another aspect of the present invention, the image reduction device includes an acquisition unit that acquires an image, a first linear density calculation unit that calculates a linear density of at least a part of the acquired image, and a first linear density calculation unit. And a first reference pattern extracting means for extracting a specific portion as a first reference pattern from the image based on the line density of the image calculated in step 1; and a first reduction which is a reduction ratio of the acquired image A portion corresponding to the first reference pattern is extracted as a second reference pattern from the reduced image generated by reducing the image acquired at the first reduction rate and the first reduction rate determining means for determining the rate Second reference pattern extraction means, second linear density calculation means for calculating the linear density of the second reference pattern, and linear density of the first reference pattern calculated by the first linear density calculation means Calculated by the second linear density calculation means It was based on the linear density of the second reference pattern, and similarity calculation means for calculating a similarity between the first reference pattern and the second reference pattern, the degree of similarity and the first reduction factor And a second reduction ratio determining means for determining a second reduction ratio of the image based on the second reduction ratio.

さらに、第1の参照パターン抽出手段は、第1の線密度算出手段で算出された線密度が最大である特定の部分を第1の参照パターンとして抽出することがより好ましい。 Furthermore, it is more preferable that the first reference pattern extraction unit extracts a specific portion having the maximum linear density calculated by the first linear density calculation unit as the first reference pattern.

また、第1の参照パターン抽出手段は、文字部分である特定の部分を第1の参照パターンとして抽出することが好ましい。   Moreover, it is preferable that a 1st reference pattern extraction means extracts the specific part which is a character part as a 1st reference pattern.

また、第1の参照パターン抽出手段において第1の参照パターンが複数抽出された場合、類似度算出手段は、複数の第1の参照パターンごとに、第1の参照パターンと第1の参照パターンに対応する第2の参照パターンとの間の類似度を算出し、算出された複数の第1の参照パターンごとの類似度の関係に基づいて、入力された画像と縮小画像との類似度を算出することが好ましい。   In addition, when a plurality of first reference patterns are extracted by the first reference pattern extraction unit, the similarity calculation unit calculates the first reference pattern and the first reference pattern for each of the plurality of first reference patterns. The similarity between the corresponding second reference patterns is calculated, and the similarity between the input image and the reduced image is calculated based on the calculated similarity relationship for each of the first reference patterns. It is preferable to do.

さらに、類似度算出手段は、複数の第1の参照パターンごとの類似度の平均値を、入力された画像と縮小画像との類似度とすることがより好ましい。   Further, it is more preferable that the similarity calculation means sets the average value of the similarity for each of the plurality of first reference patterns as the similarity between the input image and the reduced image.

または、画像縮小方法は、第1の参照パターン抽出手段において文字部分である第1の参照パターンが複数抽出された場合、複数の第1の参照パターンの各々の文字らしさを算出する文字らしさ算出手段をさらに備え、類似度算出手段は、複数の第1の参照パターンごとの類似度の各々に、複数の第1の参照パターンごとの文字らしさを重みとして乗じた合計値を、入力された画像と縮小画像との類似度とすることがより好ましい。   Alternatively, in the image reduction method, when a plurality of first reference patterns, which are character parts, are extracted by the first reference pattern extraction unit, the character likelihood calculation unit calculates the character likelihood of each of the plurality of first reference patterns. The similarity calculation means further includes a total value obtained by multiplying each of the similarities for each of the plurality of first reference patterns by using the character likelihood of each of the plurality of first reference patterns as a weight, and the input image. More preferably, the degree of similarity with the reduced image is set.

また、類似度算出手段は、第1の線密度算出手段で算出された第1の参照パターンの線密度の分布と、第2の線密度算出手段で算出された第2の参照パターンの線密度の分布とに基づいて、第1の参照パターンと第2の参照パターンとの間の類似度を算出することが好ましい。 In addition, the similarity calculation unit includes the distribution of the line density of the first reference pattern calculated by the first line density calculation unit and the line density of the second reference pattern calculated by the second line density calculation unit. It is preferable to calculate the similarity between the first reference pattern and the second reference pattern based on the distribution of.

また、第2の縮小率決定手段は、予め設定された縮小画像のサイズに対応した縮小率を下限値として、第2の縮小率を決定することが好ましい。   Further, it is preferable that the second reduction rate determination means determines the second reduction rate with a reduction rate corresponding to a preset size of the reduced image as a lower limit value.

本発明のさらに他の局面に従うと、画像縮小プログラムは、取得した第1の画像を縮小
して第2の画像を得る画像縮小方法をコンピュータに実行させる画像縮小プログラムであって、画像縮小装置に入力された第1の画像の少なくとも一部分の線密度を算出する第1の線密度算出ステップと、第1の線密度算出ステップで算出された第1の画像の線密度に基づいて、第1の画像から、特定の部分を第1の参照パターンとして抽出する第1の参照パターン抽出ステップと、第1の画像の縮小率である第1の縮小率を決定する第1の縮小率決定ステップと、第1の縮小率で第1の画像を縮小して生成された縮小画像から、第1の参照パターンに対応する部分を第2の参照パターンとして抽出する第2の参照パターン抽出ステップと、第2の参照パターンの線密度を算出する第2の線密度算出ステップと、第1の線密度算出ステップで算出された第1の参照パターンの線密度と、第2の線密度算出ステップで算出された第2の参照パターンの線密度とに基づいて、第1の参照パターンと第2の参照パターンとの間の類似度を算出する類似度算出ステップと、類似度と第1の縮小率とに基づいて、第1の画像を第2の画像に縮小する第2の縮小率を決定する第2の縮小率決定ステップとを実行させる。
According to yet another aspect of the present invention, image reduction program is an image reduction program for executing the image reduction method for obtaining a second image by reducing the first image obtained in the computer, the image reduction device a first linear density calculation step of calculating a linear density of at least a portion of the first image input, based on the linear density of the first image calculated by the first linear density calculation step, the first A first reference pattern extraction step for extracting a specific portion from the image as a first reference pattern; a first reduction rate determination step for determining a first reduction rate that is a reduction rate of the first image; from the first of the first reduced image image generated by reducing the in reduction ratio, the second reference pattern extraction step of extracting a portion corresponding to the first reference pattern as the second reference pattern, the second Reference path A second linear density calculation step of calculating a linear density of over emissions, the a linear density of the first reference pattern calculated by the first linear density calculating step, calculated in the second linear density calculation step A similarity calculation step of calculating a similarity between the first reference pattern and the second reference pattern based on the line density of the second reference pattern, and based on the similarity and the first reduction ratio And a second reduction ratio determining step for determining a second reduction ratio for reducing the first image to the second image.

本発明のさらに他の局面に従うと、記憶媒体はコンピュータ読取可能な記憶媒体であって、上述の画像縮小プログラムを記憶する。   According to still another aspect of the present invention, the storage medium is a computer-readable storage medium and stores the above-described image reduction program.

以下に、図面を参照しつつ、本発明の実施の形態について説明する。以下の説明では、同一の部品および構成要素には同一の符号を付してある。それらの名称および機能も同じである。したがってそれらについての詳細な説明は繰返さない。   Embodiments of the present invention will be described below with reference to the drawings. In the following description, the same parts and components are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed description thereof will not be repeated.

図1は、本発明の実施の形態にかかる画像縮小装置1の構成の具体例を示すブロック図である。本実施の形態において、本発明にかかる画像縮小装置は携帯電話やPDA(Personal Digital Assistants)などの小型携帯式の端末装置であるものとして説明を行なう。しかし、かかる装置は本発明にかかる画像縮小装置の1つの具体例であって、本発明にかかる画像縮小装置はこれらの装置に限定されない。   FIG. 1 is a block diagram showing a specific example of the configuration of the image reduction device 1 according to the embodiment of the present invention. In the present embodiment, the image reduction device according to the present invention will be described as a small portable terminal device such as a mobile phone or a PDA (Personal Digital Assistants). However, such an apparatus is one specific example of the image reduction apparatus according to the present invention, and the image reduction apparatus according to the present invention is not limited to these apparatuses.

図1を参照して、本実施の形態における画像縮小装置1の全体は制御部101によって制御される。制御部101は、CPU(Central Processing Unit)等から構成され、記憶部102からプログラムを読出して実行し、入出力部106等に対して制御信号を出力して画像縮小装置1全体を制御する。   Referring to FIG. 1, the entire image reduction apparatus 1 in the present embodiment is controlled by a control unit 101. The control unit 101 includes a CPU (Central Processing Unit) and the like, reads a program from the storage unit 102 and executes the program, and outputs a control signal to the input / output unit 106 and the like to control the entire image reduction apparatus 1.

記憶部102は、ROM(Read Only Memory)やRAM(Random Access Memory)等のメモリやHD(Hard Disc)等の磁気ディスクなどから構成され、制御部101で実行されるプログラムを記憶する。また、記憶部102は、制御部101でプログラムを実行する際の一時的な記憶領域ともなる。   The storage unit 102 includes a memory such as a ROM (Read Only Memory) and a RAM (Random Access Memory), a magnetic disk such as an HD (Hard Disc), and the like, and stores a program executed by the control unit 101. The storage unit 102 also serves as a temporary storage area when the control unit 101 executes a program.

入出力部106は、画像縮小装置1が携帯電話等の通信機能を備える装置の場合には、制御部101から入力された制御信号に応じて該通信機能を発揮して外部装置と通信し、外部記憶装置103やネットワーク104を介して他の装置から、画像縮小装置1での縮小対象となる画像(以下、元画像と言う)データを取得する。また、入出力部106は、制御部101から入力された制御信号に応じてフレキシブルディスクやCD−ROM(Compact Disc-Read Only Memory)などの記憶媒体から情報を読取り、元画像データを取得してもよい。入出力部106は、取得した元画像データを記憶部102に渡す。そして、記憶部102は、入出力部106から入力された元画像データを、所定領域に記憶する。   When the image reduction device 1 is a device having a communication function such as a mobile phone, the input / output unit 106 exhibits the communication function according to a control signal input from the control unit 101 and communicates with an external device. Image data (hereinafter referred to as an original image) to be reduced by the image reduction device 1 is acquired from another device via the external storage device 103 or the network 104. The input / output unit 106 reads information from a storage medium such as a flexible disk or a CD-ROM (Compact Disc-Read Only Memory) in accordance with a control signal input from the control unit 101, and acquires original image data. Also good. The input / output unit 106 passes the acquired original image data to the storage unit 102. Then, the storage unit 102 stores the original image data input from the input / output unit 106 in a predetermined area.

制御部101は、記憶部102の所定領域から元画像データを読出して、プログラムを実行して該元画像データに対して画像縮小処理を実行する。そして、制御部106は、画像縮小処理において決定された最終の縮小率、または該縮小率で元画像を縮小した画像の画像データを入出力部106に渡す。入出力部106は、制御部101から渡された最終の縮小率、または該縮小率で元画像を縮小した画像の画像データを、外部記憶装置103に出力してもよいし、ネットワーク104を介して他の装置に出力してもよい。また、入出力部106は、該縮小率で元画像を縮小した画像の画像データを表示部105に対して出力してもよい。   The control unit 101 reads original image data from a predetermined area of the storage unit 102, executes a program, and executes image reduction processing on the original image data. Then, the control unit 106 passes the final reduction rate determined in the image reduction process or image data of an image obtained by reducing the original image at the reduction rate to the input / output unit 106. The input / output unit 106 may output the final reduction rate passed from the control unit 101 or image data of an image obtained by reducing the original image at the reduction rate to the external storage device 103 or via the network 104. May be output to other devices. The input / output unit 106 may output image data of an image obtained by reducing the original image at the reduction ratio to the display unit 105.

表示部105は、画像縮小装置1とLAN(Local Area Network)等の専用回線や電話回線や無線通信網などで有線または無線接続されたプリンタやディスプレイなどの情報出力装置である。なお、本実施の形態においては、表示部105は画像縮小装置1と接続された外部機器であるものとしているが、言うまでもなく表示部105は画像縮小装置1に含まれて、制御部101とバスで接続されてもよい。たとえば、画像縮小装置1が携帯電話である場合には、表示部105は携帯電話に備えられるディスプレイが該当する。   The display unit 105 is an information output device such as a printer or a display that is wired or wirelessly connected to the image reduction device 1 via a dedicated line such as a LAN (Local Area Network), a telephone line, or a wireless communication network. In the present embodiment, the display unit 105 is assumed to be an external device connected to the image reduction device 1, but it goes without saying that the display unit 105 is included in the image reduction device 1 and is connected to the control unit 101 and the bus. It may be connected with. For example, when the image reduction device 1 is a mobile phone, the display unit 105 corresponds to a display provided in the mobile phone.

さらに、制御部101は、プログラムを実行することによって発揮される機能の具体例について、図2に示される機能ブロック図を用いて説明する。   Furthermore, the control part 101 demonstrates the specific example of the function demonstrated by running a program using the functional block diagram shown by FIG.

図2を参照して、制御部101は、プログラムを実行することによって、二値画像変換部1010、参照パターン抽出部1011、画像縮小部1012、類似度算出部1013、縮小率算出部1014、連結成分抽出部1015、線密度算出部1016、カウンタ1017、縮小画像座標算出部1018、および縮小画像参照パターン抽出部1019の機能を発揮する。   Referring to FIG. 2, the control unit 101 executes a program to execute a binary image conversion unit 1010, a reference pattern extraction unit 1011, an image reduction unit 1012, a similarity calculation unit 1013, a reduction rate calculation unit 1014, a connection The functions of the component extraction unit 1015, the line density calculation unit 1016, the counter 1017, the reduced image coordinate calculation unit 1018, and the reduced image reference pattern extraction unit 1019 are exhibited.

制御部101は、プログラムを実行することによって、記憶部102の所定領域から元画像データを読出して二値画像変換部1010に渡す。二値画像変換部1010は、記憶部102から読出された元画像データを、白画素と黒画素とからなる二値画像に変換する。そして、二値画像変換部1010は、変換した二値画像である元画像の画像データを、連結成分抽出部1015と線密度算出部1016と参照パターン抽出部1011と画像縮小部1012とに渡す。   The control unit 101 reads out the original image data from the predetermined area of the storage unit 102 and passes it to the binary image conversion unit 1010 by executing the program. The binary image conversion unit 1010 converts the original image data read from the storage unit 102 into a binary image composed of white pixels and black pixels. Then, the binary image conversion unit 1010 passes the image data of the original image which is the converted binary image to the connected component extraction unit 1015, the line density calculation unit 1016, the reference pattern extraction unit 1011 and the image reduction unit 1012.

連結成分抽出部1015は、二値画像変換部1010から渡された二値画像である元画像の画像データより、黒画素の連結成分を抽出する。さらに、連結成分抽出部1015は、抽出された黒画素の連結成分すべてについて、その外接矩形を求め、その外接矩形の左上隅座標および右下隅座標を記憶部102に渡し、記憶部102の所定領域に記憶する。なお、以降においては、上記の連結成分の外接矩形を連結成分矩形と呼ぶ。   The connected component extraction unit 1015 extracts a connected component of black pixels from the image data of the original image that is a binary image passed from the binary image conversion unit 1010. Further, the connected component extraction unit 1015 obtains circumscribed rectangles for all the extracted connected components of the black pixels, passes the upper left corner coordinates and lower right corner coordinates of the circumscribed rectangles to the storage unit 102, and stores predetermined regions in the storage unit 102. To remember. In the following, the circumscribed rectangle of the connected component is referred to as a connected component rectangle.

線密度算出部1016は、記憶部102の所定領域に記憶される連結成分矩形の左上隅座標および右下隅座標を参照し、二値画像変換部1010から渡された二値画像である元画像の画像データより、各連結成分矩形中の線密度をカウンタ1017を用いて算出する。線密度とは、横方向または縦方向に二値画像を走査したときに、走査方向に対して垂直方向に横切る線分がどのくらい存在するかを表わす数値を指す。そして、線密度算出部1016は、その算出結果をカウンタ1017に格納する。   The line density calculation unit 1016 refers to the upper left corner coordinates and lower right corner coordinates of the connected component rectangle stored in the predetermined area of the storage unit 102, and converts the original image that is the binary image passed from the binary image conversion unit 1010. From the image data, the line density in each connected component rectangle is calculated using the counter 1017. The line density refers to a numerical value indicating how many line segments exist in a direction perpendicular to the scanning direction when a binary image is scanned in the horizontal direction or the vertical direction. Then, the line density calculation unit 1016 stores the calculation result in the counter 1017.

参照パターン抽出部1011は、カウンタ1017から読出した線密度の算出結果に基づいて、二値画像変換部1010から渡された二値画像である元画像の画像データより、参照パターンである連結成分矩形を抽出する。参照パターンについては後に詳述する。そして、参照パターン抽出部1011は、抽出した参照パターンである連結成分矩形の左上隅座標および右下隅座標を記憶部102に渡し、記憶部102の所定領域に記憶する。   Based on the line density calculation result read from the counter 1017, the reference pattern extraction unit 1011 uses a connected component rectangle that is a reference pattern from the image data of the original image that is a binary image passed from the binary image conversion unit 1010. To extract. The reference pattern will be described in detail later. Then, the reference pattern extraction unit 1011 passes the upper left corner coordinates and lower right corner coordinates of the connected component rectangle, which is the extracted reference pattern, to the storage unit 102 and stores it in a predetermined area of the storage unit 102.

縮小率算出部1014は、元画像の仮縮小率(プログラムによって仮に算出される縮小率)を算出する。そして、縮小率算出部1014は、算出した仮縮小率縮小率を、画像縮小部1012と縮小画像座標算出部1018とに渡す。また、必要に応じて記憶部102に渡し、記憶部102の所定領域に記憶する。   The reduction rate calculation unit 1014 calculates a temporary reduction rate of the original image (a reduction rate temporarily calculated by the program). Then, the reduction rate calculation unit 1014 passes the calculated temporary reduction rate reduction rate to the image reduction unit 1012 and the reduced image coordinate calculation unit 1018. Further, the data is transferred to the storage unit 102 as necessary and stored in a predetermined area of the storage unit 102.

画像縮小部1012は、縮小率算出部1014から渡された縮小率に基づいて、二値画像変換部1010から渡された二値画像である元画像を縮小する。そして、画像縮小部1012は、縮小した元画像(以降、縮小画像と呼ぶ)を、連結成分抽出部1015と類似度算出部1013とに渡す。   The image reduction unit 1012 reduces the original image, which is a binary image passed from the binary image conversion unit 1010, based on the reduction rate passed from the reduction rate calculation unit 1014. Then, the image reducing unit 1012 passes the reduced original image (hereinafter referred to as a reduced image) to the connected component extracting unit 1015 and the similarity calculating unit 1013.

連結成分抽出部1015は、画像縮小部1012から渡された縮小画像をより黒画素の連結成分を抽出し、連結成分矩形を抽出して該連結成分矩形の左上隅座標および右下隅座標を記憶部102に渡し、記憶部102の所定領域に記憶する。   The connected component extraction unit 1015 extracts a connected component of black pixels from the reduced image passed from the image reducing unit 1012, extracts a connected component rectangle, and stores the upper left corner coordinates and lower right corner coordinates of the connected component rectangle. 102, and stored in a predetermined area of the storage unit 102.

縮小画像座標算出部1018は、縮小率算出部1014から渡された縮小率と、記憶部102の所定領域から読出した元画像の参照パターンである連結成分矩形の左上隅座標および右下隅座標とに基づいて、元画像の参照パターンに対応する縮小画像内の座標値を算出する。そして、縮小画像座標算出部1018は、その算出結果を縮小画像参照パターン抽出部1019に渡す。   The reduced image coordinate calculation unit 1018 converts the reduction rate passed from the reduction rate calculation unit 1014 and the upper left corner coordinates and lower right corner coordinates of the connected component rectangle that is the reference pattern of the original image read from the predetermined area of the storage unit 102. Based on this, the coordinate value in the reduced image corresponding to the reference pattern of the original image is calculated. Then, the reduced image coordinate calculation unit 1018 passes the calculation result to the reduced image reference pattern extraction unit 1019.

縮小画像参照パターン抽出部1019は、縮小画像座標算出部1018から渡された元画像の参照パターンに対応する縮小画像内の座標値の算出結果に基づいて、記憶部102の所定領域から読出した縮小画像から抽出された連結成分矩形の中から、縮小画像の参照パターンである連結成分矩形を抽出する。そして、縮小画像参照パターン抽出部1019は、抽出した縮小画像の参照パターンである連結成分矩形の左上隅座標および右下隅座標を記憶部102に渡し、記憶部102の所定領域に記憶する。   The reduced image reference pattern extraction unit 1019 reads the reduced image read from the predetermined area of the storage unit 102 based on the calculation result of the coordinate value in the reduced image corresponding to the reference pattern of the original image passed from the reduced image coordinate calculation unit 1018. A connected component rectangle that is a reference pattern of the reduced image is extracted from the connected component rectangles extracted from the image. Then, the reduced image reference pattern extraction unit 1019 passes the upper left corner coordinates and lower right corner coordinates of the connected component rectangle, which is the extracted reduced image reference pattern, to the storage unit 102 and stores them in a predetermined area of the storage unit 102.

線密度算出部1016は、記憶部102の所定領域に記憶される縮小画像の参照パターンである連結成分矩形の左上隅座標および右下隅座標を参照し、画像縮小部1012から渡された縮小画像の画像データより、該連結成分矩形中の線密度をカウンタ1017を用いて算出する。そして、線密度算出部1016は、その算出結果を記憶部102に渡し、記憶部102の所定領域に記憶する。   The line density calculation unit 1016 refers to the upper left corner coordinates and lower right corner coordinates of the connected component rectangle that is the reference pattern of the reduced image stored in the predetermined area of the storage unit 102, and the reduced image passed from the image reduction unit 1012. From the image data, the line density in the connected component rectangle is calculated using the counter 1017. Then, the linear density calculation unit 1016 passes the calculation result to the storage unit 102 and stores it in a predetermined area of the storage unit 102.

類似度算出部1013は、カウンタ1017から読出した元画像の参照パターンである連結成分矩形の線密度の算出結果と、記憶部102の所定領域から読出した縮小画像の参照パターンである連結成分矩形の線密度の算出結果とから、元画像の参照パターンと縮小画像の参照パターンとの間の類似度を算出する。そして、類似度算出部1013は、算出された類似度を、縮小率算出部1014に渡す。   The similarity calculation unit 1013 calculates the line density of the connected component rectangle that is the reference pattern of the original image read from the counter 1017 and the connected component rectangle that is the reference pattern of the reduced image read from the predetermined area of the storage unit 102. The similarity between the reference pattern of the original image and the reference pattern of the reduced image is calculated from the calculation result of the line density. Then, the similarity calculation unit 1013 passes the calculated similarity to the reduction rate calculation unit 1014.

縮小率算出部1014は、類似度算出部1013から渡された類似度と、予め記憶部102の所定領域に格納されているしきい値とに基づいて、記憶部102の所定領域に格納されている先に算出した仮縮小率を所定の変化量だけ変化させ、その変化後の仮縮小率を、上述と同様に画像縮小部1012と縮小画像座標算出部1018とに渡す。また、必要に応じて記憶部102に渡し、記憶部102の所定領域に記憶する。   The reduction rate calculation unit 1014 is stored in a predetermined area of the storage unit 102 based on the similarity passed from the similarity calculation unit 1013 and the threshold value stored in the predetermined area of the storage unit 102 in advance. The temporary reduction ratio calculated earlier is changed by a predetermined change amount, and the temporary reduction ratio after the change is passed to the image reduction unit 1012 and the reduced image coordinate calculation unit 1018 as described above. Further, the data is transferred to the storage unit 102 as necessary and stored in a predetermined area of the storage unit 102.

さらに、縮小率算出部1014は、類似度算出部1013から渡された類似度と、予め記憶部102の所定領域に格納されているしきい値とに基づいて、その時点の直前の時点で算出された仮縮小率を最終の縮小率として決定する。そして、縮小率算出部1014は、記憶部102の所定領域に格納されている先に算出した仮縮小率を読出し、最終の縮小率として入出力部106に対して出力する。   Further, the reduction ratio calculation unit 1014 calculates the time immediately before that point based on the similarity passed from the similarity calculation unit 1013 and the threshold value stored in advance in a predetermined area of the storage unit 102. The provisional reduction ratio is determined as the final reduction ratio. Then, the reduction rate calculation unit 1014 reads the temporary reduction rate calculated previously stored in the predetermined area of the storage unit 102 and outputs the temporary reduction rate to the input / output unit 106 as the final reduction rate.

また、縮小率算出部1014は、最終の縮小率として決定した縮小率を画像縮小部1012に渡し、画像縮小部1012において該縮小率で縮小した縮小画像を入出力部106に対して出力してもよい。   The reduction rate calculation unit 1014 passes the reduction rate determined as the final reduction rate to the image reduction unit 1012, and outputs a reduced image reduced at the reduction rate in the image reduction unit 1012 to the input / output unit 106. Also good.

入出力部106は、縮小率算出部1014から渡された最終の縮小率、または/および画像縮小部1012から渡された該縮小率で縮小された縮小画像を、外部記憶装置103やネットワーク104を介して他の装置に出力する。また、入出力部106は、画像縮小部1012から渡された該縮小率で縮小された縮小画像を表示部105に出力してもよい。   The input / output unit 106 sends the final reduction rate passed from the reduction rate calculation unit 1014 and / or the reduced image reduced by the reduction rate passed from the image reduction unit 1012 to the external storage device 103 or the network 104. Output to other devices. Further, the input / output unit 106 may output a reduced image reduced at the reduction rate passed from the image reduction unit 1012 to the display unit 105.

次に、図3および図4のフローチャートを用いて、画像縮小装置1で実行される画像縮小処理について詳細に述べる。なお、以下の説明においては、画像の左上隅を原点(0,0)とし、横方向をX軸、縦方向をY軸として、横方向もしくは縦方向に1画素進むごとに座標値が1増える座標系を用いて説明する。   Next, image reduction processing executed by the image reduction device 1 will be described in detail using the flowcharts of FIGS. 3 and 4. In the following description, the upper left corner of the image is the origin (0, 0), the horizontal direction is the X axis, and the vertical direction is the Y axis. This will be described using a coordinate system.

図3を参照して、始めに、制御部101は、ステップS1で、入出力部106において、外部記憶装置103やネットワーク104を介して他の装置から元画像の画像データを取得し、記憶部102の所定領域に入力する。   With reference to FIG. 3, first, in step S <b> 1, the control unit 101 acquires image data of an original image from another device via the external storage device 103 or the network 104 in the input / output unit 106. A predetermined area 102 is input.

次に、制御部101は、ステップS2で、記憶部102の所定領域に記憶された元画像の画像データを読出し、二値画像変換部1010において、元画像を白画素と黒画素とからなる二値画像に変換する。ステップS2の二値画像変換部1010における二値画像への変換処理については公知の技術を用いることができる。公知の技術としては、たとえば、文字認識を行なう際の二値画像への変換技術などが挙げられ、ここでのその技術についての説明は省略する。   Next, in step S2, the control unit 101 reads the image data of the original image stored in the predetermined area of the storage unit 102, and the binary image conversion unit 1010 converts the original image into white pixels and black pixels. Convert to a value image. A known technique can be used for the conversion process into the binary image in the binary image conversion unit 1010 in step S2. Known techniques include, for example, a technique for converting to a binary image when performing character recognition, and a description thereof will be omitted here.

次に、ステップS3で、連結成分抽出部1015は、上記変換処理によって得られた二値画像から、黒画素の連結成分を抽出する。この黒画素の連結成分の抽出処理についても公知の技術を用いることができる。公知の技術としては、たとえば、文字認識を行なう際に実行される連結成分の抽出処理などが挙げられ、ここでの詳細な説明は省略する。さらにステップS3において、連結成分抽出部1015は、抽出された黒画素の連結成分すべてについてその外接矩形である連結成分矩形を求め、記憶部102にその連結成分矩形の左上隅座標および右下隅座標を記憶する。   Next, in step S3, the connected component extraction unit 1015 extracts a connected component of black pixels from the binary image obtained by the conversion process. A known technique can also be used for this black pixel connected component extraction processing. Known techniques include, for example, a connected component extraction process executed when character recognition is performed, and detailed description thereof is omitted here. Further, in step S3, the connected component extraction unit 1015 obtains a connected component rectangle that is a circumscribed rectangle for all of the extracted connected components of the black pixels, and stores the upper left corner coordinate and the lower right corner coordinate of the connected component rectangle in the storage unit 102. Remember.

次に、制御部101は、判定部1017において、上記で求めた連結成分矩形すべてについて、その矩形の複雑さを判定する。本実施の形態における連結成分矩形の複雑さを判定する処理では、ステップS4で線密度算出部1016において矩形中の線密度を計算し、判定部1017においてその線密度が高いものが複雑である、と判定する方法を採る。この方法では、線密度の数値に基づいて、二値画像の複雑さを測ることができるものとしている。そこで、線密度算出部1016は、ステップS4で、すべての連結成分矩形について、線密度を算出する。ここで、ステップS4で線密度算出部1016において行なわれる線密度算出処理について、図5および図6のフローチャートを用いて説明する。   Next, in the determination unit 1017, the control unit 101 determines the complexity of the rectangles for all the connected component rectangles obtained above. In the process of determining the complexity of the connected component rectangle in the present embodiment, the line density calculation unit 1016 calculates the line density in the rectangle in step S4, and the determination unit 1017 has a high line density. The method of judging is taken. In this method, the complexity of the binary image can be measured based on the numerical value of the linear density. Therefore, the line density calculation unit 1016 calculates the line density for all connected component rectangles in step S4. Here, the line density calculation process performed in the line density calculation unit 1016 in step S4 will be described with reference to the flowcharts of FIGS.

図5を参照して、始めに、線密度算出部1016は、ステップS101で、走査対象となる連結成分矩形について、記憶部102の所定領域に記憶されている連結成分矩形の左上隅座標および右下隅座標に基づいて、その幅Wと高さHとを求める。そして、ステップS102で、カウンタ1017に含まれる、連結成分矩形を縦方向に走査したときに黒線分が垂直方向に横切った回数を計測しておくためのW個のカウンタCV1,CV2,・・・,CVWと、連結成分矩形を横方向に走査したときに黒線分が垂直方向に横切った回数を計測しておくためのH個のカウンタCH1,CH2,・・・,CHHとを0に初期化する。 Referring to FIG. 5, first, in step S101, the line density calculation unit 1016 determines the upper left corner coordinates and the right of the connected component rectangle stored in the predetermined area of the storage unit 102 for the connected component rectangle to be scanned. The width W and height H are obtained based on the lower corner coordinates. In step S102, the W counters CV 1 , CV 2 , CV 2 , CV 2 , CV 2 , CV 2 , CV 2 , CV 2 , CV 2 , C are stored in the counter 1017. ..., CV W and H counters CH 1 , CH 2 ,... For measuring the number of times the black line segment has crossed in the vertical direction when the connected component rectangle is scanned in the horizontal direction. Initialize CH H to 0.

なお、線密度算出処理におけるカウンタ1017の概念を具体的に図7に示す。図7に示されるカウンタ1017の概念は、16画素×16画素の連結成分矩形中の線密度を算出するのに用いられるカウンタであって、具体的にW=16,H=16のカウンタを示している。さらに、該連結成分矩形の外接する黒画素の連結成分は、文字「あ」である場合を示している。   The concept of the counter 1017 in the line density calculation process is specifically shown in FIG. The concept of the counter 1017 shown in FIG. 7 is a counter used for calculating the line density in a connected component rectangle of 16 pixels × 16 pixels, and specifically shows a counter with W = 16 and H = 16. ing. Further, the connected component of the black pixel circumscribing the connected component rectangle is a character “A”.

次に、線密度算出部1016は、ステップS103で、現在走査中の二値画像上の位置を表わす座標(XC,YC)を、線密度算出対象となる連結成分矩形の左上隅の座標値(X,Y)で初期化する。 Next, in step S103, the line density calculation unit 1016 uses the coordinates (X C , Y C ) representing the position on the binary image currently being scanned as the coordinates of the upper left corner of the connected component rectangle to be calculated for the line density. Initialize with values (X, Y).

次に、横方向の走査について説明する。線密度算出部1016は、現在走査中の座標(XC,YC)が黒画素であり、かつ、横方向に隣接する座標(XC+1,YC)が白画素である場合に(ステップS104でYES)、ステップS105に移り、カウンタCHiを1インクリメントしてステップS106に移る。そうでない場合は(ステップS104でNO)、線密度算出部1016は、ステップS105をスキップしてステップS106に移る。なお、ここでiは以下の式で求まる値であり、たとえば、YC=Yの場合は、i=1となる。 Next, horizontal scanning will be described. The line density calculation unit 1016 determines that the currently scanned coordinates (X C , Y C ) are black pixels, and the laterally adjacent coordinates (X C +1, Y C ) are white pixels (Step S1). (YES in S104), the process proceeds to step S105, the counter CH i is incremented by 1, and the process proceeds to step S106. Otherwise (NO in step S104), the linear density calculation unit 1016 skips step S105 and proceeds to step S106. Here, i is a value obtained by the following equation. For example, when Y C = Y, i = 1.

i=YC−Y+1
次に、線密度算出部1016は、もし、XCがX+W、すなわち連結成分矩形の右端座標よりも小さければ(ステップS106でNO)、ステップS107でXCを1インクリメントし、ステップS104に戻って横方向の走査を続ける。そして、XCがX+W、すなわち連結成分矩形の右端座標と等しくなったときに(ステップS106でYES)、現在走査中の座標の画素が黒画素であれば(ステップS108でYES)、線密度算出部1016は、カウンタCHi(ただしiは上記の式で求まる値)を1インクリメントし(ステップS109)、ステップS110に移る。
i = Y CY + 1
Next, the line density calculation unit 1016 increments X C by 1 in step S107 if X C is X + W, that is, smaller than the right end coordinate of the connected component rectangle (NO in step S106), and returns to step S104. Continue horizontal scanning. When X C is equal to X + W, that is, the right end coordinate of the connected component rectangle (YES in step S106), if the pixel at the currently scanned coordinate is a black pixel (YES in step S108), the line density calculation is performed. The unit 1016 increments the counter CH i (where i is a value obtained from the above equation) by 1 (step S109), and proceeds to step S110.

一方、XCがX+W、すなわち連結成分矩形の右端座標と等しくなったときに(ステップS106でYES)、現在走査中の座標の画素が白画素であれば(ステップS108でNO)、線密度算出部1016は、ステップS109をスキップしてステップS110に移る。 On the other hand, when X C is equal to X + W, that is, the right end coordinate of the connected component rectangle (YES in step S106), if the pixel at the coordinate currently being scanned is a white pixel (NO in step S108), the line density is calculated. The unit 1016 skips step S109 and proceeds to step S110.

ステップS110では、線密度算出部1016は、現在走査中のY座標値YCを1インクリメントし、X座標値XCをXに戻す。そして、現在走査中の座標値YCがY+H、すなわち連結成分矩形の下端座標の値以下であれば(ステップS111でNO)、線密度算出部1016は、ステップS104に戻って、横方向の走査を続ける。現在走査中の座標値YCがY+Hより大きくなったら、すなわち連結成分矩形の下端に至るまで横方向の走査を行なったら(ステップS111でYES)、図6を参照してステップS112に移り、線密度算出部1016は、縦方向の走査を開始する。 In step S110, the linear density calculation unit 1016 increments the Y coordinate value Y C currently being scanned by 1, and returns the X coordinate value X C to X. If the coordinate value Y C currently being scanned is equal to or less than Y + H, that is, the value of the bottom coordinate of the connected component rectangle (NO in step S111), the line density calculation unit 1016 returns to step S104 and performs horizontal scanning. Continue. When the coordinate value Y C currently being scanned is larger than Y + H, that is, when the horizontal scanning is performed until reaching the lower end of the connected component rectangle (YES in step S111), the process proceeds to step S112 with reference to FIG. The density calculation unit 1016 starts scanning in the vertical direction.

まず、ステップS112で、線密度算出部1016は、現在走査中の二値画像上の位置を表わす座標(XC,YC)を、線密度算出対象となる連結成分矩形の左上隅の座標値(X,Y)で初期化する。そして、線密度算出部1016は、現在走査中の座標(XC,YC)が黒画素であり、かつ、縦方向に隣接する座標(XC,YC+1)が白画素である場合に(ステップS113でYES)、ステップS114で、カウンタCVjを1インクリメントし、ステップS115に移る。そうでない場合は(ステップS113でNO)、ステップS114をスキップしてステップS115に移る。なお、ここでjは以下の式で求まる値であり、たとえば、XC=Xのときは、j=1となる。 First, in step S112, the line density calculation unit 1016 uses the coordinates (X C , Y C ) representing the position on the currently scanned binary image as the coordinate values of the upper left corner of the connected component rectangle to be calculated for the line density. Initialize with (X, Y). The line density calculation unit 1016 then determines that the currently scanned coordinates (X C , Y C ) are black pixels and the vertically adjacent coordinates (X C , Y C +1) are white pixels. (YES in step S113), in step S114, the counter CV j is incremented by 1, and the process proceeds to step S115. If not (NO in step S113), step S114 is skipped and the process proceeds to step S115. Here, j is a value obtained by the following equation. For example, when X C = X, j = 1.

j=XC−X+1
次に、線密度算出部1016は、もし、YCがY+H、すなわち連結成分矩形の下端座標よりも小さければ(ステップS115でNO)、ステップS116でYCを1インクリメントし、ステップS113に戻って縦方向の走査を続ける。そして、YCがY+H、すなわち連結成分矩形の下端座標と等しくなったときに(ステップS115でYES)、現在走査中の座標の画素が黒画素であれば(ステップS117でYES)、線密度算出部1016は、カウンタCVj(ただしjは上記の式で求まる値)を1インクリメントし、(ステップS118)、ステップS119に移る。
j = X CX + 1
Next, the line density calculation unit 1016 increments Y C by 1 in step S116 if Y C is Y + H, that is, smaller than the lower end coordinates of the connected component rectangle (NO in step S115), and returns to step S113. Continue vertical scanning. When Y C is equal to Y + H, that is, equal to the lower end coordinates of the connected component rectangle (YES in step S115), if the pixel at the currently scanned coordinate is a black pixel (YES in step S117), the line density is calculated. The unit 1016 increments the counter CV j (where j is a value obtained from the above equation) by 1 (step S118), and proceeds to step S119.

一方、YCがY+H、すなわち連結成分矩形の下端座標と等しくなったときに(ステップS115でYES)、現在走査中の座標の画素が白画素であれば(ステップS117でNO)、線密度算出部1016は、ステップS118をスキップしてステップS119に移る。 On the other hand, when Y C is equal to Y + H, that is, equal to the lower end coordinates of the connected component rectangle (YES in step S115), if the pixel at the currently scanned coordinate is a white pixel (NO in step S117), the line density calculation is performed. The unit 1016 skips step S118 and proceeds to step S119.

ステップS119では、線密度算出部1016は、現在走査中のX座標値XCを1インクリメントし、Y座標値YCをYに戻す。そして、現在走査中の座標値XCがX+W、すなわち連結成分矩形の右端座標の値以下であれば(ステップS120でNO)、線密度算出部1016は、ステップS113に戻って、縦方向の走査を続ける。現在走査中の座標値XCがX+Wより大きくなったら、すなわち連結成分矩形の右端に至るまで縦方向の走査を行なったら(ステップS120でYES)、線密度算出部1016は走査を終了し、ステップS121に移る。 In step S119, the line density calculation unit 1016 increments the X coordinate value X C currently being scanned by 1 and returns the Y coordinate value Y C to Y. If the coordinate value X C currently being scanned is equal to or less than X + W, that is, the value of the right end coordinate of the connected component rectangle (NO in step S120), the line density calculation unit 1016 returns to step S113 and performs vertical scanning. Continue. When the coordinate value X C currently being scanned is larger than X + W, that is, when the vertical scanning is performed until reaching the right end of the connected component rectangle (YES in step S120), the line density calculation unit 1016 ends the scanning, and the step The process moves to S121.

上述のステップS104〜S120を実行したときのカウンタ1017の具体例を図8に示す。図8に示されるカウンタ1017が表わす数値は、具体的に図7に具体的な概念が示されるカウンタ1017を用いて該連結成分矩形を縦方向および横方向に走査した結果を表わしている。   A specific example of the counter 1017 when the above steps S104 to S120 are executed is shown in FIG. The numerical value represented by the counter 1017 shown in FIG. 8 represents the result of scanning the connected component rectangle in the vertical and horizontal directions using the counter 1017 whose specific concept is shown in FIG.

なお、ステップS104〜S120においては、走査対象の連結成分矩形について、始めに横方向の走査を完了した後に縦方向の走査を実行するものとしているが、言うまでもなく走査の順は上述の順に限定されず、始めに縦方向の走査から実行してもよい。また、縦方向および横方向の走査に限定されず、該連結成分矩形をくまなく走査できる方法であれば、他の方法であってもよい。   In steps S104 to S120, for the connected component rectangle to be scanned, scanning in the vertical direction is executed after the horizontal scanning is first completed, but it goes without saying that the scanning order is limited to the order described above. Instead, it may be executed from the scanning in the vertical direction first. Also, the present invention is not limited to scanning in the vertical direction and the horizontal direction, and any other method may be used as long as the method can scan all the connected component rectangles.

ステップS121およびステップS122では、線密度算出部1016は、連結成分矩形の大きさによらずに線密度の比較をできるように、走査を行なった連結成分矩形をN×Nに分割し、それぞれの領域について、上記で計測したカウンタの値を平均する。ここでNは定数である。まず、ステップS121で、線密度算出部1016は、連結成分矩形を横方向にN分割する。すなわち、連結成分矩形が幅W,高さHの矩形であれば、それを横方向にN等分すると、第1番目の領域は、その左上隅座標が(X,Y)、右下隅座標が(X+(W/N),Y+H)、第2番目の領域は、その左上隅座標が(X+(W/N)+1,Y)、右下隅座標が(X+(2W/N),Y+H)、・・・のようになる。そして、線密度算出部1016は、分割されたそれぞれの領域について、上記で縦方向走査によって計測されたカウンタCVnの平均値を算出し、算出したすべての平均値を、第1番目の領域の平均値から順に、記憶部102に記憶する。同様に、ステップS122で、線密度算出部1016は、連結成分矩形を縦方向にN分割し、分割されたそれぞれの領域について、上記で横方向走査によって計測されたカウンタCHnの平均値を算出し、算出したすべての平均値を、第1番目の領域の平均値から順に、記憶部102に記憶する。 In step S121 and step S122, the line density calculation unit 1016 divides the scanned connected component rectangles into N × N so that the line densities can be compared without depending on the size of the connected component rectangles. For the area, the counter values measured above are averaged. Here, N is a constant. First, in step S121, the line density calculation unit 1016 divides the connected component rectangle into N parts in the horizontal direction. That is, if the connected component rectangle is a rectangle having a width W and a height H, when the rectangle is equally divided into N in the horizontal direction, the first region has an upper left corner coordinate (X, Y) and a lower right corner coordinate. (X + (W / N), Y + H), the second region has an upper left corner coordinate (X + (W / N) +1, Y), a lower right corner coordinate (X + (2W / N), Y + H), ···become that way. Then, the line density calculation unit 1016 calculates the average value of the counter CV n measured by the vertical scanning as described above for each of the divided areas, and calculates all the calculated average values of the first area. The data are stored in the storage unit 102 sequentially from the average value. Similarly, in step S122, the line density calculation unit 1016 divides the connected component rectangle into N parts in the vertical direction, and calculates the average value of the counter CH n measured by the horizontal scanning as described above for each of the divided areas. Then, all the calculated average values are stored in the storage unit 102 in order from the average value of the first area.

図9に、分割したそれぞれの領域について値を平均したカウンタ1017の具体例を示す。図9に示されるカウンタ1017は、図8に示されたカウンタ1017を、N=6として連結成分矩形を横方向および縦方向に分割し、各々の領域でカウンタの平均値を求めた具体例である。   FIG. 9 shows a specific example of the counter 1017 that averages values for each of the divided areas. The counter 1017 shown in FIG. 9 is a specific example in which the counter component 1017 shown in FIG. 8 is divided into a connected component rectangle in the horizontal direction and the vertical direction with N = 6, and the average value of the counter is obtained in each region. is there.

以上の処理が、上述のステップS4で線密度算出部1016において実行される線密度の算出処理である。線密度算出部1016が上述の処理を繰返して、ステップS4においてすべての連結成分矩形について線密度を算出すると、処理を図3に示されるメインルーチンに戻して、次に参照パターンの抽出処理に移る。   The above processing is the linear density calculation processing executed in the linear density calculation unit 1016 in step S4 described above. When the line density calculation unit 1016 repeats the above process and calculates the line density for all connected component rectangles in step S4, the process returns to the main routine shown in FIG. 3, and then moves to the reference pattern extraction process. .

この処理によって抽出される参照パターンとは、画像を縮小することによってつぶれが生じないようにしたい連結成分矩形のことであり、たとえば、画像中の文字部分などが考えられる。本実施の形態では、参照パターン抽出部1011は、連結成分について特に文字と図形との区別をせずに扱い、参照パターンとしては、連結成分のうちもっとも複雑さが大きいもの、すなわち、線密度が最も大きいものを抽出することとする。   The reference pattern extracted by this processing is a connected component rectangle to be prevented from being crushed by reducing the image. For example, a character portion in the image can be considered. In the present embodiment, the reference pattern extraction unit 1011 handles connected components without particularly distinguishing between characters and graphics, and the reference pattern has the highest complexity among connected components, that is, the line density is high. The largest one will be extracted.

ステップS5で、参照パターン抽出部1011は、二値画像より、参照パターンとして線密度の最も大きな連結成分矩形を抽出する。本実施の形態においては、カウンタ1017に、線密度が、縦方向のカウント結果N個および横方向のカウント結果N個の、2N個(Nは定数)の値として記憶されている。したがって、本実施の形態において、線密度の大きさを算出する方法として、上記2N個の値を並べたベクトルを用意し、このベクトルのノルムとして算出する方法を採用することができる。ここで、ベクトルのノルムは、ベクトルA=(a1,a2,・・・,an)に対して、次のように計算される値である。 In step S5, the reference pattern extraction unit 1011 extracts a connected component rectangle having the highest line density as a reference pattern from the binary image. In the present embodiment, the counter 1017 stores the line density as 2N values (N is a constant) of N count results in the vertical direction and N count results in the horizontal direction. Therefore, in this embodiment, as a method for calculating the magnitude of the line density, a method in which a vector in which the above 2N values are arranged is prepared and calculated as a norm of this vector can be employed. Here, the norm of the vector is a value calculated as follows with respect to the vector A = (a 1 , a 2 ,..., A n ).

||A|| = ((a12+(a22+・・・+(an21/2
もし、線密度最大の連結成分矩形が二値画像である画像データの中にただ1つしか存在しないのであれば(ステップS6でNO)、参照パターン抽出部1011は、ステップS7で、その矩形を参照パターンとして決定し、ステップS9で、その参照パターンである線密度最大の連結成分矩形の左上隅座標と右下隅座標とを、記憶部102に記憶する。
|| A || = ((a 1 ) 2 + (a 2 ) 2 +... + (A n ) 2 ) 1/2
If there is only one connected component rectangle having the maximum line density in the image data that is a binary image (NO in step S6), the reference pattern extraction unit 1011 selects the rectangle in step S7. The reference pattern is determined, and in step S9, the upper left corner coordinates and lower right corner coordinates of the connected component rectangle having the highest line density, which is the reference pattern, are stored in the storage unit 102.

一方、線密度最大の連結成分矩形が複数存在する場合(ステップS6でYES)には、参照パターン抽出部1011は、ステップS8で、そのうち最も連結成分矩形の大きさが小さいものを参照パターンとして決定し、ステップS9で、その連結成分矩形の左上隅座標と右下隅座標とを、記憶部102に記憶する。   On the other hand, when there are a plurality of connected component rectangles with the highest line density (YES in step S6), the reference pattern extraction unit 1011 determines in step S8 the one with the smallest connected component rectangle size as the reference pattern. In step S 9, the upper left corner coordinates and lower right corner coordinates of the connected component rectangle are stored in the storage unit 102.

ステップS6〜S9を実行して参照パターンが決定されたら、次に、最終的な縮小率を得るために仮に設定した縮小率(以下、仮縮小率と呼ぶ)を元に画像を縮小し、元画像と縮小画像の参照パターン間の類似度を求め、その類似度を用いて、最終的な縮小率を得る処理に移る。   Once the reference pattern is determined by executing steps S6 to S9, the image is reduced based on a reduction rate temporarily set to obtain a final reduction rate (hereinafter referred to as a temporary reduction rate). The similarity between the reference pattern of the image and the reduced image is obtained, and the process proceeds to processing for obtaining a final reduction ratio using the similarity.

始めに、ステップS10において、縮小率算出部1014は、仮縮小率の初期値を(1−DR)として設定する。ここでDRは0より大きく1より小さい小数値である。   First, in step S10, the reduction ratio calculation unit 1014 sets the initial value of the temporary reduction ratio as (1-DR). Here, DR is a decimal value larger than 0 and smaller than 1.

次に、図4を参照して、ステップS11で、画像縮小部1012は、仮縮小率に基づいて二値化された元画像を縮小する。   Next, referring to FIG. 4, in step S <b> 11, the image reduction unit 1012 reduces the binarized original image based on the temporary reduction ratio.

次に、ステップS12で、連結成分抽出部1015は、縮小画像から連結成分矩形を抽出する。ステップS12での処理は、ステップS3における処理と同様であって、ここでは、連結成分抽出部1015は、ステップS11で得られた縮小画像に対して、ステップS3と同様の処理を実行する。   Next, in step S12, the connected component extraction unit 1015 extracts a connected component rectangle from the reduced image. The processing in step S12 is the same as the processing in step S3. Here, the connected component extraction unit 1015 performs the same processing as in step S3 on the reduced image obtained in step S11.

次に、ステップS13で、縮小画像座標算出部1018は、元画像の参照パターンに対応する縮小画像内の座標値を、仮縮小率に基づいて算出する。ここで、元画像の参照パターンを表わす連結成分矩形の左上隅座標を(X0,Y0)、右下隅座標を(X1,Y1)、仮縮小率をRとすると、対応する、縮小画像の参照パターンを表わす矩形の左上隅座標(X0’,Y0’)、および右下隅座標(X1’,Y1’)は
0’=X0×R X1’=X1×R
0’=Y0×R Y1’=Y1×R
として算出される。なお、本実施の形態においては、上記の式の計算結果は四捨五入するものとする。
In step S13, the reduced image coordinate calculation unit 1018 calculates a coordinate value in the reduced image corresponding to the reference pattern of the original image based on the temporary reduction ratio. Here, assuming that the upper left corner coordinates of the connected component rectangle representing the reference pattern of the original image are (X 0 , Y 0 ), the lower right corner coordinates are (X 1 , Y 1 ), and the temporary reduction ratio is R, the corresponding reduction The upper left corner coordinates (X 0 ′, Y 0 ′) and lower right corner coordinates (X 1 ′, Y 1 ′) of the rectangle representing the reference pattern of the image are X 0 ′ = X 0 × R X 1 ′ = X 1 × R
Y 0 '= Y 0 × R Y 1 ' = Y 1 × R
Is calculated as In the present embodiment, the calculation result of the above equation is rounded off.

ただし、ステップS13での縮小画像座標算出部1018における座標計算では、ステップS12で縮小画像から抽出した連結成分矩形を示す座標とずれが生じることがある。このようなずれは、たとえば、画像縮小により、元画像で黒画素であった点に対応した点が白画素になってしまったときに生じる。そこで、ステップS14で、縮小画像参照パターン抽出部1019は、ステップS12で縮小画像から抽出された連結成分矩形の中から、縮小画像の参照パターンとして、上記のようにして算出された座標から最も距離が近い連結成分矩形を選択し、その連結成分矩形の左上隅座標と右下隅座標とを記憶部102に記憶する。   However, in the coordinate calculation in the reduced image coordinate calculation unit 1018 in step S13, there may be a deviation from the coordinates indicating the connected component rectangle extracted from the reduced image in step S12. Such a shift occurs, for example, when a point corresponding to a point that was a black pixel in the original image has become a white pixel due to image reduction. Therefore, in step S14, the reduced image reference pattern extraction unit 1019 finds the distance from the coordinates calculated as described above as a reduced image reference pattern from the connected component rectangles extracted from the reduced image in step S12. Connected component rectangles are selected, and the upper left corner coordinates and lower right corner coordinates of the connected component rectangles are stored in the storage unit 102.

図10は、元画像と縮小後画像との参照パターンの関係を具体的に表わす図であって、図10において、上に示されるグラフが元画像、下に示されるグラフが縮小後の画像を示している。図10に示されるように、元画像中の参照パターンである連結成分矩形が、上に示されるグラフ中の文字「降」に外接する連結成分矩形である場合、ステップS12〜S14の処理が実行されて、縮小後の画像である下に示されるグラフ中の文字「降」に外接する連結成分矩形が、縮小画像の算出パターンとして選択される。   FIG. 10 is a diagram specifically showing the relationship of the reference pattern between the original image and the reduced image. In FIG. 10, the upper graph shows the original image, and the lower graph shows the reduced image. Show. As shown in FIG. 10, when the connected component rectangle that is the reference pattern in the original image is a connected component rectangle circumscribing the character “fall” in the graph shown above, the processes of steps S12 to S14 are executed. Then, the connected component rectangle circumscribing the character “Descent” in the graph shown below, which is the reduced image, is selected as the reduced image calculation pattern.

ステップS14で縮小画像の参照パターンが決定されると、線密度算出部1016は、ステップS15で、縮小画像の参照パターンの線密度を算出し、記憶部102に記憶する。ステップS14での線密度算出処理もまた、ステップS4で実行される線密度算出処理と同様であって、上記で詳細に述べた処理であるため、ここでは詳細な説明を繰返さない。   When the reduced image reference pattern is determined in step S14, the linear density calculation unit 1016 calculates the linear density of the reduced image reference pattern in step S15 and stores the calculated linear density in the storage unit 102. The line density calculation process in step S14 is also similar to the line density calculation process executed in step S4, and is the process described in detail above. Therefore, detailed description will not be repeated here.

ステップS15で縮小画像の参照パターンの線密度が算出されると、ステップS16で、類似度算出部1013において、元画像の参照パターンと縮小画像の参照パターンとの間の類似度を算出する。本実施の形態においては、上述のように線密度が2N個の値として記憶されているため、この2N個の値を並べたベクトルを準備し(以下、このベクトルを線密度ベクトルと言う)、類似度算出部1013は、類似度を、元画像の参照パターンと縮小画像の参照パターンとのそれぞれの線密度ベクトルのなす角度のコサイン値として求める。上記のようにして求めたコサイン値が大きいとき、すなわち2つの線密度ベクトルのなす角度が小さければ、元画像の参照パターンと縮小画像の参照パターンとの線密度分布が似ていることを示す。また、上記のようにして求めたコサイン値が小さいとき、すなわち2つの線密度ベクトルのなす角度が大きいほど、元画像の参照パターンと縮小画像の参照パターンとの線密度分布が異質であることを示す。   When the line density of the reference pattern of the reduced image is calculated in step S15, in step S16, the similarity calculation unit 1013 calculates the similarity between the reference pattern of the original image and the reference pattern of the reduced image. In the present embodiment, since the line density is stored as 2N values as described above, a vector in which these 2N values are arranged is prepared (hereinafter, this vector is referred to as a line density vector). The similarity calculation unit 1013 obtains the similarity as a cosine value of an angle formed by each line density vector of the reference pattern of the original image and the reference pattern of the reduced image. When the cosine value obtained as described above is large, that is, when the angle formed by the two line density vectors is small, it indicates that the line density distributions of the reference pattern of the original image and the reference pattern of the reduced image are similar. In addition, when the cosine value obtained as described above is small, that is, as the angle between the two line density vectors is larger, the line density distribution between the reference pattern of the original image and the reference pattern of the reduced image is different. Show.

すなわち、元画像の参照パターンの線密度ベクトルをA、縮小画像の参照パターンの線密度ベクトルをBとしたとき、元画像の参照パターンと縮小画像の参照パターンとの間の類似度Sは、以下のようにして求まる。   That is, when the line density vector of the reference pattern of the original image is A and the line density vector of the reference pattern of the reduced image is B, the similarity S between the reference pattern of the original image and the reference pattern of the reduced image is as follows: It is obtained like this.

S=A・B/||A||×||B||
ここで「・」はその左右のベクトルの内積を表わす。すなわち、A=(a1,a2,・・・,a2N)、B=(b1,b2,・・・,b2N)としたとき、A・B=a1×b1+a2×b2+・・・+a2N×b2Nとして求まる値である。||A||および||B||は、線密度の大きさを求める処理のところで説明した、ベクトルのノルムである。
S = A · B / || A || × || B ||
Here, “·” represents the inner product of the left and right vectors. That is, when A = (a 1 , a 2 ,..., A 2N ) and B = (b 1 , b 2 ,..., B 2N ), A · B = a 1 × b 1 + a 2 Xb 2 +... + A 2N xb 2N || A || and || B || are the vector norms described in the processing for obtaining the magnitude of the line density.

ステップS16で算出された元画像の参照パターンと縮小画像の参照パターンとの間の類似度が、予め設定されたしきい値STを下回っていない場合には(ステップS17でNO)、ステップS18で、縮小率算出部1014は、仮縮小率を所定の変化量DRだけ減少させ、ステップS22で、直前の(減少させる前の)仮縮小率の値を記憶部102に記憶する。その後、処理をステップS11に戻して、再度、画像縮小、参照パターン抽出、および類似度計算を行なう。   If the similarity between the reference pattern of the original image calculated in step S16 and the reference pattern of the reduced image is not less than the preset threshold value ST (NO in step S17), in step S18. The reduction rate calculation unit 1014 decreases the temporary reduction rate by a predetermined change amount DR, and stores the value of the previous temporary reduction rate (before reduction) in the storage unit 102 in step S22. Thereafter, the process returns to step S11, and image reduction, reference pattern extraction, and similarity calculation are performed again.

一方、類似度がしきい値STを下回っていた場合には(ステップS17でYES)、ステップS19で、縮小率算出部1014は、上述の所定の変化量DRを2で割る。すなわち、仮縮小率の下げ方をより緩やかにする。   On the other hand, if the similarity is lower than the threshold value ST (YES in step S17), the reduction rate calculation unit 1014 divides the predetermined change amount DR by 2 in step S19. That is, the temporary reduction ratio is lowered more gradually.

さらに、ステップS19で計算された変化量DRが予め設定されている変化量の最低値DRMIN以上の値であれば(ステップS20でNO)、ステップS21で、縮小率算出部1014は、仮縮小率をDRだけ増加させ、ステップS22で、直前の(増加させる前の)仮縮小率の値を記憶部102に記憶する。その後、処理をステップS11に戻し、再度、画像縮小、参照パターン抽出、および類似度計算を行なう。ここで、変化量の最低値DRMINは、0より大きく1より小さい小数値とし、DRの初期値よりも小さい値に設定しておく。 Further, if the change amount DR calculated in step S19 is equal to or greater than a preset minimum value DR MIN (NO in step S20), in step S21, the reduction ratio calculation unit 1014 performs temporary reduction. The rate is increased by DR, and the value of the temporary reduction rate immediately before (before increasing) is stored in the storage unit 102 in step S22. Thereafter, the process returns to step S11, and image reduction, reference pattern extraction, and similarity calculation are performed again. Here, the minimum value DR MIN of the change amount is a decimal value greater than 0 and less than 1, and is set to a value smaller than the initial value of DR.

一方、ステップS19で計算された変化量DRが変化量の最低値DRMINよりも小さい値であれば(ステップS20でYES)、ステップS23で、制御部101は、ステップS22で記憶部102に記憶されている、直前に使用していた仮縮小率の値を最終縮小率と決定して入出力部106に対して出力する。また、制御部101は、該縮小率で縮小された縮小画像を入出力部106に対して出力してもよい。 On the other hand, if the change amount DR calculated in step S19 is smaller than the minimum value DR MIN of change amount (YES in step S20), the control unit 101 stores it in the storage unit 102 in step S22 in step S23. The temporary reduction ratio value used immediately before is determined as the final reduction ratio and is output to the input / output unit 106. The control unit 101 may output a reduced image reduced at the reduction rate to the input / output unit 106.

入出力部106は、制御部101から決定された最終縮小率、または/および該縮小率で縮小された縮小画像を、外部記憶装置103やネットワーク104を介して他の装置に出力する。また、入出力部106は、画像縮小部1012から渡された該縮小率で縮小された縮小画像を表示部105に出力してもよい。以上で、画像縮小装置1で実行される画像縮小処理を終了する。   The input / output unit 106 outputs the final reduction rate determined from the control unit 101 or / and the reduced image reduced by the reduction rate to another device via the external storage device 103 or the network 104. Further, the input / output unit 106 may output a reduced image reduced at the reduction rate passed from the image reduction unit 1012 to the display unit 105. Above, the image reduction process performed with the image reduction apparatus 1 is complete | finished.

以上説明したように、本実施の形態にかかる画像縮小装置1は、元画像から、ある程度複雑な図形(連結成分)を参照パターンとして抽出し、仮に算出された縮小率を元に画像を縮小し、元画像の参照パターンと縮小画像の参照パターンとの間の類似度を算出して、その類似度が予め設定されたしきい値を下回らないような(なるべく)最小の縮小率を最終縮小率として出力する。このような処理を行なうことで、文字などのある程度複雑な図形を含むような画像を縮小する際に、該図形の可読性を損なわない範囲での最適な縮小率を自動的に決定することが可能となる。   As described above, the image reducing apparatus 1 according to the present embodiment extracts a somewhat complicated figure (connected component) from the original image as a reference pattern, and reduces the image based on the calculated reduction ratio. The similarity between the reference pattern of the original image and the reference pattern of the reduced image is calculated, and the final reduction ratio is set to the minimum reduction rate (as much as possible) so that the similarity does not fall below a preset threshold value. Output as. By performing such processing, when reducing an image that contains some complex figures such as characters, it is possible to automatically determine the optimum reduction ratio within a range that does not impair the readability of the figures. It becomes.

なお、上記の実施の形態においては、入力された元画像を二値画像変換部1010において二値化して画像最終縮小率を求める処理に用いているが、たとえば、所定のしきい値以上の画素を黒画素とし、該しきい値以下の画素を白画素とすることで、元画像を処理に用いることもできる。この場合、図2に示された制御部101で発揮される機能のうち、二値画像変換部1010を不要とできる。   In the above-described embodiment, the input original image is binarized by the binary image conversion unit 1010 and used for the process of obtaining the image final reduction ratio. For example, pixels having a predetermined threshold value or more are used. Is a black pixel, and pixels below the threshold are white pixels, so that the original image can be used for processing. In this case, the binary image conversion unit 1010 can be made unnecessary among the functions exhibited by the control unit 101 shown in FIG.

[変形例1]
また、上記の実施の形態においては、連結成分の複雑さを表わす数値として線密度を用いたが、たとえば、連結成分矩形中の黒画素の割合を用いてもよい。その場合、制御部101は、プログラムを実行することによって、上述の線密度算出部1016に替えて、黒画素の割合を算出する割合算出部の機能を発揮し、割合算出部は、上述のステップS4において、記憶部102の所定領域に記憶される連結成分矩形の左上隅座標および右下隅座標を参照し、二値画像変換部1010から渡された二値画像である元画像の画像データより、各連結成分矩形中の黒画素の割合を算出する。そして、その算出結果をカウンタ1017または記憶部102の所定領域に記憶する。
[Modification 1]
In the above embodiment, the linear density is used as a numerical value representing the complexity of the connected component. However, for example, the ratio of black pixels in the connected component rectangle may be used. In that case, by executing the program, the control unit 101 performs the function of a ratio calculation unit that calculates the ratio of black pixels instead of the above-described line density calculation unit 1016. In S4, referring to the upper left corner coordinates and lower right corner coordinates of the connected component rectangle stored in the predetermined area of the storage unit 102, from the image data of the original image which is a binary image passed from the binary image conversion unit 1010, The ratio of black pixels in each connected component rectangle is calculated. Then, the calculation result is stored in the counter 1017 or a predetermined area of the storage unit 102.

参照パターン抽出部1011は、上述のステップS5において、黒画素の割合が最も大きな連結成分矩形を、参照パターンとして抽出する。   In step S5 described above, the reference pattern extraction unit 1011 extracts a connected component rectangle having the largest proportion of black pixels as a reference pattern.

また、割合算出部は、上述のステップS15において、記憶部102の所定領域に記憶される縮小画像の参照パターンである連結成分矩形の左上隅座標および右下隅座標を参照し、画像縮小部1012から渡された縮小画像の画像データより、該連結成分矩形中の黒画素の割合を算出する。そして、その算出結果も記憶部102の所定領域に記憶する。   In addition, the ratio calculation unit refers to the upper left corner coordinates and lower right corner coordinates of the connected component rectangle that is the reference pattern of the reduced image stored in the predetermined area of the storage unit 102 in step S15 described above. The ratio of black pixels in the connected component rectangle is calculated from the image data of the reduced image passed. The calculation result is also stored in a predetermined area of the storage unit 102.

さらに、上述のステップS16において、類似度算出部1013は、割合算出部で算出された元画像の参照パターン中の黒画素の割合と縮小画像の参照パターン中の黒画素の割合とを用いて、元画像の参照パターンと縮小画像の参照パターンとの間の類似度を算出する。   Further, in step S16 described above, the similarity calculation unit 1013 uses the ratio of black pixels in the reference pattern of the original image and the ratio of black pixels in the reference pattern of the reduced image calculated by the ratio calculation unit, The similarity between the reference pattern of the original image and the reference pattern of the reduced image is calculated.

[変形例2]
また、上記の実施の形態においては、参照パターンとして抽出する連結成分矩形には特に制限を設けなかったが、参照パターンとして文字のみを考慮して、文字のみを含む連結成分矩形を抽出してもよい。その場合、参照パターン抽出部1011は、文字認識辞書を用いて各連結成分矩形に対してパターンマッチングを行ない、そのマッチング結果を用いて参照パターンを抽出する。
[Modification 2]
In the above embodiment, the connected component rectangle extracted as the reference pattern is not particularly limited. However, the connected component rectangle including only the character can be extracted as the reference pattern in consideration of only the character. Good. In that case, the reference pattern extraction unit 1011 performs pattern matching on each connected component rectangle using the character recognition dictionary, and extracts a reference pattern using the matching result.

[変形例3]
また、上記の実施の形態においては、参照パターンは、元画像を二値化した画像から得られる連結成分矩形の中から選択されるものとしているが、参照パターンを文字部分であると限定する場合には、次のように行なうことができる。すなわち、制御部101は、プログラムを実行することによって、上述の二値画像変換部1010および連結成分抽出部1015に替えて、元画像に対して文字認識処理を行なって文字矩形を抽出する文字認識部の機能を発揮し、参照パターン抽出部1011は、文字認識部が抽出した文字矩形の中から参照パターンを抽出するようにしてもよい。さらに、その際、線密度算出部1016は抽出された複数の文字矩形の各々の線密度を算出し、参照パターン抽出部1011は、線密度算出部1016の算出結果に基づいて、最も複雑な(線密度の高い)文字矩形を参照パターンとして抽出してもよい。
[Modification 3]
In the above embodiment, the reference pattern is selected from the connected component rectangles obtained from the binarized image of the original image, but the reference pattern is limited to the character portion. Can be carried out as follows. That is, the control unit 101 executes a program to perform character recognition processing on the original image and extract a character rectangle instead of the binary image conversion unit 1010 and the connected component extraction unit 1015 described above. The reference pattern extraction unit 1011 may extract the reference pattern from the character rectangle extracted by the character recognition unit. Furthermore, at that time, the line density calculation unit 1016 calculates the line density of each of the extracted character rectangles, and the reference pattern extraction unit 1011 is based on the calculation result of the line density calculation unit 1016 (the most complicated ( A character rectangle having a high linear density may be extracted as a reference pattern.

[変形例4]
また、上記の実施の形態においては、参照パターンは1つであるとして説明したが、参照パターンは複数存在してもよい。この場合、類似度算出部1013における元画像と縮小画像との類似度の計算方法についても様々な方法が考えられる。たとえば、類似度算出部1013は、個々の参照パターンについてそれぞれ類似度を算出し、その平均値を元画像と縮小画像との類似度とする方法が考えられる。
[Modification 4]
Further, in the above-described embodiment, it has been described that there is one reference pattern, but a plurality of reference patterns may exist. In this case, various methods can be considered as a method of calculating the similarity between the original image and the reduced image in the similarity calculation unit 1013. For example, the similarity calculation unit 1013 may calculate the similarity for each reference pattern and use the average value as the similarity between the original image and the reduced image.

さらに、第3の変形例と同様に参照パターンを文字部分であると限定する場合には、類似度算出部1013は、上述の文字認識部が抽出した文字矩形の中から抽出した参照パターンの文字らしさを、参照パターンに対して文字認識辞書をパターンマッチングすることによって予め算出し、個々の参照パターンについて算出した類似度に、算出された文字らしさを重みとして乗じ、その合計値を、元画像と縮小画像との類似度とするようにしてもよい。すなわち、類似度算出部1013は、参照パターンAの文字認識辞書とのマッチング率(1が完全一致であるとして、0から1までの小数で表わされた値とする)をa、参照パターンBの文字認識辞書とのマッチング率をbとし、元画像と縮小画像間のA部分との類似度をLA、元画像と縮小画像のB部分の類似度をLBとしたときに、元画像と縮小画像との類似度を、a×LA+b×LBとして計算してもよい。 Further, when the reference pattern is limited to a character part as in the third modification, the similarity calculation unit 1013 uses the character of the reference pattern extracted from the character rectangle extracted by the character recognition unit described above. The likelihood is calculated in advance by pattern matching the character recognition dictionary with respect to the reference pattern, and the similarity calculated for each reference pattern is multiplied by the calculated character likelihood as a weight, and the total value is calculated as the original image. The degree of similarity with the reduced image may be set. That is, the similarity calculation unit 1013 sets the matching rate of the reference pattern A to the character recognition dictionary (assuming that 1 is a perfect match, a value represented by a decimal number from 0 to 1) a, reference pattern B a matching ratio between the character recognition dictionary is b, when the similarity between the a portion between the original image and the reduced image is L a, the similarity of the B portion of the original image and the reduced image and L B, the original image May be calculated as a × L A + b × L B.

[変形例5]
また、上記の実施の形態においては、線密度に基づいて参照パターンを決定しているが、予め、参照パターンとなる連結成分矩形を指定してもよい。たとえば、画像縮小装置1は、図1には示されないマウスやキーボードや入力ボタンなどのユーザからの指示入力を受付ける入力装置を備えて、入力装置で、最低限読めるようになっていてほしい文字や図形を、予め参照パターンとして指定しておくことが考えられる。図11に、元画像の中から参照パターンを選択する画面の具体例を示す。図11は、画像縮小装置1がPDAなどの装置で実現される場合であって、表示部105に表示された元画像であるグラフのうち、文字「幌」をマウスでクリックすることによって、該文字を、元画像を縮小した場合でも最低限読めるようにしたい文字として指定する場合の、表示部105に表示される画面の具体例を示す図である。
[Modification 5]
In the above embodiment, the reference pattern is determined based on the line density. However, a connected component rectangle that becomes the reference pattern may be designated in advance. For example, the image reduction device 1 includes an input device that accepts an instruction input from a user, such as a mouse, a keyboard, and an input button (not shown in FIG. 1). It is conceivable that a figure is designated as a reference pattern in advance. FIG. 11 shows a specific example of a screen for selecting a reference pattern from an original image. FIG. 11 shows a case where the image reduction device 1 is realized by a device such as a PDA, and by clicking the character “top” in the graph that is the original image displayed on the display unit 105 with the mouse, It is a figure which shows the specific example of the screen displayed on the display part 105 in the case of designating a character as a character which wants to be able to be read at the minimum even when the original image is reduced.

入力装置で入力された情報は指示信号として入力装置から制御部101に渡され、参照パターン抽出部1011において、元画像より、該指示信号の指示するポイントを含む連結成分矩形が、参照パターンとして抽出される。   Information input by the input device is passed as an instruction signal from the input device to the control unit 101, and the reference pattern extraction unit 1011 extracts a connected component rectangle including the point indicated by the instruction signal as a reference pattern from the original image. Is done.

[変形例6]
また、上記の実施の形態においては、最終縮小率の決定において、類似度が一定のしきい値を下回るかどうかを判定しているが、類似度の変化率のしきい値を定め、仮縮小率をR1からR2に変化させたときに、元画像との類似度が、上記しきい値を超えるような変化率で変化するかどうかを判定するようにしてもよい。
[Modification 6]
Further, in the above embodiment, in determining the final reduction ratio, it is determined whether or not the similarity is lower than a certain threshold value. When the rate is changed from R 1 to R 2 , it may be determined whether the degree of similarity with the original image changes at a rate of change that exceeds the threshold value.

すなわち、記憶部102の所定領域に予め類似度の変化率のしきい値を記憶し、類似度算出部1013は、仮縮小率R1のときの縮小画像と元画像との間の類似度S1と、仮縮小率R2のときの縮小画像と元画像との間の類似度S2とを参照して記憶部102の所定領域に記憶する。そして、縮小率算出部1014は、記憶部102の所定領域に記憶される類似度S1から類似度S2への変化率を算出して、該変化率がしきい値を超える場合に、その時点の直前に使用していた仮縮小率の値を最終縮小率と決定する。 That is, the threshold value of the similarity change rate is stored in advance in a predetermined area of the storage unit 102, and the similarity calculation unit 1013 calculates the similarity S between the reduced image and the original image at the temporary reduction rate R 1. 1 and the similarity S 2 between the reduced image and the original image at the provisional reduction ratio R 2 are stored in a predetermined area of the storage unit 102. Then, the reduction rate calculation unit 1014 calculates a change rate from the similarity S 1 stored in the predetermined area of the storage unit 102 to the similarity S 2, and when the change rate exceeds a threshold value, The temporary reduction ratio value used immediately before the time is determined as the final reduction ratio.

[変形例7]
また、上記の実施の形態においては、最終縮小率の決定において、類似度が一定のしきい値を下回るかどうかのみを判定しているが、予め、縮小後の画像サイズの下限値を設定しておき、その値を元に最終縮小率を決定するようにしてもよい。たとえば、縮小率算出部1014は、縮小後の画像サイズの下限値を元に仮縮小率のしきい値を求めておき、このしきい値を下回る直前の仮縮小率を最終縮小率と決定してもよい。または、縮小率算出部1014は、仮縮小率が前記しきい値を下回る直前と、元画像の参照パターンと縮小画像の参照パターンとの間の類似度が予め設定されているしきい値を下回る直前との、いずれかの時点の仮縮小率を最終縮小率と決定してもよい。こうすることで、必要以上に画像が縮小されてしまうのを防ぐことが可能となる。
[Modification 7]
In the above embodiment, the final reduction ratio is determined only by determining whether the similarity falls below a certain threshold. However, a lower limit value of the image size after reduction is set in advance. The final reduction ratio may be determined based on the value. For example, the reduction ratio calculation unit 1014 obtains a threshold value of the temporary reduction ratio based on the lower limit value of the image size after reduction, and determines the temporary reduction ratio immediately before the threshold value to be the final reduction ratio. May be. Alternatively, the reduction rate calculation unit 1014 immediately before the temporary reduction rate falls below the threshold value and the similarity between the reference pattern of the original image and the reference pattern of the reduced image falls below a preset threshold value. The temporary reduction ratio at any point in time immediately before may be determined as the final reduction ratio. By doing so, it is possible to prevent the image from being reduced more than necessary.

このように、本実施の形態にかかる画像縮小装置1によると、縮小前の画像と縮小後の画像との特定部分(画像中の文字や図形)の類似度を算出し、予め設定された上記特定部分の可読性が損なわれないようなしきい値に対して、算出された類似度が最も近くなる縮小率を自動的に求めることができる。したがって、上記特定部分の可読性が保たれた、一覧性の良好な縮小画像を自動的に得ることができるようになる。また、縮小後に上記特定部分の補正を行なわないので、上記特定部分の背景色や背景の模様に抜けが生じたりすることがない。   As described above, according to the image reduction device 1 according to the present embodiment, the similarity of a specific portion (characters or graphics in the image) between the image before reduction and the image after reduction is calculated, and the above-described preset value is set. With respect to a threshold value that does not impair the readability of a specific portion, it is possible to automatically obtain a reduction ratio at which the calculated similarity is closest. Therefore, it becomes possible to automatically obtain a reduced image with good listability in which the readability of the specific portion is maintained. In addition, since the specific portion is not corrected after the reduction, the background color or background pattern of the specific portion does not occur.

さらに、上述の画像縮小装置1が行なう画像縮小方法を、プログラムとして提供することもできる。このようなプログラムは、コンピュータに付属するフレキシブルディスク、CD−ROM、ROM、RAMおよびメモリカードなどのコンピュータ読取り可能な記録媒体にて記録させて、プログラム製品として提供することもできる。あるいは、コンピュータに内蔵するハードディスクなどの記録媒体にて記録させて、プログラムを提供することもできる。また、ネットワークを介したダウンロードによって、プログラムを提供することもできる。   Furthermore, an image reduction method performed by the above-described image reduction apparatus 1 can be provided as a program. Such a program can be recorded on a computer-readable recording medium such as a flexible disk, a CD-ROM, a ROM, a RAM, and a memory card attached to the computer and provided as a program product. Alternatively, the program can be provided by being recorded on a recording medium such as a hard disk built in the computer. A program can also be provided by downloading via a network.

提供されるプログラム製品は、ハードディスクなどのプログラム格納部にインストールされて実行される。なお、プログラム製品は、プログラム自体と、プログラムが記録された記録媒体とを含む。   The provided program product is installed in a program storage unit such as a hard disk and executed. The program product includes the program itself and a recording medium on which the program is recorded.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

本発明の実施の形態にかかる画像縮小装置1の構成の具体例を示すブロック図である。It is a block diagram which shows the specific example of a structure of the image reduction apparatus 1 concerning embodiment of this invention. 制御部101がプログラムを実行することによって発揮する機能構成の具体例を示すブロック図である。It is a block diagram which shows the specific example of a function structure demonstrated when the control part 101 performs a program. 画像縮小装置1で実行される画像縮小処理を示すフローチャートである。4 is a flowchart showing image reduction processing executed by the image reduction device 1. 画像縮小装置1で実行される画像縮小処理を示すフローチャートである。4 is a flowchart showing image reduction processing executed by the image reduction device 1. ステップS4で線密度算出部1016において行なわれる線密度算出処理を示すフローチャートである。It is a flowchart which shows the linear density calculation process performed in the linear density calculation part 1016 by step S4. ステップS4で線密度算出部1016において行なわれる線密度算出処理を示すフローチャートである。It is a flowchart which shows the linear density calculation process performed in the linear density calculation part 1016 by step S4. 線密度算出処理におけるカウンタ1017の具体例を示す図である。It is a figure which shows the specific example of the counter 1017 in a line density calculation process. 線密度算出処理におけるカウンタ1017の具体例を示す図である。It is a figure which shows the specific example of the counter 1017 in a line density calculation process. 分割したそれぞれの領域について値を平均したカウンタ1017の具体例を示す図である。It is a figure which shows the specific example of the counter 1017 which averaged the value about each divided | segmented area | region. 元画像と縮小後画像との参照パターンの関係を具体的に表わす図である。FIG. 4 is a diagram specifically illustrating a relationship between reference patterns of an original image and a reduced image. 元画像の中から参照パターンを選択する画面の具体例である。It is a specific example of a screen for selecting a reference pattern from an original image.

符号の説明Explanation of symbols

1 画像縮小装置、101 制御部、102 記憶部、103 外部記憶装置、104 ネットワーク、105 表示部、106 入出力部、1010 二値画像変換部、1011 参照パターン抽出部、1012 画像縮小部、1013 類似度算出部、1014 縮小率算出部、1015 連結成分抽出部、1016 線密度算出部、1017 カウンタ、1018 縮小画像座標算出部、1019 縮小画像参照パターン抽出部。   1 image reduction device, 101 control unit, 102 storage unit, 103 external storage device, 104 network, 105 display unit, 106 input / output unit, 1010 binary image conversion unit, 1011 reference pattern extraction unit, 1012 image reduction unit, 1013 similar Degree calculation unit, 1014 reduction rate calculation unit, 1015 connected component extraction unit, 1016 line density calculation unit, 1017 counter, 1018 reduced image coordinate calculation unit, 1019 reduced image reference pattern extraction unit.

Claims (18)

画像を画像縮小装置に対して入力する入力ステップと、
前記画像の少なくとも一部分の線密度を算出する第1の線密度算出ステップと、
前記第1の線密度算出ステップで算出された前記画像の線密度に基づいて、記画像から、特定の部分を第1の参照パターンとして抽出する第1の参照パターン抽出ステップと、
前記画像の縮小率である第1の縮小率を決定する第1の縮小率決定ステップと、
前記第1の縮小率で前記画像を縮小して生成された縮小画像から、前記第1の参照パターンに対応する部分を第2の参照パターンとして抽出する第2の参照パターン抽出ステップと、
前記第2の参照パターンの線密度を算出する第2の線密度算出ステップと、
前記第1の線密度算出ステップで算出された前記第1の参照パターンの線密度と、前記第2の線密度算出ステップで算出された前記第2の参照パターンの線密度とに基づいて、前記第1の参照パターンと前記第2の参照パターンとの間の類似度を算出する類似度算出ステップと、
前記類似度と前記第1の縮小率とに基づいて、前記画像の第2の縮小率を決定する第2の縮小率決定ステップとを備える、画像縮小方法。
An input step of inputting an image to the image reduction device;
A first linear density calculating step of calculating a linear density of at least a part of the image;
Based on the linear density of the image calculated by the first linear density calculation step, before Kiga image, a first reference pattern extraction step of extracting specific parts as the first reference pattern,
A first reduction rate determining step for determining a first reduction rate that is a reduction rate of the image;
A second reference pattern extraction step of extracting a portion corresponding to the first reference pattern as a second reference pattern from a reduced image generated by reducing the image at the first reduction rate;
A second linear density calculating step of calculating a linear density of the second reference pattern;
Based on the linear density of the first reference pattern calculated in the first linear density calculation step and the linear density of the second reference pattern calculated in the second linear density calculation step, A similarity calculation step of calculating a similarity between the first reference pattern and the second reference pattern;
An image reduction method comprising: a second reduction rate determination step for determining a second reduction rate of the image based on the similarity and the first reduction rate.
前記第1の参照パターン抽出ステップは、前記第1の線密度算出ステップで算出された線密度が最大である前記特定の部分を前記第1の参照パターンとして抽出する、請求項に記載の画像縮小方法。 It said first reference pattern extraction step, the linear density calculated by the first linear density calculation step for extracting the specific portion is the maximum as the first reference pattern, an image according to claim 1 Reduction method. 前記第1の参照パターン抽出ステップは、文字部分である前記特定の部分を前記第1の参照パターンとして抽出する、請求項1または2に記載の画像縮小方法。 It said first reference pattern extraction step extracts the specific part is a character part as said first reference pattern, the image reduction method according to claim 1 or 2. 前記第1の参照パターン抽出ステップにおいて前記第1の参照パターンが複数抽出された場合、前記類似度算出ステップは、前記複数の第1の参照パターンごとに、前記第1の参照パターンと前記第1の参照パターンに対応する第2の参照パターンとの間の類似度を算出し、前記算出された複数の第1の参照パターンごとの類似度の関係に基づいて、前記画像と前記縮小画像との類似度を算出する、請求項1〜のいずれかに記載の画像縮小方法。 When a plurality of the first reference patterns are extracted in the first reference pattern extraction step, the similarity calculation step includes the first reference pattern and the first reference for each of the plurality of first reference patterns. A similarity between the second reference pattern and the second reference pattern corresponding to the reference pattern is calculated, and based on the calculated relationship between the similarity for each of the plurality of first reference patterns, the image and the reduced image the similarity is calculated, the image reduction method according to any one of claims 1-3. 前記類似度算出ステップは、前記複数の第1の参照パターンごとの類似度の平均値を、前記画像と前記縮小画像との類似度とする、請求項に記載の画像縮小方法。 The image reduction method according to claim 4 , wherein the similarity calculation step uses an average value of the similarity for each of the plurality of first reference patterns as a similarity between the image and the reduced image. 前記第1の参照パターン抽出ステップにおいて文字部分である前記第1の参照パターンが複数抽出された場合、前記複数の第1の参照パターンの各々の文字らしさを算出する文字らしさ算出ステップをさらに備え、
前記類似度算出ステップは、前記複数の第1の参照パターンごとの類似度の各々に、前記複数の第1の参照パターンごとの文字らしさを重みとして乗じた合計値を、前記画像と前記縮小画像との類似度とする、請求項に記載の画像縮小方法。
A character likelihood calculating step of calculating character likelihoods of each of the plurality of first reference patterns when a plurality of the first reference patterns that are character portions are extracted in the first reference pattern extracting step;
In the similarity calculation step, the image and the reduced image are obtained by multiplying each of the similarities for each of the plurality of first reference patterns by a character value for each of the plurality of first reference patterns as a weight. The image reduction method according to claim 4 , wherein the image reduction method is a similarity to
前記類似度算出ステップは、前記第1の線密度算出ステップで算出された前記第1の参照パターンの線密度の分布と、前記第2の線密度算出ステップで算出された前記第2の参照パターンの線密度の分布とに基づいて、前記第1の参照パターンと前記第2の参照パターンとの間の類似度を算出する、請求項1または2に記載の画像縮小方法。 The similarity calculation step, the the distribution of the linear density of the first reference pattern calculated by the first linear density calculation step, the second reference pattern calculated by the second linear density calculation step 3. The image reduction method according to claim 1, wherein a similarity between the first reference pattern and the second reference pattern is calculated based on a linear density distribution. 前記第2の縮小率決定ステップは、予め設定された縮小画像のサイズに対応した縮小率を下限値として、前記第2の縮小率を決定する、請求項1〜のいずれかに記載の画像縮小方法。 The second reduction ratio determining step, a reduction ratio corresponding to the size of preset reduced image as the lower limit value, determining a second reduction factor, an image according to any one of claims 1-7 Reduction method. 画像を取得する取得手段と、
前記取得した画像の少なくとも一部分の線密度を算出する第1の線密度算出手段と、
前記第1の線密度算出手段で算出された前記画像の線密度に基づいて、記画像から、特定の部分を第1の参照パターンとして抽出する第1の参照パターン抽出手段と、
前記画像の縮小率である第1の縮小率を決定する第1の縮小率決定手段と、
前記第1の縮小率で前記画像を縮小して生成された縮小画像から、前記第1の参照パターンに対応する部分を第2の参照パターンとして抽出する第2の参照パターン抽出手段と、
前記第2の参照パターンの線密度を算出する第2の線密度算出手段と、
前記第1の線密度算出手段で算出された前記第1の参照パターンの線密度と、前記第2の線密度算出手段で算出された前記第2の参照パターンの線密度とに基づいて、前記第1の参照パターンと前記第2の参照パターンとの間の類似度を算出する類似度算出手段と、
前記類似度と前記第1の縮小率とに基づいて、前記画像の第2の縮小率を決定する第2の縮小率決定手段とを備える、画像縮小装置。
An acquisition means for acquiring an image;
First linear density calculating means for calculating a linear density of at least a part of the acquired image;
Based on the linear density of the image calculated by the first linear density calculation means, from the front Kiga image, a first reference pattern extracting means for extracting specific parts as the first reference pattern,
First reduction rate determining means for determining a first reduction rate that is a reduction rate of the image;
Second reference pattern extraction means for extracting a portion corresponding to the first reference pattern as a second reference pattern from a reduced image generated by reducing the image at the first reduction ratio;
Second linear density calculating means for calculating the linear density of the second reference pattern;
Based on the linear density of the first reference pattern calculated by the first linear density calculating means and the linear density of the second reference pattern calculated by the second linear density calculating means, Similarity calculating means for calculating the similarity between the first reference pattern and the second reference pattern;
An image reduction apparatus comprising: a second reduction rate determination unit that determines a second reduction rate of the image based on the similarity and the first reduction rate.
前記第1の参照パターン抽出手段は、前記第1の線密度算出手段で算出された線密度が最大である前記特定の部分を前記第1の参照パターンとして抽出する、請求項に記載の画像縮小装置。 10. The image according to claim 9 , wherein the first reference pattern extraction unit extracts the specific portion having the maximum linear density calculated by the first linear density calculation unit as the first reference pattern. 11. Reduction device. 前記第1の参照パターン抽出手段は、文字部分である前記特定の部分を前記第1の参照パターンとして抽出する、請求項9または10に記載の画像縮小装置。 11. The image reduction device according to claim 9 , wherein the first reference pattern extraction unit extracts the specific portion that is a character portion as the first reference pattern. 前記第1の参照パターン抽出手段において前記第1の参照パターンが複数抽出された場合、前記類似度算出手段は、前記複数の第1の参照パターンごとに、前記第1の参照パターンと前記第1の参照パターンに対応する第2の参照パターンとの間の類似度を算出し、前記算出された複数の第1の参照パターンごとの類似度の関係に基づいて、前記画像と前記縮小画像との類似度を算出する、請求項9〜11のいずれかに記載の画像縮小装置。 When a plurality of the first reference patterns are extracted by the first reference pattern extraction unit, the similarity calculation unit calculates the first reference pattern and the first reference for each of the plurality of first reference patterns. A similarity between the second reference pattern and the second reference pattern corresponding to the reference pattern is calculated, and based on the calculated relationship between the similarity for each of the plurality of first reference patterns, the image and the reduced image The image reduction device according to claim 9 , wherein the similarity is calculated. 前記類似度算出手段は、前記複数の第1の参照パターンごとの類似度の平均値を、前記画像と前記縮小画像との類似度とする、請求項12に記載の画像縮小装置。 The image reduction device according to claim 12 , wherein the similarity calculation unit uses an average value of the similarity for each of the plurality of first reference patterns as a similarity between the image and the reduced image. 前記第1の参照パターン抽出手段において文字部分である前記第1の参照パターンが複数抽出された場合、前記複数の第1の参照パターンの各々の文字らしさを算出する文字らしさ算出手段をさらに備え、
前記類似度算出手段は、前記複数の第1の参照パターンごとの類似度の各々に、前記複数の第1の参照パターンごとの文字らしさを重みとして乗じた合計値を、前記画像と前記縮小画像との類似度とする、請求項12に記載の画像縮小装置。
When a plurality of the first reference patterns, which are character parts, are extracted by the first reference pattern extraction means, further comprising character likelihood calculation means for calculating the character likelihood of each of the plurality of first reference patterns,
The similarity calculation means is configured to multiply the image and the reduced image by a total value obtained by multiplying each of the similarity for each of the plurality of first reference patterns by using a character likeness for each of the plurality of first reference patterns as a weight. The image reduction device according to claim 12 , wherein the image reduction device has a similarity to.
前記類似度算出手段は、前記第1の線密度算出手段で算出された前記第1の参照パターンの線密度の分布と、前記第2の線密度算出手段で算出された前記第2の参照パターンの線密度の分布とに基づいて、前記第1の参照パターンと前記第2の参照パターンとの間の類似度を算出する、請求項9または10に記載の画像縮小装置。 The similarity calculation unit, the first linear density calculating means and the first calculated in the the distribution of the linear density of the reference pattern, wherein the second reference pattern calculated by the second linear density calculating unit The image reduction device according to claim 9 or 10 , wherein a similarity between the first reference pattern and the second reference pattern is calculated based on a linear density distribution. 前記第2の縮小率決定手段は、予め設定された縮小画像のサイズに対応した縮小率を下限値として、前記第2の縮小率を決定する、請求項9〜15のいずれかに記載の画像縮小装置。 The image according to any one of claims 9 to 15 , wherein the second reduction rate determination means determines the second reduction rate with a reduction rate corresponding to a preset size of the reduced image as a lower limit. Reduction device. 取得した第1の画像を縮小して第2の画像を得る画像縮小方法をコンピュータに実行させる画像縮小プログラムであって、
前記画像縮小装置に入力された第1の画像の少なくとも一部分の線密度を算出する第1の線密度算出ステップと、
前記第1の線密度算出ステップで算出された前記第1の画像の線密度に基づいて、記第1の画像から、特定の部分を第1の参照パターンとして抽出する第1の参照パターン抽出ステップと、
前記第1の画像の縮小率である第1の縮小率を決定する第1の縮小率決定ステップと、
前記第1の縮小率で前記第1の画像を縮小して生成された縮小画像から、前記第1の参照パターンに対応する部分を第2の参照パターンとして抽出する第2の参照パターン抽出ステップと、
前記第2の参照パターンの線密度を算出する第2の線密度算出ステップと、
前記第1の線密度算出ステップで算出された前記第1の参照パターンの線密度と、前記第2の線密度算出ステップで算出された前記第2の参照パターンの線密度とに基づいて、前記第1の参照パターンと前記第2の参照パターンとの間の類似度を算出する類似度算出ステップと、
前記類似度と前記第1の縮小率とに基づいて、前記第1の画像を前記第2の画像に縮小する第2の縮小率を決定する第2の縮小率決定ステップとを実行させる、画像縮小プログラム。
An image reduction program for causing a computer to execute an image reduction method for reducing an acquired first image to obtain a second image,
A first linear density calculating step of calculating a linear density of at least a part of the first image input to the image reducing device ;
Based on the linear density of the first linear density calculating the first calculated in step images, before Symbol first image, extracting a first reference pattern to extract a particular portion as the first reference pattern Steps,
A first reduction ratio determining step for determining a first reduction ratio that is a reduction ratio of the first image;
A second reference pattern extracting step of extracting a portion corresponding to the first reference pattern as a second reference pattern from a reduced image generated by reducing the first image at the first reduction rate; ,
A second linear density calculating step of calculating a linear density of the second reference pattern;
Based on the linear density of the first reference pattern calculated in the first linear density calculation step and the linear density of the second reference pattern calculated in the second linear density calculation step, A similarity calculation step of calculating a similarity between the first reference pattern and the second reference pattern;
An image for executing a second reduction ratio determining step for determining a second reduction ratio for reducing the first image to the second image based on the similarity and the first reduction ratio; Reduction program.
請求項17に記載の画像縮小プログラムを記憶した、コンピュータ読取可能な記憶媒体。 A computer-readable storage medium storing the image reduction program according to claim 17 .
JP2003345761A 2003-10-03 2003-10-03 Image reduction method, image reduction apparatus, image reduction program, and storage medium storing the program Expired - Fee Related JP3756499B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2003345761A JP3756499B2 (en) 2003-10-03 2003-10-03 Image reduction method, image reduction apparatus, image reduction program, and storage medium storing the program
CNB2004800289209A CN100449607C (en) 2003-10-03 2004-09-29 Image downscaling method, image downscaling apparatus, image downscaling program, and recording medium storing that program
PCT/JP2004/014211 WO2005034079A1 (en) 2003-10-03 2004-09-29 Image downscaling method, image downscaling apparatus, image downscaling program, and recording medium storing that program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003345761A JP3756499B2 (en) 2003-10-03 2003-10-03 Image reduction method, image reduction apparatus, image reduction program, and storage medium storing the program

Publications (2)

Publication Number Publication Date
JP2005114825A JP2005114825A (en) 2005-04-28
JP3756499B2 true JP3756499B2 (en) 2006-03-15

Family

ID=34419469

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003345761A Expired - Fee Related JP3756499B2 (en) 2003-10-03 2003-10-03 Image reduction method, image reduction apparatus, image reduction program, and storage medium storing the program

Country Status (3)

Country Link
JP (1) JP3756499B2 (en)
CN (1) CN100449607C (en)
WO (1) WO2005034079A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5759128B2 (en) * 2009-09-18 2015-08-05 キヤノン株式会社 Information processing apparatus, information processing system, information processing method, and program
JP5875551B2 (en) 2013-05-24 2016-03-02 京セラドキュメントソリューションズ株式会社 Image processing apparatus, image processing method, and image processing program
CN110751955B (en) * 2019-09-23 2022-03-01 山东大学 Sound event classification method and system based on time-frequency matrix dynamic selection

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02230192A (en) * 1989-03-02 1990-09-12 Nec Corp Graphic data display device
JP2661747B2 (en) * 1989-07-06 1997-10-08 キヤノン株式会社 Character processor
KR100527982B1 (en) * 1998-06-11 2005-11-09 마츠시타 덴끼 산교 가부시키가이샤 Video display and program recorded medium
JP2001101397A (en) * 1999-09-29 2001-04-13 Ricoh Co Ltd Image processor and method for image processing and computer readable recording medium with program making computer execute image processing method recorded thereon

Also Published As

Publication number Publication date
WO2005034079A1 (en) 2005-04-14
CN100449607C (en) 2009-01-07
JP2005114825A (en) 2005-04-28
CN1864200A (en) 2006-11-15

Similar Documents

Publication Publication Date Title
US6347156B1 (en) Device, method and storage medium for recognizing a document image
JP4859025B2 (en) Similar image search device, similar image search processing method, program, and information recording medium
JP4607633B2 (en) Character direction identification device, image forming apparatus, program, storage medium, and character direction identification method
US8428356B2 (en) Image processing device and image processing method for generating electronic document with a table line determination portion
JP5298831B2 (en) Image processing apparatus and program
CN109117846B (en) Image processing method and device, electronic equipment and computer readable medium
JP2003132358A (en) Image processing method, device and system
JP4878209B2 (en) Image processing apparatus, image processing method, and computer program
JP2009003936A (en) Text direction-determining method in digital image, system, control program, and recording medium
JP4582204B2 (en) Image processing apparatus, image conversion method, and computer program
US8600175B2 (en) Apparatus and method of processing image including character string
JP3756499B2 (en) Image reduction method, image reduction apparatus, image reduction program, and storage medium storing the program
JP5284994B2 (en) Image processing device
JP5067882B2 (en) Image processing apparatus, image processing method, and program
JP4259949B2 (en) Image creating apparatus, image creating program, and recording medium
JP2004120092A (en) Image processing apparatus, image processing system, image processing method, storage medium, and program
JP4873554B2 (en) Image distribution apparatus and image distribution method
US8533590B2 (en) Information processing apparatus and layout processing method
JP4165046B2 (en) Image processing apparatus, image processing method, image processing program, and computer-readable recording medium on which image processing program is recorded
US20090274394A1 (en) Image processing method, image processing apparatus, and computer readable storage medium
JP4259950B2 (en) Image recognition apparatus, image recognition program, and recording medium
US20090074298A1 (en) Method and apparatus for creating document data, and computer program product
JP4380308B2 (en) Face area detection method and apparatus, program, and computer-readable storage medium storing face area detection program
JP2002109470A (en) Image recognition device, image recognition method, and computer readable recording medium stored with image recognition program
US20080225340A1 (en) Image processing apparatus, image processing method, and computer program product

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050217

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050712

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050907

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: 20051213

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051221

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100106

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110106

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120106

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130106

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees