Realization of an algorithm for image enhancement