Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |
Tags
- 딥스트림
- IOU
- deepstream
- 딥러닝
- Python
- Linux
- 비디오미리보기
- 네트워크
- nfs mount
- tao_toolkit
- 도커
- 도커 컨테이너
- 타오툴킷
- C++
- C
- docker
- pyMySQL
- yolov7
- nouveau
- 스프링
- 정처기
- 주피터 노트북
- Spring
- dkms
- 리눅스
- SQLD
- 백준
- 파이썬
- mAP@.5
- 알고리즘
Archives
- Today
- Total
한 번만 더 해보자
[Python] cv2 경로의 한글 깨짐 본문
상황
cv2로 이미지를 읽으려고 하는데 경로의 한글이 깨져서 인식이 안됨
에러코드
[ WARN:0@1.994] global loadsave.cpp:244 cv::findDecoder imread_('C:/Users/Desktop/test/images\\媛뙋_媛濡쒗媛_1462.JPG'): can't open/read file: check file path/integrity
Traceback (most recent call last):
File "c:\\DEV\\python\\image_warping.py", line 43, in <module>
w = img.shape[1]
AttributeError: 'NoneType' object has no attribute 'shape'
해결 방법
import numpy as np
import cv2
image_path = "C://image/path/이미지_이름.jpg"
img_array = np.fromfile(image_path, np.uint8)
img = cv2.imdecode(img_array, cv2.IMREAD_COLOR)
반응형