Commit 41ad44673d866020e94046e1822de4f16da60f8f
1 parent
e9e9c555
Add vbb if set in metadata, add warning if cvmatio not installed when reading seqs
Showing
1 changed file
with
6 additions
and
4 deletions
openbr/plugins/stream.cpp
| ... | ... | @@ -433,10 +433,12 @@ public: |
| 433 | 433 | } |
| 434 | 434 | |
| 435 | 435 | #ifdef CVMATIO |
| 436 | - QString f = basis.file.name; | |
| 437 | - QString vbb = f.replace(f.lastIndexOf("."), 4, ".vbb"); | |
| 438 | - vbb.replace(vbb.lastIndexOf("vid"), 3, "annotations"); | |
| 439 | - annotations = TemplateList::fromGallery(File(vbb)); | |
| 436 | + if (basis.file.contains("vbb")) { | |
| 437 | + QString vbb = basis.file.get<QString>("vbb"); | |
| 438 | + annotations = TemplateList::fromGallery(File(vbb)); | |
| 439 | + } | |
| 440 | +#else | |
| 441 | + qWarning("cvmatio not installed, bounding boxes will not be available. Add -DBR_WITH_CVMATIO cmake flag to install."); | |
| 440 | 442 | #endif |
| 441 | 443 | |
| 442 | 444 | return true; | ... | ... |