Comments (4)
Hi @stephanschulz , thank you for reaching out to us with this suggestion. We will get back to you when we have had a look.
from acap-native-sdk-examples.
i tried the following:
add #include <opencv2/features2d.hpp>
edit the Dockerfile to include -D BUILD_LIST=core,imgproc,video,features2d,objdetect \ in lline 76 https://github.com/AxisCommunications/acap-native-sdk-examples/blob/master/using-opencv/Dockerfile#L76
But still get errors
> [12/12] RUN . /opt/axis/acapsdk/environment-setup* && acap-build .:
#16 0.333 make
#16 0.335 mkdir -p ./lib
#16 0.342 cp /target-root/usr/lib/libopencv_core.so.4.5 /target-root/usr/lib/libopencv_core.so.4.5.1 /target-root/usr/lib/libopencv_core.so ./lib
#16 0.350 cp /target-root/usr/lib/libopencv_imgproc.so.4.5.1 /target-root/usr/lib/libopencv_imgproc.so /target-root/usr/lib/libopencv_imgproc.so.4.5 ./lib
#16 0.359 cp /target-root/usr/lib/libopencv_video.so /target-root/usr/lib/libopencv_video.so.4.5 /target-root/usr/lib/libopencv_video.so.4.5.1 ./lib
#16 0.367 arm-linux-gnueabihf-g++ -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/axis/acapsdk/sysroots/armv7hf -L/opt/axis/acapsdk/sysroots/armv7hf/usr/lib example.cpp -O2 -pipe -g -feliminate-unused-debug-types -Os -pipe -std=c++11 -I/opt/axis/acapsdk/sysroots/armv7hf/usr/include/vdo -I/opt/axis/acapsdk/sysroots/armv7hf/usr/include/gio-unix-2.0 -I/opt/axis/acapsdk/sysroots/armv7hf/usr/include/glib-2.0 -I/opt/axis/acapsdk/sysroots/armv7hf/usr/lib/glib-2.0/include -I/target-root/usr/include/opencv4 -L./lib -Wl,--no-as-needed,-rpath,'$ORIGIN/lib' -lm -lopencv_video -lopencv_imgproc -lopencv_core -lpthread -lvdostream -lsystemd -lgio-2.0 -lgobject-2.0 -lglib-2.0 imgprovider.cpp -o opencv_app && arm-linux-gnueabihf-strip --strip-unneeded opencv_app
#16 1.925 /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: warning: libopencv_calib3d.so.4.5, needed by ./lib/libopencv_video.so, not found (try using -rpath or -rpath-link)
#16 1.925 /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: /tmp/cclv1ky1.o: in function `main':
#16 1.925 /opt/app/example.cpp:101: undefined reference to `cv::SimpleBlobDetector::Params::Params()'
#16 1.925 /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: /opt/app/example.cpp:136: undefined reference to `cv::SimpleBlobDetector::create(cv::SimpleBlobDetector::Params const&)'
#16 1.925 /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: ./lib/libopencv_video.so: undefined reference to `cv::estimateAffine2D(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, int, double, unsigned int, double, unsigned int)'
#16 1.925 /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: ./lib/libopencv_video.so: undefined reference to `cv::estimateAffinePartial2D(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, int, double, unsigned int, double, unsigned int)'
#16 1.925 collect2: error: ld returned 1 exit status
#16 1.926 make: *** [Makefile:30: opencv_app] Error 1
#16 1.927
#16 1.927 make failed. Please fix above errors, before you can create a package
------
executor failed running [/bin/bash -o pipefail -c . /opt/axis/acapsdk/environment-setup* && acap-build .]: exit code: 1
stephanschulz@Komputer using-opencv %
from acap-native-sdk-examples.
Hello! To build Opencv with more libraries you can do the following:
First, add the libraries to the build in the docker file, line 76:
-D BUILD_LIST=core,imgproc,video,features2d,objdetect
then in the makefile Line 19, you add those shared libs (and their dependency)
SHLIBS += -lm -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_video -lopencv_imgproc -lopencv_core -lpthread
Then, you need to copy the .so files to the local lib directory, which means adding a new command in line 21 and line 34 to find and copy the right .so files.
To make this last step more simple, you could also copy all the opencv libs,
replacing line 21,22,23 with:
LIB_FILES = $(wildcard $(SDK_TARGET_LIBS)/libopencv_*.so*)
and
34,35,36 with:
cp $(LIB_FILES) $(SHLIB_DIR)
from acap-native-sdk-examples.
No updates after answer, closing issue.
from acap-native-sdk-examples.
Related Issues (20)
- Larod model input HOT 16
- get VdoBuffer too slow HOT 3
- Kernel crashed HOT 3
- Dependency Dashboard
- Black cropped image is output when detect object in object detection HOT 11
- Inference is performed, but no object is detected.(object_detection-cv25) HOT 3
- Q6215-LE Supported? HOT 7
- How to train dataset for object_detection HOT 4
- sh[4012]: double free or corruption (out) HOT 2
- How do you set which view from the camera should be used for e.g. object detection? HOT 1
- object-detection-cv25 - Unable to run app with high resolution HOT 4
- object-detection example - quantization issue HOT 5
- Are tensorflow2 based trainings compatible with artpec8? HOT 3
- Send detection results to local server. HOT 5
- Asynchronous connection has been closed HOT 7
- setupLarod: Unable to load model: Could not load model: Could not allocate tensors HOT 9
- web-server example fails to build. HOT 7
- C examples in web-server repo? HOT 1
- Error while running HelloWorld App on Axis camera. HOT 2
- openssl_curl_example doesn't build with acap-native-sdk 1.5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acap-native-sdk-examples.