face recognition as3 - actionscript-3

I want to build flash application that can detect the user eyes color and hair color etc'
Does anyone know about free library that I can use for this kind of project?
Thanks,

Perhaps you are looking for this library:
http://code.google.com/p/face-recognition-library-as3/
Never tried it myself, but this demo looks promising.

shaunhusain I think that you mistook face detection for face recognition although face-recognition-library-as3 enables both. Comments in source files of library are in Polish for now, but there is documentation in English available online for that library.
In answer to main question of this thread it should be possible to detect only eyes using this library. To do that you should replace HaarCascades in face.zip file to those for detecting eyes, which are part of OpenCV. To detect hair color you could detect face and then analyze pixels just above detected region with face.
Hope that helps.

This kind of visual processing is generally too intense to handle within the single thread and VM that AS3 provides, it's a task better suited to a language that compiles to machine code and has threading capabilities such as C or C++.
Here's something related to the topic, I believe you would be better off just trying to use OpenCV, but it should also contain the appropriate algorithms to port if you have the time and mental capacity to do so: http://www.quasimondo.com/archives/000687.php
Alternatively to avoid all the leg-work you may want to consider using a server side solution like http://face.com/

Related

Action script tutorial?

Hi I am a Student in Norway looking for a good general tutorial on Action Script and how to use it,and what it's for.
I have been looking around google for a while and I can't seem to find any good or "simple" way to learn or even understand how it works.
sites i've been too:
(http://www.actionscript.org/resources/categories/Tutorials/)
(http://www.flashandmath.com/)
(http://tutorials.flashmymind.com/)
(http://tutorialoutpost.com/tutorials/flash/actionscript)
(http://www.tutorialguide.net/programming/actionscript/)
(http://www.siteground.com/tutorials/actionscript/)
(http://www.kirupa.com/developer/flash/index.htm)
(http://www.freeprogrammingresources.com/actionscript.html)
(http://www.adobe.com/devnet/actionscript.html)
So what do I want to know ?
Basic scripting to advanced scripting.
Where it's best to use action script. (best functions)
A simple yet efficient explenation that alot of people might understand.(if possible)
So if there is any way you guys might be able to help me with this little problem of mine I would be forever in your debt.
and thanks in advance for any info that might come my way, even if it helps me or not.
Check out this too: http://www.gotoandlearn.com/. It has some good free tutorials, but if I remember correctly, you need to pay for the full series!..
And the best approach to learn something is to read the documentation while working on something! Try create a game/small site/interactive animation/etc and when you are stuck, search the answer or ask for help!
ActionScript is similar to Java and C++ but different. It runs on the Flash Player. It is generally used for applications ranging from online games to video players to Rich Internet Applications.
Flash can be developed from 2 perspectives:
Designer's perspective: This approach consists of drawing objects, shapes etc on a stage like you do in an image editing software, and then animating / adding actions to the drawn objects. You develop this in Flash Professional (Link here)
Developer's perspective: This approach consists of developing using the Flex framework, from an IDE (Flash Builder)
Check these out. I learnt it by looking at various tutorials on the net (do a Google search, you'll find plenty), so you can learn from the net as you go.
I often recommend Colin Moock's Lost Actionscript Week End video tutorials , it's an excellent resource if you want to grasp the general concept behind AS3 and leaves you with enough understanding so that you're able to tackle books on Object Oriented programming, AS3 language reference, basically tools that you will eventually need when you get deeper into the subject.
http://tv.adobe.com/show/colin-moocks-lost-actionscript-weekend
Why donĀ“t you try the official Google Action Script documentation? You can find it at https://developers.google.com/apps-script/ . I fount it very useful and easy to understand... It is very well organized and there are many examples with diverse grade of complexity. For example: you have there 5-minutes overview for your first Google Action Scrpipt https://developers.google.com/apps-script/overview#what_can_apps_script_do
And if you are looking for a more complex example, you can go forward to end-to-end examples: https://developers.google.com/apps-script/articles/bracket_maker
That is my first reference point with Google Action Script...

Learn and understand the full stack

I have been struggling with an idea for a few weeks and wanted to see if someone can help me out here.
Programming today is full of abstractions, and people who do not understand the abstractions, do not truly understand the reason or design than went into building that abstraction/layer/framework and will struggle as soon as they step outside the comfort zone.
I was wondering if there is a learning resource that goes about teaching programming in an incremental fashion. This will lead to understanding the full stack.
take a small problem
implement a simple solution
talk about the the solution and the designs used
convert the solution into a framework or utility of some sort
now extend the problem space and repeat from step 2.
This way when someone then picks up any framework/library, they can easily visualize the problems the framework is trying to solve, the design decisions taken and the reasons thereof.
[Added to clarify the intent]
Based on the answers and comments below, I want to clarify that I want to move further up the stack. Building your own ORM to understand ORM better, same goes for ActiveRecord, IOC container, data binding, templating engine, and the host of other magic/glue/plumbing we use day-to-day.
Thanks.
Here's what I recommend : Have a brush with assembly (just one book or one month is enough). Have a good strong review of C++ (hopefully it will teach you some of C as well). Now the world is yours. Python is made in C/C++ , Object C is pretty close to c++, .NET is in C++ and C#/VB.NET , The windows API is oriented for C.
I picked C# as my abstract language of choice after this by the way.
Read the source. It is a good idea to build something you want to understand, but you can enhance your understanding of concepts significantly by looking at how something is built. This is especially true for infrastructure pieces (ORM/DI/Templating) which you seem to be interested in.
Get the software to build on your machine, attach a debugger and trace through the code. This is pretty easy for C#/Java with a good IDE. For dynamic languages like Python and Ruby, it takes a good editor and a lot of grepping.
If it is a good software package, it will usually have tests. Tests are a great place to start digging into code. They usually make clear the intent of the code, and also provide you a logical starting point to peel off the layers and actually peek under the hood.
Build a fully functional compiler from scratch in a systems language like C or C++. Maybe it isn't the full stack, but it's a large part of it. This is something I want to do as well. If only I could find the time and space.
The best example of the sort of learning resources I am seeking is the MIX session by Rob Eisenberg on "BUILD YOUR OWN MVVM FRAMEWORK". It goes step by step on explaining the pattern and also implementing it at the same time, attacking one problem area at a time.
http://live.visitmix.com/MIX10/Sessions/EX15
Hope there are more out there.

ASAP library for Actionscript?

I'm always open to using new frameworks, especially if they allow greater flexibility when the need arises to make changes and additions.
At the same time I don't want to add an additional layer of complexity unless it's use is warranted.
Has anyone used the asaplibrary recently on a project? Was it useful? Would you use it again?
I've never used asaplibrary (simply because I didn't know it existed), but from a quick overview of the documentation/reference, it looks quite useful. NotificationCenter is neat all by itself.
That said, I would be hesitant to use all of its functionality without weighing other libraries against it for performance (i.e.: It has some animation functionality, but you'd be silly not to be using TweenLite/TweenMax/etc. for that task).
i suggest you to look into splinklibrary, splinkresource and deepsplink as i am the author of these libraries/frameworks.
At disturb most of the projects we used to do in as2 were done using ASAP. OOP friendly in a way no many other as2 framework were. We haven't used much of it in as3, as some projects use PureMVC, Cairngorm even or tiny bespoke MVC implementations.
I am not up to date with the as3 version as I said, but I hope is as good as the as2 one.
Gaia caught my eye lately though, it seems to integrate nicely with the IDE as well.
This might not be that useful, as I didn't actually answer you question and pointed you to a different framework, but these are my 2 pence.

Reverse engineering to get answers

So I've spent the last few days looking for a way to create a simple image drawing app with wxPython, and I think the key to doing just that is understanding how to use Device Contexts. The problem is that the wxPython demo program doesn't demonstrate DCs, and the docs for both wxPython and wxWidgets don't explain as much as I'd like to know so I've decided to try and 'reverse engineer' an existing app to see how its done.
The first problem I have is that I don't know of any drawing apps written in wxPython (or any written in Python for that matter o.o), and the second is I don't know how I'd go about doing it. Am I right in saying that I'm going to need a copy of an application's Python source and something like Winpdb? What do professional programmers do when they find themselves in a situation like mine, needing answers that the docs don't provide?
If you need to understand the concepts, but the docs don't cut it, it's worth it to look at docs for similar APIs. In the case of drawing contexts, there are a lot of similar APIs in other languages. Java has Swing for instance.
Reverse engineering is easier in tools that aren't big event-driven GUI things. The converse is that event-driven GUI things tend to copy each other, so you only need to figure them out once or twice before they all make sense.
In .NET world, I have Reflector as indispensable tool.
In my company, we use to program SharePoint websites. There are many "gotchas" we just figure out by reverse engineering that product assemblies, exactly because documentation is plain wrong, just missing or simply doesn't exists.

What is the best Actionscript3 3D Engine?

I am looking for a somewhat detailed explanation of which 3D Engine for Actionscript3 is the most efficient, practical, scalable, documented, community supported, etc. When I first got interested in the 3D world for flash and actionscript3, all I knew of was papervision3D. In my curious way I went to read up on papervision3D and was shocked at the lack of tutorials. Later I started to research Away3D and have found that their site is easy to traverse and there are many tutorials and easy to find documentation.
Is there something I am missing? Is papervision3D so good that it doesn't need tutorials and other mediums to help users adopt it and begin using it more often? Does it have a performance increase that allows this? Which 3D engine do you suggest?
I came up against this same issue a few months back. In the end, I went with Sandy3d. What did it for me is the amount of quality documentation and the really supportive community which really helped me get my project up and running.
http://www.flashsandy.org/blog/
I'd go with Away3D, if only because we know they are working so closely with Adobe to make sure that people's existing knowledge of their product translates as easily as possible to the upcoming Molehill version. If you're not already aware of it, Flash Player 11 is going to have an API for using OpenGL and/or DirectX 3D from within Flash. For those wishing to do 3D games and UI in Flash, this is going to be HUGE.
Papervision3D is going through the process of a full re-write to take advantage of CS4's new 3D capabilities. It sounds like they're also looking into mixing Alchemy into the engine to get a really big boost. You can check it out in a bit more detail here.
I've found that the irc channel for PV3D is fairly active and they've been able to answer any questions that I had due to an outdated tutorial or awkwardly documented section of code.
I don't have the reputation comment yet, so in response to David Hanak's comment above about viewport layers, the best use for them (that I've found) is to help with depth sorting. You can assign objects to a viewport layer and give that layer an index. Then tell the render to sort the viewport layers by index. It really helps reduce visual display errors.
AFAIK, Away3D is a fork of Papervision3D. You might be interested in this comparison of their features. It seems to me that PV3D is faster, although this blog entry might be pretty outdated.
What I would like to know is which library will be the first to support the 3D related features of Flash 10. That would mean so much in performance...
The thing is, that papervision has a good community. In long term usage, you should take that into account.
I was the same in the beginning. It was not obvious where to find what. But you should stick with it. I just worked on a prototype: Papervision3d + Jiglib (3d physics for flash, ported from c++) and SmartFox Server = fun mulitplayer game :D
Anyway: this might help: http://papervision2.com/tutorial-list/
the BEST one really is Alternativa3D, but you have to pay them for it. It's the only one that currently supports FP10 features, as we're still waiting on PapervisionX
Personally, I much prefer Away; although it started off life as a Papervision fork, they've diverged a long way since then. Most times I start a new 3D project, I begin by evaluating both (the time elapsed between projects often gives both engines time to go through some pretty major changes), and I always end up coming back to Away - to my eye, the rendering quality is a bit better, and it seems to be easier to Just Get Stuff Done with Away. I've never used Sandy, so I can't speak for that.
I've never had a problem getting support from the Away community - while PV's may be bigger, Away's certainly isn't short of helpful people.
In my experience, PV tends to accumulate whizzy features more quickly - it's probably the more bleeding-edge and technically impressive engine - but Away tends to be more stable, has a nicer API and is easier to hack about with ;)
This is all very much my own opinion, YMMV. Both have their strengths and weaknesses. The best recommendation I can make is to evaluate both and see which works best for you.
I've used Papervision, Away3D, Alternativa and Sandy 3D (you can find tutorials for each here). I personally like Away3D better - it is free and has more features, as well as a Lite version if you just want the basics. I'm especially looking forward to the Haxe version, which might just let you compile stand alone executables in C++ with hxcpp.
Options for 3D in Flash boil down to Papervision3d, Away3D or Sandy 3d Engine. I find the first two to be the best, in terms of maturity, documentation and performance.
In case you're interested, on the blog of my company there is a series of posts comparing those 3D engines for Flash (in Spanish, although you can follow the examples and read the source code in English).
Away3D is the current free champ.
It is in active development, and supports Flash Player 11, Stage3D, etc.
I would also start looking at Blender3D for a game engine in the near future. It's not Flash, but is free, and fairly easy to program. The langage behind it is Python.