[hugin-ptx] Re: GSoC2008_masking

2009-09-22 Thread Yuval Levy

Gerry Patterson wrote:
> Hi All,
> 
> Based on the responses from this thread I can glean the following:
> 
>- Masks should be stored as vector paths and attached to the project
>(pto) files
>- Editing the masks in the preview is desirable.
>- positive masking is as useful as negative masking.
> 
> Strange that those three things are opposite what I normally do or thought I
> would use.  I had originally proposed a simple alpha channel editor with
> paint brushes. I can see the advantages of the above listed points, I am
> just surprised at consistency of the replies.
> 
> Perhaps I need to revisit my workflow :-)

it's the difference between what's available and what is wishful. our 
current workflows are the result of what's available.

I end up saving panoramas as multi-layer PSD documents, and I burn the 
positive and negative masks with brushes on the alpha channel. I wish I 
could save them as .pto files, with the masks vectorial as described by 
Bruno, and only the final result in a PSD or TIFF.

Yuv



--~--~-~--~~~---~--~~
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 hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---



[hugin-ptx] Re: GSoC2008_masking

2009-09-22 Thread Gerry Patterson
Hi All,

Based on the responses from this thread I can glean the following:

   - Masks should be stored as vector paths and attached to the project
   (pto) files
   - Editing the masks in the preview is desirable.
   - positive masking is as useful as negative masking.

Strange that those three things are opposite what I normally do or thought I
would use.  I had originally proposed a simple alpha channel editor with
paint brushes. I can see the advantages of the above listed points, I am
just surprised at consistency of the replies.

Perhaps I need to revisit my workflow :-)

Best Regards,

- Gerry

--~--~-~--~~~---~--~~
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 hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---



[hugin-ptx] Re: GSoC2008_masking

2009-09-22 Thread Bruno Postle

>I am looking at this to scratch an itch.  I don't like having to load my
>images into another program to edit the alpha channel.  My needs are
>pretty basic as I had only considered negative masking and really just a
>way to paint out certain areas before the remapping and blending.  So
>one could consider that a use case.  I know there are others.

>In this case, I thought adding the masking interface to the crop tab
>would be the best place, as one is attempting to acomplish basically the
>same thing: remove undesired parts from the source image. Typically, I
>would just want to paint in the mask with varying sizes of soft brushes.

I think the masks should be polylines rather than bitmaps, this way 
they can be stored in the .pto project itself.

There would need to be the facility for more than one loop per input 
photo, hand-drawn loops would need to be able to extend outside the 
image canvas and overlap with each other without failing.

Although editing the masks in the remapped projection (i.e. in the 
preview) makes a lot of sense, they need to be stored in the same 
coordinate space as the original photo and converted back and forth 
for use.  Otherwise just dragging the panorama or optimising would 
invalidate the masks (this is one of the drawbacks of using 
tiff2svg/inkscape/enblend-svg).

Having said that, initially a simple editor in the 'photo' space, 
just an extension of the Crop tab would still be very useful.  This 
wouldn't require any code to remap polyline coordinates.

If converting back and forth is it likely that spline curves would 
survive the transformation better than straight edged polygons.

The way the masks should operate is at the nona stage, masked-out 
areas shouldn't be sampled, and as a result will become 100% 
transparent in the files that are sent to enblend/enfuse.

>Positive masking would be some what tricky since, as far as I know, the
>only way to guarantee an area of one image will definately appear is to
>apply a negative mask to all of the overlapping images of the area.  Is
>that correct?

That's right, but it works very well.  I would expect that in a full 
implementation positive and negative masking would be used equally.

-- 
Bruno

--~--~-~--~~~---~--~~
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 hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---



[hugin-ptx] Re: GSoC2008_masking

2009-09-22 Thread Yuval Levy

Harry van der Wolf wrote:
> Gamin and FAM do not exist on OSX. There are several third-party (free,
> shareware and commercial) tools for OSX (some based on the kevent() kernel
> event) that do the same, but nothing "official".

let's hope they implemented it in wxWidgets.

wxFileSystemWatcher seems to be scheduled for 2.9.1



2.9.0 was released two weeks ago.

Yuv

--~--~-~--~~~---~--~~
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 hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---



[hugin-ptx] Re: GSoC2008_masking

2009-09-22 Thread Yuval Levy

Bruno Postle wrote:
> On Unix you use gamin/FAM to ask the system to tell the application 
> if a file has changed, it is possible wxwidgets has a cross-platform 
> abstraction for this.

Googling a bit I found it was suggested as GSoC 2007 project but not 
implemented back then.


I found mentions of wxFAM in their mailing list as early as 2004.

Then, with a little bit more digging, I got lucky:



wxFSwatcher was a GSoC 2009 project.



it is in their SVN, waiting to go into their trunk. I can't wait for us 
to bump up the wxWidgets version required to build Hugin :-)

Yuv

--~--~-~--~~~---~--~~
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 hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---



[hugin-ptx] Re: GSoC2008_masking

2009-09-22 Thread Harry van der Wolf
2009/9/22 Bruno Postle 

>
>
> On Unix you use gamin/FAM to ask the system to tell the application
> if a file has changed, it is possible wxwidgets has a cross-platform
> abstraction for this.
>
> --
> Bruno
>

Gamin and FAM do not exist on OSX. There are several third-party (free,
shareware and commercial) tools for OSX (some based on the kevent() kernel
event) that do the same, but nothing "official".

Harry

--~--~-~--~~~---~--~~
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 hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---



[hugin-ptx] Re: GSoC2008_masking

2009-09-22 Thread Bruno Postle

On Tue 22-Sep-2009 at 08:14 -0400, Yuval Levy wrote:
>c) checks in the background for changes by external program (i.e. the
>timestamp check you suggest) and reloads if necessary (or warns if the
>image is no longer available).
>
>I think the only way to implement (c) is with a timer - I am not aware
>of the possibility to "watch" a file for changes. But checking
>timestamps should not be too time consuming, so doing it once a minute
>or so should be enough.

Applications that do this sort of checking in a loop really mess up 
power saving features of operating systems.

On Unix you use gamin/FAM to ask the system to tell the application 
if a file has changed, it is possible wxwidgets has a cross-platform 
abstraction for this.

-- 
Bruno

--~--~-~--~~~---~--~~
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 hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---



[hugin-ptx] Re: GSoC2008_masking

2009-09-22 Thread Yuval Levy

Carl von Einem wrote:
>> Carl von Einem wrote:
>>
 Would a few people please give me some examples of how they would like 
 to use masking within Hugin?
>>> Today I often enough have to edit masks of images that are already
>>> loaded in a hugin project. To see the difference I need to newly load
>>> the whole project. I'd prefer a button in the preview window that allows
>>> to just reload all images (or maybe also just one).
> 
> Maybe it's not such a good idea to add yet another button to the preview
> window.
> As a possible interface I'd suggest a pop-up window just like the CP
> list (instead of F3 maybe option+F3), only with a list of loaded images.

I think there are two separate issues here: one is editing the mask and 
the other is updating the images in the project to make the edits visible.

Abstracting for a moment if a pop-up or an extra-tab (I prefer the 
latter), the current status of the masking [editor] is a list of 
(loaded) images, exactly like the preview - it actually "borrowed" its 
user interface, which should make it convenient e.g. to see where the 
selected mask lands on an underneath picture by activating / 
deactivating pictures in the tabs.


> When that window is opened it compares the time stamp of the actual file
> on disk with the time stamp of the originally loaded version. One
> 'update' button to reload the marked image file, also one 'update all
> modified files' button would be great.
> I have a screenshot from a similar window that is used in QuarkXPress.
> http://einem.net/panotools/hugin/

If I understand the mockup correctly, we don't really need it (sorry). 
An appropriate update mechanism can and should be automated.

Currently, opening a project is a relatively fast operation when the 
preview window is closed. The cost of this operation is that when I 
click on the preview button for the first time, it loads each individual 
image (look at the status bar); and this takes a lot of time (on my 
dyno-book 1.6GHz 2GB RAM 5400RPM HDD it took long enough to load 23 
images that I almost finished this paragraph in the meantime).

The logic does not require human intervention, just a smarter image 
cache that
a) load the images automatically in the background (assuming there is 
enough image cache memory. if it reaches the limit, it should test if 
more memory is available in the system and suggest to the user to change 
the preferences setting - currently the default is 75MB).
b) is triggered by actions, such as editing a mask, to reload the image 
automatically - no human intervention here
c) checks in the background for changes by external program (i.e. the 
timestamp check you suggest) and reloads if necessary (or warns if the 
image is no longer available).

I think the only way to implement (c) is with a timer - I am not aware 
of the possibility to "watch" a file for changes. But checking 
timestamps should not be too time consuming, so doing it once a minute 
or so should be enough.

Yuv

--~--~-~--~~~---~--~~
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 hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---



[hugin-ptx] Re: GSoC2008_masking

2009-09-22 Thread Carl von Einem

> Carl von Einem wrote:
> 
>>> Would a few people please give me some examples of how they would like 
>>> to use masking within Hugin?
>> Today I often enough have to edit masks of images that are already
>> loaded in a hugin project. To see the difference I need to newly load
>> the whole project. I'd prefer a button in the preview window that allows
>> to just reload all images (or maybe also just one).

Maybe it's not such a good idea to add yet another button to the preview
window.
As a possible interface I'd suggest a pop-up window just like the CP
list (instead of F3 maybe option+F3), only with a list of loaded images.
When that window is opened it compares the time stamp of the actual file
on disk with the time stamp of the originally loaded version. One
'update' button to reload the marked image file, also one 'update all
modified files' button would be great.
I have a screenshot from a similar window that is used in QuarkXPress.
http://einem.net/panotools/hugin/

Should I submit a feature request?

Carl

--~--~-~--~~~---~--~~
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 hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---



[hugin-ptx] Re: GSoC2008_masking

2009-09-21 Thread Yuval Levy

Carl von Einem wrote:
> I always prefer (if possible) to save masks as paths

me too.


>>  Original Message 
>> In any case, below is how I would integrate masking into my workflow. 
>> Please understand this is one case, and an example only.
>>
>> 1. capture images
>> 2. convert raw to tiff (or some other lossless format)
>> 3. load images into hugin
>> 4. load stored lens data, (crop circle and distortion params)
>> 5. create control points
>> 6. pairwise optimize to get rough position
>> 7. mask out problem/undesired areas.
>> 8. cleanup/tweak control points (reoptimizing as necessary)
>> 9. generate final output

I rather have 7 before 5, although it is an iterative process 
(especially if you want to consider positive masking as well).


>> Below is what I do now:
>>
>> 1. capture images
>> 2. convert raw to tiff (or some other lossless format)
>> 3. load images into gimp, mask out areas I don't want. (tripod, pano
>> head)
>> 4. load images into hugin
>> 5. load stored lens data, (crop circle and distortion params)
>> 6. create control points
>> 7. pairwise optimize to get rough position
>> 8. realize there are other places I want/need to mask out.
>> 9. Determine which images I need to edit mask by using the preview
>> window.
>> 10. save and exit hugin
>> 11. reload images into gimp and update the mask again
>> 12. load the previously saved project in hugin
>> 13. cleanup/tweak control points (reoptimizing as necessary)
>> 14. generate final output
>>

sounds very similar to what I do, although I don't doo pairwise 
optimization - I lay the images out roughly based on the shooting 
pattern. Probably pairwise CP detection and optimization would increase 
the speed and accuracy of my process if scripted/automated but I have 
not taken the time to do so - results are sufficient when detecting and 
optimizing the whole thing.


>> In this case, I thought adding the masking interface to the crop tab 
>> would be the best place, as one is attempting to acomplish basically the 
> 
> I'd prefer an interface for masking that can display two different
> images side by side, e.g. the CP editor tab. That way I can quickly
> decide which parts in one image are better that parts in another.

indeed, I think this is the reason why Fahim implemented it in preview 
mode - makes it easier to decide which parts in one image are better 
than parts in another; enable to deal with distortions at zenith and 
nadir (change the perspective / view to something convenient, do the 
masking; change it back) and enables positive masking (apply the mask's 
shape to all underlying images - in positive and negative as necessary).


>> Positive masking would be some what tricky since, as far as I know, the 
>> only way to guarantee an area of one image will definately appear is to 
>> apply a negative mask to all of the overlapping images of the area.  Is 
>> that correct?
> 
> You could also order the images in a different way (move up or down in
> images tab) which somehow makes a difference for enblend. I'd love to be
> able to control that behaviour better, e.g. by using positive masking.

image ordering is not as effective as proper positive masking - for 
which I also see "apply negative mask to all of the overlapping images 
of the area" as the only way to guarantee it, as Gerry stated.


>> Would a few people please give me some examples of how they would like 
>> to use masking within Hugin?
> 
> Today I often enough have to edit masks of images that are already
> loaded in a hugin project. To see the difference I need to newly load
> the whole project. I'd prefer a button in the preview window that allows
> to just reload all images (or maybe also just one).

keep them coming
Yuv

--~--~-~--~~~---~--~~
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 hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~~~--~~--~--~---



[hugin-ptx] Re: GSoC2008_masking

2009-09-21 Thread Carl von Einem

I always prefer (if possible) to save masks as paths, ideally in an
external file. Saving masks in 16 bit tiffs results in huge files...

Yuval Levy wrote:
> I think this excellent analysis and request for *user scenarios* belongs 
> in the public mailing list. This is an opportunity for users to help 
> shape up a feature.
> 
> Thank you, Gerry, Fahim and Daniel for this.
> 
> Yuv
> 
>  Original Message 
> From: Gerry Patterson
> 
> Hello All,
> 
> I have the maskeditor up and running.  It is a little unstable right 
> now, but I most of the segfaults are repeatable, meaning they should be 
> able to be worked out fairly quickly.  I have not had much luck with the 
> masking editor in the legacy preview window.  In the stand alone app I 
> have been able to load a stack of images and save off masks in tiff 
> format for each image. I created them with the PolyEd_Basic mode.  When 
> I tried loading remapped images from nona, the transparent areas are 
> filled with black. Fahim had mentioned this would happen.
> 
> So.
> 
> I am looking at this to scratch an itch.  I don't like having to load my 
> images into another program to edit the alpha channel.  My needs are 
> pretty basic as I had only considered negative masking and really just a 
> way to paint out certain areas before the remapping and blending.  So 
> one could consider that a use case.  I know there are others.
> 
> After watching the video linked to the gsoc2008_masking page [1][2].  I 
> remembered what this whole lazy snapping thing was.  It is very 
> impressive.  I haven't been able to get that working though in the stand 
> alone app.  Perhaps I am doing it wrong.
> 
> In any case, below is how I would integrate masking into my workflow. 
> Please understand this is one case, and an example only.
> 
> 1. capture images
> 2. convert raw to tiff (or some other lossless format)
> 3. load images into hugin
> 4. load stored lens data, (crop circle and distortion params)
> 5. create control points
> 6. pairwise optimize to get rough position
> 7. mask out problem/undesired areas.
> 8. cleanup/tweak control points (reoptimizing as necessary)
> 9. generate final output
> 
> Below is what I do now:
> 
> 1. capture images
> 2. convert raw to tiff (or some other lossless format)
> 3. load images into gimp, mask out areas I don't want. (tripod, pano
> head)
> 4. load images into hugin
> 5. load stored lens data, (crop circle and distortion params)
> 6. create control points
> 7. pairwise optimize to get rough position
> 8. realize there are other places I want/need to mask out.
> 9. Determine which images I need to edit mask by using the preview
> window.
> 10. save and exit hugin
> 11. reload images into gimp and update the mask again
> 12. load the previously saved project in hugin
> 13. cleanup/tweak control points (reoptimizing as necessary)
> 14. generate final output
> 
> In this case, I thought adding the masking interface to the crop tab 
> would be the best place, as one is attempting to acomplish basically the 

I'd prefer an interface for masking that can display two different
images side by side, e.g. the CP editor tab. That way I can quickly
decide which parts in one image are better that parts in another.

> same thing: remove undesired parts from the source image. Typically, I 
> would just want to paint in the mask with varying sizes of soft brushes. 
>   The segmentation lazy snapping would be cool but the hard edges 
> wouldn't be required as the blending should take care of things.
> 
> Positive masking would be some what tricky since, as far as I know, the 
> only way to guarantee an area of one image will definately appear is to 
> apply a negative mask to all of the overlapping images of the area.  Is 
> that correct?

You could also order the images in a different way (move up or down in
images tab) which somehow makes a difference for enblend. I'd love to be
able to control that behaviour better, e.g. by using positive masking.

> Would a few people please give me some examples of how they would like 
> to use masking within Hugin?

Today I often enough have to edit masks of images that are already
loaded in a hugin project. To see the difference I need to newly load
the whole project. I'd prefer a button in the preview window that allows
to just reload all images (or maybe also just one).

Carl

--~--~-~--~~~---~--~~
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 hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~--~~-