Skip to content

Commit 5c3f5ae

Browse files
committed
update
1 parent 4afff4c commit 5c3f5ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

demo/csrc/c/image_segmentation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ int main(int argc, char* argv[]) {
5959

6060
cv::Mat color_mask = cv::Mat::zeros(result->height, result->width, CV_8UC3);
6161
int pos = 0;
62+
std::vector<int> idxs(result->classes);
6263
for (auto iter = color_mask.begin<cv::Vec3b>(); iter != color_mask.end<cv::Vec3b>(); ++iter) {
6364
// output mask
6465
if (result->mask) {
6566
*iter = palette[result->mask[pos++]];
6667
}
6768
// output score
6869
if (result->score) {
69-
std::vector<int> idxs(result->classes);
7070
std::iota(idxs.begin(), idxs.end(), 0);
7171
auto k = std::max_element(
7272
idxs.begin(), idxs.end(),

0 commit comments

Comments
 (0)