How can I plot a heatmap on a custom image?

12 ビュー (過去 30 日間)
Srinivas Chivukula
Srinivas Chivukula 2017 年 12 月 13 日
コメント済み: Image Analyst 2017 年 12 月 14 日
Hi all,
I have a matrix of size 5x40, which I have been plotting using imagesc. This matrix corresponds to a heatmap of activity in different regions along the hand/forearm(from fingernails to elbow) during an experiment performed. When I use imagesc on this matrix, it understandably plots a grid of size 5x40 with intensities in each grid square corresponding the value within the matrix.
Instead of in a grid form, I would like to plot these data on an image of an actual hand/forearm. Assuming I have an outline corresponding to the hand and forearm, how can I plot the heatmap on this image?
I have been playing around for a while with the image, trying to obtain its coordinates, and reshape the matrix that I have to fit the coordinates of the image, etc but am having difficulty.
Any advice?
Thanks in advance!!

回答 (1 件)

Image Analyst
Image Analyst 2017 年 12 月 13 日
  2 件のコメント
Srinivas Chivukula
Srinivas Chivukula 2017 年 12 月 13 日
Thanks for the prompt reply.
The issue is that the underlying image is of a different shape...
so if I resized the heatmap and overlayed it onto the image, portions of the heatmap would show outside the boundaries of the hand/forearm.
I think I need to reshape the heatmap to the exact size of the outline of the hand/forearm, or somehow segment the hand and forearm and then point a value from my matrix to each segmented region. But I'm not sure how to do this....
Image Analyst
Image Analyst 2017 年 12 月 14 日
Why are they different sizes? And why can't you just resize the heatmap to be the same size as the RGB image? You can use imresize() for that.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeColor and Styling についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by