Hi everyone,
I bought a cheap Logitech webcam to try motion detection with PD+Gem. I'm considering, among others things, using this as part of a digital instrument design.
First of all, the cheap webcam is of course rather noisy. But, the motion detection doing:
[pix_movement 0.3] l [alpha] l [pix_blob]
definitely does seem to work okay.
I did a test using the X and Y to control FM synthesis however, and it mostly worked but tended to produce a lot of noise when something was moving. What is the recommended way to smooth out the signal a bit?
Also, best way to find the average speed of motion?
Finally, are there more advanced motion detection strategies? Like, say, could I somehow put a bright red dot on my index finger, and just detect where my index finger is? I'd love to hear what people have done.
I also wonder, how the hell I would set it up for a real performance - Experimental music concerts here tend to be in small alternative sorts of venues, with not much space.
~David
Hi David~
Smoothing control signals can be done by using a line object.
[inlet jittery_signal] | [pack f 100] (100 ms linear smoother) | [line] | [outlet smooth_signal]
You can also easily experiment with different forms of interpolation if you scale your control range over the interval [0, 1]. A quartic interpolation would simply be like this:
[inlet scaled_line] | [expr pow($f1, 4)] | [outlet quartic_envelope]
For averaging, I believe that .hc has made some nice ones for his HID library that would suit your purposes. Or, you could use a list of however many "control samples" you'd want to average, and then operate on them with fbar's list-abs. Or, you could do something like this with iemmatrix too. There are even some control rate objects like lowpass filters and such. There's a ton of possibilities!
~Kyle
On 10/6/06, David Powers cyborgk@gmail.com wrote:
Hi everyone,
I bought a cheap Logitech webcam to try motion detection with PD+Gem. I'm considering, among others things, using this as part of a digital instrument design.
First of all, the cheap webcam is of course rather noisy. But, the motion detection doing:
[pix_movement 0.3] l [alpha] l [pix_blob]
definitely does seem to work okay.
I did a test using the X and Y to control FM synthesis however, and it mostly worked but tended to produce a lot of noise when something was moving. What is the recommended way to smooth out the signal a bit?
Also, best way to find the average speed of motion?
Finally, are there more advanced motion detection strategies? Like, say, could I somehow put a bright red dot on my index finger, and just detect where my index finger is? I'd love to hear what people have done.
I also wonder, how the hell I would set it up for a real performance - Experimental music concerts here tend to be in small alternative sorts of venues, with not much space.
~David
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Attached is a quick example of this.
~Kyle
On 10/6/06, Kyle Klipowicz kyleklip@gmail.com wrote:
Hi David~
Smoothing control signals can be done by using a line object.
[inlet jittery_signal] | [pack f 100] (100 ms linear smoother) | [line] | [outlet smooth_signal]
You can also easily experiment with different forms of interpolation if you scale your control range over the interval [0, 1]. A quartic interpolation would simply be like this:
[inlet scaled_line] | [expr pow($f1, 4)] | [outlet quartic_envelope]
For averaging, I believe that .hc has made some nice ones for his HID library that would suit your purposes. Or, you could use a list of however many "control samples" you'd want to average, and then operate on them with fbar's list-abs. Or, you could do something like this with iemmatrix too. There are even some control rate objects like lowpass filters and such. There's a ton of possibilities!
~Kyle
On 10/6/06, David Powers cyborgk@gmail.com wrote:
Hi everyone,
I bought a cheap Logitech webcam to try motion detection with PD+Gem. I'm considering, among others things, using this as part of a digital instrument design.
First of all, the cheap webcam is of course rather noisy. But, the motion detection doing:
[pix_movement 0.3] l [alpha] l [pix_blob]
definitely does seem to work okay.
I did a test using the X and Y to control FM synthesis however, and it mostly worked but tended to produce a lot of noise when something was moving. What is the recommended way to smooth out the signal a bit?
Also, best way to find the average speed of motion?
Finally, are there more advanced motion detection strategies? Like, say, could I somehow put a bright red dot on my index finger, and just detect where my index finger is? I'd love to hear what people have done.
I also wonder, how the hell I would set it up for a real performance - Experimental music concerts here tend to be in small alternative sorts of venues, with not much space.
~David
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
--
http://theradioproject.com http://perhapsidid.blogspot.com
(((())))(()()((((((((()())))()(((((((())()()())()))) (())))))(()))))))))))))(((((((((((()()))))))))((()))) ))(((((((((((())))())))))))))))))))__________ _____())))))(((((((((((((()))))))))))_______ ((((((())))))))))))((((((((000)))oOOOOOO
Ooops, this is not really interpolation at all, is it? Hmmmm, anyone know the REAL solution?
~Kyle
On 10/6/06, Kyle Klipowicz kyleklip@gmail.com wrote:
Attached is a quick example of this.
~Kyle
On 10/6/06, Kyle Klipowicz kyleklip@gmail.com wrote:
Hi David~
Smoothing control signals can be done by using a line object.
[inlet jittery_signal] | [pack f 100] (100 ms linear smoother) | [line] | [outlet smooth_signal]
You can also easily experiment with different forms of interpolation if you scale your control range over the interval [0, 1]. A quartic interpolation would simply be like this:
[inlet scaled_line] | [expr pow($f1, 4)] | [outlet quartic_envelope]
For averaging, I believe that .hc has made some nice ones for his HID library that would suit your purposes. Or, you could use a list of however many "control samples" you'd want to average, and then operate on them with fbar's list-abs. Or, you could do something like this with iemmatrix too. There are even some control rate objects like lowpass filters and such. There's a ton of possibilities!
~Kyle
On 10/6/06, David Powers cyborgk@gmail.com wrote:
Hi everyone,
I bought a cheap Logitech webcam to try motion detection with PD+Gem. I'm considering, among others things, using this as part of a digital instrument design.
First of all, the cheap webcam is of course rather noisy. But, the motion detection doing:
[pix_movement 0.3] l [alpha] l [pix_blob]
definitely does seem to work okay.
I did a test using the X and Y to control FM synthesis however, and it mostly worked but tended to produce a lot of noise when something was moving. What is the recommended way to smooth out the signal a bit?
Also, best way to find the average speed of motion?
Finally, are there more advanced motion detection strategies? Like, say, could I somehow put a bright red dot on my index finger, and just detect where my index finger is? I'd love to hear what people have done.
I also wonder, how the hell I would set it up for a real performance - Experimental music concerts here tend to be in small alternative sorts of venues, with not much space.
~David
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
--
http://theradioproject.com http://perhapsidid.blogspot.com
(((())))(()()((((((((()())))()(((((((())()()())()))) (())))))(()))))))))))))(((((((((((()()))))))))((()))) ))(((((((((((())))())))))))))))))))__________ _____())))))(((((((((((((()))))))))))_______ ((((((())))))))))))((((((((000)))oOOOOOO
--
http://theradioproject.com http://perhapsidid.blogspot.com
(((())))(()()((((((((()())))()(((((((())()()())()))) (())))))(()))))))))))))(((((((((((()()))))))))((()))) ))(((((((((((())))())))))))))))))))__________ _____())))))(((((((((((((()))))))))))_______ ((((((())))))))))))((((((((000)))oOOOOOO
On Fri, 6 Oct 2006, Kyle Klipowicz wrote:
You can also easily experiment with different forms of interpolation if you scale your control range over the interval [0, 1]. A quartic interpolation would simply be like this:
What is usually meant by quartic interpolation is a fourth-degree interpolation, which means five-point (think [tabread5]). What you are talking about is linear interpolation (two-point) in a quartic scale (by opposition to both linear scale and logarithmic scale).
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada
On Fri, 6 Oct 2006, David Powers wrote:
Finally, are there more advanced motion detection strategies? Like, say, could I somehow put a bright red dot on my index finger, and just detect where my index finger is? I'd love to hear what people have done.
Alexandre Castonguay has done that a few years ago using high-intensity LED. I'm doing the same for my girlfriend's project, which will be presented as Café Esperanza on the 19th at 20:00.
Café Esperanza is at the corner of Saint-Viateur & Saint-Laurent, in the city mentioned below:
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada
David Powers wrote:
Hi everyone,
I bought a cheap Logitech webcam to try motion detection with PD+Gem. I'm considering, among others things, using this as part of a digital instrument design.
First of all, the cheap webcam is of course rather noisy. But, the motion detection doing:
[pix_movement 0.3] l [alpha] l [pix_blob]
definitely does seem to work okay.
I did a test using the X and Y to control FM synthesis however, and it mostly worked but tended to produce a lot of noise when something was moving. What is the recommended way to smooth out the signal a bit?
Also, best way to find the average speed of motion?
Finally, are there more advanced motion detection strategies? Like, say, could I somehow put a bright red dot on my index finger, and just detect where my index finger is? I'd love to hear what people have done.
so you want to do color tracking? simplest thing is to just use the specified color-channel for [pix_blob] (e.g. [pix_blob 1] should just track the Red channel of an RGB signal (check the help-patch)). this only works in trivial cases (red, green, blue, white); for a more general approach convert the image's colorspace into hsv (with [pix_rgb2hsv] and mask out all colours you don't want on the colour-circle (e.g with [pix_curve]) and then track this.
once you only have the pixel of the desired colour, you can of couse also do motion tracking on the color-filtered image.
i thought i had some example of colortracking added to the gem-examples (but i might be wrong).
mfg,.asd IOhannes
IOhannes m zmoelnig wrote:
David Powers wrote:
Hi everyone,
I bought a cheap Logitech webcam to try motion detection with PD+Gem. I'm considering, among others things, using this as part of a digital instrument design.
First of all, the cheap webcam is of course rather noisy. But, the motion detection doing:
[pix_movement 0.3] l [alpha] l [pix_blob]
definitely does seem to work okay.
I did a test using the X and Y to control FM synthesis however, and it mostly worked but tended to produce a lot of noise when something was moving. What is the recommended way to smooth out the signal a bit?
Also, best way to find the average speed of motion?
Finally, are there more advanced motion detection strategies? Like, say, could I somehow put a bright red dot on my index finger, and just detect where my index finger is? I'd love to hear what people have done.
so you want to do color tracking? simplest thing is to just use the specified color-channel for [pix_blob] (e.g. [pix_blob 1] should just track the Red channel of an RGB signal (check the help-patch)). this only works in trivial cases (red, green, blue, white); for a more general approach convert the image's colorspace into hsv (with [pix_rgb2hsv] and mask out all colours you don't want on the colour-circle (e.g with [pix_curve]) and then track this.
once you only have the pixel of the desired colour, you can of couse also do motion tracking on the color-filtered image.
i thought i had some example of colortracking added to the gem-examples (but i might be wrong).
mfg,.asd IOhannes
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
do you know pdp_shape ?
ciOa,
sevy