I was just testing today this Image Nudity Filter class by Bakr Alsharif, a very interesting PHP class with a very original concept. The widespread availability of nudity pictures is a great concern, especially for parents with young children. Determining whether a picture contains nudity is also a concern for sites that ban such kinds of pictures. Often they do not have enough human resources to monitor all pictures submitted by the site users.
This class provides a solution that can help determining whether a picture may contain nudity. It analyses the colors and shapes of the objects in a picture and gives a score value that may help picture content moderators to reduce the search for undesired nudity pictures.
How does this class works ? It analyses the colors used in different sections of an image to determine whether those colors match the human skin color tones. As result of the analysis it returns a score value that reflects the probability of the image to contain nudity. Additionally, it can output a the analysed image marking the pixels with color skin tones with a given color. Currently it can analyze images in the PNG, GIF and JPEG images. You can test it working online.