It would help if you pointed out where it was crashing.
Did you mean to pass those matices/vectors by value?
It crashes before it even starts executing anything in main, no matter where i place a break point it crashes before it even reaches the break point.
yes, i meant to pass them by value.
unless if passing by reference would work how would i change it to do that.
i should do this with all where i define a function which require a matrix i should change it to const Mat& matrixname
and when calling the function i woul do
i don't think i use scalar mean pixel but still will change it as well as others the same way.
EDIT:So the stack overflow error cannot be solved then
i changed it to pass by const reference and still getting the error.
I changed only the matrices that do not change in the function.
but, still error.
any help or is it something to do with visual studio bug
Last edited on
so i decided to reduce the size of the 3d array to 60 and no more stack over flow error
but it now comes error to when i used pass by const reference
Assertion failed (!fixedSize() || ((Mat*)obj)->size.operator()()==_sz) in unknow function, file .... matrix.cpp, line 1313.
so i will leave it as pass by value