<br><br><div class="gmail_quote">2009/1/7 Li Han <span dir="ltr"><<a href="mailto:lihang9999@gmail.com">lihang9999@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On 1月7日, 上午4时14分, J Kenneth King <<a href="mailto:ja...@agentultra.com">ja...@agentultra.com</a>> wrote:<br>
> I'm curious as to what application the solution to this problem is<br>
> practical for all of its difficulty?<br>
</div>Sorry, I oversimplified the question because of my poor english. It is<br>
an analog compass whose value we need to read  into the computer every<br>
second. We use a video camera keep shooting it, and the compass and<br>
camera are  fixed.<br>
--<br>
<font color="#888888">Li Han<br>
</font><div><div></div><div class="Wj3C7c"><br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>The compass of the needle looks like a line. Lines can be best detected<br>using second order (Gaussian) derivatives.  <br>scipy.ndimage.gaussian_filter provides a filter you can use for that.<br>
<br>Then maybe PCA to find the direction of the needle, and you're done!<br>There's probably more to it (there always is), but this might get you started.<br><br>  Almar<br>