JP6426815B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP6426815B2
JP6426815B2 JP2017208375A JP2017208375A JP6426815B2 JP 6426815 B2 JP6426815 B2 JP 6426815B2 JP 2017208375 A JP2017208375 A JP 2017208375A JP 2017208375 A JP2017208375 A JP 2017208375A JP 6426815 B2 JP6426815 B2 JP 6426815B2
Authority
JP
Japan
Prior art keywords
image
unit
display
processing
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017208375A
Other languages
Japanese (ja)
Other versions
JP2018042273A (en
Inventor
祐司 石田
祐司 石田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Publication of JP2018042273A publication Critical patent/JP2018042273A/en
Application granted granted Critical
Publication of JP6426815B2 publication Critical patent/JP6426815B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、撮像装置にて撮像した画像を画像出力装置により出力する撮像画像処理システムに関する。   The present invention relates to a captured image processing system that outputs an image captured by an imaging device by an image output device.

インターネット技術の進展と伴に携帯電話など携帯端末装置を利用して撮像した画像を保存する機会が増えてきている。また、単純に風景や、人物などを被写体とするだけではなく、各種ショーなどで展示されている説明図や説明文、あるいは学会等でのスライドを撮影する機会も増大してきている。このような携帯端末装置で撮影された画像を保存する際には、撮影日などの情報を元に自動的に付加されるファイル名を用いるか、自分でファイル名を作成し、保存するのが一般的である。   Along with the progress of the Internet technology, opportunities for storing images captured using mobile terminal devices such as mobile phones are increasing. In addition to simply taking a landscape, a person, etc. as subjects, the opportunity to photograph slides of explanatory diagrams and explanatory texts exhibited at various shows and the like, or academic conferences and the like is also increasing. When saving an image captured by such a portable terminal device, it is preferable to use a file name that is automatically added based on information such as the shooting date, or to create a file name and save it yourself. It is common.

また、特許文献1には、撮像により記憶部に取り込まれた画像データから画像の輪郭を求め、求めた輪郭から撮像対象物の形状を求める技術が開示されている。そして、求められた撮像対象物の形状と実際の撮影対象物との射影パラメータを求め、この射影パラメータを用いて画像変換を行う。   Further, Patent Document 1 discloses a technique for obtaining an outline of an image from image data captured into a storage unit by imaging, and obtaining a shape of an imaging object from the obtained outline. Then, projection parameters between the determined shape of the imaging object and the actual imaging object are determined, and image conversion is performed using the projection parameters.

特開2005−122320号公報(2005年5月12日公開)Unexamined-Japanese-Patent No. 2005-122320 (May 12, 2005 publication)

しかしながら、上記特許文献1に示す技術は、撮像により記憶部に取り込まれた画像データから撮像対象物の形状を求めるものであり、所望の形状が抽出できなかった場合は再度撮像を行う必要がある。また、所望の形状が抽出できたとしても、撮像範囲外に撮像対象物の一部が存在する場合、対象物の一部が撮像できていない事になる。   However, the technique disclosed in Patent Document 1 is to obtain the shape of the object to be imaged from the image data taken into the storage unit by imaging, and when the desired shape can not be extracted, it is necessary to perform imaging again . Moreover, even if a desired shape can be extracted, when a part of the imaging target object exists outside the imaging range, a part of the target object can not be imaged.

本発明は、上記課題を解決するためになされたものであり、対象物が撮像範囲内でどのような位置にあるかを容易に確認したうえで画像データを記憶部に取り込むことが可能な撮像装置、撮像画像処理システム、プログラムおよび記録媒体を提供することを目的とする。   The present invention has been made to solve the above problems, and it is possible to capture image data into a storage unit after easily confirming what position the object is in within the imaging range. An object is to provide an apparatus, a captured image processing system, a program and a recording medium.

上記の課題を解決するために、本発明の画像処理装置は、対象物を撮像した撮像画像を表示する表示手段を備え、上記対象物が矩形であり、上記撮像画像は、出力対象画像が決定される前に上記表示手段に表示される第1撮像画像および当該出力対象画像として決定された第2撮像画像を含み、上記出力対象画像が決定される前に、上記第1撮像画像の上記対象物の範囲を所定の矩形状に幾何学補正した第1補正処理後画像を上記表示手段に表示させ、上記出力対象画像が決定された後に、上記第2撮像画像の上記対象物の範囲を所定の矩形状に幾何学補正した第2補正処理後画像を上記表示手段に表示させる表示処理部を備えることを特徴とする。   In order to solve the above-mentioned subject, the image processing device of the present invention is provided with the display means which displays the picturized picture which picturized the subject, the above-mentioned subject is a rectangle, and the above-mentioned pictorial image determines the output subject picture And the second captured image determined as the output target image, and before the output target image is determined, the target of the first captured image is determined. The first correction processed image in which the object range is geometrically corrected to a predetermined rectangular shape is displayed on the display means, and the output object image is determined, and then the object range of the second captured image is specified. And a display processing unit configured to display the image after the second correction processing geometrically corrected in the rectangular shape on the display unit.

上記の構成によれば、出力対象画像が決定される前に、第1補正処理後画像を表示手段に表示させ、出力対象画像が決定された後に、第2補正処理後画像を上記表示手段に表示させる。このため、出力対象画像が決定される前後において、撮像画像に対して幾何学補正を行ったときの補正処理後画像を表示(プレビュー表示)させることができる。   According to the above configuration, the image after the first correction processing is displayed on the display unit before the output target image is determined, and the image after the second correction processing is displayed on the display unit after the output target image is determined. Display. Therefore, it is possible to display (preview display) an image after correction processing when geometric correction is performed on the captured image before and after the output target image is determined.

さらに、本発明の画像処理装置において、上記表示処理部は、上記第1撮像画像と上記第1補正処理後画像とを同一画面内に表示させ、上記第2撮像画像と上記第2補正処理後画像とを同一画面内に表示させることが好ましい。   Further, in the image processing apparatus according to the present invention, the display processing unit displays the first captured image and the image after the first correction processing in the same screen, and the second captured image and the second correction processing It is preferable to display the image on the same screen.

上記の構成によれば、撮像画像と、補正処理後画像とを表示手段の同一画面内に表示させる。このため、撮像画像に対して幾何学補正を行ったときの補正処理後画像を表示(プレビュー表示)させることができる。   According to the above configuration, the captured image and the image after correction processing are displayed in the same screen of the display means. Therefore, it is possible to display (preview display) an image after correction processing when geometric correction is performed on the captured image.

さらに、本発明の画像処理装置において、上記撮像画像において、線分状に連なるエッジ画素群を検出する検出部をさらに備え、上記表示処理部が、上記検出部により検出された上記エッジ画素群の上に、上記検出部により検出された4つのエッジ画素群で示される4つの線分の各々に対応する直線で囲まれる上記対象物の輪郭を示す四角形の輪郭線を、上記撮像画像に重ねて表示させることが好ましい。   Furthermore, in the image processing apparatus according to the present invention, the image pickup apparatus further includes a detection unit that detects an edge pixel group connected in a line segment in the captured image, and the display processing unit detects the edge pixel group detected by the detection unit. A rectangular outline indicating the outline of the object surrounded by a straight line corresponding to each of the four line segments indicated by the four edge pixel groups detected by the detection unit is superimposed on the captured image. It is preferable to display.

上記の構成によれば、検出部により検出されたエッジ画素群の上に、対象物の輪郭を示す輪郭線を重ねて表示される。ここで、検出部により検出されたエッジ画素群は、線分状に連なるものであり、矩形の対象物と背景との境界を示す確率が非常に高いものである。そのため、エッジ画素群の上に、対象物の輪郭を示す輪郭線が重ねて表示されることにより、ユーザは、撮像画像において対象物がどのような位置にあるのかを容易に確認することができる。その結果、ユーザは、対象物が撮像範囲内でどのような位置にあるかを容易に確認したうえで画像データを記憶部に取り込むことが可能となる。   According to the above configuration, an outline indicating the outline of the object is superimposed and displayed on the edge pixel group detected by the detection unit. Here, the edge pixel group detected by the detection unit is continuous in a line segment, and the probability of showing the boundary between the rectangular object and the background is very high. Therefore, the contour line indicating the contour of the object is displayed superimposed on the edge pixel group, so that the user can easily confirm the position of the object in the captured image. . As a result, the user can easily capture image data into the storage unit after easily confirming what position the object is in the imaging range.

さらに、本発明の画像処理装置において、上記表示処理部が、上記輪郭線の頂点の座標を編集する指示を受け付け、編集された頂点の座標を結ぶ上記輪郭線で囲まれる領域の画像を基に上記第1補正処理後画像および上記第2補正処理後画像を生成することが好ましい。   Furthermore, in the image processing apparatus according to the present invention, the display processing unit receives an instruction to edit the coordinates of the vertex of the contour, and the image of the area surrounded by the contour connects the coordinates of the edited vertex. Preferably, the image after the first correction processing and the image after the second correction processing are generated.

上記の構成によれば、ユーザは、所望の輪郭線で囲まれる領域に基づいた上記第1補正処理後画像および上記第2補正処理後画像を出力させることができる。   According to the above configuration, the user can output the image after the first correction processing and the image after the second correction processing based on the area surrounded by the desired outline.

さらに、本発明の画像処理装置は、上記表示処理部による輪郭線の表示機能を有効にするか無効にするかを切り替える切替部を備えていることが好ましい。   Furthermore, it is preferable that the image processing apparatus of the present invention includes a switching unit that switches whether the display function of the outline processing by the display processing unit is enabled or disabled.

上記の構成によれば、ユーザは、対象物が原稿のような矩形である場合に輪郭線の表示機能を有効に切り替え、輪郭線を表示させる必要が無い対象物の場合に輪郭線の表示機能を無効に切り替えることができる。   According to the above configuration, the user effectively switches the display function of the outline when the object is a rectangle such as a document, and the display function of the outline when it is not necessary to display the outline. Can be switched off.

さらに、本発明の画像処理装置において、上記表示処理部は、上記切替部が上記輪郭線の表示機能を有効に設定している場合、幾何学補正された上記第1補正処理後画像および上記第2補正処理後画像を上記表示手段に表示させることが好ましい。   Furthermore, in the image processing apparatus according to the present invention, when the switching unit effectively sets the display function of the outline, the display processing unit performs the geometrically corrected image after the first correction processing and the first correction processing. Preferably, the image after the 2 correction processing is displayed on the display means.

上記の構成によれば、切替部を操作することで、撮像画像に対して幾何学補正を行ったときの補正処理後画像を表示させることができる。   According to the above configuration, by operating the switching unit, it is possible to display an image after correction processing when geometric correction is performed on a captured image.

また、本発明の画像処理方法は、対象物を撮像した撮像画像を表示する表示手段を備え、上記対象物が矩形状であり、上記撮像画像は、出力対象画像が決定される前に上記表示手段に表示される第1撮像画像および当該出力対象画像として決定された第2撮像画像を含む画像処理装置の画像処理方法であって、(a)上記出力対象画像が決定される前に、上記第1撮像画像の上記対象物の範囲を所定の矩形状に幾何学補正した第1補正処理後画像を上記表示手段に表示させ、上記出力対象画像が決定された後に、上記第2撮像画像の上記対象物の範囲を所定の矩形状に幾何学補正した第2補正処理後画像を上記表示手段に表示させるステップを有する。   The image processing method according to the present invention further includes display means for displaying a captured image obtained by capturing an object, wherein the object is rectangular, and the captured image is displayed before the output object image is determined. An image processing method of an image processing apparatus including a first captured image displayed on a means and a second captured image determined as the output target image, wherein: (a) the above-mentioned output target image is determined After the first corrected image is displayed on the display means, in which the range of the object of the first captured image is geometrically corrected to a predetermined rectangular shape, and after the output target image is determined, the second captured image And displaying the second correction-processed image on which the range of the object is geometrically corrected to a predetermined rectangular shape on the display means.

上記の方法によれば、出力対象画像が決定される前に、第1補正処理後画像を表示手段に表示させ、出力対象画像が決定された後に、第2補正処理後画像を上記表示手段に表示させる。このため、出力対象画像が決定される前後において、撮像画像に対して幾何学補正を行ったときの補正処理後画像を表示(プレビュー表示)させることができる。   According to the above method, the first corrected image is displayed on the display unit before the output target image is determined, and the second corrected processing image is displayed on the display unit after the output target image is determined. Display. Therefore, it is possible to display (preview display) an image after correction processing when geometric correction is performed on the captured image before and after the output target image is determined.

さらに、本発明の画像処理装置において、上記表示処理部は、上記第1撮像画像と上記第1補正処理後画像とを同一画面内に表示させ、上記第2撮像画像と上記第2補正処理後画像とを同一画面内に表示させることが好ましい。   Further, in the image processing apparatus according to the present invention, the display processing unit displays the first captured image and the image after the first correction processing in the same screen, and the second captured image and the second correction processing It is preferable to display the image on the same screen.

さらに、本発明の画像処理方法において、上記ステップ(a)で、上記第1撮像画像と上記第1補正処理後画像とを同一画面内に表示させ、上記第2撮像画像と上記第2補正処理後画像とを同一画面内に表示させる。   Further, in the image processing method of the present invention, in the step (a), the first captured image and the image after the first correction processing are displayed in the same screen, and the second captured image and the second correction processing Display the post-image on the same screen.

上記の方法によれば、撮像画像と、補正処理後画像とを表示手段の同一画面内に表示させる。このため、撮像画像に対して幾何学補正を行ったときの補正処理後画像を表示(プレビュー表示)させることができる。   According to the above method, the captured image and the image after correction processing are displayed on the same screen of the display means. Therefore, it is possible to display (preview display) an image after correction processing when geometric correction is performed on the captured image.

さらに、本発明の画像処理方法において、上記撮像画像において、線分状に連なるエッジ画素群を検出するステップ(b)をさらに有し、上記ステップ(a)で、上記ステップ(b)で検出された上記エッジ画素群の上に、上記ステップ(b)で検出された4つのエッジ画素群で示される4つの線分の各々に対応する直線で囲まれる上記対象物の輪郭を示す四角形の輪郭線を、上記撮像画像に重ねて表示させる。   Furthermore, the image processing method according to the present invention further includes the step (b) of detecting a group of edge pixels connected in a line segment in the captured image, and the step (a) detects the edge pixel group. On the edge pixel group, a rectangular outline indicating the outline of the object surrounded by a straight line corresponding to each of the four line segments indicated by the four edge pixel groups detected in the step (b) Is superimposed on the captured image and displayed.

上記の方法によれば、エッジ画素群の上に、対象物の輪郭を示す輪郭線が重ねて表示されることにより、ユーザは、撮像画像において対象物がどのような位置にあるのかを容易に確認することができる。その結果、ユーザは、対象物が撮像範囲内でどのような位置にあるかを容易に確認したうえで画像データを記憶部に取り込むことが可能となる。   According to the above-described method, the user can easily find out what position the object is in the captured image by displaying an outline indicating the outline of the object overlapping on the edge pixel group. It can be confirmed. As a result, the user can easily capture image data into the storage unit after easily confirming what position the object is in the imaging range.

さらに、本発明の画像処理方法において、上記ステップ(a)で、上記輪郭線の頂点の座標を編集する指示を受け付け、編集された頂点の座標を結ぶ上記輪郭線で囲まれる領域の画像を基に上記第1補正処理後画像および上記第2補正処理後画像を生成する。   Furthermore, in the image processing method of the present invention, in the step (a), an instruction to edit the coordinates of the vertex of the contour is received, and the image of the area surrounded by the contour connecting the coordinates of the edited vertex is The image after the first correction processing and the image after the second correction processing are generated.

上記の方法によれば、ユーザは、所望の輪郭線で囲まれる領域に基づいた補正処理後画像を出力させることができる。   According to the above method, the user can output the image after correction processing based on the area surrounded by the desired outline.

さらに、本発明の画像処理方法において、上記ステップ(a)における上記輪郭線の表示機能を有効にするか無効にするかを切り替えるステップ(c)をさらに有する。   Furthermore, the image processing method of the present invention further includes a step (c) of switching whether the display function of the outline in the step (a) is enabled or disabled.

上記の方法によれば、ユーザは、対象物が原稿のような矩形である場合に輪郭線の表示機能を有効に切り替え、輪郭線を表示させる必要が無い対象物の場合に輪郭線の表示機能を無効に切り替えることができる。   According to the above method, the user effectively switches the display function of the outline when the object is a rectangle such as a document, and the display function of the outline when it is not necessary to display the outline. Can be switched off.

さらに、本発明の画像処理方法において、上記ステップ(a)で、上記ステップ(c)で上記輪郭線の表示機能を有効に設定している場合、幾何学補正された上記第1補正処理後画像および上記第2補正処理後画像を上記表示手段に表示させる。   Furthermore, in the image processing method of the present invention, when the display function of the outline is set to be effective in the step (c) in the step (a), the geometrically corrected image after the first correction processing And displaying the image after the second correction processing on the display means.

上記の方法によれば、輪郭線の表示機能を切り替えることで、撮像画像に対して幾何学補正を行ったときの補正処理後画像を表示させることができる。   According to the above method, by switching the display function of the outline, it is possible to display an image after correction processing when geometrical correction is performed on the captured image.

本発明は、対象物が撮像範囲内でどのような位置にあるかをユーザが容易に確認したうえで画像データを記憶部に取り込むことが可能な撮像装置を実現することができるという効果を奏する。   The present invention has the effect of being able to realize an imaging device capable of capturing image data into the storage unit after the user easily confirms what position the object is in the imaging range. .

本発明の一実施形態に係る撮像画像処理システムの全体構成を示す図である。FIG. 1 is a diagram showing an entire configuration of a captured image processing system according to an embodiment of the present invention. 本発明の一実施形態に係る携帯端末装置の構成を示すブロック図である。It is a block diagram which shows the structure of the portable terminal device which concerns on one Embodiment of this invention. 携帯端末装置が備える撮像範囲判定部の構成を示すブロック図である。It is a block diagram which shows the structure of the imaging range determination part with which a portable terminal device is provided. 撮像範囲判定部の処理の一例を示すフローチャートである。It is a flowchart which shows an example of a process of an imaging range determination part. エッジ画像の生成例を示す図である。It is a figure which shows the example of a production | generation of an edge image. 連結エッジ領域のラベリングの方法を示す図である。It is a figure which shows the method of labeling of a connection edge area | region. 撮像対象物と背景との境界となる連結エッジ領域の候補である特徴領域の抽出処理の一例を示すフローチャートである。It is a flow chart which shows an example of extraction processing of a feature field which is a candidate of a connection edge field which serves as a boundary of an imaging subject and a background. 多数の連結エッジ領域を含むエッジ画像から特徴領域を抽出する様子を示す図である。It is a figure which shows a mode that a feature area | region is extracted from the edge image containing many connection edge area | regions. 矩形の撮像対象物と背景との境界の上辺となるエッジ画素群の近似直線を特定する直線抽出処理の一例を示すフローチャートである。It is a flowchart which shows an example of a straight-line extraction process which specifies the approximate straight line of the edge pixel group used as the upper side of the boundary of a rectangular imaging target object and a background. 矩形の撮像対象物と背景との境界の左辺となるエッジ画素群の近似直線を特定する直線抽出処理の一例を示すフローチャートである。It is a flow chart which shows an example of straight line extraction processing which specifies an approximate straight line of an edge pixel group which serves as a left side of a boundary between a rectangular imaging target and a background. 特徴領域の中から、矩形の撮像対象物と背景との境界となる四角形の上辺、左辺、右辺、下辺を構成する、線分状に連なるエッジ画素群を抽出する例を示す図である。It is a figure which shows the example which extracts the edge pixel group which continues in a line form which comprises the upper side of the square which becomes a boundary of a rectangular imaging target object and a background, a left side, a right side, and a lower side among feature areas. エッジ画素群の近似直線の交点を求める例を示す図である。It is a figure which shows the example which calculates | requires the intersection of the approximate straight line of an edge pixel group. 表示処理部の処理例を示すフローチャートである。It is a flowchart which shows the process example of a display process part. 撮像対象物が撮像範囲内であることを示す情報が表示された画面例を示す図である。It is a figure which shows the example of a screen where the information which shows that an imaging target object is in an imaging range was displayed. 第1欠落情報が表示された画面例を示す図である。It is a figure showing an example of a screen where the 1st lack information was displayed. 第2欠落情報が表示された画面例を示す図である。It is a figure showing an example of a screen where the 2nd lack information was displayed. 幾何学的配置検出部による画像の幾何学的歪みの検出例を示す図である。It is a figure which shows the example of a detection of geometric distortion of the image by a geometric arrangement detection part. 画像における撮像対象物のエッジ検出処理例を示す図である。It is a figure which shows the example of an edge detection process of the imaging target object in an image. 画像のラスター方向のエッジ検出例を示す図である。It is a figure which shows the example of edge detection of the raster direction of an image. 本発明の一実施形態に係る画像形成装置の構成を示すブロック図である。FIG. 1 is a block diagram showing the configuration of an image forming apparatus according to an embodiment of the present invention. 画像形成装置が有する画像処理部の構成を示すブロック図である。FIG. 2 is a block diagram showing a configuration of an image processing unit included in the image forming apparatus. 画像のカラーバランス調整時に作成するルックアップテーブルの一例を示す図である。FIG. 7 is a diagram showing an example of a look-up table created at the time of color balance adjustment of an image. 画像のレンズ歪みの補正例を示す図である。It is a figure which shows the example of correction | amendment of the lens distortion of an image. 画像の幾何学的歪みおよび傾きの補正例を示す図である。It is a figure which shows the example of correction | amendment of geometric distortion and inclination of an image. 高解像度補正の処理の一例を示すフローチャートである。It is a flow chart which shows an example of processing of high resolution amendment. 高解像度画像データにおける基準画素と補間画素とを示している。The reference pixel and the interpolation pixel in high resolution image data are shown. 1次微分フィルタ例を示す図である。It is a figure which shows an example of a first order differential filter. 補間画素の画素値の決定方法を示す図である。It is a figure which shows the determination method of the pixel value of an interpolation pixel. 画像形成装置の処理の流れの全体を示すフローチャートである。5 is a flowchart showing the entire processing flow of the image forming apparatus. 第1欠落情報の表示例を示す図である。It is a figure which shows the example of a display of 1st missing information. 第2欠落情報の表示例を示す図である。It is a figure which shows the example of a display of 2nd missing information. オートシャッタ機能が有効である場合の画面例を示す図である。It is a figure which shows the example of a screen in case the auto-shutter function is effective. 変形形態に係る携帯端末装置の構成を示すブロック図である。It is a block diagram which shows the structure of the portable terminal device which concerns on a modification. 画像の傾き検出例を示す図である。It is a figure which shows the example of an inclination detection of an image. 図34の傾き検出例における傾き角度θとその正接値を示す図である。It is a figure which shows inclination-angle (theta) in the example of inclination detection of FIG. 34, and its tangent value. 画像の再構成画素値の決定例を示す図である。It is a figure which shows the example of determination of the reconstruction pixel value of an image. 特徴領域抽出処理(S3)の変形例を示すフローチャートである。It is a flowchart which shows the modification of feature field extraction processing (S3). 図37に示す特徴領域抽出処理によって撮像画像から特徴領域が抽出される様子を示す図である。It is a figure which shows a mode that a feature area | region is extracted from a captured image by the feature area | region extraction process shown in FIG. 撮像画像に対して適用する検出方法の決定処理を示すフローチャートである。It is a flowchart which shows the determination process of the detection method applied with respect to a captured image. 図39のフローチャートにより検出方法を決定する例を示す図である。It is a figure which shows the example which determines a detection method by the flowchart of FIG. 図13に示すS611において行われる処理例を示すフローチャートである。It is a flowchart which shows the example of a process performed in S611 shown in FIG. 図13のS612においてNo、S614においてNo、またはS615においてNoの場合に行われる処理例を示すフローチャートである。FIG. 14 is a flowchart illustrating an example of processing performed in the case of No in S612, No in S614, or No in S615 in FIG. 13. 図41および図42の処理に従って表示処理部が動作したときの表示部の画面例を示す図である。It is a figure which shows the example of a screen of a display part when a display process part operate | moves according to the process of FIG. 41 and FIG. 撮像範囲判定部の変形例を示すブロック図である。It is a block diagram which shows the modification of an imaging range judgment part. ドキュメント補正モードのオン/オフ切り替え用のチェックボックスを含む画面例を示す図である。FIG. 8 is a diagram showing an example of a screen including a check box for switching document correction mode on / off. 補正処理後画像が表示された画面例を示す。The example of a screen where the image after correction processing was displayed is shown.

以下、本発明の実施の形態について、詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail.

(1)撮像画像処理システムの全体構成
図1は、本発明に係る撮像画像処理システムの全体構成を示す図である。図1に示されるように、撮像画像処理システムは、カメラ付き携帯電話、デジタルスチルカメラなど、撮像手段を備えた携帯端末装置(撮像装置)100、複合機、プリンタなどの画像形成装置(画像出力装置)200、および、インフォメーションディスプレイや電子黒板などの画像表示装置(画像出力装置)300を備える。
(1) Overall Configuration of Captured Image Processing System FIG. 1 is a view showing the overall configuration of a captured image processing system according to the present invention. As shown in FIG. 1, the captured image processing system is an image forming apparatus (image output such as a mobile terminal (imaging apparatus) 100 equipped with an imaging unit such as a camera-equipped mobile phone, a digital still camera, etc. Apparatus) 200, and an image display apparatus (image output apparatus) 300 such as an information display or an electronic blackboard.

携帯端末装置100は、ユーザによって携帯されるものである。ユーザは、様々な場面で携帯端末装置100により対象物を撮像することができる。   The portable terminal device 100 is carried by a user. The user can capture an object with the mobile terminal device 100 in various situations.

本実施形態において、携帯端末装置100は、文書画像が印刷された用紙やポスター、文書画像が表示されている表示画面(例えば、ディスプレイ画面やプロジェクターにより投影された画面)のような矩形状の撮像対象物を撮像し、当該撮像により得られた画像を画像形成装置200または画像表示装置300から出力するための文書撮像モードの機能を有している。すなわち、携帯端末装置100は、文書撮像モードでの撮像により得られ、画像形成装置200または画像表示装置300にて出力する対象となる画像データ(以下、出力対象画像データという)を画像形成装置200または画像表示装置300に送信する。   In the present embodiment, the portable terminal device 100 captures a rectangular image such as a sheet on which a document image is printed, a poster, or a display screen on which the document image is displayed (for example, a display screen or a screen projected by a projector). It has a function of a document imaging mode for imaging an object and outputting an image obtained by the imaging from the image forming apparatus 200 or the image display apparatus 300. That is, the portable terminal device 100 obtains image data (hereinafter referred to as output target image data) which is obtained by imaging in the document imaging mode and is a target to be output by the image forming device 200 or the image display device 300. Or it transmits to the image display device 300.

そして、画像形成装置200は、受信した出力対象画像データに対して所定の画像処理を施し、画像処理後の出力対象画像データ(以下、補正済画像データという)、もしくは、補正済画像データで示される画像を出力する。また、画像表示装置300は、出力対象画像データの表示処理を行う。   Then, the image forming apparatus 200 performs predetermined image processing on the received output target image data, and indicates the output target image data after image processing (hereinafter referred to as corrected image data) or corrected image data. Output an image. Further, the image display apparatus 300 performs display processing of output target image data.

ここで、ユーザは、矩形状の撮像対象物である、文書画像が印刷された用紙やポスター、文書画像が表示されている表示画面などに対して、常に正面から撮像できるとは限らない。すなわち、ユーザは、撮像対象物における、文書画像が形成された平面の法線方向と、撮像手段の撮像方向とが一致しない状態で、斜め方向から撮像対象物を撮像する場合がある。この場合、撮像手段による撮像範囲から撮像対象物の一部がはみ出した状態、つまり、撮像対象物の一部が欠けた状態で撮像してしまうことがある。このような場合、ユーザが所望する情報の一部が欠けた状態で撮像されることとなる。本実施形態では、上記文書撮像モードが選択された場合、このような撮像対象物の一部が撮像範囲からはみ出した状態で撮像されることを防止する機能を携帯端末装置100が有している。   Here, the user may not always be able to capture an image from the front with respect to a rectangular imaging object, a sheet on which a document image is printed, a poster, a display screen on which the document image is displayed, or the like. That is, the user may pick up an image of the imaging object from an oblique direction in a state in which the normal direction of the plane on which the document image is formed in the imaging object does not match the imaging direction of the imaging means. In this case, an image may be captured in a state in which a part of the imaging target protrudes from the imaging range of the imaging unit, that is, in a state in which a part of the imaging target is missing. In such a case, imaging is performed in a state where part of the information desired by the user is missing. In the present embodiment, when the document imaging mode is selected, the mobile terminal device 100 has a function of preventing imaging in a state where a part of such an imaging target is out of the imaging range. .

なお、画像形成装置200で実行される出力処理としては、補正済画像データで示される画像を印刷して出力する印刷処理、サーバやUSBメモリなどの記憶装置へ出力対象画像データを格納するファイリング処理、電子メールに補正済画像データを添付して送信するメール送信処理などがある。画像表示装置300で実行される出力処理は、出力対象画像データの表示処理である。   Note that, as output processing executed by the image forming apparatus 200, printing processing that prints and outputs an image indicated by the corrected image data, filing processing that stores output target image data to a storage device such as a server or a USB memory , Email attachment processing for attaching corrected image data to an email, and the like. The output process performed by the image display device 300 is a display process of output target image data.

携帯端末装置100と画像形成装置200とは通信可能であり、携帯端末装置100は、上述したように、出力対象画像データを画像形成装置200に送信する。携帯端末装置100と画像形成装置200との通信方式としては、図1において符号AまたはBで示されるような方式がある。符号Aで示される方式は、IrSimpleなどの赤外線通信規格のいずれかに基づく無線通信方式である。符号Bで示される方式は、Felica(登録商標)のような非接触無線通信により、携帯端末装置100から画像表示装置300に一旦出力対象画像データを送り、その後、例えばBluetooth(登録商標)のような無線通信を用いて、当該画像表示装置300から画像形成装置200へ当該データを転送する方式である。本実施形態では、ユーザは、画像形成装置200の前にきてから携帯端末装置100を操作し、赤外線通信のような近距離無線通信方式を用いて、携帯端末装置100から画像形成装置200へデータ送信するものとする。   The portable terminal device 100 and the image forming apparatus 200 can communicate with each other, and the portable terminal device 100 transmits output target image data to the image forming apparatus 200 as described above. As a communication method between the portable terminal device 100 and the image forming apparatus 200, there is a method shown by a symbol A or B in FIG. The system indicated by the code A is a wireless communication system based on any of infrared communication standards such as IrSimple. In the method indicated by the code B, output target image data is temporarily sent from the mobile terminal device 100 to the image display device 300 by non-contact wireless communication such as Felica (registered trademark), and then, for example, Bluetooth (registered trademark) The data is transferred from the image display apparatus 300 to the image forming apparatus 200 using wireless communication. In the present embodiment, the user operates the mobile terminal 100 after coming to the front of the image forming apparatus 200, and uses the short distance wireless communication method such as infrared communication to transfer the image from the mobile terminal 100 to the image forming apparatus 200. It shall transmit data.

ここで、画像表示装置300は、例えば、液晶ディスプレイ、プラズマディスプレイ、有機エレクトロルミネッセンスディスプレイ等よりなるインフォメーションディスプレイや電子黒板等である。このような画像表示装置300は、出力対象画像データで示される画像を表示させる表示処理を行う。この表示処理は、出力対象画像データの出力処理の1つである。すなわち、画像表示装置300は、出力対象画像データの出力処理を行う画像出力装置であるといえる。画像表示装置300で表示を行った後、画像形成装置200で印刷を行う、あるいは、他のアドレスにe−mail送信を行う、あるいは、コンピュータやネットワークで接続されているサーバ等に格納するようにすることもできる。   Here, the image display device 300 is, for example, an information display, an electronic blackboard, or the like including a liquid crystal display, a plasma display, an organic electroluminescence display, and the like. Such an image display device 300 performs display processing for displaying an image indicated by output target image data. This display process is one of the output process of the output target image data. That is, it can be said that the image display device 300 is an image output device that performs output processing of output target image data. After displaying on the image display apparatus 300, printing is performed on the image forming apparatus 200, or e-mail transmission is performed to another address, or stored in a computer or a server connected via a network. You can also

なお、携帯端末装置100と画像形成装置200および画像表示装置300との間の通信方式については、これらに限定されることなく、公知の通信方法を用いたものを適用することができる。たとえば、電子メールに出力対象画像データを添付して画像形成装置200や画像表示装置300に送信してもよい。   The communication method between the portable terminal device 100 and the image forming device 200 and the image display device 300 is not limited to these, and any known communication method can be applied. For example, output target image data may be attached to an e-mail and transmitted to the image forming apparatus 200 or the image display apparatus 300.

(2)携帯端末装置の構成
まず、図2に基づいて、本実施形態に係る携帯端末装置100について説明する。図2は、携帯端末装置100の構成を示すブロック図である。図2に示されるように、携帯端末装置100は、撮像部101、撮像範囲判定部110、画像処理部103、通信部(送信部)104、表示部105、入力部106、記録媒体アクセス部107、記憶部108、制御部109を備えている。
(2) Configuration of Mobile Terminal Device First, the mobile terminal device 100 according to the present embodiment will be described based on FIG. FIG. 2 is a block diagram showing the configuration of the mobile terminal device 100. As shown in FIG. As illustrated in FIG. 2, the mobile terminal device 100 includes an imaging unit 101, an imaging range determination unit 110, an image processing unit 103, a communication unit (transmission unit) 104, a display unit 105, an input unit 106, and a recording medium access unit 107. , Storage unit 108, and control unit 109.

撮像部101は、CCDセンサ、CMOSセンサを用いて、撮像対象物の撮像を行い、撮像により得られた撮像画像を表示部105に表示させる。なお、撮像部101は、予め設定された解像度で撮像対象物の撮像を行う。なお、撮像部101により撮像される範囲(以下、撮像範囲という)は、予め設定された拡大縮小率に従って決定される。ここでは、撮像範囲は、幅がXmax、高さがYmaxの矩形であるとする。   The imaging unit 101 performs imaging of an imaging target object using a CCD sensor or a CMOS sensor, and causes the display unit 105 to display a captured image obtained by imaging. Note that the imaging unit 101 captures an image of an imaging target at a preset resolution. A range to be imaged by the imaging unit 101 (hereinafter referred to as an imaging range) is determined in accordance with a preset enlargement / reduction rate. Here, it is assumed that the imaging range is a rectangle having a width Xmax and a height Ymax.

撮像範囲判定部110は、ユーザにより文書撮像モードが選択された場合に、撮像部101により撮像され表示部105に表示されている撮像画像を基に、矩形状の撮像対象物が撮像範囲内に収まっているか否かを判定するものである。また、撮像範囲判定部110は、指定されたタイミングで表示部105に表示されている撮像画像を示す画像データを出力対象画像データとして記憶部108に格納する。撮像範囲判定部110の詳細については後述する。   When the document imaging mode is selected by the user, the imaging range determination unit 110 sets the rectangular imaging target within the imaging range based on the captured image captured by the imaging unit 101 and displayed on the display unit 105. It is determined whether or not it is contained. Further, the imaging range determination unit 110 stores image data indicating a captured image displayed on the display unit 105 at a designated timing in the storage unit 108 as output target image data. Details of the imaging range determination unit 110 will be described later.

画像処理部103は、撮像部101により記憶部108に格納された出力対象画像データに対して、少なくともA/D変換処理を行うものである。   The image processing unit 103 performs at least A / D conversion processing on output target image data stored in the storage unit 108 by the imaging unit 101.

通信部104は、USB(Universal Serial Bus)1.1またはUSB2.0の規格に基づく、シリアル転送/パラレル転送、無線データ通信機能を有するものである。通信部104は、ユーザが入力した送信指示に従って出力対象画像データを画像形成装置200または画像表示装置300に送信する。   The communication unit 104 has functions of serial transfer / parallel transfer and wireless data communication based on the USB (Universal Serial Bus) 1.1 or USB 2.0 standard. The communication unit 104 transmits output target image data to the image forming apparatus 200 or the image display apparatus 300 in accordance with a transmission instruction input by the user.

表示部105は、例えば液晶ディスプレイなどにより構成されるものである。また,入力部106は、複数のボタンを有しており、ユーザがデータの入力等を行うためのものである。   The display unit 105 is configured of, for example, a liquid crystal display. The input unit 106 also has a plurality of buttons, and is used by the user to input data.

記録媒体アクセス部107は、携帯端末装置100の各処理を行うためのプログラムが記録された記録媒体から、プログラムを読み出すものである。   The recording medium access unit 107 reads a program from a recording medium in which a program for performing each process of the mobile terminal device 100 is recorded.

また、記憶部108は、携帯端末装置100の各処理を行うためのプログラム、携帯端末装置100の機種情報、ユーザ情報や処理を行う際に必要なデータを格納するものである。なお、ユーザ情報とは、携帯端末装置100のユーザを識別する情報であり、例えば、ユーザIDおよびパスワードなどである。また、記憶部108は、文書撮像モードで撮像することにより得られた出力対象画像データおよびその付属情報(後述する出力処理情報、ファイルネームなど)を記憶する。   Further, the storage unit 108 stores a program for performing each process of the mobile terminal device 100, model information of the mobile terminal device 100, user information, and data necessary for performing the process. The user information is information for identifying the user of the mobile terminal device 100, and includes, for example, a user ID and a password. In addition, the storage unit 108 stores output target image data obtained by imaging in the document imaging mode and its attached information (output processing information to be described later, a file name, and the like).

制御部109は、携帯端末装置100の各部の制御を行うものである。制御部109は、入力部106に文書撮像モードを選択する旨の指示が入力された場合、画像形成装置200での出力処理の種類(印刷処理、ファイリング処理、メール送信処理など)の選択指示、ならびに、選択した出力処理を実行するための設定条件(印刷枚数などの印刷条件、ファイリング先のサーバのアドレス、メールの送信先アドレスなど)の入力を促す画面を表示部105に表示する。そして、制御部109は、入力部106から、出力処理の種類および出力処理の設定条件を示す出力処理情報を取得する。   The control unit 109 controls each unit of the mobile terminal device 100. When an instruction to select a document imaging mode is input to the input unit 106, the control unit 109 instructs selection of the type of output processing (print processing, filing processing, mail transmission processing, etc.) in the image forming apparatus 200, In addition, the display unit 105 displays a screen prompting input of setting conditions (a printing condition such as the number of printed sheets, an address of a filing destination server, an e-mail transmission destination address, etc.) for executing the selected output process. Then, the control unit 109 acquires, from the input unit 106, output processing information indicating the type of output processing and the setting conditions of the output processing.

制御部109は、記憶部108に格納された出力対象画像データに、ファイルネームおよび出力処理情報を付加する。   The control unit 109 adds a file name and output processing information to the output target image data stored in the storage unit 108.

また、制御部109は、入力部106へ送信指示が入力されると、記憶部108に格納されている出力対象画像データを画像形成装置200または画像表示装置300に送信する送信処理を通信部104に実行させる。このとき、通信部104は、出力対象画像データとともに、当該出力対象画像データに対応付けられた、ファイルネームおよび出力処理情報と、記憶部108に格納されている機種情報およびユーザ情報とを合わせて画像形成装置200または画像表示装置300に送信する。   In addition, when a transmission instruction is input to input unit 106, control unit 109 causes communication unit 104 to transmit the output target image data stored in storage unit 108 to image forming apparatus 200 or image display apparatus 300. Make it run. At this time, the communication unit 104 combines the output target image data, the file name and output processing information associated with the output target image data, and the model information and user information stored in the storage unit 108. It is transmitted to the image forming apparatus 200 or the image display apparatus 300.

(3)撮像範囲判定部について
(3−1)撮像範囲判定部の構成
次に、携帯端末装置100の撮像範囲判定部110の詳細な構成について説明する。図3は、撮像範囲判定部110の内部構成を示すブロック図である。図3に示されるように、撮像範囲判定部110は、幾何学的配置検出部111と、表示処理部112と、出力対象画像決定部113とを備えている。
(3) Regarding Imaging Range Determination Unit (3-1) Configuration of Imaging Range Determination Unit Next, a detailed configuration of the imaging range determination unit 110 of the mobile terminal device 100 will be described. FIG. 3 is a block diagram showing an internal configuration of the imaging range determination unit 110. As shown in FIG. As shown in FIG. 3, the imaging range determination unit 110 includes a geometric arrangement detection unit 111, a display processing unit 112, and an output target image determination unit 113.

幾何学的配置検出部111は、撮像対象物が矩形状であると仮定して、当該撮像対象物と背景との境界となるエッジ画素群を抽出することにより、撮像対象物の幾何学的配置(幾何学的歪み)を検出するものである。   The geometric arrangement detection unit 111 assumes that the imaging object is rectangular, and extracts the edge pixel group that is the boundary between the imaging object and the background, thereby the geometrical arrangement of the imaging object. (Geometric distortion) is detected.

表示処理部112は、表示部105に表示された撮像画像において、幾何学的配置検出部111により検出されたエッジ画素群の上に、撮像対象物の輪郭を示す輪郭線を重ねて表示させるものである。これにより、ユーザは、輪郭線を確認することで、撮像対象物が撮像範囲内に収まっているか否かを容易に確認することができる。   The display processing unit 112 superimposes and displays an outline indicating an outline of the object to be imaged on the edge pixel group detected by the geometric arrangement detection unit 111 in the captured image displayed on the display unit 105. It is. Thus, the user can easily confirm whether the imaging target is within the imaging range by confirming the outline.

また、表示処理部112は、撮像対象物の幾何学的配置に基づいて、撮像範囲に撮像対象物が収まっているか否かを判定し、その判定結果を表示部105に表示する。これにより、ユーザは、判定結果を確認することにより、撮像対象物が撮像範囲に収まっているか否かをより一層容易に確認することができる。そして、収まっていない場合には、ユーザは、携帯端末装置100の向きや位置を変更することにより、撮像対象物を撮像範囲に収めることができる。   In addition, the display processing unit 112 determines whether or not the imaging target object is included in the imaging range based on the geometrical arrangement of the imaging target object, and displays the determination result on the display unit 105. As a result, the user can more easily confirm whether the imaging target is within the imaging range by confirming the determination result. Then, when the position does not fit, the user can fit the imaging target object within the imaging range by changing the orientation and the position of the mobile terminal device 100.

出力対象画像決定部113は、指定されたタイミングで表示部105に表示されている撮像画像を示す画像データを出力対象画像データとして決定し、当該出力対象画像データを記憶部108に格納するものである。   The output target image determination unit 113 determines, as output target image data, image data indicating a captured image displayed on the display unit 105 at a designated timing, and stores the output target image data in the storage unit 108. is there.

(3−2)撮像範囲判定部の処理
次に、撮像範囲判定部110の具体的な処理の一例について説明する。図4は、撮像範囲判定部110の処理の一例を示すフローチャートである。
(3-2) Processing of Imaging Range Determination Unit Next, an example of specific processing of the imaging range determination unit 110 will be described. FIG. 4 is a flowchart illustrating an example of processing of the imaging range determination unit 110.

(ステップ1(S1))
まず、幾何学的配置検出部111は、撮像部101により撮像され、表示部105に表示されている撮像画像の中から、エッジ画素の抽出を行う。そして、幾何学的配置検出部111は、エッジ画素を「1」とし、非エッジ画素を「0」とするエッジ画像を生成する。
(Step 1 (S1))
First, the geometric arrangement detection unit 111 extracts edge pixels from the captured image captured by the imaging unit 101 and displayed on the display unit 105. Then, the geometric arrangement detection unit 111 generates an edge image in which the edge pixel is “1” and the non-edge pixel is “0”.

エッジ画素の抽出には、例えば、撮像部101による撮像された輝度画像に対しCannyフィルタを適用して抽出する。Cannyフィルタとは、ガウシアンフィルタとソーベルフィルタを用いて、細線化されたエッジを検出するフィルタである。なお、この時、処理高速化のために、画像サイズを縮小しても良い。また、エッジ画素の検出精度を高めるために、例えば、フィルタ処理を行う前に、平滑化や、フィルタ処理後に、膨張収縮などのモルフォロジー変換を行っても良い。   For extraction of edge pixels, for example, a Canny filter is applied to a luminance image captured by the imaging unit 101 and extracted. The Canny filter is a filter that detects a thinned edge using a Gaussian filter and a Sobel filter. At this time, the image size may be reduced to speed up the processing. Further, in order to enhance the detection accuracy of the edge pixel, for example, morphological conversion such as expansion and contraction may be performed after the smoothing or the filter processing before the filter processing.

図5は、輝度画像から抽出されたエッジ画像を示す図である。図5において上段が輝度画像を示し、下段が抽出されたエッジ画像を示す。   FIG. 5 is a view showing an edge image extracted from a luminance image. In FIG. 5, the upper part shows a luminance image, and the lower part shows an edge image extracted.

(ステップ2(S2))
次に、幾何学的配置検出部111は、連結したエッジ画素の領域(連結エッジ領域)ごとに異なるラベルを付すラベリング処理を行う。
(Step 2 (S2))
Next, the geometric arrangement detection unit 111 performs a labeling process in which different labels are attached to each of the connected edge pixel areas (connected edge areas).

幾何学的配置検出部111は、例えば、図6で示されるように以下の方法を用いてラベリングを行う。
(I)注目画素がエッジ画素の場合、注目画素の上隣の画素がエッジ画素で、すでにラベルがつけられていれば、注目画素にも同じラベルをつける(図6(a))。
(II)左隣の画素もエッジ画素で、上隣の画素とは異なるラベルがつけられている場合は、上隣と同じラベルをつける(図6(b))。
(III)上隣の画素が非エッジ画素で左隣がエッジ画素の場合、注目画素に左隣と同じラベルをつける(図6(c))。
(IV)上隣も左隣も非エッジ画素の場合、注目画素に新しいラベルをつける(図6(d))。
(V) 全てのエッジ画素に対しラベル付けを行う。
(VI)複数のラベルがつけられている場合、上記の規則に基づいてラベルを統一する。
The geometrical arrangement detection unit 111 performs labeling, for example, using the following method as shown in FIG.
(I) In the case where the pixel of interest is an edge pixel, if the pixel above and adjacent to the pixel of interest is an edge pixel and is already labeled, the pixel of interest is also labeled the same (FIG. 6A).
(II) If the pixel adjacent to the left is also an edge pixel and is labeled differently from the pixel adjacent to the upper pixel, the same label as that attached to the upper pixel is attached (FIG. 6 (b)).
(III) When the pixel on the upper side is a non-edge pixel and the pixel on the left is an edge pixel, the target pixel is labeled the same as on the left (Fig. 6 (c)).
(IV) In the case where neither the upper adjacent nor the left adjacent is a non-edge pixel, a new label is attached to the pixel of interest (FIG. 6 (d)).
(V) Label all edge pixels.
(VI) If multiple labels are attached, unify the labels based on the above rules.

(ステップ3(S3))
次に、幾何学的配置検出部111は、ラベル付けがされた連結エッジ領域の中から、撮像対象物と背景との境界を含む領域の候補(以下、特徴領域という)を抽出する(S3)。
(Step 3 (S3))
Next, the geometric arrangement detection unit 111 extracts a candidate of a region including the boundary between the object to be imaged and the background (hereinafter referred to as a feature region) from among the connected edge regions labeled (S3). .

撮像対象物は、その中心を撮像範囲の中心付近とし、撮像範囲の中の大部分を占めるようにして撮像されるのが通常である。そのため、撮像対象物と背景との境界は、その中心が撮像範囲の中心付近に位置し、かつ、撮像範囲の横方向(幅方向)の長さおよび縦方向(高さ方向)の長さが長くなる。そこで、幾何学的配置検出部111は、以下の条件Aを満たす連結エッジ領域を特徴候補として抽出する。   It is usual that the object to be imaged is imaged with its center near the center of the imaging range and occupying most of the imaging range. Therefore, the boundary between the object to be imaged and the background has its center located near the center of the imaging range, and the length in the horizontal direction (width direction) and the length in the vertical direction (height direction) of the imaging range become longer. Therefore, the geometric arrangement detection unit 111 extracts a connected edge region that satisfies the following condition A as a feature candidate.

条件A:撮像範囲において左上角を原点とし、右方向(幅方向)をx軸、下方向(高さ方向)をy軸とし、撮像範囲の右端のx座標をXmax、撮像範囲の下端のy座標をYmaxとする。このとき、連結エッジ領域の幅方向の長さが撮像範囲の幅(つまりXmax)の1/4以上、かつ、高さ方向の長さが撮像範囲の高さ(つまりYmax)の1/4以上であり、かつ、連結エッジ領域の中心x座標が、Xmax/4以上かつ3×Xmax/4以下で、領域の中心y座標が、Ymax/4以上かつ3×Ymax/4以下である。   Condition A: In the imaging range, the upper left corner is the origin, the right direction (width direction) is the x axis, the downward direction (height direction) is the y axis, the x coordinate of the right end of the imaging range is Xmax, y at the lower end of the imaging range Coordinates are assumed to be Ymax. At this time, the length in the width direction of the connection edge area is 1/4 or more of the width of the imaging range (that is, Xmax), and the length in the height direction is 1/4 or more of the height of the imaging range (that is, Ymax) And the center x coordinate of the connected edge area is not less than Xmax / 4 and not more than 3 × Xmax / 4, and the center y coordinate of the area is not less than Ymax / 4 and not more than 3 × Ymax / 4.

図7は、特徴領域抽出処理(S3)の詳細な処理例を示すフローチャートである。図7に示されるように、まず、幾何学的配置検出部111は、S2でラベル付けされた連結エッジ領域の1つを選択する(S301)。そして、幾何学的配置検出部111は、選択した連結エッジ領域について、幅方向の長さ、高さ方向の長さ、中心x座標、中心y座標を特定する。具体的には、連結エッジ領域を構成するエッジ画素のうち、最大のx座標から最小のx座標を引くことにより幅方向の長さを求め、最大のy座標から最小のy座標を引くことにより高さ方向の長さを求め、最大のx座標と最小のx座標との平均値を中心x座標として求め、最大のy座標と最小のy座標との平均値を中心y座標として求める。   FIG. 7 is a flowchart showing a detailed process example of the feature area extraction process (S3). As shown in FIG. 7, first, the geometric arrangement detection unit 111 selects one of the connected edge areas labeled S2 (S301). Then, the geometric arrangement detection unit 111 specifies the length in the width direction, the length in the height direction, the center x coordinate, and the center y coordinate for the selected connected edge area. Specifically, the length in the width direction is obtained by subtracting the smallest x coordinate from the largest x coordinate among edge pixels constituting the connected edge area, and the smallest y coordinate is subtracted from the largest y coordinate. The length in the height direction is determined, the average value of the maximum x coordinate and the minimum x coordinate is determined as a center x coordinate, and the average value of the maximum y coordinate and the minimum y coordinate is determined as a center y coordinate.

次に、幾何学的配置検出部111は、中心x座標がXmax/4以上かつ3×Xmax/4以下であるか判定する(S302)。   Next, the geometric arrangement detection unit 111 determines whether the center x coordinate is not less than Xmax / 4 and not more than 3 × Xmax / 4 (S302).

S302でYesの場合、幾何学的配置検出部111は、中心y座標がYmax/4以上かつ3×Ymax/4以下であるか判定する(S303)。   In the case of Yes in S302, the geometric arrangement detection unit 111 determines whether the center y coordinate is Ymax / 4 or more and 3 × Ymax / 4 or less (S303).

S303でYesの場合、幾何学的配置検出部111は、連結エッジ領域の幅方向の長さがXmax/4以上であるか判定する(S304)。   In the case of Yes in S303, the geometric arrangement detection unit 111 determines whether the length in the width direction of the connection edge area is Xmax / 4 or more (S304).

S304でYesの場合、幾何学的配置検出部111は、連結エッジ領域の高さ方向の長さがYmax/4以上であるか判定する(S305)。   In the case of Yes in S304, the geometric arrangement detection unit 111 determines whether the length in the height direction of the connection edge area is Ymax / 4 or more (S305).

S305でYesの場合、選択した連結エッジ領域を特徴領域として抽出する(S306)。その後、幾何学的配置検出部111は、未選択の連結エッジ領域があるか確認し、ある場合には、未選択の一つの連結エッジ領域を選択する(S308)。   In the case of Yes in S305, the selected connected edge area is extracted as a feature area (S306). Thereafter, the geometric arrangement detection unit 111 confirms whether there is an unselected connected edge region, and in some cases, selects an unselected connected edge region (S308).

一方、S302〜S305のいずれかにおいてNoである場合には、選択した連結エッジ領域を特徴領域として抽出せずに、S308の処理に移行する。   On the other hand, if the result is No in any of S302 to S305, the process proceeds to S308 without extracting the selected connected edge area as a feature area.

その後、S308にて選択した連結エッジ領域について、S302以降の処理を実行する。これにより、上記の条件Aを満たす連結エッジ領域を特徴領域として抽出することができる。そして、幾何学的配置検出部111は、抽出された特徴領域に属する画素のみをエッジ画素とし、残りの画素を非エッジ画素とした特徴領域画像データを生成する。   Thereafter, the processing of step S302 and subsequent steps is executed for the connected edge area selected in step S308. Thus, it is possible to extract a connected edge region satisfying the above condition A as a feature region. Then, the geometric arrangement detection unit 111 generates feature area image data in which only pixels belonging to the extracted feature area are edge pixels and the remaining pixels are non-edge pixels.

図8は、多数の連結エッジ領域を含むエッジ画像から特徴領域を抽出する様子を示す図である。図8において、左列はエッジ画像である。また、中列は、S302およびS303の処理により、中心座標が撮像範囲の端部側に位置する連結エッジ領域が除かれた状態を示す画像である。右列は、中列からさらにS304およびS305の処理により、幅方向の長さまたは高さ方向の長さが短い連結エッジ領域が除かれ、抽出された特徴領域のみを示す画像である。すなわち、右列は、特徴領域画像データで示される画像である。   FIG. 8 is a diagram showing how a feature area is extracted from an edge image including a large number of connected edge areas. In FIG. 8, the left column is an edge image. The middle row is an image showing a state in which the connected edge area whose center coordinate is located on the end side of the imaging range is removed by the processing of S302 and S303. The right row is an image showing only the extracted feature regions, from which the connected edge regions having a short length in the width direction or the length in the height direction are further removed from the middle row by the processing of S304 and S305. That is, the right column is an image represented by feature area image data.

図8に示すように、S3の処理により、矩形の撮像対象物と背景との境界となるエッジ画素の候補である特徴領域が抽出される。ただし、図8の下段で示されるように、画像によっては、撮像対象物と背景との境界以外のエッジ画素が特徴領域として抽出される場合もある。   As shown in FIG. 8, in the process of S3, a feature area which is a candidate for an edge pixel that is a boundary between a rectangular imaging target and a background is extracted. However, as shown in the lower part of FIG. 8, depending on the image, edge pixels other than the boundary between the object to be imaged and the background may be extracted as a feature region.

(ステップ4(S4))
そこで、幾何学的配置検出部111は、特徴領域の中から、矩形の撮像対象物と背景との境界となる四角形の上辺、左辺、右辺、下辺を構成する、線分状に連なるエッジ画素群を抽出し、当該エッジ画素群の近似直線を特定する処理(直線抽出処理)を行う(S4)。
(Step 4 (S4))
Therefore, the geometric arrangement detection unit 111 is a group of edge pixel groups connected in a line shape that forms the upper side, the left side, the right side, and the lower side of the quadrangle serving as the boundary between the rectangular imaging target and the background. Are extracted, and processing (straight line extraction processing) for specifying an approximate straight line of the edge pixel group is performed (S4).

ここで、上辺は、撮像画像の中の上半分(つまり、y座標が0からYmax/2の範囲)に位置し、撮像範囲の幅方向に平行である確率が高い。また、左辺は、撮像画像の左半分(つまり、x座標が0からXmax/2の範囲)に位置し、撮像範囲の高さ方向に平行である確率が高い。右辺は、撮像画像の右半分(つまり、x座標がXmax/2からXmaxの範囲)に位置し、撮像範囲の高さ方向に平行である確率が高い。下辺は、撮像画像の下半分(つまり、y座標がYmax/2からYmaxの範囲)に位置し、撮像範囲の幅方向に平行である確率が高い。   Here, the upper side is located in the upper half of the captured image (that is, the y coordinate is in the range of 0 to Ymax / 2), and the probability of being parallel to the width direction of the imaging range is high. Also, the left side is located in the left half of the captured image (that is, the x coordinate is in the range of 0 to Xmax / 2), and the probability of being parallel to the height direction of the imaging range is high. The right side is located in the right half of the captured image (that is, the x coordinate is in the range of Xmax / 2 to Xmax) and has a high probability of being parallel to the height direction of the imaging range. The lower side is located in the lower half of the captured image (that is, the y coordinate is in the range of Ymax / 2 to Ymax) and has a high probability of being parallel to the width direction of the imaging range.

そこで、存在する確率の高い範囲において、特徴領域画像データの中から特定の方向に連なるエッジ画素の数が最大であり、所定長さ以上の線分状のエッジ画素群を、矩形の撮像対象物と背景との境界となる線分状に連なるエッジ画素群として抽出する。そして、抽出したエッジ画素群の近似直線を特定する。   Therefore, in the range where the existing probability is high, the number of edge pixels connected in a specific direction in the feature area image data is the largest, and a line-shaped edge pixel group having a predetermined length or more It extracts as an edge pixel group which continues in a line segment shape which becomes a boundary of and the background. Then, the approximate straight line of the extracted edge pixel group is specified.

図9は、図4に示すS4の処理のうち、上辺を構成するエッジ画素群の近似直線を特定する処理の流れを示すフローチャートである。   FIG. 9 is a flowchart showing the flow of the process of identifying the approximate straight line of the edge pixel group constituting the upper side in the process of S4 shown in FIG.

まず、幾何学的配置検出部111は、変数x=0、変数count=0、変数pre_y=−1を設定する(S401)。次に、幾何学的配置検出部111は、変数y=0を設定する(S402)。   First, the geometric arrangement detection unit 111 sets a variable x = 0, a variable count = 0, and a variable pre_y = -1 (S401). Next, the geometric arrangement detection unit 111 sets a variable y = 0 (S402).

そして、幾何学的配置検出部111は、特徴領域画像データにおいて、座標(x、y)で示される画素がエッジ画素であるか確認する(S403)。S403でNoである場合、変数yをy+1に変更する(S404)。続いて、変更後の変数yが撮像範囲の高さ(つまりYmax)の1/2より大きいか確認する(S405)。S405でNoの場合、S403の処理に戻る。   Then, the geometric arrangement detection unit 111 confirms whether the pixel indicated by the coordinates (x, y) in the feature area image data is an edge pixel (S403). If No in S403, the variable y is changed to y + 1 (S404). Subsequently, it is checked whether the changed variable y is larger than half of the height of the imaging range (that is, Ymax) (S405). If No in S405, the process returns to S403.

S403〜S405の処理を繰り返すことにより、特徴領域画像データにおいて、(0,0)座標から撮像範囲の高さの1/2の座標まで、y軸下方向に探索していき、最初にエッジ画素が見つかった時点で、S403でYesとなる。S403でYesとなると、幾何学的配置検出部111は、
pre_y−1≦y≦pre_y+1
を満たすか確認する(S407)。
By repeating the processing of S403 to S405, in the feature area image data, searching from the (0, 0) coordinate to the coordinate of 1/2 the height of the imaging range in the lower direction of the y axis is performed. When is found, it becomes Yes in S403. If Yes in S403, the geometric arrangement detection unit 111
pre_y-1 ≦ y ≦ pre_y + 1
It is confirmed whether the condition is satisfied (S407).

S407を満たさない場合、幾何学的配置検出部111は、変数countの値を前回設定した座標群に格納する(S408)。その後、幾何学的配置検出部111は、新たな座標群[x]を設定するとともに、変数countを0に設定する(S409)。一方、S407を満たす場合、幾何学的配置検出部111は、変数countを1だけ加算し(S410)、最も新しく設定された座標群に座標(x、y)を格納する(S411)。そして、S409またはS411の後、幾何学的配置検出部111は、変数pre_yをyに設定する(S412)。   If S407 is not satisfied, the geometric arrangement detection unit 111 stores the value of the variable count in the coordinate group previously set (S408). Thereafter, the geometrical arrangement detection unit 111 sets a new coordinate group [x] and sets the variable count to 0 (S409). On the other hand, if S407 is satisfied, the geometric arrangement detection unit 111 adds 1 to the variable count (S410), and stores the coordinates (x, y) in the most recently set coordinate group (S411). Then, after S409 or S411, the geometric arrangement detection unit 111 sets the variable pre_y to y (S412).

一方、y軸下方向に探索していき、エッジ画素が見つからなかったとき(S405でNo)、幾何学的配置検出部111は、変数count=0、変数pre_y=−1を設定する(S406)。   On the other hand, when searching in the lower y-axis direction and no edge pixel is found (S405: No), the geometric arrangement detection unit 111 sets the variable count = 0 and the variable pre_y = -1 (S406). .

S406またはS412の後、幾何学的配置検出部111は、変数xに1を加算する(S413)。続いて、変更後の変数xが撮像範囲の幅(つまりXmax)より大きいか確認する(S414)。S414でNoの場合、S402の処理に戻る。   After S406 or S412, the geometric arrangement detection unit 111 adds 1 to the variable x (S413). Subsequently, it is checked whether the changed variable x is larger than the width of the imaging range (that is, Xmax) (S414). If No in S414, the process returns to S402.

例えば、x=0において、y軸下方向に探索していき、最初に見つかったエッジ画素の座標(0,y0)を記録する。次に、(1,0)座標からy軸下方向に探索していき、最初にエッジ画素が見つかった時点の座標(1,y1)を記録する。この時、y0−1≦y1≦y0+1ならば、この2点は特定方向に沿って連なっていると判断し、S409において変数countを1増やすとともに、座標(1、y1)を座標群[0]に格納する。y0−1≦y1≦y0+1を満たすということは、撮像範囲の幅方向から所定角度の範囲内の特定方向で2点が連続していることとなる。   For example, at x = 0, a search is made downward in the y axis, and the coordinates (0, y0) of the edge pixel found first are recorded. Next, the y axis is searched downward from the (1, 0) coordinates, and the coordinates (1, y 1) at the time when the edge pixel is first found are recorded. At this time, if y0-1 ≦ y1 ≦ y0 + 1, it is determined that these two points are continuous along the specific direction, and the variable count is increased by 1 in S409 and the coordinate (1, y1) is set to the coordinate group [0] Store in If y0-1 ≦ y1 ≦ y0 + 1 is satisfied, it means that two points are continuous in a specific direction within a predetermined angle range from the width direction of the imaging range.

このようにして、座標(k、yk)まで座標群[0]に格納した後、(k+1,0)座標からy軸下方向に探索して最初に見つかったエッジ画素の座標(k+1,y(k+1))が、yk−1≦y(k+1)≦yk+1を満たさないとする。この場合、S408において、変数countの値kが座標群[0]に格納される。また、S409において新たな座標群[k+1]が設定され、変数countが0にリセットされる。   In this way, after storing coordinates (k, yk) in coordinate group [0], the coordinates (k + 1, y (y + 1) of the edge pixel first found searching from the (k + 1, 0) coordinates downward along the y axis It is assumed that k + 1) does not satisfy yk-1 ≦ y (k + 1) ≦ yk + 1. In this case, the value k of the variable count is stored in the coordinate group [0] in S408. In S409, a new coordinate group [k + 1] is set, and the variable count is reset to 0.

上記の処理を、xが撮像範囲の幅(つまりXmax)になるまで繰り返す。その後、幾何学的配置検出部111は、最も座標数の大きい座標群、すなわち、最もcountの値が大きい座標群を選択する(S415)。そして、幾何学的配置検出部111は、選択した座標群に含まれる座標数(つまりcount値)がXmax/4以上であるか確認する(S416)。S416でNoの場合、撮像対象物と背景との境界線となる上辺としては短いため、幾何学的配置検出部111は、上辺を構成する直線を抽出できなかった旨の情報(抽出不可情報)を生成する(S417)。   The above process is repeated until x becomes the width of the imaging range (that is, Xmax). Thereafter, the geometric arrangement detection unit 111 selects a coordinate group having the largest number of coordinates, that is, a coordinate group having the largest value of count (S415). Then, the geometric arrangement detection unit 111 checks whether the number of coordinates (that is, the count value) included in the selected coordinate group is Xmax / 4 or more (S416). In the case of No in S416, since the upper side which is the boundary between the object to be imaged and the background is short, the geometric arrangement detection unit 111 can not extract the straight line constituting the upper side (extraction impossible information) Are generated (S417).

一方、S416でYesの場合、幾何学的配置検出部111は、選択した座標群に含まれる複数の座標を基に、最小二乗法を用いて、近似直線の式を求める(S418)。S416でYesの場合、最も座標数の大きい座標群は、撮像範囲の幅方向から予め定められた角度範囲内の方向に、Xmax/4以上の長さの線分状に連なるエッジ画素群である。そのため、当該エッジ画素群は、撮像対象物と背景との境界の上辺を示す確率が非常に高くなる。   On the other hand, in the case of Yes in S416, the geometric arrangement detection unit 111 obtains an equation of an approximate straight line using the least squares method based on a plurality of coordinates included in the selected coordinate group (S418). In the case of Yes in S416, the coordinate group with the largest number of coordinates is an edge pixel group connected in a line segment of Xmax / 4 or more in a direction within a predetermined angle range from the width direction of the imaging range . Therefore, the edge pixel group has a very high probability of indicating the upper side of the boundary between the object to be imaged and the background.

例えば、座標数の最も大きい座標群に(6,120)、(7,120)、(8,121)、(9,122)、(10,121)が格納されているなら、幾何学的配置検出部111は、最小二乗法によりy=0.4x+117.6 という式を求める事ができる。   For example, if (6, 120), (7, 120), (8, 121), (9, 122), (10, 121) are stored in the coordinate group with the largest number of coordinates, geometrical arrangement The detection unit 111 can obtain the equation y = 0.4x + 117.6 by the least squares method.

同様の処理を下辺、右辺、左辺にも行うことで、四辺の直線を抽出する。
なお、下辺の場合には、図9のS402において変数y=Ymaxを設定する。また、S404において変数yから1だけ減算し、S405において、変更後の変数yが撮像範囲の高さ(つまりYmax)の1/2より小さいか確認する。
The same process is performed on the lower side, the right side, and the left side to extract straight lines of four sides.
In the case of the lower side, the variable y = Ymax is set in S402 of FIG. In S404, 1 is subtracted from the variable y, and in S405, it is checked whether the changed variable y is smaller than half the height of the imaging range (that is, Ymax).

また、左辺の場合には、図10の処理を行えばよい。図10は、図9においてxとyとを入れ替えた処理となる。これは、左辺が、撮像範囲の左半分に位置し、撮像範囲の高さ方向に平行である確率が高いことに起因している。図10によれば、S418では、撮像範囲の高さ方向から予め定められた角度範囲内の方向に、Ymax/4以上の長さの線分状に連なるエッジ画素群を基に、直線の式を求める。当該エッジ画素群は、撮像対象物と背景との境界の左辺を示す確率が非常に高くなる。   Further, in the case of the left side, the process of FIG. 10 may be performed. FIG. 10 shows a process in which x and y are interchanged in FIG. This is because the left side is located in the left half of the imaging range and has a high probability of being parallel to the height direction of the imaging range. According to FIG. 10, in S418, a straight line expression is generated based on a group of edge pixels connected in a line segment having a length of Ymax / 4 or more in a direction within a predetermined angle range from the height direction of the imaging range. Ask for The edge pixel group has a very high probability of indicating the left side of the boundary between the object to be imaged and the background.

また、右辺の場合には、図10のS402’において変数x=Xmaxを設定する。また、S404’において変数xから1だけ減算し、S405’において、変更後の変数xが撮像範囲の幅(つまりXmax)の1/2より小さいか確認する。   In the case of the right side, the variable x = Xmax is set in S402 'of FIG. In addition, 1 is subtracted from the variable x in S404 ', and it is checked in S405' whether the changed variable x is smaller than 1/2 of the width of the imaging range (that is, Xmax).

図11は、特徴領域の中から、矩形の撮像対象物と背景との境界となる四角形の上辺、左辺、右辺、下辺を構成する、線分状に連なるエッジ画素群を抽出(検出)する例を示す図である。図11の(a)は、全ての特徴領域を示す画像である。(b)は、矩形の撮像対象物と背景との境界となる四角形の上辺として抽出されたエッジ画素群を実線で示す。(c)は、矩形の撮像対象物と背景との境界となる四角形の左辺として抽出されたエッジ画素群を実線で示す。(d)は、矩形の撮像対象物と背景との境界となる四角形の下辺として抽出されたエッジ画素群を実線で示す。(e)は、矩形の撮像対象物と背景との境界となる四角形の右辺として抽出されたエッジ画素群を実線で示す。   FIG. 11 illustrates an example of extracting (detecting) a group of edge pixel groups connected in a line shape, which constitute the upper side, the left side, the right side, and the lower side of a quadrangle serving as the border between the rectangular imaging target and the background. FIG. (A) of FIG. 11 is an image showing all the feature regions. (B) shows a group of edge pixels extracted as the upper side of a quadrangle that is the boundary between the rectangular imaging target and the background, as a solid line. (C) shows a group of edge pixels extracted as the left side of a quadrangle serving as the border between the rectangular imaging target and the background as a solid line. In (d), an edge pixel group extracted as a lower side of a quadrangle that is a boundary between a rectangular imaging target and a background is indicated by a solid line. (E) shows a group of edge pixels extracted as the right side of a quadrangle, which is a boundary between the rectangular imaging target and the background, by a solid line.

このようにして、幾何学的配置検出部111は、上辺として抽出されたエッジ画素群の近似直線を上辺直線、左辺として抽出されたエッジ画素群の近似直線を左辺直線、右辺として抽出されたエッジ画素群の近似直線を右辺直線、下辺として抽出されたエッジ画素群の近似直線を下辺直線とし、各直線の式を生成する。   Thus, the geometric arrangement detection unit 111 extracts the approximate straight line of the edge pixel group extracted as the upper side as the upper side straight line, and the approximate straight line of the edge pixel group extracted as the left side as the left side straight line, the edge extracted as the right side The approximate straight line of the pixel group is taken as the right side straight line, and the approximate straight line of the edge pixel group extracted as the lower side is taken as the lower side straight line, and the equation of each straight line is generated.

(ステップ5(S5))
S4による四辺の直線抽出処理が終了すると、幾何学的配置検出部111は、S4で求めた直線の式に基づいて、交点座標を求める(S5)。
(Step 5 (S5))
When the straight line extraction processing of the four sides in S4 is completed, the geometrical arrangement detection unit 111 obtains intersection coordinates based on the equation of the straight line obtained in S4 (S5).

S4において四辺に対応する直線の式が求められた場合、幾何学的配置検出部111は、2直線の交点座標は容易に求める事ができる。すなわち、幾何学的配置検出部111は、左辺直線と上辺直線の交点座標を左上頂点座標、上辺直線と右辺直線の交点座標を右上頂点座標、右辺直線と下辺直線の交点座標を右下頂点座標、下辺直線と左辺直線の交点座標を左下頂点座標として求める。そして、幾何学的配置検出部111は、これら4つの頂点座標を含む抽出結果情報を表示処理部112に出力する。   When the straight line equation corresponding to the four sides is obtained in S4, the geometric arrangement detection unit 111 can easily obtain the intersection coordinates of the two straight lines. That is, the geometrical arrangement detection unit 111 determines the intersection coordinates of the left side straight line and the upper side straight line as the upper left apex coordinate, the intersection coordinates of the upper side straight line and the right side straight line as the upper right apex coordinate, and the intersection coordinates of the right side straight line and the lower side straight line as the lower right apex coordinate , The intersection coordinates of the lower side straight line and the left side straight line are determined as the lower left vertex coordinates. Then, the geometric arrangement detection unit 111 outputs extraction result information including the four vertex coordinates to the display processing unit 112.

図12は、4つの頂点座標を求める例を示す図である。図12では、左上頂点座標(X1,Y1)、右上頂点座標(X2,Y2)、右下頂点座標(X3,Y3)、左下頂点座標(X4,Y4)が求められている。   FIG. 12 is a diagram showing an example of obtaining four vertex coordinates. In FIG. 12, upper left vertex coordinates (X1, Y1), upper right vertex coordinates (X2, Y2), lower right vertex coordinates (X3, Y3), and lower left vertex coordinates (X4, Y4) are obtained.

また、S4において三辺のみに対応する直線の式が求められた場合、幾何学的配置検出部111は、残りの一辺に対応する直線を撮像範囲端の直線として、当該直線の式を求める。つまり、左辺が抽出できない場合にはx=0、右辺が抽出できない場合にはx=Xmax、上辺が抽出できない場合にはy=0、下辺が抽出できない場合にはy=Ymaxを残りの一辺に対応する直線の式とする。そして、幾何学的配置検出部111は、その直線式を用いて4つの頂点座標を求める。   When a straight line equation corresponding to only three sides is determined in S4, the geometric arrangement detection unit 111 determines the straight line equation with the straight line corresponding to the other side as the straight line at the end of the imaging range. That is, x = 0 if the left side can not be extracted, x = Xmax if the right side can not be extracted, y = 0 if the upper side can not be extracted, y = Ymax if the lower side can not be extracted Let it be the corresponding straight line equation. Then, the geometric arrangement detection unit 111 obtains four vertex coordinates using the linear expression.

ただし、撮像範囲端の直線との交点について仮頂点座標として求める。例えば、右辺が抽出できなかった場合、右上頂点座標および右下頂点座標は仮頂点座標として求められる。   However, the point of intersection with the straight line at the end of the imaging range is determined as temporary vertex coordinates. For example, when the right side can not be extracted, the upper right vertex coordinates and the lower right vertex coordinates are obtained as temporary vertex coordinates.

そして、幾何学的配置検出部111は、4つの頂点座標と、三辺のみが抽出できたことを示す情報と、抽出できなかった辺を示す抽出不可情報とを含む抽出結果情報を生成し、表示処理部112に出力する。なお、仮頂点座標については、仮頂点座標であることを示す情報が付けられている。   Then, the geometric arrangement detection unit 111 generates extraction result information including four vertex coordinates, information indicating that only three sides could be extracted, and extraction impossible information indicating sides that could not be extracted, It is output to the display processing unit 112. In addition, about temporary vertex coordinate, the information which shows that it is temporary vertex coordinate is attached.

また、S4において、三辺または四辺に対応する直線の式が求められなかった場合、幾何学的配置検出部111は、撮像対象物と背景との境界を適切に抽出できなかった旨を示す抽出結果情報を生成し、表示処理部112に出力する。   In addition, in S4, when the equation of the straight line corresponding to the three sides or the four sides is not obtained, the geometric arrangement detection unit 111 extracts that indicates that the boundary between the imaging object and the background could not be properly extracted. Result information is generated and output to the display processing unit 112.

(ステップ6(S6))
続いて、表示処理部112は、抽出結果情報に基づいた表示処理を行う。具体的には、以下のとおりである。
(Step 6 (S6))
Subsequently, the display processing unit 112 performs display processing based on the extraction result information. Specifically, it is as follows.

表示処理部112は、抽出結果情報で示される4つの頂点座標を結ぶ四角形の線を撮像対象物の輪郭線として撮像画像に重ねて表示する。   The display processing unit 112 superimposes and displays a quadrilateral line connecting four vertex coordinates indicated by the extraction result information as an outline of the imaging target on the captured image.

また、抽出結果情報が4つの頂点座標を含み、抽出不可情報を含まない場合、表示処理部112は、4つの頂点座標が撮像範囲内であるか否かを判断する。全ての頂点座標が撮像範囲内であれば、表示処理部112は、撮像対象物が撮像範囲内であることを示す情報(例えば、「OK」)を表示部105に表示させる。   In addition, when the extraction result information includes four vertex coordinates and does not include the extraction disabling information, the display processing unit 112 determines whether the four vertex coordinates are within the imaging range. If all the vertex coordinates are within the imaging range, the display processing unit 112 causes the display unit 105 to display information (for example, “OK”) indicating that the imaging target object is within the imaging range.

また、3つの頂点座標が撮像範囲内であり、1つの頂点座標が撮像範囲外である場合、表示処理部112は、撮像対象物の一部(一角)が撮像できないことを示す第1欠落情報を表示部105に表示させる。   In addition, when the three vertex coordinates are within the imaging range and one vertex coordinate is outside the imaging range, the display processing unit 112 is the first missing information indicating that a part (one corner) of the imaging object can not be imaged. Is displayed on the display unit 105.

さらに、抽出結果情報が4つの頂点座標を含み、抽出不可情報を含む場合、表示処理部112は、4つの頂点座標が撮像範囲内であるか否かを判断する。全ての頂点座標が撮像範囲内であれば、表示処理部112は、撮像対象物の一部(一辺)が撮像できないことを示す第2欠落情報を表示部105に表示させる。   Furthermore, when the extraction result information includes four vertex coordinates and includes extraction impossible information, the display processing unit 112 determines whether the four vertex coordinates are within the imaging range. If all the vertex coordinates are within the imaging range, the display processing unit 112 causes the display unit 105 to display second dropout information indicating that a part (one side) of the imaging target object can not be imaged.

上記以外の場合には、表示処理部112は、表示部105の画面をそのままにしておいてもよいし、撮像部101の向きの変更を促す情報(例えば、「撮像対象物が撮像範囲内に収まるようにカメラの向きを調整してください」等)を表示部105に表示させてもよい。   In the case other than the above, the display processing unit 112 may leave the screen of the display unit 105 as it is, or information prompting the user to change the orientation of the imaging unit 101 (for example, Adjust the orientation of the camera so as to fit, etc.) may be displayed on the display unit 105.

図13は、S6の処理の詳細を示すフローチャートである。
まず、表示処理部112は、矩形の撮像対象物と背景との境界となる四辺全てが抽出されたか判断する(S601)。ここでは、表示処理部112は、抽出結果情報が4つの頂点座標を含み、抽出不可情報を含まない場合に、四辺全てが抽出されたと判断する。
FIG. 13 is a flowchart showing the details of the process of S6.
First, the display processing unit 112 determines whether all four sides serving as the boundary between the rectangular imaging target and the background have been extracted (S601). Here, the display processing unit 112 determines that all the four sides have been extracted when the extraction result information includes four vertex coordinates and does not include the extraction disabling information.

四辺全てが抽出された場合(S601でYes)、表示処理部112は、抽出結果情報で示される左上頂点座標(X1,Y1)が撮像範囲内であるか否かを判断する(S602)。具体的には、表示処理部112は、0≦X1≦Xmax、および、0≦Y1≦Ymax の両方を満たすか否かを判断し、両方ともを満たす場合に左上頂点座標が撮像範囲内であると判断する。   If all four sides are extracted (Yes in S601), the display processing unit 112 determines whether the upper left vertex coordinates (X1, Y1) indicated by the extraction result information are within the imaging range (S602). Specifically, the display processing unit 112 determines whether both 0 ≦ X1 ≦ Xmax and 0 ≦ Y1 ≦ Ymax are satisfied, and when both are satisfied, the upper left vertex coordinate is within the imaging range I will judge.

左上頂点座標が撮像範囲内である場合、表示処理部112は、左上頂点座標(X1,Y1)が撮像範囲内であることを示すフラグを生成し、記憶する(S603)。一方、左上頂点座標が撮像範囲外である場合、次の処理に移行する。   If the upper left vertex coordinate is within the imaging range, the display processing unit 112 generates a flag indicating that the upper left vertex coordinate (X1, Y1) is within the imaging range and stores the flag (S603). On the other hand, if the upper left vertex coordinate is out of the imaging range, the process proceeds to the next process.

表示処理部112は、S602およびS603と同様の処理を、右上頂点座標(X2、Y2)、右下頂点座標(X3,Y3)、左下頂点座標(X4,Y4)についても行う(S604〜S609)。   The display processing unit 112 performs the same processing as in S602 and S603 for upper right vertex coordinates (X2, Y2), lower right vertex coordinates (X3, Y3), and lower left vertex coordinates (X4, Y4) (S604 to S609) .

そして、表示処理部112は、全ての頂点座標に対してフラグを記憶しているか確認する(S610)。全ての頂点座標に対してフラグを記憶している場合(S610でYes)、表示処理部112は、撮像対象物が欠落することなく撮像範囲内に収まっていると判断する。そして、表示処理部112は、抽出結果情報で示される4つの頂点座標を結ぶ四角形の線を撮像対象物の輪郭線として撮像画像に重ねて表示する。ここで、頂点座標は、幾何学的配置検出部111により検出された線分状のエッジ画素群に対する近似直線の交点である。そのため、エッジ画素群の上に輪郭線が重ねて表示されることとなる。また、表示処理部112は、撮像対象物が撮像範囲内であることを示す情報(例えば、「OK」)を表示部105に表示させる(S611)。また、このとき、表示処理部112は、出力対象画像を決定するためのシャッタボタンも合わせて表示部105に表示させる。   Then, the display processing unit 112 confirms whether a flag is stored for all vertex coordinates (S610). When the flag is stored for all the vertex coordinates (Yes in S610), the display processing unit 112 determines that the imaging target object falls within the imaging range without missing. Then, the display processing unit 112 superimposes and displays a quadrilateral line connecting four vertex coordinates indicated by the extraction result information as an outline of the imaging target on the captured image. Here, the vertex coordinates are the intersections of the approximate straight lines with the line-shaped edge pixel group detected by the geometric arrangement detection unit 111. Therefore, the outline is displayed superimposed on the edge pixel group. In addition, the display processing unit 112 causes the display unit 105 to display information (for example, “OK”) indicating that the imaging target object is within the imaging range (S611). At this time, the display processing unit 112 also causes the display unit 105 to display a shutter button for determining an output target image.

図14は、S611において表示部105に表示される画面の一例を示す図である。図14に示されるように、頂点座標を結ぶ四角形の線である輪郭線Lは、矩形の撮像対象物と背景との境界上に表示されることとなる。そのため、ユーザは、撮像対象物が撮像範囲内であることを容易に確認することができる。   FIG. 14 is a view showing an example of a screen displayed on the display unit 105 in S611. As shown in FIG. 14, an outline L which is a square line connecting vertex coordinates is displayed on the boundary between the rectangular imaging target and the background. Therefore, the user can easily confirm that the imaging target is within the imaging range.

なお、図14において、符号10は、シャッタボタンであり、符号20は、オートフォーカス設定ボタンであり、符号30は、露出調整バーであり、符号40は、画像読み込みボタンであり、符号50は、条件設定ボタンである。シャッタボタン10は、表示部105に表示されている撮像画像を出力対象画像として決定するためのボタンである。オートフォーカスボタン20は、自動的に焦点をあわせるためのボタンである。露出調整バー40は、光の露出を調整するためのバーである。画像読み込みボタン40は、事前に保存しておいた画像を、撮像された画像として処理するためのものである。画像読み込みボタン40が押下されると、保存された画像一覧画面が表示され、その中の一つがユーザにより選択されると、それを撮像部101で撮像した画像として、次の処理(シャッターが押された後の処理)が行われる。条件設定ボタン50は、各種の撮像条件を設定するためのボタンである。   In FIG. 14, reference numeral 10 is a shutter button, reference numeral 20 is an auto focus setting button, reference numeral 30 is an exposure adjustment bar, reference numeral 40 is an image reading button, and reference numeral 50 is It is a condition setting button. The shutter button 10 is a button for determining a captured image displayed on the display unit 105 as an output target image. The autofocus button 20 is a button for automatically focusing. The exposure adjustment bar 40 is a bar for adjusting the light exposure. The image reading button 40 is for processing an image saved in advance as a captured image. When the image reading button 40 is pressed, the stored image list screen is displayed, and when one of the images is selected by the user, the next processing (shutter is performed as an image captured by the imaging unit 101). Processing) is performed. The condition setting button 50 is a button for setting various imaging conditions.

一方、全ての頂点座標に対してフラグを記憶していない場合(S610でNo)、表示処理部112は、3つの頂点座標に対してフラグを記憶しているか確認する(S612)。   On the other hand, when the flag is not stored for all the vertex coordinates (No in S610), the display processing unit 112 confirms whether the flag is stored for the three vertex coordinates (S612).

S612でNoの場合、つまり、2以下の頂点座標のみが撮像範囲内である場合には、表示処理部112は、撮像対象物が撮像範囲内であることを示す情報(例えば、「OK」)を表示部105に表示しない。そのため、ユーザは、撮像対象物が撮像範囲内にないことを認識して、撮像部101の向きを変更させる。撮像部101の向きが変更された後(S617)、再度S1の処理に戻る。すなわち、撮像部101の向きが変更された後の画像データに基づいて、再度S1以降の処理が実施される。   In the case of No in S612, that is, when only vertex coordinates of 2 or less are within the imaging range, the display processing unit 112 displays information indicating that the imaging object is within the imaging range (for example, "OK") Is not displayed on the display unit 105. Therefore, the user recognizes that the imaging target object is not within the imaging range, and changes the orientation of the imaging unit 101. After the direction of the imaging unit 101 is changed (S617), the process returns to S1 again. That is, based on the image data after the direction of the imaging unit 101 has been changed, the processes after S1 are performed again.

S612でYesの場合、つまり、3つの頂点座標が撮像範囲内である場合には、表示処理部112は、4つの頂点座標を結ぶ四角形の線を撮像対象物の輪郭線として撮像画像に重ねて表示する。さらに、表示処理部112は、撮像対象物の一部(一角)が撮像できないことを示す第1欠落情報を表示部105に表示させる(S613)。   In the case of Yes in S612, that is, when the three vertex coordinates are within the imaging range, the display processing unit 112 superimposes a quadrilateral line connecting the four vertex coordinates on the captured image as the outline of the imaging object. indicate. Furthermore, the display processing unit 112 causes the display unit 105 to display first loss information indicating that a part (one corner) of the imaging target can not be imaged (S613).

図15の(a)(b)は、S613において表示部105に表示される画面の一例を示す図である。図15に示されるように、頂点座標を結ぶ四角形の線である輪郭線Lは、矩形の撮像対象物と背景との境界上に表示されることとなる。そのため、ユーザは、撮像対象物が撮像範囲内であることを容易に確認することができる。   (A) and (b) of FIG. 15 are diagrams showing an example of a screen displayed on the display unit 105 in S613. As shown in FIG. 15, an outline L which is a rectangular line connecting vertex coordinates is displayed on the boundary between the rectangular imaging target and the background. Therefore, the user can easily confirm that the imaging target is within the imaging range.

また、第1欠落情報として、撮像範囲外に位置する頂点座標の付近に、角が欠落していることを示す第1アイコンBが表示されている。ここでは、表示処理部112は、撮像範囲外の頂点座標を基に、撮像範囲の中から当該頂点座標に最も近い点を特定し、特定した点から予め定められた距離の範囲内に第1アイコンBを表示する。このとき、表示処理部112は、第1アイコンBと輪郭線Lとが重ならないように表示する。これにより、第1アイコンBを確認したユーザは、当該第1アイコンBの近くの角が撮像範囲から外れていることを容易に認識することができる。そして、ユーザは、撮像対象物が撮像範囲に収まるように、撮像部101の向きを容易に変更することができる。撮像部101の向きが変更された後(S617)、再度S1の処理に戻る。すなわち、撮像部101の向きが変更された後の画像データに基づいて、再度S1以降の処理が実施される。   Further, as the first missing information, a first icon B indicating that a corner is missing is displayed in the vicinity of vertex coordinates located outside the imaging range. Here, the display processing unit 112 identifies a point closest to the vertex coordinate from the imaging range based on the vertex coordinate outside the imaging range, and sets the first point within the range of a predetermined distance from the identified point. Display icon B. At this time, the display processing unit 112 displays so that the first icon B and the outline L do not overlap. Thus, the user who has confirmed the first icon B can easily recognize that the corner near the first icon B is out of the imaging range. Then, the user can easily change the orientation of the imaging unit 101 so that the imaging target object falls within the imaging range. After the direction of the imaging unit 101 is changed (S617), the process returns to S1 again. That is, based on the image data after the direction of the imaging unit 101 has been changed, the processes after S1 are performed again.

また、S601でNoの場合、表示処理部112は、矩形の撮像対象物と背景との境界となる四辺のうちの三辺のみが抽出されたか判断する(S614)。ここでは、表示処理部112は、抽出結果情報が4つの頂点座標を含み、抽出不可情報を含む場合に、三辺のみが抽出されたと判断する。   In addition, in the case of No in S601, the display processing unit 112 determines whether only three sides out of the four sides serving as the boundary between the rectangular imaging target and the background are extracted (S614). Here, the display processing unit 112 determines that only three sides are extracted when the extraction result information includes four vertex coordinates and includes the extraction impossible information.

S614でYesの場合、表示処理部112は、抽出結果情報で示される、仮頂点座標を除く2つの頂点座標が撮像範囲内であるか判断する(S615)。ここで、仮頂点座標を除く2つの頂点座標とは、抽出された三辺が上辺、左辺、右辺の場合には、上辺および左辺の交点である左上頂点座標と、上辺および右辺の交点である右上頂点座標である。また、抽出された三辺が上辺、左辺、下辺の場合には、上辺および左辺の交点である左上頂点座標と、左辺および下辺の交点である左下頂点座標である。また、抽出された三辺が左辺、下辺、右辺の場合には、下辺および左辺の交点である左下頂点座標と、下辺および右辺の交点である右下頂点座標である。また、抽出された三辺が上辺、右辺、下辺の場合には、上辺および右辺の交点である右上頂点座標と、下辺および右辺の交点である右下頂点座標である。S615の処理は、S602〜S609と同様の処理となる。   In the case of Yes in S614, the display processing unit 112 determines whether two vertex coordinates excluding temporary vertex coordinates indicated by the extraction result information are within the imaging range (S615). Here, the two vertex coordinates excluding temporary vertex coordinates are the upper left vertex coordinates which are the intersections of the upper side and the left side, and the intersections of the upper side and the right side when the extracted three sides are the upper side, the left side and the right side. It is upper right vertex coordinates. When the extracted three sides are the upper side, the left side, and the lower side, the upper left vertex coordinate which is the intersection of the upper side and the left side and the lower left vertex coordinate which is the intersection of the left side and the lower side. When the extracted three sides are the left side, the lower side, and the right side, they are the lower left vertex coordinate which is the intersection of the lower side and the left side, and the lower right vertex coordinate which is the intersection of the lower side and the right side. Further, in the case where the extracted three sides are the upper side, the right side, and the lower side, they are the upper right vertex coordinate which is the intersection of the upper side and the right side and the lower right vertex coordinate which is the intersection of the lower side and the right side. The process of S615 is the same as the process of S602 to S609.

S614またはS615でNoの場合、表示処理部112は、撮像対象物が撮像範囲内であることを示す情報(例えば、「OK」)を表示部105に表示しない。そのため、ユーザは、撮像対象物が撮像範囲内にないことを認識して、撮像部101の向きを変更させる。撮像部101の向きが変更された後(S617)、再度S1の処理に戻る。   In the case of No in S614 or S615, the display processing unit 112 does not display information (for example, “OK”) indicating that the imaging target object is within the imaging range on the display unit 105. Therefore, the user recognizes that the imaging target object is not within the imaging range, and changes the orientation of the imaging unit 101. After the direction of the imaging unit 101 is changed (S617), the process returns to S1 again.

一方、S615でYesの場合、表示処理部112は、4つの頂点座標を結ぶ四角形の線のうち2つの仮頂点座標間の辺を除く線を撮像対象物の輪郭線として撮像画像に重ねて表示する。そして、表示処理部112は、撮像対象物の一部(一辺)が撮像できないことを示す第2欠落情報を表示部105に表示させる(S616)。   On the other hand, in the case of Yes in S615, the display processing unit 112 displays the line excluding the side between two temporary vertex coordinates among the quadrilateral lines connecting the four vertex coordinates as an outline of the object to be imaged superimposed on the captured image Do. Then, the display processing unit 112 causes the display unit 105 to display second loss information indicating that a part (one side) of the imaging target can not be imaged (S616).

図16は、S616において表示部105に表示される画面の一例を示す図である。図16に示されるように、輪郭線Lは、矩形の撮像対象物と背景との境界上に表示されることとなる。そのため、ユーザは、撮像対象物が撮像範囲内であることを容易に確認することができる。   FIG. 16 is a view showing an example of a screen displayed on the display unit 105 in S616. As shown in FIG. 16, the outline L is displayed on the boundary between the rectangular imaging object and the background. Therefore, the user can easily confirm that the imaging target is within the imaging range.

また、第2欠落情報として、撮像範囲外に位置する辺の付近に、撮像対象物の外枠の一辺が欠落していることを示す第2アイコンCが表示されている。なお、表示処理部112は、抽出不可情報で示される辺に対応する撮像範囲の枠の辺から予め定められた範囲内に第2アイコンCを表示する。例えば、抽出不可情報が右辺である場合には、撮像範囲の外枠の右辺(つまり、x=Xmaxで示される線)の付近に第2アイコンCを表示する。これにより、第2アイコンCを確認したユーザは、第2アイコンCの近くの辺が撮像範囲から外れていることを容易に認識することができる。これにより、ユーザは、撮像対象物が撮像範囲に収まるように、撮像部101の向きを容易に変更することができる。そして、撮像部101の向きが変更された後(S617)、再度S1の処理に戻る。すなわち、撮像部101の向きが変更された後の画像データに基づいて、再度S1以降の処理が実施される。   Further, as the second missing information, a second icon C indicating that one side of the outer frame of the imaging target is missing is displayed near the side located outside the imaging range. The display processing unit 112 displays the second icon C within a predetermined range from the side of the frame of the imaging range corresponding to the side indicated by the extraction impossible information. For example, when the extraction impossible information is the right side, the second icon C is displayed in the vicinity of the right side of the outer frame of the imaging range (that is, a line indicated by x = Xmax). Thus, the user who has confirmed the second icon C can easily recognize that the side near the second icon C is out of the imaging range. Thereby, the user can easily change the orientation of the imaging unit 101 so that the imaging target object falls within the imaging range. Then, after the orientation of the imaging unit 101 is changed (S617), the process returns to S1 again. That is, based on the image data after the direction of the imaging unit 101 has been changed, the processes after S1 are performed again.

なお、表示処理部112は、輪郭線Lとは異なる色の第1欠落情報および第2欠落情報を表示することが好ましい。これにより、ユーザは、第1欠落情報および第2欠落情報の確認が容易となる。   Preferably, the display processing unit 112 displays the first dropout information and the second dropout information of a color different from that of the outline L. Thereby, the user can easily confirm the first missing information and the second missing information.

(ステップ7(S7))
最後に、出力対象画像決定部113は、出力処理の対象となる画像データである出力対象画像データを決定する。具体的には、出力対象画像決定部113は、図14に示されるように、撮像対象物が撮像範囲内であることを示す情報(例えば、「OK」)と、シャッタボタン10とが表示部105に表示されている状態において、シャッタボタン10が操作されたタイミングを検知する。そして、出力対象画像決定部113は、シャッタボタン10が操作されたタイミングを指定されたタイミングとして、当該タイミングで表示部105に表示されている撮像画像を示す画像データを出力対象画像データとして決定する。
(Step 7 (S7))
Finally, the output target image determination unit 113 determines output target image data which is image data to be output processing target. Specifically, as shown in FIG. 14, the output target image determination unit 113 displays information (for example, “OK”) indicating that the imaging target object is within the imaging range, and the shutter button 10 as a display unit. In the state displayed on the screen 105, the timing at which the shutter button 10 is operated is detected. Then, the output target image determination unit 113 determines, as the output target image data, the image data indicating the captured image displayed on the display unit 105 at the specified timing, with the timing when the shutter button 10 is operated as the specified timing. .

なお、出力対象画像決定部113は、撮像対象物が撮像範囲内であることを示す情報が表示されているときのみ、シャッタボタン10の操作を受け付け可能としている。   The output target image determination unit 113 can accept the operation of the shutter button 10 only when the information indicating that the imaging target object is within the imaging range is displayed.

(3−3)幾何学的配置検出部の別の処理例(その1)
幾何学的配置検出部111は、上記のS2の処理を省略し、上記のS3において図37に示すような処理を行うことで、撮像対象物と背景との境界を含む領域の候補(特徴領域)を抽出してもよい。なお、図37は、本変形例における特徴領域抽出処理(S3)を示すフローチャートである。また、図38は、本変形例における特徴領域抽出処理によって特徴領域が抽出される様子を示す図である。
(3-3) Another Processing Example of Geometrical Arrangement Detection Unit (Part 1)
The geometric arrangement detection unit 111 omits the process of S2 described above, and performs the process shown in FIG. 37 in S3 described above, so that the candidate of the area including the boundary between the imaging object and the background (feature area ) May be extracted. FIG. 37 is a flowchart showing the feature area extraction process (S3) in the present modification. FIG. 38 is a diagram showing how a feature area is extracted by the feature area extraction process according to this modification.

まず、幾何学的配置検出部111は、図38で示されるように、(1)の撮像画像からS1で抽出した(2)のエッジ画像を取得する。そして、幾何学的配置検出部111は、抽出されたエッジ画像に対して、一段階の膨張処理を行う(S311)。一段階の膨張処理とは、注目画素がエッジの場合、注目画素の周辺4近傍(注目画素の上、左、下、右に位置する画素)の画素をエッジにする処理である。図38の(3)は、膨張処理後のエッジ画像を示しており、エッジ部分が膨張していることがわかる。   First, as shown in FIG. 38, the geometric arrangement detection unit 111 acquires the edge image of (2) extracted in S1 from the captured image of (1). Then, the geometric arrangement detection unit 111 performs a one-step expansion process on the extracted edge image (S311). The expansion process in one step is a process in which, when the pixel of interest is an edge, pixels in the vicinity 4 (pixels located above, to the left, below, and to the right of the pixel of interest) of the pixel of interest are edges. (3) of FIG. 38 shows the edge image after the expansion processing, and it can be seen that the edge portion is expanded.

次に、幾何学的配置検出部111は、エッジ画像を反転させる(S312)。すなわち、エッジ画像においてエッジ画素を非エッジ画素に、非エッジ画素をエッジ画素に置換する。図38の(4)は、反転処理後のエッジ画像を示している。図38の(3)(4)に示されるように、膨張してエッジ領域同士の接続数を増加させた後に反転処理した画像において、画像端(撮像範囲端)に接している領域は背景であるとみなすことができる。   Next, the geometric arrangement detection unit 111 inverts the edge image (S312). That is, in the edge image, edge pixels are replaced with non-edge pixels, and non-edge pixels are replaced with edge pixels. (4) of FIG. 38 shows the edge image after the reverse process. As shown in (3) and (4) of FIG. 38, in the image that is expanded to increase the number of connections between the edge areas and then subjected to the inversion process, the area in contact with the image end (the imaging range end) is the background It can be considered that there is.

続いて、幾何学的配置検出部111は、反転処理後のエッジ画像に対して、連結したエッジ画素の領域(連結領域)ごとに異なるラベルを付すラベリング処理を行う(S313)。当該ラベリング処理は、上記のS2と同様を処理を行えばよい。   Subsequently, the geometric arrangement detection unit 111 performs a labeling process for adding a different label to each area (connected area) of the connected edge pixels (S313). The said labeling process should just perform the process similar to said S2.

幾何学的配置検出部111は、S313でラベル付けされた連結領域の1つを選択し、中心x座標、中心y座標を特定する(S314)。具体的には、最大のx座標と最小のx座標との平均値を中心x座標として求め、最大のy座標と最小のy座標との平均値を中心y座標として求める。   The geometrical arrangement detection unit 111 selects one of the connected regions labeled in S313, and specifies a center x coordinate and a center y coordinate (S314). Specifically, the average value of the maximum x coordinate and the minimum x coordinate is determined as a center x coordinate, and the average value of the maximum y coordinate and the minimum y coordinate is determined as a center y coordinate.

次に、幾何学的配置検出部111は、中心x座標がXmax/4以上かつ3×Xmax/4以下であるか判定する(S315)。   Next, the geometric arrangement detection unit 111 determines whether the center x coordinate is not less than Xmax / 4 and not more than 3 × Xmax / 4 (S315).

S315でYesの場合、幾何学的配置検出部111は、中心y座標がYmax/4以上かつ3×Ymax/4以下であるか判定する(S316)。   In the case of Yes in S315, the geometric arrangement detection unit 111 determines whether the central y coordinate is greater than or equal to Ymax / 4 and less than or equal to 3 × Ymax / 4 (S316).

S316でYesの場合、幾何学的配置検出部111は、連結領域が画像端から離れているかどうかを判定する(S317)。具体的には、選択した連結領域の最大のx座標が画像右端のx座標(画像幅−1)に一致するか、最小のx座標が画像左端のx座標(0)に一致するか、最大のy座標が画像下端のy座標(画像高さ−1)に一致するか、最小のy座標が画像上端のy座標(0)に一致するかを判定する。そして、一つでもYesであるなら、連結領域が画像端に接している(画像端から離れていない)と判定し、全てがNoであれば、画像端から離れていると判定する。   In the case of Yes in S316, the geometric arrangement detection unit 111 determines whether the connection area is far from the image edge (S317). Specifically, whether the largest x coordinate of the selected connected area matches the x coordinate of the right end of the image (image width-1), or the smallest x coordinate matches the x coordinate of the left end of the image (0), or the largest It is determined whether the y coordinate of y coincides with the y coordinate (image height-1) at the lower end of the image or the minimum y coordinate coincides with the y coordinate (0) at the upper end of the image. Then, if even one is Yes, it is determined that the connected area is in contact with the image end (not apart from the image end), and if all are No, it is determined that the connection area is separated from the image end.

S317でYesの場合、幾何学的配置検出部111は、選択した連結領域を特徴領域として抽出する(S318)。その後、未選択の連結領域があるか確認する(S319)。一方、S315,S316,S317の何れかにおいてNoである場合には、選択した連結領域を特徴領域として抽出せずに、未選択の連結領域があるか確認する(S319)。   In the case of Yes in S317, the geometric arrangement detection unit 111 extracts the selected connected area as a feature area (S318). After that, it is checked whether there is an unselected connection area (S319). On the other hand, if any one of S315, S316, and S317 is No, it is confirmed whether there is an unselected connected area without extracting the selected connected area as a feature area (S319).

その後、幾何学的配置検出部111は、未選択の連結領域がある場合には、未選択の一つの連結領域を選択する(S320)。一方、未選択の連結領域がない場合には、幾何学的配置検出部111は、特徴領域抽出処理を終了して図4のS4の処理を行い、撮像対象物と背景との境界を示す確率の高い、線分状に連なるエッジ画素群を検出する。   After that, when there is an unselected connected area, the geometric arrangement detection unit 111 selects one unselected connected area (S320). On the other hand, when there is no unselected connected area, the geometric arrangement detection unit 111 terminates the feature area extraction process and performs the process of S4 in FIG. 4 to indicate the boundary between the object to be imaged and the background. A line segment-shaped edge pixel group is detected.

図38の(5)は、S315またはS316でNoと判定された連結領域を示している。図38の(5)で示される連結領域は、中心座標が画像端に近い領域であり、矩形状の撮像対象物以外の背景部分、または、撮像対象物の端部に描かれた小さい領域である可能性が高い。そのため、図38の(5)で示される連結領域は特徴領域として抽出されない。   (5) in FIG. 38 illustrates the connection area determined as No in S315 or S316. The connection area shown in (5) of FIG. 38 is an area where the center coordinates are close to the image edge, and it is a small area drawn on the edge of the imaging object or a background portion other than the rectangular imaging object. There is a high possibility. Therefore, the connected region shown in (5) of FIG. 38 is not extracted as the feature region.

また、図38の(6)は、S317でNoの判定された連結領域を示している。図38の(6)で示される連結領域は、画像端に接している領域であり、撮像対象物以外の背景部分である可能性が高い。そのため、図38の(6)で示される連結領域は特徴領域として抽出されない。   Further, (6) in FIG. 38 shows the connected area determined No in S317. The connection area shown in (6) of FIG. 38 is an area in contact with the image end, and is highly likely to be a background portion other than the imaging target. Therefore, the connected region shown in (6) of FIG. 38 is not extracted as a feature region.

図38の(7)は、(4)で示される画像から(5)および(6)の領域を除いた領域であり、特徴領域として抽出された領域を示す。図示されるように、撮像対象物と背景との境界を含む領域が特徴領域として抽出されていることがわかる。   (7) of FIG. 38 is an area obtained by removing the areas of (5) and (6) from the image shown by (4), and shows the area extracted as the feature area. As illustrated, it can be seen that the region including the boundary between the imaging target and the background is extracted as the feature region.

(3−4)幾何学的配置検出部の別の処理例(その2)
幾何学的配置検出部111は、S2〜S4の処理とは別に、以下のような処理を行うことで、撮像対象物と背景との境界となる線分状に連なるエッジ画素群に対応する直線の式を求めても良い。
(3-4) Another Processing Example of Geometrical Arrangement Detection Unit (Part 2)
The geometric arrangement detection unit 111 performs the following process separately from the processes of S2 to S4 to form a straight line corresponding to a group of edge pixels connected in a line segment which is a boundary between the object to be imaged and the background. You may find the formula of

つまり、幾何学的配置検出部111は、撮像画像データの中から、線分状に連なるエッジ画素の群を検出し(直線認識を行い)、検出したエッジ画素の群を、撮像対象物と背景との境界と見なす。   That is, the geometric arrangement detection unit 111 detects a group of edge pixels connected in a line segment form in the captured image data (performs straight line recognition), and detects the group of detected edge pixels as the object to be imaged and the background. As the border with

まず、幾何学的配置検出部111は、撮像部101により撮像され、表示部105に表示されている画像データについて、ラスター走査を行う。ここで、図17に示されるように、ラスター走査の順方向をX方向、X方向に垂直な方向をY方向とする。また、撮像画像において左上隅を原点とする。   First, the geometric arrangement detection unit 111 performs raster scan on image data captured by the imaging unit 101 and displayed on the display unit 105. Here, as shown in FIG. 17, the forward direction of raster scanning is taken as the X direction, and the direction perpendicular to the X direction is taken as the Y direction. Also, in the captured image, the upper left corner is taken as the origin.

1ライン分走査を行い、エッジが存在しなければ、幾何学的配置検出部111は、Y方向に所定量だけずらした次のラインについて走査する。なお、ライン間の間隔は一定であればよく、1画素である必要はない。   When scanning for one line is performed and there is no edge, the geometric arrangement detection unit 111 scans for the next line shifted by a predetermined amount in the Y direction. Note that the interval between lines may be constant, and does not have to be one pixel.

そして、幾何学的配置検出部111は、ラスター走査において、最初にエッジを検出したラインをL1(1ライン目)とし、図18に示すように、順方向で最初のエッジと判定された点の座標を第1群(第1エッジ画素群)に格納し、同じライン上で2つ目のエッジと判定された点の座標を第2群(第2エッジ画素群)に分類する。引き続き次のラインの走査を行い、エッジ検知する。そして、それぞれのラインLiについて、順方向で1番目に撮像対象物のエッジと判定された点と、2番目に撮像対象物のエッジと判定された点とのX座標値の差分(X座標の距離di)を求め下記のように判定を行う。   Then, in the raster scan, the geometric arrangement detection unit 111 sets the line at which the edge is first detected as L1 (first line), and as shown in FIG. 18, the point determined as the first edge in the forward direction. The coordinates are stored in a first group (first edge pixel group), and the coordinates of the point determined as the second edge on the same line are classified into a second group (second edge pixel group). Continue scanning the next line to detect edges. Then, for each line Li, a difference between X coordinate values of a point determined first as an edge of the imaging object in the forward direction and a point determined secondly as an edge of the imaging object (X coordinate The distance di) is obtained and the determination is made as follows.

なお、ラインLiにおける最初のエッジのX座標をXi1(第1群に分類されているX座標)、2つ目のエッジのX座標をXi2(第2群に分類されているX座標)とする。検出方法は以下のようである。   Note that the X coordinate of the first edge of the line Li is Xi1 (X coordinate classified into the first group), and the X coordinate of the second edge is Xi2 (X coordinate classified into the second group) . The detection method is as follows.

(a)1ライン(L1)目の座標X11およびX12については変更しない。   (A) The coordinates X11 and X12 of the first line (L1) are not changed.

(b)2ライン目以降のiライン目については、座標間の距離di1(=Xi1−X(i−1)1)およびdi2(同様)を算出する。以下、di1に関して述べるため添え字の1を省略するが、di2も同様である。   (B) For the i-th line after the second line, the distances di1 (= Xi1-X (i-1) 1) and di2 (same) between coordinates are calculated. Although the subscript 1 is omitted to describe di1 hereinafter, the same applies to di2.

(c)3ライン目以降のiライン目は、ddi=abs{(di)−di−1}を算出する。ddi≦th1(≒0に近い小さな数値)であれば、座標Xiは同じ群に分類する。そうでない場合(ddi>th1)は、別の群(第3群(第3エッジ画素群)または第4群(第4エッジ画素群))に分類する。   (C) For the ith line after the third line, ddi = abs {(di) −di−1} is calculated. If ddi ≦ th1 (small numerical value close to ≒ 0), the coordinates Xi are classified into the same group. If not (ddi> th1), it is classified into another group (third group (third edge pixel group) or fourth group (fourth edge pixel group)).

(d)初期処理としてi=4のときのみ、X2の群を確定させるための処理を行う。以下のようにする。   (D) As the initial process, only when i = 4, the process for determining the group of X2 is performed. Do as follows.

i)dd3≦th1 かつ dd4≦th1 → X2:同群
ii)dd3>th1 かつ dd4≦th1 → X2:別群
iii)dd3≦th1 かつ dd4>th1 → X2:同群
iv)dd3>th1 かつ dd4>th1 → X2:同群
一度、別群(第3群または第4群)に遷移した場合は、増減の確認をする必要はない。
i) dd3 ≦ th1 and dd4 ≦ th1 → X2: same group
ii) dd3> th1 and dd4 ≦ th1 → X2: another group
iii) dd3 ≦ th1 and dd4> th1 → X2: same group
iv) dd3> th1 and dd4> th1 → X2: The same group Once transition to another group (the third or fourth group), it is not necessary to confirm increase or decrease.

このような処理を画像全体に行って、各群に属するエッジ画素を抽出する。そして、エッジ画素群ごとに、当該エッジ画素群に属するエッジ画素の座標を最小2乗法などで直線近似し、当該エッジ画素群に属するエッジ画素に近似した直線を求める。ここで、幾何学的配置検出部111は、各エッジ画素群について求めた近似直線と当該エッジ画素群に含まれるエッジ画素との距離の二乗和の平均が所定閾値以下である場合に、エッジ画素群が線分状に配列しているものと判断し、以下の処理を続行することができる。これにより、幾何学的配置検出部111は、撮像対象物と背景との境界として推定される、線分状に連なるエッジ画素群を検出することができる。そして、幾何学的配置検出部111は、検出された各エッジ画素群について求めた近似直線を、撮像対象物と背景との境界となる四辺に対応する直線とすればよい。   Such processing is performed on the entire image to extract edge pixels belonging to each group. Then, for each edge pixel group, the coordinates of the edge pixel belonging to the edge pixel group are linearly approximated by the least square method or the like, and a straight line approximated to the edge pixel belonging to the edge pixel group is determined. Here, the geometric arrangement detection unit 111 detects an edge pixel when the average of the sum of squares of the distances between the approximate straight line determined for each edge pixel group and the edge pixels included in the edge pixel group is equal to or less than a predetermined threshold. It can be determined that the groups are arranged in a line, and the following processing can be continued. Thus, the geometric arrangement detection unit 111 can detect a group of edge pixels connected in a line segment shape, which is estimated as the boundary between the object to be imaged and the background. Then, the geometric arrangement detection unit 111 may set the approximate straight lines obtained for each of the detected edge pixel groups as straight lines corresponding to the four sides serving as the boundary between the object to be imaged and the background.

図19は、上記のような処理によって、ラスター走査によってエッジ点を抽出し、4つのエッジ画素群に分類したときの図である。図において、丸印が第1群に属するエッジ画素、四角印が第2群に属するエッジ画素、三角印が第3群に属するエッジ画素、星印が第4群に属するエッジ画素を示し、最小2乗法により求められた、各エッジ画素群に属するエッジ画素の近似直線を点線で示す。   FIG. 19 is a diagram when edge points are extracted by raster scanning and classified into four edge pixel groups by the above-described processing. In the figure, circle marks indicate edge pixels belonging to the first group, square marks edge pixels belonging to the second group, triangle marks edge pixels belonging to the third group, and star marks indicate edge pixels belonging to the fourth group. An approximate straight line of edge pixels belonging to each edge pixel group, which is obtained by the square method, is indicated by a dotted line.

さらに、上記の分類処理を90度回転させた画像に対して行っても良い。こうすることで、理想的に画像内の水平方向・垂直方向に平行に配置されたような原稿のエッジ画素群も抽出することが可能となる。すなわち、ラスター走査することで、回転前の画像では、垂直方向のエッジが検出できる。一方、回転後の画像では、回転前に水平方向であったエッジ画素群(回転後には垂直方向であるエッジ)を検出することができる。これにより、垂直方向・水平方向に平行なエッジも抽出することができる。回転前で十分な情報量(各群で例えば3点以上の交点)があれば、回転前の情報のみを用いればよいし、いずれかの群の交点が1点未満の場合、当然直線の式は求められないため、回転後の交点を用いればよい。   Furthermore, the above classification process may be performed on an image rotated 90 degrees. By doing this, it is possible to extract an edge pixel group of a document which is ideally arranged in parallel with the horizontal and vertical directions in the image. That is, by raster scanning, vertical edges can be detected in the image before rotation. On the other hand, in the image after rotation, it is possible to detect an edge pixel group in the horizontal direction before rotation (edge in the vertical direction after rotation). Thereby, edges parallel to the vertical and horizontal directions can also be extracted. If there is a sufficient amount of information before rotation (for example, three or more intersection points in each group), only the information before rotation may be used, and if the intersection point of any group is less than one point, a straight line expression Can not be obtained, so it is sufficient to use the intersection after rotation.

あるいは、求まった交点座標のみを再度座標変換して元に戻し、それぞれの群の分布する領域から、対応する群を求めて、交点情報を統合し、直線の式を求めても良い。すなわち、回転前の画像から求められた交点座標と、回転後の画像から求められた交点を逆回転して得られた交点座標とから、同一の群に属する好転座標を統合して直線の方程式を求めればよい。   Alternatively, only the obtained intersection coordinates may be subjected to coordinate conversion again to be returned to the original, and corresponding groups may be obtained from the areas where the respective groups are distributed, and the intersection information may be integrated to obtain straight line expressions. That is, from the coordinates of the point of intersection obtained from the image before rotation and the coordinates of the point of intersection obtained by reversely rotating the point of intersection obtained from the image after rotation, an equation of a straight line You can ask for

なお、エッジ画素の抽出方法としては、少なくとも1以上の画素幅の小ウィンド内での画素値をそのまま比較(2以上の幅の場合は和・平均値を比較)していき、隣接する値の差分が一定以上の場合、エッジ画素であると判定すればよい。なお、背景や撮像対象物内のテキストのエッジなどを誤って検出することを防止するために、所定長さ以上のエッジ画素群のみを撮像対象物のエッジとして検出してもよい。この場合、所定長さとは、例えば、撮像範囲の外枠辺の長さの80%程度の長さを設定すればよい。このような検出方法としては、例えば、日本国公開特許公報「特開2006−237757」に記載の技術を用いることができる。もしくは、それぞれの座標群の評価を行ったり、線分検知のための処理(ハフ変換など)を行ったりすることでも防止できる。さらに、縮小画像を用いた処理をプレ処理として行うことで、テキストや細かなテクスチャのエッジを誤って検出することを防止することができる。   As a method of extracting edge pixels, pixel values within a small window of at least one or more pixel widths are compared as they are (in the case of two or more widths, the sum and average values are compared). If the difference is equal to or greater than a predetermined value, it may be determined that the pixel is an edge pixel. In order to prevent erroneous detection of the background or the edge of the text in the imaging target, only the edge pixel group having a predetermined length or more may be detected as the edge of the imaging target. In this case, the predetermined length may be, for example, about 80% of the length of the outer frame side of the imaging range. As such a detection method, for example, the technology described in Japanese Patent Application Laid-Open No. 2006-237757 can be used. Alternatively, it can be prevented by evaluating each coordinate group or performing processing (such as Hough transform) for line segment detection. Furthermore, by performing processing using a reduced image as pre-processing, it is possible to prevent erroneous detection of the edges of text and fine textures.

(3−5)幾何学的配置検出部の別の処理例(その3)
上記の(3−2)(3−3)(3−4)で示した、撮像対象物と背景との境界を示す確率の高い線分状に連続したエッジ画素群の検出方法にはそれぞれ特徴がある。例えば、(3−2)に示す検出方法では、幾何学的配置検出部111は、撮像対象物として文字原稿だけでなくイラスト原稿や写真などを検出することが可能であるが、撮像対象物の周辺に模様や物体がある撮像画像(Cannyフィルタによって、撮像対象物と背景のエッジが繋がってしまう撮像画像)に対しては、正確に撮像対象物と背景との境界を示すエッジ画素群を検出することが困難である。また、(3−3)に示す検出方法では、幾何学的配置検出部111は、撮像対象物の周辺に模様や物体がある撮像画像であっても、原稿を検出する事が可能であるが、イラスト原稿や写真のような撮像画像(Cannyフィルタでエッジが途切れてしまう撮像画像)に対しては、撮像対象物と背景との境界を示すエッジ画素群を検出できないことがある。
(3-5) Another Processing Example of Geometrical Arrangement Detection Unit (Part 3)
Each of the methods for detecting an edge pixel group continuous in the form of a line segment having a high probability of indicating the boundary between the object to be imaged and the background shown in the above (3-2) (3-3) (3-4) There is. For example, in the detection method shown in (3-2), the geometric arrangement detection unit 111 can detect not only a text original but also an illustration original or a photograph as an imaging target object. For a captured image with a pattern or an object in the periphery (a captured image in which the edge of the imaging object and the background are connected by the Canny filter), edge pixel groups indicating the boundary between the imaging object and the background are accurately detected It is difficult to do. Further, in the detection method shown in (3-3), the geometric arrangement detection unit 111 can detect the document even in the case of a captured image having a pattern or an object around the imaging target object. For a captured image such as an illustration original or a photo (a captured image whose edge is interrupted by a Canny filter), an edge pixel group indicating the boundary between the object to be captured and the background may not be detected in some cases.

そこで、上記の(3−2)(3−3)(3−4)の抽出方法によりこのような特徴の差異があることから、一つの撮像画像に対して幾何学的配置検出部111が複数の検出方法を適用してもよい。例えば、一つの撮像画像に対して、(3−2)、(3−3)、(3−4)の順に処理を実行し、最初に撮像対象物と背景との境界となる三辺または四辺を抽出できた処理において生成された抽出結果情報を採用する。   Therefore, since there is such a difference in the characteristics according to the extraction methods (3-2), (3-3), and (3-4) described above, a plurality of geometrical arrangement detection units 111 are provided for one captured image. The detection method of may be applied. For example, processing is performed on one captured image in the order of (3-2), (3-3), and (3-4), and first, three sides or four sides that become the boundary between the imaging target object and the background The extraction result information generated in the processing which can extract

また、撮像対象物と携帯端末装置100とがそれぞれ静止状態であるなら、撮像部101により連続して撮像された撮像画像(プレビュー用のフレーム)にはほとんど差異がない。そのため、幾何学的配置検出部111は、(3−2)(3−3)(3−4)の複数の検出方法から選択した1つを、連続して撮像される撮像画像の各々に対し適用してもよい。   In addition, when the imaging target object and the mobile terminal device 100 are each in a stationary state, there is almost no difference in captured images (frames for preview) captured continuously by the imaging unit 101. Therefore, the geometric arrangement detection unit 111 selects one of the plurality of detection methods of (3-2), (3-3), and (3-4) for each of the captured images continuously captured. It may apply.

図39は、撮像画像に対して適用する検出方法の決定処理を示すフローチャートである。複数の検出方法には、選択順を示す選択番号が予め付されている。まず、幾何学的配置検出部111は、選択番号が1番目の検出方法を選択し、選択した検出方法を用いて抽出結果情報を生成する(S390)。例えば、(3−2)で示す検出方法を選択する。   FIG. 39 is a flowchart illustrating determination processing of a detection method to be applied to a captured image. A selection number indicating the selection order is attached in advance to the plurality of detection methods. First, the geometric arrangement detection unit 111 selects the detection method having the first selection number, and generates extraction result information using the selected detection method (S390). For example, the detection method shown in (3-2) is selected.

次に、幾何学的配置検出部111は、現在の撮像画像(フレーム)に対する抽出結果情報を確認し、撮像対象物と背景との境界の検出に成功したか否かを判断する(S391)。幾何学的配置検出部111は、抽出結果情報が撮像対象物と背景との境界を適切に抽出できなかった旨を示している場合に検出が失敗であると判断し、そうでない場合に検出が成功したと判断すればよい。   Next, the geometric arrangement detection unit 111 confirms extraction result information for the current captured image (frame), and determines whether or not the detection of the boundary between the object to be captured and the background has succeeded (S391). The geometric arrangement detection unit 111 determines that the detection is a failure when the extraction result information indicates that the boundary between the object to be imaged and the background could not be properly extracted, and the detection is not performed otherwise. You should judge that it succeeded.

検出に成功した場合(S391でYes)、幾何学的配置検出部111は、前回検出成功フラグをオンにする(S392)。その後、S398の処理に移行する。   If the detection is successful (Yes in S391), the geometric arrangement detection unit 111 turns on the previous detection success flag (S392). Thereafter, the process proceeds to the process of S398.

一方、検出に失敗した場合(S391でNo)、幾何学的配置検出部111は、前回検出成功フラグがオンであるか否かを確認する(S393)。前回検出成功フラグがオンである場合(S393でYes)、幾何学的配置検出部111は、前回検出成功フラグをオフに変更する(S394)。一方、前回検出成功フラグがオフである場合(S393でNo)、幾何学的配置検出部111は、選択番号が次の検出方法が存在するか確認する(S395)。次の検出方法が存在する場合(S395でYes)、当該検出方法を選択し(S396)、次の検出方法が存在しない場合(S395でNo)、1番目の検出方法を選択する(S397)。その後、S398の処理に移行する。   On the other hand, if the detection fails (No in S391), the geometric arrangement detection unit 111 confirms whether the previous detection success flag is on (S393). If the previous detection success flag is on (Yes in S393), the geometric arrangement detection unit 111 changes the previous detection success flag to off (S394). On the other hand, when the previous detection success flag is off (No in S393), the geometric arrangement detection unit 111 confirms whether or not there is a detection method having the next selection number (S395). If the next detection method exists (Yes in S395), the detection method is selected (S396), and if the next detection method does not exist (No in S395), the first detection method is selected (S397). Thereafter, the process proceeds to the process of S398.

次に、S398において、幾何学的配置検出部111は、撮像画像の表示続行が必要か確認する。例えば、文書撮像モードの終了指示などが入力されていない場合、撮像画像の表示続行が必要であると判断すればよい。   Next, in S398, the geometric arrangement detection unit 111 confirms whether it is necessary to continue the display of the captured image. For example, when an instruction to end the document imaging mode is not input, it may be determined that the display continuation of the captured image is necessary.

S398でYesの場合、幾何学的配置検出部111は、次の撮像画像(フレーム)に対して、選択した検出方法により検出処理を行う(S399)。その後、S391の処理に戻る。   In the case of Yes in S398, the geometric arrangement detection unit 111 performs a detection process on the next captured image (frame) by the selected detection method (S399). Thereafter, the process returns to the process of S391.

図40は、図39のフローチャートにより検出方法を決定する例を示す図である。図示されるように、最初の撮像画像(第1フレーム)に対して、幾何学的配置検出部111は、選択番号が1番目の検出方法を用いて抽出結果情報を生成する。なお、前回検出成功フラグは、文書撮像モードを開始したタイミングでオフになるように設定されているものとする。そのため、検出失敗した場合、S396により次の撮像画像(第2フレーム)に対して用いる検出方法として2番目の検出方法が選択される。   FIG. 40 is a diagram showing an example of determining the detection method according to the flowchart of FIG. As illustrated, with respect to the first captured image (first frame), the geometric arrangement detection unit 111 generates extraction result information using the detection method with the first selection number. It is assumed that the previous detection success flag is set to be turned off at the timing when the document imaging mode is started. Therefore, if the detection fails, the second detection method is selected as the detection method to be used for the next captured image (second frame) in S396.

そして、幾何学的配置検出部111は、2番目の撮像画像(第2フレーム)に対して2番目の検出方法を用いて抽出結果情報を生成する。ここで、検出成功すると、S392により前回検出成功フラグがオンに設定される。   Then, the geometric arrangement detection unit 111 generates extraction result information on the second captured image (second frame) using the second detection method. Here, if the detection is successful, the previous detection success flag is set to ON in S392.

その後、3番目の撮像画像(第3フレーム)に対して2番目の検出方法を用いて検出成功した場合、検出成功であるため2番目の検出方法が選択されたままとなり、4番目の撮像画像(第4フレーム)に対しても2番目の検出方法を用いて検出処理が実行される。4番目の撮像画像に対して検出失敗したとしても、前回検出成功フラグがオンであるために(S393でYes)、検出方法の変更が行われない。そのため、5番目の撮像画像(第5フレーム)に対しても2番目の検出方法を用いて検出処理が実行される。ただし、検出失敗のため、前回検出成功フラグがオフに切り替えられる。   Thereafter, when the detection is successful using the second detection method for the third captured image (the third frame), the second detection method remains selected because the detection is successful, and the fourth captured image The detection process is also performed on the (fourth frame) using the second detection method. Even if the detection failure occurs for the fourth captured image, the detection method is not changed because the previous detection success flag is on (Yes in S393). Therefore, the detection process is performed on the fifth captured image (fifth frame) using the second detection method. However, because of the detection failure, the previous detection success flag is switched off.

その後、5番目の撮像画像に対して検出失敗すると、前回検出成功フラグがオフであるために、S396により次の撮像画像(第6フレーム)に対して用いる検出方法として次の検出方法(つまり3番目の検出方法)が選択される。   After that, if the detection failure for the fifth captured image fails, the previous detection success flag is off, so the next detection method (that is, 3) is used as the detection method to be used for the next captured image (sixth frame) in S396. The second detection method is selected.

このように、第1フレームに対して1番目の検出方法による抽出が失敗した場合、次の第2フレームに対して2番目の検出方法による検出処理が実行される。また、第5フレームに対して2番目の検出方法による検出が失敗した場合、次の第6フレームに対して3番目の検出方法による検出処理が実行される。すなわち、処理対象の撮像画像の前の撮像画像に対する検出処理が失敗である場合、当該前の撮像画像に対して用いた検出方法とは異なる検出方法を用いて処理対象の撮像画像について検出処理を行う。これにより、撮像画像のタイプに応じた最適な検出方法を選択することができる。   As described above, when the extraction by the first detection method for the first frame fails, the detection process by the second detection method is executed for the next second frame. In addition, when the detection by the second detection method for the fifth frame fails, the detection processing by the third detection method is executed for the next sixth frame. That is, when the detection processing on the previous captured image of the processing target image fails, the detection processing on the captured image of the processing target is performed using a detection method different from the detection method used for the previous captured image. Do. Thereby, the optimal detection method according to the type of captured image can be selected.

ただし、図39,40で示されるように、一度検出成功した場合、1回だけ検出失敗したとしても検出方法が変更されず、連続して2回検出失敗した場合に検出方法が変更される。これにより、手ぶれ等の何らかの理由でたまたま検出失敗した場合でも検出方法が変更されることがない。   However, as shown in FIGS. 39 and 40, when detection is successful once, even if detection fails once, the detection method is not changed, and when detection fails twice in a row, the detection method is changed. Thus, the detection method is not changed even if the detection fails by any reason such as camera shake.

(3−6)表示処理部の別の処理例
上記の(3−2)のS6では、表示処理部112は、撮像画像ごとに、当該撮像画像から生成された抽出結果情報で示される4つの頂点座標を結ぶ四角形の線を撮像対象物の輪郭線として当該撮像画像に重ねて表示するものとした。
(3-6) Another Processing Example of Display Processing Unit In S6 of the above (3-2), the display processing unit 112 displays, for each of the captured images, four pieces of extraction result information generated from the captured image. A quadrangular line connecting vertex coordinates is displayed as an outline of the imaging object so as to be superimposed on the imaging image.

ただし、連続して撮像された撮像画像ごとに撮像対象物の輪郭線を表示した場合、撮像対象物と背景との配置やコントラスト、照明状態、手ぶれなどの要因により、抽出結果情報で示される4つの頂点座標が撮像画像ごとに大きく変わる可能性がある。この場合、輪郭線が大きくちらついてしまうため、表示処理部112は、以下のような処理を行ってもよい。   However, when the outline of the object to be imaged is displayed for each captured image captured continuously, the extraction result information is indicated by the extraction result information due to factors such as the arrangement and contrast between the object to be imaged and the background, lighting conditions, and camera shake. Two vertex coordinates may greatly change from one captured image to another. In this case, the display processing unit 112 may perform the following processing because the outline is greatly flickered.

表示処理部112は、表示用4頂点座標を記憶する機能、および、前回の撮像画像(フレーム)について4つの頂点座標の検出が成功したか否かを示すフレームスキップフラグを設定する機能を有している。なお、文書撮像モードが起動したタイミングでは、表示処理部112は、フレームスキップフラグをオフに設定する。また、文書撮像モードが終了したタイミングで、表示処理部112は、表示用4頂点座標を消去するものとする。そのため、文書撮像モードを起動したときには、表示処理部112は、オフに設定されたフレームスキップフラグを記憶し、表示用4頂点座標を記憶していない。   The display processing unit 112 has a function of storing four vertex coordinates for display, and a function of setting a frame skip flag indicating whether detection of four vertex coordinates has succeeded for the previous captured image (frame). ing. The display processing unit 112 sets the frame skip flag to OFF at the timing when the document imaging mode is activated. Further, it is assumed that the display processing unit 112 erases the four display apex coordinates at the timing when the document imaging mode ends. Therefore, when the document imaging mode is activated, the display processing unit 112 stores the frame skip flag set to OFF and does not store the four display vertex coordinates.

図13に示すS611において、表示処理部112は、図41に示す輪郭線表示処理を行ってもよい。図41は、本変形例においてS611で行われる輪郭線表示処理例を示すフローチャートである。なお、S611は、4つの頂点座標が全て撮像範囲内である場合(全ての頂点座標のフラグが立っている場合(図13のS610においてYesの場合))に実施される処理である。   In S611 illustrated in FIG. 13, the display processing unit 112 may perform the outline display process illustrated in FIG. FIG. 41 is a flowchart showing an example of contour line display processing performed in S611 in the present modification. S611 is a process performed when all four vertex coordinates are within the imaging range (when flags of all vertex coordinates are set (Yes in S610 of FIG. 13)).

まず、表示処理部112は、表示用4頂点座標を記憶しているか否か確認する(S621)。表示用4頂点座標を記憶していない場合(S621でNo)、表示処理部112は、抽出結果情報で示される4つの頂点座標を表示用4頂点座標として決定する(S622)。一方、表示用4頂点座標を記憶している場合(S621でYes)、表示処理部112は、左上、右上、左下、右下の各頂点について、記憶している表示用4頂点座標と抽出結果情報で示される各頂点座標との中点座標を求め、当該4つの中点座標を新たな表示用4頂点座標として決定する(S623)。   First, the display processing unit 112 checks whether four display vertex coordinates are stored (S621). If the four display vertex coordinates are not stored (No at S621), the display processing unit 112 determines four vertex coordinates indicated by the extraction result information as the four display vertex coordinates (S622). On the other hand, when the display four vertex coordinates are stored (Yes in S621), the display processing unit 112 stores the display four vertex coordinates and the extraction result for each of the upper left, upper right, lower left, and lower right vertices. The midpoint coordinates with each vertex coordinate indicated by the information are obtained, and the four midpoint coordinates are determined as new display four vertex coordinates (S623).

その後、表示処理部112は、決定した新たな表示用4頂点座標を記憶(保存)し(S624)、フレームスキップフラグをオンに設定する(S625)。そして、表示処理部112は、S624で記憶した表示用4頂点座標を基づいて、撮像対象物の輪郭線を表示する(S626)。   Thereafter, the display processing unit 112 stores (stores) the determined new four-display coordinates for display (S624), and sets the frame skip flag to ON (S625). Then, the display processing unit 112 displays the outline of the imaging object based on the four display top coordinates stored in S624 (S626).

図41に示す処理によれば、前回のフレームの撮像画像に対して生成された抽出結果情報を基に生成された表示用4頂点座標を記憶しておく。そして、今回のフレームの撮像画像にたいして生成された抽出結果情報で示される4頂点座標と当該表示4頂点座標との中点座標を新たな表示用4頂点座標として更新し、これをもとに輪郭線を表示する。そのため、連続して表示される複数の撮像画像(フレーム)において、何らかの要因により抽出結果情報で示される4つの頂点座標が撮像画像ごとに大きく変わったとしても、輪郭線のちらつきを防止することができる。   According to the process shown in FIG. 41, the four display apex coordinates generated based on the extraction result information generated for the captured image of the previous frame are stored. Then, the midpoint coordinates of the four vertex coordinates indicated by the extraction result information generated for the captured image of the current frame and the four display vertex coordinates are updated as new four vertex coordinates for display, and the contour is based on this. Display a line Therefore, in a plurality of captured images (frames) displayed continuously, it is possible to prevent the flickering of the outline even if the four vertex coordinates indicated by the extraction result information largely change for each captured image due to some factor it can.

また、図13のS612においてNo、S614においてNo、またはS615においてNoの場合(抽出結果情報で示される4頂点座標が画像範囲内にない場合)、表示処理部112は、図42に示す処理を行う。   Further, in the case of No in S612, No in S614, or No in S615 in FIG. 13 (when the four vertex coordinates indicated by the extraction result information are not within the image range), the display processing unit 112 performs the process shown in FIG. Do.

まず、表示処理部112は、フレームスキップフラグがオンであるか確認する(S631)。フレームスキップフラグがオンである場合(S631でYes)、表示処理部112は、表示用4頂点座標を記憶しているか確認する(S632)。表示用4頂点座標を記憶している場合(S632でYes)、表示処理部112は、表示用4頂点座標をそのまま維持して(S633)、S635に移行する。一方、表示用4頂点座標を記憶していない場合(S632でNo)、S635に移行する。そして、S635において、フレームスキップフラグをオフに設定する。   First, the display processing unit 112 confirms whether the frame skip flag is on (S631). If the frame skip flag is on (Yes in S631), the display processing unit 112 confirms whether four display vertex coordinates are stored (S632). If the four display vertex coordinates are stored (Yes in S632), the display processing unit 112 maintains the four display vertex coordinates as it is (S633), and the process proceeds to S635. On the other hand, when the four display vertex coordinates are not stored (No in S632), the process proceeds to S635. Then, in S635, the frame skip flag is set to off.

一方、フレームスキップフラグがオフである場合(S631でNo)、表示処理部112は、記憶している表示用4頂点座標を消去する(S634)。   On the other hand, if the frame skip flag is off (No in S631), the display processing unit 112 erases the stored four display apex coordinates (S634).

その後、S636において、表示処理部112は、表示用4頂点座標に基づいて輪郭線を表示させる。ただし、表示用4頂点座標を記憶していない場合には輪郭線を表示しない。そして、図13のS617の処理に戻る。   Thereafter, in S636, the display processing unit 112 displays an outline based on the four display top coordinates. However, the outline is not displayed when the four display vertex coordinates are not stored. Then, the process returns to the process of S617 in FIG.

図43は、図41および図42の処理に従って表示処理部112が動作したときの表示部105の画面例を示す図である。S1からS6の処理は、連続して撮像される各撮像画像(フレーム)に対して実行される。図43は、1フレーム目(第1フレーム)から6フレーム目(第6フレーム)までの撮像画像の表示例を示している。   FIG. 43 is a diagram showing a screen example of the display unit 105 when the display processing unit 112 operates according to the processes of FIGS. 41 and 42. The processes from S1 to S6 are performed on each captured image (frame) captured continuously. FIG. 43 illustrates a display example of captured images of the first frame (first frame) to the sixth frame (sixth frame).

図43の例では、文書撮像モードを起動した直後の第1フレームに対する抽出結果情報で示される4つの頂点座標が撮像範囲内であるため、図41のS622に従い、当該4つの頂点座標が表示用4頂点座標として記憶される。そのため、当該4つの頂点座標を用いた輪郭線が表示される。   In the example of FIG. 43, since the four vertex coordinates indicated by the extraction result information for the first frame immediately after activating the document imaging mode are within the imaging range, the four vertex coordinates are for display in accordance with S622 of FIG. It is stored as 4 vertex coordinates. Therefore, an outline using the four vertex coordinates is displayed.

また、第2フレームに対する抽出結果情報で示される4つの頂点座標も撮像範囲内であるため、図41のS623に従い、第1フレームの際に記憶していた表示用4頂点座標と当該4つの頂点座標との中点を新たな表示用4頂点座標として記憶する。そして、当該中点を用いた輪郭線が表示される。   Further, since the four vertex coordinates indicated by the extraction result information for the second frame are also within the imaging range, the four display vertex coordinates and the four vertexes stored at the first frame according to S623 of FIG. The middle point with the coordinates is stored as new display 4 vertex coordinates. Then, an outline using the middle point is displayed.

次に、第3フレームに対する抽出結果情報において正常に4つの各頂点座標を抽出できなかったことが示されているとする。この場合、図42の処理を実行することとなる。ここで、第2フレームにおいてフレームスキップフラグがオンに設定されており、表示用4頂点座標が保存されている。そのため、S636により当該表示用4頂点座標に基づき輪郭線が表示される。このとき、フレームスキップフラグがオフに変更される。   Next, it is assumed that it is indicated in the extraction result information for the third frame that four vertex coordinates can not be extracted normally. In this case, the process of FIG. 42 is performed. Here, in the second frame, the frame skip flag is set to ON, and the four display vertex coordinates are stored. Therefore, in S636, the outline is displayed based on the four display top coordinates. At this time, the frame skip flag is changed to off.

このように、連続して表示されている撮像画像の途中の1フレームで4頂点座標の抽出処理に失敗したとしても、画面上には前回のフレームと同じ輪郭線が表示されるため、見た目のちらつきを抑えることができる。   As described above, even if extraction processing of four vertex coordinates fails in one frame in the middle of the captured image being displayed continuously, the same outline as that of the previous frame is displayed on the screen. Flicker can be suppressed.

撮像画像は、連続して撮像される画像なので、通常撮像対象物の位置が大きくは変わらない。しかし、照明状態により、あるフレームの撮像画像だけエッジがうまく繋がらず、結果として4頂点座標とも撮像範囲内にないと判断される、あるいは、手振れ等により位置がずれて4頂点座標とも撮像範囲内にないと判断される場合がある。このような場合であっても、一つ前のフレームの撮像画像で表示していた表示用4頂点座標をそのまま表示(1フレームのみの抽出失敗を無視)することで、ちらつきを軽減する事ができる。   Since the captured image is an image captured continuously, the position of the imaging target does not usually change significantly. However, depending on the illumination state, only the captured image of a certain frame does not connect the edges well, and as a result, it is determined that all the four vertex coordinates are not within the imaging range, or the positions are shifted due to camera shake or the like. May not be judged. Even in such a case, it is possible to reduce the flicker by directly displaying the four display apex coordinates displayed in the captured image of the previous frame (ignoring the extraction failure of only one frame). it can.

次に、第4フレームに対する抽出結果情報で示される4つの頂点座標が撮像範囲内であると、図41のフローに移り、S623により第2フレームの際に記憶していた表示用4頂点座標と当該4つの頂点座標との中点を新たな表示用4頂点座標として記憶する。そして、当該中点を用いた輪郭線が表示される。このとき、フレームスキップフラグがオンに変更される。   Next, if the four vertex coordinates indicated by the extraction result information for the fourth frame are within the imaging range, the process proceeds to the flow of FIG. 41, and the four display vertex coordinates stored at the second frame in S623. The middle point between the four vertex coordinates is stored as new display four vertex coordinates. Then, an outline using the middle point is displayed. At this time, the frame skip flag is changed to on.

次に、第5フレームに対する抽出結果情報において正常に4つの各頂点座標を抽出できなかったことが示されているとする。この場合、第3フレームと同様の表示処理が実行される。   Next, it is assumed that it is indicated in the extraction result information for the fifth frame that four vertex coordinates can not be extracted normally. In this case, display processing similar to that of the third frame is performed.

次に、第6フレームに対する抽出結果情報においても正常に4つの各頂点座標を抽出できなかったことが示されているとする。この場合、図42の処理を実行することとなり、第5フレームにおいてフレームスキップフラグがオフに変更されているため、S634により保存されている表示用4頂点座標が消去される。そのため、表示処理部112は、輪郭線の表示を行わない。このように、輪郭線が表示されている状態(第4フレームの段階)から、2フレーム以上連続して4頂点座標の抽出処理に失敗した場合、輪郭線が表示されなくなるため、撮像対象物が認識できないことを把握することができる。   Next, it is assumed that the extraction result information for the sixth frame indicates that the four vertex coordinates could not be extracted normally. In this case, the process of FIG. 42 is executed, and the frame skip flag is changed to OFF in the fifth frame, so the four display apex coordinates stored in S634 are erased. Therefore, the display processing unit 112 does not display the outline. As described above, when extraction processing of four vertex coordinates fails continuously for two or more frames from the state in which the outline is displayed (the stage of the fourth frame), the outline is not displayed, so the imaging target object is You can understand what you can not recognize.

なお、図42および図43に示す例では、1フレームの撮像画像に対する4頂点座標の抽出失敗を無視するようにしているが、カウンタを設けて失敗したフレーム数をカウントし、複数のフレームの抽出失敗を無視するようにしてもよい。   In the example shown in FIG. 42 and FIG. 43, although extraction failure of four vertex coordinates with respect to a captured image of one frame is ignored, a counter is provided to count the number of failed frames and extract a plurality of frames. Failure may be ignored.

(4)出力対象画像データの画像形成装置への転送について
ユーザは、携帯端末装置100を持って画像形成装置200または画像表示装置300の近くにきて、携帯端末装置100を操作し、赤外線通信のような近距離無線通信方式を用いて出力対象画像データを画像形成装置200または画像表示装置300に送信させる。具体的には、ユーザは、携帯端末装置100の入力部106に、出力対象画像データの送信指示を入力する。
(4) Transfer of Output Target Image Data to Image Forming Device The user holds the portable terminal device 100, approaches the image forming device 200 or the image display device 300, operates the portable terminal device 100, and performs infrared communication. The output target image data is transmitted to the image forming apparatus 200 or the image display apparatus 300 using the short distance wireless communication method as described above. Specifically, the user inputs a transmission instruction of output target image data to the input unit 106 of the mobile terminal device 100.

出力対象画像データの送信指示が入力されると、制御部109は、記憶部108に格納された出力対象画像データを特定する。そして、制御部109は、出力対象画像データを画像形成装置200または画像表示装置300に送信する送信処理を、通信部104に実行させる。なお、通信部104は、出力対象画像データと、出力対象画像データに対応付けられているファイルネーム、出力処理情報、ならびに、記憶部108に格納されている機種情報およびユーザ情報とを合わせて送信する。   When a transmission instruction of output target image data is input, the control unit 109 specifies output target image data stored in the storage unit 108. Then, the control unit 109 causes the communication unit 104 to execute transmission processing for transmitting the output target image data to the image forming apparatus 200 or the image display apparatus 300. The communication unit 104 transmits the output target image data, the file name associated with the output target image data, the output processing information, and the model information and user information stored in the storage unit 108 together. Do.

(5)画像形成装置の構成
次に、本実施形態に係る画像形成装置200の構成について説明する。本実施形態において、画像形成装置200は、スキャナ、プリンタ、複写機等の機能を備えた複合機である。
(5) Configuration of Image Forming Apparatus Next, the configuration of the image forming apparatus 200 according to the present embodiment will be described. In the present embodiment, the image forming apparatus 200 is a multifunction peripheral provided with functions such as a scanner, a printer, and a copying machine.

図20は、画像形成装置200の構成を示すブロック図である。画像形成装置200は、画像読取部201、画像処理部202、認証部203、画像形成部204、表示部205、入力部206、第1通信部207、第2通信部208、記録媒体アクセス部209、記憶部210、および制御部212を備えている。   FIG. 20 is a block diagram showing the configuration of the image forming apparatus 200. As shown in FIG. The image forming apparatus 200 includes an image reading unit 201, an image processing unit 202, an authentication unit 203, an image forming unit 204, a display unit 205, an input unit 206, a first communication unit 207, a second communication unit 208, and a recording medium access unit 209. , Storage unit 210, and control unit 212.

画像読取部201は、原稿を読み取るものであり、CCD(Charge Coupled Device)を備えたスキャナ部を有し、原稿から反射してきた光を、RGBに色分解された電気信号(アナログの画像信号)に変換し、この電気信号を出力するものである。   The image reading unit 201 is for reading a document, has a scanner unit provided with a CCD (Charge Coupled Device), and is an electric signal (analog image signal) obtained by color separation of light reflected from the document into RGB. And output this electrical signal.

画像処理部202は、画像データに対して、所定の画像処理を行うものである。本実施形態では、画像処理部202は、携帯端末装置100または画像表示装置300から受信した出力対象画像データに対して所定の画像処理を行い、補正済画像データを生成する。画像処理部202における画像処理の詳細については後述する。   The image processing unit 202 performs predetermined image processing on image data. In the present embodiment, the image processing unit 202 performs predetermined image processing on output target image data received from the mobile terminal device 100 or the image display device 300, and generates corrected image data. Details of image processing in the image processing unit 202 will be described later.

認証部203は、携帯端末装置100または画像表示装置300から受信した出力対象画像データの出力処理を行う際に、ユーザ認証を行うものである。具体的には、認証部203は、携帯端末装置100から受信したユーザ情報と、入力部206に入力されたユーザ情報(ユーザIDおよびパスワード)とを照合してユーザ認証を行う。認証部203は、認証結果を制御部212に送る。   The authentication unit 203 performs user authentication when performing output processing of output target image data received from the mobile terminal device 100 or the image display device 300. Specifically, the authentication unit 203 performs user authentication by collating the user information received from the mobile terminal device 100 with the user information (user ID and password) input to the input unit 206. The authentication unit 203 sends the authentication result to the control unit 212.

画像形成部204は、例えば電子写真方式やインクジェット方式を用いて、紙などの記録用紙上に画像を形成するものである。すなわち、画像形成部204は、出力処理の一つとして、補正済画像データで示される画像を記録用紙やOHP用紙などの記録紙に印刷する印刷処理を実行するものである。   The image forming unit 204 forms an image on a recording sheet such as paper by using, for example, an electrophotographic method or an inkjet method. That is, the image forming unit 204 executes, as one of the output processes, a printing process for printing an image indicated by the corrected image data on a recording sheet such as a recording sheet or an OHP sheet.

表示部205は、例えば液晶ディスプレイ等より構成される。また、入力部206は、例えば液晶ディスプレイのタッチパネルやボタンを押すことなどによりデータの入力を行うためのものである。   The display unit 205 includes, for example, a liquid crystal display. Further, the input unit 206 is for inputting data by pressing a touch panel or a button of a liquid crystal display, for example.

第1通信部207は、USB1.1またはUSB2.0の規格に基づく、シリアル転送やパラレル転送、無線データ通信機能を有するものである。第1通信部207は、携帯端末装置100または画像表示装置300から、ファイルネーム、携帯端末装置100の機種情報、ユーザ情報および出力処理情報が付加された出力対象画像データを受信する。   The first communication unit 207 has functions of serial transfer, parallel transfer, and wireless data communication based on the USB 1.1 or USB 2.0 standard. The first communication unit 207 receives, from the portable terminal device 100 or the image display device 300, output target image data to which a file name, model information of the portable terminal device 100, user information, and output processing information are added.

第2通信部208は、(a)無線LANの規格である、IEEE802.11a、IEEE802.11bおよびIEEE802.11gのいずれかに基づく無線技術を利用したデータ通信、(b)イーサネット(登録商標)を利用した通信用インターフェースの機能を有し、LANケーブルを介した、ネットワークとのデータ通信、(c)無線通信規格である、IEEE802.15.1(いわゆるBluetooth(登録商標))やIrSimpleなどの赤外線通信規格、Felica(登録商標)などの通信方式のいずれかに基づく無線技術を利用したデータ通信、の機能を有するものである。   The second communication unit 208 performs (a) data communication using a wireless technology based on any of IEEE802.11a, IEEE802.11b and IEEE802.11g, which is a standard of wireless LAN, and (b) Ethernet (registered trademark). It has the function of a communication interface used and data communication with the network via a LAN cable, (c) wireless communication standard IEEE 802.15.1 (so-called Bluetooth (registered trademark)) or infrared such as IrSimple It has a function of data communication using a wireless technology based on any of communication methods such as a communication standard and Felica (registered trademark).

第2通信部208は、出力処理として、画像処理部202により所定の画像処理が施された補正済画像データをサーバに格納するファイリング処理、もしくは、当該所定の画像処理が施された補正済画像データを添付したメールを送信するメール送信処理を実行する。   The second communication unit 208 performs, as output processing, filing processing in which the corrected image data subjected to the predetermined image processing by the image processing unit 202 is stored in the server, or a corrected image subjected to the predetermined image processing Execute e-mail sending process to send an e-mail with data attached.

記録媒体アクセス部209は、プログラムが記録された記録媒体から、プログラムを読み出すものである。記憶部210は、上記各部が処理を実行するためのプログラムを記憶するためのものである。   The recording medium access unit 209 reads the program from the recording medium on which the program is recorded. The storage unit 210 is for storing a program for the respective units to execute processing.

制御部212は、画像形成装置200の各部の制御を行うものである。具体的には、制御部212は、第1通信部207が携帯端末装置100または画像表示装置300から出力対象画像データを受信すると、当該出力対象画像データを画像処理部202に出力し、画像処理を実行させる。また、制御部212は、出力対象画像データに付けられているユーザ情報を認証部203に出力し、認証部203に認証処理を実行させる。制御部212は、認証部203から認証成功の認証結果を受けると、出力対象画像データに付けられていた出力処理情報に従って処理を実行させる。すなわち、出力処理情報が印刷処理を示している場合、制御部212は、画像処理部202により生成される補正済画像データに基づいた印刷を画像形成部204に実行させる。また、出力処理情報がファイリング処理またはメール送信処理を示している場合、制御部212は、画像処理部202により生成される補正済画像データに基づいたファイリング処理またはメール送信処理を第2通信部208に実行させる。   The control unit 212 controls each unit of the image forming apparatus 200. Specifically, when the first communication unit 207 receives output target image data from the mobile terminal device 100 or the image display device 300, the control unit 212 outputs the output target image data to the image processing unit 202, and performs image processing. Run Also, the control unit 212 outputs the user information attached to the output target image data to the authentication unit 203, and causes the authentication unit 203 to execute the authentication process. When the control unit 212 receives the authentication result of the authentication success from the authentication unit 203, the control unit 212 causes the process to be executed according to the output processing information attached to the output target image data. That is, when the output processing information indicates the print processing, the control unit 212 causes the image forming unit 204 to perform printing based on the corrected image data generated by the image processing unit 202. When the output processing information indicates filing processing or mail transmission processing, the control unit 212 executes filing processing or mail transmission processing based on the corrected image data generated by the image processing unit 202 as the second communication unit 208. Make it run.

(6)画像処理部における画像処理について
次に、画像処理部202が実行する画像処理の詳細について説明する。なお、画像処理部202は、画像読取部201が読み取った画像データに対しても画像処理を行うが、ここでは、携帯端末装置100または画像表示装置300から受信した出力対象画像データに対する画像処理の内容について説明する。
(6) Image Processing in Image Processing Unit Next, details of the image processing performed by the image processing unit 202 will be described. Although the image processing unit 202 performs image processing also on the image data read by the image reading unit 201, here, the image processing unit 202 performs image processing on output target image data received from the portable terminal device 100 or the image display device 300. The contents will be described.

図21は、画像処理部202の内部構成を示すブロック図である。図12に示されるように、画像処理部202は、画質調整部221、幾何学補正部(写像生成部)222、レンズ歪み補正部223、高解像度補正部225および出力画像処理部224を備えている。以下、各部の具体的な処理内容を順に説明する。   FIG. 21 is a block diagram showing an internal configuration of the image processing unit 202. As shown in FIG. As shown in FIG. 12, the image processing unit 202 includes an image quality adjustment unit 221, a geometry correction unit (mapping generation unit) 222, a lens distortion correction unit 223, a high resolution correction unit 225, and an output image processing unit 224. There is. Hereinafter, specific processing contents of each part will be described in order.

(6−1)画質調整部
画質調整部221は、出力対象画像データのカラーバランス、コントラストの補正を行うものである。画質調整部221は、受信した出力対象画像データについて、各色チャンネルの最大値・最小値を求め、これらを揃えるようなルックアップテーブルを作成し、各色チャンネルに適用する。具体的には、画質調整部221は、ルックアップテーブルとして、図22に示すように、あるチャンネルの最大値がMX、最小値がMNであり、データが8bitのとき、MNから(MX−MN)/255のステップで増加させていくようなテーブルを作成すればよい。そして、画質調整部221は、作成したテーブルに従って、各画素値を変換する。これにより、カラーバランスが補正される。
(6-1) Image Quality Adjustment Unit The image quality adjustment unit 221 corrects the color balance and contrast of the output target image data. The image quality adjustment unit 221 obtains the maximum value and the minimum value of each color channel for the received output target image data, creates a look-up table that aligns these, and applies it to each color channel. Specifically, as shown in FIG. 22, the image quality adjustment unit 221 uses MX as a lookup table, and MX as the minimum value and MN as the minimum value when the data is 8 bits, as shown in FIG. Create a table that will increase at the step of) / 255. Then, the image quality adjustment unit 221 converts each pixel value according to the created table. Thereby, the color balance is corrected.

また、画質調整部221は、コントラストの補正についても同様の方法で実行する。なお、カラーバランスを特に変える必要がなければ、各色チャンネルに適用するルックアップテーブルを同一のものとすればよい。   Further, the image quality adjustment unit 221 executes the correction of the contrast in the same manner. If it is not necessary to change the color balance in particular, the look-up table applied to each color channel may be the same.

なお、カラーバランス・コントラストの補正方法についてはその他の公知の技術を適用してもよい。   Other known techniques may be applied to the color balance / contrast correction method.

(6−2)レンズ歪み補正部
レンズ歪み補正部223は、出力対象画像データについて、レンズ歪みの補正を実行するものである。
(6-2) Lens Distortion Correction Unit The lens distortion correction unit 223 performs lens distortion correction on output target image data.

レンズ歪み補正部223は、出力対象画像データについて、上記の(3−3)に記載した処理と同様にして、撮像画像における撮像対象物のエッジ画素をラスター走査によって順次検出する。そして、レンズ歪み補正部223は、検出されたエッジ画素を曲線近似し、その曲線の式からレンズひずみ補正を行う。   The lens distortion correction unit 223 sequentially detects edge pixels of the imaging target object in the captured image by raster scanning in the same manner as the processing described in (3-3) above for the output target image data. Then, the lens distortion correction unit 223 performs curve approximation on the detected edge pixels, and performs lens distortion correction from the equation of the curve.

具体的には、レンズ歪み補正部223は、検出した撮像対象物のエッジ画素を検出し、上記の(3−3)に記載した処理と同様に、各エッジ画素を撮像対象物と背景との境界の4辺に対応する4つのエッジ画素群に分類する。そして、図23の実線で示されるように、各群に属するエッジ点に対して2次曲線近似を行う。このようにして4つの群に対して求めた2次曲線は、撮像対象物の4辺に対応する。また、レンズ歪み補正部223は、4つの2次曲線で囲まれる領域の角部に相当する、4つの2次曲線の交点を求める。次に、レンズ歪み補正部223は、各辺に対して求めた2次曲線に外接し、かつ、4つの交点を結んだ四角形(図23において点線で示される)と相似している外接四角形(図23において1点鎖線で示される)を求める。そして、レンズ歪み補正部223は、このようにして求めた外接四角形が補正後の対象物のエッジ画素の位置となるように、撮像画像における撮像対象物の領域内の画素位置を変換する。この変換は、基準点(例えば撮像対象物の領域の重心点)からのベクトルを基に計算すればよい。これにより、携帯端末装置100の撮像部101によるレンズ歪みを補正することができる。   Specifically, the lens distortion correction unit 223 detects edge pixels of the detected imaging target object, and in the same manner as the processing described in (3-3) above, each edge pixel includes the imaging target object and the background. It is classified into four edge pixel groups corresponding to the four sides of the boundary. Then, as shown by the solid line in FIG. 23, a quadratic curve approximation is performed on the edge points belonging to each group. The quadratic curves thus obtained for the four groups correspond to the four sides of the object to be imaged. In addition, the lens distortion correction unit 223 obtains an intersection point of the four quadratic curves, which corresponds to a corner of the area surrounded by the four quadratic curves. Next, the lens distortion correction unit 223 circumscribes the quadratic curve determined for each side, and is a circumscribed quadrilateral similar to a quadrangle (indicated by a dotted line in FIG. 23) connecting four intersection points ( Determined in FIG. 23 by dashed dotted line). Then, the lens distortion correction unit 223 converts the pixel position in the area of the imaging target in the captured image so that the circumscribed quadrilateral obtained in this manner becomes the position of the edge pixel of the target after correction. This conversion may be calculated on the basis of a vector from a reference point (e.g., the center of gravity of the area of the object to be imaged). Thereby, lens distortion by the imaging unit 101 of the mobile terminal device 100 can be corrected.

レンズ歪みの補正の方法としては、上記の方法に限定されるものではなく公知の技術を用いることができる。   The lens distortion correction method is not limited to the above-described method, and known techniques can be used.

(6−3)幾何学補正部
幾何学補正部222は、ポスターや原稿用紙のような矩形状の撮像対象物に対して、文書画像が形成された平面の法線方向とは異なる方向から撮像することによる撮像対象物の歪み(つまり、文書画像が形成された矩形状の平面の歪み)を補正するとともに、画像データにおける撮像対象物の傾きを補正するものである。
(6-3) Geometry Correction Unit The geometry correction unit 222 captures an image of a rectangular imaging object such as a poster or manuscript paper from a direction different from the normal direction of the plane on which the document image is formed. The distortion of the object to be imaged (i.e., the distortion of the rectangular flat surface on which the document image is formed) is corrected, and the inclination of the object to be imaged in the image data is corrected.

具体的には、幾何学補正部222は、幾何学的配置検出部111と同様に、出力対象画像データに基づいて、矩形の撮像対象物と背景との境界となる4つのエッジ画素群に対応する直線の式を求める。そして、幾何学補正部222は、当該4つの直線で囲まれる四角形の領域(補正前領域)を特定し、特定した補正前領域を切り出す。   Specifically, like the geometric arrangement detection unit 111, the geometry correction unit 222 corresponds to the four edge pixel groups that form the boundary between the rectangular imaging target and the background based on the output target image data. Find the equation of the straight line Then, the geometry correction unit 222 identifies a rectangular area (an area before correction) surrounded by the four straight lines, and cuts out the identified area before correction.

次に、幾何学補正部222は、図24のように、特定した四角形の補正前領域(図24において一点鎖線で示される)を、上下の2辺が水平方向に略平行であり、所定のアスペクト比および大きさを有する、矩形状の標準領域(例えば、ビジネス文書出用いられているA判B判なら7:10であるなど。図24において実線で示される)に変換するための写像を求める。なお、標準領域の上下の2辺は水平方向と完全に平行でなくても良く、水平方向に対して僅かな所定範囲内の角度を有していても良い(略平行であっても良い)。ここで、写像とは、補正前領域の各画素の座標(x1、y1)から標準領域の対応する画素の座標(x2、y2)への写像変換(座標変換処理)するための規則fx、fyのことであり、x2=fx(x1、y1)、y2=fy(x1、y1)で表される。当該写像変換としては公知の技術を用いることができる。なお、幾何学補正部222は、予め記憶部210に記憶されているアスペクト比に合うように変換してもよいし、入力部206に入力されたアスペクト比に合うように変換してもよい。また、標準領域の大きさとしては、入力部206に入力された大きさが設定されてもよいし、補正前領域と同じ面積となるような大きさが設定されてもよい。   Next, as shown in FIG. 24, the geometric correction unit 222 determines that the specified rectangular area before correction (indicated by an alternate long and short dash line in FIG. 24) has two upper and lower sides substantially parallel to the horizontal direction. With the aspect ratio and size, the mapping for converting into a rectangular standard area (e.g., 7:10 for A-size and B-size being used for business documents, etc .; shown as a solid line in FIG. 24) Ask. The upper and lower two sides of the standard area may not be completely parallel to the horizontal direction, and may have a slight angle within a predetermined range with respect to the horizontal direction (may be substantially parallel) . Here, the mapping is a rule fx, fy for performing mapping conversion (coordinate conversion processing) from the coordinates (x1, y1) of each pixel of the pre-correction area to the coordinates (x2, y2) of the corresponding pixel of the standard area. X2 = fx (x1, y1), y2 = fy (x1, y1). A known technique can be used as the mapping conversion. The geometry correction unit 222 may perform conversion so as to match the aspect ratio stored in advance in the storage unit 210, or may perform conversion so as to match the aspect ratio input to the input unit 206. Further, as the size of the standard area, the size input to the input unit 206 may be set, or the size may be set so as to have the same area as the area before correction.

次に、幾何学補正部222は、求めた写像に従って、出力対象画像データから切り出した補正前領域に対して座標変換を行う。これにより、幾何学的歪みおよび傾きの補正(以下、幾何学補正という場合がある)することができる。   Next, the geometry correction unit 222 performs coordinate conversion on the pre-correction region extracted from the output target image data according to the determined mapping. This makes it possible to correct geometric distortion and inclination (hereinafter sometimes referred to as geometric correction).

幾何学補正の方法としては、上記の方法に限定されるものではなく公知の技術を用いることができる。   The method of geometric correction is not limited to the method described above, and known techniques can be used.

(6−4)高解像度補正部
高解像度補正部225は、出力対象画像データに対する高解像度補正を行うものである。本実施形態では、高解像度補正部225は、1つの出力対象画像データに基づいて高解像度補正を行う。
(6-4) High Resolution Correction Unit The high resolution correction unit 225 performs high resolution correction on output target image data. In the present embodiment, the high resolution correction unit 225 performs high resolution correction based on one output target image data.

1つの画像データからの高解像度画像作成方法に関しては、映像情報メディア学会誌Vol.62、No.2、pp.181〜189(2008)にいくつかの方法が紹介されている。   Several methods have been introduced in the Journal of the Institute of Image Information and Television Engineers Vol. 62, No. 2, pp. 181-189 (2008) regarding high-resolution image creation methods from one image data.

一般的には、画像パターンのエッジ方向性を検知し、その向きに合わせた補間を行うとともに、補間によるひずみや入力画像に存在したノイズ成分の影響などの除去を目的としたノイズ除去処理を行うことにより、高解像度補正を実行することができる。以下、具体的に説明する。   Generally, the edge directionality of the image pattern is detected, interpolation is performed according to the direction, and noise removal processing is performed for the purpose of removing distortion due to interpolation and the influence of noise components present in the input image. Thus, high resolution correction can be performed. The details will be described below.

図25は、本実施形態における高解像度補正の処理の流れを示すフローチャートである。ここでは、横方向・縦方向の各々について2倍の解像度変換を行う例について説明する。2倍の解像度変換を行う場合、補正対象となる出力対象画像データの画素数をn×mとするとき、補正後の高解像度画像データの画素数は2n×2mとなる。このような高解像度補正(2倍の解像度変換)は、出力対象画像データにおける各画素を基準画素とし、当該基準画素間の中央に新たな画素を補間画素として生成し、当該基準画素と補間画素との両方を備える画像データを高解像度画像データとして生成することにより実行される。図26は、基準画素と補間画素との関係を示すものであり、画素aが基準画素を示し、画素bが補間画素を示している。   FIG. 25 is a flowchart showing the flow of high resolution correction processing in the present embodiment. Here, an example in which double resolution conversion is performed for each of the horizontal direction and the vertical direction will be described. In the case of performing resolution conversion twice, if the number of pixels of output target image data to be corrected is n × m, the number of pixels of high resolution image data after correction is 2 n × 2 m. Such high resolution correction (double resolution conversion) uses each pixel in the output target image data as a reference pixel, generates a new pixel at the center between the reference pixels as an interpolation pixel, and the reference pixel and the interpolation pixel And image data including both of the image data and the image data as high resolution image data. FIG. 26 shows the relationship between the reference pixel and the interpolation pixel, where the pixel a indicates the reference pixel and the pixel b indicates the interpolation pixel.

まず、高解像度補正部225は、出力対象画像データについて、エッジ抽出を行う。例えば、高解像度補正部225は、図27に示されるような1次微分フィルタを用いてエッジ抽出を行い、2値化処理を行い、2値化画像データを生成する(S40)。なお、2値化画像データにおいて画素値が1であればエッジである可能性が高い画素であることを示している。   First, the high resolution correction unit 225 performs edge extraction on output target image data. For example, the high resolution correction unit 225 performs edge extraction using a first derivative filter as shown in FIG. 27, performs binarization processing, and generates binarized image data (S40). Note that if the pixel value is 1 in the binarized image data, it indicates that the pixel is highly likely to be an edge.

次に、高解像度補正部225は、S40で生成した2値化画像データに基づいて、撮像画像データにおける着目画素がエッジであるか否かを判定する(S41)。具体的には、高解像度補正部225は、2値化画像データにおける着目画素に対応する画素の値が1であれば、当該着目画素がエッジであると判定する。   Next, the high resolution correction unit 225 determines whether the target pixel in the captured image data is an edge based on the binarized image data generated in S40 (S41). Specifically, if the value of the pixel corresponding to the target pixel in the binarized image data is 1, the high resolution correction unit 225 determines that the target pixel is an edge.

なお、着目画素とは、撮像画像データにおける各画素を任意の順に着目していったときに、着目している画素のことをいう。   In addition, a focused pixel refers to a focused pixel when focused on each pixel in captured image data in an arbitrary order.

着目画素がエッジである場合(S41でYes)、高解像度補正部225は、着目画素を含むN×N(N>1)の部分画像を用いてエッジ方向を検出する(S42)。具体的には、N×Nの部分画像に含まれる全ての基準画素について、エッジ画素であるか否かを判定する。そして、着目画素の左上の基準画素と右下の基準画素とがエッジ画素である場合、高解像度補正部225は、部分画像におけるエッジ方向が左上−右下方向であると判定する。同様に、着目画素の左の基準画素と右の基準画素とがエッジ画素である場合、エッジ方向が左−右方向であると判定し、着目画素の上の基準画素と下の基準画素とがエッジ画素である場合、エッジ方向が上−下方向であると判定し、着目画素の右上の基準画素と左下の基準画素とがエッジ画像である場合、エッジ方向が右上−左下方向であると判定する。   If the pixel of interest is an edge (Yes in S41), the high resolution correction unit 225 detects an edge direction using a partial image of N × N (N> 1) including the pixel of interest (S42). Specifically, it is determined whether or not all the reference pixels included in the N × N partial image are edge pixels. When the upper left reference pixel and the lower right reference pixel of the pixel of interest are edge pixels, the high resolution correction unit 225 determines that the edge direction in the partial image is the upper left lower right direction. Similarly, when the left reference pixel and the right reference pixel of the pixel of interest are edge pixels, it is determined that the edge direction is the left-right direction, and the reference pixels above and below the pixel of interest are If it is an edge pixel, it is determined that the edge direction is up-down, and if the reference pixel at the upper right of the pixel of interest and the reference pixel at the lower left are edge images, it is determined that the edge direction is upper right-lower left Do.

図28において、点線は検出したエッジ方向を示している。なお、図28において、画素(1)〜(9)が基準画素であり、このうちの画素(5)が着目画素である。そして、画素A、B、Cは、それぞれ、基準画素(1)と(5)との間の補間画素、基準画素(2)と(5)との間の補間画素、基準画素(4)と(5)との間の補間画素である。   In FIG. 28, dotted lines indicate detected edge directions. In FIG. 28, pixels (1) to (9) are reference pixels, and pixel (5) among them is the target pixel. Then, pixels A, B and C are respectively interpolation pixels between reference pixels (1) and (5), interpolation pixels between reference pixels (2) and (5), and reference pixel (4). Interpolated pixel between (5) and (5).

次に、高解像度補正部225は、S42で検出したエッジ方向に応じて、着目画素の左上の補間画素A、着目画素の上の補間画素B、着目画素の左の補間画素Cの画素値を補間により求める。このとき、エッジ方向に沿った基準画素を用いて補間画素の画素値を求める。   Next, the high resolution correction unit 225 calculates the pixel values of the interpolation pixel A at the upper left of the target pixel, the interpolation pixel B above the target pixel, and the interpolation pixel C at the left of the target pixel according to the edge direction detected in S42. Calculated by interpolation. At this time, the pixel value of the interpolation pixel is determined using the reference pixel along the edge direction.

エッジ方向が左上−右下方向である場合、図28(a)に示されるように、基準画素(1)、(5)、(9)がエッジ画素であり、これらの画素を結ぶ線がエッジ線となる。そして、エッジ線上の補間画素Aの画素値VA(図中では「V」の表記を省略している。以下同じ)について、補間画素Aに隣施するエッジ線上の基準画素(1)(画素値V(1))および基準画素(5)(画素値V(5))の画素値を用いて、以下の式
VA=(V(1)+V(5))/2
により求める。
When the edge direction is the upper left-lower right direction, as shown in FIG. 28A, the reference pixels (1), (5), (9) are edge pixels, and the line connecting these pixels is an edge It becomes a line. Then, for the pixel value VA of the interpolation pixel A on the edge line (notation of “V” in the figure is omitted. The same applies to the following), the reference pixel (1) (pixel value on the edge line adjacent to the interpolation pixel A). Using the pixel values of V (1) and the reference pixel (5) (pixel value V (5)), the following equation VA = (V (1) + V (5)) / 2
It asks by.

一方、エッジ線上ではない補間画素B,Cについては、エッジ線上の基準画素を除く基準画素のうちの、当該補間画素に最も近い基準画素(最近接基準画素)を含み、エッジ方向に平行な線上の基準画素を用いて補間する。例えば、図28(a)では、補間画素Bについては、最近接基準画素である基準画素(2)を含み、エッジ方向に平行な線は、基準画素(2)と(6)とを結ぶ線である。そして、補間画素Bから当該線に垂直に下した点は、基準画素(2)と(6)とを結ぶ線分を内分する。そのため、補間画素Bの画素値VBは、以下の式
VB=(9×V(2)+4×V(6))/13
を用いて求める。
On the other hand, for the interpolation pixels B and C not on the edge line, among the reference pixels other than the reference pixels on the edge line, the reference pixel (closest reference pixel) closest to the interpolation pixel is included and the line parallel to the edge direction Interpolate using the reference pixel of For example, in FIG. 28A, the interpolation pixel B includes the reference pixel (2) which is the closest reference pixel, and a line parallel to the edge direction is a line connecting the reference pixels (2) and (6). It is. The point perpendicular to the line from the interpolation pixel B internally divides the line connecting the reference pixels (2) and (6). Therefore, the pixel value VB of the interpolation pixel B is expressed by the following equation VB = (9 × V (2) + 4 × V (6)) / 13
Find using

同様に、補間画素Cの画素値VCは、最近接基準画素である基準画素(4)と、当該基準画素(4)を含みエッジ方向に平行な線上の基準画素(8)との画素値を用いて、以下の式
VC=(9×V(4)+4×V(8))/13
により求める。
Similarly, the pixel value VC of the interpolation pixel C is the pixel value of the reference pixel (4) which is the closest reference pixel and the reference pixel (8) on the line parallel to the edge direction including the reference pixel (4). Using the following equation VC = (9 × V (4) + 4 × V (8)) / 13
It asks by.

また、エッジ方向が左−右方向である場合、図28(b)に示されるように、基準画素(4)、(5)、(6)がエッジ画素であり、これらの画素を結ぶ線がエッジ線となる。そして、エッジ線上の補間画素Cの画素値VCについて、補間画素Cに隣施するエッジ線上の基準画素(4)(画素値V(4))および基準画素(5)(画素値V(5))の画素値を用いて、以下の式
VC=(V(4)+V(5))/2
により求める。
When the edge direction is left-right, as shown in FIG. 28B, the reference pixels (4), (5) and (6) are edge pixels, and the line connecting these pixels is It becomes an edge line. Then, for the pixel value VC of the interpolation pixel C on the edge line, the reference pixel (4) (pixel value V (4)) and the reference pixel (5) (pixel value V (5) on the edge line adjacent to the interpolation pixel C The following equation VC = (V (4) + V (5)) / 2 using the pixel value of
It asks by.

一方、エッジ線上ではない補間画素A、Bについては、エッジ線上の基準画素を除く基準画素のうちの、当該補間画素に最も近い基準画素(最近接基準画素)を含み、エッジ方向に平行な線上の基準画素を用いて補間する。例えば、図28(b)では、補間画素Aについては、最近接基準画素である基準画素(1)または(2)を含み、エッジ方向に平行な線は、基準画素(1)と(2)とを結ぶ線である。そして、補間画素Aから当該線に垂直に下した点は、基準画素(1)と(2)との中央に存在する。そのため、補間画素Aの画素値VAは、以下の式
VA=(V(1)+V(2))/2
を用いて求める。
On the other hand, for the interpolation pixels A and B not on the edge line, among the reference pixels other than the reference pixels on the edge line, the reference pixel (closest reference pixel) closest to the interpolation pixel is included and the line parallel to the edge direction Interpolate using the reference pixel of For example, in FIG. 28B, the interpolation pixel A includes the reference pixel (1) or (2) which is the closest reference pixel, and a line parallel to the edge direction corresponds to the reference pixels (1) and (2). It is a line connecting Then, a point perpendicular to the line from the interpolation pixel A exists at the center of the reference pixels (1) and (2). Therefore, the pixel value VA of the interpolation pixel A is expressed by the following equation VA = (V (1) + V (2)) / 2
Find using

補間画素Bについては、最近接基準画素である基準画素(2)を含み、エッジ方向に平行な線は、基準画素(1)と(2)と(3)とを結ぶ線である。そして、補間画素Bから当該線に垂直に下した点は、基準画素(2)と一致する。そのため、補間画素Bの画素値VBは、基準画素(2)の画素値V(2)と同じ値にする。   The interpolation pixel B includes the reference pixel (2) which is the closest reference pixel, and a line parallel to the edge direction is a line connecting the reference pixels (1) and (2) and (3). Then, the point vertically lowered from the interpolation pixel B to the line coincides with the reference pixel (2). Therefore, the pixel value VB of the interpolation pixel B is set to the same value as the pixel value V (2) of the reference pixel (2).

また、エッジ方向が右上−左下方向である場合、図28(c)に示されるように、基準画素(3)、(5)、(7)がエッジ画素であり、これらの画素を結ぶ線がエッジ線となる。そして、補間画素A,B,Cは全てエッジ線上に存在しない。   When the edge direction is the upper right-lower left direction, as shown in FIG. 28C, the reference pixels (3), (5) and (7) are edge pixels, and the line connecting these pixels is It becomes an edge line. And all of the interpolation pixels A, B, C do not exist on the edge line.

補間画素Aについては、最近接基準画素が基準画素(1)、(2)、(4)となる。ここで、基準画素(2)、(4)は、エッジ方向に平行な同一の線上に位置するが、基準画素(1)は当該線上に位置しない。そこで、補間画素Aの画素値VAについて、最近接基準画素である基準画素(1)、(2)、(4)の画素値を用いて、以下の式
VA=(V(1)+V(2)+V(4))/3
により求める。
For the interpolation pixel A, the closest reference pixel is the reference pixel (1), (2), (4). Here, the reference pixels (2) and (4) are located on the same line parallel to the edge direction, but the reference pixel (1) is not located on the line. Therefore, for the pixel value VA of the interpolation pixel A, using the pixel values of the reference pixels (1), (2) and (4) which are nearest reference pixels, the following equation VA = (V (1) + V (2) ) + V (4)) / 3
It asks by.

一方、補間画素B,Cについては、エッジ線上の基準画素を除く基準画素のうちの、当該補間画素に最も近い基準画素(最近接基準画素)を含み、エッジ方向に平行な線上の基準画素を用いて補間する。例えば、図28(c)では、補間画素Bについては、最近接基準画素である基準画素(2)を含み、エッジ方向に平行な線は、基準画素(2)と(4)とを結ぶ線である。そして、補間画素Bから当該線に垂直に下した点は、基準画素(2)と(4)とを結ぶ線分を内分する。そのため、補間画素Bの画素値VBは、以下の式
VB=(9×V(2)+4×V(4))/13
を用いて求める。
On the other hand, for the interpolation pixels B and C, among the reference pixels on the edge line except the reference pixel, the reference pixel (closest reference pixel) closest to the interpolation pixel is included and the reference pixel on the line parallel to the edge direction is selected. Use to interpolate. For example, in FIG. 28C, the interpolation pixel B includes the reference pixel (2) which is the closest reference pixel, and a line parallel to the edge direction is a line connecting the reference pixels (2) and (4). It is. Then, the point perpendicular to the line from the interpolation pixel B internally divides the line connecting the reference pixels (2) and (4). Therefore, the pixel value VB of the interpolation pixel B is expressed by the following equation VB = (9 × V (2) + 4 × V (4)) / 13
Find using

同様に、補間画素Cの画素値VCは、最近接基準画素である基準画素(4)と、当該基準画素(4)を含みエッジ方向に平行な線上の基準画素(2)との画素値を用いて、以下の式
VC=(4×V(2)+9×V(4))/13
により求める。
Similarly, the pixel value VC of the interpolation pixel C is the pixel value of the reference pixel (4) which is the nearest reference pixel and the reference pixel (2) on the line parallel to the edge direction including the reference pixel (4). Using the following equation VC = (4 x V (2) + 9 x V (4)) / 13
It asks by.

また、エッジ方向が上−下方向である場合、図28(d)に示されるように、基準画素(2)、(5)、(8)がエッジ画素であり、これらの画素を結ぶ線がエッジ線となる。そして、エッジ線上の補間画素Bの画素値VBについて、補間画素Bに隣施するエッジ線上の基準画素(2)および基準画素(5)の画素値を用いて、以下の式
VC=(V(2)+V(5))/2
により求める。
When the edge direction is up-down, as shown in FIG. 28D, the reference pixels (2), (5), (8) are edge pixels, and the line connecting these pixels is It becomes an edge line. Then, for the pixel value VB of the interpolation pixel B on the edge line, using the pixel values of the reference pixel (2) and the reference pixel (5) on the edge line adjacent to the interpolation pixel B, the following equation VC = (V (V ( 2) + V (5)) / 2
It asks by.

一方、エッジ線上ではない補間画素A、Cについては、エッジ線上の基準画素を除く基準画素のうちの、当該補間画素に最も近い基準画素(最近接基準画素)を含み、エッジ方向に平行な線上の基準画素を用いて補間する。例えば、図28(d)では、補間画素Aについては、最近接基準画素である基準画素(1)または(4)を含み、エッジ方向に平行な線は、基準画素(1)と(4)とを結ぶ線である。そして、補間画素Aから当該線に垂直に下した点は、基準画素(1)と(4)との中央に存在する。そのため、補間画素Aの画素値VAは、以下の式
VA=(V(1)+V(4))/2
を用いて求める。
On the other hand, for the interpolation pixels A and C not on the edge line, among the reference pixels other than the reference pixels on the edge line, the reference pixel (closest reference pixel) closest to the interpolation pixel is included and the line parallel to the edge direction Interpolate using the reference pixel of For example, in FIG. 28D, the interpolation pixel A includes the reference pixel (1) or (4) which is the closest reference pixel, and the line parallel to the edge direction corresponds to the reference pixels (1) and (4). It is a line connecting Then, a point vertically lowered from the interpolation pixel A to the line exists at the center of the reference pixels (1) and (4). Therefore, the pixel value VA of the interpolation pixel A is expressed by the following equation VA = (V (1) + V (4)) / 2
Find using

補間画素Cについては、最近接基準画素である基準画素(4)を含み、エッジ方向に平行な線は、基準画素(1)と(4)と(7)とを結ぶ線である。そして、補間画素Cから当該線に垂直に下した点は、基準画素(4)と一致する。そのため、補間画素Cの画素値VCは、基準画素(4)の画素値V(4)と同じ値にする。   The interpolation pixel C includes the reference pixel (4) which is the closest reference pixel, and a line parallel to the edge direction is a line connecting the reference pixels (1), (4) and (7). Then, the point vertically lowered from the interpolation pixel C to the line coincides with the reference pixel (4). Therefore, the pixel value VC of the interpolation pixel C is set to the same value as the pixel value V (4) of the reference pixel (4).

なお、記憶部210は、エッジ方向と、補間画素A,B,Cの画素値を求めるための演算式とを対応付けた情報を予め記憶している。そして、高解像度補正部225は、S42で検出されたエッジ方向に対応する演算式を記憶部210から読み出し、読み出した演算式に基づいて、補間画素A,B,Cの画素値を求めればよい。   The storage unit 210 stores, in advance, information in which the edge direction is associated with an arithmetic expression for obtaining pixel values of the interpolation pixels A, B, and C. Then, the high resolution correction unit 225 may read the arithmetic expression corresponding to the edge direction detected in S42 from the storage unit 210, and may obtain the pixel values of the interpolation pixels A, B, and C based on the read arithmetic expression. .

なお、図28では、エッジ方向が直線状である場合のみ示している。しかしながら、エッジは、N×Nの部分画像内において曲がる場合もある。例えば、エッジが基準画素(2)−(5)−(4)のように曲がる場合や、エッジが基準画素(1)−(5)−(7)のように曲がる場合などである。このような場合についても、補間画素A,B,Cの画素値を求めるための演算式とを対応付けた情報を予め記憶している。例えば、エッジが基準画素(2)−(5)−(4)のように曲がる場合、補間画素Aについては図28(c)と同様に、補間画素Bについては図28(b)と同様に、補間画素Cについては図28(d)と同様の演算式を記憶している。また、エッジが基準画素(1)−(5)−(7)のように曲がる場合、補間画素Aについては図28(a)と同様に、補間画素Bについては図28(a)と同様に、補間画素Cについては図28(d)と同様の演算式を記憶している。他のエッジ方向のパターンについても同様に記憶している。   FIG. 28 shows only the case where the edge direction is linear. However, the edge may bend in the N × N partial image. For example, the edge may be bent as in the reference pixels (2)-(5)-(4), or the edge may be bent as in the reference pixels (1)-(5)-(7). Also in such a case, information associated with arithmetic expressions for obtaining pixel values of the interpolation pixels A, B, and C is stored in advance. For example, when the edge bends as in the reference pixels (2)-(5)-(4), the interpolation pixel A is similar to FIG. 28 (c) and the interpolation pixel B is similar to FIG. 28 (b). For the interpolation pixel C, the same arithmetic expression as that shown in FIG. 28D is stored. Further, when the edge is bent as in the reference pixels (1)-(5)-(7), the interpolation pixel A is the same as FIG. 28A, and the interpolation pixel B is the same as FIG. For the interpolation pixel C, the same arithmetic expression as that shown in FIG. 28D is stored. The other edge direction patterns are similarly stored.

このようにして、高解像度補正部225は、エッジ画素と判定された基準画素の周囲に位置する補間画素の画素値を求める。   Thus, the high resolution correction unit 225 obtains the pixel value of the interpolation pixel located around the reference pixel determined to be an edge pixel.

一方、着目画素がエッジでない場合(S41でNo)、高解像度補正部225は、当該着目画素の左上に隣接する補間画素A,当該着目画素の上に隣接する補間画素B,当該着目画素の左の補間画素Cの画素値を、一般的な補間演算法(バイリニア・バイキュービックなど)により求める(S43)。   On the other hand, when the pixel of interest is not an edge (No in S41), the high resolution correction unit 225 determines that the interpolation pixel A adjacent to the upper left of the pixel of interest, the interpolation pixel B adjacent to the pixel of interest above, the left of the pixel of interest The pixel value of the interpolation pixel C is calculated by a general interpolation method (bilinear bicubic etc.) (S43).

高解像度補正部225は、上記のS41〜S43の処理を、一つの画像データに含まれる全ての基準画素について実行することで、基準画素と補間画素との両方を備える補間画像データを生成する(S44)。   The high resolution correction unit 225 executes the above-described processing of S41 to S43 for all reference pixels included in one image data to generate interpolation image data including both the reference pixels and the interpolation pixels ( S44).

その後、高解像度補正部225は、生成した補間画像データに対して高画質化処理を行う。例えば、高解像度補正部225は、ノイズ除去フィルタや鮮鋭化フィルタなどを補間画像データに適用して、高解像度画像データを生成する。従来からあるアンシャープマスクや図27の中央の係数を5としたものが鮮鋭化フィルタとなる。またノイズ除去としてはメディアンフィルタなどが広く知られている。より高度な手法として、上記エッジ保存性と高画質化を併せ持つ手法としてBilateralフィルタ[Proceedings of the 1998 IEEE International Conference on Computer Vision,]などを用いてもよい。   Thereafter, the high resolution correction unit 225 performs an image quality enhancement process on the generated interpolated image data. For example, the high resolution correction unit 225 applies a noise removal filter, a sharpening filter, or the like to the interpolated image data to generate high resolution image data. A conventional unsharp mask or one having the center coefficient of FIG. 27 as 5 is a sharpening filter. Median filters are widely known as noise removal. As a more advanced method, a Bilateral filter [Proceedings of the 1998 IEEE International Conference on Computer Vision,] or the like may be used as a method having both the above-mentioned edge preservation and high image quality.

なお、高解像度補正部225は、上述した方法に限定されず、映像情報メディア学会誌Vol.62、No.2、pp.181〜189(2008) に記載されているような種々の方法を用いて、1つの撮像画像データから高解像度画像データを生成してもよい。   The high resolution correction unit 225 is not limited to the method described above, and may use various methods as described in the Journal of The Institute of Image Information and Television Engineers Vol. 62, No. 2, pp. 181 to 189 (2008). Thus, high resolution image data may be generated from one piece of captured image data.

(6−5)出力画像処理部
出力画像処理部224は、出力対象画像データを出力する際の領域分離処理、色補正、黒生成下色除去処理、空間フィルタ処理、中間調処理を実行するものである。なお、これらの処理としては公知の技術を用いることができる。
(6-5) Output Image Processing Unit The output image processing unit 224 executes region separation processing, color correction, black generation and under color removal processing, spatial filter processing, and halftone processing when outputting output target image data. It is. In addition, a well-known technique can be used as these processes.

(7)画像形成装置の処理の流れ
以下、本実施形態に係る画像形成装置200の処理の流れについて説明する。図29は画像形成装置200の処理フローを示している。
(7) Flow of Processing of Image Forming Apparatus Hereinafter, the flow of processing of the image forming apparatus 200 according to the present embodiment will be described. FIG. 29 shows the process flow of the image forming apparatus 200.

画像形成装置200の第1通信部207は、携帯端末装置100から、出力対象画像データ、機種情報、ユーザ情報および出力処理情報を受信する(S30)。   The first communication unit 207 of the image forming apparatus 200 receives the output target image data, the model information, the user information, and the output processing information from the portable terminal device 100 (S30).

画像処理部202の画質調整部221は、受信した出力対象画像データについて、例えば上記(6−1)に説明したとおり、カラーバランス、コントラストの補正を行う(S31)。続いて、レンズ歪み補正部223は、受信した出力対象画像データに対して、上記(6−2)に説明したようにレンズ歪みの補正を行う。   The image quality adjustment unit 221 of the image processing unit 202 corrects the color balance and the contrast of the received output target image data as described in, for example, the above (6-1) (S31). Subsequently, the lens distortion correction unit 223 performs lens distortion correction on the received output target image data as described in (6-2) above.

さらに、幾何学補正部222は、出力対象画像データに対して、幾何学的歪みの補正および傾きの補正を行う(S32)。具体的には、幾何学補正部222は、撮像対象物と背景との境界に対応する四辺の各々に対応する直線で囲まれる四角形の領域(補正前領域)を特定して切り出す。次に、幾何学補正部222は、切り出した四角形の補正前領域を、上下の2辺が水平方向に略平行であり、所定のアスペクト比および大きさを有する、矩形状の標準領域に変換するための座標に関する写像を求める。そして、幾何学補正部222は、当該写像を用いて、切り出した補正前領域の画像データに対して写像変換処理を行う。これにより、幾何学的歪みのない画像を出力することができる。   Furthermore, the geometric correction unit 222 performs geometric distortion correction and inclination correction on the output target image data (S32). Specifically, the geometry correction unit 222 specifies and cuts out a rectangular area (an area before correction) surrounded by a straight line corresponding to each of the four sides corresponding to the boundary between the object to be imaged and the background. Next, the geometry correction unit 222 converts the rectangular area before correction into a rectangular standard area whose upper and lower sides are substantially parallel in the horizontal direction and which has a predetermined aspect ratio and size. Find a mapping about the coordinates for Then, using the mapping, the geometry correction unit 222 performs mapping conversion processing on the image data of the uncorrected region that has been cut out. This makes it possible to output an image free of geometric distortion.

次に、高解像度補正部225は、S32の処理がされた画像データに対して高解像度補正を行う(S33)。なお、高解像度補正の具体的な方法は(6−4)で説明したとおりである。   Next, the high resolution correction unit 225 performs high resolution correction on the image data subjected to the process of S32 (S33). The specific method of the high resolution correction is as described in (6-4).

次に、出力画像処理部224は、高解像度補正部225における高解像度補正により得られた高解像度画像データに対して、領域分離処理、色補正、黒生成下色除去処理、空間フィルタ処理、中間調処理等の各種の画像処理を実行する。なお、出力画像処理部224は、出力処理情報で示される出力方法の種別に応じて、当該各種の画像処理の内容を適宜切り換える。そして、出力画像処理部224は、補正済みの画像データ(補正済画像データ)を記憶部210に格納する(S34)。なお、このとき、出力画像処理部224は、補正済画像データの元となる出力対象画像データとともに受信したユーザ情報および出力処理情報と対応付けて当該補正済画像データを格納する。   Next, the output image processing unit 224 performs region separation processing, color correction, black generation and under color removal processing, spatial filter processing, and intermediate filtering processing on the high resolution image data obtained by the high resolution correction in the high resolution correction unit 225. Execute various image processing such as tone processing. The output image processing unit 224 appropriately switches the contents of the various types of image processing according to the type of the output method indicated by the output processing information. Then, the output image processing unit 224 stores the corrected image data (corrected image data) in the storage unit 210 (S34). At this time, the output image processing unit 224 stores the corrected image data in association with the user information and the output processing information received together with the output target image data that is the source of the corrected image data.

その後、制御部212は、出力対象画像データの出力指示が入力部206に入力されたか否かを判定する(S35)。出力指示の入力がない場合(S35でNO)、出力指示が入力されるまで待機する。   Thereafter, the control unit 212 determines whether an output instruction of the output target image data is input to the input unit 206 (S35). If the output instruction has not been input (NO in S35), the process waits until the output instruction is input.

一方、出力指示がある場合(S35でYES)、認証部203は、ユーザ情報(例えばユーザIDおよびパスワード)の入力を促す画面を表示部205に表示させ、ユーザ情報を入力部206から取得する。そして、認証部203は、ユーザ認証を行う(S36)。なお、認証部203は、画像形成装置200に設けられた非接触ICカードのリーダ/ライターを用いて、ユーザが所持する非接触ICカードからユーザ情報を取得してもよい。   On the other hand, when there is an output instruction (YES in S35), authentication unit 203 causes display unit 205 to display a screen prompting input of user information (for example, user ID and password), and acquires user information from input unit 206. Then, the authentication unit 203 performs user authentication (S36). The authentication unit 203 may acquire user information from the noncontact IC card possessed by the user using a noncontact IC card reader / writer provided in the image forming apparatus 200.

ユーザ認証を行う際、認証部203は、入力されたユーザ情報と携帯端末装置100から受信したユーザ情報とを対照して、一致するユーザ情報が存在するか否か判定する(S37)。そして、入力されたユーザ情報と一致するユーザ情報を携帯端末装置100から受信している場合(S37でYES)、制御部212は、S34において記憶部210に格納され、当該ユーザ情報に対応する補正済画像データの出力処理を、携帯端末装置100から受信した出力処理情報に従って実行させる(S38)。   When performing user authentication, the authentication unit 203 compares the input user information with the user information received from the portable terminal device 100, and determines whether there is matching user information (S37). Then, when the user information matching the input user information is received from the portable terminal device 100 (YES in S37), the control unit 212 is stored in the storage unit 210 in S34, and the correction corresponding to the user information The output processing of the finished image data is executed according to the output processing information received from the portable terminal device 100 (S38).

例えば、出力処理情報が印刷処理を示している場合、制御部212は、補正済画像データで示される画像の印刷を画像形成部204に実行させる。また、出力処理情報がファイリング処理またはメール送信処理を示している場合、制御部212は、補正済画像データに基づいたファイリング処理またはメール送信処理を第2通信部208に実行させる。その後、処理を終了する。   For example, when the output processing information indicates print processing, the control unit 212 causes the image forming unit 204 to print the image indicated by the corrected image data. When the output processing information indicates filing processing or mail transmission processing, the control unit 212 causes the second communication unit 208 to execute filing processing or mail transmission processing based on the corrected image data. Thereafter, the process ends.

一方、入力されたユーザ情報が、携帯端末装置100から受信したユーザ情報と一致していない場合(S37でNO)、認証部203は、認証回数が所定回数以上であるか判定する(S39)。そして、認証回数が所定回数以上でない場合(S39でNO)、S36,S37の処理を繰り返して行う。認証回数が所定回数以上である場合(S39でYES)、出力せずにフローを終了する。   On the other hand, when the input user information does not match the user information received from the portable terminal device 100 (NO in S37), the authentication unit 203 determines whether the number of authentications is equal to or more than a predetermined number (S39). Then, if the number of authentications is not equal to or more than the predetermined number (NO in S39), the processes of S36 and S37 are repeated. If the number of authentications is equal to or greater than the predetermined number (YES in S39), the flow ends without output.

(8)変形例
本発明の撮像画像処理システムは、上記の実施形態に限定されることがなく、様々な変更が可能である。以下、変形形態の具体例について説明する。
(8) Modified Example The captured image processing system of the present invention is not limited to the above embodiment, and various modifications are possible. Hereinafter, specific examples of the modified embodiment will be described.

(8−1)第1欠落情報の表示について
上記の説明では、表示処理部112は、撮像範囲外の頂点座標を基に、撮像範囲の中から当該頂点座標に最も近い点を特定し、特定した点が予め定められた範囲内に第1欠落情報を表示するものとした。これに限らず、表示処理部112は、撮像範囲外の頂点を付近に第1欠落情報を表示すればよい。
(8-1) Regarding Display of First Missing Information In the above description, the display processing unit 112 specifies a point closest to the vertex coordinates from the imaging range based on the vertex coordinates outside the imaging range, and identifies The first missing information is displayed within a predetermined range. Not limited to this, the display processing unit 112 may display the first missing information in the vicinity of the vertex outside the imaging range.

例えば、図30に示されるように、幾何学的配置検出部111により検出された4つの直線により囲まれる四角形の頂点のうち、撮像範囲外である頂点を第1頂点T1、第1頂点T1と隣り合う2つの頂点を第2頂点T2および第3頂点T3、第1頂点T1と対角の位置にある頂点を第4頂点T4とする。また、第1頂点T1と第2頂点T2とを結ぶ線と撮像範囲の枠との交点を第1交点S1、第1頂点T1と第3頂点T3とを結ぶ線と撮像範囲の枠との交点を第2交点S2とする。このとき、表示処理部112は、第1交点S1と第2交点S2とを結ぶ線分から予め定められた範囲内に第1欠落情報を表示させてもよい。   For example, as shown in FIG. 30, among vertices of a quadrangle surrounded by four straight lines detected by the geometric arrangement detection unit 111, vertices outside the imaging range are referred to as a first vertex T1 and a first vertex T1. Two adjacent vertices are taken as a second vertex T2 and a third vertex T3, and a vertex located diagonally to the first vertex T1 is taken as a fourth vertex T4. Further, an intersection point of a line connecting the first vertex T1 and the second vertex T2 with the frame of the imaging range is a first intersection point S1, an intersection point of a line connecting the first vertex T1 with the third vertex T3 and the frame of the imaging range As a second intersection point S2. At this time, the display processing unit 112 may display the first dropout information within a predetermined range from a line segment connecting the first intersection point S1 and the second intersection point S2.

(8−2)第2欠落情報の表示について
上記の説明では、表示処理部112は、抽出結果情報の中の抽出不可情報で示される辺に対応する撮像範囲の枠の辺から予め定められた範囲内に第2欠落情報を表示するものとした。これに限らず、表示処理部112は、撮像範囲外の辺の付近に第2欠落情報を表示すればよい。
(8-2) Display of Second Missing Information In the above description, the display processing unit 112 determines in advance from the side of the frame of the imaging range corresponding to the side indicated by the extraction impossible information in the extraction result information. The second missing information is displayed within the range. Not limited to this, the display processing unit 112 may display the second missing information in the vicinity of the side outside the imaging range.

例えば、図31に示されるように、幾何学的配置検出部111により検出された3つのエッジ画素群で示される3つの線分の各々に対応する直線を第1直線L1、第2直線L2、第3直線L3とし、第1直線L1と第2直線L2との交点である第1交点T5と、第2直線L2と第3直線L3との交点である第2交点T6とが撮像範囲内であるとし、さらに、第1直線L1と撮像範囲の枠との交点のうち上記第1交点T5から遠い方の交点を第3交点S3、第3直線L3と撮像範囲の枠との交点のうち上記第2交点T6から遠い方の交点を第4交点S4する。このとき、表示処理部112は、第3交点S3と第4交点S4T8とを結ぶ線分から予め定められた範囲内に第2欠落情報を表示させてもよい。   For example, as shown in FIG. 31, a straight line corresponding to each of three line segments indicated by three edge pixel groups detected by the geometrical arrangement detection unit 111 is a first straight line L1, a second straight line L2, Within the imaging range, a first intersection point T5 which is a third straight line L3 and which is an intersection point of the first straight line L1 and the second straight line L2 and a second intersection point T6 which is a crossing point of the second straight line L2 and the third straight line L3. Further, among the intersections of the first straight line L1 and the frame of the imaging range, the intersection farther from the first intersection T5 is the third intersection S3, the third straight line L3 of the intersection of the frame of the imaging range A fourth intersection point S4 is taken as the intersection point far from the second intersection point T6. At this time, the display processing unit 112 may display the second dropout information within a predetermined range from a line segment connecting the third intersection point S3 and the fourth intersection point S4T8.

(8−3)出力対象画像データの送信について
(8−3−1)その1
上記の説明では、撮像部101により撮像された画像全体を示す画像データを出力対象画像データとした。このとき、通信部104は、出力対象画像データとともに、幾何学的配置検出部111により検出された4つのエッジ画素群の各々に対応する直線の式を送信してもよい。
(8-3) Transmission of Output Target Image Data (8-3-1) Part 1
In the above description, image data indicating the entire image captured by the imaging unit 101 is used as output target image data. At this time, the communication unit 104 may transmit a straight line equation corresponding to each of the four edge pixel groups detected by the geometric arrangement detection unit 111 together with the output target image data.

この場合、画像形成装置の幾何学補正部は、出力対象画像データに付加された4つの直線の式を用いて、出力対象画像データの中から当該直線で囲まれる領域を切り出す。そして、幾何学補正部は、切り出した画像を、上下の2辺が水平方向に略平行であり、予め定められたアスペクト比および大きさを有する、矩形状の標準領域(例えば、ビジネス文書出用いられているA判B判なら7:10であるなど。図15において実線で示される)に変換するための写像を求める。そして、幾何学補正部は、切り出した画像に対して、求めた写像に従って幾何学補正を行えばよい。   In this case, the geometric correction unit of the image forming apparatus cuts out an area surrounded by the straight lines from the output target image data using the equation of the four straight lines added to the output target image data. Then, the geometry correction unit uses a rectangular standard area (e.g., a business document), the upper and lower two sides of which are substantially parallel in the horizontal direction and having a predetermined aspect ratio and size. If it is A size B size 7: 10 etc. (shown by a solid line in FIG. 15), find a mapping for conversion. Then, the geometry correction unit may perform geometry correction on the extracted image according to the determined mapping.

もしくは、通信部104は、出力対象画像データとともに、幾何学的配置検出部111により検出された4つのエッジ画素群の各々に対応する直線で囲まれる四角形の4つの頂点座標を送信してもよい。   Alternatively, the communication unit 104 may transmit, together with the output target image data, four vertex coordinates of a quadrangle surrounded by a straight line corresponding to each of the four edge pixel groups detected by the geometric arrangement detection unit 111. .

この場合でも、画像形成装置200の幾何学補正部222は、出力対象画像データに付加された4つの頂点座標の点を頂点とする四角形の領域を出力対象画像データの中から切り出す。そして、幾何学補正部は、切り出した画像を矩形状の標準領域に変換するための写像を求める。そして、幾何学補正部は、求めた写像に従って幾何学補正を行えばよい。   Even in this case, the geometry correction unit 222 of the image forming apparatus 200 cuts out, from the output target image data, a quadrilateral area whose vertex is the point of the four vertex coordinates added to the output target image data. Then, the geometry correction unit obtains a mapping for converting the extracted image into a rectangular standard area. Then, the geometry correction unit may perform geometry correction in accordance with the determined mapping.

また、幾何学的配置検出部111により検出された4つのエッジ画素群の各々に対応する直線で囲まれる四角形が矩形である場合には、通信部104は、出力対象画像データとともに、当該四角形の下辺と撮像範囲の枠の下辺とのなす角度(傾き)を送信してもよい。   When the quadrangle surrounded by straight lines corresponding to each of the four edge pixel groups detected by the geometric arrangement detection unit 111 is a rectangle, the communication unit 104 combines the output target image data with the quadrilateral shape. The angle (inclination) between the lower side and the lower side of the frame of the imaging range may be transmitted.

この場合、画像形成装置の幾何学補正部は、出力対象画像データに付加された4つの頂点座標の点を頂点とする四角形の領域を出力対象画像データの中から切り出す。そして、幾何学補正部は、出力対象画像データに付加された角度だけ切り出した画像を回転させることにより、傾きを補正することができる。   In this case, the geometry correction unit of the image forming apparatus cuts out from the output target image data a quadrilateral area whose vertex is the point of the four vertex coordinates added to the output target image data. Then, the geometric correction unit can correct the inclination by rotating the image extracted by the angle added to the output target image data.

(8−3−2)その2
また、出力対象画像決定部113は、撮像部101により撮像された画像全体の中から、幾何学的配置検出部111により検出された4つのエッジ画素群の各々に対応する直線で囲まれる四角形の領域を切り出し、切り出した画像を示す画像データを出力対象画像データとしてもよい。そして、通信部104は、決定された出力対象画像データを画像形成装置に送信する。
(8-3-2) 2
Further, the output target image determination unit 113 is a quadrangle surrounded by straight lines corresponding to each of the four edge pixel groups detected by the geometric arrangement detection unit 111 out of the entire image captured by the imaging unit 101. An area may be cut out and image data representing the cut out image may be used as output target image data. Then, the communication unit 104 transmits the determined output target image data to the image forming apparatus.

この場合、画像形成装置の幾何学補正部は、出力対象画像データで示される画像を、上下の2辺が水平方向に略平行であり、予め定められたアスペクト比および大きさを有する、矩形状の標準領域(例えば、ビジネス文書出用いられているA判B判なら7:10であるなど。図15において実線で示される)に変換するための写像を求める。そして、幾何学補正部は、求めた写像に従って幾何学補正を行えばよい。   In this case, the geometric correction unit of the image forming apparatus has a rectangular shape in which the upper and lower two sides of the image represented by the output target image data are substantially parallel in the horizontal direction and have a predetermined aspect ratio and size. A mapping for conversion into a standard area of (for example, 7:10 for A-size and B-size being used in a business document, etc. shown by a solid line in FIG. 15) is obtained. Then, the geometry correction unit may perform geometry correction in accordance with the determined mapping.

(8−3−3)その3
上記(8−3−2)で記載したように、出力対象画像決定部113は、撮像部101により撮像された画像全体の中から、幾何学的配置検出部111により検出された4つのエッジ画素群の各々に対応する直線で囲まれる四角形の領域を切り出し、切り出した画像を示す画像データを出力対象画像データとする。
(8-3-3) The 3
As described in (8-3-2) above, the output target image determination unit 113 selects four edge pixels detected by the geometric arrangement detection unit 111 from among the entire image captured by the imaging unit 101. A rectangular area surrounded by a straight line corresponding to each of the groups is cut out, and image data representing the cut out image is set as output target image data.

そして、通信部104は、決定された出力対象画像データとともに、幾何学的配置検出部111により検出された4つのエッジ画素群の各々に対応する直線の式を送信してもよい。   Then, the communication unit 104 may transmit a straight line equation corresponding to each of the four edge pixel groups detected by the geometric arrangement detection unit 111 together with the determined output target image data.

この場合、画像形成装置の幾何学補正部は、出力対象画像データに付加された4つの直線の式を用いて、当該直線で囲まれる領域を矩形状の標準領域に変換するための写像を求める。そして、幾何学補正部は、出力対象画像データに対して、求めた写像に従って幾何学補正を行えばよい。   In this case, the geometric correction unit of the image forming apparatus obtains a mapping for converting the area surrounded by the straight lines into a rectangular standard area using the equation of four straight lines added to the output target image data. . Then, the geometry correction unit may perform the geometry correction on the output target image data in accordance with the determined mapping.

もしくは、通信部104は、決定された出力対象画像データとともに、幾何学的配置検出部111により検出された4つのエッジ画素群の各々に対応する直線で囲まれる四角形の4つの頂点座標を送信してもよい。   Alternatively, the communication unit 104 transmits, together with the determined output target image data, four vertex coordinates of a quadrangle surrounded by a straight line corresponding to each of the four edge pixel groups detected by the geometric arrangement detection unit 111. May be

この場合でも、画像形成装置の幾何学補正部は、出力対象画像データに付加された4つの頂点座標の点を頂点とする四角形の領域を矩形状の標準領域に変換するための写像を求める。そして、幾何学補正部は、出力対象画像データに対して、求めた写像に従って幾何学補正を行えばよい。   Even in this case, the geometric correction unit of the image forming apparatus obtains a mapping for converting a quadrilateral area having the four vertex coordinates added to the output target image data as the vertices into a rectangular standard area. Then, the geometry correction unit may perform the geometry correction on the output target image data in accordance with the determined mapping.

また、幾何学的配置検出部111により検出された4つのエッジ画素群の各々に対応する直線で囲まれる四角形が矩形である場合には、通信部104は、出力対象画像データとともに、当該四角形の下辺と撮像範囲の枠の下辺とのなす角度(傾き)を送信してもよい。   When the quadrangle surrounded by straight lines corresponding to each of the four edge pixel groups detected by the geometric arrangement detection unit 111 is a rectangle, the communication unit 104 combines the output target image data with the quadrilateral shape. The angle (inclination) between the lower side and the lower side of the frame of the imaging range may be transmitted.

この場合、画像形成装置の幾何学補正部は、出力対象画像データに対して、出力対象画像データに付加された角度だけ回転させることにより、傾きを補正することができる。   In this case, the geometric correction unit of the image forming apparatus can correct the inclination by rotating the output target image data by an angle added to the output target image data.

(8−4)出力対象画像決定部の決定方法について
上記の説明では、出力対象画像決定部113は、表示処理部112により撮像対象物が撮像範囲内に収まっていることを示す情報(例えば「OK」)が表示されているときにシャッタボタン(図14の符号10)が操作されたタイミングで、表示部105に表示されている撮像画像を示す画像データを出力対象画像データと決定した。
(8-4) Method of Determining Output Target Image Determination Unit In the above description, the output target image determination unit 113 causes the display processing unit 112 to display information indicating that the imaging target is contained within the imaging range (for example, “ The image data indicating the captured image displayed on the display unit 105 is determined as the output target image data at the timing when the shutter button (symbol 10 in FIG. 14) is operated when the “OK” is displayed.

しかしながら、出力対象画像決定部113は、シャッタボタン10の操作ではなく自動的に出力対象画像データを決定するオートシャッタ機能を有していてもよい。   However, the output target image determination unit 113 may have an auto shutter function of automatically determining output target image data instead of the operation of the shutter button 10.

すなわち、オートシャッタ機能が有効である場合、出力対象画像決定部113は、撮像部101により連続して撮像された所定数の撮像画像(コマ画像)に対して、表示処理部112により撮像対象物が撮像範囲内に収まっていることを示す情報を表示している場合に、当該所定数の撮像画像の1つ(例えば、最後に撮像された撮像画像)を示す画像データを出力対象画像データとして決定する。   That is, when the auto shutter function is effective, the output target image determination unit 113 causes the display processing unit 112 to perform imaging target objects on a predetermined number of captured images (frame images) captured continuously by the imaging unit 101. When displaying information indicating that the image data is included in the imaging range, image data indicating one of the predetermined number of captured images (for example, the captured image captured last) is used as output target image data decide.

より具体的には、出力対象画像決定部113は、撮像部101により連続して撮像された所定数(例えば30)の撮像画像(コマ画像)に対して、幾何学的配置検出部111から出力された抽出結果情報で示される4つの頂点座標(仮頂点座標を除く)を記憶する。そして、各頂点について、所定数の撮像画像から得られた頂点座標の差の二乗が、予め定められた閾値未満である場合に、出力対象画像決定部113は、表示部105に表示されている撮像画像を示す画像データを出力対象画像データと決定すればよい。   More specifically, the output target image determination unit 113 outputs, from the geometric arrangement detection unit 111, a predetermined number (for example, 30) of captured images (frame images) captured continuously by the imaging unit 101. The four vertex coordinates (except temporary vertex coordinates) indicated by the extracted extraction result information are stored. Then, when the square of the difference between the vertex coordinates obtained from the predetermined number of captured images is smaller than a predetermined threshold value for each vertex, the output target image determination unit 113 is displayed on the display unit 105. Image data representing a captured image may be determined as output target image data.

ここで、予め定められた閾値は、例えば、
(撮像範囲の高さYmax×1/16)2+(撮像範囲の幅Xmax×1/16)2
が設定される。
Here, the predetermined threshold is, for example,
(Height of imaging range Ymax × 1/16) 2+ (Width of imaging range Xmax × 1/16) 2
Is set.

これにより、ユーザがシャッタボタンを操作しなくても出力対象画像データを決定できるので、シャッタボタンを操作することによる撮像対象物のブレや撮像対象物が撮像範囲からはみ出すことを防止できる。   As a result, the output target image data can be determined without the user operating the shutter button, so that it is possible to prevent the imaging target object from moving due to operating the shutter button and the imaging target object from being out of the imaging range.

なお、ユーザは、オートシャッタ機能の有効/無効を切り換えることができる。この切換は、図14に示す条件設定ボタン50を操作することにより設定される。なお、オートシャッタ機能が有効であり、オートシャッタ機能により出力対象画像データを決定したとき、出力対象画像決定部113は、図32に示されるように、その旨を示す第3アイコンDを表示部105に表示させる。   The user can switch on / off of the auto shutter function. This switching is set by operating the condition setting button 50 shown in FIG. In addition, when the auto shutter function is effective and the output target image data is determined by the auto shutter function, the output target image determining unit 113 displays a third icon D indicating that as shown in FIG. Displayed on 105.

(8−5)輪郭線の表示機能のオン/オフ切替
図44は、撮像範囲判定部の変形例を示すブロック図である。図44に示されるように、本変形例に係る撮像範囲判定部110aは、切替部114を備えている点で上記撮像範囲判定部110と異なる。
(8-5) On / Off Switching of Display Function of Contour Line FIG. 44 is a block diagram showing a modification of the imaging range determination unit. As shown in FIG. 44, the imaging range determination unit 110a according to the present modification differs from the imaging range determination unit 110 in that the switching unit 114 is provided.

切替部114は、ユーザ入力に従って、幾何学的配置検出部111および表示処理部112による輪郭線の表示機能(ドキュメント補正モード)のオン/オフを切り替えるものである。   The switching unit 114 switches on / off of the display function (document correction mode) of the outline by the geometric arrangement detection unit 111 and the display processing unit 112 according to a user input.

切替部114は、図45に示されるように、ドキュメント補正モードのオン/オフ切り替え用のチェックボックス451を表示部105に表示させる。ドキュメント補正モードをオンに切り替える指示が入力された場合、切替部114は、幾何学的配置検出部111および表示処理部112を動作させ、図4のS1〜S6の処理を実行させる。これにより、撮像対象物の輪郭線が撮像画像に重ねて表示され、撮像対象物が撮像範囲内に収まっているか否かを容易に確認することができる。   As shown in FIG. 45, the switching unit 114 causes the display unit 105 to display a check box 451 for switching on / off of the document correction mode. When an instruction to switch on the document correction mode is input, the switching unit 114 operates the geometric arrangement detection unit 111 and the display processing unit 112 to execute the processes of S1 to S6 in FIG. 4. Thus, the outline of the object to be imaged is displayed superimposed on the imaged image, and whether or not the object to be imaged is within the imaging range can be easily confirmed.

一方、ドキュメント補正モードをオフに切り替える指示が入力された場合、切替部114は、幾何学的配置検出部111および表示処理部112を動作させず、撮像画像のみを表示させる。   On the other hand, when an instruction to switch the document correction mode off is input, the switching unit 114 causes only the captured image to be displayed without operating the geometric arrangement detection unit 111 and the display processing unit 112.

なお、切替部114は、ドキュメント補正モードのオン/オフの切り替え指示を、撮像開始前に受け付けてもよいし、撮像中に受け付けてもよい。   Note that the switching unit 114 may receive an instruction to switch on / off the document correction mode before the start of imaging, or may receive it during imaging.

また、本変形例と(8−4)で記載した変形例とを組合せてもよい。この場合、ドキュメント補正モードがオンに設定されている場合にのみ、オートシャッタ機能を有効に設定することができる。すなわち、図45に示す例では、ユーザは、ドキュメント補正モード用のチェックボックス451にチェックが入力されている場合(ドキュメント補正モードがオンの場合)に限り、オートシャッタ機能用のチェックボックス452にチェックを入力することができる。   Also, the present modification may be combined with the modification described in (8-4). In this case, the auto shutter function can be set to be effective only when the document correction mode is set to on. That is, in the example shown in FIG. 45, the user checks the check box 452 for the auto shutter function only when the check is input to the check box 451 for the document correction mode (when the document correction mode is on). You can enter

(8−6)編集ビュー機能について
携帯端末装置100の表示処理部112は、出力対象画像決定部113により決定された出力対象画像データについて、輪郭線に基づいて、幾何学補正および高画質化補正の画像補正処理を行った後の画像(補正処理後画像)をプレビュー表示させる機能(補正画像プレビュー機能)を有していてもよい。
(8-6) Editing view function The display processing unit 112 of the mobile terminal device 100 performs geometric correction and high image quality correction on the output target image data determined by the output target image determining unit 113 based on the outline. A function (corrected image preview function) may be provided to display a preview of the image (corrected image) after the image correction processing of (1) is performed.

本変形例では、表示処理部112は、上述した画質調整部221、幾何学補正部222および高解像度補正部225の機能を有している。そして、表示処理部112は、補正画像プレビュー機能の実行指示を受けると、指定された出力対象画像データを読み出す。表示処理部112は、当該出力対象画像データで示される撮像画像に対してS1〜S5の処理(図4)を幾何学的配置検出部111に実行させる。表示処理部112は、S5で算出された4つの頂点座標を結ぶ輪郭線で囲まれた領域の画像に対して、画質調整、幾何学補正および高解像度補正を行うことで補正処理後画像を生成し、表示部105にプレビュー表示させる。   In the present modification, the display processing unit 112 has the functions of the image quality adjustment unit 221, the geometry correction unit 222, and the high resolution correction unit 225 described above. Then, when the display processing unit 112 receives an execution instruction of the correction image preview function, the display processing unit 112 reads the designated output target image data. The display processing unit 112 causes the geometric arrangement detection unit 111 to execute the processes of S1 to S5 (FIG. 4) on the captured image indicated by the output target image data. The display processing unit 112 generates an image after correction processing by performing image quality adjustment, geometric correction, and high resolution correction on the image of the area surrounded by the outline connecting the four vertex coordinates calculated in S5. And causes the display unit 105 to display a preview.

図46は、補正処理後画像が表示された画面例を示す。図46に示されるように、表示処理部112は、出力対象画像データで示される撮像画像に輪郭線を重ねて領域Aに表示し、補正処理後画像を領域Bに表示させる。   FIG. 46 shows an example of a screen on which an image after correction processing is displayed. As shown in FIG. 46, the display processing unit 112 superimposes the outline on the captured image represented by the output target image data and displays it in the region A, and displays the image after correction processing in the region B.

なお、表示処理部112は、シャッタボタンが押下される前の状態でも補正処理後画像を表示してもよい。   The display processing unit 112 may display the image after correction processing even before the shutter button is pressed.

また、表示処理部112は、画質調整および幾何学補正のみを行い補正処理後画像を生成してもよい。   In addition, the display processing unit 112 may perform only the image quality adjustment and the geometric correction to generate an image after the correction processing.

さらに、表示処理部112は、幾何学的配置検出部111により算出された4つの頂点座標を編集する指示を受け付け、編集後の4つの頂点座標を結ぶ輪郭線で囲まれる領域の画像を基に補正処理後画像を生成してもよい。例えば、図46に示されるように、表示処理部112は、領域Aにおいて4つの頂点の各々に対応する編集アイコン461〜464を表示させる。そして、表示処理部112は、各編集アイコン461〜464の位置変更指示の入力を受け付け、変更後の各編集アイコン461〜464の位置に応じて4つの頂点座標を編集し、輪郭線の位置を決定すればよい。   Furthermore, the display processing unit 112 receives an instruction to edit the four vertex coordinates calculated by the geometric arrangement detection unit 111, and based on the image of the area surrounded by the outline connecting the four vertex coordinates after editing. An image after correction processing may be generated. For example, as illustrated in FIG. 46, the display processing unit 112 causes the editing icons 461 to 464 corresponding to each of the four vertices in the area A to be displayed. Then, the display processing unit 112 receives the input of the position change instruction of each of the editing icons 461 to 464, edits the four vertex coordinates according to the position of each of the editing icons 461 to 464 after the change, and detects the position of the outline. You should decide.

この場合、通信部104は、(8−3−1)で記載したのと同様に、出力対象画像データとともに、編集後の4つの頂点座標を送信する。これにより、ユーザは、所望の輪郭線で囲まれる領域を画像形成装置200から出力させることができる。   In this case, the communication unit 104 transmits the four vertex coordinates after editing together with the output target image data, as described in (8-3-1). Thereby, the user can cause the image forming apparatus 200 to output the area surrounded by the desired outline.

また、表示処理部112は、図46に示されるように、領域Bに補正処理後画像を表示させるか否かを切り替えるためのチェックボックス465を表示部105に表示させてもよい。そして、表示処理部112は、チェックボックス465への入力に応じて、領域Bへの補正処理後画像の表示の有無を切り替える。   Further, as shown in FIG. 46, the display processing unit 112 may cause the display unit 105 to display a check box 465 for switching whether or not to display the image after correction processing in the region B. Then, in response to the input to the check box 465, the display processing unit 112 switches the presence or absence of the display of the image after the correction processing to the area B.

さらに、表示処理部112は、図46に示されるように、画質補正の度合いを変更するバー466を表示部105に表示させてもよい。そして、表示処理部112は、バー466への入力に応じて、画質調整(コントラスト補正)の度合いを変更する。例えば、バー466により、画質調整として「なし」「弱」「中」「強」の4段階の何れかに変更することができる。   Furthermore, the display processing unit 112 may cause the display unit 105 to display a bar 466 for changing the degree of image quality correction, as shown in FIG. Then, in response to the input to the bar 466, the display processing unit 112 changes the degree of image quality adjustment (contrast correction). For example, the bar 466 can be used to change the image quality to any one of four levels of "none", "weak", "medium" and "strong".

さらに、表示処理部112は、図46に示されるように、登録ボタン467を表示部105に表示させてもよい。登録ボタン467が押下されると、押下されたタイミングで設定していた出力対象画像データ、4つの頂点座標および画質調整レベルが互いに対応付けて記憶部108に格納する。そして、通信部104は、出力対象画像データを画像形成装置200に送信する際に、当該出力対象画像データに対応付けられている4つの頂点座標および画質調整レベルも合わせて送信する。この場合、画像形成装置200の幾何学補正部222は、出力対象画像データに付加された4つの頂点座標の点を頂点とする四角形の領域を出力対象画像データの中から切り出し、切り出した画像を矩形状の標準領域幾何学補正を行えばよい。また、画像形成装置200の画質調整部221は、出力対象画像データに付加された画質調整レベルに応じて画質調整を行えばよい。これにより、ユーザは、携帯端末装置100の表示部105の画面を見ながら、画像形成装置200から出力される画像の領域や画質を設定することができる。   Furthermore, the display processing unit 112 may display the registration button 467 on the display unit 105 as shown in FIG. When the registration button 467 is pressed, the output target image data set at the pressed timing, the four vertex coordinates, and the image quality adjustment level are stored in the storage unit 108 in association with each other. Then, when transmitting the output target image data to the image forming apparatus 200, the communication unit 104 also transmits the four vertex coordinates and the image quality adjustment level associated with the output target image data. In this case, the geometry correction unit 222 of the image forming apparatus 200 cuts out a quadrilateral area whose vertex is the point of the four vertex coordinates added to the output target image data from the output target image data, and cuts the cut out image A rectangular standard area geometry correction may be performed. Further, the image quality adjustment unit 221 of the image forming apparatus 200 may perform the image quality adjustment according to the image quality adjustment level added to the output target image data. Thus, the user can set the area and the image quality of the image output from the image forming apparatus 200 while looking at the screen of the display unit 105 of the mobile terminal device 100.

なお、本変形例と(8−5)で記載した変形例とを組合せてもよい。この場合、ドキュメント補正モードがオンに設定されている場合に、補正画像プレビュー機能が自動的にオンとなる。つまり、図45においてシャッタボタン453の押下またはオートシャッタ機能により出力対象画像データが決定されると、表示処理部112は、自動的に補正画像プレビュー機能の実行指示が入力されたものと認識する。そして、表示処理部112は、補正画像プレビュー機能を実行し、図46のような画面を表示部105に表示してもよい。   The present modification may be combined with the modification described in (8-5). In this case, the corrected image preview function is automatically turned on when the document correction mode is set to on. That is, when the output target image data is determined by pressing the shutter button 453 or the auto shutter function in FIG. 45, the display processing unit 112 automatically recognizes that the execution instruction of the correction image preview function is input. Then, the display processing unit 112 may execute the corrected image preview function and display a screen as shown in FIG. 46 on the display unit 105.

(8−7)画像表示装置について
画像表示装置300は、画像形成装置200が備える画像処理部202を備えていても良い。そして、画像表示装置300は、出力対象画像データに対して、幾何学補正や高解像度補正を行った補正済画像データで示される画像を表示させる表示処理を出力処理として行ってもよい。
(8-7) Image Display Device The image display device 300 may include the image processing unit 202 included in the image forming device 200. Then, the image display apparatus 300 may perform, as output processing, display processing for displaying an image represented by corrected image data subjected to geometric correction and high resolution correction on output target image data.

(8−8)携帯端末装置について
撮像対象物の撮像条件が悪い場合、画像形成装置において画像処理を行ったとしても、画像を確認しにくいことがある。例えば、幾何学的歪みが比較的大きい状態で撮像した場合、幾何学補正を行っても視認しにくい。
(8-8) Mobile Terminal Device When the imaging condition of the imaging object is bad, it may be difficult to confirm the image even if the image processing is performed in the image forming device. For example, when imaging is performed in a state in which geometric distortion is relatively large, it is difficult to visually recognize even if geometric correction is performed.

そこで、携帯端末装置100において、出力対象画像データが、画像形成装置における画像処理が効果を生じさせる条件で撮像されたか否かを判定し、その判定結果に応じて再撮像をユーザに促してもよい。   Therefore, it is determined in the mobile terminal device 100 whether or not the output target image data is captured under the condition that the image processing in the image forming device produces an effect, and the user is prompted to re-image according to the determination result. Good.

図33は、本変形例に係る携帯端末装置100の構成を示すブロック図である。図33に示されるように、本変形例に係る携帯端末装置100は、出力画像判定部111を備える点で図2に示す携帯端末装置と相違する。   FIG. 33 is a block diagram showing a configuration of mobile terminal apparatus 100 according to the present modification. As shown in FIG. 33, the mobile terminal device 100 according to the present modification is different from the mobile terminal device shown in FIG. 2 in that the output image determination unit 111 is provided.

出力画像判定部114は、文書撮像モードが選択されている際に、撮像範囲判定部110により決定された出力対象画像データが、画像形成装置における画像処理が効果を生じさせる条件で撮像されたか否かを判定するものである。出力画像判定部114における判定項目としては、以下のものが挙げられる。   When the document imaging mode is selected, the output image determination unit 114 determines whether the output target image data determined by the imaging range determination unit 110 is captured under the condition that the image processing in the image forming apparatus produces an effect. To determine the Examples of the determination items in the output image determination unit 114 include the following.

(8−8−1)傾きの判定
出力画像判定部114は、出力対象画像データの中から撮像対象物と背景とのエッジ上の2点を選択する。例えば、図34に示されるように、サブ撮像画像データの中心から左右それぞれ横方向にw/2だけ離れた2点11・12を選択する。次に、選択された2点11・12の各々と、撮像画像データの端辺との距離d1,d2を求め、撮像画像における撮像対象物の傾きを求めることができる。図34のような場合、傾き角度をθとすると、 tanθ=(d2−d1)/wとなる。そこで、出力画像判定部114は、(d2−d1)/wの値を算出し、この値に相当する角度θをあらかじめ作成済みのテーブル(図35参照)などから読み取る。
(8-8-1) Determination of Inclination The output image determination unit 114 selects two points on the edge of the imaging target object and the background from the output target image data. For example, as shown in FIG. 34, two points 11 and 12 separated by w / 2 in the lateral direction respectively from the center of the sub-captured image data are selected. Next, the distances d1 and d2 between each of the selected two points 11 and 12 and the edge of the captured image data can be determined, and the inclination of the object to be imaged in the captured image can be determined. In the case shown in FIG. 34, tan θ = (d2−d1) / w, where θ is the inclination angle. Therefore, the output image determination unit 114 calculates the value of (d2−d1) / w, and reads the angle θ corresponding to this value from a table (see FIG. 35) or the like that has been created in advance.

そして、出力画像判定部114は、検出した角度θが所定範囲内(例えば、−30°〜+30°)であるか否かを判定し、その判定結果を制御部109に出力する。ここで、角度θが所定範囲内であることが処理実行条件の一つとなる。   Then, the output image determination unit 114 determines whether the detected angle θ is within a predetermined range (for example, -30 ° to + 30 °), and outputs the determination result to the control unit 109. Here, it is one of the processing execution conditions that the angle θ is within a predetermined range.

(8−8−2)幾何学的歪みの判定
出力画像判定部114は、幾何学的配置検出部111により検出された4つのエッジ画素群に対応する直線で囲まれる四角形を特定する。そして、出力画像判定部114は、特定した四角形の対辺の長さの比を計算する。なお、対辺は2組あるので、出力画像判定部114は、当該2組の各々について長さの比を求める。
(8-8-2) Determination of Geometric Distortion The output image determination unit 114 specifies a quadrangle surrounded by a straight line corresponding to the four edge pixel groups detected by the geometric arrangement detection unit 111. Then, the output image determination unit 114 calculates the ratio of the lengths of the opposite sides of the identified square. In addition, since there are two sets of opposite sides, the output image determination unit 114 obtains a length ratio for each of the two sets.

ここで、対辺の長さの比は、矩形状の撮像対象物を正面から撮像した場合には撮像画像の中の撮像対象物も矩形状であるため、1となる。一方、斜め方向から撮像した場合には、撮像画像の中の撮像対象物の形状は歪んだ四角形となるため、1とは異なる値となる。そして、撮像方向と、撮像対象物の文書画像が形成された平面の法線方向とのなす角度が大きくなるほど、当該比の値と1との差が大きくなる。そのため、対辺の長さの比は、幾何学的歪みの度合いを示す特徴量の一つであるといえる。   Here, the ratio of the length of the opposite side is 1, since the imaging object in the captured image is also rectangular when imaging the rectangular imaging object from the front. On the other hand, when imaging is performed in an oblique direction, the shape of the imaging target object in the captured image is a distorted quadrilateral, and thus has a value different from 1. As the angle between the imaging direction and the normal direction of the plane on which the document image of the imaging object is formed is larger, the difference between the value of the ratio and 1 is larger. Therefore, it can be said that the ratio of the length of the opposite side is one of the feature quantities indicating the degree of geometric distortion.

その後、出力画像判定部114は、求めた二つの比の両方が所定範囲内(例えば、0.5〜2)であるか否かを判定し、その判定結果を制御部109に出力する。ここで、所定範囲は、画像形成装置200において補正可能な範囲として予め定められたものであり、記憶部108に格納されている。   Thereafter, the output image determination unit 114 determines whether both of the two calculated ratios are within a predetermined range (for example, 0.5 to 2), and outputs the determination result to the control unit 109. Here, the predetermined range is predetermined as a range that can be corrected by the image forming apparatus 200, and is stored in the storage unit 108.

なお、出力画像判定部114は、幾何学的歪みの度合いを示す別の特徴量として、上記のようにして検出された4つの交点を含む2つの直線のなす角度などを用いてもよい。   The output image determination unit 114 may use, for example, an angle formed by two straight lines including four intersection points detected as described above, as another feature amount indicating the degree of geometric distortion.

(8−8−3)その他
出力画像判定部114は、上記の判定項目に加えて、例えば、明るさ、コントラスト、カラーバランス、ブレ(激しい手ぶれ)などを判定してもよい。
(8-8-3) Others In addition to the above-described determination items, the output image determination unit 114 may determine, for example, brightness, contrast, color balance, blurring (strong camera shake), and the like.

明るさについては、例えば露出オーバー(明るすぎる)やアンダー(暗すぎる)の場合に再度の撮像が必要となるケースが考えられる。そこで、出力画像判定部114は、例えば、出力対象画像データの画素値のうち、最大のものと最小のものを求め、最大値がある閾値(例えば8ビットで100など)以下であれば、露出アンダーとし、最小値がある閾値(例えば8ビットで150など)以上であれば、露出オーバーとする判定結果を制御部109に出力する。   With regard to the brightness, for example, in the case of overexposure (too bright) or under (too dark), it may be considered that another image capture is required. Therefore, the output image determination unit 114 finds, for example, the maximum and minimum pixel values of the output target image data, and if the maximum value is less than or equal to a certain threshold (for example, 100 by 8 bits), the exposure is performed. If it is under and the minimum value is greater than or equal to a certain threshold (for example, 150 in 8 bits), the determination result of overexposure is output to the control unit 109.

コントラストについては、出力画像判定部114は、出力対象画像データの画素値のうちの最大・最小の差分値が所定閾値以下の場合、コントラスト不足と判定する。   With regard to the contrast, the output image determination unit 114 determines that the contrast is insufficient when the maximum / minimum difference value among the pixel values of the output target image data is equal to or less than a predetermined threshold.

なお、明るさ・コントラストの判定において、出力画像判定部114は、各色チャンネルに対して判定を行っても良いし、平均値(R+G+B/3)や明度値(0.299×R+0.587×G+0.114×B:NTSC準拠)を用いても良い。   In the determination of the brightness and contrast, the output image determination unit 114 may perform determination on each color channel, or the average value (R + G + B / 3) or the lightness value (0.299 × R + 0.587 × G + 0). .114 × B: NTSC compliant) may be used.

カラーバランスについては、各色チャンネル(RGB)の平均値や最大・最小値の比較を行うことで、ある一つのチャンネルに過度の偏りが発生していることを把握できる。そこで、出力画像判定部114は、例えば、出力対象画像データ中の最大明度値付近の値(最大明度〜最大明度−5程度)を持つ画素値の各色チャンネルの値の平均値(Ra,Ga,Ba)を求め、その各色チャンネルの最大値と最小値の差分が値に応じた一定値以上[Max(Ra,Ga,Ba)−Min(Ra,Ga,Ba)>0.1×Max(Ra,Ga,Ba)]である場合に、カラーバランス不良であると判定する。   With regard to color balance, by comparing the average value and the maximum value / minimum value of each color channel (RGB), it can be understood that excessive bias occurs in a certain channel. Therefore, for example, the output image determination unit 114 calculates the average value (Ra, Ga, and so on) of each color channel of pixel values having values near the maximum lightness value (maximum lightness to maximum lightness-5) in the output target image data Ba) is determined, and the difference between the maximum value and the minimum value of each color channel is a predetermined value or more according to the value [Max (Ra, Ga, Ba) -Min (Ra, Ga, Ba)> 0.1 × Max (Ra)] , Ga, Ba)], it is determined that the color balance is poor.

ブレ(激しい手ぶれ:いわゆるモーションブラー)については、発生時にエッジの先鋭性が低下することから、出力画像判定部114は、図27に挙げたようなエッジ抽出フィルタを用いて、エッジ強度画像を作成してヒストグラムを取り、その標準偏差値(前記分散の二乗根)を求める。そして、当該標準偏差値が所定閾値(例えば5)以下の場合、ブレが発生していると判定する。   The output image determination unit 114 creates an edge intensity image using an edge extraction filter as shown in FIG. The histogram is taken and the standard deviation (square root of the variance) is determined. Then, when the standard deviation value is equal to or less than a predetermined threshold (for example, 5), it is determined that blurring has occurred.

(8−8−4)ユーザへの通知に関して
出力画像判定部114から判定結果を受けた制御部109は、その判定結果に応じて、再撮像を促すメッセージを表示部105に表示させる。
(8-8-4) Notification to User The control unit 109 that has received the determination result from the output image determination unit 114 causes the display unit 105 to display a message prompting re-imaging according to the determination result.

例えば、出力画像判定部114から傾き角度θが所定範囲内でない旨の判定結果を受けた場合、制御部109は、撮像対象物が傾かないようにして再度撮像することを促すメッセージを表示部105に表示させる。   For example, when the control unit 109 receives a determination result that the tilt angle θ is not within the predetermined range from the output image determination unit 114, the control unit 109 causes the display unit 105 to display a message prompting imaging again without the image pickup object being tilted. Display on.

また、幾何学的歪みの度合いを示す特徴量(ここでは、撮像画像における撮像対象物の対辺の長さの比)が所定範囲内でない旨の判定結果を受けた場合、制御部109は、撮像対象物における文書画像が形成された平面の法線方向から再度撮像することを促すメッセージを表示部105に表示させる。   When the control unit 109 receives a determination result indicating that the feature amount indicating the degree of geometrical distortion (here, the ratio of the length of the opposite side of the imaging target in the captured image) is not within the predetermined range, the control unit 109 A message is displayed on the display unit 105 prompting imaging again from the normal direction of the plane on which the document image of the object is formed.

(8−9)高解像度補正について
上記の説明では、高解像度補正部225は、1つの出力対象画像データを用いて高解像度補正を行うものとした。しかしながら、高解像度補正部は、複数の出力対象画像データを用いて高解像度補正を行ってもよい。この高解像度補正の手法としては、映像情報メディア学会誌Vol.62、No.3、pp.337〜342(2008) に記載されている方法を用いることができる。
(8-9) High Resolution Correction In the above description, the high resolution correction unit 225 performs high resolution correction using one output target image data. However, the high resolution correction unit may perform high resolution correction using a plurality of output target image data. As the method of this high resolution correction, the method described in the Journal of the Institute of Image Information and Television Engineers Vol. 62, No. 3, pp. 337 to 342 (2008) can be used.

この場合、出力対象画像決定部113は、指定されたタイミングにおいて、所定回数(例えば、2〜15)だけ連続して撮像することにより得られた所定数の出力対象画像データをデータセットとして記憶部108に格納する。通常、連続して撮像された画像は、ほぼ同じ画像であるが、手ぶれ等によって微少量だけずれることになる。   In this case, the output target image determination unit 113 stores, as a data set, a predetermined number of output target image data obtained by continuously imaging a predetermined number of times (for example, 2 to 15) at a designated timing. Store in 108. Usually, images taken continuously are substantially the same image, but are shifted by a very small amount due to camera shake or the like.

また、複数の出力対象画像データを用いて高解像度補正を実行するためには、解像度変換の倍率に応じた所定数の画像データが、所定量だけずれている必要がある。そこで、本変形例では、図33に示す携帯端末装置100の出力画像判定部114は、データセットに含まれる出力対象画像データの中に、画像形成装置200で高解像度補正を実行するために必要な、所定量だけずれた所定数のサブ撮像画像データが含まれるか否かを判定する。   Further, in order to perform high resolution correction using a plurality of output target image data, it is necessary that the predetermined number of image data according to the resolution conversion magnification be shifted by a predetermined amount. Therefore, in the present modification, the output image determination unit 114 of the portable terminal device 100 shown in FIG. 33 is required to execute high resolution correction in the image forming apparatus 200 in the output target image data included in the data set. It is determined whether a predetermined number of sub-captured image data shifted by a predetermined amount is included.

(8−9−1)複数枚の画像のズレ量の判定
文字の判読性を上げるような高解像度補正のために必要なズレとは、対象とする画像データの一画素未満(小数点)のズレを指す。すなわち、小数点以下(1画素未満)の値、例えば、0.3〜0.7などのズレが重要である。整数部分のズレは高解像度補正には考慮されない。例えば、1.3画素、2.3画素などの1画素未満のズレを含むような場合、複数の画像に基づいた高解像度補正を実行することができるが、1画素、2画素などの1画素未満のズレを含まない場合、高解像度補正を実行することができない。
(8-9-1) Determination of Deviation Amount of Multiple Images The deviation required for high resolution correction to improve the legibility of characters is the deviation of less than one pixel (decimal point) of the target image data Point to That is, a shift of a value below the decimal point (less than one pixel), such as 0.3 to 0.7, is important. Deviations of the integer part are not taken into account for high resolution correction. For example, in the case where a shift of less than one pixel such as 1.3 pixels or 2.3 pixels is included, high resolution correction based on a plurality of images can be performed, but one pixel such as one pixel or two pixels If it does not include less than the deviation, high resolution correction can not be performed.

例えば、変換倍率が2倍の場合、高解像度補正に必要な画像データの数は2であり、2つの画像データのずれ量としては画素単位で小数点以下0.3〜0.7であることが好ましい。そのため、記憶部108には、解像度変換の倍率「2倍」と、撮像回数「2」および処理実行条件「必要画像データ数:2、ずれ量:0.3〜0.7」とを対応付けた情報が予め格納されている。   For example, when the conversion magnification is twice, the number of image data required for high resolution correction is 2, and the amount of deviation between two image data is 0.3 to 0.7 after the decimal point in pixel units. preferable. Therefore, in the storage unit 108, the resolution conversion magnification “2 ×” is associated with the number of times of imaging “2” and the processing execution condition “number of required image data: 2, shift amount: 0.3 to 0.7”. Information is stored in advance.

また、変換倍率が4倍である場合、高解像度補正に必要な画像データの数は4であり、その内の一つの画像データを基準画像データとしたとき、当該基準画像データと残りの3つの画像データとのずれ量がそれぞれ画素単位で小数点以下0.2〜0.3、0.4〜0.6、0.7〜0.8であることが好ましい。そのため、記憶部108は、解像度変換の倍率「4倍」と、撮像回数「4」および処理実行条件「必要画像データ数:4、ずれ量:0.2〜0.3、0.4〜0.6、0.7〜0.8」とを対応付けた情報を記憶している。   When the conversion magnification is four times, the number of image data required for high resolution correction is four, and when one of the image data is used as the reference image data, the reference image data and the remaining three The amount of deviation from the image data is preferably 0.2 to 0.3, 0.4 to 0.6, or 0.7 to 0.8 after the decimal point in pixel units, respectively. Therefore, the storage unit 108 sets the resolution conversion magnification "4 times", the number of times of imaging "4", and the processing execution condition "number of necessary image data: 4, shift amount: 0.2 to 0.3, 0.4 to 0". .6, 0.7 to 0.8 "are stored.

制御部109は、解像度変換の倍率の選択入力をユーザに促し、入力された倍率に応じた処理実行条件を設定する。そして、出力画像判定部114は、データセットの中に、設定された処理実行条件を満たす出力対象画像データが含まれるか否かを判定する。   The control unit 109 prompts the user to select a magnification for resolution conversion, and sets processing execution conditions according to the inputted magnification. Then, the output image determination unit 114 determines whether or not the output target image data that satisfies the set processing execution condition is included in the data set.

なお、以下では、説明を簡略化するため、解像度変換の倍率として2倍が選択された場合について述べる。   In the following, in order to simplify the description, a case will be described where double magnification is selected as the resolution conversion resolution.

まず、出力画像判定部114は、出力対象画像データの任意の一つを選択し、当該出力対象画像データ(以下、第1の撮像画像という)について、ズレ検出用部分領域を選択する。ここで、ズレ検出用部分領域は、第1の撮像画像と残りの出力対象画像データ(以下、第2の撮像画像という)との間のズレ量を求めるために用いるものであるため、当該ズレ検出用部分領域内で画素値の変化が大きいもの(明確なパターンが存在するもの)が好ましい。そこで、出力画像判定部114は、以下のような方法によってズレ検出用部分領域を抽出する。   First, the output image determination unit 114 selects any one of the output target image data, and selects the shift detection partial area for the output target image data (hereinafter, referred to as a first captured image). Here, since the shift detection partial area is used to obtain the shift amount between the first captured image and the remaining output target image data (hereinafter referred to as the second captured image), the shift It is preferable that the change in pixel value is large (a clear pattern exists) in the detection partial region. Therefore, the output image determination unit 114 extracts the displacement detection partial area by the following method.

出力画像判定部114は、撮像対象物の領域の重心位置に存在する画素を特定し、当該画素を注目画素とする。そして、注目画素を含むn×n画素の領域を選定する。選定した領域について、以下の選定要件を満たすか否か判断し、満たす場合には、当該領域をズレ検出用部分領域とする。一方、満たさない場合には、所定のオフセット量に基づいて領域を移動させ、移動後の領域について同じ判断を行う。このようにして、ズレ検出用部分領域を抽出する。   The output image determination unit 114 specifies a pixel existing at the barycentric position of the area of the imaging target object, and sets the pixel as a target pixel. Then, an area of n × n pixels including the target pixel is selected. For the selected area, it is determined whether or not the following selection requirements are satisfied, and if it is satisfied, the area is used as a shift detection partial area. On the other hand, if the condition is not satisfied, the area is moved based on a predetermined offset amount, and the same determination is made for the area after movement. Thus, the shift detection partial area is extracted.

ここで、選定要件としては、例えば、以下二つが挙げられる。
一つとしては、領域内の分散に準じた値を用いるものである。注目画素近傍のn×n画素の領域に対して画素値をP(i)とすると部分領域の分散値Variance(x)は、下記式(1)で表される。この分散値Variance(x)の値が所定閾値以上あることを選定要件とする。また簡易化のために本式の分子のみを考えても良い。
Here, as selection requirements, for example, the following two can be mentioned.
One is to use a value according to the dispersion in the region. Assuming that the pixel value is P (i) for the region of n × n pixels in the vicinity of the pixel of interest, the variance value Variance (x) of the partial region is expressed by the following equation (1). The selection requirement is that the value of the variance Variance (x) is equal to or greater than a predetermined threshold. Also, only molecules of this formula may be considered for simplification.

他の一つとしては、注目画素近傍のn×n画素の領域に対して、図27に示す1次微分フィルタのようなエッジ抽出フィルタを掛けて、2値化し、総和を見る。総和がある所定閾値以上(例えば、部分領域画素数の5%以上など)あることを選定要件とすればよい。   As another one, an area of n × n pixels in the vicinity of the pixel of interest is subjected to an edge extraction filter such as a first order differential filter shown in FIG. The selection requirement may be that the sum total is equal to or greater than a predetermined threshold (for example, 5% or more of the number of partial area pixels).

次に、このようにして求められた、第1の撮像画像のズレ検出用部分画像a(n×n)に対し、第2の撮像画像の中から、中心がほぼ同じ位置のズレ検出用部分画像b(m×m)(m>n)として切り出す。この切り出し方法は、第1の撮像画像におけるズレ検出用部分画像aの中心画素の座標と、第2の撮像画像におけるズレ検出用部分画像bの中心画素の座標とが一致するように、切り出す。   Next, with respect to the shift detection partial image a (n × n) of the first captured image obtained in this manner, a shift detection portion having the substantially same position in the center among the second captured image. Cut out as an image b (m × m) (m> n). In this clipping method, clipping is performed such that the coordinates of the central pixel of the displacement detection partial image a in the first captured image and the coordinates of the central pixel of the displacement detection partial image b in the second captured image coincide with each other.

その後、切り出されたズレ検出用部分画像b中においてズレ検出用部分画像aに最も適合する領域をサブピクセル精度で求める。その手法としては、ズレ検出用部分画像aをテンプレートとした正規化相関パターンマッチングが挙げられる。   After that, in the cut-out partial image b for shift detection, a region that most fits the partial image a for shift detection is determined with sub-pixel accuracy. An example of such a method is normalized correlation pattern matching using the displacement detection partial image a as a template.

正規化相関パターマッチングの例として、既知であるところの正規化相関式を用いて相関を算出する。一般的にN画素からなる2つのパターンInput(I)とTarget(T)の相関式は、下記式(2)と表すことができる。ここで、α、β、γはそれぞれ下記のように表せる。   As an example of normalized correlation pattern matching, the correlation is calculated using a known normalized correlation equation. The correlation equation between two patterns Input (I) and Target (T) generally composed of N pixels can be expressed as the following equation (2). Here, α, β and γ can be expressed respectively as follows.

例えば、n=5、m=7の場合、ズレ検出用部分画像b(m×m)のなかのズレ検出用部分画像aと同サイズの領域(n×n)ごとに上記相関式を演算すると、結果として3×3の相関値Mapが生成される。この相関値Mapを用いて、フィットする2次曲面を求める。2次曲面の求め方としては、例えば、S(x,y)=a*x*x+b*x*y+c*y*y+d*x+e*y+fとして、9点のうち相関値の高い6点を選び、連立方程式を解いて各係数を求める。この関数の極値(=最大値)の座標値(x、yの両方)の小数点以下の値が所定範囲(ここでは、0.3〜0.7)であれば、処理実行条件「必要画像データ数:2、ずれ量:0.3〜0.7」を満たすものと判定する。   For example, in the case of n = 5 and m = 7, the correlation equation is calculated for each region (n × n) of the same size as the displacement detection partial image a in the displacement detection partial image b (m × m). As a result, 3 × 3 correlation value Map is generated. Using this correlation value Map, a quadratic surface to be fitted is determined. As a method of finding a quadratic surface, for example, 6 points with high correlation value among 9 points are selected as S (x, y) = a * x * x + b * x * y + c * y * d + e * y + f, Solve the simultaneous equations to find each coefficient. If the value after the decimal point of the coordinate value (both x and y) of the extremum (= maximum value) of this function is within a predetermined range (here, 0.3 to 0.7), the processing execution condition “necessary image It is determined that the number of data: 2, the shift amount: 0.3 to 0.7 is satisfied.

なお、極値の求め方は、上記2次式を偏微分し、それぞれが0である点の座標を求めればよい。このとき、実際には各係数(a〜f)を求める必要はないので、直接相関値(S1〜S6)を用いたほうが効率的である。求めるべき式(3)は以下のようになる。ここで、原点は着目するウィンド基準となる。   In addition, what is necessary is just to obtain | require the coordinate of the point which each carries out the partial differentiation of the said quadratic expression, and how to obtain | require the extreme value. At this time, it is more efficient to use the direct correlation values (S1 to S6) because it is not necessary to actually obtain the respective coefficients (a to f). The equation (3) to be obtained is as follows. Here, the origin is the window reference to be focused on.

なお、このようなサブピクセル精度の位置ズレ確認を少なくとも一か所にて行うが、数か所で行うことが望ましい。   Note that although such positional deviation confirmation with sub-pixel accuracy is performed in at least one place, it is desirable to be performed in several places.

そして、出力画像判定部114は、処理実行条件を満たすか否かの判定結果を制御部109に出力する。   Then, the output image determination unit 114 outputs, to the control unit 109, the determination result as to whether or not the process execution condition is satisfied.

(8−9−2)複数枚の出力対象画像データを用いた高解像度補正
次に、画像形成装置200における高解像度補正部225の処理について説明する。高解像度補正部225は、携帯端末装置100から受信したデータセットに含まれる複数の出力対象画像データに基づいて高解像度補正を行う。
(8-9-2) High Resolution Correction Using Plural Output Target Image Data Next, processing of the high resolution correction unit 225 in the image forming apparatus 200 will be described. The high resolution correction unit 225 performs high resolution correction based on a plurality of output target image data included in the data set received from the mobile terminal device 100.

複数の画像データからの高解像度画像作成方法に関しては、映像情報メディア学会誌Vol.62、No.3、pp.337〜342(2008)にいくつかの方法が紹介されている。一般的には、高解像度補正は、複数の画像の位置合わせ処理と再構成処理により成立する。本実施形態では、位置合わせ処理の例として、上記(8−9−1)記載の正規化相関パターマッチングの方法を適用する。すなわち、上記S(x,y)が極大値を示すズレ量だけずらすことにより、複数の画像の位置合わせを行うことができる。   Several methods have been introduced in the Journal of the Institute of Image Information and Television Engineers Vol. 62, No. 3, pp. 337 to 342 (2008) as a method of creating a high resolution image from a plurality of image data. In general, high resolution correction is achieved by alignment processing and reconstruction processing of a plurality of images. In this embodiment, the method of normalized correlation pattern matching described in the above (8-9-1) is applied as an example of alignment processing. That is, alignment of a plurality of images can be performed by shifting the above S (x, y) by the shift amount indicating the maximum value.

次に、高解像度補正部225は、再構成処理を行う。すなわち、高解像度補正部225は、解像度変換後の倍率に応じた画素数を有する再構成画像データを作成する。ただし、画像サイズは、撮像画像のサイズと同一とする。そして、高解像度補正部225は、再構成画像データの各画素の画素値を以下のようにして決定する。すなわち、高解像度補正部225は、再構成画像データにおける各画素(再構成画素)について、当該再構成画素の近傍となる撮像画像の画素(撮像画素)を複数の撮像画像の中から決定し、一般的な補間方法(線形補間やバイキュービック補間など)で補間を行う。   Next, the high resolution correction unit 225 performs reconstruction processing. That is, the high resolution correction unit 225 creates reconstructed image data having the number of pixels corresponding to the magnification after resolution conversion. However, the image size is the same as the size of the captured image. Then, the high resolution correction unit 225 determines the pixel value of each pixel of the reconstructed image data as follows. That is, the high resolution correction unit 225 determines, for each pixel (reconstruction pixel) in the reconstruction image data, a pixel (imaging pixel) of a pickup image which is in the vicinity of the reconstruction pixel from among a plurality of pickup images. Interpolation is performed by a general interpolation method (linear interpolation, bicubic interpolation, etc.).

具体的には、図36に示されるように、着目する再構成画素近傍の撮像画素、例えば撮像画素の格子を結ぶ線(図の点線)が最も近距離である2点を横方向・縦方向のそれぞれで選択する。ここでは、横方向での最も近距離である2点は、1つ目の出力対象画像データの撮像画素1−2(画素値:Vi1−2:以下同様)および撮像画素1−4であり、縦方向での最も近距離である2点は、2つ目の出力対象画像データの撮像画素2−1および撮像画素2−2であったとする。なお、再構成画素近傍の撮像画素を選択する際には、上記幾何学的歪みの補正・レンズ歪みの補正が実行された複数の出力対象画像データの中から選択するものとする。これにより、幾何学的歪み・レンズ歪みの補正がされた状態で高解像度補正を行うことができる。   Specifically, as shown in FIG. 36, the imaging pixel in the vicinity of the reconstruction pixel to be focused on, for example, two points at which the line connecting the lattice of imaging pixels (dotted line in the figure) is closest to the horizontal and vertical directions Select in each of. Here, the two closest points in the horizontal direction are the imaging pixel 1-2 (pixel value: Vi1-2: the same applies hereinafter) and the imaging pixel 1-4 of the first output target image data, It is assumed that the two closest points in the vertical direction are the imaging pixel 2-1 and the imaging pixel 2-2 of the second output target image data. In addition, when selecting an imaging pixel in the vicinity of the reconstruction pixel, it is selected from among a plurality of output target image data on which the correction of the geometric distortion and the correction of the lens distortion are performed. Thereby, high resolution correction can be performed in a state in which geometric distortion and lens distortion are corrected.

なお、補正後の座標の値を計算する際に、基となる複数の撮像画像の該当する幾何学補正・レンズ歪みの補正を考慮した座標の値を基に求めてもよい。つまり、幾何学補正・レンズ歪みの補正値のみ算出し、再構成処理を行った後に、当該補正値により座標変換を行ってよい。   In addition, when calculating the value of the coordinate after correction | amendment, you may obtain | require based on the value of the coordinate which considered correction | amendment of applicable geometric correction and lens distortion of several captured images used as a base. That is, only the correction value of the geometric correction and the lens distortion may be calculated, and after performing the reconstruction processing, coordinate conversion may be performed using the correction value.

そして、横方向および縦方向のそれぞれについて選択した2点を結ぶ線分に垂直であり、かつ着目する再構成画素の点を含む直線と当該線分との交点を求める。図36に示されるように、当該交点が2つの線分のそれぞれについてt:1−t、u:1−uで内分している場合、高解像度補正部は、着目する再構成画素の画素値Vsを下記式4に基づいて求めればよい。この場合は、線形補間を行ったことになる。そして、全ての再構成画素について同様にして画素値を求め、高解像度化された再構成画像データを高解像度画像データとして生成することができる。   Then, an intersection point of a straight line that is perpendicular to the line connecting the two points selected in each of the horizontal direction and the vertical direction and that includes the point of the reconstructed pixel of interest and the line is obtained. As shown in FIG. 36, when the intersection is internally divided at t: 1-t and u: 1-u for each of two line segments, the high resolution correction unit determines the pixel of the focused reconstruction pixel The value Vs may be obtained based on the following formula 4. In this case, linear interpolation is performed. Then, it is possible to obtain pixel values in the same manner for all reconstructed pixels, and to generate reconstructed image data with high resolution as high-resolution image data.

なお、補間方法として別の手法を用いても良い。また、映像情報メディア学会誌Vol.62、No.3、pp.337〜342(2008)に紹介されている別の方法を用いてもよい。例えば、MAP(Maximum A Posteriori)法のような、先ず推定に基づく事後確率に対応する評価関数を最小化することで求める手法を用いても良い。   Note that another method may be used as the interpolation method. Also, another method introduced in the Journal of the Institute of Image Information and Television Engineers Vol. 62, No. 3, pp. 337 to 342 (2008) may be used. For example, a method such as MAP (Maximum A Posteriori) method may be used which first obtains the evaluation function corresponding to the posterior probability based on the estimation by minimizing.

(8−9−3)撮像部について
上記の説明では、撮像部101が連続して複数回撮像するときの手ぶれによって、複数の撮像画像にズレが生じることを利用する形態とした。しかしながら、これに限らず、撮像部101は、連続して複数回撮像するときに、撮像素子(CCD・CMOS)またはレンズを微小にずらしてもよい。これにより、複数の撮像画像間においてズレが確実に生じることになる。
(8-9-3) Imaging Unit In the above description, it is assumed that a shift occurs in a plurality of captured images due to camera shake when the imaging unit 101 continuously performs imaging a plurality of times. However, the present invention is not limited to this, and the imaging unit 101 may slightly shift the imaging device (CCD / CMOS) or the lens when performing imaging a plurality of times in succession. As a result, a shift is reliably generated between a plurality of captured images.

(8−10)携帯端末装置から画像形成装置への画像データの送信タイミングについて
上記の説明では、文書撮像モードにより蓄積された出力対象画像データを携帯端末装置100で蓄積しておき、送信指示が入力されたタイミングで、それまでに蓄積された出力対象画像データをまとめて送信するものとした。しかしながら、携帯端末装置100から出力対象画像データを画像形成装置200に送信するタイミングはこれに限定されない。
(8-10) Transmission Timing of Image Data from Mobile Terminal Device to Image Forming Device In the above description, the output target image data stored in the document imaging mode is stored in the mobile terminal device 100, and the transmission instruction is At the input timing, the output target image data accumulated so far is collectively transmitted. However, the timing at which the output target image data is transmitted from the portable terminal device 100 to the image forming device 200 is not limited to this.

例えば、文書撮像モードで出力対象画像データを記憶部108に格納するたびに出力対象画像データを画像形成装置200に送信してもよい。この場合、ユーザは、画像形成装置200の近傍にいない場合がほとんどである。そのため、携帯端末装置100の通信部104は、携帯電話網およびインターネット網を介して、出力対象画像データを画像形成装置200に送信すればよい。   For example, the output target image data may be transmitted to the image forming apparatus 200 each time the output target image data is stored in the storage unit 108 in the document imaging mode. In this case, in most cases, the user is not near the image forming apparatus 200. Therefore, the communication unit 104 of the mobile terminal device 100 may transmit the output target image data to the image forming apparatus 200 via the mobile phone network and the Internet network.

(8−11)出力処理情報について
上記の説明では、出力処理情報を携帯端末装置100が取得し、画像形成装置200に送信するものとした。しかしながら、これに限らず、画像形成装置200がユーザ認証のためにユーザ情報を取得する際に、出力処理情報(出力処理の種類、出力処理のための設定条件を示す情報)を取得してもよい。
(8-11) Output Processing Information In the above description, it is assumed that the portable terminal device 100 acquires the output processing information and transmits the output processing information to the image forming device 200. However, the present invention is not limited to this. Even when the image forming apparatus 200 acquires user information for user authentication, even if output processing information (information indicating the type of output processing and setting conditions for output processing) is acquired Good.

(8−12)出力処理について
画像形成装置200において、制御部212は、ファイリング処理やメール送信処理を行う前に、画像処理部202によって生成された高解像度画像データを高圧縮PDFに変換してもよい。なお、高圧縮PDFデータとは、画像データの中の背景部分と文字分とを分離し、ぞれぞれの部分に最適な圧縮処理を行ったPDFデータである。これにより、文字判読性が良好で、画像ファイルサイズも低減させることができる。
(8-12) Output Process In the image forming apparatus 200, the control unit 212 converts the high resolution image data generated by the image processing unit 202 into a high compression PDF before performing the filing process or the mail transmission process. It is also good. The high compression PDF data is PDF data in which the background portion and the character portion in the image data are separated, and the compression processing is optimally performed on each portion. As a result, character legibility is good and the image file size can be reduced.

また、制御部212は、ファイリング処理やメール送信処理を行う前に、画像処理部202によって生成された高解像度画像データに対してOCR処理を実行し、テキストデータを生成してもよい。そして、制御部212は、高解像度画像データをPDFに変換し、生成したテキストデータを透明テキストとして付加してもよい。なお、透明テキストとは、認識された文字をテキスト情報として見掛け上は見えない形で画像データに重ね合わせる(あるいは埋め込む)ためのデータである。例えば、PDFファイルでは、画像データに透明テキストを付加した画像ファイルが一般に使用されている。そして、制御部212は、生成した透明テキスト付きPDFデータを出力させてもよい。これにより、テキスト検索可能なファイルのように活用しやすい電子化文書を出力することができる。   In addition, the control unit 212 may perform OCR processing on the high resolution image data generated by the image processing unit 202 to generate text data, before performing the filing processing or the mail transmission processing. Then, the control unit 212 may convert the high resolution image data into a PDF, and add the generated text data as a transparent text. Transparent text is data for superimposing (or embedding) recognized characters as text information on image data in a form that can not be seen in appearance. For example, in PDF files, image files in which transparent text is added to image data are generally used. Then, the control unit 212 may output the generated transparent text-added PDF data. This makes it possible to output an electronic document that is easy to use like a text searchable file.

(8−13)画像形成装置が備える画像処理部について
上記の説明では、画像形成装置200が備える画像処理部202が高解像度補正などを行うものとして説明した。しかしながら、画像形成装置200は、高解像度出力用データセットに対する高解像度補正やその他の画像処理(幾何学的歪みの補正、レンズ歪みの補正、コントラスト補正、カラーバランス補正など)を、上記画像処理部202を備えたサーバに実行させてもよい。なお、この場合、当該サーバが、携帯端末装置100から受信した高解像度出力用データセットに対して高解像度補正を行い、補正後の高解像度画像データを出力する画像形成装置であるといえる。
(8-13) Regarding Image Processing Unit Included in Image Forming Apparatus In the above description, it has been described that the image processing unit 202 included in the image forming apparatus 200 performs high resolution correction and the like. However, the image forming apparatus 200 performs high resolution correction and other image processing (higher resolution output data set, etc.) on the high resolution output data set (correction of geometrical distortion, correction of lens distortion, contrast correction, color balance correction, etc.) It may be executed by a server provided with 202. In this case, it can be said that the server is an image forming apparatus that performs high resolution correction on the high resolution output data set received from the mobile terminal device 100 and outputs the corrected high resolution image data.

(9)プログラムおよび記録媒体
本発明はコンピュータに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体に、上記した携帯端末装置100で撮像した画像を画像形成装置200に送信し画像形成装置200より出力する方法を記録するものとすることもできる。
(9) Program and Recording Medium The present invention transmits an image captured by the portable terminal device 100 described above to the image forming apparatus 200 on a computer readable recording medium storing a program to be executed by a computer. It is also possible to record the method of more output.

この結果、上記処理を行うプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)を記録した記録媒体を持ち運び自在に提供することができる。
なお、本実施の形態では、この記録媒体としては、マイクロコンピュータで処理が行われるために図示していないメモリ、例えばROMのようなもの、そのものがプログラムメディアであっても良いし、また、図示していないが外部記憶装置としてプログラム読み取り装置が設けられ、そこに記録媒体を挿入することで読み取り可能なプログラムメディアであっても良い。
As a result, it is possible to provide a recording medium in which the program code (the executable program, the intermediate code program, the source program) for performing the above processing is recorded in a portable manner.
In this embodiment, as the recording medium, a memory (not shown) such as a ROM, which is not shown because the processing is performed by a microcomputer, may be a program medium itself, or a figure. Although not shown, a program reader may be provided as an external storage device, and it may be a program medium readable by inserting a recording medium therein.

いずれの場合においても、格納されているプログラムはマイクロプロセッサがアクセスして実行させる構成であっても良いし、あるいは、いずれの場合もプログラムコードを読み出し、読み出されたプログラムコードは、マイクロコンピュータの図示されていないプログラム記憶エリアにダウンロードされて、そのプログラムが実行される方式であってもよい。このダウンロード用のプログラムは予め本体装置に格納されているものとする。
ここで、上記プログラムメディアは、本体と分離可能に構成される一時的でない有形の媒体(non-transitory tangible medium)であり、磁気テープやカセットテープ等のテープ系、フレキシブルディスクやハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVDなどの光ディスクのディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM、EPROM(Erasable Programmable Read Only Memory)、EEPROM(登録商標)(Electrically Erasable Programmable Read Only Memory)、フラッシュROM等による半導体メモリを含めた固定的にプログラムコードを担持する媒体であっても良い。
In any case, the stored program may be configured to be accessed and executed by the microprocessor, or in any case, the program code may be read and the read program code may be read from the microcomputer. It may be downloaded to a program storage area not shown, and the program may be executed. The download program is stored in advance in the main device.
Here, the program medium is a non-transitory tangible medium configured to be separable from the main body, and is a tape system such as a magnetic tape or a cassette tape, or a magnetic disk such as a flexible disk or a hard disk. Disc system of optical disc such as CD-ROM / MO / MD / DVD, card system such as IC card (including memory card) / optical card, or mask ROM, erasable programmable read only memory (EPROM), EEPROM (registered trademark) (Electrically Erasable Programmable Read Only Memory), a medium that fixedly carries a program code including a semiconductor memory such as a flash ROM.

また、本実施の形態においては、インターネットを含む通信ネットワークを接続可能なシステム構成であることから、通信ネットワークからプログラムコードをダウンロードするように流動的にプログラムコードを担持する媒体であっても良い。なお、このように通信ネットワークからプログラムをダウンロードする場合には、そのダウンロード用のプログラムは予め本体装置に格納しておくか、あるいは別な記録媒体からインストールされるものであっても良い。なお、本発明は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。   Further, in the present embodiment, since it is a system configuration capable of connecting a communication network including the Internet, it may be a medium that carries program code in a fluid manner so as to download program code from the communication network. When the program is downloaded from the communication network as described above, the program for download may be stored in advance in the main device or may be installed from another recording medium. The present invention can also be realized in the form of a computer data signal embedded in a carrier wave, in which the program code is embodied by electronic transmission.

上記記録媒体は、携帯端末装置100や画像形成装置200に備えられるプログラム読み取り装置により読み取られることで上述した画像処理方法が実行される。   The above-described image processing method is executed when the recording medium is read by a program reading device provided in the mobile terminal device 100 or the image forming device 200.

本発明は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能である。すなわち、請求項に示した範囲で適宜変更した技術的手段を組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。   The present invention is not limited to the embodiments described above, and various modifications are possible within the scope of the claims. That is, an embodiment obtained by combining technical means appropriately modified within the scope of the claims is also included in the technical scope of the present invention.

本発明は、携帯端末装置と画像形成装置や画像表示装置との間でデータ通信を行う撮像画像処理システムに適用することができる。   The present invention can be applied to a captured image processing system that performs data communication between a portable terminal device and an image forming device or an image display device.

10 シャッタボタン
100 携帯端末装置(撮像装置)
101 撮像部
105 表示部
108 記憶部
109 制御部
110 撮像範囲判定部
111 幾何学的配置検出部(検出部)
112 表示処理部
113 出力対象画像決定部
114 切替部
200 画像形成装置(画像出力装置)
300 画像表示装置
10 Shutter Button 100 Mobile Terminal Device (Imaging Device)
101 Imaging unit 105 Display unit 108 Storage unit 109 Control unit 110 Imaging range determination unit 111 Geometric arrangement detection unit (detection unit)
112 display processing unit 113 output target image determination unit 114 switching unit 200 image forming apparatus (image output apparatus)
300 image display device

Claims (12)

対象物を撮像した撮像画像を表示する表示手段を備える画像処理装置において、
上記対象物が矩形であり、
上記撮像画像は、出力対象画像が決定される前に上記表示手段に表示される第1撮像画像および当該出力対象画像として決定された第2撮像画像を含み、
上記出力対象画像が決定される前に、上記第1撮像画像の上記対象物の範囲を所定の矩形状に幾何学補正した第1補正処理後画像を上記表示手段に表示させ、上記出力対象画像が決定された後に、上記第2撮像画像の上記対象物の範囲を所定の矩形状に幾何学補正した第2補正処理後画像を上記表示手段に表示させる表示処理部を備えることを特徴とする画像処理装置。
In an image processing apparatus including display means for displaying a captured image obtained by capturing an object.
The above object is rectangular,
The captured image includes a first captured image displayed on the display unit before the output target image is determined, and a second captured image determined as the output target image.
Before the output target image is determined, the display means displays the first correction processed image obtained by geometrically correcting the range of the target object of the first captured image into a predetermined rectangular shape, and the output target image And a display processing unit for displaying on the display means an image after second correction processing in which a range of the object of the second captured image is geometrically corrected to a predetermined rectangular shape. Image processing device.
上記表示処理部は、上記第1撮像画像と上記第1補正処理後画像とを同一画面内に表示させ、上記第2撮像画像と上記第2補正処理後画像とを同一画面内に表示させる、請求項1に記載の画像処理装置。   The display processing unit displays the first captured image and the image after the first correction processing in the same screen, and displays the second captured image and the image after the second correction processing in the same screen. The image processing apparatus according to claim 1. 上記撮像画像において、線分状に連なるエッジ画素群を検出する検出部をさらに備え、
上記表示処理部が、上記検出部により検出された上記エッジ画素群の上に、上記検出部により検出された4つのエッジ画素群で示される4つの線分の各々に対応する直線で囲まれる上記対象物の輪郭を示す四角形の輪郭線を、上記撮像画像に重ねて表示させることを特徴とする請求項1または2に記載の画像処理装置。
The image pickup apparatus further includes a detection unit that detects an edge pixel group connected in a line segment shape in the captured image,
The display processing unit is surrounded by a straight line corresponding to each of four line segments indicated by the four edge pixel groups detected by the detection unit, on the edge pixel group detected by the detection unit. The image processing apparatus according to claim 1, wherein a quadrangular outline indicating the outline of the object is displayed superimposed on the captured image.
上記表示処理部が、上記輪郭線の頂点の座標を編集する指示を受け付け、編集された頂点の座標を結ぶ上記輪郭線で囲まれる領域の画像を基に上記第1補正処理後画像および上記第2補正処理後画像を生成することを特徴とする請求項3に記載の画像処理装置。   The display processing unit receives an instruction to edit the coordinates of the vertex of the outline, and the first corrected image and the first correction process based on an image of a region surrounded by the outline connecting the coordinates of the edited vertex. The image processing apparatus according to claim 3, wherein an image after 2 correction processing is generated. 上記表示処理部による上記輪郭線の表示機能を有効にするか無効にするかを切り替える切替部を備えていることを特徴とする請求項3または4に記載の画像処理装置。   5. The image processing apparatus according to claim 3, further comprising: a switching unit that switches whether the display processing unit makes the display function of the contour line valid or invalid. 上記表示処理部は、上記切替部が上記輪郭線の表示機能を有効に設定している場合、上記第1補正処理後画像および上記第2補正処理後画像を上記表示手段に表示させることを特徴とする請求項5に記載の画像処理装置。   The display processing unit is characterized by causing the display unit to display the image after the first correction processing and the image after the second correction processing when the switching unit sets the display function of the contour line to be effective. The image processing apparatus according to claim 5, wherein 対象物を撮像した撮像画像を表示する表示手段を備え、上記対象物が矩形状であり、上記撮像画像は、出力対象画像が決定される前に上記表示手段に表示される第1撮像画像および当該出力対象画像として決定された第2撮像画像を含む画像処理装置の画像処理方法であって、
(a)上記出力対象画像が決定される前に、上記第1撮像画像の上記対象物の範囲を所定の矩形状に幾何学補正した第1補正処理後画像を上記表示手段に表示させ、上記出力対象画像が決定された後に、上記第2撮像画像の上記対象物の範囲を所定の矩形状に幾何学補正した第2補正処理後画像を上記表示手段に表示させるステップを有する、画像処理方法。
And a display unit configured to display a captured image obtained by capturing an object, wherein the target is rectangular, and the captured image is a first captured image displayed on the display unit before the output target image is determined; An image processing method of an image processing apparatus including a second captured image determined as the output target image, the image processing method comprising:
(A) Before the output target image is determined, a first corrected image is displayed on the display means by geometrically correcting the range of the object of the first captured image into a predetermined rectangular shape, An image processing method comprising the step of displaying on the display means an image after second correction processing in which the range of the object of the second captured image is geometrically corrected to a predetermined rectangular shape after the output target image is determined .
上記ステップ(a)で、上記第1撮像画像と上記第1補正処理後画像とを同一画面内に表示させ、上記第2撮像画像と上記第2補正処理後画像とを同一画面内に表示させる、請求項7に記載の画像処理方法。   In the step (a), the first captured image and the image after the first correction processing are displayed in the same screen, and the second captured image and the image after the second correction processing are displayed in the same screen. The image processing method according to claim 7. 上記撮像画像において、線分状に連なるエッジ画素群を検出するステップ(b)をさらに有し、
上記ステップ(a)で、上記ステップ(b)で検出された上記エッジ画素群の上に、上記ステップ(b)で検出された4つのエッジ画素群で示される4つの線分の各々に対応する直線で囲まれる上記対象物の輪郭を示す四角形の輪郭線を、上記撮像画像に重ねて表示させる、請求項7または8に記載の画像処理方法。
The method further includes the step (b) of detecting a group of edge pixels connected in a line segment in the captured image.
In the step (a), on the edge pixel group detected in the step (b), corresponding to each of the four line segments indicated by the four edge pixel groups detected in the step (b) The image processing method according to claim 7, wherein a quadrilateral outline indicating the outline of the object surrounded by a straight line is displayed superimposed on the captured image.
上記ステップ(a)で、上記輪郭線の頂点の座標を編集する指示を受け付け、編集された頂点の座標を結ぶ上記輪郭線で囲まれる領域の画像を基に上記第1補正処理後画像および上記第2補正処理後画像を生成する、請求項9に記載の画像処理方法。   In the step (a), an instruction to edit the coordinates of the vertex of the outline is received, and the image after the first correction processing and the image based on the image of the region surrounded by the outline connecting the coordinates of the edited vertex The image processing method according to claim 9, wherein an image after second correction processing is generated. 上記ステップ(a)における上記輪郭線の表示機能を有効にするか無効にするかを切り替えるステップ(c)をさらに有する、請求項9または10に記載の画像処理方法。   The image processing method according to claim 9, further comprising: (c) switching whether to enable or disable the display function of the outline in the step (a). 上記ステップ(a)で、上記ステップ(c)で上記輪郭線の表示機能を有効に設定している場合、上記第1補正処理後画像および上記第2補正処理後画像を上記表示手段に表示させる、請求項11に記載の画像処理方法。   In the step (a), when the display function of the outline is set to be effective in the step (c), the image after the first correction processing and the image after the second correction processing are displayed on the display means The image processing method according to claim 11.
JP2017208375A 2012-01-17 2017-10-27 Image processing apparatus and image processing method Active JP6426815B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2012007558 2012-01-17
JP2012007558 2012-01-17

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2016112497A Division JP2016167311A (en) 2012-01-17 2016-06-06 Image processing apparatus and image processing method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2018201092A Division JP2019040617A (en) 2012-01-17 2018-10-25 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2018042273A JP2018042273A (en) 2018-03-15
JP6426815B2 true JP6426815B2 (en) 2018-11-21

Family

ID=56898560

Family Applications (3)

Application Number Title Priority Date Filing Date
JP2016112497A Pending JP2016167311A (en) 2012-01-17 2016-06-06 Image processing apparatus and image processing method
JP2017208375A Active JP6426815B2 (en) 2012-01-17 2017-10-27 Image processing apparatus and image processing method
JP2018201092A Pending JP2019040617A (en) 2012-01-17 2018-10-25 Image processing apparatus and image processing method

Family Applications Before (1)

Application Number Title Priority Date Filing Date
JP2016112497A Pending JP2016167311A (en) 2012-01-17 2016-06-06 Image processing apparatus and image processing method

Family Applications After (1)

Application Number Title Priority Date Filing Date
JP2018201092A Pending JP2019040617A (en) 2012-01-17 2018-10-25 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (3) JP2016167311A (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6971788B2 (en) * 2017-11-09 2021-11-24 シャープ株式会社 Screen display control method and screen display control system
JP7311832B2 (en) * 2018-12-27 2023-07-20 ブラザー工業株式会社 Image processing device, reading device and computer program
JP2020135776A (en) * 2019-02-26 2020-08-31 プラス株式会社 Imaging device
JP2022126533A (en) * 2021-02-18 2022-08-30 株式会社アマダ Material management system
JPWO2023073972A1 (en) * 2021-10-29 2023-05-04
CN117197073B (en) * 2023-09-07 2024-03-05 石家庄铁道大学 Rectangular object automatic counting method based on machine vision

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3800661B2 (en) * 1996-04-23 2006-07-26 コニカミノルタフォトイメージング株式会社 Digital camera
JPH114353A (en) * 1997-06-13 1999-01-06 Canon Inc Image processing method and system
JP4363151B2 (en) * 2003-10-14 2009-11-11 カシオ計算機株式会社 Imaging apparatus, image processing method thereof, and program
JP4232682B2 (en) * 2004-04-26 2009-03-04 カシオ計算機株式会社 Electronic camera and program
JP4548144B2 (en) * 2005-02-23 2010-09-22 カシオ計算機株式会社 Digital camera device and through image display method
JP4529837B2 (en) * 2005-08-04 2010-08-25 カシオ計算機株式会社 Imaging apparatus, image correction method, and program
JP4662258B2 (en) * 2005-08-31 2011-03-30 株式会社リコー Image processing method and apparatus, digital camera apparatus, and recording medium recording image processing program
US8577118B2 (en) * 2008-01-18 2013-11-05 Mitek Systems Systems for mobile image capture and remittance processing
JP4856263B2 (en) * 2009-08-07 2012-01-18 シャープ株式会社 Captured image processing system, image output method, program, and recording medium
JP4630936B1 (en) * 2009-10-28 2011-02-09 シャープ株式会社 Image processing apparatus, image processing method, image processing program, and recording medium recording image processing program

Also Published As

Publication number Publication date
JP2019040617A (en) 2019-03-14
JP2016167311A (en) 2016-09-15
JP2018042273A (en) 2018-03-15

Similar Documents

Publication Publication Date Title
JP5951367B2 (en) Imaging apparatus, captured image processing system, program, and recording medium
JP6426815B2 (en) Image processing apparatus and image processing method
JP4856263B2 (en) Captured image processing system, image output method, program, and recording medium
JP5026484B2 (en) Portable terminal device, image output device, captured image processing system, control method for portable terminal device, image output method, program, and recording medium
JP5547243B2 (en) Image processing apparatus, program, and recording medium
JP4772894B2 (en) Image output device, portable terminal device, captured image processing system, image output method, program, and recording medium
JP4772889B2 (en) Portable terminal device, captured image processing system, program, and recording medium
JP4758493B2 (en) Portable terminal device, captured image processing system, control method for portable terminal device, program, and recording medium
JP2006074512A (en) Photographing device, and image processing method, and program for photographing device
CN101151639A (en) Image processing apparatus and image processing method
JP4501701B2 (en) Image capturing apparatus, image processing method for image capturing apparatus, and program
KR102038741B1 (en) Image processing apparatus, image processing method, and storage medium
JP2005275447A (en) Image processing device, image processing method and program
JP2005260657A (en) Photographing apparatus, image processing method and program therefor
JP4182937B2 (en) Image capturing apparatus, image processing method for image capturing apparatus, and program
JP4600019B2 (en) Imaging apparatus, image processing method, and program
JP3582988B2 (en) Non-contact image reader
JP5819378B2 (en) Image determination apparatus, image processing system, program, and recording medium
JP4591343B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP2010273218A (en) Image output device, captured image processing system, image output method, program and recording medium
JP4225226B2 (en) Imaging apparatus, imaging control method for imaging apparatus, and program
JP2007214857A (en) Photographing device, and photographed image processing method, and program
JP2004318896A (en) Non-contact image reading apparatus

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180627

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180703

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20181002

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181025

R150 Certificate of patent or registration of utility model

Ref document number: 6426815

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150