Ask Your Question

Revision history [back]

Just read doc :

How to copy Mat

There are 2 ways to copy a Mat:

// 1. Clone

let dst = src.clone();

// 2. CopyTo(only entries indicated in the mask are copied)

src.copyTo(dst, mask);