VideoHelp Forum


Try D·V·D Fab Video Downloader and rip Netflix video! Or Try D·V·D Fab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Page 1 of 3
1 2 3 LastLast
Results 1 to 30 of 77
Thread
  1. snow leopard Athari's Avatar
    Join Date
    Aug 2011
    Location
    Kazan, Russia
    Search PM
    Original video: http://www.youtube.com/watch?v=RVQev9V-Ybw
    Screenshot:


    There's a huge watermark over the whole screen, but it's transparent (only around 15% opacity) and it's quite easy to reproduce roughly.

    I've tried using DeLogo to analyse the whole video with this DeBlend mask, but results were unsatisfactory. Some frames looked quite good, some looked terrible. The plugin came to wrong conclusion that some areas need to be repaired etc.

    I've also tried applying reverse alpha blend using my own application and this reproduction of original watermark (it's white with alpha channel, so you may see only white) and got this result:

    While not perfect, all I need now is to use DeBlend to repair small edges. (I believe it can be done, but I haven't tried it yet.)

    The problem is, my app is for still images, but I need a filter. Is there a filter for VirtualDub which can apply alpha blending in reverse order, that is, (Val1–Val2*Alpha)/(1–Alpha) instead of normal Val1*(1–Alpha)+Val2*Alpha?

    By the way, if you know a plugin for “reversed” applying of layers for PhotoShop, please tell me. I don't really like reinventing wheels. This method works perfectly in case it's possible to exactly reproduce original watermark.

    P.S. Sorry for possible mistakes in my English, my native language is C++. Er... I mean, Russian.
    Quote Quote  
  2. Do you have a sample frame in the video with the watermark over a black background? Like from a fade to black sequence. With that and the proper settings Delogo should be able to get rid of the logo almost completely.

    Can you provide a short video with the watermark and that black shot?
    Quote Quote  
  3. snow leopard Athari's Avatar
    Join Date
    Aug 2011
    Location
    Kazan, Russia
    Search PM
    Originally Posted by jagabo View Post
    Do you have a sample frame in the video with the watermark over a black background? Like from a fade to black sequence. Can you provide a short video with the watermark and that black shot?
    Unfortunately, I don't have it. There's no fade to black. And Jamba (whoever they are) seem to use different watermarks every time, sometimes they don't use it.

    Well, you can get this “frame” by applying the watermark PNG drawn by me (see above) to the black background. However, it's not pixel-perfect.
    Last edited by Athari; 13th Aug 2011 at 08:30. Reason: typo
    Quote Quote  
  4. Originally Posted by Athari View Post
    Well, you can get this “frame” by applying the watermark PNG drawn by me (see above) to the black background. However, it's not pixel-perfect.
    If it's not pixel perfect it won't work very well. And the link didn't work for me.

    <edit>All I saw was a white page -- but I see now it was a white image on a white page. So I saw nothing but white. I'll see if I can do anything with it.
    </edit>
    Last edited by jagabo; 13th Aug 2011 at 08:54.
    Quote Quote  
  5. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Mask the watermark and composite it on top using brightness and contrast to match.
    Last edited by budwzr; 13th Aug 2011 at 23:00.
    Quote Quote  
  6. snow leopard Athari's Avatar
    Join Date
    Aug 2011
    Location
    Kazan, Russia
    Search PM
    Originally Posted by budwzr View Post
    Mask the watermark and composite it on top using brightness and contrast to match.
    Hmm... While it's possible to get (Val1–Val2*Alpha)/(1–Alpha) from subtraction (Val1*(1–Alpha)–Val2*Alpha) and brightness/contrast (something like Contrast*Value+Brightness I think), I need a few more things. First, I need exact formula for brightness/contrast to precisely calculate (1–Alpha) coefficient. Second, I need a way to apply a masked brightness/contrast filter to the image.

    Okay, I got the result, similar to the one from my app, by playing around with a masked brightness/contrast adjustment layer in PhotoShop (values I used: legacy mode, -40 brightness, +30 contrast; couldn't get it without legacy mode, somehow it's contrast adjustment is too limited).

    Still, I don't know how to reproduce it in VirtualDub. Values in its brightness/contrast filter have different ranges: black-norma-white for brightness, 0%-200% for contrast (exact numbers aren't even displayed!). And I don't see any way to apply the effect only to a portion of the image (to the watermark area that is).

    Anyway, I'd greatly appreciate a filter which can simply use the exact formula to reverse alpha composition, instead of playing around with multiple filters and masks trying out a lot of different combinations of numbers.
    Quote Quote  
  7. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Hmmm...that's interesting. Let me try too.....
    Quote Quote  
  8. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Originally Posted by budwzr View Post
    Hmmm...that's interesting. Let me try too.....

    No luck, so I turned it into a generic movie trailer. http://youtu.be/HuD3wlm1U5U
    Quote Quote  
  9. Originally Posted by Athari View Post
    The problem is, my app is for still images, but I need a filter.
    That's not a problem, video is just a string of images. You could convert to a sequence of .png for example, apply your app (I'm assuming it's some CLI app), then reassemble the images either in vdub , avidemux, or avisynth etc...
    Quote Quote  
  10. snow leopard Athari's Avatar
    Join Date
    Aug 2011
    Location
    Kazan, Russia
    Search PM
    Originally Posted by poisondeathray View Post
    That's not a problem, video is just a string of images. You could convert to a sequence of .png for example, apply your app (I'm assuming it's some CLI app), then reassemble the images either in vdub , avidemux, or avisynth etc...
    I can just write a filter plugin for VirtualDub. But I can hardly believe I'm the first person ever who wants to remove a watermark from a video or a picture by reversing the formula of alpha composition.
    Quote Quote  
  11. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    reversing the formula
    That doesn't even make sense.
    You may as well just reverse the polarity of the neutron flow, while you're at it.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  12. snow leopard Athari's Avatar
    Join Date
    Aug 2011
    Location
    Kazan, Russia
    Search PM
    Originally Posted by lordsmurf View Post
    That doesn't even make sense.
    You may as well just reverse the polarity of the neutron flow, while you're at it.
    It would be nice of you to read the thread first and try to understand it.
    Quote Quote  
  13. Originally Posted by lordsmurf View Post
    reversing the formula
    That doesn't even make sense.
    It makes perfect sense. Simplified (a 50:50 mix):

    B = blended image:
    O = original image
    L = logo image

    B = (O + L) / 2

    Reversed:

    O = B * 2 - L

    I've been playing around with this a bit with AviSynth's Overlay() but don't quite have the weighting right yet:

    Click image for larger version

Name:	partial.jpg
Views:	371
Size:	39.7 KB
ID:	8144
    Last edited by jagabo; 15th Aug 2011 at 07:45.
    Quote Quote  
  14. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    Here's my attempt:
    Click image for larger version

Name:	tiger_boo_test.jpg
Views:	548
Size:	105.9 KB
ID:	8145

    BTW, does anyone know how to upload images, but only have them appear as links on my post? I've got several large images that I don't want to clutter the thead with.
    Quote Quote  
  15. snow leopard Athari's Avatar
    Join Date
    Aug 2011
    Location
    Kazan, Russia
    Search PM
    Originally Posted by intracube View Post
    Here's my attempt:
    How did you get it?
    Quote Quote  
  16. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    Originally Posted by Athari View Post
    Originally Posted by intracube View Post
    Here's my attempt:
    How did you get it?
    GIMP, Blender, mencoder.

    I'll post a detailed explaination and the image masks I used later - I've got some enchiladas in the oven that need my attention

    There's also a couple of issues I want to fix with the processing.
    Quote Quote  
  17. Originally Posted by Athari View Post
    Originally Posted by poisondeathray View Post
    That's not a problem, video is just a string of images. You could convert to a sequence of .png for example, apply your app (I'm assuming it's some CLI app), then reassemble the images either in vdub , avidemux, or avisynth etc...
    I can just write a filter plugin for VirtualDub. But I can hardly believe I'm the first person ever who wants to remove a watermark from a video or a picture by reversing the formula of alpha composition.
    Maybe that's the one of the formulas used "under the hood" ?

    Have you checked any of the plugins in avisynth or vdub ? There must be a dozen of them

    I haven't really used any of them, but I know some use inpainting and might not apply a simple equation




    @intracube - very nice repair
    Quote Quote  
  18. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Yes, that was a nice job.

    However, I'm assuming you painstakingly "hand-crafted" the mask, yes?

    I think the OP, as well as myself, is looking for an algorithm that can be automated, using standard compositing operators. That would be a very useful routine indeed.

    My suggestion is anyone that can come up with that, should patent it before releasing it here.
    Last edited by budwzr; 15th Aug 2011 at 09:29.
    Quote Quote  
  19. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Originally Posted by lordsmurf View Post
    reversing the formula
    That doesn't even make sense.
    You may as well just reverse the polarity of the neutron flow, while you're at it.

    Hahaha, that's funny.

    But Scotty reversed flow of the dylithium crystals a lot, and it always worked.
    Last edited by budwzr; 15th Aug 2011 at 09:52.
    Quote Quote  
  20. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    @poisondeathray - thanks

    Originally Posted by budwzr View Post
    Yes, that was a nice job.

    However, I'm assuming you painstakingly "hand-crafted" the mask, yes?
    Yup. Although I wouldn't say it was painstaking to recreate. I've traced fonts before, so this was relatively quick; 6 unique characters, and all but 2 comprised of straight lines. I had to make adjustments to my traced copy of the text to get it to line up properly which took a bit of time.

    I think the OP, as well as myself, is looking for an algorithm that can be automated, using standard compositing operators. That would be a very useful routine indeed.
    It would have to be a mighty sophisticated algorithm to do that

    Part of the delay this afternoon was dealing with the odd resolution YT video - mediainfo reports the clip as 854x468. I did most of this last night, and for reasons unknown I chose a project resolution of 854x476 which complicated things...

    Blenders node compositor did most of the processing. Here's the mask I used:
    Click image for larger version

Name:	preview_text_03.png
Views:	340
Size:	15.2 KB
ID:	8150
    The image above influenced how much effect this CRGB curve had on the image:
    Name:  tiger_logo_curve.jpg
Views: 13385
Size:  9.9 KB
    which removed most of the text.

    Then I overlayed a blurred (3x3 radius) copy of the video using this image to control the amount of overlay:
    Click image for larger version

Name:	preview_text_blur_03.png
Views:	401
Size:	36.2 KB
ID:	8152
    to try and hide any remaining visible edges. This trick only worked because the video was soft - if it had been pin sharp, you'd see a blurred silhouette of the text.

    The heavy compression of the YT video causes the edges of the overlayed text to vary/move slightly which makes it almost impossible to completely remove the text - even with a perfect mask. Applying the procedure to an uncompressed or lossless compressed stream would give better results.

    I'll upload the processed video shortly.
    Quote Quote  
  21. Another reason for the edge problems (along with compression issues) is the original overlay was probably done in RGB, and the source was originally RGB (because it's CGI material). The subsampled chroma when encoding to 4:2:0 YUV means you will never get a "perfect" overlay on the edges

    intracube - did you just "eyeball" the amount for the curves until it looked ok ? or apply some formula
    Quote Quote  
  22. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    intracube - did you just "eyeball" the amount for the curves until it looked ok ? or apply some formula
    I made the adjustments by eye. I temporarily bumped up the contrast on the output which helped show up any slight mismatch in levels/alignment.

    megaupload is saying the file I uploaded is 'temporarily unavaiable'. I'll give it an hour, in case they've got problems at their end.
    Quote Quote  
  23. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Originally Posted by intracube View Post
    It would have to be a mighty sophisticated algorithm to do that
    Yep, that's what I was getting at.
    There's no magic "remove me" brush. You're pretty much forced to paint frames manually.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  24. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    Originally Posted by lordsmurf View Post
    Originally Posted by intracube View Post
    It would have to be a mighty sophisticated algorithm to do that
    Yep, that's what I was getting at.
    There's no magic "remove me" brush. You're pretty much forced to paint frames manually.
    The 2 masks only have to be created once. The transformation is then applied to the video without any manual adjustments needed for individual frames.

    Processed video:
    http://www.megaupload.com/?d=43RZ01AL
    Quote Quote  
  25. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Originally Posted by lordsmurf View Post
    Originally Posted by intracube View Post
    It would have to be a mighty sophisticated algorithm to do that
    Yep, that's what I was getting at.
    There's no magic "remove me" brush. You're pretty much forced to paint frames manually.

    What I meant by "algorithm" is a formula. Like a way to create a difference, outline, or luminance mask as opposed to a hand drawn one. What if the "watermark" is George Washington's bust? Kapeesh?
    Quote Quote  
  26. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    I downloaded the final, and that's some great work there intracube.
    Quote Quote  
  27. ^ yes , nice job on the video
    Quote Quote  
  28. Lone soldier Cauptain's Avatar
    Join Date
    Jan 2006
    Location
    Brazil
    Search Comp PM
    Unbelievable result...It´s MAGIC?

    Congratulations intracube



    Claudio
    Quote Quote  
  29. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    The pop-up ads from Megaupload can come with malware payloads. Not good.
    So I've attached your video here instead.

    There's still a number of frames that need manual repaint. But it is a really decent job for removing a translucent simple color-less alpha layer. I would be surprised if this method still worked for colored text, or slightly less translucent objects.

    Too many people want to treat logos as if it were something that could be fixed by hitting a magic "undo" button.

    Still interesting to see what people attempt. Better than your average noise blob.


    ..
    Image Attached Files
    Last edited by lordsmurf; 16th Aug 2011 at 01:31.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  30. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by Athari View Post
    I can just write a filter plugin for VirtualDub. But I can hardly believe I'm the first person ever who wants to remove a watermark from a video or a picture by reversing the formula of alpha composition.
    You're not.
    I use NoLogo in Avisynth.
    Made in 2003 still works.
    http://forum.doom9.org/showthread.php?t=64031

    Since the original site is gone, I attached the files.

    I use the simplest mode.
    First get a clean shot of the logo on a black background, save as png.

    Then :

    Code:
    AVISource("3_~_Play_Me.avi")
    loadplugin("P:\AviSynth 2.5\Old\LoadPluginEx.dll")#to load an old (pre2.5) plugin
    loadplugin("P:\AviSynth 2.5\Old\logotools.dll") 
    ConverttoYUY2() #need to change the colour space
    logo=ImageSource("logo302.png").ConverttoYUY2() #create the logo clip from the image
    NoLogoAuto(logo,1) #apply the filter
    ConvertToYV12() # and change it back
    The only hard part can be finding a clean image of the logo.
    Often I have to PhotoShop a screengrab, desaturate, use Levels to adjust the background around the logo so it's true black and fill the rest of the screen with black. But with luck it's over the credits on mostly plain black.
    Image Attached Files
    Quote Quote  



Similar Threads