需要显示捕获的视频并在其上绘图(C#+ WPF) [英] Need to display captured video and draw on it (C#+WPF)

查看:246
本文介绍了需要显示捕获的视频并在其上绘图(C#+ WPF)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是C#和WPF的新手.
我需要做的是编写一个显示我的网络摄像头的程序,这样我就可以在通过鼠标单击选择的位置上播放视频.

最简单的方法是什么?

任何帮助将是最珍贵的! :-O

Hi,

I''m quite a newbie at C# and WPF.
What I need to do is to write a program that displays my webcam and so I could draw upon the video at a location selected by a mouse clicks.

What would be the easiest way to achieve this?

Any help will be most apprretiated ! :-O

推荐答案

Boris Milner写道:
Boris Milner wrote:

我相当C#和WPF的新手.

I''m quite a newbie at C# and WPF.



那为什么你有一个需要"而不是想要"呢?捕获视频已被广泛记录.完成此操作后,如果将其放在WPF媒体控件上,由于WPF的工作原理,您可以像在图像上一样轻松地在它上面进行绘制.但是,使用WPF,您最终会创建绘制线条的路径,而不是像在Winforms这样的较早技术中绘制的方式.它仍然很复杂,而且不一定是初学者的任务.



Then why do you have a ''need'' instead of a ''want'' ? Capturing video is widely documented. Once you do that, if you put it on a WPF media control, because of how WPF works, you can draw on top of it as easily as you could an image. But, with WPF, you end up creating paths that draw your line, instead of drawing the way you would in older technologies like winforms. It''s still complex and not necessarily a beginner task.


我不确定这对您有多重要,因为我无法想象您在这里问之前尝试过什么. />
[ ^ ]将通过网络摄像头将您的视频显示在WPF表单上.就像我说的那样,在WPF中,您可以在集成视频控件之上绘制任何喜欢的东西. [
I am unsure how important this is for you, because I can''t imagine what you tried before asking here.

This[^] will get your video on your WPF form from your webcam. As I said, in WPF you can draw anything you like on top of the integrated video control. This[^] is a Microsoft sample on how to create a drawing program in WPF. Combined, these two google searches took me less than a minute to find.


感谢您的快速回复.

我确实需要为我和我的团队正在处理的学术竞赛项目运行此程序.

您能否请我去最好的地方,以快速获取知识以使事情正常运行?

我不介意无法实际绘制,只能在正在运行的视频中选择的(x,y)像素上放置一个图标.

再次感谢.
Thanks for the quick response.

I do need to have this program running for an academic competition project me and my team are dealing with.

Could you please refer me to the best place to quickly acquire the knowledge to get things up and running?

I don''t mind not to be able actually drawing but only put an icon over an (x,y) pixel chosen over the running video.

Thanks again.


这篇关于需要显示捕获的视频并在其上绘图(C#+ WPF)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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