VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or try DVDFab and copy, convert or make Blu-rays and DVDs! :)
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 35
Thread
  1. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    This guide explains how to remove an opaque logo using Xlogo in Avisynth.

    Xlogo is an orphan application, apparently abandoned by its author, Leuf.

    You can find the last version at Warp Enterprises or this mirror.


    And this page archives that and the VirtualDub version. There is more explanatory material there, which applies to both versions, but the following should be sufficient for basic Avisynth usage.

    This is an example of the kind of logo it can be used on:



    Xlogo only needs one mask image.
    It will try to extrapolate from the edges of the mask to fill it in, with imperfect results, but still I think the minimal effort makes a large improvement on an obtrusive coloured logo, and makes it barely noticeable.

    We start by finding a frame such as the above, with the logo on a black background if at all possible.
    Save a BMP screengrab from, eg, VirtualDub.

    Open in your image editor.
    I used Photoshop, but any other app will do.

    Zoom in and crop around the logo as below:



    Important:
    1) Have at least 4 pixels clear black on all sides of the logo. If the surroundings are not 100% black, make them so (paintbrush, or use the magic wand selector and bucket with black).

    2) Note the (x,y) position of the top left corner. Make both even numbers, and the width and height of the cropped area also even.

    In this case, the position was (540, 300), width 64, height 24 pixels.

    Now paint white over all the logo. The below shows the white as a separate layer, though you don't need to keep the original logo.



    The result is :



    Now save this black and white version as a BMP.
    The name is important. Anything at the beginning (something related to the AVI file name) then "_x_X_y_Y_2" where the capital X and Y are the position (as above) the logo was cropped from (the "_2" at the end is mandatory). (Actually, the x,y in the name is not strictly necessary for the Avisynth version, but it makes it compatible with the VirtualDub filter.)

    So in this case I save it as "logo221_x_540_y_300_2.bmp"

    Now we can use this in our AVS script.

    Code:
    AVISource("pb_221.avi",false)
    
    Trim(0,19) ++\
    Trim(20,0).xlogo("logo221_x_540_y_300_2.bmp", X=540, Y=300, alpha=0)
    
    LanczosResize(720,480)
    The trims are to limit xlogo to specific frames of the video. Just omit the trim if you want it for the entire clip.
    The first parameter is the logo mask BMP file, X and Y the positions again, and alpha=0 indicates a solid logo.
    There are other parameters explained in the readme if you want to experiment, but I find the defaults are fine.

    Open in VirtualDub to check.
    You may see this error message:



    This means there is a problem with the bitmap. First make sure the "black" surrounding the white logo shape is really black; if not, make it so. If you still get the error, it can also be caused by having the white mask too close to an edge. Enlarge the BMP to give some more black space around the logo (if you add pixels to the top or left, remember this will change the effective (x,y) position, and thus the name of the file and parameters in the function call).

    If you see some remnant of the logo colour after filtering, enlarge the white mask a bit (just use paintbrush) in the affected area and try again.

    Some examples:

    Smooth areas of colour are almost perfectly repaired.




    Very busy and detailed areas aren't so successful.



    Note that some detail is restored here.



    The alpha parameter
    The previous example was solid colour -- the following has a little alpha transparency, not pure white as it at first appears.


    (Notice the window frame visible through the logo).


    Making a logo bitmap and using the parameters as for solid colour, we see a dark shadow on many of the frames after applying xLogo.

    Original frame


    Filtered with
    xlogo("logo106_x_400_y_322_2.bmp", X=400, Y=322, alpha=0)


    Filtered with
    xlogo("logo106_x_400_y_322_2.bmp", X=400, Y=322, alpha=20)


    Filtered with
    xlogo("logo106_x_400_y_322_2.bmp", X=400, Y=322, alpha=30)


    Filtered with
    xlogo("logo106_x_400_y_322_2.bmp", X=400, Y=322, alpha=40)



    As alpha increases the filtered logo area gets increasingly white.
    Here I chose alpha=20 as the best compromise.

    You could use the VirtualDub script editor for finding the optimum value, but I found the Avisynth script editor Avsp more convenient.
    In this I used a slider for alpha:
    xlogo("logo106_x_400_y_322_2.bmp", X=400, Y=322, alpha=[<"alpha", 0, 255, 10>])
    And could quickly look at various frames with different alpha settings in different tabs.
    Last edited by AlanHK; 11th Apr 2016 at 01:47.
    Quote Quote  
  2. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    ...
    Quote Quote  
  3. do you mean virtual dub or virtual dub mod? i assume that these are tow independent programmes.
    Quote Quote  
  4. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by sumeshkri
    do you mean virtual dub or virtual dub mod? i assume that these are tow independent programmes.
    Either.
    Quote Quote  
  5. thanks alanhk. but evennow my
    now problem has not yet solved. i wanted to remove the text upon the video. it is not the logo i am talking about.
    Quote Quote  
  6. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by sumeshkri
    thanks alanhk. but evennow my
    now problem has not yet solved. i wanted to remove the text upon the video. it is not the logo i am talking about.
    Doesn't matter what it is. Just make a mask with the white area covering the area you want to remove.
    Quote Quote  
  7. Member
    Join Date
    Sep 2007
    Location
    Denmark
    Search Comp PM
    Hi
    I am total newbee and will ask for help. I have a iso file dvd movie and i will remove some russian subs wich are hardsubs. i reed that you can xlogo. Is there somewhere a total step by step guide for someone like me or a nice person who can learn me the magic?? pls help....
    Quote Quote  
  8. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by bigboy77
    Hi
    I am total newbee and will ask for help. I have a iso file dvd movie and i will remove some russian subs wich are hardsubs. i reed that you can xlogo. Is there somewhere a total step by step guide for someone like me or a nice person who can learn me the magic?? pls help....
    To use xlogo you need to load the video in Avisynth, or Virtualdub.
    And so you need these, and you need to extract whatever kind of video you have in the ISO to a video file.

    Xlogo would need a large mask area to do this, one covering the maximum area used by subtitles.

    Maybe VirtualDub MSU Subtitle Remover would be better, I haven't used that myself though.
    Quote Quote  
  9. Member
    Join Date
    Sep 2007
    Location
    Denmark
    Search Comp PM
    I have virtualdub and have load the video in it and also get the MSU Subtitle remover but i dont know how to use it..........
    Quote Quote  
  10. Member
    Join Date
    Sep 2007
    Location
    Denmark
    Search Comp PM
    I have virtualdub and have load the video in it and also get the MSU Subtitle remover but i dont know how to use it..........
    Quote Quote  
  11. Member
    Join Date
    Sep 2007
    Location
    Denmark
    Search Comp PM
    I have virtualdub and have load the video in it and also get the MSU Subtitle remover but i dont know how to use it..........
    Quote Quote  
  12. Member
    Join Date
    Sep 2007
    Location
    Denmark
    Search Comp PM
    Hi jagabo. I have read the guide maybe 10 times..... I can get it in my head about this point in the guide:

    (# Make detection pass on video - 3rd button on the panel, "Go with playback". Bright white pixels represents found subtitles. Correct your settings and return to prevous step, if nessesary.
    # Check "2nd pass" in the filter settings window.
    # With "Go with playback" button you can check removing results. Bright white pixels represents found subtitles. Correct your settings and return to prevous step, if nessesary. )

    3rd button on the panel which i dont know where are and on which panel??
    Quote Quote  
  13. Member
    Join Date
    Sep 2007
    Location
    Denmark
    Search Comp PM
    The guide is not so usefull..... Maybe some one else have another guide which gives a better understanding how you use the MSU Subtittle remover...
    Pls help!
    Quote Quote  
  14. THANKS FOR THIS EXCELLENT TUTORIAL.

    Yeah!!! I have done almost......but got an error...

    I have made the masked logo as you saiid.it is----


    name is "logo221_x_252_y_8_2.bmp"

    here is the two screenshot with the script



    I got the error

    Quote Quote  
  15. I think your blacks aren't black enough.
    Quote Quote  
  16. Originally Posted by jagabo View Post
    I think your blacks aren't black enough.
    I used paint brush tool to blacken the sides as the tutorial.
    Quote Quote  
  17. You didn't blacken them enough. They are not black. At least in the JPG file you posted.
    Quote Quote  
  18. Originally Posted by jagabo View Post
    You didn't blacken them enough. They are not black. At least in the JPG file you posted.
    you r talking about the 1st picture?
    I have used PIXELFORMER software(bitmap editor) to blacken the side pixels and saved in bmp.
    Quote Quote  
  19. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by rijubrata View Post
    Originally Posted by jagabo View Post
    I think your blacks aren't black enough.
    I used paint brush tool to blacken the sides as the tutorial.

    Well, the image you attached wasn't 100% black.
    Look at the "Info" palette and when you move the cursor over a point it will tell you the RGB.
    Black should be 0,0,0. Your image has values like 10,10,8.
    And White should be all 255,255,255

    Simple way to be sure is to select the "black" area (use the magic wand, or draw a marquee), then "fill" and choose "black".
    Then Select/Inverse and fill the rest with white.

    -- That assumed using Photoshop, but your PIXELFORMER, I don't know.
    I see that it has a "bit depth" setting. So try just one bit; b/w, no greys.
    Last edited by AlanHK; 16th Feb 2011 at 12:14.
    Quote Quote  
  20. Originally Posted by AlanHK View Post
    Originally Posted by rijubrata View Post
    Originally Posted by jagabo View Post
    I think your blacks aren't black enough.
    I used paint brush tool to blacken the sides as the tutorial.

    Well, the image you attached wasn't 100% black.
    Look at the "Info" palette and when you move the cursor over a point it will tell you the RGB.
    Black should be 0,0,0. White 255,255,255

    Simple way to be sure is to select the "black" area (use the magic wand, or draw a marquee), then "fill" and choose "black".
    Then Select/Inverse and fill the rest with white.

    okay,then there is no error in script,only in that image.
    I have used PIXELFORMER software(bitmap editor) to blacken the side pixels and saved in bmp,then the software or I might be wrong.
    then I have to use PHOTOSHOP.Is there any other program than PHOTOSHOP?
    Quote Quote  
  21. You could open your image in VirtualDub and use the Brightness/Contrast filter to increase the contrast and decrease the brightness a bit. Or use Levels filter. Just about every image editor will let you make these kinds of changes. I use an old copy of PhotoImpact.
    Quote Quote  
  22. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by rijubrata View Post
    okay,then there is no error in script,only in that image.
    I have used PIXELFORMER software(bitmap editor) to blacken the side pixels and saved in bmp,then the software or I might be wrong.
    then I have to use PHOTOSHOP.Is there any other program than PHOTOSHOP?

    Like I said, in Pixelformer try reducing the output bit depth to 1.
    Originally Posted by Pixelformer
    Support for different color depths up to 32-bit RGB with alpha channel
    When using Pixelformer, you can always work in the 32-bit RGBA color space. If you need another format, just specify the output color depth (from 1 bpp (monochrome) to 32 bpp (RGB with alpha channel)), and Pixelformer will generate the required bitmap. Even some uncommon formats are supported, like 16-bit BMP, or 24-bit PNG with transparency, or grayscale PNG with alpha.

    Otherwise, MSPaint.

    Or try the attached.
    Image Attached Thumbnails Click image for larger version

Name:	logo221_x_252_y_8_2.bmp
Views:	408
Size:	11.4 KB
ID:	5657  

    Last edited by AlanHK; 16th Feb 2011 at 12:30.
    Quote Quote  
  23. THANKS.....
    Yea,it has worked.
    how have you done that?by PHOTOSHOP?
    Quote Quote  
  24. Originally Posted by jagabo View Post
    You could open your image in VirtualDub and use the Brightness/Contrast filter to increase the contrast and decrease the brightness a bit. Or use Levels filter. Just about every image editor will let you make these kinds of changes. I use an old copy of PhotoImpact.
    Okay,then I think it will be easier,
    Quote Quote  
  25. @jagabo,@AlanHK

    thanks to you very much.

    actually the static logo in my video has bigger size,so I may haven't get that much blurring effect as in the tutorial.Are there any settings(which I don't know)or any filter for fulfill my purpose?
    Quote Quote  
  26. I don't think there's much else you can do other than manually editing each frame of the video.
    Quote Quote  
  27. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by rijubrata View Post
    actually the static logo in my video has bigger size,so I may haven't get that much blurring effect as in the tutorial.Are there any settings(which I don't know)or any filter for fulfill my purpose?
    I don't know what you mean.
    You can still see the logo, or there is too much blurring after it is removed?

    If the first, you enlarge the white part of the mask a couple of pixels all around. You might have to increase the black border as well if it's too thin.

    If the latter; well, you can't recreate the original , the filter just extrapolates from the edges in.
    Quote Quote  
  28. Okay.....
    My problem has been solved.
    THANKS TO ALL!!!!
    Last edited by rijubrata; 17th Feb 2011 at 05:38.
    Quote Quote  
  29. Member
    Join Date
    Sep 2012
    Location
    nai nai
    Search PM
    is it possible to use xlogo in megui? if possible can u pls give me example script for this video....

    https://forum.videohelp.com/attachments/14122-1349288623/VTS_01_2.vob
    Last edited by poluhale2; 4th Oct 2012 at 04:24.
    Quote Quote  



Similar Threads