My goal is separate web pages into parts (header, contacts, footer,...) with OpenCV Python. I converted the image of the web page to grayscale and used Canny. Here's the result:
As you can see, the border of the parts are very clear with the human eyes to detect, and I think this problem is little for OpenCV, but I can't figure out how to export each part into a separate file (or at least get the lines' coordinates).
Here's my current code for Grayscale + Canny
import cv2
import numpy as np
img = cv2.imread("image.png",cv2.IMREAD_GRAYSCALE)
edges = cv2.Canny(img, 5, 10)