Create HTML5 Vertical Endless Runner cross platform games

Using Phaser framework and other FREE software
Endless runner games are gaining more and more popularity and they are really easy to code.
I will take you by hand through the creation of a complete HTML5 vertical endless runner cross platform game with a lot of features and room for customization.
100 pages + 31 source code examples with a free update to come in a few days.

PHP face detection class

Emanuele Feronato Php, Users contributions

Face detection is a computer technology that determines the locations and sizes of human faces in arbitrary (digital) images.

It detects facial features and ignores anything else, such as buildings, trees and bodies.

(source: Wikipedia)

There is so much to say about face detection and all its algorithms… I am planning a step by step tutorial about every branch of object detection in digital images, but first I want to publish Maurice Svay‘s PHP class.

Maurice, in his blog, explains he was looking for a face detection script for PHP, but wasn’t able to find one working without OpenCV (Open Source Computer Vision), an opensource lib that was originally developed by Intel.

OpenCV seems to perform well but you need to be able to install it on your server.

So he coded his own pure PHP solution, that does not require any library to be installed on the server.

And, obviously, that can be easily ported into any language. His class itself has been translated from a javascript code that actually is no longer available online

So this is the class:

Using it is very easy, just write

once you unpacked and included detection.dat and the image in the same path as your class.

Do you want to see a result?

This was generated by the script, just changing the frame color from red to green, to make it more visible.

The class does not work that well on every photo, but it’s a good start for a journey into face detection

Stay up to date
Follow me on the social networks and never miss a post.

Official Emanuele Feronato Facebook page

Official Emanuele Feronato Twitter account

From null to full HTML5 cross platform game

I will take you by hand from the bare bones of JavaScript programming through the creation of a full cross platform HTML5 game, with detailed explainations and source code.

If you don't know where to start, then From null to full HTML5 cross platform game is the book for you.

Comments 40

  1. Pingback: Mal kurz rundgeschaut… #24 |

  2. Pingback: Face Detection Using PHP |

  3. Pingback: Detectar una cara en una foto usando PHP | Blog personal de Brian Urban

  4. Pingback: Face detection using PHP

  5. Pingback: PHP and Jquery face detection scripts «

  6. Mohd

    Hay @Proger..

    At least it detected the face of Putin’s care :) I think PHP can’t recognize Putin.. same of the rest of us, this is logic.

  7. Dan

    I have two other Haar Xml files, is there any way to convert these to .dat files for use in this PHP implementation?

    Kind regards,


  8. Pingback: ??????????? ?? ???? – PHP ????? |

  9. absfrm

    this is powerful.thanks to share
    but can you answer my question?
    i want to detect a face(save some detail for it as name or family).
    and when detect that face again , system show me his/her detail.
    can i do this action?
    thanks a lot

  10. Lakshmi Narayanan

    Hi this is great! Working fine with most of the complete and round faces. Thank u for the code! If you tweak the code further please let us know!

  11. Pingback: Flash AS3 face detection and recognition library - Emanuele Feronato

  12. Sander

    Face detection with PHP is not necessary, you can better use jQuery client side script.

    Search on Google for jQuery face detection and you will find it.

  13. suman

    programm is giving notice at line no 118 imagecolorat() out of bound ,,and also showing fatal error execution time exceed 30 sec in line 119 ,,,what i shoud do

  14. Pingback: jQuery face detection plugin - Emanuele Feronato

  15. devpk

    hye i need to compare thumb impression … is that library useful for matching thumb .thumb is store in mysql blob format. kindly suggest me links

Leave a Reply

Your email address will not be published. Required fields are marked *