c++ - Pad array with last element -
i have matrix of mat object, have pad bigger mat object last elements of every rows , cols of original object around original array. in
this way tried padding zeros(i have change it).
mat padded; int padding = padsize; padded.create(img.rows+padding,img.cols+padding,img.type()); padded.setto(cv::scalar::all(0)); img.copyto(padded(rect(padding,padding,img.rows,img.cols);
in last line see error :
no matching function call 'cv::mat::copyto(cv::mat)'
Comments
Post a Comment