a generic C++ library for image analysis