Error occurring in InsertObjectAnnotations function defined by matlab
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hamza Afzal
le 15 Fév 2021
Réponse apportée : Walter Roberson
le 15 Fév 2021
I am working on faster rcnn. I tests an image from testdatatbl.
Problem is on my output image, i want output image to have bboxes, scores and labels,
However when i use InsertObjectAnnotations(), it doesnot works well.
I = imread(testDataTbl.imageFilename{1});
I = imresize(I,inputSize(1:2));
[bboxes,scores,labels] = detect(detector1,I);
I = insertObjectAnnotation(I,'rectangle',bboxes,scores,(labels '%s'));
figure
imshow(I)
I = insertObjectAnnotation(I,'rectangle',bboxes,scores,(labels '%s'));
↑
Error: Invalid expression. Check for missing multiplication operator, missing or unbalanced
delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
I = imread(testDataTbl.imageFilename{1});
I = imresize(I,inputSize(1:2));
[bboxes,scores,labels] = detect(detector1,I);
I = insertObjectAnnotation(I,'rectangle',bboxes,scores,labels);
figure
imshow(I)
2) Error using insertObjectAnnotation
Expected a string scalar or character vector for the parameter name.
3) i want all three bboxes,scores and labels on my object. Is there a mistake ?
0 commentaires
Réponse acceptée
Walter Roberson
le 15 Fév 2021
I = insertObjectAnnotation(I,'rectangle',bboxes,scores,(labels '%s'));
(labels '%s') is not valid syntax.
Look at the example, https://www.mathworks.com/help/vision/ref/selectstrongestbboxmulticlass.html?searchHighlight=bboxes%20scores%20labels&s_tid=srchtitle#mw_463b1a2b-90a7-4526-a95b-fc9bbe9190bc
annotations = string(labels) + ": " + string(scores);
I = insertObjectAnnotation(I,'rectangle',bboxes,cellstr(annotations));
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Computer Vision Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!