Playing with Color Picker and Threshold
In light of the fact that I know my motion tracking needs a lot of work, I decided to start trying different methods for getting and working with information from my webcam.
Last night (and a little over lunch today) I threw a couple quick experiments together to see what it would look like, and I think that I might try this out with the video when I got home tonight.
The first example comes in the form of a basic color picker that lets you select the color of a pixel from within the image (on the top left). Once you have selected a color, use the slider on the right to control the threshold.
The second example is very similar to the first, it just uses a different sampling method for the color that it is going to use with the threshold. To try this tool, draw a box (from top left to bottom right) over the region of the image where you would like to get your sampling from.
This was a very quick and dirty experiment to see what I could get out of a bitmap with some basic functions, so please forgive my source. I will post more once I get it cleaned up tonight and start trying to work it into my motion detection application.











January 30th, 2009 at 10:05 am
_3ds.setChildMaterial I get an error (1061) on this line flash can’t find method related,please help I get a blank screen!
Netto
January 30th, 2009 at 10:32 am
are you working with the latest release of Papervision?
January 31st, 2009 at 12:03 am
i’ve never used the 3ds parser, i’ll give it a try. If i put some lights in 3D Studio, will they appear in PV3D with the 3ds parser? (i guess not, but i don`t have 3d Studio to make a test right now).
Very nice article by the way, thanks.
February 1st, 2009 at 1:18 am
thanks for the nice comments bioRex.
I know that the 3ds parser will load the lights as objects. But I don’t believe that there is much that can be done with them. I would recommend using dummy objects, either in the 3d scene or in the papervision scene.
February 7th, 2009 at 1:47 pm
in your example you apply a material to the collada object via code but what if the object has a material(defined in a 3d application) already applied ?
February 7th, 2009 at 2:00 pm
and one more question…you said:
These are good files to use if you would like to import assets that include animations.
So far so good but how can i control the animation in papervision.For example a simple walk cycle animation created in Cinema 4D via keyboard input in as3 and pv3d ?
February 7th, 2009 at 2:11 pm
I will work on creating a part 2 of this tutorial over the next couple days and see if i can answer some of your questions about animation and materials.
I can assure you that both things are possible (loading animations and using materials that were used in the 3d application).
March 17th, 2009 at 1:11 pm
VERY NICE FILE….i’m new in papervision i see your tutorial, but i don’t understand how i can change the 3dobject. i have my .3ds file and i put in my folder,then i change the extensione in Max3dsParser_v1 and export the .fla…. i need to know if the Max3dsParser_v1.as is remain the same or is an .as created from 3dstudio?
March 17th, 2009 at 1:16 pm
just find knot.3ds within the Max3dsParser_v1.as and change that to the name of your 3ds file. the rest can remain the same
March 17th, 2009 at 7:11 pm
doesn’t work…maybe my exporto in .3ds is wrong? i can’t see my file but still remain your knot.3ds…!!