JP7642016B2 - Game record recording system, game record recording device, and game record recording program - Google Patents
Game record recording system, game record recording device, and game record recording program Download PDFInfo
- Publication number
- JP7642016B2 JP7642016B2 JP2023080722A JP2023080722A JP7642016B2 JP 7642016 B2 JP7642016 B2 JP 7642016B2 JP 2023080722 A JP2023080722 A JP 2023080722A JP 2023080722 A JP2023080722 A JP 2023080722A JP 7642016 B2 JP7642016 B2 JP 7642016B2
- Authority
- JP
- Japan
- Prior art keywords
- game
- unit
- board
- move
- clock
- 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.)
- Active
Links
- 238000000605 extraction Methods 0.000 claims description 97
- 238000004364 calculation method Methods 0.000 claims description 26
- 239000000284 extract Substances 0.000 claims description 20
- 230000008859 change Effects 0.000 claims description 16
- 238000000034 method Methods 0.000 description 34
- 230000008569 process Effects 0.000 description 13
- 230000006870 function Effects 0.000 description 11
- 238000004891 communication Methods 0.000 description 9
- 230000005540 biological transmission Effects 0.000 description 8
- 238000006243 chemical reaction Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 230000004048 modification Effects 0.000 description 7
- 238000012986 modification Methods 0.000 description 7
- 241000212384 Bifora Species 0.000 description 4
- 238000001514 detection method Methods 0.000 description 4
- 230000009466 transformation Effects 0.000 description 4
- PCHJSUWPFVWCPO-UHFFFAOYSA-N gold Chemical compound [Au] PCHJSUWPFVWCPO-UHFFFAOYSA-N 0.000 description 3
- 239000010931 gold Substances 0.000 description 3
- 229910052737 gold Inorganic materials 0.000 description 3
- 230000010365 information processing Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000002360 preparation method Methods 0.000 description 3
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
Landscapes
- Image Analysis (AREA)
Description
本発明は、将棋、囲碁、チェス等において、棋譜を記録する棋譜記録システム、棋譜記録装置及び棋譜記録プログラムに関する。 The present invention relates to a game record recording system, a game record recording device, and a game record recording program for recording game records in games such as shogi, go, and chess.
従来、将棋、囲碁、チェス等において、対局者が対局に集中できるように、棋譜を自動的に記録する棋譜記録システムが種々提案されている。 In the past, various systems have been proposed for automatically recording game records in games such as shogi, go, and chess, allowing players to concentrate on the game.
特許文献1は、各対局者の持ち時間をそれぞれカウントする専用の対局時計と、駒を指す盤面の画像を撮影するカメラと、 前記対局時計の対局ボタンスイッチが押されることで、駒を指した後の持ち時間のカウント中断時点を検出するカウント中断検出手段と、対局ボタンスイッチが押されてカウントが中断された旨の通知を受け取った時点で前記カメラによって盤面を撮影し、その盤面の画像を取り込むとともに、取り込んだ画像から駒の動きを検出して棋譜の記録を行なう対局場側パソコンと、を備えた棋譜記録システムを開示している。 Patent Document 1 discloses a game record recording system that includes a dedicated game clock that counts the time each player has, a camera that takes an image of the board as the pieces are played, a count interruption detection means that detects the point at which the count of the player's time is interrupted after a piece is played when the game button switch on the game clock is pressed, and a computer at the game venue that takes an image of the board using the camera when it receives a notification that the game button switch has been pressed and the count has been interrupted, captures the image of the board, and detects the movements of the pieces from the captured image to record the game record.
しかしながら、特許文献1に記載の棋譜記録システムを使用するためには、対局場側パソコンへの通知を行う機能を備えた専用の対局時計を別途用意しなければならず、既存の対局時計を使用することができない。そのため、対局に至るまでの準備の手間が非常に煩雑となる。 However, in order to use the game record recording system described in Patent Document 1, a dedicated game clock with a function for sending notifications to the computer at the game venue must be prepared separately, and existing game clocks cannot be used. This makes the preparations leading up to the game extremely cumbersome.
この点に鑑み、本発明は、持ち時間の計測に既存の対局時計を用いることができる、棋譜記録システム、棋譜記録装置及び棋譜記録プログラムを提供することを目的とする。 In view of this, the present invention aims to provide a game record recording system, a game record recording device, and a game record recording program that can use an existing game clock to measure the time allowed.
上述の課題を解決するため、本発明は、(1) 棋譜を記録する棋譜記録システムであって、駒認識部と、対局画像取得部と、対局時計抽出部と、盤面抽出部と、手番識別部と、持ち時間識別部と、消費時間算出部と、指し手識別部と、棋譜記憶部と、を備えることを特徴とする。駒認識部は、対局に使用される駒を認識する。対局画像取得部は、カメラで撮影された、盤面及び対局時計が収められた対局画像を取得する。対局時計抽出部は、前記対局画像取得部で取得された該対局画像から対局時計部分を抽出する。盤面抽出部は、前記対局画像取得部で取得された該対局画像から盤面部分を抽出する。手番識別部は、前記対局時計抽出部で抽出された該対局時計部分に基づき、手番を識別して、手番の変化を識別する。持ち時間識別部は、前記手番識別部で手番が変化したと識別された場合に、前記対局時計抽出部で抽出された該対局時計部分に基づき、対局者の持ち時間を識別する。消費時間算出部は、前記持ち時間識別部で識別された持ち時間に基づき、対局者の消費時間を算出する。指し手識別部は、前記盤面抽出部で抽出された該盤面部分と、前記駒認識部で認識された駒のデータと、に基づき、対局者の指し手を識別する。棋譜記憶部は、前記手番識別部で識別された手番と、前記持ち時間識別部で識別された持ち時間と、前記消費時間算出部で算出された消費時間と、前記指し手識別部で識別された指し手と、を含む棋譜を記憶する。 In order to solve the above-mentioned problems, the present invention provides (1) a game record recording system for recording a game record, characterized in that it comprises a piece recognition unit, a game image acquisition unit, a game clock extraction unit, a board extraction unit, a move identification unit, a time limit identification unit, a time spent calculation unit, a move identification unit, and a game record storage unit. The piece recognition unit recognizes the pieces used in a game. The game image acquisition unit acquires game images captured by a camera, the game board and the game clock included. The game clock extraction unit extracts the game clock portion from the game image acquired by the game image acquisition unit. The board extraction unit extracts the board portion from the game image acquired by the game image acquisition unit. The move identification unit identifies moves and identifies changes in moves based on the game clock portion extracted by the game clock extraction unit. When the move identification unit identifies a change in move, the time limit identification unit identifies the time limit of each player based on the game clock portion extracted by the game clock extraction unit. The time spent calculation unit calculates the time spent by each player based on the time limit identified by the time limit identification unit. The move identification unit identifies a move by each player based on the board portion extracted by the board extraction unit and the piece data recognized by the piece recognition unit. The game record storage unit stores a game record including the move identified by the move identification unit, the time limit identified by the time limit identification unit, the time spent calculated by the time spent calculation unit, and the move identified by the move identification unit.
(2) 前記対局画像取得部は、前記カメラで撮影された、対局前の盤面及び対局時計が収められた初期対局画像を取得し、前記盤面抽出部は、前記対局画像取得部で取得された該初期対局画像から、盤面の初期位置を画定し、前記対局時計抽出部は、前記対局画像取得部で取得された該初期対局画像から、対局時計の初期位置を画定することを特徴とする、(1)に記載の棋譜記録システム。
(2) The game image acquisition unit acquires an initial game image captured by the camera, the initial game image including the board state and the game clock before the game, the game board extraction unit determines an initial position of the board state from the initial game image acquired by the game image acquisition unit, and the game clock extraction unit determines an initial position of the game clock from the initial game image acquired by the game image acquisition unit.The game record recording system described in (1) is characterized in that:
(3) 前記対局時計抽出部は、前記対局画像取得部で取得された前記対局画像において斜めに映る前記対局時計部分を、正面から映る正対画像に変換し、前記盤面抽出部は、前記対局画像取得部で取得された前記対局画像において斜めに映る前記盤面部分を、真上から映る正対画像に変換することを特徴とする、(1)に記載の棋譜記録システム。 (3) The game clock extraction unit converts the game clock portion that is obliquely captured in the game image acquired by the game image acquisition unit into a front-on image, and the board surface extraction unit converts the game board portion that is obliquely captured in the game image acquired by the game image acquisition unit into a front-on image, characterized in that the game record recording system described in (1) is characterized in that it converts the game board portion that is obliquely captured in the game image acquired by the game image acquisition unit into a front-on image.
(4) 前記カメラは、スマートフォンが備えるカメラであることを特徴とする、(1)ないし(3)のいずれか1つに記載の棋譜記録システム。 (4) The game record recording system according to any one of (1) to (3), characterized in that the camera is a camera equipped in a smartphone.
(5) 棋譜を記録する棋譜記録装置であって、駒認識部と、対局画像取得部と、対局時計抽出部と、盤面抽出部と、手番識別部と、持ち時間識別部と、消費時間算出部と、指し手識別部と、棋譜記憶部と、を備えることを特徴とする。駒認識部は、対局に使用される駒を認識する。対局画像取得部は、カメラで撮影された、盤面及び対局時計が収められた対局画像を取得する。対局時計抽出部は、前記対局画像取得部で取得された該対局画像から対局時計部分を抽出する。盤面抽出部は、前記対局画像取得部で取得された該対局画像から盤面部分を抽出する。手番識別部は、前記対局時計抽出部で抽出された該対局時計部分に基づき、手番を識別して、手番の変化を識別する。持ち時間識別部は、前記手番識別部で手番が変化したと識別された場合に、前記対局時計抽出部で抽出された該対局時計部分に基づき、対局者の持ち時間を識別する。消費時間算出部は、前記持ち時間識別部で識別された持ち時間に基づき、対局者の消費時間を算出する。指し手識別部は、前記盤面抽出部で抽出された該盤面部分と、前記駒認識部で認識された駒のデータと、に基づき、対局者の指し手を識別する。棋譜記憶部は、前記手番識別部で識別された手番と、前記持ち時間識別部で識別された持ち時間と、前記消費時間算出部で算出された消費時間と、前記指し手識別部で識別された指し手と、を含む棋譜を記憶する。 (5) A game record recording device for recording a game record, comprising a piece recognition unit, a game image acquisition unit, a game clock extraction unit, a board extraction unit, a move identification unit, a time limit identification unit, a time spent calculation unit, a move identification unit, and a game record storage unit. The piece recognition unit recognizes the pieces used in a game. The game image acquisition unit acquires a game image captured by a camera, the game board and the game clock included. The game clock extraction unit extracts the game clock portion from the game image acquired by the game image acquisition unit. The board extraction unit extracts the board portion from the game image acquired by the game image acquisition unit. The move identification unit identifies the move and identifies a change in the move based on the game clock portion extracted by the game clock extraction unit. When the move identification unit identifies a change in move, the time limit identification unit identifies the time limit of each player based on the game clock portion extracted by the game clock extraction unit. The time spent calculation unit calculates the time spent by each player based on the time limit identified by the time limit identification unit. The move identification unit identifies a move by each player based on the board portion extracted by the board extraction unit and the piece data recognized by the piece recognition unit. The game record storage unit stores a game record including the move identified by the move identification unit, the time limit identified by the time limit identification unit, the time spent calculated by the time spent calculation unit, and the move identified by the move identification unit.
(6) 棋譜を記録する棋譜記録プログラムであって、コンピュータに、駒認識手段と、対局画像取得手段と、対局時計抽出手段と、盤面抽出手段と、手番識別手段と、持ち時間識別手段と、消費時間算出手段と、指し手識別手段と、棋譜記憶手段と、を実行させることを特徴とする。駒認識手段は、対局に使用される駒を認識する。対局画像取得手段は、カメラで撮影された、盤面及び対局時計が収められた対局画像を取得する。対局時計抽出手段は、前記対局画像取得手段で取得された該対局画像から対局時計部分を抽出する。盤面抽出手段は、前記対局画像取得手段で取得された該対局画像から盤面部分を抽出する。手番識別手段は、前記対局時計抽出手段で抽出された該対局時計部分に基づき、手番を識別して、手番の変化を識別する。持ち時間識別手段は、前記手番識別手段で手番が変化したと識別された場合に、前記対局時計抽出手段で抽出された該対局時計部分に基づき、対局者の持ち時間を識別する。消費時間算出手段は、前記持ち時間識別手段で識別された持ち時間に基づき、対局者の消費時間を算出する。指し手識別手段は、前記盤面抽出手段で抽出された該盤面部分と、前記駒認識手段で認識された駒のデータと、に基づき、対局者の指し手を識別する。棋譜記憶手段は、前記手番識別手段で識別された手番と、前記持ち時間識別手段で識別された持ち時間と、前記消費時間算出手段で算出された消費時間と、前記指し手識別手段で識別された指し手と、を含む棋譜を記憶する。 (6) A game record recording program for recording a game record, characterized in that the program causes a computer to execute a piece recognition means, a game image acquisition means, a game clock extraction means, a board extraction means, a move identification means, a time identification means, a time spent calculation means, a move identification means, and a game record storage means. The piece recognition means recognizes the pieces used in a game. The game image acquisition means acquires a game image captured by a camera, the game board and the game clock included. The game clock extraction means extracts the game clock portion from the game image acquired by the game image acquisition means. The board extraction means extracts the board portion from the game image acquired by the game image acquisition means. The move identification means identifies a move based on the game clock portion extracted by the game clock extraction means, and identifies a change in move. The time limit identification means, when the move identification means identifies a change in move, identifies the time limit of the player based on the game clock portion extracted by the game clock extraction means. The spent time calculation means calculates the spent time of the player based on the time limit identified by the time limit identification means. The move identification means identifies a move of the player based on the board portion extracted by the board extraction means and the data of the piece recognized by the piece recognition means. The game record storage means stores a game record including the move identified by the move identification means, the time limit identified by the time limit identification means, the spent time calculated by the spent time calculation means, and the move identified by the move identification means.
本発明によれば、既存の対局時計を用いて持ち時間を計測することができるため、対局に至るまでの準備の手間の煩雑さが軽減される。 According to the present invention, the time limit can be measured using an existing game clock, which reduces the hassle of preparation required before the game.
以下に、本発明の実施形態について説明する。なお、以下の実施形態では、本発明を将棋に適用した場合を示す。図1は、本実施形態に係る情報処理システムの一例を示す図である。情報処理システム1は、スマートフォン2と、ゲートウェイ3と、データベース4と、サーバ5と、データ配信サーバ6と、を有する。ゲートウェイ3と、データベース4と、サーバ5と、データ配信サーバ6と、はネットワークAを介して接続される。スマートフォン2及びゲートウェイ3は、無線通信によって接続される。 Embodiments of the present invention will be described below. Note that in the following embodiments, the present invention is applied to shogi. FIG. 1 is a diagram showing an example of an information processing system according to this embodiment. The information processing system 1 has a smartphone 2, a gateway 3, a database 4, a server 5, and a data distribution server 6. The gateway 3, the database 4, the server 5, and the data distribution server 6 are connected via network A. The smartphone 2 and the gateway 3 are connected by wireless communication.
ネットワークAとしては、有線であるか無線であるかを問わず、インターネットやLAN(Local Area Network)、VPN(Virtual Private Network)等、任意の種類の通信網を用いることができる。スマートフォン2及びゲートウェイ3の接続に用いられる無線通信としては、5G、LTE(Long Term Evolution)、WiFi(Wireless Fidelity)等の無線通信のほか、ブルートゥース(登録商標)等の近距離無線通信を用いることができる。 As the network A, any type of communication network can be used, whether wired or wireless, such as the Internet, a LAN (Local Area Network), or a VPN (Virtual Private Network). As wireless communication used to connect the smartphone 2 and the gateway 3, wireless communication such as 5G, LTE (Long Term Evolution), and WiFi (Wireless Fidelity) as well as short-range wireless communication such as Bluetooth (registered trademark) can be used.
スマートフォン2は、カメラ21と、棋譜記録システム7と、を備える。カメラ21で撮影された対局画像(盤面及び対局時計が収められた画像)に基づき、棋譜記録システム7で棋譜を記録する。 The smartphone 2 includes a camera 21 and a game record recording system 7. The game record is recorded by the game record recording system 7 based on game images (images of the game board and game clock) captured by the camera 21.
ゲートウェイ3は、スマートフォン2をネットワークAに接続する。ゲートウェイ3は、スマートフォン2から、棋譜記録システム7によって記録された棋譜データや対局データなどを受信し、ネットワークAを介してデータベース4に送信する。対局データは、ユーザによって入力される対局に関するデータであり、例えば、棋戦名、先手及び後手の対局者名、最初の持ち時間、棋戦場所、手合割などのデータである。 The gateway 3 connects the smartphone 2 to the network A. The gateway 3 receives game record data and game data recorded by the game record recording system 7 from the smartphone 2, and transmits them to the database 4 via the network A. The game data is data related to the game input by the user, such as the name of the game, the names of the players who will play first and second, the initial time limit, the location of the game, and the handicaps.
データベース4は、スマートフォン2から送られた棋譜データや対局データのほか、棋譜記録システム7に登録された会員データや、以前の対局で用いられた駒データなどを保存する。データベース4において、棋譜データや対局データ、会員データを紐づけておくことで、例えば所定の会員の棋譜データの一覧を検索することが容易となる。 In addition to game record data and match data sent from smartphone 2, database 4 stores member data registered in game record recording system 7 and piece data used in previous games. Linking game record data, game data and member data in database 4 makes it easy to search for a list of game record data for a specific member, for example.
サーバ5は、各スマートフォン2が備える棋譜記録システム7を管理するサーバ装置である。データベース4は、サーバ5に設けられてもよく、サーバ5とは別の装置として設けられてもよい。 The server 5 is a server device that manages the game record recording system 7 provided in each smartphone 2. The database 4 may be provided in the server 5, or may be provided as a device separate from the server 5.
データ配信サーバ6は、データベース4に保存された棋譜データや対局データを読み出して、棋譜記録システム7が記録した棋譜の配信などを行うサーバ装置である。データ配信サーバ6は、サーバ5に組み込まれてもよく、サーバ5とは異なるコンピュータ等で構成されてもよい。 The data distribution server 6 is a server device that reads game record data and match data stored in the database 4 and distributes the game records recorded by the game record recording system 7. The data distribution server 6 may be incorporated into the server 5, or may be configured as a computer or the like different from the server 5.
対局者は、データ配信サーバ6から配信された自分や他者の棋譜を確認することで、効率的に将棋の技術を上達させることができる。また、将棋初心者は、他者の棋譜を見ることにより、将棋の基本的なルールを学習することができるとともに、指し手や消費時間で対局の雰囲気を感じることができる。 Players can efficiently improve their shogi skills by checking their own and other players' game records distributed from the data distribution server 6. Also, by viewing the game records of other players, beginners to shogi can learn the basic rules of shogi and get a feel for the atmosphere of a game based on the moves and time spent.
(ハードウェア構成)
図2は、スマートフォン2のハードウェア構成を示す図である。図2を参照して、スマートフォン2は、カメラ21のほか、無線部22、二次記憶装置23、一次記憶装置24、プロセッサ25を有する。
(Hardware configuration)
Fig. 2 is a diagram showing a hardware configuration of the smartphone 2. Referring to Fig. 2, the smartphone 2 has a camera 21, as well as a wireless unit 22, a secondary storage device 23, a primary storage device 24, and a processor 25.
無線部22は、スマートフォン2に設けられたアンテナ22aを介して、ゲートウェイ3と無線通信を行うための通信インターフェースである。無線通信の方法については、上述の為、説明を省略する。 The wireless unit 22 is a communication interface for wireless communication with the gateway 3 via an antenna 22a provided on the smartphone 2. The method of wireless communication has been described above, so a description thereof will be omitted.
二次記憶装置23や一次記憶装置24は、各種のデータ(カメラ21で撮影された対局画像データを含む)やプログラムを記憶する記憶装置である。プロセッサ25は、後述する各処理を実行するプログラムを二次記憶装置23から読みだして一次記憶装置24に展開し、読みだしたプログラムを実行する。 The secondary storage device 23 and the primary storage device 24 are storage devices that store various data (including game image data captured by the camera 21) and programs. The processor 25 reads out the programs that execute the processes described below from the secondary storage device 23, expands them into the primary storage device 24, and executes the read programs.
(機能構成)
図3は、棋譜記録システム7の機能構成を示す図である。図3を参照して、棋譜記録システム7は、対局データ取得部701と、対局画像取得部702と、対局時計抽出部703と、盤面抽出部704と、駒認識部706と、手番識別部707と、持ち時間識別部708と、消費時間算出部709と、指し手識別部710と、記憶部711と、送受信部723と、を有する。記憶部711は、対局データDB712と、対局画像DB713と、対局時計DB714と、盤面DB715と、駒データDB717と、棋譜記憶部718と、を有する。棋譜記憶部718は、手番DB719と、持ち時間DB720と、消費時間DB721と、指し手DB722と、を有する。なお、送受信部723は、ハードウェア構成における無線部22及びアンテナ22aに相当する。記憶部711は、二次記憶装置23や一次記憶装置24に格納される。対局データ取得部701と、対局画像取得部702と、対局時計抽出部703と、盤面抽出部704と、駒認識部706と、手番識別部707と、持ち時間識別部708と、消費時間算出部709と、指し手識別部710と、は、プロセッサ25が有する電子回路の一例や、プロセッサ25が実行するプロセスの一例である。
(Functional configuration)
Fig. 3 is a diagram showing the functional configuration of the game record recording system 7. Referring to Fig. 3, the game record recording system 7 has a game data acquisition unit 701, a game image acquisition unit 702, a game clock extraction unit 703, a board state extraction unit 704, a piece recognition unit 706, a move identification unit 707, a time limit identification unit 708, a time spent calculation unit 709, a move identification unit 710, a memory unit 711, and a transmission/reception unit 723. The memory unit 711 has a game data DB 712, a game image DB 713, a game clock DB 714, a board state DB 715, a piece data DB 717, and a game record storage unit 718. The game record storage unit 718 has a move DB 719, a time limit DB 720, a time spent DB 721, and a move DB 722. The transmitting/receiving unit 723 corresponds to the wireless unit 22 and the antenna 22a in the hardware configuration. The memory unit 711 is stored in the secondary storage device 23 or the primary storage device 24. The game data acquisition unit 701, the game image acquisition unit 702, the game clock extraction unit 703, the board state extraction unit 704, the piece recognition unit 706, the turn identification unit 707, the time limit identification unit 708, the time consumption calculation unit 709, and the move identification unit 710 are examples of electronic circuits that the processor 25 has, or examples of processes executed by the processor 25.
対局データ取得部701は、対局者によって入力された対局データを取得し、記憶部711が備える対局データDB712に保存する。対局データについては、既に説明を行ったため、ここでは説明を省略する。対局データDB712に格納された対局データは、送受信部723から、ネットワークAを介してデータベース4へと送られて保存される。 The game data acquisition unit 701 acquires game data input by the players and stores it in a game data DB 712 provided in the storage unit 711. The game data has already been explained, so an explanation will be omitted here. The game data stored in the game data DB 712 is sent from the transmission/reception unit 723 via network A to database 4 and stored there.
対局画像取得部702は、所定の時間間隔ごとに、盤面及び対局時計をカメラ21で撮影し、撮影された対局画像(盤面及び対局時計が収められた画像)を取得する。カメラ21で撮影する時間間隔は、特に限定されないが、手番の変化を識別するのに十分短い時間間隔であればよく、例えば、30ミリ秒以上150ミリ秒以下のうち任意の時間間隔に設定することができる。対局画像取得部702は、取得した各対局画像を、記憶部711が備える対局画像DB713に保存する。対局画像取得部702で取得される対局画像は、カメラ21で静止画撮影した静止画であってもよく、カメラ21で動画撮影した動画像の一部をキャプチャした静止画であってもよい。 The game image acquisition unit 702 photographs the board and the game clock with the camera 21 at predetermined time intervals and acquires the captured game images (images containing the board and the game clock). The time intervals at which the camera 21 photographs are not particularly limited, but may be set to any time interval between 30 milliseconds and 150 milliseconds, for example, so long as they are short enough to identify changes in turn. The game image acquisition unit 702 stores each acquired game image in the game image DB 713 provided in the storage unit 711. The game images acquired by the game image acquisition unit 702 may be still images captured by the camera 21, or may be still images captured as part of a video image captured by the camera 21.
対局時計抽出部703は、対局画像取得部702で取得されて対局画像DB713に保存された各対局画像を読み出して、対局画像ごとに対局時計部分を抽出し、記憶部711の対局時計DB714に保存する。対局時計抽出部703による対局時計部分の抽出方法については、後述する。 The game clock extraction unit 703 reads each game image acquired by the game image acquisition unit 702 and stored in the game image DB 713, extracts the game clock portion for each game image, and stores it in the game clock DB 714 in the storage unit 711. The method for extracting the game clock portion by the game clock extraction unit 703 will be described later.
盤面抽出部704は、対局画像取得部702で取得されて対局画像DB713に保存された各対局画像を読み出して、対局画像ごとに盤面部分を抽出し、記憶部711の盤面DB715に保存する。盤面抽出部704による盤面部分の抽出方法については、後述する。 The board state extraction unit 704 reads each game image acquired by the game image acquisition unit 702 and stored in the game image DB 713, extracts the board portion for each game image, and stores it in the board state DB 715 of the storage unit 711. The method for extracting the board portion by the board state extraction unit 704 will be described later.
駒認識部706は、対局に使用される駒を認識する処理部である。
対局に使用される駒が、以前対局を行った駒と同一の駒であるなど、データベース4に駒データとして既に記憶されている場合には、駒認識部706が、送受信部723を介して、データベース4から当該駒データを読み込み、読み込んだ駒データを、対局に使用される駒として認識する。駒認識部706で認識された駒データは、記憶部711の駒データDB717に保存される。
一方、対局に使用される駒が新規の駒である場合には、予めカメラ21で撮影して盤面抽出部704で抽出され、記憶部711の盤面DB715に記憶された、駒が配置された盤面を用いる。駒認識部706は、盤面DB715に記憶された盤面から駒を識別することによって、当該駒を対局に使用される駒として認識する。駒認識部706における駒の識別方法としては、例えば人工知能における機械学習を利用した方法を採用することができるが、これに限られず、種々の識別方法を採用することができる。駒認識部706で認識された駒データは、記憶部711の駒データDB717に保存される。駒データDB717に保存された駒データは、送受信部723を介して、データベース4へと送られて保存される。なお、駒認識部706で駒の認識に用いられる画像として、駒1つ1つを別々に撮影した画像を用いてもよい。
The piece recognition unit 706 is a processing unit that recognizes the pieces to be used in a game.
If the piece to be used in a game is already stored as piece data in the database 4, for example, because it is the same piece as a piece used in a previous game, the piece recognition unit 706 reads the piece data from the database 4 via the transmission/reception unit 723 and recognizes the read piece data as the piece to be used in the game. The piece data recognized by the piece recognition unit 706 is stored in the piece data DB 717 in the storage unit 711.
On the other hand, when the piece to be used in the game is a new piece, a board on which the pieces are arranged is used, which has been photographed in advance by the camera 21, extracted by the board extraction unit 704, and stored in the board DB 715 of the storage unit 711. The piece recognition unit 706 recognizes the piece as a piece to be used in the game by identifying the piece from the board stored in the board DB 715. As a method for identifying pieces in the piece recognition unit 706, for example, a method using machine learning in artificial intelligence can be adopted, but this is not limited thereto, and various identification methods can be adopted. The piece data recognized by the piece recognition unit 706 is stored in the piece data DB 717 of the storage unit 711. The piece data stored in the piece data DB 717 is sent to the database 4 via the transmission/reception unit 723 and stored therein. Note that, as the image used for piece recognition by the piece recognition unit 706, an image of each piece photographed separately may be used.
手番識別部707は、対局時計抽出部703で抽出されて対局時計DB714に保存された対局時計部分を読み出して、対局者の手番を識別し、手番の変化を識別する。手番識別部707における手番の識別方法については、後述する。手番識別部707で識別された手番のデータは、棋譜記憶部718の手番DB719に保存される。 The move identification unit 707 reads the game clock portion extracted by the game clock extraction unit 703 and stored in the game clock DB 714, identifies the move turns of the players, and identifies changes in move turns. The move turn identification method in the move identification unit 707 will be described later. The move turn data identified by the move identification unit 707 is stored in the move turn DB 719 of the game record storage unit 718.
持ち時間識別部708は、対局時計抽出部703で抽出されて対局時計DB714に保存された対局時計部分を読み出して、対局者の持ち時間を識別する。持ち時間識別部708における持ち時間の識別方法については、後述する。持ち時間識別部708で識別された持ち時間のデータは、棋譜記憶部718の持ち時間DB720に保存される。 The time limit identification unit 708 reads the game clock portion extracted by the game clock extraction unit 703 and stored in the game clock DB 714, and identifies the player's time limit. The method for identifying time limit in the time limit identification unit 708 will be described later. The time limit data identified by the time limit identification unit 708 is stored in the time limit DB 720 of the game record storage unit 718.
消費時間算出部709は、持ち時間識別部708で識別されて持ち時間DB720に保存された持ち時間データを読み出し、該持ち時間データに基づき、指し手を指すまでの時間(消費時間)を算出する。すなわち、消費時間算出部709は、ある対局者が前の指し手を指した時点での持ち時間と、当該対局者が次の指し手を指した時点での持ち時間と、の差分を、消費時間として算出する。消費時間算出部709で算出された消費時間のデータは、棋譜記憶部718の消費時間DB721に保存される。 The time spent calculation unit 709 reads the time spent data identified by the time spent identification unit 708 and stored in the time spent DB 720, and calculates the time (time spent) until a move is made based on the time spent data. In other words, the time spent calculation unit 709 calculates the difference between the time spent by a player when he or she makes the previous move and the time spent by that player when he or she makes the next move as the time spent. The time spent data calculated by the time spent calculation unit 709 is stored in the time spent DB 721 of the game record storage unit 718.
指し手識別部710は、盤面抽出部704で抽出され盤面DB715に保存された盤面部分及び駒認識部706で認識されて駒データDB717に保存された駒データを読み出し、該盤面部分から、対局者が行った指し手を識別する。指し手識別部710における指し手の識別方法については、後述する。指し手識別部710で識別された指し手のデータは、棋譜記憶部718の指し手DB722に保存される。 The move identification unit 710 reads the board surface portion extracted by the board surface extraction unit 704 and stored in the board surface DB 715 and the piece data recognized by the piece recognition unit 706 and stored in the piece data DB 717, and identifies the moves made by the players from the board surface portion. The method of identifying moves by the move identification unit 710 will be described later. The data on the moves identified by the move identification unit 710 is stored in the move DB 722 of the game record storage unit 718.
棋譜記憶部718は、手番DB719に保存された手番と、持ち時間DB720に保存された持ち時間と、消費時間DB721に保存された消費時間と、指し手DB722に保存された指し手と、を同期して保存している。これにより、棋譜記憶部718において、それぞれが同期した、手番データと、持ち時間データと、消費時間データと、指し手データと、を含むデータ(棋譜データ)が作成される。作成された棋譜データは、送受信部723からネットワークAを介してデータベース4へと送られて格納される。 The game record storage unit 718 synchronously stores the moves stored in the move DB 719, the time held in the time DB 720, the time spent in the time spent DB 721, and the moves stored in the move DB 722. As a result, data (game record data) including the move data, time held in the time spent DB 721, and the move data, all of which are synchronized, is created in the game record storage unit 718. The created game record data is sent from the transmission/reception unit 723 via network A to database 4 and stored there.
(盤面及び対局時計の抽出について)
対局画像取得部702で取得された対局画像から、盤面及び対局時計を抽出する構成について、以下に説明する。図4は、盤面及び対局時計を撮影するスマートフォン2の設置例である。図4を参照して、スマートフォン2は、机11に取り付けられたアーム12の先端の保持部13に保持されている。保持部13はボール部14によって3次元回転可能に形成されており、保持部13の角度を調整することによって、スマートフォン2の角度を調整することができる。スマートフォン2は、カメラ21の撮影可能範囲(図4に破線で示す)に、盤面8及び対局時計10が収まるように、その角度が調整される。
(Regarding extraction of the game board and game clock)
The configuration for extracting the board and the game clock from the game image acquired by the game image acquisition unit 702 will be described below. FIG. 4 shows an example of the installation of the smartphone 2 for photographing the board and the game clock. Referring to FIG. 4, the smartphone 2 is held by a holder 13 at the tip of an arm 12 attached to a desk 11. The holder 13 is formed to be three-dimensionally rotatable by a ball part 14, and the angle of the smartphone 2 can be adjusted by adjusting the angle of the holder 13. The angle of the smartphone 2 is adjusted so that the board 8 and the game clock 10 are within the photographable range of the camera 21 (shown by the dashed line in FIG. 4).
図5は、図4に示すスマートフォン2によって上斜方向から撮影された盤面および対局時計の概略図を示す。対局時計10は、一対のLED101a、101bと、一対の持ち時間表示部102a、102bと、一対の着手ボタン103a、103bと、を備える。LED101a、101bは、点灯/消灯によって手番を示すものであり、例えばLED101aが点灯し、LED101bが消灯している場合、図5における左側の対局者の手番であることを示す。持ち時間表示部102a、102bには、各対局者の持ち時間が表示され、本実施形態では、デジタル形式(デジタル数字で持ち時間を示す形式)を採用している。現在手番の対局者(図5の左側の対局者)が指し終わって着手ボタン103aを押すと、LED101aが消灯して持ち時間表示部102aが停止するとともに、LED101bが点灯して持ち時間表示部102bが作動し、手番が図5の右側の対局者へと変更される。 Figure 5 shows a schematic diagram of the board and game clock photographed from an upward diagonal angle by the smartphone 2 shown in Figure 4. The game clock 10 includes a pair of LEDs 101a, 101b, a pair of time display units 102a, 102b, and a pair of start buttons 103a, 103b. The LEDs 101a, 101b indicate a turn by turning on/off. For example, when the LED 101a is on and the LED 101b is off, it indicates that it is the turn of the player on the left side in Figure 5. The time display units 102a, 102b display the time of each player, and in this embodiment, a digital format (a format in which the time is displayed in digital numbers) is adopted. When the player whose turn it is currently (the player on the left in Figure 5) finishes playing and presses the start button 103a, LED 101a goes out and the time limit display 102a stops, LED 101b comes on and the time limit display 102b starts, and the turn changes to the player on the right in Figure 5.
手番識別部707は、対局時計抽出部703で抽出された対局時計部分のうち、一対のLED101a、101bに相当する部分を認識して、LED101a、101bの点灯/消灯状態を読み取る。この読み取ったLED101a、101bの点灯/消灯状態に基づいて、手番を識別する。この識別処理を、対局時計抽出部703で抽出された対局時計部分ごとに行うことで、手番の変化を識別する。 The move identification unit 707 recognizes the portion of the game clock portion extracted by the game clock extraction unit 703 that corresponds to the pair of LEDs 101a, 101b, and reads the on/off state of LEDs 101a, 101b. It identifies the move based on the on/off state of LEDs 101a, 101b that it reads. This identification process is performed for each game clock portion extracted by the game clock extraction unit 703, thereby identifying a change in move.
持ち時間識別部708は、対局時計抽出部703で抽出された対局時計部分のうち、一対の持ち時間表示部102a、102bに相当する部分を認識して、持ち時間表示部102a、102bに表示された持ち時間を読み取り、手番である対局者の持ち時間を識別する。 The time limit identification unit 708 recognizes the portion of the game clock extracted by the game clock extraction unit 703 that corresponds to the pair of time limit display units 102a, 102b, reads the time limit displayed in the time limit display units 102a, 102b, and identifies the time limit of the player whose turn it is.
また、指し手識別部710では、盤面抽出部704で抽出されて盤面DB715に記憶された盤面部分及び駒認識部706で認識されて駒データDB717に保存された駒データを読み出し、盤面8における全てのマスの状態(駒の有無、駒の種類)を検出する。このマス状態検出処理を、手番が変化する前後の盤面部分で行うことで、盤面部分のマスの状態の変化を検出し、指し手を識別する。なお、マス状態検出処理は、盤面抽出部704で抽出された各盤面部分に対して行ってもよい。ここで、指し手識別部710における指し手の識別方法について、図6及び図7を参照して詳細に説明する。図6は、盤面における駒の移動の例を示す。図7は、盤面における駒の移動の他の例を示す。 The move identification unit 710 reads the board parts extracted by the board extraction unit 704 and stored in the board DB 715 and the piece data recognized by the piece recognition unit 706 and stored in the piece data DB 717, and detects the state of all squares on the board 8 (presence or absence of pieces, type of piece). This square state detection process is performed on the board parts before and after the turn change, to detect changes in the state of squares on the board parts and identify the move. The square state detection process may be performed on each board part extracted by the board extraction unit 704. Here, the method of identifying moves in the move identification unit 710 will be described in detail with reference to Figures 6 and 7. Figure 6 shows an example of piece movement on the board. Figure 7 shows another example of piece movement on the board.
まず、図6を参照して、マス状態の変化前を示す(A)では、マス「4四」に「角」が配置されているが、マス状態の変化後を示す(B)では、マス「4四」の「角」がなくなり、マス「2二」に「馬」が配置されている。したがって、指し手識別部710は、「角」がマス「4四」からマス「2二」に移動して「成った」と識別し、指し手を「2二角成」と判定する。このように、マスの状態が2マス変化した場合(図6では「4四」及び「2二」)、指し手識別部710は「駒を動かす動作が行われた」と識別することができる。なお、駒の判別は、駒認識部706で認識されて駒データDB717に保存された駒データを指し手識別部710が読み出し、該駒データと照合することで行われる。 First, referring to FIG. 6, in (A) showing the state before the change in the squares, a "Bishop" is placed in square "44", but in (B) showing the state after the change in the squares, the "Bishop" in square "44" is gone and a "Horse" is placed in square "22". Therefore, the move identification unit 710 identifies that the "Bishop" has moved from square "44" to square "22" and "Promoted", and determines the move as "Bishop Promote to 22". In this way, when the state of the squares changes by two squares ("44" and "22" in FIG. 6), the move identification unit 710 can identify that "an action to move a piece has been performed". The pieces are identified by the move identification unit 710 reading the piece data recognized by the piece recognition unit 706 and stored in the piece data DB 717 and comparing it with the piece data.
次に、図7を参照して、マス状態の変化前を示す(C)と比較して、マス状態の変化後を示す(D)では、マス「2二」に「金」が配置されている。したがって、指し手識別部710は、マス「2二」に、持ち駒である「金」が置かれたと識別し、指し手を「2二金」と判定する。このように、マスの状態が1マス変化した場合(図では「2二」)、指し手識別部710は「持ち駒を置く動作が行われた」と識別することができる。駒の判別方法については、上述の為、説明を省略する。 Next, referring to FIG. 7, in comparison with (C) showing the state before the change in the square state, (D) showing the state after the change in the square state shows that a "gold" has been placed in square "2-2". Therefore, the move identification unit 710 identifies that a "gold" piece in hand has been placed in square "2-2", and determines the move to be "2-2 gold". In this way, when the state of the squares changes by one square ("2-2" in the figure), the move identification unit 710 can identify that "the action of placing a piece in hand has been performed". The method of identifying pieces has been described above, so a description thereof will be omitted.
このように、本発明によれば、持ち時間の識別及び消費時間の算出は、対局画像取得部702においてカメラ21で撮影して取得された対局画像から抽出された対局時計部分に基づいて行われる。したがって、特許文献1のように専用の対局時計を別途用意する必要がなく、既存の対局時計を用いて持ち時間を測定することができる。そのため、対局に至るまでの準備の手間の煩雑さが軽減される。 In this way, according to the present invention, the identification of the time limit and the calculation of the consumed time are performed based on the game clock portion extracted from the game image captured by the camera 21 in the game image acquisition unit 702. Therefore, there is no need to prepare a dedicated game clock separately as in Patent Document 1, and the time limit can be measured using an existing game clock. This reduces the complexity of the preparation work leading up to the game.
また、上述の特許文献1に記載の棋譜記録システムによれば、対局者が、対局時計に備えられた対局ボタンスイッチを押すことで、(1)該対局者の持ち時間のカウントが中断して、カウント中断検出手段がカウント中断時点を検出するとともに、(2)対局ボタンスイッチが押された旨が対局場側パソコンに通知される。そして、該通知を受け取った該対局場側パソコンが、盤面の画像をカメラで撮影して取り込む。すなわち、特許文献1に記載の棋譜記録システムでは、持ち時間のカウントは、「対局ボタンスイッチが押された時点」で中断される一方、盤面の画像の撮影は、「対局ボタンスイッチが押されたことが対局場側パソコンに通知された時点」で行われる。したがって、持ち時間のカウント中断時点と、盤面の画像をカメラで撮影する時点と、ではタイムラグが生じる。そのため、対局者の持ち時間に対応した棋譜を精度よく記録できず、棋譜が不正確となる可能性がある。 In addition, according to the game record recording system described in the above-mentioned Patent Document 1, when a player presses a game button switch provided on the game clock, (1) the counting of the player's time is interrupted, and the count interruption detection means detects the time when the counting is interrupted, and (2) the game venue's computer is notified that the game button switch has been pressed. The game venue's computer then receives the notification and takes an image of the board with a camera and imports it. That is, in the game record recording system described in Patent Document 1, the counting of the time is interrupted "when the game button switch is pressed," while the image of the board is taken "when the game venue's computer is notified that the game button switch has been pressed." Therefore, there is a time lag between the time when the counting of the time is interrupted and the time when the image of the board is taken with the camera. As a result, the game record corresponding to the player's time cannot be recorded accurately, and the game record may be inaccurate.
これに対し、本発明は、対局画像取得部702において、カメラ21で撮影された対局画像(盤面及び対局時計が収められた画像)を取得する。そして、該対局画像から、対局時計部分を抽出して手番及び持ち時間を識別するとともに、盤面部分を抽出して指し手を識別する。すなわち、本発明では、対局者の持ち時間を識別するための対局時計が写された画像に、該持ち時間における盤面が写されている。そのため、対局者の持ち時間と棋譜が必然的に対応し、対局者の持ち時間に対応した棋譜を精度よく記録することができる。 In contrast, in the present invention, the game image acquisition unit 702 acquires a game image (an image containing the board and game clock) captured by the camera 21. The game clock portion is then extracted from the game image to identify the turn and time limit, and the board portion is extracted to identify the move. That is, in the present invention, the image showing the game clock for identifying the player's time limit shows the board at the time limit. Therefore, the player's time limit and the game record naturally correspond, and the game record corresponding to the player's time limit can be recorded with high accuracy.
また、実際に将棋を指す場合、動かした駒から手を離した瞬間に指し手が確定するため、駒を動かしてから指し手が確定されるまでのタイムラグは生じ得ない。本発明によれば、上述の通り、対局者の持ち時間と棋譜が必然的に対応するため、実際に将棋を指している状況をより忠実に記録することができる。 In addition, when actually playing shogi, the move is finalized the moment the player releases the moved piece, so there is no time lag between moving the piece and finalizing the move. As described above, according to the present invention, the time held by the players and the game record inevitably correspond, so the situation when actually playing shogi can be recorded more faithfully.
ここで、図4に示すように、本実施形態では、スマートフォン2のカメラ21は、アーム12の保持部13に保持されて上斜方向から盤面8及び対局時計10を撮影する。そのため、図5に示すように、カメラ21で撮影された対局画像では、対局時計10および盤面8が斜めに映ることとなる。 As shown in FIG. 4, in this embodiment, the camera 21 of the smartphone 2 is held by the holding portion 13 of the arm 12 and captures the board 8 and the game clock 10 from an upward diagonal direction. Therefore, as shown in FIG. 5, the game clock 10 and the board 8 are captured at an angle in the game image captured by the camera 21.
そのため、対局時計抽出部703は、対局画像(図5)において斜めに映る対局時計部分を、正面から映る正対画像に変換する変換機能を有することが好ましい。対局時計部分を正対画像に変換することによって、LED101a、101bの点灯/消灯状態が読み取りやすくなるため、手番識別部707における手番の識別が容易となるとともに、持ち時間表示部102a、102bに表示される持ち時間が読み取りやすくなるため、持ち時間識別部708における持ち時間の識別が容易となる。対局時計抽出部703における正対画像への変換方法として、本実施形態では、対局画像において斜めに映る対局時計部分の頂点を識別し、アフィン変換や射影変換を用いて正対画像に変換する方法を採用するが、正対画像への変換方法はこれに限られず、種々の既知の変換方法を採用することができる。 Therefore, it is preferable that the game clock extraction unit 703 has a conversion function that converts the game clock portion that is obliquely shown in the game image (Figure 5) into a front-facing image. By converting the game clock portion into a front-facing image, the on/off state of LEDs 101a, 101b becomes easier to read, making it easier to identify the turn in the turn identification unit 707, and the allotted time displayed in the allotted time display units 102a, 102b becomes easier to read, making it easier to identify the allotted time in the allotted time identification unit 708. As a method of conversion into a front-facing image in the game clock extraction unit 703, in this embodiment, a method is adopted in which the vertices of the game clock portion that is obliquely shown in the game image are identified and converted into a front-facing image using affine transformation or projective transformation, but the method of conversion into a front-facing image is not limited to this, and various known conversion methods can be adopted.
また、盤面抽出部704は、対局画像(図5)において斜めに映る盤面部分を、真上から映る正対画像に変換する変換機能を有することが好ましい。盤面部分を正対画像に変換することによって、駒の配置が読み取りやすくなるため、指し手識別部710における指し手の識別が容易となる。盤面抽出部704における正対画像への変換方法として、本実施形態では、対局画像において斜めに映る盤面部分の頂点を識別し、アフィン変換や射影変換を用いて正対画像に変換する方法を採用するが、正対画像への変換方法はこれに限られず、種々の既知の変換方法を採用することができる。 The board extraction unit 704 preferably has a conversion function that converts the board portion that is diagonally shown in the game image (Figure 5) into a front-facing image that is shown directly from above. By converting the board portion into a front-facing image, the placement of the pieces becomes easier to read, and the move identification unit 710 can easily identify the move. In this embodiment, the method of conversion into a front-facing image in the board extraction unit 704 is to identify the vertices of the board portion that is diagonally shown in the game image and convert it into a front-facing image using an affine transformation or a projective transformation, but the method of conversion into a front-facing image is not limited to this, and various known conversion methods can be used.
好ましくは、対局を開始する前に、対局時計抽出部703及び盤面抽出部704によって、対局画像(図5)における盤面部分及び対局時計部分の初期位置を、予め画定させる。具体的には、図5を参照して、カメラ21によって撮影された対局画像(図5)において、対局時計10の頂点を対局時計抽出部703で識別し、該頂点を通るように対局時計10の初期位置T1を画定するとともに、盤面8の頂点を盤面抽出部704で識別し、該頂点を通るように盤面8の初期位置T2を画定する。対局中、盤面8や対局時計10の位置は基本的に変わらないため、対局時計10の初期位置T1及び盤面8の初期位置T2を予め画定することにより、初期位置T1及びT2に基づいて、対局中の対局画像における対局時計部分及び盤面部分を高精度に抽出することができる。これにより、対局画像(図5)における盤面部分及び対局時計部分の初期位置を予め画定させない構成と比較して、手番や持ち時間、指し手をより正確に識別することができる。 Preferably, before the game starts, the game clock extraction unit 703 and the board extraction unit 704 predetermine the initial positions of the board and the game clock in the game image (FIG. 5). Specifically, referring to FIG. 5, in the game image (FIG. 5) captured by the camera 21, the apex of the game clock 10 is identified by the game clock extraction unit 703, and the initial position T1 of the game clock 10 is defined so as to pass through the apex, while the apex of the board 8 is identified by the board extraction unit 704, and the initial position T2 of the board 8 is defined so as to pass through the apex. During the game, the positions of the board 8 and the game clock 10 do not basically change, so by predetermining the initial position T1 of the game clock 10 and the initial position T2 of the board 8, the game clock and the board in the game image during the game can be extracted with high accuracy based on the initial positions T1 and T2. This allows for more accurate identification of moves, time available, and moves compared to a configuration in which the initial positions of the board and game clock in the game image (Figure 5) are not predefined.
(処理の流れ)
本発明における棋譜記録システム7において行われる処理の流れを説明する。図8は、棋譜記録システム7において行われる処理の全体流れのフローチャートである。図8を参照して、対局を開始するにあたり、まず、棋譜記録システム7の駒認識部706において、対局に使用される駒を認識する。対局に使用される駒のデータがデータベース4に存する場合(S10 Yes)、駒認識部706が、ネットワークAを介して、データベース4から当該駒データを読み込み(S20)、読み込んだ駒データを、対局に使用される駒として認識する(S60)。駒認識部706で認識された駒データは、記憶部711の駒データDB717に保存される。
(Processing flow)
The flow of processing carried out in the game record recording system 7 of the present invention will be described. Fig. 8 is a flow chart of the overall flow of processing carried out in the game record recording system 7. Referring to Fig. 8, when a game is started, first, the piece recognition unit 706 of the game record recording system 7 recognizes the pieces to be used in the game. If data of the pieces to be used in the game exists in the database 4 (S10 Yes), the piece recognition unit 706 reads the piece data from the database 4 via the network A (S20), and recognizes the read piece data as a piece to be used in the game (S60). The piece data recognized by the piece recognition unit 706 is stored in the piece data DB 717 of the storage unit 711.
一方、対局に使用される駒のデータがデータベース4に存しない場合(S10 No)、まず、対局画像取得部702が、駒が配置された盤面をカメラ21で撮影し、撮影された盤面画像を取得する(S30)。対局画像取得部702で取得された盤面画像は、対局画像DB713に保存される。盤面抽出部704が、対局画像DB713に保存された該盤面画像を読み出し、該盤面画像から盤面部分を抽出する(S40)。抽出された盤面部分は、記憶部711の盤面DB715に保存される。駒認識部706は、盤面DB715に保存された盤面から駒を識別して(S50)、当該駒を対局に使用される駒として認識する(S60)。駒認識部706で認識された駒データは、記憶部711の駒データDB717に保存される。駒データDB717に保存された駒データは、送受信部723からネットワークAを介して送られ、データベース4に保存される。 On the other hand, if the data of the pieces to be used in the game is not present in the database 4 (S10 No), the game image acquisition unit 702 first photographs the board on which the pieces are placed with the camera 21 and acquires the photographed board image (S30). The board image acquired by the game image acquisition unit 702 is stored in the game image DB 713. The board extraction unit 704 reads the board image stored in the game image DB 713 and extracts a board portion from the board image (S40). The extracted board portion is stored in the board DB 715 of the storage unit 711. The piece recognition unit 706 identifies a piece from the board stored in the board DB 715 (S50) and recognizes the piece as a piece to be used in the game (S60). The piece data recognized by the piece recognition unit 706 is stored in the piece data DB 717 of the storage unit 711. The piece data stored in the piece data DB 717 is sent from the transmission/reception unit 723 via network A and stored in database 4.
続いて、対局データ取得部701が、ユーザによって入力された対局データを取得し、記憶部711が備える対局データDB712に格納する(S70)。対局データDB712に格納された対局データは、送受信部723から、ネットワークAを介してデータベース4へと送られて保存される。 Then, the game data acquisition unit 701 acquires the game data input by the user and stores it in the game data DB 712 provided in the storage unit 711 (S70). The game data stored in the game data DB 712 is sent from the transmission/reception unit 723 via network A to the database 4 and stored there.
続いて、対局画像取得部702が、対局前の盤面8及び対局時計10をカメラ21で撮影し、撮影された初期対局画像(対局前の盤面及び対局時計が収められた画像)を取得する(S75)。対局画像取得部702で取得された初期対局画像は、対局画像DB713に保存される。 Then, the game image acquisition unit 702 photographs the board 8 and the game clock 10 before the game with the camera 21, and acquires the captured initial game image (an image containing the board and the game clock before the game) (S75). The initial game image acquired by the game image acquisition unit 702 is stored in the game image DB 713.
盤面抽出部704が、対局画像DB713から読み出した初期対局画像から、盤面8の頂点を識別し、該頂点を通るように盤面8の初期位置T2を画定する(S80)。対局前に盤面8の初期位置T2を画定させることにより(S80 Yes)、初期位置T2に基づいて、対局中の対局画像における盤面部分を高精度に抽出することができる。一方、盤面抽出部704で盤面8の初期位置T2が画定できない場合には(S80 No)、ユーザによって、スマートフォン2や保持部13の角度が調整されることによって、盤面抽出部704が盤面8の頂点を識別できる位置となるように、カメラ21の撮影可能範囲が調整される(S90)。その後、対局画像取得部702が、対局前の盤面8及び対局時計10をカメラ21で撮影して、初期対局画像を再度取得し、対局画像DB713に保存する(S75)。そして、盤面抽出部704が、対局画像DB713から読み出した初期対局画像から、盤面8の初期位置T2を再度画定する(S80)。 The board surface extraction unit 704 identifies the vertices of the board surface 8 from the initial game image read from the game image DB 713, and defines the initial position T2 of the board surface 8 so as to pass through the vertices (S80). By defining the initial position T2 of the board surface 8 before the game (S80 Yes), the board surface portion in the game image during the game can be extracted with high accuracy based on the initial position T2. On the other hand, if the board surface extraction unit 704 cannot define the initial position T2 of the board surface 8 (S80 No), the angle of the smartphone 2 or the holding unit 13 is adjusted by the user, so that the board surface extraction unit 704 can identify the vertices of the board surface 8, and the captureable range of the camera 21 is adjusted (S90). After that, the game image acquisition unit 702 captures the board surface 8 and the game clock 10 before the game with the camera 21, reacquires the initial game image, and stores it in the game image DB 713 (S75). Then, the board extraction unit 704 redefines the initial position T2 of the board 8 from the initial game image read from the game image DB 713 (S80).
盤面抽出部704による初期位置T2の画定後(S80)、対局時計抽出部703が、対局画像DB713から読み出した初期対局画像から、対局時計10の頂点を識別し、該頂点を通るように対局時計10の初期位置T1を画定する(S100)。対局前に対局時計10の初期位置T1を画定させることにより(S100 Yes)、初期位置T1に基づいて、対局中の対局画像における対局時計部分を高精度に抽出することができる。一方、対局時計抽出部703で対局時計10の初期位置T1が画定できない場合には(S100 No)、ユーザによって、対局時計抽出部703が対局時計10の頂点を識別できる位置となるように、対局時計10の位置が調整される(S110)。その後、対局画像取得部702が、対局前の盤面8及び対局時計10をカメラ21で撮影し、初期対局画像を再度取得し、対局画像DB713に保存する(S75)。そして、盤面抽出部704が、対局画像DB713から読み出した初期対局画像から、盤面8の初期位置T2を再度画定し(S80)、 盤面8の初期位置T2が画定された場合(S80 Yes)、対局時計抽出部703が、対局画像DB713から読み出した初期対局画像から、対局時計10の初期位置T1を再度画定する(S100)。なお、本フローによれば、対局時計抽出部703で対局時計10の初期位置T1が画定できない場合であっても(S100 No)、盤面8の初期位置T2は既に画定されている(S80)。そのため、ユーザによる対局時計10の位置調整(S110)及び、対局画像取得部702による初期対局画像の再取得(S75)の後工程である、盤面8の初期位置T2の再画定(S80)を省略することができる。 After the board extraction unit 704 determines the initial position T2 (S80), the game clock extraction unit 703 identifies the apex of the game clock 10 from the initial game image read from the game image DB 713, and determines the initial position T1 of the game clock 10 so that it passes through the apex (S100). By determining the initial position T1 of the game clock 10 before the game (S100 Yes), the game clock portion in the game image during the game can be extracted with high accuracy based on the initial position T1. On the other hand, if the game clock extraction unit 703 cannot determine the initial position T1 of the game clock 10 (S100 No), the user adjusts the position of the game clock 10 so that the game clock extraction unit 703 can identify the apex of the game clock 10 (S110). After that, the game image acquisition unit 702 photographs the board 8 and the game clock 10 before the game with the camera 21, acquires an initial game image again, and stores it in the game image DB 713 (S75). Then, the board extraction unit 704 redefines the initial position T2 of the board 8 from the initial game image read from the game image DB 713 (S80). If the initial position T2 of the board 8 is defined (S80 Yes), the game clock extraction unit 703 redefines the initial position T1 of the game clock 10 from the initial game image read from the game image DB 713 (S100). According to this flow, even if the game clock extraction unit 703 cannot define the initial position T1 of the game clock 10 (S100 No), the initial position T2 of the board 8 has already been defined (S80). Therefore, it is possible to omit the step of adjusting the position of the game clock 10 by the user (S110) and the step of redefining the initial position T2 of the board 8 (S80), which is a step subsequent to the reacquisition of the initial game image by the game image acquisition unit 702 (S75).
その後、ユーザによって記録開始が指示されると(S120)、棋譜記録システム7で対局の棋譜データが記録される(S130)。ユーザによって記録終了が指示されると(S150)、棋譜記録システム7で記録された棋譜データが、送受信部723からネットワークAを介してデータベース4に送られて格納される(S160)。 After that, when the user instructs the start of recording (S120), the game record data of the game is recorded by the game record recording system 7 (S130). When the user instructs the end of recording (S150), the game record data recorded by the game record recording system 7 is sent from the transmission/reception unit 723 via network A to the database 4 and stored there (S160).
棋譜記録システム7によって行われる、棋譜を記録する詳細なフローについて説明する。図9は、棋譜記録システム7において行われる棋譜記録処理のフローチャートである。まず、対局画像取得部702が、カメラ21で盤面8及び対局時計10を撮影し、対局画像(盤面8及び対局時計10が収められた画像)を取得する(S131)。対局画像取得部702で取得された対局画像は、対局画像DB713に保存される。 The detailed flow of game record recording performed by the game record recording system 7 will be described below. FIG. 9 is a flowchart of the game record recording process performed by the game record recording system 7. First, the game image acquisition unit 702 photographs the board 8 and the game clock 10 with the camera 21 and acquires a game image (an image containing the board 8 and the game clock 10) (S131). The game image acquired by the game image acquisition unit 702 is stored in the game image DB 713.
対局時計抽出部703が、対局画像DB713に保存された対局画像を読み出して、該対局画像における対局時計部分を抽出する(S132)。抽出された対局時計部分は、記憶部711の対局時計DB714に保存される。 The game clock extraction unit 703 reads the game image stored in the game image DB 713 and extracts the game clock portion from the game image (S132). The extracted game clock portion is stored in the game clock DB 714 of the storage unit 711.
手番識別部707が、対局時計抽出部703で抽出されて対局時計DB714に保存された対局時計部分を読み出し、手番を識別する(S133)。手番識別部707における手番の識別方法については、上述のため、説明を省略する。手番識別部707で識別された手番のデータは、棋譜記憶部718の手番DB719に保存される。 The move identification unit 707 reads the game clock portion extracted by the game clock extraction unit 703 and stored in the game clock DB 714, and identifies the move (S133). The method for identifying moves by the move identification unit 707 has been described above, so a detailed explanation is omitted here. The data on the move identified by the move identification unit 707 is stored in the move DB 719 of the game record storage unit 718.
S133で識別された手番に基づき、手番識別部707が、手番が変化したか否かを識別する(S134)。手番が変化していないと識別された場合には(S134 No)、所定時間経過後、再度対局画像取得部702が、盤面8及び対局時計10をカメラ21で撮影して、対局画像を取得する(S131)。対局画像取得部702で取得された対局画像は、対局画像DB713に保存される。そして、対局時計抽出部703が、対局画像DB713に保存された対局画像を読み出し、対局時計部分を再度抽出する(S132)。一方、手番が変化したと識別された場合には(S134 Yes)、持ち時間識別部708が、S132において対局時計抽出部703で抽出されて対局時計DB714に保存された対局時計部分を読み出し、手番だった対局者(対局者Xとする)の持ち時間を識別する(S135)。持ち時間識別部708における持ち時間の識別方法については、上述のため、説明を省略する。持ち時間識別部708で識別された持ち時間のデータは、棋譜記憶部718の持ち時間DB720に保存される。 Based on the turn identified in S133, the turn identification unit 707 identifies whether the turn has changed (S134). If it is identified that the turn has not changed (S134 No), after a predetermined time has elapsed, the game image acquisition unit 702 again photographs the board 8 and the game clock 10 with the camera 21 to acquire a game image (S131). The game image acquired by the game image acquisition unit 702 is stored in the game image DB 713. Then, the game clock extraction unit 703 reads the game image stored in the game image DB 713 and extracts the game clock portion again (S132). On the other hand, if it is identified that the turn has changed (S134 Yes), the time limit identification unit 708 reads the game clock portion extracted by the game clock extraction unit 703 in S132 and stored in the game clock DB 714, and identifies the time limit of the player whose turn it was (player X) (S135). The method for identifying the time held by the time holding identification unit 708 has been described above, so a detailed explanation will be omitted. The time holding data identified by the time holding identification unit 708 is stored in the time holding DB 720 of the game record storage unit 718.
消費時間算出部709は、持ち時間DB720に保存された持ち時間データを読み出し、対局者Xが前回の指し手を終えた時の持ち時間と、対局者Xが今回の指し手を終えた時の持ち時間と、の差分を、消費時間として算出する(S136)。消費時間算出部709で算出された消費時間は、棋譜記憶部718の消費時間DB721に保存される。 The time consumption calculation unit 709 reads the time consumption data stored in the time consumption DB 720, and calculates the difference between the time consumption when player X finished the previous move and the time consumption when player X finished the current move as the time consumption (S136). The time consumption calculated by the time consumption calculation unit 709 is stored in the time consumption DB 721 of the game record storage unit 718.
続いて、盤面抽出部704が、S131で取得されて対局画像DB713で保存されている対局画像を読み出し、該対局画像における盤面部分を抽出する(S137)。抽出された盤面部分は、記憶部711の盤面DB715に保存される。 Then, the board state extraction unit 704 reads the game image acquired in S131 and stored in the game image DB 713, and extracts the board state portion from the game image (S137). The extracted board state portion is stored in the board state DB 715 of the storage unit 711.
続いて、指し手識別部710が、盤面抽出部704で抽出され盤面DB715に保存された盤面部分(S137)及び駒認識部706で認識されて駒データDB717に保存された駒データ(S60)を読み出し、対局者Xが行った指し手を識別する(S138)。指し手識別部710における指し手の識別方法については、上述のため、説明を省略する。指し手識別部710で識別された指し手は、棋譜記憶部718の指し手DB722に保存される。 Next, the move identification unit 710 reads the board surface portion extracted by the board surface extraction unit 704 and stored in the board surface DB 715 (S137) and the piece data recognized by the piece recognition unit 706 and stored in the piece data DB 717 (S60), and identifies the move made by player X (S138). The method of identifying moves by the move identification unit 710 has been described above, so a detailed explanation will be omitted. The moves identified by the move identification unit 710 are stored in the move DB 722 of the game record storage unit 718.
対局が終了していない場合には(S139 No)、所定時間経過後、再度対局画像取得部702が、盤面8及び対局時計10をカメラ21で撮影して、対局画像を取得し(S131)、対局画像DB713に保存し、S132~S138のフローが繰り返される。一方、対局の勝敗が決したときなど、対局が終了した場合には(S139 Yes)、それぞれが同期した、手番データと、持ち時間データと、消費時間データと、指し手データと、を含むデータが、棋譜データとして得られる。 If the game has not ended (S139 No), after a predetermined time has elapsed, the game image acquisition unit 702 again photographs the board 8 and game clock 10 with the camera 21 to acquire game images (S131), stores the images in the game image DB 713, and the flow of S132 to S138 is repeated. On the other hand, when the game ends, such as when the outcome of the game is decided (S139 Yes), data including synchronized turn data, time data, time used data, and move data is obtained as game record data.
[棋譜記録プログラム]
上述の棋譜記録システムを構成する各機能は、プログラムによって実現可能であり、各機能を実現するために予め用意されたコンピュータプログラムが二次記憶装置に格納され、制御部が二次記憶装置に格納されたプログラムを一次記憶装置に読み出し、一次記憶装置に読み出された該プログラムを制御部が実行することで、各部の機能を動作させることができる。そこで、図10を用いて、上述の棋譜記録システムと同様の機能を有する棋譜記録プログラムを実行するコンピュータの一例について、以下に説明する。
[Game record recording program]
Each function constituting the above-mentioned game record recording system can be realized by a program, and a computer program prepared in advance to realize each function is stored in a secondary storage device, and the control unit reads the program stored in the secondary storage device into a primary storage device, and the control unit executes the program read into the primary storage device, thereby operating the function of each unit. Therefore, an example of a computer that executes a game record recording program having the same function as the above-mentioned game record recording system will be described below with reference to FIG. 10.
図10は、本実施形態の棋譜記録システムに係る棋譜記録プログラムを実行するコンピュータの一例を示す。図10に示すように、コンピュータ1000は、操作部1100と、スピーカー1200と、カメラ1300と、ディスプレイ1400と、通信部1500と、を有する。さらに、コンピュータ1000は、CPU(制御部)1600と、HDD(二次記憶装置)1700と、RAM(一次記憶装置)1800と、を有する。これらの各部は、バス1900を介して接続される。 Figure 10 shows an example of a computer that executes a game record recording program related to the game record recording system of this embodiment. As shown in Figure 10, the computer 1000 has an operation unit 1100, a speaker 1200, a camera 1300, a display 1400, and a communication unit 1500. Furthermore, the computer 1000 has a CPU (control unit) 1600, a HDD (secondary storage device) 1700, and a RAM (primary storage device) 1800. Each of these units is connected via a bus 1900.
HDD1700には、図10に示すように、上述の実施形態で示した各機能部と同様の機能を発揮する棋譜記録プログラムが予め記憶される。この棋譜記録プログラムについては、図3に示した棋譜記録システム7の各々の機能部の各構成要素と同様に、適宜統合又は分離しても良い。すなわち、HDD1700に格納される各データは、常に全てのデータがHDD1700に格納される必要はなく、処理に必要なデータのみがHDD1700に格納されれば良い。 As shown in FIG. 10, a game record recording program that performs the same functions as the functional units shown in the above-described embodiment is prestored in HDD 1700. This game record recording program may be integrated or separated as appropriate, similar to the components of the functional units of game record recording system 7 shown in FIG. 3. In other words, it is not necessary for all data to be stored in HDD 1700 at all times, and only data necessary for processing needs to be stored in HDD 1700.
そして、CPU1600が、棋譜記録プログラムをHDD1700から読み出してRAM1800に展開する。これによって、棋譜記録プログラムは、棋譜記録プロセスとして機能する。この棋譜記録プロセスは、HDD1700から読み出した各種データを適宜RAM1800上の自身に割り当てられた領域に展開し、この展開した各種データに基づいて各種処理を実行する。なお、棋譜記録プロセスは、図3に示した各機能部にて実行される処理、例えば図8及び図9に示す処理を含む。また、CPU1600上で仮想的に実現される各処理部は、常に全ての処理部がCPU1600上で動作する必要はなく、処理に必要な処理部のみが仮想的に実現されれば良い。 Then, the CPU 1600 reads the game record recording program from the HDD 1700 and loads it in the RAM 1800. This causes the game record recording program to function as a game record recording process. This game record recording process loads various data read from the HDD 1700 in an area allocated to it on the RAM 1800 as appropriate, and executes various processes based on the loaded data. The game record recording process includes processes executed by the functional units shown in FIG. 3, for example, the processes shown in FIG. 8 and FIG. 9. Furthermore, it is not necessary for all of the processing units virtually realized on the CPU 1600 to always operate on the CPU 1600, and only the processing units necessary for processing need to be virtually realized.
なお、上述の棋譜記録プログラムについては、必ずしも最初からHDD1700に記憶させておく必要はなく、「コンピュータ読取可能な記録媒体」に各プログラムを記憶させ、コンピュータ1000がこの「コンピュータ読取可能な記録媒体」から各プログラムを取得して実行するようにしてもよい。「コンピュータ読取可能な記録媒体」としては、CD-ROM等の光ディスク、DVD-RAM等の相変化型光ディスク、MO(Magneto Optical)やMD(Mini Disk)などの光磁気ディスク、フロッピー(登録商標)ディスクやリムーバブルハードディスクなどの磁気ディスク、コンパクトフラッシュ(登録商標)、スマートメディア、SDメモリカード、メモリスティック等のメモリカードが挙げられる。また、本発明の目的のために特別に設計されて構成された集積回路(ICチップ等)等のハードウェア装置も記録媒体として含まれる。さらに、公衆回線、インターネット、LAN、WANなどを介してコンピュータ1000に接続される他のコンピュータまたはサーバ装置などに各プログラムを記憶させておいてもよい。その場合、コンピュータ1000が他のコンピュータまたはサーバ装置から各プログラムを取得して実行するようにしてもよい。 It is not necessary to store the game record recording program in the HDD 1700 from the beginning. Each program may be stored in a "computer-readable recording medium" and the computer 1000 may acquire and execute each program from the "computer-readable recording medium". Examples of "computer-readable recording media" include optical disks such as CD-ROMs, phase-change optical disks such as DVD-RAMs, magneto-optical disks such as MO (Magneto Optical) and MD (Mini Disk), magnetic disks such as floppy (registered trademark) disks and removable hard disks, and memory cards such as Compact Flash (registered trademark), Smart Media, SD memory cards, and memory sticks. In addition, hardware devices such as integrated circuits (IC chips, etc.) specially designed and configured for the purpose of the present invention are also included as recording media. Furthermore, each program may be stored in another computer or server device connected to the computer 1000 via a public line, the Internet, a LAN, a WAN, etc. In that case, the computer 1000 may acquire and execute each program from the other computer or server device.
(変形例)
上述の実施形態では、本発明を将棋に適用した場合を示したが、本発明の適用対象は将棋に限られず、囲碁やチェスなどの対局型遊戯にも適用することができる。
(Modification)
In the above embodiment, the present invention is applied to Shogi, but the application of the present invention is not limited to Shogi, and it can also be applied to other games such as Go and Chess.
(変形例)
上述の実施形態では、スマートフォン2が、対局データ取得部701と、対局画像取得部702と、対局時計抽出部703と、盤面抽出部704と、駒認識部706と、手番識別部707と、持ち時間識別部708と、消費時間算出部709と、指し手識別部710と、記憶部711と、を有する棋譜記録システム7を備える。この構成により、スマートフォン2が、棋譜記録装置として機能する。しかしながら、これに限られず、棋譜記録装置として、他の携帯端末(タブレットやウェアラブルデバイス等)やパソコンなどを用いてもよい。また、対局データ取得部701と、対局画像取得部702と、対局時計抽出部703と、盤面抽出部704と、駒認識部706と、手番識別部707と、持ち時間識別部708と、消費時間算出部709と、指し手識別部710と、記憶部711と、のうち少なくとも一部をサーバ5が備える構成であってもよい。これにより、スマートフォン2及びサーバ5が、棋譜記録システム7として機能する。
(Modification)
In the above-described embodiment, the smartphone 2 includes a game record recording system 7 having a game data acquisition unit 701, a game image acquisition unit 702, a game clock extraction unit 703, a board state extraction unit 704, a piece recognition unit 706, a turn identification unit 707, a time limit identification unit 708, a time consumption calculation unit 709, a move identification unit 710, and a storage unit 711. With this configuration, the smartphone 2 functions as a game record recording device. However, the present invention is not limited to this, and other mobile terminals (tablets, wearable devices, etc.) or personal computers may be used as the game record recording device. The server 5 may also be configured to include at least some of the game data acquisition unit 701, the game image acquisition unit 702, the game clock extraction unit 703, the board state extraction unit 704, the piece recognition unit 706, the turn identification unit 707, the time limit identification unit 708, the time consumed calculation unit 709, the move identification unit 710, and the storage unit 711. In this way, the smartphone 2 and the server 5 function as the game record recording system 7.
(変形例)
上述の実施形態では、対局時計10は、対局の手番をLED101a、101bの点灯/消灯で表示している。しかしながら、手番の表示形式は、これに限られず、例えば着手ボタン103a、103bが上方に飛び出すことによって、手番を表示する対局時計が使用されてもよい。この場合、手番識別部707は、着手ボタンの上方への飛び出しを識別し、一対の着手ボタンの高さの相違によって、手番を識別することができる。
(Modification)
In the above embodiment, the game clock 10 displays the move of the game by turning on/off the LEDs 101a, 101b. However, the display format of the move is not limited to this, and for example, a game clock may be used that displays the move by having the start buttons 103a, 103b pop up upward. In this case, the move identification unit 707 can identify the move by identifying the move buttons popping up upward, and identify the move by the difference in height between the pair of start buttons.
(変形例)
上述の実施形態では、対局時計10は、持ち時間表示部102a及び102bに、デジタル形式(デジタル数字で持ち時間を示す形式)を採用している。しかしながら、持ち時間表示部の表示形式は、これに限られず、持ち時間表示部にアナログ形式(長針と短針によって持ち時間を示す形式)を採用することができる。この場合、持ち時間識別部708は、長針と短針を認識して時間に変換することによって、持ち時間を識別することができる。
(Modification)
In the above embodiment, the game clock 10 employs a digital format (format showing the time limit with digital numbers) for the time limit display sections 102a and 102b. However, the display format of the time limit display section is not limited to this, and an analog format (format showing the time limit with hour and minute hands) can be employed for the time limit display section. In this case, the time limit identification section 708 can identify the time limit by recognizing the hour and minute hands and converting them into time.
(変形例)
上述の実施形態では、対局時計10の初期位置T1及び盤面8の初期位置T2を予め画定したうえで、対局時計抽出部703による対局時計部分の抽出及び盤面抽出部704による盤面部分の抽出を行っているが(図8参照)、対局時計10の初期位置T1及び盤面8の初期位置T2を予め画定した後で、対局時計10が初期位置T1から外れた場合または盤面8が初期位置T2から外れた場合、対局時計10または盤面8の初期位置を再画定させる構成であってもよい。この構成によれば、不慮の事故等で対局時計10や盤面8がずれた場合であっても、ずれた後の新たな位置を初期位置に設定することで、それ以降の対局における、対局時計抽出部703による対局時計部分の抽出及び盤面抽出部704による盤面部分の抽出を、高精度に行うことができる。対局時計10または盤面8の初期位置の再画定は、ユーザによって対局時計10または盤面8の位置が補正された後で行われてもよく、ユーザによってカメラ21の撮影可能範囲が調整された後で行われてもよい。
(Modification)
In the above embodiment, the initial position T1 of the game clock 10 and the initial position T2 of the board 8 are defined in advance, and then the game clock extraction unit 703 extracts the game clock portion and the board extraction unit 704 extracts the board portion (see FIG. 8 ). However, after the initial position T1 of the game clock 10 and the initial position T2 of the board 8 are defined in advance, if the game clock 10 moves from the initial position T1 or the board 8 moves from the initial position T2, the initial positions of the game clock 10 or the board 8 may be redefined. With this configuration, even if the game clock 10 or the board 8 shifts due to an unexpected accident or the like, the new position after the shift is set as the initial position, so that the game clock extraction unit 703 can extract the game clock portion and the board extraction unit 704 can extract the board portion in subsequent games with high accuracy. The redefinition of the initial position of the game clock 10 or the board 8 may be performed after the position of the game clock 10 or the board 8 has been corrected by the user, or may be performed after the user has adjusted the capture range of the camera 21.
(変形例)
上述の実施形態では、対局画像を撮影するカメラ21は、スマートフォン2が備えるものである。しかしながら、これに限られず、対局画像を撮影するカメラは、例えば、他の携帯端末(タブレットやウェアラブルデバイス等)に備えられたカメラであってよく、パソコンが予め備える内蔵カメラであってよく、パソコンに外付けされるWebカメラであってよい。
(Modification)
In the above embodiment, the camera 21 that captures the game image is provided in the smartphone 2. However, the present invention is not limited to this, and the camera that captures the game image may be, for example, a camera provided in another mobile terminal (such as a tablet or a wearable device), a built-in camera that is provided in a personal computer, or a web camera that is externally attached to a personal computer.
(変形例)
上述の実施形態では、対局画像取得部702が、所定の時間間隔ごとに、盤面8及び対局時計10をカメラ21で撮影し、撮影された対局画像を取得する構成を有する。しかしながら、これに限られず、所定の時間間隔ごとに盤面8及び対局時計10をカメラ21で撮影する機能部を、対局画像取得部702とは独立して備えてもよい。この場合、当該機能部によって、盤面8及び対局時計10が収められた対局画像がカメラ21で撮影され、当該対局画像が、対局画像取得部702で取得されて、対局画像DB713に保存される。
(Modification)
In the above embodiment, the game image acquisition unit 702 has a configuration in which the game board 8 and the game clock 10 are photographed by the camera 21 at predetermined time intervals and the photographed game images are acquired. However, this is not limited to this, and a functional unit that photographs the game board 8 and the game clock 10 by the camera 21 at predetermined time intervals may be provided separately from the game image acquisition unit 702. In this case, the functional unit photographs a game image containing the game board 8 and the game clock 10 by the camera 21, and the game image is acquired by the game image acquisition unit 702 and stored in the game image DB 713.
2 スマートフォン 7 棋譜記録システム 8 盤面 10 対局時計 21 カメラ 702 対局画像取得部 703 対局時計抽出部 704 盤面抽出部 706 駒認識部 707 手番識別部 708 持ち時間識別部 709 消費時間算出部 710 指し手識別部 718 棋譜記憶部 T1 対局時計の初期位置 T2 盤面の初期位置
2 Smartphone 7 Game record recording system 8 Game board 10 Game clock 21 Camera 702 Game image acquisition unit 703 Game clock extraction unit 704 Game board extraction unit 706 Piece recognition unit 707 Turn identification unit 708 Time limit identification unit 709 Time spent calculation unit 710 Move identification unit 718 Game record storage unit T1 Initial position of game clock T2 Initial position of game board
Claims (6)
対局に使用される駒を認識する駒認識部と、
カメラで撮影された、盤面及び対局時計が収められた対局画像を取得する対局画像取得部と、
前記対局画像取得部で取得された該対局画像から対局時計部分を抽出する対局時計抽出部と、
前記対局画像取得部で取得された該対局画像から盤面部分を抽出する盤面抽出部と、
前記対局時計抽出部で抽出された該対局時計部分に基づき、手番を識別して、手番の変化を識別する手番識別部と、
前記手番識別部で手番が変化したと識別された場合に、前記対局時計抽出部で抽出された該対局時計部分に基づき、対局者の持ち時間を識別する持ち時間識別部と、
前記持ち時間識別部で識別された持ち時間に基づき、対局者の消費時間を算出する消費時間算出部と、
前記盤面抽出部で抽出された該盤面部分と、前記駒認識部で認識された駒のデータと、に基づき、対局者の指し手を識別する指し手識別部と、
前記手番識別部で識別された手番と、前記持ち時間識別部で識別された持ち時間と、前記消費時間算出部で算出された消費時間と、前記指し手識別部で識別された指し手と、を含む棋譜を記憶する棋譜記憶部と、
を備えることを特徴とする、棋譜記録システム。 A game record recording system for recording a game record,
a piece recognition unit for recognizing pieces to be used in a game;
a game image acquisition unit that acquires game images including a game board and a game clock captured by a camera;
a game clock extraction unit that extracts a game clock portion from the game image acquired by the game image acquisition unit;
a game board extraction unit that extracts a game board portion from the game image acquired by the game image acquisition unit;
a turn identification unit that identifies a turn based on the game clock portion extracted by the game clock extraction unit and identifies a change in turn;
a time limit identification unit which, when it is identified by the turn identification unit that a turn has changed, identifies the time limit of a player based on the game clock portion extracted by the game clock extraction unit;
a time consumption calculation unit that calculates the time consumed by a player based on the time consumption identified by the time consumption identification unit;
a move identification unit which identifies moves made by players based on the board portion extracted by said board extraction unit and the data of pieces recognized by said piece recognition unit;
a game record storage unit that stores a game record including the move identified by the move identification unit, the time identified by the time identification unit, the time consumed calculated by the time consumption calculation unit, and the move identified by the move identification unit;
A game record recording system comprising:
前記盤面抽出部は、前記対局画像取得部で取得された該初期対局画像から、盤面の初期位置を画定し、
前記対局時計抽出部は、前記対局画像取得部で取得された該初期対局画像から、対局時計の初期位置を画定する
ことを特徴とする、請求項1に記載の棋譜記録システム。 The game image acquisition unit acquires an initial game image including a board and a game clock before the game, the initial game image being captured by the camera,
The board state extraction unit determines an initial position of the board state from the initial game image acquired by the game image acquisition unit,
The game record recording system according to claim 1 , wherein the game clock extraction unit determines an initial position of the game clock from the initial game image acquired by the game image acquisition unit.
前記盤面抽出部は、前記対局画像取得部で取得された前記対局画像において斜めに映る前記盤面部分を、真上から映る正対画像に変換する
ことを特徴とする、請求項1に記載の棋譜記録システム。 The game clock extraction unit converts the game clock portion that is obliquely shown in the game image acquired by the game image acquisition unit into a front-on image that is shown from the front,
The game record recording system according to claim 1 , wherein the board state extraction unit converts the portion of the board state that is obliquely shown in the game image acquired by the game image acquisition unit into a frontal image that is shown directly from above.
ことを特徴とする、請求項1ないし3のいずれか1つに記載の棋譜記録システム。 The game record recording system according to claim 1 , wherein the camera is a camera equipped in a smartphone.
対局に使用される駒を認識する駒認識部と、
カメラで撮影された、盤面及び対局時計が収められた対局画像を取得する対局画像取得部と、
前記対局画像取得部で取得された該対局画像から対局時計部分を抽出する対局時計抽出部と、
前記対局画像取得部で取得された該対局画像から盤面部分を抽出する盤面抽出部と、
前記対局時計抽出部で抽出された該対局時計部分に基づき、手番を識別して、手番の変化を識別する手番識別部と、
前記手番識別部で手番が変化したと識別された場合に、前記対局時計抽出部で抽出された該対局時計部分に基づき、対局者の持ち時間を識別する持ち時間識別部と、
前記持ち時間識別部で識別された持ち時間に基づき、対局者の消費時間を算出する消費時間算出部と、
前記盤面抽出部で抽出された該盤面部分と、前記駒認識部で認識された駒のデータと、に基づき、対局者の指し手を識別する指し手識別部と、
前記手番識別部で識別された手番と、前記持ち時間識別部で識別された持ち時間と、前記消費時間算出部で算出された消費時間と、前記指し手識別部で識別された指し手と、を含む棋譜を記憶する棋譜記憶部と、
を備えることを特徴とする、棋譜記録装置。 A game record recording device for recording a game record,
a piece recognition unit for recognizing pieces to be used in a game;
a game image acquisition unit that acquires game images including a game board and a game clock captured by a camera;
a game clock extraction unit that extracts a game clock portion from the game image acquired by the game image acquisition unit;
a game board extraction unit that extracts a game board portion from the game image acquired by the game image acquisition unit;
a turn identification unit that identifies a turn based on the game clock portion extracted by the game clock extraction unit and identifies a change in turn;
a time limit identification unit which, when it is identified by the turn identification unit that a turn has changed, identifies the time limit of a player based on the game clock portion extracted by the game clock extraction unit;
a time consumption calculation unit that calculates the time consumed by a player based on the time consumption identified by the time consumption identification unit;
a move identification unit which identifies moves made by players based on the board portion extracted by said board extraction unit and the data of pieces recognized by said piece recognition unit;
a game record storage unit that stores a game record including the move identified by the move identification unit, the time identified by the time identification unit, the time consumed calculated by the time consumption calculation unit, and the move identified by the move identification unit;
A game record recording device comprising:
コンピュータに、
対局に使用される駒を認識する駒認識手段と、
カメラで撮影された、盤面及び対局時計が収められた対局画像を取得する対局画像取得手段と、
前記対局画像取得手段で取得された該対局画像から対局時計部分を抽出する対局時計抽出手段と、
前記対局画像取得手段で取得された該対局画像から盤面部分を抽出する盤面抽出手段と、
前記対局時計抽出手段で抽出された該対局時計部分に基づき、手番を識別して、手番の変化を識別する手番識別手段と、
前記手番識別手段で手番が変化したと識別された場合に、前記対局時計抽出手段で抽出された該対局時計部分に基づき、対局者の持ち時間を識別する持ち時間識別手段と、
前記持ち時間識別手段で識別された持ち時間に基づき、対局者の消費時間を算出する消費時間算出手段と、
前記盤面抽出手段で抽出された該盤面部分と、前記駒認識手段で認識された駒のデータと、に基づき、対局者の指し手を識別する指し手識別手段と、
前記手番識別手段で識別された手番と、前記持ち時間識別手段で識別された持ち時間と、前記消費時間算出手段で算出された消費時間と、前記指し手識別手段で識別された指し手と、を含む棋譜を記憶する棋譜記憶手段と、
を実行させることを特徴とする、棋譜記録プログラム。 A game record recording program for recording a game record,
On the computer,
A piece recognition means for recognizing pieces to be used in a game;
a game image acquisition means for acquiring a game image including a game board and a game clock photographed by a camera;
a game clock extraction means for extracting a game clock portion from the game image acquired by the game image acquisition means;
a game board extraction means for extracting a game board portion from the game image acquired by the game image acquisition means;
a move identification means for identifying a move based on the game clock portion extracted by the game clock extraction means and identifying a change in the move;
a time limit identifying means for identifying the time limit of a player based on the game clock portion extracted by said game clock extracting means when said game number identifying means identifies a change in the turn;
a time consumption calculation means for calculating a time consumed by a player based on the time consumption identified by the time consumption identification means;
move identification means for identifying moves made by players based on the board portion extracted by said board extraction means and the data of pieces recognized by said piece recognition means;
a game record storage means for storing a game record including the move identified by the move identification means, the time limit identified by the time limit identification means, the time consumption calculated by the time consumption calculation means, and the move identified by the move identification means;
A game record recording program characterized by executing the above.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2023080722A JP7642016B2 (en) | 2023-05-16 | 2023-05-16 | Game record recording system, game record recording device, and game record recording program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2023080722A JP7642016B2 (en) | 2023-05-16 | 2023-05-16 | Game record recording system, game record recording device, and game record recording program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2024164967A JP2024164967A (en) | 2024-11-28 |
| JP7642016B2 true JP7642016B2 (en) | 2025-03-07 |
Family
ID=93608167
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2023080722A Active JP7642016B2 (en) | 2023-05-16 | 2023-05-16 | Game record recording system, game record recording device, and game record recording program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7642016B2 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010104510A (en) | 2008-10-29 | 2010-05-13 | Aqua Oak Kk | Method and system for record of game of shogi |
| WO2014054313A1 (en) | 2012-10-01 | 2014-04-10 | Mizuno Yoshiro | Controller |
| JP2022029349A (en) | 2020-08-04 | 2022-02-17 | Heroz株式会社 | Information processing device, operation terminal, recording method, program, and information processing system |
| US20220414843A1 (en) | 2019-10-21 | 2022-12-29 | Amada Co., Ltd. | Workpiece photographed image processing device, workpiece photographed image processing method, and processing system |
-
2023
- 2023-05-16 JP JP2023080722A patent/JP7642016B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010104510A (en) | 2008-10-29 | 2010-05-13 | Aqua Oak Kk | Method and system for record of game of shogi |
| WO2014054313A1 (en) | 2012-10-01 | 2014-04-10 | Mizuno Yoshiro | Controller |
| US20220414843A1 (en) | 2019-10-21 | 2022-12-29 | Amada Co., Ltd. | Workpiece photographed image processing device, workpiece photographed image processing method, and processing system |
| JP2022029349A (en) | 2020-08-04 | 2022-02-17 | Heroz株式会社 | Information processing device, operation terminal, recording method, program, and information processing system |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2024164967A (en) | 2024-11-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109194879B (en) | Photographing method, device, storage medium and mobile terminal | |
| US9286724B2 (en) | Augmented reality system | |
| CN101395636A (en) | Object-seeking computer program product, object-seeking device, and camera | |
| CN102332091A (en) | Camera head and control method thereof, shooting back-up system and individual evaluation method | |
| KR102640492B1 (en) | Tracking playing cards during game play using RFID tags | |
| CN109999492B (en) | Game device, game system, and recording medium | |
| KR20220018468A (en) | Image processing method and apparatus, electronic device and storage medium | |
| JP6842044B2 (en) | Information processing equipment, information processing methods, programs | |
| KR20140072952A (en) | Smart Terminal for Applicable Analog Game and Analog Game Method Using Smart Terminal | |
| US8355050B2 (en) | Image replay system, digital camera, and image replay device | |
| EP2668983B1 (en) | Apparatus and method of augmenting video | |
| JP7642016B2 (en) | Game record recording system, game record recording device, and game record recording program | |
| US20100248839A1 (en) | Wirelessly distributed electronic circle gaming | |
| JP6256738B2 (en) | Movie selection device, movie selection method and program | |
| JP2010104510A (en) | Method and system for record of game of shogi | |
| EP2887316A1 (en) | Input device, input method, and recording medium | |
| JP2020140719A (en) | Information processing equipment, information processing methods, programs | |
| JP2009006112A (en) | Game parlor management system | |
| JP2017080201A (en) | Information processing device, information processing method and program | |
| JP2017080199A (en) | Information processing device, information processing method and program | |
| CN113065384B (en) | Optical transmission equipment board card identification method and system | |
| JP6904447B1 (en) | Yugi image shooting equipment and programs | |
| JP6803111B2 (en) | Information processing equipment, information processing methods, programs | |
| JP2017080203A (en) | Information processing device, information processing method and program | |
| CN120406725A (en) | Electronic device and method executed in the electronic device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240209 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20241203 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20241213 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20250212 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250225 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7642016 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |