After our recent, somewhat technical posts, we wanted to lighten things up with Cloudinary’s latest (cool) semantic image transformation feature. Keeping people privacy in photos by automatically blurring their faces.
Isn’t that great? With zero effort, you’ve converted an image to a pixelated one before embedding it in your site.
As you can see, the pixelate effect in the example above is quite intense. You can assume greater control on the effect’s intensity by specifying the size of the pixelization squares (numeric value, in pixels). In the following example, we applied the pixelate effect using six pixel blocks on the same Facebook profile picture that was automatically retrieved from Facebook by Cloudinary. As always, the resulting image is cached and delivered through a fast CDN.
We can now apply the new ‘pixelate_faces‘ effect to hide the faces of the couple in the original image. The following URL generates a 200×200 rounded cornered thumbnail that was smartly cropped based of face detection, while blurring the faces in the process.
With the pixelate faces effect, you can pixelate one or more faces automatically. You can even pixelate the faces of a whole soccer team as seen in the example below. Here, Cloudinary automatically fetches the remote image from Wikimedia Commons and applies the pixelate faces effect before delivery through a CDN:
If you are a Spanish or a European football fan, you probably recognized all players in the picture despite the heavy pixelization 🙂
As with the pixelate effect, the pixelate_faces effect also supports specifying the number of pixels to use for each pixelization block. The following example applies a 4-pixels effect on the same remote image for making it easier for you to recognize the players…
For simplicity, all the examples given above were applied on the images on-demand. A user, looking at the image source, may craft a URL that does not include the blur.
To prevent access to the original image, you should apply the pixelate effect as part of an incoming transforming while uploading the image to Cloudinary and before it is stored in the cloud for delivery. Alternatively, you can also upload images as private images as we described in a previous blog post.
We’ve had great fun introducing this feature, and personally think it’s quite cool 🙂
Sites with user generated content, news sites and dating sites might find this feature very useful. Note however that automatic face detection is not perfect, and faces might not be detected and pixelated if the face in the picture is not clear enough. If you are going to incorporate face blurring in your system, you might want to introduce it as a part of a semi-automatic moderation system. By suggesting the automatically censored photo to a human moderator, you will save lengthy manual image processing time, while allowing the moderator to override incorrectly censored photos.
This feature was actually not in our original plans or to-do list. It was requested by one of our clients. Thankfully, the Cloudinary system was built with enough flexibility to introduce this new feature in no time. We were especially lucky to be able to reuse many existing building blocks – face detection, image effects support, best of breed image transformation software and more.
If you need a yet unsupported cloud-based image transformation for your own web application, why don’t you go ahead and challenge us?
Our mission at Cloudinary is to help companies unleash the full potential of their media to create the most engaging visual experiences. To date, we’ve helped 10,000 customers and created a community of more than one million developers. While we engage with our community of customers and developers in a…