Robot OpenCV allocation crash with camera code

So I’m trying to flip between two cameras with a button, and I found this post with a solution that seems to have worked. However, after copying it into my robot code I get the error

OpenCV(3.4.4) Error: Assertion failed (!fixedSize()) in release, file /var/lib/jenkins/workspace/OpenCV/OpenCV - Release/arm/opencv/modules/core/src/matrix_wrap.cpp, line 1668
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(3.4.4) /var/lib/jenkins/workspace/OpenCV/OpenCV - Release/arm/opencv/modules/core/src/matrix_wrap.cpp:1668: error: (-215:Assertion failed) !fixedSize() in function 'release'

Any help? I’m probably missing something obvious

That code doesn’t check the return value of getFrame(). I would recommend you use this code except replace getServer() with the new (to 2019.3.2) addSwitchedCamera().

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.