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

    im using virtualdub and the logo filter by Donald Graft. I want to put a logo but with transparent background. Since the filter only allows bmp files i cant import an image with the background already transparent so i have to make it disappear by tweaking the filter settings. There is an alpha mask checkbox which i checked after creating an alpha image. However the background doesnt go. The alpha image is the same color as the background i want to make transparent. Is supposed to be another color or why is it not working?

    Thank you.
    Quote Quote  
  2. Thanks for the link. So if the background is white then the alpha image has to be white? but what about if the background is blue or something else? what color should i use?

    Thank you.
    Quote Quote  
  3. Member
    Join Date
    Dec 2005
    Location
    Canada
    Search Comp PM
    Just insert the RGB value for the background colour which you want to be transparent, Blue is 0,0,255.

    Last edited by sambat; 26th May 2012 at 05:51. Reason: image
    Quote Quote  
  4. The alpha image is a transparency map. Where the alpha image is white the logo image shows. Where the alpha image is black the logo is transparent. Shades of gray in between are different levels of transparency. That allows you to have aliased edges. If you use "transparent color" mode you can't get good antialiasing.

    To use an alpha mask with Donald Graft's logo filter you need a separate grayscale image with the letter A appended to the base name: For example, if you are using LOGO.BMP as the logo, the alpha mask image should be LOGOA.BMP.

    Name:  logo.png
Views: 8392
Size:  668 Bytes + Name:  logoa.png
Views: 8344
Size:  581 Bytes = Click image for larger version

Name:	result.jpg
Views:	3863
Size:	14.7 KB
ID:	12572
    logo.bmp + logoa.bmp = result
    Last edited by jagabo; 26th May 2012 at 08:04.
    Quote Quote  
  5. Hi,

    i had already tried the transparent color option but the borders look bad. Now i tried with an alpha image and the borders look better but still not as good as i expected. Is it a limitation of the filter or am i doing something wrong?

    Thank you.
    Quote Quote  
  6. Originally Posted by supercain View Post
    i had already tried the transparent color option but the borders look bad. Now i tried with an alpha image and the borders look better but still not as good as i expected. Is it a limitation of the filter or am i doing something wrong?
    Neither. The problem is that your alpha image needs to be more accurate. Try stretching the contrast and darkening so that the edges of the mask get darker. Or blurring it a bit then stretching the contrast and darkening.
    Quote Quote  
  7. My logo is gold with a white border. Whats the best color to use on the alpha image? i used black. Thanks.
    Image Attached Thumbnails Click image for larger version

Name:	ass.bmp
Views:	686
Size:	541.0 KB
ID:	12573  

    Click image for larger version

Name:	assA.bmp
Views:	628
Size:	541.0 KB
ID:	12574  

    Quote Quote  
  8. What are you trying to do? Get rid of the white outline around the gold logo? Get rid of a few black pixels around the edges of the white outline?
    Quote Quote  
  9. Ged rid of the black only. The white border is part of the logo.
    Quote Quote  
  10. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    The problem with this method is that the anti-aliased edge of the logo interacts with the anti-aliased transition on the alpha image.

    If you overlay your logo onto a solid white video, I'd expect a grey outline at the edge of the logo where the alpha transition is.

    A way to get round this is to put the main logo image on a solid white background instead of black.
    Quote Quote  
  11. But what about the borders? they are white. If i put the logo on a white background they would disappear. Wouldn't they?
    Quote Quote  
  12. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    Originally Posted by supercain View Post
    But what about the borders? they are white. If i put the logo on a white background they would disappear. Wouldn't they?
    I thought you might say that

    and no, they wouldn't. Although they'd become invisible on the main image, the logo outline on the alpha image would make them visible again.
    Quote Quote  
  13. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    Click image for larger version

Name:	logo_comparison.jpg
Views:	5637
Size:	44.9 KB
ID:	12576
    top: using original images (bad edge transition)
    middle: using ass_02.bmp with assA.bmp
    bottom: same as middle, but overlaid on a grey background/video.

    I don't use virtualdub so I might be diagnosing the wrong problem, but what you describe is a common issue with alpha overlays. So much so that major TV networks quite often get it wrong.
    Image Attached Thumbnails Click image for larger version

Name:	ass_02.bmp
Views:	626
Size:	541.1 KB
ID:	12575  

    Quote Quote  
  14. Do like I said, blur the mask, then darken and contrast stretch it -- so that white remains white but darker shades get darker. That has the effect of slightly "shrinking" the mask away from the edges. Compare this mask to your original. Or you can paint the mask by hand but that's a PITA.
    Image Attached Thumbnails Click image for larger version

Name:	assA.bmp
Views:	488
Size:	541.0 KB
ID:	12577  

    Last edited by jagabo; 26th May 2012 at 10:30.
    Quote Quote  
  15. Intracube, Thanks. However the video background is blue in movement. Will it work too?

    Jagabo, i really dont understand the part about darkening the mask since the mask is already black. What do you mean? anyway, i used the image you attached but still, it looks the borders look kinda fuzzy.
    Image Attached Thumbnails Click image for larger version

Name:	logo.jpg
Views:	3204
Size:	96.1 KB
ID:	12578  

    Quote Quote  
  16. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    Originally Posted by supercain View Post
    Intracube, Thanks. However the video background is blue in movement. Will it work too?
    Yes, it will work on any background.

    EDIT: is that last image with the blue background using my modified image?

    I can see some nasty scaling artefacts and also edge aliasing.
    Last edited by intracube; 26th May 2012 at 10:41.
    Quote Quote  
  17. No, that example is with jagabo's. I have a question about yours. I have to use the image you attached plus the first alpha image i posted?
    Thanks.
    Quote Quote  
  18. Originally Posted by supercain View Post
    Jagabo, i really dont understand the part about darkening the mask since the mask is already black. What do you mean?
    You want to keep the white parts white but darken all the gray shades. That has the effect of "shrinking" the white portion of the mask.

    Originally Posted by supercain View Post
    anyway, i used the image you attached but still, it looks the borders look kinda fuzzy.
    If you want it less antialliased increase the contrast until the edge of the mask gets very sharp.

    Another approach you can take is make the entire border around the logo white instead of black. Then the mask doesn't have to match the logo perfectly.
    Last edited by jagabo; 26th May 2012 at 10:59.
    Quote Quote  
  19. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    Originally Posted by supercain View Post
    No, that example is with jagabo's. I have a question about yours. I have to use the image you attached plus the first alpha image i posted?
    Thanks.
    Correct.
    Quote Quote  
  20. It looks much better now. Next time i will know what to do. Thanks both of you!
    Quote Quote  
  21. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by supercain View Post
    Jagabo, i really dont understand the part about darkening the mask since the mask is already black. What do you mean?
    You want to keep the white parts white but darken all the gray shades. That has the effect of "shrinking" the white portion of the mask.
    This method is going to be difficult for supercain; get the mixture of blurring and contrast adjustment wrong and the edge of the logo will be blurred or aliased. On top of that, shrinking the edge of the alpha image will eat into the white border he wants to keep.

    As I mentioned, there are some bad scaling artefacts on the image in post #16. jagabo - might virtualdub be incorrectly set to use nearest neighbour scaling? This could be at least half of the problem.
    Quote Quote  
  22. Originally Posted by intracube View Post
    As I mentioned, there are some bad scaling artefacts on the image in post #16.
    I don't know what he did. Here's my mask with his logo on a blue background:

    Click image for larger version

Name:	LogoOnBlue.png
Views:	5392
Size:	187.2 KB
ID:	12579

    You have to click on the thumbnail to see it full size.
    Quote Quote  
  23. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by intracube View Post
    As I mentioned, there are some bad scaling artefacts on the image in post #16.
    I don't know what he did. Here's my mask with his logo on a blue background:

    Image
    [Attachment 12579 - Click to enlarge]


    You have to click on the thumbnail to see it full size.
    Both the suggested methods give comparable results. Of course neither would work well for logos with complex outlines...
    Quote Quote  



Similar Threads

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