Overlaying data on image
Mostra commenti meno recenti
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!

Risposta accettata
Più risposte (1)
Oliver Hancock
il 2 Mag 2021
Modificato: Oliver Hancock
il 2 Mag 2021
0 voti
2 Commenti
Image Analyst
il 2 Mag 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
il 3 Mag 2021
Categorie
Scopri di più su Image Arithmetic in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


