Mosaic Panorama Script

Anyone, especially newbies, asking for help with photoshop scripting and photoshop automation - as opposed to those contributing to discussion about an aspect of photoshop scripting

Moderators: Patrick, Mike Hale, xbytor, Larry Ligon, Andrew, PS-Moderators

Mosaic Panorama Script

Postby pdesmidt » Tue Mar 06, 2012 3:38 am

Hi,

I'm building a film scanner using a dlsr. Bascially, I move a film carrier on a glass plate and take 1:1 pictures of the negative with a macro lens. For instance, it takes 25 pictures to cover a 6x7cm negative.

Image

The results have been good, but there have been some problems with stitching, especially on negative with areas of very low detail.

For those negatives, the best thing so far is for me to manually adjust each tile in Photoshop in difference mode, but that is a bit tedious.

It'd be helpful to have a scrip that would place the tiles in rough position which could be refined manually. Is that something that could be done with a script?

Thank you for your help!
-Peter
pdesmidt
 
Posts: 6
Joined: Tue Mar 06, 2012 2:30 am

Re: Mosaic Panorama Script

Postby pfaffenbichler » Tue Mar 06, 2012 8:59 am

Would Photomerge set to »Reposition« and with »Blend Images Together« unchecked not achieve pretty much that?

Other than that one could naturally arrange 25 images in a predefined way via Script.
Could you post a set of sample-images (in lores maybe)?
pfaffenbichler
 
Posts: 724
Joined: Mon Sep 07, 2009 6:08 am

Re: Mosaic Panorama Script

Postby pdesmidt » Tue Mar 06, 2012 1:51 pm

Hi,

Thank you for the reply. I haven't had much luck with photomerge.

Here's the overall image:

Image

You can down load a rar archive with all of the jpgs. at:
http://dl.dropbox.com/u/3595413/Light%2 ... %20try.rar

It is a 5x5 zig-zag mosaic, with 20-25% overlap.
pdesmidt
 
Posts: 6
Joined: Tue Mar 06, 2012 2:30 am

Re: Mosaic Panorama Script

Postby pdesmidt » Fri Mar 09, 2012 5:48 pm

Perhaps using the 'place' command?
pdesmidt
 
Posts: 6
Joined: Tue Mar 06, 2012 2:30 am

Re: Mosaic Panorama Script

Postby pdesmidt » Fri Mar 09, 2012 8:15 pm

For instance, the script could:
1) create a new canvas, something like 10820 px by 13100 px @ 300 dpi.
2) Get pointed to a folder where the files will be in order, i.e. the first file should go in spot 1, and so on.

Image

3)Place the first file on the canvas and move it to position 1.
4) Flatten.
5) Place file 2 in position 2, and repeat, with each file on a new layer.

Having a script that could do this would really speed things up.
pdesmidt
 
Posts: 6
Joined: Tue Mar 06, 2012 2:30 am

Re: Mosaic Panorama Script

Postby Paul MR » Fri Mar 09, 2012 9:15 pm

Well here is a script that will do that, you will need to have the "Reverse" checkbox ticked to get the files in that order.
Attachments
File Sticher.zip
File Sticher
(2.96 KiB) Downloaded 113 times
Paul MR
 
Posts: 1472
Joined: Wed Oct 18, 2006 2:44 pm
Location: Bradford,UK

Re: Mosaic Panorama Script

Postby pdesmidt » Fri Mar 09, 2012 10:02 pm

Paul,

That's brilliant! The UI is very nice, and it's speedy! :D

Perhaps I'm doing something wrong, though, as the tiles don't quite end up in the right order:

Image

Thank you very much for your help!
pdesmidt
 
Posts: 6
Joined: Tue Mar 06, 2012 2:30 am

Re: Mosaic Panorama Script

Postby Paul MR » Fri Mar 09, 2012 10:16 pm

Ah, yes. Just reversing the file order won't do.
The script is designed to place the files left to right top down; or top down left to right.
To get it to work the files would need to be renamed.
Sorry about that.
Paul MR
 
Posts: 1472
Joined: Wed Oct 18, 2006 2:44 pm
Location: Bradford,UK

Re: Mosaic Panorama Script

Postby pdesmidt » Fri Mar 09, 2012 10:25 pm

Hi Paul,

No worries. Renaming is easy.

Thanks again!
-Peter
pdesmidt
 
Posts: 6
Joined: Tue Mar 06, 2012 2:30 am

Re: Mosaic Panorama Script

Postby crabioscar » Fri Apr 20, 2012 4:52 pm

Paul,

This is an extremely useful script, thanks for posting it. I have a similar problem, and I think that I can adapt this script to my purposes, but I wonder if you could offer a little bit of guidance.

Here's the problem: I have a number of images that need to be stitched together into a panorama, but the images don't fit together quite as nicely as the ones above, so I need to be able to program in offsets for each photograph in the panorama. I can't use Photoshop's panorama maker because I have 130 sets of images that need to be stitched together in exactly the same way. I can use the same offsets for each panoramic section, but I need to be able to define them in advance.

I have some programming experience with C++ (back way back), so this code isn't completely mysterious to me, but I'd like to know what you think the best way to go about making the change. It looks to me like the TLX, BRX, etc. variables are the coordinates (in its own layer) of the image to be moved, and the coordinates where it is to be placed in the background layer, and that I should probably start by fiddling with those. Is that about right?


Any ideas?

Thanks,
crabioscar
 
Posts: 1
Joined: Fri Apr 20, 2012 3:28 am

Re: Mosaic Panorama Script

Postby Paul MR » Fri Apr 20, 2012 5:27 pm

Yes,
TRY = Top Right Y
BLX = Bottom Left X
Etc..
Also the script creates the full size document early on..
Code: Select all
var w=app.activeDocument.width*Across;
var h=app.activeDocument.height*Down;
var offsetX = app.activeDocument.width.value;
var offsetY = app.activeDocument.height.value;
app.activeDocument.resizeCanvas(w, h, AnchorPosition.TOPLEFT);


So you would need to add the offsets to the document as well.
Paul MR
 
Posts: 1472
Joined: Wed Oct 18, 2006 2:44 pm
Location: Bradford,UK


Return to Help Me

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron