MCPcopy
hub / github.com/ageitgey/face_recognition / _rect_to_css

Function _rect_to_css

face_recognition/api.py:29–36  ·  view source on GitHub ↗

Convert a dlib 'rect' object to a plain tuple in (top, right, bottom, left) order :param rect: a dlib 'rect' object :return: a plain tuple representation of the rect in (top, right, bottom, left) order

(rect)

Source from the content-addressed store, hash-verified

27
28
29def _rect_to_css(rect):
30 """
31 Convert a dlib 'rect' object to a plain tuple in (top, right, bottom, left) order
32
33 :param rect: a dlib 'rect' object
34 :return: a plain tuple representation of the rect in (top, right, bottom, left) order
35 """
36 return rect.top(), rect.right(), rect.bottom(), rect.left()
37
38
39def _css_to_rect(css):

Callers 2

face_locationsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected