using webcam & taking high res (2Mpix) pictures in a web application - c#

I need a web based application where the user needs to fill in 3 fields and taking a high resolution image (2mpix) with a webcam. Once these are ready I need to post them to the server so they are saved in a database.
1) What is the best way/tools available?
2) I saw thisjquery webcam plugin - is it possible to capture photos through your webcam up to 1920×1080?
Thanks

The quality of the pictures you take with ANY camera depends on the sophistication of the camera.
Cameras have maximum resolutions and settings to configure them to a lower one as needed.
If the webcam on the machine has a resolution as high as the one you need, you'll probably be able to do this.
And its worth mentioning that the jquery webcam plugin requires flash to be available on the machine.
Since you've tagged this question with the ".net" and "c#" tags i guess i should mention that you can access the webcam via a silverlight app as well.

Related

Create virtual camera in C#, Windows 10, to work with Zoom, Skype, browser

I would like to create a "virtual camera" that can be used with 3rd party apps such as Zoom or Skype, browser etc. In the same way these can work with a virtual camera app such as Snap.
I want to take the feed from the built in webcam on the laptop, make some changes to it e.g. brightness, then be able to select in Zoom, Skype, browser, my edited feed.
So far I have written something as a Universal Windows Platform app that takes the webcam feed, applies my processing to it, and shows it in a window. For that I have used the Windows Media API.
https://learn.microsoft.com/en-us/uwp/api/windows.media.effects?view=winrt-19041
Can anyone point me in the right direction of how to take this modified feed and make available to Zoom, Skype, browsers? I've seen a lot of stuff related to DirectShow but nothing that fully makes sense or that has been written in the last 6 or 7 years. What would be the best way to do this in 2020, with C#?
Many thanks

HoloLens - Capturing photo when locatable camera is in VideoMode (streaming)

I am trying to create a HoloLens application, which uses the built in WebCam to take photos and sends them to a rest interface for further face recognition. This is working well so far. To capture photos from the WebCam it needs to be in the PhotoMode.
The problem:
If I want now to present my application via live stream, the WebCam is set automatically to the VideoMode and capturing photos is not possible.
The locatable camera description https://developer.microsoft.com/en-us/windows/mixed-reality/locatable_camera_in_unity says:
"Only a single operation can occur with the camera at a time."
Since the application has to be presented to a great number of people it is absolutely essential to show it via live stream.
Does somebody have any general idea how to solve this problem, or maybe some hack to access the WebCam in PhotoMode simultaneously to the streaming?
Many thanks in advance!
This is possible if you can live with Preview Frames from the MediaCapture streams. Just start the video capture (layer on holograms if you need to), and then use the PreviewFrames as your 'photos'. This limits you to the resolution of the camera stream of course.
I was able to get this plugin working on a HoloLens. Had to use .Net instead of IL2CPP and I used 2017.4.22f1. At the very least the code shows how use MediaCapture and PreviewFrames to get a video feed from the camera for which you can grab the current frame to save as a photo. The sample doesn't do that last bit, but the bytes for the frames are being passed around, just need to make them available for your need. =)
https://github.com/VulcanTechnologies/HoloLensCameraStream

How to access camera on a windows tablet or attached web cams using Windows Form Application (Not WPF)?

I am trying to develop a Windows Form Application (not WPF) where I would require to preview numbers of cameras available on a tablet or PC, take pictures and then save the pictures in the device.
I am very new to this kind of application development and recently came accross Media Capture but I can not find a good lead to start with.
Can anyone let me know how to approach or how can I build the application with the aforementioned features or provide a good lead??
P.S. Found a good example on https://code.msdn.microsoft.com/windowsapps/media-capture-sample-adf87622/ but it uses XML not the Win Form Application type.....
What kind of cameras do you have? If the cameras support onvif, then there is a good onvif camera software you could try. You can handle many cameras with it, you can take snapshots so I guess it could work for you.

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.

ASP.net - capture video with camera and play in web page

I want to capture video with webcam and play it live in my website.
I dont know what to do!
how can I do that?
With pure ASP.NET, you can't. You have several options and the only one that I am aware of in the .NET wheelhouse would be to use Silverlight (e.g. http://www.silverlightshow.net/items/Capturing-the-Webcam-in-Silverlight-4.aspx and http://forums.silverlight.net/t/145729.aspx)
Your other options would be to use Flash or purchase a third party component.
You can do this with the in development HTML5 video standards. I remember seeing a working demo of a webcam app like you're talking about in a presentation (Google's HTML can do that I think). Check these pages out for ideas/examples:
http://www.sitepoint.com/stream-your-webcam-to-a-browser-in-javascript/
http://www.iandevlin.com/blog/2012/06/html5/filtering-a-webcam-using-getusermedia-and-html5-canvas
http://www.webrtc.org/
https://wiki.mozilla.org/Platform/Features/Camera_API
If you want to display video from a single computer you control (like an old-school "webcam" page) then you'd write some local computer software (presumably using DirectShow or MediaFoundation) that captures frames from your camera and transfers them to your webserver and your page has a simple script that causes the image to be reloaded every second or so. It's not really video, but it's how webcam pages worked until recently.
Now, in 2012, you can serve video directly. You'd want to use something like Apple's "HTTP Video Streaming" where the camera's video stream (not individual frames) is saved into chunks a few seconds in length, then constantly pushed to the server. The webserver then serves a never-ending playlist that lists all of the video chunks just as they're made available, browsers then download the chunks as they're needed. This negates the need for a streaming media server (such as Microsoft's WMS or Adobe's Flash Media Server).

Categories

Resources