diff options
| author | Adam Harvey <adam@ahprojects.com> | 2019-01-07 18:49:09 +0100 |
|---|---|---|
| committer | Adam Harvey <adam@ahprojects.com> | 2019-01-07 18:49:09 +0100 |
| commit | c67a3c23190287f747989e5dc7725e1657edf8f1 (patch) | |
| tree | 5ff47ab72e6fb146f66730db06fc3b91265dd769 /megapixels/app/utils | |
| parent | 55b9734d131a197166156566d1b999a8bb59169b (diff) | |
add age, gender, emotion stubs
Diffstat (limited to 'megapixels/app/utils')
| -rw-r--r-- | megapixels/app/utils/draw_utils.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/megapixels/app/utils/draw_utils.py b/megapixels/app/utils/draw_utils.py index 47bb7978..cafac5a5 100644 --- a/megapixels/app/utils/draw_utils.py +++ b/megapixels/app/utils/draw_utils.py @@ -34,12 +34,18 @@ def draw_bbox(im, bbox, color=(0,255,0), stroke_weight=2): def draw_pose(im, pt_nose, image_pts): '''Draws 3-axis pose over image - ''' + ''' cv.line(im, pt_nose, tuple(image_pts['pitch'].ravel()), pose_types['pitch'], 3) cv.line(im, pt_nose, tuple(image_pts['yaw'].ravel()), pose_types['yaw'], 3) cv.line(im, pt_nose, tuple(image_pts['roll'].ravel()), pose_types['roll'], 3) +def draw_text(im, pt, text, color=(0,255,0)): + '''Draws degrees as text over image + ''' + cv.putText(im, text, pt, cv.FONT_HERSHEY_SIMPLEX, 0.5, color, thickness=2, lineType=2) + + def draw_degrees(im, pose_data, color=(0,255,0)): '''Draws degrees as text over image ''' |
