nicer interface with the use of InputArray and OutptArray instated of (const Mat&)