import cv2
img = cv2.imread("test.png")
winname = "test"
cv2.namedWindow(winname) # create a named window
cv2.moveWindow(winname, 40, 30) # Move it to (40, 30)
cv2.imshow(winname, img)
cv2.waitKey()
cv2.destroyAllWindows()
cv2.imshow(img_name, img)를 이용해서 cv2를 이용해 이미지를 보여주는데, 이미지가 너무 커서 띄워진 이미지가 화면에서 잘리거나, 아니면 원하는 위치에 이미지가 뜨지 않아 확인하기 불편할 때가 있다.
이럴때는 위의 방법을 이용하며 ㄴ된다.
cv2.imshow image window placement is outside of viewable screen
I am running Anaconda install of python35 with cv2 install from menpo. I am having trouble with cv2.imshow() inconsistently placing the image window outside of the viewable screen when running code
stackoverflow.com
'Programming Language > Python' 카테고리의 다른 글
Python에서 파일 읽기, 쓰기 (0) | 2020.01.21 |
---|---|
conda environment - CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. (0) | 2020.01.02 |
python dictionary(딕서녀리) (0) | 2019.12.30 |
Remote server에서 html file 열기, 확인하기 (0) | 2019.12.19 |
matplotlib.pyplot - subplot, 여러 개의 그래프 그리기 (0) | 2019.12.19 |