object identification - detect corners (slow in javascript)