Some algorithms for High Dynamic Range Imaging in C++