digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Dekafka Logo Removal (like on the SciFI channel) (http://www.digitalfaq.com/archives/avisynth/6107-avisynth-dekafka-logo.html)

nicksteel 10-14-2003 01:29 PM

Avisynth: Dekafka Logo Removal (like on the SciFI channel)
 
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.

CheronAph 10-15-2003 08:32 AM

I can make the .avi mask for you, don´t know about the rest!

MrTibs 10-15-2003 05:16 PM

Is the BUG a solid logo or white semi-transparent?

magnus 10-15-2003 11:54 PM

Mr Tibs
Check your pm box.

Thanks,
Magnus

nicksteel 10-16-2003 07:48 AM

Quote:

Originally Posted by MrTibs
Is the BUG a solid logo or white semi-transparent?

It's the white SciFi channel logo.

MrTibs 10-16-2003 08:31 AM

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)

nicksteel 10-16-2003 09:08 AM

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)?

CheronAph 10-16-2003 03:58 PM

Here´s the mask, http://koti.mbnet.fi/~mjollnir/whitelogo59x27.avi

MrTibs 10-16-2003 06:21 PM

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.

nicksteel 10-17-2003 08:04 PM

MrTibs, a few dumb questions.
 
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.

digitall.doc 10-20-2003 10:21 AM

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 :cry: .
What can I do?.
Thanx

MrTibs 10-20-2003 10:27 AM

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.

digitall.doc 10-20-2003 01:25 PM

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 8) (I guess it can look better when I adjust well the parameters, but I'm still testing)

MrTibs 10-21-2003 11:15 AM

@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.

digitall.doc 10-22-2003 02:59 PM

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?) :roll:

MrTibs 10-27-2003 06:13 PM

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

nicksteel 10-28-2003 09:27 AM

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

MrTibs 10-29-2003 09:56 PM

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)


All times are GMT -5. The time now is 05:49 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.