Java based Chess Board Scanner, which converts 2D chess board image into a machine readable format a.k.a. Forsyth–Edwards Notation (FEN). It uses OpenCV and Deeplearning4j frameworks, complemented with some proprietary algorithms implemented for realizing the goal. It currently supports the chess board and pieces sets of the most common online chess platforms chess.com and lichess.org.

Overview

Overview

This project aims to demonstrate how to extract the chess position in a machine readable format called Forsyth–Edwards Notation (FEN) having the 2D picture of the board. Initially it supports chess.com and lichess.org images, although the architecture is extensible and different chess boards could be added as well. It uses OpenCV as a computer vision library and Deeplearning4j as a basis for convolutional networks for chess board classification.

Running the program

The project structure is an eclipse based project, which can be directly imported into the Eclipse IDE. All necessary libraries for Deeplearning4j are included into the libs folder, but you need to add the OpenCV library version 4.5.1 (java and native parts) and refer them from the project as described here: https://opencv-java-tutorials.readthedocs.io/en/latest/01-installing-opencv-for-java.html

The basic main class is bagaturchess.scanner.patterns.AllMain

Directions for further development

  • Improve board corners detection, besides the currently used algorithms: findChessBoardCorners by build-in function, findChessBoardCorners by Hough lines and findChessBoardCorners by contours.
  • Add additional popular online chess sites, which can be recognized by the program, like for example chess24.com
  • Extend the solution to work with chess diagrams drawn on paper, this will save a lot of positions from old books in computer format.

If you would like to contribute to the project, do not hesitate to contact me.

Android Application

The code is used productively by this app, which could be found here: https://play.google.com/store/apps/details?id=com.chessboardscanner

Credits

This project would not be possible without:

Do you like the project?

You could give it a star by clicking 'Star' button placed top-right of the page. This will rank better the project and will allow other people to easily find it out on github.

Author

The author of the project is Krasimir Topchiyski.

Owner
Krasimir Topchiyski
Krasimir Topchiyski
Java interface to OpenCV, FFmpeg, and more

JavaCV Commercial support: Introduction JavaCV uses wrappers from the JavaCPP Presets of commonly used libraries by researchers in the field of comput

Bytedeco 4.9k Mar 12, 2021
图片/GIF/音频/点选验证码生成工具,可以自定义图片尺寸,字体,颜色,干扰项等等。

简介 captcha是一个图片/点选/音频验证码生成工具库。 1.调用ImageCaptchaUtil中的方法来生成验证码图片信息,支持返回图片byte[],base64字符串和base64Data字符串。可设置干扰线类型来生成不同干扰类型的验证码图片。可已自定义图片背景颜色,图片宽度高度,字体,字

牛长清 19 Mar 12, 2021
TwelveMonkeys ImageIO: Additional plug-ins and extensions for Java's ImageIO

About TwelveMonkeys ImageIO is a collection of plugins and extensions for Java's ImageIO. These plugins extend the number of image file formats suppor

Harald Kuhr 1.2k Mar 12, 2021
Simple Java image-scaling library implementing Chris Campbell's incremental scaling algorithm as well as Java2D's "best-practices" image-scaling techniques.

imgscalr - Java Image-Scaling Library http://www.thebuzzmedia.com/software/imgscalr-java-image-scaling-library/ Changelog --------- 4.2 * Added sup

Riyad Kalla 1.1k Mar 11, 2021
Roman Beskrovnyi 145 Mar 6, 2021
Fast computer vision library for SFM, calibration, fiducials, tracking, image processing, and more.

Table of Contents Introduction Cloning Repository Quick Start Gradle and Maven Building from Source Dependencies Help/Contact Introduction BoofCV is a

Peter Abeles 705 Mar 11, 2021
ZXing ("Zebra Crossing") barcode scanning library for Java, Android

Project in Maintenance Mode Only The project is in maintenance mode, meaning, changes are driven by contributed patches. Only bug fixes and minor enha

ZXing Project 27.3k Mar 13, 2021
Diagrams as code is a term used for storing the source of a diagram image as a text file.

Diagrams as code Diagrams as code is a term used for storing the source of a diagram image as a text file. Examples are architecture diagrams, or diag

null 14 May 7, 2021
Thumbnailator - a thumbnail generation library for Java

March 11, 2021: Thumbnailator 0.4.14 has been released! See Changes for details. Thumbnailator is now available through Maven! What is Thumbnailator?

Chris Kroells 3.5k Mar 13, 2021
Traditional roguelike game with pixel-art graphics and simple interface

Traditional roguelike game with pixel-art graphics and simple interface

Evan Debenham 1k Apr 5, 2021
Java JNA wrapper for Tesseract OCR API

Tess4J A Java JNA wrapper for Tesseract OCR API. Tess4J is released and distributed under the Apache License, v2.0. Features The library provides opti

Quan Nguyen 973 Mar 9, 2021
Open source Picture to text, text to Picture app

Pic SMS App Pic SMS is a free open source app. With Pic SMS, you can: convert pictures into text parts and send as SMS convert text parts into a pictu

Kaung Khant Kyaw 11 Apr 3, 2021
必应每日超清壁纸(4K)

Bing Wallpaper Today: Lençóis Maranhenses National Park in the state of Maranhão, Brazil (© WIN-Initiative/Getty Images) 2021-04-03 download 4k 2021-0

null 158 Apr 2, 2021