Plot Boxes then Plot them in the original photo ?
Mostrar comentarios más antiguos
I want to plot only the following boxes (5,6,7,8,9,10,12,13) from 19 box which their coordinates stored in the attached file "Boxes".
The color of the boxes should be as the following:
5,6 ==> Same color
7,8 ==> same color
9,10 ==> same color
12,13 ==> same color
I tried the following code to plot the specific mentioned boxes (5,6,7,8,9,10,12,13) , but the size of the boxes are too big compared with their original size(you can see their original size when you plot all the boxes):
%% Plot bboxes
p=cellfun(@polyshape, boxes);
plot(p); xlabel x; ylabel y
set(gca, 'YDir','reverse')
After ploting the boxes I want to plot them on the original photo(the attached one).??
6 comentarios
M
el 24 de Mayo de 2022
DGM
el 24 de Mayo de 2022
They don't look too big to me:

M
el 24 de Mayo de 2022
M
el 24 de Mayo de 2022
M
el 24 de Mayo de 2022
load boxes.mat
A = imread('Image.jpg');
imshow(A); hold on
boxes = num2cell(boxes,[1 2]);
p = cellfun(@polyshape, boxes);
p = p([5 6 7 8 9 10 12 13]);
colororder(repelem(lines(7),2,1))
plot(p);
xlabel x;
ylabel y
set(gca, 'YDir','reverse')

Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Image Arithmetic 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!
