我正在尝试将原始(480,640,3)中的帧图像阵列调整为(224,224,3),但是我使用了 CV_CAP_PROP_FRAME_WIDTH,CV_CAP_PROP_FRAME_HEIGHT,仅更改屏幕在屏幕上显示的大小。 我的代码在这里!
# Original path - wouldn't work
path = "c:\location\directory"
# Raw string - would work
path = r"c:\location\directory"
# Double slashes - would work
path = "c:\\location\\directory"
# Forward slashes - would work
path = "c:/location/directory"
答案 0 :(得分:0)
您可以在while循环中添加以下代码,
frame = cv2.resize(frame,(224,224))
print(frame.shape)