Finished Kittler minimal threshloding