error C2664: 'cv::imread' : cannot convert parameter 1 from 'wchar_t *' to 'const std::string &'
hello,
I am getting error as state above. here he the fraction of the code, in header file there is class:
class projectresults
{
public:
std::wstring TubeType;
double VolumeHeightMM;
};
class project
{
public:
project(void);
~project(void);
projectresults process(std::list<projectparameter>& ParameterSet, wchar_t *imgName);
double contour();
double plazmaH, Y02;
};
in .cpp file there is defination
projectresults project::process(std::list<projectparameter>& ParameterSet, /*char* imgName*/ wchar_t *imgName)
{
Mat imgOriginal =imread(**imgName**, 1);
please guide me how can I solve this error.
Thank you very much in advance.
do you have to use
wchar_t*
? (there is indeed no conversion)wchar_t *imgName is pointer for image data and i Have to do operation like edge detection or something like this, so its possible to do so without imread or Mat function. i.e. I am not getting direct image to do process.
"wchar_t imgName is pointer for image data" - what ? your code is telling a different story, it's the *filename, not the image (pixel) data.
please, before writing any further code based on speculation, rather try some of the tutorials