Nor this class nor mat has any virtual methods. The class mat tp is a thin template wrapper on top of the mat class. Often times when we pass cv mat we forget one important thing.