Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   merging or fitting images together (http://www.linux-archive.org/gentoo-user/665400-merging-fitting-images-together.html)

Philip Webb 05-10-2012 08:52 PM

merging or fitting images together
 
I have a lot of images scanned from old negatives of non-standard sizes,
which I had to split up into halves or quarters to process;
I was careful to use the same settings for each of the sub-parts.
Now I want to reassemble them into the original whole pictures.

There are several apps which might do this.
Jonathan Corbet describes using Hugin (LWN 090910);
there's also Krita & Gimp & perhaps Imagemagick.
I have Imagemagick installed, but the others need a number of deps.

Before I go to a lot of trouble emerging + exploring on my own,
has anyone else done this kind of job successfully & what did they use ?

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca

Alex Schuster 05-10-2012 09:43 PM

merging or fitting images together
 
Philip Webb writes:

> I have a lot of images scanned from old negatives of non-standard sizes,
> which I had to split up into halves or quarters to process;
> I was careful to use the same settings for each of the sub-parts.
> Now I want to reassemble them into the original whole pictures.
>
> There are several apps which might do this.
> Jonathan Corbet describes using Hugin (LWN 090910);
> there's also Krita & Gimp & perhaps Imagemagick.
> I have Imagemagick installed, but the others need a number of deps.
>
> Before I go to a lot of trouble emerging + exploring on my own,
> has anyone else done this kind of job successfully & what did they use ?

I'd use ImageMagick's montage command. You have to find out how exactly
to do this, but once you know this, you can automate this and process
them all at once in a loop. If you're not so much into shell scripting,
ask again here.

Sorry, I cannot give you an example right now, but see
http://www.imagemagick.org/Usage/ and expecially
http://www.imagemagick.org/Usage/montage/ , the latter should have the
information.

Wonko

Dale 05-10-2012 09:52 PM

merging or fitting images together
 
Philip Webb wrote:
> I have a lot of images scanned from old negatives of non-standard sizes,
> which I had to split up into halves or quarters to process;
> I was careful to use the same settings for each of the sub-parts.
> Now I want to reassemble them into the original whole pictures.
>
> There are several apps which might do this.
> Jonathan Corbet describes using Hugin (LWN 090910);
> there's also Krita & Gimp & perhaps Imagemagick.
> I have Imagemagick installed, but the others need a number of deps.
>
> Before I go to a lot of trouble emerging + exploring on my own,
> has anyone else done this kind of job successfully & what did they use ?
>


I have used hugin but it has been a while. As long as you have enough
points tied together, it works fine. The more points the better tho.
It has been updated several times since I used it last so it may be
better or worse now.

I have taken as many as 30 pictures and stitched them together. I had
three rows of 10. It was of a park and it looked great when done. It
took a couple tries to get it just right but it did a good job and that
was a good size project. Doing 4 or 5 pictures is pretty easy. Lots of
overlap is the key tho.

I don't know of anything else that can do this. GIMP and such might
could depending on if the image needed some subtle stretching or
something to fit together.

My advice, hugin is likely your best bet.

Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output? Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"

Philip Webb 05-11-2012 07:31 PM

merging or fitting images together
 
120510 Dale wrote:
> Philip Webb wrote:
>> I have a lot of images scanned from old negatives of non-standard sizes,
>> which I had to split up into halves or quarters to process;
>> I was careful to use the same settings for each of the sub-parts.
>> Now I want to reassemble them into the original whole pictures.
> I have used hugin but it has been a while.
> As long as you have enough points tied together, it works fine.
> I have taken as many as 30 pictures and stitched them together.
> I had three rows of 10. It was of a park and it looked great when done.
> It took a couple tries to get it just right but it did a good job
> and that was a good size project. Doing 4 or 5 pictures is pretty easy.
> Lots of overlap is the key tho.

120510 Alex Shuster wrote :
> I'd use ImageMagick's montage command.
> You have to find out how exactly to do this, but once you know this,
> you can automate this and process them all at once in a loop.
> See http://www.imagemagick.org/Usage/
> and esp http://www.imagemagick.org/Usage/montage/

Thanks to both ! -- Imagemagick looks as if it's very technical
& I'm not sure how it would handle matching overlapping photos.
That is what Corbet described doing & Dale seems to have done,
so I'll emerge Hugin & see what it can do.

As I now notice, the negatives I want to use right now are not split,
but there are many others which are, so this wb useful eventually.

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca

Dale 05-12-2012 01:25 AM

merging or fitting images together
 
Philip Webb wrote:
> 120510 Dale wrote:
>> Philip Webb wrote:
>>> I have a lot of images scanned from old negatives of non-standard sizes,
>>> which I had to split up into halves or quarters to process;
>>> I was careful to use the same settings for each of the sub-parts.
>>> Now I want to reassemble them into the original whole pictures.
>> I have used hugin but it has been a while.
>> As long as you have enough points tied together, it works fine.
>> I have taken as many as 30 pictures and stitched them together.
>> I had three rows of 10. It was of a park and it looked great when done.
>> It took a couple tries to get it just right but it did a good job
>> and that was a good size project. Doing 4 or 5 pictures is pretty easy.
>> Lots of overlap is the key tho.
>
> 120510 Alex Shuster wrote :
>> I'd use ImageMagick's montage command.
>> You have to find out how exactly to do this, but once you know this,
>> you can automate this and process them all at once in a loop.
>> See http://www.imagemagick.org/Usage/
>> and esp http://www.imagemagick.org/Usage/montage/
>
> Thanks to both ! -- Imagemagick looks as if it's very technical
> & I'm not sure how it would handle matching overlapping photos.
> That is what Corbet described doing & Dale seems to have done,
> so I'll emerge Hugin & see what it can do.
>
> As I now notice, the negatives I want to use right now are not split,
> but there are many others which are, so this wb useful eventually.
>


The biggest things about hugin, 1) learning to use the thing 2)
patience. The more control points you get, the better it will turn out.
Whatever you do, don't leave a control point that is not matched up.
Talk about a weird picture. lol It only takes one too.

First thing, load your pics. I usually load them in the sequence they
need to be matched up with. When you have one image on the left, a
different but connectible image on the right, do one control point
manually. After the first one, you can pick a point on one image and it
will find it on the other automagically. If it gives a error, add the
point then delete it. That's where the weird pictures can come in.
This varies but I try to get at least 10 or 12 points. That is a
minimum. If you have the patience and really want a good picture, get
30 points or more.

I would suggest reading a howto with screen shots. If you need help,
let me know. It's been a while but I will try.

Oh, hugin can be complicated to. It has a lot of settings and options.

Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output? Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"

Philip Webb 05-12-2012 01:22 PM

merging or fitting images together
 
120511 Dale wrote:
> The biggest things about hugin, 1) learning to use the thing
> 2) patience. The more control points you get, the better it will turn out.
> Whatever you do, don't leave a control point that is not matched up.
> Talk about a weird picture. It only takes one too.

I was careful to make sure there was an overlap in the negatives,
so these are parts of the same image a/a separate shots of the same scene.
That should make matching much more straightforward.
Corbet explained in detail how he made a panorama for separate shots
of a scene in Colorado, where he lives, so that wb my starting-point.

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca

Michael Mol 05-12-2012 07:13 PM

merging or fitting images together
 
On Sat, May 12, 2012 at 9:22 AM, Philip Webb <purslow@ca.inter.net> wrote:
> 120511 Dale wrote:
>> The biggest things about hugin, 1) *learning to use the thing
>> 2) patience. *The more control points you get, the better it will turn out.
>> Whatever you do, don't leave a control point that is not matched up.
>> Talk about a weird picture. *It only takes one too.
>
> I was careful to make sure there was an overlap in the negatives,
> so these are parts of the same image a/a separate shots of the same scene.
> That should make matching much more straightforward.
> Corbet explained in detail how he made a panorama for separate shots
> of a scene in Colorado, where he lives, so that wb my starting-point.

Chiming in late, I know, but I also wanted to recommend Hugin. I've
used it extensively for panoramas.

Also, Hugin has excellent overlap detection algorithms for generating
control points, and its UI for Celeste is good at removing control
points on clouds.

--
:wq

Philip Webb 05-15-2012 02:50 AM

merging or fitting images together
 
I tried Hugin, but got nowhere. I set 6 points on each picture,
which are 2 overlapping parts of a single original negative,
but all it offered was a black screen; I did follow the on-line help.

Then I tried Imagemagick & got a good result after a bit of fussing.
The commands I used were

convert -size 1000x760 canvas:black brum-canvas.jpg
composite -geometry +0+0 brum-3070.jpg brum-canvas.jpg brum-1.jpg
composite -geometry +220-8 brum-3068.jpg brum-1.jpg brum-2.jpg

You can see the images at http://www.chass.utoronto.ca/~purslow/test/ :
they are of trams in Colmore Row, Birmingham in May 1953 .

I still need to light/darken 1 image a bit to hide the join,
but as a proof of concept this shows it's feasible with Imagemagick.

Any further advice re Hugin is welcome: can anyone do it with these photos ?

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca

Urs Schutz 05-15-2012 11:29 PM

merging or fitting images together
 
On Mon, 14 May 2012 22:50:33 -0400
Philip Webb <purslow@ca.inter.net> wrote:

> I tried Hugin, but got nowhere. I set 6 points on each
> picture, which are 2 overlapping parts of a single
> original negative, but all it offered was a black screen;
> I did follow the on-line help.
>
> Then I tried Imagemagick & got a good result after a bit
> of fussing. The commands I used were
>
> convert -size 1000x760 canvas:black brum-canvas.jpg
> composite -geometry +0+0 brum-3070.jpg brum-canvas.jpg
> brum-1.jpg composite -geometry +220-8 brum-3068.jpg
> brum-1.jpg brum-2.jpg
>
> You can see the images at
> http://www.chass.utoronto.ca/~purslow/test/ : they are of
> trams in Colmore Row, Birmingham in May 1953 .
>
> I still need to light/darken 1 image a bit to hide the
> join, but as a proof of concept this shows it's feasible
> with Imagemagick.
>
> Any further advice re Hugin is welcome: can anyone do it
> with these photos ?
>

I just tried with fotoxx: This is a semi-manual process, but
I liked the resulting image. The joint is less visible
than on brum-2.jpg. It was easy to do an "unbend" after
merging, and therefore the clock and the face on the image
borders stay in the image. This was my first try to do a
panorama in fotoxx, and it took me less than 5 minutes,
much faster than with hugin. If you like I send you the
image to your private mail.

Urs

Philip Webb 05-16-2012 12:19 AM

merging or fitting images together
 
120515 Urs Schutz wrote:
> I just tried with fotoxx.

I hadn't heard of that one : there are so many pkgs in media/gfx
that it's difficult to be sure I've checked all photo editors.

> This is a semi-manual process, but I liked the resulting image.

It c~b any more manual than Imagemagick (smile).

> The joint is less visible than on brum-2.jpg.

That wb useful : no doubt, I could adjust one of them with Imagemagick,
but eventually there wb >= 100 similar merges to do,
so some degree of automation wb very helpful.

> It was easy to do an "unbend" after merging
> and therefore the clock and the face on the image borders stay in the image.

Not a problem with Imagemagick.

> This was my first try to do a panorama in fotoxx
> and it took me less than 5 minutes, much faster than with hugin.
> If you like I send you the image to your private mail.

Please do & thanks for this info.

Does anyone else have suggestions re pkgs or methods ?
-- it does look as if this rather simple task is fairly challenging,
so others may benefit if it's on record here.

I have emerged Gimp & will look at what it can do soon :
it has 'layers', which look like what is needed.

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca


All times are GMT. The time now is 06:24 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.