JP4225224B2 - Image processing apparatus, captured image projection apparatus, image processing method, and program - Google Patents

Image processing apparatus, captured image projection apparatus, image processing method, and program Download PDF

Info

Publication number
JP4225224B2
JP4225224B2 JP2004081641A JP2004081641A JP4225224B2 JP 4225224 B2 JP4225224 B2 JP 4225224B2 JP 2004081641 A JP2004081641 A JP 2004081641A JP 2004081641 A JP2004081641 A JP 2004081641A JP 4225224 B2 JP4225224 B2 JP 4225224B2
Authority
JP
Japan
Prior art keywords
image
polygon
document
detected
pedestal
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.)
Expired - Fee Related
Application number
JP2004081641A
Other languages
Japanese (ja)
Other versions
JP2005267465A5 (en
JP2005267465A (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.)
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 JP2004081641A priority Critical patent/JP4225224B2/en
Publication of JP2005267465A publication Critical patent/JP2005267465A/en
Publication of JP2005267465A5 publication Critical patent/JP2005267465A5/ja
Application granted granted Critical
Publication of JP4225224B2 publication Critical patent/JP4225224B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Editing Of Facsimile Originals (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)
  • Projection Apparatus (AREA)
  • Image Processing (AREA)

Description

本発明は、画像処理装置、撮影画像投影装置、画像処理方法及びプログラムに関し、特に視認性に優れた画像の取得を可能とする画像処理装置、撮影画像投影装置、画像処理方法及びプログラムに関する。   The present invention relates to an image processing device, a captured image projection device, an image processing method, and a program, and more particularly to an image processing device, a captured image projection device, an image processing method, and a program that enable acquisition of an image with excellent visibility.

台座上に載置された原稿をデジタルカメラで撮影し、撮影により得られたデジタル画像データに所定の画像処理等を施した後、アナログ変換して出力することにより、スクリーン上に原稿の拡大画像を投影する撮影画像投影装置が知られている(例えば、特許文献1参照)。かかる撮影画像投影装置により、従来のOHPではできなかった、3次元対象物を撮影してその画像をスクリーン上へ投影することが可能となった。
特開2002−354331号公報(第2−3頁、図1)。
The original placed on the pedestal is photographed with a digital camera, the digital image data obtained by photographing is subjected to predetermined image processing, etc., and then converted to analog and output, whereby an enlarged image of the original on the screen. A photographed image projection apparatus that projects the image is known (see, for example, Patent Document 1). With such a photographed image projection device, it has become possible to photograph a three-dimensional object and project the image onto a screen, which was not possible with conventional OHP.
JP 2002-354331 A (page 2-3, FIG. 1).

しかしながら、従来の撮影画像投影装置では、台座上に載置された原稿を斜め方向から撮影する場合、カメラの画角(撮影範囲)から原稿の一部がはみ出してしまうことがあった。この場合、原稿の全部をカメラの画角に収めるためには、カメラのズーム倍率を小さくしなければならない。   However, in the conventional photographed image projection apparatus, when a document placed on the pedestal is photographed from an oblique direction, a part of the document sometimes protrudes from the angle of view (shooting range) of the camera. In this case, the zoom magnification of the camera must be reduced in order to keep the entire document within the angle of view of the camera.

これにより、撮影画像全体に占める原稿の画像の割合が小さくなるため、スクリーン上に投影される原稿の画像も小さくなってしまい、非常に見にくいものとなってしまう。かかる問題は、あおり角が大きくなると特に顕著になる。また、撮影画像が歪んでいる場合には、この歪みに起因して原稿以外の画像の割合がさらに大きくなってしまう。このように原稿以外の画像の割合が大きい撮影画像の輝度及び色差を適切に補正することは困難であり、この結果、スクリーン上に投影される原稿の画像はさらに見にくいものとなる。   As a result, the ratio of the original image to the entire photographed image becomes small, and the original image projected on the screen also becomes small, making it very difficult to see. Such a problem becomes particularly noticeable when the tilt angle increases. In addition, when the captured image is distorted, the ratio of images other than the document is further increased due to the distortion. As described above, it is difficult to appropriately correct the luminance and color difference of the captured image in which the ratio of the image other than the document is large. As a result, the image of the document projected on the screen becomes more difficult to see.

本発明は、上記課題を解決するためになされたものであって、視認性に優れた画像の取得を可能とする画像処理装置、撮影画像投影装置、画像処理方法及びプログラムを提供することを目的とする。   The present invention has been made to solve the above-described problems, and an object thereof is to provide an image processing device, a captured image projection device, an image processing method, and a program that enable acquisition of an image with excellent visibility. And

上記目的を達成するため、本発明の第1の観点に係る画像処理装置は、
台座の輪郭を形成する多角形の頂点座標を格納するデータ格納手段と、
前記台座上の原稿を撮影することによって得られた画像から該原稿の輪郭を形成する多角形を検出する原稿多角形検出手段と、
前記原稿多角形検出手段により前記原稿の輪郭を形成する多角形が検出されたか否かを判別する原稿多角形検出判別手段と、
前記原稿多角形検出判別手段によって前記原稿の輪郭を形成する多角形が検出されたと判別した場合、該検出された多角形の頂点座標により指定される範囲で画像処理し、該原稿の輪郭を形成する多角形が検出されなかったと判別した場合、前記データ格納手段によって格納された頂点座標により指定される範囲で画像処理する画像処理手段と、を備える。
In order to achieve the above object, an image processing apparatus according to the first aspect of the present invention provides:
Data storage means for storing the vertex coordinates of the polygon forming the contour of the pedestal;
A document polygon detection means for detecting the polygon forming the outline of the document from the obtained image by taking the original on the pedestal,
An original polygon detection determining means for determining whether or not a polygon forming the outline of the original is detected by the original polygon detecting means;
When it is determined that the polygon forming the document outline is detected by the document polygon detection determining means , image processing is performed within a range specified by the vertex coordinates of the detected polygon, and the document outline is formed. Image processing means for performing image processing within a range specified by the vertex coordinates stored by the data storage means when it is determined that the polygon to be detected has not been detected.

また、上記画像処理装置において、前記原稿多角形検出手段は、前記画像から前記原稿の輪郭を形成する直線パラメータの候補を検出する候補検出手段と、前記候補検出手段が検出した候補のうちから、所定の条件を満たす直線パラメータの組を検出し、該検出した直線パラメータの組によって形成される多角形を前記原稿の輪郭として取得する原稿輪郭取得手段と、を含んでもよい。   Further, in the image processing apparatus, the document polygon detection unit includes a candidate detection unit that detects a straight line parameter candidate for forming a contour of the document from the image, and a candidate detected by the candidate detection unit. Document outline acquisition means for detecting a set of straight line parameters that satisfy a predetermined condition and acquiring a polygon formed by the detected set of straight line parameters as the outline of the original document may be included.

さらに、上記画像処理装置において、前記原稿輪郭取得手段は、前記候補検出手段が検出した候補のうちから、略平行の2本の直線パラメータの組を検出すると共に、該検出した2本の直線パラメータと略垂直の2本の直線パラメータの組を検出し、該検出した直線パラメータの組によって形成される多角形を前記原稿の輪郭として取得してもよい。   Furthermore, in the image processing apparatus, the document outline obtaining unit detects a set of two substantially parallel linear parameters from the candidates detected by the candidate detecting unit, and detects the detected two linear parameters. A set of two straight line parameters that are substantially perpendicular to each other may be detected, and a polygon formed by the detected set of straight line parameters may be acquired as the outline of the document.

また、上記画像処理装置において、前記画像処理手段によって指定される範囲の頂点座標からアフィンパラメータを取得するアフィンパラメータ取得手段と、前記アフィンパラメータ取得手段により取得されたアフィンパラメータを用いて、前記画像に含まれる各画素の座標をアフィン変換することにより、該画像の傾きを補正して出力する画像補正手段と、をさらに備えてもよい。 Further, in the image processing apparatus, the affine parameter acquisition unit that acquires the affine parameter from the vertex coordinates in the range specified by the image processing unit, and the affine parameter acquired by the affine parameter acquisition unit are used for the image. Image correction means for correcting and outputting the inclination of the image by performing affine transformation on the coordinates of each pixel included may be further provided.

さらに、上記画像処理装置において、前記台座を撮影することによって得られた画像から該台座の輪郭を形成する多角形を検出する台座多角形検出手段と、前記台座多角形検出手段により前記台座の輪郭を形成する多角形が検出されたか否かを判別する台座多角形検出判別手段と、前記台座多角形検出判別手段によって前記台座の輪郭を形成する多角形が検出されたと判別した場合、該検出した多角形の頂点座標データを前記データ格納手段に書き込むことによって、前記台座の輪郭を形成する多角形の頂点座標データを更新するデータ更新手段と、をさらに備えてもよい。 Further, in the image processing apparatus, a pedestal polygon detecting means for detecting a polygon forming the outline of the pedestal from an image obtained by photographing the pedestal, and an outline of the pedestal by the pedestal polygon detecting means. A pedestal polygon detection discriminating means for discriminating whether or not a polygon forming the pedestal is detected, and the pedestal polygon detection discriminating means detects that the polygon forming the contour of the pedestal has been detected. Data update means for updating polygon vertex coordinate data forming the contour of the pedestal by writing polygon vertex coordinate data into the data storage means may be further provided.

また、上記画像処理装置において、前記台座多角形検出手段は、前記台座を撮影することによって得られた画像のうちから、略平行の2本の直線パラメータの組を検出すると共に、該検出した2本の直線パラメータと略垂直の2本の直線パラメータの組を検出し、該検出した直線パラメータの組によって形成される多角形を前記台座の輪郭として取得してもよい。Further, in the image processing apparatus, the pedestal polygon detecting means detects a set of two substantially parallel linear parameters from an image obtained by photographing the pedestal, and detects the detected 2 Alternatively, a set of two straight line parameters that are substantially perpendicular to the straight line parameters may be detected, and a polygon formed by the detected straight line parameter set may be acquired as the contour of the pedestal.

さらに、上記目的を達成するため、本発明の第の観点に係る撮影画像投影装置は、台座の輪郭を形成する多角形の頂点座標を格納するデータ格納手段と、前記台座上に載置された原稿を撮影する原稿撮影手段と、前記原稿撮影手段による撮影により得られた画像から該原稿の輪郭を形成する多角形を検出する原稿多角形検出手段と、前記原稿多角形検出手段により前記原稿の輪郭を形成する多角形が検出されたか否かを判別する原稿多角形検出判別手段と、前記原稿多角形検出判別手段によって前記原稿の輪郭を形成する多角形が検出されたと判別した場合、該検出された多角形の頂点座標により指定される範囲で画像処理し、該原稿の輪郭を形成する多角形が検出されなかったと判別した場合、前記データ格納手段によって格納された頂点座標により指定される範囲で画像処理する画像処理手段と、前記画像処理手段から出力された画像をスクリーン上に投影する画像投影手段と、を備える。 Furthermore, in order to achieve the above object, a captured image projection apparatus according to a second aspect of the present invention is placed on the pedestal and data storage means for storing polygonal vertex coordinates forming the outline of the pedestal. A document photographing means for photographing the original, a document polygon detecting means for detecting a polygon that forms an outline of the document from an image obtained by photographing by the document photographing means, and the document by the document polygon detecting means. A document polygon detecting / determining means for determining whether or not a polygon forming the contour of the document is detected, and a polygon that forms the contour of the document is detected by the document polygon detecting / determining means, and image processing range designated by the detected polygon vertex coordinates of, if the polygons that form the outline of the document is determined to have not been detected, the top stored by said data storage means Comprising image processing means for image processing in a range specified by coordinates, the image projection means for projecting an image output from said image processing means on a screen, a.

また、上記目的を達成するため、本発明の第の観点に係る画像処理方法は、台座の輪郭を形成する多角形の頂点座標を格納するデータ格納工程と、前記台座上の原稿を撮影することによって得られた画像から該原稿の輪郭を形成する多角形を検出する原稿多角形検出工程と、前記原稿多角形検出工程により前記原稿の輪郭を形成する多角形が検出されたか否かを判別する原稿多角形検出判別工程と、前記原稿多角形検出判別工程によって前記原稿の輪郭を形成する多角形が検出されたと判別した場合、該検出された多角形の頂点座標により指定される範囲で画像処理し、該原稿の輪郭を形成する多角形が検出されなかったと判別した場合、前記データ格納手段によって格納された頂点座標により指定される範囲で画像処理する画像処理工程と、を備える。 In order to achieve the above object, an image processing method according to a third aspect of the present invention includes a data storage step of storing polygonal vertex coordinates forming a contour of a pedestal, and photographing a document on the pedestal. A document polygon detecting step for detecting a polygon forming the contour of the document from the obtained image, and determining whether or not the polygon forming the contour of the document is detected by the document polygon detecting step. When it is determined that the polygon forming the outline of the original is detected by the original polygon detection determining step and the original polygon detection determining step , the image is within the range specified by the vertex coordinates of the detected polygon. processing, if the polygons that form the contour of the document is determined to have not been detected, the image processing step of image processing in the range specified by the vertex coordinates stored by said data storage means , Comprising a.

また、上記目的を達成するため、本発明の第の観点に係るプログラムは、コンピュータに、台座の輪郭を形成する多角形の頂点座標を格納するデータ格納手順と、前記台座上の原稿を撮影することによって得られた画像から該原稿の輪郭を形成する多角形を検出する原稿多角形検出手順と、前記原稿多角形検出手順により前記原稿の輪郭を形成する多角形が検出されたか否かを判別する原稿多角形検出判別手順と、前記原稿多角形検出判別手順によって前記原稿の輪郭を形成する多角形が検出されたと判別した場合、該検出された多角形の頂点座標により指定される範囲で画像処理し、該原稿の輪郭を形成する多角形が検出されなかったと判別した場合、前記データ格納手段によって格納された頂点座標により指定される範囲で画像処理する画像処理手順と、を実行させる。 In order to achieve the above object, a program according to the fourth aspect of the present invention captures a data storage procedure for storing the vertex coordinates of a polygon forming the outline of a pedestal in a computer and a document on the pedestal. A document polygon detection procedure for detecting a polygon that forms the contour of the document from the image obtained by the operation, and whether or not a polygon that forms the contour of the document is detected by the document polygon detection procedure. When it is determined that the polygon forming the outline of the document is detected by the document polygon detection determination procedure and the document polygon detection determination procedure, the range is specified by the vertex coordinates of the detected polygon. image processing, if the polygons that form the outline of the document is determined to have not been detected, to the image processing in the range specified by the vertex coordinates stored by said data storage means An image processing procedure, thereby running.

本発明により、視認性に優れた画像の取得を可能とする画像処理装置、撮影画像投影装置、画像処理方法及びプログラムを提供することができた。   According to the present invention, it is possible to provide an image processing device, a captured image projection device, an image processing method, and a program that enable acquisition of an image with excellent visibility.

本発明の実施形態に係る撮影画像投影装置を以下図面を参照して説明する。   A captured image projection apparatus according to an embodiment of the present invention will be described below with reference to the drawings.

図1は、本発明の実施形態に係る撮影画像投影装置の構成を示す図である。撮影画像投影装置は、図1に示すように、書画カメラ1と、プロジェクタ2と、コンピュータ5と、から構成されている。   FIG. 1 is a diagram illustrating a configuration of a captured image projection apparatus according to an embodiment of the present invention. As shown in FIG. 1, the captured image projection apparatus includes a document camera 1, a projector 2, and a computer 5.

書画カメラ1は、図1(a)に示すように投影対象の原稿4を撮影する機能と、図1(b)に示すように撮影対象物としてスクリーン3等の文字、図、写真等を撮影する機能と、を有しており、カメラ部11と、支柱12と、台座13と、操作台14と、から構成されている。   The document camera 1 has a function of photographing a document 4 to be projected as shown in FIG. 1A and a character, a figure, a photograph, etc., such as a screen 3 as an object to be photographed as shown in FIG. 1B. And includes a camera unit 11, a support column 12, a pedestal 13, and an operation table 14.

カメラ部11は、原稿4を撮影するためのものであり、デジタルカメラによって構成されている。支柱12は、カメラ部11を取り付けるためのものであり、カメラ部11及び台座13と回転自在に接続されている。台座13は、この支柱12を支えるためのものである。   The camera unit 11 is for photographing the document 4 and is constituted by a digital camera. The support column 12 is for attaching the camera unit 11, and is rotatably connected to the camera unit 11 and the pedestal 13. The pedestal 13 is for supporting the support column 12.

図2は、図1に示す書画カメラ1の構成を示すブロック図である。書画カメラ1は、図2に示すように、画像データ生成部21と、データ処理部22と、から構成されている。この画像データ生成部21とデータ処理部22とは、図1に示すカメラ部11に設けられてもよいし、画像データ生成部21とデータ処理部22とは、それぞれカメラ部11と操作台14とに設けられてもよい。   FIG. 2 is a block diagram showing the configuration of the document camera 1 shown in FIG. As shown in FIG. 2, the document camera 1 includes an image data generation unit 21 and a data processing unit 22. The image data generation unit 21 and the data processing unit 22 may be provided in the camera unit 11 shown in FIG. 1, and the image data generation unit 21 and the data processing unit 22 include the camera unit 11 and the operation console 14, respectively. And may be provided.

画像データ生成部21は、撮影対象物(原稿4やスクリーン3)を撮影して撮影対象物の画像データを取り込むためのものであり、光学レンズ装置101と、イメージセンサ102と、から構成されている。   The image data generation unit 21 captures image data of a shooting target by shooting a shooting target (original 4 or screen 3), and includes an optical lens device 101 and an image sensor 102. Yes.

光学レンズ装置101は、光を集光するレンズやこのレンズを駆動する駆動装置等によって構成されており、イメージセンサ102上に撮影対象物の文字、図、写真等からの光を集光させて像を結像させる。   The optical lens device 101 includes a lens that collects light and a driving device that drives the lens. The optical lens device 101 collects light from characters, drawings, photographs, and the like of an object to be photographed on the image sensor 102. Form an image.

イメージセンサ102は、光学レンズ装置101が光を集光することにより結像した画像を、デジタル化した画像データとして取り込むためのものであり、CCD(Charge Coupled Device)等によって構成されている。   The image sensor 102 is for capturing an image formed by condensing light by the optical lens device 101 as digitized image data, and is configured by a CCD (Charge Coupled Device) or the like.

データ処理部22は、画像データ生成部21から取り込んだ原稿4やスクリーン3の画像データを取得して画像処理を行い、画像処理を施した画像データをプロジェクタ2に出力するものであり、メモリ201と、ビデオ出力装置202と、画像処理装置203と、操作部204と、プログラムコード記憶装置205と、CPU(Central Processing Unit)206と、インタフェイス装置208と、から構成されている。   The data processing unit 22 acquires the image data of the document 4 and the screen 3 captured from the image data generation unit 21 and performs image processing, and outputs the image data subjected to the image processing to the projector 2. A video output device 202, an image processing device 203, an operation unit 204, a program code storage device 205, a CPU (Central Processing Unit) 206, and an interface device 208.

メモリ201は、イメージセンサ102からの画像、ビデオ出力装置202に送り出すための画像データ等を一時記憶するためのものである。また、メモリ201は、CPU206の作業メモリとしても用いられる。ビデオ出力装置202は、コンピュータ5に送り出す画像データを図示しない表示装置に出力することによって、原稿4やスクリーン3の画像を表示装置に表示するものである。   The memory 201 is for temporarily storing an image from the image sensor 102, image data to be sent to the video output device 202, and the like. The memory 201 is also used as a work memory for the CPU 206. The video output device 202 outputs the image data sent to the computer 5 to a display device (not shown), thereby displaying the image of the document 4 or the screen 3 on the display device.

画像処理装置203は、メモリ201に一時記憶された画像データに対して、画像データの圧縮、画像の歪み補正や画像効果などの画像処理を行うためのものである。   The image processing apparatus 203 is for performing image processing such as image data compression, image distortion correction, and image effect on the image data temporarily stored in the memory 201.

例えば、カメラ部11が原稿4の文字等を撮影面に対して斜めの状態あるいは回転した状態で撮影した場合、画像処理装置203は、図3(a)に示すような斜めの状態あるいは回転した状態の原稿4の画像に対して歪み補正(台形補正)を施すことによって、図3(b)に示すような正面から撮影した原稿4の画像を生成する。   For example, when the camera unit 11 captures characters or the like of the document 4 in an oblique state or rotated state with respect to the photographing surface, the image processing apparatus 203 is inclined or rotated as shown in FIG. By performing distortion correction (trapezoid correction) on the image of the document 4 in the state, an image of the document 4 taken from the front as shown in FIG. 3B is generated.

また、カメラ部11がスクリーン3の文字等を向かって左方向から撮影した場合、画像処理装置203は、図4(a)に示すような左方向から撮影されたスクリーン3の画像に対して歪み補正を施すことによって、図4(b)に示すような正面から撮影したスクリーン3の画像を生成する。   In addition, when the camera unit 11 captures the characters on the screen 3 from the left direction, the image processing apparatus 203 distorts the image of the screen 3 captured from the left direction as illustrated in FIG. By performing the correction, an image of the screen 3 taken from the front as shown in FIG. 4B is generated.

画像処理装置203は、歪み補正するため、歪んだ画像から四角形を切り取り、切り取った四角形に撮影画像を射影変換する。より詳細には、画像処理装置203は、CPU206に制御されて、主に、(1)撮影画像からアフィンパラメータを抽出するアフィンパラメータ抽出処理、(2)抽出したアフィンパラメータを用いて画像を射影変換して歪み補正する画像変換処理、(3)輝度あるいは色差等を補正して画像を鮮明化する画像鮮明化処理等を実行する。なお、これらの処理内容については、後述する。   In order to correct distortion, the image processing apparatus 203 cuts a rectangle from the distorted image, and performs projective conversion of the captured image into the cut rectangle. More specifically, the image processing apparatus 203 is controlled by the CPU 206 to mainly perform (1) affine parameter extraction processing for extracting affine parameters from the captured image, and (2) projective transformation of the image using the extracted affine parameters. Then, an image conversion process for correcting distortion is performed, and (3) an image sharpening process for correcting the luminance or color difference to sharpen the image. The details of these processes will be described later.

操作部204は、書画投影の機能を制御するためのキーやボタンを備えるものであり、ユーザがこれらのスイッチやボタンを操作したときの操作情報をCPU206に出力する。   The operation unit 204 includes keys and buttons for controlling the function of document projection, and outputs operation information to the CPU 206 when the user operates these switches and buttons.

本実施形態において、操作部204は、撮影キーとキャリブレーション要求キーとコントロールキーとシャッターボタンとを備えている。撮影キーは、原稿4の画像を撮影する書画撮影モードとスクリーン3の画像を撮影するボード撮影モードのうちから所望の撮影モードを選択するためのキーである。   In the present embodiment, the operation unit 204 includes a photographing key, a calibration request key, a control key, and a shutter button. The shooting key is a key for selecting a desired shooting mode from a document shooting mode for shooting an image of the document 4 and a board shooting mode for shooting an image of the screen 3.

キャリブレーション要求キーは、台座13の輪郭の形状の登録を指示するためのキーである。コントロールキーは、操作を確定するためのYESキーと操作をキャンセルするためのNOキーとを含んでいる。シャッタボタンは、撮影対象物を撮影するときに押下するものである。ズームボタンは、小さい原稿4を撮影する場合や原稿4の一部分を拡大して撮影する場合等に、カメラ部11のズーム制御を行うために、押下されるものである。   The calibration request key is a key for instructing registration of the contour shape of the base 13. The control key includes a YES key for confirming the operation and a NO key for canceling the operation. The shutter button is pressed when shooting an object to be shot. The zoom button is pressed in order to perform zoom control of the camera unit 11 when shooting a small document 4 or enlarging a part of the document 4.

プログラムコード記憶装置205は、CPU206が実行するプログラムを記憶するためのものであり、ROM(Read Only Memory)等によって構成される。   The program code storage device 205 is for storing a program executed by the CPU 206, and is configured by a ROM (Read Only Memory) or the like.

CPU206は、プログラムコード記憶装置205に格納されているプログラムに従って、各部を制御するものである。具体的には、操作部204から送信される操作情報に基づいて、イメージセンサ102,メモリ201,ビデオ出力装置202及び画像処理装置203等を制御する。   The CPU 206 controls each unit in accordance with a program stored in the program code storage device 205. Specifically, the image sensor 102, the memory 201, the video output device 202, the image processing device 203, and the like are controlled based on operation information transmitted from the operation unit 204.

例えば、ユーザにより撮影キーが押下されると、CPU206は、操作部204から送信される操作情報に応答して、書画撮影モード或いはボード撮影モードに各部を設定すると共に、シャッタボタンが押下されるまで、イメージセンサ102を動画中モードに設定する。そして、シャッタボタンが押下されると、CPU206は、操作部204からの操作情報に応答して、高い解像度で画像の読込を行う静止中モードに設定する。   For example, when the shooting key is pressed by the user, the CPU 206 sets each unit in the document shooting mode or the board shooting mode in response to the operation information transmitted from the operation unit 204 and until the shutter button is pressed. The image sensor 102 is set to the moving image mode. When the shutter button is pressed, the CPU 206 sets a still mode in which an image is read at a high resolution in response to operation information from the operation unit 204.

また、CPU206は、光学レンズ装置101の焦点、露出、ホワイトバランス等のカメラ設定パラメータを動作中モードに初期化する機能を有する。これにより、カメラ部11が捉えているシーンは、光学レンズ装置101を経由してイメージセンサ102に集光され、イメージセンサ102は、集光された画像から動画撮影用の解像度の低いデジタルの画像データを作成し、メモリ201に、例えば、1秒あたり30枚程度で送り出す。   The CPU 206 has a function of initializing camera setting parameters such as the focus, exposure, and white balance of the optical lens device 101 to the operating mode. As a result, the scene captured by the camera unit 11 is condensed on the image sensor 102 via the optical lens device 101, and the image sensor 102 is a digital image with a low resolution for moving image shooting from the collected image. Data is created and sent to the memory 201 at, for example, about 30 sheets per second.

さらに、CPU206は、後述するフローチャートに従って、撮影対象物である原稿4の画像に動きがあるか否かを判定し、判定結果に従って、動作中モードと静止中モードとを切り替える。   Further, the CPU 206 determines whether or not there is a motion in the image of the document 4 that is the photographing target according to a flowchart described later, and switches between the operating mode and the stationary mode according to the determination result.

動作中モードは、ユーザが台座13に投影したい原稿4等を載置しようとする場合に設定されるモードであって、カメラ部11で映し出している画像をそのままプロジェクタ2に投影するモードである。   The in-operation mode is a mode that is set when the user intends to place the document 4 or the like that the user wants to project on the pedestal 13 and is a mode that projects the image projected by the camera unit 11 onto the projector 2 as it is.

動作中モードでは、CPU206は、例えば、画像解像度がVGA(Video Graphics Array:640×480ドット)程度の画像を30fps(フレーム/秒)の速さで動画投影を行なうように、各部を制御するものとする。このように、動作中モードは、解像度は低いものの、リアルタイム性を重視したモードである。   In the operating mode, the CPU 206 controls each unit so that, for example, an image having an image resolution of about VGA (Video Graphics Array: 640 × 480 dots) is projected at a speed of 30 fps (frame / second). And As described above, the operating mode is a mode in which real-time characteristics are emphasized although the resolution is low.

静止中モードは、ユーザが原稿4を置いた後に設定されるモードであって、カメラ部11で高解像度の画像撮影を行い、高解像度の静止画像の投影を行うモードである。カメラ部11が撮影解像度300万画素のカメラである場合、切り出した投影画像はXGA(Extended Graphics Array:1024×768ドット)の静止画像になる。   The still mode is a mode that is set after the user places the document 4 and is a mode in which the camera unit 11 takes a high-resolution image and projects a high-resolution still image. When the camera unit 11 is a camera with an imaging resolution of 3 million pixels, the cut-out projected image is an XGA (Extended Graphics Array: 1024 × 768 dots) still image.

インタフェイス装置208は、圧縮した画像データをコンピュータ5に送信するためのものである。   The interface device 208 is for transmitting the compressed image data to the computer 5.

図1に示すプロジェクタ2は、スクリーン3に投影光を照射して原稿4の画像を結像させるものである。コンピュータ5は、書画カメラ1とUSB等のケーブル15を介して接続されると共に、プロジェクタ2とRGB等のケーブル16を介して接続されている。コンピュータ5は、書画カメラ1からケーブル15を介して送出された原稿4の画像データを受信し、この受信した画像データをケーブル16を介してプロジェクタ2に出力するものである。   A projector 2 shown in FIG. 1 forms an image of an original 4 by irradiating a screen 3 with projection light. The computer 5 is connected to the document camera 1 via a cable 15 such as a USB, and is also connected to the projector 2 via a cable 16 such as RGB. The computer 5 receives the image data of the document 4 sent from the document camera 1 via the cable 15 and outputs the received image data to the projector 2 via the cable 16.

次に、本実施形態に係る撮影画像投影装置の動作を説明する。ユーザが撮影画像投影装置の電源をONすると、書画カメラ1のCPU206は、プログラムコード記憶装置205からプログラムコードを読み出してカメラ基本処理を実行する。   Next, the operation of the captured image projection apparatus according to this embodiment will be described. When the user turns on the power of the captured image projection apparatus, the CPU 206 of the document camera 1 reads the program code from the program code storage device 205 and executes the basic camera processing.

図5は、書画カメラ基本処理のフローチャートである。このカメラ基本処理において、CPU206は、まず、図5に示すように、書画カメラ1のカメラ部11の焦点、露出、ホワイトバランスなどのカメラ設定パラメータの初期化を行う(ステップS1)。これにより、カメラが捉えているシーンが、光学レンズ装置101を経由してイメージセンサ102に集光され、イメージセンサは集光された画像からデジタル画像の作成が可能なる。   FIG. 5 is a flowchart of the document camera basic process. In this camera basic process, the CPU 206 first initializes camera setting parameters such as the focus, exposure, and white balance of the camera unit 11 of the document camera 1 as shown in FIG. 5 (step S1). As a result, the scene captured by the camera is condensed on the image sensor 102 via the optical lens device 101, and the image sensor can create a digital image from the collected image.

次に、CPU206は、モードスイッチをチェックする等して、撮影モードが書画撮影モードかボード撮影モードかを判別する(ステップS2)。撮影モードが書画撮影モードであると判別した場合には(ステップS2;Yes)、書画撮影処理を実行する(ステップS3)。一方、撮影モードがボード撮影モードであると判別した場合には(ステップS2;No)、ボード撮影処理を実行する(ステップS4)。   Next, the CPU 206 checks the mode switch or the like to determine whether the shooting mode is the document shooting mode or the board shooting mode (step S2). When it is determined that the shooting mode is the document shooting mode (step S2; Yes), the document shooting process is executed (step S3). On the other hand, if it is determined that the shooting mode is the board shooting mode (step S2; No), board shooting processing is executed (step S4).

このステップS3及びS4の撮影処理で得られた画像データは、メモリ201の所定領域に格納される。そして、ステップS3又はS4の撮影処理が終了すると、CPU206は、ステップS2に戻り、再度、モードスイッチを検出して、ステップS3又はS4の撮影処理を実行する。   The image data obtained by the photographing processes in steps S3 and S4 is stored in a predetermined area of the memory 201. When the photographing process in step S3 or S4 is completed, the CPU 206 returns to step S2, detects the mode switch again, and executes the photographing process in step S3 or S4.

CPU206は、ステップS3又はS4の撮影処理で得られた画像データをメモリ201から読み出し、ビデオ出力装置105を介してRGB出力として外部に出力すると共に、この画像データを画像処理装置203にて圧縮した後、インタフェイス装置108を介してコンピュータ5に転送する。   The CPU 206 reads out the image data obtained by the photographing process in step S3 or S4 from the memory 201, outputs the image data to the outside as an RGB output via the video output device 105, and compresses the image data by the image processing device 203. Thereafter, the data is transferred to the computer 5 via the interface device 108.

続いて、コンピュータ5は、HDD等にインストールされた書画処理用のソフトウェアが起動してPC書画基本処理を実行する。図6は、PC書画基本処理を示すフローチャートである。このPC書画基本処理において、コンピュータ5は、まず、図6に示すように、書画カメラから転送された画像データを受信したか否かを判別し(ステップS11)、画像データを受信したと判別した場合には(ステップS11;Yes)、受信した画像データに対してデコード処理を施す(ステップS12)。一方、画像データを受信していないと判別した場合には(ステップS11;No)、画像データを受信するまでループして待つ。   Subsequently, the computer 5 starts up the document processing software installed in the HDD or the like and executes the PC document basic processing. FIG. 6 is a flowchart showing the PC document basic process. In this PC document basic process, as shown in FIG. 6, the computer 5 first determines whether or not the image data transferred from the document camera has been received (step S11), and determines that the image data has been received. In such a case (step S11; Yes), the received image data is decoded (step S12). On the other hand, when it is determined that the image data has not been received (step S11; No), the process waits in a loop until the image data is received.

そして、コンピュータ5は、撮影モードが書画撮影モードかボード撮影モードかを判別し(ステップS13)、撮影モードが書画撮影モードであると判別した場合には(ステップS13;Yes)、受信した画像を描画し(ステップS14)、描画した画像のデータをプロジェクタ2に出力することによって、この画像をスクリーン3に投影する。一方、撮影モードがボード撮影モードであると判別した場合には(ステップS13;No)、受信した画像データをファイル等に保存する(ステップS15)。   Then, the computer 5 determines whether the shooting mode is the document shooting mode or the board shooting mode (step S13). If the computer 5 determines that the shooting mode is the document shooting mode (step S13; Yes), the received image is displayed. Drawing is performed (step S14), and the data of the drawn image is output to the projector 2 to project this image on the screen 3. On the other hand, when it is determined that the shooting mode is the board shooting mode (step S13; No), the received image data is stored in a file or the like (step S15).

続いて、ステップS3の書画撮影処理について詳細に説明する。図7及び図8は、書画撮影処理の詳細を示すフローチャートである。この書画撮影処理において、CPU206は、まず、図7に示すように、インタフェイス装置208、画像処理装置203やメモリ201内の作業メモリの初期化を行う(ステップS101)。次に、CPU206は、初期状態での台座13の輪郭の形状を登録するため、キャリブレーション要求フラグをセットする(ステップS102)。   Next, the document photographing process in step S3 will be described in detail. 7 and 8 are flowcharts showing details of the document photographing process. In this document photographing process, the CPU 206 first initializes the work memory in the interface device 208, the image processing device 203, and the memory 201 as shown in FIG. 7 (step S101). Next, the CPU 206 sets a calibration request flag in order to register the contour shape of the pedestal 13 in the initial state (step S102).

続いて、CPU206は、ユーザによりキャリブレーション要求キーが押下されたか否かを判別する(ステップS103)。キャリブレーション要求キーが押下されていないと判別した場合には(ステップS103;No)、ズーム処理を実行する(ステップS104)。このズーム処理において、CPU206は、ユーザによりズームボタン等が押下されたか否かを判別し、押下されていると判別した場合には、カメラ部11のズーム制御を行う。さらに、ズーム処理にてカメラ部11のズームが変更された場合、CPU206は、台座登録変更処理を実行する。この台座登録変更処理において、CPU206は、ズーム処理前とズーム処理後とのズーム比に応じて、メモリ201に格納されている台座13の輪郭の形状を示す直線パラメータを調整する。   Subsequently, the CPU 206 determines whether or not the calibration request key is pressed by the user (step S103). When it is determined that the calibration request key has not been pressed (step S103; No), zoom processing is executed (step S104). In this zoom process, the CPU 206 determines whether or not the zoom button or the like has been pressed by the user, and performs zoom control of the camera unit 11 if determined to be pressed. Further, when the zoom of the camera unit 11 is changed in the zoom process, the CPU 206 executes a pedestal registration change process. In this pedestal registration change process, the CPU 206 adjusts a linear parameter indicating the contour shape of the pedestal 13 stored in the memory 201 in accordance with the zoom ratio before and after the zoom process.

そして、CPU206は、カメラ部11による撮影を行い、画像データを取得する(ステップS105)。初期状態において、台座13上には原稿4が載置されておらず、カメラ部11は、台座13のみを撮影して台座13の画像データを取得する。その後、CPU206は、撮影によって得られた画像データをイメージセンサ102からメモリ201に転送する。   Then, the CPU 206 performs shooting by the camera unit 11 and acquires image data (step S105). In the initial state, the document 4 is not placed on the pedestal 13, and the camera unit 11 captures only the pedestal 13 and acquires image data of the pedestal 13. Thereafter, the CPU 206 transfers image data obtained by photographing to the memory 201 from the image sensor 102.

続いて、CPU206は、メモリ201から画像データを読み出し、この画像データと前回の撮影により得られた画像データとを比較して、画像に動きがあるか否かを判別する(ステップS106)。具体的には、画像データの差分が所定の閾値以上であるか否かを判別することによって、画像の動きを検出する。   Subsequently, the CPU 206 reads the image data from the memory 201, compares the image data with the image data obtained by the previous shooting, and determines whether or not there is a motion in the image (step S106). Specifically, the movement of the image is detected by determining whether or not the difference between the image data is equal to or greater than a predetermined threshold.

画像に動きがあると判別された場合には(ステップS106;Yes)、動作中モードにセットして(ステップS107)、撮影した画像をそのまま表示装置に表示する。一方、画像に動きがないと判別された場合には(ステップS106;No)、動作中モードがセットされているか静止画モードがセットされているかをチェックして、前回まで画像に動きがあったか否かを判別する(ステップS108)。CPU206は、前回まで画像に動きがあったと判別した場合(ステップS108;Yes)、静止中モードにセットする(ステップS109)。   If it is determined that there is a motion in the image (step S106; Yes), the operation mode is set (step S107), and the captured image is displayed on the display device as it is. On the other hand, when it is determined that there is no motion in the image (step S106; No), it is checked whether the in-operation mode is set or the still image mode is set, and whether the image has moved until the previous time. Is determined (step S108). If the CPU 206 determines that the image has moved until the previous time (step S108; Yes), the CPU 206 sets the still mode (step S109).

続いて、CPU206は、キャリブレーション要求フラグをチェックして、キャリブレーション要求がされている否かを判別し(ステップS110)、キャリブレーション要求がされていると判別した場合には(ステップS110;Yes)、台座登録処理を実行する(ステップS111)。この台座登録処理において、CPU206は、撮影した画像から台座13の輪郭の形状を取得して登録する。このように一度台座13の輪郭の形状の登録が行われると、カメラ部11の台座13に対するあおり角が変動する等、カメラ部11と台座13との位置関係が変動してユーザによりキャリブレーション要求キーが押下されるまで、再度台座13の輪郭の形状の登録が行われることはない。   Subsequently, the CPU 206 checks the calibration request flag to determine whether or not a calibration request has been made (step S110). If it is determined that a calibration request has been made (step S110; Yes) ), A pedestal registration process is executed (step S111). In this pedestal registration process, the CPU 206 acquires and registers the contour shape of the pedestal 13 from the captured image. Once the contour shape of the pedestal 13 is registered as described above, the positional relationship between the camera unit 11 and the pedestal 13 varies, for example, the tilt angle of the camera unit 11 with respect to the pedestal 13 varies. The contour shape of the base 13 is not registered again until the key is pressed.

その後、CPU206は、キャリブレーション要求フラグをクリアして、ステップS103に戻り、再度キャリブレーション要求キーが押下されたかを判別する。ここで、ユーザによりキャリブレーション要求キーが押下されたものと判別した場合には(ステップS103;Yes)、カメラ部11と台座13との位置関係が変動したもの判別し、変動後の台座13の輪郭の形状を登録すべく、ステップS102に戻り、キャリブレーション要求フラグをセットする。そして、CPU206は、ステップS111の台座登録処理を再度実行して、変動後の台座の形状を登録する。   Thereafter, the CPU 206 clears the calibration request flag, returns to step S103, and determines again whether the calibration request key has been pressed. If it is determined that the calibration request key has been pressed by the user (step S103; Yes), it is determined that the positional relationship between the camera unit 11 and the pedestal 13 has changed, and the pedestal 13 after the change is determined. In order to register the contour shape, the process returns to step S102, and a calibration request flag is set. Then, the CPU 206 executes the pedestal registration process in step S111 again to register the shape of the pedestal after the change.

台座13の輪郭の形状の登録がなされた後、ユーザは、原稿4を台座13上に載置して、原稿4の書画投影を行おうとする。ユーザが原稿4をセットするまでの間、CPU206は、撮影により得られた画像データをメモリ201の所定領域にコピーすると共に、この画像データを画像処理装置203にて画像データを圧縮し、インタフェイス装置208を介して、例えば、30フレーム程度の速度でコンピュータ5に送信する。そして、コンピュータ5は、書画カメラ1から転送された画像データにデコード処理等を施して非圧縮データを取得し、撮影された画像をディスプレイ等に表示する。   After the registration of the contour shape of the pedestal 13 is made, the user places the document 4 on the pedestal 13 and tries to project the document on the document 4. Until the user sets the document 4, the CPU 206 copies the image data obtained by photographing to a predetermined area of the memory 201, compresses the image data with the image processing device 203, and the interface. The data is transmitted to the computer 5 via the device 208 at a speed of about 30 frames, for example. Then, the computer 5 performs a decoding process or the like on the image data transferred from the document camera 1 to acquire uncompressed data, and displays the captured image on a display or the like.

その後、ユーザが原稿4のセットを終えると、CPU206は、ステップS106にて画像に動きがないと判別し(ステップS106;No)、メモリ201から撮影された画像を読み出し、画像処理装置203にて四角形輪郭抽出処理を実行する(ステップS112)。この四角形輪郭抽出処理において、CPU206は、撮影した撮影対象物の画像から、この撮影対象物の画像の四隅の座標点(四角形輪郭)を抽出する。   Thereafter, when the user finishes setting the document 4, the CPU 206 determines that there is no movement in step S <b> 106 (step S <b> 106; No), reads an image taken from the memory 201, and the image processing apparatus 203. A quadrangular contour extraction process is executed (step S112). In this quadrangle contour extraction process, the CPU 206 extracts coordinate points (rectangle contours) at the four corners of the image of the photographing target from the photographed image of the photographing target.

続いて、CPU206は、画像変換処理を実行する(ステップS113)。この画像変換処理において、CPU206は、撮影対象の切抜きと正面画像への射影変換とを行う。そして、CPU206は、画像鮮明化処理を実行する(ステップS114)。これらステップS101〜S114の処理により、書画カメラ1は、図3(a)に示すような斜めの状態あるいは回転した状態で撮影された原稿4の画像から、図3(b)に示すような正面から撮影した原稿4の画像を取得する。   Subsequently, the CPU 206 executes image conversion processing (step S113). In this image conversion process, the CPU 206 performs clipping of a subject to be imaged and projective conversion to a front image. Then, the CPU 206 executes an image sharpening process (step S114). Through the processing of these steps S101 to S114, the document camera 1 can detect the front surface as shown in FIG. 3B from the image of the document 4 taken in the oblique state or rotated state as shown in FIG. The image of the document 4 taken from is acquired.

その後、CPU206は、画像処理装置203にて画像データを圧縮し、インタフェイス装置208を介してコンピュータ5に送信する(ステップS115)。そして、ユーザによりモードスイッチが書画撮影モードからボード撮影モードに切り替えられると(ステップS116;No)、CPU206は、書画撮影処理を終了する。   Thereafter, the CPU 206 compresses the image data by the image processing device 203 and transmits it to the computer 5 via the interface device 208 (step S115). When the user switches the mode switch from the document shooting mode to the board shooting mode (step S116; No), the CPU 206 ends the document shooting process.

続いて、ステップS4のボード撮影処理について詳細に説明する。図9は、ボード撮影処理の詳細を示すフローチャートである。このボード撮影処理において、CPU206は、まず、図9に示すように、インタフェイス装置208、画像処理装置203やメモリ201内の作業メモリの初期化を行う(ステップS121)。CPU206は、ユーザによりシャッタが押されるのを待ち(ステップS122)、シャッタが押されると(ステップS122;Yes)、カメラ部11によりスクリーン3を撮影し、画像データを取得する(ステップS123)。その後、CPU206は、撮影によって得られた画像データをイメージセンサ102からメモリ201に転送する。   Next, the board photographing process in step S4 will be described in detail. FIG. 9 is a flowchart showing details of the board photographing process. In this board photographing process, the CPU 206 first initializes the working memory in the interface device 208, the image processing device 203, and the memory 201 as shown in FIG. 9 (step S121). The CPU 206 waits for the user to press the shutter (step S122). When the shutter is pressed (step S122; Yes), the camera unit 11 captures the screen 3 and acquires image data (step S123). Thereafter, the CPU 206 transfers image data obtained by photographing to the memory 201 from the image sensor 102.

続いて、CPU206は、メモリ201から撮影された画像を読み出し、書画撮影処理を行う場合と同様、画像処理装置203にて四角形輪郭抽出処理(ステップS124)と画像変更処理(ステップS125)と画像鮮明化処理(ステップS126)とを順次実行する。その後、CPU206は、画像処理装置203にて画像データを圧縮し、インタフェイス装置208を介してコンピュータ5に送信する(ステップS127)。そして、ユーザによりモードスイッチがボード撮影モードから書画撮影モードに切り替えられると(ステップS128;No)、CPU206は、ボード撮影処理を終了する。   Subsequently, the CPU 206 reads out the photographed image from the memory 201, and in the same manner as when performing the document photographing process, the image processing device 203 performs the rectangular outline extraction process (step S124), the image change process (step S125), and the image clearness. Processing (step S126) is sequentially executed. Thereafter, the CPU 206 compresses the image data by the image processing device 203 and transmits it to the computer 5 via the interface device 208 (step S127). When the user switches the mode switch from the board shooting mode to the document shooting mode (step S128; No), the CPU 206 ends the board shooting process.

次に、画像処理装置203にて実行される画像処理について説明する。まず、画像処理装置203での画像処理に用いられるアフィン変換についての基本的な考え方(実現方法)を説明する。   Next, image processing executed by the image processing apparatus 203 will be described. First, a basic concept (realization method) for affine transformation used for image processing in the image processing apparatus 203 will be described.

画像の空間変換にアフィン変換が幅広く応用されている。本実施形態では、3次元のカメラパラメータを用いずに2次元アフィン変換を用いて射影変換を行う。これは、変換前の座標(u,v)の点が、移動、拡大縮小、回転などの変換によって、変換後の座標(x,y)が次の数1によって関係付けられることになる。射影変換もこのアフィン変換により行われることができる。   Affine transformation is widely applied to image spatial transformation. In this embodiment, projective transformation is performed using two-dimensional affine transformation without using three-dimensional camera parameters. This is because the coordinates (u, v) before conversion are related to each other by the following equation (1) by conversion such as movement, enlargement / reduction, and rotation. Projective transformation can also be performed by this affine transformation.

最終的な座標(x,y)は、次の数2によって算出される。   The final coordinates (x, y) are calculated by the following formula 2.

数2は、射影変換するための式であり、座標(x,y)は、z'の値に従い、0に向かって縮退する。即ち、z'に含まれるパラメータが射影に影響を及ぼすことになる。このパラメータはa13,a23,a33である。また、他のパラメータは、パラメータa33で正規化されることができるので、a33を1としてもよい。   Expression 2 is an expression for projective transformation, and the coordinates (x, y) are degenerated toward 0 according to the value of z ′. That is, the parameter included in z ′ affects the projection. This parameter is a13, a23, a33. Since other parameters can be normalized by the parameter a33, a33 may be 1.

図10(a)は、図3(a)に示す四角形の撮影対象物(原稿4又はスクリーン3)の各頂点の座標を示した図である。図11は、カメラ部11で撮影された四角形と実際の撮影対象物の画像との関係について説明するための図である。   FIG. 10A is a diagram showing the coordinates of the vertices of the quadrangular shooting target (original 4 or screen 3) shown in FIG. FIG. 11 is a diagram for explaining a relationship between a quadrangle photographed by the camera unit 11 and an image of an actual photographing object.

図11において、U−V−W座標系は、カメラ部11で撮影して得られた画像の3次元座標系である。A(Au,Av,Aw)ベクトルとB(Bu,Bv,Bw)ベクトルとは、3次元座標系U−V−Wにおいて、撮影対象物をベクトルで表したものである。また、S(Su,Sv,Sw)ベクトルは、3次元座標系U−V−Wの原点と撮影対象物との距離を示す。   In FIG. 11, a UVW coordinate system is a three-dimensional coordinate system of an image obtained by photographing with the camera unit 11. The A (Au, Av, Aw) vector and the B (Bu, Bv, Bw) vector represent the object to be photographed as vectors in the three-dimensional coordinate system UV-W. The S (Su, Sv, Sw) vector indicates the distance between the origin of the three-dimensional coordinate system UV-W and the object to be imaged.

図11に示す投影スクリーンは、撮影対象物の画像の射影を行うためのものである。投影スクリーン上の座標系を(x,y)とすると、この投影スクリーン上に投影される画像がカメラ部11に撮影される画像と考えればよい。投影スクリーンは、W軸上から距離fだけ離れて垂直に位置するものとする。撮影対象物上の任意の点P(u,v,w)と原点とを直線で結び、その直線と投影スクリーンと交差する点があるものとして、その交点のX−Y座標をp(x,y)とする。このとき、座標pは、射影変換より次の数3によって表される。   The projection screen shown in FIG. 11 is used for projecting an image of an object to be photographed. If the coordinate system on the projection screen is (x, y), the image projected on the projection screen may be considered as the image photographed by the camera unit 11. It is assumed that the projection screen is positioned vertically at a distance f from the W axis. An arbitrary point P (u, v, w) on the object to be photographed is connected to the origin by a straight line, and there is a point that intersects the straight line and the projection screen, and the XY coordinate of the intersection is represented by p (x, y). At this time, the coordinate p is expressed by the following equation 3 by projective transformation.

数3より、図11に示すように点P0,P1,P2,P3と投影スクリーンへの投影点p0,p1,p2,p3との関係から、次の数4に示す関係が求められる。   From Equation 3, the relationship shown in the following Equation 4 is obtained from the relationship between the points P0, P1, P2, P3 and the projection points p0, p1, p2, p3 on the projection screen as shown in FIG.

このとき、射影係数α、βは次の数5によって表される。   At this time, the projection coefficients α and β are expressed by the following equation (5).

次に、射影変換について説明する。撮影対象物上の任意の点Pは、S,A,Bベクトルを用いて、次の数6によって表される。   Next, projective transformation will be described. An arbitrary point P on the object to be imaged is expressed by the following equation 6 using S, A, and B vectors.

この数6に、数4の関係式を代入すると、座標xとyとは、次の数7によって表される。   When the relational expression of Expression 4 is substituted into Expression 6, the coordinates x and y are expressed by the following Expression 7.

この関係を、アフィン変換の式に当てはめると、座標(x',y',z')は、次の数8によって表される。   When this relationship is applied to the affine transformation formula, the coordinates (x ′, y ′, z ′) are expressed by the following equation (8).

この数8にm,nを代入することにより、撮影画像の対応点(x,y)が求められる。対応点(x,y)は、整数値とは限らないので、画像補間法などを用いて画素の値を求めればよい。   By substituting m and n into Equation 8, the corresponding point (x, y) of the captured image is obtained. Since the corresponding point (x, y) is not necessarily an integer value, the pixel value may be obtained using an image interpolation method or the like.

上記m,nは、予め補正画像p(u,v)を出力する画像サイズ(0≦u<umax, 0≦v<vmax)を与えて、その画像サイズに合わせて画像を調整する方法が考えられる。この方法によれば、m,nは次の数9によって表される。   For m and n, an image size (0 ≦ u <umax, 0 ≦ v <vmax) for outputting the corrected image p (u, v) is given in advance, and a method of adjusting the image according to the image size is considered. It is done. According to this method, m and n are expressed by the following equation (9).

しかし、作成される補正画像の縦横比と撮影対象物の縦横比とは一致しない。ここで、補正画像p(u,v)とm、nの値との関係は、数4から、次の数10によって表される。   However, the aspect ratio of the corrected image to be created does not match the aspect ratio of the shooting target. Here, the relationship between the corrected image p (u, v) and the values of m and n is expressed by the following equation 10 from the equation 4.

カメラパラメータであるレンズの焦点距離fが既知であれば、数10に従って、縦横比kを求めることができる。従って、補正画像p(u,v)の画像サイズを(0≦u<umax, 0≦v<vmax)であるとすると、次の数11に従ってm、nを求めることにより、撮影対象物と同じ縦横比kを得ることができる。   If the focal length f of the lens, which is a camera parameter, is known, the aspect ratio k can be obtained according to Equation 10. Therefore, if the image size of the corrected image p (u, v) is (0 ≦ u <umax, 0 ≦ v <vmax), m and n are obtained according to the following equation 11 to obtain the same as the object to be imaged. An aspect ratio k can be obtained.

なお、カメラが固定焦点である場合、レンズの焦点距離fの値を、予め得ることができる。ズームレンズ等が存在する場合には、レンズの焦点距離fの値は、レンズのズーム倍率によって変化するので、そのズーム倍率とレンズの焦点距離fとの関係をを示すテーブルを予め作成して記憶し、ズーム倍率に基づいて焦点距離fを読み出し、数10,数11に従って、射影変換を行うことができる。   When the camera has a fixed focal point, the value of the focal length f of the lens can be obtained in advance. When a zoom lens or the like is present, the value of the focal length f of the lens changes depending on the zoom magnification of the lens. Therefore, a table indicating the relationship between the zoom magnification and the focal length f of the lens is created and stored in advance. Then, the focal length f can be read based on the zoom magnification, and projective transformation can be performed according to Equations 10 and 11.

CPU206は、このようなアフィン変換を行うため、まず、ステップS112及びS124の四角形輪郭抽出処理を実行する。図12は、この四角形輪郭抽出処理の詳細を示すフローチャートである。   In order to perform such affine transformation, the CPU 206 first executes the quadrangular contour extraction processing in steps S112 and S124. FIG. 12 is a flowchart showing details of the quadrangular contour extraction processing.

この四角形輪郭抽出処理において、CPU206は、まず、図12に示すように、画像処理装置203を制御して、画像処理の演算数を減らすべく、入力画像から縮小輝度画像を生成する(ステップS201)。次に、CPU206は、生成した縮小輝度画像から直線のみの画像を生成し、これを撮影対象物のエッジ画像とする(ステップS202)。続いて、CPU206は、生成したエッジ画像の歪曲収差を補正する(ステップS203)。   In this quadrangular contour extraction process, the CPU 206 first controls the image processing device 203 to generate a reduced luminance image from the input image in order to reduce the number of image processing operations as shown in FIG. 12 (step S201). . Next, the CPU 206 generates an image of only a straight line from the generated reduced luminance image, and sets this as an edge image of the shooting target (step S202). Subsequently, the CPU 206 corrects the distortion aberration of the generated edge image (step S203).

続いて、CPU206は、ステップS203にて補正されたエッジ画像をハフ変換してピーク値を抽出することにより、撮影対象物のエッジ画像からこのエッジ画像に含まれている直線パラメータを検出する(ステップS204)。そして、CPU206は、検出した直線パラメータから撮影対象物の輪郭を形成する候補となる四角形を作成する(ステップS205)。   Subsequently, the CPU 206 detects the straight line parameter included in the edge image from the edge image of the photographing object by extracting the peak value by Hough transforming the edge image corrected in step S203 (step S203). S204). Then, the CPU 206 creates a quadrangle that is a candidate for forming the contour of the object to be photographed from the detected straight line parameters (step S205).

その後、CPU206は、このように候補となる四角形を生成し、生成した各四角形に優先順位を付す(ステップS206)。そして、CPU206は、優先順位に従って四角形を選択し、選択した四角形を抽出できたか否かを判定し(ステップS207)、四角形を抽出できなかったと判定した場合には(ステップS207;No)、四角形輪郭抽出処理を終了する。   Thereafter, the CPU 206 generates candidate rectangles in this way, and assigns priorities to the generated rectangles (step S206). Then, the CPU 206 selects a rectangle according to the priority order, determines whether the selected rectangle has been extracted (step S207), and determines that the rectangle has not been extracted (step S207; No), the rectangle outline The extraction process ends.

一方、四角形を抽出できたと判定した場合には(ステップS207;Yes)、画像処理装置203から抽出した四角形を取得してビデオ出力装置202に送信し、表示装置に四角形のプレビュー画像を表示させる(ステップS208)。   On the other hand, if it is determined that the quadrangle has been extracted (step S207; Yes), the quadrangle extracted from the image processing device 203 is acquired and transmitted to the video output device 202, and a quadrangle preview image is displayed on the display device ( Step S208).

続いて、CPU206は、操作部204から送信された操作情報に基づいて、YESキーとNOキーとのうちいずれのスイッチが押下されたを判別する(ステップS209)。ステップS209にてNOキーが押下されたと判別した場合には(ステップS209;No)、画像処理装置203にて次の候補の四角形を指定する(ステップS210)。   Subsequently, based on the operation information transmitted from the operation unit 204, the CPU 206 determines which switch of the YES key and the NO key has been pressed (step S209). If it is determined in step S209 that the NO key has been pressed (step S209; No), the image processing apparatus 203 designates the next candidate rectangle (step S210).

一方、YESキーが押下されたと判別した場合には(ステップS209;Yes)、抽出した四角形の頂点からアフィンパラメータを算出する(ステップS211)。   On the other hand, if it is determined that the YES key has been pressed (step S209; Yes), an affine parameter is calculated from the extracted quadrangular vertices (step S211).

次に、四角形輪郭抽出処理をさらに具体的に説明する。CPU206が画像処理装置203を用いて生成した縮小輝度画像の一例を図13(a)に示す。画像処理装置203は、このような縮小輝度画像から、Robertsフィルタと呼ばれるエッジ検出用のフィルタを用いて図13(b)に示すようなエッジ画像を生成する(ステップS202)。このRobertsフィルタとは、2つの4近傍画素の重み付けを行って2つのフィルタΔ1,Δ2を取得して平均化することによって、画像のエッジを検出するフィルタである。   Next, the quadrangle contour extraction process will be described more specifically. An example of a reduced luminance image generated by the CPU 206 using the image processing apparatus 203 is shown in FIG. The image processing apparatus 203 generates an edge image as shown in FIG. 13B from such a reduced luminance image by using an edge detection filter called a Roberts filter (step S202). The Roberts filter is a filter that detects an edge of an image by weighting two 4-neighbor pixels, obtaining two filters Δ1 and Δ2, and averaging them.

図14(a)は、フィルタΔ1の係数を示し、図14(b)は、フィルタΔ2の係数を示す。この2つのフィルタΔ1,Δ2の係数を、ある着目した座標(x,y)の画素値f(x,y)に適用すると、変換後の画素値g(x,y)は、次の数12によって表される。   14A shows the coefficient of the filter Δ1, and FIG. 14B shows the coefficient of the filter Δ2. When the coefficients of the two filters Δ1, Δ2 are applied to the pixel value f (x, y) of a certain coordinate (x, y), the converted pixel value g (x, y) Represented by

ステップS202にて生成したエッジ画像において、歪曲収差により直線が抽出できない場合がある。そこで、CPU206は、エッジ画像に対して歪曲収差補正を行う(ステップS203)。元画像ではなくエッジ画像に対して歪曲補正を行うのは、処理の高速化のためである。歪曲補正計算は、調査対象の画素が歪曲補正後には元画像中のどの画素になるかを画素ごとに計算するものである。その際、エッジ画像であれば、調査対象は一定間隔でスキップした座標のみとなり、画素が少ない分、高速に処理を行うことができる。   In the edge image generated in step S202, a straight line may not be extracted due to distortion. Therefore, the CPU 206 performs distortion correction on the edge image (step S203). The reason for performing distortion correction not on the original image but on the edge image is to increase the processing speed. The distortion correction calculation is to calculate for each pixel which pixel in the original image becomes the pixel to be examined after distortion correction. At that time, in the case of an edge image, only the coordinates skipped at a constant interval are investigated, and processing can be performed at a high speed because there are few pixels.

図13(b)に示すエッジ画像には、直線パラメータが含まれている。画像処理装置203は、このエッジ画像から、ハフ変換を行って直線パラメータを検出する(ステップS204)。   The edge image shown in FIG. 13B includes straight line parameters. The image processing apparatus 203 performs a Hough transform from the edge image to detect a straight line parameter (step S204).

ハフ変換は、X−Y平面上の直線を構成する点を次の数13によって定義されるρ−θ平面に投票する変換である。   The Hough transform is a transform that votes points constituting a straight line on the XY plane to the ρ-θ plane defined by the following equation (13).

各点の座標(x、y)においてθを0から360°まで変化させた場合、同一直線はρ−θ平面上では一点で表される。このため、投票数の多いρ−θ座標を直線と判定することができる。その際、投票数は直線上のピクセル数であり、直線の長さに相当する。したがって、投票数の極端に少ないρ−θ、即ち短い直線は、直線の候補から除外することができる。   When θ is changed from 0 to 360 ° in the coordinates (x, y) of each point, the same straight line is represented by one point on the ρ-θ plane. For this reason, it is possible to determine a ρ-θ coordinate having a large number of votes as a straight line. At that time, the number of votes is the number of pixels on a straight line, which corresponds to the length of the straight line. Therefore, ρ−θ having an extremely small number of votes, that is, a short straight line can be excluded from the straight line candidates.

このようにハフ変換を用いる手法では、調査対象の点や角度が多ければ多いほど処理速度が低下してしまう。この処理速度の低下を回避するため、エッジ検出時に調査対象の座標をX、Y軸方向双方に一定の間隔でとばして処理することによって、エッジ画像を縮小する。これにより、調査対象を減らすことができる。   Thus, in the method using the Hough transform, the processing speed decreases as the number of points or angles to be investigated increases. In order to avoid this decrease in processing speed, the edge image is reduced by processing the coordinates of the investigation target at a constant interval in both the X and Y axis directions at the time of edge detection. As a result, the number of survey targets can be reduced.

さらに、別の方法で調査角度を減らすことができる。即ち、調査対象であるエッジ画像において画像中心を原点とした座標系で考えると、ρはマイナスの値も取ることになるため、角度0≦θ<180°を測定すればよく、残りの180°≦θ<360°はρがマイナスの値を取ることで表現できる。   Furthermore, the investigation angle can be reduced in another way. That is, when considering the coordinate system with the center of the image as the origin in the edge image to be examined, ρ also takes a negative value, so it is sufficient to measure the angle 0 ≦ θ <180 ° and the remaining 180 °. ≦ θ <360 ° can be expressed by taking a negative value of ρ.

しかし実際に撮影される四角形は、その四角形が画像の中心にあった場合、各辺が上下左右に存在することになる。したがって、0°≦θ<180°の範囲で調査するより、図15に示すように、上下の辺、左右の辺はそれぞれ次の数14で表される範囲で測定した方が、より効果的である。   However, when a square is actually captured, each side exists vertically and horizontally when the square is at the center of the image. Therefore, rather than investigating in the range of 0 ° ≦ θ <180 °, as shown in FIG. 15, it is more effective to measure the upper and lower sides and the left and right sides in the range represented by the following formula 14, respectively. It is.

また、数14から明らかなように、45°≦θ<135°のcosθと135°≦θ<225°のsinθ、45°≦θ<135°のsinθと135°≦θ<225°のcosθにマイナスをかけたもの、がそれぞれ対応しているため、sinテーブルとcosテーブルとを共用することが可能である。   As is clear from Equation 14, cos θ of 45 ° ≦ θ <135 °, sin θ of 135 ° ≦ θ <225 °, sin θ of 45 ° ≦ θ <135 °, and cos θ of 135 ° ≦ θ <225 ° Since the minus numbers correspond to each other, the sin table and the cos table can be shared.

また、図16(a)に45°≦θ<135°で検出される直線を太線で、図16(b)に135°≦θ<225°で検出された直線を太線で示すように、ρが+の値か−の値かによって、辺の上下、または辺の左右を特定することが可能である。したがって、より効率的に、中心の四角形を構成する辺を選択することができる。   Further, a straight line detected at 45 ° ≦ θ <135 ° in FIG. 16A is indicated by a thick line, and a straight line detected at 135 ° ≦ θ <225 ° is indicated by a thick line in FIG. Depending on whether is a positive value or a negative value, it is possible to specify the upper and lower sides or the left and right sides. Therefore, it is possible to select the sides constituting the central square more efficiently.

このような考え方に基づいて、CPU206は、直線を検出し、四角形を特定する。なお、この四角形検出処理は、書画撮影のように撮影対象物を真上から撮影するときと、ボード撮影のように撮影対象物に対して書画カメラ1を傾けて撮影するときと、で異なるものとなる。   Based on such an idea, the CPU 206 detects a straight line and identifies a quadrangle. Note that this quadrangle detection processing differs depending on whether the object to be photographed is photographed from directly above, such as document photography, or when the document camera 1 is photographed with the document camera 1 tilted with respect to the object to be photographed, such as board photography. It becomes.

また、書画撮影処理においてキャリブレーションキーが押下された場合に、この四角形輪郭抽出処理に先立って実行されるステップS111の台座登録処理も上述の考え方に基づいている。まず、この台座登録処理について図17に示すフローチャートを参照して説明する。   Further, the pedestal registration process in step S111 executed prior to the quadrangular contour extraction process when the calibration key is pressed in the document photographing process is also based on the above-described concept. First, the pedestal registration process will be described with reference to the flowchart shown in FIG.

この台座登録処理において、CPU206は、まず、図17に示すように、入力画像から縮小輝度画像を生成し、続いて、生成した縮小輝度画像から台座13のエッジ画像を生成する(ステップS221)。次に、CPU206は、エッジ画像をハフ変換して、X−Y平面からρ−θ平面への投票を行う(ステップS222)。なお、書画カメラ1には、ρ−θ平面での台座13の輪郭の形状を示す4本の直線パラメータが予め登録されている。CPU206は、この直線パラメータの設計値を台座13の輪郭の形状を示すものとしてメモリ201に登録する(ステップS223)。   In this pedestal registration process, the CPU 206 first generates a reduced luminance image from the input image as shown in FIG. 17, and then generates an edge image of the pedestal 13 from the generated reduced luminance image (step S221). Next, the CPU 206 performs Hough transform on the edge image and performs voting from the XY plane to the ρ-θ plane (step S222). In the document camera 1, four linear parameters indicating the shape of the outline of the pedestal 13 on the ρ-θ plane are registered in advance. The CPU 206 registers the design value of this linear parameter in the memory 201 as indicating the contour shape of the base 13 (step S223).

続いて、CPU206は、エッジ画像をハフ変換することにより得られたデータから、ピーク値を抽出することによって、実際に撮影された台座13のエッジ画像に含まれている直線パラメータを検出する(ステップS224)。   Subsequently, the CPU 206 detects a linear parameter included in the edge image of the pedestal 13 actually captured by extracting a peak value from the data obtained by performing the Hough transform on the edge image (step). S224).

そして、CPU206は、ステップS224にて直線パラメータが検出されたか否かを判別し(ステップS225)、直線パラメータが検出された場合には(ステップS225;Yes)、メモリ201に登録されている直線パラメータを、設計値から、この検出した直線パラメータ(実測値)に書き換える(ステップS226)。これにより、メモリ201には、直線パラメータの実測値が台座13の輪郭の形状を示すものとして登録される。   Then, the CPU 206 determines whether or not a straight line parameter is detected in step S224 (step S225). If a straight line parameter is detected (step S225; Yes), the straight line parameter registered in the memory 201 is determined. Is rewritten from the design value to the detected linear parameter (actually measured value) (step S226). Thereby, the measured value of the straight line parameter is registered in the memory 201 as indicating the shape of the outline of the base 13.

一方、直線パラメータが検出されなかった場合には(ステップS225;No)、ステップS226をスキップし、そのまま台座登録処理を終了する。このため、メモリ201には、直線パラメータの設計値が台座13の輪郭の形状を示すものとして登録されたままとなる。   On the other hand, when the straight line parameter is not detected (step S225; No), step S226 is skipped and the pedestal registration process is terminated as it is. For this reason, the design value of the straight line parameter remains registered in the memory 201 as indicating the shape of the outline of the pedestal 13.

なお、小さい原稿4を投影する場合や原稿4の一部分を拡大して撮影する場合、CPU206は、ステップS104のズーム処理にてカメラ部11のズームをアップする。これに伴ってカメラ部11によって撮影される台座13の画像が拡大するため、CPU206は、上述の台座登録変更処理にて、メモリ201に登録されている直線パラメータを調整する必要がある。図18は、この台座登録変更処理の詳細を示すフローチャートである。   Note that when projecting a small document 4 or enlarging and photographing a part of the document 4, the CPU 206 increases the zoom of the camera unit 11 in the zoom process of step S104. Accordingly, since the image of the pedestal 13 photographed by the camera unit 11 is enlarged, the CPU 206 needs to adjust the linear parameter registered in the memory 201 in the above-described pedestal registration change process. FIG. 18 is a flowchart showing details of the pedestal registration change process.

この台座登録変更処理において、CPU206は、図18に示すように、まず、ステップS104のズーム処理にてカメラ部11のズームが変更されたか否かを判別する(ステップS231)。ステップS231にてカメラ部11のズームが変更されたと判別した場合には(ステップS231;Yes)、ズーム処理前とズーム処理前とでのカメラ部11のズーム比を求め、求めたズーム比に応じて、メモリ201に登録されている直線パラメータを調整する(ステップS232)。具体的には、ズーム処理前とズーム処理後とでのカメラ部11のズーム比が「2」である場合、CPU206は、メモリ201に登録されている直線パラメータの各値をそれぞれ2倍する。   In this pedestal registration change process, as shown in FIG. 18, the CPU 206 first determines whether or not the zoom of the camera unit 11 has been changed in the zoom process of step S104 (step S231). If it is determined in step S231 that the zoom of the camera unit 11 has been changed (step S231; Yes), the zoom ratio of the camera unit 11 before and after the zoom process is obtained, and the zoom ratio is determined according to the obtained zoom ratio. Then, the straight line parameters registered in the memory 201 are adjusted (step S232). Specifically, when the zoom ratio of the camera unit 11 before zoom processing and after zoom processing is “2”, the CPU 206 doubles each value of the linear parameter registered in the memory 201.

一方、ステップS231にてカメラ部11のズームが変更されていないと判別した場合(ステップS231;No)、CPU206は、ステップS232をスキップして、台座登録変更処理を終了する。   On the other hand, if it is determined in step S231 that the zoom of the camera unit 11 has not been changed (step S231; No), the CPU 206 skips step S232 and ends the pedestal registration change process.

このように、ズーム処理にてカメラ部11のズームが変更された場合、ズーム処理前とズーム処理前とでのカメラ部11のズーム比に応じて、直線パラメータを調整することにより、CPU206は、図17に示す台座登録処理にて登録した台座13の輪郭の形状を変更することができる。なお、調整後の直線パラメータが画像の画角を超える場合には、画角を超える直線パラメータを候補から外してもよい。また、画角を超える直線パラメータをそのままメモリ201に書き込んでもよい。このようにしても、CPU206がこの画角を超える直線パラメータをステップS224にて検出することはないため、処理上問題は生じない。   As described above, when the zoom of the camera unit 11 is changed by the zoom process, the CPU 206 adjusts the linear parameter according to the zoom ratio of the camera unit 11 before the zoom process and before the zoom process. The contour shape of the pedestal 13 registered in the pedestal registration process shown in FIG. 17 can be changed. When the adjusted straight line parameter exceeds the angle of view of the image, the straight line parameter exceeding the angle of view may be excluded from the candidates. Further, a straight line parameter exceeding the angle of view may be written in the memory 201 as it is. Even if it does in this way, since CPU206 does not detect the linear parameter exceeding this angle of view in step S224, a problem on a process does not arise.

次に、書画撮影する場合の四角形検出処理(書画撮影時四角形検出処理)について、図19に示すフローチャートを参照して説明する。この書画撮影時四角形検出処理において、CPU206は、まず、図19に示すように、入力画像から縮小輝度画像を生成し、続いて、生成した縮小輝度画像から原稿4のエッジ画像を生成する(ステップS301)。次に、CPU206は、エッジ画像をハフ変換して、X−Y平面からρ−θ平面への投票を行う(ステップS302)。   Next, a quadrangle detection process (rectangular detection process at the time of document shooting) when shooting a document will be described with reference to a flowchart shown in FIG. In this document photographing square detection process, the CPU 206 first generates a reduced luminance image from the input image as shown in FIG. 19, and then generates an edge image of the document 4 from the generated reduced luminance image (step). S301). Next, the CPU 206 performs Hough transform on the edge image and performs voting from the XY plane to the ρ-θ plane (step S302).

そして、CPU206は、45°≦θ<135°における投票が多い座標を、上下の辺を形成する直線パラメータの候補として複数取得する(ステップS303)。同様に、CPU206は、135°≦θ<225°における投票が多い座標を、左右の辺を形成する直線パラメータの候補として複数取得する(ステップS304)。   Then, the CPU 206 acquires a plurality of coordinates having a large number of votes when 45 ° ≦ θ <135 ° as candidates for straight line parameters forming the upper and lower sides (step S303). Similarly, the CPU 206 acquires a plurality of coordinates having a large number of votes when 135 ° ≦ θ <225 ° as candidates for straight line parameters forming the left and right sides (step S304).

続いて、CPU206は、ステップS303及びS304にて取得した候補のうちから、メモリ201に登録されている台座13の輪郭を形成する直線パラメータに近い直線パラメータを検出し、検出した直線パラメータを候補から外す(ステップS305)。具体的には、台座13の輪郭を形成する直線パラメータとの差が、ρにおいて0〜2,3画素程度、θにおいて0〜2°程度の直線パラメータを候補から外す。   Subsequently, the CPU 206 detects a straight line parameter close to the straight line parameter forming the contour of the pedestal 13 registered in the memory 201 from the candidates acquired in steps S303 and S304, and the detected straight line parameter is determined from the candidates. Remove (step S305). Specifically, a linear parameter whose difference from the linear parameter forming the contour of the base 13 is about 0 to 2 or 3 pixels in ρ and about 0 to 2 ° in θ is excluded from the candidates.

そして、CPU206は、ステップS305にて残ったX軸方向の候補とY軸方向の候補とのうちから、ρの値の+−が異なり、θが所定範囲内にあるものを選択する(ステップS306)。具体的には、ρの値の+−が異なり、且つθの差が±10°程度の2本の直線パラメータを検出し、さらに、これら検出した直線パラメータとのθの差が90°±10°程度で、且つρの値の+−が異なる2本の直線パラメータを検出する。そして、CPU206は、図20(a)に示すように、これら検出された4本の直線パラメータによって形成される四角形を、撮影した原稿4の四角形として取得する。このようにして、CPU206は、エッジ画像から四角形を検出することができる。   Then, the CPU 206 selects, from among the candidates in the X-axis direction and the candidates in the Y-axis direction that remain in step S305, those whose values of ρ are different and whose θ is within a predetermined range (step S306). ). Specifically, two linear parameters having different values of ρ and having a difference of θ of about ± 10 ° are detected, and the difference of θ from these detected linear parameters is 90 ° ± 10. Two linear parameters having a difference of + and-in the value of ρ are detected. Then, as shown in FIG. 20A, the CPU 206 acquires a quadrangle formed by these detected four straight line parameters as a quadrangle of the photographed document 4. In this way, the CPU 206 can detect a square from the edge image.

CPU206は、ステップS306にて四角形が検出されたか否かを判別し(ステップS307)、四角形が検出されたと判別した場合(ステップS307;Yes)には、ステップS310に進む。   The CPU 206 determines whether or not a quadrangle is detected in step S306 (step S307). If it is determined that a quadrangle is detected (step S307; Yes), the CPU 206 proceeds to step S310.

一方、ステップS307にて四角形が検出されなかったと判別した場合(ステップS307;No)、CPU206は、ステップS305にて外した直線パラメータを含めて、再度、X軸方向の候補とY軸方向の候補とのうちから、ρの値の+−が異なり、θが所定範囲内にあるものを選択して、エッジ画像から四角形を検出する(ステップS308)。   On the other hand, if it is determined in step S307 that a quadrangle has not been detected (step S307; No), the CPU 206 again includes the X-axis direction candidate and the Y-axis direction candidate including the straight line parameter removed in step S305. Are selected from the edge images, and the squares are detected from the edge images (step S308).

CPU206は、さらに、ステップS308にて四角形が検出されたか否かを判別する(ステップS309)。ステップS307又はS309にて四角形が検出されたと判別された場合(ステップS307;Yes,ステップS309;Yes)、CPU206は、検出した原稿4の四角形の各頂点の座標を求める(ステップS310)。   CPU 206 further determines whether or not a quadrangle has been detected in step S308 (step S309). If it is determined in step S307 or S309 that a quadrangle has been detected (step S307; Yes, step S309; Yes), the CPU 206 obtains the coordinates of each vertex of the detected quadrilateral of the document 4 (step S310).

一方、ステップS309にて四角形が検出されなかったと判別された場合(ステップS309;No)、CPU206は、メモリ201に登録されている台座13の四角形の各頂点の座標を求める(ステップS311)。   On the other hand, when it is determined in step S309 that no quadrangle has been detected (step S309; No), the CPU 206 obtains the coordinates of each vertex of the quadrilateral of the base 13 registered in the memory 201 (step S311).

次に、ボード撮影を実行する場合における四角形検出処理(ボード撮影時四角形検出処理)について、図21に示すフローチャートを参照して説明する。なお、図21に示すボード撮影時四角形検出処理におけるステップS311〜S314までの処理は、図19に示す書画撮影時四角形検出処理におけるステップS301〜S304までの処理と同様であるため、ここではその説明を省略する。   Next, a quadrangle detection process (board detection quadrangle detection process) in the case of executing board shooting will be described with reference to the flowchart shown in FIG. Note that the processing from steps S311 to S314 in the board photographing quadrangle detection processing shown in FIG. 21 is the same as the processing from steps S301 to S304 in the document photographing quadrilateral detection processing shown in FIG. Is omitted.

CPU206は、ステップS314にて取得したX軸方向の候補とY軸方向の候補とのうちから、ρの絶対値|ρ|が等しいもの同士を特定し、その絶対値が大きいものから順に優先度を設定する(ステップS315)。これは、スクリーン3を斜めから撮影する場合に、相対する辺が平行とは限らないためである。上下左右の辺を|ρ|の絶対値の大きなもの同士に特定することで、図20(b)において太線で示すような、面積が最大である領域を特定するための直線の優先順位を得ることができる。   The CPU 206 identifies those having the same absolute value | ρ | of ρ from the candidates for the X-axis direction and the candidate for the Y-axis direction acquired in step S314, and prioritizes them in descending order of the absolute value. Is set (step S315). This is because the opposite sides are not always parallel when the screen 3 is photographed obliquely. By specifying the top, bottom, left, and right sides as those having a large absolute value of | ρ |, a straight line priority order for specifying a region having the maximum area as shown by a bold line in FIG. 20B is obtained. be able to.

CPU206は、前述した最大領域を構成する四角形を、撮影したスクリーン3の四角形として特定する(ステップS316)。   The CPU 206 identifies the quadrangle constituting the above-described maximum area as the quadrangle of the screen 3 that has been shot (step S316).

次に、ステップS106にて実行される画像の動きの判別処理について説明する。CPU206は、撮影モードの切り替えを行うため、原稿4の画像に動きがあるか否かを判定する。CPU206は、このような判定を行うため、前回撮影した画像との画像変化量MDを求める。画像変化量MDは撮影している画像が前回の画像と比較してどれぐらい変化したかを表す量である。この量を計算する方法はいくつか考えられるが、この撮影画像投影装置では、前回撮影した画像のデータから、各画素の差分の絶対値の総和を画像変化量MDとして求めている。   Next, the image motion discrimination process executed in step S106 will be described. The CPU 206 determines whether or not there is a motion in the image of the document 4 in order to switch the shooting mode. In order to make such a determination, the CPU 206 obtains an image change amount MD from the previously captured image. The image change amount MD is an amount representing how much the image being taken has changed compared to the previous image. There are several methods for calculating this amount. In this captured image projection apparatus, the sum of absolute values of differences between pixels is obtained as the image change amount MD from the data of the previously captured image.

即ち、前回の画素データをPn-1(x,y)、今回の画素データをPn(x,y)(1≦x≦640,1≦y≦480)とすると、画像変化量MDは、次の数15によって表される。   That is, if the previous pixel data is Pn-1 (x, y) and the current pixel data is Pn (x, y) (1 ≦ x ≦ 640, 1 ≦ y ≦ 480), the image change amount MD is This is expressed by the following equation (15).

また、この画像変化量MDと比較して動きの有無を判定するための閾値として、数16に示す閾値MDTHが予め設定される。撮影画像投影装置は、画像変化量MDが閾値MDTH未満であれば動きがないと判別し、閾値MDTH以上であれば動きがあると判別する。   Further, a threshold value MDTH shown in Expression 16 is set in advance as a threshold value for determining the presence / absence of motion in comparison with the image change amount MD. The captured image projection device determines that there is no motion if the image change amount MD is less than the threshold value MDTH, and determines that there is motion if the image change amount MD is greater than or equal to the threshold value MDTH.

次に、この検出された原稿4又はメモリ201に登録されている台座13の四角形から、アフィンパラメータを求める方法について説明する。検出された原稿4又は登録されている台座13の四角形の4点の頂点の座標(x0,y0),(x1,y1),(x2,y2),(x3,y3)を用いて、数5,数8に従って、数8に示す行列内の各要素であるアフィンパラメータを求めることができる。   Next, a method for obtaining the affine parameters from the detected original 4 or the square of the base 13 registered in the memory 201 will be described. Using the coordinates (x0, y0), (x1, y1), (x2, y2), (x3, y3) of the four points of the detected original 4 or the registered quadrilateral of the pedestal 13, Equation 5 , Eq. 8, affine parameters that are each element in the matrix shown in Eq. 8 can be obtained.

この際、m,nのスケールは0≦m≦1,0≦n≦1の範囲であるので、座標単位の修正を行う。画像の中心を変えずに、U軸側、V軸側の画像サイズを、それぞれUsc,Vscでスケーリングするものとする。このとき画像の中心をuc,vcとすると、画像のスケール変換は次の数17によって表される。   At this time, since the scale of m and n is in the range of 0 ≦ m ≦ 1, 0 ≦ n ≦ 1, the coordinate unit is corrected. Assume that the U-axis side and V-axis side image sizes are scaled by Usc and Vsc, respectively, without changing the center of the image. At this time, assuming that the center of the image is uc and vc, the scale conversion of the image is expressed by the following Expression 17.

この数17をu,vスケールに書き直すと、変換後の四角形の座標(x',y',z')は次の数18によって表される。   When the equation 17 is rewritten on the u and v scales, the coordinates (x ′, y ′, z ′) of the converted rectangle are expressed by the following equation 18.

ここで、Afは、アフィン変換行列であり、アフィン変換行列Afは次の数19によって表される。   Here, Af is an affine transformation matrix, and the affine transformation matrix Af is expressed by the following equation (19).

出力可能な最大画像(画面)サイズが(umax,vmax)で与えられている場合、uc,vcは、次の数20によって表される。   When the maximum image (screen) size that can be output is given by (umax, vmax), uc and vc are expressed by the following equation (20).

また、vmax/umax>kのとき、vmax/umax≦kのときは、それぞれ、次の数21,数22に従って画像のスケーリングを行うと、所望の縦横比kの画像が得られる。   Further, when vmax / umax> k and vmax / umax ≦ k, an image having a desired aspect ratio k is obtained by performing image scaling according to the following equations 21 and 22.

このような考え方に基づいて、CPU206は、四角形の頂点からアフィンパラメータを算出する。図22は、このアフィンパラメータ抽出処理の詳細を示すフローチャートである。   Based on such an idea, the CPU 206 calculates an affine parameter from the vertices of the rectangle. FIG. 22 is a flowchart showing details of the affine parameter extraction processing.

CPU206は、四角形の4点の頂点座標(x0,y0),(x1,y1),(x2,y2),(x3,y3)から、数5に従って、射影係数α、βを算出する(ステップS321)と共に、原稿4の縦横比kを算出する(ステップS322)。   The CPU 206 calculates projection coefficients α and β according to Equation 5 from the four vertex coordinates (x0, y0), (x1, y1), (x2, y2), and (x3, y3) of the quadrangle (step S321). ) And the aspect ratio k of the document 4 is calculated (step S322).

次に、CPU206は、数20に従って、画像の中心点(uc,vc)を指定し(ステップS323)、最大画像サイズvmax/umaxと数12で表される縦横比kとを比較する(ステップS324)。   Next, the CPU 206 designates the center point (uc, vc) of the image according to Equation 20 (Step S323), and compares the maximum image size vmax / umax with the aspect ratio k expressed by Equation 12 (Step S324). ).

vmax/umax>kの場合(ステップS324;Yes)、縦横比kを変えないものとして、CPU206は、V軸側(縦)の最大画像サイズvmaxの方が撮影対象物の画像サイズよりも大きいと判定する。そして、CPU206は、U軸側の最大画像サイズと撮影対象物の画像サイズとが一致するように、数21に従ってusc,vscを求め、V軸側の撮影対象物の画像のスケールを決定する(ステップS325)。   When vmax / umax> k (step S324; Yes), assuming that the aspect ratio k is not changed, the CPU 206 determines that the maximum image size vmax on the V-axis side (vertical) is larger than the image size of the object to be photographed. judge. Then, the CPU 206 calculates usc and vsc according to Equation 21 so that the maximum image size on the U-axis side matches the image size of the object to be imaged, and determines the scale of the image of the object on the V-axis side ( Step S325).

vmax/umax≦kの場合(ステップS324;No)、縦横比kを変えないものとして、CPU206は、U軸側(横)の最大画像サイズumaxの方が撮影対象物の画像サイズよりも大きいと判定する。そして、CPU206は、V軸側の最大画像サイズと撮影対象物の画像サイズとが一致するように、数22に従って、usc,vscを求め、U軸側の撮影対象物の画像のスケールを決定する(ステップS326)。   When vmax / umax ≦ k (step S324; No), assuming that the aspect ratio k is not changed, the CPU 206 determines that the maximum image size umax on the U-axis side (horizontal) is larger than the image size of the subject to be photographed. judge. Then, the CPU 206 obtains usc and vsc according to Equation 22 so that the maximum image size on the V-axis side matches the image size of the object to be photographed, and determines the scale of the image of the object to be photographed on the U-axis side. (Step S326).

続いて、CPU206は、算出したusc,vsc,uc,vcと四角形の4点の頂点座標(x0,y0),(x1,y1),(x2,y2),(x3,y3)から、数19に従って、アフィン変換行列Afを求め(ステップS327)、このアフィン変換行列Afの各要素をアフィンパラメータAとして、このアフィンパラメータAを取得する(ステップS328)。   Subsequently, the CPU 206 calculates Formula 19 from the calculated usc, vsc, uc, vc and the vertex coordinates (x0, y0), (x1, y1), (x2, y2), (x3, y3) of the four points of the rectangle. Accordingly, the affine transformation matrix Af is obtained (step S327), and each element of the affine transformation matrix Af is used as the affine parameter A to obtain the affine parameter A (step S328).

次に、得られたアフィンパラメータを用いて補正画像を作成する画像処理方法について説明する。まず、アフィンパラメータを用いて射影変換や他のアフィン変換を行なう場合、図23に示すように、元の画像の点p(x,y)が、変換行列Apによる射影変換等によって変換(後)画像の点P(u,v)に対応するものとする。この場合、元の画像の点pに対応する変換画像の点Pを求めるよりは、変換画像の点P(u,v)に対応する元の画像の点p(x,y)を求めたほうが好ましい。   Next, an image processing method for creating a corrected image using the obtained affine parameters will be described. First, when projective transformation or other affine transformation is performed using the affine parameters, as shown in FIG. 23, the point p (x, y) of the original image is transformed by projective transformation using the transformation matrix Ap (after). Assume that it corresponds to the point P (u, v) of the image. In this case, it is better to obtain the point p (x, y) of the original image corresponding to the point P (u, v) of the converted image than to obtain the point P of the converted image corresponding to the point p of the original image. preferable.

なお、変換画像の点Pの座標を求める際、バイリニア法による補間方法を用いるものとする。バイリニア法による補間方法は、一方の画像(元の画像)の座標点と対応する他方の画像(変換画像)の座標点を探し出して、一方の画像の座標点の周辺4点の(画素)値から変換画像の点P(u,v)の(画素)値を求める方法である。この方法によれば、変換画像の点Pの画素値Pは、次の数23に従って算出される。   Note that when the coordinates of the point P of the converted image are obtained, an interpolation method based on the bilinear method is used. In the bilinear interpolation method, the coordinate point of the other image (transformed image) corresponding to the coordinate point of one image (original image) is searched, and the (pixel) values of four points around the coordinate point of the one image are found. Is a method for obtaining a (pixel) value of a point P (u, v) of the converted image. According to this method, the pixel value P of the point P of the converted image is calculated according to the following Expression 23.

変換画像の点P(u,v)に対応する元の画像の点p(x,y)を求めるため、CPU206は、画像変換処理を実行する。図24は、この画像変換処理の詳細を説明するためのフローチャートである。   In order to obtain the point p (x, y) of the original image corresponding to the point P (u, v) of the converted image, the CPU 206 executes an image conversion process. FIG. 24 is a flowchart for explaining details of the image conversion processing.

CPU206は、変換画像の画素位置uを0に初期化すると共に(ステップS241)、変換画像の画素位置vを0に初期化する(ステップS242)。   The CPU 206 initializes the pixel position u of the converted image to 0 (step S241) and initializes the pixel position v of the converted image to 0 (step S242).

次に、CPU206は、数19で得られたアフィンパラメータAを用いて、変換画像の画素位置(u,v)を代入し、数2に従って、元の画像の画素位置(x,y)を求める(ステップS243)。続いて、CPU206は、求めた画素位置(x,y)から、数23に従って、バイリニア法により画素値P(u,v)を求める(ステップS244)。   Next, the CPU 206 substitutes the pixel position (u, v) of the converted image using the affine parameter A obtained in Expression 19, and obtains the pixel position (x, y) of the original image according to Expression 2. (Step S243). Subsequently, the CPU 206 obtains a pixel value P (u, v) from the obtained pixel position (x, y) by the bilinear method according to Equation 23 (step S244).

そして、CPU206は、補正後画像の座標vを1つだけインクリメントする(ステップS245)。   Then, the CPU 206 increments the corrected image coordinate v by one (step S245).

続いて、CPU206は、補正後画像の座標vと座標vの最大値vmaxとを比較して、補正後画像の座標vが最大値vmax以上になったか否かを判定し(ステップS246)、座標vが最大値vmax未満であると判定した場合(ステップS246;No)、ステップS243に戻る。   Subsequently, the CPU 206 compares the coordinate v of the corrected image with the maximum value vmax of the coordinate v to determine whether or not the coordinate v of the corrected image is equal to or greater than the maximum value vmax (step S246). When it is determined that v is less than the maximum value vmax (step S246; No), the process returns to step S243.

その後、CPU206は、ステップS243〜S245の処理を繰り返し、座標vが最大値vmaxに達したと判定した場合(ステップS246;Yes)、補正後画像の座標uを1つだけインクリメントする(ステップS247)。   Thereafter, the CPU 206 repeats the processing of steps S243 to S245, and when it is determined that the coordinate v has reached the maximum value vmax (step S246; Yes), the coordinate u of the corrected image is incremented by one (step S247). .

続いて、CPU206は、座標uと座標uの最大値umaxとを比較し、座標uが最大値umax以上になったか否かを判定し(ステップS248)、座標uが最大値umax未満であると判定した場合(ステップS248;No)、ステップS242に戻る。   Subsequently, the CPU 206 compares the coordinate u with the maximum value umax of the coordinate u, determines whether the coordinate u is equal to or greater than the maximum value umax (step S248), and if the coordinate u is less than the maximum value umax. When it determines (step S248; No), it returns to step S242.

その後、CPU206は、ステップS242〜S247の処理を繰り返し、座標uが最大値umaxに達したと判定した場合(ステップS248;Yes)、この画像変換処理を終了させる。   Thereafter, the CPU 206 repeats the processes of steps S242 to S247, and when it is determined that the coordinate u has reached the maximum value umax (step S248; Yes), the image conversion process is terminated.

次に、このように得られた画像から、画像鮮明化パラメータを抽出する処理と、このパラメータを用いて行う画像鮮明化処理と、について説明する。画像鮮明化処理は、より鮮明な画像を得るための処理である。   Next, a process for extracting an image sharpening parameter from the image thus obtained and an image sharpening process performed using this parameter will be described. The image sharpening process is a process for obtaining a clearer image.

画像鮮明化パラメータは、輝度ヒストグラムの最大値、最小値、ピーク値、色差ヒストグラムのピーク値、平均値といった画像鮮明化処理に必要な変数である。   The image sharpening parameter is a variable necessary for image sharpening processing such as a maximum value, a minimum value, a peak value of a luminance histogram, a peak value of a color difference histogram, and an average value.

画像鮮明化パラメータを抽出するには、さらに、全体の画像から輪郭を除く実原稿部の画像を切り出し、輝度、色差のヒストグラムを生成する必要がある。まず、画像鮮明化パラメータの抽出に必要な処理について説明する。   In order to extract the image sharpening parameters, it is necessary to cut out the image of the actual original portion excluding the outline from the entire image and generate a histogram of luminance and color difference. First, a process necessary for extracting an image sharpening parameter will be described.

図25に示すように、撮影対象物の画像には、写真、図形、文字等の実体的な画像だけでなく、台座13や、撮影対象物の紙面の影等のように、撮影対象物の内容に無関係の画像も写っている場合がある。この全体画像に内枠と外枠とを設定し、撮影対象物の実体的な画像がある内枠内を実原稿部、台座13や、撮影対象物の紙面の影等が写っている内枠と外枠との間を周辺部とする。周辺部に写っている撮影対象物の輪郭は、概して黒であることが多い。画像データに、このような周辺部のデータがあった方が好ましい場合もある。   As shown in FIG. 25, the image of the object to be photographed includes not only a substantial image such as a photograph, a figure, and a character, but also a pedestal 13 and a shadow of the sheet of the object to be photographed. There may be images that are not related to the content. An inner frame and an outer frame are set in this entire image, and an inner frame in which an actual document portion, a pedestal 13, a shadow of a sheet of the object to be photographed, and the like are reflected in the inner frame in which a substantial image of the object to be photographed is present. Between the outer frame and the outer frame. The outline of the object to be photographed in the periphery is generally black. In some cases, it is preferable to have such peripheral data in the image data.

しかし、撮影対象物の周辺部の画像も含めてヒストグラムを生成すると、ヒストグラムの引き伸ばしなどが有効に機能しない場合がある。   However, if a histogram is generated including an image of the peripheral part of the object to be photographed, stretching of the histogram may not function effectively.

このため、画像鮮明化パラメータを取り出すときにのみ、実原稿部の画像を切り出して輝度、色差のヒストグラムを生成し、このヒストグラムから取り出した画像鮮明化パラメータを用いて画像全域に対して画像鮮明化処理を行なうものとする。この方が、より効果的なパラメータを取得することができる。   For this reason, only when extracting the image sharpening parameters, the image of the actual original portion is cut out to generate a histogram of brightness and color difference, and the image sharpening parameters are extracted from the histogram and image sharpening is performed for the entire image. Processing shall be performed. This is a more effective parameter.

具体的には、周辺部を含めた画像データがM行N列であって、X、Y方向とも外枠と内枠との間のドット数がKドットであるとすると、X軸側では、実原稿部の画素データであるKからM−K行までの画素データを取得し、Y軸側では、実原稿部の画素データであるKからN−K列までの画素データを取得する。実原稿部の画素データは、(M-2*K)行、(N-2*K)列のデータになる。   Specifically, if the image data including the peripheral portion is M rows and N columns and the number of dots between the outer frame and the inner frame is K dots in both the X and Y directions, on the X axis side, Pixel data from K to M-K rows that are pixel data of the actual document portion is acquired, and pixel data from K to NK columns that are pixel data of the actual document portion is acquired on the Y-axis side. The pixel data of the actual manuscript part is (M-2 * K) row and (N-2 * K) column data.

このように切り出した実原稿部の画像について、輝度ヒストグラム、色差ヒストグラムを生成する。   A luminance histogram and a color difference histogram are generated for the image of the actual document portion cut out in this way.

輝度ヒストグラムは、実原稿部に存在する輝度値(Y)の分布を示すものであり、輝度値毎に実原稿部の画素の数を計数することにより生成される。図26(a)に輝度ヒストグラムの一例を示す。図26(a)において、横軸は、輝度値(Y)を示し、縦軸は、画素数を示す。画像を鮮明化するには、画像鮮明化パラメータとして、最大値(Ymax)、最小値(Ymin)、ピーク値(Ypeak)を求める必要がある。   The luminance histogram shows the distribution of luminance values (Y) existing in the actual document portion, and is generated by counting the number of pixels in the actual document portion for each luminance value. FIG. 26A shows an example of a luminance histogram. In FIG. 26A, the horizontal axis represents the luminance value (Y), and the vertical axis represents the number of pixels. In order to sharpen an image, it is necessary to obtain a maximum value (Ymax), a minimum value (Ymin), and a peak value (Ypeak) as image sharpening parameters.

最大値は、輝度値毎に画素の数を計数し、予め設定された所定数以上の計数値を有する輝度値のうちの最大輝度を示す値であり、最小値は、設定された所定数以上の計数値を有する輝度値のうちの最小輝度を示す値である。ピーク値は、計数値が最大となる輝度値である。ピーク値は、撮影対象である原稿4やスクリーン3の背景色の輝度値を示すものと考えられる。   The maximum value counts the number of pixels for each luminance value, and is a value indicating the maximum luminance among luminance values having a predetermined number or more set in advance, and the minimum value is a predetermined number or more This is a value indicating the minimum luminance among the luminance values having the counted value. The peak value is a luminance value that maximizes the count value. The peak value is considered to indicate the luminance value of the background color of the document 4 or the screen 3 to be photographed.

また、色差ヒストグラムは、実原稿部に存在する色差(U,V)の分布を示すものであり、色差毎に実原稿部の画素の数を計数することにより生成される。図26(b)に、色差ヒストグラムの一例を示す。図26(b)において、横軸は、色差を示し、縦軸は、画素数を示す。色差ヒストグラムの場合も、画素の計数値が最大となる色差のピーク値(Upeak,Vpeak)が現れる。このピーク値も撮影対象物の背景色の色差を示すものと考えられる。画像を鮮明化するには、画像鮮明化パラメータとして色差ヒストグラムのピーク値と平均値(Umean,Vmean)とを求める必要がある。なお、平均値は、平均計数値を有する色差の値である。   The color difference histogram indicates the distribution of the color differences (U, V) existing in the actual document portion, and is generated by counting the number of pixels in the actual document portion for each color difference. FIG. 26B shows an example of the color difference histogram. In FIG. 26B, the horizontal axis indicates the color difference, and the vertical axis indicates the number of pixels. Also in the case of the color difference histogram, a peak value (Upeak, Vpeak) of the color difference where the count value of the pixel becomes maximum appears. This peak value is also considered to indicate the color difference of the background color of the object to be imaged. In order to sharpen an image, it is necessary to obtain a peak value and an average value (Umean, Vmean) of a color difference histogram as image sharpening parameters. The average value is a color difference value having an average count value.

なお、画像を鮮明化して視認性に優れた画像を得るには、撮影対象物の背景色によって補正効果が異なってくるため、画像効果の補正方法を撮影対象物の背景色によって変える必要がある。このため、撮影対象物の背景色の判別が必要になってくる。撮影対象物の背景色は、輝度ヒストグラム、色差ヒストグラムの各ピーク値から判別される。   Note that in order to obtain an image with high visibility by sharpening the image, the correction effect differs depending on the background color of the object to be photographed, so the image effect correction method must be changed depending on the background color of the object to be photographed. . For this reason, it is necessary to determine the background color of the object to be photographed. The background color of the object to be photographed is determined from the peak values of the luminance histogram and the color difference histogram.

ここで、撮影対象物の背景色を、3つに分類するものとする。第1は、ホワイトボード、ノート等のように背景色が白の場合である。第2は、黒板等のように背景色が黒の場合である。第3は、雑誌、パンフレットのように背景色が白又は黒以外の場合である。具体的に、原稿4の背景色は、以下の判別式に従って判別される。   Here, the background color of the photographing object is classified into three. The first is a case where the background color is white, such as a whiteboard or notebook. The second is a case where the background color is black, such as a blackboard. The third is a case where the background color is other than white or black, such as a magazine or a pamphlet. Specifically, the background color of the document 4 is determined according to the following determination formula.

白判定条件は、次の数24によって表され、数24に示す条件を満足したときに、撮影対象物の背景色は白(W)と判定される。   The white determination condition is expressed by the following Expression 24, and when the condition shown in Expression 24 is satisfied, the background color of the photographing object is determined to be white (W).

黒判定条件は、次の数25によって表され、数25に示す条件を満足したときに、撮影対象物の背景色は黒(B)と判定される。   The black determination condition is expressed by the following Expression 25, and when the condition shown in Expression 25 is satisfied, the background color of the shooting target is determined to be black (B).

また、数24,数25に示す条件を満足しなかった場合、撮影対象物の背景色はカラー(C)と判定される。なお、カラー閾値は、例えば、50及び128に、白判定閾値は、例えば、128に、黒判定閾値は、例えば、50に設定される。   If the conditions shown in Equations 24 and 25 are not satisfied, the background color of the subject is determined to be color (C). For example, the color threshold is set to 50 and 128, the white determination threshold is set to 128, and the black determination threshold is set to 50, for example.

このような考え方に基づいて、CPU206は、画像鮮明化パラメータ抽出処理を実行する。図27は、この画像鮮明化パラメータ抽出処理の詳細を示すフローチャートである。   Based on such a concept, the CPU 206 executes image sharpening parameter extraction processing. FIG. 27 is a flowchart showing details of the image sharpening parameter extraction processing.

CPU206は、実原稿部の中で、各輝度(Y)値を有する画素の数を計数して、図26(a)に示すような輝度ヒストグラムを生成し(ステップS331)、生成した輝度ヒストグラムから、輝度の最大値(Ymax)、最小値(Ymin)、ピーク値(Ypeak)を取得する(ステップS332)。   The CPU 206 counts the number of pixels having each luminance (Y) value in the actual document portion, generates a luminance histogram as shown in FIG. 26A (step S331), and generates the luminance histogram from the generated luminance histogram. The maximum value (Ymax), minimum value (Ymin), and peak value (Ypeak) of the luminance are acquired (step S332).

次に、CPU206は、図26(b)に示すような色差(U,V)のヒストグラムを作成する(ステップS333)。続いて、CPU206は、画像鮮明化パラメータとして、色差(U,V)のピーク値(Upeak,Vpeak)を求めると共に(ステップS334)、色差の平均値(Umean,Vmean)を求める(ステップS335)。   Next, the CPU 206 creates a histogram of color differences (U, V) as shown in FIG. 26B (step S333). Subsequently, the CPU 206 obtains the peak value (Upeak, Vpeak) of the color difference (U, V) as an image sharpening parameter (step S334) and obtains the average value (Umean, Vmean) of the color difference (step S335).

そして、CPU206は、画像ヒストグラムのこれらのピーク値(Ypeak,Upeak,Vpeak)から、数24,数25に示す判定条件式に従って撮影対象物の背景色を判別し(ステップS336)、画像鮮明化パラメータと撮影対象物の背景色のデータとをメモリ201に記憶する(ステップS337)。   Then, the CPU 206 discriminates the background color of the object to be photographed from these peak values (Ypeak, Upeak, Vpeak) of the image histogram according to the judgment condition formulas shown in Formulas 24 and 25 (Step S336), and the image sharpening parameter. And the background color data of the object to be photographed are stored in the memory 201 (step S337).

次に、CPU206は、このように抽出した画像鮮明化パラメータを用いて画像鮮明化処理を行う。前述のように、画像鮮明化処理を効果的に行うには、背景色によって処理内容を替える必要がある。   Next, the CPU 206 performs an image sharpening process using the image sharpening parameters extracted in this way. As described above, in order to effectively perform the image sharpening process, it is necessary to change the processing contents depending on the background color.

ホワイトボード、ノート等のように、背景色が白である場合、図28(a)に示すような輝度変換を行う。黒板等のように、背景色が黒である場合、図28(b)に示すような輝度変換を行う。雑誌、パンフレット等のように、背景色が白または黒以外である場合、図28(c)に示すような変換を行う。なお、図28(a),(b),(c)において、横軸は、画素値の入力値を示し、縦軸は、画素値の出力値を示す。   When the background color is white, such as a whiteboard or notebook, luminance conversion as shown in FIG. When the background color is black, such as a blackboard, luminance conversion as shown in FIG. When the background color is other than white or black, such as a magazine or a pamphlet, the conversion as shown in FIG. In FIGS. 28A, 28 </ b> B, and 28 </ b> C, the horizontal axis indicates the input value of the pixel value, and the vertical axis indicates the output value of the pixel value.

背景色が白である場合、図28(a)に示すように、ピーク値を境にして、輝度変換線の傾斜角度を変える。所定輝度値を、例えば、230として、入力された輝度のピーク値を輝度値230まで引き上げる。そして、最大値を、最大輝度まで持ち上げる。従って、輝度変換線は、図28(a)に示すように、2つの線分によって表される。   When the background color is white, as shown in FIG. 28A, the inclination angle of the luminance conversion line is changed with the peak value as a boundary. The predetermined luminance value is set to 230, for example, and the input luminance peak value is raised to the luminance value 230. Then, the maximum value is raised to the maximum brightness. Therefore, the luminance conversion line is represented by two line segments as shown in FIG.

背景色が黒である場合、図28(b)に示すように、ピーク値をある一定の輝度値(20)になるように輝度変換を行なう。この場合も、図28(b)に示すように、輝度変換線は2つの線分によって表される。   When the background color is black, luminance conversion is performed so that the peak value becomes a certain luminance value (20) as shown in FIG. Also in this case, as shown in FIG. 28B, the luminance conversion line is represented by two line segments.

背景色が白または黒以外の色である場合、図28(c)に示すように、通常の引き伸ばし処理と同様に、最小値以下と最大値以上をカットし、1つの線分として表されるように輝度変換線を設定する。   When the background color is a color other than white or black, as shown in FIG. 28C, the minimum value or less and the maximum value or more are cut and expressed as one line segment as in the normal enlargement process. The luminance conversion line is set as follows.

なお、このように背景の輝度(Y)と出力(Y’)との変換テーブルを予め設定してメモリ201に記憶してもよい。作成した変換テーブルに従って、入力された各画素の値から、それぞれの出力値を求め、画像鮮明化処理を施す。このように変換された画像は、明るい画素はより明るく、暗い画素はより暗くなるので、輝度分布が広がり、視認性がすぐれた画像になる。   It should be noted that a conversion table of background luminance (Y) and output (Y ′) may be set in advance and stored in the memory 201 as described above. According to the created conversion table, each output value is obtained from the value of each input pixel, and image sharpening processing is performed. In the image thus converted, bright pixels are brighter and dark pixels are darker, so that the luminance distribution is widened and the image is excellent in visibility.

また、撮影された画像によっては、デジタルカメラのホワイトバランスの調整が適正に行われず、例えば、全体が黄色等に色が変わってしまう場合がある。この色の変化は、輝度ヒストグラムの画像鮮明化処理を行うだけでは、修正することができない。   In addition, depending on the photographed image, the white balance of the digital camera may not be adjusted properly, and for example, the color may change to yellow or the like as a whole. This color change cannot be corrected only by performing the image sharpening process of the luminance histogram.

この場合、好ましい画像を得るためには、カラー調整を行う。図29は、カラー調整を行うための輝度変換グラフの一例を示す図である。図29において、横軸は、色差の入力値を示し、縦軸は、色差の出力値を示す。カラー調整は、図28(b)に示す色差(U,V)のそれぞれの平均値(Umean,Vmean)がグレーになるように、図29に示す輝度変換グラフに従って輝度変換が行なわれる。   In this case, color adjustment is performed to obtain a preferable image. FIG. 29 is a diagram illustrating an example of a luminance conversion graph for performing color adjustment. In FIG. 29, the horizontal axis indicates the input value of the color difference, and the vertical axis indicates the output value of the color difference. In the color adjustment, luminance conversion is performed according to the luminance conversion graph shown in FIG. 29 so that the average values (Umean, Vmean) of the color differences (U, V) shown in FIG.

色差UとVの値がともに0である場合、色は無彩色となるため、ピーク値(Upeak,Vpeak)が0になるようにカラー調整を行う。即ち、カラーの変換線は2つの線分によって表される。入力値Uに対する出力値U’は次の数26で与えられる。   When the values of the color differences U and V are both 0, the color is an achromatic color, and color adjustment is performed so that the peak values (Upeak, Vpeak) are 0. That is, the color conversion line is represented by two line segments. The output value U ′ for the input value U is given by the following equation (26).

色差Vについても同様である。   The same applies to the color difference V.

次に、画像鮮明化処理として、前述の輝度引き延ばしだけでは、十分に背景が白色化しない場合、背景の白色化を行い、画像内の背景と思われる部分の色を白(Y:255,U:0,V:0)または、それに近い色にする。   Next, as the image sharpening process, when the background is not sufficiently whitened only by the above-described luminance extension, the background is whitened, and the color of the portion considered to be the background in the image is set to white (Y: 255, U : 0, V: 0) or a color close to that.

図30(a)は、ある画素の輝度値を基準(0)にして、この画素の輝度値に対する輝度値の引き上げ率を示す図である。横軸は、輝度値を示し、縦軸は輝度値の引き上げ率を示す。また、図30(b)は、色差と色差の変化率を示す図である。横軸は、色差を示し、縦軸は、色差の変化率を示す。   FIG. 30A is a diagram illustrating a luminance value increase rate with respect to the luminance value of a pixel, with the luminance value of a certain pixel as a reference (0). The horizontal axis represents the luminance value, and the vertical axis represents the luminance value raising rate. FIG. 30B is a diagram showing the color difference and the change rate of the color difference. The horizontal axis indicates the color difference, and the vertical axis indicates the change rate of the color difference.

図中、C0は、輝度と色差とを100%引き上げる0からの範囲を示し、C1は、輝度値に従って引き上げ率を可変する範囲を示す。図30(a),(b)に示すように、輝度(Y)値が一定値以上(Yw)で、色差(U,V)が一定範囲内(C0)の画素の色を白色化範囲として、輝度値を引き上げ、色差を0にする。このような背景の白色化を行えば、輝度引き延ばしだけでは、十分に背景が白色化しない場合に、画像鮮明化処理が非常に有効なものとなる。   In the figure, C0 indicates a range from 0 where the luminance and the color difference are increased by 100%, and C1 indicates a range where the increase rate is varied according to the luminance value. As shown in FIGS. 30A and 30B, the color of the pixel whose luminance (Y) value is equal to or greater than a certain value (Yw) and whose color difference (U, V) is within a certain range (C0) is defined as a whitening range. The brightness value is raised and the color difference is set to zero. If such whitening of the background is performed, the image sharpening process becomes very effective when the background is not sufficiently whitened only by extending the luminance.

このような考え方に基づいて、CPU206は、画像鮮明化処理を実行する。図31は、この画像鮮明化処理の詳細を示すフローチャートである。   Based on such a concept, the CPU 206 executes an image sharpening process. FIG. 31 is a flowchart showing details of the image sharpening process.

CPU206は、保存した画像鮮明化パラメータをメモリ201から読み出す(ステップS251)。   The CPU 206 reads the stored image sharpening parameter from the memory 201 (step S251).

次に、CPU206は、輝度ヒストグラムの調整を行う(ステップS252)。具体的には、CPU206は、背景が白か否かを判定し、背景が白と判定した場合、背景をより白くして、視認性が良くなるように、図28(a)に示すような輝度変換を行って、輝度ヒストグラムの調整を行う。一方、背景が白ではないと判定した場合、CPU206は、背景が黒か否かを判定し、背景が黒であると判定した場合、図28(b)に示すような輝度変換を行って、輝度ヒストグラムを調整する。一方、背景が黒ではないと判定した場合、CPU206は、図28(c)に示すような輝度変換を行って、撮影対象物の背景色に応じたヒストグラム調整を行う。   Next, the CPU 206 adjusts the luminance histogram (step S252). Specifically, the CPU 206 determines whether or not the background is white. If the background is determined to be white, the CPU 206 makes the background whiter and the visibility is improved as shown in FIG. Luminance conversion is performed to adjust the luminance histogram. On the other hand, when it is determined that the background is not white, the CPU 206 determines whether or not the background is black, and when it is determined that the background is black, the CPU 206 performs luminance conversion as shown in FIG. Adjust the brightness histogram. On the other hand, if it is determined that the background is not black, the CPU 206 performs luminance conversion as shown in FIG. 28C and adjusts the histogram according to the background color of the shooting target.

続いて、CPU206は、このように調整した画像に対して、図25に示すような変換を行ってカラー調整を行い、(ステップS253)、続いて、背景の白色化処理を実行する(ステップS254)。   Subsequently, the CPU 206 performs color adjustment by performing conversion as shown in FIG. 25 on the image adjusted in this way (step S253), and subsequently executes background whitening processing (step S254). ).

図32は、CPU206が行う背景の白色化処理の詳細を示すフローチャートである。なお、図中のimax,jmaxは入力画像のx,y軸のサイズである。   FIG. 32 is a flowchart showing details of the background whitening process performed by the CPU 206. Note that imax and jmax in the figure are the sizes of the x and y axes of the input image.

この背景白色化処理において、CPU206は、まず、カウント値jを0に初期化すると共に(ステップS341)、カウント値iを0に初期化する(ステップS342)。次に、CPU206は、入力画像の画素(i,j)の輝度(Y)が一定値以上(Yw)であるか否かを判定する(ステップS343)。   In this background whitening process, the CPU 206 first initializes the count value j to 0 (step S341) and initializes the count value i to 0 (step S342). Next, the CPU 206 determines whether or not the luminance (Y) of the pixel (i, j) of the input image is equal to or greater than a certain value (Yw) (step S343).

輝度(Y)が一定値以上(Yw)であると判定した場合(ステップS343;Yes)、CPU206は、色差U、Vの絶対値が所定値C0未満であるか否かを判定する(ステップS344)。一方、輝度(Y)が一定値未満(Yw)であると判定した場合(ステップS343;No)、CPU206は、ステップS348に進む。   When it is determined that the luminance (Y) is equal to or greater than a certain value (Yw) (step S343; Yes), the CPU 206 determines whether or not the absolute values of the color differences U and V are less than the predetermined value C0 (step S344). ). On the other hand, if it is determined that the luminance (Y) is less than a certain value (Yw) (step S343; No), the CPU 206 proceeds to step S348.

色差U、Vの絶対値が所定値C0未満ではないと判定した場合(ステップS344;No)、CPU206は、入力画像の画素(i,j)の色差U、Vの絶対値が所定値C1未満であるか否かを判定する(ステップS345)。   When it is determined that the absolute values of the color differences U and V are not less than the predetermined value C0 (step S344; No), the CPU 206 has the absolute values of the color differences U and V of the pixel (i, j) of the input image less than the predetermined value C1. It is determined whether or not (step S345).

ステップS344及びS345にて色差U、Vの絶対値が所定値C0未満であると判定した場合(ステップS344;Yes)、CPU206は、輝度値(Y)を255に設定し、色差(u,v)を0にして、画素(i,j)の値を書き換え(ステップS346)、ステップS348に進む。   When it is determined in steps S344 and S345 that the absolute values of the color differences U and V are less than the predetermined value C0 (step S344; Yes), the CPU 206 sets the luminance value (Y) to 255 and the color difference (u, v ) Is set to 0, the value of the pixel (i, j) is rewritten (step S346), and the process proceeds to step S348.

ステップS344及びS345にて色差U、Vの絶対値が所定値C0以上であり、且つ所定値C1未満であると判定した場合(ステップS344;No,ステップS345;Yes)、CPU206は、輝度値Y=Y+a*(255−Y)として、画素(i,j)の値を書き換え(ステップS347)、ステップS348に進む。   When it is determined in steps S344 and S345 that the absolute values of the color differences U and V are greater than or equal to the predetermined value C0 and less than the predetermined value C1 (step S344; No, step S345; Yes), the CPU 206 determines that the luminance value Y = Y + a * (255−Y), the value of the pixel (i, j) is rewritten (step S347), and the process proceeds to step S348.

ステップS344及びS345にて色差U、Vの絶対値が所定値C1以上であると判定した場合(ステップS344;No,ステップS345;No)、CPU206は、輝度値を変更せずに、ステップS348に進む。   If it is determined in steps S344 and S345 that the absolute values of the color differences U and V are greater than or equal to the predetermined value C1 (step S344; No, step S345; No), the CPU 206 proceeds to step S348 without changing the luminance value. move on.

そして、CPU206は、カウント値iをインクリメントする(ステップS348)。続いて、CPU206は、カウント値iを最大値imaxと比較して、カウント値iが最大値imaxに達したか否かを判定する(ステップS349)。   Then, the CPU 206 increments the count value i (step S348). Subsequently, the CPU 206 compares the count value i with the maximum value imax and determines whether or not the count value i has reached the maximum value imax (step S349).

カウント値iが最大値imaxに達していないと判定した場合(ステップS349;No)、CPU206は、ステップS343に戻る。   When it is determined that the count value i has not reached the maximum value imax (step S349; No), the CPU 206 returns to step S343.

その後、ステップS343〜S348の処理を繰り返し実行し、カウント値iが最大値imaxに達したと判定した場合(ステップS349;Yes)、CPU206は、カウント値jをインクリメントする(ステップS350)。   Thereafter, the processes in steps S343 to S348 are repeatedly executed, and when it is determined that the count value i has reached the maximum value imax (step S349; Yes), the CPU 206 increments the count value j (step S350).

続いて、CPU206は、カウント値jを最大値jmaxと比較して、カウント値jが最大値jmaxに達したか否かを判定する(ステップS351)。   Subsequently, the CPU 206 compares the count value j with the maximum value jmax to determine whether or not the count value j has reached the maximum value jmax (step S351).

カウント値jが最大値jmaxに達していないと判定した場合(ステップS351;No)、CPU206は、ステップS342に戻る。   When it is determined that the count value j has not reached the maximum value jmax (step S351; No), the CPU 206 returns to step S342.

その後、ステップS342〜S350の処理を繰り返し実行し、カウント値jが最大値jmaxに達したと判定した場合(ステップS351;Yes)、CPU206は、この背景の白色化処理を終了させる。   Thereafter, the processes of steps S342 to S350 are repeatedly executed, and when it is determined that the count value j has reached the maximum value jmax (step S351; Yes), the CPU 206 ends the whitening process of the background.

以上説明したように、本実施形態によれば、CPU206は、台座13上の原稿4を撮影することにより得られた画像からエッジ画像を生成し、この生成したエッジ画像から原稿4の輪郭を形成する四角形を検出する。次に、CPU206は、エッジ画像から原稿4の四角形を検出できたか否かを判別し、検出できたと判別された場合には、この検出した原稿4の四角形の各頂点の座標を求める。一方、検出できなかったと判別された場合には、メモリ201に登録されている台座13の輪郭を形成する四角形の各頂点の座標を求める。   As described above, according to the present embodiment, the CPU 206 generates an edge image from an image obtained by photographing the document 4 on the pedestal 13 and forms the contour of the document 4 from the generated edge image. Detect the rectangle to be used. Next, the CPU 206 determines whether or not the quadrilateral of the original 4 has been detected from the edge image. If it is determined that the quadrilateral of the original 4 has been detected, the CPU 206 obtains the coordinates of each vertex of the detected quadrilateral of the original 4. On the other hand, if it is determined that it has not been detected, the coordinates of each vertex of the quadrangle that forms the contour of the pedestal 13 registered in the memory 201 are obtained.

そして、CPU206は、求めた四角形の各頂点の座標からアフィンパラメータを取得し、この取得したアフィンパラメータを用いて、撮影画像の各画素の座標をアフィン変換して、撮影画像の傾きを補正する。   Then, the CPU 206 acquires affine parameters from the obtained coordinates of the respective vertices of the quadrangle, affine-transforms the coordinates of each pixel of the captured image using the acquired affine parameters, and corrects the inclination of the captured image.

例えば図3(a)に示すように原稿4が画角(撮影範囲)に収まっている場合、CPU206は、エッジ画像から原稿4の四角形を検出することができるので、この検出した四角形(原稿4の輪郭)に沿って画像の切出を行う。そして、CPU206は、切り出した画像に対して傾きの補正や画像鮮明化処理を施した後、出力する。この結果、スクリーン3上には、図3(b)に示すような画像が投影される。   For example, as shown in FIG. 3A, when the document 4 is within the angle of view (shooting range), the CPU 206 can detect the square of the document 4 from the edge image. The image is cut out along the outline. Then, the CPU 206 performs an inclination correction or an image sharpening process on the cut-out image, and then outputs it. As a result, an image as shown in FIG. 3B is projected on the screen 3.

一方、図33(a)に示すように原稿4が画角からはみ出している場合、CPU206は、原稿4の四角形を検出することができないので、メモリ201に登録されている四角形(台座13の輪郭)に沿って画像の切出を行う。そして、CPU206は、切り出した画像に対して傾きの補正や画像鮮明化処理を施した後、出力する。この結果、スクリーン3上には、図33(b)に示すような画像が投影される。   On the other hand, when the document 4 protrudes from the angle of view as shown in FIG. 33A, the CPU 206 cannot detect the rectangle of the document 4, and therefore the rectangle registered in the memory 201 (the outline of the base 13). ) To crop the image. Then, the CPU 206 performs an inclination correction or an image sharpening process on the cut-out image, and then outputs it. As a result, an image as shown in FIG. 33B is projected on the screen 3.

このように、原稿4が画角に収まっている場合、この原稿4の輪郭に沿って画像の切出が行われ、画角からはみ出している場合、台座13の輪郭に沿って画像の切出が行われる。このため、CPU206は、撮影した原稿4の画像が画角からはみ出しているときでも、カメラ部11のズーム倍率を小さくする必要がないので、撮影画像全体に占める原稿4の割合を大きくすることができ、切り出されてスクリーン3上に投影される画像も大きくなる。この結果、本実施形態の撮影画像投影装置は、視認性に優れた画像をスクリーン3上に投影することができる。   As described above, when the document 4 is within the angle of view, the image is cut out along the outline of the document 4, and when it is beyond the angle of view, the image is cut out along the outline of the pedestal 13. Is done. For this reason, the CPU 206 does not need to reduce the zoom magnification of the camera unit 11 even when the image of the photographed document 4 protrudes from the angle of view, so that the ratio of the document 4 to the entire photographed image can be increased. The image that is cut out and projected onto the screen 3 also becomes larger. As a result, the captured image projection device of the present embodiment can project an image with excellent visibility onto the screen 3.

また、撮影画像が歪んでいる場合であっても、上述のように撮影画像全体に占める原稿4の割合を大きくすることができるので、本実施形態に係る撮影画像投影装置は、この撮影画像の輝度及び色差を適正に補正することができ、この結果、スクリーン3上に投影される画像の視認性をさらに高めることができる。   Even if the captured image is distorted, the ratio of the document 4 to the entire captured image can be increased as described above. Therefore, the captured image projection apparatus according to the present embodiment can save the captured image. The luminance and color difference can be corrected appropriately, and as a result, the visibility of the image projected on the screen 3 can be further improved.

また、カメラ部11は、図34(a)に示すように、台座13上に載置された原稿4を真上から撮影するが、ライトの映込等がある場合には、図34(b)に示すように、少し斜めの位置から撮影を行って、ライトの映込を軽減する。   Further, as shown in FIG. 34A, the camera unit 11 photographs the document 4 placed on the pedestal 13 from directly above, but when there is a light reflection or the like, FIG. ) Take a picture from a slightly oblique position to reduce the reflection of light.

図35(a)は、原稿4を真上から撮影した場合に得られる画像例を示すものであり、図35(b)は、原稿4を少し斜めの位置から撮影した場合に得られる画像例を示すものである。   FIG. 35A shows an example of an image obtained when the document 4 is photographed from directly above, and FIG. 35B shows an example of an image obtained when the document 4 is photographed from a slightly oblique position. Is shown.

CPU206は、図35(a)及び(b)に示すいずれの撮影画像からも、上記手法で原稿4の輪郭を抽出して原稿4の画像を切り出すことにより、図3(b)に示すような画像を取得することができる。この結果、本実施形態に係る撮影画像投影装置は、ライトの映込による影響を受けにくいものとなる。さらに、本実施形態に係る撮影画像投影装置は、原稿4が画角からはみ出している場合でも、台座13の輪郭を抽出して画像の切出を行うことにより、同様の効果を得ることができる。   The CPU 206 extracts the outline of the document 4 from the photographed images shown in FIGS. 35A and 35B and cuts out the image of the document 4 by the above-described method, so that the image shown in FIG. Images can be acquired. As a result, the captured image projection apparatus according to the present embodiment is less susceptible to the effects of light reflection. Furthermore, the photographed image projection apparatus according to the present embodiment can obtain the same effect by extracting the contour of the pedestal 13 and cutting out the image even when the document 4 protrudes from the angle of view. .

さらに、カメラ部11の台座13に対するあおり角が変動する等してカメラ部11と台座13との位置関係が変動した場合に、ユーザがキャリブレーション要求キーを押下すると、CPU206は、台座13を撮影することによって得られた画像から、台座13の輪郭を形成する直線パラメータの組を検出してメモリ201に登録する。これにより、カメラ部11と台座13との位置関係が変動した場合、CPU206は、これに併せて、メモリ201に登録している直線パラメータの組を順次更新していくことができる。このように順次更新される直線パラメータの組を用いて、撮影画像からの原稿4の画像の切出と傾き補正とを行うことにより、本実施形態に係る撮影画像投影装置は、カメラ部11と台座13との位置関係が変動した場合であっても、撮影画像から原稿4の正面画像を適切に取得することができる。   Furthermore, when the positional relationship between the camera unit 11 and the pedestal 13 changes due to a change in the tilt angle of the camera unit 11 with respect to the pedestal 13, when the user presses the calibration request key, the CPU 206 captures the pedestal 13. A set of linear parameters forming the contour of the pedestal 13 is detected from the image obtained by doing so and registered in the memory 201. As a result, when the positional relationship between the camera unit 11 and the pedestal 13 changes, the CPU 206 can sequentially update the set of linear parameters registered in the memory 201 accordingly. By using the set of linear parameters that are sequentially updated in this manner, the captured image projection apparatus according to the present embodiment performs the cut-out of the image of the document 4 from the captured image and the inclination correction. Even when the positional relationship with the pedestal 13 changes, the front image of the document 4 can be appropriately acquired from the captured image.

なお、本発明は、上記実施形態に限定されず、種々の変形、応用が可能である。以下、本発明に適用可能な上記実施形態の変形態様について、説明する。   In addition, this invention is not limited to the said embodiment, A various deformation | transformation and application are possible. Hereinafter, modifications of the above-described embodiment applicable to the present invention will be described.

上記実施形態において、支柱12は、カメラ部11及び台座13と回転自在に接続されていた。しかしながら、本発明は、これに限定されず、支柱12がカメラ部11及び台座13と固定して接続されていてもよく、また、ノッチ機構などによって予め決められた位置にロックされるように接続されていてもよい。このように、カメラ部11と台座13との位置関係が予め定まっている場合には、ステップS111の台座登録処理を省略して、それぞれ位置関係に対応した直線パラメータの組をメモリ201に登録し、位置関係が変動する毎に使用する直線パラメータの組を順次切り替えていけばよい。   In the above embodiment, the support column 12 is rotatably connected to the camera unit 11 and the pedestal 13. However, the present invention is not limited to this, and the support column 12 may be fixedly connected to the camera unit 11 and the pedestal 13, and connected so as to be locked at a predetermined position by a notch mechanism or the like. May be. As described above, when the positional relationship between the camera unit 11 and the pedestal 13 is determined in advance, the pedestal registration process in step S111 is omitted, and a set of linear parameters corresponding to each positional relationship is registered in the memory 201. Each time the positional relationship fluctuates, the set of linear parameters to be used may be switched sequentially.

また、上記実施形態において、CPU206は、ステップS111の台座登録処理にてメモリ201に格納されている台座13の輪郭を形成する直線パラメータに近い直線パラメータを、ステップS303及びS304にて取得した候補から、外していた。しかしながら、本発明は、これに限定されず、CPU206は、ステップS301にて得られたエッジ画像から、台座13の輪郭を形成する直線パラメータを予め外しておき、ステップS303及びS304にて候補として検出されないようにしてもよい。また、CPU206は、図36に示すように、台座13の輪郭よりも少し内側の画像を切り出し、その切り出した画像から、四角形を検出してもよい。   Further, in the above embodiment, the CPU 206 uses the straight line parameters close to the straight line parameters forming the contour of the pedestal 13 stored in the memory 201 in the pedestal registration process in step S111 from the candidates acquired in steps S303 and S304. I was off. However, the present invention is not limited to this, and the CPU 206 removes in advance the straight line parameters that form the contour of the pedestal 13 from the edge image obtained in step S301, and detects them as candidates in steps S303 and S304. It may not be done. In addition, as illustrated in FIG. 36, the CPU 206 may cut out an image slightly inside the outline of the pedestal 13 and detect a square from the cut out image.

さらに、上記実施形態において、原稿4の輪郭の形状は、四角形であった。しかしながら、本発明は、これに限定されず、原稿の形状は、任意であり、例えば五角形であってもよい。この場合、撮影画像投影装置は、原稿4の輪郭から五角形を取得し、五角形の各頂点座標から射影パラメータを抽出すればよい。   Further, in the above embodiment, the shape of the outline of the document 4 is a quadrangle. However, the present invention is not limited to this, and the shape of the document is arbitrary, and may be, for example, a pentagon. In this case, the captured image projection apparatus may acquire a pentagon from the outline of the document 4 and extract projection parameters from the vertex coordinates of the pentagon.

また、上記実施形態において、画像処理処理は、撮影画像投影装置に適用されていたが、本発明は、これに限定されるものではなく、デジタルカメラ等、他の撮影装置に適用してもよい。   In the above embodiment, the image processing process is applied to the photographic image projection apparatus. However, the present invention is not limited to this, and may be applied to other photographic apparatuses such as a digital camera. .

さらに、上記実施形態において、CPU236等が実行するプログラムは、予めROM等に記憶されていた。しかしながら、本発明は、これに限定されず、コンピュータを、装置の全部又は一部として動作させ、あるいは、上述の処理を実行させるためのプログラムを、フレキシブルディスク、CD−ROM(Compact Disk Read-Only Memory)、DVD(Digital Versatile Disk)、MO(Magneto Optical disk)などのコンピュータ読み取り可能な記録媒体に格納して配布し、これを別のコンピュータにインストールし、上述の手段として動作させ、あるいは、上述の工程を実行させてもよい。   Furthermore, in the above-described embodiment, the program executed by the CPU 236 or the like is stored in advance in the ROM or the like. However, the present invention is not limited to this, and a program for causing a computer to operate as all or part of the apparatus or to execute the above-described processing is stored in a flexible disk, a CD-ROM (Compact Disk Read-Only). It is stored and distributed in a computer-readable recording medium such as a memory (DVD), a digital versatile disk (MO), or a magneto optical disk (MO), and this is installed in another computer and operated as the above-mentioned means, or These steps may be executed.

また、プログラムを記憶する記憶媒体は、上述のものに限定されず、例えば、Blue−Ray−Disc(R)やAOD(Advanced Optical Disc)などの青色レーザを用いた次世代光ディスク記憶媒体、赤色レーザを用いるHD−DVD9、青紫色レーザを用いるBlue−Laser−DVD等、今後開発される種々の大容量記憶媒体を用いて本発明を実施することが可能であることはいうまでもない。   Further, the storage medium for storing the program is not limited to the above-described ones. For example, a next-generation optical disk storage medium using a blue laser such as Blue-Ray-Disc (R) or AOD (Advanced Optical Disc), a red laser Needless to say, the present invention can be implemented using various types of large-capacity storage media that will be developed in the future, such as HD-DVD9 using a blue-ray and Blue-Laser-DVD using a blue-violet laser.

さらに、インターネット上のサーバ装置が有するディスク装置等にプログラムを格納しておき、例えば、搬送波に重畳させて、コンピュータにダウンロード等するものとしてもよい。   Furthermore, the program may be stored in a disk device or the like included in a server device on the Internet, and may be downloaded onto a computer by being superimposed on a carrier wave, for example.

本発明の実施形態に係る撮影画像投影装置の構成を示す図であり、(a)は、書画撮影時の図であり、(b)は、ボード撮影時の図である。It is a figure which shows the structure of the picked-up image projection apparatus which concerns on embodiment of this invention, (a) is a figure at the time of document photography, (b) is a figure at the time of board photography. 図1に示す書画カメラの構成を示すブロック図である。It is a block diagram which shows the structure of the document camera shown in FIG. 図2に示す画像処理装置の機能を説明するための図である。It is a figure for demonstrating the function of the image processing apparatus shown in FIG. 図2に示す画像処理装置の機能を説明するための図である。It is a figure for demonstrating the function of the image processing apparatus shown in FIG. 書画カメラ基本処理を示すフローチャートである。It is a flowchart which shows a document camera basic process. PC書画基本処理を示すフローチャートである。It is a flowchart which shows PC document drawing basic processing. 図5に示す書画撮影処理の詳細を示すフローチャートである。6 is a flowchart showing details of the document photographing process shown in FIG. 5. 図5に示す書画撮影処理の詳細を示すフローチャートである。6 is a flowchart showing details of the document photographing process shown in FIG. 5. 図5に示すボード撮影処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the board | substrate imaging | photography process shown in FIG. 図2に示す画像処理装置の切り抜き処理を説明するための図である。It is a figure for demonstrating the clipping process of the image processing apparatus shown in FIG. アフィンパラメータの抽出とアフィン変換の基本的な考え方の説明図である。It is explanatory drawing of the basic idea of affine parameter extraction and affine transformation. 図8に示す四角形輪郭抽出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the square outline extraction process shown in FIG. 縮小輝度画像とエッジ画像とを説明するための図である。It is a figure for demonstrating a reduced luminance image and an edge image. Robertsフィルタの機能を説明するための図である。It is a figure for demonstrating the function of a Roberts filter. ハフ変換を用いた直線検出を説明するための図であり、(a)は、上下の辺を検出する処理を示し、(b)は、左右の辺を検出する処理を示している。It is a figure for demonstrating the straight line detection using Hough transform, (a) shows the process which detects an upper and lower side, (b) has shown the process which detects a right and left side. ρがプラスの値かマイナスの値かによって、上下、または左右を判定可能であることを示すイメージ図である。It is an image figure which shows that upper and lower sides or right and left can be determined depending on whether ρ is a positive value or a negative value. 図8に示す台座登録処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the base registration process shown in FIG. 台座登録変更処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of a base registration change process. 書画撮影時四角形検出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of a rectangle detection process at the time of document photography. 直線検出後の四角形の特定を説明するための図であり、(a)は、書画撮影の場合を示し、(b)はボード撮影の場合を示している。It is a figure for demonstrating specification of the rectangle after a straight line detection, (a) shows the case of document photography, (b) has shown the case of board photography. ボード撮影時四角形検出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of a rectangle detection process at the time of board photography. 図12に示すアフィンパラメータ抽出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the affine parameter extraction process shown in FIG. 射影変換後の画像から元の画像を得るための逆変換を説明するための図である。It is a figure for demonstrating the inverse transformation for obtaining the original image from the image after projective transformation. 図8に示す画像変換処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the image conversion process shown in FIG. 図2に示す画像処理装置が切り出した画像例を示す図である。It is a figure which shows the example of an image cut out by the image processing apparatus shown in FIG. 図26(a)は、輝度ヒストグラムを示す図であり、図26(b)は、色差ヒストグラムを示す図である。FIG. 26A is a diagram illustrating a luminance histogram, and FIG. 26B is a diagram illustrating a color difference histogram. 画像鮮明化パラメータ抽出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of an image sharpening parameter extraction process. 図28(a)は、背景色が白の場合の画像鮮明化処理を示す図であり、図28(b)は、背景が黒の場合の画像鮮明化処理を示す図であり、図28(c)は、背景が白又は黒以外の場合の画像鮮明化処理を示す図である。FIG. 28A is a diagram showing image sharpening processing when the background color is white, and FIG. 28B is a diagram showing image sharpening processing when the background is black. c) is a diagram showing image sharpening processing when the background is other than white or black. カラー調整を行うための輝度変換グラフの一例を示す図である。It is a figure which shows an example of the luminance conversion graph for performing color adjustment. 背景の白色化を説明するための図である。It is a figure for demonstrating whitening of a background. 図8に示す画像鮮明化処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the image sharpening process shown in FIG. 図31に示す背景白色化処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the background whitening process shown in FIG. 図2に示す画像処理装置の機能を説明するための図である。It is a figure for demonstrating the function of the image processing apparatus shown in FIG. 図1に示す書画カメラの機能を説明するための図である。It is a figure for demonstrating the function of the document camera shown in FIG. 図2に示す画像処理装置の機能を説明するための図である。It is a figure for demonstrating the function of the image processing apparatus shown in FIG. 本発明の変形例における画像処理装置の機能を説明するための図である。It is a figure for demonstrating the function of the image processing apparatus in the modification of this invention.

符号の説明Explanation of symbols

1…書画カメラ、2…プロジェクタ、3…スクリーン、4…原稿、11…カメラ部、13…台座、201…メモリ、203…画像処理装置、204…操作部、206…CPU DESCRIPTION OF SYMBOLS 1 ... Document camera, 2 ... Projector, 3 ... Screen, 4 ... Document, 11 ... Camera part, 13 ... Base, 201 ... Memory, 203 ... Image processing apparatus, 204 ... Operation part, 206 ... CPU

Claims (9)

台座の輪郭を形成する多角形の頂点座標を格納するデータ格納手段と、
前記台座上の原稿を撮影することによって得られた画像から該原稿の輪郭を形成する多角形を検出する原稿多角形検出手段と、
前記原稿多角形検出手段により前記原稿の輪郭を形成する多角形が検出されたか否かを判別する原稿多角形検出判別手段と、
前記原稿多角形検出判別手段によって前記原稿の輪郭を形成する多角形が検出されたと判別した場合、該検出された多角形の頂点座標により指定される範囲で画像処理し、該原稿の輪郭を形成する多角形が検出されなかったと判別した場合、前記データ格納手段によって格納された頂点座標により指定される範囲で画像処理する画像処理手段と、
を備える画像処理装置。
Data storage means for storing the vertex coordinates of the polygon forming the contour of the pedestal;
A document polygon detection means for detecting the polygon forming the outline of the document from the obtained image by taking the original on the pedestal,
An original polygon detection determining means for determining whether or not a polygon forming the outline of the original is detected by the original polygon detecting means;
When it is determined that the polygon forming the document outline is detected by the document polygon detection determining means , image processing is performed within a range specified by the vertex coordinates of the detected polygon, and the document outline is formed. When it is determined that the polygon to be detected has not been detected, image processing means for image processing in a range specified by the vertex coordinates stored by the data storage means,
An image processing apparatus comprising:
前記原稿多角形検出手段は、前記画像から前記原稿の輪郭を形成する直線パラメータの候補を検出する候補検出手段と、
前記候補検出手段が検出した候補のうちから、所定の条件を満たす直線パラメータの組を検出し、該検出した直線パラメータの組によって形成される多角形を前記原稿の輪郭として取得する原稿輪郭取得手段と、を含む、
ことを特徴とする請求項1に記載の画像処理装置。
The document polygon detection means includes candidate detection means for detecting straight line parameter candidates that form the outline of the document from the image;
Document outline acquisition means for detecting a set of straight line parameters satisfying a predetermined condition from candidates detected by the candidate detection means and acquiring a polygon formed by the detected line parameter set as the outline of the original. Including,
The image processing apparatus according to claim 1.
前記原稿輪郭取得手段は、前記候補検出手段が検出した候補のうちから、略平行の2本の直線パラメータの組を検出すると共に、該検出した2本の直線パラメータと略垂直の2本の直線パラメータの組を検出し、該検出した直線パラメータの組によって形成される多角形を前記原稿の輪郭として取得する、
ことを特徴とする請求項2に記載の画像処理装置。
The document outline obtaining unit detects a set of two substantially parallel linear parameters from the candidates detected by the candidate detecting unit, and two straight lines substantially perpendicular to the detected two linear parameters. A set of parameters is detected, and a polygon formed by the detected set of straight line parameters is acquired as an outline of the document;
The image processing apparatus according to claim 2.
前記画像処理手段によって指定される範囲の頂点座標からアフィンパラメータを取得するアフィンパラメータ取得手段と、Affine parameter acquisition means for acquiring affine parameters from vertex coordinates in a range specified by the image processing means;
前記アフィンパラメータ取得手段により取得されたアフィンパラメータを用いて、前記画像に含まれる各画素の座標をアフィン変換することにより、該画像の傾きを補正して出力する画像補正手段と、Image correction means for correcting and outputting the inclination of the image by affine transformation of the coordinates of each pixel included in the image using the affine parameter acquired by the affine parameter acquisition means;
を備えることを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。The image processing apparatus according to claim 1, further comprising:
前記台座を撮影することによって得られた画像から該台座の輪郭を形成する多角形を検出する台座多角形検出手段と、
前記台座多角形検出手段により前記台座の輪郭を形成する多角形が検出されたか否かを判別する台座多角形検出判別手段と、
前記台座多角形検出判別手段によって前記台座の輪郭を形成する多角形が検出されたと判別した場合、該検出した多角形の頂点座標データを前記データ格納手段に書き込むことによって、前記台座の輪郭を形成する多角形の頂点座標データを更新するデータ更新手段と、をさらに備える、
ことを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。
A pedestal polygon detecting means for detecting a polygon that forms an outline of the pedestal from an image obtained by photographing the pedestal;
Pedestal polygon detection discriminating means for discriminating whether or not a polygon forming the outline of the pedestal has been detected by the pedestal polygon detecting means;
When it is determined that the polygon that forms the contour of the pedestal is detected by the pedestal polygon detection determining means, the vertex coordinate data of the detected polygon is written in the data storage means, thereby forming the contour of the pedestal Data updating means for updating vertex coordinate data of the polygon to be further included,
The image processing apparatus according to claim 1 , wherein the image processing apparatus is an image processing apparatus.
前記台座多角形検出手段は、前記台座を撮影することによって得られた画像のうちから、略平行の2本の直線パラメータの組を検出すると共に、該検出した2本の直線パラメータと略垂直の2本の直線パラメータの組を検出し、該検出した直線パラメータの組によって形成される多角形を前記台座の輪郭として取得する、
ことを特徴とする請求項5に記載の画像処理装置。
The pedestal polygon detecting means detects a set of two substantially parallel linear parameters from an image obtained by photographing the pedestal, and is substantially perpendicular to the detected two linear parameters. Detecting a set of two linear parameters, and obtaining a polygon formed by the detected linear parameter set as an outline of the pedestal;
The image processing apparatus according to claim 5.
台座の輪郭を形成する多角形の頂点座標を格納するデータ格納手段と、
前記台座上に載置された原稿を撮影する原稿撮影手段と、
前記原稿撮影手段による撮影により得られた画像から該原稿の輪郭を形成する多角形を検出する原稿多角形検出手段と、
前記原稿多角形検出手段により前記原稿の輪郭を形成する多角形が検出されたか否かを判別する原稿多角形検出判別手段と、
前記原稿多角形検出判別手段によって前記原稿の輪郭を形成する多角形が検出されたと判別した場合、該検出された多角形の頂点座標により指定される範囲で画像処理し、該原稿の輪郭を形成する多角形が検出されなかったと判別した場合、前記データ格納手段によって格納された頂点座標により指定される範囲で画像処理する画像処理手段と、
前記画像処理手段から出力された画像をスクリーン上に投影する画像投影手段と、
を備える撮影画像投影装置。
Data storage means for storing the vertex coordinates of the polygon forming the contour of the pedestal;
A document imaging means for photographing an original placed on the pedestal,
A document polygon detecting means for detecting a polygon forming the contour of the document from an image obtained by photographing by the document photographing means;
An original polygon detection determining means for determining whether or not a polygon forming the outline of the original is detected by the original polygon detecting means;
When it is determined that the polygon forming the document outline is detected by the document polygon detection determining means , image processing is performed within a range specified by the vertex coordinates of the detected polygon, and the document outline is formed. When it is determined that the polygon to be detected has not been detected, image processing means for image processing in a range specified by the vertex coordinates stored by the data storage means,
Image projecting means for projecting the image output from the image processing means onto a screen;
A photographic image projection apparatus comprising:
台座の輪郭を形成する多角形の頂点座標を格納するデータ格納工程と、
前記台座上の原稿を撮影することによって得られた画像から該原稿の輪郭を形成する多角形を検出する原稿多角形検出工程と、
前記原稿多角形検出工程により前記原稿の輪郭を形成する多角形が検出されたか否かを判別する原稿多角形検出判別工程と、
前記原稿多角形検出判別工程によって前記原稿の輪郭を形成する多角形が検出されたと判別した場合、該検出された多角形の頂点座標により指定される範囲で画像処理し、該原稿の輪郭を形成する多角形が検出されなかったと判別した場合、前記データ格納手段によって格納された頂点座標により指定される範囲で画像処理する画像処理工程と、
を備える画像処理方法。
A data storage step for storing the vertex coordinates of the polygon forming the outline of the pedestal;
A document polygon detection step of detecting a polygon which forms the outline of the document from the obtained image by taking the original on the pedestal,
An original polygon detection determining step for determining whether or not a polygon forming the outline of the original is detected by the original polygon detecting step;
When it is determined in the original polygon detection determination step that a polygon forming the outline of the original has been detected , image processing is performed within the range specified by the vertex coordinates of the detected polygon to form the outline of the original An image processing step of performing image processing in a range specified by the vertex coordinates stored by the data storage means,
An image processing method comprising:
コンピュータに、
台座の輪郭を形成する多角形の頂点座標を格納するデータ格納手順と、
前記台座上の原稿を撮影することによって得られた画像から該原稿の輪郭を形成する多角形を検出する原稿多角形検出手順と、
前記原稿多角形検出手順により前記原稿の輪郭を形成する多角形が検出されたか否かを判別する原稿多角形検出判別手順と、
前記原稿多角形検出判別手順によって前記原稿の輪郭を形成する多角形が検出されたと判別した場合、該検出された多角形の頂点座標により指定される範囲で画像処理し、該原稿の輪郭を形成する多角形が検出されなかったと判別した場合、前記データ格納手段によって格納された頂点座標により指定される範囲で画像処理する画像処理手順と、
を実行させるためのプログラム。
On the computer,
A data storage procedure for storing the vertex coordinates of the polygon forming the contour of the pedestal;
A document polygon detection procedure for detecting the polygon forming the outline of the document from the obtained image by taking the original on the pedestal,
A document polygon detection determination procedure for determining whether or not a polygon forming the contour of the document has been detected by the document polygon detection procedure;
When it is determined that the polygon forming the outline of the original is detected by the original polygon detection determination procedure , image processing is performed within a range specified by the vertex coordinates of the detected polygon, and the outline of the original is formed. An image processing procedure for performing image processing in a range specified by the vertex coordinates stored by the data storage means when it is determined that the polygon to be detected has not been detected ;
A program for running
JP2004081641A 2004-03-19 2004-03-19 Image processing apparatus, captured image projection apparatus, image processing method, and program Expired - Fee Related JP4225224B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004081641A JP4225224B2 (en) 2004-03-19 2004-03-19 Image processing apparatus, captured image projection apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004081641A JP4225224B2 (en) 2004-03-19 2004-03-19 Image processing apparatus, captured image projection apparatus, image processing method, and program

Publications (3)

Publication Number Publication Date
JP2005267465A JP2005267465A (en) 2005-09-29
JP2005267465A5 JP2005267465A5 (en) 2007-02-08
JP4225224B2 true JP4225224B2 (en) 2009-02-18

Family

ID=35091928

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004081641A Expired - Fee Related JP4225224B2 (en) 2004-03-19 2004-03-19 Image processing apparatus, captured image projection apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP4225224B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4835865B2 (en) * 2006-08-08 2011-12-14 富士ゼロックス株式会社 Image processing apparatus and image processing program
CN102831578B (en) * 2011-06-15 2014-12-17 富士通株式会社 Image processing method and image processing device
JP2013131801A (en) * 2011-12-20 2013-07-04 Nakabayashi Co Ltd Information terminal device, picked up image processing system, method and program, and recording medium
CN105657275A (en) * 2016-02-29 2016-06-08 宇龙计算机通信科技(深圳)有限公司 Intelligent adjustment method and device for camera shooting parameters and mobile terminal
CN106131420A (en) * 2016-07-26 2016-11-16 深圳天珑无线科技有限公司 The method and device of parameter adjustment
JP2018170667A (en) * 2017-03-30 2018-11-01 日本電気株式会社 Image processing apparatus, projector device, image reading device, image processing method, and program

Also Published As

Publication number Publication date
JP2005267465A (en) 2005-09-29

Similar Documents

Publication Publication Date Title
JP4033198B2 (en) Image processing apparatus, image projection apparatus, image processing method, and program
JP4715527B2 (en) Imaging apparatus, image processing method and program for captured image
KR100610569B1 (en) Photographing device, image processor, image-processing method of photographing device
JP4363151B2 (en) Imaging apparatus, image processing method thereof, and program
US20070091334A1 (en) Method of calculating correction data for correcting display characteristic, program for calculating correction data for correcting display characteristic and apparatus for calculating correction data for correcting display characteristic
JP2006074512A (en) Photographing device, and image processing method, and program for photographing device
JP2005267457A (en) Image processing device, imaging apparatus, image processing method and program
US20190018220A1 (en) Projector and focus adjustment method
JP4238749B2 (en) Image processing apparatus, image projection apparatus, image processing method, and program
JP4501701B2 (en) Image capturing apparatus, image processing method for image capturing apparatus, and program
JP4225224B2 (en) Image processing apparatus, captured image projection apparatus, image processing method, and program
JP4182937B2 (en) Image capturing apparatus, image processing method for image capturing apparatus, and program
JP4600019B2 (en) Imaging apparatus, image processing method, and program
JP4363154B2 (en) Imaging apparatus, image processing method thereof, and program
JP4363152B2 (en) Captured image projection device, image processing method and program for captured image projection device
JP4561302B2 (en) Image capturing apparatus, image processing method for image capturing apparatus, and program
JP2005079731A (en) Photographed picture projection device, picture processing method therefor and program
JP4524616B2 (en) Imaging apparatus, image processing method and program for captured image
JP4305229B2 (en) Image processing apparatus, image projection apparatus, image processing method, and program
JP4591343B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP4314959B2 (en) Image capturing apparatus, method for determining object to be imaged in image capturing apparatus, and program
JP4225225B2 (en) Image capturing apparatus, image processing method for image capturing apparatus, and program
JP4225226B2 (en) Imaging apparatus, imaging control method for imaging apparatus, and program
JP2007214857A (en) Photographing device, and photographed 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: 20061215

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080801

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080805

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081006

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: 20081104

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081117

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111205

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4225224

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111205

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121205

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121205

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131205

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees