tag:blogger.com,1999:blog-8927794127513218467.post3694979386560666072..comments2023-05-26T18:26:32.709+02:00Comments on Code Bazaar: Chessboard picture recognition project - part 1Matt Buchnerhttp://www.blogger.com/profile/03993705703169676412noreply@blogger.comBlogger31125tag:blogger.com,1999:blog-8927794127513218467.post-78837371823522655692022-04-04T05:37:03.929+02:002022-04-04T05:37:03.929+02:00This comment has been removed by a blog administrator.jahmeyrachelshttps://www.blogger.com/profile/13031467329005591461noreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-20201099736510920842016-12-14T22:19:17.352+01:002016-12-14T22:19:17.352+01:00Did this project ever succeed?Did this project ever succeed?Willie the Coyotehttps://www.blogger.com/profile/13307607212022742217noreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-2144484966841405522016-05-20T06:02:40.344+02:002016-05-20T06:02:40.344+02:00This is so... appropriated for one of my current p...This is so... appropriated for one of my current projects. I'd really like to use the chess pictures for the theory in the report, but I don't know how to reference the source because it's not a "scientific paper". Why reports formats are so restrictive :c Cristianhttps://www.blogger.com/profile/09181731479845638351noreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-8784176089124025572016-03-16T11:58:00.373+01:002016-03-16T11:58:00.373+01:00it is a reminder that our stories are designed to ...it is a reminder that our stories are designed to intersect with the stories of the Bible. <a href="https://wadeprogram.com/" rel="nofollow">speech recognition software</a>Anna Schaferhttps://www.blogger.com/profile/09633259957714692411noreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-76154363883424170952016-02-03T17:00:50.771+01:002016-02-03T17:00:50.771+01:00@Nathan, Great idea! And it gives me an excuse to ...@Nathan, Great idea! And it gives me an excuse to buy an XBOX :pMatt Buchnerhttps://www.blogger.com/profile/03993705703169676412noreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-42310188129484865822016-02-03T15:57:01.573+01:002016-02-03T15:57:01.573+01:00I am interested in creating this app as well. Mayb...I am interested in creating this app as well. Maybe implementing a kinect would be helpful. Or stickers with qr codes to put on top of each piece. nathanhttps://www.blogger.com/profile/13091529597456944452noreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-2715628963909452702014-04-16T15:33:04.504+02:002014-04-16T15:33:04.504+02:00Hi,
I would like to have a look at your code and m...Hi,<br />I would like to have a look at your code and maybe use it for a small project. would that be possible?<br />thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-1230009148365403792014-01-20T21:39:56.781+01:002014-01-20T21:39:56.781+01:00Determining the height of the pieces should be suf...Determining the height of the pieces should be sufficient to determine which they are ....Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-70614483406347865112013-12-23T19:13:01.402+01:002013-12-23T19:13:01.402+01:00This comment has been removed by the author.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-68376535689648717452013-12-23T19:12:36.642+01:002013-12-23T19:12:36.642+01:00You could implement manual tagging (detect squares...You could implement manual tagging (detect squares with peices, highlight square and ask the user what the peice is, users say what square is what peice) store all manual tagging in a database remotely and implement a "best-guess" algorithm later.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-63416265080928881772012-10-15T20:04:37.283+02:002012-10-15T20:04:37.283+02:00Cool idea ... scan a whole chessboard to import it...Cool idea ... scan a whole chessboard to import it into a modern smartphone for quick analysis. well - i am a programmer with strange ideas sometime but graphic coding is not my genre ;)<br /><br />but i would really be interested in something like this so let me know ;)Anonymoushttps://www.blogger.com/profile/07195350191573770680noreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-9205814557587448202012-01-28T15:32:16.092+01:002012-01-28T15:32:16.092+01:00Just in case you are looking for the same thing as...Just in case you are looking for the same thing as GeneM, he found was he was looking for here: <br />http://www.chess.com/download/view/chess-scan-intelligent-08Matt Buchnerhttps://www.blogger.com/profile/03993705703169676412noreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-80240608713928817142012-01-09T05:34:32.866+01:002012-01-09T05:34:32.866+01:00I am looking for an OCR tool for standard chess di...I am looking for an OCR tool for standard chess diagrams in chess books, to generate a FEN, or better a PGN with FEN.<br /><br />Ideal would be app for Android phone. But any PC tool that could extract from .JPG would be great too.<br /><br />Ideally the tool could "learn" from being given a diagram from book X along with the matching FEN, and from there it could do reliable matching.<br /><br />** Know of any such tool? **<br /><br />Email: GeneM @t CastleLong .comAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-82167441124644560752011-08-11T17:08:15.560+02:002011-08-11T17:08:15.560+02:00My friend Moises suggested I could use the Google ...My friend Moises suggested I could use the Google image search to build a collection of pieces from different chessboards. This is a great idea! http://www.google.com/search?tbm=isch&q=chess+pieces&oq=chess+piecesMatt Buchnerhttps://www.blogger.com/profile/03993705703169676412noreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-23887429693407486792011-08-06T00:39:52.638+02:002011-08-06T00:39:52.638+02:00@Anonymous you are right! I posted that a bit too...@Anonymous you are right! I posted that a bit too fast, I was just thinking of a quick example on how to leverage the game rules, but hey no excuses, you are totally right, although a contrived case, my example is still wrong :) - thanks for the note.Sebhttp://www.dealuv.comnoreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-74574377529007985732011-08-05T16:49:58.681+02:002011-08-05T16:49:58.681+02:00Interesting project! Couple thoughts:
- depending ...Interesting project! Couple thoughts:<br />- depending on which chess piece it is, the color of the piece should also be known as well. This is because an available move may be a capture of an opponent's piece. <br />- to identify chess pieces, my thought would be to take a snapshot at the start of the game that you can use to identify the pieces. Given the variety of chess board/piece design out there, this would give the closest image for comparisons possible.mayzynoreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-83278647373581403162011-08-05T15:35:50.208+02:002011-08-05T15:35:50.208+02:00This is a great start - inspires me to pick up an ...This is a great start - inspires me to pick up an old project, similar but applying this to a Scrabble board. Apologies, I can't offer any advice further to the rest on this thread, but if I do go back to the Scrabble project I'll be sure to drop you a line with any of my experiences.Tim Ileshttp://timiles.comnoreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-53374053498649553472011-08-05T15:10:25.245+02:002011-08-05T15:10:25.245+02:00Couple of suggestions:
You should be able to sepa...Couple of suggestions:<br /><br />You should be able to separate pawns from pieces based on the size of the base. You can also likely identify the knights by the fact that their snout will break the circle of the base.<br /><br />Since the shape of chess pieces varies from set to set, you might need to show the user each piece and have them identify it, then you could abstract a few key characteristics (harder than it sounds, I'm sure) and use them to identify the pieces in the future.<br /><br />Cool project, good luck!Jarrodnoreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-43085620685346329472011-08-05T08:12:08.350+02:002011-08-05T08:12:08.350+02:00Half jokingly - upload the image to Amazon Mechani...Half jokingly - upload the image to Amazon Mechanical Turk and have the midgets in the machine figure out which piece is on which square. Half serious - no really, upload multiple images with pieces in a variety of locations to AMT, then use a neural net to analyze the responses you get back from the midgets.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-66647495292167837552011-08-05T08:09:50.319+02:002011-08-05T08:09:50.319+02:00@Seb: You can have 2 bishops of the same player on...@Seb: You can have 2 bishops of the same player on the same color after a pawn promotion :) (ok, I admit it is a VERY contrieved example, but the rules don't forbit it)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-38188578647980001572011-08-05T05:42:06.945+02:002011-08-05T05:42:06.945+02:00From my computer vision experience it's going ...From my computer vision experience it's going to be really hard to detect the individual pieces from an image like the ones you're working from. Have you considered using something like the Kinect (and maybe MIT's PCL) to help? The addition of depth information might make the problem easier -- but I understand that it's probably not in the spirit of what you're doing.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-57858569728133498272011-08-05T05:07:49.214+02:002011-08-05T05:07:49.214+02:00@Lee Thanks for all your feedback.
If the picture...@Lee Thanks for all your feedback.<br /><br />If the picture is taken from above, all pieces will occupy only one square on the picture but I am not sure the program will be able to determine the height of the pieces.<br /><br />If the picture is taken from the side, it will be easier to determine the piece height but the pieces will be covering several squares and it will bring other problems. <br /><br />A collection of picture or video may be a solution.Matt Buchnerhttps://www.blogger.com/profile/03993705703169676412noreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-57173558031773381922011-08-05T04:45:50.282+02:002011-08-05T04:45:50.282+02:00@Anon: Actually the chessboard is oriented correct...@Anon: Actually the chessboard is oriented correctly, because the pieces are advancing left and right.<br /><br />The next step would be to identify this orientation based on corner colors of the board. This could be helped by the placement of pawns, at least until the endgame.<br /><br />The next step would be to identify the kings, the only pieces guaranteed on the board. Look for cross shapes at the top, and after normalizing the angle of view to always look at the board from a standard angle (I don't know which is the best). The kings are expected to be the tallest pieces except possibly queens.<br />The pawns are the shortest and should be identifiable as such, but the challenge is to deal with pawns obstructed in view.<br /><br />The squares that pieces are on can be identified by following the contiguous color of the pieces down to the board and then taking the color of the square to be the color of the majority of pixels bordering the piece, with a cutoff determined by averaging across all pieces or squares.<br /><br />The knights can be recognized by measuring the concavity of the pieces, since they have the most concave shape of all pieces.<br /><br />The bishops, queens, and rooks are the hardest to identify, but might be determined by a combination of height and the shape of the width of the piece from the top to the middle of each piece, with bishops being pointy (going from small to medium width), queens being taller and wider with a more sudden drop in width, and rooks with a more uniform width.Lee Killoughhttps://www.blogger.com/profile/07314728289631647757noreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-28766671560651577562011-08-05T04:43:08.869+02:002011-08-05T04:43:08.869+02:00This comment has been removed by the author.Lee Killoughhttps://www.blogger.com/profile/07314728289631647757noreply@blogger.comtag:blogger.com,1999:blog-8927794127513218467.post-7776156261156905942011-08-05T04:39:52.328+02:002011-08-05T04:39:52.328+02:00@Seb Thanks for the ideas. I will look into it.
@...@Seb Thanks for the ideas. I will look into it.<br /><br />@Twain I really haven't look at the next steps. The two student papers I reference in the post may be giving me some ideas.<br /><br />@Anonymous I took the picture some the side, not from the player point of view. Locating the white square at corner of the board will help the program to find the chessboard orientation.<br /><br />@Jeff Thanks for the leaving this comment. I did not know about OpenCV. Do you have some source code to share?Matt Buchnerhttps://www.blogger.com/profile/03993705703169676412noreply@blogger.com