Accessing webcam in Xcode with OpenCV (C++)

你。 提交于 2019-11-28 01:17:49
Lorenzo

I found a solution in the end; these are the steps that I followed:

  • In Project Navigator (on the left side of Xcode IDE) right click on the project -> New File -> Property file
  • Call the file "Info.plist" and save it in the very same directory where the main.cpp is (it should work also in the upper-level dir, but this is what worked for me) as shown in the picture below:

  • Select the Info.plist file and edit it according to what explained in the question above.
  • Now we need to link the Info.plist to the project, so left click on the project in Project Navigator, select tab General and, on the left pane ("project and target list"), click on the executable under the "TARGET" section. You should be able to see a button which states "Choose Info.plist File", see the picture below:

As I noticed that the program did not start yet from the Xcode IDE directly, but I was able to navigate (in Finder) to the directory where the executable was and run the program by using the Terminal, I copy-pasted the Info.plist into that folder, as suggested here

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!