First time here? Check out the FAQ!

Ask Your Question
0

How use Opencv process signal input is Stream video on C#

asked Feb 28 '13

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

I have a project about image processing.I need to process signal is stream video from server.I use opencv-2.4.3 and C#.

Now,I want to ask OpenCV.Org.Is opencv-2.4.3 support input signal is stream video ( not from camera or webcam connect computer) Thanks!

Preview: (hide)

1 answer

Sort by » oldest newest most voted
1

answered Mar 1 '13

berak gravatar image

updated Mar 1 '13

there is (limited) stream support in opencv via ffmpeg, if you got an mjpg url, you could try:

VideoCapture cap("http://ceac9.ua-camp-farms.arizona.edu/mjpg/video.mjpg");

unfortunately, that seems to work much nicer in linux, than on win

if it does not, you could still open a socket, and use imdecode() on the data you got. e.g, mjpeg is just single jpegs interleaved with multi-part form http headers.

Preview: (hide)

Comments

Thank for reply! When I builded Opencv with ffmpeg,I got stream video ex:VideoCapture cap("http://ceac9.ua-camp-farms.arizona.edu/mjpg/video.mjpg"); I use an app for Android to stream video is IP webcam.And I have link to stream is URL://IP:Port/videofeed but I don't get this stream video.Can you tell me edit ffmjpg to support it?

Diep gravatar imageDiep (Mar 11 '13)edit

maybe it's lacking the information, that it's mjpeg type.

it's notffmpeg's fault, but opencv seems to need the literal string somewhere in the url, so try a trick:

just append a dummy param at the end uf the url like:

URL://IP:Port/videofeed?type=mjpg

helps most of the time!

berak gravatar imageberak (Mar 11 '13)edit

I have just build Opencv-2.4.5 on Windows 7 but it doesn't support the stream from IP Webcam. Can you help me build full function of Opencv245?

Diep gravatar imageDiep (Apr 12 '13)edit

Question Tools

Stats

Asked: Feb 28 '13

Seen: 3,811 times

Last updated: Apr 05 '13