JP2017163464A - Image correction device, image correction method, and program - Google Patents

Image correction device, image correction method, and program Download PDF

Info

Publication number
JP2017163464A
JP2017163464A JP2016048169A JP2016048169A JP2017163464A JP 2017163464 A JP2017163464 A JP 2017163464A JP 2016048169 A JP2016048169 A JP 2016048169A JP 2016048169 A JP2016048169 A JP 2016048169A JP 2017163464 A JP2017163464 A JP 2017163464A
Authority
JP
Japan
Prior art keywords
image
shape
mesh image
page
mesh
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.)
Withdrawn
Application number
JP2016048169A
Other languages
Japanese (ja)
Inventor
亮 二村
Akira Nimura
亮 二村
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2016048169A priority Critical patent/JP2017163464A/en
Publication of JP2017163464A publication Critical patent/JP2017163464A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To automatically switch and execute inflection correction and rectangle correction according to how a page image is distorted without deteriorating usability.SOLUTION: A CPU 77 performs superimposed display of a page image and a mesh image to a display section having a display function and a touch input function, stretches and contracts, rotates, transfers, or deforms the mesh image in response to a touch operation to the display section by a user, performs inflection correction processing when a shape of the mesh image is inflected after edition subjected to stretch and contraction, rotation, transfer, or deformation, selects rectangle correction processing when the shape of the mesh image is a rectangular shape, selects trapezoidal correction processing when the shape of the mesh image is a trapezoidal shape, and corrects the shape of the page image according to the selected distortion correction processing.SELECTED DRAWING: Figure 9

Description

本発明は、画像補正装置、画像補正方法、及びプログラムに関する。   The present invention relates to an image correction apparatus, an image correction method, and a program.

従来、本を裁断することなく、そのままの状態で頁を捲りながらカメラで撮影して電子化する技術が提案されている。本を自然な状態で開いて上部から撮影すると、本の頁の撓(たわ)みにより、画像中の文字列や図表が歪み、画像中の文字列や図表を読解することが難しい。   2. Description of the Related Art Conventionally, a technique has been proposed in which a book is photographed with a camera while turning the page as it is without being cut, and digitized. When a book is opened in a natural state and photographed from above, the character strings and diagrams in the image are distorted due to the bending of the pages of the book, and it is difficult to read the character strings and diagrams in the image.

そこで、例えば、特許文献1では、画像処理を行うアプリケーションが、歪んだ頁画像の上にメッシュ画像を表示し、紙面の湾曲具合に合わせるようにメッシュ画像を操作し、当該メッシュ画像に基づいて頁画像の歪みを補正する湾曲補正が提案されている。また、特許文献2では、頁画像を複数の領域に分割し、分割領域ごとに正しい形状(矩形)になるように頁画像の歪みを補正する矩形補正が提案されている。   Therefore, for example, in Patent Document 1, an application that performs image processing displays a mesh image on a distorted page image, manipulates the mesh image so as to match the curvature of the paper surface, and performs page processing based on the mesh image. Curve correction for correcting image distortion has been proposed. Further, Patent Document 2 proposes a rectangular correction that divides a page image into a plurality of regions and corrects the distortion of the page image so that each divided region has a correct shape (rectangular shape).

特開2014−192901号公報JP 2014-192901 A 特開2015−119431号公報JP-A-2015-119431

しかしながら、上述した特許文献1、2による補正方法では、ユーザの操作方法が異なり、矩形補正では直線を直線のまま移動させてトリミング領域を調整するのに対して、湾曲補正では曲線に関係する点を移動させて曲線の形を変化させてトリミング領域を調整する。このように、それぞれの操作方法が異なるため、双方の補正方法を採用した場合に非常に使い勝手が悪くなるという問題があった。   However, in the correction methods according to Patent Documents 1 and 2 described above, the user's operation method is different, and in the rectangular correction, the straight line is moved as a straight line and the trimming area is adjusted, whereas in the curvature correction, the correction is related to the curve To adjust the trimming area by changing the shape of the curve. As described above, since the respective operation methods are different, there is a problem that the usability is extremely deteriorated when both the correction methods are employed.

また、ユーザは、湾曲補正を行うか、矩形補正を行うかを、本ごとに選択することになる。すなわち、1つの本を電子化する際に、この頁は湾曲補正で残りは矩形補正などと区別することができない。湾曲補正に比べて矩形補正は、処理が簡単で短い時間で処理を実現することができる。また、湾曲補正の方が矩形補正に比べて高精度である。このため、一部でも精度の良い湾曲補正を選択すると、残りの頁は精度を求めていなくとも、1つの本に対して長い処理時間がかかってしまうという問題がある。   In addition, the user selects for each book whether to perform curvature correction or rectangular correction. That is, when one book is digitized, this page cannot be distinguished from curvature correction and the rest as rectangular correction. Compared to curvature correction, rectangular correction is simpler and can be realized in a shorter time. Also, the curvature correction is more accurate than the rectangle correction. For this reason, there is a problem that if even a part of the curved correction is selected with high accuracy, it takes a long processing time for one book even if accuracy is not required for the remaining pages.

逆に、短時間で処理したいがために、一部に矩形補正を選択すると、他の部分で湾曲補正が必要とするような歪みの大きい頁があったとしても、精度が低いために十分に歪みを取り除くことができないという問題がある。当然、頁毎に補正方法を切り替えることも可能であるが、そのためにはユーザが頁ごとに補正方法を一つ一つ選び、異なる操作方法を実行する必要があり、ユーザの利便性(ユーザビリティ)を損なってしまう。   On the other hand, if you want to process in a short time and select rectangular correction for some parts, even if there is a page with large distortion that requires curvature correction in other parts, it is sufficient because the accuracy is low. There is a problem that distortion cannot be removed. Of course, it is possible to switch the correction method for each page, but for that purpose, the user needs to select a correction method for each page and execute different operation methods. Will be damaged.

そこで本発明は、ユーザの利便性を損なうことなく、頁画像の歪み方に対応する歪み補正処理を選択的に切り替えて実行することを目的とする。   SUMMARY OF THE INVENTION An object of the present invention is to selectively switch and execute a distortion correction process corresponding to a distortion method of a page image without impairing user convenience.

この発明に係る頁画像補正装置は、表示機能及びタッチ入力機能を有する入力表示部に、処理対象の画像とメッシュ画像とを重畳表示する表示制御手段と、前記入力表示部へのユーザによるタッチ操作を検出する検出手段と、前記検出手段によって検出されたタッチ操作に応じて、前記メッシュ画像を伸縮、回転、移動、又はその形状を変形する編集手段と、前記編集手段による編集後のメッシュ画像の形状に基づいて、複数の歪み補正処理のうち1つの歪み補正処理を選択する選択手段と、前記選択手段によって選択された歪み補正処理によって、前記処理対象の画像の形状を補正する補正手段と、を備えることを特徴とする。   The page image correction apparatus according to the present invention includes a display control unit that superimposes and displays an image to be processed and a mesh image on an input display unit having a display function and a touch input function, and a user's touch operation on the input display unit. Detecting means for detecting the image, editing means for expanding / contracting, rotating, moving or deforming the mesh image in accordance with the touch operation detected by the detecting means, and editing of the mesh image after editing by the editing means A selection unit that selects one distortion correction process among a plurality of distortion correction processes based on the shape; a correction unit that corrects the shape of the image to be processed by the distortion correction process selected by the selection unit; It is characterized by providing.

この発明に係る頁画像補正方法は、処理対象の画像に重畳して表示されているメッシュ画像の形状に基づいて、前記処理対象の画像の形状を補正する頁画像補正方法であって、前記処理対象の画像と前記メッシュ画像とを表示する入力表示部へのユーザによるタッチ操作を検出するステップと、前記検出されたタッチ操作に応じて、前記メッシュ画像を伸縮、回転、移動、又は変形させるステップと、前記伸縮、回転、移動、又は変形されたメッシュ画像の形状に基づいて、複数の歪み補正処理のうち1つの歪み補正処理を選択するステップと、前記選択された歪み補正処理によって、前記処理対象の画像の形状を補正するステップと、を含むことを特徴とする。   The page image correction method according to the present invention is a page image correction method for correcting the shape of the processing target image based on the shape of the mesh image displayed superimposed on the processing target image. Detecting a user's touch operation on an input display unit that displays the target image and the mesh image, and expanding / contracting, rotating, moving, or deforming the mesh image in accordance with the detected touch operation Selecting one distortion correction process among a plurality of distortion correction processes based on the shape of the mesh image that has been stretched, rotated, moved, or deformed, and the selected distortion correction process to perform the process. Correcting the shape of the target image.

この発明に係るプログラムは、処理対象の画像に重畳して表示されているメッシュ画像の形状に基づいて、前記処理対象の画像の形状を補正する頁画像補正装置のコンピュータを、表示機能及びタッチ入力機能を有する入力表示部に、前記処理対象の画像と前記メッシュ画像とを重畳表示する表示制御手段、前記入力表示部へのユーザによるタッチ操作を検出する検出手段、前記検出手段によって検出されたタッチ操作に応じて、前記メッシュ画像を伸縮、回転、移動、又はその形状を変形させる編集手段、前記編集手段による編集後のメッシュ画像の形状に基づいて、複数の歪み補正処理のうち1つの歪み補正処理を選択する選択手段、前記選択手段によって選択された歪み補正処理によって、前記処理対象の画像の形状を補正する補正手段、として機能させることを特徴とする。   The program according to the present invention provides a computer of a page image correction apparatus that corrects the shape of an image to be processed based on the shape of a mesh image displayed superimposed on the image to be processed, a display function and touch input. Display control means for superimposing and displaying the image to be processed and the mesh image on an input display section having a function, detection means for detecting a touch operation by the user to the input display section, touch detected by the detection means One of a plurality of distortion correction processes based on the shape of the mesh image edited by the editing means, an editing means for expanding / contracting, rotating, moving or deforming the mesh image according to an operation A selection means for selecting a process, and a correction method for correcting the shape of the image to be processed by the distortion correction process selected by the selection means. , Characterized in that to function as a.

この発明によれば、ユーザの利便性を損なうことなく、頁画像の歪み方に対応する歪み補正処理を選択的に切り替えて実行することができる。   According to the present invention, it is possible to selectively switch and execute the distortion correction processing corresponding to the distortion method of the page image without impairing the convenience for the user.

本実施形態の書画カメラシステム1の一例による概略構成を示す斜視図である。1 is a perspective view showing a schematic configuration according to an example of a document camera system 1 of the present embodiment. 本実施形態の書画カメラシステム1の他の例による概略構成を示す斜視図である。It is a perspective view which shows schematic structure by the other example of the document camera system 1 of this embodiment. 本実施形態による情報処理端末7の略構成を示すブロック図である。It is a block diagram which shows the schematic structure of the information processing terminal 7 by this embodiment. 矩形補正処理に対するユーザインターフェースの一例を説明するための概念図である。It is a conceptual diagram for demonstrating an example of the user interface with respect to a rectangle correction process. 湾曲補正処理に対するユーザインターフェースの一例を説明するための概念図である。It is a conceptual diagram for demonstrating an example of the user interface with respect to a curvature correction process. 矩形補正処理と湾曲補正処理の共通点を説明するための概念図である。It is a conceptual diagram for demonstrating the common point of a rectangle correction process and a curvature correction process. 5つの制御点80が一直線状であるが、等間隔でない場合のメッシュ画像9bの状態を示す模式図である。It is a schematic diagram showing a state of a mesh image 9b when five control points 80 are in a straight line but are not equally spaced. 本実施形態による情報処理端末7での補正処理を説明するためのフローチャートである。It is a flowchart for demonstrating the correction process in the information processing terminal 7 by this embodiment. 本実施形態による情報処理端末7での補正処理を説明するためのフローチャートである。It is a flowchart for demonstrating the correction process in the information processing terminal 7 by this embodiment. 本実施形態によるメッシュ画像9を変形するためのタッチ操作を説明するための模式図である。It is a schematic diagram for demonstrating the touch operation for deform | transforming the mesh image 9 by this embodiment. 本実施形態によるメッシュ画像9の制御点80を個別に操作して変形するためのタッチ操作を説明するための模式図である。It is a schematic diagram for demonstrating the touch operation for operating individually the control point 80 of the mesh image 9 by this embodiment, and deform | transforming. 本実施形態によるメッシュ画像9の制御点80を全て同時に操作して伸縮させるためのタッチ操作を説明するための模式図である。It is a schematic diagram for demonstrating the touch operation for operating all the control points 80 of the mesh image 9 by this embodiment, and expanding and contracting simultaneously. 本実施形態によるメッシュ画像9の制御点80を全て同時に操作して平行移動させるためのタッチ操作を説明するための模式図である。It is a schematic diagram for demonstrating the touch operation for operating all the control points 80 of the mesh image 9 by this embodiment simultaneously, and translating. 本実施形態によるメッシュ画像9の制御点80を全て同時に操作して回転させるためのタッチ操作を説明するための模式図である。It is a schematic diagram for demonstrating the touch operation for operating and rotating all the control points 80 of the mesh image 9 by this embodiment simultaneously. 本実施形態による、3本の指によるタッチ操作でメッシュ画像を回転させる場合の様子を示す模式図である。It is a schematic diagram which shows a mode in the case of rotating a mesh image by the touch operation with three fingers by this embodiment.

A.第1実施形態
以下に、本発明を実施するための最良の形態について図面を用いて説明する。ただし、以下に述べる実施形態には、本発明を実施するために技術的に好ましい種々の限定が付されているが、発明の範囲を以下の実施形態及び図示例に限定するものではない。
A. First Embodiment Hereinafter, the best mode for carrying out the present invention will be described with reference to the drawings. However, although various technically preferable limitations for implementing the present invention are given to the embodiments described below, the scope of the invention is not limited to the following embodiments and illustrated examples.

図1は、本実施形態の書画カメラシステム1の一例による概略構成を示す斜視図である。なお、以下の説明においては本Bの頁Pを左から右へとめくる場合について説明する。図1に示すように、書画カメラシステム1には、本Bの頁Pを撮像する撮像手段としての書画カメラ2と、本Bの頁Pをめくる頁めくり装置3と、書画カメラ2及び頁めくり装置3に通信自在に接続されたパソコン4とを備えている。   FIG. 1 is a perspective view showing a schematic configuration according to an example of a document camera system 1 of the present embodiment. In the following description, a case where the page P of the book B is turned from left to right will be described. As shown in FIG. 1, the document camera system 1 includes a document camera 2 as an imaging unit that images a page P of a book B, a page turning device 3 that turns the page P of a book B, a document camera 2, and a page turning. A personal computer 4 connected to the apparatus 3 for communication is provided.

書画カメラ2には、スタンド部21と、スタンド部21の上端に取り付けられたカメラ22とが設けられている。スタンド部21は本Bとカメラ22との相対的な位置関係を調整できるように、前後方向、左右方向に傾倒自在であるとともに、上下方向に伸縮自在となっている。カメラ22は、その画角内に本Bが収まるようにレンズが下方を向いている。カメラ22とスタンド部21との接合部には位置調整機構が設けられており、これによってカメラ22のレンズが向く方向も調整できるようになっている。   The document camera 2 is provided with a stand portion 21 and a camera 22 attached to the upper end of the stand portion 21. The stand unit 21 can be tilted in the front-rear direction and the left-right direction and can be expanded and contracted in the vertical direction so that the relative positional relationship between the book B and the camera 22 can be adjusted. The lens of the camera 22 faces downward so that the book B is within the angle of view. A position adjustment mechanism is provided at a joint portion between the camera 22 and the stand portion 21, so that the direction in which the lens of the camera 22 faces can be adjusted.

頁めくり装置3は、開かれた本Bを保持する保持台6と、保持台6上の本Bの頁Pのめくり元位置で頁Pを保持し、頁Pのめくり先位置で頁Pに対する保持を解除するめくり装置本体30を備えている。   The page turning device 3 holds the page P at the page turning source position of the page P of the book B on the holding table 6 and the holding table 6 that holds the opened book B, and the page P with respect to the page P at the page turning destination position. A turning device main body 30 for releasing the holding is provided.

保持台6は、図示しないヒンジにより折り畳み自在な一対の保持板61、62を備えている。ここで、本Bの頁Pが左から右へとめくられる場合は、一対の保持板61、62のうち、左側に配置された一方の保持板61が卓上に沿うように置かれ、右側に置かれる他方の保持板62が一方の保持板61に対して所定の角度で起き上がるように傾斜して卓上に置かれる。一方の保持板61上には、本Bのめくり元位置となる頁Pが置かれ、他方の保持板62上には、本Bのめくり先位置となる頁Pが置かれることになる。   The holding table 6 includes a pair of holding plates 61 and 62 that can be folded by a hinge (not shown). Here, when the page P of the book B is turned from left to right, one of the pair of holding plates 61 and 62, the one holding plate 61 arranged on the left side is placed along the table, and on the right side. The other holding plate 62 to be placed is inclined and placed on the table so that it rises at a predetermined angle with respect to the one holding plate 61. On one holding plate 61, the page P that is the turning origin position of the book B is placed, and on the other holding plate 62, the page P that is the turning destination position of the book B is placed.

これにより、保持台6は、めくり元位置にある頁Pよりもめくり先にある頁Pの方が本Bの綴じ目に対して起きる方向に傾斜するように本Bを保持することになる。なお、一対の保持板61、62がヒンジにより折り畳み自在となっているので、一対の保持板61、62のなす角度も調整することができ、めくり先位置にある頁Pの水平面に対する傾斜角度が調整自在となっている。   As a result, the holding table 6 holds the book B so that the page P at the turning destination is more inclined than the page P at the turning original position in the direction in which the binding occurs. Since the pair of holding plates 61 and 62 can be folded by hinges, the angle formed by the pair of holding plates 61 and 62 can be adjusted, and the inclination angle of the page P at the turning point position with respect to the horizontal plane can be adjusted. It is adjustable.

めくり装置本体30は、駆動軸33を中心に揺動するアーム部34と、アーム部34の先端に取り付けられ、本Bの頁Pに対して吸着する吸着部35と、駆動軸33、アーム部34及び吸着部35を支持する台座部38と、めくり元位置にある頁Pの上方に風を通過させることでめくり先位置にある頁Pに対して風を当てる送風部5と、各部を制御する図示しない制御部とを備えている。   The turning device main body 30 includes an arm portion 34 that swings around a drive shaft 33, a suction portion 35 that is attached to the tip of the arm portion 34 and sucks against the page P of the book B, a drive shaft 33, and an arm portion. 34 and the pedestal part 38 that supports the suction part 35, and the blower part 5 that applies wind to the page P at the turning destination position by passing the wind above the page P at the turning origin position, and controls each part. And a control unit (not shown).

図1に示すように、駆動軸33の先端部には回転体321が取り付けられている。この回転体321には、駆動軸33に直交する平面に沿うようにアーム部34が取り付けられている。アーム部34は例えば樹脂製の矩形板状部材である。このアーム部34は、長手方向に垂直な断面の形状が平な板状となっている。アーム部34の先端には、例えばモータなどの駆動部37を介して吸着部35が取り付けられている。吸着部35は、略円柱状の粘着部である。   As shown in FIG. 1, a rotating body 321 is attached to the tip of the drive shaft 33. An arm portion 34 is attached to the rotating body 321 along a plane orthogonal to the drive shaft 33. The arm portion 34 is, for example, a resin rectangular plate member. The arm portion 34 has a flat plate shape with a cross section perpendicular to the longitudinal direction. A suction part 35 is attached to the tip of the arm part 34 via a drive part 37 such as a motor. The adsorption part 35 is a substantially cylindrical adhesive part.

図2は、本実施形態の書画カメラシステム1の他の例による概略構成を示す斜視図である。なお、図1に対応する部分には同一の符号を付けて説明を省略する。図2に示す書画カメラシステム1は、図1に示す書画カメラ2、書画カメラ2及び頁めくり装置3に通信自在に接続されたパソコン4がないことが違うだけであり、頁めくり装置3自体は同じである。図2に示す書画カメラシステム1では、書画カメラ2及びパソコン4に代えて、カメラ部を備える、スマートフォンやタブレット端末など(以下、情報処理端末7という)を用いる。情報処理端末7は、例えば、適度な高さに平板面を備えるテーブルなどの据置台8に設置する。情報処理端末7は、表示部71が上方に向き、撮像部72がその画角内に本Bが収まるように下方に向くように伏せて設置される。撮像部72は、情報処理端末7の上部中央、あるいは上部片隅(表示部71から見て右端側)に設けられている。   FIG. 2 is a perspective view showing a schematic configuration according to another example of the document camera system 1 of the present embodiment. It should be noted that portions corresponding to those in FIG. The document camera system 1 shown in FIG. 2 differs only in that there is no personal computer 4 communicatively connected to the document camera 2, document camera 2, and page turning device 3 shown in FIG. The same. In the document camera system 1 shown in FIG. 2, instead of the document camera 2 and the personal computer 4, a smartphone or a tablet terminal (hereinafter referred to as an information processing terminal 7) including a camera unit is used. The information processing terminal 7 is installed on a stationary table 8 such as a table having a flat plate surface at an appropriate height, for example. The information processing terminal 7 is installed face down such that the display unit 71 faces upward and the imaging unit 72 faces downward so that the book B is within the angle of view. The imaging unit 72 is provided at the upper center of the information processing terminal 7 or at the upper corner (right end side when viewed from the display unit 71).

上述した図1、図2のいずれの構成においても、頁めくり動作においては、まず、アーム部34を保持板61側の頁Pのめくり元位置側に移動させ、吸着部35でめくり元位置の頁Pを吸着し、吸着した状態でアーム部34を保持板62側のめくり先位置へと移動させる。当該頁Pがアーム部34の往動に追従してめくり先位置へと移動することになる。そして、めくり先位置で、駆動部37によって吸着部35を回転させることで吸着した頁Pを分離する。このとき、所定のタイミングで、カメラ22又は情報処理端末7の撮像部72によってまだめくられていない保持板61側の頁Pを撮像する。その後、往動時とは逆方向にアーム部34を保持板61側のめくり元位置側に移動させる。吸着部35は、めくり元位置側で新たな頁P(撮像後の頁)に吸着する。この往復動作を繰り返すことで頁Pのめくり動作が進行する。   1 and 2, in the page turning operation, first, the arm portion 34 is moved to the page turning origin position side of the page P on the holding plate 61 side, and the suction portion 35 is moved to the page turning origin position. The page P is adsorbed, and the arm 34 is moved to the turning position on the holding plate 62 side in the adsorbed state. The page P follows the forward movement of the arm portion 34 and moves to the turning destination position. Then, the suctioned page P is separated by rotating the suction unit 35 by the driving unit 37 at the turning point position. At this time, at a predetermined timing, the page 22 on the holding plate 61 side that has not been turned yet is imaged by the camera 22 or the imaging unit 72 of the information processing terminal 7. Thereafter, the arm portion 34 is moved to the turning original position side on the holding plate 61 side in the direction opposite to the forward movement. The adsorbing unit 35 adsorbs to a new page P (page after imaging) on the turning original position side. By repeating this reciprocating operation, the page P turning operation proceeds.

そして、最終頁に達するまで、本Bの片側の全頁(例えば奇数頁)がカメラ22によって撮影され画像データは、一枚毎(一撮像毎)にナンバリングされてパソコン4又は情報処理端末7のCPU77(後述)に転送され、所定の記憶部等に保持される。ユーザは、本Bを反転させて保持台6に設置し、上述した頁めくり動作を再度行う。これにより、最終頁に達するまで、本Bの片側の全頁(例えば偶数頁)がカメラ22によって撮影され、上述したように、一枚毎(一撮像毎)にナンバリングされてパソコン4又は情報処理端末7のCPU77(後述)に転送され、所定の記憶部等に保持される。その後、奇数頁、偶数頁を互い違いに頁順に並び替えるようにして、全頁のスキャン画像としてまとめる。   Until the last page is reached, all pages on one side of the book B (for example, odd pages) are photographed by the camera 22, and the image data is numbered one by one (every image) and is stored in the personal computer 4 or the information processing terminal 7. The data is transferred to a CPU 77 (described later) and held in a predetermined storage unit or the like. The user reverses the book B and places it on the holding table 6 and performs the above-described page turning operation again. Thus, all the pages on one side of book B (for example, even-numbered pages) are photographed by camera 22 until the final page is reached, and are numbered one by one (every imaging) as described above, and personal computer 4 or information processing The data is transferred to a CPU 77 (described later) of the terminal 7 and held in a predetermined storage unit or the like. Thereafter, the odd pages and the even pages are rearranged alternately in the page order, and the scanned images of all the pages are collected.

また、この段階では、頁Pの画像データは、本の頁の撓(たわ)みなどにより、頁全体や、ページ内の画像、文字列、図表などが歪んでいるので、パソコン4又は情報処理端末7では、所定のアプリケーションによって、頁画像に対して湾曲補正、矩形補正、又は台形補正を行い、頁画像の歪みを補正する。   At this stage, the image data of page P is distorted in the entire page, images in the page, character strings, charts, etc. due to the deflection of the page of the book. The processing terminal 7 corrects the distortion of the page image by performing curvature correction, rectangle correction, or trapezoid correction on the page image by a predetermined application.

本実施形態では、歪んだ頁画像の上にメッシュ画像を表示し、頁画像の歪み具合に合わせるようにメッシュ画像を変形させる操作を行う際、1つのユーザインターフェースにおいてメッシュ画像に対するユーザ操作(タッチ操作など)を変えることで、メッシュ画像を構成する線分を頁画像の歪み具合に曲線で合せることも、メッシュ画像を構成する線分を直線のまま平行移動、回転、又は伸縮させることで頁画像の歪み具合に合せることも可能とする。このため、本実施形態では、1つのユーザインターフェースで、統一されたユーザ操作によって、どの補正方法を適用するか意識することなく、メッシュ画像の形状を操作することができる。また、必要に応じて頁単位で補正方法を変更する場合も、ユーザの利便性を損なうことがない。   In the present embodiment, when a mesh image is displayed on a distorted page image and the mesh image is deformed so as to match the distortion of the page image, a user operation (touch operation) on the mesh image is performed in one user interface. Etc.), the line segments that make up the mesh image can be matched to the distortion of the page image with a curve, or the line segments that make up the mesh image can be translated, rotated, or expanded or contracted while keeping the straight line. It is also possible to match the degree of distortion. For this reason, in this embodiment, the shape of the mesh image can be operated with a single user interface by a unified user operation without being aware of which correction method is applied. Further, even when the correction method is changed in units of pages as necessary, user convenience is not impaired.

また、本実施形態では、頁画像に対して合わせたメッシュ画像を構成する線分に曲線が含まれる場合には、湾曲補正を適用し、メッシュ画像を構成する線分が直線である場合には、矩形補正又は台形補正が適用するように、頁単位でメッシュ画像の線分構成に応じて切り替える。つまり、ユーザは、頁画像の歪みを確認した上で湾曲補正を行うか、矩形補正を行うか、あるいは台形補正を行うかを選択したり、それぞれのためのユーザインターフェースを切り替えたりする必要がない。このため、本実施形態では、頁毎にメッシュ画像の形状を識別し、そのメッシュ画像の形状に基づいて該当頁画像に対する補正方法(アルゴリズム)切り替えるようにしたので、処理時間の短縮化(最適化)を図ることができるとともに、補正精度の低下を防ぐことができる。   Further, in the present embodiment, when a curve is included in a line segment that forms a mesh image combined with a page image, curvature correction is applied, and when a line segment that forms a mesh image is a straight line, In order to apply rectangular correction or trapezoid correction, switching is performed in units of pages according to the line segment configuration of the mesh image. In other words, the user does not have to select whether to perform curvature correction, rectangular correction, or trapezoid correction after confirming the distortion of the page image, or to switch the user interface for each. . For this reason, in this embodiment, the shape of the mesh image is identified for each page, and the correction method (algorithm) for the corresponding page image is switched based on the shape of the mesh image. ) And a reduction in correction accuracy can be prevented.

なお、以下では、湾曲補正、矩形補正、又は台形補正などの画像処理を行う機器として、スマートフォンやタブレット端末などの情報処理端末7を用いる場合に付いて説明するが、パソコン4においても、ハードウェア構成は違うものの、同様のソフトウェア(アプリケーションプログラム)にて実現できることは言うまでもない。   In the following, a case where an information processing terminal 7 such as a smartphone or a tablet terminal is used as an apparatus for performing image processing such as curvature correction, rectangle correction, or trapezoid correction will be described. Needless to say, although the configuration is different, it can be realized by the same software (application program).

図3は、本実施形態による情報処理端末7の略構成を示すブロック図である。図3において、情報処理端末7は、通信部70、表示部71、撮像部72、ROM73、RAM74、操作部(タッチパネル)75、記録媒体76、及びCPU77を備えている。通信部70は、例えば、移動体通信、Bluetooth(登録商標)、又は/及び無線LAN(WiFi)を用いてインターネットなどのネットワークに接続する。撮像部72は、光学レンズ群からなるレンズブロックと、CCDや、CMOSなどの撮像素子からなり、レンズブロックから入った画像を撮像素子により撮像する。特に、本実施形態では、撮像部72は、本Bの頁Pを撮像する。   FIG. 3 is a block diagram showing a schematic configuration of the information processing terminal 7 according to the present embodiment. In FIG. 3, the information processing terminal 7 includes a communication unit 70, a display unit 71, an imaging unit 72, a ROM 73, a RAM 74, an operation unit (touch panel) 75, a recording medium 76, and a CPU 77. The communication unit 70 connects to a network such as the Internet using, for example, mobile communication, Bluetooth (registered trademark), and / or a wireless LAN (WiFi). The imaging unit 72 includes a lens block including an optical lens group and an imaging element such as a CCD or a CMOS, and captures an image entered from the lens block by the imaging element. In particular, in the present embodiment, the imaging unit 72 images the page P of the book B.

ROM73は、後述するCPU77により実行されるプログラムや動作等に必要とされる各種パラメータなどを記憶している。RAM74は、後述するCPU77がプログラムを実行した際の一時的なデータや、各種アプリケーションプログラム、アプリケーションの実行に必要な各種パラメータなどのデータを記憶する。特に、本実施形態では、RAM74には、撮像した画像並びに補正した補正画像等が記憶される。   The ROM 73 stores programs executed by the CPU 77 described later, various parameters necessary for operations, and the like. The RAM 74 stores data such as temporary data when a CPU 77 described later executes a program, various application programs, and various parameters necessary for executing the application. In particular, in the present embodiment, the RAM 74 stores captured images, corrected corrected images, and the like.

表示部71は、液晶表示器や有機EL(Electro Luminescence)表示器などからなり、特定の機能やアプリケーションなどに紐付けられているアイコンや、アプリケーション画面、各種のメニュー画面などを表示する。操作部(タッチパネル)75は、指やスタイラス(ペン)などの直接接触、あるいは、近接を検出する。なお、操作部(タッチパネル)75には、電源ボタンや音量ボタンなどの機械的なスイッチ類が含まれてもよい。特に、本実施形態では、操作部(タッチパネル)75から、表示部71に撮像した頁画像と該頁画像に重畳して表示されるメッシュ画像上の制御点を、ユーザのタッチ操作により個別に移動させたり、メッシュ画像の直線部分を維持した状態で伸縮、回転、平行移動させたりして、メッシュ画像の形状を頁画像の形状に合致させるように変形させるためのタッチ操作が入力される。また、表示部71は、表示機能及びタッチ入力機能を有してもよく、表示部71へのユーザのタッチ操作により、メッシュ画像の形状を頁画像の形状に合致させるように変形させるためのタッチ操作が入力されるものとしてもよい。   The display unit 71 includes a liquid crystal display, an organic EL (Electro Luminescence) display, and the like, and displays icons associated with specific functions and applications, application screens, various menu screens, and the like. The operation unit (touch panel) 75 detects direct contact or proximity of a finger or a stylus (pen). The operation unit (touch panel) 75 may include mechanical switches such as a power button and a volume button. In particular, in the present embodiment, a page image captured on the display unit 71 and a control point on a mesh image displayed superimposed on the page image are individually moved from the operation unit (touch panel) 75 by a user's touch operation. Or a touch operation for transforming the shape of the mesh image to match the shape of the page image by inputting, contracting, rotating, or translating while maintaining the straight line portion of the mesh image. The display unit 71 may have a display function and a touch input function, and a touch for changing the shape of the mesh image to match the shape of the page image by a user's touch operation on the display unit 71. An operation may be input.

記録媒体76は、撮像された画像データなどの各種データを保存する。CPU77は、上述したROM73に記憶されているプログラムを実行することで各部の動作を制御する。特に、本実施形態では、CPU77は、画像処理プログラムを実行することにより、ユーザのタッチ操作によって変形させたメッシュ画像を正しい形状(矩形)になるように、メッシュ画像とともに頁画像の形状を変形させることで頁画像の変形や湾曲などを補正するための湾曲補正処理、矩形補正処理、及び台形補正処理を実行する。   The recording medium 76 stores various data such as captured image data. The CPU 77 controls the operation of each unit by executing the program stored in the ROM 73 described above. In particular, in the present embodiment, the CPU 77 executes the image processing program to deform the shape of the page image together with the mesh image so that the mesh image deformed by the user's touch operation has a correct shape (rectangular shape). Thus, a curvature correction process, a rectangular correction process, and a trapezoidal correction process for correcting deformation and curvature of the page image are executed.

湾曲補正処理は、メッシュ画像の上下の線分が湾曲して歪んでいる場合に適用される処理である。これに対して、矩形補正処理は、メッシュ画像が全て直線で構成されている場合に適用される処理である。また、台形補正処理は、メッシュ画像が台形状(上下の線分は直線で、左右の成分は垂線に対して傾いている)になっている場合に適用される処理である。以下、湾曲補正処理、矩形補正処理及び台形補正処理について詳細に説明する。   The curvature correction process is a process applied when the upper and lower line segments of the mesh image are curved and distorted. On the other hand, the rectangle correction process is a process applied when the mesh images are all composed of straight lines. The trapezoidal correction process is a process applied when the mesh image has a trapezoidal shape (the upper and lower line segments are straight lines and the left and right components are inclined with respect to the vertical line). Hereinafter, the curvature correction process, the rectangle correction process, and the trapezoid correction process will be described in detail.

(1−1)矩形補正処理(矩形トリミング)
図4は、矩形補正処理に対するユーザインターフェースの一例を説明するための概念図である。図4には、矩形補正処理に対するユーザインターフェースとして、頁画像10上にメッシュ画像9aを重畳させて表示部71に表示した様子を示している。ユーザは、メッシュ画像9aの一番外側の線を1本の指でタッチしてドラッグすることで、その辺が辺と垂直な方向(例として辺の上にある太い矢印Aの方向)に移動させることができる。一つの辺が移動すると、それと結合する辺は、その移動に応じて伸縮し、全体として直方体の形状を保持する。
(1-1) Rectangular correction processing (rectangular trimming)
FIG. 4 is a conceptual diagram for explaining an example of a user interface for the rectangle correction processing. FIG. 4 shows a state where the mesh image 9a is superimposed on the page image 10 and displayed on the display unit 71 as a user interface for the rectangular correction processing. The user touches and drags the outermost line of the mesh image 9a with one finger so that the side moves in a direction perpendicular to the side (for example, the direction of the thick arrow A above the side). Can be made. When one side moves, the side coupled with the side expands and contracts according to the movement, and maintains the shape of the rectangular parallelepiped as a whole.

また、頁画像10が傾いている場合がある。この場合、メッシュ画像9aの各辺をドラッグしただけではメッシュ画像9aを傾けることができないため、望んだ位置にメッシュ画像9aを移動させることができない。そこで、「回転」ボタン711を用いて頁画像10全体を回転させ、傾きが目立たないようにする。そして、再度、メッシュ画像9aを移動させ、頁画像10にほぼ合致する位置に重ねる。   Further, the page image 10 may be tilted. In this case, since the mesh image 9a cannot be tilted by simply dragging each side of the mesh image 9a, the mesh image 9a cannot be moved to a desired position. Therefore, the “rotate” button 711 is used to rotate the entire page image 10 so that the inclination is not noticeable. Then, the mesh image 9a is moved again, and is superimposed on a position that substantially matches the page image 10.

そして、ユーザは、メッシュ画像9a、頁画像10の回転の状態が適正だと判断したら、「プレビュー」ボタン712を押す。これにより、パラメータ(メッシュの位置、画像の回転角度)が決定され、矩形補正処理(矩形トリミング)後の頁画像10が表示される。ここで、ユーザが更に修正が必要であると判断した場合には、また同様の処理を繰り返し行う。   When the user determines that the rotation state of the mesh image 9 a and the page image 10 is appropriate, the user presses a “preview” button 712. Thus, parameters (mesh position, image rotation angle) are determined, and the page image 10 after the rectangle correction processing (rectangular trimming) is displayed. If the user determines that further correction is necessary, the same process is repeated.

(1−2)湾曲補正処理(湾曲トリミング)
図5は、湾曲補正処理に対するユーザインターフェースの一例を説明するための概念図である。図5には、湾曲補正処理に対するユーザインターフェースとして、頁画像10上にメッシュ画像9bを重畳させて表示部71に表示した様子を示している。複数の制御点80は、メッシュ画像9bを構成するベジェ曲線(上線UL、及び下線DL)の制御点であり、上線UL、及び下線DLに5点1組となって存在している。ユーザは、1本の指でいずれかの制御点80をタッチして、頁画像10の形状とメッシュ画像9bの形状とが一致するように制御点80をドラッグすると、ベジェ曲線の変化としてメッシュ画像9bの全体形状が追従するようにして変形する。すなわち、制御点80を操作することで、メッシュ画像9aの上線UL、及び下線DLを湾曲させることができる。
(1-2) Curve correction processing (curve trimming)
FIG. 5 is a conceptual diagram for explaining an example of a user interface for the curvature correction processing. FIG. 5 shows a state where the mesh image 9 b is superimposed on the page image 10 and displayed on the display unit 71 as a user interface for the curvature correction processing. The plurality of control points 80 are control points of Bezier curves (upper line UL and lower line DL) constituting the mesh image 9b, and exist as a set of five points on the upper line UL and the lower line DL. When the user touches one of the control points 80 with one finger and drags the control point 80 so that the shape of the page image 10 matches the shape of the mesh image 9b, the mesh image is displayed as a change in the Bezier curve. It deforms so that the overall shape of 9b follows. That is, by operating the control point 80, the upper line UL and the lower line DL of the mesh image 9a can be curved.

本Bを撮影すると、本Bの閉じ部の引っ張りや本Bの厚みで本Bに撓みが生じるため、上述した矩形補正処理などでは歪みのある画像になってしまう。そこで、メッシュ画像9bを曲線的に変形させて、頁画像10の境界や曲がっている文字の並びに曲線を合わせて「プレビュー」ボタン712を押すと、メッシュ画像9bの曲線に合わせて頁画像10をトリミングし、メッシュ画像9bの曲線を直線に直すように頁画像10を変形させ、撓みを補正した頁画像10を生成する。なお、矩形補正処理に対するユーザインターフェースにあった回転ボタン711はその特性上存在しない。   When the book B is photographed, the book B is bent due to the pulling of the closed portion of the book B or the thickness of the book B, and thus the above-described rectangular correction processing or the like results in a distorted image. Therefore, when the mesh image 9b is deformed in a curve, and the “preview” button 712 is pressed after aligning the boundary of the page image 10 and the curved line of the bent character, the page image 10 is matched with the curve of the mesh image 9b. The page image 10 is deformed so that the curve of the mesh image 9b is corrected to a straight line, and the page image 10 in which the deflection is corrected is generated. Note that the rotation button 711 in the user interface for the rectangle correction processing does not exist due to its characteristics.

(1−3)両者の近い部分
図6は、矩形補正処理と湾曲補正処理の共通点を説明するための概念図である。矩形補正処理では、直線を移動させてメッシュ画像9aの形状を調整するのに対して、湾曲補正処理では、曲線に関係する制御点80を移動させてメッシュ画像9bの形状を調整する。そして、湾曲補正処理には、頁画像の歪みを変化させる機能もあり、アルゴリズムにも違いが存在し、出力された頁画像は別物になる。
(1-3) Close Parts of Both FIG. 6 is a conceptual diagram for explaining common points between the rectangle correction process and the curvature correction process. In the rectangle correction process, the shape of the mesh image 9a is adjusted by moving a straight line, whereas in the curve correction process, the control point 80 related to the curve is moved to adjust the shape of the mesh image 9b. The curvature correction process also has a function of changing the distortion of the page image, there is a difference in the algorithm, and the output page image is different.

しかしながら、ある頁画像に2つのアルゴリズムをかけて同様の頁画像が得られる場合がある。それは、図6に示すように、湾曲補正処理のメッシュ画像9bを構成する線分が矩形補正処理のメッシュ画像9aのように全て直線になっているときである。このようになる条件は、以下の通りである。   However, a similar page image may be obtained by applying two algorithms to a page image. That is, as shown in FIG. 6, the line segments constituting the mesh image 9b for the curvature correction process are all straight as in the mesh image 9a for the rectangle correction process. The conditions for this are as follows.

条件1:5つの制御点80が上下とも一直線状に並んでいる。
条件2:上下の端点(図示の矩形の制御点80)が頁画像10の横方向の座標に対し、それぞれ同じ位置にある(上線ULの右端の制御点80と下線DLの右端の制御点80とが同じ位置にあり、上線ULの左端の制御点80と下線DLの左端の制御点80も同様である)。
Condition 1: Five control points 80 are aligned in a straight line on the upper and lower sides.
Condition 2: The upper and lower end points (rectangular control points 80 in the figure) are in the same position with respect to the horizontal coordinates of the page image 10 (the right end control point 80 of the upper line UL and the right end control point 80 of the underline DL). And the control point 80 at the left end of the upper line UL and the control point 80 at the left end of the underline DL are the same).

条件1、2の双方が成立すれば、湾曲補正処理(湾曲トリミング)を行ったときと矩形補正処理(矩形トリミング)を行ったときで処理後の頁画像10に違いがない。したがって、ユーザが湾曲補正処理に対する操作を行っていたとしても、矩形補正処理を適用しても良いことになる。   If both conditions 1 and 2 are satisfied, there is no difference between the processed page image 10 when the curve correction process (curve trimming) is performed and when the rectangle correction process (rectangular trimming) is performed. Therefore, even if the user performs an operation for the curvature correction process, the rectangle correction process may be applied.

また、湾曲補正処理(湾曲トリミング)において、条件1が成立していると、全ての線は直線になる。よって湾曲を補正する湾曲処理を行わなくてよい。よって、条件1だけ成立しているときは、矩形補正処理よりは処理時間がかかるが、湾曲補正処理よりは時間がかからない、上述した台形補正処理を用いて頁画像10を補正することも可能である。   Further, in the curve correction process (curve trimming), if condition 1 is satisfied, all the lines become straight lines. Therefore, it is not necessary to perform a bending process for correcting the bending. Therefore, when only condition 1 is satisfied, it is possible to correct the page image 10 using the trapezoidal correction process described above, which takes more processing time than the rectangular correction process but takes less time than the curvature correction process. is there.

なお、図7に示すように、5つの制御点80が一直線状であるが、等間隔でない場合には、直線であるという形状自体に変化はない。つまり、上記条件1、2に基づいてメッシュ画像9bの形状を判定すれば、湾曲補正処理、矩形補正処理、又は台形補正処理のいずれを適用するかを判断することが可能である。以下、本実施形態によるユーザインターフェースにおけるメッシュ画像は、湾曲補正処理、矩形補正処理、又は台形補正処理のいずれでも共通に用いることができるメッシュ画像9として説明する。   As shown in FIG. 7, the five control points 80 are in a straight line. However, when the control points 80 are not equally spaced, the shape itself is not changed. That is, if the shape of the mesh image 9b is determined based on the above conditions 1 and 2, it is possible to determine which of the curvature correction process, the rectangle correction process, and the trapezoid correction process is applied. Hereinafter, the mesh image in the user interface according to the present embodiment will be described as a mesh image 9 that can be commonly used in any of the curvature correction process, the rectangle correction process, and the trapezoid correction process.

図8及び図9は、本実施形態による情報処理端末7での補正処理を説明するためのフローチャートである。まなお、情報処理端末7には、既に本Bの全頁の頁画像10が頁順に所定のフォーマット形式の画像データとして記録媒体76等に保存されているものとする。ユーザは、本Bの頁を撮像した後、情報処理端末7に対して、画像補正処理の実行を指示する。   8 and 9 are flowcharts for explaining the correction process in the information processing terminal 7 according to the present embodiment. In the information processing terminal 7, it is assumed that the page images 10 of all pages of the book B are already stored in the recording medium 76 as image data in a predetermined format in page order. After imaging the page of book B, the user instructs the information processing terminal 7 to execute image correction processing.

CPU77は、まず、本Bの最初の頁画像10を記録媒体76からRAM74に格納し、頁画像10と当該頁画像10上に重畳させた初期の歪んでいないメッシュ画像とを表示部71に出力する(ステップS10)。次に、CPU77は、操作部(タッチパネル)75に対してユーザのタッチ操作があったか否かを判断する(ステップS12)。そして、ユーザのタッチ操作がない場合には(ステップS12のNO)、CPU77は、ステップS10に戻り、頁画像10とメッシュ画像9の表示を継続する。   First, the CPU 77 stores the first page image 10 of the book B from the recording medium 76 into the RAM 74, and outputs the page image 10 and the initial undistorted mesh image superimposed on the page image 10 to the display unit 71. (Step S10). Next, the CPU 77 determines whether or not the user has performed a touch operation on the operation unit (touch panel) 75 (step S12). If there is no touch operation by the user (NO in step S12), the CPU 77 returns to step S10 and continues displaying the page image 10 and the mesh image 9.

一方、操作部(タッチパネル)75に対してユーザのタッチ操作があった場合には(ステップS12のYES)、CPU77は、タッチした指の数が1本又は2本以上であるか、すなわち、1本の指によるタッチ操作であるか、2本の指以上によるタッチ操作であるかを判断する(ステップS14)。   On the other hand, when a user touch operation is performed on the operation unit (touch panel) 75 (YES in step S12), the CPU 77 determines whether the number of touched fingers is one or two, that is, 1 It is determined whether it is a touch operation with two fingers or a touch operation with two or more fingers (step S14).

図10(a)、(b)は、本実施形態によるメッシュ画像9を変形するためのタッチ操作を説明するための模式図である。ユーザは、メッシュ画像自体の形状を変えたい場合、すなわち、メッシュ画像上の制御点を個別に操作したい場合には、図10(a)に示すように、1本の指で変形させたい箇所の制御点80(図示の●は全て制御点)をタッチし、移動させたい方向に指をドラッグ(タッチした状態のままスライド)させればよい(個別操作)。つまり、この個別操作では、ベジェ曲線で構成されるメッシュ画像上の複数の制御点80(本実施形態ではメッシュ画像の上下に各5点)の中から、1つの制御点80を操作(移動)することになる。   FIGS. 10A and 10B are schematic diagrams for explaining a touch operation for deforming the mesh image 9 according to the present embodiment. When the user wants to change the shape of the mesh image itself, that is, when the user wants to individually operate the control points on the mesh image, as shown in FIG. The control point 80 (all the control points in the figure are touched) may be touched, and the finger may be dragged (slid in the touched state) in the desired direction (individual operation). That is, in this individual operation, one control point 80 is operated (moved) from among a plurality of control points 80 (5 points above and below the mesh image in the present embodiment) on the mesh image formed by Bezier curves. Will do.

ユーザは、図10(a)に示すように、頁画像10上に重ねて表示されているメッシュ画像9の形状をタッチ操作によって伸縮させて頁画像10の形状に合わせる。ユーザが、タッチ操作によって頁画像10の形状とメッシュ画像9の形状とが一致するように制御点80を移動させると、メッシュ画像9の形状が制御点80の移動に追従するようにしてリアルタイムで変形するようになっている。   As shown in FIG. 10A, the user expands and contracts the shape of the mesh image 9 displayed on the page image 10 to match the shape of the page image 10 by a touch operation. When the user moves the control point 80 so that the shape of the page image 10 matches the shape of the mesh image 9 by a touch operation, the shape of the mesh image 9 follows the movement of the control point 80 in real time. It is designed to deform.

メッシュ画像9の最上部の上線ULと最下部の下線DLは、4次のベジェ曲線で描画されている。この上線ULの5点の制御点80と下線DLの5点の制御点80とをそれぞれ動かすことによって上線ULと下線DLを自由に動かすことができる。CPU77は、この上線ULと下線DLを基準に所定のメッシュ生成アルゴリズムを用いて、上線ULと下線DLとに挟まれた横線や縦線の幅や、曲線の曲がり具合などを導出してリアルタイムでメッシュ画像9の形状を変形させる。   The uppermost line UL and the lowermost line DL at the bottom of the mesh image 9 are drawn with a quartic Bezier curve. By moving the five control points 80 of the upper line UL and the five control points 80 of the lower line DL, the upper line UL and the lower line DL can be freely moved. The CPU 77 uses a predetermined mesh generation algorithm based on the upper line UL and the lower line DL, and derives the width of the horizontal and vertical lines sandwiched between the upper line UL and the lower line DL, the curve curve, etc. in real time. The shape of the mesh image 9 is deformed.

なお、本実施形態では、メッシュ画像9を変形させるための制御点80を上下合計10点としたが、これに限らず、メッシュ画像9を構成する複数の領域の各交点を制御点としてもよい。また、上線ULと下線DLに限定せずに、ユーザが変形させたい箇所をタッチ操作することで、そのタッチ操作された箇所を含む周囲の交点を、変形させるための制御点として機能させるようにしてもよい。この場合、制御点として有効であることを示すために、該当する交点のドットを大きくしたり、色を変えたりしてもよい。   In this embodiment, the control points 80 for deforming the mesh image 9 are a total of 10 points in the upper and lower directions. However, the present invention is not limited to this, and each intersection of a plurality of regions constituting the mesh image 9 may be used as the control point. . In addition, without being limited to the upper line UL and the lower line DL, the user can perform a touch operation on a location that the user wants to deform so that the surrounding intersection including the touched location functions as a control point for the deformation. May be. In this case, in order to show that it is effective as a control point, the dot at the corresponding intersection may be enlarged or the color may be changed.

一方、ユーザは、メッシュ画像の形状を変えることなく、メッシュ画像の直線部分を維持したまま伸縮、回転又は平行移動させたい場合、すなわち、メッシュ画像上の制御点の全てを同時に移動させるような操作したい場合には、図10(b)に示すように、2指以上でメッシュ画像9上をタッチして所定の操作を行えばよい(全体操作)。つまり、この全体操作では、全ての制御点80((図示の●は全て制御点;図示の例では5点)を同時に(互いの相対位置を変えずに)操作(伸縮、回転、平行移動)することになる。   On the other hand, when the user wants to extend, rotate, or translate while maintaining the straight part of the mesh image without changing the shape of the mesh image, that is, an operation that moves all the control points on the mesh image at the same time. If desired, as shown in FIG. 10B, a predetermined operation may be performed by touching the mesh image 9 with two or more fingers (overall operation). In other words, in this overall operation, all control points 80 ((● in the figure are all control points; in the example shown in the figure) are simultaneously operated (without changing the relative positions of each other) (expansion / contraction, rotation, translation). Will do.

ここで、上述したように、表示部71の画面には、撮影した頁画像(不図示)とともに、ベジェ曲線から構成されるメッシュ画像9が表示されている。該メッシュ画像9を構成するベジェ曲線(4次)には上下にそれぞれ5点の制御点が存在する。なお、メッシュ画像9自体は、曲線から形成されるユーザインターフェースであって、後述する湾曲補正処理又は台形補正処理に直接関係するものではない。つまり、湾曲補正処理又は台形補正処理では、制御点80が移動対象であるので、タッチ操作による指の位置から、移動対象となる制御点80を特定する必要ある。   Here, as described above, the screen image of the display unit 71 displays a mesh image 9 composed of Bezier curves together with a captured page image (not shown). The Bezier curve (fourth order) constituting the mesh image 9 has five control points on the top and bottom. Note that the mesh image 9 itself is a user interface formed from a curve, and is not directly related to the curve correction process or the trapezoid correction process described later. That is, in the curvature correction process or the trapezoidal correction process, since the control point 80 is a movement target, it is necessary to specify the control point 80 to be moved from the position of the finger by the touch operation.

そこで、例えば、図10(b)に示すように、5点の制御点80があるとして説明する。まず、予め、5点の制御点80を全て含む矩形の座標を導出しておく。矩形の導出は、5点の中で横座標(x座標)が最小の制御点(図示の例では制御点80b)、最大の制御点(図示の例では制御点80a)、縦座標(y座標)が最小の制御点(図示の例では制御点80b)、最大の制御点(図示の例では制御点80a)を調べ、その最小量と最大量を元に上下左右の辺を構成すればよい。図示の例では、矩形の形状とメッシュ画像9の外郭と一致しているが、これに限定されるものではない。   Therefore, for example, as shown in FIG. 10B, it is assumed that there are five control points 80. First, rectangular coordinates including all five control points 80 are derived in advance. The derivation of the rectangle is the control point having the smallest abscissa (x coordinate) among the five points (control point 80b in the example shown), the maximum control point (control point 80a in the example shown), and the ordinate (y coordinate). ) Is the minimum control point (control point 80b in the illustrated example) and the maximum control point (control point 80a in the illustrated example), and the upper, lower, left, and right sides may be configured based on the minimum and maximum amounts. . In the example shown in the figure, the rectangular shape matches the outline of the mesh image 9, but the present invention is not limited to this.

次に、タッチ操作による2本以上の指の位置の幾何学上の、図10(b)に示す中心点CPを測定する。この中心点CPが上記矩形の中に入っている場合、矩形内の全て制御点80に対して同時に(互いの相対位置を変えずに)、伸縮、回転、あるいは平行移動を行うと判断する。   Next, the center point CP shown in FIG. 10B on the geometrical positions of two or more fingers by the touch operation is measured. When the center point CP is in the rectangle, it is determined that all the control points 80 in the rectangle are expanded / contracted, rotated, or translated at the same time (without changing their relative positions).

中心点CPの測定方法は、タッチ操作の指の全ての位置の座標を測定し、それらの値でx座標、y座標それぞれの平均値を取ればよい。図10(b)に示す例では、2本の指でタッチ操作したときの例である。例えば、1本目の指のタッチ位置T1(x1,y1)、2本目の指のタッチ位置T2(x2,y2)とすると、2本の指の中心点CPの座標は、((x1+x2)/2,(y1+y2)/2)となる。このように、2本の指の中心点CPの座標と、5点の制御点80を全て含む矩形の座標とから、この中心点CPが上記矩形の中に入っているか否かを判断することができる。   As a measuring method of the center point CP, the coordinates of all positions of the finger of the touch operation are measured, and the average value of each of the x-coordinate and the y-coordinate may be taken with these values. In the example shown in FIG. 10B, a touch operation is performed with two fingers. For example, if the touch position T1 (x1, y1) of the first finger and the touch position T2 (x2, y2) of the second finger, the coordinates of the center point CP of the two fingers are ((x1 + x2) / 2 , (Y1 + y2) / 2). In this way, it is determined whether the center point CP is in the rectangle from the coordinates of the center point CP of the two fingers and the coordinates of the rectangle including all the five control points 80. Can do.

そして、図10(a)に示すように、タッチ操作が1指である場合には(ステップS14のNO)、CPU77は、1本の指のタッチ操作による、ベジェ曲線で構成されたメッシュ画像上の制御点80に対する個別操作であると判断し、タッチされた1指の動きに応じて対応する制御点を移動させる変形処理を実行する(ステップS16)。   Then, as shown in FIG. 10A, when the touch operation is one finger (NO in step S14), the CPU 77 displays on the mesh image constituted by the Bezier curve by the touch operation of one finger. The control point 80 is determined to be an individual operation, and a deformation process for moving the corresponding control point according to the movement of one touched finger is executed (step S16).

図11は、本実施形態によるメッシュ画像9の制御点80を個別に操作して変形するためのタッチ操作を説明するための模式図である。すなわち、ユーザは、図11に示すように、制御点80に指をタッチしたまま、その指をメッシュ画像の形状が頁画像10の形状に合致するように変形させたい方向に移動させる。CPU77は、タッチしている指の移動方向、移動量に応じて、ベジェ曲線で構成されたメッシュ画像上の制御点80を移動させる。メッシュ画像の形状は、制御点80の移動に連動してリアルタイムで変形することになる。   FIG. 11 is a schematic diagram for explaining a touch operation for individually operating and deforming the control points 80 of the mesh image 9 according to the present embodiment. That is, as shown in FIG. 11, the user moves the finger in a direction in which the user wants to deform the mesh image so that the shape of the mesh image matches the shape of the page image 10 while touching the control point 80 with the finger. The CPU 77 moves the control point 80 on the mesh image constituted by the Bezier curve according to the moving direction and moving amount of the touching finger. The shape of the mesh image is deformed in real time in conjunction with the movement of the control point 80.

詳細は後述するが、ユーザは、このような制御点80の移動をリアルタイムで確認しながら、湾曲補正の程度を強くしたり、弱くしたり、あるいは部分的に調整したりするために、メッシュ画像9の制御点80を1本の指のタッチ操作によって移動させて形状を変更することが可能となっている。   Although details will be described later, in order to increase, decrease, or partially adjust the degree of curvature correction while the user confirms such movement of the control point 80 in real time, the mesh image is used. The shape can be changed by moving the nine control points 80 by a touch operation of one finger.

一方、タッチ操作が2本の指以上である場合には(ステップS14のYES)、CPU77は、タッチしている指の動作(移動)を検出し(ステップS18)、どのような操作であるかを判断する(ステップS20)。本実施形態では、2指以上でのタッチ操作の場合、2本の指の間隔が変化する動作(伸縮)、又は2本の指の相対的な位置が維持された状態で2本の指がその中心点を回転軸として回転(円弧)する動作(回転)、又は2本の指の相対的な位置が維持された状態で2本の指が移動する動作(平行移動)のいずれであるかを判断する。   On the other hand, when the touch operation is two or more fingers (YES in step S14), the CPU 77 detects the operation (movement) of the touching finger (step S18), and what kind of operation is performed? Is determined (step S20). In the present embodiment, in the case of a touch operation with two or more fingers, the movement of the distance between the two fingers (expansion / contraction), or the two fingers are maintained while the relative positions of the two fingers are maintained. Whether to rotate (arc) around the center point as a rotation axis (rotation) or to move two fingers (parallel movement) while maintaining the relative position of the two fingers Judging.

ここで、上記伸縮、回転、平行移動について説明する。
図12(a)〜(c)は、本実施形態によるメッシュ画像9の制御点80を全て同時に操作して伸縮させるためのタッチ操作を説明するための模式図である。伸縮は、ある点を中心にそれぞれの制御点が遠くなったり、近づいたりする操作である。この伸縮操作によれば、ベジェ曲線で構成されるメッシュ画像9を、その形状を保ったまま大きくしたり小さくしたりできる。スマートフォンやタブレットなどのタッチデバイスでは、ピンチイン、ピンチアウトと呼ばれている操作法である。2本の指によるタッチ位置T1、T2の座標と該2本の指の中心点CPの座標とを、タッチ開始から数フレーム分だけ測定する。そして、中心点CPは、許容範囲の中で動いていないとし、2本の指によるタッチ位置T1、T2が、それぞれ中心点CPから許容範囲の中で放射方向に離れたり近づいたりすることによる移動ベクトル、すなわち、タッチ位置T1とタッチ位置T2とが互いに反対方向へ移動する移動ベクトルを検知すると、ユーザのタッチ操作が伸縮操作であると判断する。
Here, the expansion / contraction, rotation, and parallel movement will be described.
FIGS. 12A to 12C are schematic diagrams for explaining a touch operation for simultaneously operating and expanding and contracting all the control points 80 of the mesh image 9 according to the present embodiment. Expansion and contraction is an operation in which each control point moves away from or approaches a certain point. According to this expansion / contraction operation, the mesh image 9 composed of Bezier curves can be enlarged or reduced while maintaining its shape. For touch devices such as smartphones and tablets, this is an operation method called pinch-in or pinch-out. The coordinates of the touch positions T1 and T2 by the two fingers and the coordinates of the center point CP of the two fingers are measured for several frames from the start of the touch. Then, it is assumed that the center point CP does not move within the allowable range, and the touch positions T1 and T2 by the two fingers move by moving away from or approaching the radial direction within the allowable range from the center point CP, respectively. When detecting a vector, that is, a movement vector in which the touch position T1 and the touch position T2 move in directions opposite to each other, it is determined that the user's touch operation is an expansion / contraction operation.

図13(a)、(b)は、本実施形態によるメッシュ画像9の制御点80を全て同時に操作して回転させるためのタッチ操作を説明するための模式図である。回転は、ある点を中心にして全ての点が同じ角度だけ回転する操作である。この回転操作によれば、ベジェ曲線で構成されるメッシュ画像9は、その形状を保ったまま回転だけする。すなわち、最初から直線であった場合には、直線を保ったまま傾きが変わっていくような操作になる。操作方法を簡単に説明すると、2本の指でメッシュ画像9上にタッチし、一方の指のタッチ位置T1をある方向に、他方の指のタッチ位置T2を逆の方向になぞるように動かす。例えば、人差し指と中指を操作部(タッチパネル)75にタッチし、2本の指の中心点周りで指を回転させるようになぞれば回転操作となる。2本の指のタッチ位置T1、T2の座標と該2本の指の中心点CPの座標とを、タッチ開始から数フレーム分だけ測定する。そして、中心点CPは、許容範囲の中で動いていないとし、かつ2本の指によるタッチ位置T1、T2の移動ベクトルが逆方向になっていることを検知すると、ユーザのタッチ操作が回転操作であると判断する。   FIGS. 13A and 13B are schematic diagrams for explaining a touch operation for simultaneously operating and rotating all the control points 80 of the mesh image 9 according to the present embodiment. Rotation is an operation in which all points rotate by the same angle around a certain point. According to this rotation operation, the mesh image 9 composed of Bezier curves is only rotated while maintaining its shape. That is, if the line is straight from the beginning, the operation is such that the inclination changes while the straight line is maintained. The operation method will be briefly described. Touching the mesh image 9 with two fingers, the touch position T1 of one finger is moved in a certain direction and the touch position T2 of the other finger is traced in the opposite direction. For example, if the index finger and the middle finger are touched on the operation unit (touch panel) 75 and the finger is rotated around the center point of the two fingers, the rotation operation is performed. The coordinates of the touch positions T1 and T2 of the two fingers and the coordinates of the center point CP of the two fingers are measured for several frames from the start of the touch. Then, if the center point CP is not moved within the allowable range, and if it is detected that the movement vectors of the touch positions T1 and T2 by the two fingers are in opposite directions, the user's touch operation is a rotation operation. It is judged that.

図14(a)、(b)は、本実施形態によるメッシュ画像9の制御点80を全て同時に操作して平行移動させるためのタッチ操作を説明するための模式図である。また、平行移動は、全ての制御点80が同じ方向、同じ移動量で移動する操作である。操作方法を簡単に説明すると、2本の指でベジェ曲線で構成されるメッシュ画像9上をタッチし、タッチ位置T1、T2を同じ方向にずらすと、その移動量の分だけ全ての制御点80が同じ方向に移動する。例えば、人差し指と中指を操作部(タッチパネル)75にタッチし、手全体を動かすように画面をなぞれば平行移動操作となる。2本の指のタッチ位置T1、T2の座標と該2本の指の中心点CPの座標とをタッチ開始から数フレーム分だけ測定する。そして、それぞれの移動したベクトルが、ある許容範囲の中で同一であると検知すると、ユーザのタッチ操作が平行移動操作であると判断する。   FIGS. 14A and 14B are schematic diagrams for explaining a touch operation for simultaneously operating and controlling all the control points 80 of the mesh image 9 according to the present embodiment. The parallel movement is an operation in which all control points 80 move in the same direction and the same movement amount. The operation method will be briefly described. When the mesh image 9 composed of Bezier curves is touched with two fingers and the touch positions T1 and T2 are shifted in the same direction, all the control points 80 corresponding to the movement amount are obtained. Move in the same direction. For example, when the index finger and the middle finger are touched on the operation unit (touch panel) 75 and the screen is traced so as to move the entire hand, the translation operation is performed. The coordinates of the touch positions T1 and T2 of the two fingers and the coordinates of the center point CP of the two fingers are measured for several frames from the touch start. When it is detected that the moved vectors are the same within a certain allowable range, it is determined that the user's touch operation is a parallel movement operation.

図8に示すフローチャートに説明を戻すと、例えば、図12(a)に示すように、2本の指の間隔が変化する動作(伸縮)であった場合には(ステップS20の伸縮)、CPU77は、タッチしている2本の指の移動量に応じて、ベジェ曲線で構成されたメッシュ画像の制御点80の相対位置を変えることなく伸縮させる伸縮処理を実行する(ステップS22)。例えば、図12(b)に示すように、タッチした状態で2本の指のタッチ位置T1、T2の間隔が広がるように移動した場合には、メッシュ画像は、2本の指の移動量に応じて各制御点80の相対位置を変えることなく伸張(拡大)することになる。一方、図12(c)に示すように、タッチした状態で2本の指のタッチ位置T1、T2の間隔が狭まるように移動した場合には、メッシュ画像は、2本の指の移動量に応じて各制御点80の相対位置を変えることなく縮小することになる。   Returning to the flowchart shown in FIG. 8, for example, as shown in FIG. 12A, when the operation is to change the distance between two fingers (extension / contraction) (extension / contraction in step S <b> 20), the CPU 77. Performs an expansion / contraction process that expands / contracts without changing the relative position of the control point 80 of the mesh image formed by the Bezier curve according to the movement amount of the two touched fingers (step S22). For example, as shown in FIG. 12B, when the touch position is moved so that the distance between the touch positions T <b> 1 and T <b> 2 of the two fingers is widened, the mesh image indicates the amount of movement of the two fingers. Accordingly, the control points 80 are expanded (enlarged) without changing the relative positions thereof. On the other hand, as shown in FIG. 12 (c), when the touch position is moved so that the distance between the touch positions T1 and T2 of the two fingers is narrowed, the mesh image becomes the amount of movement of the two fingers. Accordingly, the control point 80 is reduced without changing the relative position.

より具体的には、伸縮の計算は、まず、2点のタッチ位置T1、T2の中心点CPの座標M(xm,ym)を記録する。タッチ位置の1つの座標だけを用いて、前回のフレームの座標A(xa,ya)、今回のフレームの座標B(xb,yb)とする。MA、MBの距離ra、rbとして、その1フレームの間での伸縮率c=rb/raとする。ある制御点XについてベクトルMXをc倍し、MX’とする。このベクトルの終点X’が伸縮後の制御点の座標である。これをフレームごとに全ての制御点80に適用し、表示を更新すれば、メッシュ画像9を伸縮させることができる。   More specifically, in the calculation of expansion / contraction, first, the coordinates M (xm, ym) of the center point CP of the two touch positions T1, T2 are recorded. Using only one coordinate of the touch position, the coordinate A (xa, ya) of the previous frame and the coordinate B (xb, yb) of the current frame are used. As the distances RA and rb of MA and MB, the expansion / contraction rate c / rb / ra between the frames is assumed. For a certain control point X, the vector MX is multiplied by c to be MX '. The end point X 'of this vector is the coordinate of the control point after expansion and contraction. If this is applied to all the control points 80 for each frame and the display is updated, the mesh image 9 can be expanded and contracted.

このように、メッシュ画像9の直線部分の形状を保ったまま、メッシュ画像9を自在に伸縮させることができる。これにより、頁画像10内の直線性を有する領域にメッシュ画像9を容易に合致させることができることになる。   Thus, the mesh image 9 can be freely expanded and contracted while maintaining the shape of the straight line portion of the mesh image 9. As a result, the mesh image 9 can be easily matched with the linear region in the page image 10.

一方、図13(a)に示すように、2本の指の相対的な位置が維持された状態で2本の指がその中心点を回転軸として回転(円弧)する動作(回転)であった場合には(ステップS20の回転)、CPU77は、タッチしている2本の指の回転方向に、かつ指の回転量(回転角度)に応じた回転量(回転角度)だけ、ベジェ曲線で構成された制御点80の相対位置を変えることなく、メッシュ画像9全体を2本の指の中心点CPを回転軸にして回転させる回転処理を実行する(ステップS24)。例えば、図13(b)に示すように、タッチした状態で2本の指が反時計回りに回転した場合には、メッシュ画像9は、2本の指の回転方向に、移動量に応じて各制御点80の相対位置を変えることなく回転することになる。   On the other hand, as shown in FIG. 13 (a), the two fingers rotate (circulate) around the center point thereof as a rotation axis while maintaining the relative position of the two fingers (rotation). In the case of (rotation of step S20), the CPU 77 uses a Bezier curve in the rotation direction of the two touching fingers and the rotation amount (rotation angle) corresponding to the rotation amount (rotation angle) of the finger. Without changing the relative position of the configured control point 80, a rotation process for rotating the entire mesh image 9 around the center point CP of the two fingers as the rotation axis is executed (step S24). For example, as shown in FIG. 13B, when two fingers rotate counterclockwise in a touched state, the mesh image 9 corresponds to the amount of movement in the rotation direction of the two fingers. It will rotate without changing the relative position of each control point 80.

より具体的には、回転の導出方法には2種類考えられる。
(1)タッチ位置T1、T2の2点の中心点CPを回転軸として回転させる場合の導出方法
(2)タッチ位置T1、T2の2点のフレームごとの移動量を計算し、回転軸の点を導出、その軸周りに回転させる場合の導出方法
More specifically, there are two types of rotation derivation methods.
(1) Derivation method in the case of rotating with the center point CP of the two touch positions T1 and T2 as the rotation axis (2) The amount of movement for each frame of the two touch positions T1 and T2 is calculated, Derivation method when rotating around the axis

上記(2)は正確であるが、フレームごとに回転軸が変わり不安定になる(微小に振動してしまう)ので何らかの補正が必要である。上記(1)は実際と多少異なるが安定する。また、正確ではないが、指と指の間の回転軸は中心点CPとそう変わらないと思われる。実際に違和感はない。よって上記(1)の例を説明する。   The above (2) is accurate, but some correction is necessary because the rotation axis changes every frame and becomes unstable (slightly vibrates). The above (1) is slightly different from the actual but stable. Moreover, although not accurate, it seems that the rotation axis between fingers is not so different from the center point CP. There is actually no sense of incongruity. Therefore, the example (1) will be described.

まず、中心点CPの座標M(xm,ym)を記録する。情報処理端末7が回転の角度を検出できる機能を有している場合にはその角度を用いればよい。そうでない場合には、タッチした座標のうち1つを用いて、前回のフレームの座標の点A(xa,ya)、今回のフレームの座標B(xb,yb)とすると、ベクトルMA、ベクトルMBの内積から
MA・MB=|MA||MB|cosθ
より、cosθ・sinθがそれぞれ求まる(θは回転角度である)。
First, the coordinates M (xm, ym) of the center point CP are recorded. If the information processing terminal 7 has a function of detecting the rotation angle, the angle may be used. Otherwise, using one of the touched coordinates as the point A (xa, ya) of the previous frame coordinate and the coordinate B (xb, yb) of the current frame, vector MA and vector MB MA · MB = | MA || MB | cosθ
Thus, cos θ and sin θ are respectively obtained (θ is a rotation angle).

次に、制御点80を回転させる。
制御点80の1つをX(x,y)とする。回転行列を用いて制御点80の座標を変換したいので、回転軸である中心点CPの座標Mを原点に移すように座標Xを変換する。
X’=X−M=(x−xm,y−ym)=(x’,y’)
Next, the control point 80 is rotated.
One of the control points 80 is assumed to be X (x, y). Since it is desired to convert the coordinates of the control point 80 using the rotation matrix, the coordinates X are converted so that the coordinates M of the center point CP, which is the rotation axis, are moved to the origin.
X ′ = X−M = (x−xm, y−ym) = (x ′, y ′)

このX’に回転行列を乗算し、
x’’=x’cosθ−y’sinθ
y’’=x’sinθ+y’cosθ
を得る。
Multiply this X 'by the rotation matrix,
x ″ = x′cos θ−y′sin θ
y ″ = x′sin θ + y′cos θ
Get.

この座標は、中心点が原点となっている座標系であるので、元に戻す。
(x’’+xm,y’’+ym)
この座標が回転後の制御点80の座標である。これをフレームごとに全ての制御点80に対して変更し、メッシュ画像9の表示を更新することで回転することになる。
Since this coordinate system is a coordinate system in which the center point is the origin, it is restored.
(X ″ + xm, y ″ + ym)
This coordinate is the coordinate of the control point 80 after rotation. This is changed for every control point 80 for each frame, and the display of the mesh image 9 is updated to rotate.

回転については、更に3本の指によるタッチ操作も考えられる。
実際の使用例では、メッシュ画像9を構成する上下2本のベジェ曲線を用い、このベジェ曲線を2本とも回転させる処理にする。すなわち、3本の指でタッチした場合の中心点CPを回転軸にし、上述した演算を上下のベジェ曲線の全ての制御点80(上5点、下5点 計10点)に適用する。このようにすれば、メッシュ画像9の形状全体が保たれたまま回転させることができる。
Regarding rotation, a touch operation with three fingers is also conceivable.
In an actual usage example, two upper and lower Bezier curves constituting the mesh image 9 are used, and the two Bezier curves are rotated. That is, the center point CP when touched by three fingers is set as the rotation axis, and the above-described calculation is applied to all control points 80 (upper five points, lower five points, ten points in total) of the upper and lower Bezier curves. In this way, the mesh image 9 can be rotated while the entire shape is maintained.

図15(a)、(b)は、本実施形態による、3本の指によるタッチ操作でメッシュ画像を回転させる場合の様子を示す模式図である。3本の指の場合にも2本の指のときと同様に、図15(a)に示すように、3本の指の相対的なタッチ位置T1、T2、T3が維持された状態で3本の指がその中心点CPを回転軸にして回転(円弧)させると、図15(b)に示すように、タッチしている3本の指の回転方向に、3本の指の中心点CPを回転軸にしてメッシュ画像9全体を指の回転量(回転角度)に応じた回転量(回転角度)だけ回転させる。   FIGS. 15A and 15B are schematic diagrams illustrating a state in which a mesh image is rotated by a touch operation with three fingers according to the present embodiment. In the case of three fingers, as in the case of two fingers, as shown in FIG. 15 (a), the relative touch positions T1, T2, and T3 of the three fingers are maintained. When two fingers are rotated (circular) around the center point CP as a rotation axis, the center points of the three fingers are rotated in the direction of rotation of the three fingers touching, as shown in FIG. The entire mesh image 9 is rotated by the rotation amount (rotation angle) corresponding to the rotation amount (rotation angle) of the finger with CP as the rotation axis.

このように、メッシュ画像の直線部分の形状を保ったまま、メッシュ画像を自在に回転させることができる。これにより、頁画像10内の直線性を有する領域にメッシュ画像を容易に合致させることができることになる。   Thus, the mesh image can be freely rotated while maintaining the shape of the straight line portion of the mesh image. As a result, the mesh image can be easily matched with a linear region in the page image 10.

一方、図14(a)に示すように、2本の指の相対的なタッチ位置T1、T2が維持された状態で2本の指が移動する動作(平行移動)であった場合には(ステップS20の平行移動)、CPU77は、タッチしている2本の指の移動方向に、かつ指の移動量に応じて、ベジェ曲線で構成されたメッシュ画像の各制御点80の相対位置を変えることなく、メッシュ画像9全体を平行移動させる平行移動処理を実行する(ステップS26)。例えば、図14(b)に示すように、タッチした状態で2本の指が図面の下方に移動した場合には、メッシュ画像9は、2本の指の移動方向に、指の移動量に応じて各制御点80の相対位置を変えることなく平行移動することになる。
より具体的には、平行移動の導出は、前回のフレームと今回のフレームから中心点CPの移動ベクトルを計算し、5点の制御点80の座標それぞれに移動ベクトルを足して新たな制御点80の座標とし、制御点80の表示も更新する。
On the other hand, as shown in FIG. 14A, when the movement of two fingers (parallel movement) is performed while the relative touch positions T1 and T2 of the two fingers are maintained ( In step S20, the CPU 77 changes the relative position of each control point 80 of the mesh image formed by the Bezier curve in the direction of movement of the two touching fingers and in accordance with the amount of movement of the fingers. The parallel movement process for translating the entire mesh image 9 is executed (step S26). For example, as shown in FIG. 14 (b), when two fingers move downward in the drawing state, the mesh image 9 indicates the amount of finger movement in the direction of movement of the two fingers. Accordingly, the control points 80 are moved in parallel without changing the relative positions.
More specifically, the translation is derived by calculating the movement vector of the center point CP from the previous frame and the current frame, and adding the movement vector to each of the coordinates of the five control points 80 to obtain a new control point 80. The display of the control point 80 is also updated.

このように、メッシュ画像の直線部分の形状を保ったまま、メッシュ画像を自在に平行移動させることができる。これにより、頁画像10内の直線性を有する領域にメッシュ画像を容易に合致させることができることになる。   Thus, the mesh image can be freely translated while maintaining the shape of the straight line portion of the mesh image. As a result, the mesh image can be easily matched with a linear region in the page image 10.

CPU77は、上述したステップS16、S22、S24、又はS26にて、メッシュ画像9(制御点80)をユーザのタッチ操作に応じて変形、伸縮、回転、平行移動させた後、処理後のメッシュ画像9を頁画像10上に重畳させて表示部71に出力する(ステップS28)。次に、CPU77は、次の処理、すなわち、メッシュ画像9に基づく頁画像10に対する湾曲補正処理又は台形補正処理へ進むか否かを判断する(ステップS30)。   In step S16, S22, S24, or S26 described above, the CPU 77 deforms, expands, contracts, rotates, or translates the mesh image 9 (control point 80) according to the user's touch operation, and then processes the mesh image. 9 is superimposed on the page image 10 and output to the display unit 71 (step S28). Next, the CPU 77 determines whether or not to proceed to the next process, that is, the curvature correction process or the trapezoidal correction process for the page image 10 based on the mesh image 9 (step S30).

ユーザは、ステップS28で表示されるメッシュ画像9を視認し、まだ頁画像10に合致しておらず、更にメッシュ画像9の形状、大きさ、角度、位置を修正させる必要があると判断すれば、例えばタッチ操作などによってメッシュ画像9の変形処理に戻る指示を入力する。一方、メッシュ画像9が頁画像10に十分精度よく合致していれば、例えばタッチ操作などによって次の処理へ進む指示を入力する。あるいは、ユーザは、メッシュ画像9がまだ頁画像10に合致しておらず、更にメッシュ画像9の形状、大きさ、角度、位置を修正させる必要があると判断した場合には何も指示せず、頁画像10に十分精度よく合致していれば、次の処理へ進む指示を入力するようにしてもよい。   If the user visually recognizes the mesh image 9 displayed in step S28 and determines that the mesh image 9 does not match the page image 10 yet and the shape, size, angle, and position of the mesh image 9 need to be corrected. For example, an instruction to return to the deformation process of the mesh image 9 is input by a touch operation or the like. On the other hand, if the mesh image 9 matches the page image 10 with sufficient accuracy, an instruction to proceed to the next process is input by, for example, a touch operation. Alternatively, if the user determines that the mesh image 9 does not yet match the page image 10 and that the shape, size, angle, and position of the mesh image 9 need to be corrected, no instruction is given. If the page image 10 matches with sufficient accuracy, an instruction to proceed to the next process may be input.

そして、メッシュ画像9の変形処理に戻る指示が入力された場合、あるいは次の処理へ進む指示が入力されない場合には(ステップS30のNO)、CPU77は、ステップS12に戻り、上述したメッシュ画像9の修正を行う処理を繰り返す。ユーザから見た場合、表示部71に表示されるメッシュ画像9に対して所定のタッチ操作を行うことで、処理が途切れることなく、連続してメッシュ画像9の形状を変形させたり、メッシュ画像9の大きさや、角度、位置を変えたりすることが可能である。   When an instruction to return to the deformation process of the mesh image 9 is input or when an instruction to proceed to the next process is not input (NO in step S30), the CPU 77 returns to step S12 and returns to the mesh image 9 described above. Repeat the process to correct. When viewed from the user, by performing a predetermined touch operation on the mesh image 9 displayed on the display unit 71, the shape of the mesh image 9 can be continuously deformed without interruption, or the mesh image 9 It is possible to change the size, the angle, and the position.

そして、ユーザは、ステップS28で表示されるメッシュ画像9を視認し、メッシュ画像9が頁画像10に十分精度よく合致していると判断し、次の処理へ進む指示を入力した場合には(ステップS30のYES)、CPU77は、現時点のメッシュ画像9の形状に基づいて、頁画像10が略矩形状になるように頁画像10に対して湾曲補正処理又は矩形補正処理又は台形補正処理を選択的に施す(ステップS32)。より具体的には、CPU77は、メッシュ画像9が湾曲形状である場合には、頁画像10に対して湾曲補正処理を実行し、メッシュ画像9が矩形形状である場合には、頁画像10に対して矩形補正処理を実行し、メッシュ画像9が台形形状である場合には、頁画像10に対して台形補正処理を実行する。   When the user visually recognizes the mesh image 9 displayed in step S28, determines that the mesh image 9 matches the page image 10 with sufficient accuracy, and inputs an instruction to proceed to the next process ( Based on the current shape of the mesh image 9, the CPU 77 selects a curvature correction process, a rectangular correction process, or a trapezoid correction process for the page image 10 so that the page image 10 has a substantially rectangular shape. (Step S32). More specifically, the CPU 77 performs a curvature correction process on the page image 10 when the mesh image 9 has a curved shape, and converts the page image 10 into a page image 10 when the mesh image 9 has a rectangular shape. On the other hand, the rectangle correction process is executed, and when the mesh image 9 has a trapezoidal shape, the keystone correction process is executed on the page image 10.

より詳細には、CPU77は、まず、メッシュ画像9の最上部の上線ULと最下部の下線DLの制御点が、どちらの組も一直線上に並んでいるか否か、すなわち、上線ULと下線DLがどちらも直線であるか否かを判断する(図9のステップS40)。そして、上線ULと下線DLがどちらも直線である場合には(ステップS40のYES)、CPU77は、上線ULの左右の端点と下線DLの左右の端点とが、横方向に対する位置及び直線(上線ULと下線DL)の長さが等しく、かつその直線(上線ULと下線DL)が平行であるか否かを判断する(ステップS42)。   More specifically, the CPU 77 first determines whether or not both sets of control points of the uppermost line UL and the lowermost line DL of the mesh image 9 are aligned, that is, the upper line UL and the lower line DL. Are both straight lines (step S40 in FIG. 9). When the upper line UL and the lower line DL are both straight lines (YES in step S40), the CPU 77 determines that the left and right end points of the upper line UL and the left and right end points of the lower line DL are in the horizontal position and straight line (upper line). It is determined whether the lengths of UL and underline DL are equal and the straight lines (upper line UL and underline DL) are parallel (step S42).

そして、メッシュ画像9の上線ULと下線DLの始点の横方向に対する位置、及び直線の長さが等しく、かつその直線(上線ULと下線DL)が平行である場合には(ステップS42のYES)、CPU77は、メッシュ画像9(頁画像10)は矩形形状(直方体)であるので、該メッシュ画像9から導出される補正パラメータに基づいて、頁画像10に対して矩形補正処理(矩形トリミング)を実行する(ステップS44)。その後、図8のフローチャートに戻る。   Then, when the positions of the start points of the upper line UL and the lower line DL in the mesh image 9 in the horizontal direction and the lengths of the straight lines are equal and the straight lines (the upper line UL and the lower line DL) are parallel (YES in step S42). The CPU 77 performs rectangular correction processing (rectangular trimming) on the page image 10 based on the correction parameters derived from the mesh image 9 because the mesh image 9 (page image 10) has a rectangular shape (cuboid). Execute (Step S44). Thereafter, the process returns to the flowchart of FIG.

一方、上線ULと下線DLがどちらも直線であるが(ステップS40のYES)、「メッシュ画像9の上線ULと下線DLの始点の横方向に対する位置、及び直線の長さが等しく、かつその直線(上線ULと下線DL)が平行」でない場合には(ステップS42のNO)、CPU77は、メッシュ画像9(頁画像10)が台形形状(又は、四角形)であるので、該メッシュ画像9から導出される補正パラメータに基づいて、頁画像10に対して台形補正処理(台形トリミング)を実行する(ステップS46)。なお、台形補正処理では、一般に透視変換と呼ばれる処理を行う。その後、図8のフローチャートに戻る。   On the other hand, although the upper line UL and the lower line DL are both straight lines (YES in step S40), “the positions of the start points of the upper line UL and the lower line DL in the horizontal direction in the mesh image 9 and the lengths of the straight lines are equal, and the straight lines When (the upper line UL and the lower line DL) are not parallel ”(NO in step S42), the CPU 77 derives from the mesh image 9 because the mesh image 9 (page image 10) has a trapezoidal shape (or a quadrangle). Based on the correction parameters to be performed, a keystone correction process (trapezoidal trimming) is performed on the page image 10 (step S46). In the trapezoidal correction process, a process generally called perspective transformation is performed. Thereafter, the process returns to the flowchart of FIG.

一方、上線ULと下線DLがどちらも直線でない場合、すなわち少なくともいずれか一方でも直線でない場合には(ステップS40のNO)、CPU77は、メッシュ画像9(頁画像10)が湾曲形状であるので、該メッシュ画像9から導出される補正パラメータに基づいて、頁画像10に対して湾曲補正処理(湾曲トリミング)を実行する(ステップS48)。その後、図8のフローチャートに戻る。   On the other hand, when neither the upper line UL nor the lower line DL is a straight line, that is, at least one of them is not a straight line (NO in step S40), the CPU 77 determines that the mesh image 9 (page image 10) has a curved shape. Based on the correction parameter derived from the mesh image 9, a curvature correction process (curve trimming) is performed on the page image 10 (step S48). Thereafter, the process returns to the flowchart of FIG.

このように、メッシュ画像9の上線ULと下線DLにおける制御点の組に対してどのような位置関係かを調べ、その位置関係からメッシュ画像9(頁画像10)の形状を判別し、該メッシュ画像9(頁画像10)の形状に適した歪み補正処理アルゴリズムを選択して処理することで、ユーザの操作を煩雑にすることなく、処理時間の短縮を図ることができる。   In this way, the positional relationship with respect to the set of control points in the upper line UL and the lower line DL of the mesh image 9 is examined, the shape of the mesh image 9 (page image 10) is determined from the positional relationship, and the mesh By selecting and processing a distortion correction processing algorithm suitable for the shape of the image 9 (page image 10), the processing time can be shortened without complicating the user's operation.

次に、図8に説明を戻すと、CPU77は、処理後の頁画像10と当該頁画像10上に重畳させたメッシュ画像9とを再び表示部71に出力する(ステップS34)。なお、ステップS30にて、CPU77が、画像認識を用いて、処理後のメッシュ画像9と頁画像10とを比較し、所定の条件(互いのずれが許容範囲内であるかなど)に合致していれば、メッシュ画像9が頁画像10に十分精度よく合致していると判断し、自動的に次の処理へ進むようにしてもよい。   Next, returning to FIG. 8, the CPU 77 again outputs the processed page image 10 and the mesh image 9 superimposed on the page image 10 to the display unit 71 (step S34). In step S30, the CPU 77 compares the processed mesh image 9 with the page image 10 using image recognition, and meets a predetermined condition (whether the mutual deviation is within an allowable range). If so, it may be determined that the mesh image 9 matches the page image 10 with sufficient accuracy, and the process may automatically proceed to the next process.

次に、CPU77は、当該処理を終了するか、あるいは他の頁画像10に対してもメッシュ画像9を変形するかを判断する(ステップS36)。ユーザは、当該処理を終了するか、あるいは他の頁画像10に対してもメッシュ画像9の編集を行うかの指示を入力する。そして、他の頁画像10に対してもメッシュ画像の編集を行う指示が入力された場合には(ステップS36のNO)、ステップS10に戻り、他の頁画像10(例えば、次の頁画像10やユーザにより指定された頁の頁画像10)に対して、上述したステップS10以降の処理を繰り返す。一方、当該処理を終了する指示が入力された場合には(ステップS36のYES)、当該処理を終了する。   Next, the CPU 77 determines whether to end the processing or to deform the mesh image 9 for the other page images 10 (step S36). The user inputs an instruction to end the process or to edit the mesh image 9 for the other page images 10. If an instruction to edit the mesh image is input to another page image 10 (NO in step S36), the process returns to step S10, and another page image 10 (for example, the next page image 10) is input. For the page image 10) of the page specified by the user or the user, the processing from step S10 onward is repeated. On the other hand, when an instruction to end the process is input (YES in step S36), the process ends.

上述した補正処理は、1頁の頁画像10に対する処理であったが、基本的には、最初の頁画像10と最後の頁画像10に対して同様の補正処理を実行する。CPU77は、最初の頁画像10に対するメッシュ画像9の形状と、最後の頁画像10に対するメッシュ画像9の形状とに基づいて、中間の頁画像10に対する補正パラメータを導出する。具体的には、まず、最初の頁Pから最後の頁Pにおける各制御点80の移動量を導出し、該移動量を頁数に基づいて各頁の補正パラメータを線形で補間して導出する。これにより、最初の頁画像10、中間の頁画像10、及び最後の頁画像10に対して、それぞれの頁に対する補正パラメータに基づいて補正処理を実行する。   The correction process described above is a process for the page image 10 of one page, but basically the same correction process is executed for the first page image 10 and the last page image 10. The CPU 77 derives correction parameters for the intermediate page image 10 based on the shape of the mesh image 9 for the first page image 10 and the shape of the mesh image 9 for the last page image 10. Specifically, first, the amount of movement of each control point 80 from the first page P to the last page P is derived, and the amount of movement is derived by linearly interpolating correction parameters for each page based on the number of pages. . Thereby, the correction process is executed on the first page image 10, the intermediate page image 10, and the last page image 10 based on the correction parameters for the respective pages.

また、上述した実施形態において、途中の頁を撮影し忘れていたり、撮影状態に不具合があったりし、途中の頁の撮り直しを行なった場合など、その頁画像10に対して単独で上述したメッシュ画像9の編集を行って補正パラメータを導出するようにしてもよい。この場合、途中の頁画像10に対して、最初の頁画像10や、最後の頁画像10とは異なる形状のメッシュ画像9が適用されたとしても、そのメッシュ画像9の形状に応じた補正処理が選択的に適用される。   Further, in the above-described embodiment, the page image 10 is alone described above, for example, when the intermediate page is forgotten to be shot or there is a problem in the shooting state, and the intermediate page is retaken. The correction parameter may be derived by editing the mesh image 9. In this case, even if the first page image 10 or the mesh image 9 having a shape different from that of the last page image 10 is applied to the intermediate page image 10, correction processing according to the shape of the mesh image 9 is performed. Is applied selectively.

上述した本実施形態によれば、タッチパネル75上へのユーザによるタッチ操作に応じて、メッシュ画像9を伸縮、回転、移動、又はその形状を変形させ、該編集後のメッシュ画像9の形状に基づいて、複数の歪み補正処理のうち1つの歪み補正処理を選択し、該選択された歪み補正処理に従って、処理対象の頁画像10の形状を補正するようにしたので、ユーザの利便性を損なうことなく、頁画像10の歪み方に対応する歪み補正処理を選択的に切り替えて実行することができる。   According to the present embodiment described above, the mesh image 9 is expanded / contracted, rotated, moved, or deformed in accordance with the touch operation by the user on the touch panel 75, and based on the shape of the edited mesh image 9. Since one distortion correction process is selected from the plurality of distortion correction processes and the shape of the page image 10 to be processed is corrected according to the selected distortion correction process, the user's convenience is impaired. The distortion correction processing corresponding to the distortion method of the page image 10 can be selectively switched and executed.

この結果、1つの本Bに対する頁画像10に対して、それぞれの頁画像10に応じた歪み補正処理が選択的に切り替えて処理されるので、精度が必要な頁画像10に対しては高精度な歪み処理(湾曲補正処理)、精度がそれほど必要とされない頁画像10に対しては処理速度が速い歪み処理(矩形補正処理又は台形補正処理)というように、精度を低下させることなく、全体の処理時間短縮を期待できる。   As a result, since the distortion correction processing corresponding to each page image 10 is selectively switched for the page image 10 for one book B, high accuracy is obtained for the page image 10 that requires accuracy. Distortion processing (curvature correction processing), and for page images 10 that do not require much accuracy, distortion processing (rectangular correction processing or trapezoid correction processing) with high processing speed can be used without reducing accuracy. Reduction of processing time can be expected.

また、上述した本実施形態によれば、編集後のメッシュ画像9を構成する上側又は下側のベジェ曲線の制御点のそれぞれが直線をなさない場合に湾曲補正処理を選択するようにしたので、ユーザの利便性を損なうことなく、頁画像10の歪み方に対応する湾曲補正処理に切り替えて実行することができる。   Further, according to the above-described embodiment, the curvature correction process is selected when each of the upper or lower Bezier control points constituting the edited mesh image 9 does not form a straight line. Without sacrificing the convenience of the user, it is possible to switch to and execute the curvature correction processing corresponding to the distortion method of the page image 10.

また、上述した本実施形態によれば、編集後のメッシュ画像9を構成する上側及び下側のベジェ曲線の制御点のそれぞれが直線をなし、且つ、ベジェ曲線の上側及び下側の左端、及び上側及び下側の右端の制御点の水平方向の位置が同じである場合に矩形補正処理を選択するようにしたので、ユーザの利便性を損なうことなく、頁画像10の歪み方に対応する矩形補正処理に切り替えて実行することができる。   Further, according to the above-described embodiment, each of the control points of the upper and lower Bezier curves constituting the edited mesh image 9 forms a straight line, and the upper left and lower left ends of the Bezier curve, and Since the rectangular correction processing is selected when the horizontal positions of the upper and lower right end control points are the same, the rectangle corresponding to the distortion method of the page image 10 without impairing the user's convenience. It can be executed by switching to the correction process.

また、上述した本実施形態によれば、編集後のメッシュ画像9を構成する上側及び下側のベジェ曲線の制御点のそれぞれが直線をなし、且つ、編集後のメッシュ画像9の外形が台形である場合に台形補正処理を選択するようにしたので、ユーザの利便性を損なうことなく、頁画像10の歪み方に対応する台形補正処理に切り替えて実行することができる。   Further, according to this embodiment described above, each of the control points of the upper and lower Bezier curves constituting the edited mesh image 9 forms a straight line, and the outer shape of the edited mesh image 9 is trapezoidal. Since the trapezoid correction process is selected in some cases, the trapezoid correction process corresponding to the distortion method of the page image 10 can be switched and executed without impairing the convenience for the user.

また、上述した本実施形態によれば、タッチ操作がメッシュ画像9を構成する上側又は下側のベジェ曲線上の複数の制御点80のうち、いずれか1つの制御点80に対する個別操作である場合に、タッチ操作により指定された1つの制御点80を、タッチ操作に応じて移動させることで、メッシュ画像9の形状を変形し、タッチ操作が複数の制御点80を同時に操作する全体操作である場合に、複数の制御点80を同一条件でタッチ操作に応じて移動させることで、メッシュ画像9を伸縮、回転、又は移動するようにしたので、ユーザの利便性を損なうことなく、より容易な操作でメッシュ画像9の形状を頁画像10の形状に合致させることができる。   Moreover, according to this embodiment mentioned above, when touch operation is individual operation with respect to any one control point 80 among the several control points 80 on the upper or lower Bezier curve which comprises the mesh image 9. FIG. In addition, by moving one control point 80 designated by the touch operation according to the touch operation, the shape of the mesh image 9 is deformed, and the touch operation is an overall operation for simultaneously operating the plurality of control points 80. In this case, the mesh image 9 can be expanded, contracted, rotated, or moved by moving the plurality of control points 80 in accordance with the touch operation under the same conditions, so that it is easier without sacrificing user convenience. The shape of the mesh image 9 can be matched with the shape of the page image 10 by operation.

また、上述した本実施形態によれば、個別操作は、タッチパネル75上へのタッチ操作が1本の指によるタッチであり、全体操作は、タッチパネル75上へのタッチ操作が2本以上の指による同時タッチであるようにしたので、ユーザの利便性を損なうことなく、より容易な操作でメッシュ画像9の形状を頁画像10の形状に合致させることができる。   Further, according to the above-described embodiment, the individual operation is a touch operation on the touch panel 75 with one finger, and the entire operation is a touch operation on the touch panel 75 with two or more fingers. Since the simultaneous touch is performed, the shape of the mesh image 9 can be matched with the shape of the page image 10 by an easier operation without impairing the convenience of the user.

また、上述した本実施形態によれば、1本の指がタッチパネル75上をドラッグされる際の移動方向、及び移動量に基づいて、1本の指でタッチされた1つの制御点80を移動することでメッシュ画像9の形状を変形し、2本以上の指がタッチパネル75上をドラッグされる際の移動方向、及び移動量に基づいて、複数の制御点80を移動することでメッシュ画像9の形状を伸縮、回転、又は移動するようにしたので、ユーザの利便性を損なうことなく、より容易な操作でメッシュ画像9の形状を頁画像10の形状に合致させることができる。   Further, according to the present embodiment described above, one control point 80 touched with one finger is moved based on the moving direction and moving amount when one finger is dragged on the touch panel 75. Thus, the mesh image 9 is deformed, and the mesh image 9 is moved by moving the plurality of control points 80 based on the moving direction and the moving amount when two or more fingers are dragged on the touch panel 75. The shape of the mesh image 9 can be matched with the shape of the page image 10 by an easier operation without impairing the convenience of the user.

以上、この発明のいくつかの実施形態について説明したが、この発明は、これらに限定されるものではなく、特許請求の範囲に記載された発明とその均等の範囲を含むものである。
以下に、本願出願の特許請求の範囲に記載された発明を付記する。
As mentioned above, although several embodiment of this invention was described, this invention is not limited to these, The invention described in the claim, and its equal range are included.
Below, the invention described in the claims of the present application is appended.

(付記1)
付記1に記載の発明は、表示機能及びタッチ入力機能を有する入力表示部に、処理対象の画像とメッシュ画像とを重畳表示する表示制御手段と、前記入力表示部へのユーザによるタッチ操作を検出する検出手段と、前記検出手段によって検出されたタッチ操作に応じて、前記メッシュ画像を伸縮、回転、移動、又はその形状を変形する編集手段と、前記編集手段による編集後のメッシュ画像の形状に基づいて、複数の歪み補正処理のうち1つの歪み補正処理を選択する選択手段と、前記選択手段によって選択された歪み補正処理によって、前記処理対象の画像の形状を補正する補正手段と、を備えることを特徴とする頁画像補正装置である。
(Appendix 1)
The invention according to appendix 1 includes a display control unit that superimposes and displays an image to be processed and a mesh image on an input display unit having a display function and a touch input function; Detecting means for performing, editing means for expanding / contracting, rotating, moving, or deforming the mesh image in accordance with the touch operation detected by the detecting means, and the shape of the mesh image after editing by the editing means. A selection unit that selects one of the plurality of distortion correction processes, and a correction unit that corrects the shape of the image to be processed by the distortion correction process selected by the selection unit. This is a page image correction apparatus characterized by the above.

(付記2)
付記2に記載の発明は、前記選択手段は、前記編集後のメッシュ画像を構成する上側又は下側のベジェ曲線の制御点のそれぞれが直線をなさない場合に湾曲補正処理を選択する、ことを特徴とする付記1に記載の頁画像補正装置である。
(Appendix 2)
The invention according to attachment 2 is characterized in that the selection means selects the curvature correction processing when each of the control points of the upper or lower Bezier curve constituting the edited mesh image does not form a straight line. The page image correction apparatus according to Supplementary Note 1, wherein the page image correction apparatus is characterized.

(付記3)
付記3に記載の発明は、前記選択手段は、前記編集後のメッシュ画像を構成する上側及び下側のベジェ曲線の制御点のそれぞれが直線をなし、且つ、前記ベジェ曲線の上側及び下側の左端、及び上側及び下側の右端の制御点の水平方向の位置が同じである場合に矩形補正処理を選択する、ことを特徴とする付記1又は2に記載の頁画像補正装置である。
(Appendix 3)
According to the third aspect of the present invention, the selection means is configured so that each of the control points of the upper and lower Bezier curves constituting the edited mesh image forms a straight line, and the upper and lower sides of the Bezier curve. The page image correction apparatus according to appendix 1 or 2, wherein the rectangular correction processing is selected when the horizontal positions of the control points at the left end and the upper and lower right ends are the same.

(付記4)
付記4に記載の発明は、前記選択手段は、前記編集後のメッシュ画像を構成する上側及び下側のベジェ曲線の制御点のそれぞれが直線をなし、且つ、前記編集後のメッシュ画像の外形が台形である場合に台形補正処理を選択する、ことを特徴とする付記1乃至3のいずれか一つに記載の頁画像補正装置である。
(Appendix 4)
In the invention according to appendix 4, the selection means is such that each of the control points of the upper and lower Bezier curves constituting the edited mesh image is a straight line, and the outer shape of the edited mesh image is The page image correction apparatus according to any one of appendices 1 to 3, wherein a trapezoidal correction process is selected in the case of a trapezoid.

(付記5)
付記5に記載の発明は、前記台形補正処理は、透視変換を含む、ことを特徴とする付記4に記載の頁画像補正装置である。
(Appendix 5)
The invention according to appendix 5 is the page image correction device according to appendix 4, wherein the trapezoidal correction processing includes perspective transformation.

(付記6)
付記6に記載の発明は、前記編集手段は、前記検出手段によって検出されたタッチ操作が、前記メッシュ画像を構成する上側又は下側のベジェ曲線上の複数の制御点のうち、いずれか1つの制御点に対する個別操作である場合に、前記タッチ操作により指定された1つの制御点を、前記タッチ操作に応じて移動させることで、前記メッシュ画像の形状を変形し、前記検出手段によって検出されたタッチ操作が、前記複数の制御点を同時に操作する全体操作である場合に、前記複数の制御点を同一条件で前記タッチ操作に応じて移動させることで、前記メッシュ画像を伸縮、回転、又は移動する、ことを特徴とする付記1乃至5のいずれか一つに記載の頁画像補正装置である。
(Appendix 6)
The invention according to appendix 6 is that the editing unit is configured such that the touch operation detected by the detecting unit is any one of a plurality of control points on an upper or lower Bezier curve constituting the mesh image. When the control point is an individual operation, the shape of the mesh image is deformed by moving one control point designated by the touch operation according to the touch operation, and is detected by the detection unit. When the touch operation is an overall operation for simultaneously operating the plurality of control points, the mesh image is expanded, contracted, rotated, or moved by moving the plurality of control points according to the touch operation under the same conditions. The page image correction device according to any one of appendices 1 to 5, wherein

(付記7)
付記7に記載の発明は、前記個別操作は、前記入力表示部へのタッチ操作が1本の指によるタッチであり、前記全体操作は、前記入力表示部へのタッチ操作が2本以上の指による同時タッチである、ことを特徴とする付記6に記載の頁画像補正装置。である。
(Appendix 7)
In the invention according to appendix 7, the individual operation is a touch operation on the input display unit with one finger, and the overall operation is a touch operation on the input display unit with two or more fingers. The page image correction apparatus according to appendix 6, wherein simultaneous page touch is performed. It is.

(付記8)
付記8に記載の発明は、前記編集手段は、前記1本の指が前記入力表示部上をドラッグされる際の移動方向、及び移動量に基づいて、前記1本の指でタッチされた1つの制御点を移動することで前記メッシュ画像の形状を変形し、前記2本以上の指が前記入力表示部上をドラッグされる際の移動方向、及び移動量に基づいて、前記複数の制御点を移動することで前記メッシュ画像の形状を伸縮、回転、又は移動する、ことを特徴とする付記7に記載の頁画像補正装置である。
(Appendix 8)
In the invention according to attachment 8, the editing unit is touched with the one finger based on a moving direction and a moving amount when the one finger is dragged on the input display unit. The shape of the mesh image is deformed by moving one control point, and the plurality of control points are based on a moving direction and a moving amount when the two or more fingers are dragged on the input display unit. The page image correction apparatus according to appendix 7, wherein the shape of the mesh image is expanded, contracted, rotated, or moved by moving.

(付記9)
付記9に記載の発明は、処理対象の画像に重畳して表示されているメッシュ画像の形状に基づいて、前記処理対象の画像の形状を補正する頁画像補正方法であって、前記処理対象の画像と前記メッシュ画像とを表示する入力表示部へのユーザによるタッチ操作を検出するステップと、前記検出されたタッチ操作に応じて、前記メッシュ画像を伸縮、回転、移動、又は変形させるステップと、前記伸縮、回転、移動、又は変形されたメッシュ画像の形状に基づいて、複数の歪み補正処理のうち1つの歪み補正処理を選択するステップと、前記選択された歪み補正処理によって、前記処理対象の画像の形状を補正するステップと、を含むことを特徴とする頁画像補正方法である。
(Appendix 9)
The invention according to appendix 9 is a page image correction method for correcting the shape of the image to be processed based on the shape of the mesh image displayed superimposed on the image to be processed. Detecting a touch operation by a user to an input display unit that displays an image and the mesh image; and expanding, contracting, rotating, moving, or deforming the mesh image according to the detected touch operation; Based on the shape of the mesh image that has been stretched, rotated, moved, or deformed, a step of selecting one distortion correction process from among a plurality of distortion correction processes, and the selected distortion correction process, And a step of correcting the shape of the image.

(付記10)
付記10に記載の発明は、処理対象の画像に重畳して表示されているメッシュ画像の形状に基づいて、前記処理対象の画像の形状を補正する頁画像補正装置のコンピュータを、表示機能及びタッチ入力機能を有する入力表示部に、前記処理対象の画像と前記メッシュ画像とを重畳表示する表示制御手段、前記入力表示部へのユーザによるタッチ操作を検出する検出手段、前記検出手段によって検出されたタッチ操作に応じて、前記メッシュ画像を伸縮、回転、移動、又はその形状を変形させる編集手段、前記編集手段による編集後のメッシュ画像の形状に基づいて、複数の歪み補正処理のうち1つの歪み補正処理を選択する選択手段、前記選択手段によって選択された歪み補正処理によって、前記処理対象の画像の形状を補正する補正手段、として機能させることを特徴とするプログラムである。
(Appendix 10)
The invention according to appendix 10 includes a computer of a page image correction apparatus that corrects the shape of the image to be processed based on the shape of the mesh image that is displayed superimposed on the image to be processed. Display control means for displaying the image to be processed and the mesh image superimposed on an input display section having an input function, detection means for detecting a touch operation by the user to the input display section, detected by the detection means One of a plurality of distortion correction processes based on the editing means for expanding / contracting, rotating, moving, or deforming the shape of the mesh image according to a touch operation, and the shape of the mesh image after editing by the editing means A selection unit that selects a correction process; a correction unit that corrects the shape of the image to be processed by the distortion correction process selected by the selection unit; Is a program for causing the to function.

1 書画カメラシステム
2 書画カメラ(撮像手段)
3 頁めくり装置
9 メッシュ画像
10 頁画像
30 めくり装置本体
321 回転体
33 駆動軸
34 アーム部
35 吸着部
37 駆動部
38 台座部
4 パソコン
5 送風部
6 保持台
61、62 保持板
7 情報処理端末
8 据置台
70 通信部
71 表示部
72 撮像部
73 ROM
74 RAM
75 操作部(タッチパネル)
76 記録媒体
77 CPU
80、80a、80b 制御点
B 本
P 頁

1. Document camera system 2. Document camera (imaging means)
3 Page turning device 9 Mesh image 10 Page image 30 Turning device body 321 Rotating body 33 Drive shaft 34 Arm portion 35 Suction portion 37 Drive portion 38 Base portion 4 Personal computer 5 Blower portion 6 Holding stand 61, 62 Holding plate 7 Information processing terminal 8 Stationary table 70 Communication unit 71 Display unit 72 Imaging unit 73 ROM
74 RAM
75 Operation unit (touch panel)
76 Recording medium 77 CPU
80, 80a, 80b Control point B book P page

Claims (10)

表示機能及びタッチ入力機能を有する入力表示部に、処理対象の画像とメッシュ画像とを重畳表示する表示制御手段と、
前記入力表示部へのユーザによるタッチ操作を検出する検出手段と、
前記検出手段によって検出されたタッチ操作に応じて、前記メッシュ画像を伸縮、回転、移動、又はその形状を変形する編集手段と、
前記編集手段による編集後のメッシュ画像の形状に基づいて、複数の歪み補正処理のうち1つの歪み補正処理を選択する選択手段と、
前記選択手段によって選択された歪み補正処理によって、前記処理対象の画像の形状を補正する補正手段と、
を備えることを特徴とする頁画像補正装置。
Display control means for displaying an image to be processed and a mesh image superimposed on an input display unit having a display function and a touch input function;
Detecting means for detecting a touch operation by the user to the input display unit;
Editing means for expanding, contracting, rotating, moving, or deforming the mesh image in accordance with the touch operation detected by the detecting means;
Selection means for selecting one distortion correction process among a plurality of distortion correction processes based on the shape of the mesh image after editing by the editing means;
Correction means for correcting the shape of the image to be processed by the distortion correction processing selected by the selection means;
A page image correction apparatus comprising:
前記選択手段は、前記編集後のメッシュ画像を構成する上側又は下側のベジェ曲線の制御点のそれぞれが直線をなさない場合に湾曲補正処理を選択する、
ことを特徴とする請求項1に記載の頁画像補正装置。
The selection means selects a curvature correction process when each of the upper or lower Bezier curve control points constituting the edited mesh image does not form a straight line;
The page image correction apparatus according to claim 1.
前記選択手段は、前記編集後のメッシュ画像を構成する上側及び下側のベジェ曲線の制御点のそれぞれが直線をなし、且つ、前記ベジェ曲線の上側及び下側の左端、及び上側及び下側の右端の制御点の水平方向の位置が同じである場合に矩形補正処理を選択する、
ことを特徴とする請求項1又は2に記載の頁画像補正装置。
The selection means is configured such that each of the upper and lower Bezier curve control points constituting the edited mesh image forms a straight line, and the upper and lower left ends of the Bezier curve, and the upper and lower sides. Select the rectangle correction process when the horizontal position of the rightmost control point is the same,
The page image correction apparatus according to claim 1, wherein the page image correction apparatus is provided.
前記選択手段は、前記編集後のメッシュ画像を構成する上側及び下側のベジェ曲線の制御点のそれぞれが直線をなし、且つ、前記編集後のメッシュ画像の外形が台形である場合に台形補正処理を選択する、
ことを特徴とする請求項1乃至3のいずれか一項に記載の頁画像補正装置。
The selection means performs a trapezoidal correction process when each of the control points of the upper and lower Bezier curves constituting the edited mesh image is a straight line and the outer shape of the edited mesh image is a trapezoid. Select
The page image correction device according to any one of claims 1 to 3.
前記台形補正処理は、透視変換を含む、
ことを特徴とする請求項4に記載の頁画像補正装置。
The trapezoidal correction process includes perspective transformation,
The page image correction apparatus according to claim 4.
前記編集手段は、
前記検出手段によって検出されたタッチ操作が、前記メッシュ画像を構成する上側又は下側のベジェ曲線上の複数の制御点のうち、いずれか1つの制御点に対する個別操作である場合に、前記タッチ操作により指定された1つの制御点を、前記タッチ操作に応じて移動させることで、前記メッシュ画像の形状を変形し、
前記検出手段によって検出されたタッチ操作が、前記複数の制御点を同時に操作する全体操作である場合に、前記複数の制御点を同一条件で前記タッチ操作に応じて移動させることで、前記メッシュ画像を伸縮、回転、又は移動する、
ことを特徴とする請求項1乃至5のいずれか一項に記載の頁画像補正装置。
The editing means includes
When the touch operation detected by the detection means is an individual operation on any one of the control points on the upper or lower Bezier curve constituting the mesh image, the touch operation The shape of the mesh image is deformed by moving one control point specified by, according to the touch operation,
When the touch operation detected by the detection means is an overall operation for simultaneously operating the plurality of control points, the mesh image is obtained by moving the plurality of control points according to the touch operation under the same conditions. Extend, rotate, or move,
The page image correction apparatus according to any one of claims 1 to 5, wherein
前記個別操作は、前記入力表示部へのタッチ操作が1本の指によるタッチであり、前記全体操作は、前記入力表示部へのタッチ操作が2本以上の指による同時タッチである、
ことを特徴とする請求項6に記載の頁画像補正装置。
In the individual operation, the touch operation on the input display unit is a touch with one finger, and the overall operation is a touch operation on the input display unit with a simultaneous touch with two or more fingers.
The page image correction apparatus according to claim 6.
前記編集手段は、
前記1本の指が前記入力表示部上をドラッグされる際の移動方向、及び移動量に基づいて、前記1本の指でタッチされた1つの制御点を移動することで前記メッシュ画像の形状を変形し、
前記2本以上の指が前記入力表示部上をドラッグされる際の移動方向、及び移動量に基づいて、前記複数の制御点を移動することで前記メッシュ画像の形状を伸縮、回転、又は移動する、
ことを特徴とする請求項7に記載の頁画像補正装置。
The editing means includes
The shape of the mesh image by moving one control point touched with the one finger based on a moving direction and a moving amount when the one finger is dragged on the input display unit. Transform
The shape of the mesh image is expanded, contracted, rotated, or moved by moving the plurality of control points based on the moving direction and moving amount when the two or more fingers are dragged on the input display unit. To
The page image correction apparatus according to claim 7.
処理対象の画像に重畳して表示されているメッシュ画像の形状に基づいて、前記処理対象の画像の形状を補正する頁画像補正方法であって、
前記処理対象の画像と前記メッシュ画像とを表示する入力表示部へのユーザによるタッチ操作を検出するステップと、
前記検出されたタッチ操作に応じて、前記メッシュ画像を伸縮、回転、移動、又は変形させるステップと、
前記伸縮、回転、移動、又は変形されたメッシュ画像の形状に基づいて、複数の歪み補正処理のうち1つの歪み補正処理を選択するステップと、
前記選択された歪み補正処理によって、前記処理対象の画像の形状を補正するステップと、
を含むことを特徴とする頁画像補正方法。
A page image correction method for correcting the shape of the processing target image based on the shape of the mesh image displayed superimposed on the processing target image,
Detecting a touch operation by a user to an input display unit that displays the image to be processed and the mesh image;
Stretching, rotating, moving, or deforming the mesh image in accordance with the detected touch operation;
Selecting one distortion correction process among a plurality of distortion correction processes based on the shape of the mesh image that has been stretched, rotated, moved, or deformed;
Correcting the shape of the image to be processed by the selected distortion correction processing;
A page image correction method comprising:
処理対象の画像に重畳して表示されているメッシュ画像の形状に基づいて、前記処理対象の画像の形状を補正する頁画像補正装置のコンピュータを、
表示機能及びタッチ入力機能を有する入力表示部に、前記処理対象の画像と前記メッシュ画像とを重畳表示する表示制御手段、
前記入力表示部へのユーザによるタッチ操作を検出する検出手段、
前記検出手段によって検出されたタッチ操作に応じて、前記メッシュ画像を伸縮、回転、移動、又はその形状を変形させる編集手段、
前記編集手段による編集後のメッシュ画像の形状に基づいて、複数の歪み補正処理のうち1つの歪み補正処理を選択する選択手段、
前記選択手段によって選択された歪み補正処理によって、前記処理対象の画像の形状を補正する補正手段、
として機能させることを特徴とするプログラム。
A computer of a page image correction apparatus that corrects the shape of the image to be processed based on the shape of the mesh image displayed superimposed on the image to be processed.
Display control means for superimposing and displaying the image to be processed and the mesh image on an input display unit having a display function and a touch input function;
Detecting means for detecting a touch operation by the user to the input display unit;
Editing means for expanding / contracting, rotating, moving, or deforming the mesh image according to the touch operation detected by the detecting means,
Selection means for selecting one distortion correction process among a plurality of distortion correction processes based on the shape of the mesh image after editing by the editing means;
Correction means for correcting the shape of the image to be processed by the distortion correction processing selected by the selection means;
A program characterized by functioning as
JP2016048169A 2016-03-11 2016-03-11 Image correction device, image correction method, and program Withdrawn JP2017163464A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016048169A JP2017163464A (en) 2016-03-11 2016-03-11 Image correction device, image correction method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016048169A JP2017163464A (en) 2016-03-11 2016-03-11 Image correction device, image correction method, and program

Publications (1)

Publication Number Publication Date
JP2017163464A true JP2017163464A (en) 2017-09-14

Family

ID=59857345

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016048169A Withdrawn JP2017163464A (en) 2016-03-11 2016-03-11 Image correction device, image correction method, and program

Country Status (1)

Country Link
JP (1) JP2017163464A (en)

Similar Documents

Publication Publication Date Title
JP6213903B2 (en) Image correction apparatus, image correction method, and program
JP5678324B2 (en) Display device, computer program, and display method
JP6584076B2 (en) Information processing apparatus, information processing method, and computer program
JP5722482B2 (en) Image processing system and image processing method
JP5438333B2 (en) Display control apparatus and display control method
JP2000221586A (en) Projector, device and method for correcting projected picture, computer-readable recording medium recording program for executing its method by computer
JP6589294B2 (en) Image display device
JP2012129754A (en) Image processing device and program
US20120206778A1 (en) Image processing apparatus and a document scanning system having the same
JP2015172886A (en) Gesture recognition device and control method of gesture recognition device
JP6311372B2 (en) Image processing apparatus and image processing method
JP6676299B2 (en) Image processing apparatus, image processing method, and computer program
JP5919570B2 (en) Image display device and image display method
JP6304609B2 (en) Data amount estimation method, program, and information processing apparatus
US9652891B2 (en) Image correcting apparatus, image correcting method and storage medium
JP2016123127A (en) Display device and computer program
JP2012105145A (en) Image processing apparatus, image processing method, and program
JP2017163464A (en) Image correction device, image correction method, and program
JP2017229098A (en) Image correction device, image correction method, and program
WO2016157951A1 (en) Display control device, display control method, and recording medium
JP2013080466A (en) Method and device for processing document image
JP6614516B2 (en) Display device and computer program
KR101565926B1 (en) Method for compensating image for low vision person and apparatus for the same
JP2020061662A (en) Video processing device, video processing method, and program
JP2018200527A (en) Information processing device, method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180723

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20190405