OpenCV 4.5.3(日本語機械翻訳)
samples/cpp/squares.cpp

A program using pyramid scaling, Canny, contours and contour simplification to find squares in a list of images (pic1-6.png). Returns sequence of squares detected on the image.