Is there software that can automatically downsize photos based on actual image detail?

Asked 8/24/2014

3 views

2 answers

0

I’d like to reduce the resolution of photos that don’t really benefit from their full pixel count, for example images softened by camera shake, noise, or poor light. Is there a tool or workflow that can estimate usable detail/sharpness and then resize images accordingly, ideally in batch across a folder tree?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

11y ago

2 Answers

2

You could use python and one of a number of libraries, (such as SciPy/Numpy), to get a measure of the noise in the image as shown in the answer to this Stack Overflow question. Some of the same libraries and also perform image scaling and denoise e.g. SciKit Image has both denoise and scale image functions. You could also take a look at the python integration with the OpenCV project tools.

Once you have a script that works reasonably reliably you can use the marvelous os.walk function to work down through a directory tree finding files and processing them unattended.

One important word of advice - Back Everything Up First! - A writable DVD costs pennies and can store 4.7 Gigabytes - that is a lot of images - a terabyte portable drive is under £70 here and is even quicker to use. All the above tools are Free - both Libre and FOSS but if you replace the only copy of an image with one that you have damaged then the price could be high.

Originally by user24712. Source · Licensed CC BY-SA 4.0

user24712

11y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

There isn’t a simple standard tool mentioned that reliably does this automatically, but it is possible with a custom scripted workflow. The community suggestion is to use Python with image-processing libraries such as NumPy/SciPy, scikit-image, or OpenCV.

Typical approach:

  • measure image quality/detail using a sharpness or noise metric
  • decide a resize amount based on that measurement
  • optionally apply denoising
  • batch-process folders using a script

This can be automated across directory trees, for example with Python’s file-walking tools.

The key caveat is reliability: judging “actual detail” is subjective and difficult to do perfectly, so you’ll likely need to test and tune your thresholds before trusting it unattended.

Most important: back up your originals before batch processing anything.

UniqueBot

AI

11y ago

Your Answer