hunter-packages / opencv Goto Github PK
View Code? Open in Web Editor NEWThis project forked from opencv/opencv
Open Source Computer Vision Library
Home Page: opencv.org
License: Other
This project forked from opencv/opencv
Open Source Computer Vision Library
Home Page: opencv.org
License: Other
Despite the workaround in this commit, generally CMAKE_SYSTEM_PROCESSOR
does not get set, which leads to both AARCH64
and ARM
never getting set, which leads to NEON not getting detected i.e.
-- CPU/HW features:
-- Baseline:
There's a good discussion on why CMAKE_SYSTEM_PROCESSOR needs to be set in ruslo/hunter#954 but it appears the workaround currently in polly is insufficient. OpenCVDetectCXXCompiler.cmake and OpenCVCompilerOptimizations.cmake depend on a value here in order to know to even run the checks for NEON (or SSE).
The problem is that the attempted fix:
set(_all_archs ${IPHONESIMULATOR_ARCHS} ${IPHONEOS_ARCHS})
list(LENGTH _all_archs _all_archs_len)
if(_all_archs_len EQUAL 1)
set(CMAKE_SYSTEM_PROCESSOR ${_all_archs})
else()
set(CMAKE_SYSTEM_PROCESSOR "")
endif()
doesn't work when _all_archs_len is greater than 1, which is the case when I use any ios-*.cmake, where _all_archs ends up being x86_64;arm64
(simulator arch ; iPhone arch).
Note we are seeing NEON always properly detected with hunter targeting Android and this problem is specific to iOS.
We run:
POLLY_IOS_DEVELOPMENT_TEAM="<our 10-digit ID>" POLLY_IOS_BUNDLE_IDENTIFIER="<our com.company.appname id>" \
cmake -DCMAKE_TOOLCHAIN_FILE=~/polly/ios.cmake -G Xcode "<source dir>"
where the top-level CMake file does hunter_add_package(OpenCV)
. When detecting CPU baseline features the output will just show Baseline:
i.e. did not find NEON.
Compare that to the base case of grabbing non-hunter opencv's 3.4.3 tag and running:
python platforms/ios/build_framework.py build/ios
Then the output will show successful detection of Baseline: NEON
or Baseline: NEON,FP16
.
I'm using the latest hunter version 22.16. Previously I used 0.19.155. The problem occurs with both versions.
Upon running CMake config, the OpenCV 3.2.0-p2 package is downloaded. But the hash verification fails:
Command:
cmake -G'Xcode' -H. -B_builds/ios-nocodesign-11-4 -DCMAKE_TOOLCHAIN_FILE='/Users/robert/Development/.../polly/ios-nocodesign-11-4.cmake' -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=_install/ios-Release -DCMAKE_IOS_INSTALL_COMBINED=YES -DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO
Output:
(...)
-- Downloading...
dst='/Users/robert/.hunter/_Base/Download/OpenCV/3.2.0-p2/9921920/v3.2.0-p2.tar.gz'
timeout='none'
-- Using src='https://github.com/hunter-packages/opencv/archive/v3.2.0-p2.tar.gz'
(...)
-- [download 100% complete]
-- verifying file...
file='/Users/robert/.hunter/_Base/Download/OpenCV/3.2.0-p2/9921920/v3.2.0-p2.tar.gz'
-- SHA1 hash of
/Users/robert/.hunter/_Base/Download/OpenCV/3.2.0-p2/9921920/v3.2.0-p2.tar.gz
does not match expected value
expected: '99219206c4fb9b5b6f60e03112746461baf6c9ab'
actual: 'ea8f612eea55dfa6d2f3669d5e9eb4240417444b'
-- Hash mismatch, removing...
-- Retrying...
Please note that using a newer OpenCV version is not an option, because the newer versions (3.3 & 3.4) have bad performance on some of the latest iPhone devices like iPhone 6S or iPhone X. (I am going to create a bug report for this issue.) OpenCV 3.2 is the latest version that does not have this issue.
Create a hunter project and try to use OpenCV 3.2.0-p2:
hunter_config(OpenCV VERSION 3.2.0-p2)
From https://github.com/ruslo/hunter/issues/683#issue-210111361:
there is at least two bugfix we need in OpenCV 3.2 compare to 3.1
@Ubiquite +cc
Since the Hunter Qt is stuck at 5.5, I would like the ability to use my system Qt instead.
If I try to use Qt4 to provide GUI in OpenCV, this conflicts with the Qt5.
I haven't had much luck with GTK and it seems like extreme lengths to get GUI working.
So, I propose a define to allow us to use system Qt package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.