php shape recognition in images
<p>I want to detect a certain shape in an photo using PHP. Take a look at the following photo of my girlfriend.</p>

<p><img src="http://i.stack.imgur.com/Uto1r.jpg" alt="My girlfriend"></p>

<p>This photo has a few black corners in it. I would like to detect those corners and cut out whats in side of it. (Like in the example image above).</p>

<p>I'd like to do this in PHP without the use of any 3rd party library.</p>

<p>Any idea how to do this and what algorithms i can use to detect (basic?) shapes like that?</p>
