Plot Boxes then Plot them in the original photo ?
Afficher commentaires plus anciens
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 commentaires
M
le 24 Mai 2022
DGM
le 24 Mai 2022
They don't look too big to me:

M
le 24 Mai 2022
M
le 24 Mai 2022
M
le 24 Mai 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')

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Arithmetic dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
