JP2021168088A - Information processing apparatus and information processing program - Google Patents

Information processing apparatus and information processing program Download PDF

Info

Publication number
JP2021168088A
JP2021168088A JP2020071892A JP2020071892A JP2021168088A JP 2021168088 A JP2021168088 A JP 2021168088A JP 2020071892 A JP2020071892 A JP 2020071892A JP 2020071892 A JP2020071892 A JP 2020071892A JP 2021168088 A JP2021168088 A JP 2021168088A
Authority
JP
Japan
Prior art keywords
ruled line
image
line
ruled
information processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2020071892A
Other languages
Japanese (ja)
Inventor
俊太郎 本庄
Shuntaro Honjo
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujifilm Business Innovation Corp filed Critical Fujifilm Business Innovation Corp
Priority to JP2020071892A priority Critical patent/JP2021168088A/en
Publication of JP2021168088A publication Critical patent/JP2021168088A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

To provide an information processing apparatus and an information processing program for accurately recognizing ruled lines even when the ruled lines cannot be recognized on an image directly.SOLUTION: A ruled line recognition unit 20 executes processing to acquire an image of ruled lines partially hidden by Go (board game) stones arranged on a Go board 16 having the ruled lines, and to recognize the ruled lines including the portion hidden by the Go stones on an image by using an imaginary line passing through a center area of a Go stone defined in advance and ruled lines recognized from the image.SELECTED DRAWING: Figure 3

Description

本発明は、情報処理装置及び情報処理プログラムに関する。 The present invention relates to an information processing device and an information processing program.

非特許文献1には、Canny法とHough変換を用いて、将棋盤の外枠を認識して枡目を認識する技術が提案されている。 Non-Patent Document 1 proposes a technique of recognizing the outer frame of a shogi board and recognizing squares by using the Canny method and the Hough transform.

栗田哲平、三輪誠、近山隆、「将棋を対象とした画像情報を用いた自動局面認識手法」、情報処理学会シンポジウム論文集 (情報処理学会ワークショップ論文集)、日本、2007年11月9日、207号、p.172−179Teppei Kurita, Makoto Miwa, Takashi Chikayama, "Automatic Phase Recognition Method Using Image Information for Shogi", IPSJ Symposium Proceedings (IPSJ Workshop Proceedings), Japan, November 9, 2007 , 207, p. 172-179

一例として、対局中の画像を取得して棋譜を記録する場合、罫線を認識する必要があるが、罫線が、罫線に重畳される対象物(例えば、石や駒)によって罫線が隠れてしまうと、罫線を正確に認識できなくなってしまう場合がある。そこで、本発明では、罫線が画像上で直接認識できない状況であっても罫線を正確に認識することが可能な情報処理装置及び情報処理プログラムを提供することを目的とする。 As an example, when acquiring an image during a game and recording a game record, it is necessary to recognize the ruled line, but if the ruled line is hidden by an object (for example, a stone or a piece) superimposed on the ruled line, , The ruled line may not be recognized accurately. Therefore, an object of the present invention is to provide an information processing apparatus and an information processing program capable of accurately recognizing a ruled line even in a situation where the ruled line cannot be directly recognized on an image.

上記目的を達成するために、第1態様に係る情報処理装置は、プロセッサを備え、前記プロセッサは、罫線を有する第1対象物上に第2対象物が配置されて、前記第2対象物によって罫線の少なくとも一部が隠れている画像を取得し、前記第2対象物の予め定めた中心範囲を通る仮想線と、前記画像から認識した罫線と、を用いて、前記画像上で前記第2対象物によって隠れている部分を含めて前記罫線を認識する処理を行う。 In order to achieve the above object, the information processing apparatus according to the first aspect includes a processor, in which the second object is arranged on the first object having a ruled line, and the second object is used. An image in which at least a part of the ruled line is hidden is acquired, and the second object is displayed on the image by using a virtual line passing through a predetermined center range of the second object and a ruled line recognized from the image. The process of recognizing the ruled line including the portion hidden by the object is performed.

第2態様に係る情報処理装置は、第1態様に係る情報処理装置において、前記仮想線は、前記第2対象物の予め定めた中心範囲に対して、予め定めた閾値距離内に存在する、別の前記第2対象物の前記中心範囲同士を結んだ線である。 The information processing device according to the second aspect is the information processing device according to the first aspect, wherein the virtual line exists within a predetermined threshold distance with respect to a predetermined center range of the second object. It is a line connecting the central ranges of another second object.

第3態様に係る情報処理装置は、第1態様又は第2態様に係る情報処理装置において、前記プロセッサは、前記仮想線と、前記画像から認識した罫線とを用いて、最外罫線を検出し、前記最外罫線と、前記第1対象物の予め定めた罫線数とを用いて、前記第1対象物の罫線を認識する。 The information processing device according to the third aspect is the information processing device according to the first aspect or the second aspect, and the processor detects the outermost ruled line by using the virtual line and the ruled line recognized from the image. , The outermost ruled line and the predetermined number of ruled lines of the first object are used to recognize the ruled line of the first object.

第4態様に係る情報処理装置は、第1態様又は第2態様に係る情報処理装置において、前記プロセッサは、前記仮想線と、前記画像から認識した罫線とを用いて、最外罫線を検出し、前記最外罫線内の等間隔に存在する交点を検出することで前記第1対象物の罫線を認識する。 The information processing device according to the fourth aspect is the information processing device according to the first aspect or the second aspect, and the processor detects the outermost ruled line by using the virtual line and the ruled line recognized from the image. , The ruled line of the first object is recognized by detecting the intersections existing at equal intervals in the outermost ruled line.

第5態様に係る情報処理装置は、第3態様又は第4態様に係る情報処理装置において、前記プロセッサは、前記最外罫線の4角の位置が、過去に検出した前記最外罫線の位置とずれている場合、前記仮想線と、前記画像から認識した罫線と、を用いて、前記画像上で前記第2対象物によって隠れている部分を含めて前記罫線を認識し、前記最外罫線の4角の位置が、過去に検出した前記最外罫線の位置とずれていない場合は、過去に認識した罫線を適用する。 The information processing apparatus according to the fifth aspect is the information processing apparatus according to the third aspect or the fourth aspect. When there is a deviation, the virtual line and the ruled line recognized from the image are used to recognize the ruled line including the portion hidden by the second object on the image, and the outermost ruled line is recognized. If the positions of the four corners do not deviate from the positions of the outermost ruled lines detected in the past, the ruled lines recognized in the past are applied.

第6態様に係る情報処理装置は、第1態様〜第5態様の何れか1の態様に係る情報処理装置において、前記プロセッサは、罫線上に前記第2対象物が配置されて罫線の少なくとも一部が隠れている部分を含む画像を取得する。 The information processing device according to the sixth aspect is the information processing device according to any one of the first to fifth aspects, in which the processor has the second object arranged on the ruled line and at least one of the ruled lines. Acquires an image including a part where the part is hidden.

第7態様に係る情報処理装置は、第1態様〜第5態様の何れか1の態様に係る情報処理装置において、前記プロセッサは、罫線間に前記第2対象物が配置されて画像上で罫線の少なくとも一部が隠れている部分を含む画像を取得する。 The information processing device according to the seventh aspect is the information processing device according to any one of the first to fifth aspects, and the processor has a ruled line on the image in which the second object is arranged between the ruled lines. Acquires an image containing at least a part of the hidden part.

第8態様に係る情報処理装置は、第1態様〜第7態様の何れか1の態様に係る情報処理装置において、前記プロセッサは、前記画像が前記第1対象物を任意の俯角から見た画像の場合、真上から見た画像に補正する処理を更に行う。 The information processing device according to the eighth aspect is the information processing device according to any one of the first to seventh aspects, and the processor is an image in which the image is an image of the first object viewed from an arbitrary depression angle. In the case of, the process of correcting the image viewed from directly above is further performed.

第9態様に係る情報処理プログラムは、コンピュータに、罫線を有する第1対象物上に第2対象物が配置されて、前記第2対象物によって罫線の少なくとも一部が隠れている画像を取得し、前記第2対象物の予め定めた中心範囲を通る仮想線と、前記画像から認識した罫線と、を用いて、前記画像上で前記第2対象物によって隠れている部分を含めて前記罫線を認識する処理を実行させる。 The information processing program according to the ninth aspect acquires an image in which a second object is arranged on a first object having a ruled line on a computer and at least a part of the ruled line is hidden by the second object. Using a virtual line passing through a predetermined center range of the second object and a ruled line recognized from the image, the ruled line including a portion hidden by the second object on the image is drawn. Execute the recognition process.

第1態様によれば、罫線が画像上で直接認識できない状況であっても罫線を正確に認識することが可能な情報処理装置を提供できる、という効果がある。 According to the first aspect, there is an effect that it is possible to provide an information processing device capable of accurately recognizing a ruled line even in a situation where the ruled line cannot be directly recognized on an image.

第2態様によれば、第2対象物で隠れた罫線を仮想線として検出することが可能となる。 According to the second aspect, it is possible to detect a ruled line hidden by the second object as a virtual line.

第3態様によれば、最外罫線及び最外罫線内の他の罫線を認識することが可能となる。 According to the third aspect, it is possible to recognize the outermost ruled line and other ruled lines in the outermost ruled line.

第4態様によれば、最外罫線及び最外罫線内の他の罫線を認識することが可能となる。 According to the fourth aspect, it is possible to recognize the outermost ruled line and other ruled lines in the outermost ruled line.

第5態様によれば、画像毎に、前記仮想線と、前記画像から認識した罫線と、を用いて、前記画像上で前記第2対象物によって隠れている部分を含めて前記罫線を認識する場合に比べて、罫線を認識する処理負荷を低減できる。 According to the fifth aspect, for each image, the imaginary line and the ruled line recognized from the image are used to recognize the ruled line including the portion hidden by the second object on the image. Compared with the case, the processing load for recognizing the ruled line can be reduced.

第6態様によれば、第2対象物が罫線上に配置されて罫線が隠れている場合であっても、罫線を認識することができる。 According to the sixth aspect, even when the second object is arranged on the ruled line and the ruled line is hidden, the ruled line can be recognized.

第7態様によれば、罫線間に第2対象物が配置されて罫線が画像上で隠れている場合であっても、罫線を認識することができる。 According to the seventh aspect, even when the second object is arranged between the ruled lines and the ruled lines are hidden on the image, the ruled lines can be recognized.

第8態様によれば、第1対象部を任意の俯角から撮影した画像であっても、真上から見た画像に変換することができる。 According to the eighth aspect, even an image of the first target portion taken from an arbitrary depression angle can be converted into an image viewed from directly above.

第9態様によれば、罫線が画像上で直接認識できない状況であっても罫線を正確に認識することが可能な情報処理プログラムを提供できる、という効果がある。 According to the ninth aspect, there is an effect that it is possible to provide an information processing program capable of accurately recognizing a ruled line even in a situation where the ruled line cannot be directly recognized on an image.

本実施形態に係る罫線認識装置の概略構成を示す図である。It is a figure which shows the schematic structure of the ruled line recognition apparatus which concerns on this embodiment. 本実施形態に係る罫線認識装置における情報処理装置の電気系の要部構成を示すブロック図である。It is a block diagram which shows the main part structure of the electric system of the information processing apparatus in the ruled line recognition apparatus which concerns on this embodiment. 本実施形態に係る情報処理装置の機能構成を示す機能ブロック図である。It is a functional block diagram which shows the functional structure of the information processing apparatus which concerns on this embodiment. 2値化手法などを使って、最外罫線を特定することで、罫線・交点を特定する従来手法を示す図である。It is a figure which shows the conventional method of specifying a ruled line / intersection by specifying the outermost ruled line by using the binarization method or the like. 直線検出、最外罫線検出、及び碁盤の罫線検出の一例を示す図である。It is a figure which shows an example of the straight line detection, the outermost ruled line detection, and the ruled line detection of a go board. 斜めから撮影した碁盤の罫線認識手法の一例を示す図である。It is a figure which shows an example of the ruled line recognition method of a go board photographed from an oblique direction. 仮想線の検出の一例を示す図である。It is a figure which shows an example of the detection of a virtual line. 本実施形態に係る情報処理装置において、棋譜を生成する際に碁盤の罫線を認識する処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the process which recognizes the ruled line of a go board at the time of generating a game record in the information processing apparatus which concerns on this embodiment. 本実施形態に係る情報処理装置において、棋譜を生成する際に碁盤の罫線を認識する処理の流れの変形例を示すフローチャートである。It is a flowchart which shows the modification of the flow of the process which recognizes the ruled line of a go board at the time of generating a game record in the information processing apparatus which concerns on this embodiment. 等間隔または等比間隔の線を特定する手法を帳票認識技術に応用する例を説明するための図である。It is a figure for demonstrating an example which applies the technique of specifying a geometric progression line or a geometric progression line to a form recognition technique.

以下、図面を参照して本発明の実施の形態の一例を詳細に説明する。図1は、本実施形態に係る罫線認識装置の概略構成を示す図である。 Hereinafter, an example of the embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a diagram showing a schematic configuration of a ruled line recognition device according to the present embodiment.

本実施形態に係る罫線認識装置10は、一例として、第1対象物としての碁盤16の罫線を認識して棋譜を生成する例を説明する。 As an example, the ruled line recognition device 10 according to the present embodiment will explain an example of recognizing the ruled line of the go board 16 as the first object and generating a game record.

罫線認識装置10は、碁盤16を撮影する撮影部12によって撮影された画像を情報処理装置14が取得し、情報処理装置14が、画像から碁盤16の罫線を認識する処理を行う。なお、情報処理装置14は、図1では、ノート型のパーソナルコンピュータとして示すが、これに限るものではなく、例えば、カメラを備えたスマートフォン等の携帯端末を適用してもよい。また、撮影部12は、スマートフォンのカメラを適用してもよい。 In the ruled line recognition device 10, the information processing device 14 acquires an image taken by the photographing unit 12 that shoots the go board 16, and the information processing device 14 performs a process of recognizing the ruled line of the go board 16 from the image. Although the information processing device 14 is shown as a notebook-type personal computer in FIG. 1, the information processing device 14 is not limited to this, and for example, a mobile terminal such as a smartphone equipped with a camera may be applied. Further, the camera of the smartphone may be applied to the photographing unit 12.

続いて、本実施形態に係る情報処理装置14の電気系の要部構成について説明する。図2は、本実施形態に係る罫線認識装置10における情報処理装置14の電気系の要部構成を示すブロック図である。 Subsequently, the configuration of a main part of the electrical system of the information processing device 14 according to the present embodiment will be described. FIG. 2 is a block diagram showing a main configuration of an electrical system of the information processing device 14 in the ruled line recognition device 10 according to the present embodiment.

本実施の形態に係る情報処理装置14は、図2に示すように、CPU(Central Processing Unit)14A、ROM(Read Only Memory)14B、RAM(Random Access Memory)14C、HDD(hard disk drive)14D、キーボード14E、ディスプレイ14F、及び通信回線I/F(インタフェース)部14Gを備えている。CPU14Aは、情報処理装置14の全体の動作を司る。ROM14Bは、各種制御プログラムや各種パラメータ等が予め記憶される。RAM14Cは、CPU14Aによる各種プログラムの実行時のワークエリア等として用いられる。HDD14Dは、各種のデータやアプリケーション・プログラム等が記憶される。キーボード14Eは各種の情報を入力するために用いられる。ディスプレイ14Fは、各種の情報を表示するために用いられる。通信回線I/F部14Gは、ネットワーク等の通信回線に接続可能され、当該通信回線に接続された他の装置と各種データの送受信を行う。以上の情報処理装置14の各部はシステムバス14Hにより電気的に相互に接続されている。なお、本実施の形態に係る情報処理装置14では、HDD14Dを記憶部として適用しているが、これに限らず、フラッシュメモリ等の他の不揮発性の記憶部を適用してもよい。 As shown in FIG. 2, the information processing device 14 according to the present embodiment has a CPU (Central Processing Unit) 14A, a ROM (Read Only Memory) 14B, a RAM (Random Access Memory) 14C, and an HDD (hard disk drive) 14D. , A keyboard 14E, a display 14F, and a communication line I / F (interface) unit 14G. The CPU 14A controls the overall operation of the information processing device 14. Various control programs, various parameters, and the like are stored in advance in the ROM 14B. The RAM 14C is used as a work area or the like when executing various programs by the CPU 14A. The HDD 14D stores various data, application programs, and the like. The keyboard 14E is used to input various information. The display 14F is used to display various kinds of information. The communication line I / F unit 14G is connectable to a communication line such as a network, and transmits / receives various data to / from other devices connected to the communication line. Each part of the above information processing apparatus 14 is electrically connected to each other by the system bus 14H. In the information processing apparatus 14 according to the present embodiment, the HDD 14D is applied as a storage unit, but the present invention is not limited to this, and another non-volatile storage unit such as a flash memory may be applied.

以上の構成により、本実施の形態に係る情報処理装置14は、CPU14Aにより、ROM14B、RAM14C、及びHDD14Dに対するアクセス、キーボード14Eを介した各種データの取得、ディスプレイ14Fに対する各種情報の表示を各々実行する。また、情報処理装置14は、CPU14Aにより、通信回線I/F部14Gを介した通信データの送受信の制御を実行する。 With the above configuration, the information processing apparatus 14 according to the present embodiment uses the CPU 14A to access the ROM 14B, the RAM 14C, and the HDD 14D, acquire various data via the keyboard 14E, and display various information on the display 14F. .. Further, the information processing device 14 executes control of transmission / reception of communication data via the communication line I / F unit 14G by the CPU 14A.

ここで、情報処理装置14のCPU14AがROM14Bに記憶されたプログラムを実行することにより実現される機能構成について説明する。図3は、本実施形態に係る情報処理装置14の機能構成を示す機能ブロック図である。 Here, the functional configuration realized by the CPU 14A of the information processing apparatus 14 executing the program stored in the ROM 14B will be described. FIG. 3 is a functional block diagram showing a functional configuration of the information processing apparatus 14 according to the present embodiment.

情報処理装置14は、画像取得部18、罫線認識部20、及び描画表示処理部36の機能を有する。 The information processing device 14 has the functions of an image acquisition unit 18, a ruled line recognition unit 20, and a drawing display processing unit 36.

画像取得部18は、撮影部12が罫線を有する碁盤16を撮影することによって得られる画像を撮影部12から取得する。 The image acquisition unit 18 acquires an image obtained by photographing the go board 16 having the ruled line by the photographing unit 12 from the photographing unit 12.

罫線認識部20は、画像取得部18が取得した画像から碁盤16の罫線を認識する処理を行う。背景によっては、碁盤と背景のコントラストが明確であり、2値化手法などを使って、図4に示すような従来手法で最外罫線を特定することで、罫線・交点を特定することができる。しかしながら、図4の課題に示すように、碁盤が置かれている背景の色によって、碁盤と背景のコントラストが不明確な場合には、従来手法では最外罫線を特定することができず。結果、罫線や交点を特定することができなくなる。そこで、本実施形態では、罫線認識部20は、罫線を有する碁盤16上に第2対象物としての碁石17が配置されて、碁石17によって罫線の少なくとも一部が隠れている部分を含む画像を取得し、碁石17の予め定めた中心範囲を通る仮想線と、画像から認識した罫線と、を用いて、画像上で碁石17によって隠れている部分を含めて罫線を認識する処理を行う。また、第2対象物が1つ(すなわち碁石が1つ)の場合は、当該第1対象物の予め定めた中心範囲を通る仮想線を検出しなくてもよく、第2対象物が2つ以上(すなわち碁石が2つ以上)の場合、当該仮想線を検出することにしてもよい。なお、罫線認識部20は、画像取得部18が取得した画像から碁石17を検出する処理も行ってもよい。 The ruled line recognition unit 20 performs a process of recognizing the ruled line of the go board 16 from the image acquired by the image acquisition unit 18. Depending on the background, the contrast between the board and the background is clear, and the ruled line / intersection can be specified by specifying the outermost ruled line by the conventional method as shown in FIG. 4 using a binarization method or the like. .. However, as shown in the problem of FIG. 4, when the contrast between the board and the background is unclear due to the color of the background on which the board is placed, the outermost ruled line cannot be specified by the conventional method. As a result, it becomes impossible to identify the ruled lines and intersections. Therefore, in the present embodiment, the ruled line recognition unit 20 displays an image including a portion in which a go stone 17 as a second object is arranged on a go board 16 having a ruled line and at least a part of the ruled line is hidden by the go stone 17. Using the virtual line that passes through the predetermined central range of the go stone 17 and the ruled line recognized from the image, a process of recognizing the ruled line including the portion hidden by the go stone 17 on the image is performed. Further, when there is one second object (that is, one go stone), it is not necessary to detect a virtual line passing through a predetermined center range of the first object, and there are two second objects. In the case of the above (that is, two or more go stones), the virtual line may be detected. The ruled line recognition unit 20 may also perform a process of detecting the go stone 17 from the image acquired by the image acquisition unit 18.

罫線認識部20は、図3に示すように、直線検出部22、最外罫線検出部24、台形補正部28、円形抽出部30、仮想線検出部32、及び碁盤罫線決定部34の機能を有する。 As shown in FIG. 3, the ruled line recognition unit 20 functions as a straight line detection unit 22, an outermost ruled line detection unit 24, a keystone correction unit 28, a circular extraction unit 30, a virtual line detection unit 32, and a go board ruled line determination unit 34. Have.

直線検出部22は、画像取得部18が取得した画像内に含まれる直線を全て検出する。例えば、Canny法とHough変換を使って、図5の上段に示すように、画像内の直線を全て検出する。すなわち、Canny法を用いて画像の輪郭部分を抽出する処理を行って、Hough変換によって直線を検出する処理を行うことで画像内の全ての直線を検出する。なお、図5では、碁盤16の真上から撮影した画像として示す。 The straight line detection unit 22 detects all straight lines included in the image acquired by the image acquisition unit 18. For example, using the Canny method and the Hough transform, all straight lines in the image are detected as shown in the upper part of FIG. That is, all the straight lines in the image are detected by performing the process of extracting the contour portion of the image using the Canny method and performing the process of detecting the straight lines by the Hough transform. Note that FIG. 5 shows an image taken from directly above the board 16.

最外罫線検出部24は、直線検出部22の検出結果から碁盤16の罫線のうち最外の罫線を検出する。例えば、図5の中段に示すように、検出した罫線の最も外側の罫線を検出する。具体的には、直線検出部22では、碁盤16の罫線以外の様々な線を認識してしまうため、その中から罫線を特定するために、X軸Y軸方向に走査する。そして、走査線と、検出した線との交点を見つけていき、その交点が、等間隔で連続n個(間隔は植木算方式なため、n=インプットした碁盤16のサイズで7路盤なら7個)存在した場合にその等間隔にならんだ交点のうち最も外側にある交点をつないだ線を最外罫線として特定する。ここで、碁盤を真上から撮影した画像の場合は、交点が等間隔で連続n個存在するかを特定すればよいが、碁盤を任意の俯角から撮影した場合は、遠近があるため等比数列を用いて、条件を満たす間隔の交点が連続n個存在するかで特定する(図6を参照)。なお、X軸及びY軸は碁盤16の枡目状の罫線各々に沿う方向の軸とする。 The outermost ruled line detecting unit 24 detects the outermost ruled line among the ruled lines of the go board 16 from the detection result of the straight line detecting unit 22. For example, as shown in the middle part of FIG. 5, the outermost ruled line of the detected ruled line is detected. Specifically, since the straight line detection unit 22 recognizes various lines other than the ruled lines of the go board 16, it scans in the X-axis and Y-axis directions in order to identify the ruled lines from among them. Then, the intersections of the scanning lines and the detected lines are found, and the number of consecutive intersections is n at equal intervals (since the interval is a planting calculation method, n = the size of the input go board 16 and 7 at 7 roadbeds). ) If it exists, the line connecting the outermost intersections among the intersections arranged at equal intervals is specified as the outermost ruled line. Here, in the case of an image of the Go board taken from directly above, it is sufficient to specify whether or not there are n consecutive intersections at equal intervals, but when the Go board is taken from an arbitrary depression angle, there is a geometric progression. Using a sequence, it is specified whether or not there are n consecutive intersections at intervals that satisfy the conditions (see FIG. 6). The X-axis and the Y-axis are axes in the directions along the grid-shaped ruled lines of the board 16.

台形補正部28は、図1に示すように、斜め上から撮影されている場合に、碁盤16が台形になっているため、真上から撮影した画像となるように補正する台形補正を行う。本実施形態では、台形補正を行うことで、碁盤16の枡目の台形が正方形に補正される。なお、撮影部12が、真上から撮影している場合には台形補正部28は省略する。また、台形補正は省略する形態としてもよい。 As shown in FIG. 1, the trapezoidal correction unit 28 performs keystone correction to correct the image taken from directly above because the board 16 is trapezoidal when the image is taken from diagonally above. In the present embodiment, by performing the keystone correction, the keystone of the grid 16 of the board 16 is corrected to a square shape. When the photographing unit 12 is photographing from directly above, the keystone correction unit 28 is omitted. Further, the keystone correction may be omitted.

円形抽出部30は、画像取得部18が取得した画像内に円形の物体があるか否かを判断して、円形の物体がある場合は円形抽出を行って碁石17を検出する。例えば、Hough変換で、円の半径を変えながら走査して円を抽出する。 The circular extraction unit 30 determines whether or not there is a circular object in the image acquired by the image acquisition unit 18, and if there is a circular object, performs circular extraction to detect the go stone 17. For example, in the Hough transform, a circle is extracted by scanning while changing the radius of the circle.

仮想線検出部32は、円形抽出部30によって抽出された円形物体の予め定めた中心範囲の一例としての中心座標を特定し、予め定めた閾値距離内に存在する、別の円形物体の中心座標同士を仮想線で結ぶことにより仮想線を検出する。本実施形態では、円形物体の中心の、XY軸方向におけるすぐ隣に、別の円形物体がある場合には、中心同士を仮想線で結ぶロジックとする。さらに具体的にいうと、画像上で1つの碁石17の中心を通るXY軸の線をつくって、それが、別の円形物体の領域を通ったと判定したら、その碁石17同士の中心同士を仮想線で結ぶ処理を行う。例えば、図7の点線で示すように、仮想線を検出する。 The virtual line detection unit 32 specifies the center coordinates as an example of the predetermined center range of the circular object extracted by the circular extraction unit 30, and the center coordinates of another circular object existing within the predetermined threshold distance. A virtual line is detected by connecting each other with a virtual line. In the present embodiment, if there is another circular object immediately next to the center of the circular object in the XY axis direction, the logic is used to connect the centers with a virtual line. More specifically, if an XY-axis line passing through the center of one go stone 17 is created on the image and it is determined that it has passed through the area of another circular object, the centers of the go stones 17 are virtualized. Perform the process of connecting with a line. For example, as shown by the dotted line in FIG. 7, a virtual line is detected.

碁盤罫線決定部34は、碁盤16が何路盤であるかを決定して、最外罫線検出部24によって検出された最外罫線内の枡目の罫線を決定する。例えば、ユーザに前もって碁盤16が何路盤かを特定するために罫線数を入力させる形態としてもよい。或いは、ユーザに碁盤16のサイズを入力させることなしに画像から自動でサイズを検知し、罫線数を決定してもよい。或いは、アプリケーションやサービス毎に予め定められた罫線数を決定してもよい。碁盤16の罫線の決定方法の一例としては、直線検出部22によって検出された直線、及び仮想線検出部32によって検出された仮想線に対して、最外罫線検出部24によって検出された最外罫線内についてXY軸方向に画像をスキャンして、等間隔、或いは等比間隔に存在する交点を検出することで枡目の罫線を決定してもよい。等間隔に存在する交点を検出する際には、ユーザによって予め入力された罫線数に応じた間隔の交点を検出してもよい。或いは、最外罫線検出部24によって検出された最外罫線内をユーザによって予め入力された罫線数で等分することにより、図5の下段に示すように、碁盤16の各罫線を決定してもよい。以下では、後者の例を説明する。なお、円形抽出部30によって円形物体が抽出された場合、仮想線検出部32によって検出された仮想線と、直線検出部22によって検出された直線とを用いて、最外罫線検出部24が最外罫線を検出して、碁盤罫線決定部34が碁盤16の罫線を決定する。罫線を特定した場合に、領域を碁盤の大きさに基づいて等分(例えば、9路盤の場合、特定した最外罫線を基準に9等分)し、交点座標を特定することができる(図6の4、5、6)。 The board ruled line determining unit 34 determines how many roadbeds the board 16 is, and determines the ruled lines of the squares in the outermost ruled line detected by the outermost ruled line detecting unit 24. For example, the user may be asked to input the number of ruled lines in advance in order to specify how many roads the board 16 is. Alternatively, the size may be automatically detected from the image and the number of ruled lines may be determined without having the user input the size of the board 16. Alternatively, a predetermined number of ruled lines may be determined for each application or service. As an example of the method of determining the ruled line of the go board 16, the outermost ruled line detection unit 24 detects the straight line detected by the straight line detection unit 22 and the virtual line detected by the virtual line detection unit 32. The ruled line of the grid may be determined by scanning the image in the XY axis direction in the ruled line and detecting the intersections existing at equal intervals or equal ratio intervals. When detecting the intersections existing at equal intervals, the intersections at intervals corresponding to the number of ruled lines input in advance by the user may be detected. Alternatively, as shown in the lower part of FIG. 5, each ruled line of the go board 16 is determined by equally dividing the inside of the outermost ruled line detected by the outermost ruled line detecting unit 24 by the number of ruled lines input in advance by the user. May be good. The latter example will be described below. When a circular object is extracted by the circular extraction unit 30, the outermost ruled line detection unit 24 uses the virtual line detected by the virtual line detection unit 32 and the straight line detected by the straight line detection unit 22. The outer ruled line is detected, and the go board ruled line determination unit 34 determines the ruled line of the go board 16. When the ruled line is specified, the area can be divided into equal parts based on the size of the board (for example, in the case of a 9-road board, it is divided into 9 equal parts based on the specified outermost ruled line), and the coordinates of the intersection can be specified (Fig.). 6-4, 5, 6).

また、罫線を決定し、交点座標を特定した後、碁石の色を認識する処理を行い、描画表示処理部36は、罫線認識部20の罫線認識結果から得られる碁盤16の画像と碁石17とを描画してディスプレイ14Fに表示する処理を行う。 Further, after determining the ruled line and specifying the intersection coordinates, a process of recognizing the color of the go stone is performed, and the drawing display processing unit 36 sets the image of the go board 16 and the go stone 17 obtained from the ruled line recognition result of the ruled line recognition unit 20. Is drawn and displayed on the display 14F.

続いて、上述のように構成された本実施形態に係る情報処理装置14で行われる具体的な処理について説明する。図8は、本実施形態に係る情報処理装置14において、棋譜を生成する際に碁盤16の罫線を認識する処理の流れの一例を示すフローチャートである。なお、図8の処理は、碁石17を検出する処理は省略し、罫線を認識する部分のみを抽出した処理として示す。 Subsequently, a specific process performed by the information processing apparatus 14 according to the present embodiment configured as described above will be described. FIG. 8 is a flowchart showing an example of a flow of processing for recognizing the ruled lines of the go board 16 when generating a game record in the information processing device 14 according to the present embodiment. The process of FIG. 8 omits the process of detecting the go stone 17, and shows it as a process of extracting only the portion that recognizes the ruled line.

ステップ100では、CPU14Aが、碁盤16の画像を取得してステップ102へ移行する。すなわち、画像取得部18が、罫線を有する碁盤16を撮影することによって得られる画像を撮影部12から取得する。 In step 100, the CPU 14A acquires an image of the board 16 and proceeds to step 102. That is, the image acquisition unit 18 acquires an image obtained by photographing the go board 16 having a ruled line from the photographing unit 12.

ステップ102では、CPU14Aが、取得した画像から直線を検出してステップ104へ移行する。すなわち、直線検出部22が、取得した画像内に含まれる直線を全て検出する。例えば、Canny法を用いて画像の輪郭部分を抽出する処理を行って、Hough変換によって直線を検出する処理を行うことで、図5の上段に示すように、画像内の全ての直線を検出する。 In step 102, the CPU 14A detects a straight line from the acquired image and proceeds to step 104. That is, the straight line detection unit 22 detects all the straight lines included in the acquired image. For example, by performing a process of extracting the contour portion of the image using the Canny method and performing a process of detecting straight lines by the Hough transform, all the straight lines in the image are detected as shown in the upper part of FIG. ..

ステップ104では、CPU14Aが、取得した画像から円形領域の検出を行ってステップ106へ移行する。すなわち、円形抽出部30が、画像取得部18が取得した画像内に円形の物体があるか否かを判断して、円形の物体がある場合は円形抽出を行って碁石17を検出する。例えば、Hough変換で、円の半径を変えながら走査して円を抽出する。 In step 104, the CPU 14A detects a circular region from the acquired image and proceeds to step 106. That is, the circular extraction unit 30 determines whether or not there is a circular object in the image acquired by the image acquisition unit 18, and if there is a circular object, performs circular extraction to detect the go stone 17. For example, in the Hough transform, a circle is extracted by scanning while changing the radius of the circle.

ステップ106では、CPU14Aが、円形領域があるか否かを判定する。該判定は、円形抽出部30によって円形領域が抽出されたか否かを判定し、該判定が否定された場合にはステップ108へ移行し、肯定された場合にはステップ110へ移行する。 In step 106, the CPU 14A determines whether or not there is a circular region. The determination determines whether or not the circular region has been extracted by the circular extraction unit 30, and if the determination is denied, the process proceeds to step 108, and if the determination is affirmative, the process proceeds to step 110.

ステップ108では、CPU14Aが、検出した直線から碁盤16の枠となる最外罫線を検出してステップ114へ移行する。すなわち、最外罫線検出部24が、図5の中段に示すように、直線検出部22の検出結果から碁盤16の罫線のうち最外の罫線を検出する。 In step 108, the CPU 14A detects the outermost ruled line that serves as the frame of the board 16 from the detected straight line, and proceeds to step 114. That is, as shown in the middle part of FIG. 5, the outermost ruled line detecting unit 24 detects the outermost ruled line among the ruled lines of the board 16 from the detection result of the straight line detecting unit 22.

一方、ステップ110では、CPU14Aが、仮想線を検出してステップ112へ移行する。すなわち、仮想線検出部32が、円形抽出部30によって抽出された円形領域の中心座標を特定し、予め定めた閾値距離内(例えば、抽出された円形領域から、罫線方向への上下左右の四方の方向への予め定めた距離内)に存在する、別の円形物体の中心座標同士を仮想線で結ぶことにより、図7の点線で示すような仮想線を検出する。 On the other hand, in step 110, the CPU 14A detects the virtual line and proceeds to step 112. That is, the virtual line detection unit 32 specifies the center coordinates of the circular region extracted by the circular extraction unit 30, and within a predetermined threshold distance (for example, from the extracted circular region, up, down, left, and right in the rule line direction). By connecting the center coordinates of another circular object existing (within a predetermined distance in the direction of) with a virtual line, a virtual line as shown by the dotted line in FIG. 7 is detected.

ステップ112では、CPU14Aが、検出した直線と仮想線を用いて最外罫線を検出してステップ114へ移行する。すなわち、最外罫線検出部24が、直線検出部22によって検出された直線と、仮想線検出部32によって検出された仮想線とを用いて、碁盤16の罫線のうち最外の罫線を検出する。 In step 112, the CPU 14A detects the outermost ruled line using the detected straight line and virtual line, and proceeds to step 114. That is, the outermost ruled line detecting unit 24 detects the outermost ruled line among the ruled lines of the go board 16 by using the straight line detected by the straight line detecting unit 22 and the virtual line detected by the virtual line detecting unit 32. ..

ステップ114では、CPU14Aが、罫線が検出された画像に対して台形補正を行ってステップ116へ移行する。すなわち、台形補正部28が、図1に示すように、斜め上から撮影されている場合に、碁盤16が台形になっているため、真上から撮影した画像となるように補正する台形補正を行う。なお、撮影部12が、真上から撮影している場合には当該ステップ114は省略する。 In step 114, the CPU 14A performs keystone correction on the image in which the ruled line is detected, and proceeds to step 116. That is, as shown in FIG. 1, when the trapezoidal correction unit 28 is photographed from diagonally above, the keystone 16 is trapezoidal, so that the keystone correction is performed so that the image is captured from directly above. conduct. If the photographing unit 12 is photographing from directly above, the step 114 is omitted.

ステップ116では、CPU14Aが、碁盤16の罫線を決定してステップ118へ移行する。すなわち、碁盤罫線決定部34が、最外罫線内をユーザによって予め入力された罫線数で等分することにより、図5の下段に示すように、碁盤16の各罫線を決定する。 In step 116, the CPU 14A determines the ruled line of the board 16 and proceeds to step 118. That is, the Go board ruled line determination unit 34 determines each ruled line of the Go board 16 as shown in the lower part of FIG. 5 by equally dividing the inside of the outermost ruled line by the number of ruled lines input in advance by the user.

ステップ118では、CPU14Aが、盤面描画表示を行ってステップ120へ移行する。すなわち、描画表示処理部36が、罫線認識部20の罫線認識結果から、交点座標を特定し、当該交点の位置に存在する碁石の色の認識結果を描画してディスプレイ14Fに表示する処理を行う。なお、罫線を含む碁盤16の画像を表示してもよい。 In step 118, the CPU 14A displays the drawing on the board and proceeds to step 120. That is, the drawing display processing unit 36 identifies the intersection coordinates from the ruled line recognition result of the ruled line recognition unit 20, draws the recognition result of the color of the go stone existing at the position of the intersection, and displays it on the display 14F. .. The image of the board 16 including the ruled lines may be displayed.

ステップ120では、CPU14Aが、罫線を認識する処理を終了するか否かを判定する。該判定は、例えば、ユーザによって終了を指示する操作がキーボード14E等によって行われたか否かを判定する。該判定が否定された場合にはステップ100に戻って上述の処理を繰り返し、判定が肯定されたところで一連の処理を終了する。 In step 120, the CPU 14A determines whether or not to end the process of recognizing the ruled line. The determination determines, for example, whether or not the operation instructing the end by the user is performed by the keyboard 14E or the like. If the determination is denied, the process returns to step 100 and the above-mentioned processing is repeated, and when the determination is affirmed, a series of processing is terminated.

続いて、本実施形態に係る情報処理装置14で行われる処理の変形例について説明する。図9は、本実施形態に係る情報処理装置14において、棋譜を生成する際に碁盤16の罫線を認識する処理の流れの変形例を示すフローチャートである。なお、図8と同一処理については同一符号を付して説明する。 Subsequently, a modified example of the processing performed by the information processing apparatus 14 according to the present embodiment will be described. FIG. 9 is a flowchart showing a modified example of the flow of processing for recognizing the ruled lines of the go board 16 when generating a game record in the information processing device 14 according to the present embodiment. The same processing as in FIG. 8 will be described with the same reference numerals.

ステップ100では、CPU14Aが、碁盤16の画像を取得してステップ102へ移行する。すなわち、画像取得部18が、罫線を有する碁盤16を撮影することによって得られる画像を撮影部12から取得する。 In step 100, the CPU 14A acquires an image of the board 16 and proceeds to step 102. That is, the image acquisition unit 18 acquires an image obtained by photographing the go board 16 having a ruled line from the photographing unit 12.

ステップ102では、CPU14Aが、取得した画像から直線を検出してステップ103へ移行する。すなわち、直線検出部22が、取得した画像内に含まれる直線を全て検出する。例えば、Canny法を用いて画像の輪郭部分を抽出する処理を行って、Hough変換によって直線を検出する処理を行うことで、図5の上段に示すように、画像内の全ての直線を検出する。 In step 102, the CPU 14A detects a straight line from the acquired image and proceeds to step 103. That is, the straight line detection unit 22 detects all the straight lines included in the acquired image. For example, by performing a process of extracting the contour portion of the image using the Canny method and performing a process of detecting straight lines by the Hough transform, all the straight lines in the image are detected as shown in the upper part of FIG. ..

ステップ103では、CPU14Aが、検出した直線から碁盤16の枠となる最外罫線を検出してステップ105へ移行する。すなわち、最外罫線検出部24が、図5の中段に示すように、直線検出部22の検出結果から碁盤16の罫線のうち最外の罫線を検出する。 In step 103, the CPU 14A detects the outermost ruled line that serves as the frame of the board 16 from the detected straight line, and proceeds to step 105. That is, as shown in the middle part of FIG. 5, the outermost ruled line detecting unit 24 detects the outermost ruled line among the ruled lines of the board 16 from the detection result of the straight line detecting unit 22.

ステップ105では、CPU14Aが、最外罫線の4角位置を検出済であるか否かを判定する。該判定は、後述するステップ117が既に行われて、4角位置が記憶されているか否かを判定する。該判定が肯定された場合にはステップ107へ移行し、否定された場合にはステップ114へ移行する。 In step 105, the CPU 14A determines whether or not the four corner positions of the outermost ruled line have been detected. In this determination, step 117, which will be described later, has already been performed to determine whether or not the four corner positions are stored. If the determination is affirmed, the process proceeds to step 107, and if the determination is negative, the process proceeds to step 114.

ステップ107では、CPU14Aが、最外罫線の4角の位置が移動しているか否かを判定する。該判定は、後述のステップ117において記憶された4角の位置に対して4角位置が移動しているか否かを判定する。該判定が肯定された場合には、最外罫線が碁石17によって隠れて検出されていない可能性があると判断してステップ109へ移行し、判定が否定された場合にはステップ111へ移行する。 In step 107, the CPU 14A determines whether or not the positions of the four corners of the outermost ruled line have moved. The determination determines whether or not the four-cornered position has moved with respect to the four-cornered position stored in step 117 described later. If the determination is affirmed, it is determined that the outermost ruled line may be hidden by the go stone 17 and may not be detected, and the process proceeds to step 109. If the determination is denied, the process proceeds to step 111. ..

ステップ109では、CPU14Aが、取得した画像から円形領域の検出を行ってステップ110へ移行する。すなわち、円形抽出部30が、画像取得部18が取得した画像内に円形の物体があるか否かを判断して、円形の物体がある場合は円形抽出を行って碁石17を検出する。例えば、Hough変換で、円の半径を変えながら走査して円を抽出する。 In step 109, the CPU 14A detects a circular region from the acquired image and proceeds to step 110. That is, the circular extraction unit 30 determines whether or not there is a circular object in the image acquired by the image acquisition unit 18, and if there is a circular object, performs circular extraction to detect the go stone 17. For example, in the Hough transform, a circle is extracted by scanning while changing the radius of the circle.

ステップ110では、CPU14Aが、仮想線を検出してステップ112へ移行する。すなわち、仮想線検出部32が、円形抽出部30によって抽出された円形領域の中心座標を特定し、予め定めた閾値距離内に存在する、別の円形物体の中心座標同士を仮想線で結ぶことにより、図7の点線で示すような仮想線を検出する。 In step 110, the CPU 14A detects the virtual line and proceeds to step 112. That is, the virtual line detection unit 32 specifies the center coordinates of the circular region extracted by the circular extraction unit 30, and connects the center coordinates of another circular object existing within a predetermined threshold distance with a virtual line. As a result, a virtual line as shown by the dotted line in FIG. 7 is detected.

ステップ112では、CPU14Aが、検出した直線と仮想線を用いて最外罫線を検出してステップ114へ移行する。すなわち、最外罫線検出部24が、直線検出部22によって検出された直線と、仮想線検出部32によって検出された仮想線とを用いて、碁盤16の罫線のうち最外の罫線を検出する。 In step 112, the CPU 14A detects the outermost ruled line using the detected straight line and virtual line, and proceeds to step 114. That is, the outermost ruled line detecting unit 24 detects the outermost ruled line among the ruled lines of the go board 16 by using the straight line detected by the straight line detecting unit 22 and the virtual line detected by the virtual line detecting unit 32. ..

ステップ114では、CPU14Aが、罫線が検出された画像に対して台形補正を行ってステップ116へ移行する。すなわち、台形補正部28が、図1に示すように、斜め上から撮影されている場合に、碁盤16が台形になっているため、真上から撮影した画像となるように補正する台形補正を行う。なお、撮影部12が、真上から撮影している場合には当該ステップ114は省略する。 In step 114, the CPU 14A performs keystone correction on the image in which the ruled line is detected, and proceeds to step 116. That is, as shown in FIG. 1, when the trapezoidal correction unit 28 is photographed from diagonally above, the keystone 16 is trapezoidal, so that the keystone correction is performed so that the image is captured from directly above. conduct. If the photographing unit 12 is photographing from directly above, the step 114 is omitted.

ステップ116では、CPU14Aが、碁盤16の罫線を決定してステップ117へ移行する。すなわち、碁盤罫線決定部34が、最外罫線内をユーザによって予め入力された罫線数で等分することにより、図5の下段に示すように、碁盤16の各罫線を決定する。 In step 116, the CPU 14A determines the ruled line of the board 16 and proceeds to step 117. That is, the Go board ruled line determination unit 34 determines each ruled line of the Go board 16 as shown in the lower part of FIG. 5 by equally dividing the inside of the outermost ruled line by the number of ruled lines input in advance by the user.

ステップ117では、CPU14Aが、最外罫線の4角の位置を更新してステップ118へ移行する。 In step 117, the CPU 14A updates the positions of the four corners of the outermost ruled line and proceeds to step 118.

ステップ118では、CPU14Aが、盤面描画表示を行ってステップ120へ移行する。すなわち、描画表示処理部36が、罫線認識部20の罫線認識結果から交点座標を特定し、当該交点上に存在する碁石の石の認識結果を表示する。なお、罫線を含む碁盤16の画像を描画してディスプレイ14Fに表示する処理を行ってもよい。 In step 118, the CPU 14A displays the drawing on the board and proceeds to step 120. That is, the drawing display processing unit 36 specifies the intersection coordinates from the ruled line recognition result of the ruled line recognition unit 20, and displays the recognition result of the go stones existing on the intersection. It should be noted that the process of drawing the image of the board 16 including the ruled lines and displaying it on the display 14F may be performed.

ステップ120では、CPU14Aが、罫線を認識する処理を終了するか否かを判定する。該判定は、例えば、ユーザによって終了を指示する操作がキーボード14E等によって行われたか否かを判定する。該判定が否定された場合にはステップ100に戻って上述の処理を繰り返し、判定が肯定されたところで一連の処理を終了する。 In step 120, the CPU 14A determines whether or not to end the process of recognizing the ruled line. The determination determines, for example, whether or not the operation instructing the end by the user is performed by the keyboard 14E or the like. If the determination is denied, the process returns to step 100 and the above-mentioned processing is repeated, and when the determination is affirmed, a series of processing is terminated.

一方、ステップ111では、CPU14Aが、前回決定の罫線を適用してステップ118へ移行し、前回決定の罫線を含む碁盤16の画像を描画してステップ120へ移行する。 On the other hand, in step 111, the CPU 14A applies the previously determined ruled line and proceeds to step 118, draws an image of the board 16 including the previously determined ruled line, and proceeds to step 120.

このように、変形例では、最外罫線の4角の位置を記憶して、碁盤16の罫線の決定に用いることで、罫線を認識する処理負荷が軽減される。 As described above, in the modified example, the processing load for recognizing the ruled line is reduced by storing the positions of the four corners of the outermost ruled line and using it for determining the ruled line of the go board 16.

なお、上記の実施形態では、罫線上に碁石17が配置される碁盤16の罫線を認識する例を一例として説明したが、罫線の認識は碁盤16に限定されるものではない。例えば、罫線間に駒が配置される将棋や罫線間に石が配置されるリバーシ等の罫線間に駒や石が配置されて画像上で罫線の少なくとも一部が隠れている部分を含む画像となる他の盤上遊戯の罫線などを認識する形態に適用してもよいし、盤上遊戯に限らず、何らかの線やマークの上に対象物が存在している画像から、隠れた線やマークを認識できる形態(例えば第1対象物である、道路上に、第2対象物である車両が複数台並んだ状態で、上から撮影し、車両の下に隠れた道路上の交通標識や線を特定する技術)に適用してもよい。 In the above embodiment, an example of recognizing the ruled line of the go board 16 in which the go stone 17 is arranged on the ruled line has been described as an example, but the recognition of the ruled line is not limited to the go board 16. For example, with an image including a part where pieces and stones are arranged between ruled lines such as shogi where pieces are arranged between ruled lines and reversi where stones are arranged between ruled lines and at least a part of the ruled lines is hidden on the image. It may be applied to a form that recognizes the ruled lines of other board games, and is not limited to board games, but hidden lines and marks from images in which an object exists on some line or mark. A form that can recognize (for example, a traffic sign or line on the road hidden under the vehicle, taken from above with a plurality of vehicles of the second object lined up on the road, which is the first object. It may be applied to the technique for identifying the above.

また、上記の実施形態では、最外罫線を検出して台形補正を行ってから碁盤16の罫線を決定する順に処理を行う例を説明したが、処理順はこれに限定されるものではない。例えば、最外罫線を決定して碁盤16の罫線を決定した後に、最後に台形補正を行う順としてもよい。 Further, in the above embodiment, an example has been described in which the outermost ruled line is detected, keystone correction is performed, and then the processing is performed in the order in which the ruled line of the go board 16 is determined, but the processing order is not limited to this. For example, the outermost ruled line may be determined, the ruled line of the board 16 may be determined, and then the keystone correction may be performed at the end.

また、本実施形態で説明した、碁盤16の画像をX軸、Y軸方向に走査し、等間隔または等比間隔の線を特定する手法は、碁盤16に限るものではなく、図10に示すように帳票を認識する技術に応用してもよい。具体的には、帳票は、帳票の種別毎にXY方向の罫線数や罫線間比率が決まっているため、罫線間の距離の比率で帳票の種別を判断してもよい。例えば、真上ではなく、任意の俯角からスマートフォンなどで帳票等を読み取った場合や文字認識がし難い場合であっても、帳票をX軸、Y軸方向に走査することで、罫線を特定し、特定された罫線間の距離の比率を特定することで、帳票の種別が特定される。例えば、図10に示すように、帳票を斜め上から撮影した画像を、X軸方向に走査すると、縦方向の罫線の間隔が6つ特定され、その間隔の比率が1:4:7:2:6であるとする。その情報をもとに、帳票種別データベースと照合し、当該帳票が、出生届であることが特定される。 Further, the method described in the present embodiment for scanning the image of the go board 16 in the X-axis and Y-axis directions and specifying the lines at equal intervals or equal ratio intervals is not limited to the go board 16, and is shown in FIG. It may be applied to the technique of recognizing a form as described above. Specifically, since the number of ruled lines in the XY direction and the ratio between ruled lines are determined for each type of form, the type of form may be determined by the ratio of the distance between the ruled lines. For example, even if the form is read from an arbitrary depression angle with a smartphone, etc., or the characters are difficult to recognize, the ruled line can be specified by scanning the form in the X-axis and Y-axis directions. , The type of form is specified by specifying the ratio of the distances between the specified ruled lines. For example, as shown in FIG. 10, when an image of a form taken from diagonally above is scanned in the X-axis direction, six vertical ruled line intervals are specified, and the ratio of the intervals is 1: 4: 7: 2. : It is assumed that it is 6. Based on the information, it is collated with the form type database, and it is specified that the form is a birth certificate.

また、上記の実施形態において、CPUをプロセッサの一例として説明したが、プロセッサとは広義的なプロセッサを指し、汎用的なプロセッサ(例えばCPU等)や、専用のプロセッサ(例えばGPU: Graphics Processing Unit、ASIC: Application Specific Integrated Circuit、FPGA: Field Programmable Gate Array、プログラマブル論理デバイス等)を含むものである。 Further, in the above embodiment, the CPU has been described as an example of a processor, but the processor refers to a processor in a broad sense, and is a general-purpose processor (for example, CPU) or a dedicated processor (for example, GPU: Graphics Processing Unit, etc.). ASIC: Application Specific Integrated Circuit, FPGA: Field Programmable Gate Array, programmable logic device, etc.).

また、上記の実施形態におけるプロセッサの動作は、1つのプロセッサによって成すのみでなく、物理的に離れた位置に存在する複数のプロセッサが協働して成すものであってもよい。また、プロセッサの各動作の順序は上記各実施形態において記載した順序のみに限定されるものではなく、適宜変更してもよい。 Further, the operation of the processor in the above embodiment may be performed not only by one processor but also by a plurality of processors existing at physically separated positions in cooperation with each other. Further, the order of each operation of the processor is not limited to the order described in each of the above embodiments, and may be changed as appropriate.

また、上記の実施形態に係る情報処理装置14で行われる処理は、ソフトウエアで行われる処理としてもよいし、ハードウエアで行われる処理としてもよいし、双方を組み合わせた処理としてもよい。また、情報処理装置14で行われる処理は、プログラムとして記憶媒体に記憶して流通させるようにしてもよい。 Further, the process performed by the information processing apparatus 14 according to the above embodiment may be a process performed by software, a process performed by hardware, or a combination of both. Further, the processing performed by the information processing apparatus 14 may be stored as a program in a storage medium and distributed.

また、本発明は、上記に限定されるものでなく、上記以外にも、その主旨を逸脱しない範囲内において種々変形して実施可能であることは勿論である。 Further, the present invention is not limited to the above, and it goes without saying that the present invention can be variously modified and implemented within a range not deviating from the gist thereof.

10 罫線認識装置
12 撮影部
14 情報処理装置
14A CPU
16 碁盤
17 碁石
10 Ruled line recognition device 12 Imaging unit 14 Information processing device 14A CPU
16 Go board 17 Go stone

Claims (9)

プロセッサを備え、前記プロセッサは、
罫線を有する第1対象物上に第2対象物が配置されて、前記第2対象物によって罫線の少なくとも一部が隠れている画像を取得し、
前記第2対象物の予め定めた中心範囲を通る仮想線と、前記画像から認識した罫線と、を用いて、前記画像上で前記第2対象物によって隠れている部分を含めて前記罫線を認識する処理を行う情報処理装置。
A processor is provided, and the processor is
An image in which a second object is arranged on a first object having a ruled line and at least a part of the ruled line is hidden by the second object is acquired.
Using a virtual line passing through a predetermined center range of the second object and a ruled line recognized from the image, the ruled line is recognized including a portion hidden by the second object on the image. An information processing device that performs processing.
前記仮想線は、前記第2対象物の予め定めた中心範囲に対して、予め定めた閾値距離内に存在する、別の前記第2対象物の前記中心範囲同士を結んだ線である請求項1に記載の情報処理装置。 The virtual line is a line connecting the central ranges of another second object that exist within a predetermined threshold distance with respect to the predetermined center range of the second object. The information processing apparatus according to 1. 前記プロセッサは、前記仮想線と、前記画像から認識した罫線とを用いて、最外罫線を検出し、前記最外罫線と、前記第1対象物の予め定めた罫線数とを用いて、前記第1対象物の罫線を認識する請求項1又は請求項2に記載の情報処理装置。 The processor detects the outermost ruled line by using the virtual line and the ruled line recognized from the image, and uses the outermost ruled line and a predetermined number of ruled lines of the first object. The information processing device according to claim 1 or 2, which recognizes the ruled lines of the first object. 前記プロセッサは、前記仮想線と、前記画像から認識した罫線とを用いて、最外罫線を検出し、前記最外罫線内の等間隔に存在する交点を検出することで前記第1対象物の罫線を認識する請求項1又は請求項2に記載の情報処理装置。 The processor detects the outermost ruled line using the virtual line and the ruled line recognized from the image, and detects intersections existing at equal intervals in the outermost ruled line to detect the first object. The information processing device according to claim 1 or 2, which recognizes a ruled line. 前記プロセッサは、
前記最外罫線の4角の位置が、過去に検出した前記最外罫線の位置とずれている場合、前記仮想線と、前記画像から認識した罫線と、を用いて、前記画像上で前記第2対象物によって隠れている部分を含めて前記罫線を認識し、
前記最外罫線の4角の位置が、過去に検出した前記最外罫線の位置とずれていない場合は、過去に認識した罫線を適用する請求項3又は請求項4に記載の情報処理装置。
The processor
When the positions of the four corners of the outermost ruled line deviate from the positions of the outermost ruled line detected in the past, the virtual line and the ruled line recognized from the image are used to make the first ruled line on the image. 2 Recognize the ruled line including the part hidden by the object,
The information processing apparatus according to claim 3 or 4, wherein when the positions of the four corners of the outermost ruled line do not deviate from the positions of the outermost ruled line detected in the past, the ruled line recognized in the past is applied.
前記プロセッサは、罫線上に前記第2対象物が配置されて罫線の少なくとも一部が隠れている部分を含む画像を取得する請求項1〜5の何れか1項に記載の情報処理装置。 The information processing device according to any one of claims 1 to 5, wherein the processor acquires an image including a portion in which the second object is arranged on a ruled line and at least a part of the ruled line is hidden. 前記プロセッサは、罫線間に前記第2対象物が配置されて画像上で罫線の少なくとも一部が隠れている部分を含む画像を取得する請求項1〜5の何れか1項に記載の情報処理装置。 The information processing according to any one of claims 1 to 5, wherein the processor acquires an image including a portion in which the second object is arranged between the ruled lines and at least a part of the ruled lines is hidden on the image. Device. 前記プロセッサは、前記画像が前記第1対象物を任意の俯角から見た画像の場合、真上から見た画像に補正する処理を更に行う請求項1〜7の何れか1項に記載の情報処理装置。 The information according to any one of claims 1 to 7, wherein when the image is an image of the first object viewed from an arbitrary depression angle, the processor further performs a process of correcting the image to be viewed from directly above. Processing equipment. コンピュータに、
罫線を有する第1対象物上に第2対象物が配置されて、前記第2対象物によって罫線の少なくとも一部が隠れている画像を取得し、
前記第2対象物の予め定めた中心範囲を通る仮想線と、前記画像から認識した罫線と、を用いて、前記画像上で前記第2対象物によって隠れている部分を含めて前記罫線を認識する処理を実行させるための情報処理プログラム。
On the computer
An image in which a second object is arranged on a first object having a ruled line and at least a part of the ruled line is hidden by the second object is acquired.
Using a virtual line passing through a predetermined center range of the second object and a ruled line recognized from the image, the ruled line is recognized including a portion hidden by the second object on the image. An information processing program for executing the processing to be performed.
JP2020071892A 2020-04-13 2020-04-13 Information processing apparatus and information processing program Pending JP2021168088A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020071892A JP2021168088A (en) 2020-04-13 2020-04-13 Information processing apparatus and information processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020071892A JP2021168088A (en) 2020-04-13 2020-04-13 Information processing apparatus and information processing program

Publications (1)

Publication Number Publication Date
JP2021168088A true JP2021168088A (en) 2021-10-21

Family

ID=78079936

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020071892A Pending JP2021168088A (en) 2020-04-13 2020-04-13 Information processing apparatus and information processing program

Country Status (1)

Country Link
JP (1) JP2021168088A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023178920A1 (en) * 2022-03-23 2023-09-28 上海商汤智能科技有限公司 Chess placement method and apparatus, electronic device, chess playing robot, storage medium, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023178920A1 (en) * 2022-03-23 2023-09-28 上海商汤智能科技有限公司 Chess placement method and apparatus, electronic device, chess playing robot, storage medium, and program

Similar Documents

Publication Publication Date Title
US9443294B2 (en) Image correction system, image correction method, and computer program product
JP5699788B2 (en) Screen area detection method and system
CN110490839B (en) Method and device for detecting damaged area in expressway and computer equipment
CN108090486B (en) Image processing method and device in billiard game
CN108334879B (en) Region extraction method, system and terminal equipment
CN108074237B (en) Image definition detection method and device, storage medium and electronic equipment
CN105046213A (en) Method for augmenting reality
JP6343648B2 (en) Circle detection method, circle detection apparatus, program, and storage medium
CN111309203B (en) Method and device for acquiring positioning information of mouse cursor
US10095940B2 (en) Image processing apparatus, image processing method and non-transitory computer readable medium
JP5654801B2 (en) Image measuring apparatus and image measuring method
JP2021168088A (en) Information processing apparatus and information processing program
JP5111055B2 (en) Image processing apparatus, image processing method, and computer program
CN112419207A (en) Image correction method, device and system
JP6530432B2 (en) Image processing apparatus, image processing method and program
JP2018092354A (en) Object detection apparatus and method for detecting objects
CN114596248A (en) Image inspection apparatus, storage medium, and image inspection method
WO2024012463A1 (en) Positioning method and apparatus
JP7435191B2 (en) Information processing device and information processing program
CN109600598B (en) Image processing method, image processing device and computer readable recording medium
CN113393506B (en) Image registration method and related device and equipment
JP2013254242A (en) Image recognition device, image recognition method, and image recognition program
CN104615357A (en) Terminal
CN113870190A (en) Vertical line detection method, device, equipment and storage medium
JP2013026839A (en) Image processing program and image processing device