Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
16th January 2010, 01:45 | #1 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
Fusion - pyramidal image processing for video [experimental]
Even more updated!
The latest version (a rewrite which only implements fuse and fusemask) is at http://horman.net/fusion.zip ____________________________________________________________________________________________________________ Updated: see here This is Fusion, a set (if you can call "two" a set) of filters that use image pyramids to blend clips together (more commonly used in the creation of HDR images and image stitching). I'm not sure it's all that useful for video, but I've written the library now and AviSynth seemed like an interesting way to play with it. As opposed to a normal mix of clips with a mask, the filter fuse(clip1,clip2,mask) will "decompose" frames with a high pass filter, making a stack of different levels of detail. These levels are then blended separately before being recomposed into a final image. A picture paints a thousand words, so: On the left is a "naive" blend with a widely feathered mask. Notice that the stalk is semi-transparent, and the feather line is a little textureless. With multi-level blending, on the right (as output by fuse) textures are preserved and the blending of underlying colour is much wider, yet still preserves features such as the stalk. It fudges up the background - not sure what that's about but I suspect it's just way it works. A possibly more useful application than creating hybrid fruit is in boosting the levels of underexposed video: The mask is a threshold of a blurred copy of the brightened image (top right), and fuse uses this to blend the two different exposures without (or at least, with very little) haloing. The two filters in the current .dll are: Code:
# NB: all input clips must be RGB32 fuse(clip1, clip2, mask) # mask should be black/white only, unless extra blending of fine details is required # in the mask, black represents clip1, white represents clip2 undersharpen(image, level, amount) # this will sharpen/blur only one level of an image # level=0 is the top level, i.e. finest detail # useful values for amount range from -0.33 to +1.00 I'm not yet sure what other applications image fusion may have with video, so if you know of any please let me know and I'll try to implement them. There might (or might not) be good reasons to try extending this to include the temporal dimension... David Last edited by wonkey_monkey; 24th November 2014 at 19:15. |
17th January 2010, 13:18 | #3 | Link |
Registered User
Join Date: Mar 2005
Posts: 366
|
Looks very interesting. I guess with animate this could be used for making some nice mask-transitions too. I will give it a try when I get the time.
__________________
DVD slideshow GUI(Freeware). |
17th January 2010, 14:40 | #4 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
I've updated the filter to include a new parameter, limit, for the fuse filter. This limits the number of levels of pyramid generated and should result in more pleasing wipes. The effective "width" of the wipe, assuming you start with a hard mask, will be approximately 2^limit, so limit=6 will make your wipe about 64 pixels wide, though that only applies to underlying colour, not the details (which is the whole point of the filter).
David |
21st March 2010, 15:02 | #6 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
New version
I've updated fusion.dll to fix a couple of bugs, but mainly to include a new filter, fusemask.
Usage: Code:
fusemask(a,b,exp=0.5) The parameter exp is a target exposure for the mask, and takes values between 0 and 1 (with 0.5 as the default). Some of the "harshness" that is evident in fusion's image can be mitigated slightly by blurring the fusemask. David Last edited by wonkey_monkey; 21st March 2010 at 15:10. |
27th December 2011, 10:18 | #8 | Link |
Registered User
Join Date: Apr 2009
Posts: 138
|
(newbie here)
Plz, could you write an script example of how to use fuse to boost the levels of underexposed video like in the images of your first post? Im interested in create HDR vids. Currently Im using the contrast mask technique.. and it provides better results than HDRAGC Last edited by travolter; 27th December 2011 at 10:21. |
28th December 2011, 06:17 | #9 | Link |
Registered User
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
|
Hi, can you please more exactly or mathematically express, what exactly fuse() does, because it is not clear to me.
Because afaik the point of creating HDR images is having multiple images of one target at different exposures. Which is in case of video hardly achievable. |
28th December 2011, 22:38 | #10 | Link | ||
Registered User
Join Date: Sep 2009
Posts: 378
|
Quote:
Quote:
http://forum.doom9.org/showthread.ph...89#post1547089 |
||
29th December 2011, 16:56 | #11 | Link |
Registered User
Join Date: Mar 2005
Posts: 366
|
A testing script for hdr video shot with the new Magic Lantern EOS hack, with both overlay/blend and Fuse:
Code:
loadplugin("C:\Users\tin2tin\Desktop\Fotos 60D\fusion.dll") loadplugin("C:\Program Files\DVD slideshow GUI\FFmpegSource\ffms2.dll") import("C:\Program Files\DVD slideshow GUI\FFmpegSource\ffms2.avs") v=ffmpegSource2("C:\Users\tin2tin\Desktop\Fotos 60D\MVI_3769.MOV").converttorgb32().ReduceBy2().ReduceBy2() a=selecteven(v) b=selectodd(v) mymask=greyscale(overlay(a,b)).levels(50,1,256,0,256,true) c=overlay(b,a,mask=mymask,opacity=0.5,greymask=true,mode="blend",pc_range=true) Stackvertical(a.subtitle("Dark"),c.subtitle("Blend"),fuse(a,b,mymask.invert()).subtitle("Fuse"),b.subtitle("Light"),mymask.subtitle("Mask"))#, fusemask(a,b,exp=0.3)
__________________
DVD slideshow GUI(Freeware). Last edited by tin3tin; 29th December 2011 at 22:34. |
29th December 2011, 20:32 | #13 | Link |
Registered User
Join Date: Dec 2007
Posts: 17
|
Results are pretty nice. I didn't know this fusion filter even exited. Great!
Combined with the upcoming interframe 2.0 we have everything in one script. Bart ======= from interframe site ============== So now interframe interpolates the missing frames from separate even and odd streams. What would be great is that interframe would use the motionfactors from the opposite frame and tries to recreate that frame as good as possible. I think it could improve quality a lot! Especially on locating walking leg positions or stuff like that. Please tell me your thoughts on this. Bart van den Boogaard Redkitemedia ------------- SubJunk December 23rd, 2011 - 11:19 @Bart, it looks great. Your suggestion is good and it has been developed, along with other upcoming improvements. It is in the private beta stage right now and will be supported in InterFrame 2.0. I guess it will be ready in a month – or two considering the busy time of year. Feel free to link back to this blog anywhere you want, traffic is nice Last edited by PALpilot; 29th December 2011 at 20:34. |
30th December 2011, 14:24 | #17 | Link |
Registered User
Join Date: Dec 2007
Posts: 17
|
I use just this at 720p
v=FFVideoSource("MVI_7980.MOV").converttorgb32().spline36resize(1280,720) a=selecteven(v) b=selectodd(v) mymask=greyscale(overlay(a,b)).levels(50,1,256,0,256,true) c=overlay(b,a,mask=mymask,opacity=0.5,greymask=true,mode="blend",pc_range=true) return c #fuse(a,b,mymask.invert()) ===================== return c = for blend fuse(a,b,mymask.invert()) is for fusing switch them by add or remove the # (comment symbol) Your video has to start with the light frame. Sometimes I need a trim to achieve this. like v=FFVideoSource("MVI_7980.MOV").trim(0,1).converttorgb32().spline36resize(1280,720) |
30th December 2011, 15:15 | #19 | Link |
Registered User
Join Date: Apr 2009
Posts: 138
|
thanks a lot for these scripts examples.. Im anxious to check. I always used contrastmask to create HDR like videos..
http://forum.doom9.org/showthread.php?t=161986 |
30th December 2011, 16:16 | #20 | Link | |
Registered User
Join Date: Dec 2007
Posts: 17
|
Quote:
If anyone want some additional HDR footage from Magic Lantern 600d. I can share. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|