-
1. Re: How can I apply camera live filters?
sinious Apr 20, 2013 7:15 AM (in response to BaCbDc)To do this you should look into getting the stream into something you can manipulate on a pixel by pixel basis to run filters, like BitmapData objects. You'd draw the stream into the object, then run filters, then display. This will be a very intensive task however. An example of drawing a camera into a BMD can be found here:
http://stackoverflow.com/questions/9888799/resizing-bitmapdata-in-actionscript-3
That example is really just resizing video but you get the general idea. Once you have the video frame in your BitmapData the sky is the limit on the filters you apply to the data.
The less intensive but far more complex task would be to use a Stage3D accelerated framework which accepts a NetStream source as the basis for a material. The calculations on the video could be wrapped into pixel shaders. This is quite a bit more complex but would at least use the GPU. However note the Camera class and Stage3D requires using direct (not GPU) acceleration (just a side note) on iOS devices.
-
2. Re: How can I apply camera live filters?
BaCbDc Apr 20, 2013 2:02 PM (in response to sinious)Thank you. I also found this http://ohnit.wordpress.com/2009/11/17/webcam-3/
example to set filter and that there are some filter classes http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filters/package-d etail.html.
-
3. Re: How can I apply camera live filters?
security_net Apr 21, 2013 12:52 AM (in response to BaCbDc)hello. did you succeed afterall ?
-
4. Re: How can I apply camera live filters?
BaCbDc Apr 22, 2013 10:59 AM (in response to sinious)> the Camera class and Stage3D requires using direct (not GPU) acceleration
> (just a side note) on iOS devices.
Do you know what it means practically for programming iOS devices?
Can i use a command like if os="iOS" then "use direct acceleration" else use "gpu acceleration" in my program? Or has the user to change a general setting for all apps
"use direct acceleration" on his iOS device?
-
5. Re: How can I apply camera live filters?
BaCbDc Apr 22, 2013 11:04 AM (in response to security_net)> hello. did you succeed afterall ?
No, I did not code one row so far. I'm only considering what would be the best
attempt to write a multiple devices photo app.
-
6. Re: How can I apply camera live filters?
sinious Apr 22, 2013 1:23 PM (in response to BaCbDc)You choose the acceleration mode when compiling your app. Direct is usually the best choice anyhow. It offers Software and GPU modes and the device/app makes the decision as far as what to use. If you specify GPU you're forcing it into GPU mode which may render some older devices unable to run your app, although very few these days and nothing I know of that's modern. I use direct on every single project I do, because I use Stage3D as much as possible.


