Skip to content

Commit

Permalink
Allow preview resize in detect.py (ultralytics#8318)
Browse files Browse the repository at this point in the history
* Initial implementation of --viewsz

* use mouse resize

* Add comment

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
2 people authored and Clay Januhowski committed Sep 8, 2022
1 parent 10ab864 commit f76354a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def run(
# Stream results
im0 = annotator.result()
if view_img:
cv2.namedWindow(str(p), cv2.WINDOW_NORMAL | cv2.WINDOW_KEEPRATIO) # allow window resize (Linux)
cv2.imshow(str(p), im0)
cv2.waitKey(1) # 1 millisecond

Expand Down

0 comments on commit f76354a

Please sign in to comment.