Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.

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:

lass projectresults

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.

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:

lass 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.

click to hide/show revision 4
No.4 Revision

updated 2015-05-28 09:08:25 -0600

berak gravatar image

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);

~project(void);

projectresults process(std::list<projectparameter>& ParameterSet, wchar_t *imgName);

*imgName);
    double contour();   
 double plazmaH, Y02;

};

};

in .cpp file there is defination

projectresults project::process(std::list<projectparameter>& ParameterSet, /char /*char* imgName*/  wchar_t *imgName)
 {
    Mat imgOriginal =imread(imgName, 1);

=imread(**imgName**, 1);

please guide me how can I solve this error.

Thank you very much in advance.