Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#101 | Link | |
|
Registered User
Join Date: Jan 2006
Posts: 1,869
|
Some small updates. New sample:
http://screenshotcomparison.com/comparison/91853 Quote:
My script *does* work on 2nd generation tapes, it only lines up black borders, the tape has nothing to do with it. What I was referring to was basic research into technical measurements on 2nd generation tapes. I want to make my own 2nd generation copy and do some measurements on it, that's all. Last edited by jmac698; 3rd November 2011 at 20:57. |
|
|
|
|
|
|
#105 | Link |
|
Registered User
Join Date: Jan 2006
Posts: 1,869
|
@sven:
Regarding your line length theory, I did some calculations, but haven't finished analyzing it yet. If you correlate two steps, first of all the mean is length/n, where length is the length of the step. I don't have the rest derived yet. Sliding the steps against each other forms a pattern, if size=8 over 16 pixels, we have: x=y=(1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0) r=1 if size=7 or 9 we have x=(1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0), y=(1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0) or (1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0) r=.88 Continuing we have size 8 1 7/9 .88 6/10 .77 5/11 .67 4/12 .58 3/13 .48 2/14 .38 1/15 .26 0/16 (1/0) So we have the maximum when edges are aligned and it gets less accurate the further the edges are from each other, also you can't tell sign, that is if the edge is to the left or the right. A simple inspection could tell you probably, like the average on either side. I still don't see why the lines get bigger, it should be symmetrical. Could be the plugin is stopping at the left edge, but in the video the right edge continues. |
|
|
|
|
|
#107 | Link |
|
Registered User
Join Date: Jan 2006
Posts: 1,869
|
I almost have the answer, but a quick guess is it's something like a/n/(sqr(b/n)*sqr(c/n)) where b+c=n or something like that, anyhow this means I can do a single correlation and compute the exact distance by working backwards, then just gotta find it's sign.
So what we've just discovered is a simple formula to find the edge which is robust to noise, brightness and contrast. It gets very sensitive to noise the farther apart the edges are. I could do two correlations to get the maximum accuracy. |
|
|
|
|
|
#109 | Link |
|
Registered User
Join Date: Jan 2006
Posts: 1,869
|
Hey Cher,
thanks for asking, it reminds me and also encourages me. In fact I haven't done any video work since xmas, once the festivities took me away from my hobby it wasn't easy getting back. So you never know, I would like to finish these ideas... |
|
|
|
|
|
#111 | Link |
|
Registered User
Join Date: Aug 2003
Location: Germany
Posts: 186
|
Looking at your screenshot it shows a visible area (52us) of roughly 670x576 pixel with a loss of horizontal information by 704->670 (~34 pixels per line). So technically the scan rate/pixel clock hasn't change noticeably if i see that correctly.
Do you have any informations about that changed parameters (clock rate, hsync, prescale...)? I'm currently looking into patching philips drivers and it would be much easier if i would have some values i can work with. |
|
|
|
|
|
#112 | Link |
|
Registered User
Join Date: Jan 2006
Posts: 1,869
|
Modern cards sample SD ntsc & pal at a multiple of 13.5MHz. Modern cards use oversampling of 27MHz or more. As a result, there's actually over 1000 samples per line.
There is a standard for VCRs for jitter to be +-3uS (I believe). In my sample, I used a tweaked card with standard sampling rate, but the registers adjusted to begin active video line earlier, that is less offset from front porch. If you tell me the datasheet for your device, I can suggest which register and value to put there, although if you can make all the timing registers variable then it's easier to experiment. Hopefully I'll get back to this this year. I'm collecting new equipment to examine it in more detail. I believe I bought a TBC the other day, haven't tested it yet. |
|
|
|
|
|
#113 | Link |
|
Registered User
Join Date: Jan 2003
Posts: 124
|
I'm wondering if this could be modified to solve whole-frame vertical image jitter. (Not horizontal signal jitter, as this virtual TBC is attempting to resolve.)
What I'd like to see is an if/then/else type dejitter script for videos with jumps in the frame that are only ONE frame long (compared against several before/after framse). Not even frequent bouncing or vibration necessarily, but jumping frames maybe once per second (at most). If whole-frame movement exists, then act. If not, ignore. Vibration and serious jitter can come later. It's actually less common to be that ruined. Trying to apply deshake filters is crap because it wants to "correct" vertical pans and movements of large objects. It could be tracked against the head switching noise at the bottom of the frame. In fact, I have a matted widescreen VHS movie, where it jumps, so there's two huge black borders on top/bottom to track against. I've tried to find a good vertical de-jitter method for probably 10 years now. All create more problems than they solve. I'd still like to see this virtual TBC fix my fubar Robotech test captures. ![]() .
__________________
Back in town. If you want my advice, then find me at the DigitalFAQ forum. Glad to assist. |
|
|
|
|
|
#115 | Link |
|
Registered User
Join Date: Jan 2006
Posts: 1,869
|
New Avisynth script
TBC 0.6 by jmac698 Jul 11, 2012 A script to resize each line of the source by a different amount, by searching for black borders. YUV only. Avisynth 2.58+ Usage: see tbc.avs demo Requirements: dejitter 0.2, findpos 0.1 (included) 0.6: first plugin version http://www.sendspace.com/file/01u1wc The quality is no different, but it's a lot faster. Example included. |
|
|
|
|
|
#117 | Link |
|
Registered User
Join Date: Jan 2006
Posts: 1,869
|
Please extract the included plugins and place into your plugins directory.
jitter02.zip -> jitter.dll -> plugins\jitter.dll findpos01.zip -> findpos.dll -> plugins\findpos.dll Fun with jitter analysis Using the download package, try this script instead: Code:
srcdir="C:\Documents and Settings\me\My Documents\Downloads\filters\tbc\"
src=ImageSource(srcdir+"jittered.jpg").converttoyuy2
thresh=85
#Mark video edges
findpos_h(src, x1=60, x2=0, thresh=thresh)#search for the first bright pixel, starting 48 from left and 0 from right
#test note: (65,0)=92
converttoyv12.histogram(mode="levels")#show distribution of jitter
#histogram(mode="classic")#recreate the jitter with a solid white line
return last
function findpos_h(clip src, int "searchwidth", int "x1", int "x2", int "thresh"){
searchwidth=default(searchwidth,32)
x1=default(x1,0)
x2=default(x2,0)
l=findpos(src, x1=x1, x2=x1+searchwidth, thresh=thresh)#.crop(0,0,-src.width+2,0)
r=findpos(src.fliphorizontal, x1=x2, x2=x2+searchwidth, thresh=thresh).crop(0,0,-src.width+2,0)
stackhorizontal(l,r).pointresize(2,src.height)
l
greyscale
}
In the classic mode, you can see more clearly the jitter in this video, but with an artificial white line. |
|
|
|
|
|
#118 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,406
|
Jmac, hope you remembered to point out that users need VC++ runtimes for 2008 (think thats your version).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
|
|
|
|
#120 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,406
|
Yes of course there is, use a different compiler.
![]() Just be glad you did not choose 2010 Express. (A lot, but not all will already have 2008 runtimes).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
|
|
![]() |
| Tags |
| tbc |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|