Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

WHY ARE SPLIT MATS NOT CONTINOUS

$
0
0
so I split an into is seperate colors (using split on the matrix). When I then try to reshape one of the resulting matrix I get the following error: OpenCV Error: Image step is wrong (The matrix is not continuous, thus its number of rows can not be changed) in reshape, file /tmp/opencv3-20160429-9997-hdwo4d/opencv-3.1.0/modules/core/src/matrix.cpp, line 997 so then I quickly wrote the following code: cv::Mat image = cv::imread(inputImageName,CV_LOAD_IMAGE_COLOR); cv::Mat colorMats[3]; cv::split(image,colorMats); for (int i=0;i < 3;++i) { std::cout<

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>