stream_hacks to main #2
|
@ -71,8 +71,9 @@ class Landmarks(Type):
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def draw(self, image, canvas, color=(255, 255, 255), label=True):
|
def draw(self, image, canvas, color=(255, 255, 255), label=True, filter=None):
|
||||||
for i, (x, y, z) in enumerate(point.project_to_image(image) for point in self.points):
|
points = self[filter] if filter else self.points
|
||||||
|
for i, (x, y, z) in enumerate(point.project_to_image(image) for point in points):
|
||||||
if x > image.width or x < 0 or y > image.height or y < 0:
|
if x > image.width or x < 0 or y > image.height or y < 0:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue