EMGU QueryFrame返回"五花"图像在RTSP [英] EMGU QueryFrame returns "streaky" Image over RTSP

查看:648
本文介绍了EMGU QueryFrame返回"五花"图像在RTSP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我试图抢在RTSP帧,使用下面的代码高清网络摄像机:

  //在的Form_Load 
Application.Idle + = getNextFrame;

和事件处理程序:



<$ P $ 。p> 私人无效getNextFrame(对象发件人,EventArgs AGS)
{
//其中_imgCount是总的图像抓斗
lbl_Count.Text = _imgCount ++的ToString();
//和ibLive是Emgu ImageBox
ibLive.Image = capAxis.QueryFrame()调整(640,480,INTER.CV_INTER_AREA)。
}

当我启动该程序,它会抢前20-40帧易怒出现在屏幕的底部。它总是在图像的底部,但是有时它占用半个屏幕





流的分辨率为1920x1080,它的采用MJPEG。我试图切换到H.264,但有相同的结果。



我使用Emgu版本x86-2.4.0.1717



任何想法?
感谢。


解决方案

我知道这是一个老问题,但我最近遇到了同样的问题。
我会建议使用其他流媒体库。如:





如果你真的需要使用EMGU然后创建一个较低的分辨率或更高的压缩流轮廓流。我设置压缩为30,然后用相同的分辨率在RTSP URL提供的流文件名称。 (假设你正在使用移轴镜头像我这样 capAxis

 捕捉帽=新的捕捉(@的rtsp://10.0.0.1/axis-media/media.amp视频编解码器= H264&安培; streamprofile = rtspstream); 


I have a HD network camera that I am trying to grab frames over rtsp and using the following code:

//in Form_Load
Application.Idle += getNextFrame;

And the Event Handler:

private void getNextFrame(object sender, EventArgs ags)
{
        //where _imgCount is the total image Grabs
        lbl_Count.Text = _imgCount++.ToString(); 
        // and ibLive is a Emgu ImageBox
        ibLive.Image = capAxis.QueryFrame().Resize(640, 480, INTER.CV_INTER_AREA);
}

When I start the program, it'll grab 20-40 frames before the "streakiness" appears at the bottom of the screen. It's always on the bottom of the image, but some times it takes up half the screen.

The stream resolution is 1920x1080 and it's using mjpeg. I tried switching to h.264 but had the same results.

I am using Emgu version x86-2.4.0.1717

Any Ideas? Thanks.

解决方案

I know this is an old question but I ran into the same problem recently. I would recommend using another streaming library. Eg.

If you really need to stream using EMGU then create a stream profile with a lower resolution or higher compression. I set compression to 30 and used the same resolution then provided the stream profile name in the rtsp url. (Assuming you're using an Axis camera like me capAxis)

Capture cap = new Capture(@"rtsp://10.0.0.1/axis-media/media.amp?videocodec=h264&streamprofile=rtspstream");

这篇关于EMGU QueryFrame返回&QUOT;五花&QUOT;图像在RTSP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆