Page 1 of 1

Auto-enhance like in iPhoto and similar programs

Posted: 2011-03-03T04:11:15-07:00
by stoffe
Hello!

I'm wondering if there is a command or set of commands that perform approximately the same sort of auto enhance that modern photo editors can do, the kind that does not need any other input from the user other than pressing "Enhance". I've seen the -enhance option but that doesn't seem to be at least the only thing, or maybe my tests were poorly done?

I've been reading up a bit on the docs, and color adjustments and sharpenings and other things, but part of the problem is that I don't know exactly what enhancements I am looking for. :) I just know that I press the enhance and it (usually) looks much better, but I haven't found any such program that is usable otherwise, and besides, I like using the commandline and/or write my own tools and ImageMagick.

Has anybody already looked into this?

Re: Auto-enhance like in iPhoto and similar programs

Posted: 2011-03-03T10:21:23-07:00
by fmw42
there are too many types of enhancements to reverse engineer what you want. some idea of what is happening might be provided if you give some examples by hosting the before and after images somewhere and placing a link here.

IM has several types of contrast/brightness functions. The most automatic is -auto-level.

You might also look at some of my scripts at the link below.

Re: Auto-enhance like in iPhoto and similar programs

Posted: 2011-03-03T17:44:23-07:00
by anthony
Actually the most automatic is -normalize.

The -auto-level is designed more for mathematical image processing and masking, rather than real images.

(No offence Fred).

Re: Auto-enhance like in iPhoto and similar programs

Posted: 2011-03-03T18:10:25-07:00
by fmw42
But -normalize is really just -contrast-stretch with a specific set of values. Thus it is really not automatic as it depends upon the actual values that are the defaults, which may not fit all images. In my opinion! So there are really no automatic functions. They all depend upon some set of parameter values whether internal or external (i.e. preset or user controlled).

There is no one perfect way to auto-enhance. See my many scripts with the "auto" prefix. Each has some set of default values, but allows the user to fine tune by changing those parameter values.

To emulate iPhoto, one would have to know what the algorithm was or try to reverse engineer from a number of examples.

My autolevel script is pretty much the same as IM -auto-level followed by IM -auto-gamma. That may be close to what you want.

Re: Auto-enhance like in iPhoto and similar programs

Posted: 2011-03-04T06:56:18-07:00
by stoffe
Thanks a lot for some great answers! I do understand that there is no setting that would match all images, and that it would all depend on the algorithm that may or may not try to change settings based on how the image looks etc. Some applications really do a great job of enhancing *most* images though, so I was curious if ImageMagick also had algorithms doing the same. Looks like I have some good places to start looking now, at least! :)

Re: Auto-enhance like in iPhoto and similar programs

Posted: 2011-03-04T10:47:00-07:00
by fmw42
If you post links to a few images, so we can see what you need, we might be able to make better suggestions on how to process them.

I have a very old version of iPhoto. If you post a before and after image and tell me what iPhoto command you used, perhaps I can see what it is doing if my version has that feature.

Re: Auto-enhance like in iPhoto and similar programs

Posted: 2011-03-09T18:51:41-07:00
by fmw42
Best I can tell from testing a few images with an old iPhoto, iPhoto's Enhance looks the same as the following IM command

convert image -channel rgb -auto-level result