edges = cv2.Canny(main_image,50,200) edges_rgb = cv2.cvtColor(edges, cv2.COLOR_GRAY2RGB) dst = cv2.addWeighted(main_image,1.0,edges_rgb,0.5,0) cv2.imshow('DST Window', dst)