Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6973524B2 - program - Google Patents
[go: Go Back, main page]

JP6973524B2 - program - Google Patents

program Download PDF

Info

Publication number
JP6973524B2
JP6973524B2 JP2020024909A JP2020024909A JP6973524B2 JP 6973524 B2 JP6973524 B2 JP 6973524B2 JP 2020024909 A JP2020024909 A JP 2020024909A JP 2020024909 A JP2020024909 A JP 2020024909A JP 6973524 B2 JP6973524 B2 JP 6973524B2
Authority
JP
Japan
Prior art keywords
image
program
trapezoidal
image data
captured image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2020024909A
Other languages
Japanese (ja)
Other versions
JP2020102235A (en
Inventor
弘和 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from JP2016031602A external-priority patent/JP6665575B2/en
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2020024909A priority Critical patent/JP6973524B2/en
Publication of JP2020102235A publication Critical patent/JP2020102235A/en
Application granted granted Critical
Publication of JP6973524B2 publication Critical patent/JP6973524B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)
  • User Interface Of Digital Computer (AREA)

Description

本発明は、カメラに生成させた画像を台形補正する携帯端末のプログラムに関する。 The present invention relates to a program of a mobile terminal that performs keystone correction of an image generated by a camera.

引用文献1には、カメラに生成させた撮影画像を台形補正する携帯端末のプログラムが記載されている。より詳細には、引用文献1に記載のプログラムは、被写体を撮影したカメラに生成させた撮影画像をディスプレイに表示させ、撮影画像内で被写体を囲む略四角形領域の頂点の位置をユーザに指定させ、指定された略四角形領域の画像をトリミングし、トリミングした画像を台形補正する。 Cited Document 1 describes a program of a mobile terminal that performs keystone correction of a captured image generated by a camera. More specifically, the program described in Cited Document 1 displays a captured image generated by a camera that captures the subject on a display, and causes the user to specify the position of the apex of a substantially quadrangular region surrounding the subject in the captured image. , Trims the image in the specified approximately quadrilateral area and corrects the trimmed image to keystone.

特開2013−218547号公報Japanese Unexamined Patent Publication No. 2013-218547

しかしながら、カメラに被写体をズームして撮影させた場合において、撮影画像に被写体の一部が含まれない場合がある。そして、このような撮影画像内で略四角形領域の頂点の位置をユーザに指定させようとすると、本来の位置より略四角形領域の内側の位置が頂点として指定される可能性がある。その結果、このような略四角形領域の画像がトリミング及び台形補正されると、撮影画像に含まれていた被写体の一部がさらに欠けてしまう可能性がある。 However, when the subject is zoomed and photographed by the camera, a part of the subject may not be included in the captured image. Then, if the user is to specify the position of the apex of the substantially quadrangular region in such a captured image, the position inside the substantially quadrangular region may be designated as the apex from the original position. As a result, when the image in such a substantially quadrangular region is trimmed and keystone-corrected, a part of the subject included in the captured image may be further missing.

本発明は、上記の事情に鑑みてなされたものであり、その目的は、カメラに生成させた撮影画像内において、台形補正すべき領域をユーザに適切に指定させることが可能な携帯端末のプログラムを提供することにある。 The present invention has been made in view of the above circumstances, and an object thereof is a program of a mobile terminal capable of appropriately designating a region to be keystone-corrected in a photographed image generated by a camera. Is to provide.

本明細書に記載のプログラムは、カメラと、ディスプレイと、タッチセンサを有する入力インタフェースとを備える携帯端末によって読み取り可能である。該プログラムは、対象物を撮影した前記カメラによって生成された撮影画像データを取得する取得処理と、前記撮影画像データで示される撮影画像の外縁に追加画素を付加することによって、前記撮影画像を拡張した拡張画像を示す拡張画像データを生成する拡張処理と、前記拡張画像を前記ディスプレイに表示させる第1表示処理と、前記第1表示処理で表示された前記拡張画像内において、台形画像の形状を指定するタッチ操作を、前記入力インタフェースを通じて受け付ける第1受付処理とを前記携帯端末に実行させる。前記台形画像は、長方形の前記対象物が斜めから撮影されたことによって、前記拡張画像内で台形に表された前記対象物を示す画像である。該プログラムは、前記第1受付処理で指定された形状の前記台形画像を台形補正することによって、長方形の補正画像を示す補正画像データを生成する補正処理と、前記補正画像データを出力する出力指示処理とを前記携帯端末に実行させる。 The programs described herein are readable by a mobile terminal comprising a camera, a display, and an input interface having a touch sensor. The program expands the captured image by acquiring the captured image data generated by the camera that captured the object and adding additional pixels to the outer edge of the captured image indicated by the captured image data. The shape of the trapezoidal image is displayed in the extended process for generating the extended image data indicating the expanded image, the first display process for displaying the expanded image on the display, and the expanded image displayed in the first display process. The mobile terminal is made to execute the first reception process of receiving the designated touch operation through the input interface. The trapezoidal image is an image showing the object represented in a trapezoid in the extended image by taking a rectangular object at an angle. The program performs correction processing for generating corrected image data indicating a rectangular corrected image by performing trapezoidal correction of the trapezoidal image having a shape specified in the first reception processing, and an output instruction for outputting the corrected image data. The process is executed by the mobile terminal.

上記構成によれば、撮影画像の外縁に追加画素を付加した拡張画像内において、台形補正の対象となる台形画像をユーザに指定させることができる。すなわち、撮影画像に被写体の一部が含まれていない場合であっても、台形補正の対象となる領域をユーザに適切に指定させることができる。 According to the above configuration, the user can specify the trapezoidal image to be the keystone correction in the extended image in which additional pixels are added to the outer edge of the captured image. That is, even when the captured image does not include a part of the subject, the user can appropriately specify the area to be the keystone correction.

図1は、本実施形態に係るシステム100の概略図である。FIG. 1 is a schematic diagram of a system 100 according to the present embodiment. 図2は、プリント指示処理のフローチャートである。FIG. 2 is a flowchart of print instruction processing. 図3は、台形拡張処理のフローチャートである。FIG. 3 is a flowchart of the trapezoidal expansion process. 図4は、撮影画像の例であって、(A)は4つの直線が検出された例を、(B)は3つの直線が検出された例を示す。4A and 4B are examples of captured images, in which FIG. 4A shows an example in which four straight lines are detected, and FIG. 4B shows an example in which three straight lines are detected. 図5は、拡張画像の例であって、(A)は撮影画像80に追加画素85を付加した例を、(B)は撮影画像90に追加画素95を付加した例を示す。5A and 5B are examples of extended images, in which FIG. 5A shows an example in which an additional pixel 85 is added to a captured image 80, and FIG. 5B shows an example in which an additional pixel 95 is added to a captured image 90. 図6は、ディスプレイ53の表示例であって、(A)は台形指定画面を、(B)はプレビュー画面を示す。6A and 6B are display examples of the display 53, in which FIG. 6A shows a trapezoidal designation screen and FIG. 6B shows a preview screen.

以下、適宜図面を参照して本発明の実施形態について説明する。なお、以下に説明される実施形態は本発明の一例にすぎず、本発明の要旨を変更しない範囲で、本発明の実施形態を適宜変更できることは言うまでもない。例えば、後述する各処理の実行順序は、本発明の要旨を変更しない範囲で、適宜変更することができる。 Hereinafter, embodiments of the present invention will be described with reference to the drawings as appropriate. It is needless to say that the embodiments described below are merely examples of the present invention, and the embodiments of the present invention can be appropriately changed without changing the gist of the present invention. For example, the execution order of each process described later can be appropriately changed without changing the gist of the present invention.

図1は、本実施形態に係るシステム100の概略図である。図1に示されるシステム100は、複合機10と、携帯端末50とで構成されている。また、システム100は、複合機10に代えて、プリンタ単能機を含んでもよい。複合機10及び携帯端末50は、通信ネットワーク101を通じて相互に通信可能に構成されている。通信ネットワーク101の具体例は特に限定されないが、例えば、インターネット、有線LAN、無線LAN、或いはこれらの組み合わせであってもよい。 FIG. 1 is a schematic diagram of a system 100 according to the present embodiment. The system 100 shown in FIG. 1 includes a multifunction device 10 and a mobile terminal 50. Further, the system 100 may include a printer single-purpose machine instead of the multifunction device 10. The multifunction device 10 and the mobile terminal 50 are configured to be able to communicate with each other through the communication network 101. The specific example of the communication network 101 is not particularly limited, but may be, for example, the Internet, a wired LAN, a wireless LAN, or a combination thereof.

複合機10は、図1に示されるように、プリンタ11と、スキャナ12と、ディスプレイ23と、入力I/F24と、通信I/F25と、CPU31と、メモリ32と、通信バス33とを主に備える。複合機10を構成する各構成要素は、通信バス33を通じて相互に接続されている。 As shown in FIG. 1, the multifunction device 10 mainly includes a printer 11, a scanner 12, a display 23, an input I / F 24, a communication I / F 25, a CPU 31, a memory 32, and a communication bus 33. Prepare for. Each component constituting the multifunction device 10 is connected to each other through a communication bus 33.

プリンタ11は、画像データで示される画像をシートに記録するプリント動作を実行する。プリンタ11の記録方式としては、インクジェット方式や電子写真方式などの公知の方式を採用することができる。スキャナ12は、原稿に記録されている画像を読み取って画像データを生成するスキャン動作を実行する。 The printer 11 executes a printing operation of recording an image represented by image data on a sheet. As the recording method of the printer 11, a known method such as an inkjet method or an electrophotographic method can be adopted. The scanner 12 performs a scanning operation of reading an image recorded on a document and generating image data.

ディスプレイ23は、液晶ディスプレイ、有機ELディスプレイ等であり、各種情報を表示する表示面を備える。 The display 23 is a liquid crystal display, an organic EL display, or the like, and includes a display surface for displaying various information.

入力I/F24は、ユーザによる入力操作を受け付けるユーザインタフェースである。具体的には、入力I/F24はボタンを有しており、押下されたボタンに対応づけられた各種の操作信号をCPU31へ出力する。さらに、入力I/F24は、ディスプレイ23の表示面に重畳された膜状のタッチセンサを有していてもよい。ディスプレイ23の表示面に表示されたオブジェクトを指定する操作、文字列或いは数字列を入力する操作は、ユーザ操作の一例である。「オブジェクト」とは、例えば、ディスプレイ23に表示された文字列、アイコン、ボタン、リンク等である。 The input I / F 24 is a user interface that accepts an input operation by the user. Specifically, the input I / F 24 has a button, and outputs various operation signals associated with the pressed button to the CPU 31. Further, the input I / F 24 may have a film-like touch sensor superimposed on the display surface of the display 23. The operation of designating an object displayed on the display surface of the display 23 and the operation of inputting a character string or a number string are examples of user operations. The "object" is, for example, a character string, an icon, a button, a link, or the like displayed on the display 23.

タッチセンサとして実現される入力I/F24は、ユーザがタッチした表示面上の位置を示す位置情報を出力する。なお、本明細書中における「タッチ」とは、入力媒体を表示面に接触させる操作全般を含む。また、入力媒体が表示面に触れていなくても、表示面との間の距離がごく僅かな位置まで入力媒体を近接させる「ホバー」或いは「フローティングタッチ」を、前述の「タッチ」の概念に含めてもよい。さらに入力媒体とは、ユーザの指であってもよいし、タッチペン等であってもよい。ディスプレイ23に表示されたアイコンの位置のタップするユーザ操作は、当該アイコンを指定する指定操作の一例である。 The input I / F 24 realized as a touch sensor outputs position information indicating a position on the display surface touched by the user. The term "touch" in the present specification includes all operations of bringing the input medium into contact with the display surface. Further, "hover" or "floating touch" that brings the input medium close to a position where the distance between the input medium and the display surface is very small even if the input medium does not touch the display surface is used as the above-mentioned concept of "touch". May be included. Further, the input medium may be a user's finger, a touch pen, or the like. The user operation of tapping the position of the icon displayed on the display 23 is an example of the designated operation for designating the icon.

通信I/F25は、通信ネットワーク101を通じて外部装置と通信可能なインタフェースである。すなわち、複合機10は、通信I/F25を通じて外部装置に各種情報を出力し、通信I/F25を通じて外部装置から各種情報を受信する。通信I/F25の具体的な通信手順は特に限定されないが、例えば、Wi−Fi(Wi-Fi Allianceの登録商標)を採用することができる。 The communication I / F 25 is an interface capable of communicating with an external device through the communication network 101. That is, the multifunction device 10 outputs various information to the external device through the communication I / F25, and receives various information from the external device through the communication I / F25. The specific communication procedure of the communication I / F25 is not particularly limited, but for example, Wi-Fi (registered trademark of Wi-Fi Alliance) can be adopted.

CPU31は、複合機10の全体動作を制御するものである。CPU31は、入力I/F24から出力される各種情報、通信I/F25を通じて外部装置から取得した各種情報等に基づいて、後述する各種プログラムをメモリ32から取得して実行する。CPU31及びメモリ32は、制御部の一例を構成する。 The CPU 31 controls the overall operation of the multifunction device 10. The CPU 31 acquires and executes various programs described later from the memory 32 based on various information output from the input I / F 24, various information acquired from the external device through the communication I / F 25, and the like. The CPU 31 and the memory 32 form an example of the control unit.

メモリ32は、プログラム記憶領域32Aと、データ記憶領域32Bとを有する。領域32Aには、OS34と、装置プログラム35とが格納される。なお、装置プログラム35は、単一のプログラムであってもよいし、複数のプログラムの集合体であってもよい。領域32Bには、装置プログラム35の実行に必要なデータ或いは情報が記憶される。メモリ32は、例えば、RAM、ROM、EEPROM、HDD、複合機10に着脱されるUSBメモリ等の可搬記憶媒体、CPU31が備えるバッファ等、或いはそれらの組み合わせによって構成される。 The memory 32 has a program storage area 32A and a data storage area 32B. The OS 34 and the device program 35 are stored in the area 32A. The device program 35 may be a single program or a collection of a plurality of programs. The area 32B stores data or information necessary for executing the device program 35. The memory 32 is composed of, for example, a RAM, a ROM, an EEPROM, an HDD, a portable storage medium such as a USB memory attached to and detached from the multifunction device 10, a buffer included in the CPU 31, or a combination thereof.

メモリ32は、コンピュータが読み取り可能なストレージ媒体であってもよい。コンピュータが読み取り可能なストレージ媒体とは、non−transitoryな媒体である。non−transitoryな媒体には、上記の例の他に、CD−ROM、DVD−ROM等の記録媒体も含まれる。また、non−transitoryな媒体は、tangibleな媒体でもある。一方、インターネット上のサーバなどからダウンロードされるプログラムを搬送する電気信号は、コンピュータが読み取り可能な媒体の一種であるコンピュータが読み取り可能な信号媒体であるが、non−transitoryなコンピュータが読み取り可能なストレージ媒体には含まれない。後述する携帯端末50のメモリ62についても同様である。 The memory 32 may be a computer-readable storage medium. A computer-readable storage medium is a non-transitional medium. In addition to the above examples, the non-transitory medium also includes recording media such as a CD-ROM and a DVD-ROM. The non-transitory medium is also a tangible medium. On the other hand, an electric signal that carries a program downloaded from a server on the Internet is a signal medium that can be read by a computer, which is a kind of medium that can be read by a computer, but is a storage that can be read by a non-transitory computer. Not included in the medium. The same applies to the memory 62 of the mobile terminal 50 described later.

携帯端末50は、図1に示されるように、カメラ52と、ディスプレイ53と、入力I/F54と、通信I/F55と、CPU61と、メモリ62と、通信バス63とを主に備える。携帯端末50に含まれるディスプレイ53、入力I/F54、通信I/F55、CPU61、メモリ62、及び通信バス63は、複合機10に含まれるディスプレイ23、入力I/F24、通信I/F25、CPU31、メモリ32、及び通信バス33と同様の構成であるので、説明は省略する。CPU61及びメモリ62は、制御部の一例である。 As shown in FIG. 1, the mobile terminal 50 mainly includes a camera 52, a display 53, an input I / F 54, a communication I / F 55, a CPU 61, a memory 62, and a communication bus 63. The display 53, the input I / F 54, the communication I / F 55, the CPU 61, the memory 62, and the communication bus 63 included in the mobile terminal 50 are the display 23, the input I / F 24, the communication I / F 25, and the CPU 31 included in the multifunction device 10. , The memory 32, and the communication bus 33 have the same configuration, and thus the description thereof will be omitted. The CPU 61 and the memory 62 are examples of the control unit.

携帯端末50は、例えば、携帯電話、スマートフォン、或いはタブレット端末等である。より詳細には、携帯端末50のディスプレイ53は、表示画面のサイズが12インチ以下、より好ましくは8インチ以下であるのが望ましい。また、携帯端末50の入力I/F54は、ディスプレイ53の表示画面に重ねられたタッチセンサであるのが望ましい。メモリ62の領域62Aには、OS64と、端末プログラム65とが格納されている。 The mobile terminal 50 is, for example, a mobile phone, a smartphone, a tablet terminal, or the like. More specifically, the display 53 of the mobile terminal 50 preferably has a display screen size of 12 inches or less, more preferably 8 inches or less. Further, it is desirable that the input I / F 54 of the mobile terminal 50 is a touch sensor superimposed on the display screen of the display 53. The OS 64 and the terminal program 65 are stored in the area 62A of the memory 62.

カメラ52は、被写体を撮影して画像データ(以下、「撮影画像データ」と表記することがある。)を生成する。カメラ52の動作は、例えば、領域62Aに記憶される不図示のカメラプログラムによって制御される。すなわち、カメラプログラムは、撮影画像データで示される画像と、[撮影]アイコンとをディスプレイ53に表示させる。また、ディスプレイ53に表示される画像は、カメラ52の向きが変更されるのに追従して変更される。そして、カメラプログラムは、[撮影]アイコンを指定するユーザ操作を入力I/F54を通じて受け付けたことに応じて、撮影画像データを領域62Bに記憶させる。 The camera 52 captures a subject and generates image data (hereinafter, may be referred to as “captured image data”). The operation of the camera 52 is controlled by, for example, a camera program (not shown) stored in the area 62A. That is, the camera program displays the image indicated by the captured image data and the [photographed] icon on the display 53. Further, the image displayed on the display 53 is changed in accordance with the change in the orientation of the camera 52. Then, the camera program stores the photographed image data in the area 62B in response to the acceptance of the user operation for designating the [shooting] icon through the input I / F 54.

[システム100の動作]
図2及び図3を参照して、本実施形態に係るシステム100の動作を説明する。
[Operation of system 100]
The operation of the system 100 according to the present embodiment will be described with reference to FIGS. 2 and 3.

本明細書のフローチャートは、基本的に、プログラムに記述された命令に従ったCPU31、61の処理を示す。すなわち、以下の説明における「判断」、「抽出」、「選択」、「制御」等の処理は、CPU31、61の処理を表している。CPU61による処理は、OS64を介したハードウェア制御も含む。また、本明細書中の「データ」とは、コンピュータに読取可能なビット列で表される。そして、実質的な意味内容が同じでフォーマットが異なるデータは、同一のデータとして扱われるものとする。本明細書中の「情報」についても同様である。 The flowchart of the present specification basically shows the processing of the CPUs 31 and 61 according to the instructions described in the program. That is, the processes such as "determination", "extraction", "selection", and "control" in the following description represent the processes of the CPUs 31 and 61. The processing by the CPU 61 also includes hardware control via the OS 64. Further, the "data" in the present specification is represented by a computer-readable bit string. Data having the same substantial meaning and different formats are treated as the same data. The same applies to "information" in the present specification.

まず、携帯端末50の端末プログラム65は、不図示のカメラプログラムを起動させる(S11)。次に、カメラプログラムは、[撮影]アイコンを指定するユーザ操作を入力I/F54を通じて受け付けたことに応じて、撮影画像データを領域62Bに記憶させ、記憶させた撮影画像データを端末プログラム65に提供する。端末プログラム65は、例えば、カメラプログラムを所謂プラグインとして起動するためのAPIを実行すればよい。また、カメラプログラムは、領域62Bに記憶させた撮影画像データのパスを当該APIの戻り値に含めればよい。そして、端末プログラム65は、戻り値に含まれるパスに基づいて撮影画像データを読み出せばよい(S12:Yes)。 First, the terminal program 65 of the mobile terminal 50 activates a camera program (not shown) (S11). Next, the camera program stores the photographed image data in the area 62B in response to the reception of the user operation for designating the [shooting] icon through the input I / F 54, and stores the stored photographed image data in the terminal program 65. offer. The terminal program 65 may execute, for example, an API for starting the camera program as a so-called plug-in. Further, the camera program may include the path of the captured image data stored in the area 62B in the return value of the API. Then, the terminal program 65 may read the captured image data based on the path included in the return value (S12: Yes).

本実施形態において、携帯端末50のユーザは、長方形のホワイトボードをカメラ52によって斜めから撮影したものとする。その結果、端末プログラム65は、例えばS12において、図4(A)に示される撮影画像80を示す撮影画像データ、或いは図4(B)に示される撮影画像90を示す撮影画像データを取得したものとする。ホワイトボードは、対象物の一例である。但し、対象物の具体例はホワイトボードに限定されず、黒板、ポスター、ディスプレイ等の概ね長方形或いは正方形の物であればよく、表面に文字或いは図柄等が描かれているのが望ましい。 In the present embodiment, the user of the mobile terminal 50 assumes that the rectangular whiteboard is photographed from an angle by the camera 52. As a result, in S12, for example, the terminal program 65 has acquired the photographed image data showing the photographed image 80 shown in FIG. 4 (A) or the photographed image data showing the photographed image 90 shown in FIG. 4 (B). And. The whiteboard is an example of an object. However, the specific example of the object is not limited to the whiteboard, and may be a generally rectangular or square object such as a blackboard, a poster, or a display, and it is desirable that characters or patterns are drawn on the surface.

撮影画像80は、図4(A)に示されるように、輪郭線81A、81B、81C、81Dで囲まれた長方形の画像である。撮影画像90は、図4(B)に示されるように、輪郭線91A、91B、91C、91Dで囲まれた長方形の画像である。また、撮影画像80、90は、台形画像84、94の少なくとも一部を含む。台形画像84、94は、ホワイトボードが斜めから撮影されたことによって、撮影画像80、90内で台形に表されたホワイトボードを示す画像である。 As shown in FIG. 4A, the captured image 80 is a rectangular image surrounded by contour lines 81A, 81B, 81C, and 81D. As shown in FIG. 4B, the captured image 90 is a rectangular image surrounded by contour lines 91A, 91B, 91C, and 91D. Further, the captured images 80 and 90 include at least a part of the trapezoidal images 84 and 94. The trapezoidal images 84 and 94 are images showing the whiteboard represented in a trapezoidal shape in the photographed images 80 and 90 because the whiteboard is photographed from an angle.

次に、端末プログラム65は、画像拡張処理を実行する(S13)。画像拡張処理は、撮影画像データで示される撮影画像に画素を追加することによって、拡張画像を生成する処理である。すなわち、拡張画像は、撮影画像を拡張した画像である。図3を参照して、画像拡張処理の詳細を説明する。 Next, the terminal program 65 executes the image expansion process (S13). The image expansion process is a process of generating an expanded image by adding pixels to the captured image indicated by the captured image data. That is, the extended image is an expanded image of the captured image. The details of the image expansion process will be described with reference to FIG.

まず、端末プログラム65は、ハフ変換等の周知のアルゴリズムを用いて、撮影画像に含まれる所定の長さ以上の直線を検出する(S31)。また、端末プログラム65は、S31で検出した直線の数を判断する(S32)。S31の処理は検出処理の一例であり、S32の処理は、第1判断処理の一例である。 First, the terminal program 65 detects a straight line having a predetermined length or longer included in the captured image by using a well-known algorithm such as Hough transform (S31). Further, the terminal program 65 determines the number of straight lines detected in S31 (S32). The process of S31 is an example of the detection process, and the process of S32 is an example of the first determination process.

一例として、端末プログラム65は、図4(A)に示される撮影画像80内において、4つの直線82A、82B、82C、82Dを検出する。他の例として、端末プログラム65は、図4(B)に示される撮影画像90内において、3つの直線92A、92B、92Cを検出する。但し、S31で検出される直線の数は図4の例に限定されず、2つ以下の場合もあり得る。 As an example, the terminal program 65 detects four straight lines 82A, 82B, 82C, 82D in the captured image 80 shown in FIG. 4 (A). As another example, the terminal program 65 detects three straight lines 92A, 92B, 92C in the captured image 90 shown in FIG. 4 (B). However, the number of straight lines detected in S31 is not limited to the example of FIG. 4, and may be two or less.

次に、端末プログラム65は、例えば図4(B)に示されるように、3つの直線92A〜92Cを検出したと判断したことに応じて(S32:3)、撮影画像90の4つの輪郭線91A〜91Dの1つを、第4の直線に決定する(S33)。S33の処理は、決定処理の一例である。一方、端末プログラム65は、図4(A)に示されるように、4つの直線82A〜82Dを検出したと判断したことに応じて(S32:4)、S33の処理をスキップする。 Next, as shown in FIG. 4B, for example, the terminal program 65 determines that the three straight lines 92A to 92C have been detected (S32: 3), and the four contour lines of the captured image 90. One of 91A to 91D is determined as the fourth straight line (S33). The process of S33 is an example of the determination process. On the other hand, as shown in FIG. 4A, the terminal program 65 skips the process of S33 in response to the determination that the four straight lines 82A to 82D have been detected (S32: 4).

端末プログラム65は、例えばS33において、S31で検出した3つの直線92A〜92Cのうち、平行に近い2つの直線92A、92Cを対となる直線と判断する。対となる直線92A、92Cは、台形画像94の対辺を構成し得る直線である。そして、端末プログラム65は、撮影画像90の4つの輪郭線91A〜91Dのうち、対となる直線が存在しない直線92Bから最も離れた輪郭線91Dを、第4の直線に決定する。 For example, in S33, the terminal program 65 determines that of the three straight lines 92A to 92C detected in S31, the two straight lines 92A and 92C that are close to parallel are paired straight lines. The paired straight lines 92A and 92C are straight lines that can form the opposite sides of the trapezoidal image 94. Then, the terminal program 65 determines the contour line 91D farthest from the straight line 92B in which the paired straight line does not exist among the four contour lines 91A to 91D of the captured image 90 as the fourth straight line.

次に、端末プログラム65は、S31で検出した4つの直線の交点の位置、或いはS31で検出した3つの直線及びS33で決定した1つの直線の交点の位置を特定する。そして、端末プログラム65は、特定した交点の位置を台形画像84、94の頂点の位置と推定する(S34)。S34の処理は、推定処理の一例である。一例として、端末プログラム65は、図4(A)に示される撮影画像80において、各直線の交点の位置を、台形画像84の頂点83A、83B、83C、83Dと推定する。他の例として、端末プログラム65は、図4(B)に示される撮影画像90において、各直線の交点の位置を、台形画像94の頂点93A、93B、93C、93Dと推定する。なお、図4に示されるように、S34で推定される頂点の一部は、撮影画像80、90外に位置してもよい。 Next, the terminal program 65 specifies the positions of the intersections of the four straight lines detected in S31, or the positions of the intersections of the three straight lines detected in S31 and one straight line determined in S33. Then, the terminal program 65 estimates the position of the specified intersection as the position of the apex of the trapezoidal images 84 and 94 (S34). The process of S34 is an example of the estimation process. As an example, the terminal program 65 estimates the positions of the intersections of the straight lines in the captured image 80 shown in FIG. 4A to be the vertices 83A, 83B, 83C, and 83D of the trapezoidal image 84. As another example, the terminal program 65 estimates the position of the intersection of the straight lines in the captured image 90 shown in FIG. 4B to be the vertices 93A, 93B, 93C, 93D of the trapezoidal image 94. As shown in FIG. 4, a part of the vertices estimated in S34 may be located outside the captured images 80 and 90.

次に、端末プログラム65は、S34で推定した4つの頂点の位置が撮影画像内か否かを判断する(S35)。そして、端末プログラム65は、少なくとも1つの頂点の位置が撮影画像外だと判断したことに応じて(S35:No)、拡張画像を示す拡張画像データを生成する(S36)。一方、端末プログラム65は、全ての頂点の位置が撮影画像内だと判断したことに応じて(S35:Yes)、S36の処理をスキップする。S35の処理は第2判断処理の一例であり、S36の処理は拡張処理の一例である。 Next, the terminal program 65 determines whether or not the positions of the four vertices estimated in S34 are within the captured image (S35). Then, the terminal program 65 generates extended image data indicating an extended image according to the determination that the position of at least one vertex is outside the captured image (S35: No) (S36). On the other hand, the terminal program 65 skips the process of S36 according to the determination that the positions of all the vertices are in the captured image (S35: Yes). The process of S35 is an example of the second determination process, and the process of S36 is an example of the extended process.

端末プログラム65は、S36において、撮影画像の外縁に追加画素を付加することによって、拡張画像データを生成する。一例として、端末プログラム65は、図4(A)に示される撮影画像80の外縁に、図5(A)に示される追加画素85を輪郭線81Cに沿って付加した拡張画像86を生成する。他の例として、端末プログラム65は、図4(B)に示される撮影画像90の外縁に、図5(A)に示されるL字型の追加画素95を輪郭線91C、91Dに沿って付加した拡張画像96を生成する。拡張画像86、96は、台形画像84、94の全体を含む。 The terminal program 65 generates extended image data in S36 by adding additional pixels to the outer edge of the captured image. As an example, the terminal program 65 generates an extended image 86 in which the additional pixel 85 shown in FIG. 5A is added along the contour line 81C to the outer edge of the captured image 80 shown in FIG. 4A. As another example, the terminal program 65 adds the L-shaped additional pixel 95 shown in FIG. 5A to the outer edge of the captured image 90 shown in FIG. 4B along the contour lines 91C and 91D. The expanded image 96 is generated. The extended images 86, 96 include the entire trapezoidal images 84, 94.

すなわち、追加画素85、95は、撮影画像80、90の外に位置する頂点83C、93Cに最も近い輪郭線81C、91Cに沿って設けられるのが望ましい。また、追加画素95は、S33で直線に決定した輪郭線91Dに沿って設けられるのが望ましい。但し、追加画素85、95の形状は、図5の例に限定されない。一例として、追加画素85、95は、輪郭線81C、91C、91Dの全域に設けられていなくてもよい。すなわち、拡張画像86、96は、長方形でなくてもよい。他の例として、端末プログラム65は、図6(A)に示されるように、撮影画像80を囲む枠型の追加画素87を付加した拡張画像88を生成してもよい。 That is, it is desirable that the additional pixels 85 and 95 are provided along the contour lines 81C and 91C closest to the vertices 83C and 93C located outside the captured images 80 and 90. Further, it is desirable that the additional pixel 95 is provided along the contour line 91D determined to be a straight line in S33. However, the shapes of the additional pixels 85 and 95 are not limited to the example of FIG. As an example, the additional pixels 85 and 95 may not be provided in the entire area of the contour lines 81C, 91C and 91D. That is, the extended images 86 and 96 do not have to be rectangular. As another example, the terminal program 65 may generate an extended image 88 to which a frame-shaped additional pixel 87 surrounding the captured image 80 is added, as shown in FIG. 6 (A).

また、追加画素85、95の幅は、例えば、撮影画像80、90の外に位置する頂点83C、93Cの位置と、S31で検出した直線の数とによって、適宜設定される。まず、端末プログラム65は、撮影画像80、90の外に位置する頂点83C、93Cが、拡張画像86、96の輪郭線より内側に位置するように、追加画素85、95の幅を設定すればよい。また、端末プログラム65は、S31で検出した直線の数が少ない程、追加画素85、95の幅を大きくすればよい。 Further, the widths of the additional pixels 85 and 95 are appropriately set depending on, for example, the positions of the vertices 83C and 93C located outside the captured images 80 and 90 and the number of straight lines detected in S31. First, the terminal program 65 sets the widths of the additional pixels 85 and 95 so that the vertices 83C and 93C located outside the captured images 80 and 90 are located inside the contour lines of the expanded images 86 and 96. good. Further, in the terminal program 65, the width of the additional pixels 85 and 95 may be increased as the number of straight lines detected in S31 is smaller.

一方、端末プログラム65は、S31で2つ以下の直線を検出したと判断したことに応じて(S32:2以下)、S33〜S36に代えて、例えば図6(A)に示されるように、撮影画像80の周囲を囲む枠型の追加画素87を付加することによって、拡張画像88を示す拡張画像データを生成する(S37)。S37の処理は、拡張処理の一例である。本実施形態では、S36で撮影画像80に枠型の追加画素87が付加されたものとして、以下の処理の説明する。また、S36の処理がスキップされた場合(S35:Yes)、以下の処理において、拡張画像88に代えて撮影画像80が用いられる。 On the other hand, in response to the determination that S31 has detected two or less straight lines (S32: 2 or less), the terminal program 65 replaces S33 to S36, for example, as shown in FIG. 6A. By adding a frame-shaped additional pixel 87 that surrounds the captured image 80, extended image data indicating the extended image 88 is generated (S37). The process of S37 is an example of the extended process. In the present embodiment, the following processing will be described assuming that the frame-shaped additional pixel 87 is added to the captured image 80 in S36. Further, when the processing of S36 is skipped (S35: Yes), the captured image 80 is used instead of the extended image 88 in the following processing.

図2に戻って、端末プログラム65は、図6(A)に示される台形指定画面をディスプレイ53に表示させる(S14)。台形指定画面は、拡張画像88と、ガイド画像111、112、113、114と、[補正]アイコン115とを含む。ガイド画像111〜114は、S34で推定した頂点83A〜83Dの位置を示す画像であって、拡張画像88に重ねて表示される。[補正]アイコン115は、台形画像を台形補正する指示に対応する。そして、端末プログラム65は、台形指定画面に対するユーザ操作を、入力I/F54を通じて受け付ける(S15)。S14の処理は第1表示処理の一例であり、S15の処理は第1受付処理の一例である。 Returning to FIG. 2, the terminal program 65 causes the display 53 to display the trapezoidal designation screen shown in FIG. 6 (A) (S14). The trapezoidal designation screen includes an extended image 88, guide images 111, 112, 113, 114, and a [correction] icon 115. The guide images 111 to 114 are images showing the positions of the vertices 83A to 83D estimated in S34, and are displayed superimposed on the extended image 88. The [correction] icon 115 corresponds to an instruction to correct the trapezoidal image. Then, the terminal program 65 accepts the user operation for the trapezoidal designation screen through the input I / F 54 (S15). The process of S14 is an example of the first display process, and the process of S15 is an example of the first reception process.

なお、端末プログラム65は、S14において、追加画素87に非背景画素値が設定された拡張画像88を、台形指定画面に表示させてもよい。端末プログラム65は、例えば、S36、S37で生成した拡張画像データをコピーし、コピーした拡張画像データに含まれる追加画素87に非背景画素値を設定し、当該拡張画像データで示される拡張画像88を、台形指定画面に表示させればよい。非背景画素値は、撮影画像の背景画素の画素値と異なる画素値である。背景画素の画素値は、例えば、撮影画像に含まれる画素値のヒストグラムの最頻値を指す。また、端末プログラム65は、S31で2つ以下の直線を検出した場合に(S32:2以下)、拡張画像88上の予め定められた位置にガイド画像111〜114を表示してもよい。 In S14, the terminal program 65 may display the extended image 88 in which the non-background pixel value is set in the additional pixel 87 on the trapezoidal designation screen. The terminal program 65 copies, for example, the extended image data generated in S36 and S37, sets a non-background pixel value in the additional pixel 87 included in the copied extended image data, and sets the non-background pixel value to the extended image 88 indicated by the extended image data. Should be displayed on the trapezoidal designation screen. The non-background pixel value is a pixel value different from the pixel value of the background pixel of the captured image. The pixel value of the background pixel refers to, for example, the mode of the histogram of the pixel value included in the captured image. Further, the terminal program 65 may display the guide images 111 to 114 at predetermined positions on the extended image 88 when two or less straight lines are detected in S31 (S32: 2 or less).

次に、端末プログラム65は、例えばガイド画像113の位置に対するドラッグ操作を入力I/F54を通じて受け付けたことに応じて(S15:ガイド画像)、台形指定画面上でガイド画像113の位置を変更する(S16&S14)。より詳細には、端末プログラム65は、ガイド画像113の位置にタッチされた入力媒体が表示面上で移動されたことに応じて、当該入力媒体に追随してガイド画像113の位置を変更する。そして、端末プログラム65は、入力媒体が離間された位置、すなわちドラッグ操作の終了位置を、ガイド画像113の新たな位置に決定する。 Next, the terminal program 65 changes the position of the guide image 113 on the trapezoidal designation screen in response to receiving, for example, a drag operation for the position of the guide image 113 through the input I / F 54 (S15: guide image) (S15: guide image). S16 & S14). More specifically, the terminal program 65 changes the position of the guide image 113 following the input medium in response to the movement of the input medium touched to the position of the guide image 113 on the display surface. Then, the terminal program 65 determines the position where the input medium is separated, that is, the end position of the drag operation, at a new position of the guide image 113.

ガイド画像113は、台形指定画面の拡張画像88内の任意の位置、すなわち、撮影画像80及び追加画素87内の任意の位置に移動させることができる。一方、ガイド画像113は、台形指定画面の拡張画像88外に移動させることができない。ガイド画像111、112、114に対するドラッグ操作についても同様である。ドラッグ操作は、ガイド画像111〜114の位置を変更するタッチ操作、及び台形画像84の形状を指定するタッチ操作の一例である。なお、台形画像の形状を指定するタッチ操作は、ガイド画像111〜114に対するドラッグ操作に限定されない。例えば、端末プログラム65は、台形画像84を構成する辺の位置に対するドラッグ操作を入力I/F54を通じて受け付けたことに応じて、当該辺の位置及び角度を変更してもよい。 The guide image 113 can be moved to an arbitrary position in the extended image 88 of the trapezoidal designation screen, that is, to an arbitrary position in the captured image 80 and the additional pixel 87. On the other hand, the guide image 113 cannot be moved outside the extended image 88 of the trapezoidal designation screen. The same applies to the drag operation for the guide images 111, 112, 114. The drag operation is an example of a touch operation for changing the position of the guide images 111 to 114 and a touch operation for designating the shape of the trapezoidal image 84. The touch operation for designating the shape of the trapezoidal image is not limited to the drag operation for the guide images 111 to 114. For example, the terminal program 65 may change the position and angle of the side according to the acceptance of the drag operation with respect to the position of the side constituting the trapezoidal image 84 through the input I / F 54.

次に、端末プログラム65は、[補正]アイコン115の指定を入力I/F54を通じて受け付けたことに応じて(S15:補正アイコン)、ガイド画像111〜114の位置を頂点とする台形画像84を、拡張画像88から抽出する。そして、端末プログラム65は、抽出した台形画像84を台形補正して、長方形の補正画像を示す補正画像データを生成する(S17)。S17の処理は、補正処理の一例である。 Next, the terminal program 65 receives the designation of the [correction] icon 115 through the input I / F 54 (S15: correction icon), and receives the trapezoidal image 84 having the positions of the guide images 111 to 114 as vertices. Extracted from the extended image 88. Then, the terminal program 65 performs keystone correction on the extracted trapezoidal image 84 to generate corrected image data indicating a rectangular corrected image (S17). The process of S17 is an example of the correction process.

ガイド画像111〜114の少なくとも1つが追加画素87の位置に配置されている場合、端末プログラム65は、撮影画像80の画素と、追加画素87とを含む台形画像84を抽出する。また、端末プログラム65は、例えば、ガイド画像111〜114の位置を頂点とする台形画像84に対して、上辺及び短辺が平行になるように画素を補間することによって、補正画像データを生成する。台形補正は、例えば、射影変換等の周知のアルゴリズムによって実現される。 When at least one of the guide images 111 to 114 is arranged at the position of the additional pixel 87, the terminal program 65 extracts the trapezoidal image 84 including the pixel of the captured image 80 and the additional pixel 87. Further, the terminal program 65 generates corrected image data by interpolating pixels so that the upper side and the short side are parallel to the trapezoidal image 84 whose apex is the position of the guide images 111 to 114, for example. .. Keystone correction is realized by a well-known algorithm such as projective transformation.

次に、端末プログラム65は、図6(B)に示されるプレビュー画面をディスプレイ53に表示させる(S18)。プレビュー画面は、S17で生成された補正画像121と、[プリント]アイコン122と、[保存]アイコン123とを含む。[プリント]アイコン122は、補正画像データに対するプリント動作を複合機10に実行させる指示に対応する。[保存]アイコン123は、補正画像データを領域62Bに記憶させる指示に対応する。そして、端末プログラム65は、プレビュー画面に対するユーザ操作を、入力I/F54を通じて受け付ける(S19)。S18の処理は第2表示処理の一例であり、S19の処理は第2受付処理の一例である。 Next, the terminal program 65 causes the preview screen shown in FIG. 6B to be displayed on the display 53 (S18). The preview screen includes the corrected image 121 generated in S17, the [print] icon 122, and the [save] icon 123. The [print] icon 122 corresponds to an instruction to cause the multifunction device 10 to perform a print operation on the corrected image data. The [Save] icon 123 corresponds to an instruction to store the corrected image data in the area 62B. Then, the terminal program 65 accepts the user operation for the preview screen through the input I / F 54 (S19). The process of S18 is an example of the second display process, and the process of S19 is an example of the second reception process.

そして、端末プログラム65は、[プリント]アイコン122の指定を入力I/F54を通じて受け付けたことに応じて(S19:プリントアイコン)、通信I/F55を通じて複合機10にプリント指示情報を送信する(S20)。プリント指示情報は、補正画像データに対するプリント動作を指示するための情報であって、補正画像データを含む。一方図示は省略するが、複合機10の装置プログラム35は、通信I/F25を通じて携帯端末50からプリント指示情報を受信する。そして、装置プログラム35は、受信したプリント指示情報に従ったプリント動作をプリンタ11に実行させる。 Then, the terminal program 65 transmits the print instruction information to the multifunction device 10 through the communication I / F 55 in response to the reception of the designation of the [print] icon 122 through the input I / F 54 (S19: print icon) (S20: print icon). ). The print instruction information is information for instructing a print operation with respect to the corrected image data, and includes the corrected image data. On the other hand, although not shown, the device program 35 of the multifunction device 10 receives print instruction information from the mobile terminal 50 through the communication I / F 25. Then, the device program 35 causes the printer 11 to execute a print operation according to the received print instruction information.

一方、端末プログラム65は、[保存]アイコン123の指定を入力I/F54を通じて受け付けたことに応じて(S19:保存アイコン)、補正画像データを領域62Bに記憶させる(S21)。なお、端末プログラム65は、S20、S21で出力する補正画像データが追加画素を含む場合に、当該追加画素に撮影画像の背景画素値を設定してもよい。[プリント]アイコン122或いは[保存]アイコン123の指定は、指示操作の一例である。S20、S21の処理は、出力指示処理の一例である。 On the other hand, the terminal program 65 stores the corrected image data in the area 62B in response to the reception of the designation of the [save] icon 123 through the input I / F 54 (S19: save icon) (S21). When the corrected image data output in S20 and S21 includes additional pixels, the terminal program 65 may set the background pixel value of the captured image in the additional pixels. The designation of the [print] icon 122 or the [save] icon 123 is an example of the instruction operation. The processing of S20 and S21 is an example of output instruction processing.

[実施形態の作用効果]
上記の実施形態によれば、撮影画像の外縁に追加画素を付加した拡張画像内において、台形補正の対象となる台形画像をユーザに指定させることができる。すなわち、撮影画像に被写体の一部が含まれていない場合であっても、台形補正の対象となる領域をユーザに適切に指定させることができる。
[Action and effect of the embodiment]
According to the above embodiment, the user can specify the trapezoidal image to be the keystone correction in the extended image in which additional pixels are added to the outer edge of the captured image. That is, even when the captured image does not include a part of the subject, the user can appropriately specify the area to be the keystone correction.

なお、図5の例のように、追加画素85、95を必要な箇所に選択的に付加することによって、台形指定画面において撮影画像80、90を相対的に大きく表示させることができる。一方、図6(A)に示されるように、枠型の追加画素87を撮影画像80に付加することによって、撮影画像80及び拡張画像88の中心が一致するので、撮影時のアングルに近い拡張画像88を台形指定画面に表示させることができる。また、撮影画像80、90の外側に台形画像84、94の頂点83C、93Cが位置する場合にのみ撮影画像80、90が拡張されるので、不必要な追加画素の付加が抑制される。 By selectively adding the additional pixels 85 and 95 to the required positions as in the example of FIG. 5, the captured images 80 and 90 can be displayed relatively large on the trapezoidal designation screen. On the other hand, as shown in FIG. 6A, by adding the frame-shaped additional pixel 87 to the captured image 80, the centers of the captured image 80 and the expanded image 88 coincide with each other, so that the expansion is close to the angle at the time of photographing. The image 88 can be displayed on the trapezoidal designation screen. Further, since the captured images 80 and 90 are expanded only when the vertices 83C and 93C of the trapezoidal images 84 and 94 are located outside the captured images 80 and 90, the addition of unnecessary additional pixels is suppressed.

また、上記の実施形態によれば、台形画像84の頂点83A〜83Dの位置を推定し、推定された頂点83A〜83Dの位置を示すガイド画像111〜114を拡張画像88に重ねて表示し、表示されたガイド画像111〜114の位置を必要に応じてユーザに変更させる。これにより、台形画像84を指定するユーザ操作を簡略化することができる。また、適切な補正画像121が生成されたか否かを、プレビュー画面を通じてユーザに確認させてから、補正画像データを出力することができる。 Further, according to the above embodiment, the positions of the vertices 83A to 83D of the trapezoidal image 84 are estimated, and the guide images 111 to 114 showing the estimated positions of the vertices 83A to 83D are superimposed and displayed on the extended image 88. The user is made to change the positions of the displayed guide images 111 to 114 as necessary. This makes it possible to simplify the user operation for designating the trapezoidal image 84. Further, it is possible to output the corrected image data after having the user confirm whether or not the appropriate corrected image 121 has been generated through the preview screen.

また、上記の実施形態によれば、台形指定画面において、追加画素87に非背景画素値を設定することによって、撮影画像80に含まれる画素と追加画素87とをユーザに区別させることができる。これにより、追加画素87に重ねられたガイド画像113が適切な位置に表示されているか否かの確認を、ユーザに促すことができる。一方、補正画像データに含まれる追加画素に背景画素値を設定することにより、出力された補正画像データで示される補正画像内において、追加画素を目立たなくすることができる。 Further, according to the above embodiment, by setting the non-background pixel value for the additional pixel 87 on the trapezoidal designation screen, the user can distinguish between the pixel included in the captured image 80 and the additional pixel 87. This makes it possible to prompt the user to confirm whether or not the guide image 113 superimposed on the additional pixel 87 is displayed at an appropriate position. On the other hand, by setting the background pixel value for the additional pixel included in the corrected image data, the additional pixel can be made inconspicuous in the corrected image indicated by the output corrected image data.

また、上記の実施形態の複合機10及び携帯端末50において、メモリ32、62の領域32A、62Aに記憶された各種プログラムがCPU31、61によって実行されることによって、本発明の制御部が実行する各処理が実現される例を説明した。しかしながら、制御部の構成はこれに限定されず、その一部又は全部を集積回路等のハードウェアで実現してもよい。 Further, in the multifunction device 10 and the mobile terminal 50 of the above embodiment, the control unit of the present invention executes various programs stored in the areas 32A and 62A of the memories 32 and 62 by the CPUs 31 and 61. An example in which each process is realized has been described. However, the configuration of the control unit is not limited to this, and a part or all of the control unit may be realized by hardware such as an integrated circuit.

さらに、本発明は、複合機10及び携帯端末50として実現できるだけでなく、複合機10及び携帯端末50に処理を実行させるプログラムとして実現してもよい。そして、当該プログラムは、non−transitoryな記録媒体に記録されて提供されてもよい。non−transitoryな記録媒体は、CD−ROM、DVD−ROM等の他、通信ネットワーク101を通じて複合機10及び携帯端末50に接続可能なサーバに搭載された記憶部を含んでもよい。そして、サーバの記憶部に記憶されたプログラムは、当該プログラムを示す情報或いは信号として、インターネット等の通信ネットワーク101を通じて配信されてもよい。 Further, the present invention can be realized not only as a multifunction device 10 and a mobile terminal 50, but also as a program for causing the multifunction device 10 and the mobile terminal 50 to execute a process. Then, the program may be recorded and provided on a non-transitory recording medium. The non-transitory recording medium may include a storage unit mounted on a server that can be connected to the multifunction device 10 and the mobile terminal 50 through the communication network 101, in addition to a CD-ROM, a DVD-ROM, and the like. Then, the program stored in the storage unit of the server may be distributed through a communication network 101 such as the Internet as information or a signal indicating the program.

10・・・複合機
11・・・プリンタ
23,53・・・ディスプレイ
24,54・・・入力I/F
25,55・・・通信I/F
31,61・・・CPU
32,62・・・メモリ
35・・・装置プログラム
50・・・携帯端末
65・・・端末プログラム
10 ... Multifunction device 11 ... Printer 23, 53 ... Display 24, 54 ... Input I / F
25, 55 ... Communication I / F
31,61 ... CPU
32, 62 ... Memory 35 ... Device program 50 ... Mobile terminal 65 ... Terminal program

Claims (9)

カメラと、ディスプレイと、タッチセンサを有する入力インタフェースとを備える携帯端末によって読み取り可能なプログラムであって、
該プログラムは、
対象物を撮影した前記カメラによって生成された撮影画像データを取得する取得処理と、
前記取得処理によって取得された前記撮影画像データが、長方形の対象物を斜めから撮影した前記カメラによって生成された前記撮影画像データであって、当該対象物を示す台形画像の一部を含み他部を含まない当該撮影画像データである場合に、前記撮影画像データが示す前記台形画像の一部に基づいて、当該一部に含まれる前記台形画像の頂点と、前記他部に含まれる前記台形画像の頂点とを推定する推定処理と、
推定した前記頂点からなる前記台形画像を台形補正することによって、長方形の補正画像を示す補正画像データを生成する補正処理と、
前記補正画像データを出力する出力指示処理と、
前記他部に含まれる頂点であって、推定した頂点を含む追加画素を前記撮影画像データが示す撮影画像に追加することによって、当該撮影画像を拡張した拡張画像であって、前記台形画像を含む当該拡張画像を示す拡張画像データを生成する拡張処理と、
前記拡張画像を前記ディスプレイに表示させる第1表示処理と、
前記第1表示処理で表示された前記拡張画像内において、前記台形画像の形状を調整するタッチ操作を、前記入力インタフェースを通じて受け付ける第1受付処理と、を前記携帯端末に実行させ、
該プログラムは、
前記補正処理において、前記第1受付処理で受け付けた調整を反映した前記台形画像を台形補正して前記補正画像データを生成するプログラム。
A program readable by a mobile terminal comprising a camera, a display, and an input interface having a touch sensor.
The program
An acquisition process for acquiring captured image data generated by the camera that captured an object, and
The captured image data acquired by the acquisition process is the captured image data generated by the camera that captures a rectangular object from an angle, and includes a part of a trapezoidal image showing the object. When the captured image data does not include the above, the apex of the trapezoidal image included in the portion and the trapezoidal image included in the other portion are based on a part of the trapezoidal image indicated by the captured image data. Estimating processing to estimate the top of the image and
A correction process for generating corrected image data indicating a rectangular corrected image by performing trapezoidal correction on the trapezoidal image consisting of the estimated vertices.
Output instruction processing to output the corrected image data and
It is an expanded image that is an extension of the captured image by adding an additional pixel that is a vertex included in the other portion and includes the estimated vertex to the captured image indicated by the captured image data, and includes the trapezoidal image. Extended processing to generate extended image data indicating the extended image, and
The first display process for displaying the extended image on the display,
In the extended image displayed in the first display process, the mobile terminal is made to execute the first reception process of accepting the touch operation for adjusting the shape of the trapezoidal image through the input interface.
The program
In the correction process, a program for generating the corrected image data by performing trapezoidal correction of the trapezoidal image reflecting the adjustment received in the first reception process.
該プログラムは、
前記第1表示処理において、前記推定処理で推定した頂点の位置を示すガイド画像を、前記拡張画像に重ねて前記ディスプレイに表示させ、
前記第1受付処理において、前記追加画素に重ねて表示された前記ガイド画像の位置を変更するタッチ操作を、前記入力インタフェースを通じて少なくとも受け付けることが可能であり、
前記補正処理において、前記第1受付処理で変更された前記ガイド画像の位置を頂点とする前記台形画像を台形補正する請求項に記載のプログラム。
The program
In the first display process, a guide image showing the positions of the vertices estimated by the estimation process is superimposed on the extended image and displayed on the display.
In the first reception process, at least a touch operation for changing the position of the guide image displayed superimposed on the additional pixel can be received through the input interface.
Wherein the correction processing, the program according to claim 1, said trapezoidal image keystone correction to the vertex position of the modified the guide image in the first reception process.
該プログラムは、前記第1受付処理において、前記追加画素に重ねて表示された前記ガイド画像の位置に対するドラッグ操作を、当該ガイド画像に対応する頂点の位置を前記ドラッグ操作の終了位置に変更するタッチ操作として受け付ける請求項に記載のプログラム。 In the first reception process, the program changes the drag operation with respect to the position of the guide image displayed superimposed on the additional pixel to the position of the apex corresponding to the guide image to the end position of the drag operation. The program according to claim 2, which is accepted as an operation. 該プログラムは、
前記撮影画像に含まれる所定の長さ以上の直線を検出する検出処理と、
前記検出処理で検出した直線の数を判断する第1判断処理と、を前記携帯端末に実行させ、
4つの直線を検出したと前記第1判断処理で判断した場合の前記推定処理において、前記検出処理で検出した直線の各交点の位置を、前記台形画像の頂点の位置として推定する請求項又はに記載のプログラム。
The program
A detection process for detecting a straight line of a predetermined length or longer included in the captured image, and
The mobile terminal is made to execute the first determination process of determining the number of straight lines detected by the detection process.
2. The program described in 3.
該プログラムは、
3つの直線を検出したと前記第1判断処理で判断したことに応じて、前記撮影画像の輪郭線の1つを第4の直線に決定する決定処理を前記携帯端末に実行させ、
前記推定処理において、前記検出処理で検出した直線及び前記決定処理で決定した直線の各交点の位置を、前記台形画像の頂点の位置として推定する請求項に記載のプログラム。
The program
In response to the determination in the first determination process that three straight lines have been detected, the mobile terminal is made to execute a determination process for determining one of the contour lines of the captured image as the fourth straight line.
The program according to claim 4 , wherein in the estimation process, the positions of the intersections of the straight lines detected by the detection process and the straight lines determined by the determination process are estimated as the positions of the vertices of the trapezoidal image.
2つ以下の直線を検出したと前記第1判断処理で判断したことに応じて、前記推定処理を前記携帯端末に実行させず、且つ前記撮影画像の周囲を囲むように、前記撮影画像に前記追加画素を付加する前記拡張処理を前記携帯端末に実行させる請求項又はに記載のプログラム。 In response to the determination in the first determination process that two or less straight lines have been detected, the photographed image is described so as not to cause the mobile terminal to execute the estimation process and to surround the captured image. The program according to claim 4 or 5 , wherein the mobile terminal is made to execute the expansion process for adding additional pixels. 該プログラムは、前記第1表示処理において、前記追加画素に非背景画素値が設定された前記拡張画像を前記ディスプレイに表示させ、前記非背景画素値は、前記撮影画像の背景画素の画素値と異なる画素値である請求項からのいずれかに記載のプログラム。 In the first display process, the program displays the extended image in which the non-background pixel value is set for the additional pixel on the display, and the non-background pixel value is the pixel value of the background pixel of the captured image. The program according to any one of claims 1 to 6 , which has different pixel values. 該プログラムは、前記出力指示処理において、前記追加画素に背景画素値が設定された前記補正画像データを出力し、前記背景画素値は、前記撮影画像の背景画素の画素値である請求項からのいずれかに記載のプログラム。 The program outputs the corrected image data in which the background pixel value is set for the additional pixel in the output instruction process, and the background pixel value is the pixel value of the background pixel of the captured image from claim 1. The program described in any of 7. 該プログラムは、
前記補正画像を前記ディスプレイに表示させる第2表示処理と、
前記補正画像データの出力を指示する指示操作を、前記入力インタフェースを通じて受け付ける第2受付処理と、
前記第2受付処理で前記指示操作を受け付けたことに応じて、前記出力指示処理と、を前記携帯端末に実行させる請求項1からのいずれかに記載のプログラム。
The program
A second display process for displaying the corrected image on the display,
A second reception process that accepts an instruction operation for instructing the output of the corrected image data through the input interface, and
The program according to any one of claims 1 to 8 , wherein the mobile terminal executes the output instruction process in response to the reception of the instruction operation in the second reception process.
JP2020024909A 2016-02-23 2020-02-18 program Active JP6973524B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020024909A JP6973524B2 (en) 2016-02-23 2020-02-18 program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016031602A JP6665575B2 (en) 2016-02-23 2016-02-23 program
JP2020024909A JP6973524B2 (en) 2016-02-23 2020-02-18 program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2016031602A Division JP6665575B2 (en) 2016-02-23 2016-02-23 program

Publications (2)

Publication Number Publication Date
JP2020102235A JP2020102235A (en) 2020-07-02
JP6973524B2 true JP6973524B2 (en) 2021-12-01

Family

ID=71141318

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020024909A Active JP6973524B2 (en) 2016-02-23 2020-02-18 program

Country Status (1)

Country Link
JP (1) JP6973524B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006074512A (en) * 2004-09-02 2006-03-16 Casio Comput Co Ltd Image capturing apparatus, image processing method for image capturing apparatus, and program
JP6486603B2 (en) * 2014-04-03 2019-03-20 シャープ株式会社 Image processing device

Also Published As

Publication number Publication date
JP2020102235A (en) 2020-07-02

Similar Documents

Publication Publication Date Title
JP5722482B2 (en) Image processing system and image processing method
JP6584076B2 (en) Information processing apparatus, information processing method, and computer program
US20090051946A1 (en) Image area selecting method
KR101450782B1 (en) Image processing device and program
JP6971789B2 (en) Information processing equipment, programs and information processing methods
JP6808330B2 (en) Information processing equipment, information processing methods, and programs
US10853010B2 (en) Image processing apparatus, image processing method, and storage medium
US20120120099A1 (en) Image processing apparatus, image processing method, and storage medium storing a program thereof
JP6665575B2 (en) program
KR102038741B1 (en) Image processing apparatus, image processing method, and storage medium
JP5871606B2 (en) Image forming apparatus, image display method, and program
JP6589302B2 (en) Information processing apparatus, image reading apparatus, and image display method
JP6880687B2 (en) Programs and systems
JP6973524B2 (en) program
US10270932B2 (en) Non-transitory computer-readable medium and portable device
CN109327645A (en) image processing device
US11233911B2 (en) Image processing apparatus and non-transitory computer readable medium for image processing
US20160035062A1 (en) Electronic apparatus and method
JP6607083B2 (en) Program and information processing apparatus
JP5968926B2 (en) Information processing apparatus and information processing program
JP6260177B2 (en) Image processing system, image processing method, and image processing program
JP6312488B2 (en) Image processing apparatus, image processing method, and program
JP2020145632A (en) Image processing apparatus, image processing system, and program
JP6319974B2 (en) Form reader and program
JP2016045786A (en) Image processor, system, image processing method and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200305

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200312

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210413

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210528

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20211005

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211018

R150 Certificate of patent or registration of utility model

Ref document number: 6973524

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150