smae code not working in different device

asked 2020-02-07 05:11:22 -0500

dineshlama gravatar image

I have written some robot vision algorithm in c++ using opencv libraryes and tested in ubuntu 18.04 computer. But when i try to run the same code in raspberrryp io 4 B with 4 GB ram and 32 GB sd card It is showing me the given error:

terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(3.4.9-dev) /home/pi/opencv/modules/imgproc/src/convhull.cpp:137: error: (-215:Assertion failed) total >= 0 && (depth == CV_32F || depth == CV_32S) in function 'convexHull'

Aborted

I am currently linking opencv 3 for this code. Before this i have installed opencv 4 but latter installed opencv 3 so that he version in my computer and raspbery pi matches. could this problem be arising because i installed two different ocv versions? Or somekind of space problem? As i debugged the code myself in raspberry pi this problem is occuring when this line comes:

 cv::RotatedRect minRect = minAreaRect( cv::Mat(v1.edge_pixs));
edit retag flag offensive close merge delete

Comments

please show more code

berak gravatar imageberak ( 2020-02-07 05:39:30 -0500 )edit