Image dehazing algorithm