[go: up one dir, main page]

JP2018191195A - Image processing apparatus, image processing apparatus control method, and program - Google Patents

Image processing apparatus, image processing apparatus control method, and program Download PDF

Info

Publication number
JP2018191195A
JP2018191195A JP2017093523A JP2017093523A JP2018191195A JP 2018191195 A JP2018191195 A JP 2018191195A JP 2017093523 A JP2017093523 A JP 2017093523A JP 2017093523 A JP2017093523 A JP 2017093523A JP 2018191195 A JP2018191195 A JP 2018191195A
Authority
JP
Japan
Prior art keywords
detection
unit
image
priority
camera
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.)
Pending
Application number
JP2017093523A
Other languages
Japanese (ja)
Inventor
亮 小坂
Ryo Kosaka
亮 小坂
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2017093523A priority Critical patent/JP2018191195A/en
Publication of JP2018191195A publication Critical patent/JP2018191195A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)
  • User Interface Of Digital Computer (AREA)
  • Image Analysis (AREA)
  • Position Input By Displaying (AREA)
  • Facsimile Scanning Arrangements (AREA)

Abstract

PROBLEM TO BE SOLVED: To realize a plurality of detection functions with different optimal images for obtaining good results with a single photographing device with high accuracy.SOLUTION: A main control unit 402 of a camera scanner 101 determines which of gesture detection processing performed by a gesture detection unit 409 and an object detection unit 410 is a priority detection process (S1001) and controls to switch imaging parameters to imaging parameters corresponding to the detection processing determined as the priority detection processing (S1002, S1005).SELECTED DRAWING: Figure 10

Description

本発明は、撮影デバイスで撮影した画像を処理する画像処理装置、画像処理装置の制御方法、及びプログラムに関する。   The present invention relates to an image processing apparatus that processes an image captured by an imaging device, a control method for the image processing apparatus, and a program.

従来、撮影デバイスから得られる画像を基に、ユーザのジェスチャー操作を認識して対応する処理を実行するように制御するシステムや、物体(人や物)の動きを検知してイベントを通知するシステムなどが提案されている(特許文献1、2)。   Conventionally, a system that recognizes a user's gesture operation based on an image obtained from a photographing device and performs a corresponding process, or a system that detects an object (a person or an object) and notifies an event Have been proposed (Patent Documents 1 and 2).

特開2014−021760号公報JP 2014-021760 A 特開2014−135612号公報JP 2014-135612 A

特許文献1では、撮影デバイスから取得した画像を解析して人の手や指等を検出し、ジェスチャー操作として認識する技術(ジェスチャー検知機能)が提案されている。特許文献2では、撮影デバイスから取得した画像を解析して検出対象である人や物の動きを検知する技術(物体検知機能)が提案されている。しかし、上記従来の技術はいずれも、ジェスチャー検知機能や物体検知機能などのいずれか1つの検知機能を実現するものであり、1つの撮影デバイスで2つの検知機能を実現するものではなかった。   Patent Document 1 proposes a technique (gesture detection function) that analyzes an image acquired from a photographing device to detect a human hand or finger and recognizes it as a gesture operation. Patent Document 2 proposes a technique (object detection function) for analyzing a motion of a person or an object to be detected by analyzing an image acquired from a photographing device. However, any of the above conventional techniques realizes any one detection function such as a gesture detection function or an object detection function, and does not realize two detection functions with one photographing device.

例えば1つの撮影デバイスでジェスチャー検知機能と、物体検知機能の双方を実現させようとした場合、それぞれの検知機能で検知性能を最大限発揮できるような画像の特性が異なるため、従来の技術では十分な性能を満たすことができなかった。
ジェスチャー検知機能では、動きに強い連続画像が必要となるため、露光時間を短くしてでも高フレームレートを満たすことが望ましい。一方、物体検知では、物体をはっきりと検出するために、露光時間を長くしてでも鮮明な画像を取ることが望ましい。このため、1つの撮影デバイスを用いて、上述のような異なる2つの要望を同時に満たすことができなかった。従来では、良好な結果を得るための最適な画像が異なるような複数の検知機能(例えば物体検知機能、ジェスチャー検知機能)を両立させるためには、個々の機能ごとに撮影デバイスを用意する必要があった。
For example, when trying to realize both the gesture detection function and the object detection function with a single shooting device, the image characteristics that can maximize the detection performance of each detection function are different. Performance could not be met.
Since the gesture detection function requires a continuous image that is resistant to movement, it is desirable to satisfy a high frame rate even if the exposure time is shortened. On the other hand, in object detection, in order to detect an object clearly, it is desirable to take a clear image even if the exposure time is extended. For this reason, it was not possible to satisfy the two different demands described above simultaneously using one imaging device. Conventionally, in order to achieve a plurality of detection functions (for example, an object detection function and a gesture detection function) in which optimum images for obtaining good results are different, it is necessary to prepare a photographing device for each function. there were.

このように、従来の技術では、1つの撮影デバイスで撮影された画像を用いてジェスチャー検知機能や物体検知機能などの良好な結果を得るための最適な画像が異なるような複数の検知機能を精度よく実現するができなかった。   As described above, in the conventional technology, a plurality of detection functions with different optimum images for obtaining good results such as a gesture detection function and an object detection function using an image captured by one imaging device are accurately used. Well realized but could not.

本発明は、上記の問題点を解決するためになされたものである。本発明の目的は、良好な結果を得るための最適な画像が異なるような複数の検知機能を1つの撮影デバイスで精度よく実現することができる仕組みを提供することである。   The present invention has been made to solve the above problems. An object of the present invention is to provide a mechanism capable of accurately realizing a plurality of detection functions such that optimum images for obtaining good results are different with one imaging device.

本発明は、所定の撮影領域を撮影する撮影手段と、前記撮影手段により撮影された画像データに基づいてそれぞれ異なる検知処理を行う複数の検知手段と、前記複数の検知手段がそれぞれ行う検知処理のうち優先する検知処理を判定する判定手段と、前記撮影手段の撮影モードを、前記判定手段により優先する検知処理と判定された検知処理に応じたモードに切り替える切り替え手段と、を有することを特徴とする。   The present invention relates to an imaging unit for imaging a predetermined imaging area, a plurality of detection units for performing different detection processes based on image data captured by the imaging unit, and a detection process for each of the plurality of detection units. A determination unit that determines a priority detection process; and a switching unit that switches a shooting mode of the shooting unit to a mode according to the detection process determined to be a priority detection process by the determination unit. To do.

本発明によれば、良好な結果を得るための最適な画像が異なるような複数の検知機能を1つの撮影デバイスで精度よく実現することができる。   According to the present invention, it is possible to accurately realize a plurality of detection functions with different optimal images for obtaining good results with a single photographing device.

本実施例の画像処理装置を示すカメラスキャナを含むネットワーク構成図Network configuration diagram including a camera scanner showing the image processing apparatus of the present embodiment 本実施例のカメラスキャナの構成の一例を説明する図1 is a diagram illustrating an example of the configuration of a camera scanner according to an embodiment of the present invention. コントローラ部のハードウェア構成図Hardware configuration diagram of the controller 本実施例のカメラスキャナの制御用プログラムの機能構成図Functional configuration diagram of the control program for the camera scanner of this embodiment 距離画像取得部の処理および距離画像センサを説明する図The figure explaining the process of a distance image acquisition part, and a distance image sensor 距離画像取得部の処理および距離画像センサを説明する図The figure explaining the process of a distance image acquisition part, and a distance image sensor ジェスチャー検知部の処理を説明する図The figure explaining the process of a gesture detection part ジェスチャー検知部の処理を説明する図The figure explaining the process of a gesture detection part 物体検知部の処理を説明する図The figure explaining the processing of an object detection part 物体検知部の処理を説明する図The figure explaining the processing of an object detection part スキャン処理部が実行する書籍原稿スキャン処理を説明する図The figure explaining the book manuscript scanning process which a scanning process part performs スキャン処理部が実行する書籍原稿スキャン処理を説明する図The figure explaining the book manuscript scanning process which a scanning process part performs スキャン処理部が実行する書籍原稿スキャン処理を説明する図The figure explaining the book manuscript scanning process which a scanning process part performs 実施例1におけるUI表示と操作者の操作の様子を示す図The figure which shows the mode of UI display and operator's operation in Example 1. 実施例1の処理を説明するフローチャートFlowchart for explaining the processing of the first embodiment 実施例2におけるUI表示と操作者の操作の様子を示す図The figure which shows the mode of UI display and operator's operation in Example 2. 実施例2の処理を説明するフローチャートFlowchart for explaining the processing of the second embodiment 実施例3を説明する図Diagram for explaining the third embodiment 実施例4を説明する図Diagram for explaining the fourth embodiment

以下、本発明を実施するための形態について図面を参照して説明する。   Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.

図1は、本発明の画像処理装置の一実施例を示すスタンド型スキャナを含むネットワーク構成の一例を示す図である。
カメラスキャナ101は、本実施例のスタンド型スキャナである。カメラスキャナ101は、イーサネット(登録商標)等のネットワーク104を介して、ホストコンピュータ102およびプリンタ103と通信可能に接続されている。
FIG. 1 is a diagram showing an example of a network configuration including a stand type scanner showing an embodiment of the image processing apparatus of the present invention.
The camera scanner 101 is a stand type scanner according to the present embodiment. The camera scanner 101 is communicably connected to the host computer 102 and the printer 103 via a network 104 such as Ethernet (registered trademark).

カメラスキャナ101は、ホストコンピュータ102からの指示により、カメラスキャナ101から画像を読み取るスキャン機能や、スキャンデータをプリンタ103により出力するプリント機能の実行が可能である。また、カメラスキャナ101は、ホストコンピュータ102を介さず、カメラスキャナ101への直接の指示により、スキャン機能、プリント機能の実行も可能である。   The camera scanner 101 can execute a scan function for reading an image from the camera scanner 101 and a print function for outputting scan data by the printer 103 according to an instruction from the host computer 102. Further, the camera scanner 101 can also execute a scan function and a print function according to a direct instruction to the camera scanner 101 without using the host computer 102.

<カメラスキャナの構成>
図2は、カメラスキャナ101の構成の一例を説明する図である。
図2(a)に示すように、カメラスキャナ101は、コントローラ部201、カメラ部202、腕部203、短焦点プロジェクタ207、距離画像センサ部208を含む。
<Configuration of camera scanner>
FIG. 2 is a diagram for explaining an example of the configuration of the camera scanner 101.
As shown in FIG. 2A, the camera scanner 101 includes a controller unit 201, a camera unit 202, an arm unit 203, a short focus projector 207, and a distance image sensor unit 208.

カメラスキャナの本体であるコントローラ部201と、撮影を行うためのカメラ部202、短焦点プロジェクタ207および距離画像センサ部208は、腕部203により連結されている。腕部203は、関節を用いて曲げ伸ばしが可能である。   A controller unit 201 which is a main body of the camera scanner, a camera unit 202 for performing photographing, a short focus projector 207, and a distance image sensor unit 208 are connected by an arm unit 203. The arm portion 203 can be bent and stretched using a joint.

図2(a)には、カメラスキャナ101が設置されている書画台204も示している。カメラスキャナ101のカメラ部202および距離画像センサ部208のレンズは、書画台204方向に向けられている。カメラスキャナ101は、破線で囲まれた読み取り領域205内の画像を読み取り可能である。図2の例では、読み取り領域205内に原稿206が置かれているため、カメラスキャナ101により原稿206を読み取り可能である。   FIG. 2A also shows a document table 204 on which the camera scanner 101 is installed. The lenses of the camera unit 202 and the distance image sensor unit 208 of the camera scanner 101 are directed toward the document table 204. The camera scanner 101 can read an image in a reading area 205 surrounded by a broken line. In the example of FIG. 2, since the document 206 is placed in the reading area 205, the document 206 can be read by the camera scanner 101.

また、書画台204内にはターンテーブル209が設けられている。ターンテーブル209は、コントローラ部201からの指示によって回転することが可能である。ターンテーブル209を回転することにより、ターンテーブル209上に置かれた物体とカメラ部202との角度を変えることができる。   A turntable 209 is provided in the document table 204. The turntable 209 can be rotated by an instruction from the controller unit 201. By rotating the turntable 209, the angle between the object placed on the turntable 209 and the camera unit 202 can be changed.

なお、カメラ部202は、単一解像度で画像を撮影するものとしてもよいが、高解像度画像撮影と低解像度画像撮影が可能なものとすることが好ましい。   The camera unit 202 may capture an image with a single resolution, but it is preferable that the camera unit 202 can capture a high-resolution image and a low-resolution image.

また、図2には示していないが、カメラスキャナ101は、図3に示すように、LCDタッチパネル330およびスピーカ340をさらに備えることもできる。さらに、カメラスキャナ101は、周囲の環境情報を収集するための人感センサ、照度センサ、加速度センサなどの各種センサデバイスを含むこともできる。   Although not shown in FIG. 2, the camera scanner 101 may further include an LCD touch panel 330 and a speaker 340 as shown in FIG. Furthermore, the camera scanner 101 can also include various sensor devices such as a human sensor, an illuminance sensor, and an acceleration sensor for collecting surrounding environmental information.

図2(b)は、カメラスキャナ101における座標系について表している。
カメラスキャナ101では、各ハードウェアデバイスに対して、「カメラ座標系」、「距離画像センサ座標系」、「プロジェクタ座標系」という座標系が定義されている。これらの座標系は、カメラ部202および距離画像センサ部208のRGBカメラ363が撮影する画像平面、あるいはプロジェクタ207が投影する画像平面をXY平面とし、画像平面に直交する方向をZ方向として定義したものである。
FIG. 2B shows a coordinate system in the camera scanner 101.
In the camera scanner 101, coordinate systems of “camera coordinate system”, “distance image sensor coordinate system”, and “projector coordinate system” are defined for each hardware device. In these coordinate systems, an image plane taken by the RGB camera 363 of the camera unit 202 and the distance image sensor unit 208 or an image plane projected by the projector 207 is defined as an XY plane, and a direction orthogonal to the image plane is defined as a Z direction. Is.

さらに、本実施例では、これらの独立した座標系の3次元データを統一的に扱えるようにするために「直交座標系」が定義されている。直交座標系では、書画台204を含む平面をXY平面とし、このXY平面から上方に垂直な向きをZ軸とする。   Furthermore, in this embodiment, an “orthogonal coordinate system” is defined so that the three-dimensional data of these independent coordinate systems can be handled uniformly. In the orthogonal coordinate system, a plane including the document table 204 is an XY plane, and a direction perpendicular to the XY plane is a Z axis.

以下、座標系を変換する場合の例を、図2(c)を用いて説明する。
図2(c)は、直交座標系とカメラ座標系とを用いて表現された空間と、カメラ部202が撮影する画像平面との関係を示す。
直交座標系における3次元点P[X,Y,Z]は、(1)式によって、カメラ座標系における3次元点Pc[X,Y,Z]へ変換できる。
Hereinafter, an example of converting the coordinate system will be described with reference to FIG.
FIG. 2C shows a relationship between a space expressed using an orthogonal coordinate system and a camera coordinate system and an image plane taken by the camera unit 202.
The three-dimensional point P [X, Y, Z] in the orthogonal coordinate system can be converted to the three-dimensional point Pc [X c , Y c , Z c ] in the camera coordinate system by the equation (1).

Figure 2018191195
Figure 2018191195

ここで、Rおよびtは、直交座標系に対するカメラの姿勢(回転)と位置(並進)によって求まる外部パラメータによって構成され、Rを3×3の回転行列、tを並進ベクトルと呼ぶ。 Here, R c and t c are constituted by external parameters determined by the posture (rotation) and position (translation) of the camera with respect to the orthogonal coordinate system, R c is called a 3 × 3 rotation matrix, and t c is called a translation vector. .

逆に、カメラ座標系で定義された3次元点Pc[X,Y,Z]は(2)式によって、直交座標系における3次元点P[X,Y,Z]への変換することができる Conversely, the three-dimensional point Pc [X c , Y c , Z c ] defined in the camera coordinate system is converted to the three-dimensional point P [X, Y, Z] in the orthogonal coordinate system by the equation (2). be able to

Figure 2018191195
Figure 2018191195

さらに、カメラ部202で撮影される2次元のカメラ画像平面は、カメラ部202によって3次元空間中の3次元情報が2次元情報に変換されたものである。即ち、カメラ座標系上での3次元点Pc[X,Y,Z]を、(3)式によってカメラ画像平面での2次元座標pc[x,y]に透視投影変換することによって変換することができる。 Further, the two-dimensional camera image plane photographed by the camera unit 202 is obtained by converting the three-dimensional information in the three-dimensional space into the two-dimensional information by the camera unit 202. That is, the three-dimensional point Pc [X c , Y c , Z c ] on the camera coordinate system is perspective-projected into the two-dimensional coordinate pc [x p , y p ] on the camera image plane according to the equation (3). Can be converted.

Figure 2018191195
Figure 2018191195

ここで、Aは、カメラの内部パラメータと呼ばれ、焦点距離と画像中心などで表現される3×3の行列である。   Here, A is a 3 × 3 matrix called an internal parameter of the camera and expressed by a focal length and an image center.

以上のように、(1)式と(3)式を用いることで、直交座標系で表された3次元点群を、カメラ座標系での3次元点群座標やカメラ画像平面に変換することができる。なお、各ハードウェアデバイスの内部パラメータおよび直交座標系に対する位置姿勢(外部パラメータ)は、公知のキャリブレーション手法により予めキャリブレーションされているものとする。以後、特に断りがなく3次元点群と表記した場合は、直交座標系における3次元データを表しているものとする。   As described above, by using the equations (1) and (3), the three-dimensional point group represented by the orthogonal coordinate system is converted into the three-dimensional point group coordinates or the camera image plane in the camera coordinate system. Can do. It is assumed that the internal parameters of each hardware device and the position / orientation (external parameters) with respect to the orthogonal coordinate system are calibrated in advance by a known calibration method. Hereinafter, when there is no particular notice and it is expressed as a three-dimensional point group, it represents three-dimensional data in an orthogonal coordinate system.

<カメラスキャナ101のコントローラ部201のハードウェア構成>
図3は、カメラスキャナ101の本体であるコントローラ部201のハードウェア構成の一例を示す図である。
<Hardware Configuration of Controller 201 of Camera Scanner 101>
FIG. 3 is a diagram illustrating an example of a hardware configuration of the controller unit 201 which is the main body of the camera scanner 101. As illustrated in FIG.

図3に示すように、コントローラ部201は、システムバス301に接続されたCPU302、RAM303、ROM304、HDD305及びネットワークI/F306を有する。さらに、コントローラ部201は、画像処理プロセッサ307、カメラI/F308、ディスプレイコントローラ309、シリアルI/F310、オーディオコントローラ311及びUSBコントローラ312を有する。   As illustrated in FIG. 3, the controller unit 201 includes a CPU 302, a RAM 303, a ROM 304, an HDD 305, and a network I / F 306 connected to a system bus 301. The controller unit 201 further includes an image processing processor 307, a camera I / F 308, a display controller 309, a serial I / F 310, an audio controller 311, and a USB controller 312.

CPU302は、コントローラ部201全体の動作を制御する中央演算装置である。RAM303は、揮発性メモリである。ROM304は不揮発性メモリであり、CPU302の起動用プログラム等が格納されている。HDD305は、RAM303と比較して大容量なハードディスクドライブ(HDD)である。HDD305には、コントローラ部201の実行する、カメラスキャナ101の制御用プログラム等が格納されている。   The CPU 302 is a central processing unit that controls the operation of the entire controller unit 201. The RAM 303 is a volatile memory. A ROM 304 is a nonvolatile memory, and stores a startup program for the CPU 302 and the like. The HDD 305 is a hard disk drive (HDD) that has a larger capacity than the RAM 303. The HDD 305 stores a control program for the camera scanner 101 executed by the controller unit 201.

CPU302は、電源ON等の起動時、ROM304に格納されている起動用プログラムを実行する。この起動用プログラムは、HDD305に格納されている制御用プログラムを読み出し、RAM303上に展開するためのものである。CPU302は、起動用プログラムを実行すると、続けてRAM303上に展開した制御用プログラムを実行し、制御を行う。また、CPU302は、制御用プログラムによる動作に用いるデータもRAM303上に格納して読み書きを行う。HDD305には、さらに制御用プログラムによる動作に必要な各種設定や、カメラ入力によって生成された画像データ等を格納することができる。HDD305は、CPU302によって読み書き可能である。CPU302は、ネットワークI/F306を介してネットワーク104上の他の機器との通信を行う。   The CPU 302 executes a startup program stored in the ROM 304 when the power is turned on or the like. This activation program is for reading a control program stored in the HDD 305 and developing it on the RAM 303. When executing the startup program, the CPU 302 executes the control program developed on the RAM 303 and performs control. The CPU 302 also stores data used for the operation by the control program on the RAM 303 to read / write. The HDD 305 can further store various settings necessary for operation by the control program, image data generated by camera input, and the like. The HDD 305 can be read and written by the CPU 302. The CPU 302 communicates with other devices on the network 104 via the network I / F 306.

画像処理プロセッサ307は、RAM303に格納された画像データを読み出して処理し、またRAM303へ書き戻す。なお、画像処理プロセッサ307が実行する画像処理は、回転、変倍、色変換等を含む。   The image processor 307 reads and processes the image data stored in the RAM 303 and writes it back to the RAM 303. Note that image processing executed by the image processor 307 includes rotation, scaling, color conversion, and the like.

カメラI/F308は、カメラ部202および距離画像センサ部208と接続される。カメラI/F308は、CPU302からの指示に応じて、カメラ部202から画像データを、距離画像センサ部208から距離画像データ(距離情報)を取得して、RAM303へ書き込む。また、カメラI/F308は、CPU302からの制御コマンドを、カメラ部202及び距離画像センサ部208へ送信し、カメラ部202及び距離画像センサ部208の設定を行う。距離画像センサ部208については後述する図5で説明する。   The camera I / F 308 is connected to the camera unit 202 and the distance image sensor unit 208. In response to an instruction from the CPU 302, the camera I / F 308 acquires image data from the camera unit 202 and distance image data (distance information) from the distance image sensor unit 208, and writes it into the RAM 303. In addition, the camera I / F 308 transmits a control command from the CPU 302 to the camera unit 202 and the distance image sensor unit 208, and sets the camera unit 202 and the distance image sensor unit 208. The distance image sensor unit 208 will be described later with reference to FIG.

なお、コントローラ部201は、ディスプレイコントローラ309、シリアルI/F310、オーディオコントローラ311およびUSBコントローラ312のうち少なくとも1つを備える。   The controller unit 201 includes at least one of a display controller 309, a serial I / F 310, an audio controller 311 and a USB controller 312.

ディスプレイコントローラ309は、CPU302の指示に応じて、ディスプレイへの画像データの表示を制御する。ここで、ディスプレイコントローラ309は、短焦点プロジェクタ207およびLCDタッチパネル330に接続されており、これらの表示を制御する。   A display controller 309 controls display of image data on the display in accordance with an instruction from the CPU 302. Here, the display controller 309 is connected to the short focus projector 207 and the LCD touch panel 330, and controls these displays.

シリアルI/F310は、シリアル信号の入出力を行う。ここでは、シリアルI/F310はターンテーブル209に接続され、CPU302の回転開始・終了および回転角度の指示をターンテーブル209へ送信する。また、シリアルI/F310はLCDタッチパネル330に接続され、CPU302はLCDタッチパネル330が押下されたときに、シリアルI/F310を介して押下された座標を取得する。   The serial I / F 310 inputs and outputs serial signals. Here, the serial I / F 310 is connected to the turntable 209, and transmits to the turntable 209 instructions for the rotation start / end of the CPU 302 and the rotation angle. Further, the serial I / F 310 is connected to the LCD touch panel 330, and the CPU 302 acquires the coordinates pressed via the serial I / F 310 when the LCD touch panel 330 is pressed.

オーディオコントローラ311はスピーカ340に接続され、CPU302の指示に応じて音声データをアナログ音声信号に変換し、スピーカ340を通じて音声を出力する。   The audio controller 311 is connected to the speaker 340, converts audio data into an analog audio signal in accordance with an instruction from the CPU 302, and outputs audio through the speaker 340.

USBコントローラ312は、CPU302の指示に応じて外付けのUSBデバイスの制御を行う。ここでは、USBコントローラ312は、USBメモリやSDカードなどの外部メモリ350と接続され、外部メモリ350へのデータの読み書きを行う。   The USB controller 312 controls an external USB device in accordance with an instruction from the CPU 302. Here, the USB controller 312 is connected to an external memory 350 such as a USB memory or an SD card, and reads / writes data from / to the external memory 350.

<カメラスキャナ101の制御用プログラムの機能構成>
図4(a)は、CPU302が実行するカメラスキャナ101の制御用プログラムの機能構成401の一例を示す図である。カメラスキャナ101の制御用プログラムは前述のようにHDD305に格納され、CPU302が起動時にRAM303上に展開して実行する。即ち、図4(a)に示す機能構成401は、CPU302がHDD305に格納されるカメラスキャナ101の制御用プログラムをRAM303にロードして実行することにより実現される。
また、図4(b)は、機能構成401の各モジュールの処理の関係を示すシーケンス図である。
<Functional configuration of control program for camera scanner 101>
FIG. 4A is a diagram illustrating an example of a functional configuration 401 of a control program for the camera scanner 101 executed by the CPU 302. The control program for the camera scanner 101 is stored in the HDD 305 as described above, and the CPU 302 develops and executes it on the RAM 303 at the time of activation. That is, the functional configuration 401 illustrated in FIG. 4A is realized when the CPU 302 loads the control program for the camera scanner 101 stored in the HDD 305 to the RAM 303 and executes it.
FIG. 4B is a sequence diagram showing the processing relationship of each module of the functional configuration 401.

機能構成401において、メイン制御部402は制御の中心であり、機能構成401内の他の各モジュールを図4(b)に示すように制御する。詳細は、以下に示す各モジュールの説明とともに説明する。   In the functional configuration 401, the main control unit 402 is the center of control, and controls the other modules in the functional configuration 401 as shown in FIG. Details will be described together with the description of each module shown below.

画像取得部416は、画像入力処理を行うモジュールである。画像取得部416は、カメラ画像取得部407、距離画像取得部408を有する。
カメラ画像取得部407は、カメラI/F308を介してカメラ部202が出力する画像データを取得し、RAM303へ格納する。
距離画像取得部408は、カメラI/F308を介して距離画像センサ部208が出力する距離画像データを取得し、RAM303へ格納する。距離画像取得部408の処理の詳細は、後述する図5A、図5Bを用いて説明する。
The image acquisition unit 416 is a module that performs image input processing. The image acquisition unit 416 includes a camera image acquisition unit 407 and a distance image acquisition unit 408.
A camera image acquisition unit 407 acquires image data output from the camera unit 202 via the camera I / F 308 and stores the image data in the RAM 303.
The distance image acquisition unit 408 acquires the distance image data output from the distance image sensor unit 208 via the camera I / F 308 and stores it in the RAM 303. Details of the processing of the distance image acquisition unit 408 will be described with reference to FIGS. 5A and 5B described later.

認識処理部417は、カメラ画像取得部407、距離画像取得部408が取得する画像データから書画台204上の物体の動きを検知して認識するモジュールである。認識処理部417は、ジェスチャー検知部409、物体検知部410を有する。   The recognition processing unit 417 is a module that detects and recognizes the movement of an object on the document table 204 from image data acquired by the camera image acquisition unit 407 and the distance image acquisition unit 408. The recognition processing unit 417 includes a gesture detection unit 409 and an object detection unit 410.

ジェスチャー検知部409は、画像取得部416から書画台204上の画像を取得し続け、タッチなどのジェスチャーを検知するとメイン制御部402へ通知する。ジェスチャー検知部409の処理の詳細は図6を用いて後述する。   The gesture detection unit 409 continues to acquire images on the document table 204 from the image acquisition unit 416, and notifies the main control unit 402 when a gesture such as touch is detected. Details of the processing of the gesture detection unit 409 will be described later with reference to FIG.

物体検知部410は、画像取得部416から書画台204を撮影した画像を取得し、書画台204上に物体が置かれるタイミング、物体が置かれて静止するタイミング、あるいは物体が取り除かれるタイミングなどを検知する処理を行う。物体検知部410の処理の詳細は図7を用いて後述する。物体検知部410は、メイン制御部402からの要求により、物体検知処理を開始し、物体検知処理で発行されたイベントを、メイン制御部402へ通知する。   The object detection unit 410 acquires an image obtained by capturing the document table 204 from the image acquisition unit 416, and determines when the object is placed on the document table 204, when the object is placed and stopped, or when the object is removed. Perform processing to detect. Details of the processing of the object detection unit 410 will be described later with reference to FIG. In response to a request from the main control unit 402, the object detection unit 410 starts object detection processing and notifies the main control unit 402 of an event issued in the object detection processing.

画像処理部418は、カメラ部202および距離画像センサ部208から取得した画像を画像処理プロセッサ307で解析するために用いられる。画像処理部418は、スキャン処理部411、各種画像処理モジュール(例えばOCR処理部412等)を有する。   The image processing unit 418 is used by the image processing processor 307 to analyze images acquired from the camera unit 202 and the distance image sensor unit 208. The image processing unit 418 includes a scan processing unit 411 and various image processing modules (for example, an OCR processing unit 412).

スキャン処理部411は、対象物のスキャンを行うモジュールである。スキャン処理部411は、メイン制御部402からの要求により、平面原稿/書籍/立体物にそれぞれ適した処理を実行し、それぞれに応じた形式のデータを出力する。スキャン処理部411で実行される処理の1つである書籍原稿スキャン処理の詳細については図8を用いて後述する。
OCR処理部412は、文字認識処理を行う。
The scan processing unit 411 is a module that scans an object. In response to a request from the main control unit 402, the scan processing unit 411 executes processing suitable for each flat document / book / three-dimensional object, and outputs data in a format corresponding to each. Details of the book document scanning process, which is one of the processes executed by the scan processing unit 411, will be described later with reference to FIG.
The OCR processing unit 412 performs character recognition processing.

ジェスチャー検知部409やスキャン処理部411は、画像処理部418の各種画像処理モジュールを利用して処理を実行する。   The gesture detection unit 409 and the scan processing unit 411 execute processing using various image processing modules of the image processing unit 418.

ユーザインタフェース部403は、メイン制御部402からの要求を受け、メッセージやボタン等のGUI部品を生成する。そして、ユーザインタフェース部403は、表示部406へ生成したGUI部品の表示を要求する。   The user interface unit 403 receives a request from the main control unit 402 and generates a GUI component such as a message or a button. Then, the user interface unit 403 requests the display unit 406 to display the generated GUI component.

表示部406は、ディスプレイコントローラ309を介して、プロジェクタ207もしくはLCDタッチパネル330へ要求されたGUI部品の表示を行う。プロジェクタ207は、書画台204に向けて設置されているため、書画台204上にGUI部品を投射することが可能となっている。また、ユーザインタフェース部403は、ジェスチャー検知部409が認識したタッチ等のジェスチャー操作、あるいはシリアルI/F310を介したLCDタッチパネル330からの入力操作、そしてさらにそれらの座標を受信する。そして、ユーザインタフェース部403は、描画中の操作画面の内容と操作座標を対応させて操作内容(押下されたボタン等)を判定する。ユーザインタフェース部403は、この操作内容をメイン制御部402へ通知することにより、操作者の操作を受け付ける。   The display unit 406 displays the requested GUI component on the projector 207 or the LCD touch panel 330 via the display controller 309. Since the projector 207 is installed toward the document table 204, it is possible to project a GUI component on the document table 204. In addition, the user interface unit 403 receives a gesture operation such as a touch recognized by the gesture detection unit 409, an input operation from the LCD touch panel 330 via the serial I / F 310, and coordinates thereof. Then, the user interface unit 403 determines the operation content (such as a pressed button) by associating the content of the operation screen being drawn with the operation coordinates. The user interface unit 403 notifies the main control unit 402 of this operation content, thereby accepting the operation of the operator.

ネットワーク通信部404は、ネットワークI/F306を介して、ネットワーク104上の他の機器と例えばTCP/IPによる通信を行う。
データ管理部405は、制御用プログラム401の実行において生成した作業データなど様々なデータをHDD305上の所定の領域へ保存し、管理する。データ管理部405が管理するデータは、例えば、画像取得部416によって撮影され、スキャン処理部411により平面原稿/書籍/立体物に応じた形式で出力されたスキャンデータなどである。
The network communication unit 404 communicates with other devices on the network 104 via, for example, the TCP / IP via the network I / F 306.
The data management unit 405 stores and manages various data such as work data generated in the execution of the control program 401 in a predetermined area on the HDD 305. The data managed by the data management unit 405 is, for example, scan data captured by the image acquisition unit 416 and output by the scan processing unit 411 in a format corresponding to a flat document / book / three-dimensional object.

<距離画像センサおよび距離画像取得部の説明>
図5A、図5Bは、距離画像取得部408の処理および距離画像センサ部208を説明する図である。
距離画像センサ部208は、赤外線によるパターン投射方式の距離画像センサである。赤外線パターン投射部361は、対象物に対して、人の目には不可視である赤外線によって3次元形状測定パターンを投射する。赤外線カメラ362は、対象物に投射した3次元形状測定パターンを読み取るカメラである。RGBカメラ363は、人の目に見える可視光をRGB信号で撮影するカメラである。
<Description of Distance Image Sensor and Distance Image Acquisition Unit>
5A and 5B are diagrams for explaining the processing of the distance image acquisition unit 408 and the distance image sensor unit 208.
The distance image sensor unit 208 is a pattern image type distance image sensor using infrared rays. The infrared pattern projection unit 361 projects a three-dimensional shape measurement pattern onto an object using infrared rays that are invisible to human eyes. The infrared camera 362 is a camera that reads a three-dimensional shape measurement pattern projected on an object. The RGB camera 363 is a camera that captures visible light visible to the human eye using RGB signals.

図5A(a)は、距離画像取得部408の処理を説明するフローチャートである。図5A(a)のフローチャートに示す処理は、距離画像取得部408により実行される。即ち、図5A(a)に示す処理は、CPU302がHDD305に格納されるカメラスキャナ101の制御用プログラムをRAM303にロードして実行することにより実現される。
また、図5Bの(b)〜(d)はパターン投射方式による距離画像の計測原理を説明するための図である。
FIG. 5A (a) is a flowchart illustrating the processing of the distance image acquisition unit 408. The process shown in the flowchart of FIG. 5A is executed by the distance image acquisition unit 408. That is, the process shown in FIG. 5A is realized when the CPU 302 loads the control program for the camera scanner 101 stored in the HDD 305 to the RAM 303 and executes it.
5B to 5D are diagrams for explaining the principle of distance image measurement by the pattern projection method.

距離画像取得部408は、処理を開始すると、図5A(a)のS501において、距離画像センサ部208を用いて、例えば図5B(b)に示すように、赤外線パターン投射部361を用いて赤外線による3次元形状測定パターン522を対象物521に投射する。   When the processing starts, the distance image acquisition unit 408 uses the distance image sensor unit 208 in S501 of FIG. 5A (a), for example, an infrared pattern projection unit 361 as shown in FIG. 5B (b). The three-dimensional shape measurement pattern 522 is projected onto the object 521.

次に、S502において、距離画像取得部408は、RGBカメラ363を用いて対象物を撮影したRGBカメラ画像523を1フレーム取得する。また、距離画像取得部408は、赤外線カメラ362を用いて、上記S501で投射した3次元形状測定パターン522を撮影した赤外線カメラ画像524を1フレーム取得する。なお、赤外線カメラ362とRGBカメラ363とでは設置位置が異なるため、図5B(c)に示すようにそれぞれで撮影される2つのRGBカメラ画像523および赤外線カメラ画像524の撮影領域が異なる。そこで、距離画像取得部408は、以下のS503、S504の処理においてこれらの対応付けを行う。   Next, in S502, the distance image acquisition unit 408 acquires one frame of the RGB camera image 523 obtained by photographing the object using the RGB camera 363. Further, the distance image acquisition unit 408 acquires one frame of the infrared camera image 524 obtained by photographing the three-dimensional shape measurement pattern 522 projected in S501 using the infrared camera 362. Since the infrared camera 362 and the RGB camera 363 have different installation positions, the shooting areas of the two RGB camera images 523 and the infrared camera image 524 that are shot respectively are different as shown in FIG. 5B (c). Therefore, the distance image acquisition unit 408 associates these in the following processes of S503 and S504.

S503において、距離画像取得部408は、赤外線カメラ362の座標系からRGBカメラ363の座標系への座標系変換を用いて赤外線カメラ画像524をRGBカメラ画像523の座標系に合わせる。なお、赤外線カメラ362とRGBカメラ363の相対位置や、それぞれの内部パラメータは事前のキャリブレーション処理により既知であるとする。   In S503, the distance image acquisition unit 408 aligns the infrared camera image 524 with the coordinate system of the RGB camera image 523 using coordinate system conversion from the coordinate system of the infrared camera 362 to the coordinate system of the RGB camera 363. It is assumed that the relative positions of the infrared camera 362 and the RGB camera 363 and the respective internal parameters are known by a prior calibration process.

次に、S504において、距離画像取得部408は、図5B(d)に示すように、3次元形状測定パターン522と上記S503で座標変換を行った赤外線カメラ画像524間での対応点を抽出する。例えば、距離画像取得部408は、赤外線カメラ画像524上の1点を3次元形状測定パターン522上から探索して、同一の点が検出された場合に対応付けを行う。あるいは、距離画像取得部408は、赤外線カメラ画像524の画素の周辺のパターンを3次元形状測定パターン522上から探索し、一番類似度が高い部分と対応付けてもよい。   Next, in S504, the distance image acquisition unit 408 extracts corresponding points between the three-dimensional shape measurement pattern 522 and the infrared camera image 524 that has undergone coordinate conversion in S503, as shown in FIG. 5B (d). . For example, the distance image acquisition unit 408 searches for one point on the infrared camera image 524 from the three-dimensional shape measurement pattern 522, and performs association when the same point is detected. Alternatively, the distance image acquisition unit 408 may search for a pattern around the pixel of the infrared camera image 524 from the three-dimensional shape measurement pattern 522 and associate it with the portion having the highest similarity.

次に、S505において、距離画像取得部408は、赤外線パターン投射部361と赤外線カメラ362を結ぶ直線を基線525(図5B(b))として三角測量の原理を用いて計算を行うことにより、赤外線カメラ362からの距離を算出する。距離画像取得部408は、上記S504で対応付けができた画素については、赤外線カメラ362からの距離を算出して画素値として保存し、対応付けができなかった画素については、距離の計測ができなかった部分として無効値を保存する。距離画像取得部408は、これを上記S503で座標変換を行った赤外線カメラ画像524の全画素に対して行うことで、各画素に距離値が入った距離画像を生成する。   Next, in S505, the distance image acquisition unit 408 performs infrared ray calculation by using the principle of triangulation with a straight line connecting the infrared pattern projection unit 361 and the infrared camera 362 as a base line 525 (FIG. 5B (b)). The distance from the camera 362 is calculated. The distance image acquisition unit 408 calculates the distance from the infrared camera 362 for the pixels that can be associated in S504 and stores them as pixel values, and can measure the distance for pixels that cannot be associated. Save invalid values as missing parts. The distance image acquisition unit 408 generates a distance image in which each pixel has a distance value by performing this process on all the pixels of the infrared camera image 524 that have undergone coordinate conversion in S503.

次に、S506において、距離画像取得部408は、距離画像の各画素にRGBカメラ画像523のRGB値を保存することにより、1画素につきR、G、B、距離の4つの値を持つ距離画像を生成する。ここで取得した距離画像は、距離画像センサ部208のRGBカメラ363で定義された距離画像センサ座標系が基準となっている。そこで、S507において、距離画像センサ部208は、図2(b)を用いて上述したように、距離画像センサ座標系として得られた距離データを直交座標系における3次元点群に変換する。以後、特に指定がなく3次元点群と表記した場合は、直交座標系における3次元点群を示すものとする。
そして、上記S507の処理の後、距離画像取得部408は、本フローチャートの処理を終了する。
Next, in S506, the distance image acquisition unit 408 stores the RGB values of the RGB camera image 523 in each pixel of the distance image, so that the distance image having four values of R, G, B, and distance per pixel. Is generated. The distance image acquired here is based on the distance image sensor coordinate system defined by the RGB camera 363 of the distance image sensor unit 208. Therefore, in S507, the distance image sensor unit 208 converts the distance data obtained as the distance image sensor coordinate system into a three-dimensional point group in the orthogonal coordinate system, as described above with reference to FIG. Hereinafter, when there is no particular designation and it is described as a three-dimensional point group, it indicates a three-dimensional point group in an orthogonal coordinate system.
After the process of S507, the distance image acquisition unit 408 ends the process of this flowchart.

なお、本実施例では、上述したように、距離画像センサ部208として赤外線パターン投射方式を採用しているが、他の方式の距離画像センサを用いることも可能である。例えば、2つのRGBカメラでステレオ立体視を行うステレオ方式や、レーザー光の飛行時間を検出することで距離を測定するTOF(Time of Flight)方式など、他の計測手段を用いても構わない。   In this embodiment, as described above, an infrared pattern projection method is adopted as the distance image sensor unit 208, but a distance image sensor of another method can also be used. For example, other measuring means such as a stereo system that performs stereo stereoscopic vision with two RGB cameras and a TOF (Time of Flight) system that measures distance by detecting the flight time of laser light may be used.

<ジェスチャー検知部の説明>
図6A、図6Bは、ジェスチャー検知部409の処理を説明する図である。
図6A(a)は、ジェスチャー検知部409の処理の詳細を説明するフローチャートである。図6A(a)のフローチャートに示す処理は、ジェスチャー検知部409により実行される。即ち、図6A(a)に示す処理は、CPU302がHDD305に格納されるカメラスキャナ101の制御用プログラムをRAM303にロードして実行することにより実現される。
また、図6Bの(b)〜(d)は、指先検出処理の方法を模式的に表した図である。
<Description of gesture detection unit>
6A and 6B are diagrams illustrating the processing of the gesture detection unit 409.
FIG. 6A (a) is a flowchart for explaining details of the process of the gesture detection unit 409. The process illustrated in the flowchart of FIG. 6A is executed by the gesture detection unit 409. That is, the process shown in FIG. 6A is realized when the CPU 302 loads the control program for the camera scanner 101 stored in the HDD 305 to the RAM 303 and executes it.
Moreover, (b)-(d) of FIG. 6B is the figure which represented typically the method of the fingertip detection process.

ジェスチャー検知部409は、処理を開始すると、図6A(a)のS601において、初期化処理を行う。初期化処理では、ジェスチャー検知部409は、距離画像取得部408から距離画像を1フレーム取得する。ここで、ジェスチャー検知部409の処理開始時は書画台204上に対象物が置かれていない状態であるため、初期状態として書画台204の平面の認識を行う。つまり、ジェスチャー検知部409は、取得した距離画像から最も広い平面を抽出し、その位置と法線ベクトル(以下「書画台204の平面パラメータ」と呼ぶ)を算出し、RAM303に保存する。   When the process is started, the gesture detection unit 409 performs an initialization process in S601 of FIG. 6A (a). In the initialization process, the gesture detection unit 409 acquires one frame of the distance image from the distance image acquisition unit 408. Here, since the object is not placed on the document table 204 when the gesture detection unit 409 starts processing, the plane of the document table 204 is recognized as an initial state. That is, gesture detection section 409 extracts the widest plane from the acquired distance image, calculates its position and normal vector (hereinafter referred to as “plane parameter of document table 204”), and stores it in RAM 303.

続いて、S602において、ジェスチャー検知部409は、書画台204上に存在する物体の3次元点群を取得する(S621、S622)。以下、詳細に説明する。
S621において、ジェスチャー検知部409は、距離画像取得部408から距離画像と3次元点群を1フレーム取得する。さらに、S622において、ジェスチャー検知部409は、書画台204の平面パラメータを用いて、取得した3次元点群から書画台204を含む平面にある点群を除去する。
Subsequently, in S602, the gesture detection unit 409 acquires a three-dimensional point group of an object existing on the document table 204 (S621, S622). Details will be described below.
In S621, the gesture detection unit 409 acquires one frame of the distance image and the three-dimensional point group from the distance image acquisition unit 408. Further, in S622, the gesture detection unit 409 uses the plane parameter of the document table 204 to remove the point group on the plane including the document table 204 from the acquired three-dimensional point group.

次に、S603において、ジェスチャー検知部409は、上記S602で取得した3次元点群から操作者の手の形状および指先を検出する処理を行う(S631〜S634)。ここで、図6Bの(b)〜(d)に示す、指先検出処理の方法を模式的に表した図を用いて、S603の処理について詳細を説明する。   Next, in S603, the gesture detection unit 409 performs processing for detecting the shape and fingertip of the operator's hand from the three-dimensional point group acquired in S602 (S631 to S634). Here, the process of S603 will be described in detail with reference to the diagrams schematically showing the fingertip detection process method shown in FIGS. 6B to 6D.

まず、S631において、ジェスチャー検知部409は、上記S602で取得した3次元点群から、書画台204を含む平面から所定の高さ以上にある、肌色の3次元点群を抽出することで、手の3次元点群を得る。図6B(b)の661は、抽出した手の3次元点群の一例を表している。   First, in S631, the gesture detecting unit 409 extracts a skin-colored three-dimensional point group that is higher than a predetermined height from the plane including the document table 204 from the three-dimensional point group acquired in S602. To obtain a three-dimensional point cloud. Reference numeral 661 in FIG. 6B (b) represents an example of the extracted three-dimensional point group of the hand.

次に、S632において、ジェスチャー検知部409は、上記S631で抽出した手の3次元点群を、書画台204の平面に射影した2次元画像を生成して、その手の外形を検出する。図6B(b)の662は、書画台204の平面に投影した3次元点群の一例を表す。投影は、点群の各座標を、書画台204の平面パラメータを用いて投影すればよい。また、図6B(c)に示すように、投影した3次元点群から、xy座標の値だけを取り出せば、z軸方向から見た2次元画像663として扱うことができる。この時、ジェスチャー検知部409は、手の3次元点群の各点が、書画台204の平面に投影した2次元画像の各座標のどれに対応するかを、記憶しておくものとする。   Next, in S632, the gesture detection unit 409 generates a two-dimensional image obtained by projecting the three-dimensional point group of the hand extracted in S631 onto the plane of the document table 204, and detects the outer shape of the hand. 6B in FIG. 6B represents an example of a three-dimensional point group projected on the plane of the document table 204. The projection may be performed by projecting the coordinates of the point group using the plane parameters of the document table 204. Further, as shown in FIG. 6B (c), if only the value of the xy coordinate is extracted from the projected three-dimensional point group, it can be handled as a two-dimensional image 663 viewed from the z-axis direction. At this time, the gesture detection unit 409 stores which of the coordinates of the two-dimensional image projected on the plane of the document table 204 corresponds to each point of the three-dimensional point group of the hand.

次に、S633において、ジェスチャー検知部409は、上記S632で検出した手の外形上の各点について、その点での外形の曲率を算出し、算出した曲率が所定値より小さい点を指先として検出する。図6B(d)は、外形の曲率から指先を検出する方法を模式的に表したものである。図6B(d)において、664は、書画台204の平面に投影された2次元画像663の外形を表す点の一部を表している。ここで、664のような、外形を表す点のうち、隣り合う5個の点を含むように円を描くことを考える。円665、667が、その例である。このような円を、全ての外形の点に対して順に描き、その直径(例えば666、668)が所定の値より小さい(曲率が小さい)ことを以て、指先とする。この例では、隣り合う5個の点としたが、その数は限定されるものではない。また、ここでは曲率を用いたが、外形に対して楕円フィッティングを行うことで、指先を検出してもよい。   Next, in S633, the gesture detection unit 409 calculates the curvature of the outer shape at each point on the outer shape of the hand detected in S632, and detects a point where the calculated curvature is smaller than a predetermined value as a fingertip. To do. FIG. 6B (d) schematically shows a method for detecting the fingertip from the curvature of the outer shape. In FIG. 6B (d), 664 represents a part of a point representing the outer shape of the two-dimensional image 663 projected onto the plane of the document table 204. Here, it is considered to draw a circle so as to include five adjacent points among the points representing the outer shape such as 664. Examples are circles 665 and 667. Such a circle is drawn in order with respect to all the points of the outer shape, and its diameter (for example, 666, 668) is smaller than a predetermined value (curvature is small), and is used as a fingertip. In this example, five adjacent points are used, but the number is not limited. In addition, the curvature is used here, but the fingertip may be detected by performing elliptic fitting on the outer shape.

次に、S634において、ジェスチャー検知部409は、上記S633で検出した指先の個数および各指先の座標を算出する。この時、前述したように、書画台204に投影した2次元画像の各点と、手の3次元点群の各点の対応関係を記憶しているため、各指先の3次元座標を得ることができる。ここでは、3次元点群から2次元画像に投影した画像から指先を検出する方法を説明したが、指先検出の対象とする画像は、これに限定されるものではない。例えば、距離画像の背景差分や、RGBカメラ画像の肌色領域から手の領域を抽出し、上に述べたのと同様の方法(外形の曲率計算等)で、手領域のうちの指先を検出してもよい。この場合、検出した指先の座標はRGBカメラ画像や距離画像といった、2次元画像上の座標であるため、その座標における距離画像の距離情報を用いて、直交座標系の3次元座標に変換する必要がある。この時、指先点となる外形上の点ではなく、指先を検出するときに用いた、曲率円の中心を指先点としてもよい。   Next, in S634, the gesture detection unit 409 calculates the number of fingertips detected in S633 and the coordinates of each fingertip. At this time, as described above, since the correspondence between each point of the two-dimensional image projected on the document table 204 and each point of the three-dimensional point group of the hand is stored, the three-dimensional coordinates of each fingertip can be obtained. Can do. Here, the method of detecting the fingertip from the image projected from the three-dimensional point group onto the two-dimensional image has been described, but the image to be detected by the fingertip is not limited to this. For example, the hand region is extracted from the background difference of the distance image or the skin color region of the RGB camera image, and the fingertip in the hand region is detected by the same method (external curvature calculation etc.) as described above. May be. In this case, since the coordinates of the detected fingertip are coordinates on a two-dimensional image such as an RGB camera image or a distance image, it is necessary to convert to the three-dimensional coordinates of the orthogonal coordinate system using the distance information of the distance image at the coordinates. There is. At this time, the center of the curvature circle used when detecting the fingertip may be used as the fingertip point instead of the point on the outer shape that becomes the fingertip point.

次に、S604において、ジェスチャー検知部409は、検出した手の形状および指先からのジェスチャー判定処理(S641〜S646)を行う。以下、詳細に説明する。
S641において、ジェスチャー検知部409は、上記S603で検出した指先が1つかどうか判定する。ジェスチャー検知部409は、検出した指先が1つでないと判定した場合(S641でNOの場合)、S646に処理を進める。S646において、ジェスチャー検知部409は、ジェスチャーなしと判定し、S605に処理を進める。
Next, in S604, the gesture detection unit 409 performs gesture determination processing (S641 to S646) from the detected hand shape and fingertip. Details will be described below.
In S641, the gesture detection unit 409 determines whether there is one fingertip detected in S603. If the gesture detection unit 409 determines that the number of detected fingertips is not one (NO in S641), the process proceeds to S646. In S646, the gesture detection unit 409 determines that there is no gesture, and proceeds to S605.

一方、上記S641において、ジェスチャー検知部409は、検出した指先が1つであると判定した場合(S641でYESの場合)、S642に処理を進める。
S642において、ジェスチャー検知部409は、検出した指先と書画台204を含む平面との距離を算出する。
On the other hand, if the gesture detection unit 409 determines in S641 that there is one detected fingertip (YES in S641), the process proceeds to S642.
In S642, the gesture detection unit 409 calculates the distance between the detected fingertip and the plane including the document table 204.

次に、S643において、ジェスチャー検知部409は、上記S642で算出した距離が微小な所定値以下であるかどうかを判定する。ジェスチャー検知部409は、算出した距離が微小な所定値以下であると判定した場合(S643でYESの場合)、S644に処理を進める。S644において、ジェスチャー検知部409は、指先が書画台204へタッチした、タッチジェスチャーありと判定し、S605に処理を進める。   Next, in S643, the gesture detection unit 409 determines whether the distance calculated in S642 is equal to or smaller than a minute predetermined value. If the gesture detection unit 409 determines that the calculated distance is less than or equal to the minute predetermined value (YES in S643), the process proceeds to S644. In S644, the gesture detection unit 409 determines that there is a touch gesture with the fingertip touching the document table 204, and the process proceeds to S605.

一方、上記S643において、ジェスチャー検知部409は、上記S642で算出した距離が微小な所定値以下でないと判定した場合(S643でNOの場合)、S645に処理を進める。S645において、ジェスチャー検知部409は、指先が移動したジェスチャー(タッチはしていないが指先が書画台204上に存在するジェスチャー)と判定し、S605に処理を進める。   On the other hand, in S643, when the gesture detection unit 409 determines that the distance calculated in S642 is not less than or equal to the minute predetermined value (NO in S643), the process proceeds to S645. In S645, the gesture detection unit 409 determines that the gesture is a gesture in which the fingertip has moved (a gesture in which the fingertip is present on the document table 204 without touching), and the process proceeds to S605.

S605において、ジェスチャー検知部409は、上記S644、S645又はS646で判定したジェスチャーをメイン制御部402へ通知し、S602へ処理を戻し、ジェスチャー検知処理を繰り返す。
なお、ここでは一本指でのジェスチャー検知について説明を行ったが、複数の指あるいは複数の手でのジェスチャー検知に応用することも可能である。
In S605, the gesture detection unit 409 notifies the main control unit 402 of the gesture determined in S644, S645, or S646, returns the process to S602, and repeats the gesture detection process.
In addition, although the gesture detection with one finger was described here, it can be applied to gesture detection with a plurality of fingers or a plurality of hands.

<物体検知部の処理>
図7A、図7Bは、物体検知部410の処理を説明する図である。
図7Aの(a)、(b)は、物体検知部410の処理の詳細を説明するフローチャートである。図7A(a)、(b)のフローチャートに示す処理は、物体検知部410により実行される。即ち、図7A(a)、(b)に示す処理は、CPU302がHDD305に格納されるカメラスキャナ101の制御用プログラムをRAM303にロードして実行することにより実現される。
また、図7Bの(c)〜(i)は、状態管理テーブルの状態を例示する図である。
<Processing of object detection unit>
7A and 7B are diagrams illustrating the processing of the object detection unit 410.
FIGS. 7A and 7B are flowcharts illustrating details of the processing of the object detection unit 410. FIG. The processing shown in the flowcharts of FIGS. 7A (a) and 7 (b) is executed by the object detection unit 410. That is, the processing shown in FIGS. 7A and 7B is realized when the CPU 302 loads the control program for the camera scanner 101 stored in the HDD 305 to the RAM 303 and executes it.
Moreover, (c)-(i) of FIG. 7B is a figure which illustrates the state of a state management table.

物体検知部410は、処理を開始すると、図7A(a)のS701において、初期化処理(S711〜S713)を行う。以下、初期化処理について詳細に説明する。   When the processing is started, the object detection unit 410 performs initialization processing (S711 to S713) in S701 in FIG. 7A (a). Hereinafter, the initialization process will be described in detail.

S711において、物体検知部410は、距離画像取得部408からカメラ画像と距離画像をそれぞれ1フレーム取得する。
次に、S712において、物体検知部410は、データ管理部405を介して、上記S711で取得したカメラ画像を、書画台背景カメラ画像/前フレームカメラ画像/直前静止カメラ画像としてHDD305にそれぞれ保存する。また、物体検知部410は、上記S711で取得した距離画像も同様に、書画台背景距離画像/前フレーム距離画像/直前静止距離画像としてHDD305に保存する。なお、以後の説明において、書画台背景画像/前フレーム画像/直前静止画像と記載した場合には、カメラ画像と距離画像の両方を含むものとする。
次に、S713において、物体検知部410は、状態管理テーブルを初期化し、データ管理部405を介して、RAM303へ保存する。
In step S711, the object detection unit 410 acquires one frame each of the camera image and the distance image from the distance image acquisition unit 408.
Next, in S712, the object detection unit 410 stores the camera image acquired in S711 through the data management unit 405 in the HDD 305 as a document table background camera image / front frame camera image / previous still camera image. . Similarly, the object detection unit 410 stores the distance image acquired in S711 in the HDD 305 as the document table background distance image / the previous frame distance image / the previous still distance image. In the following description, when the document table background image / the previous frame image / the immediately preceding still image is described, both the camera image and the distance image are included.
Next, in S713, the object detection unit 410 initializes the state management table and stores it in the RAM 303 via the data management unit 405.

以下、状態管理テーブルについて詳細に説明する。
図7Bの(c)〜(i)に示すように、状態管理テーブルは、書画台管理テーブルと物体管理テーブルを含む。書画台管理テーブルでは、書画台204上から検知された物体数(objNums)と書画台204上の状態を記録する。また、物体管理テーブルでは、物体ごとに、物体の状態(移動中/静止/原稿検出済など)や、物体の位置・大きさ(幅、高さ等)を含む情報を管理する。これ以外にも状態管理テーブルには、物体に関連する情報を保持することが可能である。
図7B(c)は、初期化処理後の状態管理テーブルを示しており、物体数(objNums)に「0」が設定され、物体管理テーブル内は空欄となっている。
Hereinafter, the state management table will be described in detail.
As shown in (c) to (i) of FIG. 7B, the state management table includes a document table management table and an object management table. In the document table management table, the number of objects (objNums) detected from the document table 204 and the state on the document table 204 are recorded. The object management table manages information including the state of the object (moving / still / document detected, etc.) and the position / size (width, height, etc.) of the object for each object. In addition to this, the state management table can hold information related to the object.
FIG. 7B (c) shows the state management table after the initialization process, where “0” is set to the number of objects (objNums), and the object management table is blank.

続いて、S702において、物体検知部410は、物体検知メイン処理(S721〜S725)を行い、書画台204上での物体の動きを検知する。以下、詳細に説明する。
S721において、物体検知部410は、距離画像取得部408からカメラ画像と距離画像をそれぞれ1フレーム取得する。以後の説明において、現フレーム画像と記載した場合には、本ステップで取得したカメラ画像と距離画像と両方を含むものとする。
Subsequently, in S702, the object detection unit 410 performs object detection main processing (S721 to S725), and detects the movement of the object on the document table 204. Details will be described below.
In S721, the object detection unit 410 acquires one frame each of the camera image and the distance image from the distance image acquisition unit 408. In the following description, when it is described as the current frame image, it includes both the camera image and the distance image acquired in this step.

次に、S722において、物体検知部410は、上記S702で取得したカメラ画像および距離画像を用いて物体検知処理を行う。ここで、図7A(b)を用いて物体検知処理について詳細に説明する。   Next, in S722, the object detection unit 410 performs an object detection process using the camera image and the distance image acquired in S702. Here, the object detection process will be described in detail with reference to FIG. 7A (b).

図7A(b)のS731において、物体検知部410は、上記S702で取得したカメラ画像および距離画像と、書画台背景画像との差分値を算出する。そこで、物体検知部410は、カメラ画像および距離画像それぞれにおいて、上記S712で保存された書画台背景画像と、上記S721で撮影された現フレーム画像との差分2値画像を生成する。なお、背景差分2値画像中の黒画素部分は画像変化量がない、即ち物体が存在していない部分を表している。また、背景差分2値画像中の白画素部分は画像変化量がある、即ち物体が存在している部分であることを示している。   In S731 of FIG. 7A (b), the object detection unit 410 calculates a difference value between the camera image and distance image acquired in S702 and the document table background image. Therefore, the object detection unit 410 generates a binary difference image between the document table background image stored in S712 and the current frame image captured in S721 in each of the camera image and the distance image. The black pixel portion in the background difference binary image represents a portion where there is no image change amount, that is, no object exists. Further, the white pixel portion in the background difference binary image indicates that there is an image change amount, that is, a portion where an object exists.

次に、S732において、物体検知部410は、前フレームでの処理において静止物体が検知されている、あるいは上記S731で算出した距離背景差分画像での差分値が予め決めておいた所定値以上かどうかに基づき、物体の検知を判定する。物体検知部410は、書画台204上に物体が存在しない(検知していない)と判定した場合(S732でNOの場合)、S733に処理を進める。なお、S733以降の処理については後述する。   Next, in S732, the object detection unit 410 detects whether a stationary object has been detected in the processing in the previous frame, or whether the difference value in the distance background difference image calculated in S731 is equal to or greater than a predetermined value. Based on whether or not, the detection of the object is determined. If the object detection unit 410 determines that no object is present (not detected) on the document table 204 (NO in S732), the process proceeds to S733. The processing after S733 will be described later.

一方、物体検知部410は、書画台204上に物体が存在する(検知した)と判定した場合(S732でYESの場合)、S737に処理を進める。   On the other hand, when the object detection unit 410 determines that an object is present (detected) on the document table 204 (YES in S732), the process proceeds to S737.

S737において、物体検知部410は、上記S731で生成した背景差分画像を基にして物体数の増減の判定を行う。物体検知部410は、物体数が増減したと判定した場合(S737でYESの場合)、S738に処理を進める。   In S737, the object detection unit 410 determines whether to increase or decrease the number of objects based on the background difference image generated in S731. If the object detection unit 410 determines that the number of objects has increased or decreased (YES in S737), the process proceeds to S738.

S738において、物体検知部410は、上記S731で検出された書画台背景画像の差分領域が直前フレームで検出された物体と同一か否かを判定することで、新規物体か否かを判定する。即ち、直前フレームでは物体が検出されていない領域より物体が検出されたことによる物体数の増加は、新規に書画台204上にフレームインした物体によるものと判断する。この場合、物体検知部410は、新規物体を検出したと判定し(S738でYES)、S739に処理を進める。S739において、物体検知部410は、上記S738のフレームイン判定結果を受け、物体フレームインイベントを発行する。この場合、物体検知部410は、S736において、図7B(d)に示すように物体のフレームイン情報および物体の位置情報などを書き込むことで状態管理テーブルを更新して、図7A(b)の処理を終了する。   In step S738, the object detection unit 410 determines whether the difference area of the document table background image detected in step S731 is the same as the object detected in the immediately preceding frame, thereby determining whether the object is a new object. That is, it is determined that the increase in the number of objects due to the detection of an object from a region where no object has been detected in the immediately preceding frame is due to a newly framed object on the document table 204. In this case, the object detection unit 410 determines that a new object has been detected (YES in S738), and the process proceeds to S739. In S739, the object detection unit 410 receives the frame-in determination result in S738 and issues an object frame-in event. In this case, in step S736, the object detection unit 410 updates the state management table by writing the object frame-in information and the object position information as shown in FIG. The process ends.

一方、直前フレームで検知されていた物体が分離・統合したことによる物体数の増減は、書画台204上に物体を載置するために手を放した、あるいは載置されていた物体を掴んだなどの要因によるものであると考えられる。この場合、物体検知部410は、新規物体を検出していないと判定し(S738でNO)、S736に処理を進め、図7B(f)に示すように分離・統合した物体情報を書き込むことで状態管理テーブルを更新して、図7A(b)の処理を終了する。   On the other hand, the increase / decrease in the number of objects due to the separation / integration of the objects detected in the previous frame released the hand to place the object on the document table 204 or grabbed the object that was placed. This is thought to be due to factors such as. In this case, the object detection unit 410 determines that a new object is not detected (NO in S738), proceeds to S736, and writes the separated / integrated object information as shown in FIG. 7B (f). The state management table is updated, and the process of FIG. 7A (b) is terminated.

また、上記S737において、物体検知部410は、物体数が増減していないと判定した場合(S737でNOの場合)、S740に処理を進める。
S740において、物体検知部410は、カメラ画像および距離画像それぞれで、後述するS724(図7A(a))で保存された前フレーム画像と、上記S721で撮影された現フレーム画像との差分画像を生成する。そして、物体検知部410は、所定値によって2値化処理を行うことで差分値を算出する。
If the object detection unit 410 determines in S737 that the number of objects has not increased or decreased (NO in S737), the process proceeds to S740.
In S740, the object detection unit 410 obtains a difference image between the previous frame image stored in S724 (FIG. 7A (a)) described later and the current frame image captured in S721 in each of the camera image and the distance image. Generate. Then, the object detection unit 410 calculates a difference value by performing binarization processing with a predetermined value.

次に、S741において、物体検知部410は、上記S740で算出した差分値が予め決めておいた所定値未満かどうかを判定する。物体検知部410は、算出した差分値が所定値以上であると判定した場合(S741でNOの場合)、S736に処理を進め、図7B(e)に示すように状態管理テーブルの物体の位置情報などを更新して、図7A(b)の処理を終了する。   In step S741, the object detection unit 410 determines whether the difference value calculated in step S740 is less than a predetermined value. If the object detection unit 410 determines that the calculated difference value is equal to or greater than the predetermined value (NO in S741), the object detection unit 410 proceeds to S736, and the position of the object in the state management table as shown in FIG. 7B (e) Information etc. are updated and the process of FIG. 7A (b) is complete | finished.

一方、物体検知部410は、算出した差分値が所定値未満であると判定した場合(S741でYESの場合)、S742に処理を進める。
S742において、物体検知部410は、上記S740が連続してYESとなった回数から、算出した差分値が所定値未満の状態(つまり書画台204上の物体が静止した状態)が、予め決めておいたフレーム数続いたかどうかを判定する。物体検知部410は、差分値が所定値未満の状態が所定フレーム数続いていないと判定した場合(S742でNOの場合)、S736へ進み、図7B(g)に示すように状態管理テーブルの物体の位置情報などを更新して、図7A(b)の処理を終了する。
On the other hand, when the object detection unit 410 determines that the calculated difference value is less than the predetermined value (YES in S741), the process proceeds to S742.
In S742, the object detection unit 410 determines in advance that the calculated difference value is less than a predetermined value (that is, the object on the document table 204 is stationary) from the number of times that the above S740 is YES. It is determined whether the number of frames that have been kept continues. When the object detection unit 410 determines that the state in which the difference value is less than the predetermined value does not continue for the predetermined number of frames (NO in S742), the object detection unit 410 proceeds to S736 and stores the state management table as illustrated in FIG. The object position information and the like are updated, and the process of FIG. 7A (b) is terminated.

一方、上記S742において、物体検知部410は、差分値が所定値未満の状態が所定フレーム数続いたと判定した場合(S742でYESの場合)、書画台204上の物体が静止したと判断し、S743に処理を進める。   On the other hand, when the object detection unit 410 determines in S742 that the difference value is less than the predetermined value for a predetermined number of frames (YES in S742), the object detection unit 410 determines that the object on the document table 204 is stationary, Proceed to S743.

S743において、物体検知部410は、カメラ画像および距離画像それぞれにおいて、直前静止画像と現フレーム画像との差分画像を生成し、所定値によって2値化処理を行い、直前静止画像との差分値を算出する。   In S743, the object detection unit 410 generates a difference image between the previous still image and the current frame image in each of the camera image and the distance image, performs binarization processing with a predetermined value, and calculates the difference value from the previous still image. calculate.

次に、S744において、物体検知部410は、上記S743で算出した差分値が予め決めておいた所定値以上かどうかを判定する。物体検知部410は、算出した差分値が所定値未満と判定した場合(S744でNOの場合)、直前の静止状態から変化がないと判断し、S745に処理を進める。S745では、物体検知部410は、上記S742及びS744において、直前の静止状態と同じ状態での物体静止であると判断されたことを受け、物体静止イベントを再発行し、S736に処理を進める。この場合、S736において、物体検知部410は、S745で発行された物体静止イベントを受け、図7B(h)に示すように状態管理テーブルを更新して、図7A(b)の処理を終了する。   In step S744, the object detection unit 410 determines whether the difference value calculated in step S743 is equal to or greater than a predetermined value. If the object detection unit 410 determines that the calculated difference value is less than the predetermined value (NO in S744), the object detection unit 410 determines that there is no change from the immediately preceding stationary state, and proceeds to S745. In S745, the object detection unit 410 receives the determination that the object is stationary in the same state as the previous stationary state in S742 and S744, reissues the object stationary event, and advances the process to S736. In this case, in S736, the object detection unit 410 receives the object stationary event issued in S745, updates the state management table as shown in FIG. 7B (h), and ends the processing in FIG. 7A (b). .

一方、上記S744において、物体検知部410は、算出した差分値が所定値以上と判定した場合(S744でYESの場合)、S746に処理を進める。   On the other hand, in S744, when the object detection unit 410 determines that the calculated difference value is equal to or greater than the predetermined value (YES in S744), the process proceeds to S746.

S746において、物体検知部410は、上記S742およびS744において、直前の静止状態とは異なる状態での物体静止であると判断したことを受け、物体静止イベントを発行する。
さらに、S747において、物体検知部410は、データ管理部405を介して、現フレームのカメラ画像および距離画像を、直前静止カメラ画像および直前静止距離画像としてHDD305に保存し、S736に処理を進める。この場合、S736において、物体検知部410は、S746で発行された物体静止イベントを受け、図7B(h)に示すように状態管理テーブルを更新して、図7A(b)の処理を終了する。
In S746, the object detection unit 410 determines that the object is stationary in a state different from the previous stationary state in S742 and S744, and issues an object stationary event.
Furthermore, in S747, the object detection unit 410 stores the camera image and distance image of the current frame in the HDD 305 as the immediately preceding still camera image and the immediately preceding still distance image via the data management unit 405, and advances the process to S736. In this case, in S736, the object detection unit 410 receives the object stationary event issued in S746, updates the state management table as shown in FIG. 7B (h), and ends the processing in FIG. 7A (b). .

また、上記S732において、物体検知部410は、書画台204上に物体が存在しない(検知していない)と判定した場合(S732でNOの場合)、S733に処理を進める。
S733において、物体検知部410は、直前のフレームにおいて移動物体が検知中であったかを確認することで、フレームアウト判定処理を行う。即ち、物体検知部410は、直前フレームで移動物体を検知していなかった場合には、書画台204上に物体が無い状態が続いている(即ちフレームアウトでない)と判定し(S733でNOと判定し)、図7A(b)の処理を終了する。
If the object detection unit 410 determines in S732 that an object is not present (not detected) on the document table 204 (NO in S732), the process proceeds to S733.
In S733, the object detection unit 410 performs a frame-out determination process by confirming whether a moving object is being detected in the immediately preceding frame. In other words, if the moving object is not detected in the previous frame, the object detection unit 410 determines that there is no object on the document table 204 (that is, it is not out of frame) (NO in S733). And the process of FIG. 7A (b) is terminated.

一方、上記S733において、物体検知部410は、直前フレームで移動物体を検知していた場合には、直前まで検出された移動物体がフレームアウトしたと判定し(S733でYESと判定し)、S734に処理を進める。   On the other hand, in S733, when the moving object is detected in the immediately preceding frame, the object detecting unit 410 determines that the moving object detected up to the previous frame is out of frame (determined as YES in S733), and S734. Proceed with the process.

S734において、物体検知部410は、上記S733のフレームアウト判定結果を受け、物体フレームアウトイベントを発行する。次に、S735において、物体検知部410は、データ管理部405を介して、現フレームのカメラ画像および距離画像を、直前静止カメラ画像および直前静止距離画像としてHDD305にそれぞれ保存する。なお、物体検知部410は、本ステップにおいて、さらに現フレーム画像を書画台背景画像として更新してもよい。またこの場合、S736において、物体検知部410は、図7B(i)に示すように物体のフレームアウト情報を書き込むことで状態管理テーブルを更新する。あるいは、図7B(c)に示すように状態管理テーブルを初期化してもよい。状態管理テーブルの更新後、図7A(b)の処理を終了する。
図7A(b)の処理を終了すると、図7A(a)の処理に戻る。
In S734, the object detection unit 410 receives the frame-out determination result in S733 and issues an object frame-out event. Next, in S735, the object detection unit 410 stores the camera image and the distance image of the current frame in the HDD 305 as the immediately preceding still camera image and the immediately preceding still distance image via the data management unit 405, respectively. In this step, the object detection unit 410 may further update the current frame image as the document table background image. In this case, in step S736, the object detection unit 410 updates the state management table by writing the object frame-out information as shown in FIG. 7B (i). Alternatively, the state management table may be initialized as shown in FIG. 7B (c). After updating the state management table, the processing in FIG. 7A (b) is terminated.
When the process of FIG. 7A (b) is completed, the process returns to the process of FIG. 7A (a).

図7A(a)のS723において、物体検知部410は、上記S722(即ち図7A(b)の物体検知処理)で発行されたイベントを、メイン制御部402へ通知する。なお、同一フレーム内で複数の物体検知イベントが発行された場合には、物体検知部410は、全ての物体検知イベントをメイン制御部402へ通知する。   In S723 of FIG. 7A (a), the object detection unit 410 notifies the main control unit 402 of the event issued in S722 (that is, the object detection process of FIG. 7A (b)). When a plurality of object detection events are issued in the same frame, the object detection unit 410 notifies the main control unit 402 of all object detection events.

次に、S724において、物体検知部410は、データ管理部405を介して、上記S721で取得したカメラ画像および距離画像を、前フレームカメラ画像および前フレーム距離画像としてHDD305に保存する。   Next, in S724, the object detection unit 410 stores the camera image and distance image acquired in S721 through the data management unit 405 in the HDD 305 as the previous frame camera image and the previous frame distance image.

次に、S725において、物体検知部410は、物体検知処理の終了判定を行い、終了判定がなされるまで上記S721〜S725の処理を繰り返すように制御する。なお、システムの終了はUI画面上に投射表示された終了ボタン(不図示)の操作、カメラスキャナ101の本体の電源ボタン(不図示)の押下などにより行われ、メイン制御部402から通知されるものとする。   Next, in S725, the object detection unit 410 performs an end determination of the object detection process, and controls to repeat the processes of S721 to S725 until an end determination is made. The system is terminated by operating an end button (not shown) projected and displayed on the UI screen, pressing a power button (not shown) on the main body of the camera scanner 101, and the like, and is notified from the main control unit 402. Shall.

<スキャン処理部の説明>
図8A、図8B、図8Cは、スキャン処理部411が実行する書籍原稿スキャン処理を説明する図である。
図8A(a)、(b)及び図8B(c)は、スキャン処理部411が実行する書籍原稿スキャン処理の詳細を説明するフローチャートである。図8A(a)、(b)及び図8B(c)のフローチャートに示す処理は、スキャン処理部411により実行される。即ち、図8A(a)、(b)及び図8B(c)に示す処理は、CPU302がHDD305に格納されるカメラスキャナ101の制御用プログラムをRAM303にロードして実行することにより実現される。
また、図8Cの(d)〜(k)は、書籍原稿スキャン処理を説明するための模式図である。
<Description of Scan Processing Unit>
8A, 8B, and 8C are diagrams for explaining book document scanning processing executed by the scanning processing unit 411. FIG.
8A (a), 8 (b), and 8B (c) are flowcharts illustrating details of the book document scan process executed by the scan processing unit 411. FIG. The processing shown in the flowcharts of FIGS. 8A (a), (b) and FIG. 8B (c) is executed by the scan processing unit 411. 8A (a), (b), and FIG. 8B (c) are realized by the CPU 302 loading the control program for the camera scanner 101 stored in the HDD 305 into the RAM 303 and executing it.
Further, (d) to (k) of FIG. 8C are schematic diagrams for explaining book document scanning processing.

スキャン処理部411は、処理を開始すると、図8A(a)のS801において、カメラ画像取得部407、距離画像取得部408を用いて、カメラ部202からカメラ画像を、距離画像センサ部208から距離画像を、それぞれ1フレームずつ取得する。   When the processing is started, the scan processing unit 411 uses the camera image acquisition unit 407 and the distance image acquisition unit 408 in S801 of FIG. 8A to transmit a camera image from the camera unit 202 and a distance from the distance image sensor unit 208. One image is acquired for each frame.

上記S801で得られるカメラ画像の例を図8C(d)に示す。
図8C(d)に示す例では、書画台204と撮影対象書籍861を含むカメラ画像851が得られている。
An example of the camera image obtained in S801 is shown in FIG.
In the example shown in FIG. 8C (d), a camera image 851 including a document table 204 and a photographing target book 861 is obtained.

また、上記S801で得られた距離画像の例を図8C(e)に示す。
図8C(e)に示す例では、距離画像センサ部208に近い方が濃い色であらわされており、距離画像センサ部208から対象物体862上の各画素への距離が含まれる距離画像852が得られている。また、図8C(e)において、距離画像センサ部208からの距離が書画台204よりも遠い画素については白で表されており、対象物体862の書画台204に接している部分(対象物体862では右側のページ)も同じく白色となる。
An example of the distance image obtained in S801 is shown in FIG. 8C (e).
In the example shown in FIG. 8C (e), a color closer to the distance image sensor unit 208 is represented by a darker color, and a distance image 852 including the distance from the distance image sensor unit 208 to each pixel on the target object 862 is displayed. Has been obtained. In FIG. 8C (e), pixels whose distance from the distance image sensor unit 208 is farther than the document table 204 are represented in white, and the portion of the target object 862 that is in contact with the document table 204 (target object 862). Then the page on the right side is also white.

次に、S802において、スキャン処理部411は、上記S801で取得したカメラ画像と距離画像から書画台204上に載置された書籍物体の3次元点群を算出する処理を行う。
次に、S803において、スキャン処理部411は、上記S801取得したカメラ画像と上記S802で算出した3次元点群から、書籍画像のゆがみ補正処理を行い、2次元の書籍画像を生成する。以下、上記S802およびS803の処理について図8A(b)、図8B(c)を用いて詳細に説明する。
Next, in S802, the scan processing unit 411 performs a process of calculating a three-dimensional point group of the book object placed on the document table 204 from the camera image and the distance image acquired in S801.
Next, in S803, the scan processing unit 411 performs a distortion correction process on the book image from the camera image acquired in S801 and the three-dimensional point group calculated in S802, and generates a two-dimensional book image. Hereinafter, the processes of S802 and S803 will be described in detail with reference to FIGS. 8A (b) and 8B (c).

まず、S802の書籍物体3次元点群算出処理について、図8A(b)のフローチャートを用いて説明する。
スキャン処理部411は、書籍物体3次元点群算出処理を開始すると、S811にて、カメラ画像851と書画台背景カメラ画像との画素毎の差分を算出して二値化を行い、図8C(f)のように物体領域863が黒で示されるカメラ差分画像853を生成する。
First, the book object three-dimensional point group calculation process in S802 will be described with reference to the flowchart of FIG. 8A (b).
When the book object three-dimensional point cloud calculation process is started, the scan processing unit 411 calculates a difference for each pixel between the camera image 851 and the document table background camera image in S811, and performs binarization. As shown in f), the camera difference image 853 in which the object region 863 is shown in black is generated.

次に、S812において、スキャン処理部411は、カメラ差分画像853を、カメラ座標系から距離画像センサ座標系への変換を行い、図8C(g)のように距離画像センサ部208からみた物体領域864を含むカメラ差分画像854を生成する。   In step S812, the scan processing unit 411 converts the camera difference image 853 from the camera coordinate system to the distance image sensor coordinate system, and the object region viewed from the distance image sensor unit 208 as illustrated in FIG. 8C (g). A camera difference image 854 including 864 is generated.

次に、S813において、スキャン処理部411は、距離画像と書画台背景距離画像との画素毎の差分を算出して二値化を行い、図8C(h)のように物体領域865が黒で示される距離差分画像855を生成する。ここで、対象物体861の書画台204と同じ色で有る部分については、画素値の差が小さくなるためカメラ差分画像854中の物体領域864に含まれなくなる場合がある。また、対象物体862の書画台204と高さが変わらない部分については距離画像センサ部208からの距離値が書画台204と差が小さいため、距離差分画像855中の物体領域865には含まれない場合がある。   Next, in step S813, the scan processing unit 411 calculates a difference for each pixel between the distance image and the document table background distance image, performs binarization, and the object region 865 is black as illustrated in FIG. 8C (h). The distance difference image 855 shown is generated. Here, the portion of the target object 861 that has the same color as the document table 204 may not be included in the object region 864 in the camera difference image 854 because the difference in pixel value is small. In addition, the portion of the target object 862 whose height does not change from the drawing table 204 is not included in the object region 865 in the distance difference image 855 because the distance value from the distance image sensor unit 208 is small from the drawing table 204. There may not be.

そこで、S814において、スキャン処理部411は、カメラ差分画像854と距離差分画像855の和をとって図8C(i)に示す物体領域画像856を生成し、物体領域866を得る。ここで物体領域866は、書画台204と比べて色が異なるか又は高さが異なる領域となり、カメラ差分画像853中の物体領域863か距離差分画像855中の物体領域865のいずれか片方のみを使った場合よりも、より正確に物体領域を表している。   Therefore, in S814, the scan processing unit 411 generates the object region image 856 shown in FIG. 8C (i) by taking the sum of the camera difference image 854 and the distance difference image 855 to obtain the object region 866. Here, the object area 866 is an area having a different color or a different height from the document table 204, and only one of the object area 863 in the camera difference image 853 and the object area 865 in the distance difference image 855 is displayed. It represents the object area more accurately than if it was used.

次に、S815において、スキャン処理部411は、距離画像852から物体領域画像856中の物体領域866のみを抽出する。物体領域画像856は距離画像センサ座標系であるため、距離画像852から物体領域画像856中の物体領域866のみを抽出することが可能である。   Next, in S815, the scan processing unit 411 extracts only the object region 866 in the object region image 856 from the distance image 852. Since the object region image 856 is a distance image sensor coordinate system, only the object region 866 in the object region image 856 can be extracted from the distance image 852.

次に、S816において、スキャン処理部411は、上記S815で抽出した距離画像を直交座標系に変換することにより図8C(j)に示した3次元点群867を生成する。この3次元点群867が書籍物体の3次元点群であり、書籍物体3次元点群算出処理(S802)を終了する。   Next, in S816, the scan processing unit 411 generates the three-dimensional point group 867 shown in FIG. 8C (j) by converting the distance image extracted in S815 to an orthogonal coordinate system. This three-dimensional point group 867 is a three-dimensional point group of the book object, and the book object three-dimensional point group calculation process (S802) ends.

次に、図8B(c)のフローチャートを用いて、上記S803の書籍画像ゆがみ補正処理について説明する。
スキャン処理部411は、書籍画像ゆがみ補正処理を開始すると、S821において、物体領域画像856を距離センサ画像座標系からカメラ座標系に変換する。
Next, the book image distortion correction process in S803 will be described with reference to the flowchart of FIG. 8B (c).
When the book image distortion correction process is started, the scan processing unit 411 converts the object region image 856 from the distance sensor image coordinate system to the camera coordinate system in S821.

次に、S822において、スキャン処理部411は、カメラ画像851から物体領域画像856中の物体領域866をカメラ座標系に変換したものを用いて物体領域を抽出する。
次に、S823において、スキャン処理部411は、抽出した物体領域画像を書画台平面へ射影変換する。
Next, in S822, the scan processing unit 411 extracts the object region using the camera image 851 converted from the object region 866 in the object region image 856 into the camera coordinate system.
Next, in S823, the scan processing unit 411 performs projective transformation of the extracted object region image onto the document table plane.

次に、S824において、スキャン処理部411は、射影変換した物体領域画像を矩形近似し、その矩形が水平になるように回転することによって、図8C(k)の書籍画像858を生成する。書籍画像858は近似矩形の片方の編がX軸に平行となっているため、以降書籍画像858に対してX軸方向へのゆがみ補正処理を行う。
次に、S825において、スキャン処理部411は、書籍画像858の最も左端の点をPとする(図8C(k)の点P)。
Next, in S824, the scan processing unit 411 generates a book image 858 in FIG. 8C (k) by approximating the object region image obtained by the projective transformation to a rectangle and rotating the rectangle so as to be horizontal. In the book image 858, since one of the approximate rectangles is parallel to the X axis, the book image 858 is subjected to distortion correction processing in the X axis direction thereafter.
Next, in S825, the scan processing unit 411 sets the leftmost point of the book image 858 as P (point P in FIG. 8C (k)).

次に、S826において、スキャン処理部411は、書籍物体の3次元点群867から点Pの高さ(図8C(k)のh1)を取得する。
次に、S827において、スキャン処理部411は、書籍画像858の点Pに対してX軸方向に所定の距離(図8C(k)のx1)離れた点をQとする(図8C(k)の点Q)。
次に、S828において、スキャン処理部411は、3次元点群867から点Qの高さ(図8C(k)のh2)を取得する。
次に、S829において、スキャン処理部411は、式(4)を用いて、点Pと点Qの書籍物体上での距離(図8C(g)のl1)を直線近似で算出する。
Next, in S826, the scan processing unit 411 acquires the height of the point P (h1 in FIG. 8C (k)) from the three-dimensional point group 867 of the book object.
Next, in S827, the scan processing unit 411 sets Q as a point separated from the point P of the book image 858 by a predetermined distance (x1 in FIG. 8C (k)) in the X-axis direction (FIG. 8C (k)). Point Q).
Next, in S828, the scan processing unit 411 acquires the height of the point Q (h2 in FIG. 8C (k)) from the three-dimensional point group 867.
Next, in S829, the scan processing unit 411 calculates the distance between the point P and the point Q on the book object (l1 in FIG. 8C (g)) by linear approximation using the equation (4).

Figure 2018191195
Figure 2018191195

次に、S830において、スキャン処理部411は、上記S869で算出した距離l1でPQ間の距離を補正し、図8C(k)における画像869上の点P'と点Q'の位置に画素をコピーする。
次に、S831において、スキャン処理部411は、処理を行った点Qを点Pとする(点Qを点Pに入れ替える)。
Next, in S830, the scan processing unit 411 corrects the distance between the PQs by the distance l1 calculated in S869, and sets pixels at the positions of the points P ′ and Q ′ on the image 869 in FIG. 8C (k). make a copy.
In step S831, the scan processing unit 411 sets the processed point Q as a point P (replaces the point Q with the point P).

次に、S832において、スキャン処理部411は、ゆがみ補正処理を全ての点について終えたかどうかを判断する。スキャン処理部411は、未だ全ての点について終えていないと判定した場合(S832でNOの場合)、上記S826に処理を戻し、同じ処理を行う。これにより、図8C(k)の点Qと点Rの間の補正を実行することができ、画像869上の点Q'と点R'の画素とする。この処理を全画素について繰り返すことにより、画像869はゆがみ補正後の画像となる。   In step S832, the scan processing unit 411 determines whether the distortion correction processing has been completed for all points. If the scan processing unit 411 determines that all the points have not been completed (NO in S832), the process returns to S826, and the same processing is performed. Thereby, the correction between the point Q and the point R in FIG. 8C (k) can be executed, and the pixel of the point Q ′ and the point R ′ on the image 869 is obtained. By repeating this process for all pixels, the image 869 becomes an image after distortion correction.

また、上記S832において、スキャン処理部411は、ゆがみ補正処理を全ての点について終えたと判定した場合(S832でYESの場合)、書籍物体のゆがみ補正処理(S803)を終了する。
以上のようにして、上記S802、S803の処理を行ってゆがみ補正を行った書籍画像を生成することができる。
If the scan processing unit 411 determines in step S832 that the distortion correction processing has been completed for all points (YES in S832), the book object distortion correction processing (S803) ends.
As described above, it is possible to generate a book image that has been subjected to the distortion correction by performing the processes of S802 and S803.

以下、図8A(a)の説明に戻る。
ゆがみ補正を行った書籍画像の生成後、スキャン処理部411は、S804において、上記S802及びS803で生成した書籍画像に階調補正を行う。
次に、S805において、スキャン処理部411は、上記階調補正を行った書籍画像に対して、予め決めておいた画像フォーマット(例えばJPEG、TIFF、PDF等)に合わせて圧縮およびファイルフォーマット変換を行う。
次に、S806において、スキャン処理部411は、上記変換を行った画像データを、データ管理部405を介して、HDD305の所定の領域へファイルとして保存し、スキャン処理部411で実行する書籍原稿スキャン処理を終了する。
Hereinafter, the description returns to FIG. 8A (a).
After generating the book image subjected to the distortion correction, the scan processing unit 411 performs gradation correction on the book image generated in S802 and S803 in S804.
In step S805, the scan processing unit 411 performs compression and file format conversion on the book image on which the above-described gradation correction has been performed in accordance with a predetermined image format (for example, JPEG, TIFF, PDF, or the like). Do.
In step S806, the scan processing unit 411 stores the converted image data as a file in a predetermined area of the HDD 305 via the data management unit 405, and scans the book document executed by the scan processing unit 411. End the process.

<メイン制御部402の説明>
以下、図9の操作説明図と、図10のフローチャート図を用いて、メイン制御部402が実行する優先機能切り替え処理について説明する。
<Description of Main Control Unit 402>
The priority function switching process executed by the main control unit 402 will be described below with reference to the operation explanatory diagram of FIG. 9 and the flowchart of FIG.

図9は、実施例1において、スキャンを実行する際のUI表示と操作者901の操作の様子の一例を示す図である。
図9(a)にスキャン開始時のUI画面の一例を示す。UI画面には、メイン制御部402の制御により、操作指示メッセージ902、スキャン終了ボタン903、スキャン実行ボタン904が投影表示されている。
FIG. 9 is a diagram illustrating an example of a UI display and an operation state of the operator 901 when executing a scan in the first embodiment.
FIG. 9A shows an example of a UI screen at the start of scanning. An operation instruction message 902, a scan end button 903, and a scan execution button 904 are projected and displayed on the UI screen under the control of the main control unit 402.

図9(b)に示すように、操作者901がスキャン実行ボタン904を押下すると、メイン制御部402は、図9(c)に示すような、スキャン実行画面に表示を遷移させる。スキャン実行画面では、メイン制御部402は、操作指示メッセージ902を更新すると共に、プロジェクタ207を用いて、スキャン原稿を載置するための原稿載置領域905を投影表示する。   As shown in FIG. 9B, when the operator 901 presses the scan execution button 904, the main control unit 402 changes the display to a scan execution screen as shown in FIG. 9C. On the scan execution screen, the main control unit 402 updates the operation instruction message 902 and uses the projector 207 to project and display a document placement area 905 for placing a scanned document.

操作者901が、図9(d)に示すように、操作指示メッセージ902に従い原稿載置領域905に原稿906を載置する。図9(e)〜(g)に示すように、メイン制御部402は、原稿載置完了を検知すると、スキャン処理を実行し、原稿を取り除くように操作指示メッセージ902を更新する。   As shown in FIG. 9D, the operator 901 places the document 906 in the document placement area 905 in accordance with the operation instruction message 902. As shown in FIGS. 9E to 9G, when the main control unit 402 detects completion of document placement, the main control unit 402 executes scan processing and updates the operation instruction message 902 so as to remove the document.

そして、図9(h)に示すように、操作者901が原稿906を除去すると、メイン制御部402は、図9(i)に示すようなスキャンを続行するか終了するかを選択する確認画面へ表示を遷移させる。なお、スキャンを続行する場合には、操作者901はスキャン実行ボタン904を押下する。   Then, as shown in FIG. 9 (h), when the operator 901 removes the document 906, the main control unit 402 selects whether to continue or end scanning as shown in FIG. 9 (i). Change the display to. When scanning is continued, the operator 901 presses a scan execution button 904.

図10(a)は、実施例1において、メイン制御部402が実行する処理の一例を説明するフローチャートである。また、図10(b)は、実施例1において、ユーザインタフェース部403が実行する優先機能判定処理の一例を説明するフローチャートである。即ち、図10(a)、(b)に示す処理は、CPU302がHDD305に格納されるカメラスキャナ101の制御用プログラムをRAM303にロードして実行することにより実現される。   FIG. 10A is a flowchart illustrating an example of processing executed by the main control unit 402 in the first embodiment. FIG. 10B is a flowchart illustrating an example of priority function determination processing executed by the user interface unit 403 in the first embodiment. That is, the processing shown in FIGS. 10A and 10B is realized when the CPU 302 loads the control program for the camera scanner 101 stored in the HDD 305 to the RAM 303 and executes it.

メイン制御部402は、処理を開始すると、図10(a)のS1001において、ユーザインタフェース部403に要求して、図10(b)に示す優先機能判定処理を実行させる。   When the process is started, the main control unit 402 requests the user interface unit 403 to execute the priority function determination process shown in FIG. 10B in S1001 of FIG.

図10(b)のS1011において、ユーザインタフェース部403は、アプリケーションから優先機能切り替え指示の有無を判定する。このアプリケーションは、図9に示したスキャンを実行する際のUI等のUI表示を行うためのものである。また、このアプリケーションは、例えば、カメラスキャナ101の起動時や、所定のボタン(不図示)が操作された際などに実行開始されるものとする。さらに、このアプリケーションは、CPU302がHDD305に格納される該アプリケーションの実行モジュールをRAM303にロードして実行することにより実行される。   In S1011 of FIG. 10B, the user interface unit 403 determines whether there is a priority function switching instruction from the application. This application is for displaying a UI such as a UI when executing the scan shown in FIG. In addition, for example, the application is started when the camera scanner 101 is activated or when a predetermined button (not illustrated) is operated. Further, this application is executed by the CPU 302 loading an execution module of the application stored in the HDD 305 to the RAM 303 and executing it.

図9に示した一連の処理において、図9(a)、(b)及び(i)ではボタン操作を検知する必要がある。このため、図9(a)、(b)及び(i)の画面が表示されている状態では、ジェスチャー検知処理の優先指示がアプリケーションより通知されている必要がある。一方、図9(c)〜(h)では、操作者901の原稿載置を検知する必要がある。このため、図9(c)〜(h)の画面が表示されている状態では、物体検知モードの優先指示がアプリケーションより通知されている必要がある。なお、アプリケーションからの優先機能の通知は必要なタイミングで行えばよいため、図9(a)を表示するタイミングや、図9(b)から図9(c)、あるいは図9(h)から図9(i)に遷移するタイミングで通知すればよい。なお、アプリケーションからの優先機能切り替え指示は、画面遷移時に限定されるものではなく、例えば優先機能選択ボタンを表示しておき、操作者901がUIボタンを押下したことを受けて優先機能切り替え指示を通知するなどしても構わない。このように、優先機能切り替え指示は、UI表示の遷移、及びUI表示に対する操作等に基づいて通知される。   In the series of processes shown in FIG. 9, it is necessary to detect button operations in FIGS. 9A, 9B, and 9I. For this reason, in the state in which the screens of FIGS. 9A, 9B, and 9I are displayed, it is necessary that a priority instruction for gesture detection processing be notified from the application. On the other hand, in FIGS. 9C to 9H, it is necessary to detect the document placement of the operator 901. For this reason, in the state in which the screens of FIGS. 9C to 9H are displayed, it is necessary that a priority instruction in the object detection mode is notified from the application. In addition, since notification of the priority function from the application may be performed at a necessary timing, the timing at which FIG. 9A is displayed, FIG. 9B to FIG. 9C, or FIG. 9H to FIG. What is necessary is just to notify at the timing which changes to 9 (i). The priority function switching instruction from the application is not limited to the screen transition. For example, a priority function selection button is displayed, and the priority function switching instruction is issued when the operator 901 presses the UI button. You may notify. As described above, the priority function switching instruction is notified based on the UI display transition, the UI display operation, and the like.

上記S1011において、ユーザインタフェース部403は、優先機能切り替え指示があると判定した場合(S1011でYESの場合)、S1012に処理を進める。S1012において、ユーザインタフェース部403は、指定された検知機能への切り替えを指示する。そして、優先機能判定処理(図10(b))を終了する。   In S1011, if the user interface unit 403 determines that there is a priority function switching instruction (YES in S1011), the process proceeds to S1012. In step S1012, the user interface unit 403 instructs switching to the designated detection function. Then, the priority function determination process (FIG. 10B) ends.

一方、上記S1011において、ユーザインタフェース部403は、優先機能切り替え指示がないと判定した場合(S1011でNOの場合)、優先機能切り替えを指示することなく、優先機能判定処理(図10(b))を終了する。   On the other hand, in S1011, if the user interface unit 403 determines that there is no priority function switching instruction (NO in S1011), the priority function determination process (FIG. 10B) without instructing priority function switching. Exit.

以下、図10(a)の説明に戻る。
上記S1001の優先機能判定処理(図10(b))が終了すると、メイン制御部402は、S1002に処理を進める。S1002において、メイン制御部402は、優先機能切り替え指示の有無に基づき、優先機能切り替え処理の必要性を判定する。メイン制御部402は、優先機能切り替え処理がないと判定した場合(S1002でNOの場合)、S1003に処理を進める。
Hereinafter, the description returns to FIG.
When the priority function determination process in S1001 (FIG. 10B) ends, the main control unit 402 advances the process to S1002. In S1002, the main control unit 402 determines the necessity of priority function switching processing based on the presence / absence of a priority function switching instruction. If the main control unit 402 determines that there is no priority function switching process (NO in S1002), the process proceeds to S1003.

S1003において、メイン制御部402は、ジェスチャー検知部409からジェスチャーイベントの有無を判定し、ジェスチャーに対応した処理を実行する。例えば、図9(b)の場合には、スキャン終了ボタン903あるいはスキャン実行ボタン904へのタッチ操作の有無を判定する。そして、スキャン実行ボタン904が押されたと判断された場合には、スキャン実行画面へ遷移するように判定し、ユーザインタフェース部403に対して図9(c)のようなスキャン画面を表示するように指示を行う。ユーザインタフェース部403は、プロジェクタ207によってUI画面を書画台204上へ投影表示させる。   In S1003, the main control unit 402 determines the presence / absence of a gesture event from the gesture detection unit 409, and executes a process corresponding to the gesture. For example, in the case of FIG. 9B, the presence / absence of a touch operation on the scan end button 903 or the scan execution button 904 is determined. If it is determined that the scan execution button 904 has been pressed, it is determined to transition to the scan execution screen, and the scan screen as shown in FIG. 9C is displayed on the user interface unit 403. Give instructions. The user interface unit 403 causes the projector 207 to project and display the UI screen on the document table 204.

次に、S1004において、メイン制御部402は、物体検知部410からの物体検知イベントの有無を判定し、物体検知イベントに対応した処理を実行する。例えば、図9(e)の場合には、原稿の静止イベントを受け、スキャン処理部411に対してスキャン実行指示を行う。   Next, in S1004, the main control unit 402 determines whether there is an object detection event from the object detection unit 410, and executes processing corresponding to the object detection event. For example, in the case of FIG. 9E, a scan execution instruction is given to the scan processing unit 411 in response to a stationary event of the document.

一方、上記S1002において、メイン制御部402は、優先機能切り替え処理があったと判定した場合(S1002でYESの場合)、S1005に処理を進める。
S1005において、メイン制御部402は、優先機能切り替え処理を実行する。ここでは、メイン制御部402は、ジェスチャー検知及び物体検知に用いる距離画像センサ部208の撮影パラメータ(例えば露光時間)を変更する。
On the other hand, if the main control unit 402 determines in S1002 that priority function switching processing has been performed (YES in S1002), the process proceeds to S1005.
In S1005, the main control unit 402 executes priority function switching processing. Here, the main control unit 402 changes imaging parameters (for example, exposure time) of the distance image sensor unit 208 used for gesture detection and object detection.

例えば、ジェスチャー優先が指示されていた場合には、露光時間を短くすることでフレームレートを向上させることができ、滑らかなジェスチャー検知を実現することができる。一方、物体検知優先が指示されていた場合には、露光時間を短くすることでコントラストが低い検知対象物であってもより鮮明に撮影でき、物体検知精度の向上を実現することができる。なお、各機能の性能を最大限発揮できるような撮影画像が取得できるのであれば、撮影パラメータは露光に限定されるものではない。例えば、前記撮影パラメータは、ISO感度や、絞りに対応するパラメータであってもよい。   For example, when gesture priority is instructed, the frame rate can be improved by shortening the exposure time, and smooth gesture detection can be realized. On the other hand, when the object detection priority is instructed, the exposure time can be shortened, so that even a detection object with a low contrast can be photographed more clearly, and the object detection accuracy can be improved. Note that the shooting parameters are not limited to exposure as long as a captured image that can maximize the performance of each function can be acquired. For example, the shooting parameter may be a parameter corresponding to ISO sensitivity or aperture.

次に、S1006において、メイン制御部402は、物体検知処理用の背景画像を更新する。具体的には、上述の図7A(a)のS712、図7A(b)のS724、S735、S747でそれぞれHDD305に保存した、書画台背景カメラ画像/前フレームカメラ画像/直前静止カメラ画像を更新する。これにより、S1005で撮影パラメータを変更したことによって取得できるカメラ画像が大幅に変わったとしても、物体検知イベントとして誤検知することを防止することができる。   Next, in S1006, the main control unit 402 updates the background image for object detection processing. Specifically, the document table background camera image / front frame camera image / previous still camera image stored in the HDD 305 in S712 in FIG. 7A (a) and S724, S735, and S747 in FIG. To do. Thereby, even if the camera image that can be acquired by changing the shooting parameter in S1005 changes significantly, it is possible to prevent erroneous detection as an object detection event.

上記S1004又はS1006の処理の後、メイン制御部402は、S1007に処理を進める。
S1007において、メイン制御部402は、アプリケーションが終了されたか否かを判定する。なお、アプリケーションの終了はUI画面上に投射表示された終了ボタン(例えば、図9スキャン終了ボタン903)の操作、カメラスキャナ101の本体の電源ボタン(図示なし)の押下などにより行われるものとする。
After the process of S1004 or S1006, the main control unit 402 advances the process to S1007.
In step S1007, the main control unit 402 determines whether the application has been terminated. The application is terminated by operating an end button (for example, scan end button 903 in FIG. 9) projected on the UI screen, pressing a power button (not shown) on the main body of the camera scanner 101, or the like. .

上記S1007において、メイン制御部402は、まだアプリケーションが終了されていないと判定した場合(S1007でNOの場合)、上記S1001に処理を戻す。
一方、メイン制御部402は、アプリケーションが終了されたと判定した場合(S1007でYES場合)、図10(a)の処理を終了する。
In S1007, if the main control unit 402 determines that the application has not yet been terminated (NO in S1007), the process returns to S1001.
On the other hand, if the main control unit 402 determines that the application has been terminated (YES in S1007), the process of FIG.

以上のように、実施例1によれば、UI表示を行うアプリケーションからの優先機能切り替え指示に応じて、指定された優先機能に応じた撮影パラメータに変更することにより、各機能に適したカメラ画像が撮影できるようになる。これにより、アプリケーションの要求するタイミング(必要なタイミング)で各検知機能の処理性能を最大限に高めることができるようになる。この結果、良好な結果を得るための最適な画像が異なるような複数の検知機能を1つの撮影デバイスで精度よく実現することが可能になる。   As described above, according to the first embodiment, a camera image suitable for each function is obtained by changing to a shooting parameter corresponding to a designated priority function in response to a priority function switching instruction from an application that performs UI display. Will be able to shoot. This makes it possible to maximize the processing performance of each detection function at the timing required by the application (necessary timing). As a result, it is possible to accurately realize a plurality of detection functions with different optimal images for obtaining good results with a single photographing device.

上記実施例1では、UI表示を行うアプリケーションから画面遷移時や操作者901によるボタン押下などのタイミングにおいて通知される優先機能切り替え指示によって、優先機能の切り替え処理を行う構成について説明した。本実施例2では、UI画面が遷移しないタイミングでも優先機能を動的に切り替えることが可能な仕組みについてさらに説明する。   In the first embodiment, the configuration has been described in which priority function switching processing is performed in accordance with a priority function switching instruction that is notified at the time of screen transition or when the button is pressed by the operator 901 from an application that performs UI display. In the second embodiment, a mechanism capable of dynamically switching the priority function even when the UI screen does not change will be further described.

以下、図11の操作説明図と、図12のフローチャート図を用いて、実施例2において、メイン制御部402が実行する優先機能切り替え処理について説明する。   The priority function switching process executed by the main control unit 402 in the second embodiment will be described below with reference to the operation explanatory diagram of FIG. 11 and the flowchart of FIG.

図11は、実施例2において、スキャンを実行する際のUI表示と操作者901の操作の様子の一例を示す図である。なお、図9と同一のものには同一の符号を付してある。
図11(a)にスキャン開始時のUI画面の一例を示す。UI画面には、操作指示メッセージ902、スキャン終了ボタン903、原稿載置領域905が投影表示されている。
FIG. 11 is a diagram illustrating an example of a UI display and an operation state of the operator 901 when executing a scan in the second embodiment. In addition, the same code | symbol is attached | subjected to the same thing as FIG.
FIG. 11A shows an example of a UI screen at the start of scanning. An operation instruction message 902, a scan end button 903, and a document placement area 905 are projected and displayed on the UI screen.

操作者901は、操作指示メッセージ902に従い、図11(b)〜(d)に示すように、原稿載置領域905内に原稿906を載置する。メイン制御部402は、原稿載置完了を検知すると、図11(d)に示すようにスキャン処理が実行できる状態であると判断し、操作指示メッセージ902を更新し、スキャン実行ボタン904を表示する。   In accordance with the operation instruction message 902, the operator 901 places the document 906 in the document placement area 905 as shown in FIGS. When the main control unit 402 detects completion of document placement, the main control unit 402 determines that the scan process can be executed as shown in FIG. 11D, updates the operation instruction message 902, and displays a scan execution button 904. .

そして、図11(e)に示すように操作者901がスキャン実行ボタン904を押下すると、メイン制御部402は、図11(f)に示すようにスキャン処理を開始する。スキャン処理が終了すると、メイン制御部402は、図11(g)に示すようにスキャン原稿を取り除くように操作指示メッセージ902を更新し、スキャン実行ボタン904を非表示にする。   Then, when the operator 901 presses the scan execution button 904 as shown in FIG. 11 (e), the main control unit 402 starts the scanning process as shown in FIG. 11 (f). When the scanning process ends, the main control unit 402 updates the operation instruction message 902 so as to remove the scanned document as shown in FIG. 11G, and hides the scan execution button 904.

そして、図11(h)に示すように操作者901が原稿を除去すると、メイン制御部402は、図11(i)に示すようなスキャン開始時のUI画面へ表示を遷移させる。   When the operator 901 removes the document as shown in FIG. 11 (h), the main control unit 402 changes the display to a UI screen at the start of scanning as shown in FIG. 11 (i).

図12(a)は、実施例2において、メイン制御部402が実行する処理の一例を説明するフローチャートである。また、図12(b)は、実施例2において、ユーザインタフェース部403が実行する優先機能判定処理の一例を説明するフローチャートである。即ち、図12(b)に示す処理は、CPU302がHDD305に格納されるカメラスキャナ101の制御用プログラムをRAM303にロードして実行することにより実現される。なお、実施例1と同様の処理については同じステップ番号を付与し、詳細な説明は割愛する。   FIG. 12A is a flowchart illustrating an example of processing executed by the main control unit 402 in the second embodiment. FIG. 12B is a flowchart illustrating an example of priority function determination processing executed by the user interface unit 403 in the second embodiment. In other words, the processing shown in FIG. 12B is realized by the CPU 302 loading a control program for the camera scanner 101 stored in the HDD 305 into the RAM 303 and executing it. Note that the same step numbers are assigned to processes similar to those in the first embodiment, and detailed description thereof is omitted.

メイン制御部402は、処理を開始すると、図12(a)のS1201において、UI画面の更新の有無を確認する。上記S1201において、メイン制御部402は、UI画面が更新されたと判定した場合(S1201でYESの場合)、S1202へ処理を進める。   When starting the process, the main control unit 402 confirms whether or not the UI screen has been updated in S1201 of FIG. In S1201, if the main control unit 402 determines that the UI screen has been updated (YES in S1201), the process proceeds to S1202.

S1202において、メイン制御部402は、UI画面上の各領域に対して優先機能を割り当てる。例えば図11(a)において、スキャン終了ボタン903に対してはジェスチャー機能優先を、原稿載置領域905に対しては物体検知優先を割り当て、この領域内における物体検知イベントを受信するように設定する。それ以外の領域に関しては所定の機能を割り当てることが可能であるが、基本的にはジェスチャー機能優先を割り当てることが望ましい。上記S1202の処理の後、S1203へ処理を進める。   In S1202, the main control unit 402 assigns a priority function to each area on the UI screen. For example, in FIG. 11A, a gesture function priority is assigned to the scan end button 903, an object detection priority is assigned to the document placement area 905, and an object detection event in this area is set to be received. . Although it is possible to assign a predetermined function to other areas, basically it is desirable to assign a gesture function priority. After the process of S1202, the process proceeds to S1203.

一方、上記S1201において、メイン制御部402は、UI画面が更新されていないと判定した場合(S1201でNOの場合)、S1203へ処理を進める。   On the other hand, if the main control unit 402 determines in S1201 that the UI screen has not been updated (NO in S1201), the process proceeds to S1203.

S1201において、メイン制御部402は、ユーザインタフェース部403に、図12(b)に示す優先機能判定処理を実行させる。   In S1201, the main control unit 402 causes the user interface unit 403 to execute the priority function determination process shown in FIG.

図12(b)のS1211において、メイン制御部402は、物体検知部410からの物体フレームインイベントを受信したか否かを判定する。物体検知部410は、物体検知優先領域への物体フレームインを検知した場合に物体フレームインイベントをメイン制御部402に通知する。例えば、図11(c)に示す状態では、物体検知部410が、物体検知優先領域として設定されている原稿載置領域905内において物体フレームインを検知して物体フレームインイベントをメイン制御部402に通知する。メイン制御部402は、物体検知部410から物体フレームインイベントを受信したと判定した場合(S1211でYESの場合)、S1212へ処理を進める。S1212において、メイン制御部402は、原稿載置領域905内での物体検知精度を高めるために、物体検知優先に切り替えるように指示し、優先機能判定処理(図12(b))を終了する。   In S1211 of FIG. 12B, the main control unit 402 determines whether or not an object frame-in event from the object detection unit 410 has been received. The object detection unit 410 notifies the main control unit 402 of an object frame-in event when detecting an object frame-in to the object detection priority area. For example, in the state shown in FIG. 11C, the object detection unit 410 detects the object frame-in in the document placement area 905 set as the object detection priority area and sends the object frame-in event to the main control unit 402. Notify If the main control unit 402 determines that an object frame-in event has been received from the object detection unit 410 (YES in S1211), the main control unit 402 advances the process to S1212. In step S1212, the main control unit 402 instructs to switch to object detection priority in order to increase the object detection accuracy in the document placement area 905, and the priority function determination process (FIG. 12B) ends.

また、例えば図11(a)〜図11(b)に示す状態では、原稿載置領域905内において物体フレームインを検知しないため、物体検知部410から物体フレームインイベントは通知されない。上記S1211において、メイン制御部402は、物体フレームインイベントを受信してないと判定した場合(S1211でNOの場合)、S1213へ処理を進める。   Further, for example, in the state shown in FIGS. 11A to 11B, the object frame-in event is not notified from the object detection unit 410 because the object frame-in is not detected in the document placement area 905. In S1211, if the main control unit 402 determines that an object frame-in event has not been received (NO in S1211), the process proceeds to S1213.

S1213において、メイン制御部402は、物体検知部410からの物体フレームアウトイベントあるいは物体静止イベントを受信したか否かを判定する。物体検知部410は、物体検知優先領域からの物体フレームアウトを検知した場合に物体フレームアウトイベントをメイン制御部402に通知する。また、物体検知部410は、物体検知優先領域での物体静止を検知した場合に物体静止イベントをメイン制御部402に通知する。例えば、図11(d)に示す状態では、物体検知部410が、原稿載置領域905内において物体静止を検知して物体静止イベントをメイン制御部402に通知する。また、図11(h)に示す状態では、物体検知部410が、原稿載置領域905内において物体フレームアウトを検知して物体フレームアウトイベントをメイン制御部402に通知する。メイン制御部402は、物体検知部410から、物体フレームアウトイベントあるいは物体静止イベントを受信したと判定した場合(S1213でYesの場合)、S1214へ処理を進める。   In step S1213, the main control unit 402 determines whether an object frame-out event or an object stationary event has been received from the object detection unit 410. The object detection unit 410 notifies the main control unit 402 of an object frame-out event when detecting an object frame-out from the object detection priority area. In addition, the object detection unit 410 notifies the main control unit 402 of an object still event when detecting object still in the object detection priority area. For example, in the state shown in FIG. 11D, the object detection unit 410 detects an object still in the document placement area 905 and notifies the main control unit 402 of an object still event. In the state shown in FIG. 11H, the object detection unit 410 detects an object frame-out in the document placement area 905 and notifies the main control unit 402 of an object frame-out event. If the main control unit 402 determines that an object frame-out event or an object stationary event has been received from the object detection unit 410 (Yes in S1213), the main control unit 402 advances the process to S1214.

S1214において、メイン制御部402は、スキャン終了ボタン903やスキャン実行ボタン904へのジェスチャー検知精度を高めるために、ジェスチャー機能優先に切り替えるように指示し、優先機能判定処理(図12(b))を終了する。   In S1214, the main control unit 402 instructs to switch to the gesture function priority in order to increase the gesture detection accuracy to the scan end button 903 and the scan execution button 904, and performs the priority function determination process (FIG. 12B). finish.

また、図11(e)〜図11(g)までの状態においては、物体検知部410は、原稿載置領域905内において物体フレームアウトも物体静止も検知しないため、物体検知部410から物体フレームアウトイベント及び物体静止イベントのいずれも通知されない。メイン制御部402は、物体検知部410から、物体フレームアウトイベント及び物体静止イベントのいずれも受信していないと判定した場合(S1213でNOの場合)、そのまま優先機能判定処理(図12(b))を終了する。   Further, in the states from FIG. 11E to FIG. 11G, the object detection unit 410 detects neither object frame out nor object stationary in the document placement area 905. Neither an out event nor an object stationary event is notified. If the main control unit 402 determines that neither an object frame-out event nor an object stationary event has been received from the object detection unit 410 (NO in S1213), the priority function determination process (FIG. 12B) ) Ends.

以下、図12(a)の説明に戻る。
上記S1203の処理の後、メイン制御部402は、S1002に処理を進める。なお、以下の処理に関しては実施例1と同様であるため説明を省略する。
Hereinafter, the description returns to FIG.
After the process of S1203, the main control unit 402 advances the process to S1002. Since the following processing is the same as that of the first embodiment, description thereof is omitted.

以上のように、実施例2によれば、UI画面内の領域に応じて優先する機能を設定しておき、物体検知優先領域内で移動している物体の検知有無によって優先する機能を動的に切り替える。これにより、同一UI画面内においても、必要なタイミングで各機能の性能を最大限発揮できるようになる。この結果、良好な結果を得るための最適な画像が異なるような複数の検知機能を1つの撮影デバイスで精度よく実現することが可能になる。   As described above, according to the second embodiment, a function that is prioritized according to the area in the UI screen is set, and the function that is prioritized depending on whether or not an object moving within the object detection priority area is detected is dynamically set. Switch to. Thereby, even within the same UI screen, the performance of each function can be maximized at the necessary timing. As a result, it is possible to accurately realize a plurality of detection functions with different optimal images for obtaining good results with a single photographing device.

上記実施例2では、UI画面の遷移がないタイミングでも優先機能を動的に切り替える構成について説明した。本実施例3では、UI画面内の領域の配置の仕方に依存せず優先機能を動的に切り替え可能な構成についてさらに説明する。   In the second embodiment, the configuration in which the priority function is dynamically switched even when there is no UI screen transition has been described. In the third embodiment, a configuration in which the priority function can be dynamically switched without depending on the arrangement of areas in the UI screen will be further described.

以下、図13を用いて、実施例3において、メイン制御部402が実行する優先機能切り替え処理について説明する。
図13は、実施例3の優先機能切り替え処理を説明する図である。
図13の(a)〜(c)に実施例3におけるスキャンを実行する際のUI表示と操作者901の操作の様子の一例を示す。なお、図11と同一のものには同一の符号を付してある。
The priority function switching process executed by the main control unit 402 in the third embodiment will be described below using FIG.
FIG. 13 is a diagram illustrating priority function switching processing according to the third embodiment.
FIGS. 13A to 13C show an example of a UI display and an operation state of the operator 901 when executing a scan in the third embodiment. In addition, the same code | symbol is attached | subjected to the same thing as FIG.

図13(a)では、上述の原稿載置領域905の上部に、ホーム画面へ遷移するためのホームボタン1301が配置されている。なお、ホームボタン1301には、図12(a)のS1202において、ジェスチャー検知優先が設定されているものとする。   In FIG. 13A, a home button 1301 for transitioning to the home screen is arranged above the document placement area 905 described above. It is assumed that gesture detection priority is set for the home button 1301 in S1202 of FIG.

図13(b)では、操作者901が原稿載置領域905上へ原稿906を載置しようとしている様子を示している。また、図13(c)では、操作者901がホームボタン1301を押下する様子を示している。   FIG. 13B shows a state where the operator 901 is about to place the document 906 on the document placement area 905. FIG. 13C shows a state where the operator 901 presses the home button 1301.

図13(d)は、実施例3において、ユーザインタフェース部403が実行する優先機能判定処理の一例を説明するフローチャートである。即ち、図13(d)に示す処理は、CPU302がHDD305に格納されるカメラスキャナ101の制御用プログラムをRAM303にロードして実行することにより実現される。なお、図12と同様の処理については同じステップ番号を付与し、詳細な説明は割愛する。   FIG. 13D is a flowchart illustrating an example of the priority function determination process executed by the user interface unit 403 in the third embodiment. That is, the processing shown in FIG. 13D is realized by the CPU 302 loading the control program for the camera scanner 101 stored in the HDD 305 into the RAM 303 and executing it. Note that the same step numbers are assigned to processes similar to those in FIG. 12, and detailed description thereof is omitted.

図13(d)のS1211において、メイン制御部402は、物体フレームインイベントを受信していないと判定した場合(S1211でNOの場合)、S1311へ処理を進める。   In S1211 of FIG. 13D, when the main control unit 402 determines that an object frame-in event has not been received (NO in S1211), the process proceeds to S1311.

S1311において、メイン制御部402は、物体検知部410からの物体フレームアウトイベントを受信したか否かを判定する。メイン制御部402は、物体フレームアウトイベントを受信したと判定した場合(S1311でYESの場合)、S1214に処理を進め、ジェスチャー機能優先に切り替えるように指示する。   In step S1311, the main control unit 402 determines whether an object frame-out event has been received from the object detection unit 410. If the main control unit 402 determines that an object frame-out event has been received (YES in S1311), the main control unit 402 advances the processing to S1214, and instructs to switch to the gesture function priority.

一方、メイン制御部402は、物体フレームアウトイベントを受信していないと判定した場合(S1311でNOの場合)、S1312に処理を進める。   On the other hand, when determining that the object frame-out event has not been received (NO in S1311), the main control unit 402 advances the process to S1312.

S1312において、メイン制御部402は、物体検知部410からの物体移動イベントや物体静止イベントを解析し、検知された物体が物体検知優先領域をまたぐような位置で検知したか否かを判定する。物体検知部410は、物体検知優先領域での物体移動を検知した場合に物体移動イベントをメイン制御部402に通知する。例えば図13(b)に示す状態においては、検知されている物体は、物体検知優先領域である原稿載置領域905の一方向にのみ存在していることから、物体検知優先領域である原稿載置領域905に対する操作をしているものと判断する。この場合、メイン制御部402は、物体検知優先領域をまたぐような静止or移動を検知していないと判定する。メイン制御部402は、物体検知優先領域をまたぐような静止or移動を検知していないと判定した場合(S1312でNOの場合)、物体検知優先のまま優先機能判定処理(図13(d))を終了する。   In step S1312, the main control unit 402 analyzes the object movement event and the object stationary event from the object detection unit 410, and determines whether or not the detected object is detected at a position that crosses the object detection priority area. The object detection unit 410 notifies the main control unit 402 of an object movement event when detecting object movement in the object detection priority area. For example, in the state shown in FIG. 13B, since the detected object exists only in one direction of the document placement area 905 that is the object detection priority area, the document placement that is the object detection priority area. It is determined that an operation is performed on the placement area 905. In this case, the main control unit 402 determines that the stationary or movement that crosses the object detection priority area is not detected. When the main control unit 402 determines that a still or movement that crosses the object detection priority area has not been detected (NO in S1312), the priority function determination process with the object detection priority (FIG. 13D) Exit.

一方、例えば図13(c)に示す状態においては、操作者901の腕が、物体検知優先領域である原稿載置領域905を超えてホームボタン1301を押下しようとしており、物体検知優先領域である原稿載置領域905の二方向にまたがり物体が検知される。このため、メイン制御部402は、物体検知優先領域をまたぐような静止or移動を検知したと判定する。メイン制御部402は、物体検知優先領域をまたぐような静止or移動を検知したと判定した場合(S1312でYESの場合)、S1313に処理を進める。   On the other hand, for example, in the state shown in FIG. 13C, the arm of the operator 901 is about to press the home button 1301 beyond the document placement area 905 which is the object detection priority area, which is the object detection priority area. An object straddling the two directions of the document placement area 905 is detected. Therefore, the main control unit 402 determines that a stationary or movement that has crossed the object detection priority area has been detected. If the main control unit 402 determines that a still or movement that crosses the object detection priority area has been detected (YES in S1312), the main control unit 402 advances the process to S1313.

S1313において、メイン制御部402は、物体検知優先領域以外に他の優先機能を設定した領域が存在するかを確認する。メイン制御部402は、他の優先機能を設定した領域が存在しないと判定した場合(S1313でNOの場合)、そのまま優先機能判定処理(図13(d))を終了する。   In step S1313, the main control unit 402 confirms whether there is an area in which another priority function is set in addition to the object detection priority area. If the main control unit 402 determines that there is no area where another priority function is set (NO in S1313), the main function determination process ends (FIG. 13D).

一方、上記S1313において、メイン制御部402は、他の優先機能を設定した領域が存在すると判定した場合(S1313でYESの場合)、S1214に処理を進め、ジェスチャー検知優先への切り替えを指示する。例えば、図13(c)においては、ホームボタン1301に対してジェスチャー検知優先が設定されているため、メイン制御部402は、S1214において、ジェスチャー優先に切り替えるように指示する。これにより、ホームボタン1301への押下判定を最大性能で行うことができるようになる。   On the other hand, in S1313, if the main control unit 402 determines that there is an area for which another priority function is set (YES in S1313), the main control unit 402 advances the process to S1214 and instructs switching to gesture detection priority. For example, in FIG. 13C, since gesture detection priority is set for the home button 1301, the main control unit 402 instructs to switch to gesture priority in S1214. This makes it possible to determine whether the home button 1301 is pressed with the maximum performance.

以上のように、実施例3によれば、物体検知優先が設定された領域内における検出物体の位置関係を考慮して優先機能を切り替えることによって、UI領域の配置に関わらず各機能の性能を最大限発揮できるようになる。良好な結果を得るための最適な画像が異なるような複数の検知機能を1つの撮影デバイスで精度よく実現することが可能になる。   As described above, according to the third embodiment, by switching the priority function in consideration of the positional relationship of the detected object in the area where the object detection priority is set, the performance of each function is improved regardless of the arrangement of the UI area. You will be able to make the most of it. A plurality of detection functions such that optimum images for obtaining good results are different can be realized with high accuracy by one photographing device.

上記実施例2及び3では、物体検知部410で検知した物体検知優先領域内の物体検知イベントに基づいて優先機能の切り替え判定を行う構成について説明した。本実施例4では、ジェスチャー検知部409で検知したジェスチャーイベントに基づいて優先機能を切り替える仕組みについて説明する。   In the second and third embodiments, the configuration in which the priority function switching determination is performed based on the object detection event in the object detection priority area detected by the object detection unit 410 has been described. In the fourth embodiment, a mechanism for switching the priority function based on a gesture event detected by the gesture detection unit 409 will be described.

以下、図14を用いて、実施例4において、メイン制御部402が実行する優先機能切り替え処理について説明する。
図14は、実施例4の優先機能切り替え処理を説明する図である。
図14の(a),(b)に実施例4におけるスキャンを実行する際のUI表示と操作者901の操作の様子の一例を示す。なお、図11と同一のものには同一の符号を付してある。
The priority function switching process executed by the main control unit 402 in the fourth embodiment will be described below with reference to FIG.
FIG. 14 is a diagram illustrating the priority function switching process according to the fourth embodiment.
FIGS. 14A and 14B show an example of the UI display and the operation of the operator 901 when executing the scan in the fourth embodiment. In addition, the same code | symbol is attached | subjected to the same thing as FIG.

図14(a)では、原稿載置領域905内に原稿906が載置してある。図14(b)では、操作者901が原稿載置領域905上の原稿906に対して、下線描画やメモ書きなどのアノテーション付与のジェスチャー操作を行おうとしている様子を示している。   In FIG. 14A, a document 906 is placed in a document placement area 905. FIG. 14B shows a state where the operator 901 is about to perform an annotation giving gesture operation such as underline drawing or memo writing on the document 906 on the document placement area 905.

図14(c)は、実施例4において、ユーザインタフェース部403が実行する優先機能判定処理の一例を説明するフローチャートである。即ち、図14(c)に示す処理は、CPU302がHDD305に格納されるカメラスキャナ101の制御用プログラムをRAM303にロードして実行することにより実現される。なお、図12と同様の処理については同じステップ番号を付与し、詳細な説明は割愛する。   FIG. 14C is a flowchart illustrating an example of the priority function determination process executed by the user interface unit 403 in the fourth embodiment. In other words, the process shown in FIG. 14C is realized by the CPU 302 loading the control program for the camera scanner 101 stored in the HDD 305 into the RAM 303 and executing it. Note that the same step numbers are assigned to processes similar to those in FIG. 12, and detailed description thereof is omitted.

図14(c)のS1401において、メイン制御部402は、ジェスチャー検知部409からタッチイベントを受信したか否かを判定する。メイン制御部402は、タッチイベントを受信したと判定した場合(S1401でYESの場合)、S1402に処理を進める。   In S1401 of FIG. 14C, the main control unit 402 determines whether or not a touch event has been received from the gesture detection unit 409. If the main control unit 402 determines that a touch event has been received (YES in S1401), the main control unit 402 advances the process to S1402.

S1402において、メイン制御部402は、ジェスチャー検知部409が検知したタッチイベントの近傍に設定されている機能優先領域の種別を判定する。メイン制御部402は、タッチイベントの近傍にジェスチャー検知優先領域が設定されている、あるいは、物体検知優先領域の設定がないと判定した場合、S1214に処理を進め、ジェスチャー検知優先を指示する。そして、優先機能判定処理(図14(c))を終了する。例えば、図14(b)に示す原稿載置領域905内の原稿906の位置にジェスチャー検知優先領域を設定しておく。これにより、原稿906へのタッチ操作により、ジェスチャー検知優先に切り換える、図14(b)に示すようなジェスチャー操作を検知して原稿906へのアノテーション付与を実現することが可能となる。   In S1402, the main control unit 402 determines the type of the function priority area set in the vicinity of the touch event detected by the gesture detection unit 409. When determining that the gesture detection priority area is set in the vicinity of the touch event or that the object detection priority area is not set, the main control unit 402 advances the processing to S1214 and instructs the gesture detection priority. Then, the priority function determination process (FIG. 14C) ends. For example, a gesture detection priority area is set at the position of the original 906 in the original placement area 905 shown in FIG. As a result, it is possible to detect the gesture operation as shown in FIG. 14B and to give the annotation to the document 906 by switching to the gesture detection priority by the touch operation on the document 906.

一方、上記S1402において、メイン制御部402は、タッチイベントの近傍に物体検知優先領域が設定されていると判定した場合、メイン制御部402は、S1212に処理を進め、物体検知優先を指示する。そして、優先機能判定処理(図14(c))を終了する。   On the other hand, when the main control unit 402 determines in S1402 that the object detection priority area is set in the vicinity of the touch event, the main control unit 402 advances the processing to S1212 and instructs the object detection priority. Then, the priority function determination process (FIG. 14C) ends.

また、上記S1401において、メイン制御部402は、タッチイベントの受信を検知していないと判定した場合(S1401でNOの場合)、S1403に処理を進める。
S1403において、メイン制御部402は、現在のモードが物体検知優先機能か否かを判定する。例えば、S1212で物体検知優先に切り替えた後などは物体検知優先が設定されていると判定する。
In S1401, if the main control unit 402 determines that reception of a touch event has not been detected (NO in S1401), the process proceeds to S1403.
In S1403, the main control unit 402 determines whether or not the current mode is the object detection priority function. For example, it is determined that the object detection priority is set after switching to the object detection priority in S1212.

上記S1403において、メイン制御部402は、現在のモードが物体検知優先機能であると判定した場合(S1403でYESの場合)、S1404に処理を進める。
S1404において、メイン制御部402は、物体検知優先領域内において、物体検知部410から物体フレームアウトあるいは物体静止のイベントが検知されたか否かを判定する。
In S1403, if the main control unit 402 determines that the current mode is the object detection priority function (YES in S1403), the process proceeds to S1404.
In S1404, the main control unit 402 determines whether an object frame-out or object stationary event is detected from the object detection unit 410 within the object detection priority area.

上記S1404において、メイン制御部402は、物体フレームアウトあるいは物体静止のイベントが検知されたと判定した場合(S1404でYESの場合)、S1214に処理を進める。S1214において、メイン制御部402は、再びジェスチャー検知優先を指示し、優先機能判定処理(図14(c))を終了する。   In S1404, if the main control unit 402 determines that an object frame-out or object stationary event has been detected (YES in S1404), the process proceeds to S1214. In step S1214, the main control unit 402 instructs the gesture detection priority again, and ends the priority function determination process (FIG. 14C).

一方、上記S1404において、メイン制御部402は、物体フレームアウトあるいは物体静止のイベントが検知されていないと判定した場合(S1404でNOの場合)、そのまま優先機能判定処理(図14(c))を終了する。   On the other hand, in S1404, when the main control unit 402 determines that an object frame-out or object stationary event is not detected (NO in S1404), the priority function determination process (FIG. 14C) is performed as it is. finish.

以上のように、実施例4によれば、操作者901のタッチ操作が物体検知優先領域であるか否かを判定する。所定のジェスチャーが検知された領域の近傍に設定される機能優先領域の種別に基づいて優先する検知処理を判定する。これにより、ボタン等へのタッチイベントか、物体検知優先領域内に物体を載置する際に発生したタッチイベントであるかを判別できる。そして、物体載置の際のタッチイベントの場合には、物体位置が確定するまでの間、物体検知を優先することが可能になる。なお、ここではタッチイベントを用いて切り替えを行う方法を説明したが、その他のジェスチャー操作イベントを用いてもよい。この結果、検知に用いる撮影画像の特性の異なる複数の検知機能を1つの撮影デバイスで精度よく実現することが可能になる。   As described above, according to the fourth embodiment, it is determined whether or not the touch operation of the operator 901 is the object detection priority area. The priority detection process is determined based on the type of the function priority area set in the vicinity of the area where the predetermined gesture is detected. This makes it possible to determine whether the event is a touch event for a button or the like or a touch event that occurs when an object is placed in the object detection priority area. In the case of a touch event when placing an object, it is possible to prioritize object detection until the object position is determined. Although the method of switching using a touch event has been described here, other gesture operation events may be used. As a result, it is possible to accurately realize a plurality of detection functions having different characteristics of the captured image used for detection with one imaging device.

なお、上記実施例1〜4において、ジェスチャー検知機能モードと物体検知機能モードを動的に切り替える仕組みについて説明した。しかし、同様の目的が果たせるものであれば、切り替え判定方法はこれに限るものではない。例えば、ジェスチャー操作を指差し姿勢(所定の手の形状)で行うことを限定することにより、指差し姿勢であるか否かに基づいてジェスチャー検知機能と物体検知機能の切り替え処理を行うことも可能である。   In the first to fourth embodiments, the mechanism for dynamically switching between the gesture detection function mode and the object detection function mode has been described. However, the switching determination method is not limited to this as long as the same purpose can be achieved. For example, by limiting the gesture operation to the pointing posture (predetermined hand shape), it is also possible to switch between the gesture detection function and the object detection function based on whether or not it is the pointing posture It is.

また、上記各実施例では、ジェスチャー検知機能と物体検知機能を有し、優先する検知機能を判定し、優先する検知処理に応じた撮影パラメータに切り替える構成について説明した。しかし、検知機能はこれらに限定されるものではない。例えば、3つ以上の異なる検知機能を備える構成であってもよい。即ち、カメラスキャナ101が、撮影された画像データに基づいてそれぞれ異なる検知処理を行う複数の検知機能を有し、これらのうち優先する検知機能を判定し、優先する検知機能に応じた撮影パラメータに切り替えるように構成してもよい。   In each of the above-described embodiments, the configuration has been described in which the gesture detection function and the object detection function are provided, the priority detection function is determined, and the shooting parameter is switched to the priority detection process. However, the detection function is not limited to these. For example, the structure provided with three or more different detection functions may be sufficient. That is, the camera scanner 101 has a plurality of detection functions for performing different detection processes based on the captured image data, and determines a priority detection function among them, and sets the shooting parameters according to the priority detection function. You may comprise so that it may switch.

以上、各実施例では、優先する検知処理を判断し、それに応じて最適な画像が取得できるように撮影モード(本実施例では撮影パラメータ)を動的に変更する(即ち撮影特性を動的に変更する)。これにより、良好な結果を得るための最適な画像が異なるような複数の検知機能(例えば物体検知機能、ジェスチャー検知機能)を1つの撮影デバイスで精度よく実現することができるようになる。   As described above, in each embodiment, the priority detection process is determined, and the shooting mode (shooting parameter in this embodiment) is dynamically changed so that an optimal image can be acquired accordingly (that is, the shooting characteristics are dynamically changed). change). As a result, a plurality of detection functions (for example, an object detection function and a gesture detection function) in which optimum images for obtaining good results are different can be realized with high accuracy by one imaging device.

なお、上述した各種データの構成及びその内容はこれに限定されるものではなく、用途や目的に応じて、様々な構成や内容で構成されていてもよい。
以上、一実施形態について示したが、本発明は、例えば、システム、装置、方法、プログラムもしくは記憶媒体等としての実施態様をとることが可能である。具体的には、複数の機器から構成されるシステムに適用しても良いし、また、一つの機器からなる装置に適用しても良い。
また、上記各実施例を組み合わせた構成も全て本発明に含まれるものである。
In addition, the structure of the various data mentioned above and its content are not limited to this, You may be comprised with various structures and content according to a use and the objective.
Although one embodiment has been described above, the present invention can take an embodiment as, for example, a system, apparatus, method, program, or storage medium. Specifically, the present invention may be applied to a system composed of a plurality of devices, or may be applied to an apparatus composed of a single device.
Moreover, all the structures which combined said each Example are also contained in this invention.

(その他の実施例)
本発明は、上述の実施例の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
また、本発明は、複数の機器から構成されるシステムに適用しても、1つの機器からなる装置に適用してもよい。
本発明は上記実施例に限定されるものではなく、本発明の趣旨に基づき種々の変形(各実施例の有機的な組合せを含む)が可能であり、それらを本発明の範囲から除外するものではない。即ち、上述した各実施例及びその変形例を組み合わせた構成も全て本発明に含まれるものである。
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in the computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
Further, the present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device.
The present invention is not limited to the above embodiments, and various modifications (including organic combinations of the embodiments) are possible based on the spirit of the present invention, and these are excluded from the scope of the present invention. is not. That is, the present invention includes all the combinations of the above-described embodiments and modifications thereof.

204 書画台
208 距離画像センサ部
402 メイン制御部
409 ジェスチャー検知部
410 物体検知部
204 Document stand
208 Distance image sensor
402 Main control
409 Gesture detector
410 Object detection unit

Claims (11)

所定の撮影領域を撮影する撮影手段と、
前記撮影手段により撮影された画像データに基づいてそれぞれ異なる検知処理を行う複数の検知手段と、
前記複数の検知手段がそれぞれ行う検知処理のうち優先する検知処理を判定する判定手段と、
前記撮影手段の撮影モードを、前記判定手段により優先する検知処理と判定された検知処理に応じたモードに切り替える切り替え手段と、
を有することを特徴とする画像処理装置。
Photographing means for photographing a predetermined photographing region;
A plurality of detection means for performing different detection processes based on image data photographed by the photographing means;
A determination unit that determines a priority detection process among the detection processes performed by the plurality of detection units;
Switching means for switching the photographing mode of the photographing means to a mode according to the detection process determined as the detection process prioritized by the determination means;
An image processing apparatus comprising:
前記複数の検知手段は、ジェスチャーを検知する第1検知処理を行う第1検知手段と、前記撮影領域において物体の静止、移動又は除去がなされたことを検知する第2検知処理を行う第2検知手段とを含むことを特徴とする請求項1に記載の画像処理装置。   The plurality of detection means include a first detection means for performing a first detection process for detecting a gesture, and a second detection process for performing a second detection process for detecting that an object has been stopped, moved, or removed in the imaging region. The image processing apparatus according to claim 1, further comprising: means. 前記撮影領域に操作画面を表示する表示手段を有し、
前記判定手段は、前記撮影領域に表示される操作画面の遷移、及び前記操作画面に対する操作の少なくともいずれかに基づいて、優先する検知処理を判定することを特徴とする請求項2に記載の画像処理装置。
Display means for displaying an operation screen in the photographing area;
The image according to claim 2, wherein the determination unit determines a priority detection process based on at least one of a transition of an operation screen displayed in the imaging region and an operation on the operation screen. Processing equipment.
前記判定手段は、前記撮影領域の中に優先する検知処理を定義した領域を設定し、前記第2の検知処理を優先する領域内での移動物体の有無に基づいて優先する検知処理を判定することを特徴とする請求項2に記載の画像処理装置。   The determination means sets an area in which priority detection processing is defined in the imaging area, and determines priority detection processing based on the presence or absence of a moving object in the second priority detection area. The image processing apparatus according to claim 2. 前記判定手段は、前記撮影領域の中に優先する検知処理を定義した領域を設定し、前記第2の検知処理を優先する領域内での物体の位置に基づいて優先する検知処理を判定することを特徴とする請求項2に記載の画像処理装置。   The determination means sets an area in which priority detection processing is defined in the imaging area, and determines priority detection processing based on a position of an object in the area prioritizing the second detection processing. The image processing apparatus according to claim 2. 前記判定手段は、前記撮影領域の中に優先する検知処理を定義した優先領域を設定し、前記第1の検知処理で所定のジェスチャーが検知された領域の近傍に設定される前記優先領域に基づいて優先する検知処理を判定することを特徴とする請求項2に記載の画像処理装置。   The determination means sets a priority area defining a priority detection process in the imaging area, and is based on the priority area set in the vicinity of the area where a predetermined gesture is detected in the first detection process. The image processing apparatus according to claim 2, wherein a detection process to be prioritized is determined. 前記判定手段は、前記第1の検知処理で所定の手の形状が検知されたことに基づいて優先する検知処理を判定することを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the determination unit determines a priority detection process based on detection of a predetermined hand shape in the first detection process. 前記撮影手段は、設定される撮影パラメータに基づいて撮影を行うものであり、
前記撮影手段の撮影モードの切り替えは、前記撮影パラメータの切り替えであることを特徴とする請求項1〜7のいずれか1項に記載の画像処理装置。
The photographing means performs photographing based on set photographing parameters,
The image processing apparatus according to claim 1, wherein switching of the shooting mode of the shooting unit is switching of the shooting parameter.
前記撮影パラメータは、露光時間、ISO感度、絞りの少なくともいずれかを含むこと特徴とする請求項8に記載の画像処理装置。   The image processing apparatus according to claim 8, wherein the photographing parameter includes at least one of an exposure time, an ISO sensitivity, and an aperture. 所定の撮影領域を撮影する撮影手段と、前記撮影手段により撮影された画像データに基づいてそれぞれ異なる検知処理を行う複数の検知手段と、を有する画像処理装置の制御方法であって、
前記複数の検知手段がそれぞれ行う検知処理のうち優先する検知処理を判定する判定ステップと、
前記撮影手段の撮影モードを、前記判定ステップにて優先する検知処理と判定された検知処理に応じたモードに切り替える切り替えステップと、
を有することを特徴とする画像処理装置の制御方法。
An image processing apparatus control method comprising: an imaging unit that captures a predetermined imaging region; and a plurality of detection units that perform different detection processes based on image data captured by the imaging unit,
A determination step for determining a priority detection process among the detection processes performed by each of the plurality of detection units;
A switching step of switching the shooting mode of the shooting means to a mode according to the detection process determined as the priority of the detection process in the determination step;
A control method for an image processing apparatus, comprising:
コンピュータを、請求項1〜10のいずれか1項に記載の判定手段および切り替え手段として機能させるためのプログラム。   The program for functioning a computer as the determination means and switching means of any one of Claims 1-10.
JP2017093523A 2017-05-10 2017-05-10 Image processing apparatus, image processing apparatus control method, and program Pending JP2018191195A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017093523A JP2018191195A (en) 2017-05-10 2017-05-10 Image processing apparatus, image processing apparatus control method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017093523A JP2018191195A (en) 2017-05-10 2017-05-10 Image processing apparatus, image processing apparatus control method, and program

Publications (1)

Publication Number Publication Date
JP2018191195A true JP2018191195A (en) 2018-11-29

Family

ID=64480380

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017093523A Pending JP2018191195A (en) 2017-05-10 2017-05-10 Image processing apparatus, image processing apparatus control method, and program

Country Status (1)

Country Link
JP (1) JP2018191195A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023179840A (en) * 2022-06-08 2023-12-20 川崎重工業株式会社 Image generation device, object identification device, and image generation method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023179840A (en) * 2022-06-08 2023-12-20 川崎重工業株式会社 Image generation device, object identification device, and image generation method

Similar Documents

Publication Publication Date Title
JP2015210702A (en) Image processing apparatus and image processing method
US10254893B2 (en) Operating apparatus, control method therefor, and storage medium storing program
US9888209B1 (en) Remote communication system, method for controlling remote communication system, and storage medium
JP6381361B2 (en) DATA PROCESSING DEVICE, DATA PROCESSING SYSTEM, DATA PROCESSING DEVICE CONTROL METHOD, AND PROGRAM
JP2019020307A (en) Measuring device, measuring device control method and program
JP6584237B2 (en) Control device, control method, and program
JP6746419B2 (en) Information processing apparatus, control method thereof, and computer program
JP2016103137A (en) User interface system, image processor and control program
JP6399840B2 (en) Image processing apparatus, image processing method, and program
JP2015170907A (en) Scanner system, scanner system data processing method, and program
JP6289254B2 (en) Image processing apparatus, information processing method, and program
JP2018112894A (en) System and control method
JP2015198406A (en) Image reader, method, and program
US10116809B2 (en) Image processing apparatus, control method, and computer-readable storage medium, which obtains calibration image information with which to correct image data
JP3109580B2 (en) IMAGE INPUT DEVICE AND COMPUTER-READABLE RECORDING MEDIUM RECORDING IMAGE PROCESSING PROGRAM FOR IMAGE INPUT DEVICE
JP2017162126A (en) INPUT SYSTEM, INPUT METHOD, CONTROL PROGRAM, AND STORAGE MEDIUM
JP2018191195A (en) Image processing apparatus, image processing apparatus control method, and program
JP2018014572A (en) Information processing apparatus, image processing system, and program
JP6624861B2 (en) Image processing apparatus, control method, and program
JP2019016843A (en) Document reading device, control method of document reading device, and program
JP2018191258A (en) Image reading device, image reading method, and program
JP2019146127A (en) Image reading device, control method for the same and program
JP6203070B2 (en) Scanning system, control method therefor, and program
JP2017117372A (en) Operation device and control method of the same, and program
JP2016025383A (en) Image processing apparatus, control method, and program

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20180306