How to use WIA on webpage to get image from client computer - c#

I am trying to figure out how to use WIA on a ASP.NET/C# web page to capture an image from a camera that is on the client computer. The user will be using a Microsoft LifeCam camera and from my webpage I want them to be able to take the picture and store it in a database. I imagine I will need to use DirectX for this and that is an acceptable solution but any solution would be great.
My big problem is I cannot seem to find any samples/documentation on how to do this on a webpage. All I am finding is stuff that says it can be done but no explanation on how. Any help anyone could provide would be greatly appreciated. Thanks.

It seems you have to generate a dll for the interface with tlibimp (from wiascr.tlb) which you can add as a reference in c#, then you can follow the tutorial (http://msdn.microsoft.com/en-us/library/ms629859(v=vs.85).aspx).

Related

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.

Treat Picture Like a Map ASP/CSHTML

I need to zoom in and out of a picture, grab it and browse different parts of it as you would a map, and set pushpins as markers to remind me of locations I found interesting. Essentially I want to perform similar functionality that bing (or google) maps provides but on a picture I have. From this tutorial : http://www.microsoft.com/web/post/using-the-bing-maps-api
I have tried swapping the source to point to the picture on my local drive but that don't work. What would be a good language / approach to take/use in solving this issue? I was trying to do this in C# first but now need to do this for a web application, please advise; newbie to Web development btw...
I am not able to understand why are you trying to view Picture as Map; zooming, clicking, dragging. But however, try to use jQuery for this.
The API that you are using, would work for Bing Maps. Its their server API and I don't think you can use that for any other work. But you can still re-write it and compile it to work for you.
The basic code or what you can say, the basic events for it would be .click() .dblclick() then you can use jQuery Draggable. These would be the basics only.
However if you are working with image. You would definitely need some other tools that would be able to let you work with Images, try SilverLight.
You mentioned Google Maps, Bing Maps, I need to clarify they use huge amount of JavaScript. To check where click was made, what is its location, where to zoom in where to zoom out. If it was me, I would have first tried to learn jQuery and JavaScript. To learn what are events, how they are used, and how I can use them in my project.
jQuery zoom is nothing or should I say, there is no such thing as a Zoom for any object in jQuery API. But this is a great site that I just found right now I hope it would be a kick start for you jQuery Zoom jacklmoore.com. For this site, you might need some plugin from the person, link is provided on that page! Go an have a look. :)
Again: Try to learn the basics first. You never know when the very basic event is needed and you are trying to use the expert level one. I hope it helps! :) Comment for any question or any objection.
Cheers.

take a photo using webcam with C#

I want to take a photo using a webcam from my application. How do I accomplish that? My application is developed in C# and to make a visitor's pass, I want to take a photo of the particular visitor when he enters the company building.
Try out jQuery Webcam
I am struggling to get the save function to work, but its a start.
Webcams all use a different API. Find the API that your webcam supports...let me know, and I will happily talk you through how to do it.
I assume that you are talking WinForms?
You are going to need some kind of trusted client side code, if you want to do this. Java, Flash, SilverLight are all possibilities. But they may create a dependency on a particular WebCam/Software/API.
You'd be much better off configuring your web cam to put its photos in a single place and have a web form that accepts a file upload.
This way when your web cam breaks and you can't get the exact same device you don't have to recode.

Control webcam from C#

I have a Creative Life CAM Optia AF webcam, the software included in the package is able to control the camera in different ways, like set autofocus to auto or manual, and a bunch of gamma and brightness settings.
I'm capturing the feed with the AForge Computer vision library, and it's working great.
But i would like to be able to set the manual focus from inside my application.
Ive been searching for a tutorial, but come up empty handed.
Can i somehow either disassemble the included software, or is there some way to fetch the traffic / instructions being sent to the device?
Thanks in advance.
If the license agreement that comes with the software allows you to disassemble it, you can do so with Reflector (assuming that it's a .NET application).
How to programatically disable the auto-focus of a webcam?
I think i found a way to do this. But i have never written any C++, that is C++ right?
Thanks :)

Reading Microsoft tags

You guys are probably aware of Microsoft Tags.
We have a barcode gun in our office and I would like to read these tags using C#.
Any idea how I can go about doing this?
Thanks
The Microsoft Tag initiative is based around image recognition, a barcode gun won't have any idea of what to do with a 'Tag', but you can use your phone camera. There's a sample app in the Apple App Store if you have an iPhone, not sure if they've written a version for Windows Mobile yet.
The principle is that you can resolve the tag to a short alpha-numeric code (think GUID but smaller) and then look that up using Microsoft's register of tags, using Web Services.
The question is why?
There have been companies spruiking this for years and it just doesn't make sense.
I'd rather have an application that read a URL from a photo, OCR'd it and then punched it into a browser for me. That way you get the ability to click and view, but you don't need a phone in your hand to write down the URL. They're all striving for a vendor lock in.
Call me a luddite or blind to the way of the future but I just don't see this as a "killer app".

Categories

Resources