iPhone光线感应器VS相机测量光的强度 [英] iPhone light sensor vs camera to measure the light intensity

查看:1216
本文介绍了iPhone光线感应器VS相机测量光的强度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个测量应用的光强度类似下面的:

I need to create an application that measure the light intensity like the ones below:

http://itunes.apple.com/us/应用程序/照度计-PRO / id408369821?MT = 8
http://itunes.apple.com/us/app/megaman -luxmeter / id455660266?MT = 8

和我不知道这是解决问题的最好办法。我的理解是不可能使用光传感器的API这是私人苹果。我可以使用哪些类捕获帧,得到这样的像素颜色或者一些输出,我以后可以转换为力士属性?

and I wonder which is the best way to solve the problem. As I understood it is not possible to use light sensor APIs which are private to Apple. What classes can I use for capture frames and get properties like pixel color or some output that I can convert to Lux later?

谢谢!

推荐答案

您真正需要的是采取用相机API的图像和运行一个算法来确定的亮度。你可以在飞行中也这么做。见下图:

What you really want is to take an image with the camera api and run an algorithm to determine the luminance. You can do this on the fly as well. See below:

相机教程:
<一href=\"http://developer.apple.com/library/ios/#DOCUMENTATION/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Articles/TakingPicturesAndMovies.html\">http://developer.apple.com/library/ios/#DOCUMENTATION/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Articles/TakingPicturesAndMovies.html

亮度算法:
<一href=\"http://b2cloud.com.au/tutorial/obtaining-luminosity-from-an-ios-camera\">http://b2cloud.com.au/tutorial/obtaining-luminosity-from-an-ios-camera

这篇关于iPhone光线感应器VS相机测量光的强度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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