简体   繁体   English

如何将外置摄像头连接到iPhone并拍摄/下载照片?

[英]How to connect external camera to iPhone and take/download photos?

I want to connect an external camera to an iPhone (the camera built into the iPhone is inadequate for my needs) and then write an iPhone app that allows me to send a signal to the external camera when I desire to take a picture and then immediately download the taken photo onto my iPhone so that I can send it wirelessly to a server somewhere else. 我想将外置摄像头连接到iPhone(内置于iPhone中的摄像头不足以满足我的需求)然后编写一个iPhone应用程序,允许我在想要拍照时立即向外部摄像头发送信号然后立即将拍摄的照片下载到我的iPhone上,以便我可以无线发送到其他地方的服务器。

I have a lot of experience with web programming and JS, but I have no experience with iPhone apps, and I'm not sure if what I want to do is even possible. 我在网络编程和JS方面有很多经验,但我没有iPhone应用程序的经验,我不确定我想做什么甚至是可能的。 Ideally, if I could get away with coding this in JS and then using Cordova (or something similar) to make an app that can run on any iDevice or Android device, that would be great. 理想情况下,如果我可以在JS中编写代码然后使用Cordova(或类似的东西)制作可在任何iDevice或Android设备上运行的应用程序,那就太棒了。

However, assuming that that is not possible, I would like to focus on an app for just iDevices at first. 但是,假设这是不可能的,我想首先专注于iDevices的应用程序。 I looked around the web for resources on this subject, but I couldn't find anything. 我环顾网络寻找有关此主题的资源,但我找不到任何东西。

I have two questions: 我有两个问题:

  1. Is what I want to do even possible? 我甚至想做什么?
  2. If so, can I do it by using web technologies and then something like Cordova and/or a Chrome App to convert it to something that can be used on any smart device? 如果是这样,我可以通过使用网络技术,然后使用Cordova和/或Chrome应用程序将其转换为可在任何智能设备上使用的内容吗? If not, what are some good books/resources for learning how to do this on an iPhone? 如果没有,有什么好书或资源可以学习如何在iPhone上执行此操作?

Even though I've never coded an iPhone app before, I'm more than happy to try to learn, but I need some books/resources that explain everything from the basics of how to create a "Hello, World!" 虽然我之前从未编写过iPhone应用程序,但我很乐意尝试学习,但我需要一些书籍/资源来解释如何创建“Hello,World!”的基础知识。 iPhone app to the point that I can do all the things listed above. iPhone应用程序,我可以做上面列出的所有事情。

Thank you very much. 非常感谢你。

Answer to your first question is Yes But all this is not very straight forward. 回答你的第一个问题是,但所有这些都不是很直接。 Let me explain it how this can be done But I am not sure if that will be feasible solution for you. 让我解释一下如何做到这一点但我不确定这对你来说是否可行。

  • You can attach your external accessories to iPhone via cable (lighting connector now a days for iPhone 5 and later and with old 30 pin connector earlier devices) or via Wifi (Bluetooth ). 您可以通过电缆将外部配件连接到iPhone(现在iPhone 5及更高版本的照明连接器和旧的30针连接器早期设备)或通过Wifi(蓝牙)连接。 If you connect via cable or Bluetooth (Classic) you need to signup with apple for MFI . 如果您通过有线或蓝牙(经典)连接,则需要使用Apple注册MFI。 That process apple have make it difficult and now only companies can sign for that. 这个过程苹果让它变得困难,现在只有公司可以签署。
  • After you signup you need to use MFI chip in your device (camera) to communicate with it . 注册后,您需要在设备(相机)中使用MFI芯片与之通信。 You can use ExternalAccessory Framework for your development after you done with the above. 完成上述操作后,可以使用ExternalAccessory Framework进行开发。
  • Another solution is Bluetooth Low Energy (BLE) for this you don't need to signup with apple you can just enable your device with BLE and start developing your app using CoreBluetooth framework . 另一个解决方案是蓝牙低功耗(BLE),为此您不需要使用Apple注册,只需使用BLE启用您的设备并开始使用CoreBluetooth框架开发您的应用程序。 But BLE data transfer rate is very low so may not be good enough for photos transfer. 但是BLE 数据传输速率非常低,因此可能不足以进行照片传输。

And answer to your 2nd question is may it is possible if you can use CoreBluetooth or ExternalAccessory Framework with Cordova or any other platform you want to use. 如果您可以将CoreBluetooth或ExternalAccessory Framework与Cordova或您想要使用的任何其他平台一起使用,则可以回答您的第二个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM