(rect)
| 30 | FACIAL_LANDMARKS_IDXS = FACIAL_LANDMARKS_68_IDXS |
| 31 | |
| 32 | def rect_to_bb(rect): |
| 33 | # take a bounding predicted by dlib and convert it |
| 34 | # to the format (x, y, w, h) as we would normally do |
| 35 | # with OpenCV |
| 36 | x = rect.left() |
| 37 | y = rect.top() |
| 38 | w = rect.right() - x |
| 39 | h = rect.bottom() - y |
| 40 | |
| 41 | # return a tuple of (x, y, w, h) |
| 42 | return (x, y, w, h) |
| 43 | |
| 44 | def shape_to_np(shape, dtype="int"): |
| 45 | # initialize the list of (x, y)-coordinates |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…