C++ Implentation of Guided Filter