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

I want to convert 16UC3 image to 1 dimensional array?

$
0
0
I'm unable to access the values in the matrix properly. for (int i = 0; i < image.rows; i++) { for (int j = 0; j < image.cols; j++) { img[j + image.cols*i + image.cols*image.rows * 0] = image.at(i, j)[0]; img[j + image.cols*i + image.cols*image.rows * 1] = image.at(i, j)[1]; img[j + image.cols*i + image.cols*image.rows * 2] = image.at(i, j)[2]; } }

Viewing all articles
Browse latest Browse all 19555

Trending Articles



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