hugin-devs team mailing list archive
-
hugin-devs team
-
Mailing list archive
-
Message #07830
[Bug 2016362] Re: Feature request: Add "Fit crop around images" button
*** This bug is a duplicate of bug 679939 ***
https://bugs.launchpad.net/bugs/679939
Thanks for the quick response. Some questions for you:
> Testing only the first/last row/column of each image is not enough.
This was done for speed (see below). As I understand it, for non-
masked/non-cropped images _some_ point on the source image's edge will
be at its largest/smallest projected X/Y position in the final panorama;
is this not the case?
> It will fail e.g. for fisheye images
Aren't their edges always outside their interiors once projected?
> and images with crop or masks.
Fair point. I left this out since I was targeting the common case. A
solution would be to fall back to a slower method for cropped/masked
images. For example, for each pixel in such a source image (not just
edge pixels) check whether it's visible (i.e. with
SrcPanoImage::isInside(...)), if it is then project it and adjust the
bounds (x0, y0, x1, y1) as needed. The downside is that things could
get very slow for large images; w*h checks per image plus the overhead
of isInside() for each point versus 2*(w+h) checks per image for my
existing code.
One other thing, am I correct that the crop that is set (from my code)
is automatically clipped to the field of view's bounding box? From the
code's behavior it appears that it is but I'm not clear on whether
that's guaranteed.
> Also please use only whitespace for indentation. The patch contains
mixed tab and white space indentation.
My apologies. Four spaces per tab stop is your convention, correct?
> It needs also more clean up from copying from existing code.
What else needs cleaning up? (Apart from a couple of commented out bits
of code for the constructor initializers that I see I missed)
---
Hope that didn't come across as confrontational; I really want to make
sure I haven't missed or misunderstood anything.
--
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/2016362
Title:
Feature request: Add "Fit crop around images" button
Status in Hugin:
New
Bug description:
It would be useful to have a button that sets the crop so that all of
the pixels in the source images are in the final image (i.e. set the
bounding box to surround all of the source images).
This is similar (kind of opposite) in behavior to the "Stitcher→Fit
Crop to Images" button that sets the crop so that there are no non-
image pixels in final image.
This is useful for when you want to be able to see all of the source
images in the final image and don't care if it looks pretty. The
specific use-case that I have is documenting locations for
cartography. I want to be able to see all of a location and currently
I have to manually set the crop for each panorama.
To manage notifications about this bug go to:
https://bugs.launchpad.net/hugin/+bug/2016362/+subscriptions
References