我有一个任务,其中将视频流作为一批图像处理,我已经分配了一个指针,并且最初将图像作为字符串处理。这是代码中发生错误的部分
String *Img_seq;
Img_seq = new string[200].c_str();
Mat src, img, img1, image, img_dst, frame;
double TotalTime = 0.0, AveTime = 0.0;
char imgInPath[256], imgOutPath[256], imgOutPath1[256], imgOutPath2[256], BboxPath[256];
string imgpath;
std::vector<cv::String> filenames;
cv::String folder;
capture >> frame;
stringstream ss;
rectangle(frame, cv::Point(10, 2), cv::Point(100, 20),
cv::Scalar(255, 255, 255), -1);
ss << capture.get(CV_CAP_PROP_POS_FRAMES);
Img_seq[200] = ss.str();
keyboard = waitKey( 30 );
正在发生的错误是:
错误:无法转换‘std :: __ cxx11 :: string * {aka std :: __ cxx11 :: basic_string }”分配为“ cv :: String ”
Img_seq =新字符串[200] .c_str();
在这种情况下我该怎么办,我是新来的,所以可以解决基本问题
答案 0 :(得分:0)
$stateProvider .state("Attractions", { url: "/Attractions", templateUrl: "app/components/layout/Attractions.html", resolve: loader(["scripts/components/layout/AttractionsController", "scripts/components/distributed/popupModalController"]), controller: "attractionsCtrl" }); $state.go('Attractions');
应该是
String *Img_seq = new string[200].c_str();
或更佳
String *Img_seq = new String[200];