abs when thresholding raster for manhattanization

This commit is contained in:
Jan Petykiewicz 2017-10-15 11:42:12 -07:00
parent 83d163a102
commit b3f99ee123

View File

@ -249,7 +249,7 @@ class Shape(metaclass=ABCMeta):
numpy.where(keep_y)[0][0])
rastered = float_raster.raster((polygon.vertices + polygon.offset).T, gx, gy)
binary_rastered = (rastered >= 0.5)
binary_rastered = (numpy.abs(rastered) >= 0.5)
supersampled = binary_rastered.repeat(2, axis=0).repeat(2, axis=1)
contours = skimage.measure.find_contours(supersampled, 0.5)