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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th July 2019, 19:52   #1  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
DelogoHD

DelogoHD is an overhaul of the original delogo filter, which was originally written by MakKi many years ago. It also deprecates my previous porting project VapourSynth-DeLogo.

Legacy parameters are removed due to analog TV signal being deprecated years ago.

This filter provides both AviSynth+ and VapourSynth interfaces. It compiles under both MSVC and GCC.

It requires at least a SSE4.1 compatible CPU to run.



Usage

Code:
# AviSynth+
DelogoHD(clip, "CCAV 3840x2160.lgd", start = 5, end = 95, fadein = 2, mono = true, cutoff = 5)
AddlogoHD(clip, "CCAV 3840x2160.lgd", start = 5, end = 95, fadein = 2, mono = true, cutoff = 5)

# VapourSynth
delogohd.DelogoHD(clip, "CCAV 3840x2160.lgd", start = 5, end = 95, fadein = 2, mono = True, cutoff = 5)
delogohd.AddlogoHD(clip, "CCAV 3840x2160.lgd", start = 5, end = 95, fadein = 2, mono = True, cutoff = 5)

Parameters

- clip

A clip to process. It must have constant format and it must be YUV 8..16 bit with integer samples.

YUV420P8/10/12/14/16, YUV422P8/10/12/14/16, YUV444P8/10/12/14/16.

- logofile

Logo file in lgd format.

- logoname

Logo name to be selected from logo file.

Default: `NULL`, selecting the first one.

- start, end

First and last frame that has the logo.

Default: From 0 to Max

- fadein, fadeout

Number of fading frames.

Default: 0

- left, top

Number of pixels in adjusting logo position.

For example, `left = -5` results logo being 5 pixels left to its original position.

Default: 0

- mono

Force mono logo, wiping chroma part of the logo.

Default: false

- cutoff

Wiping near-transparent part of the logo, if its depth is lower than cutoff. Should be less than 1000 (Max logo depth).

Default: 0
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median

Last edited by MeteorRain; 14th July 2019 at 03:47.
MeteorRain is offline   Reply With Quote
Old 12th July 2019, 22:39   #2  |  Link
Natty
Noob
 
Join Date: Mar 2017
Posts: 221
Natty is offline   Reply With Quote
Old 13th July 2019, 10:28   #3  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by MeteorRain View Post
...
- logofile

Logo file in lgd format.
Please, some info about lgd format and how create it.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 14th July 2019, 04:01   #4  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
Quote:
Originally Posted by tebasuna51 View Post
Please, some info about lgd format and how create it.
The original tool was built by MakKi back in 2003.

The tool was originally made for AviUtl, being only used within Japan, and is all in Japanese language. It was used to remove the half-transparent TV station logo from captured analog or digital TV programs. But it should also work with other logos as long as they are static and half-transparent. I've tested against Pilot's Eye Bluray Disc and it worked very well. Some porn video that comes with half-transparent logos from their publisher can also benefit, but I never tried.

I have translated the logo header file so you may check that for detailed structure.
Basically a LGD consists of a magic, a name, meta like w h posx posy etc, and the body which is array of actual logo image.
The image was in 12bit Y/Cb/Cr format, which is sometimes called as AviUtl YC colorspace. Alpha channel is recorded for each channel, so it's actually Y/A/Cb/A/Cr/A format. The YCbCr color space is different than what we use as YUV, and during computing, the original Delogo AVS plugin has to convert pixels to AU-YC, remove the logo, then convert them back to YV12. I have re-written the algorithm and it no longer converts data back and forth.

To create a LGD file, the only possible way is to use AviUtl (in Japanese). A Chinese tutorial about how to use the Japanese plugin is available here. Knowing both Chinese and Japanese is recommended to read the tutorial. I've also built a website for my collections of LGD logos these years so far.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median

Last edited by MeteorRain; 14th July 2019 at 04:16. Reason: typo
MeteorRain is offline   Reply With Quote
Old 14th July 2019, 10:03   #5  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Then to create a .lgd of the logo we need install AviUtl, maybe from https://www.videohelp.com/software/AviUtl

Add the logoscan plugin, maybe from http://blog.livedoor.jp/swing26/logoscan_007.zip.zip

And learn chinese and japanese to know how to do.

Too complicated for me, sorry.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 14th July 2019, 11:46   #6  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,493
Quote:
Originally Posted by tebasuna51 View Post
Too complicated for me, sorry.
Yes, the ability to accept the logo from another video clip would make a lot more sense, especially as clean logos can often be found in black sections of video. To speed up processing it could be cropped, and an offset passed as parameters to the filter.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 14th July 2019, 19:59   #7  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by tebasuna51 View Post
Then to create a .lgd of the logo we need install AviUtl, maybe from https://www.videohelp.com/software/AviUtl

Add the logoscan plugin, maybe from http://blog.livedoor.jp/swing26/logoscan_007.zip.zip

And learn chinese and japanese to know how to do.

Too complicated for me, sorry.
Well the logo database is getting really huge now, to a point that we don't need to make on our own. Just grab the one you need and use it. And in case you have a newer one, just post a request and I'm sure others can help make it for you.
lansing is offline   Reply With Quote
Old 15th July 2019, 20:22   #8  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
Quote:
Originally Posted by wonkey_monkey View Post
Yes, the ability to accept the logo from another video clip would make a lot more sense, especially as clean logos can often be found in black sections of video. To speed up processing it could be cropped, and an offset passed as parameters to the filter.
It would be impossible. A half-transparent logo has alpha channel information, and must be computed from multiple solid color samples.

The logoscan tool filters logo images by checking the color on the edge. If all pixels on the edge are colors within threshold, it's considered as a solid color. Blue sky and solid color wall are good background for making those samples.

Now suppose you have logos on solid purple / red / black / white / blue, etc, next step is linear regression. It figures out the parameters of the linear function, Y' = Y * (d / MAX_DP) + c, where d and c are parameters to be computed. Once you get d and c for all 3 channels of all pixels, you can add or remove the logo from the image.

Transplanting a logo from a pure black image won't give you the linear function parameters and thus is not possible to remove logos in this way.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median
MeteorRain is offline   Reply With Quote
Old 15th July 2019, 22:27   #9  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,493
It can be done if the logo can be considered to be white (or, slightly more complex, any solid colour if you can determine what it is), as the three examples posted all seem to be, and as many logos are:


It's not perfect, but it was a rush job and it's a more solid logo than the three examples.
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 15th July 2019 at 23:30.
wonkey_monkey is offline   Reply With Quote
Old 6th November 2019, 13:45   #10  |  Link
2ndR
Registered User
 
Join Date: Nov 2009
Posts: 6
Sorry for posting in machine translation

Is there no interlace option but is DelogoHD only for progressive?
Or do you read and process the field order?
2ndR is offline   Reply With Quote
Old 7th August 2020, 22:32   #11  |  Link
mastrboy
Registered User
 
Join Date: Sep 2008
Posts: 365
Quote:
Originally Posted by MeteorRain View Post
I've also built a website for my collections of LGD logos these years so far.
Thanks for providing those lgd files, you actually had a file for the one I was looking for.
__________________
(i have a tendency to drunk post)
mastrboy is offline   Reply With Quote
Old 9th July 2021, 16:56   #12  |  Link
loonvf
Registered User
 
Join Date: Mar 2021
Posts: 3
Hi All,

Anyone has some good experience with DelogoHD?
Very little info on the forum here and I plan to use it to remove some fixed camera / film gate artifacts on my frames.

Any experience / examples would be much appreciated (or alternative suggestions).

Thanks,

Loonvf
loonvf is offline   Reply With Quote
Old 11th July 2021, 10:07   #13  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 985
Quote:
Originally Posted by loonvf View Post
Any experience / examples would be much appreciated (or alternative suggestions).
I never tried DelogoHD, only that old plugin it's based on, it was hard to figure it out how to make it work on new logo and then the results were not satisfactory in comparison to Vdub's Delogo results.

As alternative you can try InpaintDelogo.
VoodooFX is offline   Reply With Quote
Old 11th August 2021, 09:13   #14  |  Link
Satoshi18
Registered User
 
Join Date: Jul 2020
Posts: 22
Where do I download the plugin from?
Satoshi18 is offline   Reply With Quote
Old 11th August 2021, 09:48   #15  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by Satoshi18 View Post
Where do I download the plugin from?
https://github.com/HomeOfAviSynthPlu...goHD/releases/
Reel.Deel is offline   Reply With Quote
Old 15th September 2021, 05:11   #16  |  Link
Flash_Bang
Registered User
 
Join Date: Aug 2021
Posts: 10
How to use 1440x1080 logo file with 1280x720 video
Flash_Bang is offline   Reply With Quote
Old 15th September 2021, 05:32   #17  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Quote:
Originally Posted by Flash_Bang View Post
How to use 1440x1080 logo file with 1280x720 video
Upscale to 1440x1080
kedautinh12 is offline   Reply With Quote
Old 15th September 2021, 06:05   #18  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by Flash_Bang View Post
How to use 1440x1080 logo file with 1280x720 video
Can you upload a small sample of the video? From my understanding DelogoHD is supposed to be a more precise way to remove logos as long as the is identical to the one in the video. Hence why there is a library of logos that were created from over the air broadcast (mainly Japan). But here the source of the logo is 4x3 and your video is 16x9, I suspect that if the logos are not perfectly aligned it may not work correctly.
Reel.Deel is offline   Reply With Quote
Old 15th September 2021, 06:11   #19  |  Link
Flash_Bang
Registered User
 
Join Date: Aug 2021
Posts: 10
Quote:
Originally Posted by kedautinh12 View Post
Upscale to 1440x1080
i tried but it did not work
Flash_Bang is offline   Reply With Quote
Old 15th September 2021, 06:12   #20  |  Link
Flash_Bang
Registered User
 
Join Date: Aug 2021
Posts: 10
Quote:
Originally Posted by Reel.Deel View Post
Can you upload a small sample of the video? From my understanding DelogoHD is supposed to be a more precise way to remove logos as long as the is identical to the one in the video. Hence why there is a library of logos that were created from over the air broadcast (mainly Japan). But here the source of the logo is 4x3 and your video is 16x9, I suspect that if the logos are not perfectly aligned it may not work correctly.
ok here is the video : https://drive.google.com/file/d/1Pdt...ew?usp=sharing
Flash_Bang 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 15:27.


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