PDA

View Full Version : Showing GigE camera video in HTML page



DMP2850
February 14, 2017, 18:50:33
Hello,

We have a DMK 33G445 GigE camera and we would like to be able to show the video output of this camera in an ASP.Net web application. Ideally we would like to do overlays of text and lines, like can be done with IC Imaging control in a regular Windows application. We are thinking we will need to create a C#.net application to capture the video, but we don't know how to forward the video frames to our web application.

Is there any way to do something like this?

Thanks,

Ray

Stefan Geissler
February 15, 2017, 09:59:08
Hello

for Linux I have a Python sample, that creates a pipeline, builds a webserver and sends the images as MJPEG multipart. The images are shown in a img src tag in HTML.

I must admit, I never did that in Windows. However, I would start in C# with an IC Imaging Control dialog application build by the wizard in VS and with automatic image processing checkmarked.

In the ImageAvailable Event handler, I would convert and forward the images somehow.

In order to learn about the "somehow", I would search the internet...
http://stackoverflow.com/questions/219827/multipart-forms-from-c-sharp-client

I searched "c# creating multipart image stream"...

DMP2850
February 15, 2017, 16:45:36
Thanks, Stefan. I'll take a look at that link.

BTW, I have been Googling for solutions for several days, but nothing has stood out as a solution for TIS ethernet cameras. Can you tell me if the ethernet protocol being used by your cameras is a standard or is it custom/proprietary?

Thanks,

Ray

Stefan Geissler
February 16, 2017, 09:31:04
Hello Ray

The cameras follow GigE Vision standard. TYou can not use it in a webbrowser. Must write an own image server that handles the camera and provides the image stream to your client browsers.

The images of the camera arrive at one computer, where the camera is connected to, resp. that opened the camera. The camera does not provide an webserver and activex component as e.g. the old Logitech Sphere did. The camera also does not provide a HTML5 stream. Therefore you must create a server, that does this.
Als already mentionend, I have something like this for Linux. It consists of a Python script, that builds a webserver and provides the images. This little server has only one website that looks like

<!DOCTYPE html>
<HTML>
<HEAD>
<title>Gstreamer testing</title>
</HEAD>
<body>
<img src="mjpeg_stream"/>
</body>
<html>

and could be embedded into an iframe. I must admit, since in Linux with GStreamer that is all more or less simple, I do not now, how to create multipartmux stream in Windows. Therefore, I would search in the internet, how to create an image stream like that to use in a HTML5 browser in an img src tag.
I suppose, that is, what you need to do. I have no experiences with ASP.NET, therefore my support here is limited. But I guess, your application is shown in a webbrowser, right? I suppose, your ASP.NET runs on a server, right?