What's your workflow for up-scaling images?

Ok, here we go. I am not going to link my full-sized files. (Normally I would).
The reason is that they’re 32 megapixel tif images (~100MB each).

I used my iPhone 6+ to shoot a burst of test images. Here is one of them:

I’ve marked two areas in red for comparison of what we’re doing.

I used the align_image_stack script that comes bundled with Hugin, and Imagemagick mogrify, (I also use a custom G’MIC script I got from @David_Tschumperle for mean averaging videos).

I posted earlier the steps but here’s the general workflow for static subject images:

  1. Shoot a bunch of handheld images in burst mode (if available).
  2. Develop raw files if that’s what you shot.
  3. Scale images up to 4x resolution (200% in width and height). Straight nearest-neighbor type of upscale is fine.
    • In your directory of images, create a new sub-directory called resized.
    • In your directory of images, run mogrify -resize 200% -path ./resized *.jpg if you use jpg’s, otherwise change as needed.
      This will create a directory full of upscaled images.
  4. Align the images using Hugin’s align_image_stack script.
    • In the resized directory, run /path/to/align_image_stack -a OUT file1.jpg file2.jpg file3.jpg ... fileX.jpg
      The -a OUT option will prefix all your new images with OUT.
    • I move all of the OUT* files to a new sub-directory called aligned.
  5. In the aligned directory, you now only need to mean average all of the images together.
    • Using Imagemagick: convert OUTfile*.tif -evaluate-sequence mean output.bmp
    • Using G’MIC: gmic video-avg.gmic -avg \" *.tif \" -o output.bmp
      I’ll attach the .gmic file at the end.

I used 7 burst capture images from an iPhone 6+ (default resolution was 3264 x 2448).
Here are 100% crops of the results.
For the first area marked in red, the image looks like this with straight upscale first, result second:

The second marked area looks likes this before and after:

I would say that if your scene is static, this would be a perfect way to increase the resolution significantly (and the added bonus of less noise as @Jonas_Wagner already pointed out).

The .gmic script I used is here:

video-avg.gmic:

avg :
  -v -
  ({'"$1"'}) -autocrop[-1] 32 -replace[-1] 32,{','} files=@{-u\ @{-1,t}}
  -m "_avg : $""=_file _nb_files=$""#" -_avg $files -uncommand _avg -rm[-1]
  -repeat $_nb_files
    file=${_file{$>+1}}
    -v + -e[] "\r - Image "{1+$>}/$_nb_files" ["$file"]               " -v -
    -i $file -+
  -done -v +
  -/ $_nb_files

Just copy and save the code block above in a file called video-avg.gmic in the same directory you’ll be mean averaging your images.

2 Likes