Knowing what to avoid in an image

carlevison
carlevison Administrator, Cloudinary Staff Posts: 7

You may have used the Cloudinary AI Content Analysis add-on to help you to keep certain objects in the picture when cropping images, but did you know you can also use it to crop out unwanted objects?

You may not necessarily know what you want to focus on in an image, but you definitely know what you don't want to see. With Programmable Media, you can programmatically crop images, or add overlays, specifying the things to avoid.

In this image, you can see that cameras and recording equipment have got in the shot of the TV star, when all we're interested in is her:

When cropping this image using auto gravity alone, some of the equipment is still in view:

https://res.cloudinary.com/demo/image/upload/c_fill,g_auto,h_300,w_200/docs/reporter.jpg

You can make sure that none of this equipment is in shot by using auto gravity together with equipment_avoid:

https://res.cloudinary.com/demo/image/upload/c_fill,g_auto:equipment_avoid,h_300,w_200/docs/reporter.jpg


Of course, if you were selling cameras and all you wanted to show was the equipment, then simply remove the _avoid:

https://res.cloudinary.com/demo/image/upload/c_fill,g_auto:equipment,h_300,w_200/docs/reporter.jpg

If you're trying to avoid text in an image, then check out the OCR Text Detection and Extraction add-on.

Or, perhaps you want to overlay text on an image, but avoid faces. You can see how to do that in the face-detection docs.

Who are what are you trying to avoid? Let us know if you achieve it with Cloudinary.