[opencv] Error: Assertion failed (((0x28442211 >> ((traits::Depth<_Tp>::value) & ((1 << 3) - 1))*4) & 15) == elemSize1()) in cv::Mat::at 에러 해결

2023. 11. 21. 17:49컴퓨터비전

728x90

Mat::at 코드를 실행할 때 생기는 오류이다. 

 

나의 경우에는 형식을 잘못입력했다.

output.at<uchar>(y_, x_) = img.at<uchar>(y, x);

 

팍셀값을 uchar형식으로 입력해야 하는데 double로 입력하는 바람에 오류가 났다.

728x90

'컴퓨터비전' 카테고리의 다른 글

Segmentation  (3) 2023.11.25
Image Transformation and RANSAC  (4) 2023.11.25
과제하며 배운 opencv 함수 및 여러 정보  (2) 2023.11.20
Feature Detection and Matching  (0) 2023.11.14
Edge Detection  (0) 2023.11.12