Robert Eisele, a developer who writes about PHP internals, MySQL, JavaScript and jQuery plugins, and small coding puzzles.
Commenters cite his MySQL pagination post as a fix for slow queries and point to his PHP fork and jQuery webcam plugin.
I wonder a bit that there isn't a real binary protocol for SQL.
Edit: It seems there are ways to work around server-side SQL parsing: http://www.xarg.org/2011/01/is-it-possible-to-avoid-query-parsing-inside-of-mysql/
I was thinking more about why it is allowed at all to send text-like SQL queries to a server. A binary protocol would both be simpler to handle and would have saved us from a lot of trouble.
Edit: If all client-side libs (for PHP, Python, etc.) would just use those [prepared statements](http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statements.html), it would be like what I mean.
Edit: Ah, I was wrong (as I hoped): For Python: https://launchpad.net/oursql
There is also OpenCV http://opencv.willowgarage.com/wiki, which I believe has several wrapper libraries that add higher level functionality. PHP, for one, has a face detection library: http://www.xarg.org/project/php-facedetect
I remember coming back to "Optimised Pagination using MySQL"[1] to avoid common pagination "slowness".
[1]: https://www.xarg.org/2011/10/optimized-pagination-using-mysql/
[more]: https://stackoverflow.com/a/32360867
As previously discussed on HN, Robert Eisele's fork of PHP (at v5.3.6) which attempts to fix many of the issues.
http://www.xarg.org/2011/06/php-hacking/
Check out this example someone posted awhile back. I think it could be modified to do what you need:
http://www.xarg.org/project/jquery-webcam-plugin/
No probs. This library is pretty good if you're using jQuery: http://www.xarg.org/project/jquery-webcam-plugin/