始终以最大分辨率捕获网络摄像头图像!

发布于 2024-09-07 06:58:21 字数 224 浏览 3 评论 0原文

有没有办法知道网络摄像头的最大分辨率? 我需要从网络摄像头捕获图像并通过互联网将其发送到另一台笔记本电脑上。

因此,我想自动从网络摄像头独立地以最大分辨率捕获图像,而无需每次都设置分辨率(如果我有一个 1.3 MPixel 的网络摄像头,我想以 1.3 MPixel 捕获图像;如果我有一个 640x480 像素的网络摄像头,我想以 640x480 像素捕获图像;等等...)。

我怎样才能做到这一点?

Is there a way to know the max resolution of a webcam ?
I need to capture images from webcam and send its on another notebook throught internet.

So I want to capture images at max resolution indipendently from webcam automatically without setting the resolution every time ( if I have a webcam with 1.3 MPixel, I want to capture images at 1.3 MPixel; If I have a webcam with 640x480 Pixel, I want to capture images at 640x480 Pixel; and so on... ).

How can I do that ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

山田美奈子 2024-09-14 06:58:21

您将需要相机对象

var cam:Camera = new Camera();

,并且将使用相机的宽度和高度(以像素为单位)。然后你就可以用它做任何你喜欢的事情。例子:

var bitp:BitmapData = new BitmapData(cam.width, cam.height); 
var img:Bitmap = new Bitmap(bitp);

You will need the camera object

var cam:Camera = new Camera();

and you will use the camera's width and height which are in pixels. Then you can do whatever you like it with it. Example:

var bitp:BitmapData = new BitmapData(cam.width, cam.height); 
var img:Bitmap = new Bitmap(bitp);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文