JP2021068159A - Image processing apparatus, image processing method, and program - Google Patents

Image processing apparatus, image processing method, and program Download PDF

Info

Publication number
JP2021068159A
JP2021068159A JP2019192685A JP2019192685A JP2021068159A JP 2021068159 A JP2021068159 A JP 2021068159A JP 2019192685 A JP2019192685 A JP 2019192685A JP 2019192685 A JP2019192685 A JP 2019192685A JP 2021068159 A JP2021068159 A JP 2021068159A
Authority
JP
Japan
Prior art keywords
image
evaluation value
area
image processing
line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2019192685A
Other languages
Japanese (ja)
Inventor
紗恵子 大石
Saeko Oishi
紗恵子 大石
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2019192685A priority Critical patent/JP2021068159A/en
Publication of JP2021068159A publication Critical patent/JP2021068159A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Control Or Security For Electrophotography (AREA)
  • Facsimiles In General (AREA)
  • Image Analysis (AREA)

Abstract

To provide an evaluation value that matches the appearance even when a break is present in a straight line.SOLUTION: An image processing apparatus of the present invention comprises: an image input unit (201) that acquires (receives input of) image data obtained by reading, with a reader (107), a line image recorded by an image forming apparatus (106) based on recording data; a detection unit (202) that detects a printing area and a non-printing area in the line image based on the image data; and an evaluation value calculation unit (203) that derives (calculates) an evaluation value for evaluating the reproducibility of the line image recorded based on the recording data by using a result of execution of predetermined processing on the image data corresponding to the non-printing area.SELECTED DRAWING: Figure 4

Description

本発明は、画像形成装置により形成された画像を評価するための技術に関する。 The present invention relates to a technique for evaluating an image formed by an image forming apparatus.

従来、電子写真方式やインクジェット方式の画像形成装置において、より画像品位の高い印字を行うために、印字の高解像度化が進んでいる。そして、近年では、2400dpiの高解像度に対応した画像形成装置が実用化されている。但し、その反面、1dotで表現されるような数十μm幅の細線は、細線の線幅が変化する、細線のエッジがぎざぎざする、濃度が変化する等、ユーザが意図しない状態で出力されることがある。 Conventionally, in electrophotographic and inkjet image forming apparatus, in order to perform printing with higher image quality, the resolution of printing is increasing. In recent years, an image forming apparatus corresponding to a high resolution of 2400 dpi has been put into practical use. However, on the other hand, a thin line having a width of several tens of μm as expressed by 1 dot is output in a state unintended by the user, such as a change in the line width of the thin line, a jagged edge of the thin line, and a change in density. Sometimes.

そこで、細線の再現性を評価する技術が、ISO/IEC24790に規定されていたり、特許文献1に開示されたりしている。ISO/IEC24790では、細線の再現性の評価項目として「Blurriness(ぼけ)」、「Raggedness(ぎざぎざさ)」、「Line Width(線幅)」、「Character Darkness(ダークネス)」が定義されている。また、特許文献1では、細線のエッジにおいて高周波成分をカットすることで、人間の分離視力を考慮した細線のぎざぎざさを示す評価値を算出することが記載されている。 Therefore, a technique for evaluating the reproducibility of fine lines is defined in ISO / IEC24790 or disclosed in Patent Document 1. In ISO / IEC24790, "Blurriness", "Raggedness", "Line Width", and "Character Darkness" are defined as evaluation items for the reproducibility of thin lines. Further, Patent Document 1 describes that by cutting a high frequency component at the edge of a thin line, an evaluation value indicating the jaggedness of the thin line in consideration of human separated visual acuity is calculated.

特開2002−222418号公報Japanese Unexamined Patent Publication No. 2002-222418

大津:判別および最小2乗法に基づく自動しきい値選定法,電子通信学会論文誌、Vol.J63−D,No.4,pp.349−356,1980Otsu: Automatic threshold selection method based on discrimination and least squares method, IEICE Transactions, Vol. J63-D, No. 4, pp. 349-356, 1980

しかしながら、数十μm幅の細線を出力したとき、入力データは途切れのない線であっても、線が途切れて出力されてしまうことがあり、この場合、上述の従来技術では細線の再現性を評価することができない。 However, when a thin line with a width of several tens of μm is output, even if the input data is an uninterrupted line, the line may be interrupted and output. Cannot be evaluated.

即ち、上述の従来技術は、途切れ線を評価しても途切れていない線よりも良い評価値として算出してしまうことがあり、人が視認したときとは異なってしまうという課題がある。 That is, the above-mentioned conventional technique has a problem that even if the interrupted line is evaluated, it may be calculated as a better evaluation value than the uninterrupted line, which is different from the one visually recognized by a person.

本発明は、上記課題に鑑みてなされたものであって、その目的は、直線に途切れが存在していても、見た目と合う評価値を提供することである。 The present invention has been made in view of the above problems, and an object of the present invention is to provide an evaluation value that matches the appearance even if there is a break in the straight line.

本発明の画像処理装置は、画像形成装置によって記録データに基づいて記録された線画像を、読取装置によって読み取ることで得られた画像データを取得する取得手段と、前記画像データに基づいて、前記線画像における印字領域及び非印字領域を検出する検出手段と、前記非印字領域に対応する画像データに所定の処理を施した結果を用いて、前記記録データに基づいて記録された線画像の再現性を評価するための評価値を導出する導出手段とを備えることを特徴とする。 The image processing apparatus of the present invention is based on the acquisition means for acquiring the image data obtained by reading the line image recorded by the image forming apparatus based on the recorded data by the reading device and the image data. Reproduction of the line image recorded based on the recorded data by using the detection means for detecting the printed area and the non-printed area in the line image and the result of performing a predetermined process on the image data corresponding to the non-printed area. It is characterized by providing a derivation means for deriving an evaluation value for evaluating the property.

本発明によれば、直線に途切れが存在していても、見た目と合う評価値を提供することができる。 According to the present invention, it is possible to provide an evaluation value that matches the appearance even if there is a break in the straight line.

画像処理装置のハードウェア構成を示す図である。It is a figure which shows the hardware configuration of an image processing apparatus. 画像処理装置の機能構成を示す図である。It is a figure which shows the functional structure of an image processing apparatus. 直線画像の模式図である。It is a schematic diagram of a straight line image. 画像処理装置において実行される処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the processing executed in the image processing apparatus. 検出部において実行される処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process executed in the detection part. 輝度画像と二値化画像を示した図である。It is a figure which showed the luminance image and the binarized image. 左右のエッジ座標を求める処理を説明するための図である。It is a figure for demonstrating the process of obtaining the left and right edge coordinates. 評価値算出部において実行される処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process which is executed in the evaluation value calculation part. 印字領域における左右のエッジの近似直線と、評価値算出に用いる座標を説明するための図である。It is a figure for demonstrating the approximate straight line of the left and right edges in a print area, and the coordinates used for the evaluation value calculation. ぎざぎざさの評価値の算出方法を説明するための図である。It is a figure for demonstrating the calculation method of the evaluation value of jaggedness. 評価値算出部において実行される処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process which is executed in the evaluation value calculation part. 評価値の算出に用いる座標を説明するための図である。It is a figure for demonstrating the coordinates used for the calculation of an evaluation value. 濃度評価値の算出方法を説明するための図である。It is a figure for demonstrating the calculation method of the density | concentration evaluation value. 評価値算出部において実行される処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process which is executed in the evaluation value calculation part. 検出部において実行される処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process executed in the detection part. 検出部において実行される処理を説明するための図である。It is a figure for demonstrating the process executed in the detection part.

以下、本発明の実施形態について、図面を参照して説明する。なお、以下の実施形態は本発明を限定するものではなく、また、本実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。その他、補足として、同一の構成については、同じ符号を付して説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. It should be noted that the following embodiments do not limit the present invention, and not all combinations of features described in the present embodiment are essential for the means for solving the present invention. In addition, as a supplement, the same configuration will be described with the same reference numerals.

(実施形態1)
本実施形態では、画像形成装置が記録媒体に形成した画像を読み取り、画像形成装置の線の再現性を評価する形態について説明する。つまり、評価の処理対象の画像は、印刷物を読み取ることで得られる画像である。直線を含む画像(以下、直線画像とする)に対してぎざぎざさの評価値を算出し、その評価値に応じて画像を補正する方法について説明する。なお、ここで、ぎざぎざさの評価値は、細線の再現性を評価するための評価値の一つである。また、後述の実施形態で記載する濃度に関する評価値(以下、濃度評価値と称する)、途切れ度を示す評価値についても同様である。
(Embodiment 1)
In this embodiment, a mode in which the image forming apparatus reads an image formed on a recording medium and evaluates the line reproducibility of the image forming apparatus will be described. That is, the image to be evaluated is an image obtained by reading a printed matter. A method of calculating an evaluation value of jaggedness for an image including a straight line (hereinafter referred to as a straight line image) and correcting the image according to the evaluation value will be described. Here, the evaluation value of the jaggedness is one of the evaluation values for evaluating the reproducibility of the thin line. The same applies to the evaluation value related to the concentration (hereinafter referred to as the concentration evaluation value) and the evaluation value indicating the degree of interruption described in the embodiments described later.

<ハードウェア構成>
図1は、本実施形態に係る画像処理装置を含む画像形成システムのハードウェア構成を示す図である。本実施形態に係る画像処理装置100は、例えば、パーソナルコンピュータ等であり、画像形成装置106に接続される。また、画像処理装置100の各機能は、パーソナルコンピュータが所定のプログラムを実行することにより実現される。なお、画像形成システムのハードウェア構成は、必ずしも図1に示される構成に限られない。例えば、画像処理装置が実行する画像形成装置106の制御を、画像形成装置に内蔵された画像処理コントローラとして動作することにより実現させるようにしてもよい。
<Hardware configuration>
FIG. 1 is a diagram showing a hardware configuration of an image forming system including an image processing device according to the present embodiment. The image processing device 100 according to the present embodiment is, for example, a personal computer or the like, and is connected to the image forming device 106. Further, each function of the image processing device 100 is realized by the personal computer executing a predetermined program. The hardware configuration of the image forming system is not necessarily limited to the configuration shown in FIG. For example, the control of the image forming apparatus 106 executed by the image processing apparatus may be realized by operating as an image processing controller built in the image forming apparatus.

画像処理装置100は、CPU101、RAM102、記憶部103、インターフェース(I/F)104、バス105を備え、画像形成装置106、読取装置107と接続される。CPU101は、入力されたデータや、RAM102や記憶部103に格納されているコンピュータプログラムを用いて、画像形成システム全体の動作を制御する。 The image processing device 100 includes a CPU 101, a RAM 102, a storage unit 103, an interface (I / F) 104, and a bus 105, and is connected to the image forming device 106 and the reading device 107. The CPU 101 controls the operation of the entire image forming system by using the input data and the computer program stored in the RAM 102 and the storage unit 103.

RAM102は、CPU101が各種の処理をするために用いる記憶領域として使用される他、記憶部103から読み取った各種データやコンピュータプログラム等、画像処理に必要なデ―タを一時的に記憶する記憶領域として使用される。 The RAM 102 is used as a storage area used by the CPU 101 for performing various processes, and also temporarily stores data necessary for image processing such as various data read from the storage unit 103 and a computer program. Used as.

記憶部103は、画像形成システムにおける各部を設定するパラメータやプログラム等を記憶する。I/F104は、画像処理装置100と外部装置を接続するためのインターフェースとして機能する他、赤外線通信や無線LAN等を用いて通信装置とデータをやりとりするため、また、インターネットに接続するためのインターフェースとしても機能する。 The storage unit 103 stores parameters, programs, and the like for setting each unit in the image forming system. The I / F 104 functions as an interface for connecting the image processing device 100 and an external device, exchanges data with the communication device using infrared communication, wireless LAN, or the like, and is an interface for connecting to the Internet. Also works as.

上述の各部(CPU101、RAM102、記憶部103、及びI/F104)は、いずれもバス105に接続され、バス105を介して各種データの送受信を行う。画像形成装置106は、電子写真方式やインクジェット方式等のプリンタであり、記録データに基づいて記録媒体上に色材を用いて画像を形成(記録)する。読取装置107は、例えば、イメージスキャナであり、文字や写真等の原稿をデジタルデータとして読み取り、I/F104を介して画像処理装置100に取得したデータを転送する。 Each of the above-mentioned units (CPU 101, RAM 102, storage unit 103, and I / F 104) is connected to the bus 105 and transmits / receives various data via the bus 105. The image forming apparatus 106 is a printer of an electrophotographic method, an inkjet method, or the like, and forms (records) an image on a recording medium using a coloring material based on the recorded data. The scanning device 107 is, for example, an image scanner, which reads a document such as characters and photographs as digital data, and transfers the acquired data to the image processing device 100 via the I / F 104.

<機能構成>
次に、CPU101が記憶部103に格納された各種ソフトウェア(コンピュータプログラム)を実行することで実現される各種機能について説明する。図2は、本実施形態に係る画像処理装置の画像評価を実行するための機能構成を示す図である。画像処理装置100は、図2に示されるように、画像入力部201、検出部202、評価値算出部203、設定部204を備える。
<Functional configuration>
Next, various functions realized by the CPU 101 executing various software (computer programs) stored in the storage unit 103 will be described. FIG. 2 is a diagram showing a functional configuration for executing image evaluation of the image processing apparatus according to the present embodiment. As shown in FIG. 2, the image processing device 100 includes an image input unit 201, a detection unit 202, an evaluation value calculation unit 203, and a setting unit 204.

画像入力部201は、CPU101からの指示(命令)に応じて、直線画像の画像データを取得する。上述の通り、ここで取得する画像データは、読取装置107が画像形成装置106により出力された印刷物を読み取ることで得られたデジタルデータである。この直線画像の画像データは、例えば、R(レッド)、G(グリーン)、B(ブルー)各々のデータであり、1画素の画素値が8bitで表される画像データである。以下、画像入力部201により取得される画像データの直線画像について、図3を用いて説明を補足する。 The image input unit 201 acquires image data of a straight line image in response to an instruction (command) from the CPU 101. As described above, the image data acquired here is digital data obtained by the reading device 107 reading the printed matter output by the image forming device 106. The image data of this linear image is, for example, R (red), G (green), and B (blue) data, and is image data in which the pixel value of one pixel is represented by 8 bits. Hereinafter, the description of the linear image of the image data acquired by the image input unit 201 will be supplemented with reference to FIG.

図3は、読取装置107が読み取った画像のうち、線領域を切り出して拡大した直線画像の模式図である。本実施形態では、画像形成装置106の線の再現性を評価するため、画像形成装置106が図3(e)に示す線のチャートを含む画像データに基づいて記録媒体に印刷する。なお、図3(e)は、複数の画素からなる画像データを模式的に示した図である。例えば、チャート画像データが2ビットの画素値からなる場合、細線を構成する画素にはドットを印字することを意味する1、細線を構成しない領域の画素にはドットを印字しないことを意味する0が格納されている。ここでは、図3(e)に示すチャート画像データに基づいて画像形成装置106が印字すると、記録媒体には数十μm幅(50〜80μm程度)の線が印字されるものとする。さらに、印刷した記録媒体を、読取装置107が読み取ることで、評価に用いる直線画像の画像データを取得する。このとき、画像における縦方向に線が形成されるように、読取装置107に読み取らせる。なお、横方向に線が形成されているような画像(図3(a)が90度回転しているような画像)においては、読取装置107で画像を読み取る前に画像を90度(若しくは、270度)回転させることにより縦方向に線が形成されているような画像とすればよい。したがって、直線画像としては、図3(a)、図3(b)に示されるように、画像データにおいて垂直方向の向きである線を含む画像を対象とする。画像形成装置106は、図3(e)に基づいて印刷した場合、理想的には、図3(e)に示すようながたつきや途切れのない直線が記録媒体に形成されていることが望ましい。しかしながら、現実では、図3(a)に示すように線の輪郭ががたついてぎざぎざしたり、図3(b)に示すように線が途切れたりしてしまう。なお、本実施形態では1本の線を評価するため、図3(c)に示されるような画像データ上に2本の直線が存在する場合、図3(a)のように直線を1本ずつに分離(補正)する必要がある。また、図3(d)に示されるような直線の向きが垂直方向ではなく、記録材が飛び散っているような印字が含まれる画像についても、同様に画像データを補正する必要がある。なお、この補正に関しては、後述の実施形態4で説明する。以上のような図3(a)〜図3(d)に示すような線のぎざぎざさや途切れなど、画像形成装置106による線の再現性の低下の度合いを、適切に評価する。 FIG. 3 is a schematic view of a linear image obtained by cutting out a line region and enlarging the image read by the reading device 107. In the present embodiment, in order to evaluate the line reproducibility of the image forming apparatus 106, the image forming apparatus 106 prints on a recording medium based on the image data including the line chart shown in FIG. 3 (e). Note that FIG. 3E is a diagram schematically showing image data composed of a plurality of pixels. For example, when the chart image data consists of 2-bit pixel values, it means that dots are printed on the pixels that form the thin line, and 0 that means that the dots are not printed on the pixels in the area that does not form the thin line. Is stored. Here, when the image forming apparatus 106 prints based on the chart image data shown in FIG. 3 (e), it is assumed that a line having a width of several tens of μm (about 50 to 80 μm) is printed on the recording medium. Further, the printed recording medium is read by the reading device 107 to acquire image data of a linear image used for evaluation. At this time, the reading device 107 is made to read so that a line is formed in the vertical direction in the image. In the case of an image in which lines are formed in the horizontal direction (an image in which FIG. 3A is rotated by 90 degrees), the image is read by 90 degrees (or by 90 degrees) before being read by the reading device 107. The image may be such that lines are formed in the vertical direction by rotating the image (270 degrees). Therefore, as the straight line image, as shown in FIGS. 3A and 3B, an image including a line oriented in the vertical direction in the image data is targeted. When the image forming apparatus 106 prints based on FIG. 3 (e), ideally, a straight line without rattling or interruption as shown in FIG. 3 (e) is formed on the recording medium. desirable. However, in reality, the outline of the line is jagged and jagged as shown in FIG. 3A, or the line is interrupted as shown in FIG. 3B. In this embodiment, since one line is evaluated, when two straight lines exist on the image data as shown in FIG. 3C, one straight line is used as shown in FIG. 3A. It is necessary to separate (correct) each one. Further, it is also necessary to correct the image data in the same manner for an image in which the direction of the straight line as shown in FIG. 3D is not the vertical direction and the printing material is scattered. This correction will be described in the fourth embodiment described later. The degree of deterioration in line reproducibility by the image forming apparatus 106, such as the jaggedness and breaks in the lines shown in FIGS. 3A to 3D as described above, is appropriately evaluated.

図2に戻り、検出部202は、CPU101からの指示に応じて、画像入力部201で入力された直線画像に対して、印字領域と非印字領域を各々、検出する。ここで、印字領域とは、トナーやインク等の記録材が記録媒体上に印字されている領域のことであり、また、非印字領域とは、線の一部として記録材が記録媒体上に印字されるべき領域であるにも関わらず記録材が印字されなかった領域のことである。即ち、非印字領域とは、直線画像の途切れ部分として示される領域のことである。 Returning to FIG. 2, the detection unit 202 detects a print area and a non-print area, respectively, with respect to the linear image input by the image input unit 201 in response to an instruction from the CPU 101. Here, the print area is an area in which a recording material such as toner or ink is printed on the recording medium, and the non-print area is an area in which the recording material is printed on the recording medium as a part of a line. This is the area where the recording material was not printed even though it was the area to be printed. That is, the non-printing area is an area shown as a break portion of the linear image.

評価値算出部203は、CPU101からの指示に応じて、検出部202で検出した印字領域と非印字領域に基づいて直線画像の評価値を算出する。本実施形態では、評価値として、ぎざぎざさの評価値について算出する。なお、算出方法については、図8を用いて後述する。 The evaluation value calculation unit 203 calculates the evaluation value of the linear image based on the print area and the non-print area detected by the detection unit 202 in response to the instruction from the CPU 101. In the present embodiment, the evaluation value of the jaggedness is calculated as the evaluation value. The calculation method will be described later with reference to FIG.

設定部204は、CPU101からの指示に応じて、評価値算出部203で算出した評価値に基づいて画像形成装置106の設定を制御する。その補正した結果は画像形成装置106に転送され、画像形成装置106は、その補正した結果を反映して、記録媒体上に画像を形成する。 The setting unit 204 controls the setting of the image forming apparatus 106 based on the evaluation value calculated by the evaluation value calculation unit 203 in response to the instruction from the CPU 101. The corrected result is transferred to the image forming apparatus 106, and the image forming apparatus 106 forms an image on the recording medium by reflecting the corrected result.

以上、本実施形態に係る画像処理装置の機能について説明したが、これらの機能の全てに関して、CPU101がコンピュータを実行することで実現させる必要はなく、各機能ブロックに対応する専用の処理回路を設けるようにしてもよい。 Although the functions of the image processing apparatus according to the present embodiment have been described above, it is not necessary for the CPU 101 to realize all of these functions by executing a computer, and a dedicated processing circuit corresponding to each functional block is provided. You may do so.

<画像処理装置における処理の手順>
次に、上述の図2で説明した画像処理装置100の機能構成を踏まえ、画像処理装置100において実行される処理の手順について説明する。図4は、画像処理装置100において実行される処理の手順を示すフローチャートである。なお、フローチャートの説明における記号「S」は、ステップを表すものとする。この点、以下のフローチャートの説明においても同様とする。
<Processing procedure in the image processing device>
Next, the procedure of the processing executed by the image processing apparatus 100 will be described based on the functional configuration of the image processing apparatus 100 described with reference to FIG. FIG. 4 is a flowchart showing a processing procedure executed by the image processing apparatus 100. The symbol "S" in the description of the flowchart represents a step. The same applies to the description of the following flowchart.

S401において、画像入力部201は、線のチャート画像を印刷した記録媒体を読み取ることで得られた直線画像の画像データを取得する。ここで、直線画像の画像データは、上述のように、RGBの各々が8bitで表される画像データである。S402において、検出部202は、S401で取得した直線画像において、印字領域と非印字領域を各々、検出する。なお、S402の処理の詳細は、図5を用いて後述する。 In S401, the image input unit 201 acquires image data of a straight line image obtained by reading a recording medium on which a line chart image is printed. Here, the image data of the straight line image is the image data in which each of RGB is represented by 8 bits as described above. In S402, the detection unit 202 detects a printed area and a non-printed area in the linear image acquired in S401, respectively. The details of the processing of S402 will be described later with reference to FIG.

S403において、評価値算出部203は、S402で検出した印字領域及び非印字領域に基づいて、ぎざぎざさを示す評価値を算出する。なお、S403の処理の詳細は、図8を用いて後述する。 In S403, the evaluation value calculation unit 203 calculates an evaluation value indicating the jaggedness based on the printed area and the non-printed area detected in S402. The details of the processing of S403 will be described later with reference to FIG.

S404において、設定部204は、S403で算出した評価値が所定の条件を充足するか否かを判定する。ここでは、設定部204は、S403で算出したぎざぎざさの評価値が閾値以上であるか否かを判定する。この閾値はユーザにより任意に設定されてもよく、例えば、予め評価結果をデータ群として用意しておき、このデータ群に基づいて設定することができる。ここで、ぎざぎざさの評価値は、値が大きいほど、ぎざぎざさが大きいことを示すものとする。 In S404, the setting unit 204 determines whether or not the evaluation value calculated in S403 satisfies a predetermined condition. Here, the setting unit 204 determines whether or not the evaluation value of the jaggedness calculated in S403 is equal to or greater than the threshold value. This threshold value may be arbitrarily set by the user. For example, the evaluation result can be prepared as a data group in advance and set based on this data group. Here, the evaluation value of the jaggedness shall indicate that the larger the value, the greater the jaggedness.

そのため、本実施形態において、設定部204は、ぎざぎざさの評価値が設定した閾値以上であれば、画像形成装置106の線の再現性を向上させる必要があると判定し、処理をS405に移行させる。また、設定部204は、ぎざぎざさの評価値が設定した閾値未満であれば、画像補正する必要がないと判定し、図4に示される処理を終了する。 Therefore, in the present embodiment, the setting unit 204 determines that it is necessary to improve the line reproducibility of the image forming apparatus 106 if the evaluation value of the jaggedness is equal to or higher than the set threshold value, and shifts the process to S405. Let me. Further, the setting unit 204 determines that the image correction is not necessary if the evaluation value of the jaggedness is less than the set threshold value, and ends the process shown in FIG.

S405において、設定部204は、S404で画像形成装置106の線の再現性を向上させる必要であると判定すると、画像形成装置106の設定を変更する。ここで、画像形成装置106の設定を変更する処理として、いくつか例示する。 In S405, when the setting unit 204 determines in S404 that it is necessary to improve the line reproducibility of the image forming apparatus 106, the setting unit 204 changes the setting of the image forming apparatus 106. Here, some examples are given as processes for changing the settings of the image forming apparatus 106.

例えば、画像形成装置106に格納されている印刷スクリーン形状の設定を変更することで、線の再現性を向上させることができる。このような設定の変更は、画像形成装置106が印刷するためのスクリーン処理で用いられたスクリーンと、直線画像データとが干渉して途切れが発生した場合に効果がある。なお、ここで、変更するスクリーンとしては、例えば、直線の方向とスクリーン角度の差が大きくなるようなスクリーン角度をもつ高線数ラインスクリーンが望ましい。 For example, the line reproducibility can be improved by changing the setting of the print screen shape stored in the image forming apparatus 106. Such a change in setting is effective when the screen used in the screen processing for printing by the image forming apparatus 106 interferes with the linear image data and a break occurs. Here, as the screen to be changed, for example, a high-line number line screen having a screen angle such that the difference between the direction of the straight line and the screen angle becomes large is desirable.

また、画像形成装置106の印字濃度設定を上げることや、画像形成装置106が電子写真方式のプリンタならばレーザ出力を大きくすることによって、線の再現性を向上させることができる。これらの処理では、より多い記録材が記録媒体に付着するため、直線の途切れを抑制することができる。そのため、直線が途切れていることによって、ぎざぎざさが悪化している場合に効果がある。 Further, the line reproducibility can be improved by increasing the print density setting of the image forming apparatus 106 or increasing the laser output if the image forming apparatus 106 is an electrophotographic printer. In these processes, more recording material adheres to the recording medium, so that the breakage of the straight line can be suppressed. Therefore, it is effective when the jaggedness is deteriorated due to the interruption of the straight line.

さらに、画像形成装置106に入力された印刷用の画像データ自体の修正が可能であれば、画像データにおける線を検出し、検出した線の線幅方向に強制的にドットを追加し、画像データ上で線幅を太くすることでも、線の再現性を向上させることができる。入力する画像データにおける線の線幅が太ければ、画像形成装置106でより安定して再現でき、直線の途切れを抑制することができる。そのため、直線が途切れていることによって、ぎざぎざさが悪化している場合に効果がある。 Further, if the image data for printing itself input to the image forming apparatus 106 can be modified, a line in the image data is detected, and dots are forcibly added in the line width direction of the detected line to obtain the image data. The line reproducibility can also be improved by increasing the line width above. If the line width of the line in the input image data is wide, the image forming apparatus 106 can reproduce the line more stably, and the breakage of the straight line can be suppressed. Therefore, it is effective when the jaggedness is deteriorated due to the interruption of the straight line.

以上のように、評価値に基づいて(より詳細には、評価値が所定の閾値以上であることに基づいて)、印刷用の画像データに対して、直線画像の線幅を太くする等の補正を施すことができる。なお、元データの修正が可能であるか否かは、ユーザ設定等に応じて許可がされているか否かにより判定すればよい。また、設定部204は、S405において、直線の補正を完了すると、図4に示される処理を終了する。 As described above, based on the evaluation value (more specifically, based on the evaluation value being equal to or higher than a predetermined threshold value), the line width of the straight line image is thickened with respect to the image data for printing. Corrections can be made. Whether or not the original data can be modified may be determined by whether or not permission is granted according to user settings and the like. Further, when the setting unit 204 completes the correction of the straight line in S405, the setting unit 204 ends the process shown in FIG.

<検出部における処理>
次に、検出部202において実行されるS402の処理について、図5を用いて説明する。図5は、検出部202において実行される処理の手順を示すフローチャートであり、上述のS402の処理を詳細に示したものである。
<Processing in the detector>
Next, the process of S402 executed by the detection unit 202 will be described with reference to FIG. FIG. 5 is a flowchart showing the procedure of the process executed by the detection unit 202, and shows the process of S402 described in detail.

S501において、検出部202は、直線画像の輝度成分を抽出する(以下、輝度成分を抽出した画像を輝度画像と称する)。輝度成分の抽出には、直線画像のRGB値をCIEXYZ色空間に変換して、XYZ値のうちのY値を輝度成分として用いる他、RGB画像のG値を輝度成分として用いてもよい。 In S501, the detection unit 202 extracts the luminance component of the linear image (hereinafter, the image from which the luminance component is extracted is referred to as a luminance image). To extract the luminance component, the RGB value of the linear image may be converted into the CIEXYZ color space and the Y value of the XYZ values may be used as the luminance component, or the G value of the RGB image may be used as the luminance component.

以下、直線画像のRGB値をCIEXYZ色空間のXYZ値に変換する方法について説明する。なお、直線画像のRGB値に関して、直線画像の左上から水平方向にx画素目、垂直方向にy画素目のRGB値を各々、R(x,y)、G(x,y)、B(x,y)とする。 Hereinafter, a method of converting the RGB value of the linear image into the XYZ value of the CIEXYZ color space will be described. Regarding the RGB values of the straight line image, the RGB values of the xth pixel in the horizontal direction and the yth pixel in the vertical direction from the upper left of the straight line image are R (x, y), G (x, y), and B (x, respectively. , Y).

先ず、下式(1)に示されるように、8bitのR(x,y)のデータに対して、0以上1以下の値に正規化した後、画像データを取得した読取装置107のガンマ特性γをかけ、輝度リニアデータR´(x,y)を求める。同様に、下式(2)及び(3)に示されるように、8bitのG(x,y)、B(x,y)のデータから輝度リニアデータG´(x,y)、B´(x,y)を求める。 First, as shown in the following equation (1), the gamma characteristic of the reader 107 that acquired the image data after normalizing the 8-bit R (x, y) data to a value of 0 or more and 1 or less. Multiply by γ to obtain the luminance linear data R'(x, y). Similarly, as shown in the following equations (2) and (3), the luminance linear data G'(x, y), B'(from the 8-bit G (x, y), B (x, y) data Find x, y).

Figure 2021068159
Figure 2021068159

Figure 2021068159
Figure 2021068159

Figure 2021068159
Figure 2021068159

次に、R´G´B´で示される色データをCIEXYZ表色系の3刺激値X、Y、Zに変換する。輝度リニアデータR´G´B´から3刺激値XYZに変換する変換行列は、例えば、3行3列の行列であり、この変換行列と、輝度リニアデータR´G´B´に対応した3行1列の行列との行列積が、3刺激値XYZ値に対応した3行1列の行列として示される。このように、行列積を計算することで、輝度リニアデータR´G´B´を3刺激値XYZに変換することができる。具体的には、下式(4)〜(6)に示される変換式によりX、Y、Zに変換する。なお、下式(4)〜(6)において、m11〜m33は、変換行列Mの要素である。 Next, the color data represented by R'G'B'is converted into the tristimulus values X, Y, Z of the CIEXYZ color system. The transformation matrix for converting the brightness linear data R'G'B'to the tristimulus value XYZ is, for example, a matrix of 3 rows and 3 columns, and 3 corresponding to this conversion matrix and the brightness linear data R'G'B' The matrix product with the row-and-column matrix is shown as a 3-by-1 matrix corresponding to the tristimulus value XYZ values. By calculating the matrix product in this way, the luminance linear data R'G'B'can be converted into the tristimulus value XYZ. Specifically, it is converted into X, Y, and Z by the conversion formulas shown in the following formulas (4) to (6). In the following equations (4) to (6), m11 to m33 are elements of the transformation matrix M.

Figure 2021068159
Figure 2021068159

Figure 2021068159
Figure 2021068159

Figure 2021068159
Figure 2021068159

S502において、検出部202は、輝度画像を印字領域と非印字領域に分離するため、S501で変換した輝度画像に対して二値化処理を実行する。ここで、二値化処理とは、輝度画像の画素値が閾値以上であれば「1」を、閾値未満であれば「0」を割り当てる処理である。 In S502, the detection unit 202 executes a binarization process on the luminance image converted in S501 in order to separate the luminance image into a print area and a non-print area. Here, the binarization process is a process of assigning "1" when the pixel value of the luminance image is equal to or more than the threshold value and "0" when the pixel value is less than the threshold value.

なお、この閾値に関して、例えば、非特許文献1に開示されている方法を用いて決定すればよい。また、この閾値に関して、輝度画像の画素値が取り得る数値範囲の割合から求めてもよい。 The threshold value may be determined by using, for example, the method disclosed in Non-Patent Document 1. Further, this threshold value may be obtained from the ratio of the numerical range that the pixel value of the luminance image can take.

補足として、図6を用いて、輝度画像と二値化処理後の画像(以下、二値化画像と称する)を例示する。図6において、図6(a)に二値化処理前の輝度画像を、図6(b)に二値化処理後の画像を模式的に示している。なお、図6において示される1マスは1画素に対応しており、塗りつぶされたマスの濃淡は画素値の大きさに対応している。 As a supplement, FIG. 6 is used to illustrate a luminance image and an image after binarization processing (hereinafter, referred to as a binarized image). 6 (a) schematically shows a luminance image before the binarization process, and FIG. 6 (b) schematically shows an image after the binarization process. It should be noted that one square shown in FIG. 6 corresponds to one pixel, and the shade of the filled square corresponds to the size of the pixel value.

図6(a)の輝度画像は、多階調であるため、塗りつぶされたマスに濃淡があるが、図6(b)の二値化画像は、2階調であるため、印字されている領域である黒(「0」)と印字されていない領域である白(「1」)で示される。 Since the luminance image of FIG. 6 (a) has multiple gradations, the filled squares have shading, but the binarized image of FIG. 6 (b) is printed because it has two gradations. It is indicated by black (“0”), which is an area, and white (“1”), which is an unprinted area.

図5に戻り、S503からS509までの処理で、検出部202は、二値化画像に対してループ処理を実行する。ここで、二値化画像を二次元配列として、二値化画像の行数をM、列数をNとするM×N行列で示すものとする。この場合、例えば、図6(b)に示される二値化画像では、17行15列の二値化画像であるため、M=17、N=15が設定される。 Returning to FIG. 5, in the processes from S503 to S509, the detection unit 202 executes a loop process on the binarized image. Here, it is assumed that the binarized image is a two-dimensional array and is represented by an M × N matrix in which the number of rows of the binarized image is M and the number of columns is N. In this case, for example, in the binarized image shown in FIG. 6B, since it is a binarized image of 17 rows and 15 columns, M = 17 and N = 15 are set.

S503において、検出部202は、二値化画像の列方向の走査順を示す変数iが二値化画像の行数であるM以下であるか否かを判定する。なお、変数iの初期値を1に設定する。この場合、例えば、図6(b)に示される二値化画像において、検出部202は、変数i が17以下であればS504に処理を移行させ、また、変数iが17より大きければループ処理を終了させ、S402の処理を終了させる。 In S503, the detection unit 202 determines whether or not the variable i indicating the scanning order in the column direction of the binarized image is M or less, which is the number of rows of the binarized image. The initial value of the variable i is set to 1. In this case, for example, in the binarized image shown in FIG. 6B, the detection unit 202 shifts the process to S504 if the variable i is 17 or less, and loops if the variable i is larger than 17. Is terminated, and the processing of S402 is terminated.

S504において、検出部202は、二値化画像のi行目において、直線の左側エッジの座標値を求める。具体的には、二値化画像のi行目において、1列目から右方向に走査し、二値化画像の画素値が「1」から「0」に変わる(x,y)座標を二次元配列L(i,1)及びL(i,2)に格納する。この二次元配列Lは、直線の左側エッジの座標値を示している。なお、1列目からN列目まで全て「1」であった場合は「−1」をL(i,1)に格納し、1列目が「0」であった場合は「1」をL(i,1)に格納する。 In S504, the detection unit 202 obtains the coordinate value of the left edge of the straight line in the i-th row of the binarized image. Specifically, in the i-th row of the binarized image, scanning is performed from the first column to the right, and the (x, y) coordinates at which the pixel value of the binarized image changes from "1" to "0" are set to two. It is stored in the dimensional arrays L (i, 1) and L (i, 2). This two-dimensional array L shows the coordinate values of the left edge of the straight line. If all the columns from the first column to the Nth column are "1", "-1" is stored in L (i, 1), and if the first column is "0", "1" is stored. Store in L (i, 1).

ここで、図7を用いて、S504の処理について説明を補足する。図7(a)は、S504の処理の模式図と二次元配列L,Lp,Lnpを示した図である。図7(a)に示される画像は、図6(b)の二値化画像と同様であり、図7(a)において、変数i=1のとき、画素値が「1」から「0」に変わるときの座標は(x,y)=(6,1)である。そのため、L(1,1)に「6」、L(1,2)に「1」が格納されることとなる。 Here, the description of the process of S504 will be supplemented with reference to FIG. 7. FIG. 7A is a schematic diagram of the processing of S504 and a diagram showing two-dimensional arrays L, Lp, and Lnp. The image shown in FIG. 7 (a) is the same as the binarized image of FIG. 6 (b), and in FIG. 7 (a), when the variable i = 1, the pixel values are “1” to “0”. The coordinates when changing to are (x, y) = (6,1). Therefore, "6" is stored in L (1,1) and "1" is stored in L (1,2).

S505において、検出部202は、二値化画像のi行目において、直線の右側エッジの座標値を求める。具体的には、S504の処理と同様に、二値化画像のi行目において、N列目から左方向に走査し、二値化画像の画素値が「1」から「0」に変わる(x,y)座標を二次元配列r(i,1)及びr(i,2)に格納する。この二次元配列rは、直線の右側エッジの座標を示している。なお、N列目から1列目まで全て「1」であった場合は「−1」をr(i,1)に格納し、N列目が「0」であった場合は「1」をr(i,1)に格納する。 In S505, the detection unit 202 obtains the coordinate value of the right edge of the straight line in the i-th row of the binarized image. Specifically, similarly to the processing of S504, in the i-th row of the binarized image, scanning is performed from the Nth column to the left, and the pixel value of the binarized image changes from "1" to "0" ( The x, y) coordinates are stored in the two-dimensional arrays r (i, 1) and r (i, 2). This two-dimensional array r shows the coordinates of the right edge of the straight line. If all the columns from the Nth column to the 1st column are "1", "-1" is stored in r (i, 1), and if the Nth column is "0", "1" is stored. Store in r (i, 1).

ここで、図7を用いて、S505の処理について説明を補足する。図7(b)は、S505の処理の模式図と二次元配列r,rp,rnpを示した図である。図7(b)に示される画像は、図6(b)の二値化画像と同様であり、図7(b)において、変数i=1のとき、画素値が「1」から「0」に変わるときの座標は(x,y)=(9,1)である。そのため、r(1,1)に「9」、r(1,2)に「1」が格納されることとなる。 Here, the description of the process of S505 will be supplemented with reference to FIG. 7. FIG. 7B is a schematic diagram of the processing of S505 and a diagram showing two-dimensional arrays r, rp, and rnp. The image shown in FIG. 7 (b) is the same as the binarized image of FIG. 6 (b), and in FIG. 7 (b), when the variable i = 1, the pixel values are "1" to "0". The coordinates when changing to are (x, y) = (9,1). Therefore, "9" is stored in r (1,1) and "1" is stored in r (1,2).

図5に戻り、S506において、検出部202は、二値化画像のi行目が印字領域か非印字領域かを判定する。具体的には、検出部202は、L(i,1)≠−1であって、かつr(i,1)≠−1であるかを判定する。 Returning to FIG. 5, in S506, the detection unit 202 determines whether the i-th line of the binarized image is a print area or a non-print area. Specifically, the detection unit 202 determines whether L (i, 1) ≠ -1 and r (i, 1) ≠ -1.

検出部202は、L(i,1)≠−1であって、かつr(i,1)≠−1である場合、処理をS507に移行させ、i行目を印字領域として設定する。検出部202は、直線画像の印字領域の左右のエッジ座標(即ち、直線の幅方向の両端部の位置座標)を格納した二次元配列を各々、Lp(i)、rp(i)として、L(i)をLp(i)、r(i)をrp(i)に格納する。補足として、図7(a)に二次元配列Lp、図7(b)に二次元配列rpを各々、示している。 When L (i, 1) ≠ -1 and r (i, 1) ≠ -1, the detection unit 202 shifts the process to S507 and sets the i-th line as the print area. The detection unit 202 uses two-dimensional arrays storing the left and right edge coordinates (that is, the position coordinates of both ends in the width direction of the straight line) of the print area of the straight line image as Lp (i) and rp (i), respectively. (I) is stored in Lp (i), and r (i) is stored in rp (i). As a supplement, FIG. 7 (a) shows a two-dimensional array Lp, and FIG. 7 (b) shows a two-dimensional array rp.

他方、検出部202は、L(i,1)≠−1であって、かつr(i,1)≠−1ではない場合、処理をS508に移行させ、i行目を非印字領域として設定する。検出部202は、直線画像の非印字領域の左右のエッジ座標を格納した二次元配列を各々、Lnp(i)、rnp(i)として、L(i)をLnp(i)、r(i)をrnp(i)に格納する。補足として、図7(a)に二次元配列Lnp、図7(b)に二次元配列rnpを各々、示している。 On the other hand, when L (i, 1) ≠ -1 and r (i, 1) ≠ -1, the detection unit 202 shifts the processing to S508 and sets the i-th line as the non-printing area. To do. The detection unit 202 uses two-dimensional arrays storing the left and right edge coordinates of the non-printed area of the linear image as Lnp (i) and rnp (i), respectively, and L (i) as Lnp (i) and r (i). Is stored in rnp (i). As a supplement, FIG. 7 (a) shows a two-dimensional array Lmp, and FIG. 7 (b) shows a two-dimensional array rnp.

S509において、検出部202は、変数iを1インクリメントし、処理をS503に返す。以上のように処理を実行することで(即ち、図7(a)及び(b)のように処理を実行することで)、二値化画像の4、5、14、15行目が非印字領域となり、非印字領域に該当する行の(x,y)座標が二次元配列Lnp及びrnpに格納される。また、その他の行については印字領域となり、印字領域に該当する行の(x,y)座標が二次元配列Lp及びrpに格納される。そして、S402の処理(即ち、直線画像の印字領域と非印字領域の検出処理)が終了すると、画像処理装置100は、処理をS403に移行させる。 In S509, the detection unit 202 increments the variable i by 1 and returns the process to S503. By executing the processing as described above (that is, by executing the processing as shown in FIGS. 7A and 7B), the 4, 5, 14 and 15th lines of the binarized image are not printed. It becomes an area, and the (x, y) coordinates of the line corresponding to the non-printed area are stored in the two-dimensional arrays Lnp and rnp. Further, the other lines are printed areas, and the (x, y) coordinates of the lines corresponding to the print areas are stored in the two-dimensional arrays Lp and rp. Then, when the processing of S402 (that is, the detection processing of the printed area and the non-printed area of the linear image) is completed, the image processing apparatus 100 shifts the processing to S403.

<評価値算出部における処理>
次に、評価値算出部203において実行されるS403の処理(即ち、印字領域及び非印字領域の左右のエッジ座標値を用いてぎざぎざさの評価値を算出する処理)について、図8を用いて説明する。図8は、評価値算出部203において実行される処理の手順を示すフローチャートであり、上述のS403の処理を詳細に示したものである。
<Processing in the evaluation value calculation unit>
Next, with respect to the process of S403 executed by the evaluation value calculation unit 203 (that is, the process of calculating the evaluation value of the jaggedness using the left and right edge coordinate values of the printed area and the non-printed area), FIG. 8 is used. explain. FIG. 8 is a flowchart showing the procedure of the process executed by the evaluation value calculation unit 203, and shows the process of S403 described in detail.

S801において、評価値算出部203は、印字領域の左側エッジにおける近似直線Laを求める。この処理では、例えば、最小二乗法等を用いて、印字領域の左側エッジ座標Lpの(x,y)座標値から近似直線Laを求める。 In S801, the evaluation value calculation unit 203 obtains an approximate straight line La at the left edge of the print area. In this process, for example, the approximate straight line La is obtained from the (x, y) coordinate value of the left edge coordinate Lp of the print area by using the least squares method or the like.

ここで、近似直線Laの傾きをa1、切片をb1とすると、図7(a)に示す二次元配列Lpより傾きa1=0.007、切片b1=6.551を求めることができる。補足として、図9(a)に左側エッジ座標Lpの近似直線Laにおけるy値に対応するx値を示す。 Here, assuming that the slope of the approximate straight line La is a1 and the intercept is b1, the slope a1 = 0.007 and the intercept b1 = 6.551 can be obtained from the two-dimensional array Lp shown in FIG. 7 (a). As a supplement, FIG. 9A shows an x value corresponding to the y value in the approximate straight line La of the left edge coordinate Lp.

S802において、評価値算出部203は、印字領域の右側エッジにおける近似直線raを求める。この処理では、例えば、最小二乗法等を用いて、印字領域の右側エッジ座標rpの(x,y)座標値から近似直線raを求める。 In S802, the evaluation value calculation unit 203 obtains an approximate straight line ra at the right edge of the print area. In this process, for example, the approximate straight line ra is obtained from the (x, y) coordinate value of the right edge coordinate rp of the print area by using the least squares method or the like.

ここで、近似直線raの傾きをa2、切片をb2とすると、図7(b)に示す二次元配列rpより傾きa2=−0.006、切片b2=9.203を求めることができる。補足として、図9(b)に右側エッジ座標rpのy値に対応する近似直線raのx値を示す。 Here, assuming that the slope of the approximate straight line ra is a2 and the intercept is b2, the slope a2 = −0.006 and the intercept b2 = 9.203 can be obtained from the two-dimensional array rp shown in FIG. 7 (b). As a supplement, FIG. 9B shows the x value of the approximate straight line ra corresponding to the y value of the right edge coordinate rp.

S803において、評価値算出部203は、非印字領域において、近似直線Laとraとの中点を算出する。図7(a)及び(b)において、非印字領域は変数i=4,5,14,15であり、この変数iに示される行において、近似直線Laとraの中点を求める。例えば、変数i=4のとき、図9(a)よりLa(x,y)=(6.58,4)、図9(b)よりra(x,y)=(9.18,4)であるから、中点の(x,y)座標は(7.88,4)となる。 In S803, the evaluation value calculation unit 203 calculates the midpoint between the approximate straight lines La and ra in the non-printing area. In FIGS. 7A and 7B, the non-printing area is the variable i = 4, 5, 14, 15, and the midpoint between the approximate straight lines La and ra is obtained in the line indicated by the variable i. For example, when the variable i = 4, La (x, y) = (6.58, 4) from FIG. 9 (a) and ra (x, y) = (9.18, 4) from FIG. 9 (b). Therefore, the (x, y) coordinates of the midpoint are (7.88, 4).

S803において、算出した中点は左右のエッジ座標L,rに代入され、二次元配列L´(図9(c))とr´(図9(d))として設定される。このように、二次元配列L´及びr´には、印字領域においてS507で検出した左右のエッジ座標(即ち、直線の幅方向の端部における直線画像の長さ方向に沿う位置座標)が格納される。また、非印字領域において印字領域のエッジ座標から算出した左右の近似直線の中点の座標が格納される。図10に、二次元配列L´を(x,y)座標として、二値化画像上に「○」でプロットした模式図を示す。また、二値化画像において、2本の破線は、近似直線La及びraを示している。 In S803, the calculated midpoint is assigned to the left and right edge coordinates L and r, and is set as two-dimensional arrays L'(FIG. 9 (c)) and r'(FIG. 9 (d)). In this way, the left and right edge coordinates detected in S507 in the print area (that is, the position coordinates along the length direction of the straight line image at the end in the width direction of the straight line) are stored in the two-dimensional arrays L'and r'. Will be done. Further, in the non-printed area, the coordinates of the midpoint of the left and right approximate straight lines calculated from the edge coordinates of the printed area are stored. FIG. 10 shows a schematic diagram in which the two-dimensional array L'is used as (x, y) coordinates and plotted with "○" on the binarized image. Further, in the binarized image, the two broken lines indicate approximate straight lines La and ra.

S804において、評価値算出部203は、印字領域と非印字領域に基づいて算出された二次元配列L´及びr´を用いて、ぎざぎざさの評価値を算出する。具体的な算出方法としては、下式(7)及び(8)で左右エッジのぎざぎざさ(Raggedness_left,Raggedness_right)を算出した後、それらの平均をぎざぎざさの評価値(Raggedness)として求める(下式(9))。 In S804, the evaluation value calculation unit 203 calculates the evaluation value of the jaggedness using the two-dimensional arrays L'and r'calculated based on the printed area and the non-printed area. As a specific calculation method, after calculating the jaggedness (Raggedness_left, Raggedness_right) of the left and right edges by the following equations (7) and (8), the average of them is calculated as the evaluation value (Raggedness) of the jaggedness (the following equation). (9)).

Figure 2021068159
Figure 2021068159

Figure 2021068159
Figure 2021068159

Figure 2021068159
Figure 2021068159

上式(7)及び(8)に示されるように、左右エッジのぎざぎざさは、二次元配列L´及びr´のx値の標準偏差を算出することで求められる。詰まりは、印字領域では直線の左右エッジを用いて、また、非印字領域では、印字領域のエッジ座標から算出した左右の近似直線の中点を仮想エッジとして用いて、印字領域と非印字領域を合わせたエッジ全体の標準偏差を算出することで求められる。 As shown in the above equations (7) and (8), the jaggedness of the left and right edges is obtained by calculating the standard deviation of the x values of the two-dimensional arrays L'and r'. For clogging, the left and right edges of the straight line are used in the print area, and the midpoint of the left and right approximate straight lines calculated from the edge coordinates of the print area is used as the virtual edge in the non-print area. It is obtained by calculating the standard deviation of the entire combined edge.

そのため、二次元配列L´及びr´に非印字領域が存在すると、仮想エッジが標準偏差の計算に含められることになり、非印字領域が存在しない場合と比べて、評価値が大きく算出される。なお、標準偏差を算出する際に用いる平均値は、二次元配列L´(i)及びr´(i)に対応する近似直線La、raのx値を代入しているが、二次元配列L´(i)及びr´(i)から平均値を求めてもよい。 Therefore, if the non-printed area exists in the two-dimensional arrays L'and r', the virtual edge is included in the calculation of the standard deviation, and the evaluation value is calculated larger than the case where the non-printed area does not exist. .. For the average value used when calculating the standard deviation, the x values of the approximate straight lines La and ra corresponding to the two-dimensional arrays L'(i) and r'(i) are substituted, but the two-dimensional array L is used. The average value may be obtained from ′ (i) and r ′ (i).

そして、S403の処理(即ち、印字領域及び非印字領域の左右のエッジ座標値を用いてぎざぎざさの評価値を算出する処理)が終了すると、画像処理装置100は、処理をS404に移行させる。 Then, when the processing of S403 (that is, the processing of calculating the evaluation value of the jaggedness using the left and right edge coordinate values of the printed area and the non-printing area) is completed, the image processing apparatus 100 shifts the processing to S404.

以上、説明したように、本実施形態では、直線画像から印字領域と非印字領域を検出し、その検出した印字領域と非印字領域に基づいて、ぎざぎざさの評価値を算出する方法について説明した。 As described above, in the present embodiment, a method of detecting a printed area and a non-printed area from a straight line image and calculating an evaluation value of jaggedness based on the detected printed area and non-printed area has been described. ..

この方法を用いることで、目視では途切れている線がぎざぎざして見える画像に関して、評価値上、線が途切れていない画像の評価値よりも評価値が良くなるという不一致を解消することができる。詰まりは、直線画像に途切れがあった場合でも、目視と合ったぎざぎざさの評価値を算出(提供)することができる。 By using this method, it is possible to eliminate the discrepancy that the evaluation value is better than the evaluation value of the image in which the line is not interrupted in terms of the evaluation value for the image in which the line that is visually interrupted appears to be jagged. For clogging, even if there is a break in the linear image, it is possible to calculate (provide) an evaluation value of the jaggedness that matches the visual inspection.

<変形例>
実施形態1では、評価値を求める上で、印字領域では直線の左右エッジを用いて、また、非印字領域では、印字領域のエッジ座標から算出した左右の近似直線の中点を仮想エッジとして用いて、印字領域と非印字領域を合わせたエッジ全体の標準偏差を算出した。
<Modification example>
In the first embodiment, the left and right edges of the straight line are used in the print area, and the midpoint of the left and right approximate straight lines calculated from the edge coordinates of the print area is used as the virtual edge in the non-print area in obtaining the evaluation value. Then, the standard deviation of the entire edge including the printed area and the non-printed area was calculated.

但し、標準偏差を算出して、ぎざぎざさの評価値を求める上で、仮想エッジは必ずしも左右の近似直線の中点でなくてもよい。したがって、例えば、隣接する印字領域のエッジ座標値から仮想エッジとする座標値を設定してもよいし、また、一意に設定された座標値を設定してもよい。また、S508において非印字領域が検出された場合に、途切れていない線よりも値が大きい一律の評価値を設定してもよい。 However, the virtual edge does not necessarily have to be the midpoint of the left and right approximate straight lines in calculating the standard deviation and obtaining the evaluation value of the jaggedness. Therefore, for example, a coordinate value to be a virtual edge may be set from the edge coordinate value of the adjacent print area, or a uniquely set coordinate value may be set. Further, when a non-printed area is detected in S508, a uniform evaluation value whose value is larger than that of the uninterrupted line may be set.

(実施形態2)
上述の実施形態1では、直線に途切れがある場合に、上述の従来技術では画像のぎざぎざさについて目視と評価値に不一致が生じることがあり、そのため、途切れのある線でも目視と合ったぎざぎざさの評価値を算出する方法について説明した。
(Embodiment 2)
In the above-described first embodiment, when there is a break in the straight line, in the above-mentioned prior art, there may be a discrepancy between the visual and the evaluation value regarding the jaggedness of the image. The method of calculating the evaluation value of is explained.

他方、直線に途切れがある場合に、画像の濃度についても目視と評価値に不一致が生じることがある。例えば、目視では途切れがある線で濃度が薄く見えるのに対し、評価値では途切れのない線よりも濃度が高くなることがある。そこで、本実施形態では、途切れのある線でも目視と一致する濃度評価値を算出する方法について説明する。なお、以下では、上述の実施形態1との差異に着目して説明する。 On the other hand, when there is a break in the straight line, there may be a discrepancy between the visual and the evaluation values regarding the density of the image. For example, the density may appear lighter on a line with a break in the visual sense, whereas the density may be higher than that on a line without a break in the evaluation value. Therefore, in the present embodiment, a method of calculating a concentration evaluation value that matches the visual inspection even with a broken line will be described. In the following, the description will be focused on the difference from the above-described first embodiment.

本実施形態に係る画像処理装置のハードウェア構成及び機能構成は、上述の実施形態と同様であることから、ここでは、その説明を省略する。次に、本実施形態に係る画像処理装置100において実行される処理の手順について、上述の図4のフローチャートを用いて説明する。 Since the hardware configuration and the functional configuration of the image processing apparatus according to the present embodiment are the same as those of the above-described embodiment, the description thereof will be omitted here. Next, the procedure of the processing executed by the image processing apparatus 100 according to the present embodiment will be described with reference to the flowchart of FIG. 4 described above.

S401及びS402の処理を上述の実施形態1と同様に実行すると、S403において、評価値算出部203は、S402で検出した印字領域及び非印字領域に基づいて、濃度を示す評価値を算出する。なお、S403の処理の詳細は、図11を用いて後述する。 When the processes of S401 and S402 are executed in the same manner as in the first embodiment, in S403, the evaluation value calculation unit 203 calculates an evaluation value indicating the density based on the printed area and the non-printed area detected in S402. The details of the processing of S403 will be described later with reference to FIG.

S404において、設定部204は、S403で算出した評価値が所定の条件を充足するか否かを判定する。ここでは、閾値を大、小の2つ設定するものとし、設定部204は、S403で算出した濃度評価値が、その2つの閾値の範囲外であるか否かを判定する(詰まりは、濃度の補正有無を判定する)。この閾値はユーザにより任意に設定されてもよく、例えば、予め評価結果をデータ群として用意しておき、このデータ群に基づいて設定することができる。ここで、濃度評価値は、値が大きいほど、濃度が大きいことを示すものとする。 In S404, the setting unit 204 determines whether or not the evaluation value calculated in S403 satisfies a predetermined condition. Here, it is assumed that two threshold values, large and small, are set, and the setting unit 204 determines whether or not the concentration evaluation value calculated in S403 is outside the range of the two threshold values (clogging is density). Judgment of whether or not to correct). This threshold value may be arbitrarily set by the user. For example, the evaluation result can be prepared as a data group in advance and set based on this data group. Here, the concentration evaluation value shall indicate that the larger the value, the higher the concentration.

そのため、本実施形態において、設定部204は、濃度評価値が設定した閾値の範囲外であれば、濃度を画像補正する必要があると判定し、処理をS405に移行させる。また、設定部204は、濃度評価値が設定した閾値の範囲内であれば、画像形成装置の設定を変更する必要がないと判定し、図4に示される処理を終了する。なお、閾値を1つに設定した場合においても、設定した閾値以上、若しくは設定した閾値未満であるか否かで画像形成装置の設定を変更するべきか否かを判定することができる。 Therefore, in the present embodiment, the setting unit 204 determines that the density needs to be image-corrected if the density evaluation value is outside the set threshold value, and shifts the process to S405. Further, the setting unit 204 determines that it is not necessary to change the setting of the image forming apparatus if the density evaluation value is within the set threshold value, and ends the process shown in FIG. Even when one threshold value is set, it can be determined whether or not the setting of the image forming apparatus should be changed depending on whether or not the threshold value is equal to or more than the set threshold value or less than the set threshold value.

S405において、設定部204は、S404で画像形成装置の設定を変更が必要であると判定すると、画像形成装置の設定を変更する。特に本実施形態では、画像形成装置106が出力する濃度を補正するための設定変更処理に関して、いくつか例示する。例えば、S404で直線画像の濃度が設定した閾値の範囲を下回っており、濃度が薄くなっている場合には、画像形成装置106の印字濃度を上げるように設定することができる。画像形成装置106が電子写真方式のプリンタであれば、レーザ出力を大きくすることで印字濃度を上げることができる。また、入力される画像データ自体の修正が可能であれば、画像における線を検出し、線を構成する画素の画素値を大きくすることでも画像形成装置106で形成する画像の濃度を上げることができる。 In S405, when the setting unit 204 determines in S404 that the setting of the image forming apparatus needs to be changed, the setting unit 204 changes the setting of the image forming apparatus. In particular, in the present embodiment, some examples of setting change processing for correcting the density output by the image forming apparatus 106 will be illustrated. For example, when the density of the linear image is below the threshold range set in S404 and the density is low, the print density of the image forming apparatus 106 can be set to be increased. If the image forming apparatus 106 is an electrophotographic printer, the print density can be increased by increasing the laser output. Further, if the input image data itself can be modified, the density of the image formed by the image forming apparatus 106 can be increased by detecting the line in the image and increasing the pixel value of the pixels constituting the line. it can.

逆に、S404で直線画像の濃度が設定した閾値の範囲を上回っており、濃度が濃くなっている場合には、画像形成装置106の印字濃度設定を下げるように設定することができる。画像形成装置106が電子写真方式のプリンタであれば、レーザ出力を小さくすることで印字濃度を下げることができる。また、入力される画像データ自体の修正が可能であれば、画像における線を検出し、線を構成する画素の画素値を小さくすることでも画像形成装置106で形成する画像の濃度を下げることができる。 On the contrary, when the density of the linear image exceeds the threshold range set in S404 and the density is high, the print density setting of the image forming apparatus 106 can be set to be lowered. If the image forming apparatus 106 is an electrophotographic printer, the print density can be reduced by reducing the laser output. Further, if the input image data itself can be modified, the density of the image formed by the image forming apparatus 106 can be reduced by detecting the line in the image and reducing the pixel value of the pixels constituting the line. it can.

なお、元データの修正が可能であるか否かは、ユーザ設定等によって許可がされているか否かを判定すればよい。また、設定部204は、S405において、画像形成装置の設定の変更を完了すると、図4に示される処理を終了する。 Whether or not the original data can be modified may be determined by determining whether or not permission is given by user settings or the like. Further, when the setting unit 204 completes the change of the setting of the image forming apparatus in S405, the setting unit 204 ends the process shown in FIG.

<評価値算出部における処理>
次に、評価値算出部203において実行されるS403の処理(即ち、印字領域及び非印字領域の左右のエッジ座標値を用いて濃度評価値を算出する処理)について、図11を用いて説明する。図11は、評価値算出部203において実行される処理の手順を示すフローチャートであり、上述のS403の処理を詳細に示したものである。なお、図11に示すフローチャートにおいて、上述の実施形態1と同様の処理については同じ符号を付している。
<Processing in the evaluation value calculation unit>
Next, the process of S403 executed by the evaluation value calculation unit 203 (that is, the process of calculating the density evaluation value using the left and right edge coordinate values of the printed area and the non-printed area) will be described with reference to FIG. .. FIG. 11 is a flowchart showing the procedure of the process executed by the evaluation value calculation unit 203, and shows the process of S403 described in detail. In the flowchart shown in FIG. 11, the same reference numerals are given to the same processes as those in the first embodiment.

評価値算出部203は、S801において印字領域の左側エッジにおける近似直線Laを求め、S802において、印字領域の右側エッジにおける近似直線raを求めると、S1103において、非印字領域における近似直線Laとraのx値を算出する。 The evaluation value calculation unit 203 obtains the approximate straight line La at the left edge of the print area in S801, and obtains the approximate straight line ra at the right edge of the print area in S802. Calculate the x value.

図7(a)及び(b)において、非印字領域は変数i=4、5、14、15であり、この変数iに示される行において、近似直線Laとraのx値を求める。例えば、変数i=4のとき、図9(a)よりLa(x,y)=(6.58,4)、図9(b)よりra(x,y)=(9.18,4)である。 In FIGS. 7A and 7B, the non-printing areas are variables i = 4, 5, 14, and 15, and the x values of the approximate straight lines La and ra are obtained in the line indicated by the variables i. For example, when the variable i = 4, La (x, y) = (6.58, 4) from FIG. 9 (a) and ra (x, y) = (9.18, 4) from FIG. 9 (b). Is.

S1103において、算出した近似直線Laとraのx値は左右のエッジ座標L,rに代入され、二次元配列L´´(図12(a))とr´´(図12(b))として設定される。このように、二次元配列L´´及びr´´には、印字領域においてS507で検出した左右のエッジ座標が格納され、非印字領域において印字領域のエッジ座標から算出した左右の近似直線Laとraの座標が格納される。 In S1103, the x values of the approximate straight lines La and ra calculated are substituted into the left and right edge coordinates L and r, and are used as the two-dimensional arrays L ″ (FIG. 12 (a)) and r ″ (FIG. 12 (b)). Set. In this way, the left and right edge coordinates detected in S507 in the print area are stored in the two-dimensional arrays L ″ and r ″, and the left and right approximate straight lines La calculated from the edge coordinates of the print area in the non-print area. The coordinates of ra are stored.

S1104において、評価値算出部203は、印字領域と非印字領域に基づいて算出された二次元配列L´´及びr´´を用いて濃度評価値を算出する。以下、直線画像の濃度評価値の算出について、具体的に説明する。 In S1104, the evaluation value calculation unit 203 calculates the density evaluation value using the two-dimensional arrays L ″ and r ″ calculated based on the printed area and the non-printed area. Hereinafter, the calculation of the density evaluation value of the straight line image will be specifically described.

先ず、S501で抽出した輝度画像に対して、二次元配列L´´とr´´に挟まれた領域をDens_regとする。ここで、図13に、輝度画像上にDens_regの領域を模式図として示す。図13に示される輝度画像は、図6(a)で示した輝度画像と同じ輝度画像である。 First, with respect to the luminance image extracted in S501, the region sandwiched between the two-dimensional arrays L ″ and r ″ is defined as Dens_reg. Here, FIG. 13 shows a region of Dens_reg on the luminance image as a schematic diagram. The luminance image shown in FIG. 13 is the same luminance image as the luminance image shown in FIG. 6 (a).

輝度画像上に示した右下がりの斜線パターンで塗られた領域がDens_regの領域として示され、二値化画像上の2本の破線は近似直線La及びraを示している。図13より、Dens_regの領域は、印字領域ではS507で検出した左右のエッジ座標間の領域となり、非印字領域では印字領域のエッジ座標から算出した左右の近似直線間の領域となる。 The region painted with the downward-sloping diagonal line pattern shown on the luminance image is shown as the region of Dens_reg, and the two broken lines on the binarized image indicate the approximate straight lines La and ra. From FIG. 13, the area of Dens_reg is the area between the left and right edge coordinates detected in S507 in the print area, and the area between the left and right approximate straight lines calculated from the edge coordinates of the print area in the non-print area.

次に、濃度評価値は、以下の数式(10)に示すように、輝度画像のDens_reg領域の画素値平均に対数をとることで算出する。 Next, the density evaluation value is calculated by taking the logarithm of the average pixel value in the Dens_reg region of the luminance image as shown in the following mathematical formula (10).

Figure 2021068159
Figure 2021068159

なお、図13より、非印字領域において近似直線Laとra間の領域も濃度の算出対象領域とすることから、非印字領域が存在した場合に濃度評価値が小さく算出される。そのため、目視では途切れがある線で濃度が薄く見えるのに対し、評価値上は途切れのない線よりも濃度が高くなるというような目視と評価値の不一致をなくすことができる。 From FIG. 13, since the region between the approximate straight lines La and ra in the non-printing region is also the density calculation target region, the density evaluation value is calculated small when the non-printing region exists. Therefore, it is possible to eliminate the discrepancy between the visual inspection and the evaluation value, such as the density appearing to be lighter on the line with a break in the visual inspection, but the density is higher than that on the line without the break in the evaluation value.

そして、S403の処理(即ち、印字領域及び非印字領域の左右のエッジ座標値を用いて濃度評価値を算出する処理)が終了すると、画像処理装置100は、処理をS404に移行させる。 Then, when the processing of S403 (that is, the processing of calculating the density evaluation value using the left and right edge coordinate values of the printed area and the non-printing area) is completed, the image processing apparatus 100 shifts the processing to S404.

以上、説明したように、本実施形態では、直線画像から印字領域と非印字領域を検出し、その検出した印字領域と非印字領域に基づいて、濃度評価値を算出する方法について説明した。これにより、直線画像に途切れがあった場合でも、目視と合った濃度評価値を算出することができる。 As described above, in the present embodiment, a method of detecting a printed area and a non-printed area from a linear image and calculating a density evaluation value based on the detected printed area and the non-printed area has been described. As a result, even if there is a break in the linear image, it is possible to calculate the density evaluation value that matches the visual observation.

<変形例>
実施形態2では、評価値を求める上で、印字領域では直線の左右エッジの座標間の領域、また、非印字領域では印字領域のエッジ座標から算出した左右の近似直線間の領域を求め、これらを合わせた領域の輝度値から濃度評価値を算出した。但し、濃度評価値に関して、必ずしも上述のように求める必要はなく、例えば、印字領域が検出された場合に、途切れていない線よりも値が大きい一律の評価値を設定するようにしてもよい。
<Modification example>
In the second embodiment, in obtaining the evaluation value, the area between the coordinates of the left and right edges of the straight line is obtained in the print area, and the area between the left and right approximate straight lines calculated from the edge coordinates of the print area is obtained in the non-print area. The density evaluation value was calculated from the brightness value in the combined region. However, it is not always necessary to obtain the density evaluation value as described above. For example, when a print area is detected, a uniform evaluation value having a value larger than that of an uninterrupted line may be set.

(実施形態3)
上述の実施形態2では、途切れのある線でも目視と合った濃度評価値を算出する方法について説明した。本実施形態では、途切れのある線に対し、途切れ度を示す評価値を算出する方法について説明する。なお、以下では、上述の実施形態との差異に着目して説明する。
(Embodiment 3)
In the second embodiment described above, a method of calculating a concentration evaluation value that matches the visual inspection even with a broken line has been described. In the present embodiment, a method of calculating an evaluation value indicating the degree of interruption for a line with interruption will be described. In the following, the description will be focused on the difference from the above-described embodiment.

本実施形態に係る画像処理装置のハードウェア構成及び機能構成は、上述の実施形態と同様であることから、ここでは、その説明を省略する。次に、本実施形態に係る画像処理装置100において実行される処理の手順について、上述の図4のフローチャートを用いて説明する。 Since the hardware configuration and the functional configuration of the image processing apparatus according to the present embodiment are the same as those of the above-described embodiment, the description thereof will be omitted here. Next, the procedure of the processing executed by the image processing apparatus 100 according to the present embodiment will be described with reference to the flowchart of FIG. 4 described above.

S401及びS402の処理を上述の実施形態1と同様に実行すると、S403において、評価値算出部203は、S402で検出した印字領域及び非印字領域に基づいて途切れ度を示す評価値を算出する。なお、S403の処理の詳細は、図14を用いて後述する。 When the processes of S401 and S402 are executed in the same manner as in the first embodiment, in S403, the evaluation value calculation unit 203 calculates an evaluation value indicating the degree of interruption based on the printed area and the non-printed area detected in S402. The details of the processing of S403 will be described later with reference to FIG.

S404において、設定部204は、S403で算出した評価値が所定の条件を充足するか否かを判定する。ここでは、設定部204は、S403で算出した途切れ度の評価値が所定の閾値以上であるか否かを判定する。この閾値はユーザにより任意に設定されてもよく、例えば、予め評価結果をデータ群として用意しておき、このデータ群に基づいて設定することができる。ここで、途切れ度の評価値は、値が大きいほど、途切れ箇所が多いことを示すものとする。 In S404, the setting unit 204 determines whether or not the evaluation value calculated in S403 satisfies a predetermined condition. Here, the setting unit 204 determines whether or not the evaluation value of the degree of interruption calculated in S403 is equal to or higher than a predetermined threshold value. This threshold value may be arbitrarily set by the user. For example, the evaluation result can be prepared as a data group in advance and set based on this data group. Here, it is assumed that the evaluation value of the degree of interruption indicates that the larger the value, the more the interruption points.

そのため、本実施形態において、設定部204は、途切れ度の評価値が設定した閾値以上であれば、線の途切れを抑制するための画像形成装置の設定を変更る必要があると判定し、処理をS405に移行させる。また、設定部204は、途切れ度の評価値が設定した閾値未満であれば画像形成装置の設定を変更する必要がないと判定し、図4に示される処理を終了する。 Therefore, in the present embodiment, if the evaluation value of the degree of interruption is equal to or greater than the set threshold value, the setting unit 204 determines that it is necessary to change the setting of the image forming apparatus for suppressing the interruption of the line, and processes the image. To S405. Further, the setting unit 204 determines that it is not necessary to change the setting of the image forming apparatus if the evaluation value of the degree of interruption is less than the set threshold value, and ends the process shown in FIG.

S405において、設定部204は、S404で画像形成装置の設定を変更が必要であると判定すると、画像形成装置の設定を変更する。なお、途切れを抑制するための画像形成装置の設定を変更処理に関しては、上述の実施形態1のS405で説明した処理と同様の処理を行えばよい。また、設定部204は、S405において、画像形成装置の設定の変更を完了すると、図4に示される処理を終了する。 In S405, when the setting unit 204 determines in S404 that the setting of the image forming apparatus needs to be changed, the setting unit 204 changes the setting of the image forming apparatus. Regarding the process of changing the setting of the image forming apparatus for suppressing the interruption, the same process as the process described in S405 of the above-described first embodiment may be performed. Further, when the setting unit 204 completes the change of the setting of the image forming apparatus in S405, the setting unit 204 ends the process shown in FIG.

<評価値算出部における処理>
次に、評価値算出部203において実行されるS403の処理(即ち、S402において検出した非印字領域から途切れ度の評価値を算出する処理)について、図14を用いて説明する。図14は、評価値算出部203において実行される処理の手順を示すフローチャートであり、上述のS403の処理を詳細に示したものである。
<Processing in the evaluation value calculation unit>
Next, the process of S403 executed by the evaluation value calculation unit 203 (that is, the process of calculating the evaluation value of the degree of interruption from the non-printed area detected in S402) will be described with reference to FIG. FIG. 14 is a flowchart showing the procedure of the process executed by the evaluation value calculation unit 203, and shows the process of S403 described in detail.

S1401において、評価値算出部203は、S508で求めた直線画像の非印字領域の左右のエッジ座標(ここでは、左のエッジ座標(境界座標)Lnp)を参照し、y値が連続する非印字領域の個数をカウントする。例えば、図7(a)において、二次元配列Lnpのy値は4、5、14、15であることから、連続する非印字領域は(4,5)と(14,15)の2つである。 In S1401, the evaluation value calculation unit 203 refers to the left and right edge coordinates (here, the left edge coordinate (boundary coordinate) Lnp) of the non-printing area of the straight line image obtained in S508, and the y-value is continuous non-printing. Count the number of regions. For example, in FIG. 7A, since the y values of the two-dimensional array Lnp are 4, 5, 14, and 15, there are two continuous non-printing areas, (4,5) and (14,15). is there.

これは、二次元配列Lnpにおいて、Lnp(i+1,2)−Lnp(i,2)を計算し、「1」以外が算出された配列の数に「1」を加算することで求めることができる。そして、ここで求めたy値が連続する非印字領域の個数をnp_numとする。なお、ここではnp_num=2で示される。 This can be obtained by calculating Lnp (i + 1,2) -Lnp (i, 2) in the two-dimensional array Lnp and adding "1" to the number of sequences other than "1". .. Then, let np_num be the number of non-printing areas in which the y values obtained here are continuous. Here, it is represented by np_num = 2.

S1402において、評価値算出部203は、S1401でy値が連続する非印字領域の個数をカウントすると、その非印字領域の個数から途切れ度の評価値を導出する。途切れ度の評価値をBlankとすると、途切れ度の評価値は、下式(11)のように導出される。 In S1402, when the evaluation value calculation unit 203 counts the number of non-printing areas in which y values are continuous in S1401, the evaluation value of the degree of interruption is derived from the number of non-printing areas. Assuming that the evaluation value of the degree of interruption is Blank, the evaluation value of the degree of interruption is derived as shown in the following equation (11).

Figure 2021068159
Figure 2021068159

なお、ここでは、途切れ度の評価値(Blank)を直線画像の途切れの個数として示している。この途切れ度評価値により、直線画像がどのくらい途切れているかを評価することが可能である。そして、S403の処理(即ち、S402において検出した非印字領域から途切れ度の評価値を算出する処理)が終了すると、画像処理装置100は、処理をS404に移行させる。 Here, the evaluation value (Bank) of the degree of interruption is shown as the number of interruptions in the linear image. It is possible to evaluate how much the linear image is interrupted by this interruption degree evaluation value. Then, when the processing of S403 (that is, the processing of calculating the evaluation value of the degree of interruption from the non-printing area detected in S402) is completed, the image processing apparatus 100 shifts the processing to S404.

以上、説明したように、本実施形態では、直線画像から印字領域と非印字領域を検出し、その検出した非印字領域が連続する領域の個数をカウントすることで、途切れ度の評価値を算出する方法について説明した。これにより、直線画像に途切れがあった場合に、直線画像がどの程度、途切れているかを示す途切れ度の評価値を算出することができる。 As described above, in the present embodiment, the print area and the non-print area are detected from the linear image, and the evaluation value of the degree of interruption is calculated by counting the number of areas in which the detected non-print areas are continuous. I explained how to do it. As a result, when there is a break in the straight line image, it is possible to calculate an evaluation value of the degree of breakage indicating how much the straight line image is broken.

<変形例>
実施形態3では、非印字領域が連続する領域の個数をカウントすることで、途切れ度の評価値を算出した。但し、途切れ度の評価値に関して、必ずしも上述のように求める必要はなく、例えば、S1401において、連続する非印字領域の長さを各非印字領域において求め、非印字領域の長さと個数に各々、重み付けをして算出してもよい。補足として、非印字領域の長さに関して、図7(a)に示す例では、連続する非印字領域が(4,5)と(14,15)となるので、非印字領域の長さはいずれも「2」となる。また、非印字領域が検出された場合に、途切れていない線の評価値よりも値の大きい評価値を一律に設定するようにしてもよい。
<Modification example>
In the third embodiment, the evaluation value of the degree of interruption was calculated by counting the number of regions in which the non-printed regions are continuous. However, it is not always necessary to obtain the evaluation value of the degree of interruption as described above. For example, in S1401, the length of continuous non-printing areas is obtained in each non-printing area, and the length and number of non-printing areas are determined respectively. It may be calculated by weighting. As a supplement, regarding the length of the non-printing area, in the example shown in FIG. 7A, the continuous non-printing areas are (4,5) and (14,15). Is also "2". Further, when a non-printing area is detected, an evaluation value having a value larger than the evaluation value of the uninterrupted line may be uniformly set.

(実施形態4)
上述の実施形態1乃至3では、各々、ぎざぎざさの評価値、濃度評価値、途切れ度の評価値を算出する方法について説明した。但し、上述の実施形態では、垂直な直線の画像を評価対象としており、実際に評価を行う場合には、画像形成装置106で形成した原稿に記録材の飛び散りが存在したり、読取装置107を用いて原稿を読み取る際に直線画像が傾いて取得されたりすることがある。
(Embodiment 4)
In the above-described first to third embodiments, methods for calculating the evaluation value of the jaggedness, the concentration evaluation value, and the evaluation value of the degree of interruption have been described, respectively. However, in the above-described embodiment, an image of a vertical straight line is targeted for evaluation, and when the evaluation is actually performed, the document formed by the image forming apparatus 106 may have scattered recording materials, or the reading apparatus 107 may be used. When scanning a document using it, a straight line image may be obtained at an angle.

そこで、本実施形態では、図3(d)に示されるような、垂直方向以外の直線画像(即ち、垂直方向に対して傾いている直線画像)や、直線部分以外に小さな印字が存在するような画像が入力された場合の補正方法について説明する。なお、ここで、垂直方向の直線画像とは、例えば、上述の図3(a)に示される直線画像のことである(即ち、図3(a)の上下方向に直線が示される画像のことである。)。 Therefore, in the present embodiment, as shown in FIG. 3D, a straight line image other than the vertical direction (that is, a straight line image tilted with respect to the vertical direction) and a small print other than the straight line portion are present. The correction method when various images are input will be described. Here, the vertical straight line image is, for example, the straight line image shown in FIG. 3A described above (that is, the image in which straight lines are shown in the vertical direction of FIG. 3A). It is.).

本実施形態に係る画像処理装置のハードウェア構成及び機能構成、並びに上述の図4に示されるフローチャートのS402の処理以外の処理は、上述の実施形態と同様であることから、ここでは、その説明を省略する。次に、上述の図4のフローチャートのS402において検出部202により実行される処理について、図15を用いて説明する。 The hardware configuration and functional configuration of the image processing apparatus according to the present embodiment, and the processing other than the processing of S402 in the flowchart shown in FIG. 4 above are the same as those of the above-described embodiment. Is omitted. Next, the process executed by the detection unit 202 in S402 of the flowchart of FIG. 4 described above will be described with reference to FIG.

<検出部により実行されるS402の処理>
図15は、検出部202において実行される処理の手順を示すフローチャートであり、上述のS402の処理を詳細に示したものである。なお、図15に示すフローチャートは、上述の図5(実施形態1)のフローチャートにS1503及びS1504の処理が追加されたものである。以下、S1503及びS1504の処理について説明する。
<Processing of S402 executed by the detection unit>
FIG. 15 is a flowchart showing the procedure of the process executed by the detection unit 202, and shows the process of S402 described in detail. The flowchart shown in FIG. 15 is obtained by adding the processes of S1503 and S1504 to the flowchart of FIG. 5 (Embodiment 1) described above. Hereinafter, the processing of S1503 and S1504 will be described.

S502において、S501で変換した輝度画像に対して二値化処理を実行すると、検出部202は、S1503において、その二値化処理が施された画像に対して小領域面積を除去する。より具体的には、二値化画像において連続する領域の面積が所定の閾値未満であれば、その領域を二値化画像から除去する。 When the binarization process is executed on the luminance image converted in S501 in S502, the detection unit 202 removes the small area area from the image subjected to the binarization process in S1503. More specifically, if the area of a continuous region in the binarized image is less than a predetermined threshold, that region is removed from the binarized image.

補足として、図16を用いて、S1503の処理について説明を補足する。図16は、検出部202により実行される処理を説明した模式図である。図16(a)は二値化画像の例であり、図16(a)に示される二値化画像では、直線の向きが垂直ではない画像であって、かつ直線以外の印字が含まれている画像が示されている。 As a supplement, the description of the process of S1503 will be supplemented with reference to FIG. FIG. 16 is a schematic diagram illustrating a process executed by the detection unit 202. FIG. 16A is an example of a binarized image, and the binarized image shown in FIG. 16A is an image in which the direction of the straight line is not vertical and includes printing other than the straight line. The image is shown.

図16(a)において、図中に示される1マスを1px(ピクセル)としたとき、S1503において、例えば、印字領域が連続する領域の面積が3px未満の小領域を二値化画像から除外する。その結果、図16(b)に示されるような二値化画像が得られ、直線部分以外の印字を無視(除去)することができる。この閾値はユーザにより任意に設定されてよいものとし、例えば、トナー等の記録材の大きさに基づいて設定される。 In FIG. 16A, when one cell shown in the figure is 1 px (pixels), in S1503, for example, a small area in which the area where the print area is continuous is less than 3 px is excluded from the binarized image. .. As a result, a binarized image as shown in FIG. 16B can be obtained, and printing other than the straight line portion can be ignored (removed). This threshold value may be arbitrarily set by the user, and is set based on, for example, the size of a recording material such as toner.

S1504において、検出部202は、S1503で直線部分以外に小さな印字を除去した二値化画像において直線の傾きを導出し、直線を垂直方向に補正する。具体的には、検出部202は、先ず、二値化画像において画素値が「0」となった座標を全て用いて、最小二乗法等から二値化画像の近似直線を求める。ここで、近似直線の傾きをa3、切片をb3とすると、垂直方向との角度θが下式(12)により求められる。 In S1504, the detection unit 202 derives the slope of the straight line in the binarized image in which small prints other than the straight line portion are removed in S1503, and corrects the straight line in the vertical direction. Specifically, the detection unit 202 first obtains an approximate straight line of the binarized image by the least squares method or the like by using all the coordinates in which the pixel value is "0" in the binarized image. Here, assuming that the slope of the approximate straight line is a3 and the intercept is b3, the angle θ with respect to the vertical direction can be obtained by the following equation (12).

Figure 2021068159
Figure 2021068159

そして、検出部202は、上式で算出された角度θ分、画像を回転することで、二値化画像の直線の傾きが垂直方向になるように補正する。以上、説明したように、本実施形態に係る画像処理装置によれば、垂直方向以外の直線画像や、直線部分以外に小さな印字が存在するような画像が入力された場合であっても、上述の実施形態1乃至3で示したような評価値を算出できるようにすることができる。詰まりは、画像形成装置106で形成した原稿に記録材の飛び散りが存在したり、読取装置107を用いて原稿を読み取る際に直線画像が傾いて取得されたりした場合であっても、正確な評価値を算出することができる。 Then, the detection unit 202 corrects the inclination of the straight line of the binarized image so that it is in the vertical direction by rotating the image by the angle θ calculated by the above equation. As described above, according to the image processing apparatus according to the present embodiment, even when a straight line image other than the vertical direction or an image having a small print other than the straight line portion is input, the above is described. It is possible to calculate the evaluation value as shown in the first to third embodiments of the above. The clogging is an accurate evaluation even when the recording material is scattered on the original formed by the image forming apparatus 106 or the linear image is tilted and acquired when the original is read by the scanning apparatus 107. The value can be calculated.

(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

入力部201
検出部202
評価値算出部203
設定部204
Input unit 201
Detection unit 202
Evaluation value calculation unit 203
Setting unit 204

Claims (14)

画像形成装置によって記録データに基づいて記録された線画像を、読取装置によって読み取ることで得られた画像データを取得する取得手段と、
前記画像データに基づいて、前記線画像における印字領域及び非印字領域を検出する検出手段と、
前記非印字領域に対応する画像データに所定の処理を施した結果を用いて、前記記録データに基づいて記録された線画像の再現性を評価するための評価値を導出する導出手段と
を備えることを特徴とする画像処理装置。
An acquisition means for acquiring image data obtained by reading a line image recorded by an image forming apparatus based on the recorded data by a reading apparatus, and
A detection means for detecting a printed area and a non-printed area in the line image based on the image data, and
It is provided with a derivation means for deriving an evaluation value for evaluating the reproducibility of a line image recorded based on the recorded data by using the result of performing a predetermined process on the image data corresponding to the non-printed area. An image processing device characterized by the fact that.
前記評価値に基づいて、前記画像形成装置の設定を変更する設定手段をさらに備えることを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, further comprising a setting means for changing the setting of the image forming apparatus based on the evaluation value. 前記検出手段は、前記画像データの前記線画像を二値化することにより前記印字領域及び前記非印字領域を検出することを特徴とする請求項1又は2に記載の画像処理装置。 The image processing apparatus according to claim 1 or 2, wherein the detection means detects the printed area and the non-printed area by binarizing the line image of the image data. 前記導出手段は、前記評価値を、前記線画像における前記印字領域の幅方向における両端部の位置座標、及び前記両端部の位置座標の各々に基づいて設定された近似直線から求められる前記非印字領域の位置座標を用いて導出することを特徴とする請求項3に記載の画像処理装置。 The derivation means obtains the evaluation value from the approximate straight line set based on the position coordinates of both ends in the width direction of the print area in the line image and the position coordinates of both ends in the non-printing. The image processing apparatus according to claim 3, wherein the image processing apparatus is derived by using the position coordinates of the region. 前記導出手段は、前記非印字領域における位置座標を、前記両端部の位置座標の各々に基づいて設定された近似直線の中点として設定することを特徴とする請求項4に記載の画像処理装置。 The image processing apparatus according to claim 4, wherein the derivation means sets the position coordinates in the non-printing area as the midpoint of an approximate straight line set based on the position coordinates of both ends. .. 前記導出手段は、前記評価値として、前記幅方向の端部における前記線画像の長さ方向に沿う位置座標及び前記非印字領域における位置座標における標準偏差から導出することを特徴とする請求項4又は5に記載の画像処理装置。 4. The derivation means is characterized in that, as the evaluation value, it is derived from the position coordinates along the length direction of the line image at the end in the width direction and the standard deviation in the position coordinates in the non-printed area. Or the image processing apparatus according to 5. 前記導出手段は、前記評価値を、前記線画像における前記印字領域の輝度値、及び前記非印字領域の輝度値を用いて導出し、前記非印字領域の輝度値は、印字領域の幅方向における両端部の位置座標の各々に基づいて設定された近似直線間の領域の輝度値として示されることを特徴とする請求項3に記載の画像処理装置。 The derivation means derives the evaluation value using the brightness value of the print area in the line image and the brightness value of the non-print area, and the brightness value of the non-print area is in the width direction of the print area. The image processing apparatus according to claim 3, wherein the image processing apparatus is shown as a luminance value of a region between approximate straight lines set based on each of the position coordinates of both ends. 前記導出手段は、前記評価値を、前記線画像における前記非印字領域の数を用いて導出することを特徴とする請求項3に記載の画像処理装置。 The image processing apparatus according to claim 3, wherein the derivation means derives the evaluation value using the number of the non-printed areas in the line image. 前記導出手段は、前記評価値を、前記非印字領域の長さを求め、前記非印字領域の数と長さの各々に対応する重み付けをして導出することを特徴とする請求項8に記載の画像処理装置。 The derivation means according to claim 8, wherein the evaluation value is derived by obtaining the length of the non-printing area and weighting each of the number and the length of the non-printing area. Image processing equipment. 前記検出手段は、前記線画像における所定の閾値より小さい印字領域を、前記非印字領域を検出する対象領域から除外することを特徴とする請求項3から9のいずれか1項に記載の画像処理装置。 The image processing according to any one of claims 3 to 9, wherein the detection means excludes a print area smaller than a predetermined threshold value in the line image from a target area for detecting the non-print area. apparatus. 前記検出手段は、前記線画像の傾きを所定の傾きに補正することを特徴とする請求項3から10のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 3 to 10, wherein the detection means corrects the inclination of the line image to a predetermined inclination. 前記記録データは、連続した線画像を記録するための記録データであることを特徴とする請求項1から11のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 11, wherein the recorded data is recorded data for recording a continuous line image. 画像形成装置によって記録データに基づいて記録された線画像を、読取装置によって読み取ることで得られた画像データを取得する取得ステップと、
前記画像データに基づいて、前記線画像における印字領域及び非印字領域を検出する検出ステップと、
前記非印字領域に対応する画像データに所定の処理を施した結果を用いて、前記記録データに基づいて記録された線画像の再現性を評価するための評価値を導出する導出ステップと
を含むことを特徴とする画像処理方法。
An acquisition step of acquiring image data obtained by reading a line image recorded by an image forming apparatus based on the recorded data by a reading apparatus, and
A detection step for detecting a printed area and a non-printed area in the line image based on the image data, and
It includes a derivation step of deriving an evaluation value for evaluating the reproducibility of a line image recorded based on the recorded data by using the result of performing a predetermined process on the image data corresponding to the non-printed area. An image processing method characterized by that.
コンピュータを、請求項1から12のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。 A program for causing a computer to function as each means of the image processing apparatus according to any one of claims 1 to 12.
JP2019192685A 2019-10-23 2019-10-23 Image processing apparatus, image processing method, and program Pending JP2021068159A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019192685A JP2021068159A (en) 2019-10-23 2019-10-23 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019192685A JP2021068159A (en) 2019-10-23 2019-10-23 Image processing apparatus, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2021068159A true JP2021068159A (en) 2021-04-30

Family

ID=75637372

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019192685A Pending JP2021068159A (en) 2019-10-23 2019-10-23 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2021068159A (en)

Similar Documents

Publication Publication Date Title
JP2797224B2 (en) Method and apparatus for modifying an image displayed by an apparatus for generating a digitized image in a dot matrix format
US9649839B2 (en) Image processing apparatus and image processing method
JP4890974B2 (en) Image processing apparatus and image processing method
JP6781406B2 (en) Image processing equipment and computer programs
US10850543B2 (en) Recording control device, recording apparatus, and recording control method
US8031363B2 (en) Methods and apparatus for dynamically soft proofing halftone images
CN107094219A (en) Image processing apparatus and image processing method
JP4140519B2 (en) Image processing apparatus, program, and recording medium
US10424066B2 (en) Image analyzing apparatus that corrects isolated pixels in target image data
US9749495B2 (en) Information processing apparatus, image forming apparatus, image processing method, and non-transitory computer-readable medium, configured to convert image data to lower resolution and delete pixel of interest
JP6087334B2 (en) Image processing apparatus and image forming apparatus
US8401290B2 (en) Method and system for processing to enhance digital images
JP2021068159A (en) Image processing apparatus, image processing method, and program
JP2019140538A (en) Image processing system, image formation device, image processing method, and program
JP6489763B2 (en) Image processing apparatus, image processing method, and program
US20160092758A1 (en) Intelligent Pixel Location Selection Process For A Low Overhead Near Unity Scaling Technique
US8787653B2 (en) Determining an orientation direction of a color edge at a pixel location in a color image
JP6648451B2 (en) Low overhead near unit scaling technology
JP5067224B2 (en) Object detection apparatus, object detection method, object detection program, and printing apparatus
JP7427386B2 (en) Information processing device, method, and program
JP3087845B2 (en) Digital image processing method for reading an original image with a scanner and enlarging and printing
JP6507809B2 (en) Printing instruction device, printing system and program
EP1605684B1 (en) Method of processing a digital image in order to enhance the text portion of said image
JP6732428B2 (en) Image processing device, halftone dot determination method, and program
JP2023069216A (en) Image processing device, printer, image processing method, and program