Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove QTKit for Xcode 8 / macOS 10.12 Sierra #31

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

jdonald
Copy link

@jdonald jdonald commented May 30, 2017

QTKit was deprecated some time ago and then removed altogether in favor of AVFoundation.

Fortunately this didn't require too many drastic changes. I just kept looking at the modified method signatures across AVCaptureDeviceInput, AVCaptureSession, and other classes while making appropriate tweaks.

I tested this on my MacBook running Sierra. Although I'm unable to easily run the standard sanity-test camera.testme() due to its dependence on qtwidget/qtlua -> Qt 4, I did a full test with torch + a browser + my built-in webcam using vfonov/deep-pi modified for macOS.

It was only after going through most of this exercise did I realize that when OpenCV is available, one can run on Sierra with the entire camera.m implementation omitted. I have tweaked the CMake configuration to make it install with only one or the other (camopencv or cammacos), but not both.

If you build OpenCV locally, note that at a minimum it requires configuration settings such as -DBUILD_opencv_objdetect:BOOL=ON -DBUILD_opencv_photo:BOOL=ON -DBUILD_opencv_video:BOOL=ON -DBUILD_opencv_videoio:BOOL=ON and headaches are likely minimized via -DBUILD_SHARED_LIBS:BOOL=OFF.

@susiefu
Copy link

susiefu commented Dec 4, 2017

This worked great, thanks @jdonald!

For everyone still with issues in #27 and #30, check out this unmerged pull request and make the rock locally

git fetch origin pull/31/head:fix-avfoundation
git checkout fix-avfoundation
luarocks make camera-1.1-0.rockspec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants