Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

https://docs.opencv.org/3.3.0/d5/d98/tutorial_mat_operations.html

Mat m;
byte[] b = new byte[3];
m.get(y, x, b);
//Assuming BGR Format
// blue = b[0]
// green = b[1]
// red = b[2]

https://docs.opencv.org/3.3.0/d5/d98/tutorial_mat_operations.htmlDon't do this in a loop. To access many pixels at a time, use a larger buffer.