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

Mat.get equivalent for C++?

$
0
0
I'm trying to duplicate an example for line detection from java to native code. My Java code is as follows int[] linesArray = new int[lines.cols() * lines.rows() * lines.channels()]; lines.get(0,0,linesArray); //the function in question. Reads Mat data into the lines array for (int i=0; i < linesArray.length; i = i + 4) { //loop through the data and do stuff } but in C++ native code, there is no `Mat::get()` function. How can I read the data from my `lines` Mat into my `linesArray` so far I have this for C++, mostly the same int linesArray[lines.cols * lines.rows * lines.channels()]; lines.get(0,0,linesArray); //get is not a member of cv::Mat

Viewing all articles
Browse latest Browse all 600

Trending Articles