Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to get one-pixel value from grayscaleImage(java,Android)

After using code below

changedImg = new Mat();

    Imgproc.cvtColor(sampledImg, changedImg, Imgproc.COLOR_RGB2GRAY);

    changedImg.convertTo(changedImg,CvType.CV_8UC1);

    int rows = changedImg.rows();
    int clmns = changedImg.cols();
    int chn = changedImg.channels();

    double[] ft = changedImg.get(1560, 2080);

    infoTw.setText(rows + " | " + clmns + " | " + chn + " | " + ft );

Blockquote

I got " 3160 | 4160 | 1 | [D@cbe047b " What does "[D@cbe047b" mean? I consider that value is in range 0 - 255. A how could I get pixel value in range 0 - 255 ?

Thank in advance.