Overlaying data on image
Afficher commentaires plus anciens
I have a set of points that have been extracted from users clicking on an image, which I now need to show overlapping the original
figure1 = xlsread("AllAMDataCollated.xlsx","Sheet2");
x = figure1(:,1);
y = figure1(:,2);
hold on
for k=0
ind = ((k*40)+1):40*(k+1); % indices of data to plot. When k=0 ind equals 1 to 40. When k=1 ind equals 41 to 80
plot(x(ind),y(ind),'.')
title(["AM Data Points"])
xlabel("Xpixels")
ylabel("Ypixels")
grid
saveas(gcf,'inputs.png')
P1 = imread('inputs.png');
I = imread('AM\cropped\09_58_00.jpg');
figure
imshowpair(P1,I,'blend','Scaling','joint')
end
This is the figure I'm intrested with, the points in the plot were determined by clicking on the faint ellipse in the image I'm trying to overlay however the scale is all off. any help would be great!

Réponse acceptée
Plus de réponses (1)
Oliver Hancock
le 2 Mai 2021
Modifié(e) : Oliver Hancock
le 2 Mai 2021
0 votes
2 commentaires
Image Analyst
le 2 Mai 2021
To fix existing bad data
yFixed = size(rgbImage, 1) - yBad;
If you need help with using ginput(), drawpoint(), or impoint(), so that you get the accurate values, let me know.
Oliver Hancock
le 3 Mai 2021
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!


