Read Images programmatically - c#

i am a 3rd year computer science student, and my seminar(graduation project) is in the next semester, so i started to think about it and i thought that a face recognition system would be a great idea, so i have two questions:
1- how can i read a picture programmatically, i mean if i have a picture, how can read the pixels and colors in order to recognize the face later on?
2- do you know any useful ebooks or resources that might help me in this topic cuzz i am really interested about it, and i hope that i can implement it.
thank you very much dudes
this is my first post and i hope you will really help me :)

Take a look at OpenCV which makes access to webcams easy! It can also help you with further picture computations.

Take a look at AForge.NET library. This library has very usefull API for computer vision. Take a look also on articles writen by author of this library - Andrew Kirillov. He wrote about motion detection algorithms and hand gesture recognition.

Related

different images from different point of view

I want different images to be displayed from different point of view. For the whole concept explaination please look at the images. they explain my idea/query!
As in the first image you see that there are three people at different angle looking at the monitor. Now i want the webcam to track the eyes and show the particular defined image to the user> For example: If user is at 45 degree angle then show image1.png
Depending upon the user's prespective of watching. The computer should show the image.
(the lady is the game character for representation purpose)
Can you please guide me on what steps can be taken to accomplish this? Is there any plugin available for unity that tracks faces? Please guide me
Also thanks for the compliments on my sketching skills xD
Stackoverflow is not really meant to recommend plugins, since the choice is usually opinion based so there is no exact answer.
That being said, on of the most common used API for computer vision (meaning interpreting images, including face recognition) is OpenCV, so that could be a good start for you to look at that.
And fortunately for you, there is a Unity plugin for OpenCV
It is too broad to give you more details about how it works here. You should try to make it work, and if you have a problem with your code, open a new question with the code portion that you struggle with.
PS: nice sketching skills
Perhaps easier option would be to use Kinect
(trying to detect face or eyes from that far might be shaky?)
With Kinect you can get skeletons for multiple people, and getting the angle between target and those kinect avatars would be easy.
If there is no space to put kinect in good position,
could consider placing it on the ceiling above (and then use depth data only to detect people in its view)
Only issue is that apparently Microsoft has stopped Windows kinect support,
so you would need to find 2nd hand versions.. (Unity Asset store still has some kinect plugins and examples available)
https://www.polygon.com/2018/1/2/16842072/xbox-one-kinect-adapter-out-of-stock-production-ended
Or look for kinect alternatives that work with unity, try RealSense cameras:
https://www.intel.sg/content/www/xa/en/architecture-and-technology/realsense-overview.html

DirectShow DVD manipulation and capturing

I am new to DirectShow.
My intention was to develope a small application (C#) that handles video processing.
The main tasks i need are :
1 - Display video content from a DVD.
2 - Navigate to specific points of time in the video.
3 - Capture specific frames into still images and save them to files.
Sounded easy at first, but after reading thousands of blogs, forums and code samples i can't figure out how this can be done .
I am pretty sure these tasks have been implemented plenty of times, so if anyone has anything that can help i would be very happy to hear it.
As i am getting desperate on this issue, buying external DLLs or paying for some advice is an option.
Thanks.
Not sure if this will help, but I have a DvdPlayerElement control in my WPF MediaKit.
You must install an audio codec if you want audio as the built in one with Windows is locked down due to licensing.
perhaps you can wrap the MSVidWebDVD object, combined with some screen capture techniques [?] see also Extract frame from VOB(DVD) file
Thanks Jeremiah, I do know WPF MediaKit and tried working with it.
It is pretty cool, but does not allow all of the functionality available in DirectShow.
There are some events missing and the seeking operation does not seem to work for me.
I guess i can dig in the code and figure it out, but the time pressure won't allow it.
If you have an example of an application that accomplishes what i am looking for (display, seek, capture) i would be very happy to take a look.
Thanks again.

C# tutorial for "listening" to the line in device

I know the obvious answer is "try google..." but i have and I either end up with graphics or cmd-line tutorials, so...
Can anyone point I in the direction of a c# tutorial for "listening" to the audio line-in? Or is it straight forward with the right namespace included? Is it even possible without using directx or some such.
I want to detect external audio activity and report it on screen.
Cheers,
This code sample looks like it has everything that you need: VolumeMeter
Presumably you just need to change the code so that instead of rendering the current volume levels you could return a flag indicating whether "something" is going on.
It's using the Managed DirectX library, which is a managed code wrapper for the native DirectX APIs.
You need an external library to do that. These have .NET bindings:
FMOD is widely used in games, and has an opensource license (and a paid one).
BASS Audio Library is another choice. It's a bit more lightweight.
IrrKlang I haven't use this one, but I was told it is worth the money
NAudio I found just now, because I forgot the IrrKlang's name, and had to google for it. This one looks promising.
OR MDX can do this I think.
check out the VoiceRecorder sample application on Codeplex which shows how to do this using NAudio. This Coding4Fun article explains it in more detail.

How to implement face recognition in an image in .net 3.5?

I need to implement face recognition like in orkut album.
In my website when a user uploads a photo and checks the photo in album I need to implement the feature and place rectangles over the faces in photo like in orkut album like in this link.
Please help me to implement this.
Thanks in advance.
You need to use OpenCV, or more specifically, a C# wrapper library for OpenCV.
I think you can implement some (very) basic face detection using OpenCVDotNet, although you should be aware that I don't think it's actively being developed. I just noticed I'm still on the list as a project committer, but I haven't done any work on it for a long time (if ever, can't remember why I got added in the first place).
You should probably go with Emgu CV, which is a much better C# wrapper for OpenCV. It is actively developed, and is compatible with OpenCV 2.0, and has a wider community surrounding it, and the documentation is good enough that you can easily get face detection working pretty quickly.

Gdi Guidance required

I am currently working in C# with wpf, I don't know about graphics, I want to learn about GDI and graphics from scratch, Can anyone help me by providing some basic knowledge or material?
Can anyone tell me to write very first program using Gdi?
If you want to learn about WPF I really suggest "Windows Presentation Foundation Unleashed"
http://www.amazon.com/Windows-Presentation-Foundation-Unleashed-WPF/dp/0672328917
Also check out this video from the PDC - Mastering WPF Graphics and beyond:
http://microsoftpdc.com/Sessions/CL31
And if you still want to check out GDI you should read this book
http://www.amazon.com/NET-Game-Programming-DirectX-9-0/dp/1590590511/ref=sr_1_1?ie=UTF8&s=books&qid=1259061198&sr=1-1
It starts out with GDI+ basics and then moves on to DirectX.
Even though it's written for VB.NET you'll get a great deal out of it as a c# developer as well. It helped me back in the days and writing the games in the book is just downright fun :p
(Hint: There is a huge performance issue with the first example in the book, try to solve it, it'll help you understand things even better).
I would advise you to take a look at the msdn, usually they have the best resource on the web. Also some tutorial website like code-project.com might help.

Categories