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 13th September 2021, 10:21   #1  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,902
Retinex

Quote:
Originally Posted by kedautinh12 View Post
Not bad, considering it's doing everything automatically...

Here's a test with a v210 losslessly captured tape:

Quote:
AVISource("Q:\00_INGEST_MAM\A.R.C.A\00_FILE_DA_ENCODARE\CALCIO SERIE A 1999 2000 TORINO VS ROMA SUPERSLOMO 991024 7769614.avi")
Bob()
ConvertBits(16)
ConvertToPlanarRGB()
original=Subtitle("Original")

filtered=MSRCR(sigma=250, lower_thr=0.001, upper_thr=0.001, fulls=true, fulld=true, restore=125.0).Subtitle("MSRCR")

StackHorizontal(original, filtered)


FranceBB is offline   Reply With Quote
Old 14th September 2021, 07:35   #2  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,544
FranceBB, did you swap pictures by any chance ?
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Old 14th September 2021, 09:02   #3  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,902
Quote:
Originally Posted by Emulgator View Post
FranceBB, did you swap pictures by any chance ?
This is what happens when I have a break at work, go to doom9, find something interesting and then people interrupt me halfway through 'cause they call me at my phone xD
The text doesn't match the picture in the script I wrote, so now I don't know which one is which. Dang it.
FranceBB is offline   Reply With Quote
Old 14th September 2021, 10:19   #4  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Usually the brighter one is the Retrinex output,...
Using Retinex in Vapoursynth with "clip = core.retinex.MSRCP(input=clip, sigma=[25,80,250], fulls=True, fulld=True)"
gives for example:


So I think the labeling is correct and the right side (like in my screenshots) is the filtered side.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 14th September 2021, 12:53   #5  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,902
Quote:
Originally Posted by Selur View Post
I think the labeling is correct and the right side (like in my screenshots) is the filtered side.
Good!

Quote:
Originally Posted by Selur View Post
Ah, that's funny, it's a Sky Deutschland feed eheheheh

FranceBB is offline   Reply With Quote
Old 14th September 2021, 14:26   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
So, it's supposed to make them look too bright ?
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 14th September 2021, 16:00   #7  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Quote:
Originally Posted by StainlessS View Post
So, it's supposed to make them look too bright ?
Seems to be a left-right gradient on them (FranceBB's) too.

Edit: it seems like we've polluted the "New Plugins and Utilities" thread quite a bit here, by the way...
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 14th September 2021 at 16:14.
wonkey_monkey is offline   Reply With Quote
Old 14th September 2021, 16:14   #8  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
I think it's same HDR
kedautinh12 is offline   Reply With Quote
Old 14th September 2021, 16:25   #9  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Can't really say what it should do, since I only used it to brighten up some way to dark indoor captures, where it really helped.
Looks like it's main effect is to brighten up dark areas and even out the general brightness of an image, so it might not be that suited for movies but more for single to dark scenes.

Here's another example (also using the default settings):


Quote:
Edit: it seems like we've polluted the "New Plugins and Utilities" thread quite a bit here, by the way...
Argh, may be a mod could split the retinex discussion into a different thread,...

Quote:
I think it's same HDR
Hmm, to me it seems more like the complete opposite to high dynamic range,...

Cu Selur
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 14th September 2021 at 16:31.
Selur is offline   Reply With Quote
Old 15th September 2021, 12:54   #10  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,902
Quote:
Originally Posted by Selur View Post
Hmm, to me it seems more like the complete opposite to high dynamic range...
It's pretty much the same as "fake HDR" when in mobile phones you choose "HDR" and you bump the slide to the maximum so it exasperates the shadows ehehehehe

Anyway, yes, it makes everything brighter.
FranceBB is offline   Reply With Quote
Old 15th September 2021, 13:34   #11  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
The rocks in Selur's example have got darker.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 15th September 2021, 19:53   #12  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Quote:
It's pretty much the same as "fake HDR" when in mobile phones you choose "HDR" and you bump the slide to the maximum so it exasperates the shadows ehehehehe
I mainly use my phone for navigation and checking mail, never really used it for anything video related.

Quote:
Anyway, yes, it makes everything brighter.
I agree with wonkey_monkey, that does not seem to be the case.

For the fun of it I tool your first screenshot cropped by 720 on the right and then applied Retinex (Vapoursynth):


Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 15th September 2021, 20:00   #13  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Is that gradient due to the NAB bars on the sides?
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 15th September 2021, 20:13   #14  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
This is what it looks like if I crop all the black bars (CropRel(clip=clip, left=12, right=732, top=0, bottom=2)) and then apply Retinex:

so I would say: Yes
-> when using Retinex one should crop first.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 15th September 2021, 20:32   #15  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
For black, unfiltered (noisy) VHS frames I am getting this ugly patchwork out of retinex. Happens for example with fade-in/fade out.

[IMG][/IMG]

Last edited by Sharc; 19th September 2021 at 07:42.
Sharc is offline   Reply With Quote
Old 15th September 2021, 20:53   #16  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Quote:
Originally Posted by Selur View Post
This is what it looks like if I crop all the black bars

so I would say: Yes
Hmm. Can't help thinking it's indicative of a bug, even if it goes away when cropped. The bars are fairly equal, so why does the left get bright but the right doesn't? Odd.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 6th October 2021, 16:28   #17  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
I am trying to use Retinex to remove color cast from a old film movie, unfortunately it has the tendency to brighten too much the dark photograms and cast sort of halo around objects.

Is there a way to limit it?

My script

SetMemoryMax()
SetFilterMTMode("DEFAULT_MT_MODE", 2)
LoadPlugin("D:\Eseguibili\Media\DGDecNV\DGDecodeNV.dll")
DGSource("F:\In\1_48 Fantozzi\fantozzi.dgi",ct=24,cb=24,cl=0,cr=0)
ConvertBits(16)
SMDegrain (tr=6, thSAD=600, refinemotion=true, contrasharp=false, PreFilter=4, plane=4, chroma=true)
ConvertToPlanarRGB()
MSRCR(sigma=250, lower_thr=0.001, upper_thr=0.001, fulls=true, fulld=true, restore=125.0)
ConvertToYUV420()
fmtc_bitdepth (bits=8,dmode=8)
Prefetch(6)


Results:


__________________
@turment on Telegram

Last edited by tormento; 6th October 2021 at 16:35.
tormento is offline   Reply With Quote
Old 6th October 2021, 16:33   #18  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
If your old film movie have black bars, just cut before use retinex and add border again
kedautinh12 is offline   Reply With Quote
Old 6th October 2021, 16:34   #19  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
Quote:
Originally Posted by kedautinh12 View Post
If your old film movie have black bars, just cut before use retinex and add border again
I always crop black bars.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 6th October 2021, 17:20   #20  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 450
Quote:
Originally Posted by tormento View Post
I am trying to use Retinex to remove color cast from a old film movie, unfortunately it has the tendency to brighten too much the dark photograms and cast sort of halo around objects.

Is there a way to limit it?
Try with very high sigma. For example sigma=2500.
StvG is offline   Reply With Quote
Reply

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 11:00.


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