Wpf and C # capture webcam and network cameras - c#

I am looking for a solution for capturing webcam and network cameras.
I've done some research on the internet but so far I haven't been able to find a solution that was viable for my problem. I need my application to list all available cameras and give me the option to select one to display. I also need an option that allows me to take a print of the camera and save it in a folder.
My research took me to some proprietary solutions and to some tutorials that didn't solve my problem, like these.
Wpf-MediaKit: https://github.com/Sascha-L/WPF-MediaKit
Media Capture: https://learn.microsoft.com/pt-br/windows/uwp/audio-video-camera/basic-photo-video-and-audio-capture-with-mediacapture
LeadTools: https://www.leadtools.com/sdk/multimedia/capture?
Does anyone know any OpenSource library that solves my problem?

To detect camera devices on your system, use ManagementObjectSearcher and figure out the string query to use for the camera(s) you want to find. Google "ManagementObjectSearcher camera devices" on how to do it, I don't have a direct solution.
To read the camera stream in C# (so that you can capture a frame), look into OpenCVSharp and the online samples it provides in github.
Good luck!

Related

Webcam Light / Torch / Flash C#

I'm trying to create a C# console application to take a snapshot with a laptop webcam.
The snapshot itself was no problem, (I'm using AForge for this) but now I want to turn on the flash / torch of the webcam. But I can not find any information how to do this.
Found many discussions for phones / iOs, for C++ and many people wanted to deactivate the "indicator light".
Thought about doing it in C++, because I found informations about that with directshow, but also the information that this is not possible with all webcams.
So I wanted to ask you, if you have any informations if this is not possible with my cam (see name below), or do you have any idea what I can try with C# (maybe AForge)?
AVStream Camera 2500
Windows 10
Thank you in advance,
HerrBrati

problems with accessing webcam output in c# application

i know this is most likely a duplication and i am truly sorry for that but most of the solutions i found was either +7 years outdated, bugged or consume so much memory
all i need is an efficient way to access the webcam to record and display to use it in a computer vision project to detect moving objects and such, with an HD output (using HD camera of course)
also if there is a library that would help with the computer vision that would also be great
any information, tips or experience would be highly appreciated, thanks in advance and have a wonderful day.
You could use AForge.net, it's available as a nuget package and gets the job done.
Here is an example of it. It's a winform application, but I use this library in WPF app as well.
[EDIT] Actually, I think I found what you're looking for, download this. It's a piece of code that has been written for a french azure contest. It's a motion detector written with aforge.net. There is 2 part to it, the first is a wpf client that capture movement. The second is an azure website where the image captured is uploaded automatically.

Record video from camcorder in C#

I need to be able to record video from an external camera in a C# application.
Unfortunately a webcam is pretty much out of the question as the application will record outside and during the evening/night. That is why I was thinking of a camcorder since it also has manual control over exposure and focus, lower noise and better sensor.
So far I would use the AV/S-Video output from the camcorder and send the signal to a USB capture card (the computer is a laptop so no PCI-E cards).
How would I be able to access the video stream from the C# application, now that it comes from the capture card ?
Does my proposed system seem feasible (achievable, good video quality, good fps)? Does anybody have another working solution?
Thanks
This Code Project Article could be of a good starting point.
The Author mentions :
The main goal of the application was to make it flexible and
extensible. The application itself can communicate with any video
source – it may be an IP video camera or a server, it may be a local
camera attached to USB, it may be an MMS stream from a remote server,
or it may be any other video source. And more of it, the application
can work with all these video sources simultaneously, displaying them
all on a single screen.
The solution I used in the end was Microsoft Expression Encoder.

Duplicate camera stream

I need to make a program that would allow me to capture camera stream with my 2 other programs simultaneously. Basically I need the functionality that ManyCams (http://www.manycam.com/) offers.
How can I do this? I'm interested in a free c++ library, or some C#/C++ .net solution.
well, one easy step will be "share" rather than "duplicate" camera streams, your application can capture camera streams then provide api to share it between multiple applications. OpenCV worth a look.
I'm not sure but you probably need to have good understanding of how hardware work and know how to develop a driver for it. What you should do is to get the graphic from usb device's driver and use what you get from your camera as input source for your own virtual camera drivers.

Skeleton tracking with 2D camera

I'm trying to use a 2D camera to recognize the device/object a user is pointing at so I was looking for a skeleton tracking software using a 2D camera in order to be able to do that. Is there any open source project that deals with skeleton tracking using 2D cameras?
(I've gone through tons of links on Google and it seems like most of what's there is just research papers but no actual open source projects)
Thanks!
Skamleton could be an option. It's an open-source project in early stages, but it implements a background subtractor, a skin color classifier, blob tracking and face classification. There is a demo on YouTube.
Note Skamleton use simple cameras, not RGB-D (depth) cameras as the Kinectic system (Kinect uses a structured light device from PrimSense).
It seems there's kind of a pre-release of a SDK for Kinect from Microsoft. Perhaps this might be helpful for you:
http://nuigroup.com/forums/viewthread/11249/
(Although I think this won't be Open Source. But since you are using c#, a Microsoft SDK might be ok for you.)
This seems like an old post, but in case anyone is still looking Extreme Reality uses a regular webcam and does skeleton tracking. It's not open source, but I've played around with it a bit and it does seem to be fairly robust.
http://www.xtr3d.com/developers/resources/

Categories

Resources