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.

You might also like...

Custom Image Server for use with ShareX

rImageServer How to use: Normal Instalation: Download .jar Start: javar -jar [filename].jar Edit: imageserver.propierties Check if web works - Go to

May 21, 2022

Luban—Image compression with efficiency very close to WeChat Moments

Luban—Image compression with efficiency very close to WeChat Moments

Luban—Image compression with efficiency very close to WeChat Moments

Dec 29, 2022

Usign ascii characters, recreate an image following a local path

CMDImage Usign ascii characters, recreate an image following a local path README El código toma una imagen desde una ruta local para convertirlo en ca

Aug 30, 2022

A Java Visualization Library based on Apache ECharts.

A Java Visualization Library based on Apache ECharts.

ECharts Java "We bring better visualization into Java with ECharts" 📙 Introduction ECharts Java is a lightweight but comprehensive library for Java d

Dec 31, 2022

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

Jan 5, 2023

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

Dec 28, 2022

Thumbnailator - a thumbnail generation library for Java

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?

Jan 5, 2023

ZXing ("Zebra Crossing") barcode scanning library for Java, Android

ZXing (

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

Jan 4, 2023

Java library for remapper JARs

Pocolifo's JAR Remapper Making remapping JARs easy, organized, and painless Features Remapping Class remapping Method remapping Field remapping Parame

Oct 2, 2022
Owner
Krasimir Topchiyski
Krasimir Topchiyski
Pixeed is an javafx, opencv based photo editing software which is enriched with functionalities listed below.

⭐⭐⭐⭐First Runner Up: ⭐⭐⭐⭐ The only team to dare to take upon themselves the task to make an image editor from scratch. Although it might not be a match for its ubiquitous contemporaries, it has all its basic features covered and easily accessible for even a new user.

Viraj 4 Apr 11, 2022
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 6.4k Jan 4, 2023
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 Jan 5, 2023
Roman Beskrovnyi 250 Jan 9, 2023
Pw0 Framewrok - magical android pentest app 🔮! Pixie Dust, Handshakes, Deauth, Nmap, Port scanner and more!

Pw0 Framework Pw0 Framewrok - magical android pentest app ?? ! Features: Pixie Dust Handshakes Deauth Nmap Port scanner and more! Version: 0.2 Beta Au

Huntmix 17 Sep 27, 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 916 Jan 6, 2023
A well-designed local image and video selector for Android

Matisse Matisse is a well-designed local image and video selector for Android. You can Use it in Activity or Fragment Select images including JPEG, PN

Zhihu 12.4k Dec 29, 2022
Provide image storage and access services.

Provide image storage and access services.

shiyq 2 Jan 23, 2022
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 26 Nov 21, 2022