Refactoring

This commit is contained in:
Si11ium 2020-04-08 12:04:04 +02:00
parent c7971c063f
commit 25c0e8e358
17 changed files with 0 additions and 21 deletions

View File

@ -1,21 +0,0 @@
from PIL import ImageDraw
from PIL import Image
import numpy as np
def are_homotopic(map_array, trajectory, other_trajectory):
polyline = trajectory.vertices.copy()
polyline.extend(reversed(other_trajectory.vertices))
height, width = map_array.shape
img = Image.new('L', (height, width), 0)
ImageDraw.Draw(img).polygon(polyline, outline=1, fill=1)
a = (np.array(img) * map_array).sum()
if a >= 1:
return False
else:
return True

0
objects/__init__.py Normal file
View File