Dynamic threshold using polynomial surface regression with application to the binarisation of fingerprints