Forums > Jitter

averaged composite of all frames of a quicktime movie

December 24, 2007 | 8:00 am

Is this possible to do in real time as a movie is being recorded via jit.qt.record? If not is there another way to do this? I want to grab certain frames from my webcam and make a running average of all the selected frames.

thanks,
solomon


December 24, 2007 | 8:05 am

it’s entirely possible but be sure to watch out for error accumulation
and saturation. I would recommend using float32 matrices for this
purpose over char matrices.

wes

On Dec 24, 2007 2:00 AM, Solomon Bothwell wrote:
>
> Is this possible to do in real time as a movie is being recorded via jit.qt.record? If not is there another way to do this? I want to grab certain frames from my webcam and make a running average of all the selected frames.
>
> thanks,
> solomon
>


December 24, 2007 | 12:12 pm

Its good that these things are possible. It gives me hope I will finish this on time. Is there a way to update the current image in a matrix without sending anything to the jit.matrix’ outlet? I want to route jit.qt.grab to a jit.matrix and then bang out the current data of the matrix into jit.qt.record only when certain conditionals are met.

Also, how can I pass every frame of a movie into jit.op for averaging all at once?


December 24, 2007 | 12:13 pm

"Is there a way to update the current image in a matrix without sending anything to the jit.matrix’ outlet?"

I meant to say "Is there a way to update the current data in the matrix without passing anything through it’s outlet?"


December 24, 2007 | 12:37 pm

Hi Solomon,

try this,

cheers falk

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 485 279 29 196617 stop;
#P message 441 275 35 196617 write;
#P button 407 166 15 0;
#P user jit.pwindow 324 265 82 62 0 1 0 0 1 0;
#P newex 407 242 109 196617 jit.matrix @name xyz;
#B color 5;
#P newex 210 203 109 196617 jit.matrix @name xyz;
#B color 5;
#P user jit.pwindow 209 268 82 62 0 1 0 0 1 0;
#P message 283 133 102 196617 read countdown.mov;
#P toggle 210 94 15 0;
#P newex 210 114 57 196617 qmetro 40;
#P newex 210 171 63 196617 jit.qt.movie;
#B color 5;
#P newex 407 304 66 196617 jit.qt.record;
#P comment 431 166 113 196617 conditions trigger bang;
#P fasten 8 0 9 0 412 262 330 262;
#P connect 8 0 1 0;
#P connect 12 0 1 0;
#P connect 11 0 1 0;
#P connect 10 0 8 0;
#P connect 7 0 6 0;
#P connect 2 0 7 0;
#P fasten 5 0 2 0 288 156 215 156;
#P fasten 3 0 2 0 215 144 215 144;
#P connect 4 0 3 0;
#P window clipboard copycount 13;

Am 24.12.2007 um 13:13 schrieb Solomon Bothwell:

>
> "Is there a way to update the current image in a matrix without
> sending anything to the jit.matrix’ outlet?"
>
> I meant to say "Is there a way to update the current data in the
> matrix without passing anything through it’s outlet?"


December 24, 2007 | 4:41 pm

On Dec 24, 2007, at 12:00 AM, Solomon Bothwell wrote:

>
> Is this possible to do in real time as a movie is being recorded
> via jit.qt.record? If not is there another way to do this? I want
> to grab certain frames from my webcam and make a running average of
> all the selected frames.

One way to do this is to use a temporal low pass filter like
jit.slide or jit.wake. The nice thing about jit.wake is that it has
an internal 32 bit fixed point feedback buffer when working with char
data which can be a little bit faster than jit.slide float32. Set
jit.wake’s bleed/gain/normalize attributes to zero, and just use the
ff (feedforward) and fb (feedback). For example if you want the
running average to be 1% of the incoming frame and 99% of your
history, use @ff 0.01 and @fb 0.99. This is equivalent to jit.slide
@slide 100.

Or you could also use jit.gl.slab @file tp.slide.jxs @type float32.
This requires that your graphics card supports floating point data
(e.g. Intel GMA950 does not, but most ATI/NVidia cards do), but is
much faster than floating point processing on the CPU.

-Joshua


December 24, 2007 | 5:18 pm

>One way to do this is to use a temporal low pass filter like
>jit.slide or jit.wake. The nice thing about jit.wake is that it has
>an internal 32 bit fixed point feedback buffer when working with
>char data which can be a little bit faster than jit.slide float32.
>Set jit.wake’s bleed/gain/normalize attributes to zero, and just use
>the ff (feedforward) and fb (feedback).

Using ff and fb makes sense, but aren’t you going to be staring into blackness
by setting those attributes to zero?

all the clouds turn to words / all the words float in sequence / no
one knows what
they mean / everyone just ignores them // Gregory Taylor http://www.rtqe.net


December 24, 2007 | 5:30 pm

On Dec 24, 2007, at 9:18 AM, Gregory Taylor wrote:

>> One way to do this is to use a temporal low pass filter like
>> jit.slide or jit.wake. The nice thing about jit.wake is that it
>> has an internal 32 bit fixed point feedback buffer when working
>> with char data which can be a little bit faster than jit.slide
>> float32. Set jit.wake’s bleed/gain/normalize attributes to zero,
>> and just use the ff (feedforward) and fb (feedback).
>
> Using ff and fb makes sense, but aren’t you going to be staring
> into blackness
> by setting those attributes to zero?

Sorry. Gain should remain at the default of 1. But one doesn’t want
to change the bleed attr (unless one want’s accumulated bluring), or
normalize (unless you really want to normalize the output).

-Joshua


December 24, 2007 | 5:37 pm

thanks for the wake tip.
it will help if you could shed some more light on gpu data types.
for example is the remap shader. how docan i use long type data?

On Dec 24, 2007 6:41 PM, Joshua Kit Clayton wrote:

>
> On Dec 24, 2007, at 12:00 AM, Solomon Bothwell wrote:
>
> >
> > Is this possible to do in real time as a movie is being recorded
> > via jit.qt.record? If not is there another way to do this? I want
> > to grab certain frames from my webcam and make a running average of
> > all the selected frames.
>
> One way to do this is to use a temporal low pass filter like
> jit.slide or jit.wake. The nice thing about jit.wake is that it has
> an internal 32 bit fixed point feedback buffer when working with char
> data which can be a little bit faster than jit.slide float32. Set
> jit.wake’s bleed/gain/normalize attributes to zero, and just use the
> ff (feedforward) and fb (feedback). For example if you want the
> running average to be 1% of the incoming frame and 99% of your
> history, use @ff 0.01 and @fb 0.99. This is equivalent to jit.slide
> @slide 100.
>
> Or you could also use jit.gl.slab @file tp.slide.jxs @type float32.
> This requires that your graphics card supports floating point data
> (e.g. Intel GMA950 does not, but most ATI/NVidia cards do), but is
> much faster than floating point processing on the CPU.
>
> -Joshua
>


December 24, 2007 | 5:55 pm

On Dec 24, 2007, at 9:37 AM, yair reshef wrote:

> it will help if you could shed some more light on gpu data types.
> for example is the remap shader. how docan i use long type data?

Do you mean td.repos.jxs?

Typically you only have char and float32 at your disposal as texture/
output data. You can send a great deal of the 32bit long integer
range as float32 data. 23-24bits of integer data if your card
supports full float32 resolution. More info in OpenGL documentation
(orange + red books), card specifications, and other online resources.
.

-Joshua


December 24, 2007 | 10:29 pm

Thanks Josh. jit.wake is exactly what I needed.


December 25, 2007 | 10:11 am

have a look at the cv.jit libary there are some very useful
statistics objects. cv.jit.ravg is the one which might be interesting
for you.

falk

Am 24.12.2007 um 23:29 schrieb Solomon Bothwell:

>
> Thanks Josh. jit.wake is exactly what I needed.


Viewing 12 posts - 1 through 12 (of 12 total)