질문&답변
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) 에서 에러가 뜹니다
error Traceback (most recent call last) in 4 plt . axis ( 'off' ) 5 plt . title ( '%.2f' % y_train [ i ] ) ----> 6 img = cv2 . cvtColor ( img , cv2 . COLOR_BGR2RGB ) 7 plt . imshow ( img ) error : OpenCV(4.5.1) c:\users\appveyor\appdata\local\temp\1\pip-req-build-kh7iq4w7\opencv\modules\imgproc\src\color.simd_helpers.hpp:94: error: (-2:Unspecified error) in function '__cdecl cv::impl::`anonymous-namespace'::CvtHelper ,struct cv::impl::A0x206ccf44::Set ,struct cv::impl::A0x206ccf44::Set ,2>::CvtHelper(const class cv::_InputArray &,const class cv::_OutputArray &,int)' > Unsupported depth of input image: > 'VDepth::contains(depth)' > where > 'depth' is 6 (CV_64F) 저는 이문제인데요 x_train을 float로 형변환 하니까 이런 오류가 뜹니다.. 근데 형변환을 안하면 model인 머신러닝이 안돌구요.. 이럴때 어떻게해야하나요?
- 좋아요수
- 0
- 댓글수
- 2
- 조회수
- 12172





