Thanks for the effort of trying this out. I would like to share that I am also working on right now with getting the wire pixels by trying to get the horizontal row of pixels (in the vertical center of the image).
I have tried using this code:
rows =image.shape[0]
middle_row =image[rows//2]
midrow =cv2.resize(middle_row,(600,360))
cv2.imshow("MidRow", midrow)
and this is the output:
This is the code of my entire work for the canny edge detection btw.
import cv2
image= cv2.imread('Template.jpg')
gray= cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
gray = cv2.GaussianBlur(gray, (5,5),0)
_, bin = cv2.threshold(gray,120,255,1)
bin = cv2.dilate(bin, None)
bin = cv2.dilate(bin, None)
bin = cv2.erode(bin, None)
bin = cv2.erode(bin, None)
edges= cv2.Canny(gray, 50,200)
cv2.imshow("Image", original_image)
cv2.imshow("Grayscale", gray)
cv2.imshow("Edges", edges)