Unity调用手机摄像头进行摄像,并显示
2013-03-11 16:53
791 查看
核心知识:
WebCamTexture(网络摄像头材质)
关键方法:
WebCamTexture.Play()播放;WebCamTexture.Pause()暂停;WebCamTexture.Stop()停止;
例1:
public WebCamTexture webCamTexture;
public Material webCamMaterial;
IEnumerator webCam(){
yield return Application.RequestUserAuthorization(UserAuthorization.WebCam);
if (Application.HasUserAuthorization(UserAuthorization.WebCam))
{
WebCamDevice[] devices = WebCamTexture.devices;
deviceName = devices[0].name;
tex= new WebCamTexture(deviceName, 400, 300, 12);
webCamShow.mainTexture=tex;
tex.Play();
}
}
WebCamTexture(网络摄像头材质)
关键方法:
WebCamTexture.Play()播放;WebCamTexture.Pause()暂停;WebCamTexture.Stop()停止;
例1:
public WebCamTexture webCamTexture;
public Material webCamMaterial;
IEnumerator webCam(){
yield return Application.RequestUserAuthorization(UserAuthorization.WebCam);
if (Application.HasUserAuthorization(UserAuthorization.WebCam))
{
WebCamDevice[] devices = WebCamTexture.devices;
deviceName = devices[0].name;
tex= new WebCamTexture(deviceName, 400, 300, 12);
webCamShow.mainTexture=tex;
tex.Play();
}
}
相关文章推荐
- 如何调用S60的系统摄像头功能进行拍照与摄像?zz
- 调用系统摄像头拍照,对拍照后的图片进行裁剪和压缩处理,并显示在imageview上面
- HTML5调用手机前置摄像头或后置摄像头拍照,canvas显示,经过Android测试
- service中调用摄像头在无页面显示的情况下进行录像
- Unity如何调用安卓手机摄像头实现拍照和录像
- 手机页面调用手机摄像头,录像、摄像、上传已有照片,安卓,苹果通用
- Unity调用外部摄像头,全屏显示摄像头画面
- android 调用摄像头进行拍照,并对照片进行裁剪,然后显示。
- .Net语言 APP开发平台——Smobiler学习日志:实现在手机上调用摄像头进行扫描
- FootStep 40、如何调用S60的系统摄像头功能进行拍照与摄像?
- Unity如何调用安卓手机摄像头实现拍照和录像
- Unity如何调用安卓手机摄像头实现拍照和录像
- 使用Opencv调用摄像头并在MFC中进行视频显示
- FootStep 40、如何调用S60的系统摄像头功能进行拍照与摄像?
- FootStep 40、如何调用S60的系统摄像头功能进行拍照与摄像?
- 调用手机的摄像头,并且返回照片显示在程序界面上.
- unity调用摄像头进行拍照和保存照片
- Unity使用WebCamTexture 实现手机前后摄像头调用
- opencv调用摄像头在mfc控件中显示黑屏问题的解决
- Android开发之--android调用手机存在的地图进行定位