OpenCV different approach on detecting go board

前端 未结 2 1784
孤独总比滥情好
孤独总比滥情好 2021-02-10 00:20

i am working on an Android app that will recognize a GO board and create a SGF file of it.

i made a version that is able to detect a board and warp the perspective to ma

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-10 01:03

    Assuming that you don't want to "force" your end user to take a cleanest pictures (like using an overlay like some of the QR code scanner for example)

    Perhaps you could use some morphological transformations with differents kernels :

    • Opening and closing with a rectangular kernel for the lines
    • Opening and closing with an ellipse kernel to get the stones (it should be possible to invert the image at some point to get back the white or the black one)

    Take a look at http://docs.opencv.org/2.4/doc/tutorials/imgproc/opening_closing_hats/opening_closing_hats.html (sorry this one is in C++ but I think this is almost the same in Java)

    I had try these operations to remove a grid from a Sudoku to avoid noise in cell extraction and it worked like a charm.

    Let me know of these informations were usefull for you (this is for sure a very interesting case)

提交回复
热议问题