VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Hi,

    Maybe I'm doing it incorrectly but I am trying to remove a pesky watermark that lies halfway between pillarboxing and 4:3 picture.
    I used vsutil en Logoscan to scan at a threshold of 30 and got a LOT of samples. When used it works quite well sometimes, being basically more or less invisible, but sometimes you can see the edges a bit, and sometimes quite easily.

    Do note that because this source is 4:3 pillarboxed to 16:9, Logoscan couldn't get reasonable samples and therefore I had to use an alternative source where the content is full 16:9 to scan with. The other source is a very flat-style animated title in similar style to Rick and Morty, where blobs of color aren't fully flat/monotone and has gradients or textures.

    This is the Logoscan result (19,533 samples, threshold of 30):

    Image
    [Attachment 69961 - Click to enlarge]


    And this is the result of using on a typical dark-ish frame (see bottom right, only 'CT' of the logo is visible):

    Image
    [Attachment 69962 - Click to enlarge]


    I assume this is caused by compression artifacts messing up the result a bit but I see DelogoHD's example screenshots be done incredibly well, as well as seeing other people get incredible results (though I don't know if Delogo/DelogoHD is what they use).

    On other frames that are typically brighter, I get fantastic results. See below for an example of final frame after all post-processing.

    Image
    [Attachment 69963 - Click to enlarge]


    If using Logoscan+Delogo is outdated, please inform me. Processing time is not an issue.
    Last edited by PRAGMA; 25th Mar 2023 at 02:57.
    Quote Quote  
  2. Use KNLMeans() over the logo area. You'll lose a little detail in the area though.

    Code:
    ImageSource("image2.png", start=0, end=23, fps=23.976) 
    ConvertToYV12()
    logo = Crop(1050, 648, 64, 48)
    logo = logo.KNLMeansCL(d=0, a=4, h=4.0)#.ColorYUV(off_y=50)
    lmask = BlankClip(logo, color=$ffffff).Crop(2,2,-2,-2).AddBorders(2,2,2,2).ColorYUV(cont_y=40).Blur(1.4)
    Overlay(last, logo, x=1050, y=648, mask=lmask)
    Image
    [Attachment 69974 - Click to enlarge]
    Quote Quote  
  3. I personally use VapourSynth but I see Havsfunc has a convenience function to do the same KNLMeansCL call, works great.
    However, on some frames, you can still quite clearly see a sort of faint C. Not really speckles or outlines, but like an imprint.
    On the frame you tested, this doesn't occur. But in a few frames earlier it does.

    Am I to assume the mask you did is just a sort of blur on top? I'd ideally want to avoid something like that, even if that means going overkill with a denoiser in the area. I think this way would work better for this source.
    Quote Quote  
  4. Originally Posted by PRAGMA View Post
    Am I to assume the mask you did is just a sort of blur on top? I'd ideally want to avoid something like that, even if that means going overkill with a denoiser in the area. I think this way would work better for this source.
    It's the alpha channel that's blurred, not the image. That's done to smoothly transition from the unfiltered area around the logo to the highly filtered area inside the logo. That prevents a sharp visible transition from the logo area to the area around it. Also, KNLMeansCL() sometimes generates artifacts at the very edges of the image. That prevents them from showing.

    Originally Posted by PRAGMA View Post
    on some frames, you can still quite clearly see a sort of faint C. Not really speckles or outlines, but like an imprint
    Play with the strength (h) and/or spacial radius (a) of KNLMeansCL().

    Also, you may want to use a larger logo area. I may have clipped a little too closely. Or build the mask from the logo itself rather than using a rectangular area.
    Last edited by jagabo; 25th Mar 2023 at 10:33.
    Quote Quote  
  5. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by PRAGMA View Post
    If using Logoscan+Delogo is outdated, please inform me.
    Bit dated, try InpaintDelogo -> https://github.com/Purfview/InpaintDelogo
    Quote Quote  
  6. Originally Posted by VoodooFX View Post
    Originally Posted by PRAGMA View Post
    If using Logoscan+Delogo is outdated, please inform me.
    Bit dated, try InpaintDelogo -> https://github.com/Purfview/InpaintDelogo
    I exclusively use VapourSynth and it seems like that hasn't received a port.
    Quote Quote  
  7. Originally Posted by jagabo View Post
    Originally Posted by PRAGMA View Post
    Am I to assume the mask you did is just a sort of blur on top? I'd ideally want to avoid something like that, even if that means going overkill with a denoiser in the area. I think this way would work better for this source.
    It's the alpha channel that's blurred, not the image. That's done to smoothly transition from the unfiltered area around the logo to the highly filtered area inside the logo. That prevents a sharp visible transition from the logo area to the area around it. Also, KNLMeansCL() sometimes generates artifacts at the very edges of the image. That prevents them from showing.

    Originally Posted by PRAGMA View Post
    on some frames, you can still quite clearly see a sort of faint C. Not really speckles or outlines, but like an imprint
    Play with the strength (h) and/or spacial radius (a) of KNLMeansCL().

    Also, you may want to use a larger logo area. I may have clipped a little too closely. Or build the mask from the logo itself rather than using a rectangular area.
    Hi, yeah I increased a and h a tad bit, and its going quite well. You can only notice the C imprint when on 235-or so white. And as of recently I can't see it at all anymore, at least after encoding. Maybe the final deliverable's compression is further making it hard to see haha.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!