Commit 5aaf06d4 authored by Zhiping Jiang (蒋志平)'s avatar Zhiping Jiang (蒋志平) 💬

fix bug in 2.4 compiling

parent fa3e53f2
......@@ -70,7 +70,8 @@ public:
Mat3b colors = imagesc(baseMat);
vector<Scalar> defaultcolor(pointdata[name][0].size());
for (int j = 0; j < pointdata[name][0].size(); j++) {
defaultcolor[j] = colors.at<Vec3b>(j, 0);
auto color = colors.at<Vec3b>(j, 0); // cumbersome writing for OpenCV 2.4 compatibility
defaultcolor[j] = Scalar(color[0], color[1], color[2], 0);
}
colordata[name] = defaultcolor;
}
......@@ -113,7 +114,8 @@ public:
Mat3b colors = imagesc(baseMat);
vector<Scalar> defaultcolor(pointdata[name][0].size());
for (int j = 0; j < pointdata[name][0].size(); j++) {
defaultcolor[j] = colors.at<Vec3b>(j, 0);
auto color = colors.at<Vec3b>(j, 0);
defaultcolor[j] = Scalar(color[0], color[1], color[2], 0);
}
colordata[name] = defaultcolor;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment