digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Restore, Filter, Improve Quality (https://www.digitalfaq.com/forum/video-restore/)
-   -   Removal script for ghosts or halo effects? (https://www.digitalfaq.com/forum/video-restore/13041-removal-script-ghosts.html)

banaguitar 10-20-2022 12:41 PM

Removal script for ghosts or halo effects?
 
1 Attachment(s)
Hi,

is there any way to remove this halo and ghost effect?

https://drive.google.com/file/d/1j_T...ew?usp=sharing

I played the tape on different vcr and everywhere the same halo and ghost effect.

lordsmurf 10-21-2022 03:20 AM

Avisynth can probably tackle much of that, maybe all.

I can't help with writing that script right now, so defer to some of our other members here, like lollo2 of themaster1. Maybe PM them, ask them to help you in this thread. Not in PM, but in the thread, so we can all see the script.

banaguitar 10-21-2022 03:21 AM

1 Attachment(s)
Thank you lordsmurf

And here is the raw sample

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

banaguitar 10-21-2022 10:46 AM

Hi, thank you. This looks better!!! I use ADVC-55 with Scenalyzer. I think, there is no way to change any settings here.

lollo2 10-21-2022 10:49 AM

Quote:

This looks better!!!
Well, it depends...

Quote:

I use ADVC-55 with Scenalyzer. I think, there is no way to change any settings here.
Check also the VCRs. Otherwise, it means the halos are in the source.

banaguitar 10-21-2022 10:55 AM

Yes, I played the source tape (betamax) on two different vcr and both the same

lollo2 10-21-2022 12:50 PM

Try to check if there is any "sharpening" setting in the beta VCRs that you can switch off

Hushpower 10-21-2022 08:22 PM

Non-AVISynth... :wink2: VDub Flaxen VHS and CCD filters, just for the exercise.

https://imgsli.com/MTMxMjYx

lordsmurf 10-21-2022 08:43 PM

Quote:

Originally Posted by Hushpower (Post 87359)
Non-AVISynth... :wink2: VDub Flaxen VHS and CCD filters, just for the exercise.

https://imgsli.com/MTMxMjYx

Nice, but needs some more tweaking. Look at the chin.

Hushpower 10-21-2022 09:40 PM

Chinny chin chin! Yes, noted, LS. A compromise...

banaguitar 10-22-2022 01:34 AM

Quote:

Originally Posted by lollo2 (Post 87352)
Try to check if there is any "sharpening" setting in the beta VCRs that you can switch off

Hi, unfortunately not, it must be the tape.

lollo2 10-22-2022 03:19 AM

Quote:

Non-AVISynth... VDub Flaxen VHS and CCD filters, just for the exercise.
That's just a cleaning, does not remove the halos :wink2:

https://imgsli.com/MTMxMjk0

Hushpower 10-22-2022 03:34 AM

Nor does yours, Lollo, look at his right arm. Additionally, your overall image is much softer. There's some pretty severe denoising/smudging going on there.

lordsmurf 10-22-2022 03:45 AM

This is a tricky error. Different restore methods incur different (lesser/better) damage to hide the worse damage.

lollo2 10-22-2022 04:11 AM

Quote:

Nor does yours, Lollo, look at his right arm.
The right arm defect is not a real halo and it's difficult to manage. The evident halos are removed/reduced. Did you look to the images?

Quote:

Additionally, your overall image is much softer. There's some pretty severe denoising/smudging going on there.
That's a price to pay for a quick halo removal. Better tecniques will include edge masking to preserve the general image and focus on the areas where the halos are present, as I already said.
Because the direction this thread is taking, I won't show any of them here.

To the OP: in doom9 forum you had no response to your thread about this query, try to post in Videohelp Restoration forum, somebody like jagabo or poisondeathray will surely help you better than me :wink2:

banaguitar 10-22-2022 04:16 AM

Quote:


To the OP: in doom9 forum you had no response to your thread about this query, try to post in Videohelp Restoration forum, somebody like jagabo or poisondeathray will surely help you better than me :wink2:
Ok, thank you.:) But jagabo does not exist

Hushpower 10-22-2022 05:53 AM

Quote:

But jagabo does not exist
Yes they do. They posted on VideoHelp today.

banaguitar 10-22-2022 05:54 AM

Quote:

Originally Posted by Hushpower (Post 87373)
Yes they do. They posted on VideoHelp today.

On videohelp yes

Hushpower 10-22-2022 06:04 AM

Quote:

On videohelp yes
As Lollo said. :wink2:


All times are GMT -5. The time now is 07:23 AM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.