public static double[][] toEnergyMatrix(SeamCarver sc)
    {
        double[][] returnDouble = new double[sc.width()][sc.height()];
        for (int i = 0; i < sc.width(); i++)
            for (int j = 0; j < sc.height(); j++)
                returnDouble[i][j] = sc.energy(i, j);

        return returnDouble;
    }