Quantcast Avisynth: Dekafka Logo Removal (like on the Scifi Channel) - digitalFAQ.com Forums [Archives]
  #1  
10-14-2003, 01:29 PM
nicksteel nicksteel is offline
Free Member
 
Join Date: Nov 2002
Posts: 863
Thanks: 0
Thanked 0 Times in 0 Posts
Could someone experienced with photo editors look at this article and give some advice? I would really appreciate it.

http://www11.brinkster.com/poptones/...5F2003#preview

I need to make a "mask" as is described in the above article.

In this case the "bug" lives in the upper right of the screen, is about 27 pixels tall and 59 pixels wide. So, we cut a single line of 59 pixels from lines 36 and 63 beginning at pixel 582 (ie the upper right).

The part discussing making the mask has me a bit confused, as I haven't used photo editors very much:

Open Photoshop (or Gimp, or Paint Shop Pro) and make a black and white mask of the logo. You'll want to make sure it is about a pixel taller and wider than the actual logo, since the scan lines will make the bug prone to flickering - and the only thing more annoying than a bug that sits there through the whole video is a single pixel that flickers on and off every other frame for the whole video!
In this case, the mask looks like this. Note the image below is radically enlarged just to make it easier to see the details. It was made by simply outlining the "WDR" in white, then making two copies and layering them to the left and right to make it "blur" a tiny bit. This prevents aliasing and makes the letters appear smooth.


The article states 'outlining the "WDR" in white, then making two copies and layering them to the left and right to make it "blur" a tiny bit.'

Exactly how do I do this? The mask in the article appears to be made by painting out the "WDR" in white and then filling in the rest of the "box" with black.

I need to know the most simple straightforward method.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
10-15-2003, 08:32 AM
CheronAph CheronAph is offline
Free Member
 
Join Date: Feb 2003
Location: Espoo, Finland
Posts: 494
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to CheronAph
I can make the .avi mask for you, don´t know about the rest!
__________________
¨¨°º©©º°¨¨°º©CHERONAPH©º°¨¨°º©©º°¨¨
Reply With Quote
  #3  
10-15-2003, 05:16 PM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
Is the BUG a solid logo or white semi-transparent?
Reply With Quote
  #4  
10-15-2003, 11:54 PM
magnus magnus is offline
Free Member
 
Join Date: Sep 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Mr Tibs
Check your pm box.

Thanks,
Magnus
Reply With Quote
  #5  
10-16-2003, 07:48 AM
nicksteel nicksteel is offline
Free Member
 
Join Date: Nov 2002
Posts: 863
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by MrTibs
Is the BUG a solid logo or white semi-transparent?
It's the white SciFi channel logo.
Reply With Quote
  #6  
10-16-2003, 08:31 AM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
Personally, I would try the XLogo filter. It has a Vdub version for getting the settings right and I believe there are versions for Avisynth 2.x and 2.5. I think it produces much better results than Kafka. You could also try my LogoBlend filter.


I also wrote a version of Kafka using my LogoBlend filter. (no need to import graphics into an editor)
Reply With Quote
  #7  
10-16-2003, 09:08 AM
nicksteel nicksteel is offline
Free Member
 
Join Date: Nov 2002
Posts: 863
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by MrTibs
Personally, I would try the XLogo filter. It has a Vdub version for getting the settings right and I believe there are versions for Avisynth 2.x and 2.5. I think it produces much better results than Kafka. You could also try my LogoBlend filter.


I also wrote a version of Kafka using my LogoBlend filter. (no need to import graphics into an editor)
Do you have versions of your filters for Avisynth 2.5? From your samples, I think yours would do what I need.

Also, where does LogoBlend go in the avs script? (after Telecide/Decimate, etc)?
Reply With Quote
  #8  
10-16-2003, 03:58 PM
CheronAph CheronAph is offline
Free Member
 
Join Date: Feb 2003
Location: Espoo, Finland
Posts: 494
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to CheronAph
Here´s the mask, http://koti.mbnet.fi/~mjollnir/whitelogo59x27.avi
__________________
¨¨°º©©º°¨¨°º©CHERONAPH©º°¨¨°º©©º°¨¨
Reply With Quote
  #9  
10-16-2003, 06:21 PM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
LogoBlend can easily be used in 2.5 : see Automatic loading of AVS 2.0x plugins in AVS 2.5 thread.

It doesn't really matter where you put LogoBlend but generally I put it after Teliside and Decimate because then I only work on 24fps.

I've re-written the LogoBlend Fitler and added a few others to the dll. Look for a new LogoTools dll on my site. (I just have to write that darn documentation.)

Just a note: I could never get XLogo to work until I understood that when the documentation said the logo should be on a black background it meant R=0, G=0, B=0. When my card captures from TV, black is R=16, B=16, G=16.

In order to get Xlogo to work I followed this procedure:

1. Load video into Vdub and copy a frame with the logo on a black background to the clipboard.
2. Paste the clipboard into MSpaint.
3. Copy only the logo with a little area around it into the clipboard.
4. Paste the logo into a new MSPaint picture.
5. Manually paint the entire black area around the logo with some other colour like red.
6. Flood fill the red area with black. (By selecting black from MSPaint's pallet. - this is R=0, G=0, B=0)
7. Save the file with an underscore 0 at the end (i.e. Space_logo_0.bmp) in 256 colours.
8. Load the Xlogo filter into Vdub and adjust the settings.
9. Copy the settings into avisynth and you're done.
Reply With Quote
  #10  
10-17-2003, 08:04 PM
nicksteel nicksteel is offline
Free Member
 
Join Date: Nov 2002
Posts: 863
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks.

When I am painting around the logo in red, there are shades of gray as well as white. Do I paint them also?

When I paste the logo with a little area around it to paint, part of the screen is white (below the logo area). Do I ignore this?

Exactly how do I flood fill after I paint with red?

I know these are simple questions, but I really haven't used paint very much in the past.
Reply With Quote
  #11  
10-20-2003, 10:21 AM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Hi nicksteel, hi all:
my little contribution , and in part from the author site:
- you should paint all, logo and shades
-if logo is over a letterboxed area, you can configure the parameter "interpolate side" (try loading the filter first in virtuadub)
-you can paint with the brush tool
Some advice:
save the bitmap as 24 bit, or will give an error

And now I need a help
when I load the filter in my script for avisynth 2.5.2, I get a "crop" error. If I put converttoRGB before, and converttoyv12 after (this is supossed to be done internally), it works fine... but is VERY sloooow .
What can I do?.
Thanx
Reply With Quote
  #12  
10-20-2003, 10:27 AM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
The key with xlogo is that the outermost border around the logo is totally black. You can paint as close to the logo as you want but it is up to you. I try to eliminate noise around the logo but stay clear of the edges.

Too flood fill in MSPaint:

1.Choose the colour you want to flood fill. (in this case - black)
2. Click on the Paint Can icon.
3. Click on the colour you want to replace. (in this case red)

Once you get Xlogo to work, let me know about your results. Xlogo and LumaGraph both have trouble with very bright logos. Both tend to leave a dark shadow behind when they remove it. If this is what happens with the Space channel logo, let me know, my new filter can handle it better.
Reply With Quote
  #13  
10-20-2003, 01:25 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Mr Tibs:
can you help me with the error I posted up here (something about no even values in cropping in YV12).
When I manage to make the filter work, looks nice (I guess it can look better when I adjust well the parameters, but I'm still testing)
Reply With Quote
  #14  
10-21-2003, 11:15 AM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
@digitall.doc

I'm sorry to say that I don't use 2.5 so I'm a little in the dark. If you are converting to RGB and back, I would try the LogoBlend filter (Or my new filter, I promise to post it as soon as I test it with 2.5.) It is native YUY2 so it "should" do better.

With regard to your error issue, I would try inserting a do-nothing filter before Xlogo. (Like a trim(0,0,0,0)) That may do the trick.
Reply With Quote
  #15  
10-22-2003, 02:59 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Thanx Mr Tibs:
I wrote Leuf and he gave me the key: the numbers of the position (x,y), and dimensions of the bitmap, must be even number in YV12 colorspace.
After changing that the filter worked nice, without having to convert before and after.
I hope this will be of a help for all the "forumers" (nice my english, isn't it?)
Reply With Quote
  #16  
10-27-2003, 06:13 PM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
I posted my new LogoTools plugin. It includes an improved removal filter as well as logo detection filters. The other filters can be used with XLogo as well.

You can get the filter at:

http://www.geocities.com/mrtibsvideo/Logotools.html
Reply With Quote
  #17  
10-28-2003, 09:27 AM
nicksteel nicksteel is offline
Free Member
 
Join Date: Nov 2002
Posts: 863
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by MrTibs
I posted my new LogoTools plugin. It includes an improved removal filter as well as logo detection filters. The other filters can be used with XLogo as well.

You can get the filter at:

http://www.geocities.com/mrtibsvideo/Logotools.html
NoLogo(clip,logo clip, logo frame number,min brightness change for logo, xpos of logo area, ypos of logo area, logo area width, logo area height)

Just to be sure, what is

clip

and

logo clip
Reply With Quote
  #18  
10-29-2003, 09:56 PM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
Here is a Kafka logo removal using LogoTools

Quote:
################################
logoframe=4
brightnesschange=5
xpos=273
ypos=374
width=34
height=65
xborder=352-xpos-width
yborder=480-ypos-height
#####################################

topline=clip.crop(xpos,ypos,width,1)
bottonline=clip.crop(xpos,ypos+height,width,1)
logosrc=StackVertical(topline,bottonline).blur(1.5 ,0).bilinearResize(34,height)
logosrc=Addborders(logosrc,xpos,ypos,xborder,ybord er)
LogoMask(clip,logosrc,logoclip,logoframe,brightnes schange,xpos,ypos,width,height)
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: Light Noise removal filter supermule Avisynth Scripting 15 05-18-2006 09:03 AM
Recording Video: Logo Removal nicksteel Video Encoding and Conversion 3 11-24-2003 08:21 AM
Avisynth: New Logo Removal filter MrTibs Avisynth Scripting 44 11-18-2003 03:44 PM
KVCD: logo removal on previously encoded captures? nicksteel Video Encoding and Conversion 2 11-02-2003 05:22 AM
Avisynth: New Logo removal filter (alpha) - comments welcome MrTibs Avisynth Scripting 1 08-08-2003 05:44 PM

Thread Tools



 
All times are GMT -5. The time now is 01:31 PM  —  vBulletin © Jelsoft Enterprises Ltd