Forums

Convert png/image file to .pgn or FEN

Sort:
bamboosky2012

Hello all chess.com players Cool

There are many softwares/websites which can create a chess diagram when we input a pgn file or FEN .

So are there any software which loads the image of chess diagram which may be in .png/.gif/.jpeg format and generate pgn or FEN.

The reason i need this is that i had extracted all the diagrams from palliser as image files ,setting them on the board on fritz/winboard is time consuming.

Please let me know if anyone understand what i am asking for. .

rooperi

I understand what you're asking, and I would be extremely surprised if it was possible. You'll need some type of OCR software that can read diagrams

[edit] it would be really cool, though....

Shivsky

There were a few abandoned open-source projects out there (google for them) that attempted this.

bamboosky2012

@Shivsky Hope you name a few i couldn't find anyFrown

k_kostov

What are those diagrams you've extracted?

LikeTheLake

Hey bamboosky.  I doubt what you want is possible at all.  However there is a freeware that may help a lot in the transposition to pgn/FEN.  The code it is called Diagram Transfer (DT) and currently is on version 3.0.1.  DT helps you to put a semi transparent board on your pdf and copy the position by draging the pieces to proper position, it is straight forward but involves your dedication for each diagram you want.  The link follows.  Good luck.

http://alain.blaisot.free.fr/DiagTransfer/English/home.htm

DenkePositiv

Sorry, but I don't think that there exists such a software.

There are so many different boardtypes and piecesets that it would be very difficult for a programm to recognize them all and transfer it to a FEN.

Even if a programm would recognize the pieces and could bring them in the FEN, the task is almost impossible, because a FEN also stores other information (Who can still castle where? Who is the player to move? Is there a pawn which can be taken by e.p.?).

rooperi
MichaelBuhler wrote:

Sorry, but I don't think that there exists such a software.

There are so many different boardtypes and piecesets that it would be very difficult for a programm to recognize them all and transfer it to a FEN.

Even if a programm would recognize the pieces and could bring them in the FEN, the task is almost impossible, because a FEN also stores other information (Who can still castle where? Who is the player to move? Is there a pawn which can be taken by e.p.?).

Good point.

Shivsky

This guy started something ...

http://codebazaar.blogspot.com/2011/08/chess-board-recognition-project-part-1.html

Also look at :

http://www.chess.com/download/view/chess-scan-intelligent-08

bamboosky2012

It is obsolete,Writing FEN manually is atleast 4x faster than this program.

Shivsky

I think this is a fun + challenging project to work on especially with mobile devices ... though as the previous posts indicate,  Player-to-move, Castling +En Passant status would still be a manual entry operation before committing to FEN or PGN.  Though the actual scan + analyze + piece-placement on squares alone would be a really big time-saver.

arjun71

When ever try Download the result. I get a mail in png format. I don't know how to view this file.... any help pls.... Arjun.G

euler54

Oui ça existe :

http://www.youtube.com/watch?v=H6NuOqUrV2M

But you'll need an android device.

Gilles

NanaKlinton

HI there

I want to convert some image.But it is difficult for me to do that.I want to know that if there is a powerful image converter which supports to convert png image directly.Thanks for any suggestions.

x-9729437520

If there is still interest in this I could easily make it..

jelos98

The website for this no longer exists, but Archive.org still has Chess Scan: 

http://web.archive.org/web/20071123041757/http://www.fairychess.com/ChessScan.html

I wind up having to tell it 3-4 pieces per board (it prompts you if it's unsure) - but I can rip through 10 board configurations in a minute or so - I don't think you'll be manually writing FENs that fast.

MrEdCollins
ZeeSteen wrote:

If there is still interest in this I could easily make it..

Go for it.  Chess is played by millions of people, all over the globe.  Tens of thousands of webpages exist that are chess related, or have chess diagrams.  There will always be an interest for something like this.

(I think you will discover it's not quite as easy as you think.)

PearlFey

Getting it to work with a couple boards and pieces would be simple. Making it work with every piece or board would be difficult, I'd make a website where users can define and submit boards or images for analysis.

Much too big a time sink, though.

x-9729437520
MrEdCollins wrote:
ZeeSteen wrote:

If there is still interest in this I could easily make it..

Go for it.  Chess is played by millions of people, all over the globe.  Tens of thousands of webpages exist that are chess related, or have chess diagrams.  There will always be an interest for something like this.

(I think you will discover it's not quite as easy as you think.)

I might give this project a try after my exames, already created the GIT repo for it with my buddy ^_^.

I don't think it will be necesarily "hard", it'll rather be tedious work to code it. It would be self learning. In the beginning it would need user input, telling them what pieces are what on the board, the pieces would be extracted from the squares and saved as a set in a database. 

In the first stage we'd stick to digital images (screenshots), this would probably be quite easy. 

Then making it work for photographs (ofcourse with the expectation that the quality of the picture is adequate, no pictures taken preferably out of an anngle, with the board rotated and the page of the book itself curled too much :p), where we'd try to idea the board and go from there with, an existing ofcourse, sub-image recognition library.. This ofcourse would be harder for pictures taken from books as they won't exactly match the libraries, so I'd probably use something like MSE to determine the closest matches, this might be more computationally intensive though (maybe too much) so if people have like a set of 100 pictures of the same set (same book) we could start by showing us a couple of pieces on the first image.

Something like that would probably work :D

fredm73

I put some links to various programs in 

https://docs.google.com/document/d/1W__MfTKrRTZsjEWZUPcFZ_2EdFYKBRstBf7wS-iwlvQ/edit