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

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th May 2022, 08:37   #21  |  Link
Arx1meD
Registered User
 
Arx1meD's Avatar
 
Join Date: Feb 2021
Posts: 127
I decided to compare two different methods in the Grayworld filter. If you do not look closely, the difference is almost not noticeable. Or I am doing something wrong again.
Code:
so = DSS2("C:\test\underwater.mkv", fps=30.000)
#==========================================================
v1 = so.ConvertBits(32)
v1 = v1.z_ConvertFormat(pixel_type="RGBPS", colorspace_op="709:709:709:f=>rgb:linear:709:f")
v1 = v1.grayworld(cc=0)
v1 = v1.z_ConvertFormat(pixel_type="YUV420", colorspace_op="rgb:linear:709:f=>709:709:709:l")
#==========================================================
v2 = so.ConvertBits(32)
v2 = v2.z_ConvertFormat(pixel_type="RGBPS", colorspace_op="709:709:709:f=>rgb:linear:709:f")
v2 = v2.grayworld(cc=1)
v2 = v2.z_ConvertFormat(pixel_type="YUV420", colorspace_op="rgb:linear:709:f=>709:709:709:l")
#==========================================================
StackHorizontal(so.AddBorders(0, 0, 0, 20).Subtitle("Source", align=2),
\ v1.AddBorders(0, 0, 0, 20).Subtitle("grayworld(cc=0)", align=2),
\ v2.AddBorders(0, 0, 0, 20).Subtitle("grayworld(cc=1)", align=2))


Test video: underwater
Comparison: underwater_test
Arx1meD is offline   Reply With Quote
Old 16th May 2022, 02:26   #22  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,671
@Arx1meD

I don't think you're doing anything wrong. I tried the 2 modes with the "corals" image from here: https://www.eng.tau.ac.il/~berman/Un...orRestoration/



The difference in this image is not day and night but it is visible. Maybe with certain images the difference is very small. For what it's worth, asd updated the docs and added this to the median mode: "This mode is not affected by extreme values in luminance or chrominance."
Reel.Deel is offline   Reply With Quote
Old 4th September 2022, 11:34   #23  |  Link
cork_OS
Registered User
 
cork_OS's Avatar
 
Join Date: Mar 2016
Posts: 160
Grayworld effect is unstable on my sources. Is there a way to smooth it temporally or limit its strength?
__________________
I'm infected with poor sources.
cork_OS is offline   Reply With Quote
Old 4th September 2022, 17:17   #24  |  Link
Arx1meD
Registered User
 
Arx1meD's Avatar
 
Join Date: Feb 2021
Posts: 127
Cork_os, I think not.
Maybe create a clip with compensation for movement. Something like that:
Code:
function MC_Clip(clip clp, int "blksize", int "overlap", bool "chroma", bool "truemotion", bool "global") {
blksize    = Default(blksize, clp.Width()<=720?16:32)
overlap    = Default(overlap, blksize<=16?2:4)
chroma     = Default(chroma, true)
truemotion = Default(truemotion, true)
glob       = Default(global, true)

sup    = MSuper(clp, hpad=8, vpad=8, pel=1, sharp=2, chroma=chroma)
bvec1  = MAnalyse(sup, isb=true,  blksize=blksize, overlap=overlap, divide=0, delta=1, plevel=0, truemotion=truemotion, global=glob, chroma=chroma) # backward vectors
fvec1  = MAnalyse(sup, isb=false, blksize=blksize, overlap=overlap, divide=0, delta=1, plevel=0, truemotion=truemotion, global=glob, chroma=chroma) # forward vectors
backw1 = MFlow(clp, sup, bvec1)
forw1  = MFlow(clp, sup, fvec1)

Interleave(backw1, clp, forw1)
}

MC_Clip(blksize=32, overlap=16, chroma=true, truemotion=true, global=true)
# Your filters are here!
SelectEvery(3, 1)
Arx1meD is offline   Reply With Quote
Reply

Tags
ffmpeg, filter, grayworld

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 13:40.


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