OpenCV for Android - Mat.get(row, col, double[])

asked 2015-11-26 12:35:34 -0500

phoenix37 gravatar image

I want to access some pixels in my Mat. Below is an example.

How do I get similar effects in Java? I can not use function Mat.get(...) because returns double[].

Can anyone help?

In C++

Mat saturation;
float sat[256];
for(int i=0; i<256; i++) {
    sat[i]=saturation.at<float>(i,0);
}

In Java

Mat saturation = new Mat();
float[] sat = new float[256];
for(int i=0; i<256; i++){
    sat[i] = ???
}
edit retag flag offensive close merge delete