Ask Your Question

phoenix37's profile - activity

2015-11-30 14:22:58 -0600 received badge  Supporter (source)
2015-11-30 07:04:25 -0600 received badge  Enthusiast
2015-11-30 07:04:25 -0600 received badge  Enthusiast
2015-11-30 07:04:24 -0600 received badge  Enthusiast
2015-11-26 12:35:34 -0600 asked a question OpenCV for Android - Mat.get(row, col, double[])

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] = ???
}
2015-11-26 08:43:48 -0600 commented question OpenCV Android an array/vector of Mat

Thanks but still I do not understand. Could you explain more or show me an example?

2015-11-25 12:09:22 -0600 received badge  Editor (source)
2015-11-25 11:53:05 -0600 asked a question OpenCV Android an array/vector of Mat

Hi,

I wrote a program in C ++ using OpenCV. Now I would like to move it on Android. I have a problem with this record.

In C++:

vector<Mat> tableRectangles ;
vector<Rect> limitRectangles ;
tableRectangles .clear();
        for(unsigned int i = 0; i< limitRectangles.size(); i++ )
        {
            tableRectangles.push_back((*output)(limitRectangles [i]));
        }

I'd like to just get in Java / Android.

    List<MatOfRect> limitRectangles = new ArrayList<MatOfRect>();
    List<MatOfRect> tableRectangles = new ArrayList<MatOfRect>(); 
    for(int i = 0; i<limitRectangles.height; i++ ){
          ???
    }

At the moment I have only so much. Can anyone help?