Main Page Star Wars Fotografie Różności Nauka Linki
Star Wars Photos Miscellany School Links



LOGOAWAY v2.2 - VirtualDub filter

Download

Download NEW Logoaway v2.2 (2.0+bugfixes+preview)
Download OLD Logoaway v1.0


Table of contents

  1. Introduction
  2. How does it work?
  3. Configuration dialogbox
  4. Remove mode
  5. XY weight
  6. Logo border position
  7. Logo border size
  8. Solid color fill
  9. Keyframe period
  10. Border default sets
  11. Advanced border configuration
  12. Thanks
  13. ToDo
  14. ChangeLOG

Introduction

Main purpose of this filter is remove static element from video source. Very often such an elements are added to live signal to mark material as someone's property - logo, or just to leave a sign "Jimmy wuz here". There is nothing wrong with it as long as there is no need to encode signal with low bitrate. In such a case too much of the bitrate goes encoding logo mark and as an effect quality of video signal is dropped down.

Note to all newbies
There is no way of restoring lost data in a video signal. As a lost data we can consider video overlayed with some mark. Interpolation may work and may not work at all - it depends on many factors.

Note to old users of v1.0:
Marking logo corners has changed due to possible recomputation of borders.
Read more in sections: logo position, logo size and border mode.

Back to t.o.c.

How does it work?

The idea is very simple. Interpolation of logo borders. Each pixel in logo area belongs to some row (R) and column (C). To know what value should pixel have we interpolate colors in a row R from west logo edge to east edge (horizontal interpolation) and vertically from north to south in column C. Then target pixel is sum of X% of Hcolor and Y% of Vcolor. With a little math:

Hcalc = west_color * distance_from_east + east_color * distance_from_west
Vcalc = north_color * distance_from_south + south_color * distance_from_north

then

target_pixel = Hcalc * X_weight + Vcalc * Y_weight

where distances and weights are <0,1> and

1 = distance_from_west + distance_from_east
1 = distance_from_north + distance_from_south
1 = X_weight + Y_weight


Configuration dialogbox

Remove mode


"Remove mode" section selects method of recalculating logo area.
For a first view Logoaway v2.0 seems to have much less methods than v1.0. It is not true. Old methods "X blur" and "Y blur" can be done with "XY blur" when X-Y weight slider is set 100% X (max left) or 100% Y (max right). "XY blur" is also expanded by XY weighted interpolation.

Filter mode Description
OFF This mode does nothing. It is just for quick fitler on/off. Since you do not have to remove filter from VirtualDub list you do not have to set filter parameters again on filter reactivation.
XY blur In this mode, modes: X-blur and Y-blur are performed at the same time.
Solid color This mode fills marked logo with one color. Color value should be entered as RRGGBB value with hex representations for each color.

If you want to ask me: "Why? Interpolation would do the same" I say: Yes, but unless video source is noise free (from digital source like DVD or digital video data send by Firewire) interpolated logo will put unnecessary noise to the video. So if you can tell logo surrounding color (ie. black when logo on letterbox top or down part) filling it with one solid color should give codec few extra bits free.
Back to dialogbox or t.o.c.

X-Y blur weight


In XY blur target pixel is a sum of horizontal & vertical interpolations. This slider selects how much target pixel is based on horizontal (X) and vertical (Y) interpolation. Left is 100% X and right is 100% Y, and fifty-fifty in the middle.

X blended XY blended Y blended
Only X blended 50% X + 50% Y blended Only Y blended

Back to dialogbox or t.o.c.

Logo border position

Cordinates of top-left corner of the logo border. Logo position X & Y must be in range <0,frame width-3>.

Logoaway (since v2.0) is based on logo border selection. With position and width parameters logo border rectangle is marked then all pixels inside this rectangle are overwritten. By changing border mode to "Interpolation" filter will overwrite also border. To know more about borders read border mode part.

Back to dialogbox or t.o.c.

Logo border size

Width and height of logo border rectangle. Both width and height must be at least 3 because there is no need in marking empty area (border 3x3 marks exactly one pixel).

Back to dialogbox or t.o.c.

Solid fill color

In solid fill color type here color value. Color value should be entered as RRGGBB value
with hex representations for each color. The color interpreted by filter is typed in the disabled edit gadget on the right.

Back to dialogbox or t.o.c.

Keyframe period

Here you type integer N. Every N frames new logo replacement is calculated. With N=0 or N=1 new logo is calculated each frame.
The purpose of this function is to freeze logo replacement unchanged up to next keyframe to get extra few bits of target bitrate.

Back to dialogbox or t.o.c.

Border default sets


If you too tired to set Advanced border configuration manually here come some predefined border configurations. Selecting one of the available modes sets up Advanced border configuration in a second.

Back to dialogbox or t.o.c.

Advanced border setup

This is main upgrade in V2 of LogoAway. Logoaway V1 interpolation worked good as long as logo had all four borders of valid original signal, that is logo fully over video.
Then, some day, Jon send me an email with a description of LogoAway failure when some of the logo borders was invalid. Ie. logo over letterbox blackborder.

Look here: (click miniature to get fullsized image)

Frame with logo over letterbox black border

and look what is going on after old method:



You see? Interpolation from blue sky to black letterbox border gives dark smudge in place of logo. Now, let's select only part of logo over video. Then force top logo border to recompute by interpolation. Result:



Better? :-) Remaining logo part can be removed with cropping or (if you need letterbox) you can remove top part with another instance of LogoAway with solid black as fill.

Interpolated based methods are based on logo border. In this section you can configure how logo borders are created.

This part is created from:
Border Corners - four selection lists
Border Modes - four mode selection lists
Visible Borders - switch


Border Corners

This selectors are used only when edge mode between selectors is set to "Interpolate". This selectors are invented to help user configure interpolation. When selecting some border to Interpolate configure its ends with valid points.

Border Modes

ModeDescription
Direct In this mode border is created by selecting pixels laying under border line in original video frame
Copy opposite As Direct but pixels are taken from opposite border (ie. north for south selector).
Interpolate Border is recomputed as gradient interpolation. You can select any corner pixel as Start and End pixels by corner reselection in NW/NE/SW/SE lists (ie. setting NE in upper left corner means: use color of North-East corner in upper left corner).
BEWARE! Border is overwritten with interpolated pixels.
Back to dialogbox or t.o.c.

Visible borders

Clicking this gadget enables realtime preview of video. Using this feature and logo visible border speeds up setting logo parameters. This button is disabled when no video file is loaded into VirtualDub.

Visible borders

When checked - each border is marked with little dots. Should be helpfull to shot logo area (I know logo selecting sucks. It will be changed to mouse or rather auto selection).

Back to dialogbox or t.o.c.

Thanks

I have to send thanks to Jon C. Hodgson for detailed notes about logoaway failure on letterboxed logos. He sent me problem description with a nice images that made problem clear in a minute. And it is true: one picture can stand for 1,000 words.

Back to dialogbox or t.o.c.

ToDo

Back to dialogbox or t.o.c.

ChangeLOG

From 2.0 to 2.2