WO2019087331A1 - Reference position detection device and reference position detection method - Google Patents

Reference position detection device and reference position detection method Download PDF

Info

Publication number
WO2019087331A1
WO2019087331A1 PCT/JP2017/039578 JP2017039578W WO2019087331A1 WO 2019087331 A1 WO2019087331 A1 WO 2019087331A1 JP 2017039578 W JP2017039578 W JP 2017039578W WO 2019087331 A1 WO2019087331 A1 WO 2019087331A1
Authority
WO
WIPO (PCT)
Prior art keywords
keyboard
image data
reference position
position detection
unit
Prior art date
Application number
PCT/JP2017/039578
Other languages
French (fr)
Japanese (ja)
Inventor
大地 渡邉
Original Assignee
ヤマハ株式会社
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 ヤマハ株式会社 filed Critical ヤマハ株式会社
Priority to PCT/JP2017/039578 priority Critical patent/WO2019087331A1/en
Publication of WO2019087331A1 publication Critical patent/WO2019087331A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/18Selecting circuits

Abstract

This reference position detection device is provided with an acquisition unit, an extraction unit, an identification unit, and a detection unit. The acquisition unit acquires image data representing an image obtained by imaging a keyboard and an object on the keyboard. The extraction unit extracts image data corresponding to an area which includes white keys but not black keys from the image data acquired by the acquisition unit. The identification unit identifies the object on the keyboard on the basis of the luminance value of the image data extracted by the extraction unit. The detection unit detects, for the object identified by the identification unit, a reference position which has a prescribed positional relationship on the keyboard.

Description

基準位置検出装置および基準位置検出方法Reference position detection device and reference position detection method
 本発明は、鍵盤上の基準位置を検出する基準位置検出装置および基準位置検出方法に関する。 The present invention relates to a reference position detection device and a reference position detection method for detecting a reference position on a keyboard.
 電子鍵盤楽器に用いられる鍵域分割技術によれば、鍵盤が鍵域分割位置(スプリットポイント)で複数の鍵域に分割され、各鍵域に音色、音域または機能等の楽音制御特性が個別に割り当てられる。特許文献1には、演奏者の演奏状態に応じて自動的に鍵域分割位置を変更することができる鍵域分割装置が記載されている。特許文献1の鍵域分割装置においては、2台のカメラにより鍵盤の全体の鍵域が撮像される。各カメラにより得られた画像が解析され、各指の配置、手の大きさ、指の長さ、指の太さ、肌の色等に基づいて演奏者の右手または左手等の手の種類、および手の位置が検出される。検出された手の種類および手の位置に基づいて鍵域分割位置が動的に変更される。
特許第4389841号公報
According to the key area division technique used for the electronic keyboard instrument, the keyboard is divided into a plurality of key areas at key area division positions (split points), and tone control characteristics such as timbre, area or function are individually assigned to each key area. Assigned. Patent Document 1 describes a key area dividing device capable of automatically changing the key area dividing position according to the playing state of the performer. In the key area dividing device of Patent Document 1, the entire key area of the keyboard is imaged by two cameras. The images obtained by each camera are analyzed, and the type of hand of the player's right hand or left hand etc. based on the arrangement of each finger, hand size, finger length, finger thickness, skin color etc. And the position of the hand is detected. The key area division position is dynamically changed based on the detected hand type and hand position.
Patent No. 4389841
 しかしながら、特許文献1に記載された鍵域分割装置においては、手の種類および手の位置を検出するために、2台のカメラにより得られた画像に複雑な画像処理を行う必要がある。そのため、ハードウエアおよびソフトウエアのコストが高くなる。 However, in the key area dividing device described in Patent Document 1, in order to detect the type of hand and the position of the hand, it is necessary to perform complicated image processing on the images obtained by the two cameras. This adds to the cost of hardware and software.
 本発明の目的は、より簡単な処理でかつ低コストで鍵盤上の基準位置を検出することが可能な基準位置検出装置および基準位置検出方法を提供することである。 An object of the present invention is to provide a reference position detection device and a reference position detection method capable of detecting a reference position on a keyboard with simpler processing and at low cost.
 本発明の一局面に従う基準位置検出装置は、鍵盤および当該鍵盤上の物体の撮像により得られた画像を表す画像データを取得する取得部と、取得された画像データから黒鍵を含まず白鍵を含む領域に対応する画像データを抽出する抽出部と、抽出された画像データの輝度値に基づいて鍵盤上の物体を識別する識別部と、識別された物体に対して鍵盤上で所定の位置関係を有する基準位置を検出する検出部とを備える。 According to one aspect of the present invention, a reference position detection device includes a keyboard and an acquisition unit for acquiring image data representing an image obtained by imaging an object on the keyboard, and a white key not including a black key from the acquired image data. And an identification unit for identifying an object on the keyboard based on the luminance value of the extracted image data, and a predetermined position on the keyboard with respect to the identified object. And a detection unit that detects a reference position having a relationship.
 物体は演奏者の手であってもよい。手は両手であり、基準位置は両手間の位置であってもよい。基準位置は、鍵盤をそれぞれ個別の楽音制御特性が割り当てられる複数の鍵域に分割する鍵域分割位置であってもよい。 The object may be the player's hand. The hand may be both hands, and the reference position may be a position between the hands. The reference position may be a key area division position that divides the keyboard into a plurality of key areas to which individual tone control characteristics are assigned.
 基準位置検出装置は、抽出された画像データの解像度を低減する解像度低減部をさらに備え、識別部は、解像度の低減後の画像データの輝度値に基づいて鍵盤上の物体を識別してもよい。基準位置検出装置は、抽出された画像データにぼかし処理を行うぼかし処理部をさらに備え、識別部は、ぼかし処理後の画像データの輝度値に基づいて鍵盤上の物体を識別してもよい。 The reference position detection device may further include a resolution reduction unit that reduces the resolution of the extracted image data, and the identification unit may identify an object on the keyboard based on the luminance value of the image data after the resolution reduction. . The reference position detection device may further include a blurring processing unit that performs blurring processing on the extracted image data, and the identification unit may identify an object on the keyboard based on the luminance value of the image data after the blurring processing.
 基準位置検出装置は、鍵盤および当該鍵盤上の物体を撮像する撮像装置をさらに備え、取得部は、撮像装置から画像データを取得してもよい。撮像装置は魚眼レンズを有するカメラであり、基準位置検出装置は、取得された画像データを鍵盤が矩形状を有するように補正する補正部をさらに備え、抽出部は、補正後の画像データから黒鍵を含まず白鍵を含む領域に対応する画像データを抽出してもよい。取得部は、鍵盤の全体を含む画像を示す画像データを取得してもよい。 The reference position detection device may further include a keyboard and an imaging device for imaging an object on the keyboard, and the acquisition unit may acquire image data from the imaging device. The imaging device is a camera having a fisheye lens, and the reference position detection device further includes a correction unit that corrects the acquired image data so that the keyboard has a rectangular shape, and the extraction unit extracts a black key from the corrected image data. The image data corresponding to the area not including white and including the white key may be extracted. The acquisition unit may acquire image data indicating an image including the entire keyboard.
 本発明の他の局面に従う基準位置検出方法は、鍵盤および当該鍵盤上の物体の撮像により得られた画像を表す画像データを取得するステップと、取得された画像データから黒鍵を含まず白鍵を含む領域を表す画像データを抽出するステップと、抽出された画像データの輝度値に基づいて鍵盤上の物体を識別するステップと、識別された物体に対して鍵盤上で所定の位置関係を有する基準位置を検出するステップとを備える。 A reference position detection method according to another aspect of the present invention comprises: obtaining an image data representing an image obtained by imaging a keyboard and an object on the keyboard; and a white key not including a black key from the acquired image data Having a predetermined positional relationship on the keyboard with respect to the identified object, the steps of extracting image data representing an area including A, identifying the object on the keyboard based on the brightness value of the extracted image data, and Detecting a reference position.
 本発明によれば、より簡単な処理でかつ低コストで鍵盤上の基準位置を検出することが可能となる。 According to the present invention, it is possible to detect the reference position on the keyboard with simpler processing and at low cost.
図1は本発明の一実施の形態に係る基準位置検出装置を含む電子音楽装置の構成を示すブロック図である。FIG. 1 is a block diagram showing the configuration of an electronic music apparatus including a reference position detection apparatus according to an embodiment of the present invention. 図2は図1の主として基準位置検出装置の機能的な構成を示すブロック図である。FIG. 2 is a block diagram mainly showing a functional configuration of the reference position detection device of FIG. 図3は図2の基準位置検出装置における基準位置検出方法を示すフローチャートである。FIG. 3 is a flowchart showing a reference position detection method in the reference position detection device of FIG. 図4は鍵盤および演奏者の両手を示す図である。FIG. 4 is a diagram showing the keyboard and the hands of the player. 図5は解像度低減処理された画像の一例を示す模式図である。FIG. 5 is a schematic view showing an example of an image subjected to resolution reduction processing. 図6はぼかし処理およびグレースケール処理された画像の一例を示す模式図である。FIG. 6 is a schematic view showing an example of the image subjected to the blurring process and the gray scale process. 図7は二値化された画像の一例を示す模式図である。FIG. 7 is a schematic view showing an example of a binarized image. 図8はヒストグラムの一例を示す模式図である。FIG. 8 is a schematic view showing an example of a histogram. 図9は図3のステップS10の領域識別処理を示すフローチャートである。FIG. 9 is a flowchart showing the area identification process of step S10 of FIG. 図10は図3のステップS11の鍵域分割位置検出処理を示すフローチャートである。FIG. 10 is a flowchart showing the key area division position detection process of step S11 of FIG.
 以下、本発明の実施の形態に係る基準位置検出装置および基準位置検出方法について図面を用いて詳細に説明する。 Hereinafter, a reference position detection apparatus and a reference position detection method according to an embodiment of the present invention will be described in detail with reference to the drawings.
 (1)電子音楽装置の構成
 図1は本発明の一実施の形態に係る基準位置検出装置を含む電子音楽装置の構成を示すブロック図である。
(1) Configuration of Electronic Music Device FIG. 1 is a block diagram showing the configuration of an electronic music device including a reference position detection device according to an embodiment of the present invention.
 図1の電子音楽装置1は、例えば電子鍵盤楽器である。電子音楽装置1は、撮像装置30、鍵盤2、設定操作部3および表示器4を備える。鍵盤2は、複数の黒鍵および白鍵を有し、バス14に接続される。なお、鍵盤2は、後述するタッチパネルの画面上に表示された鍵盤の画像であってもよい。 The electronic music apparatus 1 of FIG. 1 is, for example, an electronic keyboard instrument. The electronic music apparatus 1 includes an imaging device 30, a keyboard 2, a setting operation unit 3, and a display 4. The keyboard 2 has a plurality of black keys and white keys and is connected to the bus 14. The keyboard 2 may be an image of the keyboard displayed on the screen of the touch panel described later.
 撮像装置30は、鍵盤2を撮像するように配置され、鍵盤2の画像を表す画像データをバス14に出力する。本実施の形態では、撮像装置30は、魚眼レンズを有する単一のカメラである。この場合、撮像装置30は、鍵盤2の中心部の上方または中心部の後方斜め上方に配置され、鍵盤2の全体を撮像する。それにより、撮像装置30から鍵盤2の全体の画像を示す画像データが出力される。 The imaging device 30 is disposed to capture an image of the keyboard 2 and outputs image data representing an image of the keyboard 2 to the bus 14. In the present embodiment, the imaging device 30 is a single camera having a fisheye lens. In this case, the imaging device 30 is disposed above the central portion of the keyboard 2 or obliquely rearward above the central portion, and images the entire keyboard 2. As a result, image data indicating the entire image of the keyboard 2 is output from the imaging device 30.
 設定操作部3は、オンオフ操作される操作スイッチ、回転操作される操作スイッチ、またはスライド操作される操作スイッチ等を含み、バス14に接続される。この設定操作部3は、各種指示、各種調整、各種設定および電源のオンオフ等を行うために用いられる。表示器4は、例えば液晶ディスプレイを含み、バス14に接続される。表示器4には、楽曲名、楽譜、またはその他の各種情報が表示される。表示器4がタッチパネルディスプレイであってもよい。この場合、鍵盤2または設定操作部3の一部または全てが表示器4に表示されてもよい。使用者は、表示器4を操作することにより各種操作を指示することができる。 The setting operation unit 3 includes an operation switch that is turned on and off, an operation switch that is rotated, and an operation switch that is slid and is connected to the bus 14. The setting operation unit 3 is used to perform various instructions, various adjustments, various settings, and power on / off. The display 4 includes, for example, a liquid crystal display, and is connected to the bus 14. The display 4 displays a music title, a score, or other various information. The display 4 may be a touch panel display. In this case, a part or all of the keyboard 2 or the setting operation unit 3 may be displayed on the display 4. The user can instruct various operations by operating the display 4.
 電子音楽装置1は、音源部5およびサウンドシステム6を備える。音源部5はバス14に接続され、鍵盤2の操作により再生される楽音データ等に基づいてオーディオデータ(音響信号)を生成する。オーディオデータは、音の波形を示すサンプリングデータである。サウンドシステム6は、デジタルアナログ(D/A)変換回路、増幅器およびスピーカを含む。このサウンドシステム6は、音源部5から与えられるオーディオデータをアナログ音信号に変換し、アナログ音信号に基づく音を発生する。 The electronic music apparatus 1 includes a sound source unit 5 and a sound system 6. The sound source unit 5 is connected to the bus 14 and generates audio data (sound signal) based on tone data etc. reproduced by the operation of the keyboard 2. Audio data is sampling data indicating a sound waveform. The sound system 6 includes a digital analog (D / A) conversion circuit, an amplifier and a speaker. The sound system 6 converts audio data supplied from the sound source unit 5 into an analog sound signal, and generates sound based on the analog sound signal.
 電子音楽装置1は、記憶装置7、CPU(中央演算処理装置)8、タイマ9、RAM(ランダムアクセスメモリ)10、ROM(リードオンリメモリ)11、および通信I/F(インタフェース)12をさらに備える。記憶装置7、CPU8、RAM10、ROM11および通信I/F12はバス14に接続される。タイマ9はCPU8に接続される。外部記憶装置13等の外部機器が通信I/F12を介してバス14に接続されてもよい。 The electronic music apparatus 1 further includes a storage device 7, a CPU (central processing unit) 8, a timer 9, a RAM (random access memory) 10, a ROM (read only memory) 11, and a communication I / F (interface) 12. . The storage device 7, the CPU 8, the RAM 10, the ROM 11 and the communication I / F 12 are connected to the bus 14. The timer 9 is connected to the CPU 8. An external device such as the external storage device 13 may be connected to the bus 14 via the communication I / F 12.
 記憶装置7は、ハードディスク、光学ディスク、磁気ディスクまたはメモリカード等の記憶媒体を含む。この記憶装置7には、後述する白鍵領域座標情報、ノート番号対応情報および鍵域分割位置情報が記憶される。また、記憶装置7には、基準位置検出プログラム等のコンピュータプログラムが記憶される。さらに、記憶装置7には、楽器の演奏音を示す演奏データおよび自動伴奏のための自動伴奏データが記憶される。本実施の形態では、楽音データは演奏データおよび自動伴奏データを含む。楽音データは、オーディオデータであってもよく、MIDI(Musical Instrument Digital Interface)データであってもよい。 The storage device 7 includes a storage medium such as a hard disk, an optical disk, a magnetic disk or a memory card. The storage device 7 stores white key area coordinate information, note number correspondence information, and key area division position information described later. Further, the storage device 7 stores a computer program such as a reference position detection program. Furthermore, the storage device 7 stores performance data indicating a performance sound of a musical instrument and automatic accompaniment data for automatic accompaniment. In the present embodiment, the tone data includes performance data and automatic accompaniment data. The musical tone data may be audio data or MIDI (Musical Instrument Digital Interface) data.
 RAM10は、例えば揮発性メモリからなり、CPU8の作業領域として用いられるとともに、各種データを一時的に記憶する。ROM11は、例えば不揮発性メモリからなり、制御プログラムを記憶する。ROM11が基準位置検出プログラム等のコンピュータプログラムを記憶してもよい。CPU8は、記憶装置7またはROM11に記憶された基準位置検出プログラムを実行することにより後述する基準位置検出方法を行う。タイマ9は、時間経過を示す時間情報をCPU8に与える。CPU8、タイマ9、RAM10およびROM11が基準位置検出装置100を構成する。 The RAM 10 is, for example, a volatile memory and is used as a work area of the CPU 8 and temporarily stores various data. The ROM 11 is, for example, a non-volatile memory, and stores a control program. The ROM 11 may store a computer program such as a reference position detection program. The CPU 8 executes a reference position detection program stored in the storage device 7 or the ROM 11 to perform a reference position detection method described later. The timer 9 provides the CPU 8 with time information indicating time lapse. The CPU 8, the timer 9, the RAM 10 and the ROM 11 constitute a reference position detection device 100.
 基準位置検出プログラムは、コンピュータが読み取り可能な記録媒体に格納された形態で提供され、記憶装置7またはROM11にインストールされてもよい。また、基準位置検出プログラムが外部記憶装置13に記憶されてもよい。さらに、通信I/F12が通信網に接続されている場合、通信網に接続されたサーバから配信された基準位置検出プログラムが記憶装置7またはROM11にインストールされてもよい。 The reference position detection program may be provided in a form stored in a computer readable recording medium, and may be installed in the storage device 7 or the ROM 11. Also, the reference position detection program may be stored in the external storage device 13. Furthermore, when the communication I / F 12 is connected to the communication network, a reference position detection program distributed from a server connected to the communication network may be installed in the storage device 7 or the ROM 11.
 (2)基準位置検出装置100の機能的な構成
 図2は図1の主として基準位置検出装置100の機能的な構成を示すブロック図である。図2に示すように、基準位置検出装置100は、取得部101、補正部102、抽出部103、解像度低減部104、ぼかし処理部105およびグレースケール処理部106を含む。また、基準位置検出装置100は、二値化部107、生成部108、識別部109、検出部110、提示部111および楽音制御特性設定部112を含む。基準位置検出装置100の各構成部分(101~112)の機能は、図1のCPU8が記憶装置7またはROM11に記憶された基準位置検出プログラムを実行することにより実現される。
(2) Functional Configuration of Reference Position Detection Device 100 FIG. 2 is a block diagram mainly showing the functional configuration of the reference position detection device 100 of FIG. As shown in FIG. 2, the reference position detection device 100 includes an acquisition unit 101, a correction unit 102, an extraction unit 103, a resolution reduction unit 104, a blurring processing unit 105, and a gray scale processing unit 106. The reference position detection device 100 further includes a binarization unit 107, a generation unit 108, an identification unit 109, a detection unit 110, a presentation unit 111, and a tone control characteristic setting unit 112. The function of each component (101 to 112) of the reference position detection device 100 is realized by the CPU 8 of FIG. 1 executing a reference position detection program stored in the storage device 7 or the ROM 11.
 撮像装置30は、鍵盤2およびその鍵盤2上の演奏者の手を撮像し、鍵盤2の全体および手の一部を含む画像を表す画像データを出力する。本実施の形態では、画像データはカラー画像を表すカラー画像データである。カラー画像データは、カラー画像の輝度値を有する複数の画素から構成される。取得部101は、撮像装置30から出力される画像データを取得する。本実施の形態では、撮像装置30が魚眼レンズを有するカメラであるので、画像データにより表される鍵盤2の画像は中央部が両端部に比べて拡大されるように歪んでいる。補正部102は、鍵盤2の画像が矩形状を有するように、取得部101により取得された画像データを補正する。 The imaging device 30 images the keyboard 2 and the hands of the player on the keyboard 2 and outputs image data representing an image including the entire keyboard 2 and a part of the hand. In the present embodiment, the image data is color image data representing a color image. Color image data is composed of a plurality of pixels having luminance values of a color image. The acquisition unit 101 acquires image data output from the imaging device 30. In the present embodiment, since the imaging device 30 is a camera having a fisheye lens, the image of the keyboard 2 represented by the image data is distorted such that the central portion is enlarged compared to the both ends. The correction unit 102 corrects the image data acquired by the acquisition unit 101 so that the image of the keyboard 2 has a rectangular shape.
 抽出部103は、記憶装置7から取得される白鍵領域座標情報に基づいて、補正部102により補正された画像データから黒鍵を含まず白鍵を含む領域(以下、白鍵領域と呼ぶ。)に対応する画像データを抽出する。白鍵領域座標情報は、鍵盤2の全体の画像のうち白鍵領域を特定するための座標を含む。 The extraction unit 103 does not include a black key from the image data corrected by the correction unit 102 based on the white key region coordinate information acquired from the storage device 7 and includes a white key (hereinafter referred to as a white key region). Extract the image data corresponding to. The white key area coordinate information includes coordinates for specifying a white key area in the entire image of the keyboard 2.
 解像度低減部104は、抽出部103により抽出された画像データの解像度を低減する解像度低減処理を行う。ぼかし処理部105は、解像度低減部104により低減された解像度を有する画像データにぼかし(ブラー)処理を行う。グレースケール処理部106は、ぼかし処理が行われた画像データにグレースケール処理を行うことによりカラー画像データをグレースケール画像データに変換する。グレースケール画像データの各画素の輝度値は階調値を表す。 The resolution reduction unit 104 performs resolution reduction processing to reduce the resolution of the image data extracted by the extraction unit 103. The blurring processing unit 105 performs blurring processing on the image data having the resolution reduced by the resolution reducing unit 104. The grayscale processing unit 106 converts the color image data into grayscale image data by performing grayscale processing on the image data subjected to the blurring processing. The luminance value of each pixel of gray scale image data represents a gradation value.
 二値化部107は、グレースケール処理部106により得られた画像データの輝度値を二値の画素値に変換する二値化処理を行う。それにより、二値の画像データが生成される。二値の画像データは“0”または “1”の値を有する複数の画素から構成される。生成部108は、二値化部107により得られた画像データの各画素値に基づいてヒストグラムを生成するヒストグラム生成処理を行う。ヒストグラム生成処理については後述する。 The binarization unit 107 performs binarization processing to convert the luminance value of the image data obtained by the gray scale processing unit 106 into binary pixel values. Thereby, binary image data is generated. Binary image data is composed of a plurality of pixels having a value of “0” or “1”. The generation unit 108 performs a histogram generation process of generating a histogram based on each pixel value of the image data obtained by the binarization unit 107. The histogram generation process will be described later.
 識別部109は、生成部108により生成されたヒストグラムに基づいて鍵盤2上の手を識別する。検出部110は、記憶装置7から取得されるノート番号対応情報に基づいて、識別部109により識別された手と所定の位置関係を有する基準位置のノート番号を検出する。識別部109および検出部110の動作の詳細については後述する。本実施の形態では、所定の位置関係は左手と右手との間の中心位置であり、基準位置は鍵域分割位置(スプリットポイント)である。ノート番号対応情報は、鍵盤2の画像を構成する複数の画素とノート番号との対応関係を表す。検出部110により検出された鍵域分割位置のノート番号が鍵域分割位置情報として記憶装置7に記憶される。それにより、鍵域分割位置情報により示されるノート番号を有する鍵に鍵域分割位置が設定される。 The identification unit 109 identifies the hand on the keyboard 2 based on the histogram generated by the generation unit 108. The detection unit 110 detects the note number of the reference position having a predetermined positional relationship with the hand identified by the identification unit 109 based on the note number correspondence information acquired from the storage device 7. Details of operations of the identification unit 109 and the detection unit 110 will be described later. In the present embodiment, the predetermined positional relationship is the central position between the left hand and the right hand, and the reference position is the key area division position (split point). The note number correspondence information indicates the correspondence between a plurality of pixels constituting the image of the keyboard 2 and the note number. The note number of the key area division position detected by the detection unit 110 is stored in the storage device 7 as key area division position information. Thereby, the key area division position is set to the key having the note number indicated by the key area division position information.
 提示部111は、検出部110により検出された鍵域分割位置をガイドランプ41、鍵発光部42または表示器4を用いて演奏者に提示する。ガイドランプ41は、鍵盤2の複数の鍵の後方に配置された複数の発光ダイオードにより構成される。提示部111は、鍵域分割位置が設定された鍵の後方に配置された発光ダイオードを点灯させることにより鍵域分割位置を演奏者に提示する。また、鍵盤2に各鍵に鍵発光部42が設けられている場合には、提示部111は鍵域分割位置が設定された鍵に設けられた鍵発光部42を発光させることにより鍵域分割位置を演奏者に提示してもよい。さらに、提示部111は、表示器4に鍵盤2の画像を表示させるとともに鍵盤2の画像上に鍵域分割位置を表示させてもよい。 The presentation unit 111 presents the key area division position detected by the detection unit 110 to the player using the guide lamp 41, the key light emission unit 42 or the display 4. The guide lamp 41 is composed of a plurality of light emitting diodes disposed behind the plurality of keys of the keyboard 2. The presentation unit 111 presents the key area division position to the player by lighting the light emitting diode disposed behind the key for which the key area division position is set. In addition, when the key emission unit 42 is provided for each key in the keyboard 2, the presentation unit 111 causes the key area division by emitting the key emission unit 42 provided for the key for which the key area division position is set. The position may be presented to the player. Furthermore, the presentation unit 111 may cause the display 4 to display the image of the keyboard 2 and display the key area division position on the image of the keyboard 2.
 楽音制御特性設定部112は、記憶装置7に記憶された鍵域分割位置情報に基づいて、鍵盤2の鍵域分割位置で左右に分割された2つの鍵域にそれぞれ個別の楽音制御特性を設定する。個別の楽音制御特性は、例えば個別の音色、個別の音域または個別の機能である。例えば、左の鍵域にベースの音色が設定され、右の鍵域にピアノの音色が設定されてもよい。また、左の鍵域に本来の音域よりも2オクターブ高い音域が設定され、右の音域に本来の音域が設定されてもよい。さらに、左の鍵域に和音による自動伴奏機能が設定され、右の鍵域に通常演奏機能が設定されてもよい。 The musical tone control characteristic setting unit 112 sets individual musical tone control characteristics in two key areas divided left and right at the key area division position of the keyboard 2 based on the key area division position information stored in the storage device 7 Do. The individual tone control characteristics are, for example, an individual tone, an individual tone range or an individual function. For example, the tone color of the base may be set in the left key range, and the tone color of the piano may be set in the right key range. Further, a range two octaves higher than the original range may be set in the left key range, and the original range may be set in the right range. Furthermore, an automatic accompaniment function by chords may be set in the left key range, and a normal performance function may be set in the right key range.
 (3)基準位置検出方法
 図3は図2の基準位置検出装置100における基準位置検出方法を示すフローチャートである。図4は鍵盤2および演奏者の両手を示す図である。図5は解像度低減処理された画像の一例を示す模式図である。図6はぼかし処理およびグレースケール処理された画像の一例を示す模式図である。図7は二値化された画像の一例を示す模式図である。図8はヒストグラムの一例を示す模式図である。図3の基準位置検出方法は、図1のCPU8が記憶装置7またはROM11に記憶された基準位置検出プログラムを実行することにより行われる。
(3) Reference Position Detection Method FIG. 3 is a flowchart showing a reference position detection method in the reference position detection apparatus 100 of FIG. FIG. 4 shows the keyboard 2 and the hands of the player. FIG. 5 is a schematic view showing an example of an image subjected to resolution reduction processing. FIG. 6 is a schematic view showing an example of the image subjected to the blurring process and the gray scale process. FIG. 7 is a schematic view showing an example of a binarized image. FIG. 8 is a schematic view showing an example of a histogram. The reference position detection method of FIG. 3 is performed by the CPU 8 of FIG. 1 executing a reference position detection program stored in the storage device 7 or the ROM 11.
 図4に示すように、鍵盤2は複数の黒鍵BKおよび白鍵WHの並びを有する。複数の黒鍵BKおよび白鍵WHの並びには、左から右へ順に高くなるノート番号が割り当てられている。例えば、鍵盤2が88個の鍵を有する場合には、左端の鍵から右端の鍵に順に“21”~“108”のノート番号が割り当てられている。 As shown in FIG. 4, the keyboard 2 has an array of a plurality of black keys BK and white keys WH. A plurality of black keys BK and white keys WH are assigned note numbers that increase in order from left to right. For example, when the keyboard 2 has 88 keys, note numbers “21” to “108” are assigned in order from the leftmost key to the rightmost key.
 隣り合う各2つの白鍵WH間には、直線状の隙間21が存在する。また、鍵盤2上に演奏者の左手LHおよび右手RHが存在する。後述する方法により左手LHと右手RHとの中間に鍵域分割位置(スプリットポイント)SPが設定される。上記のように、白鍵領域22は、鍵盤2のうち黒鍵BKを含まず白鍵WHを含む矩形状の領域である。 A linear gap 21 exists between each two adjacent white keys WH. In addition, the left hand LH and the right hand RH of the player exist on the keyboard 2. A key range division position (split point) SP is set between the left hand LH and the right hand RH by a method described later. As described above, the white key area 22 is a rectangular area not including the black key BK in the keyboard 2 but including the white key WH.
 まず、図2の取得部101が撮像装置30から鍵盤2の全体の画像を表す画像データを取得する(ステップS1)。上記のように、本実施の形態では、撮像装置30が魚眼レンズを有する単一のカメラであるので、画像データにより表される鍵盤2の画像は、中央部が両端部に比べて拡大されるように歪んでいる。そのため、補正部102は、鍵盤2の画像が矩形状を有するように取得部101により取得された画像データを補正する(ステップS2)。 First, the acquisition unit 101 of FIG. 2 acquires image data representing the entire image of the keyboard 2 from the imaging device 30 (step S1). As described above, in the present embodiment, since the imaging device 30 is a single camera having a fisheye lens, the image of the keyboard 2 represented by the image data is enlarged so that the central portion is larger than both ends. It is distorted. Therefore, the correction unit 102 corrects the image data acquired by the acquisition unit 101 so that the image of the keyboard 2 has a rectangular shape (step S2).
 抽出部103は、記憶装置7から白鍵領域座標情報を取得し(ステップS3)、取得した白鍵領域座標情報に基づいて画像データから白鍵領域22に対応する画像データを抽出する(ステップS4)。鍵盤2の全体の画像中で白鍵領域22の位置が固定されている場合には、画像上で白鍵領域22の位置を示す白鍵領域座標情報が記憶装置7に予め記憶されている。なお、画像における鍵盤2の外周部と白鍵WHとの輝度差および黒鍵BKと白鍵WHとの輝度差に基づいて画像処理により白鍵領域座標情報が自動的に算出されてもよい。また、表示器4に表示された画像上で使用者が鍵盤2の白鍵領域22の4隅または外周部を指定することにより白鍵領域座標情報が生成されてもよい。さらに、使用者が画像上での白鍵領域22の座標を入力することにより白鍵領域座標情報が生成されてもよい。白鍵領域22の画像データを構成する複数の画素には、横方向(左右方向)および縦方向(前後方向)における座標が割り当てられている。 The extraction unit 103 acquires white key area coordinate information from the storage device 7 (step S3), and extracts image data corresponding to the white key area 22 from the image data based on the acquired white key area coordinate information (step S4). ). When the position of the white key area 22 is fixed in the entire image of the keyboard 2, white key area coordinate information indicating the position of the white key area 22 on the image is stored in advance in the storage device 7. The white key area coordinate information may be automatically calculated by image processing based on the luminance difference between the outer periphery of the keyboard 2 and the white key WH and the luminance difference between the black key BK and the white key WH in the image. In addition, white key area coordinate information may be generated by the user designating four corners or the outer periphery of the white key area 22 of the keyboard 2 on the image displayed on the display 4. Furthermore, white key area coordinate information may be generated by the user inputting the coordinates of the white key area 22 on the image. Coordinates in the horizontal direction (left and right direction) and the vertical direction (front and rear direction) are assigned to a plurality of pixels forming the image data of the white key area 22.
 次に、解像度低減部104は、抽出された画像データに解像度低減処理を行う(ステップS5)。解像度低減処理では、例えば、隣接する一定の画素群の輝度値の平均化により画像データを構成する画素の数が低減される。それにより、図5に示すように、白鍵領域22の画像上で図4の白鍵WH間の隙間21を表す黒色の直線がぼかされる。白鍵領域22の画像において左手LHおよび右手RHに対応する左手部分ILおよび右手部分IRの輝度値が白鍵WHに相当する他の部分の輝度値に比べて低くなっている。本実施の形態では、上記のように、魚眼レンズを有するカメラが用いられるので、画像上の白鍵領域22の中央部分において白鍵WH間の隙間の幅が拡大される。それにより、図5に示すように、白鍵領域22の画像の中央部において白鍵WH間の隙間21を表す太い縦線21aが残っている。 Next, the resolution reduction unit 104 performs resolution reduction processing on the extracted image data (step S5). In the resolution reduction process, for example, the number of pixels forming the image data is reduced by averaging the luminance values of adjacent constant pixel groups. Thereby, as shown in FIG. 5, the black straight line representing the gap 21 between the white keys WH in FIG. 4 is blurred on the image of the white key area 22. The luminance values of the left hand portion IL and the right hand portion IR corresponding to the left hand LH and the right hand RH in the image of the white key area 22 are lower than the luminance values of other portions corresponding to the white key WH. In the present embodiment, as described above, since a camera having a fisheye lens is used, the width of the gap between the white keys WH is enlarged at the central portion of the white key area 22 on the image. Thus, as shown in FIG. 5, a thick vertical line 21a representing the gap 21 between the white keys WH remains at the center of the image of the white key area 22.
 ぼかし処理部105は、解像度低減部104により低減された解像度を有する画像データにぼかし処理を行う(ステップS6)。また、グレースケール処理部106は、ぼかし処理が行われた画像データにグレースケール処理を行う(ステップS7)。それにより、グレースケール画像を表す画像データが得られる。図6のグレースケール画像では、白鍵WH間の隙間21を表す図5の縦線21aが白鍵WHの色と同化されることにより縦線21aが除去されている。また、左手部分ILおよび右手部分IRの輝度値(階調値)が他の部分の輝度値(階調値)よりも低くなる。 The blurring processing unit 105 performs blurring processing on the image data having the resolution reduced by the resolution reducing unit 104 (step S6). In addition, the gray scale processing unit 106 performs gray scale processing on the image data on which the blurring process has been performed (step S7). Thereby, image data representing a gray scale image is obtained. In the gray scale image of FIG. 6, the vertical line 21a of FIG. 5 representing the gap 21 between the white keys WH is eliminated by being equalized to the color of the white key WH. In addition, the luminance values (gradation values) of the left hand portion IL and the right hand portion IR become lower than the luminance values (gradation values) of the other portions.
 次に、二値化部107は、グレースケール処理部106により得られた画像データの輝度値を二値の画素値に変換する二値化処理を行う(ステップS8)。それにより、二値画像を表す二値の画像データが生成される。二値の画像データは“0”または “1”の値を有する複数の画素から構成される。例えば、グレースケール画像において予め定められた輝度しきい値よりも高い輝度値を有する画素の値が“0”に変換され、輝度しきい値以下の輝度値を有する画素の値が“1”に変換される。二値化処理における輝度しきい値は、鍵盤2の周囲の明るさ等に合わせて設定操作部3の設定スイッチにより調整される。図7に示すように、二値画像において、左手部分ILおよび右手部分IRの画素値が“1”(白)となり、他の部分の画素値が“0”(黒)となる。それにより、二値の画像を表す画像データにおいて、左手部分ILおよび右手部分IRが他の部分から明確に区別される。 Next, the binarization unit 107 performs a binarization process of converting the luminance value of the image data obtained by the gray scale processing unit 106 into a binary pixel value (step S8). Thereby, binary image data representing a binary image is generated. Binary image data is composed of a plurality of pixels having a value of “0” or “1”. For example, in a grayscale image, the value of a pixel having a luminance value higher than a predetermined luminance threshold value is converted to "0", and the value of a pixel having a luminance value smaller than the luminance threshold value is "1". It is converted. The brightness threshold value in the binarization process is adjusted by the setting switch of the setting operation unit 3 in accordance with the brightness around the keyboard 2 or the like. As shown in FIG. 7, in the binary image, the pixel values of the left hand portion IL and the right hand portion IR are “1” (white), and the pixel values of the other portions are “0” (black). Thereby, in the image data representing a binary image, the left hand part IL and the right hand part IR are clearly distinguished from other parts.
 次に、生成部108は、二値の画像データに基づいてヒストグラム生成処理を行う(ステップS9)。具体的には、生成部108は、二値の画像データにおいて、鍵盤2の各白鍵WHの縦方向(前後方向)に対して平行に並ぶ各画素列について画素値の合計を算出し、各画素列の画素値の合計(合計画素値と呼ぶ。)を度数として示すヒストグラムを生成する。図8のヒストグラムHGの横軸の各区間は各画素列であり、縦軸の度数は合計画素値である。ヒストグラムHGには、複数の画素列の合計画素値の分布が示されている。各画素列の合計画素値が高いほど手が存在する確率が高い。また、ヒストグラムHGには、予め定められた判定しきい値THが設定されている。 Next, the generation unit 108 performs histogram generation processing based on binary image data (step S9). Specifically, in the binary image data, the generation unit 108 calculates the sum of pixel values for each pixel row arranged parallel to the longitudinal direction (front-back direction) of each white key WH of the keyboard 2 A histogram is generated which indicates the sum of pixel values of a pixel row (referred to as a total pixel value) as a frequency. Each section on the horizontal axis of the histogram HG in FIG. 8 is each pixel row, and the frequency on the vertical axis is a total pixel value. The histogram HG shows the distribution of total pixel values of a plurality of pixel columns. The higher the total pixel value of each pixel column, the higher the probability that a hand is present. Further, in the histogram HG, a predetermined determination threshold TH is set.
 次に、識別部109は、ヒストグラムHGに基づいて鍵盤2上の手を識別する領域識別処理を行う(ステップS10)。領域識別処理の詳細については後述する。その後、検出部110は、識別部109により識別された手領域に基づいて、基準位置である鍵域分割位置を検出する鍵域分割位置検出処理を行う(ステップS11)。検出された鍵域分割位置を中心として鍵盤2が左の鍵域と右の鍵域とに分割される。鍵域分割位置検出処理の詳細については後述する。 Next, the identification unit 109 performs region identification processing for identifying a hand on the keyboard 2 based on the histogram HG (step S10). Details of the area identification process will be described later. Thereafter, based on the hand area identified by the identification unit 109, the detection unit 110 performs key area division position detection processing for detecting a key area division position, which is a reference position (step S11). The keyboard 2 is divided into a left key area and a right key area around the detected key area division position. Details of the key area division position detection process will be described later.
 次いで、楽音制御特性設定部112は、左の鍵域および右の鍵域にそれぞれ個別の楽音制御特性を割り当てる(ステップS12)。また、提示部111は、ガイドランプ41、鍵発光部42または表示器4を用いて鍵域分割位置を演奏者に提示する(ステップS13)。 Next, the musical tone control characteristic setting unit 112 assigns individual musical tone control characteristics to the left key area and the right key area (step S12). Also, the presentation unit 111 presents the key area division position to the player using the guide lamp 41, the key light emission unit 42 or the display 4 (step S13).
 その後、検出部110は、基準位置検出処理の終了が指示されたか否かを判定する(ステップS14)。基準位置検出処理の終了が指示されない場合には、検出部110は、ステップS1に戻る。それにより、ステップS1~S14の処理が行われる。このようにして、鍵盤2上で演奏者の手が移動した場合には、手の移動に伴って鍵域分割位置が動的に移動する。ステップS14において基準位置検出処理の終了が指示された場合には、基準位置検出処理が終了する。ここで、基準位置検出処理の終了の指示は、例えば曲の演奏の終了または設定操作部3の操作スイッチの操作により発生する。 Thereafter, the detection unit 110 determines whether the end of the reference position detection process has been instructed (step S14). When the end of the reference position detection process is not instructed, the detection unit 110 returns to step S1. Thus, the processes of steps S1 to S14 are performed. In this way, when the player's hand moves on the keyboard 2, the key area division position moves dynamically along with the movement of the hand. When the end of the reference position detection process is instructed in step S14, the reference position detection process ends. Here, an instruction to end the reference position detection process is generated, for example, by the end of the music performance or the operation of the operation switch of the setting operation unit 3.
 図9は図3のステップS10の領域識別処理を示すフローチャートである。識別部109は、生成部108により生成されたヒストグラムHGにおいて判定しきい値TH以上の合計画素値を有する画素列を抽出し(ステップS101)、抽出された画素列のうち隣接する1または複数の画素列により構成される領域を抽出する(ステップS102)。使用者は、予め設定操作部3の設定スイッチを操作することにより、ヒストグラムHGを表示器4に表示させ、判定しきい値THを調整することができる。 FIG. 9 is a flowchart showing the area identification process of step S10 of FIG. The identification unit 109 extracts a pixel sequence having a total pixel value equal to or greater than the determination threshold TH in the histogram HG generated by the generation unit 108 (step S101), and selects one or more adjacent pixel sequences among the extracted pixel sequences. An area composed of pixel columns is extracted (step S102). The user can operate the setting switch of the setting operation unit 3 in advance to display the histogram HG on the display 4 and adjust the determination threshold TH.
 次いで、識別部109は、抽出された領域の幅が所定値以上であるか否かを判定する(ステップS103)。所定値は、人の手の幅に基づいて予め設定される。抽出された領域の幅が所定値以上である場合には、識別部109は、抽出された領域を手領域として識別する(ステップS104)。白鍵領域22内での手領域の位置は、白鍵領域22における横方向(左右方向)の座標で表される。 Next, the identification unit 109 determines whether the width of the extracted area is equal to or greater than a predetermined value (step S103). The predetermined value is preset based on the width of the human hand. If the width of the extracted area is equal to or greater than the predetermined value, the identification unit 109 identifies the extracted area as a hand area (step S104). The position of the hand area in the white key area 22 is represented by the coordinates in the horizontal direction (left and right direction) in the white key area 22.
 ステップS103において、抽出された領域の幅が所定値よりも小さい場合には、識別部109は、抽出された領域を手領域でないと判定する(ステップS105)。それにより、ノイズに起因する領域が手領域から除外される。 In step S103, when the width of the extracted area is smaller than the predetermined value, the identification unit 109 determines that the extracted area is not a hand area (step S105). Thereby, the area due to noise is excluded from the hand area.
 その後、識別部109は、画像データにおける全ての領域の抽出が終了したか否かを判定する(ステップS106)。全ての領域の抽出が終了していない場合には、識別部109は、ステップS102に戻り、他の領域の抽出を行う。ステップS106において全ての領域の抽出が終了した場合には、識別部109は領域識別処理を終了し、図3のステップS11に進む。 Thereafter, the identification unit 109 determines whether the extraction of all the regions in the image data is completed (step S106). If the extraction of all the areas has not been completed, the identification unit 109 returns to step S102 to extract another area. When the extraction of all the areas is completed in step S106, the identification unit 109 ends the area identification process, and the process proceeds to step S11 in FIG.
 図10は図3のステップS11の鍵域分割位置検出処理を示すフローチャートである。まず、検出部110は、識別部109により2つの手領域が識別されたか否かを判定する(ステップS111)。2つの手領域が識別された場合には、検出部110は、各手領域の中央位置の座標を算出し(ステップS112)、2つの手領域の中央位置の座標間の中央位置の座標を鍵域分割位置の座標として算出する(ステップS113)。図8の例では、2つの手領域R1,R2が識別されている。また、手領域R1の中央位置P1の座標および手領域R2の中央領域P2の座標P2が算出され、2つの手領域R1,R2の中央位置P1,P2の座標間の中央位置P0の座標が鍵域分割位置の座標として算出される。 FIG. 10 is a flowchart showing the key area division position detection process of step S11 of FIG. First, the detection unit 110 determines whether the identification unit 109 has identified two hand regions (step S111). If two hand areas are identified, the detection unit 110 calculates the coordinates of the center position of each hand area (step S112), and the coordinates of the center position between the coordinates of the center positions of the two hand areas are keyed The coordinates of the area division position are calculated (step S113). In the example of FIG. 8, two hand regions R1 and R2 are identified. Further, the coordinates of the central position P1 of the hand region R1 and the coordinates P2 of the central region P2 of the hand region R2 are calculated, and the coordinates of the central position P0 between the coordinates of the central positions P1 and P2 of the two hand regions R1 and R2 is a key Calculated as the coordinates of the area division position.
 次いで、検出部110は、記憶装置7からノート番号対応情報を取得し(ステップS114)、ノート番号対応情報に基づいて鍵域分割位置にノート番号を割り当てる(ステップS115)。その後、検出部110は、鍵域分割位置のノート番号を示す鍵域分割位置情報を記憶装置7に記憶させる(ステップS116)。それにより、鍵域分割位置が鍵盤2に設定される。なお、記憶装置7に既に鍵域分割位置情報が記憶されている場合には、検出部110は、記憶装置7に記憶された鍵域分割位置情報を更新する。その後、検出部110は図3のステップS12に進む。 Next, the detection unit 110 acquires note number correspondence information from the storage device 7 (step S114), and assigns a note number to the key area division position based on the note number correspondence information (step S115). After that, the detection unit 110 stores key area division position information indicating the note number of the key area division position in the storage device 7 (step S116). As a result, the key area division position is set to the keyboard 2. When the key area division position information is already stored in the storage device 7, the detection unit 110 updates the key area division position information stored in the storage device 7. Thereafter, the detection unit 110 proceeds to step S12 in FIG.
 ステップS111において2つの手領域が識別されていない場合には、検出部110は、記憶装置7に鍵域分割位置情報を記憶せずに(ステップS117)、図3のステップS12に進む。なお、記憶装置7に鍵域分割位置情報が既に記憶されている場合には、検出部110は、記憶装置7の鍵域分割位置情報を更新せずにステップS12に進む。 If two hand areas are not identified in step S111, the detection unit 110 proceeds to step S12 in FIG. 3 without storing the key area division position information in the storage device 7 (step S117). When the key area division position information is already stored in the storage device 7, the detection unit 110 proceeds to step S12 without updating the key area division position information of the storage device 7.
 (4)実施の形態の効果
 本実施の形態に係る基準位置検出装置100および基準位置検出方法によれば、黒鍵BKを含まず白鍵WHを含む白鍵領域22に対応する画像データの輝度値に基づいて鍵盤2上の手が識別される。この場合、白鍵WHと手との輝度差に基づいて簡単な処理で鍵盤2上の手が他の部分から高精度に識別される。また、識別された手に対して鍵盤2上で所定の位置関係を有する基準位置として鍵域分割位置が簡単な処理で検出される。したがって、より簡単な処理でかつ低コストで鍵盤2上の鍵域分割位置を検出することが可能となる。
(4) Effects of the Embodiment According to the reference position detection device 100 and the reference position detection method according to the present embodiment, the brightness of the image data corresponding to the white key area 22 not including the black key BK but including the white key WH. The hand on the keyboard 2 is identified based on the value. In this case, the hand on the keyboard 2 is identified with high accuracy from other parts by a simple process based on the luminance difference between the white key WH and the hand. Further, the key area division position is detected by a simple process as a reference position having a predetermined positional relationship on the keyboard 2 with respect to the identified hand. Therefore, it becomes possible to detect the key area division position on the keyboard 2 with simpler processing and at low cost.
 本実施の形態では、鍵盤2上の物体として演奏者の手が識別されるので、鍵盤2上の手の動きに応じて動的に変化する鍵域分割位置を設定することができる。また、本実施の形態では、基準位置として両手間の鍵域分割位置が検出されるので、演奏者の両手の動きに応じて動的に変化する鍵域分割位置を両手間に設定することができる。 In the present embodiment, since the player's hand is identified as an object on the keyboard 2, it is possible to set a key area division position which dynamically changes in accordance with the movement of the hand on the keyboard 2. Further, in the present embodiment, since the key area division position between both hands is detected as the reference position, the key area division position dynamically changing according to the movement of the player's hands may be set between the both hands. it can.
 本実施の形態では、解像度低減部104により白鍵領域22の画像データの解像度が低減されるので、白鍵領域22の画像から白鍵WH間の隙間21による縦線を除去することができる。それにより、鍵盤2上の手を他の部分からより正確に識別することができる。また、ぼかし処理部105により画像データにぼかし処理が行われるので、白鍵領域22の画像に残る白鍵WH間の隙間21による縦線21aを除去することができる。 In the present embodiment, since the resolution of the image data of the white key area 22 is reduced by the resolution reducing unit 104, the vertical line due to the gap 21 between the white keys WH can be removed from the image of the white key area 22. Thereby, the hand on the keyboard 2 can be more accurately identified from other parts. In addition, since the blurring process is performed on the image data by the blurring processing unit 105, the vertical line 21a due to the gap 21 between the white keys WH remaining in the image of the white key area 22 can be removed.
 本実施の形態では、撮像装置30として魚眼レンズを有するカメラが用いられるので、単一のカメラにより鍵盤2の全体を撮像することができる。また、補正部102により鍵盤2の画像が矩形状を有するように補正されるので、矩形状の白鍵領域22を正確に表す画像データを抽出することができる。さらに、本実施の形態では、撮像装置30により鍵盤2の全体の画像を表す画像データが得られるので、鍵盤2上の手を他の部分からより正確に識別することができる。 In the present embodiment, since a camera having a fisheye lens is used as the imaging device 30, the entire keyboard 2 can be imaged by a single camera. Further, since the image of the keyboard 2 is corrected to have a rectangular shape by the correction unit 102, it is possible to extract image data that accurately represents the rectangular white key area 22. Furthermore, in the present embodiment, since image data representing the entire image of the keyboard 2 is obtained by the imaging device 30, the hand on the keyboard 2 can be more accurately identified from other parts.
 (5)他の実施の形態
 (a)上記実施の形態では、鍵盤2上の物体として演奏者の手が識別されるが、鍵盤2上の物体は手に限定されず、操作部材等の他の任意の物体であってもよい。
(5) Other Embodiments (a) In the above embodiment, the player's hand is identified as an object on the keyboard 2, but the object on the keyboard 2 is not limited to the hand. It may be any object of
 (b)上記実施の形態では、物体と予め定められた位置関係を有する基準位置として演奏者の両手間の中心位置の鍵域分割位置が検出されるが、基準位置は鍵域分割位置に限定されない。例えば、演奏者の各手の左端、右端または両端が基準位置として検出されてもよい。この場合、画面に表示される教習用楽譜上において鍵盤上の手の位置に対応するオクターブを示す情報、例えば楽譜に表されている音高が属するオクターブに対して演奏者により演奏された音高が高いか低いかを示す情報等が表示されてもよい。また、演奏者の演奏が画面の楽譜上に順次表示されるような場合、鍵盤2上の手の位置に基づいて、演奏者により演奏された音高が高音部譜表と低音部譜表とに振り分けられて表示されてもよい。この場合、演奏された音高が通常低音部譜表で表示されるべき音高であったとしても、演奏者の右手の位置からその音高が右手で演奏されたと推測された場合は、演奏された音高が高音部譜表に加線を使って表示されてもよい。逆に、演奏された音高が通常は高音部譜表で表示されるべき音高であったとしても、演奏者の左手の位置からその音高が左手で演奏されたと推測された場合は、演奏された音高が低音部譜表に加線を使って表示されてもよい。 (B) In the above embodiment, the key area division position of the center position between the player's hands is detected as the reference position having a predetermined positional relationship with the object, but the reference position is limited to the key area division position I will not. For example, the left end, the right end, or both ends of each player's hand may be detected as the reference position. In this case, information indicating the octave corresponding to the position of the hand on the keyboard on the teaching score displayed on the screen, for example, the pitch played by the player with respect to the octave to which the pitch represented in the score belongs. Information indicating whether the value is high or low may be displayed. Also, when the performer's performance is sequentially displayed on the score on the screen, the pitch played by the performer is distributed to the treble staff and the bass staff based on the position of the hand on the keyboard 2. May be displayed. In this case, even if the played pitch is the pitch that should normally be displayed on the bass staff, if it is inferred from the position of the player's right hand that the pitch is played with the right hand, then it will be played. The pitch may be displayed on the treble staff using an additive line. Conversely, even if the pitch played was normally to be displayed on the treble staff, if it was inferred from the position of the player's left hand that the pitch was played with the left hand, The indicated pitch may be displayed on the bass staff using an additive line.
 (c)上記実施の形態では、左手と右手とが重なった場合、1つの手領域が検出される。その場合、2つの手領域に基づいて鍵域分割位置が算出される代わりに、1つの手領域に基づいて鍵域分割位置が算出および更新されてもよい。例えば、検出された1つの手領域の左端、右端または中央の位置に基づいて鍵域分割位置が算出されてもよい。具体的には、検出された手領域の端の位置に対応するノート番号または端の位置に対応するノート番号から所定数の音高分離れたノート番号が鍵域分割位置として算出されてもよい。 (C) In the above embodiment, when the left hand and the right hand overlap, one hand area is detected. In that case, instead of calculating the key area division position based on the two hand areas, the key area division position may be calculated and updated based on one hand area. For example, the key area division position may be calculated based on the position of the left end, the right end, or the center of one detected hand area. Specifically, note numbers separated by a predetermined number of pitches from the note numbers corresponding to the positions of the end of the detected hand area or the positions of the end may be calculated as the key area division position .
 (d)上記実施の形態では、基準位置として1つの鍵域分割位置が検出されるが、複数の基準位置が検出されてもよい。例えば、複数の基準位置として複数の鍵域分割位置が検出されることにより鍵盤2が3以上の鍵域に分割されてもよい。 (D) In the above embodiment, one key area division position is detected as the reference position, but a plurality of reference positions may be detected. For example, the keyboard 2 may be divided into three or more key areas by detecting a plurality of key area division positions as a plurality of reference positions.
 (e)上記実施の形態では、撮像装置30が魚眼レンズを有するカメラであるが、本発明はこれに限定されず、撮像装置30が魚眼レンズを有しないカメラであってもよい。また、撮像装置30が複数のカメラを含んでもよい。さらに、上記実施の形態では、撮像装置30により得られた画像データが補正された後に鍵域分割位置の座標が算出されるが、撮像装置30により得られた画像データに補正が行われずに鍵域分割位置の座標が算出され、魚眼レンズによる画像の歪みを考慮して、算出された座標がノート番号に変換されてもよい。 (E) In the above embodiment, the imaging device 30 is a camera having a fisheye lens, but the present invention is not limited to this, and the imaging device 30 may be a camera having no fisheye lens. Also, the imaging device 30 may include a plurality of cameras. Furthermore, in the above embodiment, the coordinates of the key area division position are calculated after the image data obtained by the imaging device 30 is corrected, but the correction is not performed on the image data obtained by the imaging device 30. Coordinates of the area division position may be calculated, and the calculated coordinates may be converted into note numbers in consideration of distortion of the image due to the fisheye lens.
 (f)上記実施の形態では、撮像装置30により鍵盤2の全体の画像を表す画像データが得られるが、撮像装置30により鍵盤2の一部の画像を表す画像データが得られてもよい。予め撮像装置30による鍵盤2の撮像の範囲が定められている場合には、画像の各部に対応するノート番号を特定することが可能である。また、鍵盤2の一部の鍵にノート番号を特定するための指標等が付されている場合には、画像の各部に対応するノート番号を特定することが可能である。さらに、使用者が設定操作部3により撮像装置30の撮像範囲(鍵域)を設定可能であってもよい。あるいは、撮像装置30の角度により撮像範囲(鍵域)が自動的に設定されてもよい。 (F) In the above embodiment, image data representing the entire image of the keyboard 2 is obtained by the imaging device 30. However, image data representing a partial image of the keyboard 2 may be obtained by the imaging device 30. When the imaging range of the keyboard 2 by the imaging device 30 is determined in advance, it is possible to specify the note number corresponding to each part of the image. When an index or the like for specifying a note number is attached to a part of keys of the keyboard 2, it is possible to specify a note number corresponding to each part of the image. Furthermore, the user may be able to set the imaging range (key area) of the imaging device 30 by the setting operation unit 3. Alternatively, the imaging range (key area) may be automatically set by the angle of the imaging device 30.
 (g)上記実施の形態では、取得部101により撮像装置30からカラー画像を表す画像データが取得されるが、取得部101により撮像装置30からモノクロ画像を表す画像データが取得されてもよい。この場合、グレースケール処理部106が設けられなくてよい。 (G) In the above embodiment, the acquisition unit 101 acquires image data representing a color image from the imaging device 30. However, the acquisition unit 101 may acquire image data representing a monochrome image from the imaging device 30. In this case, the gray scale processing unit 106 may not be provided.
 (h)上記実施の形態では、グレースケール画像において輝度しきい値よりも高い輝度値を有する画素の値が“0”に変換され、輝度しきい値以下の輝度値を有する画素の値が“1”に変換されるが、輝度しきい値よりも高い輝度値を有する画素の値が“1”に変換され、輝度しきい値以下の輝度値を有する画素の値が“0”に変換されてもよい。この場合、生成部108は各画素列の“0”の数の合計を度数として示すヒストグラムを生成する。 (H) In the above embodiment, in the gray scale image, the value of the pixel having the luminance value higher than the luminance threshold is converted to “0”, and the value of the pixel having the luminance value smaller than the luminance threshold is “0”. The value of a pixel that is converted to 1 ′ ′ but has a luminance value higher than the luminance threshold is converted to “1”, and the value of a pixel that has a luminance value smaller than the luminance threshold is converted to “0” May be In this case, the generation unit 108 generates a histogram indicating the sum of the number of “0s” of each pixel column as a frequency.
 (i)本発明の基準位置検出装置および基準位置検出方法は、電子鍵盤楽器に限らず、スマートフォン、タブレット端末、パーソナルコンピュータ等の電子デバイスにも適用可能である。この場合、鍵盤が画面上に表示されてもよく、鍵盤が電子デバイスに接続されてもよい。また、上記実施の形態では、図2の基準位置検出装置100がCPU8等のコンピュータと基準位置検出プログラムとにより実現されるが、図2の基準位置検出装置100が電子回路等のハードウエアにより実現されてもよい。 (I) The reference position detection apparatus and the reference position detection method of the present invention are applicable not only to electronic keyboard instruments but also to electronic devices such as smart phones, tablet terminals, personal computers and the like. In this case, the keyboard may be displayed on the screen, or the keyboard may be connected to the electronic device. In the above embodiment, the reference position detection device 100 of FIG. 2 is realized by a computer such as the CPU 8 and a reference position detection program, but the reference position detection device 100 of FIG. 2 is realized by hardware such as an electronic circuit. It may be done.

Claims (12)

  1. 鍵盤および当該鍵盤上の物体の撮像により得られた画像を表す画像データを取得する取得部と、
     取得された画像データから黒鍵を含まず白鍵を含む領域に対応する画像データを抽出する抽出部と、
     抽出された画像データの輝度値に基づいて前記鍵盤上の前記物体を識別する識別部と、
     識別された前記物体に対して前記鍵盤上で所定の位置関係を有する基準位置を検出する検出部とを備える、基準位置検出装置。
    An acquisition unit configured to acquire image data representing an image obtained by imaging a keyboard and an object on the keyboard;
    An extraction unit for extracting image data corresponding to an area not including the black key but including the white key from the acquired image data;
    An identification unit for identifying the object on the keyboard based on the luminance value of the extracted image data;
    A reference position detection device comprising: a detection unit that detects a reference position having a predetermined positional relationship on the keyboard with respect to the identified object.
  2. 前記物体は演奏者の手である、請求項1記載の基準位置検出装置。 The reference position detection device according to claim 1, wherein the object is a player's hand.
  3. 前記手は両手であり、前記基準位置は前記両手間の位置である、請求項2記載の基準位置検出装置。 The reference position detection device according to claim 2, wherein the hand is both hands, and the reference position is a position between the both hands.
  4. 前記基準位置は、前記鍵盤をそれぞれ個別の楽音制御特性が割り当てられる複数の鍵域に分割する鍵域分割位置である、請求項1~3のいずれか一項に記載の基準位置検出装置。 The reference position detection device according to any one of claims 1 to 3, wherein the reference position is a key area division position where the keyboard is divided into a plurality of key areas to which individual tone control characteristics are respectively assigned.
  5. 抽出された画像データの解像度を低減する解像度低減部をさらに備え、
     前記識別部は、解像度の低減後の画像データの輝度値に基づいて前記鍵盤上の前記物体を識別する、請求項1~4のいずれか一項に記載の基準位置検出装置。
    And a resolution reducing unit that reduces the resolution of the extracted image data,
    The reference position detection device according to any one of claims 1 to 4, wherein the identification unit identifies the object on the keyboard based on the luminance value of the image data after the resolution reduction.
  6. 抽出された画像データにぼかし処理を行うぼかし処理部をさらに備え、
     前記識別部は、ぼかし処理後の画像データの輝度値に基づいて前記鍵盤上の前記物体を識別する、請求項1~5のいずれか一項に記載の基準位置検出装置。
    The image processing apparatus further comprises a blurring processing unit that performs blurring processing on the extracted image data;
    The reference position detection device according to any one of claims 1 to 5, wherein the identification unit identifies the object on the keyboard based on a luminance value of the image data after the blurring process.
  7. 抽出された画像データの輝度値を二値の画素値に変換する二値化を行う二値化部をさらに備え、
     前記識別部は、二値化後の画像データの画素値に基づいて前記鍵盤上の前記物体を識別する、請求項1~6のいずれか一項に記載の基準位置検出装置。
    The image processing apparatus further includes a binarization unit that performs binarization to convert luminance values of the extracted image data into binary pixel values,
    The reference position detection device according to any one of claims 1 to 6, wherein the identification unit identifies the object on the keyboard based on a pixel value of image data after binarization.
  8. 抽出された画像データにおいて前記鍵盤の各白鍵の縦方向に対して平行に並ぶ各画素列の輝度値の合計を算出し、各画素列の輝度値の合計を度数として示すヒストグラムを生成する生成部をさらに備え、
     前記識別部は、生成されたヒストグラムに基づいて前記鍵盤上の前記物体を識別する、請求項1~7のいずれか一項に記載の基準位置検出装置。
    In the extracted image data, the sum of the luminance values of each pixel row arranged parallel to the longitudinal direction of each white key of the keyboard is calculated, and a histogram is generated showing the sum of the luminance values of each pixel row as a frequency Further equipped with
    The reference position detection device according to any one of claims 1 to 7, wherein the identification unit identifies the object on the keyboard based on the generated histogram.
  9. 鍵盤および当該鍵盤上の物体を撮像する撮像装置をさらに備え、
     前記取得部は、前記撮像装置から画像データを取得する、請求項1~8のいずれか一項に記載の基準位置検出装置。
    The apparatus further comprises a keyboard and an imaging device for imaging an object on the keyboard,
    The reference position detection device according to any one of claims 1 to 8, wherein the acquisition unit acquires image data from the imaging device.
  10. 前記撮像装置は魚眼レンズを有するカメラであり、
     取得された画像データを鍵盤が矩形状を有するように補正する補正部をさらに備え、
     前記抽出部は、補正後の画像データから黒鍵を含まず白鍵を含む領域に対応する画像データを抽出する、請求項9記載の基準位置検出装置。
    The imaging device is a camera having a fisheye lens,
    And a correction unit that corrects the acquired image data so that the keyboard has a rectangular shape,
    10. The reference position detection device according to claim 9, wherein the extraction unit extracts image data corresponding to a region not including a black key but including a white key from the image data after correction.
  11. 前記取得部は、前記鍵盤の全体を含む画像を示す画像データを取得する、請求項1~10のいずれか一項に記載の基準位置検出装置。 The reference position detection device according to any one of claims 1 to 10, wherein the acquisition unit acquires image data indicating an image including the entire keyboard.
  12. 鍵盤および当該鍵盤上の物体の撮像により得られた画像を表す画像データを取得するステップと、
     取得された画像データから黒鍵を含まず白鍵を含む領域を表す画像データを抽出するステップと、
     抽出された画像データの輝度値に基づいて前記鍵盤上の前記物体を識別するステップと、
     識別された前記物体に対して前記鍵盤上で所定の位置関係を有する基準位置を検出するステップとを備える、基準位置検出方法。
    Acquiring an image data representing an image obtained by imaging a keyboard and an object on the keyboard;
    Extracting image data representing an area not including the black key but including the white key from the acquired image data;
    Identifying the object on the keyboard based on the luminance value of the extracted image data;
    Detecting a reference position having a predetermined positional relationship on the keyboard with respect to the identified object.
PCT/JP2017/039578 2017-11-01 2017-11-01 Reference position detection device and reference position detection method WO2019087331A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2017/039578 WO2019087331A1 (en) 2017-11-01 2017-11-01 Reference position detection device and reference position detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2017/039578 WO2019087331A1 (en) 2017-11-01 2017-11-01 Reference position detection device and reference position detection method

Publications (1)

Publication Number Publication Date
WO2019087331A1 true WO2019087331A1 (en) 2019-05-09

Family

ID=66331585

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/039578 WO2019087331A1 (en) 2017-11-01 2017-11-01 Reference position detection device and reference position detection method

Country Status (1)

Country Link
WO (1) WO2019087331A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111695499A (en) * 2020-06-09 2020-09-22 小叶子(北京)科技有限公司 Key identification method and device, electronic equipment and storage medium
CN112818981A (en) * 2021-01-15 2021-05-18 小叶子(北京)科技有限公司 Musical instrument playing key position prompting method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007240929A (en) * 2006-03-09 2007-09-20 Yamaha Corp Key area dividing point determining device
JP2009122753A (en) * 2007-11-12 2009-06-04 Sharp Corp Image processor
JP4389841B2 (en) * 2005-05-31 2009-12-24 ヤマハ株式会社 Key range dividing apparatus and program
JP2014063265A (en) * 2012-09-20 2014-04-10 Casio Comput Co Ltd Image processor, image processing method and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4389841B2 (en) * 2005-05-31 2009-12-24 ヤマハ株式会社 Key range dividing apparatus and program
JP2007240929A (en) * 2006-03-09 2007-09-20 Yamaha Corp Key area dividing point determining device
JP2009122753A (en) * 2007-11-12 2009-06-04 Sharp Corp Image processor
JP2014063265A (en) * 2012-09-20 2014-04-10 Casio Comput Co Ltd Image processor, image processing method and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111695499A (en) * 2020-06-09 2020-09-22 小叶子(北京)科技有限公司 Key identification method and device, electronic equipment and storage medium
CN111695499B (en) * 2020-06-09 2024-04-16 小叶子(北京)科技有限公司 Key identification method and device, electronic equipment and storage medium
CN112818981A (en) * 2021-01-15 2021-05-18 小叶子(北京)科技有限公司 Musical instrument playing key position prompting method and device, electronic equipment and storage medium
CN112818981B (en) * 2021-01-15 2023-12-12 小叶子(北京)科技有限公司 Musical instrument playing key position prompting method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
KR101524279B1 (en) Rgb-d camera based piano education system and method
US9747876B1 (en) Adaptive layout of sheet music in coordination with detected audio
AU6735300A (en) Method and apparatus for selecting harmonic color using harmonics, and method and apparatus for converting sound to color or color to sound
TWI386912B (en) Method and system for recognizing music scores
WO2019087331A1 (en) Reference position detection device and reference position detection method
US8744136B2 (en) Sound reproduction method and device
KR102306765B1 (en) Sheet Music recognition method using artificial intelligence processing
JP2019159145A (en) Information processing method, electronic apparatus and program
KR101896193B1 (en) Method for converting image into music
US7504572B2 (en) Sound generating method
CN111052220B (en) Chord information extraction device, chord information extraction method and storage device
CN114419634B (en) Feature rule-based music score analysis method and device
CA2885712A1 (en) Methods and systems for visual music transcription
US9418637B1 (en) Methods and systems for visual music transcription
JP2010204450A (en) Musical score display device and program for establishing musical score display method
JP3643829B2 (en) Musical sound generating apparatus, musical sound generating program, and musical sound generating method
KR20070094207A (en) Method and apparatus for converting image into sound
JP6496998B2 (en) Performance information editing apparatus and performance information editing program
KR101965694B1 (en) Method and apparatus for providing advertising content
KR102089207B1 (en) Method of playing image into music and server supplying program for performing the same
KR102241864B1 (en) Apparatus of contents providing based on image analyzing, contents providing system including the apparatus and method of contents providing
WO2019132126A1 (en) Operation device for graphic content-based composition service
JPH06332443A (en) Score recognizing device
US7411123B2 (en) Method for transforming image into music
KR102400962B1 (en) System for recognize musical note

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17930340

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17930340

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP