JP2014239367A - Image processor, image processing method, and program - Google Patents

Image processor, image processing method, and program Download PDF

Info

Publication number
JP2014239367A
JP2014239367A JP2013121495A JP2013121495A JP2014239367A JP 2014239367 A JP2014239367 A JP 2014239367A JP 2013121495 A JP2013121495 A JP 2013121495A JP 2013121495 A JP2013121495 A JP 2013121495A JP 2014239367 A JP2014239367 A JP 2014239367A
Authority
JP
Japan
Prior art keywords
document
image data
page
area
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2013121495A
Other languages
Japanese (ja)
Inventor
市橋 幸親
Yukichika Ichihashi
幸親 市橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2013121495A priority Critical patent/JP2014239367A/en
Publication of JP2014239367A publication Critical patent/JP2014239367A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To solve the problem that it is difficult to detect an original sheet area after the second page and automatically decide the order of pages when stapled double-side original sheets are photographed with a camera, computerized, and printed.SOLUTION: An image processor comprises: staple position decision means for deciding the position of a staple in image data obtained by photographing a plurality of original sheets stapled; original sheet area detection means for detecting an original sheet area for at least one page in the image data; and control means for, when the original sheet areas for a plurality of pages are detected by the original sheet area detection means, determining the order of pages for the original sheet areas for the plurality of pages on the basis of the staple position decided by the staple position determination means.

Description

本発明は、撮影機能を持った携帯端末と画像処理装置および方法に関するものである。   The present invention relates to a portable terminal having an imaging function, an image processing apparatus, and a method.

デジタルカメラ技術の進化によって、携帯電話など携帯端末を利用して、原稿を撮影して原稿画像を得る事が一般的になって来ている。また、近年では携帯端末がインターネット環境を利用できる様になった。これにより、撮影された原稿画像をネットワーク経由で印刷装置に送信して、簡易な操作で印刷する事ができる様になってきた。つまり、携帯端末と印刷環境があれば、簡易なデジタル複合機として利用できるようになった。但し、携帯端末で撮影した原稿画像をそのまま印刷した場合、撮影時に発生する原稿画像の傾きや歪みなど、様々な課題がある。よって、原稿画像に対して様々な画像処理を実施してから利用する事が一般的である。   Due to the advancement of digital camera technology, it has become common to take a document and obtain a document image using a portable terminal such as a mobile phone. In recent years, portable terminals can use the Internet environment. As a result, a photographed original image can be transmitted to a printing apparatus via a network and printed by a simple operation. In other words, if you have a portable terminal and a printing environment, you can use it as a simple digital multifunction device. However, when an original image taken with a mobile terminal is printed as it is, there are various problems such as inclination and distortion of the original image that occurs during shooting. Therefore, it is general to use after performing various image processing on the document image.

例えば、特許文献1では、原稿の端部にマークを設ける事で、撮影時の原稿画像の歪みと傾きを特定し、座標変換によって補正する。更に、特許文献2では、原稿の矩形のエッジ情報等から原稿領域を推定する。そして、原稿領域の歪みや傾きを検知して、座標変換によって撮影時に発生した原稿画像の歪みを補正する。これらは、一般的にはスキャナアプリと呼ばれている。これらの技術は、前述したように、原稿画像中の原稿エッジや原稿のマークを検知する事で原稿領域を特定し、カメラの自動撮影を可能にする技術である。   For example, in Patent Document 1, by providing a mark at the edge of an original, distortion and inclination of the original image at the time of shooting are specified and corrected by coordinate conversion. Further, in Patent Document 2, the document area is estimated from the edge information of the rectangle of the document. Then, distortion and inclination of the document area are detected, and distortion of the document image generated at the time of shooting is corrected by coordinate conversion. These are generally called scanner apps. As described above, these techniques are techniques for specifying a document area by detecting a document edge or a document mark in a document image and enabling automatic camera photographing.

特開2012−68746JP2012-68746 特開2011−55467JP2011-55467A

しかしながら、特許文献1や特許文献2を用いた技術では、ステープルで綴じられた両面原稿を連続的に読み込む際、開いたページを効率的に読み込めない課題を残している。例えば、図8(a)は左上をステープルで綴じられた原稿の1ページ目である。図8(b)は図8(a)の原稿の2ページ目と3ページ目を開いた状態である。この場合、1ページ目は1枚の原稿画像であるが、2ページ目以降は1ページ目の裏が2ページ目となる為、2枚の原稿画像を同時に撮影できる。   However, the techniques using Patent Document 1 and Patent Document 2 still have a problem that an opened page cannot be efficiently read when double-sided originals bound with staples are continuously read. For example, FIG. 8A shows the first page of a document with the upper left bound with staples. FIG. 8B shows a state in which the second and third pages of the original in FIG. 8A are opened. In this case, the first page is one original image, but since the back of the first page is the second page after the second page, two original images can be photographed simultaneously.

この時、従来技術を用いて原稿領域検知と自動撮影をした場合、図8(a)は1領域分の頂点だけが原稿画像中に存在するが、図8(b)では2領域分の頂点が原稿画像に存在する。更に、図8(b)は2ページ分の原稿領域が1枚の原稿画像の中に存在する為、画像分割とソートが必要になってくる。ところが、図8(d)の様に、右側で綴じられた原稿の場合には、図8(e)の様に右側にページが開く事になる。そこで、撮影者は、頁順や対象頁の位置などを考慮して、携帯端末を各ページが適正に撮影される様に移動しながら撮影する必要がある。   At this time, when document area detection and automatic shooting are performed using the conventional technique, only one area vertex exists in the document image in FIG. 8A, but in FIG. 8B, two area vertices exist. Exists in the original image. Further, in FIG. 8B, since the document area for two pages exists in one document image, image division and sorting are required. However, in the case of a document bound on the right side as shown in FIG. 8D, the page opens on the right side as shown in FIG. 8E. Therefore, the photographer needs to shoot while moving the mobile terminal so that each page is properly shot in consideration of the page order, the position of the target page, and the like.

上記課題を解決するため、本発明の画像処理装置は、複数枚をステープルした原稿を撮影した画像データにおいて前記ステープルの位置を確定するステープル位置確定手段と、前記画像データの中の少なくとも1ページ分の原稿領域を検出する原稿領域検出手段と、前記原稿領域検出手段により複数ページ分の原稿領域が検出された場合、前記ステープル位置確定手段により確定されたステープル位置に基づいて、前記複数ページ分の原稿領域における各ページの頁順を決定する制御手段を備える。   In order to solve the above-described problems, an image processing apparatus according to the present invention includes a staple position determining unit that determines the staple position in image data obtained by photographing a plurality of originals, and at least one page of the image data. A document area detecting unit for detecting a plurality of pages, and when the document area detecting unit detects a document area for a plurality of pages, the plurality of pages for the plurality of pages are determined based on the staple position determined by the staple position determining unit. Control means for determining the page order of each page in the document area is provided.

本発明により、携帯端末を利用した複写機能において、ステープルされた両面原稿を自動撮影し、適正な頁順で印刷する事が可能となる。   According to the present invention, in a copying function using a portable terminal, a stapled double-sided document can be automatically photographed and printed in an appropriate page order.

システムの全体構成を説明する為の構成図である。It is a block diagram for demonstrating the whole structure of a system. 携帯端末の外観図である。It is an external view of a portable terminal. 携帯端末のモジュールブロック図である。It is a module block diagram of a portable terminal. サーバのモジュールブロック図である。It is a module block diagram of a server. プリンタのモジュールブロック図である。It is a module block diagram of a printer. 全体の動作を説明する為のフローチャートである。It is a flowchart for demonstrating the whole operation | movement. 実施例1を説明する為の撮影動作時(S603)の動作を説明するフローチャートである。7 is a flowchart for explaining an operation during a photographing operation (S603) for explaining the first embodiment. 一カ所でステープルされた原稿の説明図である。FIG. 5 is an explanatory diagram of a document stapled at one place. 原稿領域を判定する動作(S706)を説明するフローチャートである。10 is a flowchart for explaining an operation (S706) of determining a document area. 一カ所でステープルされた原稿領域を判定する動作を説明する為のイメージ図である。FIG. 5 is an image diagram for explaining an operation of determining a document area stapled at one place. 二カ所でステープルされた原稿の説明図である。It is explanatory drawing of the document stapled in two places. 二カ所でステープルされた原稿領域を判定する動作を説明する為のイメージ図である。FIG. 6 is an image diagram for explaining an operation of determining a document area stapled at two places. 実施例2を説明する為の撮影動作時(S603)の動作を説明するフローチャートである。10 is a flowchart for explaining an operation during a photographing operation (S603) for explaining the second embodiment. ステープルされない時の原稿領域を判定する動作を説明する為のイメージ図である。FIG. 6 is an image diagram for explaining an operation of determining a document area when it is not stapled. 原稿領域を判定する動作(S701)を説明するフローチャートである。10 is a flowchart illustrating an operation (S701) for determining a document area. 1頁目の原稿領域を判定する動作を説明する為のイメージ図である。FIG. 6 is an image diagram for explaining an operation of determining a document area of the first page.

以下、本発明を実施するための最良の形態について図面を用いて説明する。   The best mode for carrying out the present invention will be described below with reference to the drawings.

図1に本実施例で利用するシステムの全体構成を示す。LAN110には、プリンタ103および無線ルータ102が接続されている。また、LAN110はインターネット120に接続されており、サービス提供しているサーバ121ともインターネット120経由で接続されている。携帯端末101は無線ルータ102を介して、プリンタ103やサーバ121に接続することができる。ここでは、無線ルータ102、プリンタ103はLAN110に接続されているが、その限りではない。無線ルータ102、プリンタ103はサーバ121に接続可能であればよい。   FIG. 1 shows the overall configuration of a system used in this embodiment. A printer 103 and a wireless router 102 are connected to the LAN 110. The LAN 110 is connected to the Internet 120 and is also connected to the server 121 that provides the service via the Internet 120. The portable terminal 101 can be connected to the printer 103 and the server 121 via the wireless router 102. Here, the wireless router 102 and the printer 103 are connected to the LAN 110, but this is not a limitation. The wireless router 102 and the printer 103 may be connected to the server 121.

<携帯端末の構成>
図2に本実施例で利用する携帯端末101の外観を示す。図2(a)は、携帯端末101の表面である。表面には、タッチパネル201、操作ボタン202を持つ。図2(b)は携帯端末101の裏面である。裏面には、撮影部203が配置されている。なお、携帯端末には様々な種類が存在するが、本発明はカメラ機能を持つ端末装置ならば利用が可能である。すなわち、カメラ機能をもったスマートフォンや携帯電話でも、通信機能を持ったデジタルカメラでも構わない。また、カメラ機能には図示しないオートフォーカス装置が搭載されており、コントラスト比や赤外線の送受信タイミングなどによってピントの合った状態を自動的に検出しているが、これにより焦点距離や被写体距離を測定することができる。本実施例で利用するオートフォーカス装置は一例であり、焦点距離や被写体距離を測定できる方法ならば限定はしない。
<Configuration of mobile terminal>
FIG. 2 shows the appearance of the mobile terminal 101 used in this embodiment. FIG. 2A shows the surface of the mobile terminal 101. A touch panel 201 and operation buttons 202 are provided on the surface. FIG. 2B is the back surface of the mobile terminal 101. An imaging unit 203 is disposed on the back surface. There are various types of portable terminals, but the present invention can be used as long as the terminal device has a camera function. That is, a smart phone or a mobile phone having a camera function or a digital camera having a communication function may be used. The camera function is equipped with an autofocus device (not shown) that automatically detects the in-focus state based on the contrast ratio and infrared transmission / reception timing. can do. The autofocus device used in this embodiment is an example, and there is no limitation as long as it can measure the focal length and the subject distance.

図3に携帯端末101の内部の構成を示す。但し、この構成は本実施例に必要な構成に限定して記載している。図3において、CPU301(プロセッサ)、RAM302、ROM303がデータバス311を介してプログラムやデータを送受する。データバス311には、タッチパネル201、撮影部203、画像処理装置310、モーションセンサ309が接続されている。また、データバス311には無線LAN装置307が接続されており、無線ルータ102とデータ送受信が可能である。更に、データバス311には記憶部305が接続されており、画像データや各種プログラムを格納することができる。モーションセンサ309は、3軸加速度センサ、電子コンパス、3軸角速度センサを搭載しており、公知の技術を利用することにより、携帯端末101の姿勢や移動を検出することが可能である。なお、CPU301がROM303の保持するプログラムに基づき、これらの携帯端末101内の構成要素の制御を行う。   FIG. 3 shows an internal configuration of the mobile terminal 101. However, this configuration is limited to the configuration necessary for this embodiment. In FIG. 3, a CPU 301 (processor), a RAM 302, and a ROM 303 send and receive programs and data via a data bus 311. To the data bus 311, a touch panel 201, an imaging unit 203, an image processing device 310, and a motion sensor 309 are connected. In addition, a wireless LAN device 307 is connected to the data bus 311 and data transmission / reception with the wireless router 102 is possible. Further, a storage unit 305 is connected to the data bus 311 and can store image data and various programs. The motion sensor 309 includes a three-axis acceleration sensor, an electronic compass, and a three-axis angular velocity sensor, and can detect the posture and movement of the mobile terminal 101 by using a known technique. Note that the CPU 301 controls the components in the portable terminal 101 based on a program stored in the ROM 303.

画像処理装置310は、原稿のエッジを検出するエッジ検出器3101、ステープルのパターンを検索するステープル検出器3102、原稿の矩形領域を検出する原稿領域検出器3103、特徴点の抽出を行う特徴点検出器3104を備えている。これらの検出器は画像処理装置310内のバスを経由して、携帯端末101のデータバス311と接続する。   The image processing apparatus 310 includes an edge detector 3101 that detects an edge of a document, a staple detector 3102 that searches for a staple pattern, a document region detector 3103 that detects a rectangular region of the document, and a feature point detection that performs feature point extraction. A container 3104 is provided. These detectors are connected to the data bus 311 of the portable terminal 101 via a bus in the image processing apparatus 310.

<サーバの構成>
図4はサーバ121の構成例である。CPU401は、ROM403に記憶された制御プログラムを読み出して各種制御処理を実行する。RAM402は、CPU401の主メモリ、ワークエリア等の一時記憶領域として用いられる。ネットワークI/F404は、サーバ121をインターネット120に接続し、他の装置との間で各種情報を送受信する。HDD405は、画像データや各種プログラムを記憶する。
<Server configuration>
FIG. 4 is a configuration example of the server 121. The CPU 401 reads a control program stored in the ROM 403 and executes various control processes. The RAM 402 is used as a temporary storage area such as a main memory or work area for the CPU 401. A network I / F 404 connects the server 121 to the Internet 120 and transmits / receives various information to / from other devices. The HDD 405 stores image data and various programs.

図4において、ネットワークI/F部404を介して受信した携帯端末101からの画像データは、データバス410を介してCPU401、RAM402、ROM403の間で送受される。CPU401がROM403やHDD405に格納された画像処理プログラムを実行することによって、画像データに対する画像処理が実現される。更に、画像処理された画像データは、プリント用のPDL(ページ記述言語)に変換されて、通常のプリンタで印刷可能なデータに変換される。   In FIG. 4, image data from the mobile terminal 101 received via the network I / F unit 404 is transmitted and received between the CPU 401, RAM 402, and ROM 403 via the data bus 410. When the CPU 401 executes the image processing program stored in the ROM 403 or the HDD 405, image processing for the image data is realized. Further, the image processed image data is converted into PDL (Page Description Language) for printing and converted into data that can be printed by a normal printer.

<プリンタの構成>
図5は本実施例で用いるプリンタ103の構成を説明する図である。プリンタ103は、コントローラ部500、操作部509、外部メモリ510、プリンタ部511からなる。コントローラ部500において、プリンタCPU505は制御プログラム等に基づいて、システムバス508に接続されるプリンタI/F部504を介し、プリンタ部511に画像信号を出力する。なお、制御プログラムはROM507や外部メモリ510に記憶される。また、ROM507は、CPU505の制御プログラム等を記憶する。CPU505はネットワークI/F部501を介して携帯端末101やサーバ121との通信処理が可能である。これにより、プリンタ内の情報や、携帯端末での撮影情報、サーバ121での画像処理情報などを携帯端末101やサーバ121と送受可能に構成されている。RAM506はCPU505の主メモリ、ワークエリア等として機能する。
<Printer configuration>
FIG. 5 is a diagram illustrating the configuration of the printer 103 used in this embodiment. The printer 103 includes a controller unit 500, an operation unit 509, an external memory 510, and a printer unit 511. In the controller unit 500, the printer CPU 505 outputs an image signal to the printer unit 511 via the printer I / F unit 504 connected to the system bus 508 based on a control program or the like. The control program is stored in the ROM 507 and the external memory 510. The ROM 507 stores a control program for the CPU 505 and the like. The CPU 505 can perform communication processing with the mobile terminal 101 and the server 121 via the network I / F unit 501. Thus, information in the printer, shooting information on the mobile terminal, image processing information on the server 121, and the like can be transmitted to and received from the mobile terminal 101 and the server 121. A RAM 506 functions as a main memory, work area, and the like for the CPU 505.

入力された画像データはネットワークI/F部501を介してコントローラ部500へ送られる。続いてPDL(ページ記述言語)データ処理部502がPDL解釈、レンダリングを行って、画像処理部503がプリント出力用画像処理を行い、プリンタ部511が処理済み画像データをプリントする。   The input image data is sent to the controller unit 500 via the network I / F unit 501. Subsequently, the PDL (page description language) data processing unit 502 performs PDL interpretation and rendering, the image processing unit 503 performs image processing for print output, and the printer unit 511 prints the processed image data.

<処理フローの詳細説明>
図6は、本実施例における携帯端末101、サーバ121、プリンタ103による撮影画像内の原稿画像領域を出力原稿の大きさに変倍してプリントする動作を示すフローチャートである。なお、携帯端末101での処理はCPU301が、サーバ121での処理はCPU401が、プリンタ103での処理フローはCPU505が制御する。
<Detailed description of processing flow>
FIG. 6 is a flowchart showing an operation of printing by scaling the document image area in the captured image by the portable terminal 101, the server 121, and the printer 103 to the size of the output document in the present embodiment. The processing at the portable terminal 101 is controlled by the CPU 301, the processing at the server 121 is controlled by the CPU 401, and the processing flow at the printer 103 is controlled by the CPU 505.

S601で、ユーザから撮影開始の指示が入力されると、携帯端末101が、撮影された画像データを印刷する対象となるプリンタを無線LAN装置307、無線ルータ102を介してLAN110内のプリンタから検索する。例えばユーザから所望のプリンタのIPアドレスを入力されたら、そのIPアドレスに該当するプリンタを検索するといった方法が考えられる。   In step S <b> 601, when an instruction to start shooting is input from the user, the mobile terminal 101 searches the printer in the LAN 110 via the wireless LAN device 307 and the wireless router 102 for a printer to which the captured image data is printed. To do. For example, when a user inputs an IP address of a desired printer, a method of searching for a printer corresponding to the IP address can be considered.

S602で、対象となるプリンタ103が見つかると、プリンタ103は印刷時に設定可能な印刷設定情報を、LAN110、無線ルータ102を介して携帯端末101に通知する。ここでの印刷設定情報は、使用可能な用紙サイズや用紙種類、出力解像度、両面印刷が可能か、Nin1印刷が可能か、カラー印刷が可能か、ステープルが可能か、といった情報である。これらの印刷設定情報を用いて、携帯端末101は撮影画像をプリントする際にどの印刷設定を用いるかを決定する。   In step S <b> 602, when the target printer 103 is found, the printer 103 notifies the portable terminal 101 of print setting information that can be set during printing via the LAN 110 and the wireless router 102. The print setting information here is information such as usable paper size, paper type, output resolution, double-sided printing, Nin1 printing, color printing, or stapling. Using the print setting information, the mobile terminal 101 determines which print setting is used when printing a captured image.

S603で、撮影部203を用いて原稿を撮影することで、撮影画像データを得る。その撮影画像データ内における原稿領域を、原点の頂点を抽出することにより取得する。なお撮影画像データは原稿以外(例えば原稿が置かれた机)を写した領域も含み、原稿領域はその撮影画像データ内において原稿を写した領域のことである。更に、ステープルされた原稿の場合には、ステープル位置を確定する。この時、ステープルされた原稿は、利用者によって改頁された原稿を連続撮影しながら原稿の頂点を抽出する。S603については、後に図7を用いて詳細に説明する。   In step S <b> 603, photographed image data is obtained by photographing a document using the photographing unit 203. The document area in the captured image data is acquired by extracting the vertex of the origin. The photographed image data also includes an area where a document other than the document (for example, a desk on which the document is placed) is copied, and the document area is an area where the document is copied in the photographed image data. Further, in the case of a stapled document, the stapling position is determined. At this time, for the stapled document, the vertexes of the document are extracted while continuously photographing the document that has been paginated by the user. S603 will be described in detail later with reference to FIG.

S604で、あらかじめユーザによって携帯端末101で設定された、若しくは撮影時の焦点距離等の情報から算出された最適な出力紙サイズなどを画像処理パラメータとして算出する。S605で、撮影画像データをJPEGフォーマットなどで圧縮する。S606で、圧縮済みの撮影画像データと共に、印刷設定、画像処理用パラメータを、無線LAN装置307を利用して無線ルータ102、LAN110とインターネット120を介してサーバ121に送信する。   In step S604, an optimum output paper size or the like that is set in advance by the user with the portable terminal 101 or calculated from information such as a focal length at the time of shooting is calculated as an image processing parameter. In step S605, the captured image data is compressed in the JPEG format or the like. In step S <b> 606, print settings and image processing parameters are transmitted to the server 121 via the wireless router 102, the LAN 110, and the Internet 120 using the wireless LAN device 307 together with the compressed captured image data.

S607で、サーバ121は圧縮された撮影画像データを解凍する。S608で、画像データの整形処理を行う。整形処理には、画像のトリミングや変倍、回転等がある。トリミングは、画像データの中で複数ページ分の原稿領域を含む頂点がある場合には、その画像データに含まれる複数ページ分の原稿領域を、複数ページのそれぞれのページに対応する領域に分割する。そして、複数ページのそれぞれのページに対応する領域を1ページ分の原稿の画像データとしてそれぞれ生成し、分割後の各ページの原稿の画像データを、前頁、後頁の頁順に並べる。尚、トリミング方法については、後に詳しく説明する。更に、それぞれの画像データに対してアフィン変換やキュービック変倍や線形変倍などの他の公知の変倍技術を利用する。これにより、原稿領域だけの画像データを生成する。複数の画像データは、ステープル情報に基づき、前頁と後頁としてS609以降の処理を順次実施する。ここで、前頁の処理が実施されている間は、後頁はRAM402やHDD405に蓄積されて処理を待つ。   In step S607, the server 121 decompresses the compressed captured image data. In step S608, image data shaping processing is performed. The shaping process includes image trimming, scaling, rotation, and the like. In the trimming, when there are vertices including document areas for a plurality of pages in image data, the document areas for a plurality of pages included in the image data are divided into areas corresponding to the respective pages of the plurality of pages. . Then, an area corresponding to each page of the plurality of pages is generated as image data of one page of document, and the image data of the document of each divided page is arranged in the order of the pages of the previous page and the subsequent page. The trimming method will be described in detail later. Further, other known scaling techniques such as affine transformation, cubic scaling and linear scaling are used for each image data. Thereby, image data for only the document area is generated. The plurality of image data is sequentially subjected to the processing from S609 onward as the previous page and the subsequent page based on the staple information. Here, while the processing of the previous page is being performed, the subsequent page is stored in the RAM 402 or the HDD 405 and waits for processing.

S609で、各頁で撮影画像データの濃度ムラ補正を行い、原稿撮影時の光源や影による色ムラを補正する。まず撮影時のノイズを除去するようなフィルタ処理を行い、その後下地に載っている色を飛ばして紙の白を再現できるような階調補正を行う。S610で像域判定を行い、撮影画像データ内の文字や線部分とそうでない部分とに切り分けて、それぞれの画素に対して属性フラグを付加する。S611で、文字や線の属性と判定された画素に対してフィルタ処理を行い、文字や線がシャープになるように補正する。   In step S609, density unevenness correction of captured image data is performed on each page, and color unevenness due to light sources and shadows during document shooting is corrected. First, filter processing is performed so as to remove noise at the time of shooting, and then tone correction is performed so that white on paper can be reproduced by skipping colors on the background. In step S610, image area determination is performed, and a character or line portion in the captured image data is divided into a portion that is not, and an attribute flag is added to each pixel. In step S611, a filter process is performed on the pixels determined to have the character or line attribute, and the character or line is corrected to be sharp.

S612で、文字単色化処理を行い、文字と判定された画素を単色で再現し、文字の鮮鋭化を図る。例えば、ある文字を再現する画素のRGB値を平均化し、その平均値を文字の色として適用するなどの手法をとる。S613で、撮影画像データに対して、カメラ固有の色空間から共通のRGB色空間への変換を行う。ここでの色空間の変換は、あらかじめ定義付けられた3×3のマトリクス演算によって携帯端末101のカメラ色空間から、sRGBといった測色的な共通RGB色空間への変換を行うものとする。S614で、これまで補正してきた撮影画像データをJPEGフォーマットなどで圧縮する。   In step S612, a character monochromatic process is performed to reproduce a pixel determined to be a character in a single color, thereby sharpening the character. For example, the RGB values of pixels that reproduce a character are averaged, and the average value is applied as the character color. In step S613, the captured image data is converted from a camera-specific color space to a common RGB color space. Here, the color space conversion is performed from the camera color space of the portable terminal 101 to a colorimetric common RGB color space such as sRGB by a predefined 3 × 3 matrix operation. In S614, the captured image data that has been corrected so far is compressed in the JPEG format or the like.

S615で、インターネット120とLAN110を介してサーバ121から補正済み撮影画像データと印刷設定を取得する。以降、プリンタ103は撮影画像データをプリントするまでの処理を行う。S615〜S619の処理は画像処理部503で実施される。   In step S615, corrected captured image data and print settings are acquired from the server 121 via the Internet 120 and the LAN 110. Thereafter, the printer 103 performs processing until the photographed image data is printed. The processing of S615 to S619 is performed by the image processing unit 503.

S616で、圧縮されている撮影画像データを解凍する。S617で、色変換用LUT(Look Up Table)を用いた補間演算によって、共通RGB色空間からプリンタに適したCMYK各色成分からなるプリンタ色空間への変換を行う。ここでの色変換用LUTは、RGBの各3成分を適当な格子点間隔で分割した三次元のLUTであり、それぞれのLUTのエントリはそれぞれ、LUTの格子点に対応する8ビットのビット精度からなるCMYK値を保有している。三次元LUTを既知の補間計算を行ってCMYK値からなる画像データに変換する。   In step S616, the compressed captured image data is decompressed. In S617, conversion from a common RGB color space to a printer color space composed of CMYK color components suitable for the printer is performed by interpolation using a color conversion LUT (Look Up Table). The color conversion LUT here is a three-dimensional LUT obtained by dividing each of the three RGB components at an appropriate grid point interval, and each LUT entry has an 8-bit bit precision corresponding to the grid point of the LUT. The CMYK value of The three-dimensional LUT is converted into image data composed of CMYK values by performing known interpolation calculation.

S618で、一次元のLUTを用いて濃度特性が階調ターゲットに合うように補正する階調補正を行う。文字部とそれ以外の部分とで階調ターゲットを変える場合は、ここで階調ターゲットを切り替えて補正を行う。S619では、階調補正された画像データに対してディザマトリクスを用いて、CMYK各色1ビットの擬似中間調表現を持つ画像データに変換する。ここで、擬似中間調処理は、RAM506に格納されたディザマトリクス上の数値と入力画像データとを比較して、入力画像データの数値が大きければ1を、入力画像データの数値が小さければ0を出力する処理を行う。本実施例では説明の簡便さのために1ビット出力のスクリーン処理としているが、出力ビット数は1ビットに限定されるものではない。また、CPU505の指示により、複数のディザマトリクスを切り替えて使用することもできる。   In step S618, tone correction is performed using a one-dimensional LUT to correct the density characteristics so as to match the tone target. When the gradation target is changed between the character part and the other part, the gradation target is changed here to perform correction. In S619, the tone-corrected image data is converted into image data having a pseudo halftone expression of 1 bit for each color of CMYK using a dither matrix. Here, in the pseudo halftone processing, the numerical value on the dither matrix stored in the RAM 506 is compared with the input image data, and if the numerical value of the input image data is large, 1 is set, and if the numerical value of the input image data is small, 0 is set. Perform output processing. In this embodiment, screen processing with 1-bit output is performed for ease of explanation, but the number of output bits is not limited to 1 bit. In addition, a plurality of dither matrices can be switched and used in accordance with an instruction from the CPU 505.

S620で、処理済みの撮影画像データを全頁プリントする。この時、プリンタがステープル機能を持っている場合には、原稿と同じ位置にステープルする。尚、原稿が複数枚ある場合は、S603からS606までの処理をS603で実施した全撮影分を処理してからサーバ121での処理となるS607を実施する場合がある。この時は、圧縮された画像や、算出されたパラメータ等はRAM302に一時的に保存してからS607に処理を進める。一方、S603の撮影画像を1枚ずつ処理する場合には、S603からS620の処理は1枚ずつ実施される。S621では、全頁プリントを終了したことをユーザに知らせるため、携帯端末101にプリント終了通知を行う。   In step S620, the processed photographed image data is printed on all pages. At this time, if the printer has a stapling function, stapling is performed at the same position as the original. If there are a plurality of documents, the processing from S603 to S606 may be performed in S603, and then S607, which is processing in the server 121, may be performed. At this time, the compressed image, the calculated parameters, and the like are temporarily stored in the RAM 302, and the process proceeds to S607. On the other hand, when processing the captured images of S603 one by one, the processes from S603 to S620 are performed one by one. In step S621, a print end notification is sent to the mobile terminal 101 in order to notify the user that all pages have been printed.

最後に、S622で、プリント終了通知を携帯端末101のタッチパネル201に表示して、処理を終了する。   Finally, in step S622, a print end notification is displayed on the touch panel 201 of the portable terminal 101, and the process ends.

<原稿撮影(S603)の詳細な説明>
図7に原稿を撮影するS603の詳細なフローを記載する。初めに、S701で、原稿領域検出器3103を用いて、原稿の第1ページ矩形領域の検出を行う。先ず、撮影部203が取得中の画像データをRAM302に格納する。画像データは、撮影部203から逐次転送され、タッチパネル201に表示されているので、利用者は簡単に位置を調整する事ができる。この時、この画像データを利用して、第1頁の矩形領域を検出する。尚、撮影部203から転送されてくる画像データは1秒間に約30枚である。しかしながら、送られてくる画像データ全てを処理する必要はない。S701の矩形領域検出では、2枚〜3枚くらいを処理できれば、十分に1頁目の矩形領域を検出できる。尚、S701の処理については、詳細に後述する。
<Detailed Description of Document Shooting (S603)>
FIG. 7 shows a detailed flow of S603 for photographing a document. First, in step S <b> 701, the first page rectangular area of the document is detected using the document area detector 3103. First, the image data being acquired by the photographing unit 203 is stored in the RAM 302. Since the image data is sequentially transferred from the photographing unit 203 and displayed on the touch panel 201, the user can easily adjust the position. At this time, the rectangular area of the first page is detected using this image data. The image data transferred from the photographing unit 203 is about 30 images per second. However, it is not necessary to process all incoming image data. In the rectangular area detection of S701, the rectangular area of the first page can be sufficiently detected if about 2 to 3 sheets can be processed. The process of S701 will be described later in detail.

S702で、S701で矩形領域が検出されたかどうかを判定する。矩形領域が検出されれば、S703で撮影部203を利用して撮影する。この撮影画像は、S701で利用した画像よりも高解像度で取得される。S704で、S701で取得された矩形領域の4点の特徴点座標を頂点として取得する。この時、S701の画像データとS703で撮影した画像データの解像度が違う場合は、頂点の座標は適宜変換される。尚、この時の頂点位置は、S608の画像整形処理で実施するトリミングに利用される。   In step S702, it is determined whether a rectangular area is detected in step S701. If a rectangular area is detected, shooting is performed using the shooting unit 203 in S703. This captured image is acquired at a higher resolution than the image used in S701. In S704, the four feature point coordinates of the rectangular area acquired in S701 are acquired as vertices. At this time, if the resolution of the image data in S701 is different from the resolution of the image data captured in S703, the vertex coordinates are appropriately converted. Note that the vertex position at this time is used for trimming performed in the image shaping process of S608.

S705で、ステープル位置を確定する。ステープル位置の決定方法としては、自動で検出する方法と端末画面201から入力を受け付ける方法がある。   In step S705, the staple position is determined. As a method for determining the staple position, there are an automatic detection method and a method of receiving an input from the terminal screen 201.

先ず自動で検出する方法を説明する。一般的なプリンタにおいて、ステープル位置は、左上隅1カ所、右上隅1カ所、左辺2カ所、右辺2カ所、上辺2カ所の5通りである。更に、原稿用紙のポートレートとランドスケープの2種類がある。図8(a)(d)(g)(j)、及び図11(a)(d)(g)(j)は、ステープルの位置と数の組み合わせ例である。撮影部203が取得する画像データについて、空間フィルタを用いたエッジ検出器3101で、2値のエッジ画像データを作成し、ステープル検出器3102を用いて、図8、図11に示したステープル領域において、ステープルと同じパターンを検出する。尚、画像データの中から特定物を検出する方法は様々に提案されている為、本実施例ではこれを限定しないものとする。例えば画像データからの特定物検出によって、図8(a)の場合は、原稿領域の左上に長方形領域を一カ所判定する際にステープルが検出される。そして、その検出位置と数から、左上でステープルされている事が確定される。   First, an automatic detection method will be described. In a general printer, there are five stapling positions: one upper left corner, one upper right corner, two left sides, two right sides, and two upper sides. In addition, there are two types: portrait of portrait paper and landscape. FIGS. 8A, 8D, 8G, 11J, and 11A, 11D, 11G, and 11J are examples of combinations of staple positions and numbers. With respect to the image data acquired by the imaging unit 203, binary edge image data is created by the edge detector 3101 using a spatial filter, and the staple detector 3102 is used to create the binary edge image data in the staple region shown in FIGS. The same pattern as the staple is detected. Since various methods for detecting a specific object from image data have been proposed, this embodiment is not limited to this. For example, by detecting a specific object from image data, in the case of FIG. 8A, staples are detected when one rectangular area is determined at the upper left of the original area. Then, from the detected position and number, it is determined that the upper left is stapled.

端末画面201から入力を受け付ける方法としては、撮影部203が取得する画像データを端末画面201に表示し、利用者によってクリックされた位置をステープル位置として決定する。この時、図8に示したステープル位置以外の領域がクリックされた場合には、その入力は無効である。この時は、ステープルされていない原稿と判定する。   As a method of accepting an input from the terminal screen 201, image data acquired by the photographing unit 203 is displayed on the terminal screen 201, and a position clicked by the user is determined as a staple position. At this time, if an area other than the staple position shown in FIG. 8 is clicked, the input is invalid. At this time, it is determined that the document is not stapled.

S706で、2頁目以降の原稿領域検出を行う。この時、携帯端末が利用者によって原稿が改頁されたかどうかを判定してからS706に進んでも良い。判定方法には様々な方法が考えられる。例えば、一定時間をおいて画像が変わっているかどうかをS703で撮影した画像と変わっているかを判定するなどが考えられる。2頁目以降は、S705で特定されたステープル位置に応じて、原稿領域から2つの領域を検出する。図8(a)(d)はそれぞれ、ポートレートで両面印刷された原稿を左上隅、または右上隅の一カ所をステープルした時の開き方の説明である。S706の処理は、図9のフローチャートを使って、後に詳細に説明する。   In S706, the document area detection for the second and subsequent pages is performed. At this time, the mobile terminal may determine whether or not the document has been paginated by the user before proceeding to S706. Various methods can be considered as the determination method. For example, it is conceivable to determine whether or not the image has changed after a certain time from the image taken in S703. For the second and subsequent pages, two areas are detected from the document area in accordance with the staple position specified in S705. FIGS. 8 (a) and 8 (d) are illustrations of how to open a document that has been printed in portrait on both sides when stapled at one upper left corner or one upper right corner. The process of S706 will be described in detail later using the flowchart of FIG.

S707で、S706で領域が検出されたかどうかを判定する。領域が検出されれば、S708で撮影部203を利用して撮影する。S709で、S706で取得した閉領域の4点又は8点の頂点の座標を取得する。この時、S706での画像データとS708で撮影した画像データの解像度が違う場合は、頂点の座標は適宜変換される。尚、取得した頂点は、S608の画像整形処理で利用される。   In step S707, it is determined whether an area has been detected in step S706. If the area is detected, the image is captured using the imaging unit 203 in S708. In S709, the coordinates of the 4 or 8 vertexes of the closed region acquired in S706 are acquired. At this time, if the resolution of the image data in S706 is different from that of the image data captured in S708, the coordinates of the vertices are appropriately converted. The acquired vertices are used in the image shaping process in S608.

S710で、最終頁かどうかを判定する。この判定は手動でも自動でも良い。手動判定の場合は、S710で、端末画面201に撮影終了ボタンを表示して、利用者からの入力によって判定する。終了ボタンがタッチされれば本シーケンスは終了となり、一定時間以上タッチされなければ、S706に戻る。   In S710, it is determined whether it is the last page. This determination may be manual or automatic. In the case of manual determination, in step S710, a shooting end button is displayed on the terminal screen 201, and determination is made based on input from the user. If the end button is touched, this sequence ends. If not touched for a certain period of time, the process returns to S706.

一方、自動判定の場合は、撮影部203が撮影する画像データで判定する。例えば、ポートレートで左上を綴じた図8(a)の場合、2頁目以降は図8(b)のような見開きで頂点を検出する。そして、最終頁は見開きにならなくなり、図8(c)に示す様に横向きで頂点は4カ所になる。この4カ所の頂点の位置を検出した場合に、最終頁であると判断できる。最終頁の判定も、原稿の向きとステープル位置で決定される。図8(f)は、ポートレートで右上1カ所を綴じた時の最終頁である。図8(i)は、ランドスケープ原稿を左上一カ所で綴じた原稿の最終頁である。図8(l)は、ランドスケープ原稿の右上一カ所を綴じた原稿の最終頁である。図11(c)は、ランドスケープ原稿の上2カ所を綴じた原稿の最終頁である。図11(f)は、ポートレート原稿の上2カ所を綴じた原稿の最終頁である。図11(i)は、ポートレート原稿の右2カ所を綴じた原稿の最終頁である。図11(l)は、ポートレート原稿の左2カ所を綴じた原稿の最終頁である。これら原稿の頂点の数の変化によって、最終頁判定を実施する事が可能である。   On the other hand, in the case of automatic determination, determination is made based on image data captured by the image capturing unit 203. For example, in the case of FIG. 8A in which the upper left is bound in a portrait, the vertices are detected with the spread as shown in FIG. 8B after the second page. Then, the last page is not spread apart, and the side is in the horizontal direction as shown in FIG. When the positions of these four vertices are detected, it can be determined that the page is the last page. The determination of the last page is also determined by the orientation of the original and the stapling position. FIG. 8F shows the final page when the upper right one is bound in the portrait. FIG. 8 (i) shows the final page of a document in which a landscape document is bound at one upper left position. FIG. 8 (l) is the final page of the original that is bound to the top right of the landscape original. FIG. 11C shows the final page of the original that is bound at the top two positions of the landscape original. FIG. 11F shows the final page of the original that is bound at the top two positions of the portrait original. FIG. 11 (i) shows the final page of the original document in which the right two parts of the portrait original are bound. FIG. 11 (l) shows the final page of the original document in which the left two positions of the portrait original are bound. The final page determination can be performed by changing the number of vertices of these documents.

<第1頁領域検出(S701)の詳細な説明>
S701における第1頁の頁領域検出について、図15のフローチャートを用いて説明する。まず、S1501で、画像処理装置310内のエッジ検出器3101を用いて、画像データから2値のエッジ画像を作成する。エッジ画像は画像データの明度成分について、帯域通過フィルタ等を用いて高周波領域だけを取り出し、決められた2値化閾値で2値化することで得られる。帯域通過フィルタの形状や2値化閾値については、本実施例を特定するものではない為、詳細説明は割愛する。
<Detailed Description of First Page Area Detection (S701)>
The page area detection of the first page in S701 will be described with reference to the flowchart of FIG. First, in step S1501, a binary edge image is created from image data using the edge detector 3101 in the image processing apparatus 310. The edge image is obtained by extracting only the high frequency region of the brightness component of the image data using a band pass filter or the like and binarizing it with a predetermined binarization threshold. The shape of the band-pass filter and the binarization threshold value are not specific to the present embodiment, and will not be described in detail.

S1502で、特徴点検出器3104を用いて特徴点の抽出を行う。特徴点の抽出方法には様々な手法が考案されており、今でも研究が続けられている。例えば、古典的な方法ではパターンマッチングによる抽出方法などがある。但し、本実施例では、これを特定するものではない為、詳細説明は割愛する。図16は2値のエッジ画像から特徴点を抽出した時の画像の例である。原稿領域の特徴点の他に、原稿領域外のもの(例えば、机上のもの)も撮影されており、これらの角も特徴点として検出する。更に原稿領域内の文字や図形等の角も、特徴点として検出する。   In step S1502, feature points are extracted using the feature point detector 3104. Various methods for extracting feature points have been devised, and research is still ongoing. For example, the classical method includes an extraction method by pattern matching. However, in the present embodiment, since this is not specified, detailed description is omitted. FIG. 16 is an example of an image when feature points are extracted from a binary edge image. In addition to the feature points of the document area, those outside the document area (for example, those on the desk) are also photographed, and these corners are also detected as feature points. Furthermore, the corners of characters and figures in the document area are also detected as feature points.

S1503で、閉領域を抽出する。ある領域において開始点(例えば図16の頂点001〜004)となる特徴点から延びるエッジ画像の線分が開始点に戻ってくる場合に、この領域を閉領域と判定する。   In S1503, a closed region is extracted. When a line segment of an edge image extending from a feature point that becomes a start point (for example, vertices 001 to 004 in FIG. 16) in a certain area returns to the start point, this area is determined as a closed area.

S1504で、原稿領域検出器3103を用いて、S1503で抽出した幾つかの閉領域から原稿の閉領域を選択する。この時、最も原稿らしい閉領域を選択する。原稿らしい閉領域とは、画面サイズに対して適正なサイズであり、頂点の相対位置に歪みが少ない閉領域である。頂点の相対位置の歪みとは、例えば全頂点が直角に近い(90度±誤差以内)として、誤差は適宜設定されるものとする。この時、適切な閉領域が見つからない場合には、頁領域が検出されていないと判断する。   In step S1504, the document area detector 3103 is used to select a document closed area from the several closed areas extracted in step S1503. At this time, a closed region that is most likely to be a document is selected. The closed area that seems to be a document is a closed area that is appropriate for the screen size and has little distortion at the relative positions of the vertices. The distortion of the relative positions of the vertices is, for example, that all the vertices are close to a right angle (within 90 degrees ± error), and the error is appropriately set. At this time, if an appropriate closed region is not found, it is determined that no page region is detected.

<第2頁領域検出(S706)の詳細な説明>
S706における第2頁以降の頁領域検出について、図9のフローチャートを用いて説明する。まず、S901で、画像処理装置310内のエッジ検出器3101を用いて、画像データから2値のエッジ画像を作成する。エッジ画像は画像データの明度成分について、帯域通過フィルタ等を用いて高周波領域だけを取り出し、決められた2値化閾値で2値化することで得られる。帯域通過フィルタの形状や2値化閾値については、本実施例を特定するものではない為、詳細説明は割愛する。
<Detailed Description of Second Page Area Detection (S706)>
The page area detection for the second and subsequent pages in S706 will be described with reference to the flowchart of FIG. First, in step S <b> 901, a binary edge image is created from image data using the edge detector 3101 in the image processing apparatus 310. The edge image is obtained by extracting only the high frequency region of the brightness component of the image data using a band pass filter or the like and binarizing it with a predetermined binarization threshold. The shape of the band-pass filter and the binarization threshold value are not specific to the present embodiment, and will not be described in detail.

S902で、特徴点検出器3104を用いて特徴点の抽出を行う。特徴点の抽出方法には様々な手法が考案されており、今でも研究が続けられている。例えば、古典的な方法ではパターンマッチングによる抽出方法などがある。但し、本実施例では、これを特定するものではない為、詳細説明は割愛する。図10は2値のエッジ画像から特徴点を抽出した時の画像である。原稿領域の特徴点の他に、原稿領域外のもの(例えば、机上のもの)も撮影されており、これらの角も特徴点として検出する。更に原稿領域内の文字や図形等の角も、特徴点として検出する。   In step S902, feature points are extracted using the feature point detector 3104. Various methods for extracting feature points have been devised, and research is still ongoing. For example, the classical method includes an extraction method by pattern matching. However, in the present embodiment, since this is not specified, detailed description is omitted. FIG. 10 shows an image when feature points are extracted from a binary edge image. In addition to the feature points of the document area, those outside the document area (for example, those on the desk) are also photographed, and these corners are also detected as feature points. Furthermore, the corners of characters and figures in the document area are also detected as feature points.

S903で、閉領域を抽出する。ある領域において開始点(例えば図10の頂点001)となる特徴点から延びるエッジ画像の線分が開始点に戻ってくる場合に、この領域を閉領域と判定する。   In S903, a closed region is extracted. When a line segment of an edge image extending from a feature point that becomes a start point (for example, vertex 001 in FIG. 10) in a certain region returns to the start point, this region is determined as a closed region.

S904で、原稿領域検出器3103を用いて、S903で抽出した幾つかの閉領域から原稿の閉領域を選択する。この時の閉領域は、8個の特徴点を持つ閉領域を判定する事で確定できる。これら8点の特徴点は原稿の頂点である。図10では、頂点001〜008で囲まれた閉領域が、原稿の閉領域であると特定できる。   In step S904, the document area detector 3103 is used to select a document closed area from the several closed areas extracted in step S903. The closed region at this time can be determined by determining a closed region having eight feature points. These eight feature points are the vertices of the document. In FIG. 10, the closed area surrounded by the vertices 001 to 008 can be specified as the closed area of the document.

以上の説明は、S904において、ステープル箇所が一カ所の時に利用できる。例えば、図8に示すのは、右上隅、左上隅のステープル一カ所の場合である。図8(a)の様にポートレートで左上隅にステープルした場合、2頁以降は図8(b)の様な見開きになる。また、図8(d)の様にポートレートで右上隅にステープルした場合、2頁以降は図8(e)の様な見開きになる。図8(g)の様にランドスケープで左上隅にステープルした場合、2頁以降は図8(h)の様な見開きになる。また、図8(j)の様にランドスケープで右上隅にステープルした場合、2頁以降は図8(k)の様な見開きになる。   The above description can be used when there is only one staple in S904. For example, FIG. 8 shows the case of one staple in the upper right corner and the upper left corner. When the portrait is stapled in the upper left corner as shown in FIG. 8A, the second and subsequent pages are spread as shown in FIG. 8B. When the portrait is stapled in the upper right corner as shown in FIG. 8D, the second and subsequent pages are spread as shown in FIG. When stapling in the upper left corner of the landscape as shown in FIG. 8 (g), the second and subsequent pages are spread as shown in FIG. 8 (h). Further, when the landscape is stapled in the upper right corner as shown in FIG. 8 (j), the second and subsequent pages are spread as shown in FIG. 8 (k).

一方、ステープルが2カ所の場合、見開きの形が変わる。図11にステープルを2カ所にした時の見開きの例を示す。図11(a)はランドスケープの上2カ所をステープルした図である。これをひらくと図11(b)の様になる。図11(d)はポートレートの上2カ所をステープルした原稿であり、2頁目以降は図11(e)の様になる。図11(g)は、ポートレートを右2カ所でステープルした原稿であり、2頁目以降は図11(h)の様になる。図11(j)は、ポートレートを左2カ所でステープルした原稿であり、2頁目以降は図11(k)の様になる。これら、2カ所をステープルした場合は、頂点は図12に示す様に、頂点001〜004の4つとなる。よって、ステープルの数によって、見開き方が変わる為、検出する閉領域の頂点の数、形が変わる事が分かる。   On the other hand, when the number of staples is two, the form of the spread is changed. FIG. 11 shows an example of a spread when two staples are provided. FIG. 11A is a diagram in which the top two places of the landscape are stapled. If this is opened, it will become like FIG.11 (b). FIG. 11D shows a document in which the top two portions of the portrait are stapled, and the second and subsequent pages are as shown in FIG. FIG. 11G shows a document in which the portrait is stapled at two places on the right side, and the second and subsequent pages are as shown in FIG. FIG. 11 (j) shows a document in which the portrait is stapled at two places on the left, and the second and subsequent pages are as shown in FIG. 11 (k). When these two places are stapled, there are four vertices vertices 001 to 004 as shown in FIG. Therefore, since the spread method changes depending on the number of staples, it can be seen that the number and shape of the vertices of the closed region to be detected change.

更に、ステープルされていない場合、見開き方が変わる。図14にステープルされていない時の見開き時の閉領域検出時の画像データを示す。頂点001~004と、頂点005~008に囲まれた閉領域の数は2つとなる為、この二つの閉領域を選択し、検出されたと判断する。この時、適切な閉領域が見つからない場合には、頁領域が検出されないと判断する。   Further, when the sheets are not stapled, the spread method is changed. FIG. 14 shows image data when a closed region is detected when the page is spread when not stapled. Since the number of closed areas surrounded by the vertices 001 to 004 and the vertices 005 to 008 is two, it is determined that these two closed areas are selected and detected. At this time, if an appropriate closed region is not found, it is determined that a page region is not detected.

<画像整形処理(S608)における画像データのトリミング>
画像データのトリミングは、頂点の数によって変わる。頂点の数は、1頁目か否かにより変わり、また、S705のステープル位置確定処理において決定される。尚、頂点の位置は、S704及びS709で決定され、サーバ121に転送される。
<Trimming Image Data in Image Shaping Process (S608)>
The trimming of image data varies depending on the number of vertices. The number of vertices varies depending on whether or not it is the first page, and is determined in the staple position determination process in S705. The position of the vertex is determined in S704 and S709 and transferred to the server 121.

頂点の数が8個の場合、図10の頂点003と007を結んだ線分を分割位置とする。この場合、頂点003、004、005、006、007、003を結んだ線で画像データのトリミングを実施し、これを前頁とする。また、頂点003、002、001、008、007、003を結んだ線で画像データのトリミングを実施し、これを後頁とする。さらに、これらの画像は5角形になるので、頂点004から003方向に伸ばした線と、頂点006から007方向に伸ばした線の交点を新しい頂点として、長方形に修正する。後頁も同様に実施して長方形に修正が可能である。   When the number of vertices is 8, a line segment connecting the vertices 003 and 007 in FIG. In this case, the image data is trimmed by a line connecting the vertices 003, 004, 005, 006, 007, 003, and this is used as the previous page. Further, the image data is trimmed by a line connecting the vertices 003, 002, 001, 008, 007, and 003, and this is used as a subsequent page. Furthermore, since these images are pentagonal, the intersection of the line extended in the direction from the vertex 004 to 003 and the line extended in the direction from the vertex 006 to 007 is corrected to a rectangle as a new vertex. The rear page can be similarly modified to a rectangle.

一方、2頁目以降で頂点の数が4個の場合、図12の様になる。この場合、分割位置は、頂点001と004の中間点1と、頂点002と003の中間点2を結んだ線分である。頂点001、002、中間点1、2を結んだ線で、画像データからトリミングを実施して前頁とする。また、頂点004、003、中間点2、1を結んだ線で画像データからトリミングを実施して、後頁とする。   On the other hand, when the number of vertices is four on the second and subsequent pages, the result is as shown in FIG. In this case, the division position is a line segment connecting the intermediate point 1 between the vertices 001 and 004 and the intermediate point 2 between the vertices 002 and 003. A line connecting the vertices 001 and 002 and the intermediate points 1 and 2 is trimmed from the image data to obtain the previous page. In addition, trimming is performed from the image data with a line connecting the vertices 004 and 003 and the intermediate points 2 and 1 to obtain a subsequent page.

以上説明したように、本実施例に係る画像処理装置を用いれば、ステープルされた両面原稿を携帯端末でスキャンした場合に、見開きを同時に撮影し、更に頁順に印刷する事が可能である。   As described above, when the image processing apparatus according to the present embodiment is used, when a stapled double-sided document is scanned with a portable terminal, it is possible to simultaneously capture a spread and further print in page order.

実施例2では、実施例1のS705で原稿のステープル位置を確定できない場合の動作について説明する。実施例1では、S705のステープル位置の確定について、自動と手動とが考えられると説明した。手動の場合には、利用者からの入力が必要な為、利便性が損なわれるという課題がある。また、自動の場合には、ステープルの種類によっては検出できない事が考えられる。よって、実施例2では、ステープル位置確定を2頁以降の画像データ取得後に判定する。なお、以下の説明では実施例1との差分のみを記載する。   In the second embodiment, an operation when the staple position of the document cannot be determined in S705 of the first embodiment will be described. In the first embodiment, it has been described that the determination of the staple position in S705 can be automatic or manual. In the case of manual operation, since input from the user is necessary, there is a problem that convenience is impaired. In the case of automatic, it may be impossible to detect depending on the type of staple. Therefore, in the second embodiment, the staple position determination is determined after acquiring image data for the second and subsequent pages. In the following description, only differences from the first embodiment are described.

実施例2における図6のS603についての詳細なフローチャートを図13に示す。尚、図13のS1301〜S1304およびS1306〜S1308の処理は、S701〜S704およびS707〜S709と同じなので、説明を割愛する。   FIG. 13 shows a detailed flowchart for S603 in FIG. 6 in the second embodiment. Note that the processing of S1301 to S1304 and S1306 to S1308 in FIG. 13 is the same as S701 to S704 and S707 to S709, and thus the description thereof is omitted.

S1305で、頁領域の検出を実施する。本実施例では、ステープル位置が確定していない為、検出すべき頂点の数が分かっていない。そこで、S1305は画像データ中の4点の閉領域と8点の閉領域の両方を探す必要がある。この場合、原稿領域は画像データ中の閉領域の最大サイズである為、面積が閾値以上の閉領域が原稿領域になる。S1306〜S1308を経て、S1309で、ステープル位置が確定済みかどうかを判定する。撮影頁が、2頁、3頁の場合には、ステープル位置が確定していないので、S1310の処理を実施する。   In step S1305, the page area is detected. In this embodiment, since the staple position is not fixed, the number of vertices to be detected is unknown. In step S1305, it is necessary to search both the 4-point closed region and the 8-point closed region in the image data. In this case, since the document area is the maximum size of the closed area in the image data, the closed area whose area is equal to or larger than the threshold value is the document area. After steps S1306 to S1308, it is determined in step S1309 whether the staple position has been confirmed. When the shooting pages are 2 pages and 3 pages, the stapling position has not been determined, so the processing of S1310 is performed.

S1310で、S1307で撮影した画像データからステープル位置を確定する。例えば、図8(a)の様な左上をステープルしたポートレート原稿の場合、図8(b)で見られる様に左側の頁が横向きになっていれば、左上一カ所でステープルされている事が分かる。一方、図8(d)の様な右上をステープルしたポートレート原稿の場合、図8(e)で見られる様に左側の頁が横向きになっていれば、右上一カ所でステープルされている事が分かる。これらの違いは、2頁、3頁を撮影した画像データの頂点の位置関係でテンプレートマッチングを利用すれば可能である。テンプレートマッチングとは、図8(b)(e)(h)(k)と、図11(b)(e)(h)(k)の頂点の相対位置をROM303に記憶させておき、S1308で取得した各頂点との距離について統計的手段を用いて点数化、判定する手法である。但し、図8では頂点の数が8個で、図11の場合は頂点の数が4個である。S1305で既に頂点の数は確定しているので、テンプレートマッチングはステープルが一カ所の図8か、ステープル箇所が2カ所の図9かのどちらかだけを実施すれば良い。尚、テンプレートマッチングの詳細な手段については、様々な研究がなされており、本実施例でこれを限定するものではない。よって、詳細な説明は割愛する。   In step S1310, the staple position is determined from the image data captured in step S1307. For example, in the case of a portrait document in which the upper left side is stapled as shown in FIG. 8A, if the left page is turned sideways as seen in FIG. 8B, it is stapled at one upper left position. I understand. On the other hand, in the case of a portrait document with the upper right stapled as shown in FIG. 8D, if the left page is turned sideways as seen in FIG. 8E, it is stapled at one upper right position. I understand. These differences can be achieved by using template matching based on the positional relationship between the vertices of image data obtained by photographing pages 2 and 3. In template matching, the relative positions of the vertices in FIGS. 8B, 8E, 11H, 11K, 11B, 11E, 11H, and 11K are stored in the ROM 303, and in S1308 This is a technique for scoring and determining the distance to each acquired vertex using statistical means. However, in FIG. 8, the number of vertices is eight, and in the case of FIG. 11, the number of vertices is four. Since the number of vertices has already been determined in S1305, template matching need only be performed in either FIG. 8 with one staple or FIG. 9 with two staples. Various researches have been made on detailed means of template matching, and the present embodiment is not limited to this. Therefore, detailed description is omitted.

尚、テンプレートマッチングによるステープル位置の確定はサーバ121で処理する事も可能である。この場合には、ステープル位置が確定していなくても、図13のフローチャートにおいて、S1310の処理を実施しない。また、携帯端末101からサーバ121にステープル位置の情報は送信しない。そして、S608でトリミングを実施する時に、同時にS1306の処理をサーバ121の持つCPU401とROM403を用いて実施しても良い。   The determination of the staple position by template matching can be processed by the server 121. In this case, even if the stapling position is not fixed, the process of S1310 is not performed in the flowchart of FIG. Further, the staple position information is not transmitted from the portable terminal 101 to the server 121. When trimming is performed in step S608, the processing in step S1306 may be performed simultaneously using the CPU 401 and the ROM 403 included in the server 121.

以上説明したように、実施例2に係る画像処理装置を用いれば、ステープルされた両面原稿を携帯端末でスキャンした場合に、見開きを同時に撮影し、更に頁順に印刷する事が可能である。   As described above, when the image processing apparatus according to the second embodiment is used, when a stapled double-sided document is scanned with a portable terminal, it is possible to photograph a spread simultaneously and further print in page order.

[その他の実施例]
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
[Other Examples]
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program. It is a process to be executed.

101 携帯端末
310 画像処理装置
301 携帯端末のCPU
101 mobile terminal 310 image processing apparatus 301 CPU of mobile terminal

Claims (10)

複数枚をステープルした原稿を撮影した画像データにおいて前記ステープルの位置を確定するステープル位置確定手段と、
前記画像データの中の少なくとも1ページ分の原稿領域を検出する原稿領域検出手段と、
前記原稿領域検出手段により複数ページ分の原稿領域が検出された場合、前記ステープル位置確定手段により確定されたステープル位置に基づいて、前記複数ページ分の原稿領域における各ページの頁順を決定する制御手段を備えることを特徴とする画像処理装置。
Stapling position determining means for determining the position of the staple in image data obtained by photographing a document in which a plurality of sheets are stapled;
A document area detecting means for detecting a document area for at least one page in the image data;
Control for determining the page order of each page in the document area for the plurality of pages based on the staple position determined by the staple position determination means when the document area detection means detects a document area for a plurality of pages. An image processing apparatus comprising: means.
前記原稿領域検出手段により複数の原稿領域が検出された場合、前記制御手段は、前記決定した頁順に従って、前記原稿領域に対応する画像データをトリミングすることを特徴とする、請求項1に記載の画像処理装置。   2. The image processing apparatus according to claim 1, wherein when a plurality of document areas is detected by the document area detection unit, the control unit trims image data corresponding to the document area in accordance with the determined page order. Image processing apparatus. 前記ステープル位置確定手段は、ユーザにより入力される情報に基づいて前記ステープル位置を確定することを特徴とする、請求項1または2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the staple position determining unit determines the staple position based on information input by a user. 前記ステープル位置確定手段は、前記画像データの1頁目を用いて前記ステープル位置を確定することを特徴とする、請求項1または2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the staple position determining unit determines the staple position using a first page of the image data. 前記ステープル位置確定手段は、前記画像データの2頁目以降を用いて前記ステープル位置を確定することを特徴とする、請求項1または2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the staple position determining unit determines the staple position using the second and subsequent pages of the image data. 前記原稿領域検出手段により1つの原稿領域が検出された場合、前記制御手段は、前記原稿領域を前記画像データの最終の頁と決定することを特徴とする、請求項1および請求項3〜5のいずれか1項に記載の画像処理装置。   6. When one original area is detected by the original area detecting means, the control means determines the original area as the last page of the image data. The image processing apparatus according to any one of the above. 前記制御手段は、前記決定された頁順に従って前記画像データを印刷するよう印刷手段を制御することを特徴とする、請求項1〜6のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the control unit controls the printing unit to print the image data in accordance with the determined page order. 前記原稿領域検出手段は、前記画像データの中の矩形の領域に基づいて原稿領域を検出することを特徴とする、請求項1〜7のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the document area detecting unit detects a document area based on a rectangular area in the image data. 複数枚をステープルした原稿を撮影した画像データにおいて前記ステープルの位置を確定するステープル位置確定ステップと、
前記画像データの中の少なくとも1ページ分の原稿領域を検出する原稿領域検出ステップと、
前記原稿領域検出ステップにより複数ページ分の原稿領域が検出された場合、前記ステープル位置確定ステップにより確定されたステープル位置に基づいて、前記複数ページ分の原稿領域における各ページの頁順を決定する制御ステップを備えることを特徴とする、プロセッサにより実行される画像処理方法。
A staple position determining step for determining the position of the staple in image data obtained by photographing a document on which a plurality of sheets are stapled;
A document region detecting step for detecting a document region for at least one page in the image data;
Control for determining the page order of each page in the document area for the plurality of pages based on the staple position determined in the staple position determination step when a document area for a plurality of pages is detected in the document area detection step. An image processing method executed by a processor, comprising a step.
請求項9に記載の画像処理方法をコンピュータに実行させるプログラム。   A program for causing a computer to execute the image processing method according to claim 9.
JP2013121495A 2013-06-10 2013-06-10 Image processor, image processing method, and program Pending JP2014239367A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013121495A JP2014239367A (en) 2013-06-10 2013-06-10 Image processor, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013121495A JP2014239367A (en) 2013-06-10 2013-06-10 Image processor, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2014239367A true JP2014239367A (en) 2014-12-18

Family

ID=52136193

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013121495A Pending JP2014239367A (en) 2013-06-10 2013-06-10 Image processor, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2014239367A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017199103A (en) * 2016-04-26 2017-11-02 京セラドキュメントソリューションズ株式会社 Image processing system, image processing device, and image processing method
US11140295B2 (en) 2019-09-11 2021-10-05 Canon Kabushiki Kaisha Image reading apparatus and method configured to correct tilt image data
JP7395856B2 (en) 2019-07-01 2023-12-12 セイコーエプソン株式会社 Printing control device, printing control program, and printed matter production method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017199103A (en) * 2016-04-26 2017-11-02 京セラドキュメントソリューションズ株式会社 Image processing system, image processing device, and image processing method
CN107317947A (en) * 2016-04-26 2017-11-03 京瓷办公信息系统株式会社 Image processing system, image processing apparatus and image processing method
JP7395856B2 (en) 2019-07-01 2023-12-12 セイコーエプソン株式会社 Printing control device, printing control program, and printed matter production method
US11140295B2 (en) 2019-09-11 2021-10-05 Canon Kabushiki Kaisha Image reading apparatus and method configured to correct tilt image data

Similar Documents

Publication Publication Date Title
JP6433187B2 (en) Information processing apparatus, control method thereof, and computer program
JP6849387B2 (en) Image processing device, image processing system, control method of image processing device, and program
WO2014002689A1 (en) Image processing device and recording medium
US9485368B2 (en) Electronic document generation apparatus, recording medium, and electronic document generation system
US20150146020A1 (en) Determining apparatus, mobile terminal apparatus, and recording medium
JP2016152474A (en) Image processing system, image processing device, and image formation device
JP2019145030A (en) Image processing device, image formation apparatus, image processing method and program
JP2018107593A (en) Image processing apparatus, image processing method, and program
JP6907047B2 (en) Information processing equipment, its control method and program
JP2014239367A (en) Image processor, image processing method, and program
JP2014123881A (en) Information processing device, information processing method, and computer program
JP6676299B2 (en) Image processing apparatus, image processing method, and computer program
JP2002258682A (en) Image forming device
US10657723B2 (en) Image processing apparatus and image processing method
US10291805B1 (en) Image processing apparatus
CN102843479A (en) File scanning method, file scanning device and portable electronic device
JP2010021848A (en) Image processing apparatus, image processing method and program
JP6952499B2 (en) Information processing equipment and programs
JP6067040B2 (en) Information processing apparatus, information processing method, and program
JP2021190958A (en) Information processing apparatus, information processing method, information processing system, and program
JP5223792B2 (en) Image processing apparatus, photographing apparatus, photographing system, and program
JP5550309B2 (en) Image processing apparatus and display control method
JP2020141364A (en) Program, terminal device and controller
JP2017183766A (en) Server program, image generation device and image data generation method
JP4380268B2 (en) Image region selection method and apparatus