Author Topic: [SOLVED] Stitching together .png files  (Read 1001 times)

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10620
  • MLUs Forever!
[SOLVED] Stitching together .png files
« on: July 29, 2011, 02:00:33 PM »
I have a requirement to copy some architectural drawings from very large prints.

I can manage, for instance, to get 8 partials of an A3 print.

I would wish to join these together to produce a digital copy of the original.

Anything I have looked at deals with producing one panoramic picture from multiple shots. Some of those methods do all sorts of adjustment to account for lens distortion etc etc.

My need is much more simple - I think - and I am looking for advice on what might the the easiest package to use to achieve my aim.

In addition any link to a tute would also be appreciated.

I have never attempted anything of this nature previously, so any pointers would be appreciated.

Thanks.
« Last Edit: July 30, 2011, 06:25:25 AM by Just19 »
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15282
  • ┌∩┐(◕_◕)┌∩┐
Re: Stitching together .png files
« Reply #1 on: July 29, 2011, 02:20:56 PM »
Would it be worth having 9 partials instead of 8 so you could "stitch" 3 together and then have 3 rows of 3 stitched together?

Now to get back to your original question and find the app that'll do it......... ;D
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline rich2005

  • Sr. Member
  • ****
  • Posts: 257
Re: Stitching together .png files
« Reply #2 on: July 29, 2011, 02:37:17 PM »
you should be able to do this with gimp.

Make a new empty A3 image - its a standard size - open each png in turn, then copy & paste into the A3 and move into position.

or

Hugin will not only join images horizontally, now does rows as well. not so easy to use though. Plenty of tuts on their site.

or

going back a bit but still in the repo is NIP2

http://www.vips.ecs.soton.ac.uk/index.php?title=Nip2

looks a bit odd but a good example is

http://gw.gamependium.com/tools/perfectmap/



Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Stitching together .png files
« Reply #3 on: July 29, 2011, 03:12:12 PM »
Hi,

Have you looked at hugin ? I don't have any experience doing what you want to, but have seen something like that in the descriptions of some packages related to graphics.

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10620
  • MLUs Forever!
Re: Stitching together .png files
« Reply #4 on: July 29, 2011, 04:23:23 PM »
I have been trying to follow this tute ....  but not a lot of success so far ....

I think the problem is I do not, as menotu said, have sufficient overlap for Hugin to work at its best.

http://hugin.sourceforge.net/tutorials/scans/en.shtml

I also tried Gimp, but did not get very far either.

I may have better luck when fresher tomorrow  ;D

Thanks for the replies and suggestions .....  I had not heard of  nip2  previously .....  and might also give that a try, but it seems to have a rather steep learning curve and I want to get this done over the weekend so am unlikely to use it.

I had spotted a 'panorama' plugin for Gimp .....  did not see it when I was using Gimp so have no idea if that might be useful or not.

Thanks for the suggestions  ;D

regards
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Stitching together .png files
« Reply #5 on: July 29, 2011, 04:41:50 PM »
Ho ho ! This is the one I was trying to remember about ! Poster, have you given it a try ?

Quote
$ apt-cache show poster
Package: poster
Section: System/Printing
Installed Size: 88198
Packager:
Version: 0-0.20060221.1pclos2007
Depends: libc.so.6, libc.so.6(GLIBC_2.0), libc.so.6(GLIBC_2.3), libc.so.6(GLIBC_2.3.4), libm.so.6, libm.so.6(GLIBC_2.0)
Conflicts: printer-utils <= 2007, printer-filters <= 2007
Provides: poster = 0-0.20060221.1pclos2007
Architecture: i586
Size: 41515
MD5Sum: 508ee977d842152f8b769013e30febca
Filename: poster-0-0.20060221.1pclos2007.i586.rpm
Summary: PostScript Utilities
Description:
 Poster can be used to create a large poster by building it from multiple pages
 and/or printing it on large media. It expects as input a generic (encapsulated)
 postscript file, normally printing on a single page. The output is again a
 postscript file, maybe containing multiple pages together building the poster.
 The output pages bear cutmarks and have slightly overlapping images for easier
 assembling. The input picture will be scaled to obtain the desired size.



You can get eps with Gimp (ie : png > gimp > eps)

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8583
  • Aurum nostrum non est aurum vulgi.
Re: Stitching together .png files
« Reply #6 on: July 29, 2011, 10:37:51 PM »
GIMP also has a Pandora plugin. I've tried Hugin and it is so-so OK. There are several settings that needed adjustments and specific points defined.

Haven't tried Poster.

Are the A3 prints already scanned images?
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


Offline rich2005

  • Sr. Member
  • ****
  • Posts: 257
Re: Stitching together .png files
« Reply #7 on: July 30, 2011, 03:32:45 AM »
You could use gimp + pandora, it is in the repo as gimp-plugin-pandora.  Some time ago I did a little YouTube (5 mins) demo on using it.

edit: grrr..I wish this thing would stop modifying my post, just want the url not the player:
edit again: gave up, here is a tiny url

http://tinyurl.com/4xqftut

It is best when there is a good overlap, but since all is manual it should work with parts of a drawing.

Because it works horizontally, what you would have to do is join the images making the horizontal rows then rotate 90 degrees and stitch together the (now vertical) rows to form the full image. finish off by rotating back to the correct orientation. Sounds more complicated than it is. Helps if you have plenty memory on you computer.
« Last Edit: July 30, 2011, 03:42:40 AM by rich2005 »

Offline Vorteggs

  • Hero Member
  • *****
  • Posts: 2400
Re: Stitching together .png files
« Reply #8 on: July 30, 2011, 03:59:27 AM »
I also tried Gimp, but did not get very far either.
I think Inkscape is more appropriate for that job.

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10620
  • MLUs Forever!
Re: Stitching together .png files
« Reply #9 on: July 30, 2011, 06:24:49 AM »
OK, I got a satisfactory, if not perfect, result.

Couldn't expect miracles  :D

I used Hugin and the tute I linked to get the settings right.

I needed a few nore scans to get sufficient overlaps for best results.

Yes it was while doing it I noticed that the joins had to be lateral  :D   so essentially two banners, rotated 90 deg and then joined.

Thanks for all the suggestions and help.

Case closed  ;D  Wheeeeeee .....


I have been trying with A1 sheets also .....  but the scanner bed is really too small ...  needing about 20 scans to get sufficient overlap.... and the one I am using is not as 'high' as the surrounding case so is very awkward.
I have an older unit somewhere which may be more suitable ......  but that is for another day  ;)

regards.
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT