How do I get only the width and height?
Mostrar comentarios más antiguos
I have a set a minimum width = 300 and height = 300 for the bounding box. I need to compare the width and height that is above 300. But right now, I am unable to compare them as I could not return the width or height values in each row. May I know how can I achieve that? Thanks.
bbox =
1174 557 63 66
1692 1517 74 78
1157 467 69 73
1123 1447 72 77
887 1572 77 82
1586 1275 93 100
1589 1517 89 95
706 1300 115 122
540 1309 122 130
496 1718 1262 1342
Respuesta aceptada
Más respuestas (2)
Andrei Bobrov
el 15 de Nov. de 2015
bbox(3);
3 comentarios
Leonard Yeo
el 15 de Nov. de 2015
Andrei Bobrov
el 15 de Nov. de 2015

Leonard Yeo
el 15 de Nov. de 2015
Editada: Leonard Yeo
el 15 de Nov. de 2015
Image Analyst
el 15 de Nov. de 2015
Try this:
bbox = [
1174 557 63 66
1692 1517 74 78
1157 467 69 73
1123 1447 72 77
887 1572 77 82
1586 1275 93 100
1589 1517 89 95
706 1300 115 122
540 1309 122 130
496 1718 1262 1342]
% Set min width in column 3 to 300
bbox(:, 3) = max(300, bbox(:, 3))
% Set min height in column 4 to 300
bbox(:, 4) = max(300, bbox(:, 4))
The final result:
bbox =
1174 557 300 300
1692 1517 300 300
1157 467 300 300
1123 1447 300 300
887 1572 300 300
1586 1275 300 300
1589 1517 300 300
706 1300 300 300
540 1309 300 300
496 1718 1262 1342
1 comentario
Leonard Yeo
el 15 de Nov. de 2015
Categorías
Más información sobre Computer Vision with Simulink en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
