Difference between image stack averaging in G'MIC and ImageMagick?

Howdy folks! After following the recent thread on image stacking in G’MIC, I decided to give averaging a stack of images a go in G’MIC to simulate a long exposure. I have done this a few times before, following @patdavid’s blog posts about it, using Hugin to align and crop the images, and using ImageMagick for the averaging procedure. I recently was out at the coast, and took a series of images, hand-held, on my Nexus 5x phone, using the ProShot camera app in timelapse mode. I took 20 images, spaced 2 seconds apart. It was bright, so I couldn’t slow down the shutter speed very much. It’s not the greatest example of a good long exposure (I probably needed twice as many images), but it’s what I have on hand to work with.

Anyway, after processing them with Hugin, I calculated the average with ImageMagick here:

And with G’MIC here:

For fun, I also used Enfuse to blend the stack here:

So, clearly Enfuse does something different (and I knew that it would since it does something different than a straight averaging). But, the result from ImageMagick is not different than from G’MIC. On the one hand, I guess that’s not surprising, since they are both doing the same thing. But I wonder if there is something else different between them that I should be aware of when choosing which one to use? On my little netbook they completed in comparable times: just a couple of seconds each. Would G’MIC take advantage of more processors were they available? The slowest part of the process is aligning the images in Hugin though, so not sure if the averaging part of the procedure makes up much time.

1 Like

Gmic uses OpenMP, so it will take advantage of more CPU cores. Enblend/enfuse also has OpenMP and GPU support, but having recently run through a number of distros, getting those enabled by default is very hit or miss.

1 Like

The actual method of creating the (mean) average is fairly straightforward and quick. I’d be surprised if there were significant differences from imagemagick and G’MIC in this regard.

1 Like

On a slight side note: does your nexus 5x camera make you extremely sad? I’ve never been a huge user of my phone’s camera, but with the nexus 5 and 5x, I can’t recall a shot that I was really happy with, the results have been consistently disappointing.

I see. That’s what I was thinking. Probably for a straight average, there will be no significant speed up with multi-core processing. For median or other more intensive blending, then yes, for sure! GPU support could be good for very large stacks, but even on my little netbook it would only take a few seconds to calculate an average on a large stack of 12mpx images.

No, actually, it makes me quite happy! Of course, the images I take with my OM-D are much better in every way, but for a smart phone camera, I am really quite impressed with my 5X. It is a lot better than the camera in my old Nexus 4, and much better than my wife’s old iPhone 4 too. Yes, there is a lot of noise in low contrast areas (sky, etc.), but it is still pretty capable of capturing pretty crisp detail, and fairly true colors. I always shoot in RAW with it to get the best possible dynamic range. Here’s an example of what that can do:

JPEG straight from camera:
JPEG straight from camera

RAW after being developed in Snapseed:

Basically, if I don’t have my “real” camera with me, I know I can at least capture a decent image of most things…

1 Like

Wait you shoot in raw on your phone?

Lol, yup! I use ProShot, and shoot RAW + JPEG. With that I can view the JPEG images as normal in Google Photos. When I find an image I want to edit in RAW, I simple hit the three dots in the upper right, select “Edit in” and then “Snapseed”, and it takes me directly to the RAW developer in Snapseed. When I’m done with that, I save it out as a JPEG, and away I go. Takes no time at all. Actually, it’s a VERY smooth pipeline. I can have a fully developed image ready to post on social media in less than a minute after I take it, lol! :smile:

Ah, not free software :frowning: looks like a nice application though, thanks for sharing.

Try “Manual Camera”. It is FOSS, and may shoot RAW by now on the N5x. I only switched to ProShot because RAW hadn’t yet been implemented in Manual Camera when I first got the 5x almost a year ago. I use Snapseed mostly out of convenience, as there aren’t many other options for RAW development on Android. Of course, I prefer exporting to the computer and using Darktable when I can! :slight_smile:

EDIT: I meant “Open Camera”, NOT “Manual Camera”. Sorry!

I didn’t see raw listed in the Open Camera feature list in fdroid, but I will check it out, thank you.

I also see you’re in San Diego; I’m in Long Beach!

Edit: I will certainly install Open Camera, it does seem to support DNG. Awesome! I don’t know how I missed this.

Nice! Yes, I saw that DNG is now supported. I think this is fairly new, as it wasn’t ready yet some months ago. I will also now be trying Open Camera again, as I really liked it before and only switched because I wanted that RAW capability.

Long Beach! Right up the coast a little. Nice! Perhaps one day we might cross paths IRL!

Open Camera doesn’t always autofocus properly on my Nexus 5x.

I was trying to take a closeup photo of some tomatoes and it wouldn’t focus on them, whereas the standard Google Camera app would.

It does focus closely if there’s nothing it could possibly mistake to be the subject, but that’s not always the case…

Anyone else have this issue?

Just got home and tested this out. Seems to work ok for me? Tried multiple objects and varying degrees of unique or jumbled targets. It’s a bit slower to fix on the right focus than is the stock Google camera app or ProShot, but it works.

Edit: further tests show it to be broken for me as well. I thought it was working, but it seems only capable of fine tuning the current focus, not moving from far to near. Manual focus works fine for me though.

How do you manual focus?

Select the three dots menu and click the icon with the m on it. There now appears a focus control slider along the bottom of the frame. It shows the focus distance as you slide it. Closest focus is 10cm.

1 Like

Open Camera is quite nice, thanks!

1 Like