Loading ...
Sorry, an error occurred while loading the content.

Please try to merge these files for me using hugin

Expand Messages
  • Leonard Evens
    I am still having problems using hugin to merge two files, each of which was produced by a view camera and a 75 mm lens using a rise. I used a panormaic head
    Message 1 of 5 , May 2, 2009
    • 0 Attachment
      I am still having problems using hugin to merge two files, each of which
      was produced by a view camera and a 75 mm lens using a rise. I used a
      panormaic head and turned 15 degrees to the left for xsl.tif and 15
      degrees to the right for xsr.tif. The rise was equivalent for these
      files to about 229 px for the `e' parameter. In principle the field of
      view is

      2*arctan(60/75) ~ 77.32 degrees.

      That is because the frame is just about 120 mm across in landscape
      orientation. However, in scanning, there may be some slight cropping
      both vertically and horizontally. The original images are quite large,
      but I reduced them to 1282 x 1000 (xsl.tif) and 1290 x 100 (xsr.tif) to
      speed up the calculations. Ultimately I hope to merge large versions
      of the images.
      The rescaling may have introduced slight vertical and horizontal
      differences in scale for the two images.


      The files can be found at
      math.northwestern.edu/~len/photos/pages/pan/xsl.tif
      and
      math.northwestern.edu/~len/photos/pages/pan/xsr.tif

      If any of you can tell me how you merged these two files maintaining
      verticals and horizontals for the building facade, I would appreciate
      it.
      I need to know how you set things up and the order in which you
      performed the operations.

      I can sometimes get a decent result, but not consistently and I can't
      tell when it results from what I did and when it was just pure luck.

      I got into digital panoramas because I regularly take pictures of
      building facades which can't be encompassed in one image even with a 75
      mm lens. So I would really like to get this down pat.
      --
      Leonard Evens <len@...>
      Mathematics Department, Northwestern University
    • John Houghton
      ... Leonard, I ve put a project file together with stitched result and steps taken (not necessarily ideal, but just as I happened to do it) here:
      Message 2 of 5 , May 3, 2009
      • 0 Attachment
        --- In PanoToolsNG@yahoogroups.com, Leonard Evens <len@...> wrote:
        >
        > If any of you can tell me how you merged these two files maintaining
        > verticals and horizontals for the building facade, I would appreciate
        > it.

        Leonard, I've put a project file together with stitched result and steps taken (not necessarily ideal, but just as I happened to do it) here:

        http://www.johnhpanos.com/pano_jh.zip

        John
      • Thomas Demolliens
        Hi Leonard, You can dl my appempt at http://www.filedropper.com/group1-xslxsr-2images The stitching was done using the new Autopano Pro 2. Kind regards from
        Message 3 of 5 , May 3, 2009
        • 0 Attachment
          Hi Leonard,
          You can dl my appempt at http://www.filedropper.com/group1-xslxsr-2images
          The stitching was done using the new Autopano Pro 2.
          Kind regards from France,
          Thomas
        • Leonard Evens
          ... Thank you John. I think I see some of the things I was doing wrong. For one, I can t assume pitch and roll corrections can be ignored although because of
          Message 4 of 5 , May 5, 2009
          • 0 Attachment
            On Sun, 2009-05-03 at 07:17 +0000, John Houghton wrote:
            > --- In PanoToolsNG@yahoogroups.com, Leonard Evens <len@...> wrote:
            > >
            > > If any of you can tell me how you merged these two files maintaining
            > > verticals and horizontals for the building facade, I would appreciate
            > > it.
            >
            > Leonard, I've put a project file together with stitched result and steps taken (not necessarily ideal, but just as I happened to do it) here:
            >
            > http://www.johnhpanos.com/pano_jh.zip
            >
            > John
            >
            >
            >
            > ------------------------------------
            >

            Thank you John. I think I see some of the things I was doing wrong.
            For one, I can't assume pitch and roll corrections can be ignored
            although because of leveling when taking the pictures they are
            negligible. Also, even though distortion is negligible for my lenses,
            it is not zero, so perhaps I have to allow for modest changes.

            But I do have an additional problem. Although I wasn't able to get the
            error as small as you did, I had managed to produce something similar to
            what you got. But after I changed your image to rectangular, the image
            had the same problem mine had, namely it still needed some further
            horizontal perspective correction. I could correct this somewhat by
            changing the center in the viewer, but I still ended up having to make
            a final perspective correction in gimp. It should be possible to get
            hugin to do that automatically, but I still can't figure out how.

            I also have some questions about the intent of the steps you went
            through.

            1. Added images FOV 77 degrees
            2 Changed lens type of 2nd image to be lens 0

            I assume you mean you changed the lens number so that both were 0. What
            was the purpose?

            3. Set lens vertical shift to 230
            4 Generated cps automatically

            I can't do this because the Fedora hugin doesn't allow it due to
            copyright considerations. With enough effort I can fix that, but I am
            happy to enter the control points manually. I ended up with control
            points relatively similar to the ones you used. Is there any advantage,
            except time saved to generating points automatically?

            5. Added some manually
            6. Optimize y,p,r b + y,p,r of image 1

            Was there some rationale for this choice? That is the area that is
            most difficult for me: choosing the right optimization parameters.

            7. Centre on preview window.
            8. Custom optimization as above but with a and d and e also included.

            Same question.

            9. Added 4 vertical line points (2 on each image)

            Why not also horizontal lines? I added some to your project and I
            managed to get the error even smaller than you did, but I still ended up
            with the horizontal perspective problem.

            10. Custom optimize as above but now include p & r of image 0.

            Same question as above?

            11. Average distance is now 1.1 but max is 4.
            12. Optimize with fov and lens param c included.

            Ditto.

            13. Centre the image
            14 Stitch the output..


            --
            Leonard Evens <len@...>
            Mathematics Department, Northwestern University
          • John Houghton
            ... With rectilinear projection, all straight line features are preserved so it is possible to use horizontal line points on the long horizontal architectural
            Message 5 of 5 , May 5, 2009
            • 0 Attachment
              --- In PanoToolsNG@yahoogroups.com, Leonard Evens <len@...> wrote:
              > But after I changed your image to rectangular, the image
              > had the same problem mine had, namely it still needed some further
              > horizontal perspective correction. ... It should be possible to get
              > hugin to do that automatically, but I still can't figure out how.

              With rectilinear projection, all straight line features are preserved so it is possible to use horizontal line points on the long horizontal architectural lines in the upper half of the building. It is then necessary to optimize y,p,r of both images in order to allow the image to shift sideways into a position where the horizontal features are both horizontal and parallel.

              > 2 Changed lens type of 2nd image to be lens 0
              >
              > I assume you mean you changed the lens number so that both were 0.
              > What was the purpose?

              Both images were shot with the same lens, so they share the same lens parameters, i.e. the ones associated with lens 0.

              > Is there any advantage, except time saved to generating points
              > automatically?

              No. Provided the points are accurately placed and well spread out, the method of generation is irrelevant.

              > 6. Optimize y,p,r b + y,p,r of image 1
              >
              > Was there some rationale for this choice?

              This is just one of the options on the pull down menu. I don't use Hugin myself as I prefer PTGui, and in that I would set parameters manually: b + y,p,r of image 1. That can be done in Hugin with custom parameters. It doesn't really matter, as the image is going to be centered and levelled later. Either way, the optimization does a basic alignment with correction of barrel distortion (via parameter b). (Actually, I think I had second thoughts and set the parameters as I would for PTGui, after seeing Hugin set y,p,r for both images automatically).
              >
              > 7. Centre on preview window.
              > 8. Custom optimization as above but with a and d and e also included.

              This refines the correction of lens distortions (a & b) and corrects for the image offsets due to the lens shift (d & e).
              >
              > 9. Added 4 vertical line points (2 on each image)
              >
              > Why not also horizontal lines?

              See above. My project specified equirectangular output. Horizontals are not preserved in that projection so horizontal line points aren't appropriate (horizontal lines are not rendered straight).

              > 10. Custom optimize as above but now include p & r of image 0.

              Evidently, as noted above, at some previous point I anchored image 0 by unchecking y,p,r of image 0. When levelling with vertical line points, you need to check y,p,r on all images, except uncheck yaw on any one image to prevent the whole panorama image sliding sideways (unless you also have horizontal line points and need to allow the panorama to shift sideways).

              > 11. Average distance is now 1.1 but max is 4.
              > 12. Optimize with fov and lens param c included.

              Optimizing fov sometimes unfortunately results in fov ending up as 0 (since the control points are then all at the same point and the cp distances are a minimum - i.e. zero). However, often the fov will be optimized to its true value so it's worth trying. Here it worked. Parameter c isn't usually needed, but some lenses have peculiar distortion that c can help to correct. Again, it was worth trying to see if an improvement could be obtained.
              >
              > 13. Centre the image
              > 14 Stitch the output..

              John
            Your message has been successfully submitted and would be delivered to recipients shortly.