c++ - Deep copying cv::Mat alternatives, which is better? -


I want to make a deep copy of an image which is better for performance?

  cv :: Mat new_img (old_img, true);   

(This is not the first one completely correct, see my answer) or

  cv :: Mat new_img = old_img.clone ();   

(I'm asking this because the second thing is more attractive to me as a point, but I'm not sure how bad I am. Maybe I also have a stable CV_CLONE = true ... if one gets better first.)

you can see That's what everyone sees after seeing them. Constructor is 00172, clone is 00346. Both are called the same internal function copy, so I imagine that they are essentially similar in terms of performance.

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -