Skip to content

Commit

Permalink
proper handling of crop param (fixes #208)
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeblackshear committed Sep 21, 2020
1 parent b35cc01 commit 309c0dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detect_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def best(camera_name, label):
best_object = object_processor.get_best(camera_name, label)
best_frame = best_object.get('frame', np.zeros((720,1280,3), np.uint8))

crop = bool(request.args.get('crop', 0))
crop = bool(request.args.get('crop', 0, type=int))
if crop:
region = best_object.get('region', [0,0,300,300])
best_frame = best_frame[region[1]:region[3], region[0]:region[2]]
Expand Down

0 comments on commit 309c0dc

Please sign in to comment.