Printable Version of Topic
Click here to view this topic in its original format
Unofficial VirtualDub Support Forums > VirtualDub Filters and Filter Development > Edge Line Replacer


Posted by: Darkfalz Jan 30 2003, 01:31 PM
Often on video captures you often get a distorted/black line right on edges of video (not VCR head noise) and it'd be nice if there was a filter just to trim it off (that kind of thing can really chew bits) and replace it with the nearest adjacent line. To trim the line and resample the entire thing is both slow and you unneccesarily lose video quality that way.

Posted by: outlyer Jan 30 2003, 10:35 PM
I don't understand what you're saying unsure.gif but why are you talking about resampling? if there's noise in the edge, cropping it should be enough. (Excuse if I misunderstood you completely tongue.gif)

Posted by: Darkfalz Jan 31 2003, 03:30 AM
Say you have a capture off TV at 320x240 with just one line on the right edge black. If you trim that line off, you'll have a video of 319x240 which is not suitable for compression. If you resampled that video, it'd take a while to process and you'd lose quality resizing the whole thing just for one line.

My suggestion is you take the nearest line on that edge and use that to replace the black line. So you'll get one repeated line, but it's on the edge there so you probably wont notice. You've still got your original size and you didn't have to resize anything.

Posted by: fccHandler Jan 31 2003, 03:50 AM
If that's the case, then you could use the resize filter as follows:

New width = 319
New height = 240
Filter mode = Nearest neighbor

check "Expand frame and letterbox image"
Frame width = 320
Frame height = 240
Fill color = (your choice)

Posted by: Darkfalz Feb 1 2003, 12:01 PM
QUOTE (fccHandler @ Jan 30 2003, 09:50 PM)
If that's the case, then you could use the resize filter as follows:

New width = 319
New height = 240
Filter mode = Nearest neighbor

check "Expand frame and letterbox image"
Frame width = 320
Frame height = 240
Fill color = (your choice)

Um, did you even read what I posted? I don't want any solid colour to replace that line, I want the line directly next to it copied over it.

I found a filter which is meant to do this but unfortunately it's bugged (and very slow). Border Control by Simon Waters.

Posted by: outlyer Feb 1 2003, 02:21 PM
Why doubling a line is better than adding a black one?

Posted by: outlyer Feb 1 2003, 02:23 PM
I know that a single black line will put block based codecs into some problems but despite this, a black line at the edge will be less noticeable, or so I think

Posted by: jcsston Feb 1 2003, 06:34 PM
QUOTE (Darkfalz @ Feb 1 2003, 06:01 AM)
QUOTE (fccHandler @ Jan 30 2003, 09:50 PM)
If that's the case, then you could use the resize filter as follows:

New width = 319
New height = 240
Filter mode = Nearest neighbor

check "Expand frame and letterbox image"
Frame width = 320
Frame height = 240
Fill color = (your choice)

Um, did you even read what I posted? I don't want any solid colour to replace that line, I want the line directly next to it copied over it.

I found a filter which is meant to do this but unfortunately it's bugged (and very slow). Border Control by Simon Waters.

You could use a Nearest neighbor resize to 320x240
that would duplicate one line of pixels but the pixels would probably be in the middle of the picture wink.gif

Posted by: phaeron Feb 1 2003, 11:02 PM
The resize filter works according to OpenGL mapping, so yes, you will get the duplicate column right in the center of the image.

A nasty solution to this is to add borders around the image, crop it to 638x240 with the image on the left side, resize that to 640x240, and then crop that back down to 320x240.

Posted by: Darkfalz Feb 2 2003, 04:27 PM
QUOTE (phaeron @ Feb 1 2003, 05:02 PM)
The resize filter works according to OpenGL mapping, so yes, you will get the duplicate column right in the center of the image.

A nasty solution to this is to add borders around the image, crop it to 638x240 with the image on the left side, resize that to 640x240, and then crop that back down to 320x240.

Or you could just tell me the two or three lines of code to use in Filter Factory wink.gif

I really don't understand what the point of releasing that was with absolutely no documentation. How do you expect people to know what codes they can use?

Posted by: jcsston Feb 2 2003, 07:08 PM
Here is phaeron's previous http://virtualdub.everwicked.com/index.php?act=ST&f=11&t=128&hl=filter+factory&s=045caa96ea025902ed14ed485da0f3a4 about Filter Factory

Posted by: phaeron Feb 2 2003, 10:41 PM
QUOTE

I really don't understand what the point of releasing that was with absolutely no documentation. How do you expect people to know what codes they can use?


I released the source code. Not satisfied with that? You'll have to live with the fact that not everything I put out is a finished product. Sometimes I just release stuff in case someone else might find it useful.

Posted by: Darkfalz Feb 3 2003, 05:31 AM
QUOTE (phaeron @ Feb 2 2003, 04:41 PM)
QUOTE

I really don't understand what the point of releasing that was with absolutely no documentation. How do you expect people to know what codes they can use?


I released the source code. Not satisfied with that? You'll have to live with the fact that not everything I put out is a finished product. Sometimes I just release stuff in case someone else might find it useful.

I looked through the source code for the constructors and couldn't find them. I guess I didn't look hard enough.

Powered by Invision Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)