img1=cv2.imread('1.jpg',1) cv2.imshow(img1)
时间: 2023-10-14 17:10:06 浏览: 65
cvvImage的两个文件
5星 · 资源好评率100%
There is a mistake in the syntax of the code. The `imshow` function requires two parameters - the name of the window to display the image in and the image itself. Here is the correct code:
```
import cv2
img1 = cv2.imread('1.jpg', 1)
cv2.imshow('Image', img1)
cv2.waitKey(0)
cv2.destroyAllWindows()
```
This code will display the image in a window titled "Image" and wait for a key press before closing the window.
阅读全文