Create a heatmap on top of the image using Matlab

Here is the scatter plot and the image - I want to create a heat map on a specific image. I have a 2x2 "templeCoords" matrix (representing the pixel points of the image). I used the following lines to save the image.

C=Imread('nwntemplemap.png'); %% Display the picture figure, imshow(C) hold on; HeatMap(templeCoords); 

It opens 2 different windows - one with the image uploaded by me, and the other is a heat map, I think.

Unfortunately, he could not cope with this, since he first worked with a heat map. Can anyone help?

Added question: is it even possible to draw heat maps with the available data that I mentioned?

The image above is a scatter plot of the points, and the image

+4
source share
1 answer

I would make a heat map and put an image on it (is it a maze?). and make your image transparent. check it out how to do it. http://blogs.mathworks.com/steve/2009/02/18/image-overlay-using-transparency/

To use the HeatMap function in Matlab, you need to submit a two-dimensional histogram (i.e. how many observations for a specific coordinate) for your temple. try this http://blogs.mathworks.com/videos/2010/01/22/advanced-making-a-2d-or-3d-histogram-to-visualize-data-density/

this is

http://www.mathworks.com/matlabcentral/fileexchange/29709-function-to-make-a-2d-histogram

or

http://www.mathworks.com/matlabcentral/fileexchange/14205-2d-histogram

+3
source

Source: https://habr.com/ru/post/1481232/


All Articles