Yolov5 更改识别窗口大小

启动yolov5时,会因为像素太大导致占据整个桌面,这样非常影响使用和操作,我们可以通过opencv中的resize函数来修改识别窗口的像素大小,这样操作就方便多了。
原代码中

yolov5

通过修改cv2.resizeWindow(str( P ),500,320)中的(500,320)并不能控制识别窗口大小

在这里,我们将cv2.resizeWindow(str( P ),500,320)替换成

im0=cv2.resize(im0,(480,480),interpolation=cv2.INTER_CUBIC)

通过修改(480,480)可以调整窗口的长宽。

猜你喜欢

转载自blog.csdn.net/weixin_50060664/article/details/123783489