opencvsharp
opencvsharp copied to clipboard
a Nuget OpenCvSharp4.runtime.osx.10.15-x64 without dependencies
I develop a Multiplatform Desktop app (using AvaloniaUI). I use OpenCVSharp with the natives runtimes. I use just a small bunch of feature (basic mat stuff and inpainting)
For windows everything is up & running. But for Mac OS, I need to get an app bundle standalone without any dependencies. The users should install the app bundle without running the brew command.
Is there any way to build a native library (with static dependencies) of OpenCV compatible with opencvsharp ?
Thanks
Ok I tried and I have something working but it is kind of ugly for now.
I execute the commands from https://github.com/shimat/opencvsharp/blob/master/.github/workflows/macos10.yml
but without the
-DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-${OPENCV_VERSION}/modules \
then in order to compile OpenCVSharpExtern, I had to remove the following files from src/OpenCVSharpExtern :
aruco.cpp
aruco.h
bgsegm.cpp
bgsegm.h
dnn_superres.cpp
dnn_superres.h
face_FaceRecognizer.h
face.cpp
img_hash.cpp
img_hash.h
line_descriptor.cpp
line_descriptor.h
optflow.cpp
optflow.h
quality.cpp
quality.h
shape_ShapeDistanceExtractor.h
shape.cpp
superres.cpp
superres.h
text_TextDetector.h
text.cpp
text.h
tracking.cpp
tracking.h
wechat_qrcode.cpp
wechat_qrcode.h
xfeatures2d.cpp
xfeatures2d.h
ximgproc.cpp
ximgproc.h
xphoto.cpp
xphoto.h
Is there a more elegant way to do this ?
I just need to remove all those dependencies :
libOpenCvSharpExtern.dylib:
/usr/local/opt/freetype/lib/libfreetype.6.dylib (compatibility version 25.0.0, current version 25.0.0)
/usr/local/opt/harfbuzz/lib/libharfbuzz.0.dylib (compatibility version 20802.0.0, current version 20802.0.0)
/usr/local/opt/tesseract/lib/libtesseract.4.dylib (compatibility version 5.0.0, current version 5.1.0)
/usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 9.0.0)
/usr/local/opt/ffmpeg/lib/libavcodec.58.dylib (compatibility version 58.0.0, current version 58.134.100)
/usr/local/opt/ffmpeg/lib/libavformat.58.dylib (compatibility version 58.0.0, current version 58.76.100)
/usr/local/opt/ffmpeg/lib/libavutil.56.dylib (compatibility version 56.0.0, current version 56.70.100)
/usr/local/opt/ffmpeg/lib/libswscale.5.dylib (compatibility version 5.0.0, current version 5.9.100)
/usr/local/opt/ffmpeg/lib/libavresample.4.dylib (compatibility version 4.0.0, current version 4.0.0)
Thanks :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.