c++ - OpenCV: In a matrix, how to assign same value to all elements in a row -
for following expressions in matlab, what opencv equivalent?
a(2,:)=3; from know, can in opencv follows:
mat arepeated; repeat(value, 1, a.cols, arepeated); arepeated.copyto(a.row(1)); here value 1x1 mat value 3. there more efficient way wrote above?
this post suggested std::fill examples show usage vector object. i'm not sure if can applied mat objects well, or there other function. can guide please on this?
how about:
a.row(1).setto(scalar(value));
Comments
Post a Comment