hybridgroup / gocv

Go package for computer vision using OpenCV 4 and beyond. Includes support for DNN, CUDA, and OpenCV Contrib.
https://gocv.io
Other
6.48k stars 859 forks source link

Recommended way to update instillation #260

Open iaburton opened 6 years ago

iaburton commented 6 years ago

Description

Trying to update between releases constantly breaks CGO/OpenCV.

Your Environment

Anyways, I've been using this library well before v11 and everytime I want to update, I update via the normal "go get -u -d" method. However, this never works completely because so much CGO changes that it doesn't seem to match the OpenCV I had installed from the previous release. Usually to fix it I have to uninstall everything or just try rerunning the install script. This isn't too bad on my i7 dev machine but it hurts on my Pi2 and Zero.

This was the output of my latest attempt to update to v14

# gocv.io/x/gocv core.cpp: In function ‘void Mat_Size(Mat, IntVector*)’: core.cpp:141:27: error: ‘struct cv::MatSize’ has no member named ‘dims’ int* ids = new int[ms.dims()]; ^ core.cpp:143:31: error: ‘struct cv::MatSize’ has no member named ‘dims’ for (size_t i = 0; i < ms.dims(); ++i) { ^ core.cpp:147:22: error: ‘struct cv::MatSize’ has no member named ‘dims’ res->length = ms.dims();

Is there a recommended or easier way to update both gocv and OpenCV release to release? Thanks.

iaburton commented 6 years ago

To confirm, right after creating this issue I went ahead and redid the entire install on my i7 machine (takes about 4 minutes) and that resolved the errors I pasted above. Again, this is something I deal with from time to time when updating (though the errors are always different), I'm just hoping there is a better way next time :)