lollo2 |
10-21-2022 09:07 AM |
1 Attachment(s)
First of all you should try a new capture without any sharpening set active in the VCR or in the "capture device". Your sample is DV encoded, so I suspect a camera or an analog to dv converter.
Removing a strong halo always "destroys" the rest of the content; it's true that you can further process the video for removing noise and do some sharpening after the halo removal, but what was lost is lost.
In your sample the defect on the left of the person is very very difficult to process.
Here a quick 2 minutes attempt just to show the principle. The chroma shift is intentionally exaggerated and must be reduced. No deinterlace performed, it should be done because Dehalo_Alpha needs progressive material.
You can try to play with the parameters of the filters, apply Dehalo_Alpha twice with different set of parameters, etc..., but the best is to introduce a mask to preserve the rest of the area and only act on the edges. Again, try to re-capture if the defetcs are not already in the tape.
https://imgsli.com/MTMxMTcy
Code:
video_org=DirectShowSource("sample.avi")
# plugins directory
plugins_dir="C:\Users\giuse\Documents\VideoSoft\MPEG\AviSynth\extFilters\"
# ChromaShift
loadPlugin(plugins_dir + "chromashift27\ChromaShift.dll")
# Dehalo_alpha
Import(plugins_dir + "Dehalo_alpha\Dehalo_alpha_MT2.avsi")
# Dither
Import(plugins_dir + "dither-1.28.0\mt_xxpand_multi.avsi")
loadPlugin(plugins_dir + "dither-1.28.0\win32\dither.dll")
# MaskTools2
loadPlugin(plugins_dir + "masktools2-v2.2.23\x86\masktools2.dll")
### convert to YV16
video_org_yv16=video_org.convertToYV16()
### shifting chroma
video_cs_yv16=video_org_yv16.ChromaShift(C=-10)
### dehaloing
video_dehaloed_yv16=video_cs_yv16.Dehalo_alpha(rx=4,ry=4,darkstr=0.0,brightstr=1.2,lowsens=200,highsens=300)
### convert to YUY2
video_restored=video_dehaloed_yv16.convertToYUY2()
#return(subtitle(video_org,"video_org",size=20,align=2))
#return(subtitle(video_restored,"video_restored",size=20,align=2))
#interleave(\
stackhorizontal(\
subtitle(video_org,"video_org",size=20,align=2),\
subtitle(video_restored,"video_restored",size=20,align=2)\
)
Attachment 15750
|