JP4432961B2 - Image processing apparatus and image processing program - Google Patents

Image processing apparatus and image processing program Download PDF

Info

Publication number
JP4432961B2
JP4432961B2 JP2006325044A JP2006325044A JP4432961B2 JP 4432961 B2 JP4432961 B2 JP 4432961B2 JP 2006325044 A JP2006325044 A JP 2006325044A JP 2006325044 A JP2006325044 A JP 2006325044A JP 4432961 B2 JP4432961 B2 JP 4432961B2
Authority
JP
Japan
Prior art keywords
image data
document
image processing
image
predetermined
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006325044A
Other languages
Japanese (ja)
Other versions
JP2008141440A (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.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2006325044A priority Critical patent/JP4432961B2/en
Publication of JP2008141440A publication Critical patent/JP2008141440A/en
Application granted granted Critical
Publication of JP4432961B2 publication Critical patent/JP4432961B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理装置及び画像処理プログラムに関し、特に、画像データに対して画像処理が重複して施されることを禁止し、画像データの品質の低下を防止する画像処理装置および画像処理プログラムを提供することを目的としている。   The present invention relates to an image processing apparatus and an image processing program, and in particular, an image processing apparatus and an image processing program that prohibit image data from being subjected to redundant image processing and prevent deterioration in image data quality. The purpose is to provide.

従来より、原稿に記録された画像を画像データとして読み取った後に、画像の画質を向上させるための各種画像処理を施し、その画像処理が施された画像データに基づいて記録用紙に印刷する画像処理装置が知られている。特許文献1では、まず原稿を画像データとして読み取り、画像データのエッジ量を検出する。読み取られた画像データは、複数のフィルタにそれぞれ入力され、各フィルタからは、各種画像処理が施された画像データが出力される。検出されたエッジ量に基づいて、各フィルタから出力される画像データを合成して新たな画像データを生成し、記録用紙に記録する技術が記載されている。
特開平5−307603(第0007段落など)
Conventionally, after reading an image recorded on a document as image data, various image processing for improving the image quality of the image is performed, and image processing for printing on recording paper based on the image data subjected to the image processing The device is known. In Patent Document 1, first, a document is read as image data, and the edge amount of the image data is detected. The read image data is input to a plurality of filters, and image data subjected to various types of image processing is output from each filter. A technique is described in which, based on the detected edge amount, image data output from each filter is combined to generate new image data and recorded on a recording sheet.
JP-A-5-307603 (paragraph 0007, etc.)

特許文献1に記載の技術に示されるように、記録用紙に記録される画像は、既に各種画像処理が施された画像データに基づいて記録されることが多い。一方、最近の複写装置(複写機能)においても、良好な複写結果を得るために上記と類似したような画像処理を施すことが可能になっている。そのため、既に各種画像処理が施された画像データを記録用紙に記録したものを原稿として、複写装置による複写を行った場合、読み取った画像データは既に画像処理が施されている可能性がある。この場合、画像データに対して重複して同様の画像処理を施すこととなり、返って複写結果として得られる画像の品質が低下するという問題があった。   As shown in the technique described in Patent Document 1, an image recorded on a recording sheet is often recorded based on image data that has already been subjected to various types of image processing. On the other hand, in recent copying apparatuses (copying functions), it is possible to perform image processing similar to the above in order to obtain good copying results. For this reason, when the image data that has already undergone various types of image processing is recorded on a recording sheet as a document and copied by a copying apparatus, the read image data may already have been subjected to image processing. In this case, the same image processing is performed on the image data in a duplicated manner, and there is a problem that the quality of the image obtained as a result of copying is lowered.

本発明は、上述した問題を解決するためになされたものであり、特に、画像データに対して画像処理が重複して施されることを禁止し、画像データの品質の低下を防止する画像処理装置および画像処理プログラムを提供することを目的としている。   The present invention has been made to solve the above-described problems, and in particular, image processing that prohibits image processing from being performed repeatedly on image data and prevents deterioration in the quality of the image data. An object is to provide an apparatus and an image processing program.

上記目的を達成するために、請求項1記載の画像処理装置は、原稿の画像を画像データとして、原稿のページ単位で読み取る読取手段と、その読取手段により読み取られた画像データに対して、重複して施されると画像の品質が低下する所定の画像処理を施す画像処理手段と、前記読取手段により読み取られた画像データが、前記所定の画像処理が施された画像データであるか否かを、原稿のページ単位で判断する判断手段と、その判断手段により、前記画像データが前記所定の画像処理が施された画像データであると判断された場合は、その原稿のページ単位の画像データに対して前記画像処理手段による前記所定の画像処理を禁止し、前記所定の画像処理が施された画像データでないと判断された場合は、前記画像処理手段による前記所定の画像処理をその原稿のページ単位の画像データに対して施すように制御する制御手段と、前記読取手段により読み取られた前記原稿の一面において、前記原稿の一端部と、その原稿の画像記録領域のうち前記原稿の一端部と近接する方の端部との間を余白とした場合に、その余白の幅を検出する検出手段とを備え、前記判断手段は、前記検出手段により検出された前記原稿の異なる複数の端部に対する余白の幅が同一幅を有する場合に、前記所定の画像処理が施された画像データであると判断する。 In order to achieve the above object, an image processing apparatus according to claim 1, wherein the image of the original document as image data, reading means for reading in units of pages of the document, the image data read by the reading means, duplicate And image processing means for performing predetermined image processing that reduces image quality when applied, and whether or not the image data read by the reading means is image data subjected to the predetermined image processing If the determination unit determines that the image data is the image data that has been subjected to the predetermined image processing, the determination unit determines the image data for each page of the document. If the image processing unit prohibits the predetermined image processing and determines that the image data has not been subjected to the predetermined image processing, the image processing unit And control means for controlling image processing of the so performed on the image data of the page unit of the document, in one aspect of the document read by the reading means, one end portion of the document, an image recording area of the document Detecting means for detecting a width of the margin when a margin is provided between one end portion of the document and an adjacent end portion, and the determining means is configured to detect the width detected by the detecting means. When the margins for different edges of the document have the same width, it is determined that the image data has been subjected to the predetermined image processing.

請求項記載の画像処理装置は、請求項1記載の画像処理装置において、前記判断手段は、前記検出手段により検出された前記原稿の異なる複数の端部に対する余白の幅が予め設定されている所定の幅を有する場合に、前記所定の画像処理が施された画像データであると判断する。 The image processing apparatus according to claim 2, wherein, in the image processing apparatus according to claim 1, wherein, prior Symbol judging means, the width of the margins for the plurality of end portions of different the document detected by the detection means is set in advance If it has a predetermined width, it is determined that the image data has been subjected to the predetermined image processing.

請求項記載の画像処理装置は、請求項1又は2に記載の画像処理装置において、前記読取手段は、1ラインの画像データを読み取るラインセンサを前記原稿に対して相対的に所定の一方向へ移動することにより原稿の全画像を読み取る走査手段を備え、前記検出手段は、前記原稿における前記所定の一方向と略直交する方向の両端に位置する余白の幅を検出するものである。 The image processing apparatus according to claim 3, wherein, in the image processing apparatus according to claim 1 or 2, wherein the reading unit relatively predetermined direction a line sensor for reading image data of one line to the original Scanning means for reading the entire image of the original by moving to the detecting means, and the detecting means detects a width of a margin located at both ends of the original in a direction substantially perpendicular to the predetermined one direction.

請求項記載の画像処理装置は、請求項1から3のいずれかに記載の画像処理装置において、前記判断手段は、前記所定の画像処理の一つとして平滑化処理が施されているか否かを判断するものであり、前記制御手段は、前記判断手段により、前記画像データが前記平滑化処理が施された画像データであると判断された場合は、前記画像処理手段による平滑化処理を禁止し、前記画像データが前記平滑化処理が施された画像データでないと判断された場合は、前記画像処理手段による平滑化処理をその画像データに対して施すように制御する。 4. The image processing apparatus described, whether in the image processing apparatus according to any one of claims 1 to 3, wherein the determination means, the smoothing process has been applied as one of the previous SL predetermined image processing And the control means performs the smoothing process by the image processing means when the judgment means determines that the image data is the image data subjected to the smoothing process. If it is determined that the image data is not the image data that has been subjected to the smoothing process, control is performed so that the image data is subjected to the smoothing process by the image processing means.

請求項記載の画像処理装置は、請求項1からのいずれかに記載の画像処理装置において、記録媒体に前記画像データを印刷する記録手段を備え、前記記録手段は、前記制御手段により画像処理が制御された前記画像データを印刷する。 An image processing apparatus according to claim 5 is the image processing apparatus according to any one of claims 1 to 4 , further comprising recording means for printing the image data on a recording medium, wherein the recording means The image data whose processing is controlled is printed.

請求項記載の画像処理プログラムは、読取装置により原稿のページ単位で読み取られた画像データを入力し、その画像データの処理を行うコンピュータにより実行されるものであり、前記入力された画像データに対して、重複して施されると画像の品質が低下する所定の画像処理を施す画像処理ステップと、前記入力された画像データが、前記所定の画像処理が施された画像データであるか否かを、原稿のページ単位で判断する判断ステップと、その判断ステップにより、前記画像データが前記所定の画像処理が施された画像データであると判断された場合は、その原稿のページ単位の画像データに対して前記画像処理ステップによる前記所定の画像処理を禁止し、前記所定の画像処理が施された画像データでないと判断された場合は、前記画像処理ステップによる前記所定の画像処理をその原稿のページ単位の画像データに対して施すように制御する制御ステップと、前記読取装置により読み取られた前記原稿の一面において、前記原稿の一端部と、その原稿の画像記録領域のうち前記原稿の一端部と近接する方の端部との間を余白とした場合に、その余白の幅を検出する検出ステップとを備え、前記判断ステップは、前記検出ステップにより検出された前記原稿の異なる複数の端部に対する余白の幅が同一幅を有する場合に、前記所定の画像処理が施された画像データであると判断する。 An image processing program according to claim 6 is executed by a computer that inputs image data read in units of pages of a document by a reading device and processes the image data. On the other hand, an image processing step for performing predetermined image processing that reduces the image quality when applied repeatedly, and whether or not the input image data is image data that has been subjected to the predetermined image processing. If the image data is determined to be image data that has been subjected to the predetermined image processing by the determination step, the image for each page of the document is determined. If the predetermined image processing in the image processing step is prohibited for the data and it is determined that the data is not image data that has been subjected to the predetermined image processing, And a control step of controlling the predetermined image processing by the image processing steps as performed on the image data of the page unit of the document, in one aspect of the document read by the reading device, one end portion of the document, A detection step for detecting a width of a margin when a margin is provided between one end of the document and an adjacent end portion of the image recording area of the document, and the determination step includes the detection step. When the widths of the margins for different edges of the document detected in the step have the same width, it is determined that the image data has been subjected to the predetermined image processing.

請求項1記載の画像処理装置によれば、読取手段により読み取られた原稿の画像データは、判断手段により所定の画像処理が施されているか否か判断される。判断手段により、所定の画像処理が施された画像データであると判断された場合は、制御手段により画像処理手段による画像処理が禁止され、所定の画像処理が施された画像データでないと判断された場合は、制御手段により画像処理手段による画像処理がその画像データに対して施されるように制御される。   According to the image processing apparatus of the first aspect, it is determined whether or not the image data of the document read by the reading unit is subjected to predetermined image processing by the determination unit. If the determination means determines that the image data has undergone predetermined image processing, the control means prohibits image processing by the image processing means and determines that the image data has not undergone predetermined image processing. In such a case, the control means controls the image data to be subjected to image processing by the image processing means.

つまり、原稿に所定の画像処理が施された画像データに基づく画像が印刷されている場合、その原稿を読み取ることにより得られる画像データは、既に所定の画像処理が施された状態である。その画像データに対して、重複して画像処理を施すと画像データの品質が低下することになる。よって、読取手段により所定の画像処理が施された原稿を読み取った場合には、画像データに所定の画像処理を施すことを禁止することにより、原稿の画像データに対して重複して画像処理が施されることがないので、画像データの品質が低下することを防止できる。また、所定の画像処理が施されていない原稿を読み取った場合には、画像データに対して画像処理が施されるので、画像データの品質を維持することができる。なお、所定の画像処理が施された原稿であると判断された場合であっても、所定の画像処理以外の画像処理を施す必要がある場合には、画像処理を完全に禁止するのではなく、別の画像処理については適宜施される構成であってもよい。   That is, when an image based on image data that has been subjected to predetermined image processing is printed on the document, the image data obtained by reading the document is in a state in which predetermined image processing has already been performed. If the image processing is repeated on the image data, the quality of the image data is degraded. Therefore, when a document subjected to predetermined image processing is read by the reading unit, it is prohibited to perform the predetermined image processing on the image data, so that the image processing of the document is duplicated. Since it is not applied, it is possible to prevent the quality of the image data from deteriorating. Further, when an original that has not been subjected to predetermined image processing is read, image processing is performed on the image data, so that the quality of the image data can be maintained. Even if it is determined that the document has been subjected to predetermined image processing, if it is necessary to perform image processing other than the predetermined image processing, the image processing is not completely prohibited. Another image processing may be appropriately performed.

また、検出手段は、読取手段により読み取られた原稿の一面において、原稿の一端部と、その原稿の画像記録領域のうち原稿の一端部と近接する方の端部との間を余白とした場合に、その余白の幅を検出する。印刷された原稿には、通常、同一幅の余白が複数設けられているので、検出手段によりその余白の幅を検出する。判断手段は、異なる複数の端部に対して余白が同一幅である場合に、所定の画像処理が施された画像データであると判断する。よって、余白の幅を比較するという簡単な処理で所定の画像処理が施された画像データであるか否か判断することができる。 Further, the detection means has a margin on one side of the original read by the reading means between the one end of the original and the end closer to the one end of the original in the image recording area of the original. Then, the width of the margin is detected. Since the printed document is usually provided with a plurality of margins having the same width, the width of the margin is detected by the detecting means. The determination unit determines that the image data has been subjected to predetermined image processing when the margins have the same width for a plurality of different end portions. Therefore, it is possible to determine whether or not the image data has been subjected to predetermined image processing by a simple process of comparing margin widths.

請求項記載の画像処理装置によれば、請求項1記載の画像処理装置の奏する効果に加え、検出手段は、読取手段により読み取られた原稿の一面において、原稿の一端部と、その原稿の画像記録領域のうち原稿の一端部と近接する方の端部との間を余白とした場合に、その余白の幅を検出する。印刷された原稿には、通常、余白が複数設けられており、余白の幅の設定は、使用者や印刷装置により設定されている。そこで、判断手段は、異なる複数の端部に対して余白が所定の幅である場合に、所定の画像処理が施された画像データであると判断する。よって、余白の幅を比較するという簡単な処理で所定の画像処理が施された画像データであるか否か判断することができる。 According to the image processing apparatus according to claim 2, wherein, in addition to the effects of the image processing apparatus according to claim 1, wherein, the detecting means, in one aspect of the document read by the reading means, one end portion of the document, the document In the image recording area, when a margin is set between one end of the document and the adjacent end, the width of the margin is detected. A printed document is usually provided with a plurality of margins, and the margin width is set by a user or a printing apparatus. Therefore, the determination unit determines that the image data has been subjected to predetermined image processing when the margins have a predetermined width for a plurality of different end portions. Therefore, it is possible to determine whether or not the image data has been subjected to predetermined image processing by a simple process of comparing margin widths.

請求項記載の画像処理装置によれば、請求項1又は2に記載の画像処理装置の奏する効果に加え、読取手段は、1ラインの画像データを読み取るラインセンサを原稿に対して相対的に所定の一方向へ移動することにより原稿の全画像を読み取る走査手段を備えている。検出手段は、原稿における所定の一方向と略直交する方向の両端に位置する余白の幅を検出する。よって、原稿とラインセンサとの相対位置を原稿の一端から順次移動していき、原稿に記録された画像の先端、あるいはその近傍の画像を検出したときの原稿両端の余白の長さを検出する。そして、その検出された余白の長さに基づいて、原稿に記録された画像が、所定の画像処理がすでに行われた画像データであるか否かを判定する。従って、原稿全体を読み取らずに、原稿の読み取り開始位置から原稿の画像記録開始位置、あるいはその近傍までを読み取ることで原稿両端の余白の幅を検出でき、所定の画像処理が施された画像データであるか否かを判定できる。また、原稿全体を読み取らずに、所定の画像処理が施された画像データか否かを判断できるため、使用するメモリを削減できると共に、効率よく判断を行うことができる。 According to the image processing apparatus of the third aspect , in addition to the effect produced by the image processing apparatus according to the first or second aspect , the reading unit has a line sensor for reading one line of image data relatively to the document. Scanning means for reading all the images of the document by moving in a predetermined direction is provided. The detecting means detects the widths of the margins positioned at both ends of the document in a direction substantially perpendicular to a predetermined direction. Therefore, the relative position between the document and the line sensor is sequentially moved from one end of the document, and the length of the margin at both ends of the document when the leading edge of the image recorded on the document or an image in the vicinity thereof is detected is detected. . Then, based on the detected margin length, it is determined whether or not the image recorded on the document is image data that has been subjected to predetermined image processing. Therefore, it is possible to detect the margin width at both ends of the original by reading from the original reading start position to the original image recording start position or the vicinity thereof without reading the entire original, and image data subjected to predetermined image processing. It can be determined whether or not. In addition, since it is possible to determine whether or not the image data has been subjected to predetermined image processing without reading the entire document, it is possible to reduce the memory used and to make an efficient determination.

請求項記載の画像処理装置によれば、請求項1から3のいずれかに記載の画像処理装置の奏する効果に加え、判断手段は、所定の画像処理の一つとして平滑化処理が施されているか否かを判断する。判断手段により画像データが平滑化処理が施された画像データであると判断された場合には、制御手段により画像処理手段による平滑化処理が禁止され、画像データが平滑化処理が施された画像データでないと判断された場合には、制御手段により画像処理手段による平滑化処理がその画像データに対して施されるように制御される。 According to the image processing apparatus according to claim 4, in addition to the effects of the image processing apparatus according to any one of claims 1 to 3, determination means, smoothing process facilities as one image processing Jo Tokoro It is judged whether it is done. When the determination means determines that the image data is image data that has undergone smoothing processing, the control means prohibits the smoothing processing by the image processing means, and the image data has undergone smoothing processing. If it is determined that the data is not data, the control means controls the image data to be smoothed by the image processing means.

よって、読取手段により平滑化処理が施された原稿の画像を読み取った場合には、その画像データに対して平滑化処理を施すことを禁止することにより、画像データに対して重複して平滑化処理が施されることがないので、画像データの品質が低下することを防止できる。また、平滑化処理が施されていない原稿を読み取った場合には、画像データに対して平滑化処理が施されるので、画像データの品質を維持することができる。   Therefore, when an image of a document that has been subjected to smoothing processing is read by the reading unit, the image data is subjected to smoothing by prohibiting the smoothing processing from being performed on the image data. Since no processing is performed, it is possible to prevent the quality of the image data from deteriorating. Further, when a document that has not been smoothed is read, the smoothing process is performed on the image data, so that the quality of the image data can be maintained.

請求項記載の画像処理装置によれば、請求項1からのいずれかに記載の画像処理装置の奏する効果に加え、記録媒体に画像データを印刷する記録手段を備えており、記録手段は、制御手段により画像処理が確実に施された画像データを印刷することになるので、一体の装置で品質を維持した原稿の複写を行うことができる。 According to the image processing apparatus of the fifth aspect , in addition to the effect achieved by the image processing apparatus according to any one of the first to fourth aspects, the image processing apparatus includes a recording unit that prints image data on a recording medium. Since the image data on which the image processing has been reliably performed by the control means is printed, it is possible to copy the original while maintaining the quality with an integrated apparatus.

請求項記載の画像処理プログラムによれば、入力された画像データは、判断ステップにより所定の画像処理が施された画像データであるか否か判断される。判断ステップにより、所定の画像処理が施された画像データであると判断された場合は、制御ステップより画像処理ステップによる画像処理が禁止され、所定の画像処理が施された画像データでないと判断された場合は、制御ステップにより画像処理ステップによる画像処理がその画像データに対して施されるように制御される。 According to the image processing program of the sixth aspect, it is determined whether or not the input image data is image data that has been subjected to predetermined image processing in the determination step. If the determination step determines that the image data has undergone predetermined image processing, the control step prohibits image processing by the image processing step and determines that the image data has not undergone predetermined image processing. In such a case, the control step controls the image data to be subjected to the image processing in the image processing step.

よって、本画像処理プログラムをコンピュータ等にインストールして実行することにより、請求項1と同様の効果を得ることができる。   Therefore, by installing the image processing program on a computer or the like and executing it, an effect similar to that of the first aspect can be obtained.

以下、本発明の好ましい第1の実施形態について、添付図面を参照して説明する。図1は、本発明の第1の実施形態における画像読取装置を備えた多機能周辺装置(以下、「MFP(Multi Function Peripheral)もしくは(Multi Function Printer)」と称す)1の外観構成を示す斜視図である。このMFP1は、ファクシミリ機能、プリンタ機能、スキャナ機能、及び、コピー機能などの各種の機能を備えている。   Hereinafter, a preferred first embodiment of the present invention will be described with reference to the accompanying drawings. FIG. 1 is a perspective view showing an external configuration of a multifunction peripheral device (hereinafter, referred to as “MFP (Multi Function Peripheral) or (Multi Function Printer)”) 1 having an image reading device according to the first embodiment of the present invention. FIG. The MFP 1 has various functions such as a facsimile function, a printer function, a scanner function, and a copy function.

図1に示すように、MFP1は、本体下部に設けられたプリンタ2と、その上部に設けられたスキャナ3と、スキャナ3の正面側に設けられた操作パネル4とを主に備えている。プリンタ2は、スキャナ3で読み取られた画像データ或いは外部から入力された画像データに基づいて、選択的にインク滴を吐出することによって、記録用紙上に画像を記録する所謂インクジェット方式の画像記録装置(インクジェットプリンタ)である。   As shown in FIG. 1, the MFP 1 mainly includes a printer 2 provided at the lower part of the main body, a scanner 3 provided at the upper part, and an operation panel 4 provided on the front side of the scanner 3. The printer 2 is a so-called inkjet image recording apparatus that records an image on a recording sheet by selectively ejecting ink droplets based on image data read by the scanner 3 or image data input from the outside. (Inkjet printer).

プリンタ2の正面側には開口5が形成されており、この開口5内に給紙トレイ14及び排紙トレイ15が完全に内包されるように設けられている。給紙トレイ14と排紙トレイ15は上下二段となるように配設されており、上段に排紙トレイ15が設けられ、その下方に給紙トレイ14が設けられている。給紙トレイ14は、略長方形の器状に形成されており、長方形の記録用紙を平面視で縦向きに積載するものである。   An opening 5 is formed on the front side of the printer 2, and the paper feed tray 14 and the paper discharge tray 15 are provided in the opening 5 so as to be completely included. The paper feed tray 14 and the paper discharge tray 15 are arranged in two upper and lower stages, the paper discharge tray 15 is provided in the upper stage, and the paper feed tray 14 is provided in the lower part. The paper feed tray 14 is formed in a substantially rectangular container shape, and stacks rectangular recording papers vertically in a plan view.

プリンタ2には、給紙トレイ14の奥側から上方へ延びた後に正面側へU字状に湾曲して排紙トレイ15に連結される用紙搬送路(図示せず)が設けられている。給紙トレイ14に収容された記録用紙は、その短辺を先頭にして用紙搬送路に送り出され、Uターン搬送されることによって用紙搬送路中に設けられた画像記録位置に案内される。そして、該画像記録位置で、プリンタ2によって画像が記録用紙に記録される。画像記録後の記録用紙は排紙トレイ15に排出される。   The printer 2 is provided with a paper conveyance path (not shown) that extends upward from the back side of the paper feed tray 14 and then curves in a U-shape to the front side and is connected to the paper discharge tray 15. The recording paper stored in the paper feed tray 14 is sent out to the paper conveyance path with the short side at the top, and is guided to the image recording position provided in the paper conveyance path by being U-turned. Then, an image is recorded on the recording paper by the printer 2 at the image recording position. The recording paper after image recording is discharged to the paper discharge tray 15.

MFP1の正面側には、操作パネル4が設けられている。操作パネル4は、プリンタ2やスキャナ3を操作するためのものであり、原稿読み取りボタンなどの各種操作キー40や液晶ディスプレイ(LCD)41とを具備する。ユーザは、操作パネル4を用いて、所望の指令を入力することができる。MFP1に所定の指令が入力されると、その入力された情報に基づいて該MFP1の動作がCPU21(図4参照)により制御される。なお、MFP1は、操作パネル4から入力された指令のほか、コンピュータに接続されて該コンピュータからプリンタドライバやスキャナドライバ等を介して送信される指令に基づいて動作するようにシステム構成されている。   An operation panel 4 is provided on the front side of the MFP 1. The operation panel 4 is for operating the printer 2 and the scanner 3 and includes various operation keys 40 such as a document reading button and a liquid crystal display (LCD) 41. The user can input a desired command using the operation panel 4. When a predetermined command is input to the MFP 1, the operation of the MFP 1 is controlled by the CPU 21 (see FIG. 4) based on the input information. The MFP 1 is configured to operate based on a command input from the operation panel 4 and a command transmitted from the computer via a printer driver, a scanner driver, or the like in addition to the command input from the operation panel 4.

プリンタ2の上記開口5の上側には、接続パネル70が設けられている。この接続パネル70には、その左端側にUSB端子71が配設されている。USB端子71は、外部機器をUSBケーブルを用いて接続することにより該外部機器と本MFP1とを通信可能に接続するコネクタ端子である。また、接続パネル70の右端側にはスロット部72が配設されている。スロット部72はメモリカード(カード型メモリ)を装填可能な複数のカードスロットが設けられており、スキャナ3で読み取った画像データをメモリカードに保存したり、メモリカードに保存した画像データをプリンタ2により印刷することができる。   A connection panel 70 is provided above the opening 5 of the printer 2. The connection panel 70 is provided with a USB terminal 71 on the left end side thereof. The USB terminal 71 is a connector terminal that connects the external device and the MFP 1 so that they can communicate with each other by connecting the external device using a USB cable. A slot portion 72 is disposed on the right end side of the connection panel 70. The slot 72 is provided with a plurality of card slots into which a memory card (card type memory) can be loaded. The image data read by the scanner 3 is stored in the memory card, and the image data stored in the memory card is stored in the printer 2. Can be printed.

スキャナ3は、FBS(Flat Bed Scanner)として機能する原稿読取台6に対して、自動原稿搬送機構(ADF:Auto Document Feeder、以下、「ADF」と称す)7を備えた原稿カバー8が、背面側の蝶番11(図2参照)を介して開閉自在に取り付けられている。ADF7は、原稿トレイ9から原稿排出トレイ10へ原稿搬送路を通じて原稿を搬送するものである。   The scanner 3 has a document cover 8 provided with an automatic document feeder (ADF: Auto Document Feeder, hereinafter referred to as “ADF”) 7 with respect to a document reading table 6 that functions as an FBS (Flat Bed Scanner). It is attached through a hinge 11 on the side (see FIG. 2) so that it can be opened and closed. The ADF 7 transports the document from the document tray 9 to the document discharge tray 10 through the document transport path.

図2は、原稿カバー8が開かれた状態のMFP1の外観を示す斜視図である。図2に示すように、原稿カバー8の裏側には、原稿押さえ19が設けられている。原稿押さえ19は、少なくとも片面が白色に形成された板状の部材であり、白色面が下向きに固定されている。原稿読取台6の上面は大きく開口されており、その開口部にはプラテンガラス12が嵌め込まれている。原稿読取台6の内部には、画像読取ユニット3a(図3参照)が内蔵され、副走査方向(X方向)に往復移動可能に設けられている。この画像読取ユニット3aについて、詳細は後述する。なお、副走査方向と垂直な方向を、主走査方向という。   FIG. 2 is a perspective view showing an appearance of the MFP 1 with the document cover 8 opened. As shown in FIG. 2, a document retainer 19 is provided on the back side of the document cover 8. The document retainer 19 is a plate-like member having at least one surface formed in white, and the white surface is fixed downward. The upper surface of the document reading table 6 is greatly opened, and a platen glass 12 is fitted into the opening. An image reading unit 3a (see FIG. 3) is built in the document reading table 6, and is provided so as to be reciprocally movable in the sub-scanning direction (X direction). Details of the image reading unit 3a will be described later. A direction perpendicular to the sub-scanning direction is referred to as a main scanning direction.

このように構成されたスキャナ3をFBSとして使用する場合は、原稿カバー8を開いてプラテンガラス12上に原稿を載置し、その後、原稿カバー8を閉じて当該原稿を固定する。原稿は、プラテンガラス12と原稿押さえ19との間に挟まれることにより固定される。そして、読取開始指令が入力されると、原稿は、画像読取ユニット3aがプラテンガラス12の裏面に沿って副走査方向に走査することにより、その画像読み取りが行われる。   When the scanner 3 configured as described above is used as an FBS, the document cover 8 is opened and a document is placed on the platen glass 12, and then the document cover 8 is closed and the document is fixed. The document is fixed by being sandwiched between the platen glass 12 and the document holder 19. When a reading start command is input, the document is read by the image reading unit 3a scanning in the sub-scanning direction along the back surface of the platen glass 12.

ADF7を使用し、原稿を自動搬送させて読み取る場合は、ADF7による原稿の搬送過程において、原稿が原稿読取台6上の読取面13を通過し、該読取面13の下方に移動して待機する画像読取ユニット3aによって該原稿の画像が読み取られる。このようなADF7による画像読み取りは、原稿カバー8が原稿読取台6に対して閉じられた状態で行われる。   When the ADF 7 is used and the original is automatically conveyed and read, the original passes through the reading surface 13 on the original reading table 6 in the process of conveying the original by the ADF 7, moves to the lower side of the reading surface 13 and stands by. The image of the original is read by the image reading unit 3a. Such image reading by the ADF 7 is performed in a state where the document cover 8 is closed with respect to the document reading table 6.

次に、図3を参照して、スキャナ3の概略について説明する。図3は、スキャナ3の構成を概略的に表した断面図であり、MFP1を正面視したものである。図3に示すように、原稿読取台6の開口部には、プラテンガラス12が嵌め込まれており、その下方には画像読取ユニット3aが設けられている。   Next, an outline of the scanner 3 will be described with reference to FIG. FIG. 3 is a cross-sectional view schematically showing the configuration of the scanner 3 and is a front view of the MFP 1. As shown in FIG. 3, a platen glass 12 is fitted in the opening of the document reading table 6, and an image reading unit 3a is provided below the platen glass 12.

画像読取ユニット3aは、光を照射する光源(LED)3bと、原稿の読み取り部分に光を収束させるための導光体3cと、原稿から反射された反射光を電荷結合素子(以下、「CCD」と称す)3eに集光させるための導光体3dと、受光した光の強度に応じて電圧を出力するCCD3eとを一ライン分、主走査方向に沿って備え、副走査方向に往復移動可能に設けられている。   The image reading unit 3a includes a light source (LED) 3b for irradiating light, a light guide 3c for converging light on a reading portion of the original, and reflected light reflected from the original as a charge coupled device (hereinafter referred to as “CCD”). The light guide 3d for condensing light on the light 3e and the CCD 3e for outputting a voltage according to the intensity of the received light are provided for one line along the main scanning direction and reciprocally moved in the sub scanning direction. It is provided as possible.

プラテンガラス12の上面に原稿Gを載置して、操作キー40の原稿読み取りボタンが押下されると、画像読取ユニット3aが原稿の読み取り開始位置に搬送され、原稿Gの読み取りが開始される。はじめに、LED3bが点灯され、光が照射される。その光は、導光体3cにより経路が変更され、照射光SとしてCCD3eの上方に向かって照射される。原稿G(プラテンガラス12)の表面で反射された光のうち、CCD3eに向かって反射する反射光Rは、導光体3dにより集光され、CCD3eにより受光される。受光した光の強度に応じてCCD3eから電圧値が出力され、ASIC3fに入力される。CCD3eは、複数の素子が直線上(主走査方向)に配設されたものであり、一の素子が画像データの一ラインの一の画素を形成する。原稿Gが一ライン分読み取られると、画像読取ユニット3aは、次の一ラインを読み取るために副走査方向(図3中矢印X方向)に所定量搬送され、次の一ライン分の読み取りが行われる。この一ライン分の読み取りと所定量の搬送とが繰り返され、原稿Gの全域の読み取りが行われる。尚、搬送される所定量は、読み取りに際して設定される解像度等によって適宜設定される。   When the original G is placed on the upper surface of the platen glass 12 and the original reading button of the operation key 40 is pressed, the image reading unit 3a is conveyed to the original reading start position and reading of the original G is started. First, the LED 3b is turned on and irradiated with light. The path of the light is changed by the light guide 3c, and is irradiated as the irradiation light S toward the upper side of the CCD 3e. Of the light reflected on the surface of the original G (platen glass 12), the reflected light R reflected toward the CCD 3e is collected by the light guide 3d and received by the CCD 3e. A voltage value is output from the CCD 3e according to the intensity of the received light, and input to the ASIC 3f. The CCD 3e has a plurality of elements arranged in a straight line (in the main scanning direction), and one element forms one pixel in one line of image data. When the original G is read for one line, the image reading unit 3a is conveyed by a predetermined amount in the sub-scanning direction (arrow X direction in FIG. 3) in order to read the next line, and the next line is read. Is called. This one-line reading and a predetermined amount of conveyance are repeated, and the entire area of the original G is read. The predetermined amount to be conveyed is set as appropriate according to the resolution set at the time of reading.

ASIC3fは、CCD3eの各素子より入力された電圧値をそれぞれ16ビットの数値データに変換し、その後、各種のデータ補正を行い、画像データとして出力させるために設計された集積回路である。よって、CCD3eの一の素子に対応する画素値は、16ビットの数値で形成される。ASIC3fから出力された画像データは、後述の図4に示すバスライン25を介して、RAM23(図4参照)の画像メモリ23cに書き込まれ、原稿Gの画像が画像データとして記憶される。   The ASIC 3f is an integrated circuit designed to convert the voltage value input from each element of the CCD 3e into 16-bit numerical data, and then perform various data corrections and output the data as image data. Therefore, the pixel value corresponding to one element of the CCD 3e is formed by a 16-bit numerical value. The image data output from the ASIC 3f is written into the image memory 23c of the RAM 23 (see FIG. 4) via a bus line 25 shown in FIG. 4 described later, and the image of the original G is stored as image data.

図4は、MFP1の電気的構成を示したブロック図である。MFP1は、プリンタ2、スキャナ3、CPU21、ROM22、RAM23、ネットワーク・コントロール・ユニット(以下、「NCU」と称す)31、モデム32、操作キー40、LCD41、USB端子71、スロット部72、アンプ73、スピーカ74を主に備え、これらはバスライン25を介してお互いに接続されている。   FIG. 4 is a block diagram showing an electrical configuration of the MFP 1. The MFP 1 includes a printer 2, a scanner 3, a CPU 21, a ROM 22, a RAM 23, a network control unit (hereinafter referred to as “NCU”) 31, a modem 32, an operation key 40, an LCD 41, a USB terminal 71, a slot unit 72, and an amplifier 73. The speaker 74 is mainly provided, and these are connected to each other via the bus line 25.

CPU21は、ROM22やRAM23に記憶される固定値やプログラム或いは、MFP1が備えている各機能の制御や、NCU31を介して送受信される各種信号にしたがって、バスライン25により接続された各部を制御するものである。ROM22は、このMFP1で実行される各種の制御プログラム22aを記憶する書換不能なメモリであり、RAM23は各種のデータを記憶するための書換可能なメモリである。このRAM23には、画像メモリ23aやカウンタ23bなどの各種のメモリが設けられている。画像メモリ23aは、スキャナ3により読み取られた原稿の画像データ等を記憶するメモリである。カウンタ24aについて、詳細は後述するが、画像読取ユニット3aにより読み取られた画像データの中に、平滑化処理された画素がある場合に「1」が加算されるカウンタである。   The CPU 21 controls each unit connected by the bus line 25 according to fixed values and programs stored in the ROM 22 and RAM 23, control of each function provided in the MFP 1, and various signals transmitted / received via the NCU 31. Is. The ROM 22 is a non-rewritable memory for storing various control programs 22a executed by the MFP 1, and the RAM 23 is a rewritable memory for storing various data. The RAM 23 is provided with various memories such as an image memory 23a and a counter 23b. The image memory 23 a is a memory that stores image data of a document read by the scanner 3. Although the details of the counter 24a will be described later, “1” is added when there is a smoothed pixel in the image data read by the image reading unit 3a.

NCU31は電話網(図示しない)に対するダイヤル信号の送出や、電話網からの呼出信号の応答等の動作を行うものである。モデム32は、NCU31を介して、画像データを変調及び復調し、相手ファクシミリ装置(図示しない)へ伝送すると共に、伝送制御用の各種手順信号を送受信するためのものである。USB端子71は、コンピュータとUSBケーブル(図示しない)を介してデータの送受信を行うための既知の回路である。アンプ27は、そのアンプ27に接続されたスピーカ28を鳴動して、呼出音などを出力するためのものである。   The NCU 31 performs operations such as sending a dial signal to a telephone network (not shown) and responding to a calling signal from the telephone network. The modem 32 modulates and demodulates image data via the NCU 31 and transmits it to a partner facsimile machine (not shown), and transmits and receives various procedure signals for transmission control. The USB terminal 71 is a known circuit for transmitting and receiving data via a computer and a USB cable (not shown). The amplifier 27 is used to ring a speaker 28 connected to the amplifier 27 and output a ringing tone or the like.

次に、図5を参照して、スキャナ3により読み取られる原稿と、読み取られた原稿の画像データについて説明する。図5(a)は、スキャナ3と、スキャナ3に載置された原稿とを概略的に表した上面図である。図5(b)は、図5(a)に示すA−A’線における断面図である。図5(c)は、スキャナ3により読み取られた画像データの全体を模式的に表した図である。スキャナ3により原稿が読み取られる場合は、読み取られる原稿の寸法に関わらず、原稿読取ユニット3aにより読み取り可能な領域全てが読み取られる。読み取られた画像データから原稿の領域が検出され、さらに、原稿の領域に含まれる余白の幅が検出される。なお、本実施形態においては、説明を分かりやすくするために、原稿1枚分の画像データが一旦画像メモリ23aに格納される場合を例として説明する。   Next, the document read by the scanner 3 and the image data of the read document will be described with reference to FIG. FIG. 5A is a top view schematically showing the scanner 3 and a document placed on the scanner 3. FIG. 5B is a cross-sectional view taken along line A-A ′ shown in FIG. FIG. 5C is a diagram schematically showing the entire image data read by the scanner 3. When the document is read by the scanner 3, the entire readable area is read by the document reading unit 3 a regardless of the size of the document to be read. A document area is detected from the read image data, and a margin width included in the document area is detected. In the present embodiment, in order to make the explanation easy to understand, a case where image data for one original is temporarily stored in the image memory 23a will be described as an example.

図5(a)は、スキャナ3と、プラテンガラス12に載置された原稿とを概略的に表した上面図である。原稿Gは、本実施形態においては長方形であって、画像記録部Pとその画像記録部Pの周囲を囲む余白とにより形成されている。原稿Gは、読み取り面である画像記録部Pが下面に向けられ、原稿Gの一辺が副走査方向(図中矢印X方向)に平行となるようにプラテンガラス12上に載置されている。原稿カバー8は閉じられており、原稿Gは、プラテンガラス12と原稿押さえ19とに挟まれ固定されている。尚、図5(a)の例では、原稿Gの長手方向の一辺が副走査方向に平行となるように載置された状態を示しているが、原稿のサイズや装置の仕様によっては原稿Gの短手方向の一辺が副走査方向に平行となるように載置されることもある。   FIG. 5A is a top view schematically showing the scanner 3 and the document placed on the platen glass 12. The document G is rectangular in the present embodiment, and is formed by the image recording portion P and a margin surrounding the image recording portion P. The document G is placed on the platen glass 12 so that the image recording portion P as a reading surface is directed to the lower surface, and one side of the document G is parallel to the sub-scanning direction (the arrow X direction in the figure). The document cover 8 is closed, and the document G is fixed between the platen glass 12 and the document presser 19. In the example of FIG. 5A, the original G is placed so that one side in the longitudinal direction is parallel to the sub-scanning direction. However, depending on the size of the original and the specifications of the apparatus, the original G May be placed so that one side in the short direction is parallel to the sub-scanning direction.

この状態で、操作キー40の原稿読み取りボタンが押下されると、原稿Gの読み取りが開始される。画像読取ユニット3aが原稿の読み取り開始位置(X0)に搬送され、原稿Gの読み取りが開始される。まず、画像読取ユニット3aからCCD3eの上部に向かって照射光Sが照射される。この位置においては、CCD3eの上部に原稿が載置されていないため、原稿押さえ19の表面で反射した光が読み取られ、画像データとして画像メモリ23aに記憶される。一ライン分の画像データが読み取られると、原稿読取ユニット3aは、副走査方向に所定量搬送され、次の一ライン分の読み取りが行われる。この読み取りと搬送とが繰り返される。   In this state, when the document reading button of the operation key 40 is pressed, reading of the document G is started. The image reading unit 3a is conveyed to the original reading start position (X0), and reading of the original G is started. First, the irradiation light S is irradiated from the image reading unit 3a toward the upper part of the CCD 3e. At this position, since no document is placed on the CCD 3e, the light reflected by the surface of the document holder 19 is read and stored as image data in the image memory 23a. When the image data for one line is read, the document reading unit 3a is conveyed by a predetermined amount in the sub-scanning direction, and the next one line is read. This reading and conveyance are repeated.

次に、画像読取ユニット3aが、さらに副走査方向に搬送され、原稿Gの副走査方向の両端が読み取られた場合の画像データについて説明する。図5(b)は、図5(a)に示すA−A’線における断面図である。図5(b)に示すように、画像読取ユニット3aは、原稿の読み取り開始位置(X0)から読み取りを開始するが、原稿Gの副走査方向に対して垂直な一端が読み取られる位置(X1)に搬送されると、原稿Gの一端が読み取られ、画像データとして画像メモリ23aに記憶される。このX1の位置では、正面視した照射光Sは、左上方に向かうよう角度が設けられているため、この原稿Gの一端で光の回折が生じて反射光Rが強くなり、図5(c)に示すように原稿押さえ19部分の画像データよりも白い画像データとなる。よって、この色の違いいにより原稿Gの一端に相当する画像データと原稿押さえ19に相当する画像データとの境界を区別することができる。   Next, image data when the image reading unit 3a is further conveyed in the sub scanning direction and both ends of the original G in the sub scanning direction are read will be described. FIG. 5B is a cross-sectional view taken along line A-A ′ shown in FIG. As shown in FIG. 5B, the image reading unit 3a starts reading from the reading start position (X0) of the original, but the position (X1) where one end perpendicular to the sub-scanning direction of the original G is read. , One end of the original G is read and stored as image data in the image memory 23a. At the position of X1, since the irradiation light S viewed from the front is angled so as to be directed to the upper left, the diffraction of light occurs at one end of the original G, and the reflected light R becomes strong, and FIG. ), The image data is whiter than the image data of the document retainer 19 portion. Therefore, the boundary between the image data corresponding to one end of the document G and the image data corresponding to the document presser 19 can be distinguished by the difference in color.

さらに、原稿Gの読み取りと搬送とが繰り返され、画像読取ユニット3aが、原稿Gの副走査方向に対して垂直な他端が読み取られる位置(X2)に搬送され、原稿Gの他端が読み取られる。このX2の位置では、照射光Sに角度が設けられているため、この原稿Gの他端で光の回折が生じて反射光Rが弱くなり、図5(c)に示すように原稿押さえ19部分の画像データよりも黒い画像データとなる。よって、この色の違いにより原稿Gの他端に相当する画像データと原稿押さえ19に相当する画像データとの境界を区別することができる。   Further, reading and conveyance of the original G are repeated, and the image reading unit 3a is conveyed to a position (X2) where the other end perpendicular to the sub-scanning direction of the original G is read, and the other end of the original G is read. It is done. At the position of X2, since the irradiation light S is angled, the diffraction of the light occurs at the other end of the original G, and the reflected light R becomes weak. As shown in FIG. The image data is blacker than the partial image data. Therefore, the boundary between the image data corresponding to the other end of the document G and the image data corresponding to the document retainer 19 can be distinguished by this color difference.

また、図5(a)に示すように、上面視した照射光Sにも、左下方に向かうよう角度が設けられている。よって、副走査方向と平行な原稿Gの両端が読み取られる場合は、副走査方向と垂直な原稿Gの両端を読み取る場合と同様に、原稿Gの端部と原稿押さえ19との境界に白い画像データと黒い画像データとが生じるため、原稿Gの4辺の各端部と原稿押さえ19との境界を確実に区別することができる。   Further, as shown in FIG. 5A, the irradiation light S as viewed from above is also provided with an angle toward the lower left. Therefore, when both ends of the document G parallel to the sub-scanning direction are read, a white image is formed at the boundary between the edge of the document G and the document presser 19 as in the case of reading both ends of the document G perpendicular to the sub-scanning direction. Since data and black image data are generated, the boundary between each edge of the four sides of the document G and the document presser 19 can be reliably distinguished.

ここでは説明を簡単にするために、原稿Gの端を副走査方向に垂直又は平行にプラテンガラス12上に載置した場合について説明したが、原稿Gは、プラテンガラス12に任意の向きに載置した場合でも、原稿Gと原稿押さえ19との境界には、白い画像データ又は黒い画像データ又はその組み合わせが生じる(照射する光の方向と、原稿Gの端とが平行に載置された場合は、原稿Gの端面のばらつきと、光りの方向のばらつきにより、白い画像データと黒い画像データとが混在する場合がある)ため、境界を区別することができる。   Here, in order to simplify the description, the case where the end of the original G is placed on the platen glass 12 perpendicularly or parallel to the sub-scanning direction has been described. However, the original G is placed on the platen glass 12 in an arbitrary direction. Even when the document G is placed, white image data or black image data or a combination thereof is generated at the boundary between the document G and the document presser 19 (when the direction of the irradiated light and the edge of the document G are placed in parallel). In this case, white image data and black image data may be mixed due to variations in the end face of the original G and variations in the direction of light), so that the boundary can be distinguished.

図5(c)は、スキャナ3により読み取られた原稿の画像データの全体を模式的に表した図である。上述したように、原稿の各端部は、白い画像データ又は黒い画像データ又はその組み合わせとして読み取られる。その読み取られた画像データに基づいて、その白い画像データ又は黒い画像データ又はその組み合わせを境界とし、その内側の領域を原稿領域の画像データ(以下、単に「原稿画像データ」と称す)として検出することができる。原稿画像データは、原稿に記録されている画像部分の画像データ(以下、単に「画データ」と称す)とその周囲を囲む余白の画像データ(以下、単に「余白データ」と称す)とにより形成されている。余白データは、略同一の画素値であるので、原稿画像データの外端から中央に向かって画素値を比較することにより、簡単に画データと余白データとを区別することができる。また、原稿画像データの一端から、画データの一端までに垂直に並んでいる余白データの画素数を計測することで、余白の幅を検出することができる。余白の幅は、図5(c)に示すように、B、C、D、Eの4種類を算出することができる。   FIG. 5C is a diagram schematically showing the entire image data of the document read by the scanner 3. As described above, each edge of the document is read as white image data, black image data, or a combination thereof. Based on the read image data, the white image data, black image data, or a combination thereof is used as a boundary, and an inner area is detected as image data of a document area (hereinafter simply referred to as “document image data”). be able to. The document image data is formed by image data of an image portion recorded on the document (hereinafter simply referred to as “image data”) and blank image data surrounding the periphery (hereinafter simply referred to as “margin data”). Has been. Since the margin data has substantially the same pixel value, the image data and the margin data can be easily distinguished by comparing the pixel values from the outer edge of the document image data toward the center. Further, the width of the margin can be detected by measuring the number of pixels of the margin data arranged vertically from one end of the document image data to one end of the image data. As shown in FIG. 5C, four types of margin widths B, C, D, and E can be calculated.

通常、プリンタにより画像を記録用紙に印刷したり、複写機により原稿を複写すると、その印刷された画像の元となる画像データに対しては、プリンタや複写機が備える機能により、平滑化処理やエッジ強調処理などの各種画像処理が施されている。そして、このようなプリンタや複写機により印刷された画像を原稿として再度スキャナなどで読み取り、その画像データを印刷する際には、再度、画像処理が施され、画像データに対して二重に平滑化処理やエッジ強調処理などの画像処理が施されるため、印刷される画像の品質が低下することがある。そこで、本実施形態では、プリンタや複写機などで印刷が行われると、記録用紙の周囲に余白が設けられることを利用するという簡単な方法により、印刷される画像の品質の低下を防ぐことができる。つまり、スキャナにより読み取られた原稿の画像に余白があるか否かを検出し、かつ、その余白の幅が同一である場合は、プリンタや複写機などで印刷され、すでに画像処理が施された画像であるとして、重複して施されると画像の品質が低下する平滑化処理やエッジ強調処理などの画像処理を含まない各種画像処理を施して印刷を行う。一方、余白が無い場合や、余白が検出されても幅が同一でない場合は、画像処理が施されていない原稿(画像)であるとして、読み取った画像データに平滑化処理やエッジ強調処理などの各種画像処理を施して印刷を行う。このような余白は、例えば、写真画像データを印刷した場合に形成されることが多い。   Normally, when an image is printed on a recording sheet by a printer or an original is copied by a copying machine, the image data that is the basis of the printed image is subjected to a smoothing process or the like by a function of the printer or the copying machine. Various image processing such as edge enhancement processing is performed. Then, when an image printed by such a printer or copier is read as a document again by a scanner or the like and the image data is printed, the image processing is performed again, and the image data is doubly smoothed. Since image processing such as image processing and edge enhancement processing is performed, the quality of the printed image may be reduced. Therefore, in this embodiment, when printing is performed by a printer, a copier, or the like, it is possible to prevent the quality of the printed image from being deteriorated by a simple method using a margin provided around the recording paper. it can. In other words, it is detected whether or not there is a margin in the image of the document read by the scanner, and if the margin width is the same, it is printed by a printer or a copier, and image processing has already been performed. Assuming that the image is duplicated, printing is performed by performing various image processing that does not include image processing such as smoothing processing and edge enhancement processing in which the quality of the image is degraded when it is applied in duplicate. On the other hand, if there is no margin, or if the width is not the same even if the margin is detected, it is assumed that the document (image) has not been subjected to image processing, and the read image data is subjected to smoothing processing, edge enhancement processing, etc. Various image processing is performed and printing is performed. Such a margin is often formed, for example, when photographic image data is printed.

次に、図5,図6を参照して、上述した判断方法を利用してMFP1のCPU21により実行される処理について説明する。図6は、操作キー40の原稿読取ボタンが押された場合に実行される処理を示すフローチャートである。原稿読取ユニット3aにより読み取りが行われると、読み取り可能な領域全てが読み取られるが、読み取られた画像データから、原稿画像データのみが画像メモリ23aに記憶されるものとして説明を行う。原稿画像データを区別する際には、上述したように、読み取られた画像データのうち原稿の各端部は、白い画像データ又は黒い画像データ又はその組み合わせとして読み取られ、原稿と原稿押さえ19との境界を検出できることを利用する。また、本処理においては、通常、画像処理として、平滑化処理、エッジ強調処理、及びγ補正処理のほか、良好な印刷結果を得るための各種画像処理が画像データに選択的に対して行われる。   Next, processing executed by the CPU 21 of the MFP 1 using the above-described determination method will be described with reference to FIGS. FIG. 6 is a flowchart showing processing executed when the document reading button of the operation key 40 is pressed. When reading is performed by the document reading unit 3a, the entire readable region is read. However, only the document image data from the read image data is stored in the image memory 23a. When distinguishing the document image data, as described above, each end portion of the document among the read image data is read as white image data, black image data, or a combination thereof, and Take advantage of the ability to detect boundaries. In addition, in this processing, in addition to smoothing processing, edge enhancement processing, and γ correction processing as image processing, various types of image processing for obtaining good print results are usually selectively performed on image data. .

まず、原稿画像データの最初の画データが読み取られるまで、副走査方向(X方向)に1ラインずつ原稿を読み取る(S1)。原稿に余白が存在する場合、図5(a)に示される画像記録部Pを読み取ることにより得られる画データは、余白データとは明らかに画素値が異なるため、容易に画データが読み取られたことが判別できる。そして、最初の画データが読み取られると、画データの両端(図5(a)の例では、原稿Gの短手方向の両端)の余白部分が確定するため、余白幅BとCとを検出し、BとCとが同一幅であるか否かの判定を行う(S2)。つまり、図5(c)に示す余白の幅BとCとが同一幅であるか否かを判定する。余白の幅BとCとが同一幅である場合は(S2:Yes)、平滑化処理、及びエッジ強調処理が施された画像データであると判断し、それ以外の画像処理のみを行うよう設定する(S3)。一方、余白の幅BとCとが同一幅でない場合は(S2:No)、画像処理が施されていない画像データであると判断し、平滑化処理とエッジ強調処理を含む各種画像処理を行うよう設定する(S4)。   First, the original is read line by line in the sub-scanning direction (X direction) until the first image data of the original image data is read (S1). When there is a margin in the document, the image data obtained by reading the image recording portion P shown in FIG. 5A is clearly different in pixel value from the margin data, so the image data was easily read. Can be determined. When the first image data is read, the margin width portions B and C are detected because the margin portions at both ends of the image data (in the example of FIG. 5A, both ends in the short direction of the document G) are determined. Then, it is determined whether B and C have the same width (S2). That is, it is determined whether or not the margin widths B and C shown in FIG. If the margin widths B and C are the same width (S2: Yes), it is determined that the image data has been subjected to smoothing processing and edge enhancement processing, and only other image processing is set. (S3). On the other hand, when the margin widths B and C are not the same width (S2: No), it is determined that the image data has not been subjected to image processing, and various image processing including smoothing processing and edge enhancement processing is performed. (S4).

画像データに対して行う画像処理の種別がS3,S4により設定された後は、1ラインずつ原稿の読み取りを行う(S5)。ある1ラインの原稿画像データに対して画像処理を施すには、例えば、その1ラインの前後に隣接する1ラインの原稿画像データが必要である。よって、原稿画像データは、1ラインずつ読み取るが、画像メモリ23aには、常に連続した3ラインの原稿画像データを記憶する。新しい1ラインの原稿画像データを読み取ると、最も古い1ライン(画像処理済み)の原稿画像データを消去する。   After the type of image processing to be performed on the image data is set in S3 and S4, the original is read line by line (S5). In order to perform image processing on a certain line of document image data, for example, one line of document image data adjacent before and after that one line is required. Therefore, the original image data is read line by line, but the image memory 23a always stores three lines of original image data. When new one-line document image data is read, the oldest one-line (image processed) document image data is erased.

そして、画像メモリ23aに順次記憶される原稿画像データに対して、S3,S4により設定された画像処理を施し(S6)、画像処理が施された原稿画像データをプリンタ2に出力する(S7)。次に、原稿全体を読み取ったか否かを判断し(S8)、原稿全体を読み取った場合は(S8:Yes)、処理を終了する。一方、原稿全体を読み取っていない場合は(S8:No)、S5の処理に戻る。   The document image data sequentially stored in the image memory 23a is subjected to the image processing set in S3 and S4 (S6), and the document image data subjected to the image processing is output to the printer 2 (S7). . Next, it is determined whether or not the entire document has been read (S8). If the entire document has been read (S8: Yes), the process ends. On the other hand, if the entire document has not been read (S8: No), the process returns to S5.

上述したように、第1の実施形態のMFP1では、原稿の余白の幅を比較するという簡単な処理で所定の画像処理が施された画像データであるか否かを判断する。所定の画像処理が施された原稿を読み取った場合には、原稿の画像データに対して所定の画像処理を施すことを禁止し、その他の各種画像処理を施す。これにより、所定の画像処理を重複して施すことにより画像の品質が低下することを防止できる。一方、所定の画像処理が施されていない原稿を読み取った場合には、原稿の画像データに対して所定の画像処理を含む各種画像処理が施されるので、画像データの品質を維持することができる。さらに、図6に示す処理によれば、一度の読み取り走査で、所定の画像処理が施された画像データであるか否かの判断、及び読み取られた画像データに対して適切な画像処理(S3,S4に対応)を行いつつ、プリンタ2への出力を行うことができる。従って、複写処理の全体的な処理時間を短縮することができる。また、原稿全体の画像データを記憶する必要がないので、メモリを効率よく使用することができる。なお、大型のメモリを搭載している装置であれば、原稿全体の画像データを一旦メモリに記憶させ、図5(c)における余白B,C,D,Eの幅をそれぞれ検出し、図6のS2における判断に利用してもよい。例えば、4つの余白すべてが同じ幅の場合に、所定の画像処理が施された画像データと判断するような処理としたり、隣接する余白B,Dが同じ幅の場合に、所定の画像処理が施された画像データと判断するような処理とすることも可能である。   As described above, the MFP 1 according to the first embodiment determines whether or not the image data has been subjected to predetermined image processing by a simple process of comparing the margin widths of the documents. When a document on which predetermined image processing has been performed is read, it is prohibited to perform predetermined image processing on the image data of the document, and various other image processing is performed. Thereby, it can prevent that the quality of an image falls by performing predetermined image processing redundantly. On the other hand, when a document that has not been subjected to predetermined image processing is read, various image processing including predetermined image processing is performed on the image data of the document, so that the quality of the image data can be maintained. it can. Furthermore, according to the processing shown in FIG. 6, it is determined whether or not the image data has been subjected to predetermined image processing in one reading scan, and appropriate image processing (S3) is performed on the read image data. , S4) and output to the printer 2 can be performed. Accordingly, the overall processing time of the copying process can be shortened. In addition, since it is not necessary to store image data of the entire document, the memory can be used efficiently. If the apparatus has a large memory, the image data of the entire document is temporarily stored in the memory, and the widths of the margins B, C, D, and E in FIG. You may use for the judgment in S2. For example, when all four margins have the same width, the image data is determined to be image data that has undergone predetermined image processing. When adjacent margins B and D have the same width, predetermined image processing is performed. It is also possible to perform processing that determines that the image data has been applied.

次に、第2の実施形態であるMFP1について説明する。第2の実施形態であるMFP1の電気的構成は、第1の実施形態であるMFP1の電気的構成と同様であり、その説明を省略する。第1の実施形態では、所定の画像処理が施されているか否かを判定するために、原稿画像データの余白の幅を検出していたが、第2の実施形態では、原稿画像データに平滑化処理が施されているか否かを検出する。   Next, the MFP 1 according to the second embodiment will be described. The electrical configuration of the MFP 1 according to the second embodiment is the same as that of the MFP 1 according to the first embodiment, and a description thereof will be omitted. In the first embodiment, the margin width of the document image data is detected in order to determine whether or not predetermined image processing has been performed. In the second embodiment, the document image data is smoothed. It is detected whether or not the digitizing process has been performed.

第2の実施形態では、操作キー40の原稿読取ボタンが押されると、まず、原稿に対してプレスキャンが実行される。プレスキャンでは、原稿を読み取りながら、読み取られた原稿画像データに平滑化処理が施されているか否かの検出を行い、平滑処理が施されている場合は、平滑処理が施された箇所の数がカウンタにより計数される。   In the second embodiment, when the document reading button of the operation key 40 is pressed, first, a prescan is performed on the document. In pre-scanning, while reading a document, it is detected whether or not the read document image data has been subjected to smoothing processing. If smoothing processing has been performed, the number of portions subjected to smoothing processing is detected. Is counted by the counter.

原稿全体が読み取られると、次に、本スキャンが行われ、再び原稿の画像データが読み取られる。プレスキャンで計数されたカウンタの値が所定の値以上であれば、プリンタや複写機などで印刷された原稿であると判断され、平滑化処理やエッジ強調処理などの画像処理が施されずに印刷が行われる。一方、カウンタの値が所定の数未満であれば、平滑化処理やエッジ強調処理といった所定の画像処理が施されていない原稿であると判断され、平滑化処理やエッジ強調処理などの画像処理が施された上で印刷が行われる。   When the entire original is read, the main scan is performed next, and the image data of the original is read again. If the counter value counted in the prescan is equal to or greater than a predetermined value, it is determined that the document has been printed by a printer or copier, and image processing such as smoothing processing or edge enhancement processing is not performed. Printing is performed. On the other hand, if the value of the counter is less than the predetermined number, it is determined that the document has not been subjected to predetermined image processing such as smoothing processing or edge enhancement processing, and image processing such as smoothing processing or edge enhancement processing is performed. Printing is performed after application.

まず、図7を参照して、平滑化処理が施されている画像データを検出する検出方法の一例について説明する。図7(a),図7(b)は、ある原稿画像データのうち、5行5列の連続した画素の画素値を概略的に示したものである。図7(a)は、平滑化処理前の画像データを示し、図7(b)は平滑化処理後の画像データを示す。平滑化処理が施される対象となる画素を、「着目画素」と称し、着目画素を包囲する複数の画素を「包囲画素」と称す。また、Y行X列の座標位置にある画素を(X,Y)として表す。平滑化処理は、原稿の読み取り時にノイズやゴミの影響を受け、画像がざらつくのを防止するために施される処理である。図7(a)に示す画像データは、(3,3)の画素の画素値(濃度値)が255であり、周囲の画素の画素値100と、大きく離れているため、画像がざらついて見える。   First, an example of a detection method for detecting image data that has been subjected to a smoothing process will be described with reference to FIG. FIGS. 7A and 7B schematically show pixel values of continuous pixels of 5 rows and 5 columns in a certain document image data. FIG. 7A shows image data before the smoothing process, and FIG. 7B shows image data after the smoothing process. A pixel to be smoothed is referred to as a “target pixel”, and a plurality of pixels surrounding the target pixel are referred to as “enclosed pixels”. A pixel at the coordinate position of Y row and X column is represented as (X, Y). The smoothing process is a process performed to prevent the image from being rough due to the influence of noise and dust when the document is read. In the image data shown in FIG. 7A, the pixel value (density value) of the pixel (3, 3) is 255, and is far away from the pixel value 100 of the surrounding pixels, so the image looks rough. .

具体的な平滑化処理の一例について説明する。この例での平滑化処理は、着目画素と包囲画素との9画素の画素値について演算を行う。具体的には、着目画素の画素値に1/2を乗算し、8個の包囲画素の画素値に1/16を乗算し、それらの値を全て加算し、その総和の値が整数となるように小数点以下を四捨五入する。   An example of a specific smoothing process will be described. In the smoothing process in this example, calculation is performed on the pixel values of nine pixels of the target pixel and the surrounding pixels. Specifically, the pixel value of the pixel of interest is multiplied by 1/2, the pixel values of the eight surrounding pixels are multiplied by 1/16, and all of these values are added, and the total value becomes an integer. Round to the nearest decimal place.

例えば、着目画素を座標(2,2)とする場合は、着目画素の画素値は、100、包囲画素である座標(1,1)、(1,2)、(1,3)、(2,1)、(2,3)、(3,1)、(3,2)の画素値は、100、包囲画素である座標(3,3)の画素値は255である。
よって、平滑化処理された値は、
100×1/2+(100×7+255×1)×1/16=110
となる。同様に、座標(2,3)、(2,4)、(3,2)、(3,4)、(4,2)、(4,3)、(4,4)の8画素の平滑化処理された値も100となる。
For example, when the pixel of interest is the coordinates (2, 2), the pixel value of the pixel of interest is 100, and the coordinates (1, 1), (1, 2), (1, 3), (2 , 1), (2, 3), (3, 1), (3, 2) has a pixel value of 100, and the surrounding pixel has a pixel value of 255 (3, 3).
Therefore, the smoothed value is
100 × 1/2 + (100 × 7 + 255 × 1) × 1/16 = 110
It becomes. Similarly, smoothing of 8 pixels of coordinates (2,3), (2,4), (3,2), (3,4), (4,2), (4,3), (4,4) The processed value is also 100.

一方、着目画素を座標(3,3)の画素とした場合は、着目画素の画素値は、255、包囲画素である座標(2,3)、(2,4)、(3,2)、(3,4)、(4,2)、(4,3)、(4,4)の8画素の画素値は、100である。
よって、平滑化処理された値は、
255×1/2+(100×8)×1/16=178
となる。残りの周囲の画素については、包囲画素の画素値が100であるものとし、平滑処理を行っても数値は、変更されないものとし、平滑化処理が施された各座標の画素値が図7(b)に示されている。
On the other hand, when the pixel of interest is a pixel at coordinates (3, 3), the pixel value of the pixel of interest is 255, coordinates (2, 3), (2, 4), (3, 2), which are surrounding pixels, The pixel value of 8 pixels of (3, 4), (4, 2), (4, 3), (4, 4) is 100.
Therefore, the smoothed value is
255 × 1/2 + (100 × 8) × 1/16 = 178
It becomes. For the remaining surrounding pixels, it is assumed that the pixel value of the surrounding pixel is 100, and the numerical value is not changed even if the smoothing process is performed, and the pixel value of each coordinate subjected to the smoothing process is shown in FIG. b).

平滑化処理は、以上述べたようにして行われるので、平滑化が行われたか否かを次のようにして判断することができる。すなわち、図7(b)の座標(3,3)の画素のように、周囲の画素の画素値と比較して、所定の値(例えば、50)以上離れていて、その周囲の画素(包囲画素)の値が略同一である場合は、平滑化処理により値が補正された画素である可能性が高いと判定できる。すなわち、平滑化処理では、周囲の画素値に比べ、大きな差がある画素が、その差が小さくなるように補正され、さらに、その周囲の画素の値も、その周囲の値との差が小さくなるように補正される。   Since the smoothing process is performed as described above, whether or not the smoothing has been performed can be determined as follows. That is, like the pixel at coordinates (3, 3) in FIG. 7B, compared to the pixel value of the surrounding pixels, it is separated by a predetermined value (for example, 50) or more and the surrounding pixels (enclosure In the case where the values of (pixels) are substantially the same, it can be determined that there is a high possibility of the pixels having values corrected by the smoothing process. That is, in the smoothing process, pixels having a large difference compared to the surrounding pixel values are corrected so that the difference becomes small, and further, the values of the surrounding pixels are also small from the surrounding values. It is corrected so that

図7(b)において、着目画素を座標(3,3)の画素とした場合、画素の値が178であり、周囲の画素の画素値が110で略同一である。周囲の画素とは、(2,2)、(2,3)、(2,4)、(3,2)、(3,4)、(4,2)、(4,3)、(4,4)の8画素である。周囲の画素が略同一な画素値であり、さらに周囲の画素である座標(1,1)、(1,2)、(1,3)、(1,4)、(1,5)、(2,1)、(2,5)、(3,1)、(3,5)、(4,1)、(4,5)、(5,1)、(5,2)、(5,3)、(5,4)、(5,5)の16画素の画素値は、100である。   In FIG. 7B, when the pixel of interest is a pixel of coordinates (3, 3), the pixel value is 178 and the surrounding pixel values are 110, which are substantially the same. The surrounding pixels are (2, 2), (2, 3), (2, 4), (3, 2), (3,4), (4, 2), (4, 3), (4 , 4). The surrounding pixels have substantially the same pixel value, and the coordinates (1,1), (1,2), (1,3), (1,4), (1,5), ( 2,1), (2,5), (3,1), (3,5), (4,1), (4,5), (5,1), (5,2), (5, The pixel value of 16 pixels of 3), (5, 4), and (5, 5) is 100.

従って、着目画素を順次スキャンし、その着目画素を包囲する周囲の画素の画素値と比較して、所定の値以上離れていて、その周囲の画素の値が略同一である場合は、平滑化処理により値が補正された画素である可能性が高いと判定できる。この第2の実施形態では、さらに確実に判定を行うために、着目画素の周囲の画素の画素値と、その周囲の画素のさらに周囲の画素の画素値との比較を行っている。この比較により、意図的に部分的に画像処理が施されている場合や、偶然に平滑化処理と同様な特性を有する場合などの誤認識を防止することができ、より確実に、平滑化処理により値が補正された画素であると判定できる。   Therefore, when the pixel of interest is sequentially scanned and compared with the pixel values of surrounding pixels surrounding the pixel of interest, the pixel is separated by a predetermined value or more and the values of the surrounding pixels are approximately the same. It can be determined that there is a high possibility that the pixel has a value corrected by the processing. In the second embodiment, in order to perform the determination more reliably, the pixel values of the pixels around the pixel of interest are compared with the pixel values of the surrounding pixels of the surrounding pixels. By this comparison, it is possible to prevent misrecognition such as a case where the image processing is intentionally partially performed or a case where the image processing accidentally has the same characteristics as the smoothing processing, and the smoothing processing can be performed more reliably. Thus, it can be determined that the pixel has a value corrected.

次に、図8および図9を参照して、第2の実施形態におけるMFP1のCPU21により実行される処理ついて説明する。図8は、操作キー40の原稿読取ボタンが押された場合に実行される処理を示すフローチャートであり、図9は、画像平滑化検出処理を示すフローチャートである。第1の実施形態と同様に、画像メモリ23aには原稿画像データのみが記憶されるものとして説明を行う。   Next, processing executed by the CPU 21 of the MFP 1 in the second embodiment will be described with reference to FIGS. FIG. 8 is a flowchart showing processing executed when the document reading button of the operation key 40 is pressed, and FIG. 9 is a flowchart showing image smoothing detection processing. As in the first embodiment, the description will be made assuming that only the document image data is stored in the image memory 23a.

まず、RAM23のカウンタ23bの値をリセットする(S11)。プレスキャンとして、副走査方向(X方向)に所定のライン数ずつ原稿を読み取る(S12)。プレスキャンでは、画像が平滑化されているか否かを判定するために必要な、原稿画像データを読み取る。本実施形態では、ある1ラインの原稿画像データに対して、平滑化処理が施されているか否かを検出するためには、その1ラインの両側に隣接する2ラインの原稿画像データが必要である。原稿画像データは、1ラインずつ読み取るが、画像メモリ23aには、常に連続した5ラインの原稿画像データを記憶する。新しい1ラインの原稿画像データを読み取ると、最も古い1ライン(画像処理済み)の原稿画像データを消去する。   First, the value of the counter 23b of the RAM 23 is reset (S11). As a pre-scan, the document is read by a predetermined number of lines in the sub-scanning direction (X direction) (S12). In the prescan, document image data necessary for determining whether or not an image is smoothed is read. In the present embodiment, in order to detect whether or not smoothing processing has been performed on one line of document image data, two lines of document image data adjacent to both sides of the one line are necessary. is there. The original image data is read line by line, but the image memory 23a always stores five lines of original image data. When new one-line document image data is read, the oldest one-line (image processed) document image data is erased.

次に、画像メモリ23aに記憶される原稿画像データに対して、画像平滑化検出処理を行う(S13)。図9に示すように、画像平滑化検出処理では、まず、画像メモリ23aに記憶される5ライン分の連続した原稿画像データのうち、中央のラインの画素を対象としてその周囲の画素と比較を行う。その中央のラインにおいて、着目画素が周囲の画素全てと所定の濃度差があるか否か、すなわち画素値に所定以上の差があるかを判定する(S31)。着目画素が周囲の画素全てと所定の濃度差がある場合は(S31:Yes)、着目画素の周囲の画素の濃度が全て略同一であるか否かを判定する(S32)。周囲の画素の濃度(画素値)が全て略同一である場合は(S32:Yes)、周囲の画素の濃度と、周囲の画素のさらに周囲の画素との濃度が異なるか否かを判定する(S33)。着目画素の平滑化処理を検出するだけであれば、S31とS32の処理で十分であるが、このS33の判定を行うことにより、意図的に部分的に画像処理が施されている場合や、偶然に平滑化処理と同様な特性を有する場合などの誤認識を防止することができ、より確実に、平滑化処理により値が補正された画素であると判定できる。周囲の画素の濃度と、周囲の画素のさらに周囲の画素の濃度とが異なる場合は(S33:Yes)、平滑化処理された画素であると判定し、カウンタ23bの値に1を加算する。一方、S31の処理において、ある1画素において、周囲の画素全てと所定の濃度差が無い場合(S31:No)、またS32の処理において、周囲の画素の濃度が全て略同一でない場合(S32:No)、またS33の処理において、周囲の画素の濃度と、周囲の画素のさらに周囲の画素の濃度とが同じ場合(S33:No)は、平滑化処理された画素でないと判定し、処理を終了する。   Next, image smoothing detection processing is performed on the document image data stored in the image memory 23a (S13). As shown in FIG. 9, in the image smoothing detection process, first, among the five lines of continuous document image data stored in the image memory 23a, the pixel on the center line is compared with the surrounding pixels. Do. In the center line, it is determined whether or not the pixel of interest has a predetermined density difference from all surrounding pixels, that is, whether or not the pixel value has a predetermined difference or more (S31). If the target pixel has a predetermined density difference from all surrounding pixels (S31: Yes), it is determined whether or not the density of all the pixels around the target pixel is substantially the same (S32). When the density (pixel value) of the surrounding pixels is almost the same (S32: Yes), it is determined whether or not the density of the surrounding pixels is different from the density of the surrounding pixels (step S32: Yes). S33). If only the smoothing process of the pixel of interest is detected, the processes of S31 and S32 are sufficient. However, by performing the determination of S33, when image processing is intentionally partially performed, It is possible to prevent erroneous recognition such as a case where the same characteristic as that of the smoothing process is accidentally performed, and more reliably determine that the pixel has a value corrected by the smoothing process. When the density of the surrounding pixels is different from the density of the surrounding pixels (S33: Yes), it is determined that the pixel has been smoothed, and 1 is added to the value of the counter 23b. On the other hand, in the process of S31, when there is no predetermined density difference from all the surrounding pixels in a certain pixel (S31: No), and in the process of S32, the density of all the surrounding pixels is not substantially the same (S32: No) In the processing of S33, if the density of the surrounding pixels is the same as the density of the surrounding pixels of the surrounding pixels (S33: No), it is determined that the pixel is not a smoothed pixel, and the processing is performed. finish.

そして、原稿全体が読み取られたか否かを判断し(S14)、原稿全体を読み取った場合は(S14:Yes)、S15の処理へ移る。一方、原稿全体を読み取っていない場合は(S14:No)、S12の処理に戻る。S15の処理では、カウンタ23bの値が、所定の値以上であるか否かを判断する(S15)。カウンタ23bの値が、所定の値以上である場合は(S15:Yes)、平滑化処理、及びエッジ強調処理が施された画像データであると判断し、それ以外の画像処理のみを行うよう設定する(S16)。一方、カウンタの値が所定の値未満の場合は(S15:No)、画像処理が施されていない画像データであると判断し、平滑化処理とエッジ強調処理を含む各種画像処理を行うよう設定する(S17)。次に、本スキャンとして行われるS5〜S8の処理は、図6における処理と同様であるため、説明を省略する。   Then, it is determined whether or not the entire document has been read (S14). If the entire document has been read (S14: Yes), the process proceeds to S15. On the other hand, if the entire original has not been read (S14: No), the process returns to S12. In the process of S15, it is determined whether or not the value of the counter 23b is equal to or greater than a predetermined value (S15). When the value of the counter 23b is equal to or greater than a predetermined value (S15: Yes), it is determined that the image data has been subjected to smoothing processing and edge enhancement processing, and only other image processing is set. (S16). On the other hand, if the value of the counter is less than the predetermined value (S15: No), it is determined that the image data has not been subjected to image processing, and various image processing including smoothing processing and edge enhancement processing are performed. (S17). Next, the processing of S5 to S8 performed as the main scan is the same as the processing in FIG.

上述したように、第2の実施形態のMFP1では、平滑化処理が行われているか否かを画像データの画素値に基づいて具体的に判断するため、意図的に部分的に画像処理が施されている場合や、偶然に平滑化処理と同様な特性を有する場合などの誤認識を防止でき、また、平滑化処理が施されている箇所が所定の値以上の場合に、所定の画像処理が施されていると判断されるので、確実に、平滑化処理が施された画像データを判断することができる。   As described above, in the MFP 1 of the second embodiment, whether or not the smoothing process is performed is specifically determined based on the pixel value of the image data. Error recognition, such as when it has been performed or when it has the same characteristics as the smoothing process, and when the location where the smoothing process is applied exceeds a predetermined value, Therefore, it is possible to reliably determine the image data that has been subjected to the smoothing process.

また、本実施形態では、平滑化処理が施された画像データであると判断された場合、エッジ強調処理についても施されている可能性が高いため、このような画像データに対しては、平滑化処理及びエッジ強調処理を施すことを禁止することにより、原稿の画像データに対して所定の画像処理を施すことを禁止し、その他の各種画像処理を施す。これにより、所定の画像処理を重複して施すことにより画像の品質が低下することを防止できる。一方、所定の画像処理が施されていない原稿を読み取った場合には、原稿の画像データに対して所定の画像処理を含む各種画像処理が施されるので、画像データの品質を維持することができる。   In the present embodiment, when it is determined that the image data has been subjected to smoothing processing, there is a high possibility that edge enhancement processing has also been performed. By prohibiting the image processing and the edge enhancement processing from being performed, it is prohibited to perform predetermined image processing on the image data of the document, and various other image processing is performed. Thereby, it can prevent that the quality of an image falls by performing predetermined image processing redundantly. On the other hand, when a document that has not been subjected to predetermined image processing is read, various image processing including predetermined image processing is performed on the image data of the document, so that the quality of the image data can be maintained. it can.

また、大型のメモリを搭載している装置であれば、第1の実施形態と同様に、原稿全体の画像データを一旦メモリに記憶させ、図9に示される平滑化検出処理をまとめて行い、所定の画像処理が施された画像データであるか否かの判断を行っても良い。このように、原稿全体の画像データを記憶することで、一度の読み取り走査で、平滑化処理が施された画像データであるか否かの判断、及び読み取られた画像データに対して適切な画像処理(S16,S17に対応)を行い、プリンタ2へ出力することができる。従って、複写処理の全体的な処理時間を短縮することができる。 If the apparatus is equipped with a large memory, as in the first embodiment, the image data of the entire document is temporarily stored in the memory, and the smoothing detection process shown in FIG. It may be determined whether or not the image data has been subjected to predetermined image processing. As described above, by storing the image data of the entire document, it is determined whether or not the image data has been subjected to the smoothing process in one reading scan, and an appropriate image for the read image data. Processing (corresponding to S16 and S17) can be performed and output to the printer 2. Accordingly, the overall processing time of the copying process can be shortened.

なお、請求項に記載の画像処理手段は、図6に示すフローチャートのS6の処理が該当し、判断手段は、図6に示すフローチャートのS2の処理が該当し、制御手段は、図6に示すフローチャートのS2,S3,S4の処理が該当し、検出手段は、図6に示すフローチャートのS2の処理が該当する。また、請求項に記載の所定の画像処理は、主に「平滑化処理」、あるいは「エッジ強調処理」が該当する。 The image processing unit according to claims corresponds the processing of S6 in the flowchart shown in FIG. 6, determination means corresponds the processing of the flowchart of S2 shown in FIG. 6, the control means 6 flowchart of S2, S3, S4 processing of the case, the detection means shown, the process of the flowchart of S2 shown in FIG. 6 is Ru said person to. The predetermined image processing described in the claims mainly corresponds to “smoothing processing” or “edge enhancement processing”.

以上、実施形態に基づき本発明を説明したが、本発明は上述した実施形態に何ら限定されるものではなく、本発明の趣旨を逸脱しない範囲内で種々の改良変更が可能であることは容易に推察できるものである。   Although the present invention has been described based on the embodiments, the present invention is not limited to the above-described embodiments, and various improvements and modifications can be easily made without departing from the spirit of the present invention. Can be inferred.

例えば、上記第1の実施形態では、余白の幅を検出することにより、所定の画像処理が既に行われているかを検出し、第2の実施形態では、平滑化検出処理が行われている箇所を検出し、その箇所の数により所定の画像処理が既に行われているかを検出するものとしたが、余白の幅と平滑化処理されている箇所の数との両方の情報に基づいて、所定の画像処理が施されているか否かを判定しても良い。これにより、より正確に画像処理の重複を回避し、画像データの品質の低下を防ぐことができる。   For example, in the first embodiment, it is detected whether the predetermined image processing has already been performed by detecting the width of the margin, and in the second embodiment, the portion where the smoothing detection processing has been performed. , And whether or not the predetermined image processing has already been performed is detected based on the number of the locations. However, based on both information of the margin width and the number of locations subjected to the smoothing processing, the predetermined image processing is performed. It may be determined whether or not the image processing is performed. Thereby, duplication of image processing can be avoided more accurately, and deterioration of the quality of image data can be prevented.

また、第1の実施形態では、複数箇所、例えば、原稿の画像記録部Pを挟んで対向する2箇所の余白の幅が同一であるか否かに基づいて所定の画像処理が施された画像データであるか否かの判断を行ったが、検出された余白の幅が予め設定されている所定の幅である場合に、所定の画像処理が施された画像データであると判断するような方式であってもよい。所定の幅としては、装置がデフォルトとして設定している値や、ユーザが頻繁に使用する値が考えられる。これは、特に、画像データをはじめて記録用紙に印刷した時の装置と、その原稿を複写する装置とが同じ装置であった場合に有効である。即ち、プリント機能により記録用紙に印刷する段階で、画像データに対しては、所定の画像処理が施され、装置に設定されている余白の値に基づいて印刷が行われる。そして、その印刷結果を原稿として、同じ装置の複写機能により複写を行う場合には、上記のような処理により余白の幅が検出されるが、その余白の幅が同装置のプリント機能において設定されている余白の値と同じであれば、所定の画像処理が施されていると判断できる。   Further, in the first embodiment, an image that has been subjected to predetermined image processing based on whether the widths of the margins at a plurality of locations, for example, two locations facing each other across the image recording portion P of the document, are the same. It is determined whether or not the data is data, but if the detected margin width is a predetermined width that is set in advance, it is determined that the image data has been subjected to predetermined image processing. It may be a method. As the predetermined width, a value set as a default by the apparatus or a value frequently used by the user can be considered. This is particularly effective when the apparatus for printing image data on a recording sheet for the first time and the apparatus for copying the document are the same apparatus. That is, at the stage of printing on the recording paper by the print function, predetermined image processing is performed on the image data, and printing is performed based on the margin value set in the apparatus. When the print result is used as a document and the copy function of the same apparatus is used for copying, the margin width is detected by the above-described process, but the margin width is set by the print function of the apparatus. If it is the same as the margin value, it can be determined that predetermined image processing has been performed.

さらに、上記実施形態では、スキャナ3が移動して読み取る場合を主に説明したが、ADFのように原稿が移動する場合においても、同様の処理を適用することができる。   Further, in the above-described embodiment, the case where the scanner 3 moves and reads is mainly described, but the same processing can be applied even when the document moves as in the case of ADF.

また、上記実施形態では、画像データに対して施す画像処理の種類として、「平滑化処理」、及び「エッジ強調処理」を例として説明致したが、画像処理の内容は、取り扱う画像データの状態、形式等により適宜可能である。   In the above embodiment, “smoothing process” and “edge enhancement process” are described as examples of the types of image processing performed on image data. However, the contents of the image processing are the states of the image data to be handled. It is possible depending on the format.

本発明の実施形態における画像処理装置を有する多機能周辺装置の外観を示す斜視図である。1 is a perspective view showing an external appearance of a multifunction peripheral device having an image processing apparatus according to an embodiment of the present invention. 原稿カバーが開かれた状態の多機能周辺装置の外観を示す斜視図である。FIG. 3 is a perspective view showing an external appearance of a multifunction peripheral device in a state where a document cover is opened. スキャナの構成を概略的に表した断面図である。It is sectional drawing which represented the structure of the scanner roughly. 多機能周辺装置の電気的構成を示すブロック図である。It is a block diagram which shows the electric constitution of a multifunction peripheral device. スキャナと、スキャナに載置された原稿とを概略的に表した上面図である。FIG. 3 is a top view schematically illustrating a scanner and a document placed on the scanner. 第1の実施形態における多機能周辺装置により原稿が読み取られる場合の一連のフローチャートである。4 is a series of flowcharts when a document is read by the multifunction peripheral device according to the first embodiment. 平滑化処理を施した画像データと、その元データを示した一例である。It is an example which showed the image data which performed the smoothing process, and its original data. 第2の実施形態における多機能周辺装置により原稿が読み取られる場合の一連のフローチャートである。10 is a series of flowcharts when a document is read by a multifunction peripheral device according to a second embodiment. 画像平滑化検出処理を示すフローチャートである。It is a flowchart which shows an image smoothing detection process.

1 多機能周辺装置(画像処理装置)
2 プリンタ(記録手段)
3 スキャナ(読取手段)
3a 画像読取ユニット(走査手段)
23a 画像メモリ(記憶手段)
23b カウンタ
1 Multifunctional peripheral device (image processing device)
2 Printer (Recording means)
3 Scanner (reading means)
3a Image reading unit (scanning means)
23a Image memory (storage means)
23b counter

Claims (6)

原稿の画像を画像データとして、原稿のページ単位で読み取る読取手段と、
その読取手段により読み取られた画像データに対して、重複して施されると画像の品質が低下する所定の画像処理を施す画像処理手段と、
前記読取手段により読み取られた画像データが、前記所定の画像処理が施された画像データであるか否かを、原稿のページ単位で判断する判断手段と、
その判断手段により、前記画像データが前記所定の画像処理が施された画像データであると判断された場合は、その原稿のページ単位の画像データに対して前記画像処理手段による前記所定の画像処理を禁止し、前記所定の画像処理が施された画像データでないと判断された場合は、前記画像処理手段による前記所定の画像処理をその原稿のページ単位の画像データに対して施すように制御する制御手段と
前記読取手段により読み取られた前記原稿の一面において、前記原稿の一端部と、その原稿の画像記録領域のうち前記原稿の一端部と近接する方の端部との間を余白とした場合に、その余白の幅を検出する検出手段とを備え、
前記判断手段は、前記検出手段により検出された前記原稿の異なる複数の端部に対する余白の幅が同一幅を有する場合に、前記所定の画像処理が施された画像データであると判断することを特徴とする画像処理装置。
Reading means for reading an image of a document as image data in units of pages of the document;
Image processing means for performing predetermined image processing for reducing the quality of the image when it is applied to the image data read by the reading means;
A determination unit that determines whether the image data read by the reading unit is image data on which the predetermined image processing has been performed;
When the determination means determines that the image data is the image data that has been subjected to the predetermined image processing, the predetermined image processing by the image processing means is performed on the image data in page units of the document. When the image data is determined not to have been subjected to the predetermined image processing, control is performed so that the predetermined image processing by the image processing means is performed on the image data in page units of the document. Control means ;
In one surface of the document read by the reading unit, when a space is provided between one end of the document and an end of the image recording area of the document that is closer to one end of the document, Detecting means for detecting the width of the margin,
The determination means determines that the image data has been subjected to the predetermined image processing when the widths of the margins for different edges of the document detected by the detection means have the same width. A featured image processing apparatus.
記判断手段は、前記検出手段により検出された前記原稿の異なる複数の端部に対する余白の幅が予め設定されている所定の幅を有する場合に、前記所定の画像処理が施された画像データであると判断することを特徴とする請求項1記載の画像処理装置。 Before SL determination unit, when having a predetermined width in which the width of the margin for the plurality of end portions of different document that has been detected by said detecting means is preset, the image data to which the predetermined image processing is performed The image processing apparatus according to claim 1, wherein it is determined that 前記読取手段は、1ラインの画像データを読み取るラインセンサを前記原稿に対して相対的に所定の一方向へ移動することにより原稿の全画像を読み取る走査手段を備え、
前記検出手段は、前記原稿における前記所定の一方向と略直交する方向の両端に位置する余白の幅を検出するものであることを特徴とする請求項1又は2に記載の画像処理装置。
The reading unit includes a scanning unit that reads a whole image of a document by moving a line sensor that reads one line of image data in a predetermined direction relative to the document,
The detecting device, an image processing apparatus according to claim 1 or 2, characterized in that for detecting the width of the blank spaces positioned on the predetermined direction and opposite ends substantially perpendicular in the document.
前記判断手段は、前記所定の画像処理の一つとして平滑化処理が施されているか否かを判断するものであり、
前記制御手段は、前記判断手段により、前記画像データが前記平滑化処理が施された画像データであると判断された場合は、前記画像処理手段による平滑化処理を禁止し、前記画像データが前記平滑化処理が施された画像データでないと判断された場合は、前記画像処理手段による平滑化処理をその画像データに対して施すように制御することを特徴とする請求項1から3のいずれかに記載の画像処理装置。
The determining means is for determining whether the smoothing process has been applied as one of the previous SL predetermined image processing,
The control unit prohibits the smoothing process by the image processing unit when the determining unit determines that the image data is the image data subjected to the smoothing process, and the image data is 4. The control according to claim 1, wherein when it is determined that the image data has not been subjected to smoothing processing, control is performed so that the smoothing processing by the image processing means is performed on the image data. 5 . the image processing apparatus according to.
記録媒体に前記画像データを印刷する記録手段を備え、
前記記録手段は、前記制御手段により画像処理が制御された前記画像データを印刷することを特徴とした請求項1からのいずれかに記載の画像処理装置。
A recording means for printing the image data on a recording medium;
Said recording means, an image processing apparatus according to any one of claims 1 to 4 which is characterized by printing the image data which the image processing is controlled by said control means.
読取装置により原稿のページ単位で読み取られた画像データを入力し、その画像データの処理を行うコンピュータにより実行される画像処理プログラムにおいて、
前記入力された画像データに対して、重複して施されると画像の品質が低下する所定の画像処理を施す画像処理ステップと、
前記入力された画像データが、前記所定の画像処理が施された画像データであるか否かを、原稿のページ単位で判断する判断ステップと、
その判断ステップにより、前記画像データが前記所定の画像処理が施された画像データであると判断された場合は、その原稿のページ単位の画像データに対して前記画像処理ステップによる前記所定の画像処理を禁止し、前記所定の画像処理が施された画像データでないと判断された場合は、前記画像処理ステップによる前記所定の画像処理をその原稿のページ単位の画像データに対して施すように制御する制御ステップと
前記読取装置により読み取られた前記原稿の一面において、前記原稿の一端部と、その原稿の画像記録領域のうち前記原稿の一端部と近接する方の端部との間を余白とした場合に、その余白の幅を検出する検出ステップとを備え、
前記判断ステップは、前記検出ステップにより検出された前記原稿の異なる複数の端部に対する余白の幅が同一幅を有する場合に、前記所定の画像処理が施された画像データであると判断することを特徴とする画像処理プログラム。
In an image processing program executed by a computer that inputs image data read in units of pages of a document by a reading device and processes the image data,
An image processing step for performing predetermined image processing for reducing the quality of the image when applied to the input image data; and
A determination step of determining whether or not the input image data is image data on which the predetermined image processing has been performed;
If it is determined by the determination step that the image data is the image data that has been subjected to the predetermined image processing, the predetermined image processing by the image processing step is performed on the image data for each page of the document. When the image data is determined not to have been subjected to the predetermined image processing, control is performed so that the predetermined image processing in the image processing step is performed on the image data in page units of the document. Control steps ;
In one surface of the document read by the reading device, when a margin is formed between one end of the document and an end of the image recording area of the document that is closer to one end of the document, A detection step for detecting the width of the margin,
The determining step determines that the image data has been subjected to the predetermined image processing when the widths of the margins for different end portions of the document detected by the detecting step have the same width. A characteristic image processing program.
JP2006325044A 2006-11-30 2006-11-30 Image processing apparatus and image processing program Expired - Fee Related JP4432961B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006325044A JP4432961B2 (en) 2006-11-30 2006-11-30 Image processing apparatus and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006325044A JP4432961B2 (en) 2006-11-30 2006-11-30 Image processing apparatus and image processing program

Publications (2)

Publication Number Publication Date
JP2008141440A JP2008141440A (en) 2008-06-19
JP4432961B2 true JP4432961B2 (en) 2010-03-17

Family

ID=39602464

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006325044A Expired - Fee Related JP4432961B2 (en) 2006-11-30 2006-11-30 Image processing apparatus and image processing program

Country Status (1)

Country Link
JP (1) JP4432961B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5645519B2 (en) * 2010-07-16 2014-12-24 キヤノン株式会社 Image processing method, image processing apparatus, and program

Also Published As

Publication number Publication date
JP2008141440A (en) 2008-06-19

Similar Documents

Publication Publication Date Title
US7961347B2 (en) Hybrid printer and scan image copying method
US8395807B2 (en) Image processing apparatus and method for borderless printing
JP4552993B2 (en) Image processing apparatus and control program for image processing apparatus
JP2008124788A (en) Image reader
US20090009828A1 (en) Original reading device and image forming apparatus
US8159690B2 (en) Image processing apparatus and control program for image processing apparatus
US20130141742A1 (en) Image forming apparatus, image forming method and recording medium
JP4797959B2 (en) Image reading device
JP4432961B2 (en) Image processing apparatus and image processing program
US20070064256A1 (en) Image forming apparatus
JP6561732B2 (en) Reader and program
US20230145962A1 (en) Image reading apparatus and control method for image reading
JP4479731B2 (en) Image reading apparatus and image reading processing program
JP7383936B2 (en) Image reading device and image forming device
JP5077383B2 (en) Image reading device
JP4306758B2 (en) Copying apparatus and density adjustment program
JP4056461B2 (en) Image processing apparatus, image processing method, and image processing program
JP2008141384A (en) Image processor and image processing program
JP6081874B2 (en) Image reading device
KR20060118255A (en) Image reading apparatus and method for revision of book-scan image use the same
JP2010245688A (en) Document reader
JP2017092778A (en) Image reader, copying device, and reading method therefor
JP2009296543A (en) Image processing apparatus, coefficient calculation method in image processing apparatus, and coefficient calculation program
JP2016103726A (en) Reading device and recording medium
JP2007014038A (en) Image processing apparatus and method, and image forming apparatus and method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090421

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090622

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090825

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091023

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091214

R150 Certificate of patent or registration of utility model

Ref document number: 4432961

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130108

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140108

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees