JP2014239367A - Image processor, image processing method, and program - Google Patents
Image processor, image processing method, and program Download PDFInfo
- 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
Links
Images
Abstract
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
しかしながら、特許文献1や特許文献2を用いた技術では、ステープルで綴じられた両面原稿を連続的に読み込む際、開いたページを効率的に読み込めない課題を残している。例えば、図8(a)は左上をステープルで綴じられた原稿の1ページ目である。図8(b)は図8(a)の原稿の2ページ目と3ページ目を開いた状態である。この場合、1ページ目は1枚の原稿画像であるが、2ページ目以降は1ページ目の裏が2ページ目となる為、2枚の原稿画像を同時に撮影できる。
However, the techniques using
この時、従来技術を用いて原稿領域検知と自動撮影をした場合、図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.
以下、本発明を実施するための最良の形態について図面を用いて説明する。 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
<携帯端末の構成>
図2に本実施例で利用する携帯端末101の外観を示す。図2(a)は、携帯端末101の表面である。表面には、タッチパネル201、操作ボタン202を持つ。図2(b)は携帯端末101の裏面である。裏面には、撮影部203が配置されている。なお、携帯端末には様々な種類が存在するが、本発明はカメラ機能を持つ端末装置ならば利用が可能である。すなわち、カメラ機能をもったスマートフォンや携帯電話でも、通信機能を持ったデジタルカメラでも構わない。また、カメラ機能には図示しないオートフォーカス装置が搭載されており、コントラスト比や赤外線の送受信タイミングなどによってピントの合った状態を自動的に検出しているが、これにより焦点距離や被写体距離を測定することができる。本実施例で利用するオートフォーカス装置は一例であり、焦点距離や被写体距離を測定できる方法ならば限定はしない。
<Configuration of mobile terminal>
FIG. 2 shows the appearance of the
図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
画像処理装置310は、原稿のエッジを検出するエッジ検出器3101、ステープルのパターンを検索するステープル検出器3102、原稿の矩形領域を検出する原稿領域検出器3103、特徴点の抽出を行う特徴点検出器3104を備えている。これらの検出器は画像処理装置310内のバスを経由して、携帯端末101のデータバス311と接続する。
The
<サーバの構成>
図4はサーバ121の構成例である。CPU401は、ROM403に記憶された制御プログラムを読み出して各種制御処理を実行する。RAM402は、CPU401の主メモリ、ワークエリア等の一時記憶領域として用いられる。ネットワークI/F404は、サーバ121をインターネット120に接続し、他の装置との間で各種情報を送受信する。HDD405は、画像データや各種プログラムを記憶する。
<Server configuration>
FIG. 4 is a configuration example of the
図4において、ネットワークI/F部404を介して受信した携帯端末101からの画像データは、データバス410を介してCPU401、RAM402、ROM403の間で送受される。CPU401がROM403やHDD405に格納された画像処理プログラムを実行することによって、画像データに対する画像処理が実現される。更に、画像処理された画像データは、プリント用のPDL(ページ記述言語)に変換されて、通常のプリンタで印刷可能なデータに変換される。
In FIG. 4, image data from the
<プリンタの構成>
図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
入力された画像データはネットワークI/F部501を介してコントローラ部500へ送られる。続いてPDL(ページ記述言語)データ処理部502がPDL解釈、レンダリングを行って、画像処理部503がプリント出力用画像処理を行い、プリンタ部511が処理済み画像データをプリントする。
The input image data is sent to the controller unit 500 via the network I /
<処理フローの詳細説明>
図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
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
S602で、対象となるプリンタ103が見つかると、プリンタ103は印刷時に設定可能な印刷設定情報を、LAN110、無線ルータ102を介して携帯端末101に通知する。ここでの印刷設定情報は、使用可能な用紙サイズや用紙種類、出力解像度、両面印刷が可能か、Nin1印刷が可能か、カラー印刷が可能か、ステープルが可能か、といった情報である。これらの印刷設定情報を用いて、携帯端末101は撮影画像をプリントする際にどの印刷設定を用いるかを決定する。
In step S <b> 602, when the
S603で、撮影部203を用いて原稿を撮影することで、撮影画像データを得る。その撮影画像データ内における原稿領域を、原点の頂点を抽出することにより取得する。なお撮影画像データは原稿以外(例えば原稿が置かれた机)を写した領域も含み、原稿領域はその撮影画像データ内において原稿を写した領域のことである。更に、ステープルされた原稿の場合には、ステープル位置を確定する。この時、ステープルされた原稿は、利用者によって改頁された原稿を連続撮影しながら原稿の頂点を抽出する。S603については、後に図7を用いて詳細に説明する。
In step S <b> 603, photographed image data is obtained by photographing a document using the photographing
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
S607で、サーバ121は圧縮された撮影画像データを解凍する。S608で、画像データの整形処理を行う。整形処理には、画像のトリミングや変倍、回転等がある。トリミングは、画像データの中で複数ページ分の原稿領域を含む頂点がある場合には、その画像データに含まれる複数ページ分の原稿領域を、複数ページのそれぞれのページに対応する領域に分割する。そして、複数ページのそれぞれのページに対応する領域を1ページ分の原稿の画像データとしてそれぞれ生成し、分割後の各ページの原稿の画像データを、前頁、後頁の頁順に並べる。尚、トリミング方法については、後に詳しく説明する。更に、それぞれの画像データに対してアフィン変換やキュービック変倍や線形変倍などの他の公知の変倍技術を利用する。これにより、原稿領域だけの画像データを生成する。複数の画像データは、ステープル情報に基づき、前頁と後頁としてS609以降の処理を順次実施する。ここで、前頁の処理が実施されている間は、後頁はRAM402やHDD405に蓄積されて処理を待つ。
In step S607, the
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
S615で、インターネット120とLAN110を介してサーバ121から補正済み撮影画像データと印刷設定を取得する。以降、プリンタ103は撮影画像データをプリントするまでの処理を行う。S615〜S619の処理は画像処理部503で実施される。
In step S615, corrected captured image data and print settings are acquired from the
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
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
最後に、S622で、プリント終了通知を携帯端末101のタッチパネル201に表示して、処理を終了する。
Finally, in step S622, a print end notification is displayed on the
<原稿撮影(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
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
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
先ず自動で検出する方法を説明する。一般的なプリンタにおいて、ステープル位置は、左上隅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
端末画面201から入力を受け付ける方法としては、撮影部203が取得する画像データを端末画面201に表示し、利用者によってクリックされた位置をステープル位置として決定する。この時、図8に示したステープル位置以外の領域がクリックされた場合には、その入力は無効である。この時は、ステープルされていない原稿と判定する。
As a method of accepting an input from the
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
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
一方、自動判定の場合は、撮影部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
<第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
S1502で、特徴点検出器3104を用いて特徴点の抽出を行う。特徴点の抽出方法には様々な手法が考案されており、今でも研究が続けられている。例えば、古典的な方法ではパターンマッチングによる抽出方法などがある。但し、本実施例では、これを特定するものではない為、詳細説明は割愛する。図16は2値のエッジ画像から特徴点を抽出した時の画像の例である。原稿領域の特徴点の他に、原稿領域外のもの(例えば、机上のもの)も撮影されており、これらの角も特徴点として検出する。更に原稿領域内の文字や図形等の角も、特徴点として検出する。
In step S1502, feature points are extracted using the
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
<第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
S902で、特徴点検出器3104を用いて特徴点の抽出を行う。特徴点の抽出方法には様々な手法が考案されており、今でも研究が続けられている。例えば、古典的な方法ではパターンマッチングによる抽出方法などがある。但し、本実施例では、これを特定するものではない為、詳細説明は割愛する。図10は2値のエッジ画像から特徴点を抽出した時の画像である。原稿領域の特徴点の他に、原稿領域外のもの(例えば、机上のもの)も撮影されており、これらの角も特徴点として検出する。更に原稿領域内の文字や図形等の角も、特徴点として検出する。
In step S902, feature points are extracted using the
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
以上の説明は、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
頂点の数が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
以上説明したように、本実施例に係る画像処理装置を用いれば、ステープルされた両面原稿を携帯端末でスキャンした場合に、見開きを同時に撮影し、更に頁順に印刷する事が可能である。 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
尚、テンプレートマッチングによるステープル位置の確定はサーバ121で処理する事も可能である。この場合には、ステープル位置が確定していなくても、図13のフローチャートにおいて、S1310の処理を実施しない。また、携帯端末101からサーバ121にステープル位置の情報は送信しない。そして、S608でトリミングを実施する時に、同時にS1306の処理をサーバ121の持つCPU401とROM403を用いて実施しても良い。
The determination of the staple position by template matching can be processed by the
以上説明したように、実施例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
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ページ分の原稿領域を検出する原稿領域検出ステップと、
前記原稿領域検出ステップにより複数ページ分の原稿領域が検出された場合、前記ステープル位置確定ステップにより確定されたステープル位置に基づいて、前記複数ページ分の原稿領域における各ページの頁順を決定する制御ステップを備えることを特徴とする、プロセッサにより実行される画像処理方法。 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.
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)
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 |
-
2013
- 2013-06-10 JP JP2013121495A patent/JP2014239367A/en active Pending
Cited By (4)
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 |