public ArrayList<Double> FDWT(ArrayList<Double> _pic) {
        ArrayList<Double> _temp = new ArrayList<Double>(_pic.size());
        //Initialize _temp
        _temp = (ArrayList<Double>) _pic.clone();
        for (int j = _pic.size(); j >= 2; j = j / 2) {

            for (int i = 0; i < j / 2; i += 1) {
                double _average = (_pic.get(2 * i) + _pic.get(2 * i + 1)) / 2;
                double _minus = _pic.get(2 * i) - _average;
                _temp.set(i, _average);
                _temp.set(j / 2 + i, _minus);
            }
            _pic = (ArrayList<Double>) _temp.clone();
        }

        return _pic;
    }