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. |
10th December 2014, 03:15 | #42 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Dont think it would yield anything useful (even at PC levels) in YUV. (Think there was mention of that early in thread)
See edit to prev post. EDIT: I usually do implement for all colorspaces unless there is a reason not to, it aint usually that much extra bother (EDIT: Unless non-full frame Interlaced PLANAR is involved, can be a lot of extra bother).
__________________
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 ??? Last edited by StainlessS; 10th December 2014 at 03:23. |
20th December 2014, 21:09 | #43 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,497
|
I had no luck getting RgbAmplifier to work - it just ran out of memory - so I implemented my understanding of the process in a plugin:
http://forum.doom9.org/showthread.ph...32#post1703332 |
20th December 2014, 23:12 | #44 | Link | |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
Do you think we will get 'better' results if do it in HSV space? |
|
20th December 2014, 23:25 | #45 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,497
|
Ah, well, for once I've written a plugin that doesn't rely on my convoluted image library, so sharing the source is easy - I've added it to the zip file. I didn't put a licence in there but let's just agree it's GPLv2
Apologies if the code is a bit in opaque in places - I tend to favour conciseness over clarity. No idea what space would give best results - avoiding conversions seemed a good idea though. David |
20th December 2014, 23:33 | #46 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
David, can you please give spec on you system.
Already had probs reported on clipclop, perhaps related. I may have given false info to reelreel, perhaps yuv was not so impossible, Maybe I confused two diff plugs. Anyways is a concern that you had OM probs, sounds very much like clipclop Prob, perhaps a compiler thing, don't know. Gonna have a few more seasonally approved beers and take another peek. Dh, post your soure or at least pm to me, there should I hope have been no problem and is no problem on 32 bit m/c,s, I think. Running out of battery, bye.
__________________
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 ??? Last edited by StainlessS; 21st December 2014 at 15:22. |
20th December 2014, 23:59 | #47 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,497
|
On trying to load a script using RgbAmplifier, over the course of about 30 seconds VirtualDub's memory usage creeps up to 2Gb, then I get:
Avisynth open failure: GetFrameBuffer: Returned a VFB with a 0 data pointer! size=2073664, max=536870912, used=1067512512 I think we have run out of memory folks! ([GScript], line 15) ([GScript], line 27) ([GScript], line 42) ([GScript], line 43) ([GScript], line 45) I copied and pasted the function from the 2nd post in this thread, and it was the first thing in my script, so those line numbers should correspond with line numbers in the function as posted. The source was a 1920x1080 MTS, but the same thing happened with a half-sized Ut codec version, and also when I added another reduceby2 (making it 480x270). I've added amp's source to the .zip file linked above. Quote:
Last edited by wonkey_monkey; 21st December 2014 at 00:04. |
|
21st December 2014, 00:07 | #48 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
@davidhorman
Have you tried the current RgbAmplifier plugin? ---- Edit: @StainlessS Is RgbAmplifier similar to "Eulerian Video Magnification"? Very interesting stuff, I found a web implementation here: https://github.com/antimatter15/evm Last edited by Reel.Deel; 21st December 2014 at 00:43. |
21st December 2014, 16:31 | #50 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Oh thank goodness, I thought that you meant the plugin had Out Of Memory problems.
(The original script had OM problems due to OverLay which is very greedy on memory). A bit similar. There is a page somewhere with quite a few before/after samples, I hacked RgbAmplifier at one point to try to simulate same effect and to some degree it worked. However the other thing requires completely still subject for it to work, contrary to RgbAmplifier which requires just fixed camera. Eulerian Video Magnification worked better (at what it does) than the hacked version RgbAmp, but I was using their mp4 'before' samples which were probably somewhat more noisy than the actual source that they had available. There were a number of exchanges between me and Forensic on that subject, but not sure if in RT_Stats or some other thread, or might even have been via PM. (My PM box got full some months ago and so I wiped it).
__________________
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 ??? Last edited by StainlessS; 21st December 2014 at 16:44. |
21st December 2014, 16:52 | #51 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Quote:
|
|
21st December 2014, 17:24 | #52 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
I think I downloaded about 20 samples from somewhere and only picked about half of those available, dont seem to have link.
Here original posts in RT_Stats thread that I was thinking about, I think there was also some PM traffic which I no longer have. http://forum.doom9.org/showthread.ph...52#post1643252 and another thread on same with a few links (have not viewed yet). http://forum.doom9.org/showthread.ph...on#post1577941 EDIT: I viewed the samples that you posted, that 'after shot' of the swing looks bloody dangerous
__________________
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 ??? Last edited by StainlessS; 21st December 2014 at 18:38. |
21st December 2014, 19:44 | #53 | Link |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
An unintended side effect is ghosting. Wouldn't you get less ghosting when using a weighted average (following, say, a gaussian curve, or just bilinear) instead of a normal average? Would be interesting to see the difference ...
|
21st December 2014, 20:02 | #54 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Not sure how to do that efficiently (EDIT: for up to 198 source frames).
As it stands, it uses an accumulator with three int sized vars for each pixel. As it moves on to the next frame, it subtracts pixel values of the oldest frame from the accumulator. I think I could (EDIT: might be able to) manage linear weighting [EDIT: forwards and backwards with two accumulators], but no idea about the gaussian curve thing. Perhaps David can come up with something. EDIT: Perhaps any weighted average would actually stop the filter from doing its (forensic) job, the ghosting is caused by excessive movement [forensically useless anyway unless radius reduced for that ghosted frame].
__________________
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 ??? Last edited by StainlessS; 22nd December 2014 at 11:30. |
22nd December 2014, 11:13 | #55 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Further to previous edit.
Perhaps best bet would be to use ClipClop to select reduced radius RgbAmplifier frames where there is significant ghosting/movement. EDIT: David, from your post in 'New Plugins Sticky' Quote:
Quote:
Imagine clip of a persons wrist which is as stationary as the wrist owner can hold it, you could twin with a sinusoidal wave to match the wrist pulse, where +ve peaks are the pulse with coursing blood. These +ve peaks produce a rhythmical 'beat'. What is required is to average +ve peaks together and then amplifiy the difference to the averaged -ve peaks. You might be able to simulate that to some degree by selecting a 'window' that averages 540 degrees of our sinusoidal wave and amplifies difference between current frame and that average. 540 degrees would be selecting eg 1 +ve arc and 2 -ve arcs of our sinusoidal wave. So to use RgbAmplifier or your Amp, you need to know the beat frequency of the 'thing' you are trying to amplify and set radius/window to match. The "(current-off)+(current+off)" mentioned in my quote above is not too different to the 540 degrees thing, and as I chose 'off' of 13 frames, it would suggest that the pulse rate would be 13+1+13 ie 27 frames duration (-ve peak to next -ve peak [360 degrees]). Hope some of that made at least some sense, just in case you would like to pursue the EVM path. The EVM docs will describe it MUCH better, but I did not really read much of that and never did look at the published source. The above is a gross over simplification of EVM.
__________________
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 ??? Last edited by StainlessS; 22nd December 2014 at 13:55. |
||
22nd December 2014, 15:40 | #56 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,497
|
Unintended but also unavoidable, I think - in fact in some ways ghosting isn't a side effect at all, but a natural and required consequence of the method.
Quote:
You need to specify an approximate target frequency with EVM too. The difference is that EVM can be made to amplify only the target frequency, whereas RGBamplifier/amp amplify all frequencies above the baseline (and that includes the highest frequencies of all, i.e. noise). But I have an idea... David |
|
22nd December 2014, 15:57 | #57 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
The (current-off)+(current+off) [EDIT: average] plug hack was an attempt to do a crude amp of only target frequency.
Quote:
EDIT: by the way, the 540 degree thing is untested, cant even remember if I thought of it some time ago when doing the RGBAmp hack or just recently when trying to remember what I had done then.
__________________
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 ??? Last edited by StainlessS; 23rd December 2014 at 05:03. |
|
24th December 2014, 17:08 | #58 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,497
|
Just in case I don't get around to putting my idea into practice - I tried to get a rough idea of how well it might work by running amp twice in succession, without much interesting happening - the idea is to separate the higher frequency noise out first, before trying to enhance the level you're interested in.
In its simplest implementation, you could try specifying two windows, one for noise reduction and a wider one for enhancement. So instead of frame=frame+(frame-smooth)*multiplier, you'd do noise=frame-smooth1; frame=smooth1+(smooth1-smooth2)*multiplier+noise; More generally (and more accurately, if EVM really is a temporal analogue of my fusion plugin), you'd do repeated iterations of a 1 2 1 temporal kernel, subtracting it from the level above to separate out that particular frequency: Code:
smooth1=video.temporal_blur(1,2,1) level1=video-smooth1 smooth2=smooth1.temporal_blur(1,2,1) level2=smooth1-smooth2 ... I offer you these ramblings in hope of inspiring... something. Last edited by wonkey_monkey; 24th December 2014 at 17:11. |
19th January 2015, 08:05 | #59 | Link | |
Registered User
Join Date: Apr 2008
Location: California, USA
Posts: 127
|
Quote:
|
|
20th January 2015, 17:42 | #60 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
@forensic, great to hear from you again. Mobile right now and will likely not be around for at least a few days.
The out of men probs were related to the script version, so is nothing to worry about. I spotted martin53 about 10 days ago sneaking about, so he is well too.
__________________
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 ??? |
|
|