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 <[email protected]>
  • Loading branch information
RyanHir and glenn-jocher authored Jun 24, 2022
1 parent 724d5b2 commit 19f33cb
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 19f33cb

Please sign in to comment.