How to plot into a PNG image?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a script that plots a 3x3 grid of values as a colormap:
Data = [1:1:9; 1 2 3 4 5 6 7 8 9; 1 2 3 4 5 6 7 8 9 ;1 2 3 4 5 6 7 8 9;1 2 3 4 5 6 7 8 9];
M = zeros(3,3);
for ii = 2:size(Data,1)
plot(ii-1)
M(1:end) = Data(ii,:);
imagesc(M)
colormap jet
shading flat %for an exact result
% shading interp %for a smooth result
figure
end
These values/color intensities represent time spent in a given area. I have a picture of that area (which does not match the shape of the plot it is kinda oblong looking) saved as a png that I want to plot this grid into and fill the gray scale image with the colors instead of getting grid. Is this possible? I have tried to follow this blog post: http://blogs.mathworks.com/steve/2009/02/18/image-overlay-using-transparency/ but it is leading me nowhere. I do have the image processing toolbox if that helps. Thank you
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Blue dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!