13 Replies Latest reply on Feb 19, 2015 6:06 PM by Chuck Uebele

    I need a custom script written for photomerge

    Michael e. Stern

      Hello,

      I design, shoot and produce time lapse narrative short films. I'm currently shooting a project in Torrance, Ca.

       

      It involves a two-camera set-up. They are taking photos simultaneously via a custom made trigger cable.

       

      I need a script made that will launch photomerge, look into each of the two folders, pull out the top two files, select auto, merge and save as a psd into a third folder. Then repeat with the next two files. They will be numbered consecutively. There are a total of 12,000 files.

       

      If you can do this please contact me.

       

      Thank you.

       

      Michael

        • 1. Re: I need a custom script written for photomerge
          JJMack Most Valuable Participant

          For images to be stitched well they needed to be taken from a fixed point and the camera rotated about the lens nodal point and exposures setting manual and fixed throughout the image capturing,  If you use two cameras if there are the same and as set the same and mounted on very close you may able to stitch the images with photomerge.   Have you tried? However dose not select which image can be stitched you need to supply the images to be stitched to Photomerge,    You place the images from both cameras into the same folder and the cameras data and time are in sync The bridge should be able to sort the images by the taken.  You should them be able to see groups of images the can be stitched.  Select one of the groups of images images from the two cameras. Them use Bridge menu Tools>Photoshop>Photomerge.  As I wrote the Photomerge script can not be batched it is interactive will alway display its dialog and Photomerge does not select the image to be stitched that is done via the dialog.

           

          It is possible process file  from multiple folders stack image and auto align them like Photomerge.  You may even be able to reuse code from the Photomerge script in Photoshop's Presets Scripts folder Photomerge.jsx. However its complex and uses additional scripts and file.

          Capture.jpg

          This in the information you need to script Photoshop. Adobe Photoshop Scripting | Adobe Developer Connection

           

          The are other programs you may want to look into.   I have seem many things in the web do some research Photosynth - Capture your world in 3D. I have even see things  on the web the have tried to stitch to stitch the web.  That is take image posted on the web from groups of images shot at the same location by many different people, cameras and time and still stitch these.

          • 2. Re: I need a custom script written for photomerge
            Chuck Uebele Adobe Community Professional & MVP

            The mechanics of taking the files from different folders and saving to another are pretty easy. It's as JJMack point out that the photomerge script using the UI to control the script. That would have to be modified so that it load the correct settings but bypasses showing the actual dialog, which could be done, but might open a can of worms trying to get it to work. This post caught my eye as we do some time-lapse for work, and I'm also from Torrance. What is your time frame on this project?

            • 3. Re: I need a custom script written for photomerge
              Michael e. Stern Level 1

              I have found 4 people who understood what I was asking for and one of them will write the desired script for me.  JJMack I don't think you really comprehended my question but thanks anyway for trying...

               

              For the record JJMack I know how photomerge works, I know it is a script and I know how to shoot panoramas, the nodal point, etc. but that was not my question.

               

              Thank you csuebele...

              • 4. Re: I need a custom script written for photomerge
                JJMack Most Valuable Participant

                I would write that you know what Photomerge does. That you actually do not know how it works.  I would bet that your not a programmer and don't know a scripting language.  Most Photoshop users are like that.

                 

                The main Photoshop Photomerg script is  over a thousand line of code and if you look at the code in the beginning up front you will see  it uses five other scripts to do what it does.

                $.evalFile(g_StackScriptFolderPath + "LatteUI.jsx");

                $.evalFile(g_StackScriptFolderPath + "StackSupport.jsx");

                $.evalFile(g_StackScriptFolderPath + "CreateImageStack.jsx");

                $.evalFile(g_StackScriptFolderPath + "Geometry.jsx");

                $.evalFile(g_StackScriptFolderPath + "PolyClip.jsx");

                 

                You do not know how Photomerge works or how complex its process is.   If you read what csuebele wrote and he is good at scripting. He wrote trying to modify Photomerge might open a can of worms trying to get it to work and bypass its dialog.  I believe that would be the case and writing a new script like Photomerge would be an enormous task.

                 

                However it you are only going  to be stitching  pairs or two images a simpler process may be able to be programmed to stitch two image from your setup. 

                • 5. Re: I need a custom script written for photomerge
                  Michael e. Stern Level 1

                  JJMack,

                   

                  I'm guessing English is not your first language and that lead you to a misunderstanding. Don't get so defensive. You were wrong. Admit it. No big deal Let it go.

                   

                  Life is too short.

                  • 6. Re: I need a custom script written for photomerge
                    Michael e. Stern Level 1

                    The details of how photomerge works is irrelevant to this request. It was a request to write a script to get it to perform a function outside of its' original task. And I found the answer.

                     

                    I never said I was going to write it. I was asking for someone to write it for me and you said it couldn't be done. But it can. You are incorrect. You don't get the ten points. Move on.

                    • 7. Re: I need a custom script written for photomerge
                      JJMack Most Valuable Participant

                      English is my native language but I'm not good with it. I flunked every English course I ever had to take.  How photomerge works is most relevant for you wanted to batch it and the way is works make that impossible your logic is as poor as my English.

                      • 8. Re: I need a custom script written for photomerge
                        xbytor2 Level 4

                        open a can of worms trying to get it to work and bypass its dialog

                         

                        It's actually not that hard. You set runphotomergeFromScript to true, include Photomerge.jsx,

                        and for each pair of files call photomerge.createPanorama(). There's additional setup that needs to get done

                        on the photomerge object, but that can be hammered out fairly easily. This is, of course, if I understand the

                        requirements correctly.

                        [Edit]

                        Of course, you'd need a minimal UI to select input and output folders, but more than a few of us can do that in our sleep.

                        Then again, hardwiring the paths in the script would work, too. I'm lazy like that.

                        [/Edit]

                         

                        As I wrote the Photomerge script

                         

                        I think ya missed a comma there, JJ.

                        • 9. Re: I need a custom script written for photomerge
                          JJMack Most Valuable Participant

                          Only one comma I might be getting better at English.

                          • 10. Re: I need a custom script written for photomerge
                            Chuck Uebele Adobe Community Professional & MVP

                            Of, course, X, now it looks so simple - not really. But you're the number one guy outside of Adobe, I'm not surprised you know exactly what to do.

                            • 11. Re: I need a custom script written for photomerge
                              JJMack Most Valuable Participant

                              Yes now we see it at the end of the Photomerge script thanks to X there is that section.  Never looked that far into the script. myself..

                              Capture.jpg

                              • 12. Re: I need a custom script written for photomerge
                                xbytor2 Level 4

                                Never looked that far into the script. myself..

                                 

                                When looking at Adobe's code, I got into the habit of reading a couple of screens of code from the top, then going right to the bottom. For the scripts that have to be called from Bridge and/or can be recorded in an Action, they typically have the structure found here.

                                 

                                 

                                Also note that instead of "include"ing Photomerge.jsx, and calling photomerge.createPanorama(), you could take a peek in photoshop.jsx where the Bridge integration is located, and discover that Adobe has already done all of the wrapping code in photoshop.noDialogPhotoMerge() which simply takes a list of files to be processed. I would just copy the parts needed out of that script

                                and go from there.

                                • 13. Re: I need a custom script written for photomerge
                                  Chuck Uebele Adobe Community Professional & MVP

                                  Yep, sure enough, X! It's all there in the scripts, if you just look far enough. Interesting that Adobe is now adding the version number to photoshop.jsx.