Hi there, working on a robotics application.
My program is crashing at this exact point ( i'm proceeding the edges and findcontours operations) it used to work but it seems it doesn't anymore since i moved the Mat and all the declarations out of the function to put it in the whole file, so i can access it in other functions.
void Edges(){
imread then cvtcolor .. blur .. canny.. findcontours.. etc.. it all works.
now i'm proceeding: for (unsigned int i = 0; i<contours.size(); i++){="" drawcontours(drawing,contours,i,(255,255,255),1,8,hierarchy,0,point()="" );="" this="" works="" again<="" p="">
and now: for (unsigned int i =0; i<contourssize(); i++){="" mucircle[i]="moments" (contours[i],false);<="" p="">
once this is reached it crashes and i get:
Debug assertion failed vector subscript out of range. on msdn i can read that this kind of error is due to accessing a vector value which doesn't exist. But thanks to the debug flag, i can see that the program does crash at this very exact point. and until then i never use vector.
any ideas??