OPENCV MAT函数形参引用与浅拷贝深拷贝问题

it2022-05-05  157

opencv mat作为函数形参默认为浅拷贝,函数改变mat内容,原mat跟着改变。需要将mat形参写成mat.clone()深拷贝来保证原mat不被改变!


最新回复(0)