Android OpenCV Find Largest Square or Rectangle

后端 未结 3 887
盖世英雄少女心
盖世英雄少女心 2020-12-02 16:14

This might have been answered but I desperately need an answer for this. I want to find the largest square or rectangle in an image using OpenCV in Android. All of the solut

3条回答
  •  囚心锁ツ
    2020-12-02 16:43

    After canny

    1- you need to reduce noises with gaussian blur and find all the contours

    2- find and list all the contours' areas.

    3- the largest contour will be nothing but the painting.

    4- now use perpective transformation to transform your shape to a rectangle.

    check sudoku solver examples to see the similar processing problem. (largest contour + perspective)

提交回复
热议问题