c++ - What is the difference between calls to `imread`in openCV? -
what difference between calls imreadin opencv?on local machine both of them work.
1) cv::imread(filename.c_str(), cv_load_image_color); 2) cv::imread(filename, cv_load_image_color); in first case convert std::string c style string. in second case pass std::string it. calls equivalent?
the calls have same effect. cv::imread takes const std::string& first argument, first version result in creation of temporary std::string object, constructed const char* returned filename.c_str().
Comments
Post a Comment