Update server for the slightly modified alignment API.

This commit is contained in:
Brandon Amos 2015-12-11 10:21:01 -05:00
parent 0e99d0c499
commit ec7650cf73
1 changed files with 3 additions and 3 deletions

View File

@ -274,9 +274,9 @@ class OpenFaceServerProtocol(WebSocketServerProtocol):
bbs = [bb] if bb is not None else [] bbs = [bb] if bb is not None else []
for bb in bbs: for bb in bbs:
# print(len(bbs)) # print(len(bbs))
alignPoints = align.align(rgbFrame, bb) landmarks = align.align(rgbFrame, bb)
alignedFace = align.alignImg("affine", 96, rgbFrame, bb, alignedFace = align.alignImg("affine", 96, rgbFrame, bb,
alignPoints=alignPoints) landmarks=landmarks)
if alignedFace is None: if alignedFace is None:
continue continue
@ -319,7 +319,7 @@ class OpenFaceServerProtocol(WebSocketServerProtocol):
cv2.rectangle(annotatedFrame, bl, tr, color=(153, 255, 204), cv2.rectangle(annotatedFrame, bl, tr, color=(153, 255, 204),
thickness=3) thickness=3)
for p in [39, 42, 57]: for p in [39, 42, 57]:
cv2.circle(annotatedFrame, center=alignPoints[p], radius=3, cv2.circle(annotatedFrame, center=landmarks[p], radius=3,
color=(102, 204, 255), thickness=-1) color=(102, 204, 255), thickness=-1)
if identity == -1: if identity == -1:
if len(self.people) == 1: if len(self.people) == 1: