# Revision history [back]

Detail 1: Conversion types

The excellent mexopencv utility uses a conversion type called MxArray as a means of converting to and from native Matlab (mxArray) and OpenCV and related types (cv::Mat, std::string, etc). Do you like this type of encapsulation, and if so do you prefer explicit conversion (assuming here prhs is of type mxArray**):

std::string name = MxArray(prhs[0]).toString();


or implicit conversion:

std::string name = MxArray(prhs[0]);


Or would you rather a set of utility functions that make memcopys and ownership more explicit:

std::string name = mxArrayToString(prhs[0]);