I read this question on photo.stackexchange.com on how to auto crop images to e.g. 4:3 format e.g. to the format 1000×750.
This reminded me of an age old problem: you can of course auto crop images to always 4:3 / 1000:750 manually or automatically:
There are zillions of software tools that let you automate this stuff , I usually use Irfanview for my bulk processing.
But… if you would automate this by e.g. putting the crop always in the middle of the photo (instead of starting at 0:0) it could well be that you miss out a part of the photo that you really want to keep in that crop.
For the regular house-garden en kitchen personal photo’s: this will not be a problem. Since you will be the end-user and in the end : who cares? But for a more professional process you will somehow need to determine if there are certain details in a picture you want in the end result before cropping or better said: to determine WHERE to crop.
For any photo’s that are “near” the aspect ratio : probably there is no problem but the farther you go away from the aspect ratio the worse the results will turn out.
|The photo on the left is 200 x 1000 ( width=200 and height= 1000). If I would use the simple batch algorithm above, the resulting image would look like on the right|
So … as you can see in the example above: our algorithm is not that nice: we do not even have the giraffe on the image.
Our customer would not be happy if there was not even a giraffe on the picture.
So we could do several things:
- Have some content based image recognition software that determines the most important parts in the image and takes this as “the middle” of the crop area (and hope we catch everything)
- If we are outside a certain range of the 640×480 range (lets say 10%) then no longer do an auto crop but “fill” the remaining area with a background color
- If we are outside a certain range of the 640×480 range (lets say 10%) then no longer do an auto crop but use some smart image tools to “create” a fill-in for the remaining part of the image.
Option 2 is easy and we can do this with most photo batch processing tools (see thread on stackexchange)
But what about option 1 and option 3? Which software can I use to batch process large amounts of photo’s to perform either 1 or 3 ?