I do quite a lot of panoramas (picture stitching) with hugin. The problem sometimes is that my panoramas contain some black part at the top and bottom as all the pictures weren't all leveled exactly. I think I've read somewhere that Liquid Rescale could be used to address such an issue, ie to help me fill out the missing parts.
How would you do such a thing?
At first I thought of just telling LqR to remove those black parts, but of course I'd like to keep the rest of the image untouch…do you think such a thing is possible?
removing black parts from the sides is possible for sure, you'd just need to mark those areas for discard and use the auto size button in vertical mode (more details about this are in the quick element removal tutorial or in the help page).
However, the rest of the image will also be modified in the regions where those black bands are thinner, but (hopefully) in such a way as to keep the image consistent and as much details as possible (you can fiddle with the advanced options to this end).
so indeed it's quite simple
- I add a discard mask to mark the few top and bottom parts that should be filled
- I add a preservation mask to mark most of my picture
- then I do a LqR + LqR back, using a vertical automatic resize (as I have a horizontal panorama)
Well, here's a little example.
I have a pano where I'm missing some parts like blue sky
What I would like to do is fill those parts.
So I mark the parts to remove and the important features.
Then I do a "LqR + LqR back", using "auto size" (ie it will shrink the picture) and "vertical" only. I get this
Here's the resulting picture (with some transparency) with the original one behind, to check that the important features are left intact.
Here is the final image, ie the resulting picture with no transparency.
The problem is that some blending should be done to merge both pictures in a better way…Here I thought of cutting the picture in 2 and work only on the right part, because there's no important feature at the top of the right part.
Today I tried to work straight with the full picture, and instead of shrinking the pic, I enlarge it, still using the remove and feature layers. The problem I guess is that the building in the middle is too close from the top, thus there's not enough data on top of it. So after doing a LqR + LqR back, vertical only, the building is modified (or maybe there's a problem with the plugin, because sometimes it acts weird). Hum…now that I think of it, I don't really have to do a LqR back…
Well, I'll probably do some new experimentations…if you have any better idea on how to do it…
This case is particularly unfortunate, because of the small sky portion over the white building. However, I did some quick experiments on the small version, and here is my advice:
- use the discard mask on the blank areas as you did (but enlarge it a little bit, e.g. if you used the fuzzy select tool or select by color tool, grow the selection a little bit before painting on it).
- use a presevation mask over the white building in the centre of the picture (the rest is not needed) - just take care to leave as many sky pixeles on the top as possible
- set both strength scales for the masks to full throttle
- use the standard options in the "output" and "advanced" sections
- use LqR only mode (which gives you the maximum control)
- ignore the warnings about enlarging with discard mask
- do some enlargments in small steps, i.e. increase the height by 10-15 pixels each time for some times (this allows for re-using the few available pixels at the top), until you created enough space to compensate for the parts you want to leave
- do a final run with auto-size in vertical mode to remove the bands
This is what I got on the small pic:
About the bottom part, it is more difficult to get good results without loosing parts of the picture or introducing excessive distortions, and the plugin must be “driven” to do its job correctly.
One way to do this is following these steps:
- paint a discard mask as a thin band right above the bottom of the image, like this:
- then, uncheck the "Ignore discard mask when enlarging" option in the "advanced" tab and increase the size a little. This will have the effect to inflate the marked band, and thus create enough room for subsequent removal.
- remove the bottom blank parts, I did it in 2 steps:
Note that I had to delete some part of the preservation mask at the right in the last step to allow the seams cross that region.
- the final result is:
It is far form perfect, of course, but that would (roughly) be the way to go with this kind of picture and this plugin. Further dividing the steps, and being more careful than I was would also help.
Also, using other tools, either for refinement or for the whole task, may yield better results.