Error when opencv running (visual studio c++)

asked 2016-09-27 06:16:30 -0600

greenworld gravatar image

updated 2016-09-27 07:18:28 -0600

I have an error with information as below:

OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)size.p[0] && (unsigned)(i1DataType<_Tp>::channels) < (unsigned)(size.p[1]channels()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3) - 1))*4) & 15) == elemSize1()) in cv::Mat::at, file E:\EE_env\OpenCV\opencv\build\include\opencv2/core/mat.hpp, line 538 Does anyone know how to solve my problem. Thank you!

edit retag flag offensive close merge delete

Comments

can you show the context / code, please ?

berak gravatar imageberak ( 2016-09-27 06:39:42 -0600 )edit

Can you help to provide me your guesses ? Or anything related to this problem. The source is quite complex so I can post in here, hope you sympathize.

greenworld gravatar imagegreenworld ( 2016-09-27 09:56:58 -0600 )edit

well, you're obviously doing something bad, try to locate it, and maybe show the +-5 lines of code around that, so we can make more educated guesses.

berak gravatar imageberak ( 2016-09-27 10:03:09 -0600 )edit

I can not determine which line cause the error, the program run for a while and is halted, it just jump to that file (mat.hpp) at that line. Thank you!

greenworld gravatar imagegreenworld ( 2016-09-27 11:36:08 -0600 )edit
1

cmon, you got the best debugger, the world has seen, ever. can it be, you just don't know , how to handle anything ?

sorry, kid, but with your recent approach, you're not going to make anything, ever.

berak gravatar imageberak ( 2016-09-27 11:41:57 -0600 )edit