On 23 Okt., 17:17, Robert Krawitz <[email protected]> wrote: > On Sun, 23 Oct 2011 00:59:27 -0700 (PDT), kfj wrote: > > On 22 Okt., 16:49, Robert Krawitz <[email protected]> wrote: > > >> 2) I'd like a more convenient way to delete all control points in a > >> region in an image, with a choice of just deleting all points in > >> that region between a pair of images or all control points. > >> ... > >> The use case I have for this is that I frequently take hand-held > >> landscape panoramas where the foreground is not in alignment > > > I do the same. What I find is that I get good results by simply > > removing all CPs outside a strip along the horizon. I do this using > > my 'crop CPs' plugin. It's a bit of a crutch since you can't select > > a random area - instead it misuses hugin's output cropping feature > > by removing the CPs inside or outside the cropping area. So you're > > restricted to rectangular areas - but usually I find throwing away > > all CPs outside a strip near the horizon does the trick. > > That sounds like a useful starting point (although I often have to > remove points from the sky also, when celeste doesn't do what it > should, and in mountainous regions a rectangle isn't sufficient). Is > this part of the hugin repo, or is it a separate download?
It's in the repo. I've written a bunch of plugins to be distributed with hugin so as to demonstrate what can be done and provide templates which can be modified by other plugin authors. If you get the main branch from the repo, you should have all these plugins. If the wxPython call gives any troubles, it's easy enough to just duplicate the plugin, take out the wx code and make one which removes CPs inside the ROI and one which removes them outside. I wrote the version using wxPython to help fathom on which platforms this technique will be usable - it's really cool to let a plugin display GUI elements like dialog boxes, but if I remember rightly it didn't work everywhere. Since the plugins themselves are pure python code, it should be easy enough to make them do what you want. > The other problem is that in the very early stages, when this would be > most useful, sometimes it's not possible to get something well enough > aligned to do this. I use a sort of brute-force approach. I detect lots of CPs using cpfind with this parameter set in an 'all images at once' setup: --fullscale --sieve2size 5 -o %o %s this gives me around a hundred CPs per matching pair, and cpfind delivers very nicely with few outliers. With this many CPs I usually get the pano to align roughly quite well on the first try. Then I take it from there - I remove the 'worst' CPs and use my 'crop CPs' plugin, sometimes iterating these steps. Often after just one iteration I have a pano that's near perfect along the horizon. > > >> Often cpfind puts so many points in the foreground that the worst > >> error is in the background points -- the ones that I know are good. > >> So I can't simply remove outliers at that point. What I have to do is > >> go to each image pair in turn and go through each point, deleting the > >> ones I don't want. Once I get rid of enough of the foreground points, > >> the remaining ones become the outliers, and then things move much more > >> quickly. Unless there's a particularly strong texture in the > >> foreground (like a crack in the rock), these panoramas usually stitch > >> very well, despite very large error in the foreground. So there's no > >> point in having any points at all in the foreground. My 'lots of CPs approach' - and with the sive2size 5 - seems to avoid the problems you're describing. It pays tweaking the cpfind parameters to deliver the type of CP coverage you feel is appropriate for your content. The documentation for cpfind distributed with hugin has improved a lot recently. > > Looks like you'd be happy to just do just what I do. The trouble is > > that my crop CPs plugin doesn't fully function on all platforms. If > > you're on Ubuntu you're lucky: it'll use wxPython to display a > > little choice box asking if you want to remove the CPs inside or > > outside the cropping area. This may or may not work on other Linuxes > > and Windows. On MacOS there are no plugins yet. And you do need an > > hsi-enabled build. > > I run OpenSUSE 11.3. I know wxPython works in general here, and if > there are problems, I'd be happy to debug them. Nice one. I used Suse back in the 5.X days for a while and thought it good then. I can't see a reason why you should have any problems getting my plugin to run on it, unless there are subtle version conflicts or such. I'm building my hugin from source from the repo, and I suppose this should be possible on your system, too. You need Python >= 2.6 (I think), Swig 2.X, and you have to build with - DBUILD_HSI:BOOL=ON, and once you've installed the plugins should be just there to use (providing you have all python modules it imports). We've made a good effort to make it all automatic, it should really be easy on a Linux system. I doubt there's a ready-made hsi-enabled package for Suse, though - but I might be wrong. > The other problem I have is that there are usually some control points > that cpfind doesn't place correctly. These are very hard to find > until I've purged the foreground CPs. So purging the foreground > points is always the essential first step. For small panoramas with > only 2-4 images it's not too bad, but I often do 10-15 image > panoramas, and I like to use a lot of overlap, which results in > quadratically increasing work (*my* work, not the computer's) to clean > up. Try my cpfind parameters and see if that makes it any better. In my experience, with abundant CP coverage outliers are less of a problem. > I can only think of a handful of panoramas where I actually did need > to perform significant cleanup after the fact; one involved a large > crack in the rock in the extreme foreground, one a shadow that was a > problem in part due to the planetary rotation, and one some balloons > moving. The latter two, of course, were not perspective problems. > Unless I have focus or motion blur problems, it rarely matters even if > I can find the seam, which usually I can't. My plugin has the option to remove CPs inside the ROI. This is precisely so you can set the cropping area to a region you want cleaned of CPs and get rid of them instead of all CPs outside the ROI. It's only rectangles but it works. The principle could be extended. I think someone proposed to allow to draw a mask on the fast preview to define an area where CPs should be removed or kept. I think this type of functionality is so useful that it should become part of hugin proper, but someone has to do it... Kay -- You received this message because you are subscribed to the Google Groups "Hugin and other free panoramic software" group. A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/hugin-ptx
