|
I know, damn copy and paste..........should be fixed now.
[edit: deleted some mads, have calmed down now Note to self, use preview more before submit, been caught out by bad c+p too often....]
Dave
Find Me On: Web| Facebook| Twitter| LinkedIn
CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.
modified on Tuesday, October 26, 2010 4:04 PM
|
|
|
|
|
thank you for help and i saw your suggested links
but Motion detection and ellipse detection are two different things.
|
|
|
|
|
inayathussaintoori wrote: i am doing face detection project without buit-in libraries
I don't think you are doing that at all; from your question it seems you just hope to do so.
Detecting ellipses can be easy or very hard, depending on circumstances. A specialized Hough transform probably is your best bet. See here[^].
|
|
|
|
|
sir if you won't help me so it will remain just a hope
|
|
|
|
|
Guy, you have a serious problem. Noone is gonig to spoon-feed you this stuff. You said it yourself, you can't understand the math that's behind these algorithms. Without that kind of understanding, you have no hope of writing your own library, so you're forced to use someone elses.
Noone is going to walk you through a couple of Calculus classes so you can understand this stuff.
|
|
|
|
|
The Hough Transform suggested by Luc will work, but in this situation a quick and dirty approach may be easier:
1. We can assume the face color is (generally) different than the background. Find a threshold on your sample images that seems to separate the face/background the best.
2. Use this threshold to create a binary image (1 = face, 0 = background).
3. Do a morphological closing (http://homepages.inf.ed.ac.uk/rbf/HIPR2/close.htm[^]) on the binary image to close gaps (eyes, mouth, etc).
The closing is a dilation followed by an erosion. These sound more complicated than they are, and are explained in the link. They're just a set of Boolean operations on the image, and can be implemented entirely with ANDing or ORing the image with an offset copy of itself.
4. Do a morphological opening on the image to eliminate stray background pixels that are 1's.
5. You should have a convex blob in the face area. You can then trace the outline programmatically to find the bounds.
6. The outline should give you the general regions to look for other facial features in the original image.
|
|
|
|
|
Hi all
I am doing face detection project. i googled a lot and there are many face detection algorithms available, and i studied many of the algorithms but there is very confusable math and statistic (like integration etc) which i tried a lot to understand but fail. and i don't understand that what is in fact the algorithm saying.
I know C# and i can implement skin detection, edge detection, image invert etc.
if some one will tell me step by step process i will be very thankful.
thanks
|
|
|
|
|
I'm sorry, but this is a very complex topic with companies spending millions developing commercial level detection algorithms. If you can't understand the maths, you aren't going to be able to understand how the code works - it's impossible to disentangle the maths from the code - so you aren't going to get the code written for you here.
|
|
|
|
|
public interface IFaceDetection{
bool DoesImageContainFace(Image image);
Rectangle[] GetBoundingBoxesForFaces(Image image);
bool IsFaceCelebrity(Image image, Rectangle rectangle);
}
The rest is just trivial implementation details. Why must you be so harsh?
|
|
|
|
|
sir i have implemented face detection and recognition by OpenCV. but i don't want to use any library.
i want to detect face in live video without built in libraries.
|
|
|
|
|
Wow, you don't want much.
It is the thing that the secret services would like.
They have billions, what is your budget?
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
Did you even read my reply?
|
|
|
|
|
yes i read your reply but i still think i can do it if i get some help.
i am not discouraged.
|
|
|
|
|
Use the built-in libraries.
Hand-rolling your own will be more complicated than you can handle, especially given you have stated the calculus required is too hard.
|
|
|
|
|
You are seriously telling me that in all your mad googling you didnt come across this article post here on the CP?[^] ..... your google skills are weak dude
Don't comment your code - it was hard to write, it should be hard to read!
|
|
|
|
|
yes i have seen this article but he has used built in library as well. that bilt in library is AForge.net.
and the main thing has been done by this library.
i would suggest that person to use EmguCV inplace of AForge.net.
so he could detect face in very few lines of code.
|
|
|
|
|
inayathussaintoori wrote: i would suggest that person to use EmguCV inplace of AForge.net.
Since you know the solution you really don't need any help here then.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
HAHA ... exactly what i thought, cudos for saying it
Don't comment your code - it was hard to write, it should be hard to read!
|
|
|
|
|
i know how to detect face and recognize by built in libraries like OpoenCv Aforge.net etc...
but i don't want to use any built in library. i want to do it without any buit in library.
|
|
|
|
|
Then you are going to have to pick up a few math books and actually learn and understand the math that goes into such a daunting task.
Don't comment your code - it was hard to write, it should be hard to read!
|
|
|
|
|
sir very strange idea. i am good at math not too bad as you thought. but if you see the math and process of algorithms, so you won't understand that what is it saying.
|
|
|
|
|
inayathussaintoori wrote: very strange idea
Not sure if it's a bad idea ... when taking on such a complex task (mathematically) it would be wise to educate oneself to the point of actually understanding the complex mathematical algorithms that you are going to need to *write yourself*. I'm afraid attempting to write the code (and by extension the math) on your own without the use of a 3rd party library and no extensive knowledge on the topic will result in utter failure.
inayathussaintoori wrote: i am good at math not too bad as you thought.
I never said you were bad and i did not mean to imply that you are, however this is very advanced math and I for one don’t even know where to begin.
inayathussaintoori wrote: but if you see the math and process of algorithms, so you won't understand that what is it saying.
I don’t need to see them to know they are going to be way above my head and would require me to actually research and learn the algorithms that are required.
....
All in all, you MUST understand the math to write the code.... i could try and write some German but not knowing any German I’m sure it would just be gibberish
Don't comment your code - it was hard to write, it should be hard to read!
|
|
|
|
|
|
inayathussaintoori wrote: i don't want to use any built in library. i want to do it without any buit in library.
Then, as many people have been trying to tell you, you will have to write all the code yourself that is currently provided by the libraries. If you have the skills to do this then I am sure you will find it a very satisfying task. If you do not have the skills then I think you will find it a very frustrating experience. This is not meant to be a judgement on your abilities, it is merely a statement of the reality of the problem you have set yourself.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Hey All,
I posted yesterday about dynamic reference and attaching to the AssemblyResolve event. The suggested solution i received is/was great however; that suggestion only seems to function for both Windows and Web Applications and the project i am working on is a Class Library with a few classes that inherit from the 'Dynamic Reference'. I can get it to work if i use a wrapper around my class library but unfortunately this is not going to work for the final product.
Here is a sample of what i have working for Windows/Wed Applications;
based on the reply from Ennis Ray Lynch, Jr.[^]
public class AssemblyResolver
{
private bool mLoading = false;
public AssemblyResolver(AppDomain appDomain)
{
appDomain.AssemblyResolve += new ResolveEventHandler(OnAssemblyResolve);
}
private Assembly OnAssemblyResolve(object sender, ResolveEventArgs args)
{
Assembly result = null;
if (!mLoading)
{
try
{
mLoading = true;
if (args.Name.Contains([My Dynamic Reference]))
{
result = Assembly.LoadFrom(findDir() + "\\[Library].dll");
}
}
finally
{
mLoading = false;
}
}
return result;
}
}
Usage:
AssemblyResolver res = new AssemblyResolver(AppDomain.CurrentDomain);
Any help or advice would be greatly appreciated, you can find my original post here[^]
TIA,
Don't comment your code - it was hard to write, it should be hard to read!
|
|
|
|