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. |
21st August 2016, 14:03 | #41 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Just do something like
Code:
#ImageSource("1471688026-dk3-original-picture.png",end=0) ImageSource("1471598760-dk3-image-originale-basse-definition.png",end=0) RGB_test()
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
21st August 2016, 14:30 | #43 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
As I said previously, the plugin was created to try to bring out detail on a car number plate, a Doom9 user had been robbed by a burglar,
but the user had captured footage of the burglar's vehicle. The r,g,b stuff is irrelevant here, just ignore it. Only the SZ arg is of any use and multiplies the original size in odd number steps from 1 (no change) up to 9 where result would be 9*Original_Width x 9*Original_Height. I only posted because the result of SZ=5, seemed to me, quite like what you were describing as 'feeling' good. A further resize using point resize or whatever would be needed to convert to final requirement. EDIT: Resize, and/or Addborders. EDIT: Below resizer, thick black lines mark original source pixels. Thin (dotted) black lines mark the output pixels (where SZ=5). The red square is an OUTPUT pixel, and is sum of the input micro pixels marked in purple (but then divided by SZ*SZ). EDIT: AVS script to create grid using Grid() by V.C Mohan (colored in by hand) Code:
SZ=5 BlankClip(Width=256,height=256,color=$FFFFFF) grid(Bold=SZ,vbold=1) I have never looked at any resize code before, so no idea if same (The original reason for doing as above was to achieve the color mods simultaneous to resize and without any additional error due to rounding).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 16th July 2017 at 03:19. |
21st August 2016, 16:16 | #44 | Link | ||
French Registered User
Join Date: Aug 2016
Location: France
Posts: 333
|
Quote:
Quote:
I'll be back later I must move a bit |
||
21st August 2016, 17:27 | #45 | Link | |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
Quote:
|
|
21st August 2016, 18:49 | #47 | Link |
French Registered User
Join Date: Aug 2016
Location: France
Posts: 333
|
I tried the Grid StainlessS, but I just have a grid
I really don't understand how it works Edit : I think I understand the role of this filter now I thought it was for an other thing. It's a good idea Last edited by SuperLumberjack; 21st August 2016 at 19:07. |
21st August 2016, 23:25 | #50 | Link |
French Registered User
Join Date: Aug 2016
Location: France
Posts: 333
|
I thought one thing when I saw this video (very interesting ) :
https://youtu.be/RAi8AVj9GV8 The feeling is associated to the technology of the era too. The scanlines give to the image an illusion of more 3D and definition. So my last scripts are more in this direction and I tried to get more relief, but without scanlines. I will upload a new video where we see the effect of the scanlines too But I had to upsize the image 4X because I lost a lot with the colors after the convertion of RGB24 to YV12. In RGB24, we see better the benefit of scanlines in this lower resolution : And I used the trick of the grid for the last script of my video. It's very useful ! Last edited by SuperLumberjack; 21st August 2016 at 23:28. |
22nd August 2016, 01:24 | #51 | Link |
French Registered User
Join Date: Aug 2016
Location: France
Posts: 333
|
I finished ti upload my new video
Here is the first : https://youtu.be/-Q6fyxXDTJU Here is the second : https://youtu.be/Zex-66qtzOk (see in 1080p full screen) Can you tell me what image you prefer please ? But don't cheat, don't look the scripts in the description please ! |
22nd August 2016, 02:49 | #52 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
I have no Super NES childhood feeling (it was before my time), so my opinion is worth nothing, BUT I like "Original with scanlines." It might get tiring to watch after a while though, maybe it should be softened? Second choice would be "Script 3." It seems a tiny bit sharper than the others, I'm not sure. I would like to see it sharper still.
I've got a little idea for a sharp, pixelated look, with very dim scanlines, plus a subtle bloom effect: Screen shot, slightly out of date; too lazy to upload a new image. EDIT complete script with no dependencies except MaskTools AFAIK Code:
## requires: MaskTools2 ImageSource("...", pixel_type="RGB32") #<source=RGB> ## upscale "point-wise" to half scale ## (Gauss p=100 is sharp like PointResize, but works at non-integer ratios) GaussResize(1408/2, 1080/2, p=100) ## Rec601/Rec709 as required for correct colors ConvertToYV12(matrix="Rec709") ## scanlines effect, set very weak, no flickering scanlines2(2, 0.3, false) ## final upscale (p= 0 to 100 to set sharpness) GaussResize(1408, 1080, p=100) ## subtle bloom effect SoftBloom_B(radius=198, minlevels=219, min=174, max=185, \ threshold=251, sat=0.64, cont=173, mul=0.76) return Last ################################## ### scanlines effect ## http://forum.doom9.org/showthread.php?p=1719572#post1719572 ## function scanlines2(clip C, int "size", float "strength", bool "flicker") { size = Min(Max(1, Default(size, 2)), 4) strength = Min(Max(0.0, Default(strength, 0.25)), 1.0) flicker = Default(flicker, false) C A=mt_lutspa( \ mode="absolute", \ expr=mt_polish("(((y/(2*"+String(0.25*size)+"))%2)>0)?128+64:128-64"), \ u=-128, v=-128 \ ) B = (flicker) \ ? ScriptClip(A, """(current_frame % 2) > 0 ? Last : Last.FlipVertical""") \ : A return Overlay(B, opacity=0.25*strength, mode="luma") } ################################## ## SoftBloom with constrained inputs and resizing ## original by MJLives12 ## @ http://forum.doom9.org/showthread.php?p=1642381#post1642381 ## modded raffriff42 ## @ http://forum.doom9.org/showthread.php?p=1642453#post1642453 ## function SoftBloom_B(clip Last, int "radius", int "minlevels", \ int "min", int "max", int "threshold", int "blur", \ float "sat", int "cont", float "mul") { ## (limits are set based on guesswork; please adjust if needed) radius = Min(Max(2, Default (radius, 2)), Width / 2) edges = (width / radius) + ((width / radius) % 2) #bigger radius smaller effect threshold = Min(Max(16, Round (Default (threshold, 250) * 219 / 255.0) + 16), 255) minlevels = Min(Max(-255, Default (minlevels, 0)), threshold-1) min = Min(Max(threshold+1, Default (min, 254)), 254) max = Min(Max(min+1, Default (max, min+1)), 255) blur = Min(Max(0, Default (blur, 1)), 100) sat = Min(Max(0.0, Default (sat, 0.5)), 4.0) cont = Min(Max(16, Default (cont, 127)), 255) mul = Min(Max(0.0, Float(Default (mul, 0.25))), 4.0) old_wid = Width old_hgt = height new_wid = width / edges new_hgt = height / edges new_wid = Min(Max(64, new_wid), old_wid / 2) new_hgt = Min(Max(64, new_hgt), old_hgt / 2) new_wid = new_wid + new_wid % 2 new_hgt = new_hgt + new_hgt % 2 Mask = ConvertToRGB32().RGBLevelsG(min, 1.0, max, 0, 255) \ .Levels(minlevels, 0.1, threshold, 0, 255, false) \ .ConvertToYV12() \ .GaussResize(new_wid, new_hgt, p = blur) \ .BilinearResize(old_wid, old_hgt) \ .Tweak(sat = sat) \ .Levels(0, 1.0, cont, 0, 255, false) White = BlankClip(Mask).Invert("Y") MT_Merge(MT_lutxy(Mask \ ,uexpr = " y 128 < x y * 128 /" \ ,vexpr = " y 128 < x y * 128 /", U = 3, V = 3), White, luma = true \ ,Merge(Tweak(cont = 0, sat = 0), Mask, mul)) } ################################## ### Levels in RGB mode ## http://forum.doom9.org/showthread.php?p=1642622#post1642622 ## @ StainlessS ## function RGBlevelsG(clip clp, \ int "input_low", float "gamma", int "input_high", \ int "output_low", int "output_high", bool "show_function") { input_low = Default(input_low, 0) gamma = Default(gamma, 1.0) input_high = Default(input_high, 255) output_low = Default(output_low, 0) output_high = Default(output_high, 255) show_function = Default(show_function, false) wicked = (gamma > 1.0) \ ? "x " +string(input_low)+ " - " +string(input_high)+ \ " " +string(input_low)+ " - / 1 " +string(gamma)+ \ " / ^ " +string(output_high)+ " " +string(output_low)+ \ " - * " +string(output_low)+ " + x * x 255 x - * + 255 /" \ : "x " +string(input_low)+ " - " +string(input_high)+ \ " " +string(input_low)+ " - / 1 " +string(gamma)+ \ " / ^ " +string(output_high)+ " " +string(output_low)+ \ " - * " +string(output_low)+ " + 255 x - * x x * + 255 /" return (show_function) ? clp.subtitle(wicked) \ : clp.UUmt_rgblut(wicked, wicked, wicked) } ####################################### ### RGBLUT for MaskTools v.2 ## http://forum.doom9.org/showthread.php?p=1677914#post1677914 ## function UUmt_rgblut(clip C, \ string Rexpr, string Gexpr, string Bexpr, \ bool "showargs") { Assert(C.IsRGB, "UUmt_rgblut: source must be RGB") showargs = Default(showargs, false) ## v = R, y = G, u = B Cy = YToUV(C.ShowBlue("YV12"), C.ShowRed("YV12"), C.ShowGreen("YV12")) Zy = Cy.mt_lut(yexpr=Gexpr, uexpr=Bexpr, vexpr=Rexpr, U=3, V=3) ## R = v, G = y, B = u Z = MergeRGB(Zy.VToY, Zy.ConvertToY8, Zy.UToY, \ pixel_type=(C.IsRGB32)?"RGB32":"RGB24") return (showargs==false) ? Z \ : Z.Subtitle("Rexpr = "+SplitLines(Rexpr, 80), lsp=0, align=7) \ .Subtitle("Gexpr = "+SplitLines(Gexpr, 80), lsp=0, align=4) \ .Subtitle("Bexpr = "+SplitLines(Bexpr, 80), lsp=0, align=1) } #### end main script - the following required only for UUmt_rgblut above if showargs=true ################################## ## function StrReplace(string base, string findstr, string repstr) { pos = FindStr(base, findstr) return (StrLen(findstr)==0) || (pos==0) \ ? base \ : StrReplace( \ LeftStr(base, pos-1) + repstr + \ MidStr(base, pos+StrLen(findstr)), \ findstr, repstr) } ################################## ## Split long lines for Subtitle line wrap; ## tries to split on word boundaries ## with a /very/ basic algorithm. ## ## Example: Subtitle(SplitLines(longstring, 80), lsp=0) ## (remember to add the /lsp/ argument) ## ## @ lastcol - maximum line length before breaking (default 80) ## @ cc - line count, for internal use; leave it alone ## ## On return, global variable /splitlines_count/ ## is set to the number of lines in the string ## this will be needed if you want to bottom-align. ## (splitlines_count==1 means one line & no breaks) ## ## Suggest caller remove line breaks from source argument with: ## StrReplace(Chr(10), "") ## StrReplace(Chr(13), " ") ## function SplitLines(string s, int "lastcol", int "cc") { lastcol = Default(lastcol, 80) cc = Default(cc, 1) global splitlines_count = cc ## dumb split: no word breaks #return (StrLen(s)<lastcol) ? s : #\ TrimLeft(LeftStr(s, lastcol)) + "\n" #\ + SplitLines(MidStr(s, lastcol+1), lastcol, counter+1) ## a little smarter p = FindStr(RevStr(LeftStr(s, lastcol)), " ") return (StrLen(s)<lastcol) \ ? TrimLeft(s) \ : (p < 12) \ ? TrimLeft(LeftStr(s, lastcol-p)) + "\n" + \ SplitLines(MidStr(s, lastcol-p+1), lastcol, cc+1) \ : TrimLeft(LeftStr(s, lastcol)) + "\n" + \ SplitLines(MidStr(s, lastcol+1), lastcol, cc+1) } ################################## ## SplitLines helper: trim spaces from left side of string ## function TrimLeft(string s) { # return (LeftStr(s, 1)==" ") ? TrimLeft(MidStr(s, 2)) : s return Ord(s)==9 ? TrimLeft(MidStr(s, 2)) \ : Ord(s)==10 ? TrimLeft(MidStr(s, 2)) \ : Ord(s)==12 ? TrimLeft(MidStr(s, 2)) \ : Ord(s)==32 ? TrimLeft(MidStr(s, 2)) \ : Ord(s)==160 ? TrimLeft(MidStr(s, 2)) \ : s } Last edited by raffriff42; 16th March 2017 at 22:59. Reason: complete script |
22nd August 2016, 10:06 | #53 | Link |
French Registered User
Join Date: Aug 2016
Location: France
Posts: 333
|
Thanks ! It looks very interesting
But I didn't find where I must download the DLL for SoftBloom And scanlines2, is it the same that scanlines ? I didn't found it either. Here is an extract of the original video for tests : https://mega.nz/#!ihcE0D6b!t7Qz0UZeB...ee75p-36A0iP2U Thanks for your opinion too. Last edited by SuperLumberjack; 22nd August 2016 at 10:10. |
22nd August 2016, 16:59 | #56 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
all you have to do is make sure Masktools v2 is in your autoload plugins directory, change below '...' Code:
ImageSource("...", pixel_type="RGB32") Code:
AviSource("SuperLumberjack.AVI").ConvertToRGB32() Perhaps RaffRiff needs a bigger spoon
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
22nd August 2016, 18:26 | #57 | Link |
French Registered User
Join Date: Aug 2016
Location: France
Posts: 333
|
Ok. Thanks
Yes, I didn't understand why there were URLs in this script. So I wondered what I must take in this script, because it' very big The look is very interesting : I really like this The feeling is nice ! But I can't use it because it's too different with the colors, a bit washed-out. But sentimentally, I like. Thanks again raffriff42 ! You do interesting things. Edit : Maybe I will just try to change the bightness-contrast, because I really love this. It's incredible ! Last edited by SuperLumberjack; 22nd August 2016 at 18:31. |
22nd August 2016, 19:20 | #59 | Link |
French Registered User
Join Date: Aug 2016
Location: France
Posts: 333
|
I just tried the Sony Vegas upscaling with 2 filters, but I'm not convinced.
https://youtu.be/uR7E_mSdovU Now, I will just choose a script et puis voilą ! |
22nd August 2016, 19:24 | #60 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
Agree, it looks nice! Hope it looks as good in a video!
The SoftBloom_B parameters are very un-intuitive - I used a "randomizer" script (from this post) and copied the parameters from a resulting image that looked good to me. Last edited by raffriff42; 22nd August 2016 at 19:27. |
Thread Tools | Search this Thread |
Display Modes | |
|
|