[reformatted]
On Saturday, 4 August 2018 at 2:42:31 -0700, Capri Flyhennessy wrote:
> On Saturday, August 4, 2018 at 2:52:15 AM UTC+2, Groogle wrote:
>> On Friday, 3 August 2018 at 11:08:00 -0700, Capri Flyhennessy wrote:
>>>
>>> I am quite new to Hugin but I am writing a bash script to
>>> automatically run through all of my panoramas and I have bumped
>>> into an irritating issue that I do not really know how to fix.
>>> The whole process works but I would like it to crop the stitched
>>> image to the largest possible area where my pictures are and not
>>> for it to always crop the top part (sometimes it crops the sides
>>> as well).
>>>
>>> Is there something I am missing to automatically fix this, it
>>> doesn't seem such a far fetched thing.
>>
>> Clearly the "autocrop??? feature in the GUI works, so it should be
>> possible. Can you post your bash script? I'm doing something
>> similar, but I haven't looked at cropping yet.
>
> Well in the GUI it also has issues like the top part not being in
> the canvas and I have to manually remove all of the empty space at
> the bottom.
This is beginning to look like an issue with your images.
> This is the part of my bashscript that deals with the creation of the
> panorama:
>
> pto_gen -o project.pto *.jpg
> cpfind -o project.pto --multirow --celeste project.pto
> cpclean -o project.pto project.pto
> linefind -o project.pto project.pto
I've found that linefind pessimizes my images, which contain a number
of trees that are not all vertical. But it doesn't look like this is
your issue.
> autooptimiser -a -m -l -s -o project.pto project.pto
> pano_modify -s -c --fov=AUTO --output-type=N --ldr-file=TIF --ldr-compression=LZW --canvas=AUTO --output=project.pto project.pto
> hugin_executor --stitching --prefix="$PANONAME" project.pto
Apart from that, that's pretty much what I do (I've now looked at
cropping), and "it works for me".
On Saturday, 4 August 2018 at 2:46:36 -0700, Capri Flyhennessy wrote:
> On Saturday, August 4, 2018 at 7:51:47 AM UTC+2, Marius Loots wrote:
>>
>> Hi,
>>
>> Friday, August 3, 2018, 8:08:00 PM, you wrote:
>>> The whole process works but I would like it to crop the stitched
>>> image to the largest possible area where my pictures are and not for
>>> it to always crop the top part (sometimes it crops the sides as well).
>>
>>> Is there something I am missing to automatically fix this, it
>>> doesn't seem such a far fetched thing.
>>
>> Cropping as it currently works will select an area so that there are
>> no empty spaces. There isn't an option - that I am aware of - to crop
>> to maximal area. I do that by hand in each case.
>
> Could you explain the "no empty spaces" a bit more because isn't the bottom
> part empty space? Is there some data there? Why is it even so big?
I'd use the term "hole" rather than "empty space". If there's an
undefined area in the middle of the image, cropping will avoid it.
But this doesn't seem to be your issue.
On Saturday, 4 August 2018 at 7:10:09 -0700, Capri Flyhennessy wrote:
> Hi,
>
> I also wanted to add that I am not sure why this is happening but when
> stitching panorama's. Sometimes the stitch outright fails.
What's the error message?
> I have added an example of this. The only way to fix it, that I have
> found, is to rerun the stitching part of Hugin. I there a way I can
> avoid this?
Are you saying that you run your script, and the hugin_executor fails,
that you re-run just that part, and it works? If so, you really need
to look at those error messages.
> <
https://lh3.googleusercontent.com/-r3N-QWisEbE/W2WzZ9P4GGI/AAAAAAAABHg/iD24A-TlrkAmEn73KJs476XpNHFx9HhCACLcBGAs/s1600/pano_incorrect_stitching.jpg>
What I see here is that the cropping didn't work at all. Maybe a
little masking would help. One difference between my script and yours
is that after creating the project files, control points and cropping,
I start the GUI to play around with the results. Then I save the
project file and let hugin_executor finish it off.
Maybe it's worth putting your files (source image and project file) up
for us to take a look at.