CUDA kernel code of Sauvola's algorithm