corner detection and rectangle split ideas