I am building a document scanner application and need to detect corners of the document in an image for cropping. So far my code works only when the image is having a dark b