Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7804476B2 - Image processing device, image processing method and program - Google Patents
[go: Go Back, main page]

JP7804476B2 - Image processing device, image processing method and program - Google Patents

Image processing device, image processing method and program

Info

Publication number
JP7804476B2
JP7804476B2 JP2022017396A JP2022017396A JP7804476B2 JP 7804476 B2 JP7804476 B2 JP 7804476B2 JP 2022017396 A JP2022017396 A JP 2022017396A JP 2022017396 A JP2022017396 A JP 2022017396A JP 7804476 B2 JP7804476 B2 JP 7804476B2
Authority
JP
Japan
Prior art keywords
pixel
pixels
abnormal
scanning direction
scanner
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2022017396A
Other languages
Japanese (ja)
Other versions
JP2023114848A (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 JP2022017396A priority Critical patent/JP7804476B2/en
Publication of JP2023114848A publication Critical patent/JP2023114848A/en
Application granted granted Critical
Publication of JP7804476B2 publication Critical patent/JP7804476B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Facsimile Scanning Arrangements (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

本開示は、画像処理装置等に関する。 This disclosure relates to an image processing device, etc.

従来から、ユーザが複合機等の画像処理装置を使用するとき、原稿送り装置(ADF、Automatic Document Feeder)により原稿を搬送させ、当該原稿をスキャナなどの画像読み取り装置により読み取らせることがある。このとき、ガラスやミラー上の埃やゴミにより、スキャン画像にいわゆるスキャナ筋が生じる場合がある。 Conventionally, when a user uses an image processing device such as a multifunction peripheral, they may transport a document using an automatic document feeder (ADF) and then have that document read by an image reading device such as a scanner. At this time, dust or debris on the glass or mirror can sometimes cause so-called scanner streaks in the scanned image.

スキャン画像からスキャナ筋を検出したり、補正したりする技術は様々提案されている。例えば、隣接画素に対してRGB成分の読み取り値に所定値以上の差分量のある画素が原稿搬送方向に連続した場合、周辺領域の画素に対するRGB成分の読み取り値の変位に基づき筋ノイズ画素を決定し、当該筋ノイズ画素のRGB成分の読み取り値を、周辺領域の画素のRGB成分の読み取り値に基づいて補正する技術が提案されている(例えば、特許文献1参照)。また、主走査方向への濃度変化率を計算し、主走査方向濃度変化率について、注目画素から所定の値分だけ離れた画素と注目画素との間の濃度変化率に基づきスジ画素候補を判定し、副走査方向にしきい値を超えて連続してスジ画素候補がある場合、スジ画像が生じていると判定する技術が提案されている(例えば、特許文献2参照)。また、背景色を検出し、その濃度に応じて補正対象異物を選定すると共にその濃度に基づいて補間処理により濃度補正を行う技術が提案されている(例えば、特許文献3参照)。 Various techniques have been proposed for detecting and correcting scanner streaks in scanned images. For example, one proposed technique determines line noise pixels based on the displacement of RGB component readouts relative to neighboring pixels in the document feed direction when the pixels differ by a predetermined amount or more in the RGB component readouts. The RGB component readouts of the line noise pixels are then corrected based on the RGB component readouts of the surrounding pixels (see, for example, Patent Document 1). Another proposed technique calculates the density change rate in the main scanning direction, identifies potential streak pixels based on the density change rate between the target pixel and a pixel a predetermined distance away from the target pixel, and determines that a streak image has occurred if there are consecutive potential streak pixels in the sub-scanning direction that exceed a threshold (see, for example, Patent Document 2). Another proposed technique detects the background color, selects foreign matter to be corrected based on its density, and performs density correction using interpolation based on that density (see, for example, Patent Document 3).

特許第4591531号公報Patent No. 4591531 特許第5008918号公報Patent No. 5008918 特開2016-066836号公報JP 2016-066836 A

ここで、スキャナ筋の原因が、ガラス上の紙粉等の異物であることがある。また、紙粉等は、原稿が原稿送り装置を通過するときに動くことがある。このような、動く異物により生じるスキャナ筋は、スキャン毎に発生位置が変化することがある。そのため、画像処理装置は、リアルタイムにスキャナ筋を構成する異常画素領域をスキャン画像から検出し、当該異常画素領域を補正する必要がある。しかしながら、上述した特許文献等の従来技術では、考慮されていなかった。 Scanner streaks can sometimes be caused by foreign matter such as paper dust on the glass. Furthermore, paper dust and other particles can move when the document passes through the document feeder. Scanner streaks caused by such moving foreign matter can change location with each scan. Therefore, image processing devices need to detect abnormal pixel areas that make up scanner streaks from the scanned image in real time and correct these abnormal pixel areas. However, this has not been taken into consideration in the prior art, such as the patent documents mentioned above.

本開示は上述した課題に鑑み、適切に異常画素領域を検出し、検出した異常画素領域を補正する画像処理装置等を提供することを目的とする。 In consideration of the above-mentioned problems, the present disclosure aims to provide an image processing device and the like that can appropriately detect abnormal pixel areas and correct the detected abnormal pixel areas.

上述した課題を解決するために、本開示の画像処理装置は、画像を取得する取得部と、制御部とを備え、前記制御部は、取得部より取得した画像のうち、注目画素が属する主走査方向の複数の画素における画素の変化に基づき、当該注目画素を異常画素の候補として検出し、前記異常画素の候補として検出された画素が副走査方向において連続性がある場合、前記異常画素の候補として検出された画素を含む副走査方向の領域を異常画素領域として検出し、前記異常画素領域の検出結果に基づき、前記異常画素を補正することを特徴とする。 To solve the above-mentioned problems, the image processing device disclosed herein includes an acquisition unit that acquires an image, and a control unit. The control unit detects a target pixel as a candidate abnormal pixel based on pixel changes in multiple pixels in the main scanning direction to which the target pixel belongs, in the image acquired by the acquisition unit. If the pixels detected as candidate abnormal pixels have continuity in the sub-scanning direction, the control unit detects an area in the sub-scanning direction that includes the pixels detected as candidate abnormal pixels as an abnormal pixel area, and corrects the abnormal pixel based on the detection result of the abnormal pixel area.

また、本開示の画像処理方法は、画像を取得するステップと、前記画像のうち、注目画素が属する主走査方向の複数の画素における、画素の変化に基づき、当該注目画素を異常画素の候補として検出するステップと、前記異常画素の候補として検出された画素が副走査方向において連続性がある場合、前記異常画素の候補として検出された画素を含む副走査方向の領域を異常画素領域として検出するステップと、前記異常画素領域の検出結果に基づき、前記異常画素を補正するステップと、を含むことを特徴とする。 The image processing method disclosed herein also includes the steps of: acquiring an image; detecting a pixel of interest in the image as a candidate for an abnormal pixel based on pixel changes in a plurality of pixels in the main scanning direction to which the pixel belongs; if the pixels detected as candidate for an abnormal pixel have continuity in the sub-scanning direction, detecting an area in the sub-scanning direction that includes the pixel detected as the candidate for an abnormal pixel as an abnormal pixel area; and correcting the abnormal pixel based on the detection result of the abnormal pixel area.

また、本開示のプログラムは、コンピュータに、画像を取得する機能と、前記画像のうち、注目画素が属する主走査方向の複数の画素における、画素の変化に基づき、当該注目画素を異常画素の候補として検出する機能と、前記異常画素の候補として検出された画素が副走査方向において連続性がある場合、前記異常画素の候補として検出された画素を含む副走査方向の領域を異常画素領域として検出する機能と、前記異常画素領域の検出結果に基づき、前記異常画素を補正する機能と、を実現させることを特徴とする。 The program disclosed herein also has the following features: it causes a computer to acquire an image; detect a target pixel of the image as a candidate for an abnormal pixel based on pixel changes in multiple pixels in the main scanning direction to which the target pixel belongs; if the pixels detected as candidate for an abnormal pixel have continuity in the sub-scanning direction, it detects an area in the sub-scanning direction that includes the pixel detected as a candidate for an abnormal pixel as an abnormal pixel area; and corrects the abnormal pixel based on the detection result of the abnormal pixel area.

本開示によれば、適切に異常画素領域を検出し、検出した異常画素領域を補正する画像処理装置等を提供することができる。 This disclosure makes it possible to provide an image processing device or the like that can appropriately detect abnormal pixel areas and correct the detected abnormal pixel areas.

第1実施形態における画像形成装置の外観斜視図である。1 is a perspective view of an appearance of an image forming apparatus according to a first embodiment. 第1実施形態における画像形成装置の機能構成を説明するための図である。FIG. 2 is a diagram for explaining the functional configuration of the image forming apparatus according to the first embodiment. 第1実施形態におけるパラメータ情報のデータ構成の例を示す図である。FIG. 4 is a diagram illustrating an example of a data configuration of parameter information in the first embodiment. 第1実施形態における領域分離情報のデータ構成の例を示す図である。FIG. 4 is a diagram illustrating an example of a data configuration of region separation information according to the first embodiment. 第1実施形態における仮スキャナ筋判定結果のデータ構成の例を示す図である。FIG. 10 is a diagram illustrating an example of a data configuration of a provisional scanner line determination result in the first embodiment. 第1実施形態におけるスキャナ筋判定結果のデータ構成の例を示す図である。FIG. 10 is a diagram illustrating an example of a data configuration of a scanner line determination result in the first embodiment. 第1実施形態におけるメイン処理の流れを示すフロー図である。FIG. 4 is a flowchart showing the flow of main processing in the first embodiment. 第1実施形態における第1スキャナ筋検出処理の流れを示すフロー図である。FIG. 10 is a flowchart showing the flow of first scanner line detection processing in the first embodiment. 第1実施形態における第1スキャナ筋検出処理の流れを示すフロー図である。FIG. 10 is a flowchart showing the flow of first scanner line detection processing in the first embodiment. 第1実施形態における第2スキャナ筋検出処理の流れを示すフロー図である。FIG. 10 is a flowchart showing the flow of second scanner line detection processing in the first embodiment. 第1実施形態におけるスキャナ筋補正処理の流れを示すフロー図である。FIG. 10 is a flowchart showing the flow of scanner streak correction processing in the first embodiment. スキャナ筋が生じる場合について説明するための図である。10A and 10B are diagrams for explaining a case where scanner streaks occur. 第1実施形態における動作例を示す図である。FIG. 10 is a diagram illustrating an example of operation in the first embodiment. 第1実施形態における動作例を示す図である。FIG. 10 is a diagram illustrating an example of operation in the first embodiment. 第1実施形態における動作例を示す図である。FIG. 10 is a diagram illustrating an example of operation in the first embodiment. 第1実施形態における動作例を示す図である。FIG. 10 is a diagram illustrating an example of operation in the first embodiment. 第1実施形態における動作例を示す図である。FIG. 10 is a diagram illustrating an example of operation in the first embodiment. 第1実施形態における動作例を示す図である。FIG. 10 is a diagram illustrating an example of operation in the first embodiment. 第1実施形態における動作例を示す図である。FIG. 10 is a diagram illustrating an example of operation in the first embodiment. 第1実施形態における動作例を示す図である。FIG. 10 is a diagram illustrating an example of operation in the first embodiment. 第2実施形態におけるスキャナ筋補正処理の流れを示すフロー図である。FIG. 10 is a flowchart showing the flow of scanner streak correction processing in the second embodiment. 第2実施形態における動作例を示す図である。FIG. 10 is a diagram illustrating an example of operation in the second embodiment. 第2実施形態における動作例を示す図である。FIG. 10 is a diagram illustrating an example of operation in the second embodiment. 第2実施形態における動作例を示す図である。FIG. 10 is a diagram illustrating an example of operation in the second embodiment. 第2実施形態における動作例を示す図である。FIG. 10 is a diagram illustrating an example of operation in the second embodiment.

以下、図面を参照して、本開示を実施するための一実施形態について説明する。なお、以下の実施形態は、本開示を説明するための一例であり、特許請求の範囲に記載した発明の技術的範囲が、以下の記載に限定されるものではない。 One embodiment for carrying out the present disclosure will be described below with reference to the drawings. Note that the following embodiment is an example for explaining the present disclosure, and the technical scope of the invention described in the claims is not limited to the following description.

[1.第1実施形態]
はじめに、第1実施形態について説明する。第1実施形態は、本開示の画像処理装置を画像形成装置10に適用した場合について説明する。画像形成装置10は、コピー機能、スキャン機能、文書のプリント機能等を有する情報処理装置であり、MFP(Multi-Function Printer/Peripheral、複合機)とも呼ばれる。
1. First embodiment
First, a first embodiment will be described. In the first embodiment, a case will be described in which an image processing apparatus according to the present disclosure is applied to an image forming apparatus 10. The image forming apparatus 10 is an information processing apparatus having a copy function, a scan function, a document print function, etc., and is also called an MFP (Multi-Function Printer/Peripheral, or multifunction device).

[1.1 機能構成]
本実施形態の画像形成装置10の機能構成について、図1及び図2を参照して説明する。図1は、画像形成装置10の外観斜視図であり、図2は、画像形成装置10の機能構成を示すブロック図である。
[1.1 Functional configuration]
The functional configuration of an image forming apparatus 10 of this embodiment will be described with reference to Fig. 1 and Fig. 2. Fig. 1 is an external perspective view of the image forming apparatus 10, and Fig. 2 is a block diagram showing the functional configuration of the image forming apparatus 10.

画像形成装置10は、図2に示すように、制御部100と、画像入力部120と、画像形成部130と、表示部140と、操作部150と、記憶部160と、通信部190とを備えて構成される。 As shown in FIG. 2, the image forming device 10 is configured with a control unit 100, an image input unit 120, an image forming unit 130, a display unit 140, an operation unit 150, a memory unit 160, and a communication unit 190.

制御部100は、画像形成装置10の全体を制御するための機能部である。制御部100は、記憶部160に記憶された各種プログラムを読み出して実行することにより各種機能を実現しており、例えば、1又は複数の演算装置(CPU(Central Processing Unit))等により構成される。また、制御部100は、以下に説明する機能のうち、複数の機能を有するSoC(System on a Chip)として構成されてもよい。 The control unit 100 is a functional unit for controlling the entire image forming apparatus 10. The control unit 100 realizes various functions by reading and executing various programs stored in the storage unit 160, and is configured, for example, by one or more arithmetic units (CPUs (Central Processing Units)). The control unit 100 may also be configured as a SoC (System on a Chip) that has multiple functions among those described below.

制御部100は、記憶部160に記憶されたプログラム実行することにより、画像処理部102及び領域分離処理部104として機能する。 The control unit 100 functions as an image processing unit 102 and an area separation processing unit 104 by executing programs stored in the memory unit 160.

画像処理部102は、各種画像に関する処理を行う。例えば、画像処理部102は、画像入力部120によって読み取られて入力された原稿の画像に対して、鮮鋭化処理や、階調変換処理を実行する。 The image processing unit 102 performs various image-related processes. For example, the image processing unit 102 performs sharpening and tone conversion processes on the image of the original document read and input by the image input unit 120.

領域分離処理部104は、領域分離処理を実行する。領域分離処理とは、画像を所定の領域に分離する処理である。例えば、領域分離処理部104は、画像を、文字領域、万線領域、網点領域、下地領域といった種類の領域に分離する。なお、領域分離処理部104が分離する領域の種類は上述した種類に限られず、網点上文字領領域といった領域が分離可能であってもよい。また、領域分離処理部104は、文字領域に含まれる文字の色を判定することで、画像から、黒文字を含む領域(黒文字領域)や、赤等の有彩色の文字を含む領域(色文字領域)といった領域を分離してもよい。 The region separation processing unit 104 performs region separation processing. Region separation processing is processing that separates an image into specified regions. For example, the region separation processing unit 104 separates the image into regions of various types, such as character regions, line regions, halftone dot regions, and background regions. Note that the types of regions separated by the region separation processing unit 104 are not limited to those described above, and regions such as halftone dot character regions may also be separated. Furthermore, the region separation processing unit 104 may separate regions such as regions containing black text (black text regions) and regions containing chromatic text, such as red (color text regions), from the image by determining the color of the text contained in the text regions.

画像入力部120は、画像を取得する画像取得部であり、取得した画像を画像形成装置10に入力する。例えば、画像入力部120は、原稿送り装置(ADF、Automatic Document Feeder)及び原稿の画像を読み取るスキャナ装置等により構成される。スキャナ装置は、例えば、CCD(Charge Coupled Device)やCIS(Contact Image Sensor)等のイメージセンサによって画像を電気信号に変換し、電気信号を量子化及び符号化する装置である。スキャナ装置により原稿の画像が読み取られることで、原稿の画像は、デジタルデータとして画像形成装置10に入力される。 The image input unit 120 is an image acquisition unit that acquires images and inputs the acquired images to the image forming device 10. For example, the image input unit 120 is composed of an automatic document feeder (ADF) and a scanner device that reads images from documents. The scanner device converts images into electrical signals using an image sensor such as a charge coupled device (CCD) or contact image sensor (CIS), and then quantizes and encodes the electrical signals. When the scanner device reads an image from a document, the image from the document is input to the image forming device 10 as digital data.

画像形成部130は、記録用紙等の記録媒体に対して画像を形成(印刷)する。画像形成部130は、例えば、電子写真方式を利用したレーザプリンタ等の印刷装置により構成される。画像形成部130は、例えば、図1の給紙トレイ132から記録用紙を給紙し、記録用紙の表面に画像を形成し、記録用紙を排紙トレイ134から排紙する。 The image forming unit 130 forms (prints) an image on a recording medium such as recording paper. The image forming unit 130 is configured, for example, by a printing device such as a laser printer that uses electrophotography. The image forming unit 130 feeds recording paper from the paper feed tray 132 in FIG. 1, forms an image on the surface of the recording paper, and ejects the recording paper from the paper ejection tray 134, for example.

表示部140は、各種情報を表示する。表示部140は、例えば、LCD(Liquid crystal display)、有機EL(electro-luminescence)ディスプレイ、マイクロLED(Light Emitting Diode)ディスプレイ等の表示装置により構成される。 The display unit 140 displays various types of information. The display unit 140 is composed of a display device such as an LCD (Liquid Crystal Display), an organic EL (Electro-Luminescence) display, or a micro LED (Light Emitting Diode) display.

操作部150は、画像形成装置10を使用するユーザによる操作指示を受け付ける。操作部150は、キースイッチ(ハードキー)やタッチセンサ等の入力装置により構成される。タッチセンサにおいて接触(タッチ)による入力を検出する方式は、例えば、抵抗膜方式、赤外線方式、電磁誘導方式、静電容量方式といった、一般的な検出方式であればよい。なお、画像形成装置10には、表示部140と、操作部150とが一体に形成されたタッチパネルが搭載されてもよい。 The operation unit 150 accepts operation instructions from a user using the image forming apparatus 10. The operation unit 150 is composed of input devices such as key switches (hard keys) and touch sensors. The touch sensor can detect input by contact (touch) using any common detection method, such as a resistive film method, an infrared method, an electromagnetic induction method, or a capacitance method. The image forming apparatus 10 may also be equipped with a touch panel in which the display unit 140 and the operation unit 150 are integrally formed.

記憶部160は、画像形成装置10の動作に必要な各種プログラムや、各種データを記憶する。記憶部160は、例えば、半導体メモリであるSSD(Solid State Drive)や、HDD(Hard Disk Drive)等の記憶装置により構成される。 The storage unit 160 stores various programs and data necessary for the operation of the image forming device 10. The storage unit 160 is configured, for example, by a storage device such as a semiconductor memory such as an SSD (Solid State Drive) or an HDD (Hard Disk Drive).

記憶部160は、記憶領域としてパラメータ情報記憶領域162を確保し、さらに、領域分離情報164、仮スキャナ筋判定結果情報166、スキャナ筋判定結果情報168を記憶する。 The memory unit 160 reserves a parameter information memory area 162 as a memory area, and further stores region separation information 164, provisional scanner line determination result information 166, and scanner line determination result information 168.

パラメータ情報記憶領域162は、各種パラメータの情報(パラメータ情報)を記憶する。パラメータ情報は、例えば、図3に示すように、パラメータ名(例えば、「Th1」)と、当該パラメータ名に対するパラメータ値(例えば、「80」)とが含まれる。 The parameter information storage area 162 stores information on various parameters (parameter information). For example, as shown in FIG. 3, the parameter information includes a parameter name (e.g., "Th1") and a parameter value for that parameter name (e.g., "80").

なお、本実施形態では、Th0、Th1、Th2、Th3の4種類のパラメータ値が記憶されていることとする。パラメータ値は、予め定められていてもよいし、ユーザによって設定可能であってもよい。また、パラメータ値は、画像形成装置ごとに個別の値をとってもよい。 In this embodiment, four types of parameter values, Th0, Th1, Th2, and Th3, are stored. The parameter values may be predetermined or may be set by the user. Furthermore, the parameter values may be individual values for each image forming device.

Th0は、注目画素を白の画素であると判定するときの画素値に対する閾値である。また、Th1及びTh2は、注目画素と当該注目画素の周辺の画素との濃度差に対する閾値である。Th0、Th1、Th2は、異常画素の候補を検出する第1スキャナ筋検出処理に用いられる。第1スキャナ筋検出処理については後述する。 Th0 is the threshold value for the pixel value when determining that the pixel of interest is a white pixel. Th1 and Th2 are threshold values for the density difference between the pixel of interest and its surrounding pixels. Th0, Th1, and Th2 are used in the first scanner line detection process, which detects candidate abnormal pixels. The first scanner line detection process will be described later.

なお、本実施形態では、異常画素は、スキャナ筋を構成する画素をいう。また、本実施形態では、異常画素の候補の画素を、仮スキャナ筋ともいう。 In this embodiment, abnormal pixels refer to pixels that make up scanner lines. Also, in this embodiment, pixels that are candidates for abnormal pixels are also referred to as provisional scanner lines.

また、Th3は、異常画素の候補となる画素の副走査方向の連続性に対する閾値であり、後述する第2スキャナ筋検出処理に用いられる。 Th3 is a threshold for the continuity in the sub-scanning direction of pixels that are candidates for abnormal pixels, and is used in the second scanner line detection process described below.

領域分離情報164は、領域分離処理の結果(領域分離結果)を示す情報である。領域分離情報164は、領域の範囲と当該範囲の領域の種類とが識別できる情報であればよく、例えば、図4に示すように、画像の画素毎に、領域の種類を示す値を記憶したテーブルである。 The region separation information 164 is information indicating the results of the region separation process (region separation result). Region separation information 164 may be any information that can identify the range of a region and the type of region within that range. For example, as shown in Figure 4, it may be a table that stores values indicating the type of region for each pixel of the image.

ここで、画像の画素の位置は、座標により表される。座標とは、画像の左上の画素を原点として、原点から注目している画素までに含まれる主走査方向の画素数をx、副走査方向の画素数をyとした場合に、(x,y)と表現したものをいう。 Here, the position of a pixel in an image is expressed by coordinates. Coordinates are expressed as (x, y), where the top left pixel of the image is the origin, x is the number of pixels in the main scanning direction from the origin to the pixel of interest, and y is the number of pixels in the sub-scanning direction.

また、領域の種類を示す値は、例えば、整数値である。この場合、「0」は文字領域、「1」は万線領域、「2」は網点領域、「3」は網点上文字領域といったように、整数値と領域の種類とが対応する。例えば、図4のP100は、画像の(x,y)=(10,3)の位置における画素に対する値が「1」であることから、当該画素は、万線領域に含まれる画素であることを示す。 The value indicating the type of area is, for example, an integer value. In this case, the integer value corresponds to the type of area, with "0" indicating a character area, "1" a line area, "2" a halftone dot area, and "3" a halftone dot character area. For example, P100 in Figure 4 has a value of "1" for the pixel at position (x, y) = (10, 3) in the image, indicating that the pixel in question is included in the line area.

仮スキャナ筋判定結果情報166は、画像の画素毎に、当該画素が異常画素の候補の画素であるか否かの判定結果を示した情報である。 The provisional scanner line determination result information 166 is information that indicates, for each pixel in the image, the determination result as to whether the pixel is a candidate for an abnormal pixel.

仮スキャナ筋判定結果情報166は、例えば、図5に示すように、画像の画素毎に、異常画素の候補であるか否かを示す値を記憶したテーブルである。本実施形態では、仮スキャナ筋判定結果情報166に記憶される値は、以下の何れかの値とする。
Wh:その画素が、異常画素の候補ではなく、白の画素であることを示す。
× :その画素が、異常画素の候補ではなく、白以外の画素であることを示す。
1R、1G、1B:その画素が、異常画素の候補であることを示す。
The provisional scanner line determination result information 166 is, for example, a table that stores a value indicating whether or not each pixel of an image is a candidate for an abnormal pixel, as shown in Fig. 5. In this embodiment, the value stored in the provisional scanner line determination result information 166 is one of the following values.
Wh: Indicates that the pixel is not a candidate for an abnormal pixel and is a white pixel.
×: Indicates that the pixel is not a candidate for an abnormal pixel and is a pixel other than white.
1R, 1G, 1B: Indicates that the pixel is a candidate for an abnormal pixel.

なお、「1R」は、周辺の画素と赤成分の濃度差がTh1を超え、他の色成分の濃度差がTh2未満である画素を示す。「1G」は、周辺の画素と緑成分の濃度差がTh1を超え、他の色成分の濃度差がTh2未満である画素を示す。「1B」は、周辺の画素と青成分の濃度差がTh1を超え、他の色成分の濃度差がTh2未満である画素を示す。 Note that "1R" indicates a pixel whose red component density difference from surrounding pixels exceeds Th1, and whose other color component density difference is less than Th2. "1G" indicates a pixel whose green component density difference from surrounding pixels exceeds Th1, and whose other color component density difference is less than Th2. "1B" indicates a pixel whose blue component density difference from surrounding pixels exceeds Th1, and whose other color component density difference is less than Th2.

例えば、図5のP102は、画像の(x,y)=(10,3)の位置における画素に対する値が「×」であることから、当該画素は異常画素の候補ではないことを示す。 For example, P102 in Figure 5 indicates that the value for the pixel at position (x,y) = (10,3) in the image is "X", which means that the pixel is not a candidate for an abnormal pixel.

スキャナ筋判定結果情報168は、画像の副走査方向のライン(画素列)毎に、当該ラインにスキャナ筋が発生しているか否かの判定の結果を示した情報である。スキャナ筋判定結果情報168は、例えば、図6に示すように、画像の副走査方向のラインの位置(列)を示すライン番号(例えば、「0」)と、当該ラインにおいてスキャナ筋が発生しているか否かの判定結果を示す値(例えば、「Yes」)とを対応付けて記憶したテーブルである。スキャナ筋が発生しているか否かを示す値は、スキャナ筋が発生していることを区別可能な情報であればよい。したがって、「Yes」と「No」との何れかが記憶されてもよいし、「0」と「1」との何れかが記憶されてもよいし、Null以外の値とNullの何れかが記憶されてもよい。例えば、図6のP104は、ライン番号「8」に対応する値が「Yes」であることから、画像の8ライン目にはスキャナ筋が発生していることを示す。 Scanner streak determination result information 168 is information indicating the result of determining whether or not scanner streaks have occurred on each line (pixel row) in the sub-scanning direction of the image. For example, as shown in FIG. 6, scanner streak determination result information 168 is a table that stores a line number (e.g., "0") indicating the position (row) of the line in the sub-scanning direction of the image, in association with a value (e.g., "Yes") indicating the determination result of whether or not scanner streaks have occurred on that line. The value indicating whether or not scanner streaks have occurred may be any information that can distinguish the presence of scanner streaks. Therefore, either "Yes" or "No" may be stored, or either "0" or "1" may be stored, or either a value other than Null or Null may be stored. For example, P104 in FIG. 6 indicates that scanner streaks have occurred on the eighth line of the image, since the value corresponding to line number "8" is "Yes."

通信部190は、LAN(Local Area Network)やWAN(Wide Area Network)を介して外部の装置と通信を行う。通信部190は、例えば、有線/無線LANで利用されるNIC(Network Interface Card)等の通信装置や通信モジュールにより構成される。 The communication unit 190 communicates with external devices via a LAN (Local Area Network) or WAN (Wide Area Network). The communication unit 190 is composed of a communication device or communication module, such as a NIC (Network Interface Card) used in wired/wireless LANs.

[1.2 処理の流れ]
図7から図11までを参照して、本実施形態における画像形成装置10が実行する処理の流れを説明する。図7から図11までに示した処理は、制御部100が、記憶部160に記憶されたプログラムを読み出すことにより実行される。また、図7から図11に示した処理は、ユーザにより、コピージョブやスキャンジョブといった、原稿を読み取るジョブの実行を開始させる操作がされた場合に実行される。
[1.2 Processing flow]
The flow of processing executed by the image forming apparatus 10 in this embodiment will be described with reference to Figures 7 to 11. The processing shown in Figures 7 to 11 is executed by the control unit 100 reading out a program stored in the storage unit 160. The processing shown in Figures 7 to 11 is also executed when a user performs an operation to start execution of a job that reads a document, such as a copy job or a scan job.

[1.2.1 メイン処理]
はじめに、図7を参照して、メイン処理の流れを説明する。制御部100は、入力画像(例えば、原稿のスキャン画像)を取得する(ステップS100)。入力画像とは、画像形成装置10に入力される画像である。例えば、制御部100は、画像入力部120を制御することで、原稿送り装置によって搬送された原稿を読み取り、当該原稿のスキャン画像を入力画像として取得する。なお、制御部100は、入力画像を、通信部190を介して外部の装置から取得してもよいし、記憶部160に記憶された画像を読み出すことで取得してもよいし、USB(Universal Serial Bus)メモリ等の記憶媒体から取得してもよい。
[1.2.1 Main Processing]
First, the flow of the main processing will be described with reference to FIG. 7 . The control unit 100 acquires an input image (e.g., a scanned image of a document) (step S100). The input image is an image input to the image forming apparatus 10. For example, the control unit 100 controls the image input unit 120 to read a document conveyed by the document feeder and acquire a scanned image of the document as the input image. The control unit 100 may acquire the input image from an external device via the communication unit 190, by reading an image stored in the storage unit 160, or from a storage medium such as a USB (Universal Serial Bus) memory.

つづいて、制御部100(領域分離処理部104)は、入力画像に対して領域分離処理を実行する(ステップS102)。なお、領域分離処理部104は、領域分離処理の結果を、領域分離情報164として記憶部160に記憶する。 Next, the control unit 100 (segment separation processing unit 104) performs segmentation processing on the input image (step S102). The segmentation processing unit 104 stores the results of the segmentation processing in the storage unit 160 as segmentation information 164.

つづいて、制御部100は、第1スキャナ筋検出処理を実行する(ステップS104)。第1スキャナ筋検出処理は、入力画像から異常画素の候補である画素を、主走査方向の複数の画素における画素の変化に基づき検出する処理である。例えば、制御部100は、主走査方向の複数の画素における画素の画素値(濃度や輝度)の変化や、色相の変化、領域分離結果の変化に基づき、入力画像の画素毎に、スキャナ筋を構成する異常画素の候補であるか否かを仮判定する。第1スキャナ筋検出処理の詳細は後述する。なお、制御部100は、第1スキャナ筋検出処理の結果を、仮スキャナ筋判定結果情報166として記憶部160に記憶する。 Next, the control unit 100 executes a first scanner line detection process (step S104). The first scanner line detection process is a process that detects pixels from the input image that are candidates for abnormal pixels based on pixel changes in multiple pixels in the main scanning direction. For example, the control unit 100 provisionally determines, for each pixel in the input image, whether or not it is a candidate for an abnormal pixel that constitutes a scanner line, based on changes in pixel value (density or luminance) of multiple pixels in the main scanning direction, changes in hue, and changes in the region separation results. Details of the first scanner line detection process will be described later. The control unit 100 stores the results of the first scanner line detection process in the memory unit 160 as provisional scanner line determination result information 166.

つづいて、制御部100は、第2スキャナ筋検出処理を実行する(ステップS106)。第2スキャナ筋検出処理は、仮スキャナ筋判定結果情報166を評価することで、異常画素の候補として検出された画素が副走査方向において連続性があるか否かに基づき、スキャナ筋が生じている副走査方向のラインを検出する処理である。第2スキャナ筋検出処理の詳細については後述する。なお、制御部100は、第2スキャナ筋検出処理の結果を、スキャナ筋判定結果情報168として記憶部160に記憶する。また、本実施形態では、スキャナ筋が生じている副走査方向のラインを構成する画素列による領域を、異常画素領域という。すなわち、第2スキャナ筋検出処理は、異常画素領域を検出する処理である。 Next, the control unit 100 executes a second scanner line detection process (step S106). The second scanner line detection process is a process that detects lines in the sub-scanning direction where scanner lines occur, based on whether pixels detected as candidate abnormal pixels have continuity in the sub-scanning direction by evaluating the provisional scanner line determination result information 166. Details of the second scanner line detection process will be described later. The control unit 100 stores the results of the second scanner line detection process in the memory unit 160 as scanner line determination result information 168. In this embodiment, the region formed by the pixel rows that make up the lines in the sub-scanning direction where scanner lines occur is called an abnormal pixel region. In other words, the second scanner line detection process is a process that detects abnormal pixel regions.

つづいて、制御部100は、スキャナ筋判定結果情報168に基づき、入力画像に生じたスキャナ筋を補正するスキャナ筋補正処理を実行する(ステップS108)。これにより、制御部100は、異常画素領域の検出結果に基づき、当該異常画素領域に含まれる異常画素を補正する。スキャナ筋補正処理については後述する。 Next, the control unit 100 executes a scanner line correction process to correct scanner lines that have appeared in the input image based on the scanner line determination result information 168 (step S108). As a result, the control unit 100 corrects abnormal pixels contained in the abnormal pixel region based on the detection result of the abnormal pixel region. The scanner line correction process will be described later.

つづいて、制御部100は、ステップS108において補正された入力画像を出力する(ステップS110)。例えば、制御部100は、画像形成部130を制御することにより、補正された入力画像を形成することにより出力する。なお、制御部100は、補正された入力画像のデータを記憶部160記憶することで出力したり、他の装置に送信することにより出力したりしてもよい。 Next, the control unit 100 outputs the input image corrected in step S108 (step S110). For example, the control unit 100 controls the image forming unit 130 to form and output the corrected input image. Note that the control unit 100 may output the corrected input image data by storing it in the storage unit 160 or by transmitting it to another device.

[1.2.2 第1スキャナ筋検出処理]
図8及び図9を参照して、第1スキャナ筋検出処理の流れを説明する。なお、第1スキャナ筋検出処理は、入力画像を取得している最中に実行されてもよいし、入力画像の取得後に実行されてもよい。なお、本実施形態では、第1スキャナ筋検出処理の一例として、主走査方向の複数の画素における画素値(濃度)の変化に基づき、異常画素の候補である画素を検出する場合について説明する。
1.2.2 First Scanner Line Detection Processing
The flow of the first scanner line detection process will be described with reference to Figures 8 and 9. The first scanner line detection process may be performed while the input image is being acquired, or after the input image is acquired. In this embodiment, as an example of the first scanner line detection process, a case will be described in which pixels that are candidates for abnormal pixels are detected based on changes in pixel values (density) of multiple pixels in the main scanning direction.

はじめに、制御部100は、入力画像の画素のうち、1の画素を注目画素として選択し(ステップS120)、当該注目画素が属する主走査方向の複数の画素の範囲を設定する(ステップS122)。例えば、制御部100は、スキャナ筋検出用マスク(例えば、主走査方向7画素×副走査方向1画素)を入力画像に対して設定し、当該スキャナ筋検出用マスクが設定された範囲を、注目画素が属する主走査方向の複数の画素の範囲とする。 First, the control unit 100 selects one pixel from the pixels of the input image as a pixel of interest (step S120), and sets a range of multiple pixels in the main scanning direction to which the pixel of interest belongs (step S122). For example, the control unit 100 sets a scanner line detection mask (e.g., 7 pixels in the main scanning direction x 1 pixel in the sub-scanning direction) for the input image, and sets the range in which the scanner line detection mask is set as the range of multiple pixels in the main scanning direction to which the pixel of interest belongs.

スキャナ筋検出用マスクは、注目画素と、当該注目画素から主走査方向に対して順方向に連続する数画素(例えば、3画素)と、当該注目画素から主走査方向に対して逆方向に連続する数画素(例えば、3画素)とを含む範囲を設定するために用いられる。制御部100は、このようなスキャナ筋検出用マスクを用いることで、注目画素が属する主走査方向の複数の画素を含む、連続した7画素の範囲を設定する。 The scanner line detection mask is used to set a range that includes a pixel of interest, several consecutive pixels (e.g., three pixels) in the forward direction from the pixel of interest in the main scanning direction, and several consecutive pixels (e.g., three pixels) in the reverse direction from the pixel of interest in the main scanning direction. By using this scanner line detection mask, the control unit 100 sets a range of seven consecutive pixels that includes multiple pixels in the main scanning direction to which the pixel of interest belongs.

つづいて、制御部100は、ステップS122において設定した範囲に含まれる各画素に対して、注目画素を含めて、その画素が白の画素であるか否かを判定し、白の画素に対して、フラグ(Flg)の値として「Wh」を設定する(ステップS124)。Flgとは、ステップS122において設定した範囲に含まれる各画素の特徴を示す情報である。 Next, the control unit 100 determines whether each pixel included in the range set in step S122, including the pixel of interest, is a white pixel, and sets the flag (Flg) value for white pixels to "Wh" (step S124). Flg is information that indicates the characteristics of each pixel included in the range set in step S122.

例えば、制御部100は、画素値がRGB値で表現され、R成分、G成分、B成分の値の範囲が何れも0から255までである場合、R成分の値、G成分の値、B成分の値が全てTh0を超える画素を、白の画素であると判定する。なお、制御部100は、Th0は、パラメータ情報記憶領域162に記憶された値を用いればよい。また、色成分の値が0から255までの何れかの値である場合、例えば、Th0の値は「230」である。なお、制御部100は、白の画素があった場合、当該画素の位置とFlgの値「Wh」とを対応付けて、記憶部160に一時的に記憶してもよい。 For example, when pixel values are expressed as RGB values and the range of values for the R, G, and B components is 0 to 255, the control unit 100 determines that a pixel whose R, G, and B component values all exceed Th0 is a white pixel. Note that the control unit 100 may use the value stored in the parameter information storage area 162 for Th0. Also, when the color component value is any value between 0 and 255, for example, the value of Th0 is "230." Note that when a white pixel is found, the control unit 100 may associate the position of the pixel with the Flg value "Wh" and temporarily store this in the storage unit 160.

つづいて、制御部100は、注目画素のFlgの値が「Wh」であるか否かを判定する(ステップS126)。制御部100は、注目画素のFlgの値が「Wh」である場合、注目画素に対して、異常画素の候補ではなく、白の画素であると判定する(ステップS126;Yes→ステップS128)。このとき、制御部100は、仮スキャナ筋判定結果情報166の注目画素の位置の値として、「Wh」を記憶する。 Next, the control unit 100 determines whether the Flg value of the pixel of interest is "Wh" (step S126). If the Flg value of the pixel of interest is "Wh", the control unit 100 determines that the pixel of interest is a white pixel, not a candidate for an abnormal pixel (step S126; Yes → step S128). At this time, the control unit 100 stores "Wh" as the value of the position of the pixel of interest in the provisional scanner line determination result information 166.

一方、制御部100は、注目画素のFlgの値が「Wh」ではない場合、図9に示す処理を実行する。はじめに、制御部100は、図8のステップS122において設定した範囲に含まれる画素の位置を示す変数Xに、XMINを代入する(ステップS132)。ここで、変数Xの値と画素の位置との関係は以下の通りである。
(1)X=0である場合は、注目画素の位置を示す。
(2)X<0である場合は、注目画素から主走査方向に対して逆方向に、当該Xの値の絶対値の画素数だけ離れた位置を示す。例えば、X=-3である場合、注目画素から主走査方向に対して逆方向に3画素離れた位置を示す。
(3)X>0である場合は、注目画素から主走査方向に対して順方向に、当該Xの値の画素数だけ離れた位置を示す。例えば、X=3である場合、注目画素から主走査方向に対して順方向に3画素離れた位置を示す。
On the other hand, if the Flg value of the pixel of interest is not "Wh", the control unit 100 executes the process shown in Fig. 9. First, the control unit 100 assigns XMIN to a variable X indicating the position of a pixel included in the range set in step S122 of Fig. 8 (step S132). Here, the relationship between the value of the variable X and the pixel position is as follows:
(1) When X=0, it indicates the position of the pixel of interest.
(2) If X<0, it indicates a position that is away from the pixel of interest in the reverse direction of the main scanning direction by the number of pixels equal to the absolute value of the value of X. For example, if X=-3, it indicates a position that is three pixels away from the pixel of interest in the reverse direction of the main scanning direction.
(3) If X>0, it indicates a position that is the number of pixels away from the pixel of interest in the forward direction of the main scanning direction, which is the value of X. For example, if X=3, it indicates a position that is three pixels away from the pixel of interest in the forward direction of the main scanning direction.

また、XMINは、Xが取り得る値のうち、最小の値を示す。例えば、図8のステップS122において、注目画素から主走査方向に対して順方向に連続する3画素と、当該注目画素から主走査方向に対して逆方向に連続する3数画とを含む範囲が設定された場合、Xの取り得る範囲は-3から3となり、XMINは-3となる。 XMIN indicates the smallest possible value for X. For example, in step S122 of FIG. 8, if a range is set that includes three consecutive pixels in the forward direction from the target pixel in the main scanning direction and three consecutive pixels in the reverse direction from the target pixel in the main scanning direction, the possible range for X is -3 to 3, and XMIN is -3.

つづいて、制御部100は、変数Xの値が0であるか否かを判定する(ステップS134)。制御部100は、変数Xの値が0でない場合、変数Xの値によって示される位置の画素(位置Xの画素)が、白の画素であるか否かを判定する(ステップS134;Yes→ステップS136)。例えば、制御部100は、位置Xの画素に対するFlgの値が「Wh」である場合、当該画素が白の画素であると判定する。 Next, the control unit 100 determines whether the value of variable X is 0 (step S134). If the value of variable X is not 0, the control unit 100 determines whether the pixel at the position indicated by the value of variable X (pixel at position X) is a white pixel (step S134; Yes → step S136). For example, if the Flg value for the pixel at position X is "Wh", the control unit 100 determines that the pixel is a white pixel.

制御部100は、位置Xの画素が白の画素ではない場合、当該位置Xの画素と注目画素との間における色成分毎の濃度差を取得する(ステップS136;Yes→ステップS138)。濃度差とは、2つの画素の間における、特定の色成分の値の差分をいう。 If the pixel at position X is not a white pixel, the control unit 100 obtains the density difference for each color component between the pixel at position X and the pixel of interest (step S136; Yes → step S138). The density difference refers to the difference in the value of a specific color component between the two pixels.

例えば、位置Xの画素の画素値を(R,G,B)としたとき、制御部100は、以下の式により、色成分毎に濃度差を算出することで、色成分毎の濃度差を取得する。
R成分の濃度差=|R-R
B成分の濃度差=|G-G
G成分の濃度差=|B-B
ここで、X=-3である場合、制御部100は、以下の式により、色成分毎の濃度差を算出する。
R成分の濃度差=|R-R-3
B成分の濃度差=|G-G-3
G成分の濃度差=|B-B-3
For example, when the pixel value of the pixel at position X is ( Rx , Gx , Bx ), the control unit 100 calculates the density difference for each color component using the following formula, thereby obtaining the density difference for each color component.
Concentration difference of R component=|R 0 −R X |
Concentration difference of B component=|G 0 −G X |
Density difference of G component=|B 0 −B X |
Here, when X=−3, the control unit 100 calculates the density difference for each color component using the following formula.
Concentration difference of R component=|R 0 −R −3 |
Concentration difference of B component=|G 0 −G −3 |
Density difference of G component=|B 0 −B −3 |

つづいて、制御部100は、ステップS138において取得した色成分毎の濃度差のうち、1の色成分の濃度差が閾値Th1を超え、かつ、他の色成分の濃度差がTh2未満であるか否かを判定する(ステップS140)。 Next, the control unit 100 determines whether, of the density differences for each color component obtained in step S138, the density difference for one color component exceeds threshold value Th1 and the density differences for the other color components are less than threshold value Th2 (step S140).

例えば、制御部100は、以下の何れかの条件を満たすか否かを判定する。
(1)|R-R|>Th1かつ|G-G|<Th2かつ|B-B|<Th2
(2)|R-R|<Th2かつ|G-G|>Th1かつ|B-B|<Th2
(3)|R-R|<Th2かつ|G-G|<Th2かつ|B-B|>Th1
ここで、X=-3である場合、制御部100は、以下の何れかの条件を満たすか否かを判定する。
(1)|R-R-3|>Th1かつ|G-G-3|<Th2かつ|B-B-3|<Th2
(2)|R-R-3|<Th2かつ|G-G-3|>Th1かつ|B-B-3|<Th2
(3)|R-R-3|<Th2かつ|G-G-3|<Th2かつ|B-B-3|>Th1
For example, the control unit 100 determines whether any of the following conditions is met.
(1) |R 0 −R X |>Th1 and |G 0 −G X |<Th2 and |B 0 −B X |<Th2
(2) |R 0 −R X |<Th2 and |G 0 −G X |>Th1 and |B 0 −B X |<Th2
(3) |R 0 −R X |<Th2 and |G 0 −G X |<Th2 and |B 0 −B X |>Th1
Here, if X=−3, the control unit 100 determines whether or not any of the following conditions is met.
(1) |R 0 -R -3 |>Th1 and |G 0 -G -3 |<Th2 and |B 0 -B -3 |<Th2
(2) |R 0 -R -3 |<Th2 and |G 0 -G -3 |>Th1 and |B 0 -B -3 |<Th2
(3) |R 0 −R −3 |<Th2 and |G 0 −G −3 |<Th2 and |B 0 −B −3 |>Th1

なお、Th1及びTh2は、パラメータ情報記憶領域162に記憶された値を用いればよい。また、色成分の値が0から255までの何れかの値である場合、例えば、Th1の値は「80」(望ましくは50~150までの何れかの値)であり、Th2は「15」(望ましくは、5~20までの何れかの値)である。 Note that Th1 and Th2 may use the values stored in the parameter information storage area 162. Furthermore, if the color component values are any value between 0 and 255, for example, the value of Th1 is "80" (preferably any value between 50 and 150), and the value of Th2 is "15" (preferably any value between 5 and 20).

制御部100は、1の色成分の濃度差が閾値Th1を超え、かつ、他の色成分の濃度差がTh2未満である場合、位置Xの画素のFlgの値として「1」を設定する(ステップS140;Yes→ステップS142)。なお、制御部100は、閾値Th1を超えた色成分の情報も、位置Xの画素に対して、Flgの値とともに設定する。なお、本実施形態では、色成分のうち、閾値Th1を超えた色成分を、特定色成分という。本実施形態では、制御部100は、ステップS140の処理を実行することにより、R成分、G成分、B成分のうち、何れか1の色成分が特定色成分であるか否かを判定し、何れか1の色成分が特定色成分である場合に、Flgの値を「1」とする。 If the density difference of one color component exceeds threshold value Th1 and the density difference of the other color components is less than Th2, the control unit 100 sets the Flg value of the pixel at position X to "1" (step S140; Yes → step S142). The control unit 100 also sets information about the color component that exceeds threshold value Th1 for the pixel at position X, along with the Flg value. In this embodiment, a color component that exceeds threshold value Th1 is referred to as a specific color component. In this embodiment, the control unit 100 performs the process of step S140 to determine whether any one of the R, G, and B color components is a specific color component, and if any one color component is a specific color component, sets the Flg value to "1".

例えば、制御部100は、特定色成分がR成分である場合、変数Xの値と、Flgの値「1R」とを対応付けて、記憶部160に一時的に記憶する。同様に、制御部100は、特定色成分がG成分である場合、変数Xの値と、Flgの値「1G」とを対応付けて、記憶部160に一時的に記憶する。制御部100は、特定色成分がB成分である場合、変数Xの値と、Flgの値「1B」とを対応付けて、記憶部160に一時的に記憶する。 For example, when the specific color component is the R component, the control unit 100 associates the value of the variable X with the Flg value "1R" and temporarily stores them in the storage unit 160. Similarly, when the specific color component is the G component, the control unit 100 associates the value of the variable X with the Flg value "1G" and temporarily stores them in the storage unit 160. When the specific color component is the B component, the control unit 100 associates the value of the variable X with the Flg value "1B" and temporarily stores them in the storage unit 160.

一方、制御部100は、1の色成分の濃度差が閾値Th1を超え、かつ、他の色成分の濃度差がTh2未満である場合ではなければ、位置Xの画素のFlgの値として「0」を設定する(ステップS140;No→ステップS144)。例えば、制御部100は、変数Xの値と、Flgの値「0」とを対応付けて、記憶部160に一時的に記憶する。 On the other hand, unless the density difference of one color component exceeds threshold Th1 and the density difference of the other color components is less than Th2, the control unit 100 sets the Flg value of the pixel at position X to "0" (step S140; No → step S144). For example, the control unit 100 associates the value of variable X with the Flg value "0" and temporarily stores them in the storage unit 160.

なお、制御部100は、Xの値が0である場合(ステップS134;No)や、位置Xの画素が白の画素である場合(ステップS136;No)は、ステップS138からステップS144までの処理を省略する。 Note that if the value of X is 0 (step S134; No) or if the pixel at position X is a white pixel (step S136; No), the control unit 100 skips steps S138 to S144.

つづいて、制御部100は、変数Xの値がXMAXであるか否かを判定する(ステップS146)。XMAXは、Xが取り得る値のうち、最大の値を示す。変数Xの値がXMAXではない場合は、XにX+1の値を代入し、ステップS134に戻る(ステップS146;No→ステップS148→ステップS134)。このようにして、制御部100は、図8のステップS122において設定した画素の範囲に含まれる画素のうち、注目画素以外の画素に対してFlgの値を設定する。 Next, the control unit 100 determines whether the value of variable X is XMAX (step S146). XMAX indicates the maximum value that X can take. If the value of variable X is not XMAX, the control unit 100 assigns the value of X+1 to X and returns to step S134 (step S146; No → step S148 → step S134). In this way, the control unit 100 sets Flg values for pixels other than the pixel of interest that are included in the range of pixels set in step S122 of Figure 8.

一方、制御部100は、変数Xの値がXMAXである場合、注目画素の両側に、Flgの値が「1」で、かつ、特定色要素が同一の画素が1対以上あるか否かを判定する(ステップS146;Yes→ステップS150)。注目画素の両側とは、注目画素に対して主走査方向の順方向に連続する画素及び注目画素に対して主走査方向の逆方向に連続する画素である。制御部100は、注目画素に対して主走査方向の順方向に連続する任意の位置の画素と、注目画素に対して主走査方向の逆方向に連続する任意の位置の画素とにおいて、Flgの値が「1」で、かつ、特定色要素が同一の画素があるか否かを判定する。そして、制御部100は、Flgの値が「1」で、かつ、特定色要素が同一の画素がある場合、注目画素の両側に、Flgの値が「1」で、かつ、特定色要素が同一の画素が1対以上あると判定する。 On the other hand, if the value of variable X is XMAX, the control unit 100 determines whether there are one or more pairs of pixels on either side of the pixel of interest that have a Flg value of "1" and the same specific color element (step S146; Yes → step S150). "On either side of the pixel of interest" refers to pixels adjacent to the pixel of interest in the forward main scanning direction and pixels adjacent to the pixel of interest in the reverse main scanning direction. The control unit 100 determines whether there are any pixels with a Flg value of "1" and the same specific color element at any pixel adjacent to the pixel of interest in the forward main scanning direction and any pixel adjacent to the pixel of interest in the reverse main scanning direction. Then, if there are any pixels with a Flg value of "1" and the same specific color element, the control unit 100 determines that there are one or more pairs of pixels on either side of the pixel of interest that have a Flg value of "1" and the same specific color element.

例えば、制御部100は、注目画素の両側に、Flgの値が「1R」である画素がある場合、Flg=1で、かつ、特定色成分が同一である画素が1対存在すると判定する。 For example, if there are pixels on both sides of the pixel of interest whose Flg value is "1R," the control unit 100 determines that there is a pair of pixels with Flg = 1 and the same specific color component.

制御部100は、注目画素の両側に、Flgの値が「1」で、かつ、特定色要素が同一の画素が1対以上ある場合、注目画素の仮スキャナ筋判定結果として、異常画素の候補であると判定する(ステップS150;Yes→ステップS152)。ここで、制御部100は、注目画素の両側に1対以上存在する、Flgの値が「1」で、かつ、特定色要素が同一の画素における特定色要素の情報を、注目画素の仮スキャナ筋判定結果情報166に記憶する。 If there is one or more pairs of pixels on either side of the pixel of interest that have a Flg value of "1" and the same specific color element, the control unit 100 determines that the pixel of interest is a candidate for an abnormal pixel as a provisional scanner line determination result for the pixel of interest (step S150; Yes → step S152). Here, the control unit 100 stores information on the specific color element of the pixels on either side of the pixel of interest that have a Flg value of "1" and the same specific color element in the provisional scanner line determination result information 166 for the pixel of interest.

例えば、制御部100は、注目画素の両側に、Flgの値が「1R」である画素が1対以上存在した場合、仮スキャナ筋判定結果情報166に、注目画素の位置の値として「1R」を記憶する。これにより、制御部100は、仮スキャナ筋判定結果情報166に記憶された「1R」という情報から、当該画素は、異常画素の候補の画素であって、当該画素と周辺の画素とにおいて、赤成分の濃度差がTh1を超えていることを識別することができる。なお、仮スキャナ筋判定結果情報166に記憶された特定色要素の情報は、異常画素の候補として検出された画素に対応する特定色成分である。 For example, if there is one or more pairs of pixels with a Flg value of "1R" on either side of the pixel of interest, the control unit 100 stores "1R" as the position value of the pixel of interest in the provisional scanner line determination result information 166. This allows the control unit 100 to identify, from the "1R" information stored in the provisional scanner line determination result information 166, that the pixel in question is a candidate for an abnormal pixel, and that the density difference of the red component between the pixel in question and its surrounding pixels exceeds Th1. The information on the specific color element stored in the provisional scanner line determination result information 166 is the specific color component corresponding to the pixel detected as a candidate for an abnormal pixel.

一方、制御部100は、Flg=1で、かつ、特定色成分が同一である画素が注目画素の両側に存在しない場合、注目画素の仮スキャナ筋判定結果として、異常画素の候補ではなく、白以外の画素であると判定する(ステップS150;No→ステップS154)。このとき、制御部100は、仮スキャナ筋判定結果情報166の注目画素の位置の値として、「×」を記憶する。 On the other hand, if Flg = 1 and there are no pixels with the same specific color component on either side of the pixel of interest, the control unit 100 determines that the pixel of interest is not a candidate for an abnormal pixel, but is a non-white pixel, as a provisional scanner line determination result for the pixel of interest (step S150; No → step S154). In this case, the control unit 100 stores "X" as the value of the position of the pixel of interest in the provisional scanner line determination result information 166.

図8に戻り、制御部100は、図8のステップS128、図9のステップS152、図9のステップS154の何れかの処理を実行した後、入力画像の全ての画素に対して、異常画素の候補であるか否かの判定を行ったか否かを判定する(ステップS130)。制御部100は、全ての画素に対して判定を行った場合は、第1スキャナ筋検出処理を終了する(ステップS130;Yes)。一方、制御部100は、全ての画素に対して判定を行っていない場合は、ステップS120に戻る(ステップS130;No→ステップS120)。このようにして、制御部100は、入力画像から、異常画素の候補を検出する。 Returning to FIG. 8, after the control unit 100 executes the process of either step S128 in FIG. 8, step S152 in FIG. 9, or step S154 in FIG. 9, it determines whether or not all pixels in the input image have been determined to be candidates for abnormal pixels (step S130). If the control unit 100 has determined all pixels, it ends the first scanner line detection process (step S130; Yes). On the other hand, if the control unit 100 has not determined all pixels, it returns to step S120 (step S130; No → step S120). In this way, the control unit 100 detects candidate abnormal pixels from the input image.

なお、制御部100は、第1スキャナ筋検出処理を、原稿の画像を読み取っている最中に実行してもよい。例えば、制御部100は、原稿の画像を、主走査方向に1ラインもしくは所定の数のラインだけ読み取った時点で、当該読み取ったラインの画像に対して、第1スキャナ筋検出処理を実行してもよい。この場合、制御部100は、図8のステップS120においては、読み取ったラインの画像に含まれる画素から注目画素を選択し、図8のステップS130においては、読み取ったラインの画像に含まれる全ての画素に対して判定を行ったか否かを判定すればよい。このようにすることで、制御部100は、第1スキャナ筋検出処理を、リアルタイムに実行することができる。 The control unit 100 may also execute the first scanner line detection process while reading an image of a document. For example, once the control unit 100 has read one line or a predetermined number of lines of the image of the document in the main scanning direction, it may execute the first scanner line detection process on the image of the read line. In this case, in step S120 of FIG. 8, the control unit 100 selects a pixel of interest from the pixels included in the image of the read line, and in step S130 of FIG. 8, it determines whether or not it has performed a determination on all pixels included in the image of the read line. In this way, the control unit 100 can execute the first scanner line detection process in real time.

[1.2.3 第2スキャナ筋検出処理]
図10を参照して、第2スキャナ筋検出処理の流れを説明する。第2スキャナ筋検出処理は、第1スキャナ筋検出処理の実行後に実行されてもよいし、入力画像の取得時に第1スキャナ筋検出処理と並行に実行されてもよい。
1.2.3 Second scanner streak detection process
The flow of the second scanner line detection process will be described with reference to Fig. 10. The second scanner line detection process may be executed after the first scanner line detection process, or may be executed in parallel with the first scanner line detection process when acquiring the input image.

はじめに、制御部100は、入力画像から、副走査方向のラインを1ライン選択する(ステップS160)。例えば、制御部100は、副走査方向のラインを示す変数をLとし、Lに所定の値(例えば、0、1、2、・・・。ただし、Lの範囲は0≦L≦入力画像の主走査方向の画素数-1)を代入する。なお、以下の説明では、ステップS160において選択された副走査方向のラインを、「注目ライン」と記載する。すなわち、注目ラインは、副走査方向を長手方向とした画素の列であり、x座標の値がLである画素により構成される。 First, the control unit 100 selects one line in the sub-scanning direction from the input image (step S160). For example, the control unit 100 sets a variable indicating the line in the sub-scanning direction to L, and assigns a predetermined value to L (e.g., 0, 1, 2, ... where L is in the range 0≦L≦number of pixels in the main scanning direction of the input image - 1). In the following explanation, the line in the sub-scanning direction selected in step S160 will be referred to as the "line of interest." In other words, the line of interest is a row of pixels with the sub-scanning direction as its longitudinal direction, and is composed of pixels whose x-coordinate value is L.

つづいて、制御部100は、注目ラインの仮スキャナ筋判定結果を評価する。はじめに、制御部100は、注目ラインに、異常画素の候補の画素があるか否かを判定する(ステップS162)。例えば、制御部100は、仮スキャナ筋判定結果情報166から、L列目の判定結果を読み出し、「1R」「1G」「1B」の何れかが含まれている場合、異常画素の候補の画素があると判定する。 Next, the control unit 100 evaluates the provisional scanner line determination result for the line of interest. First, the control unit 100 determines whether there are any pixels on the line of interest that are candidates for abnormal pixels (step S162). For example, the control unit 100 reads the determination result for the Lth column from the provisional scanner line determination result information 166, and if any of "1R," "1G," or "1B" is included, it determines that there is a pixel that is a candidate for abnormal pixels.

制御部100は、異常画素の候補の画素がある場合、当該異常画素の候補の画素と当該画素の周辺の画素との濃度差において、当該濃度差がTh1を超える色成分が1種類であるか否かを判定する(ステップS162;Yes→ステップS164)。つまり、制御部100は、注目ライン内に含まれる異常画素の候補として検出された画素において、当該異常画素の候補として検出された画素に対応する特定色成分が同一であるか否かを判定する。例えば、制御部100は、注目ラインに含まれる画素の仮スキャナ筋判定結果の値として「1R」「1G」「1B」のうち2種類以上が含まれている場合、濃度差がTh1を超える色成分が1種類ではないと判定する。すなわち、制御部100は、注目ラインに異常画素の候補があるものの、濃度差がTh1を超える色成分が同一色成分ではないと判定する。 If there is a candidate abnormal pixel, the control unit 100 determines whether there is a single color component whose density difference exceeds Th1 between the candidate abnormal pixel and its surrounding pixels (Step S162: Yes → Step S164). That is, the control unit 100 determines whether the specific color components corresponding to the pixels detected as candidate abnormal pixels included in the target line are the same. For example, if the values of the provisional scanner line determination result for the pixels included in the target line include two or more of "1R," "1G," and "1B," the control unit 100 determines that there is more than one color component whose density difference exceeds Th1. That is, the control unit 100 determines that although there is a candidate abnormal pixel on the target line, the color components whose density difference exceeds Th1 are not the same color component.

制御部100は、濃度差がTh1を超える色成分が1種類でない場合は、注目ラインに含まれる異常画素の候補の画素に対する仮スキャナ筋判定結果を、異常画素の候補ではない白以外の画素に変更する(ステップS164;No→ステップS166)。すなわち、制御部100は、注目ライン内の異常画素の候補の画素に対する仮スキャナ筋判定結果を「×」に変更する。これにより、制御部100は、濃度差がTh1を超える色成分が1種類ではない(異常画素の候補として検出された画素に対応する特定色成分が同一ではない)ラインに存在する画素を、異常画素の候補から除外する。なお、制御部100は、ステップS164において、濃度差がTh1を超える色成分が1種類であると判定した場合は、ステップS166における処理を省略する(ステップS164;Yes)。 If there is more than one color component with a density difference exceeding Th1, the control unit 100 changes the provisional scanner line determination result for the candidate abnormal pixel included in the line of interest to a non-white pixel that is not a candidate abnormal pixel (step S164; No → step S166). That is, the control unit 100 changes the provisional scanner line determination result for the candidate abnormal pixel in the line of interest to "X." As a result, the control unit 100 excludes pixels on lines with more than one color component with a density difference exceeding Th1 (pixels detected as candidate abnormal pixels do not have the same specific color component) from the candidate abnormal pixels. Note that if the control unit 100 determines in step S164 that there is one color component with a density difference exceeding Th1, it skips the processing in step S166 (step S164; Yes).

つづいて、制御部100は、注目ラインにおいて、孤立した異常画素の候補の画素があるか否かを判定する(ステップS168)。ここで、孤立した異常画素の候補の画素とは、他の異常画素の候補の画素に隣接していない異常画素の候補の画素や、連続して存在する異常画素の候補の画素の数が所定の閾値(例えば、5)未満である異常画素の候補の画素をいう。 Next, the control unit 100 determines whether there are any isolated candidate abnormal pixels on the line of interest (step S168). Here, an isolated candidate abnormal pixel refers to a candidate abnormal pixel that is not adjacent to other candidate abnormal pixels, or a candidate abnormal pixel where the number of consecutive candidate abnormal pixels is less than a predetermined threshold (e.g., 5).

制御部100は、孤立した異常画素の候補の画素がある場合、当該孤立した異常画素の候補の画素に対する仮スキャナ筋判定結果を、異常画素の候補ではない白以外の画素に変更する(ステップS168;Yes→ステップS170)。すなわち、制御部100は、注目ライン内において、孤立した異常画素の候補の画素に対する仮スキャナ筋判定結果を「×」に変更する。これにより、制御部100は、孤立した異常画素の候補の画素を、異常画素の候補から除外する。なお、制御部100は、ステップS168において、孤立した異常画素の候補の画素がない場合は、ステップS170における処理を省略する(ステップS168;No)。 If there is a pixel that is a candidate for an isolated abnormal pixel, the control unit 100 changes the provisional scanner line determination result for that pixel to a non-white pixel that is not a candidate for an abnormal pixel (step S168; Yes → step S170). That is, the control unit 100 changes the provisional scanner line determination result for the pixel that is a candidate for an isolated abnormal pixel within the line of interest to "X". This causes the control unit 100 to exclude the pixel that is a candidate for an isolated abnormal pixel from the list of candidate abnormal pixels. Note that if there is no pixel that is a candidate for an isolated abnormal pixel in step S168, the control unit 100 omits the processing in step S170 (step S168; No).

つづいて、制御部100は、注目ラインにおいて、異常画素の候補の画素が、副走査方向において連続性があるか否かを判定する(ステップS172)。副走査方向に連続性がある場合とは、注目ラインにおいて、異常画素の候補の画素が、副走査方向に断続的に存在する場合である。異常画素の候補の画素が、副走査方向に断続的に存在する場合とは、異常画素の候補の画素が、白の画素を挟みながら並んでいる場合である。すなわち、異常画素の候補の画素が白の画素を挟んで交互に並んでいるときや、異常画素の候補が白の画素を挟んで連続しているとき、異常画素の候補の画素が、副走査方向において連続性がある。 Next, the control unit 100 determines whether the candidate abnormal pixels on the line of interest are continuous in the sub-scanning direction (step S172). Consecutive abnormal pixels in the sub-scanning direction are present when the candidate abnormal pixels are intermittently located in the sub-scanning direction on the line of interest. Consecutive abnormal pixel pixels in the sub-scanning direction are present when the candidate abnormal pixels are arranged with white pixels sandwiched between them. In other words, the candidate abnormal pixels are continuous in the sub-scanning direction when the candidate abnormal pixels are alternately arranged with white pixels sandwiched between them, or when the candidate abnormal pixels are consecutive with white pixels sandwiched between them.

ここで、制御部100は、ステップS172における処理として、注目ラインにおいて、白の画素及び異常画素の候補の画素が、閾値Th3以上連続して続いているか否かを判定する。なお、Th3の値は入力画像の縦方向の画素数の10%に相当する画素数(望ましくは入力画像の縦方向の画素数の5%~20%の何れかの割合に相当する画素数)であってもよいし、具体的な値(例えば、「200」)であってもよい。この場合、制御部100は、仮スキャナ筋判定結果情報166から注目ラインの判定結果を読み出し、判定結果が「Wh」である画素及び判定結果が異常画素の候補(「1R」「1G」「1B」の何れか)である画素が、連続して閾値Th3以上出現するか否かを判定する。制御部100は、判定結果が「Wh」である画素及び判定結果が異常画素の候補が連続して閾値Th3以上出現する場合、注目ラインにおいて、異常画素の候補が副走査方向に連続性があると判定する。 In step S172, the control unit 100 determines whether the number of consecutive white pixels and candidate abnormal pixels on the target line is equal to or exceeds the threshold value Th3. The value of Th3 may be a pixel count equivalent to 10% of the vertical pixel count of the input image (preferably, a pixel count equivalent to any ratio between 5% and 20% of the vertical pixel count of the input image), or a specific value (e.g., "200"). In this case, the control unit 100 reads the determination result for the target line from the provisional scanner line determination result information 166 and determines whether the number of consecutive pixels determined to be "Wh" and the number of consecutive pixels determined to be candidate abnormal pixels (either "1R," "1G," or "1B") exceeds the threshold value Th3. If the number of consecutive pixels determined to be "Wh" and the number of consecutive candidate abnormal pixels exceeds the threshold value Th3, the control unit 100 determines that the candidate abnormal pixels on the target line are continuous in the sub-scanning direction.

制御部100は、注目ラインにおいて、異常画素の候補が副走査方向に連続性がある場合、当該注目ラインはスキャナ筋が生じたラインであると判定する(ステップS172;Yes→ステップS174)。これにより、制御部100は、スキャナ筋が生じたラインに含まれる異常画素の候補の画素を、異常画素として識別することができる。また、制御部100は、異常画素を含む副走査方向のライン(画素列)を、異常画素領域として識別することができる。このとき、制御部100は、スキャナ筋判定結果情報168に、注目ラインの列数を示すXの値と「Yes」とを対応付けて記憶する。 If the candidate abnormal pixels on the line of interest are continuous in the sub-scanning direction, the control unit 100 determines that the line of interest is a line where a scanner streak has occurred (step S172; Yes → step S174). This allows the control unit 100 to identify candidate abnormal pixels included in the line where a scanner streak has occurred as abnormal pixels. The control unit 100 can also identify a line (pixel row) in the sub-scanning direction that contains abnormal pixels as an abnormal pixel area. At this time, the control unit 100 stores the value of X, which indicates the row number of the line of interest, in association with "Yes" in the scanner streak determination result information 168.

一方、制御部100は、注目ラインにおいて、異常画素の候補が副走査方向に連続性がない場合、当該注目ラインはスキャナ筋が生じていないラインであると判定する(ステップS172;No→ステップS176)。このとき、制御部100は、スキャナ筋判定結果情報168に、注目ラインの列数を示すXの値と「No」とを対応付けて記憶する。なお、制御部100は、ステップS162において、注目ラインに異常画素の候補の画素がないと判定した場合も、注目ラインはスキャナ筋が生じていないラインであると判定する(ステップS162;No→ステップS176)。 On the other hand, if the candidate abnormal pixels on the line of interest are not continuous in the sub-scanning direction, the control unit 100 determines that the line of interest is a line on which scanner streaks do not occur (step S172; No → step S176). At this time, the control unit 100 stores the value of X, which indicates the number of columns on the line of interest, in association with "No" in the scanner streak determination result information 168. Note that even if the control unit 100 determines in step S162 that the line of interest does not have any candidate abnormal pixels, it also determines that the line of interest is a line on which scanner streaks do not occur (step S162; No → step S176).

つづいて、制御部100は、入力画像の全てのラインを選択したか否かを判定する(ステップS178)。制御部100は、入力画像の全てのラインを選択した場合は、図10に示した処理を終了する(ステップS178;Yes)。一方、制御部100は、入力画像の全てのライン選択していない場合は、ステップS160に戻る(ステップS178;No→ステップS160)。 Next, the control unit 100 determines whether all lines of the input image have been selected (step S178). If all lines of the input image have been selected, the control unit 100 ends the processing shown in FIG. 10 (step S178; Yes). On the other hand, if all lines of the input image have not been selected, the control unit 100 returns to step S160 (step S178; No → step S160).

なお、制御部100は、第2スキャナ筋検出処理を第1スキャナ筋検出処理と並行して実行する場合、原稿の画像を、主走査方向に所定の数(例えば、200)のライン分読み取る度に、第2スキャナ筋検出処理を実行すればよい。このようにすることで、制御部100は、リアルタイムに、スキャナ筋が生じたラインを判定することができる。 When the control unit 100 executes the second scanner streak detection process in parallel with the first scanner streak detection process, it only needs to execute the second scanner streak detection process each time it reads a predetermined number (e.g., 200) of lines of the document image in the main scanning direction. In this way, the control unit 100 can determine in real time the lines on which scanner streaks have occurred.

[1.2.4 スキャナ筋補正処理]
図11を参照して、スキャナ筋補正処理の流れを説明する。はじめに、制御部100は、入力画像にスキャナ筋が生じているか否かを判定する(ステップS180)。例えば、制御部100は、スキャナ筋判定結果情報168を読み出し、スキャナ筋判定結果に1つ以上「Yes」が含まれていれば、入力画像にスキャナ筋が生じていると判定する。なお、制御部100は、入力画像にスキャナ筋がない場合は、図11に示した処理を終了する(ステップS180;No)。
[1.2.4 Scanner streak correction processing]
The flow of the scanner streak correction process will be described with reference to Fig. 11. First, the control unit 100 determines whether or not scanner streaks have appeared in the input image (step S180). For example, the control unit 100 reads the scanner streak determination result information 168, and if the scanner streak determination result includes one or more "Yes"s, it determines that scanner streaks have appeared in the input image. Note that if there are no scanner streaks in the input image, the control unit 100 ends the process shown in Fig. 11 (step S180; No).

制御部100は、入力画像にスキャナ筋が生じている場合、スキャナ筋のある副走査方向のラインを1ライン選択する(ステップS180;Yes→ステップS182)。例えば、制御部100は、スキャナ筋判定結果情報168のうち、スキャナ筋判定結果が「Yes」である位置を取得し、当該位置の副走査方向のラインを選択する。 If scanner streaks are present in the input image, the control unit 100 selects one line in the sub-scanning direction where the scanner streaks are present (step S180; Yes → step S182). For example, the control unit 100 obtains the position in the scanner streak determination result information 168 where the scanner streak determination result is "Yes," and selects the line in the sub-scanning direction at that position.

つづいて、制御部100は、スキャナ筋の周辺の画像パターン(領域分離結果)を特定する(ステップS184)。例えば、制御部100は、領域分離情報164を参照しながら、ステップS182において選択したライン内の画素毎に、当該画素の左(主走査方向の逆方向)又は右(主走査方向の順方向)の何れか一方に隣接する画素の画像パターンを、その画素におけるスキャナ筋の周辺の画像パターンとして特定する。なお、制御部100は、ステップS182において選択したライン内の画素毎に、その画素の左や右隣接する所定の大きさの領域の画像パターンに基づいて、その画素におけるスキャナ筋の周辺の画像パターンとして特定してもよい。例えば、制御部100は、ステップS182において選択したライン内のある画素(注目画素)の左と右とに、それぞれ、縦5画素、横5画素の25画素の領域を、注目画素に隣接するように設定する。この場合、制御部100は、設定した領域内の画素(合計50画素)の画像パターンを集計し、最も多い画像パターンを、注目画素の周辺の画像パターンとして特定する。なお、制御部100は、ステップS182において選択したライン内の画素毎にそれぞれに対してスキャナ筋の周辺の画像パターンを特定してもよいし、当該選択ラインに対して1のスキャナ筋の周辺の画像パターンを特定してもよい。 Next, the control unit 100 identifies the image pattern (region separation result) around the scanner line (step S184). For example, while referencing the region separation information 164, the control unit 100 identifies, for each pixel in the line selected in step S182, the image pattern of the pixel adjacent to either the left (opposite to the main scanning direction) or the right (forward to the main scanning direction) of the pixel as the image pattern around the scanner line at that pixel. Note that, for each pixel in the line selected in step S182, the control unit 100 may also identify the image pattern around the scanner line at that pixel based on the image pattern of a region of a predetermined size adjacent to the left or right of the pixel. For example, the control unit 100 sets two regions of 25 pixels, five vertically and five horizontally, to the left and right of a pixel (pixel of interest) in the line selected in step S182, so that they are adjacent to the pixel of interest. In this case, the control unit 100 counts the image patterns of the pixels within the set area (50 pixels in total) and identifies the most common image pattern as the image pattern surrounding the pixel of interest. Note that the control unit 100 may identify an image pattern surrounding the scanner line for each pixel within the line selected in step S182, or may identify an image pattern surrounding one scanner line for the selected line.

つづいて、制御部100は、周辺の画像パターンが網点領域又は万線領域であるか否かを判定する(ステップS186)。制御部100は、周辺の画像パターンが網点領域又は万線領域である場合、スキャナ筋の画素値を、その画素の周辺の画素(周辺画素)の平均値に置き換える(ステップS186;Yes→ステップS188)。例えば、制御部100は、補正の対象とする画素(注目画素)の左と右とに、それぞれ、縦5画素、横5画素の25画素の領域を、注目画素に隣接するように設定し、当該領域に含まれる画素を周辺画素とする。このとき、制御部100は、周辺画素から画素毎に画素値を取得し、取得した画素値の平均値を、周辺画素の平均値とする。 Next, the control unit 100 determines whether the surrounding image pattern is a halftone dot area or a line area (step S186). If the surrounding image pattern is a halftone dot area or a line area, the control unit 100 replaces the pixel value of the scanner line with the average value of the pixels surrounding that pixel (peripheral pixels) (step S186; Yes → step S188). For example, the control unit 100 sets 25-pixel areas (5 pixels vertically and 5 pixels horizontally) to the left and right of the pixel to be corrected (target pixel) so that they are adjacent to the target pixel, and the pixels included in these areas are designated as peripheral pixels. At this time, the control unit 100 obtains pixel values for each pixel from the peripheral pixels and sets the average of the obtained pixel values as the average value of the peripheral pixels.

一方、制御部100は、周辺の画像パターンが網点領域や万線領域ではない場合、周辺の画像パターンが文字領域であるか否かを判定する(ステップS186;No→ステップS190)。制御部100は、周辺の画像パターンが文字領域であれば、スキャナ筋の画素値を、その画素に隣接する画素の画素値(隣接画素値)に置き換える(ステップS190;Yes→ステップS192)。例えば、制御部100は、補正の対象とする画素の左又は右の何れか一方に隣接する画素の画素値を、隣接画素値とする。 On the other hand, if the surrounding image pattern is not a halftone dot area or a line area, the control unit 100 determines whether the surrounding image pattern is a character area (step S186; No → step S190). If the surrounding image pattern is a character area, the control unit 100 replaces the pixel value of the scanner line with the pixel value of the pixel adjacent to that pixel (adjacent pixel value) (step S190; Yes → step S192). For example, the control unit 100 sets the pixel value of the pixel adjacent to either the left or right of the pixel to be corrected as the adjacent pixel value.

なお、制御部100は、ステップS190において、周辺の画像パターンが文字領域ではない場合、所定の方法により、スキャナ筋の画素値を置き換える(ステップS190;No→ステップS194)。周辺の画像パターンが、網点領域や万線領域ではなく、かつ、文字領域でもない領域(いわゆる、「その他」の領域)は、例えば、写真画像の領域である。制御部100は、周辺の画像パターンが「その他」であれば、スキャナ筋の画素値を、周辺が網点領域や万線領域である場合のように、周辺の画素の画素値の平均値に基づいて置き換えてもよいし、あるいは、周辺が文字領域である場合のように、隣接する画素の画素値に基づいて置き換えてもよい。なお、ステップS194における画素値の置き換えの方法は、予め定められていてもよいし、ユーザによって設定可能であってもよい。また、制御部100は、平均値に基づき画素値を置き換える方法や、隣接する画素の画素値に基づき画素値を置き換える方法以外の方法により、スキャナ筋の画素値を置き換えてもよい。 If the surrounding image pattern is not a text area in step S190, the control unit 100 replaces the pixel values of the scanner line using a predetermined method (step S190; No → step S194). Areas where the surrounding image pattern is neither a halftone dot area nor a line area, and is not a text area (so-called "other" areas), are, for example, photographic image areas. If the surrounding image pattern is "other," the control unit 100 may replace the pixel values of the scanner line based on the average pixel values of the surrounding pixels, as in the case where the surrounding area is a halftone dot area or line area, or may replace them based on the pixel values of adjacent pixels, as in the case where the surrounding area is a text area. The method for replacing pixel values in step S194 may be predetermined or may be user-configurable. The control unit 100 may also replace the pixel values of the scanner line using a method other than replacing pixel values based on the average value or the pixel values of adjacent pixels.

なお、制御部100は、ステップS186からステップS194までの処理を、ステップS182において選択したライン内の画素毎に実行する。これにより、制御部100は、異常画素領域の周辺の領域分離情報に基づき、異常画素領域に含まれる異常画素の補正方法(置き換えの方法)を切り替えることができる。また、制御部100は、異常画素の補正方法に応じて、当該異常画素の画素値を異なる画素値に置き換えることで、当該異常画素を適切に補正することができる。なお、制御部100は、ステップS182において選択したラインに含まれる全ての画素の画素値を置き換えてもよいし、当該ラインに含まれる異常画素(仮スキャナ筋判定結果が「1R」「1G」「1B」の何れかである画素)の画素値のみを置き換えてもよい。 The control unit 100 performs the processes from step S186 to step S194 for each pixel in the line selected in step S182. This allows the control unit 100 to switch the correction method (replacement method) for abnormal pixels included in the abnormal pixel region based on the region separation information surrounding the abnormal pixel region. The control unit 100 can also appropriately correct the abnormal pixel by replacing the pixel value of the abnormal pixel with a different pixel value depending on the correction method for the abnormal pixel. The control unit 100 may replace the pixel values of all pixels included in the line selected in step S182, or may replace only the pixel values of abnormal pixels included in the line (pixels for which the provisional scanner line determination result is "1R", "1G", or "1B").

つづいて、制御部100は、スキャナ筋のあるラインを全て選択したか否かを判定する(ステップS196)。制御部100は、スキャナ筋のあるラインを全て選択した場合は、図11に示した処理を終了する(ステップS196;Yes)。一方、制御部100は、スキャナ筋のあるラインを全て選択していない場合は、ステップS182に戻る(ステップS196;No→ステップS182)。 Next, the control unit 100 determines whether all lines with scanner streaks have been selected (step S196). If all lines with scanner streaks have been selected, the control unit 100 ends the processing shown in FIG. 11 (step S196; Yes). On the other hand, if all lines with scanner streaks have not been selected, the control unit 100 returns to step S182 (step S196; No → step S182).

[1.3 動作例]
つづいて、本実施形態の動作例について説明する。はじめに、本実施形態の画像形成装置10が補正するスキャナ筋について説明する。図12は、白筋(1成分の色が抜けることにより生じる筋)が生じる場合について示した図である。
[1.3 Operation example]
Next, an example of the operation of this embodiment will be described. First, a scanner streak corrected by the image forming apparatus 10 of this embodiment will be described. Fig. 12 is a diagram showing a case where a white streak (a streak caused by loss of one component color) occurs.

図12のP1は原稿送り方向を示す。原稿A100は、原稿送り装置によってP1の方向に搬送される。原稿A100は、光源A102からの光P2を反射する。反射されたR成分の光R100と、G成分の光G100と、B成分の光B100とは、CCD等のイメージセンサA104により読み取られる。これにより、画像形成装置10は、原稿A100の画像を取得することができる。 P1 in Figure 12 indicates the document feed direction. Document A100 is transported in the direction of P1 by the document feeder. Document A100 reflects light P2 from light source A102. The reflected R component light R100, G component light G100, and B component light B100 are read by image sensor A104, such as a CCD. This allows the image forming device 10 to obtain an image of document A100.

ここで、原稿A100と、原稿A100の下に位置するガラスA106との間に、紙片や埃といった異物A108があるとする。異物A108が小さく白い物体である場合、光源A102からの光P2は、原稿A100に吸収されず、異物A108によって反射される。異物A108が小さい場合、1色分の光(例えば、R成分の光R100)が常に反射されることとなり、当該1色分の光が、イメージセンサA104によって常に読み取られることとなる。このようにして所定の色成分の光が常にイメージセンサA104によって読み取られることにより、入力画像には、所定の色成分が抜けたような画素が現れることとなる。 Now, let's say there is a foreign object A108, such as a piece of paper or dust, between the original A100 and the glass A106 located below it. If the foreign object A108 is a small, white object, light P2 from the light source A102 is not absorbed by the original A100 and is reflected by the foreign object A108. If the foreign object A108 is small, light of one color (for example, light R100 of the R component) will always be reflected, and this light of one color will always be read by the image sensor A104. In this way, light of a specific color component will always be read by the image sensor A104, resulting in pixels in the input image that appear to be missing that specific color component.

次に、図13から図18を参照して、第1スキャナ筋検出処理の動作例を説明する。図13(a)は、原稿のスキャン画像(入力画像)を示した図であり、図中の升目は画素を示す。領域E100は、網点領域を示す。また、スキャナ筋E102はスキャナ筋を示す。このように、スキャナ筋は、例えば、網点領域上に生じることがある。 Next, an example of the operation of the first scanner streak detection process will be described with reference to Figures 13 to 18. Figure 13(a) is a diagram showing a scanned image (input image) of a document, with the squares in the diagram representing pixels. Area E100 represents a halftone dot area. Furthermore, scanner streaks E102 represent scanner streaks. In this way, scanner streaks can appear, for example, on halftone dot areas.

また、領域E104はスキャナ筋検出用マスクを示す。また、領域E106は注目画素を示す。画像形成装置10は、注目画素がスキャナ筋であるか否かを判定するために、スキャナ筋検出用マスクに対して、色成分毎の濃度差を取得する処理を行う。 Also, area E104 indicates the scanner line detection mask. Also, area E106 indicates the pixel of interest. To determine whether the pixel of interest is a scanner line, the image forming device 10 performs processing to obtain the density difference for each color component using the scanner line detection mask.

図13(b)は、スキャナ筋検出用マスクを拡大した図である。ここで、X=0である画素(※で示した画素)は、注目画素である。また、X=-3からX=-1までに位置する画素は、注目画素から主走査方向に対して逆方向に連続する画素である。X=1からX=3までに位置する画素は、注目画素から主走査方向に対して順方向に連続する画素である。このようにして、画像形成装置10は、注目画素が属する主走査方向の複数の画素の範囲を設定する。 Figure 13(b) is an enlarged view of the scanner streak detection mask. Here, the pixel where X = 0 (pixel marked with *) is the pixel of interest. The pixels located from X = -3 to X = -1 are consecutive pixels in the reverse direction from the pixel of interest in the main scanning direction. The pixels located from X = 1 to X = 3 are consecutive pixels in the forward direction from the pixel of interest in the main scanning direction. In this way, the image forming device 10 sets the range of multiple pixels in the main scanning direction to which the pixel of interest belongs.

図14は、スキャナ筋が生じていない場合における、網点領域の仮スキャナ筋判定結果を示す図である。図14(a)は、入力画像中の網点領域を拡大した図であり、図中の升目は画素を示す。領域E110はスキャナ筋検出用マスクを示す。また、領域E112は注目画素を示す。また、P110に示すように、背景が白い矩形は白の画素を示す。P112に示すように、背景が白ではない矩形は、白ではない画素(何らかの色が付いている網点の画素)を示す。 Figure 14 shows the results of a provisional scanner streak determination for a halftone dot area when no scanner streaks have occurred. Figure 14(a) is an enlarged view of a halftone dot area in the input image, with the squares in the figure representing pixels. Area E110 represents the scanner streak detection mask. Area E112 represents the pixel of interest. As shown in P110, rectangles with a white background represent white pixels. As shown in P112, rectangles with a non-white background represent non-white pixels (halftone dot pixels with some color).

図14(b)は、スキャナ筋検出用マスク内の各画素に対するFlgの値を示した図である。図14(b)に示すように、注目画素の両側にはFlg=1である画素が存在しない。したがって、注目画素に対する仮スキャナ判定結果は「×」となる。 Figure 14(b) shows the Flg value for each pixel in the scanner line detection mask. As shown in Figure 14(b), there are no pixels with Flg=1 on either side of the pixel of interest. Therefore, the provisional scanner judgment result for the pixel of interest is "X".

入力画像中の全ての画素に対して、異常画素の候補の画素であるか否かが判定されることにより、図14(c)に示す判定結果が得られる。なお、スキャナ筋が生じていないラインは、領域E114に示すように、「Wh」や「×」といった仮スキャナ筋判定結果が、副走査方向に続く。 All pixels in the input image are judged to determine whether they are candidate abnormal pixels, resulting in the judgment results shown in Figure 14(c). Note that for lines where scanner streaks do not occur, provisional scanner streak judgment results such as "Wh" or "X" continue in the sub-scanning direction, as shown in area E114.

図15は、スキャナ筋が生じている場合における、網点領域の仮スキャナ筋判定結果を示す図である。図15(a)は、入力画像中の網点領域を拡大した図であり、図中の升目は画素を示す。領域E120はスキャナ筋検出用マスクを示す。また、領域E122は注目画素を示す。なお、図15(a)のP120のように、クロスハッチングで示した画素は、周辺の網点の色と略同一ではない色の網点の画素を示す。すなわち、入力画像の網点領域内には、P120に示すように、周辺の網点の色と略同一ではない色の網点の画素が副走査方向に連続して表れており、このような画素により、スキャナ筋が生じている。 Figure 15 shows the results of a provisional scanner streak determination for a halftone dot area when scanner streaks have occurred. Figure 15(a) is an enlarged view of a halftone dot area in the input image, with the squares in the figure representing pixels. Area E120 represents the scanner streak detection mask. Area E122 represents the pixel of interest. Note that cross-hatched pixels, such as P120 in Figure 15(a), represent halftone dot pixels with a color that is not approximately the same as the color of the surrounding halftone dots. In other words, within the halftone dot area of the input image, as shown in P120, halftone dot pixels with a color that is not approximately the same as the color of the surrounding halftone dots appear consecutively in the sub-scanning direction, and these pixels cause scanner streaks.

図15(b)は、スキャナ筋検出用マスク内の各画素に対するFlgの値を示した図である。ここで、図15(b)の領域E124及び領域E126に示すように、注目画素から主走査方向の順方向に連続する画素と、注目画素から主走査方向の逆方向に連続する画素とにおいて、Flg=1であり、特定色成分が赤成分(R)である画素(Flgの値が「1R」である画素)が存在する。したがって、注目画素の仮スキャナ筋判定結果は「1R」となる。 Figure 15(b) shows the Flg value for each pixel in the scanner line detection mask. Here, as shown in areas E124 and E126 in Figure 15(b), there are pixels where Flg = 1 and the specific color component is red (R) (pixels with an Flg value of "1R") in the pixels consecutive from the pixel of interest in the forward main scanning direction and the pixels consecutive from the pixel of interest in the reverse main scanning direction. Therefore, the provisional scanner line determination result for the pixel of interest is "1R".

入力画像中の全ての画素に対して、異常画素の候補の画素であるか否かが判定されることにより、図15(c)に示す判定結果が得られる。なお、スキャナ筋が生じているラインには、領域E128に示すように、「Wh」や、「1R」といった濃度差がTh1を超える色成分が同一の異常画素の候補の画素である仮スキャナ筋判定結果が、副走査方向に続く。 The determination results shown in Figure 15(c) are obtained by determining whether all pixels in the input image are candidates for abnormal pixels. Note that, in the lines where scanner streaks occur, provisional scanner streak determination results continue in the sub-scanning direction for pixels that are candidates for abnormal pixels and have the same color components, such as "Wh" and "1R," with density differences exceeding Th1, as shown in area E128.

図16は、スキャナ筋が生じていない場合における、文字領域の仮スキャナ筋判定結果を示す図である。図16(a)は、入力画像中の文字領域を拡大した図であり、図中の升目は画素を示す。領域E130はスキャナ筋検出用マスクを示す。また、領域E132は注目画素を示す。また、P130に示すように、背景が白い矩形は白の画素を、P132に示すように、背景が黒い矩形は黒の画素を示す。 Figure 16 shows the results of a provisional scanner streak determination for a character region when no scanner streaks have occurred. Figure 16(a) is an enlarged view of a character region in the input image, with the squares in the figure representing pixels. Area E130 represents the scanner streak detection mask. Area E132 represents the pixel of interest. Also, as shown in P130, rectangles with a white background represent white pixels, and as shown in P132, rectangles with a black background represent black pixels.

図16(b)は、スキャナ筋検出用マスク内の各画素に対するFlgの値を示した図である。図16(b)に示すように、注目画素の両側にはFlg=1である画素が存在しない。したがって、注目画素に対する仮スキャナ判定結果は「×」となる。 Figure 16(b) shows the Flg value for each pixel in the scanner line detection mask. As shown in Figure 16(b), there are no pixels with Flg=1 on either side of the pixel of interest. Therefore, the provisional scanner judgment result for the pixel of interest is "X".

入力画像中の全ての画素に対して、異常画素の候補の画素であるか否かが判定されることにより、図16(c)に示す判定結果が得られる。図16(c)に示すように、スキャナ筋が生じていない場合、どのラインも、「Wh」や「×」といった仮スキャナ筋判定結果が副走査方向に続いている。 All pixels in the input image are judged to determine whether they are candidate abnormal pixels, resulting in the judgment results shown in Figure 16(c). As shown in Figure 16(c), if no scanner streaks have occurred, the provisional scanner streaks judgment results such as "Wh" or "X" continue in the sub-scanning direction on every line.

図17は、スキャナ筋が生じている場合における、文字領域の仮スキャナ筋判定結果を示す図である。図17(a)は、入力画像中の文字領域を拡大した図であり、図中の升目は画素を示す。領域E140はスキャナ筋検出用マスクを示す。また、領域E142は注目画素を示す。なお、図17(a)のP140のように、クロスハッチングで示した画素は、黒や白とは異なる色(例えば、赤)の画素である。すなわち、入力画像の文字領域内には、P140に示すように、周辺の画素の色とは異なる色の画素が副走査方向に連続して表れており、このような画素により、スキャナ筋が生じている。 Figure 17 shows the results of a provisional scanner line determination for a character region when scanner lines have occurred. Figure 17(a) is an enlarged view of the character region in the input image, with the squares in the figure representing pixels. Area E140 represents the scanner line detection mask. Area E142 represents the pixel of interest. Note that cross-hatched pixels, such as P140 in Figure 17(a), are pixels of a color other than black or white (e.g., red). In other words, within the character region of the input image, as shown in P140, pixels of a color different from the surrounding pixels appear consecutively in the sub-scanning direction, and these pixels cause scanner lines.

図17(b)は、スキャナ筋検出用マスク内の各画素に対するFlgの値を示した図である。図17(b)に示すように、注目画素から主走査方向の順方向に連続する画素と、注目画素から主走査方向の逆方向に連続する画素とにおいて、Flg=1であり、特定色成分が赤成分(R)である画素(Flgの値が「1R」である画素)が存在する。したがって、注目画素の仮スキャナ筋判定結果は「1R」となる。 Figure 17(b) shows the Flg value for each pixel in the scanner line detection mask. As shown in Figure 17(b), among the pixels consecutive from the pixel of interest in the forward main scanning direction and the pixels consecutive from the pixel of interest in the reverse main scanning direction, there are pixels where Flg = 1 and the specific color component is red (R) (pixels with an Flg value of "1R"). Therefore, the provisional scanner line determination result for the pixel of interest is "1R".

入力画像中の全ての画素に対して、異常画素の候補の画素であるか否かが判定されることにより、図17(c)に示す判定結果が得られる。なお、スキャナ筋が生じているラインには、領域E144に示すように、「Wh」や、「1R」といった濃度差がTh1を超える色成分が同一の異常画素の候補の画素である仮スキャナ筋判定結果が、副走査方向に続く。 The determination results shown in Figure 17(c) are obtained by determining whether all pixels in the input image are candidates for abnormal pixels. Note that, in the lines where scanner streaks occur, provisional scanner streak determination results continue in the sub-scanning direction for pixels that are candidates for abnormal pixels and have the same color components, such as "Wh" and "1R," with density differences exceeding Th1, as shown in area E144.

また、図18は、表などの罫線が副走査方向に伸びている場合について示した図であり、図中の升目は画素を示す。図18(a)は、入力画像のうち、罫線L150が副走査方向に伸びている部分を拡大した図である。図18(a)の領域E150はスキャナ筋検出用マスクを示す。また、領域E152は注目画素を示す。ここで、注目画素は、罫線を構成する画素であるとする。 Figure 18 shows the case where ruled lines of a table or the like extend in the sub-scanning direction, with the squares in the figure representing pixels. Figure 18(a) is an enlarged view of a portion of the input image where ruled line L150 extends in the sub-scanning direction. Area E150 in Figure 18(a) represents the scanner line detection mask. Area E152 represents the pixel of interest. Here, the pixel of interest is assumed to be a pixel that makes up the ruled line.

図18(b)は、スキャナ筋検出用マスク内の各画素に対するFlgの値を示した図である。図18(b)に示すように、注目画素は白い画素ではないため、注目画素に対するFlgの値はWhとはならない。また、注目画素の両側には、Flg=1である画素が存在しない。したがって、注目画素の仮スキャナ筋判定結果は「×」となり、異常画素の候補ではないと判定される。これにより、入力画像に含まれる罫線(例えば、カラーライン)は、スキャナ筋により色が抜けた線(いわゆる、抜け線)といった判定にはならない。 Figure 18(b) shows the Flg value for each pixel in the scanner line detection mask. As shown in Figure 18(b), the pixel of interest is not a white pixel, so the Flg value for the pixel of interest is not Wh. Furthermore, there are no pixels on either side of the pixel of interest where Flg = 1. Therefore, the provisional scanner line determination result for the pixel of interest is "X", and it is determined not to be a candidate for an abnormal pixel. As a result, ruled lines (e.g., colored lines) included in the input image are not determined to be lines where the color has been removed by scanner lines (so-called missing lines).

つづいて、図19及び図20を参照して、スキャナ筋補正処理の動作例を説明する。図19は、網点上のスキャナ筋に対する補正の動作例として、図15(c)の領域E128に示したラインを補正する場合について示した図である。ここで、図15(c)の領域E128は、スキャナ筋が生じているラインであると判定されたとする。 Next, an example of the operation of the scanner streak correction process will be described with reference to Figures 19 and 20. Figure 19 shows an example of the operation of correcting scanner streaks on halftone dots, where the line shown in area E128 in Figure 15(c) is corrected. Here, it is assumed that area E128 in Figure 15(c) is determined to be a line where scanner streaks occur.

図19(a)は、スキャナ筋が生じているラインに含まれる異常画素(仮スキャナ筋判定結果が「1R」である画素)に対して文字用のスキャナ筋補正を行った場合を示した図である。文字用のスキャナ筋補正とは、スキャナ筋の画素値をその画素に隣接する画素の画素値で置き換える補正である。ここで、図19(a)の領域E160は、スキャナ筋が生じているラインの領域(異常画素領域)を示す。網点上の異常画素に対して、文字用のスキャナ筋補正がされた場合、補正された異常画素の色と周辺の画素との間では色目は合うものの、網点の周期性にずれが生じることによる見た目のギャップが生じる。 Figure 19(a) shows the result of performing scanner line correction for text on an abnormal pixel (a pixel with a provisional scanner line determination result of "1R") included in a line where a scanner line has occurred. Scanner line correction for text is a correction that replaces the pixel value of the scanner line with the pixel value of the pixel adjacent to that pixel. Here, area E160 in Figure 19(a) indicates the area of the line where a scanner line has occurred (the abnormal pixel area). When scanner line correction for text is performed on an abnormal pixel on a halftone dot, the color of the corrected abnormal pixel matches the color of the surrounding pixels, but a visual gap occurs due to a shift in the periodicity of the halftone dots.

図19(b)は、スキャナ筋が生じているラインに含まれる異常画素に対して網点用のスキャナ筋補正を行った場合を示した図である。網点用のスキャナ筋補正とは、スキャナ筋の画素値をその画素の周辺画素の平均値で置き換える補正である。また、図19(b)の領域E162は、スキャナ筋が生じているラインの領域(異常画素領域)を示す。網点上の異常画素に対して、網点用のスキャナ筋補正がされた場合、補正された異常画素の色と周辺の色のついた画素の色との間の色目が合い、見た目のギャップの発生も抑えられる。 Figure 19(b) shows the result of performing scanner streak correction for halftone dots on an abnormal pixel included in a line where a scanner streak has occurred. Scanner streak correction for halftone dots is a correction that replaces the pixel value of the scanner streak with the average value of the pixels surrounding that pixel. Area E162 in Figure 19(b) indicates the area of the line where the scanner streak has occurred (the abnormal pixel area). When scanner streak correction for halftone dots is performed on an abnormal pixel on a halftone dot, the color of the corrected abnormal pixel matches the color of the surrounding colored pixels, reducing the appearance of a gap in color.

図20は、文字上のスキャナ筋に対する補正の動作例として、図17(c)の領域E144に示したラインを補正する場合について示した図である。ここで、図17(c)の領域E144は、スキャナ筋が生じているラインであると判定されたとする。 Figure 20 shows an example of the operation of correcting scanner streaks on characters, showing the case where the line shown in area E144 in Figure 17(c) is corrected. Here, it is assumed that area E144 in Figure 17(c) is determined to be a line where scanner streaks occur.

図20(a)は、スキャナ筋が生じているラインに含まれる異常画素に対して文字用のスキャナ筋補正を行った場合を示した図である。また、図20(a)の領域E170は、スキャナ筋が生じているラインの領域(異常画素領域)を示す。文字上の異常画素に対して、文字用のスキャナ筋補正がされた場合、異常画素の画素値は周辺の画素(黒や白)と同じ画素値となり、先鋭性が保持される。 Figure 20(a) shows the result of performing scanner line correction for text on abnormal pixels included in a line where scanner lines have occurred. Area E170 in Figure 20(a) indicates the area of the line where scanner lines have occurred (abnormal pixel area). When scanner line correction for text is performed on abnormal pixels on text, the pixel value of the abnormal pixel becomes the same as the pixel value of the surrounding pixels (black or white), and sharpness is maintained.

図20(b)は、スキャナ筋が生じているラインに含まれる異常画素に対して網点用のスキャナ筋補正を行った場合を示した図である。また、図20(b)の領域E172は、スキャナ筋が生じているラインの領域(異常画素領域)を示す。文字上の異常画素に対して、網点用のスキャナ筋補正がされた場合、異常画素の画素値は、周辺の画素の画素値(濃度)が考慮された色に置き換えられるため、補正しきれていない結果となる。 Figure 20(b) shows the result of performing scanner streak correction for halftone dots on abnormal pixels included in a line where scanner streaks have occurred. Area E172 in Figure 20(b) indicates the area of the line where scanner streaks have occurred (abnormal pixel area). When scanner streak correction for halftone dots is performed on abnormal pixels on text, the pixel value of the abnormal pixel is replaced with a color that takes into account the pixel values (density) of the surrounding pixels, resulting in an insufficient correction.

このように、スキャナ筋の画素値は、スキャナ筋周辺の領域分離結果に応じて置き換えられる。これにより、例えば、文字領域のスキャナ筋の補正として、隣接する画素の画素値に置き換えられることにより、先鋭性が保持された補正が実現される。また、万線領域や網点領域のスキャナ筋の補正として、筋周辺の画素の平均値に置き換えられることにより、周辺とギャップを抑えることができる。このようにして、スキャナ筋は適切に補正される。 In this way, the pixel values of the scanner lines are replaced according to the results of separating the area around the scanner lines. This allows, for example, to correct scanner lines in character areas by replacing them with the pixel values of adjacent pixels, thereby achieving correction that maintains sharpness. Also, to correct scanner lines in line or halftone dot areas, they are replaced with the average value of the pixels around the lines, thereby minimizing gaps with the surrounding area. In this way, scanner lines are properly corrected.

なお、上述した説明では、画像形成装置10に入力される原稿のスキャン画像(入力画像)の数が1であるとして説明した。画像形成装置10に入力される原稿が複数である場合は、画像形成装置10は、原稿の全てのスキャン画像(入力画像)に対して、上述した処理を実施する。これにより、画像形成装置10は、入力画像に対する領域分離情報164、仮スキャナ筋判定結果情報166、スキャナ筋判定結果情報168を記憶し、これらの情報に基づき、スキャナ筋を補正すればよい。 In the above explanation, it is assumed that the number of scanned images (input images) of a document input to the image forming device 10 is one. If multiple documents are input to the image forming device 10, the image forming device 10 performs the above-mentioned processing on all scanned images (input images) of the documents. As a result, the image forming device 10 stores region separation information 164, provisional scanner streak determination result information 166, and scanner streak determination result information 168 for the input image, and can correct scanner streaks based on this information.

また、上述した説明では、入力画像の領域を、万線領域、網点領域、文字領域、下地領域に分離し、スキャナ筋の周辺の領域の種類が万線・網点領域であるか文字領域であるかに基づき、スキャナ筋の補正方法を切り替えることとして説明した。しかし、画像形成装置10は、スキャナ筋の周辺の領域の種類が、上述した領域の種類以外の種類の領域である場合であっても、当該領域の種類に応じてスキャナ筋の補正方法を切り替えてもよい。 In the above explanation, the input image is divided into line areas, halftone dot areas, character areas, and background areas, and the method of correcting the scanner streaks is switched based on whether the type of area surrounding the scanner streaks is a line/halftone dot area or a character area. However, even if the type of area surrounding the scanner streaks is an area other than the types of areas described above, the image forming device 10 may switch the method of correcting the scanner streaks depending on the type of area.

また、上述した説明では、図11のステップS184において、制御部100は、領域分離情報164を参照して、スキャナ筋の周辺の画像パターンを特定すると説明した。しかし、制御部100は、領域分離情報164を用いずに、スキャナ筋の周辺の画像パターンを特定してもよい。例えば、制御部100は、パターンマッチングにより画素パターンを特定してもよい。また、制御部100は、スキャナ筋の周辺の画素ブロック(例えば、縦横がそれぞれ20画素の領域)内の画素の明度の周期性に基づき、画素パターンを特定してもよい。なお、制御部100は、領域分離情報164を参照せずにスキャナ筋を補正する場合、図7のステップS102における領域分離処理を省略してもよい。 In the above explanation, it was explained that in step S184 of FIG. 11, the control unit 100 identifies the image pattern around the scanner line by referencing the region separation information 164. However, the control unit 100 may identify the image pattern around the scanner line without using the region separation information 164. For example, the control unit 100 may identify the pixel pattern by pattern matching. Furthermore, the control unit 100 may identify the pixel pattern based on the periodicity of the brightness of pixels within a pixel block around the scanner line (for example, a region of 20 pixels vertically and horizontally). Note that when correcting the scanner line without referencing the region separation information 164, the control unit 100 may omit the region separation process in step S102 of FIG. 7.

このように、本実施形態の画像形成装置によれば、原稿の画像を読み取りながら、リアルタイムにスキャン画像に対するスキャナ筋の検出が可能となる。また、本実施形態の画像形成装置によれば、スキャナ筋の補正を、スキャナ筋の周辺の画像パターン(領域分離結果)に応じて補正する。従来では、スキャナ筋の補正は、スキャナ筋の画素値を、一律に、スキャナ筋の周辺の画素の画素値に置き換えて補正していた。これにより、網点の周期性にずれによるギャップが生じたり、補正しきれていなかったりしていた。しかしながら、本実施形態の画像形成装置によれば、スキャナ筋の画像パターンに応じた補正を行うことにより、これらの問題を解消することができる。 As such, the image forming apparatus of this embodiment makes it possible to detect scanner lines in the scanned image in real time while reading the document image. Furthermore, the image forming apparatus of this embodiment corrects scanner lines according to the image pattern (region separation result) around the scanner lines. Conventionally, scanner lines have been corrected by uniformly replacing the pixel values of the scanner lines with the pixel values of the pixels around the scanner lines. This has resulted in gaps due to shifts in the periodicity of the halftone dots, or in insufficient correction. However, the image forming apparatus of this embodiment can solve these problems by performing correction according to the image pattern of the scanner lines.

[2.第2実施形態]
つづいて第2実施形態について説明する。第2実施形態は第1実施形態における処理に加えて、領域分離結果を補正する処理を実行する実施形態である。本実施形態は、第1実施形態の図11を図21に置き換えたものである。なお、同一の機能部及び処理には同一の符号を付し、説明については省略する。
[2. Second embodiment]
Next, a second embodiment will be described. In the second embodiment, in addition to the processing in the first embodiment, processing for correcting the region separation result is executed. In this embodiment, FIG. 11 of the first embodiment is replaced with FIG. 21. Note that the same functional units and processing are assigned the same reference numerals, and descriptions thereof will be omitted.

本実施形態におけるスキャナ筋補正処理の流れを、図21を参照して説明する。制御部100は、スキャナ筋の周辺の画像パターンが網点領域又は万線領域である場合(ステップS186;Yes)、ステップS188の処理後、画素値を補正した画素に対応する領域分離結果を、網点領域又は万線領域に補正する(ステップS200)。例えば、制御部100は、領域分離情報164に記憶された値のうち、画素値を補正した画素に対応する値を、ステップS184において特定した画像パターンに対応する値に変更する。 The flow of scanner streak correction processing in this embodiment will be described with reference to Figure 21. If the image pattern surrounding the scanner streak is a halftone dot area or a line area (step S186; Yes), the control unit 100 corrects the area separation results corresponding to the pixels whose pixel values have been corrected to a halftone dot area or a line area after processing step S188 (step S200). For example, the control unit 100 changes the values stored in the area separation information 164 that correspond to the pixels whose pixel values have been corrected to values that correspond to the image pattern identified in step S184.

一方、制御部100は、スキャナ筋の周辺の画像パターンが文字領域である場合(ステップS190;Yes)、ステップS192の処理後、画素値を補正した画素に対応する領域分離結果を、文字領域に補正する(ステップS202)。例えば、制御部100は、領域分離情報164のうち、画素値を補正した画素に対応する値を、文字領域に対応する値に変更する。 On the other hand, if the image pattern around the scanner line is a text area (step S190; Yes), after processing step S192, the control unit 100 corrects the region separation results corresponding to the pixels whose pixel values have been corrected to a text area (step S202). For example, the control unit 100 changes the value of the region separation information 164 corresponding to the pixels whose pixel values have been corrected to a value corresponding to a text area.

また、制御部100は、スキャナ筋の周辺の画像パターンが、網点領域や万線領域ではなく、また、文字領域でもない場合、ステップS194の処理を行う(ステップS190;No→ステップS194)。つづいて、制御部100は、画素値を補正した画素に対応する領域分離結果を、ステップS184において特定した画像パターンに対応する値に変更することで、当該画素の領域分離情報を補正する(ステップS204)。 Furthermore, if the image pattern around the scanner line is neither a halftone dot area nor a line area, nor a character area, the control unit 100 performs the process of step S194 (step S190; No → step S194). Next, the control unit 100 corrects the area separation information for the pixel by changing the area separation result corresponding to the pixel whose pixel value has been corrected to a value corresponding to the image pattern identified in step S184 (step S204).

ここで、入力画像に対する領域分離処理は、スキャナ筋補正処理よりも前に実行される。そのため、スキャナ筋の画素に対する領域分離処理の結果が適切ではない場合が考えられる。これに対して、制御部100は、上述した処理を実行することにより、領域分離情報164を補正することができる。 Here, the region separation process for the input image is performed before the scanner line correction process. Therefore, it is possible that the results of the region separation process for the scanner line pixels may not be appropriate. In response to this, the control unit 100 can correct the region separation information 164 by performing the above-mentioned process.

領域分離情報164が補正されることにより、制御部100は、領域分離情報164を使用した画像処理を実行する場合おいて、より適切に画像処理を実行することができる。画像処理としては、例えば、色補正の処理、黒生成UCR(Under Color Removal)処理、フィルタ処理、スクリーン処理等がある。また、網点領域には網点領域用の処理が実行されたり、網点上文字領域には、網点上の文字を強調したりする処理が実行されたりする。制御部100は、補正された領域分離情報164を用いて画像処理を実行することにより、スキャナ筋の影響を抑えることができ、適切な画像処理の結果を得ることができる。 By correcting the region separation information 164, the control unit 100 can more appropriately perform image processing when using the region separation information 164. Examples of image processing include color correction, black generation UCR (Under Color Removal), filter processing, and screen processing. In addition, processing for halftone dot regions is performed on halftone dot regions, and processing to emphasize halftone dot text is performed on halftone dot text regions. By performing image processing using the corrected region separation information 164, the control unit 100 can reduce the effects of scanner streaks and obtain appropriate image processing results.

つづいて、本実施形態の動作例について説明する。図22(a)は、網点のスキャン画像を拡大した図である。なお、スキャン画像にはスキャナ筋が生じていないとする。また、図22(b)は、図22(a)に対する領域分離情報を示した図である。図22(b)において、網点で示した領域は、その領域が網点領域であることを示す。図22(b)に示すように、領域分離情報は、全体が網点領域を示している。 Next, an example of the operation of this embodiment will be described. Figure 22(a) is an enlarged view of a halftone dot scanned image. It is assumed that there are no scanner streaks in the scanned image. Figure 22(b) is a view showing region separation information for Figure 22(a). In Figure 22(b), regions shown with halftone dots indicate that the region is a halftone dot region. As shown in Figure 22(b), the region separation information indicates that the entire region is a halftone dot region.

図23(a)は、網点のスキャン画像を拡大した図である。なお、スキャン画像にスキャナ筋が生じているとする。入力画像には、領域E200に示すように、スキャナ筋が生じている。また、図23(b)は、図23(a)に対する領域分離情報を示した図である。図23(b)において、網点で示した領域は、その領域が網点領域であることを示し、クロスハッチングで示した領域は、その領域が網点上色文字領域であることを示す。図23(b)に示すように、領域分離情報には、網点領域E202及び網点領域E204とは別に、スキャナ筋による「網点上色文字領域」である領域E206が存在する。すなわち、網点領域上に、スキャナ筋による網点上色文字領域がある。 Figure 23(a) is an enlarged view of a halftone dot scanned image. Assume that scanner streaks have appeared in the scanned image. In the input image, scanner streaks have appeared, as shown in area E200. Figure 23(b) is a view showing region separation information for Figure 23(a). In Figure 23(b), regions shown with halftone dots indicate that they are halftone dot regions, and regions shown with cross-hatching indicate that they are halftone color text regions. As shown in Figure 23(b), the region separation information includes area E206, which is a "halftone color text region" caused by scanner streaks, in addition to halftone dot region E202 and halftone dot region E204. In other words, there is a halftone color text region caused by scanner streaks on top of a halftone dot region.

ここで、スキャナ筋補正処理により、図23(c)の領域E208に示すように、スキャナ筋の画素の画素値が補正される。併せて、スキャナ筋が発生していた副走査方向の領域分離結果も補正される。図23(d)は、領域分離結果が補正された後の領域分離情報を示した図である。図23(d)に示すように、領域分離情報は、全体が網点領域を示している。 Here, the scanner streak correction process corrects the pixel values of the scanner streak pixels, as shown in area E208 in Figure 23(c). At the same time, the area separation results in the sub-scanning direction where the scanner streak occurred are also corrected. Figure 23(d) shows the area separation information after the area separation results have been corrected. As shown in Figure 23(d), the area separation information indicates a halftone dot area as a whole.

図24(a)は、文字のスキャン画像を拡大した図である。なお、スキャン画像にはスキャナ筋が生じていないとする。また、図24(b)は、図24(a)に対する領域分離情報を示した図である。図24(b)において、黒で示した領域は、その領域が文字領域であることを示し、白で示した領域は下地領域であることを示す。図24(b)に示すように、領域分離情報は、領域E220、領域E222、領域E224、領域E226が黒文字領域であることを示している。 Figure 24(a) is an enlarged view of a scanned image of text. Note that the scanned image does not have scanner streaks. Figure 24(b) is a view showing region separation information for Figure 24(a). In Figure 24(b), regions shown in black indicate that the region is a text region, and regions shown in white indicate that the region is a background region. As shown in Figure 24(b), the region separation information indicates that regions E220, E222, E224, and E226 are black text regions.

図25(a)は、文字のスキャン画像を拡大した図である。なお、スキャン画像にスキャナ筋が生じているとする。入力画像には、領域E230に示すように、スキャナ筋が生じている。また、図25(b)は、図25(a)に対する領域分離情報を示した図である。図25(b)において、黒で示した領域は、その領域が文字領域であることを示し、白で示した領域は下地領域であることを示し、網点で示した領域は色文字領域であることを示す。図25(b)に示すように、領域分離情報には、例えば、文字領域E232及び文字領域E234とは別に、色文字領域である領域E236が存在する。すなわち、黒文字領域上に、スキャナ筋の影響による色文字領域がある。 Figure 25(a) is an enlarged view of a scanned image of text. Assume that scanner streaks have appeared in the scanned image. In the input image, scanner streaks have appeared, as shown in area E230. Figure 25(b) is a view showing region separation information for Figure 25(a). In Figure 25(b), areas shown in black indicate that the area is a text area, areas shown in white indicate that it is a background area, and areas shown in halftone dots indicate that it is a color text area. As shown in Figure 25(b), the region separation information includes, for example, area E236, which is a color text area, in addition to text area E232 and text area E234. In other words, there is a color text area on top of a black text area due to the influence of scanner streaks.

ここで、スキャナ筋補正処理により、図25(c)の領域E240に示すように、スキャナ筋の画素の画素値が補正される。併せて、スキャナ筋が発生していた副走査方向の領域分離結果も補正される。図25(d)は、領域分離結果が補正された後の領域分離情報を示した図である。図25(d)に示すように、領域分離情報が補正される。例えば、図25(b)において、「色文字領域」であった領域E236は、図25(d)の領域E242に示すように、「黒文字領域」となる。これにより、領域E244に含まれる画素の領域判定結果は、全て「黒文字領域」となる。 Here, the scanner streak correction process corrects the pixel values of the pixels in the scanner streak, as shown in area E240 in Figure 25(c). At the same time, the area separation results in the sub-scanning direction where the scanner streak occurred are also corrected. Figure 25(d) is a diagram showing the area separation information after the area separation results have been corrected. The area separation information is corrected as shown in Figure 25(d). For example, area E236, which was a "color character area" in Figure 25(b), becomes a "black character area," as shown in area E242 in Figure 25(d). As a result, the area determination results for all pixels included in area E244 become "black character area."

このように、本実施形態の画像形成装置は、スキャナ筋を補正するとともに、領域分離結果を補正する。これにより、本実施形態の画像形成装置は、領域分離結果を用いる画像処理を適切に実行することができる。 In this way, the image forming apparatus of this embodiment corrects scanner streaks and also corrects the region separation results. This allows the image forming apparatus of this embodiment to appropriately perform image processing using the region separation results.

[3.第3実施形態]
つづいて第3実施形態について説明する。第3実施形態は第1実施形態における処理に加えて、注目画素と注目画素以外の画素との濃度の変化量を算出し、変化量が2成分だけ所定の閾値を超える画素を検出する処理を実行する実施形態である。
3. Third embodiment
Next, a third embodiment will be described. In addition to the processing in the first embodiment, the third embodiment calculates the amount of change in density between a pixel of interest and pixels other than the pixel of interest, and executes processing to detect pixels where the amount of change exceeds a predetermined threshold value for two components.

本実施形態では、制御部100は、図9に示した第1スキャナ検出処理のステップS140における判定がNoである場合、位置Xの画素の画素値と注目画素の画素値との濃度差において、色成分のうち2成分の濃度差が閾値Th1を超え、残りの色成分の濃度差が閾値Th2未満であるという条件を満たすか否かを判定する。例えば、制御部100は、以下の何れかの条件を満たすか否かを判定する。
(1)|R-R|>Th1かつ|G-G|>Th1かつ|B-B|<Th2
(2)|R-R|>Th1かつ|G-G|<Th2かつ|B-B|>Th1
(3)|R-R|<Th2かつ|G-G|>Th1かつ|B-B|>Th1
In this embodiment, if the determination in step S140 of the first scanner detection process shown in Figure 9 is No, the control unit 100 determines whether the density difference between the pixel value of the pixel at position X and the pixel value of the target pixel satisfies the condition that the density difference of two of the color components exceeds threshold value Th1 and the density difference of the remaining color component is less than threshold value Th2. For example, the control unit 100 determines whether any of the following conditions is satisfied:
(1) |R 0 −R X |>Th1 and |G 0 −G X |>Th1 and |B 0 −B X |<Th2
(2) |R 0 −R X |>Th1 and |G 0 −G X |<Th2 and |B 0 −B X |>Th1
(3) |R 0 −R X |<Th2 and |G 0 −G X |>Th1 and |B 0 −B X |>Th1

例えば、制御部100は、X=-3である場合、制御部100は、以下の何れかの式を満たすか否かを判定する。
(1)|R-R-3|>Th1かつ|G-G-3|>Th1かつ|B-B-3|<Th2
(2)|R-R-3|>Th1かつ|G-G-3|<Th2かつ|B-B-3|>Th1
(3)|R-R-3|<Th2かつ|G-G-3|>Th1かつ|B-B-3|>Th1
For example, when X=−3, the control unit 100 determines whether any of the following formulas is satisfied.
(1) |R 0 -R -3 |>Th1 and |G 0 -G -3 |>Th1 and |B 0 -B -3 |<Th2
(2) |R 0 -R -3 |>Th1 and |G 0 -G -3 |<Th2 and |B 0 -B -3 |>Th1
(3) |R 0 -R -3 |<Th2 and |G 0 -G -3 |>Th1 and |B 0 -B -3 |>Th1

制御部100は、上述の何れかの式を満たした場合、すなわち、2の色成分の値の差分がTh1を超え、残り色成分の値の差分がTh2未満である場合、X=-3の位置の画素に対するFlgの値を1とする。一方、制御部100は、上述の何れの式も満たさない場合、X=-3の位置の画素に対するFlgの値を0とする。 If any of the above formulas is satisfied, i.e., if the difference between the values of two color components exceeds Th1 and the difference between the values of the remaining color components is less than Th2, the control unit 100 sets the Flg value for the pixel at X=-3 to 1. On the other hand, if none of the above formulas is satisfied, the control unit 100 sets the Flg value for the pixel at X=-3 to 0.

なお、制御部100は、Flg=1である場合、閾値Th1を超えた色成分の情報も保持する。例えば、制御部100は、Th1を超えた色成分が赤色と緑色であれば、Flgの値を「1RG」とする。同様にして、制御部100は、Th1を超えた色成分が赤色と青色であれば、Flgの値を「1RB」とし、Th1を超えた色成分が緑色と青色であれば、Flgの値を「1GB」とする。 When Flg = 1, the control unit 100 also stores information about color components that exceed the threshold value Th1. For example, if the color components that exceed Th1 are red and green, the control unit 100 sets the Flg value to "1RG." Similarly, if the color components that exceed Th1 are red and blue, the control unit 100 sets the Flg value to "1RB," and if the color components that exceed Th1 are green and blue, the control unit 100 sets the Flg value to "1GB."

また、制御部100は、注目画素の両側に、Flgの値が「1R」「1G」「1B」「1RG」「1RB」「1GB」である画素が含まれる場合、当該注目画素の仮スキャナ筋判定結果を1として、Flgの値として設定した色成分の情報も併せて保持する。 In addition, if there are pixels on both sides of the pixel of interest with Flg values of "1R", "1G", "1B", "1RG", "1RB", or "1GB", the control unit 100 sets the provisional scanner line determination result for the pixel of interest to 1 and also stores information about the color component set as the Flg value.

また、制御部100は、第2スキャナ筋検出処理においても、仮スキャナ筋の画素における仮スキャナ筋判定結果として「1R」「1G」「1B」「1RG」「1RB」「1GB」の何れかが含まれることを前提とした処理を実行する。例えば、制御部100は、ステップS154において、注目ラインに含まれる画素の仮スキャナ筋判定結果の値として「1R」「1G」「1B」「1RG」「1RB」「1GB」のうち2種類以上が含まれている場合、複数の色成分の仮スキャナ筋判定結果が含まれていると判定する。 In addition, in the second scanner line detection process, the control unit 100 also performs processing on the assumption that the provisional scanner line determination result for a pixel of the provisional scanner line includes any of "1R," "1G," "1B," "1RG," "1RB," or "1GB." For example, in step S154, if the provisional scanner line determination result value for a pixel included in the target line includes two or more of "1R," "1G," "1B," "1RG," "1RB," or "1GB," the control unit 100 determines that the provisional scanner line determination results for multiple color components are included.

このように、本実施形態の画像形成装置によれば、ガラスやミラー上の埃やゴミが比較的大きく、2成分に対して色が抜ける(光を反射してしまう)ことによるスキャナ筋が生じても、補正することが可能となる。 In this way, with the image forming apparatus of this embodiment, even if the dust or dirt on the glass or mirror is relatively large and causes color loss (reflections of light) in two components, resulting in scanner streaks, it is possible to correct this.

[4.変形例]
本発明は上述した各実施の形態に限定されるものではなく、種々の変更が可能である。すなわち、本発明の要旨を逸脱しない範囲内において適宜変更した技術的手段を組み合わせて得られる実施の形態についても本発明の技術的範囲に含まれる。例えば、上述した説明では、本開示の画像処理装置を画像形成装置として実現した場合について説明したが、例えば、本開示を、スキャナ装置などの画像読取装置に適用してもよい。また、本開示に係る画像処理装置がサーバ装置に適当されることにより、画像を補正するサービスとして提供されてもよい。この場合、サーバ装置は、他の装置から画像を取得し、取得した画像に対して第1スキャナ筋検出処理、第2スキャナ筋検出処理及びスキャナ筋補正処理を実行し、補正後の画像を、当該他の装置に送信すればよい。
4. Modifications
The present invention is not limited to the above-described embodiments and various modifications are possible. In other words, embodiments obtained by combining technical means modified appropriately within the scope of the present invention are also within the technical scope of the present invention. For example, while the above description has been given of an image processing device according to the present disclosure implemented as an image forming device, the present disclosure may also be applied to an image reading device such as a scanner. Furthermore, an image processing device according to the present disclosure may be incorporated into a server device to provide an image correction service. In this case, the server device acquires an image from another device, performs a first scanner line detection process, a second scanner line detection process, and a scanner line correction process on the acquired image, and then transmits the corrected image to the other device.

また、上述した実施形態は、説明の都合上、それぞれ別に説明している部分があるが、技術的に可能な範囲で組み合わせて実行してもよいことは勿論である。例えば、第2実施形態と第3実施形態とを組み合わせることで、注目画素と注目画素以外の画素との濃度の変化量が2成分だけ所定の閾値を超える画素を異常画素の候補として検出し、当該異常画素の候補に対する領域分離結果を補正する画像処理装置が実現される。 Furthermore, although the above-mentioned embodiments are described separately in some parts for convenience of explanation, they may of course be combined to the extent technically possible. For example, by combining the second and third embodiments, an image processing device can be realized that detects pixels where the change in density between a pixel of interest and pixels other than the pixel of interest exceeds a predetermined threshold for only two components as candidates for abnormal pixels, and corrects the region separation results for these candidate abnormal pixels.

なお、上述した説明では、異常画素の候補を検出する方法として、注目画素と注目画素の周辺の画素との濃度差を利用する場合を説明したが、注目画素と注目画素の周辺の画素との変化を検出すればよく、他の方法であってもよい。例えば、注目画素と注目画素以外の色相の変化に基づいて検出したり、注目画素と注目画素以外の輝度の変化に基づいて検出したり、注目画素と注目画素以外の領域分離結果の同異に基づいて、注目画素が異常画素の候補であるか否かを判定してもよい。 In the above explanation, the method for detecting candidate abnormal pixels uses the density difference between the pixel of interest and its surrounding pixels. However, other methods are also possible as long as they detect changes between the pixel of interest and its surrounding pixels. For example, detection may be based on changes in hue between the pixel of interest and pixels other than the pixel of interest, or on changes in luminance between the pixel of interest and pixels other than the pixel of interest, or the determination of whether the pixel of interest is a candidate abnormal pixel may be based on similarities or differences between the results of region separation between the pixel of interest and pixels other than the pixel of interest.

また、実施形態において各装置で動作するプログラムは、上述した実施形態の機能を実現するように、CPU等を制御するプログラム(コンピュータを機能させるプログラム)である。そして、これら装置で取り扱われる情報は、その処理時に一時的に一時記憶装置(例えば、RAM)に蓄積され、その後、各種ROM(Read Only Memory)やHDD等の記憶装置に格納され、必要に応じてCPUによって読み出し、修正・書き込みが行なわれる。 In addition, the programs that run on each device in the embodiments are programs that control the CPU and other devices (programs that cause a computer to function) so as to realize the functions of the above-mentioned embodiments. Information handled by these devices is temporarily stored in temporary storage devices (e.g., RAM) during processing, and is then stored in various storage devices such as ROMs (Read Only Memory) and HDDs, from which it is read, modified, and written by the CPU as needed.

ここで、プログラムを格納する記録媒体としては、半導体媒体(例えば、ROMや、不揮発性のメモリカード等)、光記録媒体・光磁気記録媒体(例えば、DVD(Digital Versatile Disc)、MO(Magneto Optical Disc)、MD(Mini Disc)、CD(Compact Disc)、BD (Blu-ray(登録商標) Disk) 等)、磁気記録媒体(例えば、磁気テープ、フレキシブルディスク等)等の何れであってもよい。また、ロードしたプログラムを実行することにより、上述した実施形態の機能が実現されるだけでなく、そのプログラムの指示に基づき、オペレーティングシステムあるいは他のアプリケーションプログラム等と共同して処理することにより、本発明の機能が実現される場合もある。 Here, the recording medium for storing the program may be any of semiconductor media (e.g., ROM, non-volatile memory cards, etc.), optical recording media/magneto-optical recording media (e.g., DVD (Digital Versatile Disc), MO (Magneto Optical Disc), MD (Mini Disc), CD (Compact Disc), BD (Blu-ray (registered trademark) Disc), etc.), and magnetic recording media (e.g., magnetic tape, flexible disks, etc.). Furthermore, not only are the functions of the above-described embodiments realized by executing the loaded program, but the functions of the present invention may also be realized by processing in cooperation with an operating system or other application programs, etc., based on the program's instructions.

また、市場に流通させる場合には、可搬型の記録媒体にプログラムを格納して流通させたり、インターネット等のネットワークを介して接続されたサーバコンピュータに転送したりすることができる。この場合、サーバコンピュータの記憶装置も本発明に含まれるのは勿論である。 Furthermore, when distributing the program on the market, it can be stored on a portable recording medium and distributed, or transferred to a server computer connected via a network such as the Internet. In this case, the storage device of the server computer is of course also included in the present invention.

10 画像形成装置
100 制御部
102 画像処理部
104 領域分離処理部
120 画像入力部
130 画像形成部
140 表示部
150 操作部
160 記憶部
162 パラメータ情報記憶領域
164 領域分離情報
166 仮スキャナ筋判定結果情報
168 スキャナ筋判定結果情報
190 通信部
10 Image forming apparatus 100 Control unit 102 Image processing unit 104 Region separation processing unit 120 Image input unit 130 Image forming unit 140 Display unit 150 Operation unit 160 Storage unit 162 Parameter information storage area 164 Region separation information 166 Provisional scanner line determination result information 168 Scanner line determination result information 190 Communication unit

Claims (10)

画像を取得する取得部と、制御部とを備え、
前記制御部は、
取得部より取得した画像のうち、注目画素が属する主走査方向の複数の画素における画素の変化に基づき、当該注目画素を異常画素の候補として検出し、
前記異常画素の候補として検出された画素が副走査方向において連続性がある場合、前記異常画素の候補として検出された画素を含む副走査方向の領域を異常画素領域として検出し、
前記異常画素領域の検出結果に基づき、前記異常画素を補正し、
副走査方向を長手方向とした画素の列に、前記異常画素の候補として検出された画素が断続的に存在する場合、前記異常画素の候補として検出された画素が副走査方向において連続性があるとして、当該画素の列を異常画素領域として検出する
ことを特徴とする画像処理装置。
An acquisition unit that acquires an image and a control unit are provided,
The control unit
Detecting a pixel of interest as a candidate for an abnormal pixel based on pixel changes in a plurality of pixels in the main scanning direction to which the pixel of interest belongs, from among the image acquired by the acquisition unit;
If the pixels detected as the candidate abnormal pixels have continuity in the sub-scanning direction, a region in the sub-scanning direction including the pixels detected as the candidate abnormal pixels is detected as an abnormal pixel region;
correcting the abnormal pixels based on the detection result of the abnormal pixel region ;
If the pixels detected as candidates for the abnormal pixel are present intermittently in a row of pixels whose longitudinal direction is the sub-scanning direction, the pixels detected as candidates for the abnormal pixel are determined to be continuous in the sub-scanning direction, and the row of pixels is detected as an abnormal pixel region.
1. An image processing device comprising:
前記制御部は、前記副走査方向を長手方向とした画素の列において、前記異常画素の候補として検出された画素が、白の画素を挟みながら並んで存在する場合、前記異常画素の候補として検出された画素が副走査方向において連続性があると判定することを特徴とする請求項に記載の画像処理装置。 2. The image processing device according to claim 1, wherein the control unit determines that the pixels detected as candidates for abnormal pixels are continuous in the sub-scanning direction when the pixels detected as candidates for abnormal pixels are arranged side by side with a white pixel in between in a row of pixels whose longitudinal direction is the sub-scanning direction. 画像を取得する取得部と、制御部とを備え、
前記制御部は、
取得部より取得した画像のうち、注目画素が属する主走査方向の複数の画素における画素の変化に基づき、当該注目画素を異常画素の候補として検出し、
前記異常画素の候補として検出された画素が副走査方向において連続性がある場合、前記異常画素の候補として検出された画素を含む副走査方向の領域を異常画素領域として検出し、
前記異常画素領域の検出結果に基づき、前記異常画素を補正し、
前記複数の画素に含まれる前記注目画素以外の画素毎に、当該注目画素以外の画素と前記注目画素の画素との濃度差を色成分毎に取得し、
前記濃度差が閾値を超える1の前記色成分を、前記注目画素以外の画素の特定色成分とし、
前記複数の画素のうち前記注目画素に対して主走査方向の順方向の位置における前記画素の前記特定色成分と、前記複数の画素のうち前記注目画素に対して主走査方向の逆方向の位置における前記画素の前記特定色成分とが同一である場合、前記注目画素を前記異常画素の候補として検出する
ことを特徴とする像処理装置。
An acquisition unit that acquires an image and a control unit are provided,
The control unit
Detecting a pixel of interest as a candidate for an abnormal pixel based on pixel changes in a plurality of pixels in the main scanning direction to which the pixel of interest belongs, from among the image acquired by the acquisition unit;
If the pixels detected as the candidate abnormal pixels have continuity in the sub-scanning direction, a region in the sub-scanning direction including the pixels detected as the candidate abnormal pixels is detected as an abnormal pixel region;
correcting the abnormal pixels based on the detection result of the abnormal pixel region;
For each pixel other than the pixel of interest included in the plurality of pixels, a density difference between the pixel other than the pixel of interest and the pixel of interest is obtained for each color component;
The color component whose density difference exceeds a threshold is determined as a specific color component of a pixel other than the target pixel,
an image processing device, wherein, when the specific color component of a pixel among the plurality of pixels at a position forward in the main scanning direction relative to the target pixel is the same as the specific color component of a pixel among the plurality of pixels at a position reverse in the main scanning direction relative to the target pixel, the target pixel is detected as a candidate for the abnormal pixel.
前記制御部は、
前記複数の画素のうち前記注目画素に対して主走査方向の順方向の位置における前記画素の前記特定色成分と、前記複数の画素のうち前記注目画素に対して主走査方向の逆方向の位置における前記画素の前記特定色成分とが同一である場合、その同一の特定色成分を前記異常画素の候補として検出された画素に対応する特定色成分とし、
副走査方向の画素列に含まれる前記異常画素の候補として検出された画素に対応する特定色成分が同一ではない場合、当該副走査方向の画素列に含まれる各画素を、前記異常画素の候補から除外することを特徴とする請求項に記載の画像処理装置。
The control unit
if the specific color component of a pixel among the plurality of pixels at a position in the forward direction of the main scanning direction relative to the target pixel is the same as the specific color component of a pixel among the plurality of pixels at a position in the reverse direction of the main scanning direction relative to the target pixel, the specific color component is determined to be the specific color component corresponding to the pixel detected as the candidate for the abnormal pixel,
4. The image processing device according to claim 3, wherein, when the specific color components corresponding to the pixels detected as candidates for the abnormal pixel included in a pixel row in the sub-scanning direction are not the same, each pixel included in the pixel row in the sub-scanning direction is excluded from the candidates for the abnormal pixel.
画像を取得する取得部と、制御部とを備え、
前記制御部は、
取得部より取得した画像のうち、注目画素が属する主走査方向の複数の画素における画素の変化に基づき、当該注目画素を異常画素の候補として検出し、
前記異常画素の候補として検出された画素が副走査方向において連続性がある場合、前記異常画素の候補として検出された画素を含む副走査方向の領域を異常画素領域として検出し、
前記異常画素領域の検出結果に基づき、前記異常画素を補正し、
前記異常画素領域の周辺の領域分離情報に応じて、前記異常画素領域に含まれる画素を置き換える方法を切り替える
ことを特徴とする像処理装置。
An acquisition unit that acquires an image and a control unit are provided,
The control unit
Detecting a pixel of interest as a candidate for an abnormal pixel based on pixel changes in a plurality of pixels in the main scanning direction to which the pixel of interest belongs, from among the image acquired by the acquisition unit;
If the pixels detected as the candidate abnormal pixels have continuity in the sub-scanning direction, a region in the sub-scanning direction including the pixels detected as the candidate abnormal pixels is detected as an abnormal pixel region;
correcting the abnormal pixels based on the detection result of the abnormal pixel region;
A method for replacing pixels included in the abnormal pixel region is switched according to region separation information around the abnormal pixel region.
1. An image processing device comprising:
前記制御部は、
前記異常画素領域の周辺が網点又は万線領域である場合、前記異常画素領域の画素を、前記異常画素領域の周辺の画素の画素値の平均値に基づく画素に置き換え、
前記異常画素領域の周辺が文字領域である場合、前記異常画素領域の画素を、前記異常画素領域に隣接する画素の画素値に基づく画素に置き換える
ことを特徴とする請求項に記載の画像処理装置。
The control unit
If the periphery of the abnormal pixel region is a halftone dot or line region, the pixels of the abnormal pixel region are replaced with pixels based on an average value of pixel values of the pixels surrounding the abnormal pixel region;
The image processing apparatus according to claim 5 , wherein, when the periphery of the abnormal pixel region is a character region, the pixels of the abnormal pixel region are replaced with pixels based on pixel values of pixels adjacent to the abnormal pixel region.
前記制御部は、
前記領域分離情報のうち、置き換えた前記画素に対応する情報を、当該画素の周辺の領域の情報に置き換え、
前記領域分離情報に基づく画像処理を実行する
ことを特徴とする請求項に記載の画像処理装置。
The control unit
replacing information corresponding to the replaced pixel in the region separation information with information on a region surrounding the pixel;
The image processing device according to claim 6 , wherein the image processing is performed based on the area separation information.
前記取得部は、原稿送り装置により搬送された原稿から画像を取得することを特徴とする請求項1からの何れか一項に記載の画像処理装置。 8. The image processing apparatus according to claim 1, wherein the acquisition unit acquires an image from a document conveyed by a document feeder. 画像を取得するステップと、
前記画像のうち、注目画素が属する主走査方向の複数の画素における、画素の変化に基づき、当該注目画素を異常画素の候補として検出するステップと、
前記異常画素の候補として検出された画素が副走査方向において連続性がある場合、前記異常画素の候補として検出された画素を含む副走査方向の領域を異常画素領域として検出するステップと、
前記異常画素領域の検出結果に基づき、前記異常画素を補正するステップと、
副走査方向を長手方向とした画素の列に、前記異常画素の候補として検出された画素が断続的に存在する場合、前記異常画素の候補として検出された画素が副走査方向において連続性があるとして、当該画素の列を異常画素領域として検出するステップと、
を含むことを特徴とする画像処理方法。
acquiring an image;
detecting a pixel of interest as a candidate for an abnormal pixel based on pixel changes among a plurality of pixels in the main scanning direction to which the pixel of interest belongs in the image;
detecting, when the pixels detected as the candidate abnormal pixels have continuity in the sub-scanning direction, a region in the sub-scanning direction including the pixels detected as the candidate abnormal pixels as an abnormal pixel region;
correcting the abnormal pixels based on the detection result of the abnormal pixel region;
a step of detecting, when pixels detected as candidates for abnormal pixels are present intermittently in a pixel row having a sub-scanning direction as its longitudinal direction, determining that the pixels detected as candidates for abnormal pixels are continuous in the sub-scanning direction and detecting the pixel row as an abnormal pixel region;
An image processing method comprising:
コンピュータに、
画像を取得する機能と、
前記画像のうち、注目画素が属する主走査方向の複数の画素における、画素の変化に基づき、当該注目画素を異常画素の候補として検出する機能と、
前記異常画素の候補として検出された画素が副走査方向において連続性がある場合、前記異常画素の候補として検出された画素を含む副走査方向の領域を異常画素領域として検出する機能と、
前記異常画素領域の検出結果に基づき、前記異常画素を補正する機能と、
副走査方向を長手方向とした画素の列に、前記異常画素の候補として検出された画素が断続的に存在する場合、前記異常画素の候補として検出された画素が副走査方向において連続性があるとして、当該画素の列を異常画素領域として検出する機能と、
を実現させることを特徴とするプログラム。
On the computer,
The ability to acquire images;
a function of detecting a pixel of interest as a candidate for an abnormal pixel based on pixel changes in a plurality of pixels in the main scanning direction to which the pixel of interest belongs in the image;
a function of detecting, when the pixels detected as the candidate abnormal pixels have continuity in the sub-scanning direction, a region in the sub-scanning direction including the pixels detected as the candidate abnormal pixels as an abnormal pixel region;
a function of correcting the abnormal pixel based on the detection result of the abnormal pixel region;
a function of detecting, when pixels detected as candidates for abnormal pixels exist intermittently in a pixel row having a sub-scanning direction as its longitudinal direction, the pixels detected as candidates for abnormal pixels as being continuous in the sub-scanning direction, and detecting the pixel row as an abnormal pixel region;
A program characterized by realizing the above.
JP2022017396A 2022-02-07 2022-02-07 Image processing device, image processing method and program Active JP7804476B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022017396A JP7804476B2 (en) 2022-02-07 2022-02-07 Image processing device, image processing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022017396A JP7804476B2 (en) 2022-02-07 2022-02-07 Image processing device, image processing method and program

Publications (2)

Publication Number Publication Date
JP2023114848A JP2023114848A (en) 2023-08-18
JP7804476B2 true JP7804476B2 (en) 2026-01-22

Family

ID=87569587

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022017396A Active JP7804476B2 (en) 2022-02-07 2022-02-07 Image processing device, image processing method and program

Country Status (1)

Country Link
JP (1) JP7804476B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007158782A (en) 2005-12-06 2007-06-21 Fuji Xerox Co Ltd Image processing device and program
JP2011217323A (en) 2010-04-02 2011-10-27 Canon Inc Image reading apparatus, and image reading method
JP2011259008A (en) 2010-06-04 2011-12-22 Ricoh Co Ltd Image reading device, image processing device, image reading method and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007158782A (en) 2005-12-06 2007-06-21 Fuji Xerox Co Ltd Image processing device and program
JP2011217323A (en) 2010-04-02 2011-10-27 Canon Inc Image reading apparatus, and image reading method
JP2011259008A (en) 2010-06-04 2011-12-22 Ricoh Co Ltd Image reading device, image processing device, image reading method and program

Also Published As

Publication number Publication date
JP2023114848A (en) 2023-08-18

Similar Documents

Publication Publication Date Title
JP5311916B2 (en) Imaging device
EP0899685B1 (en) Image processing apparatus for discriminating image field of original document plural times and method therefor
JP4637063B2 (en) Image processing apparatus, image processing method, and program
JP4861967B2 (en) Image processing apparatus, image processing method, image processing program, image forming apparatus, and storage medium
US10115011B2 (en) Document type recognition apparatus, image forming apparatus, document type recognition method, and computer program product
US9773319B2 (en) Image processing apparatus, method, and medium
JP6849320B2 (en) Image reader and image forming device
US7359093B2 (en) Systems and methods for streak detection in image array scanning using overdetermined scanners and column filtering
US8593695B2 (en) Image processing apparatus and non-transitory computer readable recording medium
JP7804476B2 (en) Image processing device, image processing method and program
US8345310B2 (en) Halftone frequency determination method and printing apparatus
US20060152765A1 (en) Image processing apparatus, image forming apparatus, image reading process apparatus, image processing method, image processing program, and computer-readable storage medium
CN101106630B (en) Image processing apparatus and method
US20120170849A1 (en) Image processing apparatus and computer-readable recording medium
JP4787776B2 (en) Image processing apparatus, image forming apparatus including the same, and image processing method
JP2019017099A (en) Image processing device, image processing method, and program
JP7804477B2 (en) Image processing device, control method and program
JP7531374B2 (en) Image processing device, control method and program
JP2023163897A (en) Image processing device, image processing method and program
US10477071B2 (en) Image processing apparatus and image processing method in which color and monochrome images are distinguished
JPS63246076A (en) Filter processing unit
JP3988970B2 (en) Image processing apparatus, image processing method, and storage medium
JP4963559B2 (en) Image processing apparatus, image forming apparatus, image processing method, and program for causing computer to execute the method
US6999632B2 (en) Image processing apparatus, image forming apparatus and image processing method
JP2007104201A (en) Image evaluation apparatus, image evaluation method, and image forming apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240919

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20250627

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20250729

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20250924

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20260109

R150 Certificate of patent or registration of utility model

Ref document number: 7804476

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150