add the kernel function to enhance the contrast --by morgan