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. |
31st October 2006, 12:56 | #1 | Link |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
Image enhancement using watershed technique
I have recently authored two plugins using Segmentation by watershed algorithm.
SegmentedAmp plugin smooths image within the basin boundaries and also accentuates the boundaries. By preprocessing the image to reduce over_segmentation, image can be enhanced. ReTouch plugin in addition to segmentation uses flood fill technique to stretch image values within the basin boundaries or shifts or replaces by the lowest or highest value within each basin. I have used an image which appeared in one of the threads and didee wove a magic spell around it. http://forum.doom9.org/showthread.php?t=115181 The result from using segmentedAmp are : Top row are inputs with various preprocessing plugins. Result with ReTouch is : On right is processed using retouch and other plugins. Only spatial processing has been done. More details are at my plugin page. |
31st October 2006, 14:14 | #3 | Link | |
Registered User
Join Date: Feb 2006
Posts: 1,076
|
Quote:
Hmmm, I try to understand what your explination actually means, but im at a loss. May I ask for some some extra info/explination (read this as a request for a noob-translation ) |
|
1st November 2006, 04:39 | #6 | Link | ||
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
Quote:
Quote:
Watershed in more detail is availble through Google search. |
||
1st November 2006, 05:58 | #7 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
vcmohan,
please replace 'ZIP' to 'zip' extention in your new web page links. Also check (and fix) your new 'JPG' links, such as http://www.avisynth.org/vcmohan/Reform/Reskewed2.JPG
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick I usually do not provide a technical support in private messages. Last edited by Fizick; 1st November 2006 at 06:08. |
1st November 2006, 08:25 | #8 | Link |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
Yes. Corrected. As on my windows system capitalization has no effect my testing it did not catch it. Thanks for pointing out.
Instead of downloading the dlls the writeup can be seen at http://www.avisynth.org/vcmohan/ReTouch/ReTouch.html http://www.avisynth.org/vcmohan/Segm...mentedAmp.html |
1st November 2006, 09:44 | #9 | Link | |
Registered User
Join Date: Feb 2006
Posts: 1,076
|
Quote:
Thx, i think i get the general idea now. I'll look into the plugins for more info too |
|
1st November 2006, 10:06 | #10 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
A couple minor bugs in SegmentedAmp:
The docs seem slightly out of date. useclip is default true, not false, and connect4 is now c4. Also, uv=false doesn't actually disable chroma processing. Neat effect though. Occasionally corrupts avisynth's memory (goofy errors like can't locate decompressor, entirely black screen, that sort of thing), but not very reproducable and hasn't crashed yet. Last edited by foxyshadis; 1st November 2006 at 10:08. |
3rd November 2006, 03:10 | #11 | Link | ||
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
Quote:
Quote:
|
||
4th March 2007, 14:07 | #12 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
In testing lots of filters for this one extremely difficult image (a print scan with a great deal of halftoning patterns), SegmentedAmp performed the best by far in concert with some other filters. The memory allocation pattern won't work for this sort of image, but I can work around that no prob with a quick change. (Probably wasn't expecting many 4000x2000 frames...)
But the problem I'm running into is that it doesn't do any smoothing at all on the segment lines. Removegrain is a great help, but it still comes out looking like cracking paint on canvas. Here's a progression to show how it goes, with the effect exaggerated with levels: Otherwise, it's the only thing that can take care of screening without objectionable artifacts. (Although AdaptiveMedian made some pretty neat-o brush-stroke artifacts.) If I have to I'll just mod the filter to output a mask of the segment divisions, but since you're the master, I figure you'd know of a better way. If it matters, the exact use is: Code:
clip2=removegrain(17).removegrain(17).mipsmooth(preset="AnimeLQ",temporal=255,temporal_chroma=255,spatial = 255).fft3dfilter(bt=1,sigma=10,sigma2=10,sigma3=10,sigma4=5,plane=4) SegmentedAmp(sclip=clip2,useclip=true,c4=false) clip2=removegrain(17).removegrain(17).mipsmooth(preset="AnimeLQ",temporal=255,temporal_chroma=255,spatial = 255).fft3dfilter(bt=1,sigma=10,sigma2=10,sigma3=10,sigma4=5,plane=4) SegmentedAmp(sclip=clip2,useclip=true,c4=false) |
5th March 2007, 03:18 | #13 | Link |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
Just plain watershed filter outputs basins or basin boundaries or both. May be you may be able to get a mask from it. Using a blurred image for input to watershed will reduce number of segments. The sharpen parameter is to treat the segment boundary lines. Try using different values.
Last edited by vcmohan; 6th March 2007 at 03:55. |
|
|