Skip to content

Commit

Permalink
Bug fix: wrong parameter for threshold.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brunno Vanelli committed Jan 10, 2019
1 parent 31874a9 commit a5a47f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ros-world-from-image-generator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def isWallinList(walls, new_wall):

def main(file, output, resolution, wall):
im_raw = cv2.imread(file, cv2.IMREAD_GRAYSCALE)
ret, im = cv2.threshold(im_raw,254,255,cv2.THRESH_BINARY)
ret, im = cv2.threshold(im_raw,1,255,cv2.THRESH_BINARY)
height, width = im.shape

walls = list()
Expand Down Expand Up @@ -179,4 +179,4 @@ def main(file, output, resolution, wall):
main(args.file[0], args.output, args.resolution, args.wall)
end = time.time()

print("Done in {} seconds".format(end - start))
print("Done in {} seconds".format(end - start))

0 comments on commit a5a47f9

Please sign in to comment.