LegoCV icon indicating copy to clipboard operation
LegoCV copied to clipboard

Fixed issues to compile and run FaceDetection demo

Open madhavajay opened this issue 6 years ago • 2 comments

  • Updated OpenCV submodule to 4.0.1
  • Renamed methods detectMultiscaleWith to DetectMultiScaleOnImage
  • Removed unused test targets
  • Added reference to data folder in opencv for haar cascade files
  • Updated Xcode Project to Swift Version 4.2
  • Fixed some minor project Code Deprecation changes

madhavajay avatar Mar 18 '19 06:03 madhavajay

Firstly, this is an awesome project. Thanks for all the hard work!

I removed the tests because they were empty and I had trouble with OpenCV compiling for the simulator but I think it would be good to add them back and add some CI and tests. The Face Detector app wasnt compiling and now it compiles but the bounding boxes arent being drawn or something is wrong however the code is working and the Face Haar cascades work.

I want to use this with Carthage and I looked at adding a compile step into the scripts for the LegoCV target like this:

echo ${PROJECT_DIR}
opencv_framework_dir="${PROJECT_DIR}/../ios/opencv2.framework"
if [ ! -d "$opencv_framework_dir" ]
then
    echo "OpenCV framework not found at: ${opencv_framework_dir}"
    echo "Compiling OpenCV"
    /usr/bin/python ../opencv/platforms/ios/build_framework.py ../ios --dynamic
else
    echo "OpenCV framework found"
fi

But its really slow and I was thinking whats wrong with using the binaries? Its really easy to add the official binarys using carthage and I can add this instead if you agree its a good idea?

Otherwise it would be nice to add some kind of build flag to allow building from binaries vs building from source however im not sure how that would work with Cocapods / Carthage as an extra step?

OpenCV isn't going anywhere so I think this project should be more and more popular. I am happy to help get things into a state where they are working well and seamlessly. There seems to be some Forks with MacOS support as well so makes sense to consolidate some of these recent changes.

Thoughts?

madhavajay avatar Mar 18 '19 06:03 madhavajay

Thanks for your help! It's true that OpenCV takes a while to build and at some point it should be included in the repo (git lfs would be required, as it's a huge file). Since I've already had the Swift 5 update in the work, not sure if this needs to be merged. I am keeping the test targets though, as I will be adding tests soon in the future.

Legoless avatar May 21 '19 19:05 Legoless