Camera.setMode 设置小分辨率 [英] Camera.setMode sets small resolution

查看:46
本文介绍了Camera.setMode 设置小分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台装有 Windows 8.1 的联想平板电脑,带有前后摄像头.后置摄像头为IMX175,支持3280*2464像素.

I have a Lenovo tablet with Windows 8.1 with front and rear cameras. The rear camera is IMX175 and should supports 3280*2464 pixels.

当我使用这些尺寸调用 setMode 时,我再也没有取回它们(在 Camera.width/height 中),而是一些较低的数字.

When I call setMode with those dimensions I never got them back (in Camera.width/height) but some lower numbers.

在 IE (11) 中我得到 1280*960

In IE (11) I get 1280*960

在 Chrome 中我得到 1920*1440

In Chrome I get 1920*1440

我尝试将帧速率更改为多个选项,将 stage.quality 设置为 StageQuality.BEST.

I tried to change the frame rate to several options, set the stage.quality to StageQuality.BEST.

任何帮助将不胜感激

推荐答案

cam 规格、flash-player 和浏览器之间有几个原因会影响最终的最大分辨率.我不认为,您可以将 IMX175 的完整(照片)分辨率附加到视频对象上...过去我写这个脚本是为了检测 flash 中网络摄像头的真实可能分辨率.

There are several reasons between the cam-specifications, flash-player and browsers which affect the final maximal resolution. I dont think, you'll able to attach the full (foto)resolution of the IMX175 to a video-object... In the past I wrote this script to detect the real possible resolutions of webcams in flash.

function testCams():void
{
    var camNames:Array = Camera.names;

    for (var i:int; i< camNames.length; i++)
    {
        var camName:String = camNames[i];
        trace(camName,"\n================================");

        var cam:Camera = Camera.getCamera(i.toString());
        cam.setMode(8000,6000,1);
        var camMaxWidth:Number = cam.width;
        var camMaxHeight:Number = cam.width;
        trace("Maxima w,h: ",camMaxWidth,camMaxHeight);
        //4:3
        cam.setMode(camMaxWidth,camMaxWidth/4*3, 100);
        trace("Maximum 4:3 w,h: ",cam.width,cam.height);
        //16:9
        cam.setMode(camMaxWidth,camMaxWidth/16*9, 100);
        trace("Maximum 16:9 w,h: ",cam.width,cam.height);

        trace("Maximum fps: ",cam.fps);
    }
}

testCams();

测试您的摄像头并查看可能的模式.问候.

Test your cams and look what mode is possible. Greetings.

这篇关于Camera.setMode 设置小分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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