human body border detection using .NET - c#

there is any body know any library that enable us to detect the body border or help me notify to body movment according to stream of images

Microsoft has such a library, called Kinect.
However, I rather doubt they will license it to you.
There is not always a library for everything, especially if the problem is difficult to precisely define and on the cutting edge of technology.

The basic element of this sort of processing is Blob Detection.
There are examples in the wild for blob detection algorithms. There are libraries too, but I'm not sure about free ones.
See this:
http://www.aforgenet.com/articles/hands_gesture_recognition/

Did you look at open CV ? It's an open-source framework for image processing so it has a lot of helpful algorithms for contour detection, filtering, hull etc...
Also OpenNI was just released. It's a framework for natural interaction. For now it's mostly set up to work with depth sensors such that Kinect and PrimeSense sensors, but in the not-so-far future it might be able to deal with other type of hardware, maybe standard video cameras...

Link to MSFT SDK site
Update:
Just in from ZD.NET "Microsoft readies hobbyist Kinect development kit; promises commercial version later" link
Prior Post
The makers/OEM of the Kinect is PrimeSense. They make both the kinect and an independent devkit. They recently released open source drivers that are compatible with both XBox's Kinect and the smaller DevKit. You might as well get the drivers straight from the source. I'm not sure what value a 3rd party library (openKinect) will offer.
Get the unified Kinect and DevKit drivers here: http://www.openni.org/ Windows and Unix support is available.

Related

Get image from webcam

I'm trying to find the way for getting image (only image, not video stream) from webcam in managed C#.
Usually people suggesting libraries, but they are old or commercial or under gpl.
How get image from webcam without third-party libraries?
upd.: thanks for Media Foundation, I shall use that.
Web cameras are supposed to deliver video feeds, not stills. So the native API you might be interested in is the one for video capture, which are DirectShow and Media Foundation.
The one you would most likely want is DirectShow, but it is not well suited to be interfaced from managed code, so you will need a DirectShow.NET which is open source wrapper. You typically start video streaming there and once you have a good image you stop the activity.
Or instead you might keep looking for a ready to use library which does the mentioned above for you.
One of DirectShow.NET samples does what you look for.
DxSnap – Use DirectShow to take snapshots from the Still pin of a
capture device. Note the MS encourages you to use WIA for this, but if
you want to do in with DirectShow and C#, here's how.
It mentions WIA, however WIA API is not available for all (or any in recent OSes?) web cameras, WIA more targets device like scanners.
Other APIs are perhaps less suitable.
VFW ("avicap32.dll") limits you to a subset of devices, is simple yet not well interfaced into managed code
Media Foundation is not well available in earlier OS versions
I wrote this many years ago
http://www.vbforums.com/showthread.php?344471-Vb.Net-WebCam-Class-(ICam)) in VB.net
You could easily port it to c#?
Is avicap32.dll out of the question?
Otherwise I think this is a simple and straightforward way:
http://www.creativecodedesign.com/node/66
http://www.c-sharpcorner.com/uploadfile/yougerthen/integrate-the-web-webcam-functionality-using-C-Sharp-net-and-com-part-viii/

Commercial Component For Talking to Canon/Nikon Camera?

I am currently doing some research on capturing images from an SLR camera, either Canon or Nikon branded from within a .NET WinForms application.
I know Canon and Nikon have SDK's but after reading around the net for a few hours I have come to the conclusion that integrating their SDK's is going to be a long and painful process.
My question: Does anyone know of any commercial (or free) .NET components for communicating with either Canon or Nikon cameras? I realise any component is just going to be a wrapper of the respective SDK, but we don't have the time nor resources to fiddle with C++ wrappers and everything that comes with that.
Any advice regarding this is appreciated!
Regards
You can try the WPD apis from Microsoft. Here is the WPD Team Blog for more information.
There is also a Canon EOS framework which claims to provide a better and more convenient way to integrate the Canon EOS SDK into .NET applications [Never tried, you may want to give it a shot].
Since you asked the question NikonCsWrapper project became available, it is just a C# wrapper for Nikon SDK, but it integrates fine with .NET.
It is as good and reliable as Nikon SDK it uses.

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.

Snapping pictures from Windows C# Canon SDK vs PTP or MTP

I am hoping to receive some general guidance on accomplishing a seemingly simple goal. I have a DSLR camera (Canon EOS 50D) and need to write an application that will tell the camera to take a picture. I also need to transfer the picture to the computer and possibly delete it from the camera's storage. A bonus would be to get a live preview from the camera in my application. My environment will be Windows (either XP Pro or Vista Enterprise) and .Net 3.5 (C#).
I have done some research and found a couple of options. One I know will work, but limits me to using only Canon cameras in the future. I have found and downloaded an SDK from Canon that provides a lot of this functionality. I've looked over the SDK and while it's extensive and written in C it does have C# wrappers that will speed up development a bit.
Another option I've found is called Windows Portable Devices. Apparently, it is an API that will talk to devices that implement PTP and MTP standards. It is COM based and as far as I can tell it has no .Net wrappers. This is not however a show stopper. I could P/Invoke the functionality I need or write a Managed C++ DLL to use in my application to talk to the camera.
I am looking for anyone with experience with WPD to give me pointers. I've perused the documentation and seen references to transferring images and deleting images. I have not, however, seen mention of commands to take a picture, get a preview image, or say focus/auto-focus.
The WPD api provides the command WPD_COMMAND_STILL_IMAGE_CAPTURE_INITIATE
I am not sure whether your camera supports it but it should be simple enough to find out. If you can get the "wpdinfo" tool from the driver development kit and start it with your camera connected then send it a WPD_COMMAND_CAPABILITIES_GET_SUPPORTED_COMMANDS command and see if it supports the still image capture command. IF so then you could give that a try.
The comment from TallGanglyGuy is incorrect. ptp does allow you to trigger new images and change exposure, etc. Some cameras have firmware that only exposes some of the ptp commands.
PTP supports common device controls, such as taking a picture, so that
the user could take advantage of the PC/camera combination in new and
different ways again, without requiring additional software.
quoted from http://msdn.microsoft.com/en-us/windows/hardware/gg463507.aspx#EXC
try my Eos Framework: https://github.com/esskar/Canon.Eos.Framework
IMHO it's a better alternative then the .cs file that comes with the SDK.
PTP and MTP are both protocols for transferring files from a digital still camera (DSC). The protocols provide no functionality for triggering new images, or setting exposure control. You will be stuck using the camera specific SDK. If you want multiple vendor support Nikon has an SDK that provides similar support as the Canon SDK for their cameras.
More info on PTP and MTP can be found here:
http://en.wikipedia.org/wiki/Picture_Transfer_Protocol
and
http://en.wikipedia.org/wiki/Media_Transfer_Protocol
EDIT
I forgot to mention that WIA may be interesting to you, assuming your camera's driver provides a WIA interface.
This is really generic, but it may help.
I had to write an application that used two different bar code scanners from two different vendors with different SDK's. I created an interface that defined the methods and events that I wanted to code for, and then wrote adapter classes that implemented my interface.
This worked well in my case, and switching from one to the other was pretty seamless. If you took the same approach, you wouldn't be totally dependent upon one SDK.

C# Grab frame from wmv file

Does anyone know if it is possible to grab a frame/image from a video (.wmv) on position X using C# without installing DirectX and working on Windows 2008 (a webserver I would like to install as less as possible).
Or even a simple solution with directx could be nice.
Henk
What you'll actually need to look into is DirectShow, the general-purpose media (both audio and video) library for Windows. It used to be part of DirectX but several years ago it branched off and became part of the Windows (Platform) SDK. I should also point out here that it's now been deprecated since Windows Vista in favour of Media Foundation. From what I've read it's a much better library (DirectShow is hell for complex tasks), but unfortunately it's not really feasible to only target Media Foundation at the moment because of the lack of support for XP and earlier...
The best I can really do is point you to DirectShow.NET, a .NET wrapper library for DirectShow, which is rather stable and well tested at the moment. It includes various samples which should help you get going, but by no means will it be a straightforward solution. Also, I strongly recommend you take a look at this CodeProject article/sample application. It deals with both webcam video capture and video playback from files (including WMV). A bit of playing around with that, and learning how to do frame seeking/single frame capture (I think that project might even some code to do that) should get you what you need. Perhaps you'll even find the precise solution somewhere within the DirectShow.NET samples of that CodeProject app.
Of course, I would suggest an easier solution if I could here, but you're pretty much stuck with the horribleness that is DirectShow for the moment. Good luck anyway!
You should try FFmpeg.
Take a look at the Windows Media Format SDK, which is designed to give you pretty direct access to the frames inside a WMV (/WMA/ASF) file.
http://msdn.microsoft.com/en-us/library/dd757738(VS.85).aspx
In particular, you're interested in the synchronous API for reading these files (IWMSyncReader is the interface name). There are some pretty decent samples in the WMFSDK; I believe the most interesting one for you here will be WMSyncReader, which will show you how to dig through a WMV file and get frames, starting at position X.

Categories