validation written

This commit is contained in:
Si11ium
2020-03-09 17:17:43 +01:00
parent e7ccfb7947
commit 4ae333fe5d
5 changed files with 133 additions and 24 deletions

View File

@ -146,6 +146,7 @@ class Map(object):
img = Image.new('L', (self.height, self.width), 0)
draw = ImageDraw.Draw(img)
draw.polygon(polyline, outline=self.white, fill=self.white)
a = (np.where(np.asarray(img) == self.white, 1, 0) * np.where(self.as_2d_array == self.black, 1, 0)).sum()