Implement corner detect