Tool to automatically fit image canvas to manual crop area?

55 views
Skip to first unread message

David W. Jones

unread,
Jan 9, 2016, 2:18:52 AM1/9/16
to hugin-ptx
Good evening!

I have a wide (64000+ pixel),short (~4000 pixel) strip panorama. I
manually set the crop area because I want the finished image to include
the entirety of each image. (I like the jagged, higgeldy-piggeldy look
on this one; it was shot handheld from a boat sailing along the
shoreline and covers about 10 miles of the shoreline.) The crop area is
~64000x~4000. The canvas size Hugin insists on is ~64000x 46000.

Is there something in Hugin that can set the canvas size to match the
crop area? I've tried the various tools like Mouse/Drag => Center and
Fit, Project => Fit, but they don't change the canvas area.

Thanks.

--
David W. Jones
gnome...@gmail.com
wandering the landscape of god
http://dancingtreefrog.com

Gnome Nomad

unread,
Jan 11, 2016, 8:15:13 PM1/11/16
to hugin-ptx

Hmm, no replies. Did email make it to list? Thanks.

Terry Duell

unread,
Jan 11, 2016, 8:27:48 PM1/11/16
to hugi...@googlegroups.com
Hello David,
On Tue, 12 Jan 2016 12:15:10 +1100, Gnome Nomad <gnome...@gmail.com>
wrote:

> Hmm, no replies. Did email make it to list? Thanks.

Yes, it made it to the list.
I have been quiet as I'm not sure I know the answer.
I usually set the crop boundaries then in the Stitcher tab select
"Calculate Optimal Size", but haven't been able to test if that solves
your predicament.

Cheers,
--
Regards,
Terry Duell

David W. Jones

unread,
Jan 11, 2016, 11:30:44 PM1/11/16
to hugi...@googlegroups.com
Thanks. Calculate Optimal size only calculates the canvas size (in this
case, about 65Kx43K), not the crop size.

Terry Duell

unread,
Jan 12, 2016, 12:16:39 AM1/12/16
to hugi...@googlegroups.com
On Tue, 12 Jan 2016 15:30:37 +1100, David W. Jones <gnome...@gmail.com>
wrote:

> On 01/11/2016 03:27 PM, Terry Duell wrote:
>> Hello David,
>> On Tue, 12 Jan 2016 12:15:10 +1100, Gnome Nomad <gnome...@gmail.com>
>> wrote:
>>
>>> Hmm, no replies. Did email make it to list? Thanks.
>>
>> Yes, it made it to the list.
>> I have been quiet as I'm not sure I know the answer.
>> I usually set the crop boundaries then in the Stitcher tab select
>> "Calculate Optimal Size", but haven't been able to test if that solves
>> your predicament.
>>
>> Cheers,
>
> Thanks. Calculate Optimal size only calculates the canvas size (in this
> case, about 65Kx43K), not the crop size.

Yes OK, but here I reckon that is the crop size, but I may be on the wrong
track
Stay tuned, I'll see if I can find a suitable test project and try it out.


Cheres,
--
Regards,
Terry Duell

Terry Duell

unread,
Jan 12, 2016, 12:45:14 AM1/12/16
to hugi...@googlegroups.com
On Tue, 12 Jan 2016 16:16:31 +1100, Terry Duell <tdu...@iinet.net.au>
wrote:

> On Tue, 12 Jan 2016 15:30:37 +1100, David W. Jones Yes OK, but here I
> reckon that is the crop size, but I may be on the wrong track
> Stay tuned, I'll see if I can find a suitable test project and try it
> out.

It pays to run a test to refresh the memory of just what does go on...as
opposed to what one thought went on :-)
The canvas size appears to only be affected by the FOV sliders in the Fast
Preview window, and the output pano size is set by the crop boundaries,
when using the GUI...but you knew all that.
You may be able to manhandle the canvas size to a what you desire by
manually setting VFOV and HFOV, but that would probably also require that
the cropped pano was centred in the FPW. I haven't tried that.

David W. Jones

unread,
Jan 12, 2016, 2:00:35 AM1/12/16
to hugi...@googlegroups.com
Yah, I twiddled with the canvas size by manually tweaking VFOV, but that
isn't what I want. (It also gets untweaked by itself, or something.) I
should change my wording on this.

Right now we have the Autocrop tool, which crops out all image parts
that extend beyond an "inner" rectangular area. I'd like a similar tool
that crops out completely blank areas. So if a properly-aligned
component image happens to extend above or below other images, the
entirety of that image is included in the crop.

This would make fine cropping easier, since Hugin won't let us zoom in
when cropping. As it is on this image, I adjust the crop but can only
see the results by stitching it. This image takes approximately 8 hours
to stitch, so making fine adjustments is very slow.

I also wondered if reducing the blank areas of the canvas would speed up
stitching, but I don't really know how the canvas is related to the
panorama as a whole, anyway.

Maybe a Hugin Python script could do this?
Reply all
Reply to author
Forward
0 new messages