JP4952380B2 - Imaging apparatus and computer program therefor - Google Patents

Imaging apparatus and computer program therefor Download PDF

Info

Publication number
JP4952380B2
JP4952380B2 JP2007143649A JP2007143649A JP4952380B2 JP 4952380 B2 JP4952380 B2 JP 4952380B2 JP 2007143649 A JP2007143649 A JP 2007143649A JP 2007143649 A JP2007143649 A JP 2007143649A JP 4952380 B2 JP4952380 B2 JP 4952380B2
Authority
JP
Japan
Prior art keywords
image
digits
document
value
affine
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
JP2007143649A
Other languages
Japanese (ja)
Other versions
JP2008299510A (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 JP2007143649A priority Critical patent/JP4952380B2/en
Publication of JP2008299510A publication Critical patent/JP2008299510A/en
Application granted granted Critical
Publication of JP4952380B2 publication Critical patent/JP4952380B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Description

本発明は、原稿台に載置された原稿を原稿台と共に撮影し、プロジェクタを用いてスクリーン上に原稿画像を投影する撮影装置及びそのコンピュータプログラムに関する。   The present invention relates to a photographing apparatus for photographing a document placed on a document table together with the document table and projecting a document image on a screen using a projector, and a computer program therefor.

従来より、原稿台に載置された原稿を原稿台と共に撮影し、プロジェクタを用いてスクリーン上に原稿画像を投影する撮影装置が知られている。このような撮影装置の中には、原稿が原稿台上に斜めに載置された場合、原稿を正面から見た画像(以下、補正画像と表記)になるように原稿画像に対し補正を行う機能を有するものがある(特許文献1参照)。具体的には、この撮影装置は、始めに、原稿形状が長方形であり、原稿形状の情報を取得できることを前提として、原稿画像の輪郭を抽出し、原稿画像の輪郭と予め定義された補正画像の形状の対応関係からアフィン変換用のパラメータを計算する。   2. Description of the Related Art Conventionally, there has been known a photographing apparatus that photographs a document placed on a document table together with the document table and projects a document image on a screen using a projector. In such a photographing apparatus, when a document is placed obliquely on a document table, the document image is corrected so that an image of the document viewed from the front (hereinafter referred to as a corrected image) is obtained. Some have a function (see Patent Document 1). Specifically, this photographing apparatus first extracts the contour of the document image on the assumption that the document shape is rectangular and the information on the document shape can be acquired, and the contour of the document image and a predefined correction image The parameters for the affine transformation are calculated from the correspondence between the shapes of the two.

次に撮影装置は、アフィン変換用のパラメータからアフィン逆変換用のパラメータを計算し、アフィン逆変換用のパラメータを用いて補正画像を構成する各画素の座標をアフィン逆変換することにより、補正画像を構成する各画素が原稿画像のどの位置に対応するのかを計算する。そして撮影装置は、補正画像の画素と原稿画像の画素の位置関係に基づいて、補正画像を構成する各画素の値を原稿画像を構成する各画素の値から補間演算し、補間演算された画素値を補正画像の画像データとして表示出力する。
特開2006−115334号公報
Next, the imaging device calculates a parameter for affine inverse transformation from the parameters for affine transformation, and affine inversely transforms the coordinates of each pixel constituting the correction image using the parameters for affine inverse transformation. To which position of the original image corresponds to each pixel that constitutes. Then, the photographing apparatus interpolates the value of each pixel constituting the corrected image from the value of each pixel constituting the document image based on the positional relationship between the pixel of the corrected image and the pixel of the document image, and the pixel subjected to the interpolation calculation The value is displayed and output as image data of a corrected image.
JP 2006-115334 A

補正画像を構成する各画素の座標値(整数値)は、原稿画像が傾いているために原稿画像を構成する各画素の間の座標値(非整数値)となる(図4(a),(b)参照)。このため従来の撮影装置は、浮動小数点演算により補間演算を行っており、浮動小数点演算を行うための専用の装置を有さない安価なプロセッサにより補間演算を行うことは困難であった。   The coordinate value (integer value) of each pixel constituting the corrected image becomes a coordinate value (non-integer value) between each pixel constituting the original image because the original image is inclined (FIG. 4A). (See (b)). For this reason, the conventional photographing apparatus performs the interpolation calculation by the floating point calculation, and it is difficult to perform the interpolation calculation by an inexpensive processor that does not have a dedicated device for performing the floating point calculation.

このような問題を解決するために固定小数点演算により補間演算を行う方法が考えられる。ところが固定小数点演算により補間演算を行う場合には、補間のための分解能に相当する分だけ桁数を下位に増やす(ビットシフトする)必要があるために、アフィン逆変換の際の桁数が割算器の桁数を超え、補間演算が破綻することがある。   In order to solve such a problem, a method of performing an interpolation operation by a fixed-point operation can be considered. However, when performing an interpolation operation by fixed-point arithmetic, it is necessary to increase the number of digits to the lower side (bit shift) by an amount corresponding to the resolution for interpolation. Interpolation may fail due to exceeding the number of digits of the calculator.

また補間演算が破綻することを補償するために種々の処理を行うようにした場合には、処理速度が低下する。さらに補間演算が破綻することを回避するためにビットシフトの桁数を少なくした場合には、補間精度(補間分解能)が落ち、補正画像の画質が損なわれる。   Further, when various processes are performed in order to compensate for the failure of the interpolation calculation, the processing speed decreases. Furthermore, when the number of digits of the bit shift is reduced in order to avoid the failure of the interpolation calculation, the interpolation accuracy (interpolation resolution) is lowered and the image quality of the corrected image is impaired.

本発明は、上記課題を解決するためになされたものであり、その目的は、固定小数点演算により補間演算を実行する際、処理速度を低下させない範囲で最大の補間分解能を得ることが可能な撮影装置及びそのコンピュータプログラムを提供することにある。   The present invention has been made in order to solve the above-described problems, and an object of the present invention is to obtain a maximum interpolation resolution within a range that does not reduce the processing speed when performing an interpolation operation by a fixed-point operation. It is to provide an apparatus and a computer program thereof.

本発明の第1の態様に係る撮影装置は、原稿を撮影する撮影部と、前記撮影部により撮影された撮影画像から前記原稿に対応する原稿画像を取得し、当該原稿画像の形状をアフィン変換により補正して補正画像を生成し、前記アフィン変換の逆変換により補正画像を構成する各画素の値を前記原稿画像を構成する各画素の値から補間演算する画像処理部と、前記画像処理部により補間演算された画素値にしたがって補正画像を出力する出力部とを備え、前記画像処理部は、所定桁数の割算器を備え、前記補間演算を実行する際、前記割算器の桁数から前記アフィン逆変換を行なったの前記補正画像の最大座標値により求められる桁数を引いた値をシフト桁数とし、前記シフト桁数の分だけアフィン逆変換の固定小数点部の桁数をシフトして、前記シフト桁数の値が大きい程に精度が向上する補間演算の分解能を決定する。 A photographing apparatus according to a first aspect of the present invention acquires a document image corresponding to the document from a photographing unit that photographs a document, and a photographed image photographed by the photographing unit, and affine transforms the shape of the document image It is corrected to generate a corrected image by the image processing unit for interpolation calculation from the values of each pixel value of each pixel constituting the corrected image by inverse transformation of the affine transformation constituting the original image, the image processing unit and an output unit for outputting the corrected image according to interpolation calculation pixel value by the image processing unit includes a predetermined number of digits divider, when performing the interpolation operation, the digit of the divider The value obtained by subtracting the number of digits obtained from the maximum coordinate value of the corrected image when performing the affine inverse transformation from the number is used as the number of shift digits, and the number of digits of the fixed-point part of the affine inverse transformation by the amount of the shift digits Shift Determines the resolution of the interpolation calculation accuracy is improved enough value of the shift digits is large.

本発明の第1の態様に係る撮影装置のコンピュータプログラムは、原稿を撮影する処理と、撮影された撮影画像から前記原稿に対応する原稿画像を取得する処理と、前記原稿画像の形状をアフィン変換により補正して補正画像を生成する処理と、割算器の桁数からアフィン逆変換の際の前記補正画像の最大座標値により求められる桁数を引くことで算出されるシフト桁数の分だけ前記アフィン逆変換の固定小数点部の桁数をシフトして、前記シフト桁数の値が大きい程に精度が向上する補間演算の分解能を決定する処理と、決定した分解能で前記アフィン逆変換により当該補正画像を構成する各画素の値を原稿画像を構成する各画素の値から補間演算する処理と、補間演算された画素値にしたがって前記補正画像を出力する処理とをコンピュータに実行させる。 The computer program of the photographing apparatus according to the first aspect of the present invention includes a process for photographing a document, a process for obtaining a document image corresponding to the document from the photographed photographed image, and an affine transformation of the shape of the document image The process of generating a corrected image by correcting by the amount of shift digits calculated by subtracting the number of digits determined by the maximum coordinate value of the corrected image at the time of affine inverse transformation from the number of digits of the divider wherein by shifting the digits of the fixed-point part of the affine inverse transformation, a process of determining the resolution of the interpolation computation accuracy enough value of the shift digits is large is improved, by the affine inverse transformation at the determined resolution a process of interpolation calculation from the values of each pixel constituting the value an original image of the pixels constituting the corrected image, and processing for outputting the corrected image according to interpolation calculation pixel value computing To be executed by the data.

本発明に係る撮影装置及びそのコンピュータプログラムによれば、固定小数点演算により補間演算を実行する際、割算器の桁数と変換の逆変換の際に必要となる桁数の差分、又は出力部の出力画像サイズに応じて、補間分解能を決定するので、処理速度を低下させない範囲で最大の補間分解能を得ることができる。   According to the imaging device and the computer program thereof according to the present invention, when performing interpolation calculation by fixed-point calculation, the difference between the number of digits of the divider and the number of digits required for the inverse conversion of the conversion, or the output unit Since the interpolation resolution is determined according to the output image size, the maximum interpolation resolution can be obtained within a range in which the processing speed is not reduced.

以下、本発明の一実施形態となる撮影装置の構成について詳しく説明する。   Hereinafter, the configuration of the photographing apparatus according to an embodiment of the present invention will be described in detail.

〔撮影装置の構成〕
始めに、図1乃至図3を参照して、本発明の一実施形態となる撮影装置の構成について説明する。
[Configuration of the imaging device]
First, the configuration of a photographing apparatus according to an embodiment of the present invention will be described with reference to FIGS. 1 to 3.

本発明の一実施形態となる撮影装置は、図1に示すように、書画カメラ1と、ビデオ映像ケーブル2を介して書画カメラ1に電気的に接続されたプロジェクタ3とを主な構成要素として備える。書画カメラ1は、撮影対象を撮影するためのカメラシステムであり、カメラ部4,カメラ部4が取り付けられる支柱5,及び原稿6が載置される原稿台7を備える。プロジェクタ3は、カメラ部4から供給されるRGB信号を投影光に変換し、投影光をスクリーン8に照射することにより、書画カメラ1により撮影された撮影対象の画像(出力画像)をスクリーン8上に結像させる。   As shown in FIG. 1, a photographing apparatus according to an embodiment of the present invention includes a document camera 1 and a projector 3 electrically connected to the document camera 1 through a video image cable 2 as main components. Prepare. The document camera 1 is a camera system for photographing an object to be photographed, and includes a camera unit 4, a column 5 to which the camera unit 4 is attached, and a document table 7 on which a document 6 is placed. The projector 3 converts the RGB signal supplied from the camera unit 4 into projection light, and irradiates the screen 8 with the projection light, whereby an image (output image) to be photographed by the document camera 1 is displayed on the screen 8. To form an image.

カメラ部4は、図2に示すように、画像データ生成部11とデータ処理部12を備える。画像データ生成部11は、光学レンズ装置13とイメージセンサ14を備え、撮影対象の画像データを取り込む。光学レンズ装置13は、原稿6を撮影するために光を集光するレンズ等で構成され、焦点,露出,ホワイトバランス等のカメラ設定パラメータを調整するための周辺回路を備える。イメージセンサ14は、CCD等により構成され、光学レンズ装置13が光を集光することによって結像した画像をデジタル化して画像データとして取り込む。   As shown in FIG. 2, the camera unit 4 includes an image data generation unit 11 and a data processing unit 12. The image data generation unit 11 includes an optical lens device 13 and an image sensor 14 and captures image data to be photographed. The optical lens device 13 includes a lens that collects light for photographing the document 6, and includes peripheral circuits for adjusting camera setting parameters such as focus, exposure, and white balance. The image sensor 14 is constituted by a CCD or the like, and digitizes an image formed by the optical lens device 13 condensing light and takes it as image data.

画像データ生成部11は、高解像度画像撮影と低解像度画像撮影が可能なように構成されている。低解像度画像撮影とは、例えば画像解像度がXGA(1024×768ドット)程度での撮影である。低解像度画像撮影によれば、解像度は低いものの、画像を30fps(フレーム/秒)の速さで動画撮影と画像読み出しが可能になる。一方、高解像度画像撮影とは、撮影可能な最大の画素数、例えば400万画素(2304×1728)のカメラである場合はその400万画素での画像撮影である。高解像度画像撮影によれば、画像データの読み取りは遅くなるものの、低解像度画像撮影と比較して解像度の高い画像を得ることができる。   The image data generation unit 11 is configured to be able to capture a high resolution image and a low resolution image. The low-resolution image shooting is, for example, shooting with an image resolution of about XGA (1024 × 768 dots). According to the low-resolution image shooting, although the resolution is low, moving image shooting and image reading can be performed at a speed of 30 fps (frame / second). On the other hand, high-resolution image capturing is image capturing with a maximum number of pixels that can be captured, for example, 4 million pixels (2304 × 1728). According to high-resolution image capturing, although reading of image data is delayed, an image with a higher resolution can be obtained as compared with low-resolution image capturing.

データ処理部12は、メモリ15,ビデオ出力装置16,画像処理装置17,操作部18,プログラムコード記憶装置19,及びCPU20を備え、画像データ生成部11から取得した画像データに対しプロジェクタ3に出力するための画像処理を行う。メモリ15は、図3に示すように、センサ画像記憶領域21a,21bと、処理画像記憶領域22と、表示画像記憶領域23と、作業データ記憶領域24と、閾値記憶領域25とを有し、画像データ,各種フラグの値,閾値等を記憶する。   The data processing unit 12 includes a memory 15, a video output device 16, an image processing device 17, an operation unit 18, a program code storage device 19, and a CPU 20, and outputs image data acquired from the image data generation unit 11 to the projector 3. Image processing is performed. As shown in FIG. 3, the memory 15 includes sensor image storage areas 21a and 21b, a processed image storage area 22, a display image storage area 23, a work data storage area 24, and a threshold storage area 25. Image data, various flag values, threshold values, etc. are stored.

センサ画像記憶領域21a,21bは、イメージセンサ14が取り込んだ画像データを撮影する毎に交互に一時記憶するための領域である。イメージセンサ14は画像データをセンサ画像記憶領域21a,21bに交互に記憶し、画像処理装置17とCPU20は一時記憶された画像データをセンサ画像記憶領域21a,21bから交互に読み出す。処理画像記憶領域22は、画像処理装置17が処理に必要な画像データを書き込むための領域である。作業データ記憶領域24は、座標データや各種フラグを記憶するための領域である。閾値記憶領域25は、各種判定に用いる閾値を記憶するための領域である。   The sensor image storage areas 21a and 21b are areas for temporarily storing the image data captured by the image sensor 14 alternately every time the image data is captured. The image sensor 14 alternately stores image data in the sensor image storage areas 21a and 21b, and the image processing device 17 and the CPU 20 alternately read the temporarily stored image data from the sensor image storage areas 21a and 21b. The processed image storage area 22 is an area for the image processing apparatus 17 to write image data necessary for processing. The work data storage area 24 is an area for storing coordinate data and various flags. The threshold storage area 25 is an area for storing a threshold used for various determinations.

ビデオ出力装置16は、メモリ15の表示画像記憶領域23に記憶された画像データに基づいてRGB信号を生成し、生成したRGB信号をプロジェクタ3に出力する。画像処理装置17は、CPU20に制御されて、メモリ15のセンサ画像記憶領域21a,21bに一時記憶された画像データに対し画像処理を行う。操作部18は、図示しないが、電源スイッチ,拡大キー,縮小キー,左移動キー,右移動キー,上移動キー,下移動キー,補正有効スイッチ等を備え、ユーザの操作情報を取得する。プログラムコード記憶装置19は、ROM等の記憶装置により構成され、CPU20が実行するコンピュータプログラムを格納する。CPU20は、桁数Hの割算器を備え、プログラムコード記憶装置19に格納されているコンピュータプログラムに従って各部を制御する。   The video output device 16 generates an RGB signal based on the image data stored in the display image storage area 23 of the memory 15 and outputs the generated RGB signal to the projector 3. The image processing device 17 is controlled by the CPU 20 to perform image processing on the image data temporarily stored in the sensor image storage areas 21 a and 21 b of the memory 15. Although not shown, the operation unit 18 includes a power switch, an enlargement key, a reduction key, a left movement key, a right movement key, an up movement key, a down movement key, a correction valid switch, and the like, and acquires user operation information. The program code storage device 19 is configured by a storage device such as a ROM, and stores a computer program executed by the CPU 20. The CPU 20 includes a H-number divider and controls each unit according to a computer program stored in the program code storage device 19.

〔補正処理〕
このような構成を有する撮影装置は、原稿台7上に原稿6が斜めに載置された場合、具体的には操作部18の補正有効スイッチが有効に設定されている場合、以下に示す補正処理を実行することにより、出力画像が原稿6を正面から見た画像(以下、補正画像と表記)になるように原稿画像に対し画像処理を行う。以下図5に示すフローチャートを参照して、この補正処理を実行する際の撮影装置の動作について説明する。
[Correction process]
In the photographing apparatus having such a configuration, when the document 6 is placed obliquely on the document table 7, specifically, when the correction valid switch of the operation unit 18 is set to be effective, the following correction is performed. By executing the processing, image processing is performed on the document image so that the output image is an image obtained when the document 6 is viewed from the front (hereinafter referred to as a corrected image). Hereinafter, with reference to the flowchart shown in FIG. 5, the operation of the photographing apparatus when executing the correction process will be described.

図5に示すフローチャートは、ユーザが操作部18を操作することにより原稿画像の撮影開始を指示したタイミングで開始となり、補正処理はステップS1の処理に進む。なお以下に示す各部の動作は、CPU20がプログラムコード記憶装置19内に記憶されているコンピュータプログラムを読み出し、コンピュータプログラムにしたがって各部を制御することにより実現される。   The flowchart shown in FIG. 5 starts at the timing when the user instructs to start photographing the original image by operating the operation unit 18, and the correction process proceeds to step S1. The operation of each unit described below is realized by the CPU 20 reading a computer program stored in the program code storage device 19 and controlling each unit according to the computer program.

ステップS1の処理では、CPU20が、ビデオ映像ケーブル2を介してカメラ部4に接続されているプロジェクタ3を検出する。これにより、ステップS1の処理は完了し、補正処理はステップS2の処理に進む。   In the process of step S <b> 1, the CPU 20 detects the projector 3 connected to the camera unit 4 via the video image cable 2. Thereby, the process of step S1 is completed and a correction process progresses to the process of step S2.

ステップS2の処理では、CPU20が、ステップS1の処理により検出されたプロジェクタ3において設定されている出力画像のサイズ(例えばVGA,XGA,UXGA等)を検出する。これにより、ステップS2の処理は完了し、補正処理はステップS3の処理に進む。   In the process of step S2, the CPU 20 detects the size (for example, VGA, XGA, UXGA, etc.) of the output image set in the projector 3 detected by the process of step S1. Thereby, the process of step S2 is completed and the correction process proceeds to the process of step S3.

ステップS3の処理では、CPU20が、光学レンズ装置13とイメージセンサ14を制御することにより、原稿台7の上に載置されている原稿6の画像を原稿台6と共に撮影し、撮影画像のデータをセンサ画像記憶領域21a又はセンサ画像記憶領域21bに記憶する。なお図6に示すように、原稿台7の上に載置されている原稿6の画像を撮影することにより得られる撮影画像Rには、原稿6に対応する原稿画像領域R1と原稿台7表面に対応する画像領域(原稿画像領域R1以外の領域)が含まれる。これにより、ステップS3の処理は完了し、補正処理はステップS4の処理に進む。   In step S3, the CPU 20 controls the optical lens device 13 and the image sensor 14 to photograph the image of the document 6 placed on the document table 7 together with the document table 6, and the captured image data. Are stored in the sensor image storage area 21a or the sensor image storage area 21b. As shown in FIG. 6, the photographed image R obtained by photographing the image of the document 6 placed on the document table 7 includes a document image region R1 corresponding to the document 6 and the surface of the document table 7. Is included (an area other than the document image area R1). Thereby, the process of step S3 is completed and a correction process progresses to the process of step S4.

ステップS4の処理では、画像処理装置17が、センサ画像記憶領域21a又はセンサ画像記憶領域21bに記憶されている撮影画像のデータを処理画像記憶領域22に読み出す。そして画像処理装置17は、公知のエッジ検出技術を利用して、図7に示すように原稿画像領域R1の輪郭に対応するエッジ画像Eを抽出し、抽出されたエッジ画像Eのデータを作業データ記憶領域24に記憶する。なおエッジ検出技術は本願発明の出願時点で既に公知の技術であるのでその詳細な説明は省略するが、例えばRobertsフィルタと呼ばれるエッジ検出用のフィルタを利用するとよい。これにより、ステップS4の処理は完了し、補正処理はステップS5の処理に進む。   In the process of step S4, the image processing device 17 reads the captured image data stored in the sensor image storage area 21a or the sensor image storage area 21b into the processed image storage area 22. Then, the image processing device 17 uses a known edge detection technique to extract an edge image E corresponding to the contour of the document image region R1 as shown in FIG. 7, and the extracted edge image E data is used as work data. Store in the storage area 24. The edge detection technique is already known at the time of filing of the present invention, and thus detailed description thereof is omitted. For example, an edge detection filter called a Roberts filter may be used. Thereby, the process of step S4 is completed and the correction process proceeds to the process of step S5.

ステップS5の処理では、CPU20が、作業データ記憶領域24に記憶されているエッジ画像Eのデータとプロジェクタ3の出力画像(補正画像)の形状の対応関係を利用して、以下の数式1に示すような原稿画像(XYZ座標系,座標値(x,y,z))を補正画像(UVW座標系,座標値(u,v,1)にアフィン変換するためのアフィン変換用パラメータ(以下、アフィン係数と表記)Aを計算し、計算されたアフィン係数Aのデータを作業データ記憶領域24に記憶する。なお本実施形態では、補正画像の座標値はw座標値により規格化されている。またアフィン係数Aの計算方法は本願発明の出願時点で既に公知の技術であるのでその詳細な説明は省略する。これにより、ステップS5の処理は完了し、補正処理はステップS6の処理に進む。

Figure 0004952380
In the process of step S5, the CPU 20 uses the correspondence relationship between the data of the edge image E stored in the work data storage area 24 and the shape of the output image (corrected image) of the projector 3 as shown in the following formula 1. Such an affine transformation parameter (hereinafter referred to as affine transformation) for affine transformation of an original image (XYZ coordinate system, coordinate values (x, y, z)) into a corrected image (UVW coordinate system, coordinate values (u, v, 1)). (Denoted as a coefficient) A is calculated, and the data of the calculated affine coefficient A is stored in the work data storage area 24. In this embodiment, the coordinate value of the corrected image is normalized by the w coordinate value. Since the calculation method of the affine coefficient A is a well-known technique at the time of the filing of the present invention, detailed description thereof will be omitted. Proceeds to the process.
Figure 0004952380

ステップS6の処理では、CPU20が、作業データ記憶領域24に記憶されているエッジ画像Eのデータを利用して原稿画像のアスペクト比(y/x)を算出する。そしてCPU20は、原稿画像のアスペクト比とステップS2の処理により検出された出力画像のサイズを参照して原稿画像をアフィン変換することにより得られる補正画像の最大座標値(um,vm)(図8参照)を計算する。これにより、ステップS6の処理は完了し、補正処理はステップS7の処理に進む。   In the process of step S <b> 6, the CPU 20 calculates the aspect ratio (y / x) of the document image using the edge image E data stored in the work data storage area 24. Then, the CPU 20 refers to the aspect ratio of the document image and the size of the output image detected by the process in step S2, and the maximum coordinate value (um, vm) of the corrected image obtained by affine transformation of the document image (FIG. 8). ). Thereby, the process of step S6 is completed and a correction process progresses to the process of step S7.

ステップS7の処理では、CPU20が、作業データ記憶領域24からアフィン係数Aのデータを読み出し、読み出されたアフィン係数Aを利用して以下の数式2,3に示すような補正画像を原稿画像にアフィン逆変換するためのアフィン逆変換パラメータA−1を計算する。そしてCPU20は、計算されたアフィン逆変換パラメータA−1を利用して以下の数式4に示されるアフィン逆変換を行った際の最大座標値(um,vm)の桁数(Nx,Ny)を計算する。これにより、ステップS7の処理は完了し、補正処理はステップS8の処理に進む。

Figure 0004952380
Figure 0004952380
Figure 0004952380
In the process of step S7, the CPU 20 reads the data of the affine coefficient A from the work data storage area 24, and uses the read affine coefficient A as a correction image as shown in the following equations 2 and 3 as a document image. An affine inverse transformation parameter A- 1 for affine inverse transformation is calculated. Then, the CPU 20 calculates the number of digits (Nx, Ny) of the maximum coordinate value (um, vm) when the affine inverse transformation represented by the following formula 4 is performed using the calculated affine inverse transformation parameter A- 1. calculate. Thereby, the process of step S7 is completed, and the correction process proceeds to the process of step S8.
Figure 0004952380
Figure 0004952380
Figure 0004952380

ステップS8の処理では、CPU20が、ステップS7の処理により計算された桁数(Nx,Ny)を以下の数式5に代入することにより、アフィン逆変換を行う際の固定小数点部のシフト桁数Pとして、割算器の桁数HとステップS7の処理により計算された桁数(Nx,Ny)の最大値Max[Nx,Ny]の差分値を計算する。これにより、ステップS8の処理は完了し、補正処理はステップS9の処理に進む。

Figure 0004952380
In the process of step S8, the CPU 20 substitutes the number of digits (Nx, Ny) calculated in the process of step S7 into the following formula 5 to thereby shift the number of shift digits P of the fixed-point part when performing the affine inverse transformation. As described above, a difference value between the maximum value Max [Nx, Ny] of the number of digits H of the divider and the number of digits (Nx, Ny) calculated by the process of step S7 is calculated. Thereby, the process of step S8 is completed, and the correction process proceeds to the process of step S9.
Figure 0004952380

ステップSの処理では、CPU20が、以下の数式6に示すように、ステップS8の処理により計算されたシフト桁数Pだけアフィン逆変換の固定小数点部 (数式4参照)の桁数をシフトする。このシフト桁数Pは、補間分解能に相当し、値が大きい程、補間処理の精度が向上し、補正画像の画質を向上させることが できる。これにより、ステップS9の処理は完了し、補正処理はステップS10の処理に進む。

Figure 0004952380
In the process of step S 9, CPU 20, as shown in Equation 6 below, shifts the digits of the fixed-point portion of the shift digits P only affine inverse transform calculated by the processing in step S8 (see Equation 4) . This shift digit number P corresponds to the interpolation resolution, and the larger the value, the higher the accuracy of the interpolation process and the higher the quality of the corrected image. Thereby, the process of step S9 is completed and the correction process proceeds to the process of step S10.
Figure 0004952380

ステップS10の処理では、CPU20が、数式6を利用して補正画像を構成する各画素が原稿画像のどの位置に対応するのかを計算し、補正画像を構成する各画素の値を原稿画像を構成する各画素の値から補間演算する。そしてCPU20は、補間演算された補正画像の各画素の値を表示画像記憶領域23に記憶する。これにより、ステップS10の処理は完了し、補正処理はステップS11の処理に進む。   In the process of step S10, the CPU 20 calculates the position of each pixel constituting the corrected image corresponding to the position of the original image using Equation 6 and configures the original image with the value of each pixel constituting the corrected image. Interpolation is performed from the value of each pixel. Then, the CPU 20 stores the value of each pixel of the corrected image subjected to the interpolation calculation in the display image storage area 23. Thereby, the process of step S10 is completed, and the correction process proceeds to the process of step S11.

ステップS11の処理では、ビデオ出力装置16が、表示画像記憶領域23に記憶されている補正画像の画素値にしたがってRGB信号を生成し、生成されたRGB信号をプロジェクタ3に出力する。プロジェクタ3は、RGB信号を投影光に変換し、投影光をスクリーン8に照射することにより、スクリーン8上に補正画像を結像させる。これにより、ステップS11の処理は完了し、補正処理はステップS12の処理に進む。   In the process of step S <b> 11, the video output device 16 generates an RGB signal according to the pixel value of the corrected image stored in the display image storage area 23, and outputs the generated RGB signal to the projector 3. The projector 3 converts the RGB signals into projection light and irradiates the projection light on the screen 8 to form a corrected image on the screen 8. Thereby, the process of step S11 is completed and a correction process progresses to the process of step S12.

ステップS12の処理では、CPU20が、ユーザが操作部18を操作することにより原稿画像の撮影終了を指示したか否かを判別する。そして判別の結果、ユーザが原稿画像の撮影終了を指示した場合、CPU20は一連の補正処理を終了する。一方、ユーザが原稿画像の撮影終了を指示していない場合には、CPU20は補正処理をステップS3の処理に戻す。なおCPU20は、ステップS3〜ステップS12の処理が一定のフレームレートで繰り返し実行されるように各処理を制御する。   In the process of step S <b> 12, the CPU 20 determines whether or not the user has instructed the end of photographing of the document image by operating the operation unit 18. As a result of the determination, when the user instructs the end of photographing of the document image, the CPU 20 ends a series of correction processes. On the other hand, when the user has not instructed the end of photographing of the document image, the CPU 20 returns the correction process to the process of step S3. The CPU 20 controls each process so that the processes in steps S3 to S12 are repeatedly executed at a constant frame rate.

以上の説明から明らかなように、本発明の一実施形態となる撮影装置では、補間演算を実行する際、CPU20が、割算器の桁数Hとアフィン逆変換を行った際の補正画像の最大座標値(um,vm)の桁数(Nx,Ny)の差分値Pを算出し、算出された差分値Pだけアフィン逆変換の固定小数点部の桁数をシフトする。すなわち、本発明の一実施形態となる撮影装置では、CPU20が、割算器の桁数Hを超えない範囲でアフィン逆変換の固定小数点部の桁数をシフトする。   As is clear from the above description, in the imaging apparatus according to an embodiment of the present invention, when performing the interpolation calculation, the CPU 20 performs the affine inverse conversion with the number of digits H of the divider. The difference value P of the number of digits (Nx, Ny) of the maximum coordinate value (um, vm) is calculated, and the number of digits in the fixed-point part of the affine inverse transformation is shifted by the calculated difference value P. That is, in the photographing apparatus according to the embodiment of the present invention, the CPU 20 shifts the number of digits of the fixed-point part of the affine inverse transformation within a range not exceeding the number of digits H of the divider.

このような撮影装置の構成によれば、アフィン逆変換の際の桁数が割算器の桁数を超えることがないので、補間演算が破綻することを防止できる。また補間演算が破綻することを補償するために種々の処理を行う必要がなくなるので、処理速度の低下を抑制できる。また処理速度を低下させない範囲で最大の補間分解能を得ることができるので。補間分解能が落ち、補正画像の画質が損なわれることを防止できる。   According to such a configuration of the photographing apparatus, since the number of digits in the affine inverse transformation does not exceed the number of digits of the divider, the interpolation calculation can be prevented from failing. In addition, since it is not necessary to perform various processes to compensate for the failure of the interpolation calculation, it is possible to suppress a decrease in processing speed. In addition, the maximum interpolation resolution can be obtained within a range that does not reduce the processing speed. It is possible to prevent the interpolation resolution from deteriorating and the image quality of the corrected image from being impaired.

以上、本発明者によってなされた発明を適用した実施の形態について説明したが、この実施の形態による本発明の開示の一部をなす論述及び図面により本発明は限定されることはない。このように、上記実施の形態に基づいて当業者等によりなされる他の実施の形態、実施例及び運用技術等は全て本発明の範疇に含まれることは勿論であることを付け加えておく。   As mentioned above, although the embodiment to which the invention made by the present inventor is applied has been described, the present invention is not limited by the description and the drawings that form part of the disclosure of the present invention according to this embodiment. As described above, it is a matter of course that all other embodiments, examples, operation techniques, and the like made by those skilled in the art based on the above embodiments are included in the scope of the present invention.

本発明は、原稿台に載置された原稿をカメラで撮影し、撮影された原稿画像をプロジェクタを用いてスクリーン上に投影する撮影装置に適用することができる。   The present invention can be applied to a photographing apparatus that photographs a document placed on a document table with a camera and projects the photographed document image on a screen using a projector.

本発明の一実施形態となる撮影装置の構成を示す模式図である。It is a schematic diagram which shows the structure of the imaging device which becomes one Embodiment of this invention. 図1に示す書画カメラの内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the document camera shown in FIG. 図1に示すメモリの内部構成を示すブロック図である。FIG. 2 is a block diagram showing an internal configuration of a memory shown in FIG. 1. 補正画像をアフィン逆変換した際の補正画像の画素と原稿画像の画素の位置関係を示す模式図である。FIG. 6 is a schematic diagram illustrating a positional relationship between a pixel of a corrected image and a pixel of an original image when affine inverse transformation is performed on the corrected image. 本発明の一実施形態となる補正処理の流れを示すフローチャート図である。It is a flowchart figure which shows the flow of the correction process used as one Embodiment of this invention. 書画カメラにより撮影される画像の一例を示す模式図である。It is a schematic diagram which shows an example of the image image | photographed with a document camera. 図6に示す撮影画像から抽出されるエッジ画像の一例を示す模式図である。It is a schematic diagram which shows an example of the edge image extracted from the picked-up image shown in FIG. アフィン逆変換を説明するための原稿画像と補正画像の対応関係を示す模式図である。FIG. 5 is a schematic diagram illustrating a correspondence relationship between a document image and a corrected image for explaining affine inverse transformation.

符号の説明Explanation of symbols

1:書画カメラ
2:ビデオ映像ケーブル
3:プロジェクタ
4:カメラ部
5:支柱
6:原稿
7:原稿台
8:スクリーン
11:画像データ生成部
12:データ処理部
13:光学レンズ装置
14:イメージセンサ
15:メモリ
16:ビデオ出力装置
17:画像処理装置
18:操作部
19:プログラムコード記憶装置
20:CPU
21a,21b:センサ画像記憶領域
22:処理画像記憶領域
23:表示画像記憶領域
24:作業データ記憶領域
25:閾値記憶領域
1: Document Camera 2: Video Video Cable 3: Projector 4: Camera Unit 5: Column 6: Document 7: Document Table 8: Screen 11: Image Data Generation Unit 12: Data Processing Unit 13: Optical Lens Device 14: Image Sensor 15 : Memory 16: Video output device 17: Image processing device 18: Operation unit 19: Program code storage device 20: CPU
21a, 21b: Sensor image storage area 22: Processed image storage area 23: Display image storage area 24: Work data storage area 25: Threshold storage area

Claims (4)

原稿を撮影する撮影部と、
前記撮影部により撮影された撮影画像から前記原稿に対応する原稿画像を取得し、当該原稿画像の形状をアフィン変換により補正して補正画像を生成し、前記アフィン変換の逆変換により補正画像を構成する各画素の値を前記原稿画像を構成する各画素の値から補間演算する画像処理部と、
前記画像処理部により補間演算された画素値にしたがって補正画像を出力する出力部とを備え、
前記画像処理部は、所定桁数の割算器を備え、前記補間演算を実行する際、前記割算器の桁数から前記アフィン逆変換を行なったの前記補正画像の最大座標値により求められる桁数を引いた値をシフト桁数とし、前記シフト桁数の分だけアフィン逆変換の固定小数点部の桁数をシフトして、前記シフト桁数の値が大きい程に精度が向上する補間演算の分解能を決定することを特徴とする撮影装置。
A shooting section for shooting a document;
A document image corresponding to the document is acquired from a photographed image photographed by the photographing unit, a corrected image is generated by correcting the shape of the document image by affine transformation, and a corrected image is formed by inverse transformation of the affine transformation. an image processing unit for interpolating calculating the value of each pixel from the value of each pixel constituting the original image,
An output unit that outputs a corrected image according to the pixel value interpolated by the image processing unit,
Wherein the image processing unit includes a predetermined number of digits divider, when performing the interpolation operation, determined by the maximum coordinate value of the correction image when the number of digits of the divider was carried out the affine inverse transformation the value obtained by subtracting the number of digits to the shift number of digits is, the shifted digits of minute shifts the digits of the fixed-point part of the affine inverse transformation, the shift digits of value interpolation accuracy is improved enough large An imaging apparatus characterized by determining a resolution of calculation.
前記補正画像の最大座標値は、前記出力部の出力画像サイズに基づいて計算されることを特徴とする請求項1に記載の撮影装置。  The photographing apparatus according to claim 1, wherein the maximum coordinate value of the corrected image is calculated based on an output image size of the output unit. 原稿を撮影する処理と、
撮影された撮影画像から前記原稿に対応する原稿画像を取得する処理と、
前記原稿画像の形状をアフィン変換により補正して補正画像を生成する処理と、
割算器の桁数からアフィン逆変換の際の前記補正画像の最大座標値により求められる桁数を引くことで算出されるシフト桁数の分だけ前記アフィン逆変換の固定小数点部の桁数をシフトして、前記シフト桁数の値が大きい程に精度が向上する補間演算の分解能を決定する処理と、
決定した分解能で前記アフィン逆変換により当該補正画像を構成する各画素の値を原稿画像を構成する各画素の値から補間演算する処理と、
補間演算された画素値にしたがって前記補正画像を出力する処理と
をコンピュータに実行させることを特徴とする撮影装置のコンピュータプログラム。
The process of shooting the document,
Processing for obtaining a document image corresponding to the document from the photographed image;
Processing to generate a corrected image by correcting the shape of the original image by affine transformation;
The number of digits of the fixed-point part of the affine inverse transformation is calculated by subtracting the number of digits calculated from the maximum coordinate value of the corrected image at the time of affine inverse transformation from the number of digits of the divider. shifted, the process of determining the resolution of the interpolation computation to improve the accuracy enough value of the shift digits is large,
A process of interpolating the value of each pixel constituting the corrected image by the affine inverse transform with the determined resolution from the value of each pixel constituting the document image;
Imaging device computer program, characterized in that to execute a process of outputting the corrected image according to interpolation calculation pixel values to the computer.
前記投影装置のコンピュータプログラムは、前記出力部の出力画像サイズに基づいて前記補正画像の最大座標値を計算する処理をさらにコンピュータに実行させることを特徴とする請求項3に記載の投影装置のコンピュータプログラム。 The computer program of the projection apparatus according to claim 3 , wherein the computer program of the projection apparatus further causes the computer to execute a process of calculating a maximum coordinate value of the corrected image based on an output image size of the output unit. program.
JP2007143649A 2007-05-30 2007-05-30 Imaging apparatus and computer program therefor Expired - Fee Related JP4952380B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007143649A JP4952380B2 (en) 2007-05-30 2007-05-30 Imaging apparatus and computer program therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007143649A JP4952380B2 (en) 2007-05-30 2007-05-30 Imaging apparatus and computer program therefor

Publications (2)

Publication Number Publication Date
JP2008299510A JP2008299510A (en) 2008-12-11
JP4952380B2 true JP4952380B2 (en) 2012-06-13

Family

ID=40172996

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007143649A Expired - Fee Related JP4952380B2 (en) 2007-05-30 2007-05-30 Imaging apparatus and computer program therefor

Country Status (1)

Country Link
JP (1) JP4952380B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0831027B2 (en) * 1990-06-11 1996-03-27 松下電工株式会社 Divider for programmable controller
JPH04283832A (en) * 1991-03-13 1992-10-08 Fujitsu Ltd Dividing circuit
JP2005202593A (en) * 2004-01-14 2005-07-28 Seiko Epson Corp Image processing device, program and method
JP2005287750A (en) * 2004-03-31 2005-10-20 Konica Minolta Medical & Graphic Inc Medical image display method, medical image display device and program
JP4561302B2 (en) * 2004-10-15 2010-10-13 カシオ計算機株式会社 Image capturing apparatus, image processing method for image capturing apparatus, and program

Also Published As

Publication number Publication date
JP2008299510A (en) 2008-12-11

Similar Documents

Publication Publication Date Title
JP4760973B2 (en) Imaging apparatus and image processing method
JP4254969B2 (en) Imaging device
JP4487191B2 (en) Image processing apparatus and image processing program
JP5036599B2 (en) Imaging device
JP4862934B2 (en) Image processing apparatus, image processing method, and program
US8274572B2 (en) Electronic camera capturing a group of a plurality of specific objects
JP5803467B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP4798236B2 (en) Imaging apparatus, image processing method, and program
JP2005267457A (en) Image processing device, imaging apparatus, image processing method and program
JP4947136B2 (en) Image processing apparatus, image processing method, and program
KR20140138947A (en) Image processing device, image processing method, image processing program, and storage medium
JP6656035B2 (en) Image processing apparatus, imaging apparatus, and control method for image processing apparatus
JP2007228224A (en) Image generating device, image extracting device, control method of image generating device, image extracting method and program, and recording medium with image extracting program recorded thereon
JP6541501B2 (en) IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, AND IMAGE PROCESSING METHOD
JP4807582B2 (en) Image processing apparatus, imaging apparatus, and program thereof
KR20100046544A (en) Image distortion compensation method and apparatus
JP4238749B2 (en) Image processing apparatus, image projection apparatus, image processing method, and program
JP4952380B2 (en) Imaging apparatus and computer program therefor
JP2005210392A (en) Image pickup device
JP2017212698A (en) Imaging apparatus, control method for imaging apparatus, and program
JP5131399B2 (en) Image processing apparatus, image processing method, and program
JP2008072428A (en) Image processor, electronic camera, and image processing program
JP2005295302A (en) Camera image processing device
JP2018098612A (en) Image processing system, image processing method, imaging apparatus, program, and storage medium
JP5444970B2 (en) Imaging device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100521

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110819

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110927

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111125

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4952380

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

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees