Allow preview resize in detect.py (#8318)
* Initial implementation of --viewsz * use mouse resize * Add comment Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
724d5b21b7
commit
19f33cbae2
|
|
@ -173,6 +173,7 @@ def run(
|
||||||
# Stream results
|
# Stream results
|
||||||
im0 = annotator.result()
|
im0 = annotator.result()
|
||||||
if view_img:
|
if view_img:
|
||||||
|
cv2.namedWindow(str(p), cv2.WINDOW_NORMAL | cv2.WINDOW_KEEPRATIO) # allow window resize (Linux)
|
||||||
cv2.imshow(str(p), im0)
|
cv2.imshow(str(p), im0)
|
||||||
cv2.waitKey(1) # 1 millisecond
|
cv2.waitKey(1) # 1 millisecond
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue