src/main/java/com/xceptance/neodymium/visual/ai/image/FastBitmap.java
/**
     * Convert the image to matrix of integer representation.
     * 
     * @return Matrix of the image.
     */
Convert the image to matrix of integer representation.

@return Matrix of the image.
Convert the image to matrix of integer representation . @return Matrix of the image .
public float[][][] toMatrixRGBAsFloat()
    {
        int height = getHeight();
        int width = getWidth();
        float[][][] image = new float[height][width][3];
        int idx = 0;
        for (int i = 0; i < height; i++)
        {
            for (int j = 0; j < width; j++)
            {
                image[i][j][0] = getRed(idx);
                image[i][j][1] = getGreen(idx);
                image[i][j][2] = getBlue(idx);
                idx++;
            }
        }
        return image;
    }
public float [ ] [ ] [ ] toMatrixRGBAsFloat ( ) { int height = getHeight ( ) ; int width = getWidth ( ) ; float [ ] [ ] [ ] image = new float [ height ] [ width ] [ 3 ] ; int idx = 0 ; for ( int i = 0 ; i < height ; i ++ ) { for ( int j = 0 ; j < width ; j ++ ) { image [ i ] [ j ] [ 0 ] = getRed ( idx ) ; image [ i ] [ j ] [ 1 ] = getGreen ( idx ) ; image [ i ] [ j ] [ 2 ] = getBlue ( idx ) ; idx ++ ; } } return image ; }
Convert the image to matrix of integer representation.
Convert the image to matrix of integer representation .