How to detect squares in an image with OpenCV Back

  • use the algorithm provided by karlphillip, which has been integrated in LightOpenCV

Useage

  • Image Class has provided the method detectSquare, and print the detected line on the image when giving a boolean value true.
/* new an instance for Image */
Image img = Image();

/* read the image which is to be detected by giving the path */
img.readImage(imagePath);

/* DEBUG is an marco parameter */
img.detectSquare(DEBUG);

/* show the image */
img.showImage();

results matching ""

    No results matching ""