Ryan Hirasaki glenn-jocher commited on
Commit
19f33cb
1 Parent(s): 724d5b2

Allow preview resize in detect.py (#8318)

Browse files

* Initial implementation of --viewsz

* use mouse resize

* Add comment

Co-authored-by: Glenn Jocher <[email protected]>

Files changed (1) hide show
  1. detect.py +1 -0
detect.py CHANGED
@@ -173,6 +173,7 @@ def run(
173
  # Stream results
174
  im0 = annotator.result()
175
  if view_img:
 
176
  cv2.imshow(str(p), im0)
177
  cv2.waitKey(1) # 1 millisecond
178
 
 
173
  # Stream results
174
  im0 = annotator.result()
175
  if view_img:
176
+ cv2.namedWindow(str(p), cv2.WINDOW_NORMAL | cv2.WINDOW_KEEPRATIO) # allow window resize (Linux)
177
  cv2.imshow(str(p), im0)
178
  cv2.waitKey(1) # 1 millisecond
179