直接访问Iphone 3gs相机
我正在尝试在 iPhone 上编写一个实时图像处理应用程序。
目前,我正在使用 takepicture 方法拍照(uiGetScreeImage 输出的分辨率太低),但由于我从 ImagePickerController 收到 UImage(3Mpixels),所以我必须将其绘制到上下文上,这需要花费大量时间。由于我只需要图像的一小部分,因此我尝试先裁剪它然后绘制它,但它并没有真正帮助。更重要的是,绘制裁剪图像所需的时间似乎取决于裁剪的位置而不是其大小(我觉得这很奇怪,但我猜它可能与 UIImage 的物理存储方式有关)。
我想知道是否有一种方法可以直接访问图像的像素。我对任何解决方案持开放态度。另外,如果您可以向我指出一些适用于 iphone 3gs 的私有 api 页面或解决方案,那就太好了(我不打算发布该应用程序)。
多谢!
I am attempting to write an real-time image processing application on the iphone.
Currently, I am taking pictures with takepicture method (the uiGetScreeImage output has a too low resolution) but since I receive a UImage from the ImagePickerController, which is 3Mpixels, I have to draw it onto a context and that takes a lot of time. Since I only need a small section of the image I tried cropping it first and then drawing it but it did not really help. Morevoer, the time it takes to draw the cropped image seems to depend on the position of the crop rather than its size (which I find rather strange, but it might have smth to do with the way a UIImage is physicallz stored i guess).
I was wondering if there was a way to access directly the pixels of the image. I am open to any solution. Also if you could point me to some private api page or solution that would work with the iphone 3gs, that would be great (i don't intend to publish the application).
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能会有所帮助。另外,您可以使用这个问题
This can be helpful. Plus you could use this question