#invertovanie binary image aby boli prekazky biele

import cv2


image = cv2.imread('cleaned_skeleton_ROADS_robot.pgm',0)
for i in range(len(image)):
    for j in range(len(image[i])):
        if(image[i][j]!=0):
            image[i][j]=1

cv2.imwrite('cleaned_skeleton_ROADS_robot.pgm', image)

