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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th August 2007, 05:06   #1  |  Link
adrianmak
Registered User
 
Join Date: Apr 2006
Posts: 127
defect appeared after applying FastLineDarkenMOD

I simply applied FastLineDarkenMOD() without any parameters.

the result is defect on the video

original



FastLineDarkenMOD applied

adrianmak is offline   Reply With Quote
Old 19th August 2007, 05:56   #2  |  Link
TheRyuu
warpsharpened
 
Join Date: Feb 2007
Posts: 787
First off, nothing to do with the problem but why are you using a line darkener on a live action source...?

Second, for me to get rid of the green, I just disable thinning since I really don't find any use in it anyway.

Code:
fastlinedarkenMOD(thinning=0, strength=50)
But is there really any point to using it on something thats not cartoon/animation/anime?

Edit:
I can't really tell, but is that first picture animated? (hard to tell, in that case fine, use it )

BTW, were did you get that, and why is it so blocky? (unless it's zoomed or something)

Last edited by TheRyuu; 19th August 2007 at 05:58.
TheRyuu is offline   Reply With Quote
Old 19th August 2007, 14:23   #3  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,393
Referring to the FstLineDarkenMOD script that was posted here:

There's a small error in the script, when thinning is used. Correct is below:

Code:
#############################
# FastLineDarken 1.3 MT MOD #
#############################
#
# Written by Vectrangle, last update 12 Sept 04
#
#  * requires masktools 1.5.1 -- http://jourdan.madism.org/~manao/
#  * requires yv12 input
#
# Usage is FastLineDarken(strength, luma_cap, threshold, thinning),
#   named parameters are supported eg FastLineDarken(thinning=0)
# 
# Note that you must import this avs into your script using import("...\FastLineDarken.avs")
#
# Parameters are:
#  strength (integer)  - Line darkening amount, 0-256. Default 48. Represents the _maximum_ amount
#                        that the luma will be reduced by, weaker lines will be reduced by
#                        proportionately less.
#  luma_cap (integer)  - value from 0 (black) to 255 (white), used to stop the darkening
#                        determination from being 'blinded' by bright pixels, and to stop grey
#                        lines on white backgrounds being darkened. Any pixels brighter than
#                        luma_cap are treated as only being as bright as luma_cap. Lowering
#                        luma_cap tends to reduce line darkening. 255 disables capping. Default 191.
#  threshold (integer) - any pixels that were going to be darkened by an amount less than
#                        threshold will not be touched. setting this to 0 will disable it, setting
#                        it to 4 (default) is recommended, since often a lot of random pixels are
#                        marked for very slight darkening and a threshold of about 4 should fix
#                        them. Note if you set threshold too high, some lines will not be darkened
#  thinning (integer)  - optional line thinning amount, 0-256. Setting this to 0 will disable it,
#                        which is gives a _big_ speed increase. Note that thinning the lines will
#                        inherently darken the remaining pixels in each line a little. Default 24.
#
# Changelog:
#  1.3  - added ability to thin lines, now runs much slower unless thinning=0. Changed the defaults (again)
#  1.2  - huge speed increase using yv12lutxy =)
#       - weird darkening issues gone (they were caused by yv12layer)
#       - show option no longer available due to optimizations. Use subtract() instead
#  1.1  - added luma_cap option
#  1.0  - initial release
#


function FastLineDarkenMOD( clip c, int "strength", int "luma_cap", int "threshold", int "thinning") 
{
## parameters ##
str 	= string(default(strength, 48) /128.)
lum 	= string(default(luma_cap, 191))
thr 	= string(default(threshold, 4))
thinning = default(thinning,24)
thn 	= string(thinning /16.)

## filtering ##
exin	= c.mt_expand().mt_inpand()
diff 	= mt_lutxy(c,exin,yexpr="y "+lum+" < y "+lum+" ? x "+thr+" + > x y "+lum+" < y "+lum+" ? - 0 ? 127 +",uexpr="x",vexpr="x",u=2, v=2)
linemask= mt_lut(diff.mt_inpand(),"x 127 - "+thn+" * 255 +").mt_convolution("1 1 1","1 1 1",y=3,u=0,v=0)
thick 	= mt_lutxy(c, exin, yexpr="y "+lum+" < y "+lum+" ? x "+thr+" + > x y "+lum+" < y "+lum+" ? - 0 ? "+str+" * x +",uexpr="x",vexpr="x",u=2, v=2)
thin 	= mt_lutxy(c.mt_expand(U=2,V=2),diff,yexpr="x y 127 - "+str+" 1 + * +",u=2, v=2)

return (thinning == 0) ? thick : mt_merge(thin,thick,linemask,y=3,u=2,v=2)
}
Note the small red addition near the end of the script. That's all.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.