JPH09108403A - Shogi game recording device - Google Patents
Shogi game recording deviceInfo
- Publication number
- JPH09108403A JPH09108403A JP26852395A JP26852395A JPH09108403A JP H09108403 A JPH09108403 A JP H09108403A JP 26852395 A JP26852395 A JP 26852395A JP 26852395 A JP26852395 A JP 26852395A JP H09108403 A JPH09108403 A JP H09108403A
- Authority
- JP
- Japan
- Prior art keywords
- piece
- image
- shogi
- changed
- state
- 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
Links
- 241000544785 Bromus japonicus Species 0.000 abstract 1
- 238000000034 method Methods 0.000 description 34
- 238000010586 diagram Methods 0.000 description 9
- 230000015572 biosynthetic process Effects 0.000 description 5
- 239000004575 stone Substances 0.000 description 5
- 238000003786 synthesis reaction Methods 0.000 description 5
- 238000010276 construction Methods 0.000 description 2
- 238000005286 illumination Methods 0.000 description 2
- BQCADISMDOOEFD-UHFFFAOYSA-N Silver Chemical compound [Ag] BQCADISMDOOEFD-UHFFFAOYSA-N 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- PCHJSUWPFVWCPO-UHFFFAOYSA-N gold Chemical compound [Au] PCHJSUWPFVWCPO-UHFFFAOYSA-N 0.000 description 1
- 229910052737 gold Inorganic materials 0.000 description 1
- 239000010931 gold Substances 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 229910052709 silver Inorganic materials 0.000 description 1
- 239000004332 silver Substances 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】この発明は、将棋の対局の手
順をリアルタイムにかつ自動的に記録する棋譜記録装置
に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a game record recorder for automatically recording the procedure of playing shogi in real time.
【0002】[0002]
【従来の技術】従来から囲碁の碁石を認識する方法とし
て、碁盤の画像をTVカメラで取込み、2値化処理やパ
ターンマッチング等の一般的な画像処理の手法を用いて
認識する手法が開発されている(特開平4−30707
7号公報、特開平5−237213号公報参照)。2. Description of the Related Art Conventionally, as a method for recognizing a Go game, a method has been developed in which an image of a board is captured by a TV camera and is recognized by using a general image processing method such as binarization processing and pattern matching. (Japanese Patent Laid-Open No. 4-30707)
No. 7, JP-A-5-237213).
【0003】囲碁の場合には、全ての碁石においてその
形状は同じあり、碁石の色彩も白と黒の2種類しかな
く、しかも碁石は碁盤上を移動することなく新たに打た
れるか取られるかのいずれかである。このため、碁盤上
の罫線の交点に白または黒の碁石が存在するか否かを判
別することによって、碁盤上の碁石の状態変化を自動的
に把握することができる。In the case of Go, all Go stones have the same shape, and there are only two kinds of Go stones, white and black, and the Go stone is newly struck or taken without moving on the board. Either of them. Therefore, it is possible to automatically grasp the state change of the go stone on the board by determining whether or not there is a white or black go stone at the intersection of the ruled lines on the board.
【0004】ところが、将棋の場合には、一手毎の状態
変化を自動的に把握しようとすると、各駒の表裏に描か
れた文字、各駒の形状および各駒の移動を認識しなけれ
ばならないため、碁石の状態変化を認識する方法をその
まま適用することはできず、一手毎の駒の状態変化を自
動的に把握する方法は未だ開発されていない。However, in the case of shogi, in order to automatically grasp the state change of each hand, it is necessary to recognize the characters drawn on the front and back of each piece, the shape of each piece, and the movement of each piece. The method of recognizing the state change of cannot be applied as it is, and a method of automatically grasping the state change of each piece has not been developed yet.
【0005】[0005]
【発明が解決しようとする課題】この発明は、棋譜を自
動的に記録することができるとともに、一手毎に駒の変
化内容を自動的に音声出力することができる棋譜記録装
置を提供することを目的とする。SUMMARY OF THE INVENTION It is an object of the present invention to provide a game record recorder capable of automatically recording a game record and automatically outputting the change contents of a piece for each move. And
【0006】[0006]
【課題を解決するための手段】この発明による棋譜記録
装置は、将棋盤上の駒の画像を撮像する撮像手段、撮像
画像に基づいて、駒の状態が変化したか否かを判定する
判定手段、駒の状態が変化したと判定されたときに、変
化した駒の種類と位置とを特定する特定手段、特定され
た駒の種類と位置とに基づいて、一手毎に駒の変化状態
を記憶手段に記録する記録手段、および特定された駒の
種類と位置とに基づいて、一手毎に駒の変化状態を音声
出力する音声出力手段を備えていることを特徴とする。A game record recording apparatus according to the present invention comprises an image pickup means for picking up an image of a piece on a shogi board, a judging means for judging whether or not the state of the piece has changed based on the picked-up image, and a piece for the piece. When it is determined that the state has changed, specifying means for specifying the changed type and position of the piece, and recording means for recording the changed state of the piece for each hand in the storage means based on the specified type and position of the piece , And voice output means for voice-outputting the change state of the piece for each hand based on the specified type and position of the piece.
【0007】判定手段としては、たとえば、各枡目ごと
の駒の有無状態に基づいて、駒の状態が変化したか否か
を判定するものが用いられる。As the determining means, for example, a means for determining whether or not the state of the piece has changed based on the presence or absence state of the piece for each cell is used.
【0008】特定手段としては、たとえば、将棋のルー
ルとパターンマッチングとに基づいて、変化した駒の種
類と位置とを特定するものが用いられる。As the specifying means, for example, a means for specifying the changed type and position of the piece based on the shogi rules and pattern matching is used.
【0009】この発明による棋譜記録装置では、一手毎
に駒の変化状態が記憶手段に記録されるので、棋譜が自
動的に記録される。また、一手毎に駒の変化状態が音声
出力されるので、駒の変化状態がより明確に理解される
ようになる。また、対局を行なっている棋士が、この音
声を聞いてから、次の手を打つようにすることにより、
駒の状態変化の誤判定等を防止することができる。In the game record recording apparatus according to the present invention, since the change state of the piece is recorded in the storage means for each move, the game record is automatically recorded. Further, since the change state of the piece is output by voice for each hand, the change state of the piece can be more clearly understood. In addition, by playing this game, the shogi player will take the next step after listening to this voice.
It is possible to prevent erroneous determination of a change in the state of the piece.
【0010】[0010]
【発明の実施の形態】以下、図面を参照して、この発明
の実施の形態について説明する。Embodiments of the present invention will be described below with reference to the drawings.
【0011】図1は、棋譜記録装置の外観を示してい
る。棋譜記録装置は、将棋盤を撮像するCCDカメラ1
と、パーソナルコンピュータ(以下、ホストという)1
9とを備えている。ホスト19は、棋譜画像を表示する
ための内部モニタ22を備えている。また、ホスト19
には、CCDカメラ1で撮像された画像を画像処理する
ための画像処理ボード30および駒の変化内容を一手毎
に音声出力させるための音声合成ボード20が搭載され
ている。画像処理ボード30には、外部モニタ5が接続
されている。音声合成ボード20には、スピーカ21が
接続されている。FIG. 1 shows the appearance of a game record recording apparatus. The game record recorder is a CCD camera 1 that captures an image of a shogi board.
And a personal computer (hereinafter referred to as host) 1
9 and 9. The host 19 has an internal monitor 22 for displaying a game record image. Also, the host 19
An image processing board 30 for image-processing the image captured by the CCD camera 1 and a voice synthesizing board 20 for outputting the voice of the change contents of the frame are mounted on the. The external monitor 5 is connected to the image processing board 30. A speaker 21 is connected to the voice synthesis board 20.
【0012】図2は、棋譜記録再生装置の電気的構成を
示し、特にホスト19に搭載されている画像処理ボード
の詳細な構成を示している。1は、将棋盤の画像を取込
むためのCCDカメラ1である。CCDカメラ1は実際
には1台のみ設けられているが、図2には、説明の都合
上、一手前の画像を取り込んだCCD1aと、現在の画
像を取込むCCD1bとを区別して図示されている。図
2において、2 つのブロックが重ね合わされて図示され
ている部分は、一手前の取込み画像に対応しているもの
と現在の取込み画像に対応しているものとを表してい
る。FIG. 2 shows the electrical construction of the game record recording / reproducing apparatus, and particularly shows the detailed construction of the image processing board mounted on the host 19. Reference numeral 1 is a CCD camera 1 for capturing an image of a shogi board. Although only one CCD camera 1 is actually provided, for convenience of description, FIG. 2 shows the CCD 1a that captures the previous image and the CCD 1b that captures the current image separately. There is. In FIG. 2, the part in which the two blocks are overlapped and illustrated represents the one corresponding to the previous captured image and the one corresponding to the current captured image.
【0013】CCDカメラ1で撮像されたアナログの画
像信号は、A/D変換器2によってディジタルの画像信
号に変換される。An analog image signal picked up by the CCD camera 1 is converted into a digital image signal by the A / D converter 2.
【0014】6は、画像バスである。画像バス6には、
フレームメモリ7、第1のメモリ制御部8、ビデオ制御
部9、画像処理部11および画像メモリ13が接続され
ている。Reference numeral 6 is an image bus. In the image bus 6,
The frame memory 7, the first memory control unit 8, the video control unit 9, the image processing unit 11, and the image memory 13 are connected.
【0015】フレームメモリ7には、A/D変換器2に
よって得られたディジタル画像が格納される。第1のメ
モリ制御部8およびビデオ制御部9は、フレームメモリ
7への画像の書き込みを、CCDカメラ1の出力との同
期をとって制御する。フレームメモリ7に格納された画
像は、D/A変換器4を介して外部モニタ5に表示され
る。The frame memory 7 stores the digital image obtained by the A / D converter 2. The first memory control unit 8 and the video control unit 9 control writing of an image to the frame memory 7 in synchronization with the output of the CCD camera 1. The image stored in the frame memory 7 is displayed on the external monitor 5 via the D / A converter 4.
【0016】画像処理部11は、取込み画像(フレーム
メモリ7に格納されたディジタル画像)に対して、投影
処理、テンプレートマッチング等の画像処理を行なうた
めのものである。The image processing unit 11 is for performing image processing such as projection processing and template matching on the captured image (digital image stored in the frame memory 7).
【0017】画像メモリ13には、画像処理部11によ
る演算結果、テンプレートマッチングに用いられる駒の
テンプレートが記憶される。画像メモリ13は、第2の
メモリ制御部14によって制御される。The image memory 13 stores the calculation result of the image processing unit 11 and the template of the frame used for template matching. The image memory 13 is controlled by the second memory control unit 14.
【0018】16は、画像処理ボードに搭載されている
CPUである。15は、CPUバスである。CPUバス
15には、上述した第1および第2のメモリ制御部8、
14、フレームメモリ7、画像メモリ13および画像処
理部11の他、プロセッサEPROM18およびホスト
インタフェース17が接続されている。Reference numeral 16 is a CPU mounted on the image processing board. Reference numeral 15 is a CPU bus. The CPU bus 15 has the above-mentioned first and second memory control units 8,
14, a frame memory 7, an image memory 13, an image processing unit 11, a processor EPROM 18, and a host interface 17 are connected.
【0019】EPROM18には、CPU16のプログ
ラム、すなわち画像処理ボードの制御プログラムが格納
されている。ホストインタフェース17は、ホスト19
側のCPUバスと画像処理ボードのCPUバス15との
間のデータの受渡しを行なう。ホスト19に搭載されて
いる音声合成ボード20にはスピーカ21が接続されて
いる。The EPROM 18 stores a program for the CPU 16, that is, a control program for the image processing board. The host interface 17 is a host 19
Data is transferred between the CPU bus on the side and the CPU bus 15 of the image processing board. A speaker 21 is connected to the voice synthesis board 20 mounted on the host 19.
【0020】ホスト19は、そのプログラム、棋譜、そ
の他必要なデータを記憶する記憶装置23を備えてい
る。ホスト19は、画像処理ボード30および音声合成
ボード20に命令を出す他、ユーザインタフェース等に
関する様々な処理を行なう。The host 19 is provided with a storage device 23 for storing its program, game record, and other necessary data. The host 19 issues a command to the image processing board 30 and the voice synthesis board 20, and also performs various processes related to a user interface and the like.
【0021】図3は、棋譜記録装置の全体的な処理手順
を示している。まず、対局が開始される前に初期化処理
が行なわれる(ステップS1)。初期化処理において
は、将棋盤の位置決め、テンプレートの作成、照明条件
の設定等が行なわれる。FIG. 3 shows the overall processing procedure of the game record recording apparatus. First, an initialization process is performed before the game starts (step S1). In the initialization processing, positioning of a shogi board, creation of a template, setting of illumination conditions, etc. are performed.
【0022】対局開始時には、ホスト19側の記憶装置
23に、対局開始時の駒の配置に応じた各駒の種類と位
置に関する情報が記憶されており、ホスト19の内部モ
ニタ22に、対局開始時の駒の配置画像が表示される。At the start of the game, the storage device 23 on the host 19 side stores information about the type and position of each piece according to the arrangement of the pieces at the start of the game, and the internal monitor 22 of the host 19 stores the information at the start of the game. A layout image of the pieces is displayed.
【0023】対局が開始されると、画像が取り込まれる
(ステップS2)。そして、取り込まれた画像に基づく
移動判定処理が行なわれる(ステップS3)。移動判定
処理においては、将棋盤の枡目毎の駒の有無を判別する
ことにより、駒が移動したか否かが判定される。なお、
ここで駒が移動したとは、将棋盤上に存在している駒が
移動した場合の他、将棋盤上に存在しなかった持駒が打
たれた場合も含むものとする。また、将棋盤内に手、人
影等の障害物が進入したか否かの判定も行なわれる。When the game starts, an image is captured (step S2). Then, the movement determination process based on the captured image is performed (step S3). In the movement determination process, whether or not the piece has moved is determined by determining the presence or absence of a piece for each grid of the shogi board. In addition,
Here, moving a piece includes not only the case where a piece existing on the shogi board has moved but also the case where a piece that has not existed on the shogi board is hit. Further, it is also determined whether or not an obstacle such as a hand or a human figure has entered the shogi board.
【0024】上記ステップS3において、駒が移動して
いないと判定された場合、または将棋盤内に障害物が進
入したと判定された場合には、ステップ2に戻って画像
が新たに取り込まれる。そして、新たに取り込まれた画
像に基づく移動判定が開始される。If it is determined in step S3 that the piece has not moved, or if an obstacle has entered the shogi board, the process returns to step 2 and a new image is captured. Then, the movement determination based on the newly captured image is started.
【0025】上記ステップS3において、駒が移動した
と判定されたときには、ルールに基づく駒種類特定処理
が行なわれる(ステップS4)。この処理においては、
将棋のルールに基づいて駒の移動が正当か否かが判定さ
れるとともに、将棋のルールに基づいて移動した駒の種
類の絞り込みまたは特定が行なわれる。When it is determined in step S3 that the piece has moved, a piece type specifying process based on the rule is performed (step S4). In this process,
Based on the rules of Shogi, it is determined whether or not the pieces move, and the types of the moved pieces are narrowed down or specified based on the rules of Shogi.
【0026】上記ステップS4において駒の移動が正当
でない(ルール違反)と判定されたときには、ステップ
S2に戻って、画像が新たに取り込まれる。When it is determined in step S4 that the movement of the frame is not proper (rule violation), the process returns to step S2 and a new image is captured.
【0027】上記ステップS4において、将棋のルール
のみによって移動した駒の種類が特定された場合には、
画像メモリ13に記憶されているテンプレートを用いた
パターンマッチング処理によって駒の種類の確認が行な
われた後(ステップS6)、駒の変化内容が記録される
(ステップS7)。たとえば、飛車、角行、桂馬等のよ
うに、その駒特有の移動が行なわれた場合には、将棋の
ルールのみによって移動した駒の種類が判定される。こ
の場合の移動した駒の記録は、その画像そのものではな
く移動した駒に割り当てられた種類を表すコードと位置
のデータであり、ホストインタフェース17を経由して
ホスト19側の記憶装置23に記憶される。In step S4, if the type of the moved piece is specified only by the rule of shogi,
After the type of the piece is confirmed by the pattern matching process using the template stored in the image memory 13 (step S6), the change content of the piece is recorded (step S7). For example, when a move peculiar to the piece is carried out, such as a jumping car, a square train, and Keima, the type of the moved piece is determined only by the rules of shogi. The record of the moved frame in this case is not the image itself but the code and position data representing the type assigned to the moved frame, and is stored in the storage device 23 on the host 19 side via the host interface 17. .
【0028】また、ホスト19の内部モニタ22の画像
が、変化後の駒の配置を表す画像に切り替えられる(ス
テップS8)。また、棋譜情報がテキストに変換され
て、音声合成ボード20に送られることにより、たとえ
ば、「センテ(先手) ヨン(四) ヨン(四) フ
(歩)」というような、指手の内容(駒の変化内容)が
スピーカ21を介して音声出力される(ステップS
9)。そして、ステップS2に戻って新たな画像が取り
込まれて、ステップS3以降の処理が行なわれる。The image on the internal monitor 22 of the host 19 is switched to the image showing the changed arrangement of the frames (step S8). In addition, by converting the game information into text and sending it to the voice synthesis board 20, for example, the content of a finger hand such as “Cente (first move) Yong (four) Yong (four) Hu (step)” The change contents of the piece are output as voice through the speaker 21 (step S
9). Then, the process returns to step S2, a new image is taken in, and the processes after step S3 are performed.
【0029】移動は正当であるが、将棋のルールのみで
は、移動した駒の種類を特定することができない場合に
は、ステップS5に進み、画像メモリ13に記憶されて
いるテンプレートを用いたテンプレートマッチング処理
により、移動した駒の種類が特定される。そして、ステ
ップS7〜S9の処理が行なわれた後、ステップS2に
戻る。If the movement is valid, but the type of the moved piece cannot be specified only by the rules of shogi, the process proceeds to step S5, and template matching processing using the template stored in the image memory 13 is performed. The type of the moved piece is specified by. Then, after the processes of steps S7 to S9 are performed, the process returns to step S2.
【0030】図4は、図3のステップS1の初期化処理
の詳細な手順を示している。初期化処理においては、ま
ず、将棋盤の位置設定およびカメラのピント合わせが行
なわれる(ステップS11)。すなわち、モニタ5に映
し出された画像に基づいて、カメラ1の視野内に将棋盤
が収まるように、カメラ1の位置が調整される。また、
モニタ5内における将棋盤の位置、傾き、サイズ(倍
率)が調整されるとともにピントが調整される。FIG. 4 shows a detailed procedure of the initialization process of step S1 of FIG. In the initialization process, first, the position of the shogi board is set and the camera is focused (step S11). That is, based on the image displayed on the monitor 5, the position of the camera 1 is adjusted so that the shogi board fits within the field of view of the camera 1. Also,
The position, inclination, size (magnification) of the shogi board in the monitor 5 are adjusted, and the focus is adjusted.
【0031】次に、照明条件の設定が行なわれる(ステ
ップS12)。つまり、モニタ5に映し出された画像に
基づいて、カメラ1の絞りが調整されることにより、画
面の明るさが調整される。Next, the illumination conditions are set (step S12). That is, the brightness of the screen is adjusted by adjusting the aperture of the camera 1 based on the image displayed on the monitor 5.
【0032】次に、将棋盤の位置の教示が行なわれる
(ステップS13)。この操作は、カメラ1の視野内の
どの位置に将棋盤があるかを棋譜記録用プログラムに教
示するための操作である。具体的には、画面中の将棋盤
の領域がマウス等の入力装置によって教示される。この
教示を、自動的に行なうようにしてもよい。Next, the position of the shogi board is taught (step S13). This operation is an operation for teaching the game record recording program at which position in the visual field of the camera 1 the shogi board is located. Specifically, the area of the shogi board on the screen is taught by an input device such as a mouse. This teaching may be performed automatically.
【0033】次に、将棋盤のチェックが行なわれる(ス
テップS14)。つまり、将棋盤の傷、色等がチェック
され、二値化処理における閾値等のパラメータの設定が
行なわれる。Next, the shogi board is checked (step S14). That is, the scratches, colors, etc. of the shogi board are checked, and parameters such as threshold values in the binarization process are set.
【0034】次に、テンプレートデータのロードまたは
テンプレートの登録が行なわれる(ステップS15)。
つまり、今回用いられる将棋の駒に対応するテンプレー
トがホスト19側の記憶装置23に記憶されている場合
には、記憶装置23から、画像処理ボードの画像メモリ
13にテンプレートがロードされる。今回用いられる将
棋の駒に対応するテンプレートがホスト19側の記憶装
置23に記憶されていない場合には、駒をCCDカメラ
1によって撮像することによって、テンプレートが新規
に作成されて、画像メモリ13に格納される。Next, the template data is loaded or the template is registered (step S15).
That is, when the template corresponding to the shogi piece used this time is stored in the storage device 23 on the host 19 side, the template is loaded from the storage device 23 into the image memory 13 of the image processing board. If the template corresponding to the shogi piece used this time is not stored in the storage device 23 on the host 19 side, a new template is created by capturing an image of the piece with the CCD camera 1, and the template is created in the image memory 13. Is stored.
【0035】テンプレートを新規に作成する場合には、
まずカメラ1を用いて、各駒の傾きのない画像を取込
み、図5に示すような14種類の画像からなる元データ
を作成する。次に、この元データを180°回転させた
データ(相手方の駒)を作成し、元データと合わせて図
6に示すような角度0°のテンプレートとする。When creating a new template,
First, the camera 1 is used to capture an image without inclination of each frame, and original data composed of 14 types of images as shown in FIG. 5 is created. Next, the original data is rotated 180 ° to create data (partner of the other party), and combined with the original data to form a template with an angle of 0 ° as shown in FIG.
【0036】さらに、この角度0°のテンプレートをア
フィン変換することにより、−30°〜+30°の範囲
で所定角度刻み(たとえば5°)のテンプレートをそれ
ぞれ作成する。このようにして、所定角度刻みの複数の
テンプレートを得る。Further, by affine-transforming the template having the angle of 0 °, the templates having predetermined angle intervals (for example, 5 °) are created in the range of -30 ° to + 30 °. In this way, a plurality of templates with predetermined angle intervals are obtained.
【0037】上記ステップS11〜S15の処理が終了
すると、画像処理に使用する各種パラメータが、画像処
理ボード側に転送され(ステップS16)、初期化処理
は終了する。When the processing of steps S11 to S15 is completed, various parameters used for the image processing are transferred to the image processing board side (step S16), and the initialization processing is completed.
【0038】図7は、図3の移動判定処理の詳細な手順
を示している。まず、判定前処理が行なわれる(ステッ
プS21)。この前処理においては、図8に示すよう
に、まず、取り込まれた画像(イメージ)がハイパスフ
ィルタを用いて空間フィルタ処理される。そして、処理
後の画像が閾値を用いて二値化され、二値化イメージが
得られる。FIG. 7 shows the detailed procedure of the movement determination process of FIG. First, pre-determination processing is performed (step S21). In this preprocessing, as shown in FIG. 8, the captured image (image) is first spatially filtered using a high-pass filter. Then, the processed image is binarized using a threshold value to obtain a binarized image.
【0039】次に、ステップS21で得られた二値化イ
メージに基づいて、障害物判定処理が行なわれる(ステ
ップS22)。Next, an obstacle determination process is performed based on the binarized image obtained in step S21 (step S22).
【0040】この障害物判定処理においては、図9に示
すように、将棋盤の枡目の最も外側の4辺のそれぞれに
沿って細長いウインドウが設定され、各ウインドウ内の
画像が切り出される。そして、各ウインドウ内の画像の
プロダクションが求められる。In this obstacle determination process, as shown in FIG. 9, elongated windows are set along each of the outermost four sides of the grid of the shogi board, and the image in each window is cut out. Then, the production of the image in each window is required.
【0041】たとえば、二値化イメージにおいて、黒画
素を0とし、白画素を1とすると、0の画素の連続長が
予め定められた閾値を越えれば、障害物有りと判定され
る。障害物があると判定されたときには、駒の移動判定
に支障をきたすので、新たに画像が取り込まれる。For example, in the binarized image, if the black pixel is 0 and the white pixel is 1, and if the continuous length of 0 pixels exceeds a predetermined threshold value, it is determined that there is an obstacle. When it is determined that there is an obstacle, the movement determination of the piece is hindered, so a new image is captured.
【0042】障害物がないと判定されたときには、ステ
ップS23に移行し、駒の有無判定が行なわれる。つま
り、各枡目ごとに、駒があるか否かが求められる。たと
えば、枡目内の黒画素の面積の総和が、閾値以上であれ
ば駒が有ると判定され、枡目内の黒画素の面積の総和
が、閾値より小さければ駒が無いと判定される。When it is determined that there are no obstacles, the process proceeds to step S23, and it is determined whether or not there is a piece. That is, whether or not there is a piece is required for each cell. For example, it is determined that there is a piece if the total area of black pixels in the grid is equal to or larger than the threshold value, and it is determined that there is no piece if the total area of black pixels in the grid area is smaller than the threshold value.
【0043】次に、今回求められた駒の有無状態と、前
回に求められた駒の有無状態とに基づいて、駒が移動し
たか否かが判定される(ステップS24)。この駒の移
動判定には、次の表1に示すようなルールが用いられ
る。Next, it is determined whether or not the piece has moved, based on the piece presence / absence state obtained this time and the piece presence / absence state obtained last time (step S24). The rules shown in Table 1 below are used to determine the movement of the pieces.
【0044】[0044]
【表1】 [Table 1]
【0045】つまり、ある枡目において、駒が有る状態
から駒が無い状態に変化したとき、駒が無い状態から駒
が有る状態に変化したときには、駒が移動したと判定さ
れる。In other words, it is determined that the piece has moved when the state in which there is a piece is changed to the state in which there is no piece in a certain mesh, and when the state is changed from the state where there is no piece to the state where there is a piece.
【0046】駒の移動がないと判定されたときには、手
が進んでいないのであるから、新たに画像が取り込まれ
る。駒の移動があると判定された場合には、画像処理ボ
ード側からCPUバス15を介して、駒の画像データ列
がホスト19に転送される。そして、図3のステップS
4の処理が行なわれる。When it is determined that there is no movement of the frame, the hand has not advanced, so a new image is captured. If it is determined that the frame has moved, the image data string of the frame is transferred from the image processing board side to the host 19 via the CPU bus 15. And step S in FIG.
Processing 4 is performed.
【0047】図10は、図3のステップS4〜S7の各
処理を示している。図10において、鎖線より左側に示
されているステップは画像処理ボード側で行なわれる処
理を示し、鎖線より右側に示されているステップはホス
ト19側で行なわれる処理を示している。FIG. 10 shows each process of steps S4 to S7 of FIG. In FIG. 10, steps shown on the left side of the chain line show processing performed on the image processing board side, and steps shown on the right side of the chain line show processing performed on the host 19 side.
【0048】ステップS4では、移動した駒の種類の将
棋ルールに基づく特定が試みられるとともに、移動した
駒の位置の特定が行なわれる。将棋ルールは、ホスト1
9側の記憶装置23に記憶されている。また、ステップ
S4の処理は、ホスト19側で行なわれる。In step S4, an attempt is made to specify the type of the moved piece based on the shogi rule, and the position of the moved piece is specified. Shogi rules are for host 1
It is stored in the storage device 23 on the ninth side. The processing of step S4 is performed on the host 19 side.
【0049】ところで、将棋の場合、駒の移動パターン
としては、図11、図12および図13に示すように、
次の3つのパターンがある。By the way, in the case of shogi, the movement patterns of the pieces are as shown in FIG. 11, FIG. 12 and FIG.
There are three patterns:
【0050】パターン1:自駒のみを単に移動させる場
合(図11参照)。 パターン2:自駒を移動して相手の駒を取る場合(図1
2参照)。 パターン3:空いている枡目に自分の持駒を打つ場合
(図13参照)。Pattern 1: A case where only one frame is simply moved (see FIG. 11). Pattern 2: When moving one's piece and taking the opponent's piece (Fig. 1
2). Pattern 3: When hitting one's own piece on an empty square (see FIG. 13).
【0051】パターン1の場合は、図11に示すよう
に、駒が変化する領域(変化領域)は、”駒無しから駒
有りに変化する領域”と、”駒有りから駒無しに変化す
る領域”の2か所となる。図11においては、駒無しか
ら駒有りに変化する領域には変化後の駒が通常に図示さ
れており、駒有りから駒無しに変化する領域には変化前
の駒が網掛で図示されている。In the case of pattern 1, as shown in FIG. 11, the area in which the pieces change (change area) is the "area in which there is a change from no piece to the existence of a piece" and the area in which there is a change from the existence of a piece to no piece. There are two places. In FIG. 11, the changed piece is normally shown in the area where there is no piece and there is a piece, and the piece before change is shown in a shaded area in the area where there is no piece and there is no piece. .
【0052】このようなパターン1に該当する場合にお
いては、駒の移動数、移動方向等に基づいて、移動した
駒の種類が特定されるか、絞られる。たとえば、図11
に示すように、駒が1升だけ前方に移動した場合には、
移動した駒の種類は、歩、香車、飛車、銀将、金将およ
び王将に絞られる。In the case of such pattern 1, the type of the moved piece is specified or narrowed down based on the number of pieces moved, the moving direction, and the like. For example, FIG.
As shown in, when the piece moves forward by one box,
The types of pieces that have moved are narrowed down to walks, spur wheels, sash wheels, silver generals, gold generals, and king generals.
【0053】また、駒が斜め方向に2升以上移動した場
合には、移動した駒は角行に特定される。また、駒が横
方向に2升以上移動した場合には、移動した駒は飛車に
特定される。また、駒の移動位置が、元の位置に対して
前方向に2升移動しかつ横方向に1升移動した位置であ
れば、移動した駒は桂馬であると特定される。When a piece moves diagonally by two or more boxes, the moved piece is specified as a square row. Further, when the piece moves laterally by two or more boxes, the moved piece is specified as a flying piece. Further, if the moving position of the piece is a position which is moved forward by 2 and moved laterally by 1 with respect to the original position, the moved piece is identified as Keima.
【0054】ただし、移動後の位置が成駒可能領域の場
合には、成駒となったか否かの認識が必要となる場合が
ある。However, if the position after the movement is in the successful frame area, it may be necessary to recognize whether or not the successful game has become successful.
【0055】パターン2の場合は、図12に示すよう
に、駒が変化する領域(変化領域)は、”駒有りから駒
無しに変化する領域”と、”駒有りから駒有りに変化す
る領域”の2か所となる。パターン2に該当する場合に
も、駒の移動数、移動方向等に基づいて、移動した駒の
種類が特定されるか、絞られる。In the case of pattern 2, as shown in FIG. 12, the areas where the pieces change (change areas) are the "area where there is a piece and the area where there is no piece" and the area where there is a change from having a piece to having a piece. There are two places. Even in the case of the pattern 2, the type of the moved pieces is specified or narrowed down based on the number of pieces moved, the moving direction, and the like.
【0056】駒の移動パターンがパターン2に該当する
ことおよび駒の移動先の位置の判定は、たとえば、次の
ようにして行なわれる。”駒有りから駒無しに変化する
領域”が存在し、”駒無しから駒有りに変化する領域”
が存在しない場合に、駒の移動パターンがパターン2に
該当すると判定される。将棋のルールにより、駒有りか
ら駒無しに変化した駒が相手駒を取りうる領域が絞られ
る。そして、絞られた領域ごとに、駒有りから駒無しに
変化した駒がその領域に存在するか否かがパターンマッ
チングによって判別され、駒有りから駒無しに変化した
駒が存在する領域が、当該駒の移動先領域であると判定
される。Whether the movement pattern of the piece corresponds to pattern 2 and the position of the movement destination of the piece is determined, for example, as follows. There is an "area that changes from having a piece to no piece", and an "area that changes from having no piece to having a piece"
When there is not, it is determined that the movement pattern of the piece corresponds to pattern 2. According to the rules of shogi, the area in which a piece that has changed from having a piece to having no piece can take an opponent piece is narrowed down. Then, for each narrowed area, it is determined by pattern matching whether or not there is a piece that has changed from having a piece to having no piece in that area. It is determined that the area is the destination area of the piece.
【0057】パターン3の場合には、図13に示すよう
に、駒が変化する領域(変化領域)は、”駒無しから駒
有りに変化する領域”の1か所となる。パターン3に該
当する場合において、持駒が1種類である場合には、打
たれた駒を特定することができる。持駒が2種類以上で
ある場合には、打たれた駒は、持駒に絞られる。In the case of pattern 3, as shown in FIG. 13, the area in which the pieces change (change area) is one of the "areas in which there are no pieces and there is a piece". In the case corresponding to the pattern 3, when the number of pieces held is one, the hit piece can be specified. When there are two or more kinds of pieces, the hit pieces are narrowed down to the pieces.
【0058】将棋のルールのみに基づいて、移動した
駒、打たれた持駒が特定された場合には、駒の種類がパ
ターンマッチングによって確認された後(ステップS
6)、確認された駒の種類および位置が棋譜に記憶され
る(ステップS7)。When the moved piece and the held piece are specified based only on the shogi rules, the type of the piece is confirmed by pattern matching (step S
6) The type and position of the confirmed pieces are stored in the game (step S7).
【0059】将棋のルールのみに基づいて、移動した
駒、打たれた持駒が特定されなかった場合には、ホスト
19側から駒の画像データ列が画像処理ボード側の画像
メモリ13に転送される。そして、画像処理ボード側
で、移動した駒の位置が特定されるとともに、移動した
駒の種類がパターンマッチングによって特定される(ス
テップS5)。そして、特定された駒の種類および位置
が棋譜に記憶される(ステップS7)。When the moved piece and the held piece are not specified based only on the shogi rule, the image data string of the piece is transferred from the host 19 side to the image memory 13 on the image processing board side. Then, on the image processing board side, the position of the moved piece is specified, and the type of the moved piece is specified by pattern matching (step S5). Then, the type and position of the identified piece are stored in the game record (step S7).
【0060】[0060]
【発明の効果】この発明によれば、棋譜を自動的に記録
することができるとともに、一手毎に駒の変化内容を自
動的に音声出力することができる。According to the present invention, it is possible to automatically record a game record and automatically output the change contents of the piece for each move.
【図1】棋譜記録装置の外観を示す模式図である。FIG. 1 is a schematic diagram showing the appearance of a game record recording device.
【図2】棋譜記録装置の電気的構成を示すブロック図で
ある。FIG. 2 is a block diagram showing an electrical configuration of the game record recording device.
【図3】棋譜記録装置の全体的な処理手順を示すフロー
チャートである。FIG. 3 is a flowchart showing an overall processing procedure of the game record recording apparatus.
【図4】図3の初期化処理の詳細な手順を示すフローチ
ャートである。FIG. 4 is a flowchart showing a detailed procedure of initialization processing of FIG.
【図5】テンプレートを作成する際の元データを示す模
式図である。FIG. 5 is a schematic diagram showing original data when creating a template.
【図6】角度0°のテンプレートを示す模式図である。FIG. 6 is a schematic diagram showing a template with an angle of 0 °.
【図7】図3の移動判定処理の詳細な手順を示すフロー
チャートである。FIG. 7 is a flowchart showing a detailed procedure of movement determination processing of FIG.
【図8】図7の判定前処理を説明するための説明図であ
る。FIG. 8 is an explanatory diagram for explaining pre-determination processing of FIG. 7.
【図9】障害物判定処理を説明するための説明図であ
る。FIG. 9 is an explanatory diagram illustrating an obstacle determination process.
【図10】図3のステップ3〜ステップ6の処理を示す
フローチャートである。10 is a flowchart showing the processing of steps 3 to 6 in FIG.
【図11】駒の移動パターンを示す模式図である。FIG. 11 is a schematic diagram showing a movement pattern of a piece.
【図12】駒の移動パターンを示す模式図である。FIG. 12 is a schematic diagram showing a movement pattern of a piece.
【図13】駒の移動パターンを示す模式図である。FIG. 13 is a schematic diagram showing a movement pattern of a piece.
1 CCDカメラ 11 画像処理部 13 画像メモリ 16 CPU 19 ホスト 20 音声合成ボード 21 スピーカ 23 記憶装置 1 CCD Camera 11 Image Processing Unit 13 Image Memory 16 CPU 19 Host 20 Voice Synthesis Board 21 Speaker 23 Storage Device
Claims (3)
段、 撮像画像に基づいて、駒の状態が変化したか否かを判定
する判定手段、 駒の状態が変化したと判定されたときに、変化した駒の
種類と位置とを特定する特定手段、 特定された駒の種類と位置とに基づいて、一手毎に駒の
変化内容を記憶手段に記録する記録手段、および特定さ
れた駒の種類と位置とに基づいて、一手毎に駒の変化内
容を音声出力する音声出力手段、 を備えている棋譜記録装置。1. An image pickup means for picking up an image of a piece on a shogi board, a judging means for judging whether or not the state of the piece has changed based on the picked-up image, and a change for judging that the state of the piece has changed. Specifying means for specifying the type and position of the specified piece, recording means for recording the change content of the piece for each move in the storage means based on the specified type and position of the piece, and based on the specified type and position of the piece And a voice output device for outputting a voice output of the change contents of the piece for each hand.
に基づいて、駒の状態が変化したか否かを判定するもの
である請求項1に記載の棋譜記録装置。2. The game record recording apparatus according to claim 1, wherein the determination means determines whether or not the state of the piece has changed, based on the presence or absence state of the piece for each grid.
ッチングとに基づいて、変化した駒の種類と位置とを特
定するものである請求項1および2のいずれかに記載の
棋譜記録装置。3. The game record recording apparatus according to claim 1, wherein the specifying means specifies the changed type and position of the piece based on a shogi rule and pattern matching.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP26852395A JPH09108403A (en) | 1995-10-17 | 1995-10-17 | Shogi game recording device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP26852395A JPH09108403A (en) | 1995-10-17 | 1995-10-17 | Shogi game recording device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH09108403A true JPH09108403A (en) | 1997-04-28 |
Family
ID=17459711
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP26852395A Pending JPH09108403A (en) | 1995-10-17 | 1995-10-17 | Shogi game recording device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH09108403A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100472102B1 (en) * | 2002-04-12 | 2005-03-08 | (주)유라비젼 | Method and Device for Creating Paduk Record of Go |
| US8328613B2 (en) | 2009-11-17 | 2012-12-11 | Hasbro, Inc. | Game tower |
| JP2015196057A (en) * | 2014-04-03 | 2015-11-09 | ふくしま電子網産業協同組合 | Go system |
| JP2017080128A (en) * | 2015-10-29 | 2017-05-18 | 拓也 新川 | Game piece set, piece information reader, game device and piece placement board |
| CN109195674A (en) * | 2016-04-04 | 2019-01-11 | 辛明吉 | Go timing device and method using camera sensor |
-
1995
- 1995-10-17 JP JP26852395A patent/JPH09108403A/en active Pending
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100472102B1 (en) * | 2002-04-12 | 2005-03-08 | (주)유라비젼 | Method and Device for Creating Paduk Record of Go |
| US8328613B2 (en) | 2009-11-17 | 2012-12-11 | Hasbro, Inc. | Game tower |
| JP2015196057A (en) * | 2014-04-03 | 2015-11-09 | ふくしま電子網産業協同組合 | Go system |
| JP2017080128A (en) * | 2015-10-29 | 2017-05-18 | 拓也 新川 | Game piece set, piece information reader, game device and piece placement board |
| CN109195674A (en) * | 2016-04-04 | 2019-01-11 | 辛明吉 | Go timing device and method using camera sensor |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP2339536B1 (en) | Image processing system, image processing apparatus, image processing method, and program | |
| CN1164084C (en) | digital camera capable of image processing | |
| CN108960067B (en) | Real-time train driver action recognition system and method based on deep learning | |
| JP3035920B2 (en) | Moving object extraction device and moving object extraction method | |
| US6549644B1 (en) | Face-image processing apparatus | |
| JP2008234654A (en) | Target image detection method and image detection apparatus | |
| JPH0766446B2 (en) | Method of extracting moving object image | |
| CN111967319B (en) | Living body detection method, device, equipment and storage medium based on infrared and visible light | |
| JP5037673B2 (en) | Information processing apparatus, information processing system, information processing method, information processing program, and computer-readable recording medium | |
| JPH09108403A (en) | Shogi game recording device | |
| JP5504990B2 (en) | Imaging apparatus, image processing apparatus, and program | |
| JP2001292305A (en) | Image data synthesizing apparatus, image data synthesizing system, image data synthesizing method, and recording medium | |
| JPH09108404A (en) | Shogi game record reproducing device and recording and reproducing device of shogi game record | |
| JPH04205070A (en) | Method for extracting specific object | |
| JP3260503B2 (en) | Runway recognition device and runway recognition method | |
| JP3096620B2 (en) | Game record recorder | |
| JP2002223405A (en) | Video recording and reproducing device, and video recording and reproducing program | |
| WO2005055144A1 (en) | Person face jaw detection method, jaw detection system, and jaw detection program | |
| JPH09220311A (en) | Game record recorder | |
| JPH09285592A (en) | Shogi game recording device | |
| JPH1015152A (en) | Recognition device for pieces on japanese chess board | |
| JPH09285594A (en) | Automatic status recognizing device of go, and go game progress recording device | |
| JPH10150657A (en) | Moving object display method, display system using the same, and program recording medium therefor | |
| JPH09220312A (en) | Shogi game record recorder | |
| JPH1015153A (en) | Extraction device for invalid zone on japanese chess board |