Closed bakingam1983 closed 6 years ago
you search opencvsharp in NUGET, then get release.
@bakingam1983 since u have compiled openCV and OpenCVSharp for ARM on RPi3. Are u able to run and use OpenCVSharp on RPi3?
@bakingam1983 I'm interested in the answer for @JimSEOW 's question as well.
I'm curious too about ARM support, specifically on iOS and Android. This project by Paper Plane Tools claims to have adapted this library with support for Android and iOS, along with adding Unity integration. Given the number of issues with NuGet and Mono, I'm curious if someone has gone through the process of building and deploying to these platforms before.
@edelmanjm @JimSEOW I'm here to report that it IS possible to use OpenCVSharp on RPI3 Raspbian Stretch. Basically you need to download the 3.2 version of opencv and compile it on RPI (takes 4-5 hours - do not use the -j
option when using make
on Stretch) and install it. I then downloaded OpenCVSharp and modified its CMakeList.txt
by adding the following two lines (so that it can find opencv headers):
include_directories("/usr/local/include/")
set (CMAKE_CXX_STANDARD 11)
compiled opencvsharp and installed it. I didn't need to move any files around, the application found and used the libraries at /usr/local
I have taken the following notes while performing the procedure. Use it at your own risk. I tested it on RPI Stretch
OpenCV Installation
apt-get install -y build-essential cmake apt-transport-https
apt-get install -y zlib1g-dev libjpeg-dev libwebp-dev libpng-dev libtiff5-dev libjasper-dev libopenexr-dev libgdal-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev yasm libopencore-amrnb-dev libopencore-amrwb-dev libv4l-dev libxine2-dev libtbb-dev libeigen3-dev
apt-get install -y wget unzip curl nano git
cd ~
mkdir src
cd src
mkdir opencv
cd opencv
wget https://github.com/opencv/opencv/archive/3.2.0.zip
unzip 3.2.0.zip
rm 3.2.0.zip
wget https://github.com/opencv/opencv_contrib/archive/3.2.0.zip
unzip 3.2.0.zip
rm 3.2.0.zip
cd opencv-3.2.0/
#Build and install OpenCv
mkdir build
cd build
cmake -DOPENCV_EXTRA_MODULES_PATH=~/src/opencv/opencv_contrib-3.2.0/modules -D WITH_LIBV4L=ON -D CMAKE_BUILD_TYPE=RELEASE -D WITH_TBB=ON -D ENABLE_NEON=ON ..
# LIBV4L - Enabled Video 4 Linux | TBB - Multithreading | NEON - ARM Optimizations
make
sudo make install
sudo ldconfig
OpenCVSharp Installation
#download OpenCvSharp
cd ~/src
git clone https://github.com/shimat/opencvsharp.git
#install the Extern lib.
cd opencvsharp/src
sed -i.bak '5i\
include_directories("/usr/local/include/")\
set (CMAKE_CXX_STANDARD 11)\
' CMakeLists.txt
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig
Please, help. I have the following problem during OpenCVSharp installation:
pi@raspberrypi:~/src/opencvsharp/src/build $ make
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/src/opencvsharp/src/build
[ 3%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/aruco.cpp.o
[ 6%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/bgsegm.cpp.o
[ 10%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/calib3d.cpp.o
[ 13%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/core.cpp.o
[ 16%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/cuda.cpp.o
[ 20%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/dnn.cpp.o
In file included from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:0:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h: In function ‘cv::dnn::Net* dnn_readNetFromDarknet(const char*, const char*)’:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:10:19: error: ‘readNetFromDarknet’ is not a member of ‘cv::dnn’
const auto net = cv::dnn::readNetFromDarknet(cfgFile, darknetModelStr);
^~
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h: In function ‘cv::dnn::Net* dnn_readNetFromTensorflow(const char*, const char*)’:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:24:19: error: ‘readNetFromTensorflow’ is not a member of ‘cv::dnn’
const auto net = cv::dnn::readNetFromTensorflow(model, configStr);
^~
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h: In function ‘cv::dnn::Net* dnn_readNetFromTorch(const char*, int)’:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:30:19: error: ‘readNetFromTorch’ is not a member of ‘cv::dnn’
const auto net = cv::dnn::readNetFromTorch(model, isBinary != 0);
^~
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h: In function ‘cv::Mat* dnn_readTorchBlob(const char*, int)’:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:37:25: error: no matching function for call to ‘cv::Mat::Mat(const cv::dnn::Blob&)’
return new cv::Mat(blob);
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3518:0,
from /usr/local/include/opencv2/core.hpp:59,
from /usr/local/include/opencv2/opencv.hpp:52,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:17,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:4,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:
/usr/local/include/opencv2/core/mat.inl.hpp:1179:1: note: candidate: cv::Mat::Mat(cv::Mat&&)
Mat::Mat(Mat&& m)
^~~
/usr/local/include/opencv2/core/mat.inl.hpp:1179:1: note: no known conversion for argument 1 from ‘const cv::dnn::Blob’ to ‘cv::Mat&&’
In file included from /usr/local/include/opencv2/core/cuda.hpp:872:0,
from /usr/local/include/opencv2/stitching/detail/warpers.hpp:47,
from /usr/local/include/opencv2/stitching/warpers.hpp:46,
from /usr/local/include/opencv2/stitching.hpp:48,
from /usr/local/include/opencv2/opencv.hpp:86,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:17,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:4,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:
/usr/local/include/opencv2/core/cuda.inl.hpp:621:1: note: candidate: cv::Mat::Mat(const cv::cuda::GpuMat&)
Mat::Mat(const cuda::GpuMat& m)
^~~
/usr/local/include/opencv2/core/cuda.inl.hpp:621:1: note: no known conversion for argument 1 from ‘const cv::dnn::Blob’ to ‘const cv::cuda::GpuMat&’
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:52,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:17,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:4,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:
/usr/local/include/opencv2/core/mat.hpp:974:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::MatCommaInitializer_<_Tp>&)
template<typename _Tp> explicit Mat(const MatCommaInitializer_<_Tp>& commaInitializer);
^~~
/usr/local/include/opencv2/core/mat.hpp:974:37: note: template argument deduction/substitution failed:
In file included from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:0:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:37:25: note: ‘const cv::dnn::Blob’ is not derived from ‘const cv::MatCommaInitializer_<_Tp>’
return new cv::Mat(blob);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:52,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:17,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:4,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:
/usr/local/include/opencv2/core/mat.hpp:970:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point3_<_Tp>&, bool)
template<typename _Tp> explicit Mat(const Point3_<_Tp>& pt, bool copyData=true);
^~~
/usr/local/include/opencv2/core/mat.hpp:970:37: note: template argument deduction/substitution failed:
In file included from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:0:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:37:25: note: ‘const cv::dnn::Blob’ is not derived from ‘const cv::Point3_<_Tp>’
return new cv::Mat(blob);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:52,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:17,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:4,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:
/usr/local/include/opencv2/core/mat.hpp:966:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point_<_Tp>&, bool)
template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);
^~~
/usr/local/include/opencv2/core/mat.hpp:966:37: note: template argument deduction/substitution failed:
In file included from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:0:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:37:25: note: ‘const cv::dnn::Blob’ is not derived from ‘const cv::Point_<_Tp>’
return new cv::Mat(blob);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:52,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:17,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:4,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:
/usr/local/include/opencv2/core/mat.hpp:962:51: note: candidate: template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool)
template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
^~~
/usr/local/include/opencv2/core/mat.hpp:962:51: note: template argument deduction/substitution failed:
In file included from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:0:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:37:25: note: ‘const cv::dnn::Blob’ is not derived from ‘const cv::Matx<_Tp, m, n>’
return new cv::Mat(blob);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:52,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:17,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:4,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:
/usr/local/include/opencv2/core/mat.hpp:958:44: note: candidate: template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool)
template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
^~~
/usr/local/include/opencv2/core/mat.hpp:958:44: note: template argument deduction/substitution failed:
In file included from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:0:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:37:25: note: ‘const cv::dnn::Blob’ is not derived from ‘const cv::Vec<_Tp, m>’
return new cv::Mat(blob);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:52,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:17,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:4,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:
/usr/local/include/opencv2/core/mat.hpp:954:37: note: candidate: template<class _Tp> cv::Mat::Mat(const std::vector<_Tp>&, bool)
template<typename _Tp> explicit Mat(const std::vector<_Tp>& vec, bool copyData=false);
^~~
/usr/local/include/opencv2/core/mat.hpp:954:37: note: template argument deduction/substitution failed:
In file included from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:0:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:37:25: note: ‘const cv::dnn::Blob’ is not derived from ‘const std::vector<_Tp>’
return new cv::Mat(blob);
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/opencv.hpp:52,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:17,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:4,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:
/usr/local/include/opencv2/core/mat.hpp:936:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const std::vector<cv::Range>&)
Mat(const Mat& m, const std::vector<Range>& ranges);
^~~
/usr/local/include/opencv2/core/mat.hpp:936:5: note: candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:926:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range*)
Mat(const Mat& m, const Range* ranges);
^~~
/usr/local/include/opencv2/core/mat.hpp:926:5: note: candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:916:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const Rect&)
Mat(const Mat& m, const Rect& roi);
^~~
/usr/local/include/opencv2/core/mat.hpp:916:5: note: candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:906:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)
Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
^~~
/usr/local/include/opencv2/core/mat.hpp:906:5: note: candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:894:5: note: candidate: cv::Mat::Mat(const std::vector<int>&, int, void*, const size_t*)
Mat(const std::vector<int>& sizes, int type, void* data, const size_t* steps=0);
^~~
/usr/local/include/opencv2/core/mat.hpp:894:5: note: candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:880:5: note: candidate: cv::Mat::Mat(int, const int*, int, void*, const size_t*)
Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
^~~
/usr/local/include/opencv2/core/mat.hpp:880:5: note: candidate expects 5 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/mat.hpp:3518:0,
from /usr/local/include/opencv2/core.hpp:59,
from /usr/local/include/opencv2/opencv.hpp:52,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:17,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:4,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:
/usr/local/include/opencv2/core/mat.inl.hpp:459:1: note: candidate: cv::Mat::Mat(cv::Size, int, void*, size_t)
Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
^~~
/usr/local/include/opencv2/core/mat.inl.hpp:459:1: note: candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:426:1: note: candidate: cv::Mat::Mat(int, int, int, void*, size_t)
Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
^~~
/usr/local/include/opencv2/core/mat.inl.hpp:426:1: note: candidate expects 5 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:407:1: note: candidate: cv::Mat::Mat(const cv::Mat&)
Mat::Mat(const Mat& m)
^~~
/usr/local/include/opencv2/core/mat.inl.hpp:407:1: note: no known conversion for argument 1 from ‘const cv::dnn::Blob’ to ‘const cv::Mat&’
/usr/local/include/opencv2/core/mat.inl.hpp:398:1: note: candidate: cv::Mat::Mat(const std::vector<int>&, int, const Scalar&)
Mat::Mat(const std::vector<int>& _sz, int _type, const Scalar& _s)
^~~
/usr/local/include/opencv2/core/mat.inl.hpp:398:1: note: candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:381:1: note: candidate: cv::Mat::Mat(int, const int*, int, const Scalar&)
Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s)
^~~
/usr/local/include/opencv2/core/mat.inl.hpp:381:1: note: candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:390:1: note: candidate: cv::Mat::Mat(const std::vector<int>&, int)
Mat::Mat(const std::vector<int>& _sz, int _type)
^~~
/usr/local/include/opencv2/core/mat.inl.hpp:390:1: note: candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:373:1: note: candidate: cv::Mat::Mat(int, const int*, int)
Mat::Mat(int _dims, const int* _sz, int _type)
^~~
/usr/local/include/opencv2/core/mat.inl.hpp:373:1: note: candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:364:1: note: candidate: cv::Mat::Mat(cv::Size, int, const Scalar&)
Mat::Mat(Size _sz, int _type, const Scalar& _s)
^~~
/usr/local/include/opencv2/core/mat.inl.hpp:364:1: note: candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:347:1: note: candidate: cv::Mat::Mat(int, int, int, const Scalar&)
Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s)
^~~
/usr/local/include/opencv2/core/mat.inl.hpp:347:1: note: candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:356:1: note: candidate: cv::Mat::Mat(cv::Size, int)
Mat::Mat(Size _sz, int _type)
^~~
/usr/local/include/opencv2/core/mat.inl.hpp:356:1: note: candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:339:1: note: candidate: cv::Mat::Mat(int, int, int)
Mat::Mat(int _rows, int _cols, int _type)
^~~
/usr/local/include/opencv2/core/mat.inl.hpp:339:1: note: candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.inl.hpp:333:1: note: candidate: cv::Mat::Mat()
Mat::Mat()
^~~
/usr/local/include/opencv2/core/mat.inl.hpp:333:1: note: candidate expects 0 arguments, 1 provided
In file included from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:0:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h: In function ‘cv::Mat* dnn_blobFromImage(cv::Mat*, double, MyCvSize, MyCvScalar, int, int)’:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:43:20: error: ‘blobFromImage’ is not a member of ‘cv::dnn’
const auto blob = cv::dnn::blobFromImage(*image, scalefactor, cpp(size), cpp(mean), swapRB != 0, crop != 0);
^~
In file included from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:0:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h: In function ‘cv::Mat* dnn_blobFromImages(const cv::Mat**, int, double, MyCvSize, MyCvScalar, int, int)’:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:53:20: error: ‘blobFromImages’ is not a member of ‘cv::dnn’
const auto blob = cv::dnn::blobFromImages(imagesVec, scalefactor, cpp(size), cpp(mean), swapRB != 0, crop != 0);
^~
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h: In function ‘void dnn_shrinkCaffeModel(const char*, const char*)’:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:59:2: error: ‘shrinkCaffeModel’ is not a member of ‘cv::dnn’
cv::dnn::shrinkCaffeModel(src, dst);
^~
In file included from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:2:0:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn_Net.h: In function ‘void dnn_Net_setInputsNames(cv::dnn::Net*, const char**, int)’:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn_Net.h:49:7: error: ‘class cv::dnn::Net’ has no member named ‘setInputsNames’; did you mean ‘getLayerNames’?
net->setInputsNames(inputBlobNamesVec);
^~~~~~~~~~~~~~
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn_Net.h: In function ‘cv::Mat* dnn_Net_forward1(cv::dnn::Net*, const char*)’:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn_Net.h:55:45: error: ‘const void ret’ has incomplete type
const auto ret = net->forward(outputNameStr);
^
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn_Net.h: In function ‘void dnn_Net_forward2(cv::dnn::Net*, const cv::Mat**, int, const char*)’:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn_Net.h:66:44: error: no matching function for call to ‘cv::dnn::Net::forward(std::vector<cv::Mat>&, const cv::String&)’
net->forward(outputBlobsVec, outputNameStr);
^
In file included from /usr/local/include/opencv2/dnn.hpp:62:0,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:31,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:4,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:
/usr/local/include/opencv2/dnn/dnn.hpp:226:22: note: candidate: void cv::dnn::Net::forward(cv::dnn::Net::LayerId)
CV_WRAP void forward(LayerId toLayer = String());
^~~~~~~
/usr/local/include/opencv2/dnn/dnn.hpp:226:22: note: candidate expects 1 argument, 2 provided
/usr/local/include/opencv2/dnn/dnn.hpp:228:14: note: candidate: void cv::dnn::Net::forward(cv::dnn::Net::LayerId, cv::dnn::Net::LayerId)
void forward(LayerId startLayer, LayerId toLayer);
^~~~~~~
/usr/local/include/opencv2/dnn/dnn.hpp:228:14: note: no known conversion for argument 1 from ‘std::vector<cv::Mat>’ to ‘cv::dnn::Net::LayerId {aka cv::dnn::DictValue}’
/usr/local/include/opencv2/dnn/dnn.hpp:230:14: note: candidate: void cv::dnn::Net::forward(const std::vector<cv::dnn::DictValue>&, const std::vector<cv::dnn::DictValue>&)
void forward(const std::vector<LayerId> &startLayers, const std::vector<LayerId> &toLayers);
^~~~~~~
/usr/local/include/opencv2/dnn/dnn.hpp:230:14: note: no known conversion for argument 1 from ‘std::vector<cv::Mat>’ to ‘const std::vector<cv::dnn::DictValue>&’
In file included from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:2:0:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn_Net.h: In function ‘void dnn_Net_forward3(cv::dnn::Net*, const cv::Mat**, int, const char**, int)’:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn_Net.h:81:46: error: no matching function for call to ‘cv::dnn::Net::forward(std::vector<cv::Mat>&, std::vector<cv::String>&)’
net->forward(outputBlobsVec, outBlobNamesVec);
^
In file included from /usr/local/include/opencv2/dnn.hpp:62:0,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:31,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.h:4,
from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:1:
/usr/local/include/opencv2/dnn/dnn.hpp:226:22: note: candidate: void cv::dnn::Net::forward(cv::dnn::Net::LayerId)
CV_WRAP void forward(LayerId toLayer = String());
^~~~~~~
/usr/local/include/opencv2/dnn/dnn.hpp:226:22: note: candidate expects 1 argument, 2 provided
/usr/local/include/opencv2/dnn/dnn.hpp:228:14: note: candidate: void cv::dnn::Net::forward(cv::dnn::Net::LayerId, cv::dnn::Net::LayerId)
void forward(LayerId startLayer, LayerId toLayer);
^~~~~~~
/usr/local/include/opencv2/dnn/dnn.hpp:228:14: note: no known conversion for argument 1 from ‘std::vector<cv::Mat>’ to ‘cv::dnn::Net::LayerId {aka cv::dnn::DictValue}’
/usr/local/include/opencv2/dnn/dnn.hpp:230:14: note: candidate: void cv::dnn::Net::forward(const std::vector<cv::dnn::DictValue>&, const std::vector<cv::dnn::DictValue>&)
void forward(const std::vector<LayerId> &startLayers, const std::vector<LayerId> &toLayers);
^~~~~~~
/usr/local/include/opencv2/dnn/dnn.hpp:230:14: note: no known conversion for argument 1 from ‘std::vector<cv::Mat>’ to ‘const std::vector<cv::dnn::DictValue>&’
In file included from /home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn.cpp:2:0:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn_Net.h: In function ‘void dnn_Net_setInput(cv::dnn::Net*, const cv::Mat*, const char*)’:
/home/pi/src/opencvsharp/src/OpenCvSharpExtern/dnn_Net.h:87:7: error: ‘class cv::dnn::Net’ has no member named ‘setInput’; did you mean ‘setNetInputs’?
net->setInput(*blob, name);
^~~~~~~~
OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/build.make:182: recipe for target 'OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/dnn.cpp.o' failed
make[2]: *** [OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/dnn.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/all' failed
make[1]: *** [OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
The cause of the error was versions mismatch. The first time I have downloaded opencv and opencv_contrib arhives of 3.2.0 version. For now (2018.02.24) the latest version of OpenCVSharp is 3.3.1. Be careful during OpenCV Installation. After reinstalling opencv and opencv_contrib of 3.3.1 versions the OpenCVSharp make command executed fine.
Hello, CV gurus! First of all, need to say many thanks to @shimat for this powerful project.
Unfortunately - I got some problems with build on the latest project release.
Earlier there was the successfull working build with OpenCVSharp 3.3.1.20171117 above OpenCV 3.3.1 on Raspbian (OS oficial image - Raspbian Stretch Lite from 2017-11-29).
Build script was almost the same like @DaEkstrim was using.
When trying to build latest release (3.4.1.20180320) with identical environment - got the following errors:
root@5abb612d185d:/opencvsharp/src# make Scanning dependencies of target OpenCvSharpExtern [ 3%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/aruco.cpp.o [ 6%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/bgsegm.cpp.o [ 10%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/calib3d.cpp.o [ 13%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/core.cpp.o In file included from /opencvsharp/src/OpenCvSharpExtern/core.cpp:5:0: /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec2i" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:277:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec2i) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec3i" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:278:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec3i) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec4i" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:279:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec4i) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec6i" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:280:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec6i) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec2d" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:281:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec2d) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec3d" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:282:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec3d) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec4d" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:283:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec4d) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec6d" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:284:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec6d) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec2f" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:285:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec2f) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec3f" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:286:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec3f) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec4f" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:287:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec4f) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec6f" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:288:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec6f) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec2b" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:289:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec2b) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec3b" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:290:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec3b) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec4b" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:291:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec4b) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec6b" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:292:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec6b) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec2s" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:293:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec2s) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec3s" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:294:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec3s) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec4s" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:295:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec4s) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec6s" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:296:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec6s) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec2w" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:297:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec2w) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec3w" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:298:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec3w) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec4w" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:299:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec4w) ^~~~~~~~~~~~~~~~~~~~~~~~ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:270:11: error: pasting "::" and "Vec6w" does not give a valid preprocessing token cv::##name v; \ ^ /opencvsharp/src/OpenCvSharpExtern/core_FileNode.h:300:1: note: in expansion of macro 'DEFINE_FILENODE_READ_VEC' DEFINE_FILENODE_READ_VEC(Vec6w) ^~~~~~~~~~~~~~~~~~~~~~~~ OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/build.make:134: recipe for target 'OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/core.cpp.o' failed make[2]: *** [OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/core.cpp.o] Error 1 CMakeFiles/Makefile2:85: recipe for target 'OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/all' failed make[1]: *** [OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2 root@5abb612d185d:/opencvsharp/src#
Got the same error as @dmzubr :( using opencv 3.4.1
@Nepomuceno @dmzubr I had similar issues, looks like sources are broken for now. Try to download 3.4.1 version sources from release page. from here: https://github.com/shimat/opencvsharp/releases 3.4.1 from March worked fine for me. https://github.com/shimat/opencvsharp/archive/3.4.1.20180320.tar.gz
I am sorry for the late reply. This build problem was fixed by #508.
Now build is ok.
Thanks!
Hello! Mant thanks thanks to @shimat for this project! I need help. When i make "dotnet build" for OpenCVSharp project i got such errors:
im using dotnetcore 2.1
Generating MSBuild file /home/cv/src/opencvsharp/src/OpenCvSharp/obj/OpenCvSharp.csproj.nuget.g.props.
Generating MSBuild file /home/cv/src/opencvsharp/src/OpenCvSharp/obj/OpenCvSharp.csproj.nuget.g.targets.
Restore completed in 2,98 min for /home/cv/src/opencvsharp/src/OpenCvSharp/OpenCvSharp.csproj.
You are working with a preview version of the .NET Core SDK. You can define the SDK version via a global.json file in the current project. More at https://go.microsoft.com/fwlink/?linkid=869452
You are working with a preview version of the .NET Core SDK. You can define the SDK version via a global.json file in the current project. More at https://go.microsoft.com/fwlink/?linkid=869452
**You are working with a preview version of the .NET Core SDK. You can define the SDK version via a global.json file in the current project. More at https://go.microsoft.com/fwlink/?linkid=869452
/opt/dotnet/sdk/2.1.300-rc1-008673/Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v2.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/home/cv/src/opencvsharp/src/OpenCvSharp/OpenCvSharp.csproj]**
You are working with a preview version of the .NET Core SDK. You can define the SDK version via a global.json file in the current project. More at https://go.microsoft.com/fwlink/?linkid=869452
**/opt/dotnet/sdk/2.1.300-rc1-008673/Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/home/cv/src/opencvsharp/src/OpenCvSharp/OpenCvSharp.csproj]
/opt/dotnet/sdk/2.1.300-rc1-008673/Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/home/cv/src/opencvsharp/src/OpenCvSharp/OpenCvSharp.csproj]**
OpenCvSharp -> /home/cv/src/opencvsharp/src/OpenCvSharp/bin/Debug/netcoreapp1.0/OpenCvSharp.dll
OpenCvSharp -> /home/cv/src/opencvsharp/src/OpenCvSharp/bin/Debug/netstandard1.6/OpenCvSharp.dll
Build FAILED.
**/opt/dotnet/sdk/2.1.300-rc1-008673/Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v2.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/home/cv/src/opencvsharp/src/OpenCvSharp/OpenCvSharp.csproj]
/opt/dotnet/sdk/2.1.300-rc1-008673/Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/home/cv/src/opencvsharp/src/OpenCvSharp/OpenCvSharp.csproj]
/opt/dotnet/sdk/2.1.300-rc1-008673/Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/home/cv/src/opencvsharp/src/OpenCvSharp/OpenCvSharp.csproj]**
0 Warning(s)
3 Error(s)
`
Please try dotnet build -c Release -f netstandard2.0
Please try
dotnet build -c Release -f netstandard2.0
Thanks for reply!
unfortunately it did not work (
In #377 @johncharris wrote that
Right at the very end it will say that several of the target didn't build. That's fine since it builds both the dotnetcore1.0 assembly and the netstandard 1.4 assembly.
I see bin/debug/netcoreapp1.0 and bin/debug/netstandart1.6 folders when i use "dotnet build". In netcoreapp1.0 exist some files, there is OpenCvSharp.dll.
Does it means that this project was compiled for netcore?
Error with dotnet build -c Release -f netstandard2.0
root@cv-desktop:/home/cv/src/opencvsharp/src/OpenCvSharp# dotnet build -c Release -f netstandard2.0
Microsoft (R) Build Engine version 15.7.177.53362 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 1,25 sec for /home/cv/src/opencvsharp/src/OpenCvSharp/OpenCvSharp.csproj.
You are working with a preview version of the .NET Core SDK. You can define the SDK version via a global.json file in the current project. More at https://go.microsoft.com/fwlink/?linkid=869452
/opt/dotnet/sdk/2.1.300-rc1-008673/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(197,5): error : Assets file '/home/cv/src/opencvsharp/src/OpenCvSharp/obj/project.assets.json' doesn't have a target for '.NETStandard,Version=v2.0'. Ensure that restore has run and that you have included 'netstandard2.0' in the TargetFrameworks for your project. [/home/cv/src/opencvsharp/src/OpenCvSharp/OpenCvSharp.csproj]
Build FAILED.
/opt/dotnet/sdk/2.1.300-rc1-008673/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(197,5): error : Assets file '/home/cv/src/opencvsharp/src/OpenCvSharp/obj/project.assets.json' doesn't have a target for '.NETStandard,Version=v2.0'. Ensure that restore has run and that you have included 'netstandard2.0' in the TargetFrameworks for your project. [/home/cv/src/opencvsharp/src/OpenCvSharp/OpenCvSharp.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:19.74
Hello!
I used OpenCvSharp.dll from the build, and it worked, despite the errors! I also used libOpenCvSharpExtern.so.
Thanks again @shimat and all the other great guys!
I successfully compiled the opencv and opencvsharp sources for ARM on raspberry pi 3. Now how do i compile the dll to use it on windows? Can someone help me?
Hi there, Could you please advise me how you build opencv lib for ARM?
I successfully compiled the opencv and opencvsharp sources for ARM on raspberry pi 3. Now how do i compile the dll to use it on windows? Can someone help me?
Hi there, Could you please advise me how you build opencv lib for ARM?
Use instruction of @DaEkstrim above
I am not having luck using the instructions provided by DaExtrim, even when I change the version to 3.3.1 or 3.4.1.
I get numerous errors like: ccache -- not found FP16 not supported by C++ compiler no package gtk+... no package gstreamer (multiple files) no package libavresample no package libgphoto2 could not find OpenBLAS could not find Atlas Could not find JNI Could not find Matlab VTK is not found CMake error at cmake/OpenCVModile.cmake 288 (message) No modules has been found: /root/src/opencv_control-3.4.1/modules
I am trying to build this directly on a Raspberry PI 3 with Raspian desktop installed. I don't have very much experience using linux or building things without using Visual Studio, so I don't know how best to troubleshoot. Am I missing dependencies not mentioned in the instructions given by DaExstrim?
Does anyone have this already built and working on Raspberry PI 3 with OpenCVSharp3 on dotnet core 2.1 who could share the necessary files with me?
I successfully compiled the opencv and opencvsharp sources for ARM on raspberry pi 3. Now how do i compile the dll to use it on windows? Can someone help me?
Can you send me a link?I really need it.Thank! I need: OpenCvSharpExtern.dll libOpenCvSharpExtern.so
Hello members, I would like to rebuild an OpenCVSharp without FFMPEG for my project. I googled but still do not know how to make it. anyone can help me? Environment: Win 7 64bit VS 2017
@linh20111789 maybe this will helpful https://stackoverflow.com/questions/8232405/creating-opencv-project-with-no-video-transcoding-ffmpeg-part-support-on-linux
@alexgurenko I already read this thread. I can rebuild OpenCV without FFMPEG but I cannot rebuild OpenCVSharp using CMake (GUI). Project from GitHub: https://github.com/shimat/opencvsharp
My error when building Cmake: CMake Error at OpenCvSharpExtern/CMakeLists.txt:8 (find_package): By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "OpenCV", but CMake did not find one.
Could not find a package configuration file provided by "OpenCV" with any of the following names:
OpenCVConfig.cmake
opencv-config.cmake
Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set "OpenCV_DIR" to a directory containing one of the above files. If "OpenCV" provides a separate development package or SDK, be sure it has been installed.
@linh20111789 get it from mine https://github.com/toanlcgift/RPISpiderRobot/blob/master/LiveStreamServer/LiveStreamServer/libOpenCvSharpExtern.so
@toanlcgift what can i do with your file. My project run on Window environment
Dou you compile project for windows on arm? Use VS for compilation
I compile OpenCVSharp for Application in Window, but i don't want to use FFMPEG, so i need to rebuild OpenCVSharp instead of using Nuget and installing.
@alexgurenko on PC, not ARM
I successfully compiled the opencv and opencvsharp sources for ARM on raspberry pi 3. Now how do i compile the dll to use it on windows? Can someone help me?