corner_detect.py improved for 'corner-cases'.
works well now.