Thread: Retinex
View Single Post
Old 11th April 2018, 06:37   #12  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Is it intended that the image might get distorted depending on the source.
Using:
Code:
# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="G:/Hybrid/64bit/vsfilters/ColorFilter/Retinex/Retinex.dll")
core.std.LoadPlugin(path="G:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Loading F:\TestClips&Co\files\5000frames.mp4 using LWLibavSource
clip = core.lsmas.LWLibavSource(source="F:/TESTCL~1/files/5000FR~1.MP4", format="YUV420P10", cache=0)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg")
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1)
# Making sure input color range is set to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# adjusting color space from YUV420P10 to YUV444P16
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16)
# color adjustment using Retinex
clip = core.retinex.MSRCP(input=clip, sigma=[25,80,250], fulls=True, fulld=True)
# adjusting output color from: YUV444P16 to YUV420P8 for x264Model (i420)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8)
# Output
clip.set_output()
and this source.
The first 100 frames are totally broken.

Cu Selur

Ps.: there is also another user who has issues with Retinex, see: https://forum.selur.net/showthread.php?tid=345
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 11th April 2018 at 06:55.
Selur is offline   Reply With Quote