c++ - opencv findContours() crashes the program -
i new image processing, , i'm working on real time tracking
but stuck findcountours function.
cvtcolor(*pimg, *pimg, cv_rgba2gray); //convert gray image mask = pimg->clone(); //clone source mask.convertto(mask,cv_8uc1); //convert 8uc1 vector<vector<point> > contours; vector<vec4i> hierarchy; findcontours( mask, contours, hierarchy, cv_retr_tree, cv_chain_approx_simple, point(0, 0) ); contours.clear(); hierarchy.clear(); and when run program crashes, if comment findcountours function fine.
i have checked documents there no clue happened.
mask = pimg->clone(); //clone source mask.convertto(mask,cv_8uc1); //convert 8uc1 replace
pimg.convertto(mask, cv_8u, arg); arg may different different types of input image. 255 float/double.
Comments
Post a Comment