Re: [PD] multiblob without luminosity

2010-08-28 Thread Derek Holzer
You want [pix_background]. Please see attached patch, originally by Ben 
Bogart.


D.

On 8/28/10 7:07 AM, ronni montoya wrote:

Hello pd list. I would like to know if its possible or if there is a
way to have something like the pix_multiblob object but not based on
luminosity but instead on background substraction.
I been seen that with opencv it is possible to track blobs based on
backgound substraction instead of luminosity. How can i achieve this
in puredata?



--
::: derek holzer ::: http://macumbista.net :::
---Oblique Strategy # 78:
Go outside.  Shut the door.
#N canvas 75 71 1007 721 10;
#X obj 277 131 pix_grey;
#X msg 302 159 reset;
#X obj 277 188 pix_background;
#X msg 370 167 \$1 \$1 \$1;
#X msg 370 132 0.5;
#X floatatom 370 151 5 0 0 0 - - -;
#N canvas 439 104 589 611 cursor 0;
#X obj 19 36 inlet;
#X obj 231 32 inlet;
#X obj 151 346 translateXYZ;
#X text 62 150 0.64;
#X text 34 151 1;
#X obj 20 63 t f f;
#X obj 34 176 -;
#X text 59 177 X-Range;
#X text 280 176 Y-Range;
#X obj 53 215 expr (8/$f1);
#X obj 20 215 -;
#X obj 38 241 *;
#X obj 26 95 max 0;
#X obj 68 95 min 10;
#X obj 58 131 f;
#X obj 30 131 f;
#X obj 39 267 - 4;
#X text 278 148 0.64;
#X text 250 147 1;
#X obj 232 60 t f f;
#X obj 250 172 -;
#X obj 267 215 expr (8/$f1);
#X obj 233 215 -;
#X obj 251 241 *;
#X obj 238 92 max 0;
#X obj 280 92 min 10;
#X obj 272 128 f;
#X obj 246 127 f;
#X obj 221 268 expr (-1*$f1)+4;
#X obj 436 30 inlet;
#X obj 437 61 * 10;
#X obj 150 323 gemhead 15;
#X obj 357 496 circle 0.1;
#X obj 33 410 separator;
#X obj 204 410 separator;
#X obj 205 496 rectangle 0.2 0.01;
#X obj 357 410 separator;
#X msg 367 454 draw line;
#X obj 367 433 loadbang;
#X obj 152 371 colorRGB 1 0 0 1;
#X obj 32 495 rectangle 0.01 0.2;
#X msg 438 454 width \$1;
#X obj 437 398 int;
#X obj 438 425 + 1;
#X text 433 10 size;
#X text 20 13 X-coordinate;
#X text 221 11 Y-coordinate;
#X text 278 370 color red;
#X obj 501 30 inlet on off;
#X connect 0 0 5 0;
#X connect 1 0 19 0;
#X connect 2 0 39 0;
#X connect 5 0 10 0;
#X connect 5 0 12 0;
#X connect 5 1 13 0;
#X connect 6 0 9 0;
#X connect 9 0 11 1;
#X connect 10 0 11 0;
#X connect 11 0 16 0;
#X connect 12 0 15 0;
#X connect 13 0 14 0;
#X connect 14 0 6 1;
#X connect 14 0 10 1;
#X connect 14 0 13 1;
#X connect 15 0 6 0;
#X connect 15 0 12 1;
#X connect 16 0 2 1;
#X connect 19 0 22 0;
#X connect 19 0 24 0;
#X connect 19 1 25 0;
#X connect 20 0 21 0;
#X connect 21 0 23 1;
#X connect 22 0 23 0;
#X connect 23 0 28 0;
#X connect 24 0 27 0;
#X connect 25 0 26 0;
#X connect 26 0 20 1;
#X connect 26 0 22 1;
#X connect 26 0 25 1;
#X connect 27 0 20 0;
#X connect 27 0 24 1;
#X connect 28 0 2 2;
#X connect 29 0 30 0;
#X connect 30 0 32 1;
#X connect 30 0 42 0;
#X connect 31 0 2 0;
#X connect 33 0 40 0;
#X connect 34 0 35 0;
#X connect 36 0 32 0;
#X connect 37 0 32 0;
#X connect 38 0 37 0;
#X connect 39 0 33 0;
#X connect 39 0 34 0;
#X connect 39 0 36 0;
#X connect 41 0 32 0;
#X connect 42 0 43 0;
#X connect 43 0 41 0;
#X connect 48 0 31 0;
#X restore 282 510 pd cursor;
#X obj 612 110 separator;
#X obj 612 131 pix_texture;
#X obj 612 152 square 4;
#X obj 62 264 pix_texture;
#X obj 62 244 alpha;
#X obj 62 224 colourRGB 1 1 1 0.65;
#X obj 62 284 translateXYZ -2.4 -2.4 0;
#X obj 427 49 gemhead 10;
#X obj 62 205 spigot;
#X obj 99 160 tgl 20 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X obj 427 70 pix_video;
#X obj 16 114 gemwin 30;
#X msg 24 47 create;
#X msg 25 71 destroy;
#X obj 19 18 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X text 335 440 size;
#X text 315 440 Y;
#X text 289 439 X;
#X text 859 10 by Ben Bogart (b...@ekran.org);
#X obj 62 304 square 1.5;
#X obj 277 106 separator;
#X obj 278 423 pix_blob;
#X obj 205 15 loadbang;
#X msg 202 34 0;
#X obj 426 15 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X msg 33 92 dimen 300 300;
#X text 48 16 gem window;
#X text 449 13 live input camera [firewire/usb];
#X text 610 224 [pix_background] 'removes' the background of an image
by comparing a static image in memory to an incoming video stream.
all values withing a given range are turned black. for best effect
\, place a camera on a static scene like a blank wall and hit 'reset'.
then set the range control to cover any variance in the background.
when a new object enters the scene it will be the only thing draw against
a black background. use pix_chroma_key or pix_compare to add in images
in place of the black.;
#X text 611 199 --;
#X text 607 85 image of the camera;
#X text 608 93 ;
#X text 610 392 Inlet 2: float: range (f == f f f);
#X text 609 341 Inlet 2: list: range \; in RGBA mode this is +-red
+-green +-blue \; in YUV-mode this is +-luma +-Cb +-Cr \;
in Gray-mode only the first value is important +-gray;
#X text 612 211 Description: separate an object from background;
#X text 215 80 motion tracking;
#X text 216 88 ---;
#X text 34 167 ;
#X text 440 171 threshold;
#X text 605 446 [pix_blob] will calculate the 

Re: [PD] multiblob without luminosity

2010-08-28 Thread ydego...@gmail.com

well, errr, there is opencv for pure data ( pdp or gem ) :
http://www.hangar.org/wikis/lab/doku.php?id=start:puredata_opencv

but i think it's not linked anywhere, hum, yes,
i love democracy

ciao,
sevy


ronni montoya wrote:

Hello pd list. I would like to know if its possible or if there is a
way to have something like the pix_multiblob object but not based on
luminosity but instead on background substraction.
I been seen that with opencv it is possible to track blobs based on
backgound substraction instead of luminosity. How can i achieve this
in puredata?


thanks in advance


Ronni Montoya Huamani

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -  
http://lists.puredata.info/listinfo/pd-list

   



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] multiblob without luminosity

2010-08-28 Thread IOhannes zmölnig
On 08/28/2010 07:07 AM, ronni montoya wrote:
 Hello pd list. I would like to know if its possible or if there is a
 way to have something like the pix_multiblob object but not based on
 luminosity but instead on background substraction.
 I been seen that with opencv it is possible to track blobs based on
 backgound substraction instead of luminosity. How can i achieve this
 in puredata?
 

[pix_multiblob] actually has nothing to do with luminosity.
it internally uses a single-channel image.
if you pass it an RGB image. it will convert to the single-channel image
based on luminosity.
if you pass it a grey-scale image, it will simply accept that as the input.

it doesn't care about the semantics.

so you only have to create a single channel (aka greyscale) image that
is what you need (e.g. difference between a background image and the
current frame), then you can feed that to the object and be happy.


fgm,asdr
IOhannes



signature.asc
Description: OpenPGP digital signature
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] multiblob without luminosity

2010-08-27 Thread ronni montoya
Hello pd list. I would like to know if its possible or if there is a
way to have something like the pix_multiblob object but not based on
luminosity but instead on background substraction.
I been seen that with opencv it is possible to track blobs based on
backgound substraction instead of luminosity. How can i achieve this
in puredata?


thanks in advance


Ronni Montoya Huamani

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list