There are many more resize options in imagemagick. -scale
looks like what you need.
Also, do not use JPEG for pixel-perfect "miniatures"; use PNG instead (or if impossible, GIF). JPEG is designed for photos and uses lossy compression, resulting in distortion clearly noticeable after scaling your provided JPEG sample.
This article on image scaling might be interesting.
Hugin will stitch these images for you.
There's a script available within the tutorial for stitching scanned images called run-scan-pto_var.sh that will do exactly what you need.
On my Debian system I need to install two packages (and, of course, their dependencies):
apt-get install hugin hugin-tools
In the interests of question completeness I've included a slightly modified version here (this version accepts image filenames on the command line instead of them being hardcoded):
#! /bin/sh
# hugin command tools script to stitch scanned images, fov unknown
# use of fov >= 10 should be OK, could simply set FOV=10
# Terry Duell 2013, 2014
# usage...run-scan-pto_var.sh outputprefix fov
#get the output file prefix
Prefix=$1
# get the fov
FOV=$2
shift 2
pto_gen --projection=0 --fov=$FOV -o project.pto "$@"
pto_lensstack -o project1.pto --new-lens i1 project.pto
cpfind -o project1.pto --multirow project1.pto
cpclean -o project2.pto project1.pto
linefind -o project3.pto project2.pto
pto_var -o setoptim.pto --opt r,d,e,!r0,!d0,!e0 project3.pto
autooptimiser -n -o autoptim.pto setoptim.pto
pano_modify --projection=0 --fov=AUTO --center --canvas=AUTO --crop=AUTO -o autoptim2.pto autoptim.pto
pto2mk -o project.mk -p $Prefix autoptim2.pto
make -j 2 -f project.mk all
# Clean up afterwards
rm -f project.pto project1.pto project2.pto project2.pto project.mk
rm -f "$Prefix"[0-9][0-9][0-9][0-9].tif
rm -f autoptim.pto autoptim2.pto autoptim2.pto_rsp.arg
rm -f setoptim.pto
If your images are called wIowW.jpg
and orMDp.jpg
- as yours are named - and you want the result in rsp.tif
you can run the script like this:
./run-scan-pto_var.sh rsp 10 *.jpg
The output is always written to a TIFF file. However, this format is trivially converable to just about any other image format.
The result?
Best Answer
Since you are new to the command line I will go over the steps one by one, explaining each along the way.
When you open up a terminal/shell/command-line, you'll see a command-prompt like so:
or something similar. You'll almost certainly start out in your home directory, which has the name of your username.
Let's say your two image folders are
folder1
andfolder2
. You said they are on the Desktop, so first we change to theDesktop
directory:cd Desktop
The
cd
command is the "change directory" command, doing exactly what it sounds like.Now, we are going to use the
mv
command, which of course stands for "move".mv -i folder1/* folder2/
I used the
-i
flag, which stands for "interactive", which causes a prompt to appear every time there is a file-name conflict. You'll be asked whether you want to overwrite the destination file or not.After this, you'll have to manually resolve any conflicts* by renaming the files left in
folder1
so they don't conflict with the files infolder2
. Finally, run the above command again, but this time you should get no conflicts.After all this, your
folder1
directory should be empty, so go ahead and remove it withand you're done!
I really recommend you go through a simple bash tutorial like this one to learn the basics.
folder1
, but I tried to keep things simple.