how to create bouding box
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have centroid of picture I want create bounding box upper and lower from center point of picture
0 comentarios
Respuestas (1)
Image Analyst
el 4 de Mzo. de 2017
Use rectangle() and your x and y centroid which you say you already have:
[rows, columns, numberOfColorChannels] = size(mask);
imshow(mask);
axis on;
hold on
% Specify half height of the rectangle.
halfHeight = 200; % Whatever you want.
% Plot rectangle in upper half.
rectangle('Position',[1, yCentroid - halfHeight, columns, 2*halfHeight], ...
'LineWidth', 3, 'EdgeColor', 'b');
% Plot star in middle
plot(xCentroid, yCentroid, 'b*', 'MarkerSize', 30)
hold off
0 comentarios
Ver también
Categorías
Más información sobre Image Processing and Computer Vision en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!