Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
irexyc committed Jan 11, 2023
1 parent 4afff4c commit 5c3f5ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demo/csrc/c/image_segmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ int main(int argc, char* argv[]) {

cv::Mat color_mask = cv::Mat::zeros(result->height, result->width, CV_8UC3);
int pos = 0;
std::vector<int> idxs(result->classes);
for (auto iter = color_mask.begin<cv::Vec3b>(); iter != color_mask.end<cv::Vec3b>(); ++iter) {
// output mask
if (result->mask) {
*iter = palette[result->mask[pos++]];
}
// output score
if (result->score) {
std::vector<int> idxs(result->classes);
std::iota(idxs.begin(), idxs.end(), 0);
auto k = std::max_element(
idxs.begin(), idxs.end(),
Expand Down

0 comments on commit 5c3f5ae

Please sign in to comment.